0% found this document useful (0 votes)
484 views

Cruise Control System

This document discusses a cruise control system for a car. It provides the theory of operation, describing how cruise control automatically maintains a set speed. It then gives the physical setup and system equations for modeling the cruise control, representing it as a simple mass and damper system. Finally, it discusses applying root locus analysis to design a proportional controller to improve the system performance and meet design criteria for rise time, overshoot and steady-state error.

Uploaded by

Naveed Iqbal
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
484 views

Cruise Control System

This document discusses a cruise control system for a car. It provides the theory of operation, describing how cruise control automatically maintains a set speed. It then gives the physical setup and system equations for modeling the cruise control, representing it as a simple mass and damper system. Finally, it discusses applying root locus analysis to design a proportional controller to improve the system performance and meet design criteria for rise time, overshoot and steady-state error.

Uploaded by

Naveed Iqbal
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 17

International Islamic University

Islamabad
Assignment # 01 Advance Linear Control Systems

Cruise control System


Submitted To: Dr Ijaz Hussain Submitted By: Muhammad Abubakar 250-FET/MSEE/F-10 Dated: 1st Dec, 2011

Physical setup and system equations

Cruise Control System


Theory of Operation:
Cruise control is a system that automatically controls the speed of an automobile. The driver sets the speed and the system takes over the throttle of the car to maintain the speed. The system thereby improves driver comfort in steady traffic conditions. In congested traffic conditions, where speeds vary widely, these systems are no longer effective. Most cruise control systems do not allow the use of cruise control below a certain speed. The use of cruise control would be significantly increased if the vehicle speed could automatically adapt to the traffic flow. This feature can be handy for long drives along sparsely populated roads, and usually results in better fuel efficiency. It is also known in some places as poor mans radar detector, as by cruise control, a driver who otherwise tends to unconsciously increase speed over the course of a highway journey may avoid a speeding ticket. In modern designs, the cruise control may need to be turned on before use in some designs it is always "on" but not always enabled (not very common), others have a separate "on/off" switch, while still others just have an "on" switch that must be pressed after the vehicle has been started. Most designs have buttons for "set", "resume", "accelerate", and "coast" functions. Some also have a "cancel" button. Alternatively, depressing the brake or clutch pedal will disable the system so the driver can change the speed without resistance from the system. The system is operated with controls easily within the driver's reach, usually with two or more buttons on the steering wheel spokes or on the edge of the hub like those on Honda vehicles, on the turn signal stalk like in many older General Motors vehicles or on a dedicated stalk like those found in, particularly, Toyota and Lexus. Earlier designs used a dial to set speed choice. The driver must bring the vehicle up to speed manually and use a button to set the cruise control to the current speed. The cruise control takes its speed signal from a rotating driveshaft, speedometer cable, wheel speed sensor from the engine's RPM, or from internal speed pulses produced electronically by the vehicle. Most systems do not allow the use of the cruise control below a certain speed (normally around 25 mph). The vehicle will maintain the desired speed by pulling the throttle cable with a solenoid, a vacuum driven servomechanism, or by using the electronic systems built into the vehicle (fully electronic) if it uses a 'drive-by-wire' system. All cruise control systems must be capable of being turned off both explicitly and automatically when the driver depresses the brake, and often also the clutch. Cruise control often includes a memory feature to resume the set speed after braking, and a coast feature to reduce the set speed without braking. When the cruise control is engaged, the throttle can still be used to accelerate

the car, but once the pedal is released the car will then slow down until it reaches the previously set speed. On the latest vehicles fitted with electronic throttle control, cruise control can be easily integrated into the vehicle's engine management system. Modern "adaptive" systems (see below) include the ability to automatically reduce speed when the distance to a car in front, or the speed limit, decreases. This is an advantage for those driving in unfamiliar areas. The cruise control systems of some vehicles incorporate a "speed limiter" function, which will not allow the vehicle to accelerate beyond a pre-set maximum; this can usually be overridden by fully depressing the accelerator pedal. (Most systems will prevent the vehicle accelerating beyond the chosen speed, but will not apply the brakes in the event of over speeding downhill.)

Application:
Cruise control system use to enhance the car sped when its move steady above the certain speed.

Physical setup and system Equation


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 as following.

Second law: The acceleration a of a body is parallel and directly proportional to the net force F and inversely proportional to the mass m, i.e., F = ma. So from this equation we get :

mv+bv=u Where, y=v

(1)

Where u is the force from the engine, for this example assume that, (Mass) m=1000 kg

