|
|
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
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%
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:
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.