Control Tutorials For MATLAB and Simulink - Aircraft Pitch - PID Controller Design
Control Tutorials For MATLAB and Simulink - Aircraft Pitch - PID Controller Design
s = tf('s');
P_pitch = (1.151*s+0.1774)/(s^3+0.739*s^2+0.921*s);
Proportional control
Bode plot, and closed-loop step response plot displayed for the provided plant
transfer function with controller , by default.
The Edit Architecture button in Control System Designer window displays the
architecture of the control system being designed as shown below. This default
Since our reference is a step function of 0.2 radians, we can set the
precompensator block equal to 0.2 to scale a unit step input to our system.
This can be accomplished from the Compensator Editor window, which can be
opened by right-clicking on the plot and then selecting Edit Compensator.
https://ctms.engin.umich.edu/CTMS/index.php?example=AircraftPitch§ion=ControlPID 3/10
12/8/23, 9:53 PM Control Tutorials for MATLAB and Simulink - Aircraft Pitch: PID Controller Design
To begin with, let's see how the system performs with a proportional controller
set equal to 2. The compensator can be defined in the same manner
equal to 2. To see the performance of our system with this controller, move to
the IOTransfer_r2y:step tab. If you have accidentally closed this tab, you can
re-open it from the Control System Designer window by clicking on the New
Plot menu and selecting New Step. In response, a new window titled New Step
to plot will appear. From the Select Responses to Plot menu, then choose
A window will then open with the following step response displayed.
https://ctms.engin.umich.edu/CTMS/index.php?example=AircraftPitch§ion=ControlPID 4/10
12/8/23, 9:53 PM Control Tutorials for MATLAB and Simulink - Aircraft Pitch: PID Controller Design
Examination of the above shows that aside from steady-state error, the given
design requirements have not been met. The gain chosen for can be
adjusted in an attempt to modify the resulting performance through the
choose PID Tuning under the Automated Tuning menu. Then select a
Controller type of P and Select Loop to Tune as LoopTransfer_C as shown
https://ctms.engin.umich.edu/CTMS/index.php?example=AircraftPitch§ion=ControlPID 5/10
12/8/23, 9:53 PM Control Tutorials for MATLAB and Simulink - Aircraft Pitch: PID Controller Design
There are two options that can be chosen from the Tuning method drop-down
PID controller. It can be used for design of plants that are stable, unstable, or
integrating. However, the Classical design formulas algorithm requires a
stable or integrating plant and cannot tune the derivative filter. If you select
Classical design formulas algorithm, then in the Formula drop-down menu
a range of options can be seen. These options range from heuristic techniques,
choose the Robust response time algorithm. Then in the Design mode drop-
down menu, you can choose Time or Frequency. Since our design
Once all of the tuning settings have been chosen, then click the Update
Compensator button. The algorithm then chooses a proportional gain of =
1.1269. This controller meets the rise time requirement, but the settle time is
much too large. You can attempt requiring a faster response time (move the
slider to the right), however, this will result in an increase in overshoot and
https://ctms.engin.umich.edu/CTMS/index.php?example=AircraftPitch§ion=ControlPID 6/10
12/8/23, 9:53 PM Control Tutorials for MATLAB and Simulink - Aircraft Pitch: PID Controller Design
PI control
tuning to choose our controller gains as we did above, only now we will select a
Controller type of PI. Everything else will be left unchanged. Clicking on the
Compensator Update button then produces the following controller.
(3)
From inspection of the above, notice that the addition of integral control helped
reduce the average error in the signal more quickly (the error changes sign
around 20 seconds), but it didn't help reduce the oscillation. Let's try also adding
a derivative term to our controller.
PID Control
Again recalling the lessons we have learned in the Introduction: PID Controller
Design tutorial, increasing the derivative gain in a PID controller can often
https://ctms.engin.umich.edu/CTMS/index.php?example=AircraftPitch§ion=ControlPID 7/10
12/8/23, 9:53 PM Control Tutorials for MATLAB and Simulink - Aircraft Pitch: PID Controller Design
changing the Controller type to PID and again click the Update Compensator
(4)
This response meets all of the requirements except for the settle time which at
19.7 seconds is larger than the given requirement of 10 seconds. Reducing the
Response Time requirement (moving the slider to the right) will make the
response faster, while moving the Transient Behavior slider towards Robust
will help reduce the oscillation. The resulting PID controller for the shown
settings is given below.
(5)
https://ctms.engin.umich.edu/CTMS/index.php?example=AircraftPitch§ion=ControlPID 8/10
12/8/23, 9:53 PM Control Tutorials for MATLAB and Simulink - Aircraft Pitch: PID Controller Design
Here we can see that moving both sliders to the right made the response faster
and reduced the oscillation. However, the settling time is still greater than the
(6)