(Friction) b=50 N sec/m (Force) u= 500 N

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% steadystate 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%

Transfer Function:
To find the transfer function of the above system, we need to take the Laplace transform of the modeling equations. When finding the transfer function, zero initial conditions must be assumed

Since our output is the velocity, let's substitute V(s) in terms of Y(s)

The transfer function of the system becomes

Matlab codes for transfer function:


m=1000; b=50; u=500; num=[1]; den=[m b]; cruise=tf(num,den);

State-Space
We can rewrite the first-order modeling equation (1) as the state-space model. m(dy/dx)=by=u(t) X1=y X1=y or V=y or V=y V=u/m-b/m(v)

To use MATLAB to solve this problem, create an new m-file and copy the following commands
m = 1000; b = 50; u = 500; A = [-b/m]; B = [1/m]; C = [1]; D = 0; cruise=ss(A,B,C,D);

Open-loop response
Now let's see how the open-loop system responds to a step input. I get the following plot:

m=1000; b=50; u=500; num=[1]; den=[m b]; cruise=tf(num,den); step(u*cruise)

From the plot, we see that the vehicle takes more than 100 seconds to reach the steady-state speed of 10 m/s. This does not satisfy our rise time criterion of less than 5 seconds.

Closed-loop transfer function


To solve this problem, a unity feedback controller will be added to improve the system performance. The figure shown below is the block diagram of a typical unity feedback system.

The transfer function in the plant is the transfer function derived above {Y(s)/U(s)=1/ms+b}. The controller will to be designed to satisfy all design criteria. Four different methods to design the controller are listed at the bottom of this page. I may choose on PID, Root-locus, Frequency response, or State-space.

Cruise Root Locus Control Problem Using Method:


The open-loop transfer function for this problem is:

where

m=1000 b=50 U(s)=10 Y(s)=velocity output

The design criteria are: Rise time < 5 sec Overshoot < 10% Steady state error < 2% To see the original problem setup, refer to Cruise Control Modeling page.

Proportional controller
the root-locus plot shows the locations of all possible closed-loop poles when a single gain is varied from zero to infinity. Thus, only a proportional controller (Kp) will be considered to solve this problem. The closed-loop transfer function becomes:

Also, from the Root-Locus Tutorial, we know that the MATLAB command called sgrid should be used to find an acceptable region of the root-locus plot. To use the sgrid, both the damping

ratio (zeta) and the natural frequency (Wn) need to be determined first. The following two equations will be used to find the damping ratio and the natural frequency:

where Wn=Natural frequency zeta=Damping ratio Tr=Rise time Mp=Maximum overshoot One of our design criteria is to have a rise time of less than 5 seconds. From the first equation, we see that the natural frequency must be greater than 0.36. Also using the second equation, we see that the damping ratio must be greater than 0.6, since the maximum overshoot must be less than 10%. Now, we are ready to generate a root-locus plot and use the sgrid to find an acceptable region on the root-locus. .
m=1000; b=50; u=10; num=[1]; den=[m b]; cruise=tf(num,den);

rlocus(cruise)
axis([-0.6 0 -0.6 0.6]); sgrid(0.6, 0.36) [Kp, poles]=rlocfind(cruise) sys_cl=feedback(Kp*cruise,1); t=0:0.1:20; step(u*sys_cl,t) axis ([0 20 0 10])

Running this m-file should give me the following root-locus plot.

The two dotted lines in an angle indicate the locations of constant damping ratio (zeta=0.6); the damping ratio is greater than 0.6 in between these lines and less than 0.6 outside the lines. The semi-ellipse indicates the locations of constant natural frequency (Wn=0.36); the natural frequency is greater than 0.36 outside the semi-ellipse, and smaller than 0.36 inside. If I look at the MATLAB command window, I see a prompt asking I to pick a point on the rootlocus plot. Since I want to pick a point in between dotted lines (zeta>0.6) and outside the semiellipse (Wn>0.36), click on the real axis just outside the semi-ellipse (around -0.4). I see the gain value (Kp) and pole locations in the MATLAB command window. Also I see the closed-loop step response similar to the one shown below.

With the specified gain Kp (the one I just picked), the rise time and the overshoot criteria have been met; however, a steady-state error of more than 10% remains.

Lag controller
To reduce the steady-state error, a lag controller will be added to the system. The transfer function of the lag controller is:

The open-loop transfer function (not including Kp) now becomes:

Finally, the closed-loop transfer function becomes:

If I read the "Lag or Phase-Lag Compensator using Root-Locus the pole and the zero of a lag controller need to be placed close together. Also, it states that the steady-state error will be reduce by a factor of Zo/Po. For these reasons, let Zo equal -0.3 and Po equal -0.03. Create an new m-file, and enter the following commands.
m = 1000; b = 50; u = 10; Zo=0.3; Po=0.03; num=[1]; den=[m b]; cruise=tf(num,den); contr=tf([1 Zo],[1 Po]);

rlocus(contr*cruise);
axis([-0.6 0 -0.4 0.4]) sgrid(0.6,0.36); [Kp, poles]=rlocfind(contr*cruise); sys_cl=feedback(Kp*contr*cruise,1); t=0:0.1:20; step(u*sys_cl,t)

axis ([0 20 0 12])

Running this m-file should give I a root-locus plot similar to the following:

In the MATLAB command window, I see the prompt asking I to select a point on the root-locus plot. Once again, click on the real axis around -0.4. I have the following response.

As I can see, the steady-state error has been reduced to near zero. The slight overshoot is a result of the zero added in the lag controller. The transfer function for this cruise control problem is the following,

Cruise Control Problem Using PID control

m = 1000 b = 50 U(s) = 10 Y(s) = velocity output

and the block diagram of an typical unity feedback system is shown below.

The design criteria for this problem are: Rise time < 5 sec Overshoot < 10% Steady state error < 2%

Proportional control
The first thing to do in this problem is to find a closed-loop transfer function with a proportional control (Kp) added. By reducing the block diagram, the closed-loop transfer function with a proportional controller becomes:

, a proportional controller (Kp) decreases the rise time.


For now, let Kp equals 100 and see what happens to the response. Create an new m-file and enter the following commands.

kp=100; m=1000; b=50; u=10; num=[kp]; den=[m b+kp]; t=0:0.1:20; step(u*num,den,t) axis([0 20 0 10])

Running this m-file in the Matlab command window should give you the following step response.

We can use the Matlab command cloop to find the closed-loop response directly from the open-loop transfer function. If you choose to do so, change the m-file to the following and run it in the command window. You should get the same plot as the one shown above.
kp=100; m=1000; b=50; u=10; num=[1]; den=[m b]; [numc,denc]=cloop(kp*num,den,-1); t = 0:0.1:20; step (u*numc,denc,t) axis([0 20 0 10])

As you can see from the plot, both the steady-state error and the rise time do not satisfy our design criteria. You can increase the proportional gain (Kp) to improve the system output. Change the existing m-file so that Kp equal 10000 and rerun it in the Matlab command window. You should see the following plot.

The steady-state error has dropped to near zero and the rise time has decreased to less than 0.5 second. However, this response is unrealistic because a real cruise control system generally can not change the speed of the vehicle from 0 to 10 m/s in less than 0.5 second. The solution to this problem is to choose a proportional gain (Kp) that will give a reasonable rise time, and add an integral controller to eliminate the steady-state error.

PI control
The closed-loop transfer function of this cruise control system with a PI controller is:

An addition of an integral controller to the system eliminates the steady-state error. For now, let Kp equals 600 and Ki equals 1 and see what happens to the response.
kp = 600; ki = 1; m=1000; b=50; u=10; num=[kp ki]; den=[m b+kp ki]; t=0:0.1:20; step(u*num,den,t) axis([0 20 0 10])

kp=600; ki=1; m=1000; b=50; u=10; num=[1]; den=[m b]; num1=[kp ki]; den1=[1 0]; num2=conv(num,num1); den2=conv(den,den1); [numc,denc]=cloop(num2,den2,-1); t=0:0.1:20; step(u*numc,denc,t) axis([0 20 0 10])

Whichever the m-file you run, you should get the following output:

Now adjust both the proportional gain (Kp) and the integral gain (Ki) to obtain the desired response. When you adjust the integral gain (Ki), we suggest you to start with a small value since large (Ki) most likely unstabilize the response. With Kp equals 800 and Ki equals 40, the step response will look like the following:

As you can see, this step response meets all design criteria

PID control
For this particular example, no implementation of a derivative controller was needed to obtain a required output. However, you might want to see how to work with a PID control for the future reference. The closed-loop transfer function for this cruise control system with a PID controller is.

Matlab code:
kp=600; ki=10; kd=1; m=1000; b=50; u=10; num=[kd kp ki]; den=[m+kd b+kp ki]; t=0:0.1:20; step(u*num,den,t) axis([0 20 0 10])

this graph shows our required output for the system.

You might also like