This example shows how to tune a PID controller to reduce overshoot in reference tracking or to improve rejection of a disturbance at the plant input. Using the PID Tuner, the example illustrates the trade-off between reference tracking and disturbance rejection performance.
Load a Simulink® model that contains a PID Controller block.
The plant has poles at s = –1, s = –0.2, and s = –0.05. The model also includes a reference signal and a step disturbance a the plant input.
Setpoint tracking is the response at y to the reference signal, r. Disturbance rejection is a measure of the suppression at y of the injected disturbance, d.
Double-click the PID Controller block to open the Block Parameters dialog box.
Click Tune to open the PID Tuner, which designs an initial controller for the plant.
The initial controller design has some overshoot in the reference tracking response.
Right-click in the plot area, and select Characteristics > Peak Response. A blue dot appears at the point of maximum overshoot. Click the blue dot to display peak response data in a tool tip.
The tool tip shows that the overshoot is 8.45%. If this overshoot is too much for your application, you can reduce it using the Transient behavior slider.
Move the Transient behavior slider to the right until the overshoot is less than 0.2%.
Increasing controller robustness also reduces overshoot, so moving the Transient behavior slider to the right improves this measure of controller performance. However, for a given controller bandwidth (or response time), there is a trade-off between reducing reference tracking overshoot and optimizing disturbance rejection.
In the Response menu, select Input disturbance rejection to display the disturbance rejection response plot.
Right-click in the plot area, and select Characteristics > Settling Time. Click the blue dot to display the settling time tool tip.
The current controller design minimizes reference tracking overshoot. However, it responds sluggishly to a disturbance at the plant input, taking over two minutes to settle. You can use the Transient behavior slider to make the disturbance rejection more aggressive without changing the controller bandwidth.
Move the Transient behavior slider to the left until the disturbance response settles in under 60 seconds.
In the Response menu, select Reference tracking to see the effect of more aggressive transient behavior on the reference tracking overshoot.
Optimizing the disturbance rejection response for the given bandwidth increases the reference tracking overshoot to 12.6%.
The PID Tuner selects an initial controller design that balances this trade-off. The initial controller design has less reference tracking overshoot than the design optimized for disturbance rejection. Likewise, it has somewhat faster disturbance rejection than the design optimized to reduce overshoot. You can use the Transient behavior slider to adjust this balance as needed to suit your application.
To obtain independent control over reference tracking and disturbance rejection, you can use a two-degree-of-freedom controller (PID Controller (2DOF) block) instead of a single degree-of-freedom controller.