|
|
|
Bode plot and open-loop response
Proportional controller
Lag controller
The state-space equations for this problem are:

The design criteria (for a steady-state speed of 10 m/s) are:
To see how this problem was originally set up, click here.

Converting it into Bode form the new transfer function should be:

In this form, it is easier to see where the frequency break points lie. In Matlab, we can look at the Bode plot and step response of the closed loop system by using either transfer function.
Before we begin, look again at the transfer function. Note that there is a pole-zero cancellation at the origin. Matlab does not automatically cancel the pole and zero for you, and their presence may cause numerical errors, so it is a good idea to make the changes manually if you notice it. This can be done in this case by entering the following code at the end of your m-file:


Let's first see what we can determine about the system's characteristics from its Bode plot. The requirement that the overshoot must be under 10% implies that the phase margin must be over 60 degrees. Since the phase plot never drops below -90 degrees this is not a problem. The steady state error criteria dictates that the low frequency gain Kp > 9 (19dB); it is currently about -35dB or 0.02. Obviously we are going to need some sort of proportional gain.
From the step response (above) with unity gain, we see that the steady state value is about 0.2. In addition, there happens to be a long rise time. By adding proportional gain to the system, i.e. increasing k, the Bode plot will be shifted up. With k = 100, and changing the axis command to axis([0 20 0 10]), a new set of bode and step response plots will be generated. First let's look at the bode plot.

The gain now crosses the 0dB (gain = 1) axis. The low frequency gain is about 6dB (magnitude 2) which predicts a steady-state error of 1/3 (= 1/(1+Kp)). The bandwidth is about 0.1. Since the bandwidth frequency is roughly equivalent to the natural frequency, a rough estimate of the rise time from the bode plot is tr=1.8/BW. In this case that predicts a rise time of about 18 seconds (tr = 1.8/Wn). Let's look at the step response plot to see if this is confirmed.

As we predicted, the steady state value is still too low and the rise time is still too long. To correct this, the bandwidth frequency must be made higher. There is an inverse relationship between the bandwidth frequency and the rise time, so an increase in the BW will result in a decrease in the rise time. This can be done by increasing the gain even more, which will make the bandwidth frequency higher. With k=600, you get the following bode and step response.


As you can see, the rise time is much better than before. A bandwidth of 0.6 predicts a rise time of 1.8/.6 = 3 seconds, which is about right. The steady-state value is still not quite satisfactory, though. If the k value is increased even further, the steady state response will improve even more, but the rise time will become too fast for this physical system. For now it is best to leave the k value where it is and introduce a lag controller to handle the steady state error.
To design the lag controller, we need to know where to place the corner frequencies. Since the phase margin is fine, it is not a matter of moving the cross-over frequency to a desired location. the best solution would be to place the corner frequencies in the low frequency range, so they will have a minimal effect on the transient response, and only alleviate the steady state error. If T is chosen to be 700, one corner frequency will be at 1/T=0.0014 rad/sec. Since we have a large steady-state error, we should not place the other corner frequency very close to the first. If a is chosen to be 0.05, the other corner frequency will be at 1/Ta=0.03 rad/sec. As you can see from the bode magnitude plot, both of these corner frequencies would be in the low frequency range. To implement this controller, delete your m-file from k=600 to the end. Enter instead the following lines of code:


The corner frequencies were an initial guess, with some trial and error work, but it seems to do the trick. It may be hard to see, but there should be a red, dotted line across the screen just below 10. This line shows the steady-state value of the step, and indicates that the steady state error has been met. However, the settling time is just too long. To fix this problem, raise the gain to k=1500. This gain was chosen from trial and error work that will not be described here in the interest of length. Try different gains and see how they affect the response. With this change made, the following bode and step response plots can be generated.


As you can see, the overshoot is in fact zero, the steady state error is close to zero, the rise time is about 2 seconds, and the settling time is less than 3.5 seconds. The system has now met all of the design requirements. No more iteration is needed.
Tutorials
