26
1 EEL6936.703S14 Control Systems Engineering Cruise Control System Modeling and Controller Evaluation B y: Howard Hawks [2]

6 Final Control Project Report Cruise C WPaper-Hawks Sample Project

Embed Size (px)

DESCRIPTION

6 Final Control Project Report Cruise C WPaper-Hawks Sample Project

Citation preview

Page 1: 6 Final Control Project Report Cruise C WPaper-Hawks Sample Project

1

EEL6936.703S14 Control Systems Engineering

Cruise Control System Modeling and

Controller Evaluation

B y:

Howard Hawks

[2]

Page 2: 6 Final Control Project Report Cruise C WPaper-Hawks Sample Project

2

Table of Contents

Sections by page number

Table of Contents .................................................................................................................. 2

Introduction ........................................................................................................................... 3

Summary of the Research Paper .......................................................................................... 4

Detailed Process Description ................................................................................................ 5

Mathematical Model .............................................................................................................. 6

(KPI’s) Implemented Control Strategy ................................................................................... 7

System Dynamic Analysis (open-loop) .................................................................................. 7

Closed-Loop System Design ................................................................................................. 9

Parameter Optimization & Closed-loop System Stability Analysis ........................................ 10

Simulations & Verification .................................................................................................... 11

Conclusion .......................................................................................................................... 16

Bibliography ........................................................................................................................ 18

Appendix A: MATLAB/SIMULINK Files ............................................................................... 19

Appendix B: Copy of the Paper ........................................................................................... 21

Page 3: 6 Final Control Project Report Cruise C WPaper-Hawks Sample Project

3

Introduction

Automobile cruise control has become a very common feature in today’s

automobiles. With this feature a driver no longer has to sit with his or her foot appropriately positioned over the accelerator to maintain a steady speed over long periods of time and potentially hundreds of miles of road. Utilizing cruise control a driver can sit in relative comfort for longer durations than was previously possible.

The modern idea of cruise control was credited to inventor Ralph Teeter who

received his first patent for an automotive speed control device in 1945 [3]. The name cruise control, however, wasn’t coined until several years later when Chrysler adopted it in 1958 [3]. Today, cruise control is a standard feature on many vehicle models. Advances in this technology have created an adaptive form of cruise control that couples speed adjustment with radar sensing, which can adapt speed based on the locations of other vehicles on the road.

The purpose of this project is to conceptually design a vehicle cruise control

system that can react to variations in input stimulus and maintain a constant vehicle speed. There are a plethora of external factors that can be taken into consideration. Some of these factors can be simplified to produce an accurate working model of the system. External inputs such as drag due to wind speed, changing co-efficient of friction, spring damping of vehicle suspension, gravitational forces due to slope changes, vehicle momentum, brake drag and vehicle lift are all factors to that can affect control performance in varying degrees.

In this paper the system model is designed conceptually and then the

conceptual design is transferred to Simulink to verify that the system output is as

predicted. MATLAB is another software tool that is used to aid in system design and is

used to help develop the system model transfer functions. Key performance indicators

such as response time, percent overshoot and steady state error are measured and

compared to the target values contained herein. Additionally, variations of the input

conditions such as different vehicle masses, changing friction dynamics and their

effect on the control paradigm are studied.

Page 4: 6 Final Control Project Report Cruise C WPaper-Hawks Sample Project

4

Summary of the Research Paper

A great deal of literature exists on the subject of cruise control for automobiles as

it is one of the classic control models in contemporary control theory. In the research

paper entitled “Modeling and Controller Design for a Cruise Control System”, authors

Osman, Rahmat and Ahmad approach the subject by comparing three key controller

schemes: Intelligent (Fuzzy) control, State Space and PID.

They begin by modeling the control system mathematically using Newton’s law

and include the vehicle mass and inertia force, the aerodynamic drag and the climbing

resistance all related to the engine drive force. To simplify the model, all initial

conditions were set to zero, meaning there was no wind gusts and the vehicle was on

a flat grade. By taking the ratio of output velocity to input drive force in the Laplace

domain, the following transfer function was developed [2]:

Figure 1: Linearized Transfer Function

The two KPI’s (Key Performance Indicators) for this system were chosen as

Ts<5sec and %OS (Overshoot) less than 10%. Based on this information the three

control schemes were developed along with their respective transfer functions. Of

these three controllers the Fuzzy Logic offered an advantage of a feed-forward design

that could minimize the effects of external disturbances by taking appropriate action

