Main Content

Tune 2-DOF PID Controller (PID Tuner)

This example shows how to design a two-degree-of-freedom (2-DOF) PID controller usingPID Tuner。例子还比较了二自由度控制器performance to the performance achieved with a 1-DOF PID controller.

In this example, you represent the plant as anLTI model。For information about usingPID Tunerto tune aPID Controller (2DOF)block in a Simulink®model, seeDesign Two-Degree-of-Freedom PID Controllers(Simulink Control Design)

2-DOF PID controllers include setpoint weighting on the proportional and derivative terms. Compared to a 1-DOF PID controller, a 2-DOF PID controller can achieve better disturbance rejection without significant increase of overshoot in setpoint tracking. A typical control architecture using a 2-DOF PID controller is shown in the following diagram.

For this example, first design a 1-DOF controller for the plant given by:

G ( s ) = 1 s 2 + 0.5 s + 0.1

G = tf(1,[1 0.5 0.1]); pidTuner(G,'PID')

Suppose for this example that your application requires a faster response than thePID Tunerinitial design. In the text box next to theResponse Timeslider, enter 2.

The resulting response is fast, but has a considerable amount of overshoot. Design a 2-DOF controller to improve the overshoot. First, set the 1-DOF controller as the baseline controller for comparison. Click theExportarrowand selectSave as Baseline

Design the 2-DOF controller. In theTypemenu, selectPID2

PID Tunergenerates a 2-DOF controller with the same target response time. The controller parameters displayed at the bottom right show thatPID Tunertunes all controller coefficients, including the setpoint weightsbandc, to balance performance and robustness. Compare the 2-DOF controller performance (solid line) with the performance of the 1-DOF controller that you stored as the baseline (dotted line).

Adding the second degree of freedom eliminates the overshoot in the reference tracking response. Next, add a step response plot to compare the disturbance rejection performance of the two controllers. SelectAdd Plot>Input Disturbance Rejection

You can move the plots in thePID Tunersuch that the disturbance-rejection plot side by side with the reference-tracking plot.

The disturbance-rejection performance is identical with both controllers. Thus, using a 2-DOF controller eliminates reference-tracking overshoot without any cost to disturbance rejection.

You can improve disturbance rejection too by changing thePID Tunerdesign focus. First, click theExportarrowand selectSave as Baselineagain to set the 2-DOF controller as the baseline for comparison.

Change thePID Tunerdesign focus to favor reference tracking without changing the response time or the transient-behavior coefficient. To do so, clickOptions, and in theFocusmenu, selectInput disturbance rejection

PID Tunerautomatically retunes the controller coefficients with a focus on disturbance-rejection performance.

智慧h the default balanced design focus,PID Tunerselects abvalue between 0 and 1. For this plant, when you change design focus to favor disturbance rejection,PID Tunersetsb= 0 andc= 0. Thus,PID Tunerautomatically generates an I-PD controller to optimize for disturbance rejection. (Explicitly specifying an I-PD controller without setting the design focus yields a similar controller.)

The response plots show that with the change in design focus, the disturbance rejection is further improved compared to the balanced 2-DOF controller. This improvement comes with some sacrifice of reference-tracking performance, which is slightly slower. However, the reference-tracking response still has no overshoot.

Thus, using 2-DOF control can improve disturbance rejection without sacrificing as much reference tracking performance as 1-DOF control. These effects on system performance depend strongly on the properties of your plant and the speed of your controller. For some plants and some control bandwidths, using 2-DOF control or changing the design focus has less or no impact on the tuned result.

See Also

Related Topics