
Proportional control
Proportional-Derivative control
Proportional-Integral-Derivative control
In the Pitch Controller Modeling page, the transfer function was derived as

The input (elevator deflection angle, delta e) will be 0.2 rad (11 degrees), and the output is the pitch angle (theta).
The design requirements are
Recall from the PID Tutorial page, the transfer function of a PID controller is:

We will implement combinations of proportional (Kp), integral (Ki), and derivative (Kd) controllers in an unity feedback system shown below to study the system output.


Kp=[1]; num=[1.151 0.1774]; den=[1 0.739 0.921 0]; pitch=tf(num,den); contr=tf(Kp,1); sys_cl=feedback(contr*pitch,1);
For now, let the proportional gain (Kp) equal 2 and observe the system behavior. Enter the following commands into a new m-file and run it in the MATLAB command window. You should obtain the step response similar to the one shown below:
de=0.2; Kp=2; sys_cl=feedback(Kp*pitch,1); t=0:0.01:30; step(de*sys_cl,t)

As you see, both the overshoot and the settling time need some improvement.

Using the commands shown below and with several trial-and-error runs, a proportional gain (Kp) of 9 and a derivative gain (Kd) of 4 provided the reasonable response. To confirm this, change your m-file to the following and run it in the MATLAB command window. You should obtain the step response similar to the one shown below:
de=0.2; Kp=9; Kd=4; contr=tf([Kd Kp],1); sys_cl=feedback(contr*pitch,1); t=0:0.01:10; step(de*sys_cl,t)

This step response shows the rise time of less than 2 seconds, the overshoot of less than 10%, the settling time of less than 10 seconds, and the steady-state error of less than 2%. All design requirements are satisfied.
Even though all design requirements were satisfied with the PD controller, the integral controller (Ki) can be added to reduce the sharp peak and obtain a smoother response. After several trial-and-error runs, the proportional gain (Kp) of 2, the integral gain (Ki) of 4, and the derivative gain (Kd) of 3 provided a smoother step response that still satisfies all design requirements. To confirm this, enter the following commands to an m-file and run it in the command window. You should obtain the step response shown below:
de=0.2; Kp=2; Kd=3; Ki=4; num=[1.151 0.1774]; den=[1 0.739 0.921 0]; pitch=tf(num,den); contr=tf([Kd Kp Ki],[1 0]); sys_cl=feedback(contr*pitch,1); t=0:0.01:10; step(de*sys_cl,t)