before these effects affected the system. The performances of each controller were

categorized in a table and showed the following results [2]:

1) Fuzzy Logic- Obtained the best %OS and Ts (Settling Time) at 1.91% and

3.37s respectively, but had the worst Tr (Rise Time) of the three at 2.21s.

2) PID- Had a better Tr than the Fuzzy Logic controller at 1.7s and as a result

took the longest time to settle at 5.5 seconds.

3) State Space- Had the best Peak Time (Tp) at 2.97s and Rise Time at 1.38s

with Ts and Percent Overshoot (%OS) slightly better than the PID at 2.21s

and 10% respectively.

Page 5: 6 Final Control Project Report Cruise C WPaper-Hawks Sample Project

5

Steady state error was 0.01% in all three cases as external disturbances had

been minimized in the initial conditions. When external disturbances were modified, the

KPI’s of %OS, Tp and Ts were re-evaluated without the steady state error calculation.

The results of these tabulations can be seen in Appendix B.

In the Parameter Optimization section I will present how varying input conditions

affect the KPI’s of Rise Time, Percent Overshoot and Steady State Error. Through

simulation modeling I will then optimize the PID response to meet the three KPI’s listed

above. By modifying the base parameter values I will attempt to improve upon the system

response presented in the original research paper.

Detailed Process Description

The transfer function listed in Figure 1 above takes into account the following initial

conditions and constants: CI=743, T=1s, Ŧ=0.2s, M=1500kg, Ca=1.19N/(m/s)^2,

Fdmax=3500N, Fdmin=-3500N and the force of gravity equal to g=9.8m/s^2. CI

represents an initial velocity input constant at initial time T. Ŧ represents the time lag of the

engine response and M is simply the vehicle mass. Ca is the dynamic drag coefficient

present in the air resistance to the vehicle movement. Fdmin and Fdmax are simply the

drive force constraints imposed upon the system. These values are used in the dynamic

model description presented in Figure 2 [1] below:

Figure 2: Dynamic System Model

By simplifying the model and choosing M, Ca, CI, v and Ŧ to remain constant,

the mathematical model becomes much more manageable. By representing the

system mathematically it allows it to be modeled by a state space equation, a transfer

function or even an integral convolution [5]. In this paper we will focus on modeling via

transfer function as it models itself well to the cruise control process.

Page 6: 6 Final Control Project Report Cruise C WPaper-Hawks Sample Project

6

Mathematical Model

Vehicle speed dynamics are governed by Newton’s Law of Motion and can be

represented by the following equation: Fd=Mdv/dt•v + Fa + Fg where Fd is the engine

drive force, M is the vehicle mass, dv/dt•v is the inertia force of mass and velocity, Fa is

the aerodynamic drag and Fg is the climbing resistance and downgrade force.

The derivation of the transfer function is taken from the linearized model. By taking

the above listed constants and differentiating both sides of the state space equations,

the generalized transfer function becomes the ratio of dV/dU, where V is the vehicle

velocity input of the system and U is the speed response. This ratio is show below in

figure 3 [1]:

Figure 3: Input/Output Ratio Transfer Function.

By using a power series expansion for e^-Ŧs and substituting back into the plant

transfer function the expression becomes easier to work with and is shown in Figure 4a

below [1]:

Figure 4a: 3rd Order Cruise Control System Transfer Function.

After substituting the values of the constants listed above, the general cruise

control system transfer function listed in Figure One is obtained. As we will see later,

this form can be used to model our system in a feedback controlled environment using

a PID controller. Next we will set forth the Key Performance Indicators to be used.

These are important parameter limits that will show if our system is meeting the

requirements and these KPI’s can be used to compare subsequent system models as

we make changes to both the vehicle parameters and the external input conditions.

Page 7: 6 Final Control Project Report Cruise C WPaper-Hawks Sample Project

7

(KPI’s) Implemented Control Strategy

For this system model, we will choose a reasonable set of design

requirements that can apply to a “real world” driving situation. Granted, the

magnitudes of the requirements are of a subjective nature, they shall still represent

an overall system model that is both realistic and realizable at the same time. Table

I below shows the main system variables of interest that shall be determined to be

primary control tolerances. This set of Key Performance Indicators shall be used

throughout the system design and modeling phase.

It is reasonable to expect that a settling time of less than five seconds,

which is the time for the vehicle to settle to a set cruising speed, can be obtained

with a PID feedback controller. Similarly, the percent overshoot in this model is

realizable in this control system. Although a percent overshoot of 10% may be

