Main Content

Tune PID Controller to Favor Reference Tracking or Disturbance Rejection (PID Tuner)

这个例子展示了如何优化PID控制器reduce overshoot in reference tracking or to improve rejection of a disturbance at the plant input. Using thePID Tunerapp, the example illustrates the tradeoff between reference tracking and disturbance-rejection performance in PI and PID control systems.

In this example, you represent the plant as anLTI model. For information about usingPID Tunerto tune aPID Controllerblock in a Simulink®model, seeTune PID Controller to Favor Reference Tracking or Disturbance Rejection(Simulink Control Design).

Consider the control system of the following illustration.

The plant in this example is:

P l a n t = 0.3 s 2 + 0.1 s .

Reference tracking is the response atyto signals atr. Disturbance rejection is a measure of the suppression atyof signals atd. When you usePID Tunerto tune the controller, you can adjust the design to favor reference tracking or disturbance rejection as your application requires.

Design Initial PI Controller

Having an initial controller design provides a baseline against which you can compare results as you tune a PI controller. Create an initial PI controller design for the plant using PID tuning commandpidtune.

G = tf(0.3,[1,0.1,0]);% plant modelC = pidtune(G,'PI');

Use the initial controller design to openPID Tuner.

pidTuner(G,C)

Add a step response plot of the input disturbance rejection. SelectAdd Plot>Input Disturbance Rejection.

PID Tunertiles the disturbance-rejection plot side by side with the reference-tracking plot.

Tip

Use the options in theViewtab to change howPID Tunerdisplays multiple plots.

By default, for a given bandwidth and phase margin,PID Tunertunes the controller to achieve a balance between reference tracking and disturbance rejection. In this case, the controller yields some overshoot in the reference-tracking response. The controller also suppresses the input disturbance with a longer settling time than the reference tracking, after an initial peak.

Adjust Transient Behavior

Depending on your application, you might want to alter the balance between reference tracking and disturbance rejection to favor one or the other. For a PI controller, you can alter this balance using theTransient Behaviorslider. Move the slider to the left to improve the disturbance rejection. The responses with the initial controller design are now displayed as theBaseline response(dotted line).

Lowering the transient-behavior coefficient to 0.45 speeds up disturbance rejection, but also increases overshoot in the reference-tracking response.

Tip

Right-click on the reference-tracking plot and selectCharacteristics>Peak Responseto obtain a numerical value for the overshoot.

Move theTransient behaviorslider to the right until the overshoot in the reference-tracking response is minimized.

Increasing the transient-behavior coefficient to 0.70 nearly eliminates the overshoot, but results in extremely sluggish disturbance rejection. You can try moving theTransient behaviorslider until you find a balance between reference tracking and disturbance rejection that is suitable for your application. The effect that changing the slider has on the balance depends on the plant model. For some plant models, the effect is not as large as shown in this example.

Change PID Tuning Design Focus

到目前为止,控制系统的响应时间哈s remained fixed while you have changed the transient-behavior coefficient. These operations are equivalent to fixing the bandwidth and varying the target minimum phase margin of the system. If you want to fix both the bandwidth and target phase margin, you can still change the balance between reference tracking and disturbance rejection. To tune a controller that favors either disturbance rejection or reference tracking, you change thedesign focusof the PID tuning algorithm.

Changing thePID Tunerdesign focus is more effective the more tunable parameters there are in the control system. Therefore, it does not have much effect when used with a PI controller. To see its effect, change the controller type to PIDF. In theTypemenu, selectPIDF.

PID Tunerautomatically designs a controller of the new type, PIDF. Move theTransient Behaviorslider to set the coefficient back to 0.6.

Save this new design as the baseline design, by clicking theExportarrowand selectingSave as Baseline.

The PIDF design replaces the original PI design as the baseline plot.

As in the PI case, the initial PIDF design balances reference tracking and disturbance rejection. Also as in the PI case, the controller yields some overshoot in the reference-tracking response, and suppresses the input disturbance with a similar settling time.

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, selectReference tracking.

PID Tunerautomatically retunes the controller coefficients with a focus on reference-tracking performance.

The PIDF controller tuned with reference-tracking focus is displayed asTuned response(solid line). The plots show that the resulting controller tracks the reference input with considerably less overshoot and a faster settling time than the balanced controller design. However, the design yields much poorer disturbance rejection.

Change the design focus to favor disturbance rejection. In theOptionsdialog box, in theFocusmenu, selectInput disturbance rejection.

This controller design yields improved disturbance rejection, but results in some increased overshoot in the reference-tracking response.

When you use design focus option, you can still adjust theTransient Behaviorslider for further fine-tuning of the balance between the two measures of performance. Use the design focus and the sliders together to achieve the performance balance that best meets your design requirements. The effect of this fine tuning on system performance depends strongly on the properties of your plant. For some plants, moving theTransient Behaviorslider or changing theFocusoption has little or no effect.

Related Topics