Starting with release R2015b, you can use Control System Tuner app and systune function in Robust Control Toolbox
to robustly tune controllers for plant models that have parametric uncertainty.
In this example, we will robustly tune the PID Controller shown in blue
against a mass-spring-damper plant model shown in green.
The nominal values of m, c, and k plant parameters are defined here.
We have also defined the uncertainty that these parameters can have: 40% uncertainty on m, 20% uncertainty on c,
and 30% uncertainty on k.
We have already tuned the PID controller against the nominal plant model, where we did not take parameter uncertainty into account.
We will now retune the PID controller by explicitly accounting for the uncertainty.
To do that we specify that when gain blocks for parameters m, c, and k are linearized,
we should use the uncertain parameters to represent them.
We repeat this for all three plant parameters.
Now, when we launch Control System Tuner app,
it will linearize the Simulink model, and it will substitute the nominal gain values for m, c, and k with their uncertain values.
It will thus compute an uncertain state-space system representing the plant.
Control System Tuner app will then tune our PID controller against this uncertain state-space system.
Let’s specify the block that we want to tune, our PID Controller.
Next we create the tuning requirement. We’ll specify the same one we used for tuning the nominal PID Controller -
reference tracking from the command r to the measurement x with one second response time.
When we get the tuning goal plot, we see multiple blue curves.
These multiple blue curves correspond to various combinations of parametric uncertainty in m, c, and k.
We see that for some of these combinations we do meet the requirement, but for some we don’t.
So let’s fix that by retuning the controller and explicitly taking uncertainty into account.
When we do that we see that we now meet the requirement for all possible variations of m, c, and k.
Let’s update PID Controller block values. Let’s now compare the nominal PID Controller – the one we tuned against the nominal plant model,
and the robust PID controller –the one we just tuned,
where we accounted for uncertainty in plant parameters.
To do we compute the closed loop transfer function from r to x that will take parameter uncertainty into account.
We’ll do that using linearize command from Simulink Control Design.
When we calculate this variable “robust�?, we get an uncertain state-space system “robust�?
that corresponds to the closed loop transfer function with robustly tuned controller.
We also calculated a similar closed-loop transfer function for the nominal PID controller, and we called it “nominal�?.
Now let’s compare the step response of the nominal PID controller and robust PID controller against the nominal plant model.
We see that even though there is some difference in step responses, it is hard to say which controller is really better.
Next, let’s use commands from Robust Control Toolbox to calculate the worst-case step responses for the two controllers.
When we do that, Robust Control Toolbox calculates m, c, and k parameter values that will result in the worst-case performance.
In this plot, the dashed blued line shows the worst-case response for our nominal controller,
and the dashed red line shows the worst case step response for the robustly tuned controller.
We clearly see that the robustly tuned controller has the superior worst-case performance, and that’s because we explicitly
accounted for parameter uncertainty when tuning this controller. This concludes the video.