considered excessive in an actual driving situation it is considered to be adequate

for the purpose of accurately constraining the performance of the cruise controller.

Lastly, the steady state error, which equates to the variations in vehicle speed

while under cruise control, is not set forth as a KPI in the referenced research

paper [1], but later I will present some options on the control scheme that can

help achieve a steady state error within two percent.

Performance Indicator Target Design Value KPI priority

Settling Time (Ts) < =5 seconds One

Overshoot (%) <=10% Two

Table I: Key Performance Indicators for Cruise Control

System Dynamic Analysis (open-loop)

The open loop block diagram of the system is shown in Figure 4b. Without any

feedback control, the system response to a step input represents a vehicle that is not

under cruise control. The authors of the research paper referenced [1] do not perform

an open loop system response. Nevertheless, it is important to the design process to

first formulate an open loop step simulation as it will guide us in verifying the closed

loop system response.

Page 8: 6 Final Control Project Report Cruise C WPaper-Hawks Sample Project

8

Figure 4b: Open Loop System Block Diagram

From the cruise control transfer function in Figure One, we can expand the

denominator and obtain the characteristic equation: s^3+6.0476s^2+5.2856s+0.2380.

See the MATLAB file section for this calculation.

Creating an open loop plant in Simulink provides us with some insight. Figure 5

shows the open loop system model response. The actual open loop model is included

for reference in the Simulink file section in the appendix. Note that since this is an open

loop response that the system is bounded by the transfer function gain and takes over

100 seconds to approach a steady state value. The fact that the system output is

basically exponential in form is a good indication that the transfer function will model

the natural system accurately once a feedback loop is established.

Figure 5: Open Loop Step Response of Plant

Page 9: 6 Final Control Project Report Cruise C WPaper-Hawks Sample Project

9

Closed-Loop System Design

In order to facilitate automatic control we need to implement a feedback loop. A

unity gain feedback loop is added to the system simulation and the response shown in

Figure 6a is obtained. Note that with feedback we obtain an output response that is

proportional to the input step. There is no overshoot, but the undershoot is about 5%.

Notice that the settling time is roughly 15 seconds, which is much longer than our KPI

of Ts<=5 seconds. Although we are not concerned with steady state error at this time,

it appears to be close to 10%.

During the optimization phase detailed in a later section I will add an additional

KPI for stead state error and optimize performance based on the observed output. This

additional KPI will give us a very good indication of overall cruise control response.

Figure 6a: Closed Loop System Response

Page 10: 6 Final Control Project Report Cruise C WPaper-Hawks Sample Project

10

Parameter Optimization & Closed-loop System Stability Analysis

In order to implement a PID controller, which will help to improve the system

response, we must utilize special tuning methods that entail calculating values for the

proportional, integral and derivative portions of the controller. Without using one of

these special tuning methods we could waste hours on trial and error pole placements

that may or may not result in a desirable system output. Several of these methods are

well established and the one I chose to use is the Ziegler and Nichols open loop

method. First we must obtain details about the open loop output to a unit step

response. Figure 6b shows a zoomed in scope display of the open loop response that

can be used to calculate the PID parameters.

Figure 6b: Unit Step Response of Open Loop Plant

Using the Ziegler Nichols Open Loop Method and interpolating the base values

from the scope display in Figure 6b, I obtained the following values for each parameter:

K=9.4, Ŧ=19.995 sec, L=1.545 sec. Simulink’s nomenclature for these values is slightly

different, but it can be calculated from the knowledge that P=Kp, I=Kp/Ti, D=Td and

N=1/(α * Td) where α is assumed to be 0.05 and is the generalized relationship

between coefficients.

Page 11: 6 Final Control Project Report Cruise C WPaper-Hawks Sample Project

11

Table II below shows the resulting values for the traditional Ziegler Nichols Open

Loop Response PID calculation as well as the Simulink nomenclature and calculation.

Based on the values obtained from the open loop response, I calculated N=25.88997

assuming the relationship between the coefficients to be 0.05.

Controller

Model

Kp Ti Td N

PID (1.2/K)*(Ŧ/L)=1.6517 L/0.5=3.09 L/2=0.7725 -

Simulink

Equivalent

P=Kp=1.6517 I=Kp/Ti=0.53453 D=Td 1/(α * Td)

=25.88997

Table II: Ziegler Nichols Open Loop PID Tuning Calculations

Simulations & Verification

Using the calculated values shown in Table II above with Simulink’s PID block

