CMU
UM


Example: Modeling a Cruise Control System


Physical setup and system equations
Design requirements
Matlab representation and open-loop response

Physical setup and system equations

The model of the cruise control system is relatively simple. If the inertia of the wheels is neglected, and it is assumed that friction (which is proportional to the car's speed) is what is opposing the motion of the car, then the problem is reduced to the simple mass and damper system shown below.

Using Newton's law, the dynamic equation for this system is:

where u is the force from the engine. The state-space model of this equation now becomes:

For this example, let's assume that

m = 1000kg
b = 50Nsec/m
u = 500N

Design requirements

The next step in modeling this system is to come up with some design criteria. When the engine gives a 500 Newton force, the car will reach a maximum velocity of 10 m/s (22 mph). An automobile should be able to accelerate up to that speed in less than 5 seconds. Since this is only a cruise control system, a 10% overshoot on the velocity will not do much damage. A 2% steady-state error is also acceptable for the same reason.

Keeping the above in mind, we have proposed the following design criteria for this problem:

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

Matlab representation and open-loop response

Below we show how this problem would be solved using Matlab. If you copy the following text into a m-file (or create a '.m' file located in the same directory as Matlab) and run it, Matlab will give you the A, B, C, and D matrices of the state-space model and a plot of the response to a step response of the input force.

     m = 1000;
     b = 50;
     u = 500;
     A = [0 1; 0 -b/m]
     B = [0; 1/m]
     C = [0 1]
     D = 0
     step(A,u*B,C,D)
After running the m-file, Matlab should output to the command window the following state-space matrices:
You should also get the following plot of the open-loop response of the velocity (initially at rest at time t=0) for a step change in the applied force (going from 0-500N):

As you can see, this step response does not meet the design criteria placed on the problem. The system is overdamped, so the overshoot response is fine, but the rise time is too slow. Therefore a controller will have to be designed to improve the dynamics of the system. Listed at the bottom of the page are four methodologies for designing a controller (PID, root locus,frequency response, and state space). Click on whichever one you would like to see.


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


Modeling 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 COMMAND

8/21/96 JDP