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 your control textbook that the frequency response design method is most effective for systems with stable open-loop. To check the open-loop stability of our system, create a new m-file, and enter the following commands. Running this m-file in the Matlab command window should give you the step response shown below:
Unfortunately, our system is unstable in open-loop; however, we can still design the feedback system via frequency response method (even though this might not be the easiest way). First, let's generate the open-loop Bode plot and see what it looks like. Change the m-file to the following and re-run it in the Matlab command window. You should see a Bode plot similar to the one shown below:
From our design requirements, we can determine that the natural frequency (Wn) must be greater than 0.9 and the damping ratio (zeta) must be greater than 0.52 (please refer to the Pitch Controller: Root-Locus method for details). Using two equations shown below, we see that the bandwidth frequency and the phase margin must be greater than 0.9 and 52 degrees, respectively.
Currently, we have the bandwidth frequency of 1 rad/sec and the phase margin of 80 degrees. These values are within our desired region. Let's plot the closed-loop step response and see what it looks like. Delete the bode command from the above m-file and add the following commands. Running this new m-file should give you the following closed-loop step response:Tr = Rise time Wn = Natural frequency BW = Bandwidth frequency zeta = Damping ratio PM = Phase margin
As you can see, the transient response is worse that results in long settling time. We will implement a lead compensator to improve the system response.
The transfer function of a typical first-order lead compensator is
We need to find alead, Tlead and Klead. First, the phase margin requirement and the following equation can be used to find alead
Since we are required to have the phase margin of greater than 52 degrees, the alead must be greater than 8.43. Using this alead, the bandwidth frequency requirement of greater than 0.9 and the following equation leads us to have the Tlead of smaller than 0.382.
Let the Klead equal 0.1, alead equal 10, and Tlead equal 0.3 for now and enter the following commands to an new m-file.
Running this m-file in the Matlab command window gives you the following Bode and step response plots.
Although both bandwidth frequency and phase margin increased, the response still does not satisfy the design requirements. Let's increase alead and decrease Tlead. After several trial and error runs, an alead of 200, Tlead of 0.0025, and Klead of 0.05 , were found which gave the following lead compensator,
If you compare the above Bode plot to the original Bode plot, you see both the phase margin and the bandwidth frequency have increased. Increasing both of them improves the rise time, the overshoot, and the settling time, as seen in the above step response plot. To improve the steady-state error, we will add a lag compensator to the system.
The steady-state error will be reduced by a factor of alag. From the above step response, we see that the steady-state error is roughly 10%. Thus, alag needs to be approximately 0.1. The Tlag should be greater than alag*Tlag because this compensator must not greatly change the transient response.
After several trial and error runs, an alag of 0.1, Tlag of 20, and Klag of 1.5, were found which gave the following lag compensator,
If you see the Bode plot, the low frequency gain has increased while keeping the bandwidth frequency the same. This tells us that steady-state error has reduced while keeping the same rise time. The above step response shows that the steady-state error got eliminated. Now all design requirements are satisfied.
Tutorials