displayed an output response that we shall compare to our KPI’s in Table I. Recall that

we wanted the settling time to be less than five seconds and the percent overshoot

less than ten percent.

Figure 7: Simulink Cruise Control PID Schematic

Figure 7 shows the Simulink schematic of the PID controlled system. This, in

effect, demonstrates how a PID controller would be used as a cruise control on an

automobile. Note that for this simulation I increased the value of the step input to

represent 65 miles per hour, which equates to 29.057 meters per second.

Page 12: 6 Final Control Project Report Cruise C WPaper-Hawks Sample Project

12

Figure 8 below shows the resulting system output response. The vertical axis

represents meters per second and the horizontal axis represents time in seconds.

From the scope display we can see that the overshoot is about 24.7%, which exceeds

our KPI of %OS<10%. There was no window established in the referenced research

paper for settling time, which is the tolerance band on the vertical axis. Assuming this

tolerance to be +/-2%, which is the standard for DAC settling time measurements [6],

we can see that the response settles within this error band within 13.5 seconds. The

settling time exceeds our KPI by 8.5 seconds.

Figure 8: System Output Response Using Ziegler Nichols Pole Values

In order to optimize the response to meet our KPI goals we can try to fine tune the

PID controller parameters. Since there was no KPI for Tr, which represents the rise

time of the system, we can consider changing the proportional and integral portions of

the control. By reducing the integral control value we should see the overshoot

decrease, but we will need to monitor the settling time to ensure that it does not

increase.

Page 13: 6 Final Control Project Report Cruise C WPaper-Hawks Sample Project

13

By decreasing the proportional controller setting the maximum amplitude attained

by the PID output was reduced. Likewise, by reducing the value of the integral

controller parameter, the overshoot was also reduced. The derivative controller was

able to remain unchanged to obtain the target KPI’s. Figure 9 shows the system

response when the proportional controller was set to a value of 1.9 versus the original

value of 1.65. Notice that the rise time has improved by 0.8 seconds; however the

percent overshoot is still above the target value.

Figure 9: System Response with P=1.9.

The settling time of figure nine as well as the percent overshoot is still not within

our KPI target values of 5 seconds and 10% respectively. Additional fine tuning of the

PID controller parameters ultimately resulted in the system output response shown in

Figure 10 presented on the next page.

Page 14: 6 Final Control Project Report Cruise C WPaper-Hawks Sample Project

14

Figure 10: Fine Tuned PID System Output Response.

Figure 11 shows a zoomed view of Figure 10 around the KPI target value of five

seconds. In order to obtain Ts<=5 with the step magnitude of 29.2 meters per second

and a 2% error band, the settling time needs to be within 28.616 seconds and 29.784

seconds.

For the percent overshoot to fall within 10% of the input its maximum amplitude

must be less than 32.12 meters per second. Careful zooming of the scope display

allowed me to verify that both of these KPI’s were now within the target values. You

can see in the zoomed in view of Figure 11 on the next page that the KPI’s of Table I

have now been met.

Page 15: 6 Final Control Project Report Cruise C WPaper-Hawks Sample Project

15

Figure 11: Zoomed View of Figure 10 around 5 seconds.

As previously mentioned, we are also interested in the steady state error of the

system. Although this KPI was not identified in the referenced research paper, it is

important to cruise control systems since it dictates how much speed fluctuation can

occur. Figure 11 shows 100 second duration of the output response. Setting a new KPI

of steady state error less than 1% against a steady state target speed of 29.2 meters

per second yields a target speed error band of 28.908 to 32.12 meters per second. The

new KPI is added and identified in Table III.

Performance Indicator Target Design Value KPI priority

Settling Time (Ts) < =5 seconds One

Overshoot (%) <=10% Two

Steady State Error (%) <=1% Three

Table III: Additional KPI of S.S.E. %)

We can see from the scaled output shown in Figure 12 that the steady state error

of the system is less than 0.5% at t=90 seconds. The steady state error is less than 1%

in less than 60 seconds, so this additional KPI has been met.

Page 16: 6 Final Control Project Report Cruise C WPaper-Hawks Sample Project

16

Figure 12: Steady State Error of System Output Response less than 0.5%.

Conclusion

It was demonstrated that a PID controller can help optimize the system response

of a cruise control system. Without PID control the Key Performance Factors of Settling

Time, Percent Overshoot and ultimately Steady State Error could not be met. Utilizing

a PID tuning methodology, such as the Ziegler Nichols method herein, drastically

reduces the time required to tune each of these controller variables as it gives an

