CMU
UM


Example: Solution to the Cruise Control Problem Using Root Locus Method

Proportional Controller
Lag controller

The state equations for this problem are:

The design criteria (for a steady-state speed of 10 m/s) are:

Rise time < 5 sec
Overshoot < 10%
Steady state error < 2%

To see how this problem was originally set up, click here.

The state space equations are a little deceiving in this problem. Since the dynamic equations do not depend on x, and we have chosen the velocity (dx/dt) to be the output, the system can really be reduced to a first order system with the equations.

Proportional controller

Since this system is first order, the problem can be solved using proportional control, although a lag controller can be added if the steady state error becomes too high.

The design criteria of a rise time of less than 5 seconds implies that the natural frequency must be greater than 0.36 (remember: tr = 1.8/Wn). The design criteria also states that the overshoot must be less than 10% which implies that the damping ratio zeta must be greater than 0.6. We will use this fact to start the design of the controller (note: the sgrid command can show the regions of the root locus where these two criteria are satisfied).

Create the following m-file (or create a '.m' file located in the same directory as Matlab) to implement the proportional controller.

You should get the following output:
If you look at the transfer function closely, you will notice that there is a pole-zero cancellation at the origin (both num and den have a root at zero, as can be easily seen since they each have a zero constant term). Matlab does not automatically cancel the pole and zero. As a result, it can cause confusion in the root locus plot, so it is best to eliminate it now. This can be done by manually eliminating both the pole and zero. At the end of your m-file, add the following code:
The transfer function is now:
Now, we shall plot the root locus and step response to see the effects of proportional control on the system. Copy the following code to the end of you m-file:
When prompted to select a point on the root locus, click on the real axis just to the left of the natural frequency requirement (about -0.4). The 10 in the step response is multiplied to the numerator so that the desired reference signal will be 10 instead of the default of 1. If you look back to the original cruise control problem, you will see that the steady state value should be 10. The first plot given by Matlab should be the root locus. The second plot should be the velocity response to the step change in the reference. The two plots should look similar to the following:

The rise time criteria has been met as well as the overshoot criteria, but the steady state error is still over 10%. This is too high for a cruise control system.

Lag controller

A lag controller can be added to improve the steady state error. For this lag controller, we will place the zero at -0.3 and the pole will at -0.03; this will result in an improvement of the steady-state error by a factor of 10 = 0.3/0.03.

Change your m-file to look like the following to implement this new controller:

The root locus should look like the following:

When prompted to select a point on the root locus, again click on the real axis just to the left of the natural frequency requirement to achieve the desired rise time. Now you should have the following velocity response:

As you can see, the steady state error has been reduced to near zero. We now have a slight overshoot, which is a result of the zero which was added in the lag controller. Since the overshoot is within the design criteria, we will not worry about it. Now all of the design criteria have now been met and no further iterations are needed.


User Survey
Your anonymous answers to the following questions will help us to improve future versions of these tutorials.
How useful was this example?
Very useful Useful Somewhat useful Not very useful A waste of time
How was the level of the example?
Too simple About right Too difficult
How much time did you spend on it?
Less than 30 mins. 30 - 60 mins. More than 60 mins.
How much of the Matlab code did you run?
None Some Most

We would like to hear about suggestions you have for improvement, difficulties you had with the tutorials, errors that you found, or any other comments that you have. This feedback is anonymous.

If you would like to receive a response, send your comments or questions to ctm-feedback@umich.edu


Root Locus Examples
Cruise Control | DC Motor | Bus Suspension | Inverted Pendulum

Cruise Control Examples
Modeling | PID | Root Locus | Frequency Response | State Space

Tutorials

Basics | Modeling | PID | Root Locus | Frequency Response | State Space | Examples

HOME INDEX COMMANDS

8/22/96 JDP