optimal response curve for most general constraints. The new controller values

obtained through iterations of fine tuning the Ziegler Nichols calculated values are

shown in Table IV. These values were used to meet all of the KPI requirements set

forth in Table III above.

Page 17: 6 Final Control Project Report Cruise C WPaper-Hawks Sample Project

17

Controller

Model

Kp Ti Td N

Simulink Fine

Tune Values

P=Kp=1.5 I=Kp/Ti=0.05 D=0.7725 1/(α * Td)

=25.9

Table IV: Final PID Controller Values After Fine Tuning.

Fine tuning the PID takes patience as changing one controller variable affects all

of the KPI parameters in varying degrees. The modeling process however retains the

same basic form wherein a real world application is modeled mathematically; target

Key Performance Indicators are identified, a control scheme is identified and tuned to

meet the system requirements. Upon completion of these steps, the system can be

simulated and studied before ultimately realizing a fully functional physical system that

will perform to expectations in real world applications.

The cruise control PID system that was studied and presented in this paper has

shown how a physical system, such as an automobile, can be mathematically modeled

and simulated. It was also shown that through tuning a controller scheme, such as a

PID controller, certain KPI targets can be met. The KPI target values set forth in Table

III represent realistic KPI’s for a modern automobile. It was shown that through

calculation and iterative tuning the KPI goals of the cruise control system were

achieved.

Page 18: 6 Final Control Project Report Cruise C WPaper-Hawks Sample Project

18

Bibliography

[1] Khairuddin Osman, Mohd Fuaad Rahmat, Mohd Ashraf Ahmad “Modeling and

Controller Design for Cruise Control” in 2009 5th International Colloquium on

Signal Processing and Its Applications (CSPA), pp. 254-258.

[2] Carnegie Mellon. 1997. Control Tutorial for MATLAB, Website of University of

Michigan. http://www.engin.umich.edu/group/ctm/examples/cruise/ccSS.html

[3] Wikipedia. July 2013. Ralph Teetor, Wikipedia Website.

http://en.wikipedia.org/wiki/Ralph_Teetor

[4] Lie, Karen “Cruise Control System in Vehicle” Calvin College, 2004. [5] Chen, Chi-Tsong “Linear System Theory and Design” 4th Edition, Oxford University Press 2013. [6] Williams, Jim “Application Note 120” Linear Technology, March 2010.

Page 19: 6 Final Control Project Report Cruise C WPaper-Hawks Sample Project

19

Appendix A: MATLAB/SIMULINK Files

EDU>> syms s

EDU>> (s+0.0476)*(s+1)*(s+5)

ans =

(s + 1)*(s + 5)*(s + 119/2500)

EDU>> cctf=(s+0.0476)*(s+1)*(s+5)

cctf =

(s + 1)*(s + 5)*(s + 119/2500)

EDU>> expand (cctf)

ans =

s^3 + (15119*s^2)/2500 + (6607*s)/1250 + 119/500

EDU>> 15119/2500

ans =

6.0476

EDU>> 6607/1250

ans =

5.2856

EDU>> 119/500

ans =

0.2380

EDU>> num=[2.4767];den=[1 6.0476 5.2856 0.2380];

EDU>> cctf=tf(num,den)

cctf =

Page 20: 6 Final Control Project Report Cruise C WPaper-Hawks Sample Project

20

2.477

---------------------------------

s^3 + 6.048 s^2 + 5.286 s + 0.238

Continuous-time transfer function.

EDU>> ccss=tf2ss(num,den)

ccss =

-6.0476 -5.2856 -0.2380

1.0000 0 0

0 1.0000 0

Page 21: 6 Final Control Project Report Cruise C WPaper-Hawks Sample Project

21

Appendix B: Copy of the Paper

The research paper entitled “Modeling and Controller Design for a Cruise Control

System” by Osman, Rahmat and Ahmad is reproduced here for convenience with

permission from the I.E.E.E. It was a great motivation in assembling this work and

provides for further reading on this subject matter.

Page 22: 6 Final Control Project Report Cruise C WPaper-Hawks Sample Project

22

Page 23: 6 Final Control Project Report Cruise C WPaper-Hawks Sample Project

23

Page 24: 6 Final Control Project Report Cruise C WPaper-Hawks Sample Project

24

Page 25: 6 Final Control Project Report Cruise C WPaper-Hawks Sample Project

25

Page 26: 6 Final Control Project Report Cruise C WPaper-Hawks Sample Project

26