Automatic Cruise Control System

1 downloads 0 Views 859KB Size Report
automatic cruise control system in city roadways is prohibited as per the state and federal ...... pdf. Last modified on July 11, 2007. 2For more details on this relation, see variable time gap policy ... free flowing traffic achieving both safety and comfort specifications. ... the z plane, the digitized discrete-time system is unstable.
Automatic Cruise Control System

M.Tech. Project Report Submitted in partial fulfillment of the requirements for the degree of Master of Technology

by Rupesh Sonu Kakade Roll No: 05323014

under the guidance of Prof. Kannan Moudgalya Dept. of Chemical Engineering, IIT Bombay

and Prof. Krithi Ramamritham Dept. of Computer Science and Engineering, IIT Bombay

a

Department of Systems and Control Engineering Indian Institute of Technology, Bombay Mumbai

July 2007

Abstract The thesis introduces a novel approach for longitudinal motion control of vehicles. Different traffic densities are found to demand different behavior from vehicles to optimize the usage of roadways. Infact, studies have shown that the use of automatic cruise control structure in congested traffic often result in excessive braking and accelerations. Also the use of automatic cruise control system in city roadways is prohibited as per the state and federal laws. We propose a methodology in which automatic cruise control structure is used at high speed situations where the traffic density is low to moderate, and a reference modelbased control structure is used during stop-and-go traffic situations, common in many city roadways especially during peak hours. The former control structure objective is to followthe-leader car, while the latter control structure ensures that a car is stopped before critical distance is reached while respecting the comfort specifications during stop-and-go scenario. The reference model used is non-linear and provides dynamic solutions consistent with safety constraints and comfort specifications. Each of the above controllers is used as a master controller of the cascade control scheme. A common slave controller is used for the two cascade control schemes. The slave (inner) feedback loop is used to compensate unmodeled dynamics and external disturbances (for e.g. road slopes). The experiments performed on Dexter-6C and (relatively low-cost) CDBOT vehicular robots, shows that the use of cascade control structure produces equally good performances from the two vehicular robots.

Acknowledgment I thank my guide Prof. Kannan Moudgalya, for his continuous support in my M.Tech. program. He showed me different ways to approach a research problem. He was always there when I need his support and technical help. He is responsible for all the goals I achieved in my entire M.Tech. program. I also thank my co-guide Prof. Krithi Ramamritham, who gave me this project work and gave me an opportunity to work in ERTS laboratory, KReSIT, IIT Bombay. A special thanks goes to Prof Kian-Lee, Tan, who guided me during second stage of the project work at School of Computing (SoC), National University of Singapore (NUS). Without his encouragements and constant guidance, I could not have finished second stage work. He was always there to meet and talk about my ideas and proofread my papers, articles, and to ask me good questions to help me think through my problems (weather philosophical, analytical or computational) Also thanks to folks at Database Research Laboratory, SoC, NUS especially, Amit, my partner for daily lunch and snacks at Singapore. Besides my supervisors, I would like to thank colleagues at ERTS laboratory, a wonderful workplace and my home for almost a year (which included first and third stage of the project work). Let me also say ‘thank you’ to the following people at ERTS laboratory: Sachitanand Malewar, Ashish Gudhe, Guru, and Amey. I will remember for a long time the ‘evening snacks’ we used to have at ‘Upahar’ near Y-gate of IIT Bombay. I am also greatly indebted to my teachers in the past: P. Gawande, Punwatkar, B. Yadav, R. Patil, and M/s Alice Lazar, who introduced me to the field of controls and encouraged me to pursue my interests. I thank my ‘guru’s’, Anand Zambare and Mishra Sir, for guiding me at various stages of my life, for encouraging me to pursue my interests, even the interests went beyond boundaries of language, field, and geography. I am greatly indebted to them for unconditional support and encouragement. I am also thankful to my close friends: Vishal, Vijay, Sarvesh, and Adhish for their moral support, for listening to my complaints and frustrations, for believing in me and for spending memorable time with me. Last but not the least, I thank my family: my parents, Shri Sonu Budho Kakade, and Shrimati Kamal Sonu Kakade, for giving me life in the first place, for educating me, for ii

unconditional support and encouragement to pursue my interests. My elder brother Nitin, for sharing his experiences with me and for supporting me in difficult times; and my younger brother Arun, for sweet time we spend together, and for his caring nature towards me. Finally I am thankful to my father for reminding me that my research work should always be useful and serve good purposes to all humankind.

iii

Contents Abstract

i

Acknowledgment

ii

List of Figures

vi

1 Introduction

1

1.1

Automatic cruise control (ACC) . . . . . . . . . . . . . . . . . . . . . . . . .

2

1.2

Stop-and-go traffic Situation . . . . . . . . . . . . . . . . . . . . . . . . . . . .

3

1.3

Objectives of the project . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

4

1.4

Organization of the report . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

5

2 Literature Review 2.1

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

6

2.1.1

Analogy to fluid flow . . . . . . . . . . . . . . . . . . . . . . . . . . . .

7

2.1.2

Follow-the-leader theory . . . . . . . . . . . . . . . . . . . . . . . . . .

9

2.1.3

Discontinuity in traffic flow diagram . . . . . . . . . . . . . . . . . . .

10

2.2

On automatic cruise control . . . . . . . . . . . . . . . . . . . . . . . . . . . .

12

2.3

Control of car during congested traffic . . . . . . . . . . . . . . . . . . . . . .

14

2.4

On the Selection of Sampling Period . . . . . . . . . . . . . . . . . . . . . . .

15

2.4.1

Sampling period during ACC . . . . . . . . . . . . . . . . . . . . . . .

15

2.4.2

Sampling period during cruise control . . . . . . . . . . . . . . . . . .

19

Safe Distance Policy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

21

2.5.1

Constant time-gap policy . . . . . . . . . . . . . . . . . . . . . . . . .

22

2.5.2

Spacing policy based on vehicle parameters . . . . . . . . . . . . . . .

22

2.5

Traffic flow analysis

6

3 Design of Cascade Control Scheme 3.1

3.2

28

Cascade control schemes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

28

3.1.1

ACC as a master controller . . . . . . . . . . . . . . . . . . . . . . . .

31

3.1.2

Reference model-based controller as a master controller . . . . . . . .

31

ACC controller design . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

33

iv

3.3

Reference model-based control design . . . . . . . . . . . . . . . . . . . . . . .

34

3.4

Inner speed control loop - A salve control loop of cascade scheme . . . . . . .

44

4 Experimental Results

45

4.1

Discussion of ACC results on Dexter-6C vehicular robot . . . . . . . . . . . .

45

4.2

Implementation of cascade control schemes . . . . . . . . . . . . . . . . . . .

47

4.2.1

Automatic cruise control - Implementation . . . . . . . . . . . . . . .

49

4.2.2

Reference model-based control - Implementation . . . . . . . . . . . .

51

Discussion of results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

52

4.3

5 Conclusion

57

6 Future Improvements

58

A Polynomial Root Loci for zoh and Tustin Digitization

59

B CDBOT - A vehicular robot

61

B.1 Hardware details . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

63

B.2 Software - A Brief overview . . . . . . . . . . . . . . . . . . . . . . . . . . . .

64

Bibliography

67

v

List of Figures 1.1

Fundamental flow diagram. . . . . . . . . . . . . . . . . . . . . . . . . . . . .

2.1

(a) Normalized flow-density curve and (b) Normalized speed-density curve.

3

Both the curves corresponds with c = 26.67 km/hr [3] and [4], kj = 166 vehicles/km. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.2

8

(a) Flow-density curve and (b) Speed-density curve. The curve corresponds with km = 55.94 vehicles/km (90 vehicles/mile) and uf = 74.014 km/hr (46 miles/hr) [5]. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

2.3

11

(a) Flow-density diagram showing Greenshield’s empirical data along with the fit for Greenberg’s model and Edie’s model and (b) Flow-density curve showing hysteresis. For light traffic Edie’s steady-state model is used and for dense traffic Greenberg’s model is used. . . . . . . . . . . . . . . . . . . . . .

2.4

12

Polynomial root loci for Tustin and zoh digitization: Shows variation in pole locations as the Ts is varied from 0.01 to 10 s. . . . . . . . . . . . . . . . . . .

16

2.5

(a) ζz versus Ts , (b) ωnz versus Ts . . . . . . . . . . . . . . . . . . . . . . . .

18

2.6

Deceleration and velocity trajectory of following car. The shaded area in the velocity trajectory is used to derive the distance traveled by the following car.

2.7

(a) Minimum safe distance. (b) Minimum safe headway as a function of following car speed. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

2.8

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

26

Minimum safe distance versus speed, with- (a) A1 as a parameter, (b) A2 as a parameter.

3.1

25

Minimum safe distance versus speed, with- (a) T as a parameter, (b) ∆VT as a parameter.

2.9

23

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

27

Cascade control with Automatic Cruise Control (ACC) controller as a master controller. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

29

3.2

Cascade control with reference model-based controller as a master controller.

30

3.3

Inter-distance reference model . . . . . . . . . . . . . . . . . . . . . . . . . . .

36

3.4

Speed versus penetration distance for different initial velocities (c = 0.0125, d0 = 75 m, and dc = 5 m). . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

vi

39

3.5 3.6

Speed, acceleration, and jerk versus penetration distance for the same initial ˜ = 0 m), and different c values. . . . . . . . . condition (x˙ rf (0) = 20 m/s; d(0)

40

Distance d0 as a function of the maximum velocity [see equation (3.51)], for dc = 5 m, and different braking capacities. . . . . . . . . . . . . . . . . . . . .

43

4.1

Test car Dexter-6C along with lead vehicular robot. . . . . . . . . . . . . . .

46

4.2

Vehicle velocity in cruising state for three different desired velocities, namely, 100, 150, 200 mm/s. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

4.3

ACC results showing the follower car velocity with CTG spacing policy. With cruise velocity is vf = 120 mm/s and vl = 100 mm/s. . . . . . . . . . . . . . .

4.4

48

Time gap of CTG policy: Set value for Tg is 1 s. For CTG policy time gap never crosses the set value of 1 s. . . . . . . . . . . . . . . . . . . . . . . . . .

4.5

47

49

ACC results shoeing follower car velocity in vehicle following state (VTG spacing policy): Cruise velocity is vf = 100 mm/s and vl = 100 mm/s. . . . . . .

50

4.6

Time gap of VTG policy: Safety time-gap is around 1 s.

51

4.7

Smaller lead distance of VTG policy than that in CTG policy leads to the

. . . . . . . . . . .

question of vehicle safety. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.8

Inner loop test in the CDBOT vehicular robot for an arbitrary reference velocity. On y-axis: encoder pulse count; x-axis: time (800 units = 1 s). . . . .

4.9

52 54

Inter-distance, velocities, acceleration, and jerk from experiment: A automatic cruise control scenario. On x-axis: 800 units = 1 s. . . . . . . . . . . . . . . .

55

4.10 Inter-distance, velocities, acceleration, and jerk from experiment: A stop-andgo scenario. On x-axis: 800 units = 1 s. . . . . . . . . . . . . . . . . . . . . .

56

Chapter 1

Introduction As automation technology has progressed, especially in the decades after the invention of the integrated circuit, more and more functions have been added to automobiles, relieving the driver of much of the mundane moment-to-moment decision making that may be regarded as having made driving tedious. Several groups which include researchers from several universities, research laboratories, automotive industry, transport authorities, technology providers, research organizations, insurance industry, road operators etc. are working on intelligent or smart car development programs. Such programs work for adding more and more functions to automobiles. Examples of smart car features are: 1. Computerized engine management systems 2. Anti-lock Braking Systems (ABS) 3. Position monitoring system or lane departure warning system 4. Platoon and car-train features 5. Automatic Cruise Control (ACC) system 6. Advanced Parking Guidance (APG) system 7. Collision warning system This project studies automatic cruise control (ACC) system in detail. ACC is an automated modification to the cruise control (sometimes known to as speed control or Autocruise) systems. In cruise control system driver sets the speed and system takes over the control of throttle of the car to maintain the same speed. Cruise control system is expected to maintain the same speed whether up hill or down. Cruise controls currently being developed include the ability to automatically reduce speed when the speed limit decreases. This is an advantage for those driving in unfamiliar areas. Cruise controls often prove useful for long drives across sparsely populated roads. This usually results in better fuel efficiency. 1

Cruise control systems are disengaged automatically, when driver hits the brake or clutch. However, such disengagement may also result in driver loosing control of the car. This is true especially during inclement weather or while driving on wet or snow covered roads. Cruise control system often proves less useful on moderate traffic, where driver has to disengage the cruise control system whenever he/she finds closing in vehicle in front. This fact led to a development of system referred to as Automatic Cruise Control (ACC) system. Following section describes ACC system in detail.

1.1

Automatic cruise control (ACC)

Automatic cruise control (ACC) refers to a smart car with some automatic functionality including a routine task of cruise control on highways. As mentioned earlier ACC system has the ability to detect the presence of vehicle in front. This is done with the use of either laser or radar range finder which allow vehicle to keep pace with the the car it is following, slow when closing in on the vehicle in front and accelerating again to the preset speed when traffic allows. Overall objective of the system is to adjust the speed of the car to maintain a safe following distance. A forward looking range finder detects the speed and distance of the vehicle in front. Automatic cruise control is similar to conventional cruise control in that it maintains the vehicle’s preset speed. However, unlike conventional cruise control, this new system can automatically adjust speed in order to maintain a safe distance between vehicles in the same lane. It proves to be more useful than cruise control system in low and moderate traffic situations. However dense traffic may result in stop-and-go behavior from vehicles trapped in traffic congestion. Traffic congestion typically occurs when traffic demand is greater than the capacity of a road (or of the intersections along the road). In general, stop-and-go behavior leads to a considerable wastage of fuel, increased air pollution due to increased idling, acceleration, and braking, increased journey times thus wasting time of motorist and passengers, and increasing the frustration of motorists. Blocked traffic may also interfere with the passage of emergency vehicles traveling to their destinations where they are urgently needed. Dense traffic therefore demands a different behavior from vehicles so as to minimize if not to eliminate negative impacts the traffic congestion may have. Following section details about the stop-and-go behavior of traffic. In this project work we have attempted to design the control system for automatic cruise control to be used in low and moderate traffic situations, and a separate control system to be used in congested traffic situations. More about this is given in section 1.3 and following chapters.

2

0.4 0.35 0.3

q/ckj

0.25 0.2 0.15 0.1 0.05 0

0

0.2

0.4

0.6

0.8

1

k/kj

Figure 1.1: Fundamental flow diagram.

1.2

Stop-and-go traffic Situation

From above discussion it is clear that a cruise control is useful only for sparsely populated roads. For most of the traffic volumes or regions in fundamental traffic diagram shown in Fig. 1.1, automatic cruise control is necessary to avoid driver continuously disengaging system like cruise control. However, according state federal laws the use of ACC system at low velocities is prohibited. Thus, forcing human driving in stop-and-go traffic where usually average speed of the cars is below 10 km/hr. It is found that the human driving in (frustrating) stop-and-go scenario generally, results in excessive decelerations and jerks, thus violating the comfort specifications. Therefore, it is the high traffic density region which demands a different behavior of cars to avoid prolonged congestion and increased journey times. Typically, we agree upon1. One can control traffic behind by slowing down, but he/she cannot control traffic ahead by speeding up. 2. One can control the traffic jam before he/she gets trapped inside it. In other words, one must behave differently before the jam, and not while he/she is trapped inside it. 3. Traffic jam is a phenomenon where from the outflow has become constant, which means driver of a car in the jam can’t affect outflow of the jam. On the other hand, in noncongested traffic the traffic outflow is a function of inflow. 3

4. By eliminating a space ahead, one becomes a part of an impenetrable wall which creates a dynamic bottleneck. The conclusion is to have a different control strategy from ACC which mainly aims at car following or inter-distance control. This new control strategy which is active in stop-and-go traffic has the safety and comfort as the main goals. The car is expected not to alleviate the comfort constraints such as maximum deceleration and maximum jerk while at the same time safety constraint must also be obeyed. It is the objective of this report to study automatic cruise control and the control in stop-and-go traffic together to ensure a safe inter-distance following in low and moderate traffic volume situations, and a safe and comfortable ride in high traffic volume situations. In this regard we present a novel cascade control scheme to control the longitudinal motion of the vehicle.

1.3

Objectives of the project

As mentioned, the objective of this project is to have a automotive cruise control system that performs a safe inter-distance control and also reacts differently when the traffic volume is high enough to produce stop-and-go traffic behavior. Speed of the cars is used as the index to separate traffic congestion from non-congested traffic. This is a valid assumption as it will be shown later that the speed of traffic stream generally decreases as the density rises. Thus below a certain speed value, for example 10 km/hr, the traffic stream is expected to exhibit a stop-and-go kind of behavior. The control law designed for ACC in the first stage of the project is used for car-following, while a reference model-based control approach is used to obtain the control law for congested traffic. These two control laws are combined with the feedback control loop to form a cascade control structure, where ACC or reference model based controller forms the master controller and the inner feedback controller forms the slave controller. The inner feedback control loop is designed to reject the influence of unmodeled dynamics and external disturbances such as road slopes. Experiments are performed on the robotic vehicle platform, CDBOT, to asses the control system performances. The target platform is a low cost vehicular robot built at Embedded Real Time Systems (ERTS) laboratory, KReSIT, IIT Bombay. The results of experiments are satisfactory and suggest the benefits of the control structure described in this report. Another objective of the project was to implement the control strategies on such a low cost platform, which was accomplished.

4

1.4

Organization of the report

Chapter 1 gave the introduction and objectives of the project. In chapter 2, literature on the relevant fields such as traffic flow theory, automatic cruise control system and control of cars in congested traffic are reviewed. Shortcomings of already available methods are discussed along with the specific aspects on longitudinal control of cars in stop-and-go traffic, those remained unexplored in literature are discussed in chapter 2. In addition to this, chapter 2 also presents the literature review on the selection of sampling period for such a timecritical applications, and the safe spacing policy which takes in to account the follower vehicle parameters such as maximum velocity, acceleration/deceleration, and jerk to compute the safe inter-distance. Chapter 3 gives the detailed mathematical formulation and analysis of control law designed for ACC and longitudinal control in congested traffic. Chapter 4 includes the brief overview on the implementation of cascade control structure and also discusses the experimental results. Finally, chapter 5 includes the concluding remarks on this project work. Suggested future improvements are given in chapter 6.

5

Chapter 2

Literature Review This chapter briefly presents the literature available on themes such as traffic flow theory, automatic cruise control, and control of car during congested traffic scenarios. Objective is to briefly explain the existing methods along with their merits and demerits and discuss the aspects those remained unexplored in existing literature. In addition, literature on selection of sampling period in real-time control applications and the safe distance policy derived using the follower vehicle maximum acceleration, deceleration and jerk values are reviewed.

2.1

Traffic flow analysis

Traffic theory is analyzed here to characterize congested and non-congested traffic, and study the follow-the-leader theory. Until 1930s, majority of traffic theories were derived from the statistical study of the flow. In 1935, Greenshield [1] made an experimental study of traffic flow by measuring actual flows (vehicles per hour) and velocities of observed vehicles. He plotted the velocity against density (vehicles per km) for one-lane traffic; he then fitted the points by a straight line. Later in 1955, Lighthill and Whitham [2] applied fluid dynamic principles to traffic flow and arrived at a qualitative description of the flow-density curve. A quantitative description is then given by Greenberg in 1958 [3]. Greenberg’s equation was given a valid connection with vehicular traffic flow by the work of Herman et al. [4] in studying interaction between two vehicles when one is following the other at a close enough distance to be affected by the velocity changes of the leader. This theory by Herman is also known as “follow-the-leader” theory. It was in 1960, when Leslie Edie [5], suggested the discontinuities in the empirical curves. He suggested the Greenberg’s model for the non congested traffic flow and follow-the-leader model for the congested traffic flow. Point of separation was selected to be a density of 90 vehicles/mile.

6

2.1.1

Analogy to fluid flow

In this analysis, traffic is assumed to behave like a continuous fluid. The methods of fluid dynamics may then be used except for the lowest densities of traffic where the interaction between cars on the roadway is not sufficient for the effect to be felt by the driver from neighboring vehicles. The equation of motion of a one-dimensional fluid is du c2 ∂k =− dt k ∂x

(2.1)

where u = fluid velocity (traffic stream velocity), km per hour, k = density of traffic, vehicles per km, x = distance along road, t = time, c = parameter that is determined from the state of the fluid. Since u = u(x,t), (2.1) becomes ∂u c2 ∂k ∂u +u + = 0. ∂t ∂x k ∂x

(2.2)

An additional equation describing fluid flow is the equation of continuity (conservation of flow equation) ∂k ∂q + = 0, ∂t ∂x

(2.3)

where q is the traffic flow, vehicles per hour. As q = ku,

(2.4)

equation (2.3) becomes ∂k ∂u ∂k +u +k = 0. ∂t ∂x ∂x

(2.5)

Later Greenberg assumed that the velocity is the function of density only; u = u(k). Then du ∂k ∂u = , ∂t dk ∂t du ∂k ∂u = . ∂x dk ∂x

(2.6) (2.7)

After substituting (2.6) and (2.7) into (2.2) and (2.5), we have   c2 ∂k ∂k + u+ ′ = 0, ∂t u k ∂x  ∂k ∂k + u + u′ k = 0. ∂t ∂x 7

(2.8) (2.9)

where u’ = du/dk. In the trivial solution

∂k ∂x

=

∂k ∂t

= 0; traffic flows with the same u and k

values as the initial ones. To have a nontrivial solution the determinant of the coefficients to the partial derivatives must equal zero. Thus, 

du k dk ⇒

2

= c2

(2.10)

c du =− dk k

(2.11)

Integrating both the sides, we get u = −c ln k + c1

(2.12)

where c1 is the integration constant. Using the fact that for a traffic jam, velocity is approximately zero. c1 = c ln kj

(2.13)

u = c ln(kj /k)

(2.14)

where c is taken as constant and kj is the density for a traffic jam (u = 0). To find the flow q in terms of the density k, substitute for u in (2.4) from (2.14); thus q = ck ln(kj /k)

(2.15)

A flow-density curve can be obtained from (2.15) and is shown in Fig. 2.1(a). As can be seen there is a maximum value of flow which occurs when kj /k = e, which gives the optimum speed as u = c. The parameter c depends on the roadway. The speed-density curve is shown in Fig. 2.1(b). (a)

(b)

0.4

6

0.35 5 0.3 4

u/c

q/ckj

0.25 0.2

3

0.15 2 0.1 1 0.05 0

0

0.2

0.4

0.6

0.8

0

1

k/kj

0

0.2

0.4

0.6

0.8

1

k/kj

(a)

(b)

Figure 2.1: (a) Normalized flow-density curve and (b) Normalized speed-density curve. Both the curves corresponds with c = 26.67 km/hr [3] and [4], kj = 166 vehicles/km.

8

Note: The fluid dynamic analogy of traffic flow applies when there is continuous wave interaction between vehicles. This effect takes place when a driver’s headway and speed are controlled to a major extent by the other vehicles on the roadway. The actual characteristics of the roadway determine the optimum value of the speed and maximum flow.

2.1.2

Follow-the-leader theory

A single lane roadway is considered, where vehicles are close enough such that driver’s headway and speed are controlled by the other vehicles on the roadway. Thus each vehicle is following its leader. The equation of the motion of a line of identical vehicles are Mx ¨n+1 (t) = λ(x˙ n − x˙ n+1 )t−∆

(n = 1, 2, 3, ...)

(2.16)

where xn (t) is the position of the nth car, M is the mass of each car, λ is the sensitivity (assumed constant), and ∆ is the time lag of the driver-car system. Here n+1 indicates follower car and n indicates leader car. For a change in velocity of a leader vehicle from u0 to u and hence is true for each vehicle in a line, the separation distance between cars yn = xn − xn+1 alters by the amount y − y0 = M (u − u0 )/λ.

(2.17)

The same is true for all pairs of cars. Notice that this expression is independent of ∆, but, of course, it has been assumed that the stability conditions, which do involve ∆, have been satisfied. Since the car separation is the inverse of the density

k−1 − k0−1 = (M/λ)(u − u0 )

(2.18)

For k0 = kj , u0 = 0. u = (λ/M )(k−1 − kj−1 )

(2.19)

q = (λ/M )(1 − k/kj )

(2.20)

Clearly, a traffic flow in (2.20) does not satisfy the required qualitative behavior of maximum flow at an optimum velocity, shown in the previous section. To obtain (2.15) from velocity control equation (2.16), Herman assumed that the sensitivity λ is not constant but is inversely proportional to the separation distance. This is, of course, a reasonable assumption. Equation (2.16) becomes Mx ¨n+1 (t) = λ1 [(x˙ n − x˙ n+1 )/(xn − xn+1 )]t−∆

(2.21)

where λ1 is the new sensitivity coefficient. Integrating (2.21) once gives M x˙ n+1 (t) = λ1 ln(xn − xn+1 ) + c2 9

(2.22)

where c2 is the integration constant. We have yn = (xn − xn+1 ) = 1/kn , u = 0 for k = kj , and yj = 1/kj . c2 = −λ1 ln(1/kj )

(2.23)

M x˙ n+1 = λ1 ln(kj (xn − xn+1 )) M x˙ n+1 = λ1 ln(L−1 (xn − xn+1 ))

(2.24)

For steady state, we have u = c ln(kj /k)

(2.25)

q = ck ln(kj /k)

(2.26)

with c = λ1 /M and kj = 1/L. Thus, a follow-the-leader theory for velocity control with sensitivity inversely proportional to the separation distance lead to (2.25) and (2.26) which are the same as (2.14) and (2.15) obtained from the fluid dynamic equations of motion. A further refinement to the “follow-the-leader” theory was given by Leslie Edie. He proposed that the sensitivity of a driver varies with his or her absolute velocity; the faster he is going, the greater his sensitivity is. This factor in the sensitivity is also dependent inversely on spacing; if the car ahead is close, the sensitivity to absolute velocity is greater. The further modified car-following or follow-the-leader theory is Mx ¨n+1 (t) = λ2 x˙ n+1 [(x˙ n − x˙ n+1 )/(xn − xn+1 )2 ]t−∆

(2.27)

where λ2 is the new sensitivity coefficient. Equation (2.27) may be integrated directly if the lag time is neglected, giving M ln(x˙ n+1 ) = −λ2 (xn − xn+1 )−1 + c3

(2.28)

where c3 is the integration constant. To determine c3 we take initial conditions of x˙ n+1 = uf = free velocity when (xn − xn+1 )−1 = y −1 = 0, where y is the spacing. Using y = 1/k, the solution is, k = km ln(uf /u)

(2.29)

q = ukm ln(uf /u)

(2.30)

with λ2 /M = ym , the spacing at maximum flow, k = km at maximum flow. The flow-density diagram and speed-density diagram for Edie’s model are shown in Fig. 2.2(a) and Fig. 2.2(b), respectively.

2.1.3

Discontinuity in traffic flow diagram

Previous section described two separate traffic flow, steady-state model; one given by Greenberg and Herman et al. in an independent study, and other suggested by Edie as a modification to the Herman’s follow-the-leader theory. It would be interesting to see which 10

1600

(b)

1400

70

1200

60

1000

50

80

u (km/hr)

q (vehicles /hr)

(a)

800

40

600

30

400

20

200

10

0

0

50

100 150 k (vehicles/km)

200

0

250

0

50

100 150 k (vehicles/km)

(a)

200

250

(b)

Figure 2.2: (a) Flow-density curve and (b) Speed-density curve. The curve corresponds with km = 55.94 vehicles/km (90 vehicles/mile) and uf = 74.014 km/hr (46 miles/hr) [5]. steady-state, flow model would show better fit to the empirical data obtained by Greenshield in 1934, for both congested as well as non-congested traffic situation. Greenberg’s and Herman’s follow-the-leader flow model is (from previous section; reproduced here) u = c ln(kj /k) k = kj e−u/c q = ck ln(kj /k) It can be seen that as k → 0, u → ∞ which is impractical. Given this shortcoming of the Greenberg’s steady-state flow model, we now look at the Edie’s steady-state flow model, u = uf e−k/km k = km ln(uf /u) q = ukm ln(uf /u) For the Edie’s flow model the maximum flow occurs at k = km , and uf is the mean free velocity. Thus the maximum velocity in the Edie’s flow model is limited to a finite value equal to uf . Now if we examine the other extreme of the traffic flow-density diagram; that is a congested traffic situation, it appears that the velocity in Greenberg’s flow model becomes zero when k → kM , but the same is not true for the Edie’s flow model; here the velocity practically never becomes zero. Hence both the traffic flow, steady-state models lack the realism. But the two models considered does not fail at the same extreme of the traffic flow-density diagram, rather Greenberg’s model seems to be valid for the congested traffic situation, Edie’s model has the practical significance at low density traffic situation. The failure of one model at one end 11

of the flow-density curve and that of other at the other end of the curve gives the hint of presence of discontinuities in the empirical flow-density curve, that would be practiced by motorists. The empirical data and flow-density plots for Lincoln tunnel obtained by Greenshield, also gives the indication of presence of discontinuities in the empirical curves. These data repeated here in Table 2.1 and the fit of the data to the congested-flow and non-congestedflow, steady-state model are given in Fig. 2.3(a). For non-congested flow model, the points are considerably below the curve in the region to the right of 56 vehicles/mile, but to the left they all fall below. Likewise, for congested flow model, the points are considerably above the curve in the region to the left of 56 vehicles/mile, but to the right they all fall below. By fitting the non-congested-flow steady-state model to the points to the left of a density of 90 vehicles/mile and the congested-flow steady-state model to the points above this density, the discontinuity and change of state becomes more apparent as seen in Fig. 2.3(b). (a)

1600

(b)

1400

1400

1200

1200

1000

1000

800

800

600

600

400

400

200

200

Black curve: Greenberg‘s / Herman‘s model, Gray curve: Edie‘s model

0

1600

0

20

40

60

80

100

120

140

0

160

(a)

0

20

40

60

80

100

120

140

160

(b)

Figure 2.3: (a) Flow-density diagram showing Greenshield’s empirical data along with the fit for Greenberg’s model and Edie’s model and (b) Flow-density curve showing hysteresis. For light traffic Edie’s steady-state model is used and for dense traffic Greenberg’s model is used. The presence of such a discontinuity may or may not be true. Generally speaking, the data available for light traffic and dense traffic regions are rather limited. The discussion presented, suggest the presence of hysteresis in the flow-density diagram

2.2

On automatic cruise control

Vehicle-following and its impact on traffic flow has been the active and fruitful area of research. Many researchers from various fields such as Controls, Mathematics, Civil and Environmental Engineering, Mechanical Engineering, Electrical and Computer Science En-

12

Table 2.1: Traffic data - Lincoln tunnel (with speed in miles/hr, spacing in meters, density in vehicles/mile, and flow in vehicles/hr). Speed

Spacing

Density

Flow

Speed

Spacing

Density

Flow

32

155

34

1088

14

55.0

96

1344

28

120

44

1232

13

51.3

103

1339

25

99.6

53

1325

12

47.1

112

1344

23

88.0

60

1380

11

48.9

108

1188

20

71.4

74

1480

10

40.9

120

1290

19

64.4

82

1558

9

40.0

132

1188

17

60.0

88

1496

8

38.0

139

1112

16

56.2

94

1504

7

33.0

160

1120

15

56.2

94

1410

6

32.0

165

990

gineering have contributed to the field of automatic cruise control of ground vehicles. One of the major contributor to this field is Prof. Petros A. Ioannou. His paper [6] discusses the control law obtained from the theory of feedback linearization where one part of the control action is used to cancel the non-linearities and the other part is used to assign the eigen values of the resulting linear system. A non-linear model for the vehicle is assumed and validated, then by using the feedback linearization theory, a control law is obtained. The parameters of control law are tuned to ensure the individual vehicle stability, zero steadystate tracking error, and eliminate slinky-type effects (oscillatory behavior in tracking error). However, this approach does not take in to account the riding comfort, in fact high power control action may make riding uncomfortable and jerky. String stability problem is also not addressed. The proposed control law is model specific and may vary from vehicle-to-vehicle and car manufacturer-to-manufacturer. Another major contributor to this field, Dr. D. Swaroop presented the work on the design of the ACC system based on a traffic flow specification [7]. The main objective of the work was to design ACC control law that ensures the vehicle density disturbances attenuate as they propagate upstream. He analyzed constant and variable spacing policies, and concluded that with constant spacing policy, a reference (or platoon leader) vehicle information is necessary to guarantee string stability (for further details on this, reader is referred to 1st stage report1 of the project). He also showed that the Greenshield’s relation2 , 1

First stage report is available at HTTP: http://www.sc.iitb.ac.in/∼ rupeshsk/aicc report final.

pdf. Last modified on July 11, 2007. 2 For more details on this relation, see variable time gap policy section of 1st stage report of this project.

13

v = vf



1−

ρ ρmax



(2.31)

results in fixed value for critical density (density value at which the rate of change of traffic flow is zero, or the value of the density that separates positive slope and negative slope regions of the fundamental flow diagram, see Fig. 1.1). The critical density value is fixed at half the jam density. Swaroop et al., modified this relation to yield a relation having variable critical density. A control law was developed to yield the specified traffic flow characteristics, i.e., the control law parameters value decided various characteristics such as critical density, jam density, etc. of the traffic flow-density diagram. This work was based on heuristics, and authors conducted only simulation study; therefore its applicability to commercial vehicles is also questionable. Another work by Prof. Petros A. Ioannou et al. [8] presented the design of throttle and brake control system for vehicle-following. Authors assumed non-linear model for throttle angle to vehicle speed and brake torque to vehicle speed. A constant headway policy was used to determine the safe inter-distance. Authors proposed three controllers for throttle angle control namely, PID with fixed gains, PID with gain scheduling, and an adaptive controller. The PID control laws were obtained from feedback linearization theory and are model specific whereas the adaptive control law was rather complicated. The brake control system was also designed using the theory of feedback linearization. Similarly the control law designed by Anna and Robert Fenton [9], was based on assumed and validated model of the vehicle. The control law we used to implement the ACC controller was proposed by Rajamani and is presented in [10, 11]. This control law is derived without the need for vehicle dynamics model and therefore is expected to work on all platforms with suitable adjustments in the controller parameters.

2.3

Control of car during congested traffic

In most of the reported works, ACC and stop-and-go scenario are treated separately with little regard to comfort specifications. Most of the work reported earlier take in to account only safety specifications. Shortcomings of many earlier work includes the use of the same controller for free flowing and congested traffic. Such controllers often work satisfactory for free flowing traffic achieving both safety and comfort specifications. However, during stopand-go traffic the same controller exceeds the comfort limits (such as maximum deceleration and jerk), thus proves to be unsuitable. Often the use of ACC system in city roadways is discouraged, thus permitting its use only up to certain speed limit. Below this speed limit the use of ACC system is prohibited. This fact forces the human driving in stop-and-go scenario, which is more prone to frequent 14

accelerations and stops. Work by Martinez and Wit, March 2007 [12], concentrate on developing a control scheme for automotive longitudinal control. They have proposed a novel reference model-based control approach for longitudinal control. A similar approach for the longitudinal control of cars in stop-and-go scenarios is described in following chapters.

2.4

On the Selection of Sampling Period

The dynamic behavior of the sampled data system depends on the sampling period Ts [13]. In other words, a change in sampling period Ts modifies the pole-zero location in the z plane and causes the response behavior to change. Therefore it is necessary to pay a particular attention to the selection of sampling period Ts . If the sampling period is too long and the Shanon’s sampling theorem is not satisfied, one may loose a vital part of the signal information plus a well known phenomenon called frequency folding may occur [13, 14]. Whereas a too short sampling period Ts results in computational overload on the computer. The selection of sampling period have been discussed in [13, 14], but the problem has barely been investigated. Although the tracing of the sampling-time root loci was shown in [14], the problem of finding suitable sampling time still remains. In this section, we study the polynomial root locus to describe the pole variation in the z plane [15]. This will help in selecting the sampling time for a stable digitized system. The effect of sampling time on the transient behavior of digitized system is then studied. A new set of transient terms is defined to describe the relationship between sampling time and transient behavior of approximated digitized system [15]. The two digital approximations, viz., Tustin (or Bilinear transformation) and zoh (zero-order hold) are considered throughout the report. Section 2.4.4 describes an algorithm to select the maximum permissible sampling time based on the output error [16]. The algorithm assumes a constant set-point, hence used to evaluate Ts during cruise control mode where the objective is to maintain the set speed.

2.4.1

Sampling period during ACC

In automatic cruise control mode, two objectives specify the steady state of the vehicle, viz., zero spacing error and zero relative velocity. During this mode two variables sampled are the distance of separation, and the host vehicle velocity. Equal sampling time could be used for the two variables depending on the requirement. Polynomial root locus and the effect of sampling time on the transient behavior of the system can be considered for the selection of sampling time, Ts . Polynomial root loci The selection of sampling time based on the stability of the digitized system can be made by plotting the polynomial root locus. If the polynomial root locus is outside the unit circle on 15

Blue: Tustin Approx., Red: zoh Approx. 1 2

0.8 0.6 0.4

0.6

Imaginary(z)

0.2 0 −0.2 −0.4 −0.6 −0.8 2

−1

−1

−0.5

0 Real(z)

0.5

1

Figure 2.4: Polynomial root loci for Tustin and zoh digitization: Shows variation in pole locations as the Ts is varied from 0.01 to 10 s. the z plane, the digitized discrete-time system is unstable. For a stable continuous time system, its polynomial root loci for zoh digitization always starts from z = 1 and ends at z = 0, while the polynomial root loci for Tustin digitization always starts at z = 1 and ends at z = −1. The proofs for these facts are given in Appendix A. The following example shows the polynomial root loci of the Tustin and zoh digitization’s. Example 1: Sketch the Tustin and zoh polynomial root loci of the following 2nd-order system:

G(s) =

s2

4 + 2.4s + 4

(2.32)

Solution: The polynomial root loci for Tustin and zoh digitization when sampling time is varied from Ts = 0.01 to Ts = 10 s is shown in Fig. 2.4. It is seen that the zoh polynomial root locus follows a constant ζ locus up to Ts = 2 s. For the larger sampling time root locus converge to origin as per Theorem 2, thus the damping ratio approaches to unity. For Tustin digitization, ζz decreases as the sampling time is increased from 0.01 to 10 s. From this we conclude that for a range of sampling time zoh digitization gives a better result than Tustin method (as the digitized system has the same damping ratio as its continuous counterpart, i.e., zetaz = zeta). But it is well known that the Tustin digitization will always yield a stable digitized system if the continuous-time system is stable. As a selection criteria for sampling time, the variation in ζz and ωnz from ζ and ωn respectively (discussed in next section), can be considered. For non-oscillatory response, the poles of the discrete system 16

must have positive real part [17]. Plus the proximity of the poles to the unit circle have same effect as the proximity to the imaginary axis of the poles in a continuous system [17] i.e., poles near the unity circle results in a longer transient response. Hence for a given system, a region in the z plane for the poles of a system can be defined and the corresponding range of the sampling time from the polynomial root locus can be obtained. Transient behavior of digitized system The z transform

z = exp(sTs )

(2.33)

is the exact relationship between continuous and discrete transfer function. The approximate digitization’s (such as Tustin and zoh) will deteriorate the original response of the continuous plant [15]. The damping factor ζ, natural frequency ωn , and the time constant τ = 1/(ζωn ) describe the transient behavior of continuous plant in s-domain. We define the z plane counterpart of these transient terms. Consider the characteristics polynomial of standard second order system,

s2 + 2ζωn s + ωn2 ,

0 L + 2∆XT + (Vs + ∆VT ) tc + tp + τ + Jm 2  2 A Vs + ∆VT − Jm2 A32 +ǫ − 2 + 2Jm 2A2

 (2.57)

For given values of nominal velocity and seven quantities, i.e., ∆VT , ∆XT , T = tc +tp +τ , A1 , A2 , and Jm ; no collision can be guaranteed if the headway selected satisfy (2.57). The expected value or range of values for these seven quantities are given in Table 2.2. Parameter values There are seven parameters in (2.57) which affect the minimum permissible headway. We consider only cars and hence no trucks or vans are taken into account, L was therefore selected as 5 m (16.4 ft). Maximum jerk was selected as 76.2 m/s3 under the assumption that all the car occupants are belt constrained in their seats. The quantities ∆XT and ∆VT are comprised of two components. 24

Table 2.2: Selected ranges of parameter values Symbol

Definition

Range

Vs

Stream speed

0 to 40 m/s

L

car length

3.5 to 7 m

T

Total reaction delay

0.1 to 0.6 s

Jm

Maximum Jerk

76.2 m/s3

A1

Lead-car maximum deceleration

3.92 to 7.85 m/s2

A2

Following car maximum deceleration

3.92 to 7.85 m/s2

∆VT

Maximum permitted velocity deviation

0 to 0.762 m/s

∆XT

Maximum permitted position deviation

0 to 0.3048 m

1. the accuracy of measurement, and 2. the maximum deviation expected in the instantaneous value. In practice, ∆XT ≤ 0.3048 m (1 ft) and ∆VT ≤ 0.3048 m/s (1 ft/s) appears to be achievable. A reasonable range for car deceleration is 3.92 to 7.85 m/s2 (0.4 to 0.8 g). We selected the total reaction delay as 0.3 s. Error in approximation ǫ was selected as 0.3048 m (1 ft). (a)

(b)

45

7

Minimum safe distance California rule

40

6

5 30 headway (s)

minimum safe distance (m)

35

25 20

4

3

15 2 10 1

5 0

0

5

10

15

20 25 velocity (m/s)

30

35

0

40

(a)

0

5

10

15

20 25 velocity (m/s)

30

35

40

(b)

Figure 2.7: (a) Minimum safe distance. (b) Minimum safe headway as a function of following car speed. Fig. 2.7(a) shows the minimum safe distance between two vehicles as a function of follower car speed for the proposed headway policy and California rule. As can be seen, a smaller safe distance than one obtained with the California rule can be maintained between the two cars to ensure the safety; this also results in increased road capacity. The corresponding time headway between the two vehicles is shown in Fig. 2.7(b). A time headway for the

25

Table 2.3: Results of sensitivity analysis

(a)

Sensitivity

Value

Typical Variation

∆h

∂h ∂L ∂h ∂T ∂h ∂∆VT ∂h ∂∆XT ∂h ∂Jm ∂h ∂A1 ∂h ∂A2

0.0448

± 0.3048 m

0.0137

1.0137

± 0.1 s

0.1014

0.5237

± 0.3048 m/s

0.16

0.0897

± 0.1524 m/s

0.0137

-0.0515

± 15.2 m/s3

-0.05

0.7059

± 0.981

m/s2

0.7388

± 0.981

m/s2

-0.7738

-0.7456

(b)

40

40

0.91 (3.0) T= 0.6s

35

T= 0.4s 25 T= 0.3s 20

T= 0.2s T= 0.1s

15

10

5

0.76 (2.5) 0.60 (2.0)

T= 0.5s

30

minimum safe distance (m)

minimum safe distance (m)

35

30 0.46 (1.5) 0.30 (1.0)

25

0.15 (0.5) 20

0.00 (0.0) m/s (ft/s)

15

10

0

5

10

15

20 25 velocity (m/s)

30

35

40

5

45

(a)

0

10

20 30 velocity (m/s)

40

50

(b)

Figure 2.8: Minimum safe distance versus speed, with- (a) T as a parameter, (b) ∆VT as a parameter. California rule is constant, irrespective of the follower car speed and is equal to 1.125 s for the car length of 5 m. Sensitivity analysis The effect of each parameter in (2.57) was established via a sensitivity analysis. The change in h, for changes in a given parameter were obtained. Results tabulated in Table 2.3 were obtained for operating condition corresponding to Vs = 22.3 m/s (80 km/hr). The values described above were used for other parameters. From the results, it can be concluded that h is insensitive to changes in L, Jm , and ∆XT unless, of course, this changes are large, e.g., an increase of 3 m in vehicle length. h is quite sensitive to the changes in T, ∆VT , A1 , and A2 . As this observation are also valid for other operating conditions, the first three quantities were fixed to their nominal values, and h was evaluated as a function of the other four parameters. 26

(a)

(b)

140

60

A1 = 7.84 A2 = 3.43 m/sq.s 50 minimum safe distance (m)

minimum safe distance (m)

120

100 A1 = 6.86 80

A1 = 5.88

60 A1 = 4.9 40

40

30 A2 = 3.92 m/sq.s 20

A2 = 4.41m/sq.s

10

20 A1 = 3.92 0

0

5

10

15

20 25 velocity (m/s)

30

35

40

0

45

(a)

0

5

10

15

20 25 velocity (m/s)

30

35

40

(b)

Figure 2.9: Minimum safe distance versus speed, with- (a) A1 as a parameter, (b) A2 as a parameter. The marked influence of T is shown in Fig. 2.8(a), where the minimum safety distance is presented with T as a parameter (here A1 = 3.92 m/s2 , A2 = 3.92 m/s2 , and ∆VT = 0.3048 m/s). The smaller safety distance can be maintained for smaller value of T, therefore T must be reduced to as small value as is practical-probable some 0.3 to 0.4 s. The effect of ∆VT on h shown in Fig. 2.8(b), with A1 = 3.92 m/s2 , A2 = 3.92 m/s2 , and T = 0.3 s. Clearly, ∆VT must be small, so that a small spacing can be maintained while ensuring the safety. The effect of A1 and A2 are shown in Fig. 2.9(a) and (b). As expected increased value of A1 demands for the increased value of safety distance, and similarly decreasing the value of A2 requires large safe spacing between cars.

27

Chapter 3

Design of Cascade Control Scheme This chapter describes the design and analysis of cascade control scheme used for the control of longitudinal motion of ground vehicles. As described in chapter 1, the inner feedback controller forms the slave controller of the cascade scheme, while ACC controller or reference model-based controller forms the master controller of the cascade control scheme. When traffic allows, a simple cruise control structure (only feedback control, no cascade control) is used to control a speed of the vehicle at a preset value. In slightly dense traffic, automatic cruise control structure is used for vehicle-following, whereas in dense traffic a reference model-based control structure is used to stop the vehicle before it reaches the critical distance dc while respecting the comfort constraints. Both the ACC and reference model-based controller uses the common inner loop. This three control structures are explained in detail in following sections of this chapter.

3.1

Cascade control schemes

Cascade control systems are special cases of control systems with auxiliary controlled variables. The main controller (also called master or primary controller) does not directly effect the actuator, but provides the reference value for the underlying auxiliary controller (also called slave or secondary controller). This auxiliary controller forms together with the plant, the auxiliary control loop, which is inside the main control loop. The objective of two control loops is to have disturbances in the plant section rejected by the auxiliary controller such that they have less influence on the control objective of the main controller. Reasons for choosing the cascade control scheme are summarized below. 1. Allow faster secondary controller to handle disturbances in the secondary loop. 2. Allow secondary controller to handle actuator and plant non-linearities. 3. Allow primary loop to focus on its main control objectives. 28

Figure 3.1: Cascade control with Automatic Cruise Control (ACC) controller as a master controller. Requirements for the cascade control scheme which must satisfied are summarized below. 1. Secondary loop process dynamics must be at least four times as fast as primary loop process dynamics. 2. Secondary loop must have influence over the primary loop. 3. Secondary loop must be controllable and its variables must be measurable. The complete cascade control scheme with the ACC control structure and inter-distance reference model as a master controller are shown in Fig. 3.1 and Fig. 3.2 respectively. Both control schemes have a common feedback control loop, which alone forms the feedback control scheme for cruise control mode. The two control schemes are used in different traffic situations, i.e., ACC based control scheme of Fig. Fig. 3.1 is used in freeway traffic, whereas the reference model-based control scheme shown in Fig. 3.2 is used in stop-and-go traffic scenario. The common elements to the two cascade control schemes include a feedback control loop (a slave controller of a cascade scheme), and plant dynamics (inter-distance dynamics and longitudinal speed dynamics). These elements are described next. 1. Inter-distance dynamics - The plant The inter-distance dynamics can be represented as a double integrator driven by the difference between the lead vehicle acceleration x ¨l and the follower vehicle acceleration

29

Figure 3.2: Cascade control with reference model-based controller as a master controller. x ¨f , i.e., d¨ = x ¨l − x ¨f

(3.1)

where d is the distance between the two vehicles. 2. Longitudinal speed dynamics - The plant It is assumed that the longitudinal speed dynamics of the vehicle are highly complex and non-linear. Inner feedback control loop is designed to guarantee a compensation of the unmodeled and neglected speed dynamics.

x˙ f = f1 (x˙ cf , t)

(3.2)

where the function f1 is a highly complex and non-linear function. 3. Inner feedback controller - A slave controller The inner speed control loop include the conventional PID (Proportional plus Integral plus derivative) control structure to compensate for unmodeled dynamics, unknown disturbance inputs, and disturbances specific to sensor and actuator characteristics. This controller acts as a slave controller in both the cascade control structures. It accepts the speed command from ACC or reference model controller as the set-point input and compares it with the actual speed of the vehicle. The error of comparison is used by the control law to generate the control signal which then regulates the vehicle speed to minimize the error to zero with acceptable performances. 30

3.1.1

ACC as a master controller

In cascade control scheme for ACC controller, shown in Fig. 3.1, the objective is to safely follow the leader vehicle. A constant time-gap policy is used to define the safe inter-distance dsaf e (t) as a function of follower velocity x˙ f (t), and a specified constant time-gap h. The safe distance rule can be designed to ensure safety and high road capacity. The ACC controller is designed to ensure the safe inter-distance is maintained while adapting to the leader vehicle velocity. The inner feedback controller is designed to optimally reject the unknown disturbance inputs, and disturbances specific to sensor and actuator characteristics. We next describe each of the elements specific to this control scheme. 1. Safe inter-distance rule A constant time-gap policy is used to determine the safe inter-distance between two vehicles as a function of follower velocity x˙ f (t) and a constant time-gap (or headway) h. The safe inter-distance is computed from

dsaf e (t) = hx˙ f (t) + dc

(3.3)

where dc is the critical or minimum safe inter-distance between two vehicles (often chosen as the average car length). 2. ACC controller The control law used for the ACC controller is given below. af (t) =

1 (vr (t) − kǫd (t)) h

(3.4)

where vr (t) is the relative velocity defined as the difference between the leader velocity and follower velocity, i.e., vr (t) , vl (t) − vf (t), ǫd (t) is the inter-distance error defined as ǫd (t) , dsaf e (t) − d(t), and k is the gain of the controller.

3.1.2

Reference model-based controller as a master controller

Fig. 3.2 shows the complete cascade control scheme with reference model-based controller as a master controller including the inter-distance reference model. Here the longitudinal control problem could be stated as a tracking problem of the inter-distance reference signal dr (t). The reference model can be designed to include the safety and comfort constraints and the controller can be designed to optimally reject disturbances specific to sensors and actuators characteristics, and the input disturbances such as road slopes, side wind, and vehicle unmodeled dynamics. We next describe each of the elements specific to this control scheme.

31

1. Reference model The inter-distance reference model describes the virtual or reference vehicle dynamics which is positioned at a distance dr from the leader vehicle. The reference model dynamics are given by

ˆ¨l − x d¨r = x ¨rf

(3.5)

ˆ where x ¨l is an estimation of the leader vehicle acceleration and x ¨rf (one of the two outputs from reference model) is a non-linear function of the inter-distance reference dr (second output from the reference model) and its time-derivative d˙r . In addition, the reference model also describes the reference model controller whose control law is given by ˜ d˜˙ u2 = −c|d|

∀d˜ ≥ 0

(3.6)

where c determines the aggressiveness of the controller and d˜ is computed from d˜ = d0 − dr (d0 is a constant nominal inter-distance). Negative sign in (3.6) indicate that during this mode vehicle decelerates to zero speed while respecting the safety and comfort constraints. Thanks to the integrability property of the model, the input required to drive the reference model will be the estimated leader velocity instead of the estimated leader acceleration. This aspect is explained in section 3.3. The input to the reference model ˜ = d0 − dr (t). The output from the reference controller will be the distance error d(t) model will be the reference distance dr (t) and reference vehicle acceleration x ¨rf (t). The three control schemes described above namely, cruise control using conventional feedback control loop, cascade control- with automatic cruise controller as a master controller, and with reference model-based controller as a master controller are used in different traffic situations. The traffic levels are defined in terms of zones. Inter-distance is used to characterize different traffic levels. In order to characterize different traffic levels, four zones are defined as follows. 1. Free Zone: d > dccl , where the inter-distance is larger than the constant cruise control inter-distance limit dccl . This Zone corresponds to a conventional cruise control operation. 2. Green Zone: dccl > dr > d0 , where the inter-distance is larger than the constant safe nominal inter-distance d0 . This is a safe operation region.

32

3. Orange Zone: d0 ≥ dr > dc , where d0 − dc is the necessary inter-distance to avoid collision is a possible hard braking is applied by the lead vehicle. This is a collision-free zone. 4. Red Zone: dr ≤ dc , where dc is a constant minimal inter-distance to be respected. Often this distance is equal to average car length. When the inter-distance is too large, a conventional cruise control structure is enabled. This structure aims at maintaining a constant speed specified by the driver. Green Zone corresponds to automatic cruise control zone. In this Zone, inter-distance is larger than the nominal inter-distance d0 and is smaller than cruise control inter-distance limit dccl . A constant time-gap policy is used to determine the safe inter-distance. The objective of this control structure is to keep following the lead car. If the lead car speed decreases abruptly, inter-distance value may fall below nominal inter-distance d0 , in this case a reference modelbased control structure is used to stop the vehicle before it reaches the critical distance dc , while respecting the imposed comfort constraints. Inter-distance is guaranteed to be greater than critical inter-distance dc for all time. This is true for all initial conditions d(0) ≥ dc , xl (0) ≥ 0. Even if d(0) < dc , this condition remains only until xl (t) = 0. As soon as lead vehicle speed is positive non-zero value, the inter-distance increases and will never fall below critical inter-distance dc .

3.2

ACC controller design

The main goal of the automatic cruise control structure is to follow the leader vehicle with minimal distance error and relative velocity, while respecting comfort requirements under most (but not all, for e.g., under sudden deceleration of lead car comfort constraints are generally violated) of the maneuvers of leader car. The inter-distance error and relative velocity are defined as

ǫd (t) = dsaf e (t) − d(t)

(3.7)

vr (t) = vl (t) − vf (t)

(3.8)

where dsaf e (t) is the safe inter-distance determined by using constant time-gap policy, d(t) is the actual inter-distance between two vehicles, vl (t) and vf (t) are the velocities of leader and follower vehicle respectively. The safe inter-distance is a function of follower vehicle speed, and is computed from dsaf e = h vf + dc

33

(3.9)

where h is the time gap or headway (often chosen to be in the range 1-2.5 s), and dc is the critical or minimum safe inter-distance between two vehicles (often chosen as the average car length). The actual inter-distance between two vehicles can be computed from d(t) = xl (t) − xf (t) − ll

(3.10)

where xl (t) and xf (t) are the distance traveled by leader and follower car, and ll is the length of the leader car. Substitute (3.9) and (3.10) in (3.7) we have ǫd (t) = h vf + dc − (xl (t) − xf (t) − ll )

(3.11)

The inter-distance dynamics are obtained by taking a time-derivative of (3.7), i.e., ˙ ǫ˙d (t) = d˙saf e (t) − d(t)

(3.12)

Defining ǫ˙d (t) , −kǫd (t), which ensures that the inter-distance converges to zero. We get haf (t) − (x˙ l (t) − x˙ f (t)) = − kǫd (t), 1 af (t) = (vr (t) − kǫd (t)) . h

(3.13) (3.14)

The above control law has two degrees of freedom. If one degree of freedom is removed, for e.g., if the inter-distance error input to controller is kept constant and zero, then the control law will only regulate relative velocity vr (t) without taking in to account the inter-distance between two vehicles. In this situation, controller will try to adapt to the lead vehicle speed, while the actual inter-distance may attain any arbitrary value. Note that the presence of relative velocity term vl ensures that the two vehicles (i.e., leader and follower) have approximately equal velocities, whereas the inter-distance error term ǫd (t) ensures that the time-gap (or headway) is approximately equal to a specified value (generally between 1-2.5 s). The control structure in (3.14) is similar to PD (Proportional plus Derivative) control structure acting on a inter-distance error.

3.3

Reference model-based control design

This section describes the reference model-based control approach used to control the longitudinal motion of the vehicle, typically in congested traffic scenario. In such a traffic situation, vehicles exhibits stop-and-go behavior, therefore according to states federal law ACC system can not be used, as the minimum speed limit to turn on ACC system is far greater than the speed of cars in congested traffic. In such traffic scenario, even the human driving is observed to result in excessive braking at times and consequently leads to fuel wastage and discomfort to passengers. 34

The stop-and-go traffic therefore, demands different behavior from vehicles, as described in chapter 1. We have attempted to design and implement the cascade control scheme based based on reference model-based approach for stop-and-go traffic. This control structure takes over from automatic cruise control system, when the inter-distance falls below the constant nominal inter-distance value d0 . The objective of this control structure is not to regulate back the reference vehicle to d0 , but to stop the vehicle before it reaches the critical distance dc , while respecting the imposed comfort constraints. The objectives of safety and comfort must be achieved simultaneously. Often these goals oppose each other. Safety constraint is determined by the minimum safe inter-distance dc (often equal to average car length of 5 m) that need to be maintained between any two vehicles at all time for all initial conditions. All this must be true for all lead car maneuvers. On the other hand, comfort in public ground transportation is determined by the changes in motion felt by passengers in all direction. Typically, acceleration/deceleration magnitude and its time derivative, i.e. jerk, are taken as a comfort metric. To implement the control structure for stop-and-go traffic scenario, a reference modelbased approach is used [12]. This model is combined with feedback control loop used to compensate for unmodeled dynamics and unknown disturbances. Fig. 3.2 shows the complete control scheme including the reference model. The beauty of this method is that the controller and reference model can be designed independently. Thereby, the reference model will include the safety and the comfort constraints. And, the controller can be designed to track the reference distance, output of reference model, while optimally rejecting the influence of unmodeled dynamics, unknown disturbance inputs, road slopes, and vehicle internal sensor and actuator dynamics. The distance between follower and leader vehicle at any time is given by

d = xl − xf − ll

(3.15)

where the xl and xf are the distance traveled by the leader and follower vehicle respectively, and ll is the leader car length. The inter-distance dynamics can be given by the double time-derivative of (3.15), i.e., a difference between the leader car acceleration and follower car acceleration. d¨ = x ¨l − x ¨f

(3.16)

The reference model describes a virtual or reference vehicle dynamics positioned at a distance dr (the reference distance) from the leader vehicle, as illustrated in Fig. 3.3. The reference model dynamics are given by d¨r = xˆ¨l − x ¨rf 35

(3.17)

Table 3.1: Safety constraints and comfort specifications Collision avoidance

dr > dc

Maximum velocity

x˙ rf ≤ Vmax

Maximum deceleration Maximum jerk

x ¨rf ≤ Bmax ...r | x f | ≤ Jmax

where xˆ ¨l is an estimation of leader vehicle acceleration and x ¨rf , ur (dr , d˙r ) is a nonlinear function of the reference inter-distance dr and its time-derivative d˙r . This function can be designed to meet safety and comfort requirements, and is related to the safe nominal constant inter-distance d0 , and the minimal constant inter-distance dc . The constraints imposed by safety and comfort can be set as bounds on the reference vehicle states and its time-derivatives. These constraints are summarized in Table 3.1, where Vmax , Bmax , Jmax , and dc are positive constants.

Figure 3.3: Inter-distance reference model As described earlier in this chapter, four zones are defined to characterize different safety levels. The reference model-based control approach is employed during Orange Zone, where the reference vehicles is positioned at a distance dr ≤ d0 from lead vehicle. Introducing the inter-distance error with respect to the constant nominal inter-distance magnitude d0 ,

d˜ , d0 − dr

(3.18)

The dynamics of this inter-distance will be d¨˜ = −d¨r ¨ d˜ = x ¨rf − xˆ¨l 36

(3.19)

with ˜ d) ˜˙ x ¨rf = ur (d,

(3.20)

˜ d) ˜˙ such that all the solutions of (3.19), The problem is to find a suitable x ¨rf = ur (d, for a given set of initial conditions (at the moment when the Orange Zone is reached), are consistent with the constraints indicated in Table 3.1. We choose control law ur as,

d˜ < 0

(3.21)

˜ d), ˜˙ d˜ ≥ 0 = u2 (d,

(3.22)

ur = u1 (.),

˜ ˜ = ∂u2 /∂ d| ˜˜ . where we assume C 1 continuity between these two structures, i.e.,∂u1 /∂ d| d=0 d=0 We choose u2 from [12] as ˜ d˜˙ ∀d˜ ≥ 0 u2 = −c|d|

(3.23)

which leads to the following equation. ¨ ˜ d˜˙ − xˆ¨l d˜ = −c|d|

(3.24)

It should be noted here that the goal of this control structure is not to regulate back the reference vehicle to d˜ = 0, but to stop the vehicle before it reaches the critical distance dc , while respecting the imposed comfort constraints. Consider for simplicity t = 0 the time at which the Orange Zone is reached. Let Ωorange 0 be defined as

˜ = 0} ˜ : x˙ r (0) ≤ Vmax , d(0) Ωorange = {x˙ rf (0), d(0) f 0

(3.25)

the set of all admissible initial state values at the crossing point d˜ = 0. Now the problem is to find a value for c and for the constant d0 [the design parameters of (3.24)], such that the restrictions of Table 3.1 are all satisfied for all solutions of (3.24) starting in Ωorange . 0 Integrating (3.24) with respect to time we have, c˜ 2 ˆ ˙ d˜ = − d(t) − x˙l (t) + β 2

(3.26)

with ˜ 2 + xˆ˙l (0) + d(0) ˜˙ β , (c/2)d(0) ˜ 2 + xˆ˙l (0) + x˙ r (0) − xˆ˙l (0) = (c/2)d(0) f ˜ 2. β = x˙ rf (0) + (c/2)d(0) 37

(3.27)

The control action is described by (3.23) and (3.26). ˜ = 0, then β = x˙ r (0). Also (3.26) can be written Note by definition of initial state d(0) f as written as c˜ 2 +β x˙ rf = − d(t) 2

(3.28)

From this expression we can find c such that for all β ≤ Vmax , the critical distance is not attained. Solving above expression we have, s ˜ = d(t)

2(β − x˙ rf (t)) c

(3.29)

p ¯ (β¯ , max∀t {β− the maximum penetration distance d˜max can be computed as d˜max = 2β/c; x˙ r (t)} = β). Making d˜max ≤ d0 − dc , (d0 − dc is the Orange Zone length), we have f

˜ ≤ d(t)

r

2β ≤ d0 − dc c

(3.30)

which imposes the first constraint C1 , on the possible values of c, i.e., C1 : c ≥

2β . (d0 − dc )2

(3.31)

C1 ensures that dr > dc ∀t, Ωorange . Fig. 3.4 displays the integral curves (3.28) for different 0 initial reference vehicle velocities. The constant c is computed to ensure that the vehicle ˜ = 0. Substitute (3.26) in inter-distance dr > dc for different initial velocities x˙ r (0) and d(0) f

(3.24) we get i h ˜ − c d˜2 + β − xˆ˙l (t) x ¨rf = −c|d| 2 c2 ˜3 ˜ = d − c(β − xˆ˙l (t))d. 2

(3.32) (3.33)

The maximum value of reference vehicle braking can be calculated from, ∂x ¨rf = 0. ∂ d˜ with xˆ˙l = 0, i.e., 3.2 =

3 2 ˜2 c d − cβ = 0, 2

this gives d˜∗ =

r

2β . 3c

38

(3.34)

30

Reference Car Speed (m/s)

25

20

15

10

5

0 0

10

20

30 40 Penetration Distance (m)

50

60

70

Figure 3.4: Speed versus penetration distance for different initial velocities (c = 0.0125, d0 = 75 m, and dc = 5 m). Substitute d˜∗ in (3.33) we have r r c2 2β 2β 2β − cβ , = 2 3c 3c 3c r r βc 2β 2β = − βc , 3 3c 3c r 2β 2βc maxxˆ˙l (t)=0,∀t {¨ xrf } = − . 3 3 x ¨rf |xˆ˙l (t)=0

(3.35)

Introducing deceleration constraint x ¨rf (t) ≥ −Bmax we have x ¨rf (t)

2β ≥− 3

r

2cβ ≥ −Bmax . 3

(3.36)

Fig. 3.5 shows solutions of (3.24) for different values of c. Notice that such values of c yield high values for deceleration and jerk magnitudes, while small values for c yield large stopping distance (refer to Fig. 3.4). This relation clearly demonstrate trade off between safety (that require large c) and comfort (that associate small c). Safety requirement in above expression i.e., (3.36) yield an upper bound for c, i.e.,

C2 : c ≤

2 27Bmax . 8β 3

(3.37)

The comfortable braking is understood here as the ability to decelerate with “low” jerk while respecting the stopping distance. For computing the maximum jerk values, differentiate (3.32) we have 39

Reference Car Speed (m/s) Acceleration (m/square s)

25 c=0.0125

Vmax 20

c=0.025

c=0.0375

15 10 5 0 0

10

20

30 Penetration Distance (m)

40

50

60

50

60

0 c=0.0375 −2

c=0.0125

c=0.025 −4 −6 −8 − Bmax −10 0

10

20

30

40

Penetration Distance (m) 15 Jmax Jerk (m/cubic s)

10 5 0 −5 c=0.0375

c=0.025

c=0.0125

−10 −15 0

− Jmax 10

20

30 Penetration Distance (m)

40

50

60

Figure 3.5: Speed, acceleration, and jerk versus penetration distance for the same initial ˜ = 0 m), and different c values. condition (x˙ r (0) = 20 m/s; d(0) f

 i d h ...r ˜ − c d(t) ˜ 2 − xˆ˙l + β , xf = −c|d| dt h 2 i i h ˜ 2 − xˆ˙l + β , ˜ −cd(t) ˜ d(t) ˜˙ − xˆ¨l − cd˜˙ − c d(t) = −c|d| 2

˙ substitute d˜ from (3.26) in above expression, we get  2  h c i2 c ˜3 ...r ˜ ˜ ˆ ˆ x f = −c|d| d − c(β − x˙l (t))d − x¨l (t) − c − d˜2 − xˆ˙l (t) + β , 2 2 solving above equation we have 3 ...r x f = − c3 d˜4 − c(β − xˆ˙l (t))2 + 2c2 d˜2 (β − xˆ˙l (t)) + cd˜xˆ¨l (t). 4

(3.38)

In above expression note that the first two terms are always negative, the third term is always positive, while the last term depends on the sign of the leader vehicle acceleration. We therefore separate the above expression in two different functions, that is ...r ˜ + cd˜xˆ¨l (t) x f = J(d)

(3.39) 40

˜ = − 3 c3 d˜4 − c(β − xˆ˙l (t))2 + 2c2 d˜2 (β − xˆ˙l (t)). Maximum value of jerk is now where J(d) 4 ˜ The extremes of J(d) ˜ can be calculated from believed to depend on extremes of J(d). ˜ ∂J(d) = 4c2 (β − xˆ˙l (t))d˜∗ − 3c3 (d˜∗ )3 = 0 ∂ d˜ The above equation has two solutions d˜∗ = 0;

d˜∗ =

s

4(β − xˆ˙l (t)) . 3c

Therefore we have two extremes to be taken in to account J(d˜∗ )|d˜∗ =0 = −c(β − xˆ˙l (t))2 ;

J(d˜∗ )|

d˜∗ =

q

4(β−xˆ˙l (t))2 3c

1 = c(β − xˆ˙l (t)). 3

(3.40)

A maximumq positive value of jerk is attained when lead car is accelerating with maximum ∗ ˜ value and d = (4(β − xˆ˙l ))/(3c). On the other hand, a maximum negative value is reached

when lead car is decelerating with maximum value and d˜∗ = 0. The maximum value of |J(d˜∗ )| ˜ 2 ; (β˜ = max∀t (β − xˆ˙l (t)) = β), i.e. estimated lead can be computed as max∀t |J(d˜∗ )| = c(β) vehicle speed is xˆ˙l = 0. Therefore maximum value of vehicle jerk computed from (3.39) is

... max| x rf (t)| = cβ 2 .

(3.41)

The above two extremes on jerk do not take in to account the lead vehicle acceleration or deceleration bounds. The follower vehicle jerk limits can also be computed as a function of estimated lead vehicle acceleration or deceleration. For this we assume that the estimated lead vehicle acceleration or deceleration is bounded as −γ ≤ xˆ¨l (t) ≤ α

∀t

(3.42)

The above expression can be written as −cd˜max γ ≤ cd˜xˆ¨l (t) ≤ cd˜max α

∀t

(3.43)

where γ and α are positive constants, with γ > α, (i.e., negative acceleration is always greater than positive one). The maximum jerk will always be bounded as ... | x rf (t)| ≤ max{cβ 2 , cd˜max γ},

(3.44)

or p ... | x rf (t)| ≤ max{cβ 2 , 2cβγ}. 41

(3.45)

Note that the maximum positive reference vehicle acceleration and jerk depend on the chosen design parameter c and the constant β(β = x˙ rf (0)), but also depend on the maximum leader vehicle acceleration α and deceleration γ.

... Now imposing the comfort constraint | x rf (t)| ≤ Jmax in (3.45), we have p ... | x rf (t)| ≤ max(cβ 2 , 2cβγ) ≤ Jmax

(3.46)

Assuming sufficiently large value for γ, the relation (3.46) yields another upper bound for c. That is C3 : c ≤

2 Jmax 2βγ 2

(3.47)

Thus now we have three bounds (two upper and one lower) for the value for c. The sufficient condition so that c exists is that C1 , C2 , and C3 holds is 2β ≤ c ≤ min (d0 − dc )2



2 2 27Bmax Jmax , 8β 3 2βγ 2



(3.48)

Since C1 and C2 are associated with safety specifications, they are seen as hard constraints, whereas C3 is associated with comfort and this is seen as a a soft constraint. In fact, the model does not have many degrees-of-freedom and, therefore, if the priority is given to safety, then the comfort specification cannot be arbitrarily chosen. In the Orange Zone priority is given to safety, then to constraints C1 and C2 . That is 2 2β 27Bmax ≤c≤ 2 (d0 − dc ) 8β 3

(3.49)

which together with β ≤ Vmax implies that the design parameter d0 should meet the following relation. 16β 4 27B 2 r max 2 16 Vmax + dc . d0 ≥ 27 Bmax

(d0 − dc )2 ≥

(3.50)

If d0 is selected by taking the smaller value compiling with (refeq: min nominal interdistance), i.e., d0 =

r

2 16 Vmax + dc , 27 Bmax

(3.51)

s

2 27Bmax . 3 8Vmax

(3.52)

then we can calculate c from C2 , as c=

42

Thus, design parameters could be obtained from (3.51) and (3.52) as function of the imposed bounds on dc , Vmax , and Bmax . If (3.50) and (3.52) holds, the reference interdistance model provides an inter-distance reference dr that avoids collision while respecting the maximum braking capacity. All this is true for all initial conditions that satisfy x˙ rf (0) + (c/2)d˜2 ≤ Vmax . 100 90 Bmax = 5 m/sq.s

80

Safe Distance (m)

70 Bmax = 7.5 m/sq.s 60 50 Bmax = 10 m/sq.s 40 30 20 10 0 0

5

10

15 20 Velocity (m/s)

25

30

35

Figure 3.6: Distance d0 as a function of the maximum velocity [see equation (3.51)], for dc = 5 m, and different braking capacities. Equation (3.50) gives an important relationship between the nominal inter-distance d0 and the maximum vehicle velocity Vmax for a given braking capacity Bmax . Fig. 3.6 illustrates this relation. On the other hand, taking c as it is calculated in (3.52) we can, under assumption (3.42), using (3.46) bound the reference vehicle jerk as

... | x rf (t)| ≤ max

(

2 27 Bmax , 8 Vmax

r

27 Bmax γ 4 Vmax

)

(3.53)

The vehicle safety is then guaranteed for all operation conditions, while the vehicle comfort level is maintained to each scenario, according to the acceleration/deceleration capabilities of leader vehicle.

43

3.4

Inner speed control loop - A salve control loop of cascade scheme

The inner feedback control loop forms a common slave controller in both the cascade control schemes. Automatic cruise control structure described in section 3.2 and reference modelbased control structure described in section 3.3 generates the acceleration command. This acceleration command is used by the inner speed control loop to ensure the specified value of speed is maintained while rejecting the influence of external disturbances, unmodeled dynamics, and sensor and actuator non-linearities. In conventional cruise control mode, only the inner speed control loop is used. Driver specified certain speed value and the feedback loop maintained the vehicle speed at the specified value while rejecting the effect of disturbances, unmodeled dynamics, and sensor and actuator non-linearities. A simple PID control structure is used to implement the inner speed control loop. A trajectory control method is used to regulate the speed. In this method, the actual speed trajectory is made to follow the reference speed trajectory. A reference speed trajectory is generated by adding counts proportional to the specified value of speed every sampling interval, whereas the actual speed trajectory is obtained by adding the encoder pulses count every sampling interval. The shaft encoder attached to the driving motor gives the speed value in terms of encoder pulses count. The difference in the counts, i.e., error, is given to PID control algorithm, which generates the control signal given as the input to the driving motor. The control signal is computed from

1 c(t) = kp ec (t) + τi

Z

t

ec (t) + τd

0

d ec (t) + c0 dt

(3.54)

where ec (t) is the instantaneous error in the count, kp is proportional gain, τi is the reset time, τd is the rate time, and c0 is the control signal at t = 0 s. The count error ec (t) is computed from ec (t) = Ctraj. (t) − Cact. (t)

(3.55)

where Ctraj. (t) is the trajectory count, and Cact. (t) is the actual shaft count at time t. The sampling interval for the inner loop is chosen to be much smaller than the sampling interval for automatic cruise control and reference model-based control structure. This ensured that the speed of the vehicle reach its specified value before the next speed command is received. Due to a lack of the availability of exact longitudinal speed dynamics, PID gains are trial-and-error adjusted to produce acceptable performance under all circumstances and for all initial conditions. More about this is given in the following chapter. 44

Chapter 4

Experimental Results This chapter describes the implemented longitudinal controllers and the obtained experimental results. The cascade control schemes described in chapter 3 were used to implement the controllers. The control algorithms have been integrated on the “CDBOT” vehicular robot. It was the objective of the project to integrate control algorithms on low cost platform. The vehicular robot is built at Embedded Real Time Systems (ERTS) Laboratory, KReSIT, IIT Bombay. We used low cost DC motors to drive the car. To avoid discontinuous motion at low speed values, a gear box of ratio 1:40.5 is used which results in 40.5 revolutions of the wheel for every revolution of the DC motor shaft. The shaft encoder of resolution 11 µm is attached to the DC motor shaft for measurement of the speed of a vehicular robot. Details on hardware configuration and software used for programming the CDBOT are given in appendix B. For the purpose of comparison, the ACC control scheme was implemented on relatively rich platform - Dexter-6C. This platform has the (two) DC motors with relatively high resolution shaft encoder attached to the shaft of the one of the two DC motors. It has a dedicated micro controller to implement the inner feedback control loop. It uses the Ackermen geometry for steering control of the vehicular robot. A dedicated controller is used for the steering control. By comparing the results for the two platforms, it is clear that the equal performances can be obtained even with the low cost platform if the advanced control theory is used efficiently.

4.1

Discussion of ACC results on Dexter-6C vehicular robot

This section includes the results of experiments performed on vehicular robot, Dexter-6C. The same ACC control law was implemented. The snap shot of the Dexter-6C is shown in Fig. 4.1. The experiments were performed in three phase. In the first phase, the vehicle platform was tested for its ability to maintain the desired velocity. This was a cruising state of the vehicle. Test car was tested for three different values of cruising speed of 100, 150, 45

Figure 4.1: Test car Dexter-6C along with lead vehicular robot. 200 mm/sec. Satisfactory results were obtained as shown in Fig. 4.2. The velocity of the vehicle was seen to be closer to the desired one. In the second phase, vehicular robot was checked for the vehicle following with constanttime gap (CTG) policy. A lead vehicle moving at a uniform velocity of 100 mm/sec was placed in-front of the ACC equipped vehicle. The host vehicle seen to be able to adapt to the lead vehicle velocity as shown in Fig. 4.3 and the time gap was also recorded as shown in Fig. 4.4. The initial velocity of the host vehicle was set to 120 mm/sec, time-gap was 1 sec and δ was set to 100 mm. From Fig. 4.4 it is seen that a time-gap of around 1.1 to 1.2 s was maintained, while the inter-distance was around 220 mm. In the third phase, same set up of phase 2 was used but with variable time-gap (VTG) spacing policy. Important expressions for VTG are given here, for details interested readers can be referred to a project stage 1 report. The desired inter-distance in variable time-gap rule is a non-linear function of follower velocity and is computed from

dsaf e (x˙ i , t) =

1 ρm (1 − vf /Vmax )

(4.1)

where ρm is a constant equal to 1/dc , and vmax is the maximal safe speed, usually about 120 kph. Proceeding in the same way as before (for CTG case), the control law is derived and is given below. x ¨f = −ρm (Vmax − x˙ f )(1 − x˙ f /Vmax )(kǫd − vr )

(4.2)

where vr is the relative velocity and ǫd is the inter-distance error between two vehicles. Next we describe experiment conducted to evaluate the VTG inter-distance rule. 46

Graph of Velocity and Time 300 Host Feedback Velocity Desired Host Velocity 250

Velocity(mm/s)

200

150

100

50

0 0

10

20

30

40

50 60 70 Time 10 units = 1 sec

80

90

100

110

Figure 4.2: Vehicle velocity in cruising state for three different desired velocities, namely, 100, 150, 200 mm/s. Initial velocity of vehicular robot was set to 120 mm/s while the leader velocity was 100 mm/s. The resulting inter-distance and the follower velocity are shown in Fig. 4.5, which shows the inter-distance with VTG spacing policy is smaller than that with CTG spacing policy. Since the value of ρm = 1/dc i.e., 0.01, the inter-distance at standstill is 100 mm. From the inter-distance, the critical or minimum distance value, and the follower velocity the time-gap can be computed and is shown in Fig. 4.6, which shows that a VTG spacing policy violates the minimum safety distance for most of the times. Fig. 4.7 shows the comparison of the inter-distance of CTG and VTG policies. The smaller distance of separation of VTG policy leads to the question of vehicle safety.

4.2

Implementation of cascade control schemes

The inner loop control is nontrivial problem. The difficulty is due to the complexity and lack availability of exact longitudinal motion dynamics of the car. The inner PID controller parameters are adjusted using trial-and-error method. For most of the speed values simple proportional controller with kp = 1.0 proved satisfactory. As an alternative, a combination of PI controller and P only controller for different error values is also tried. That is, PI controller is used when the count error ec (t) is less than 47

Host Feedback Velocity Desired Host Velocity Lead Distance

Lead Distance(mm)

Velocity(mm/s)

Graph of Velocity, Lead Distance and Time 400 380 360 340 320 300 280 260 240 220 200 180 160 140 120 100 80 60 40 20 0

0 10 20 30 40 50 60 70 80 90 100 110 120 130 140 150 160 170 180 190 200 210 Time(10units=1sec)

Figure 4.3: ACC results showing the follower car velocity with CTG spacing policy. With cruise velocity is vf = 120 mm/s and vl = 100 mm/s. |256|, whereas outside this range (i.e., when ec (t) ≥ |256|) P controller is used. The objective here was to avoid integral wind up problem due to accumulation of error whereas, the PI controller for smaller values of error was used to ensure zero steady-state error values. The controller parameter values used are given in Table 4.1. Table 4.1: PI controller: Inner feedback loop Sampling period

Ts : 5 ms

Proportional gain

kp : 1.0

Integral (reset) time

τi : 0.2

All control algorithms are implemented in discrete time. A position PID algorithm is used to implement inner feedback control loop, i.e.,

u(nTs ) = kp e(nTs ) +

n Ts X τd e(iTs ) + [e(nTs ) − e((n − 1)Ts )] + u(0) τi Ts i=0

48

(4.3)

Graph of TimeGap and Time 5 TimeGap Desired TimeGap

TimeGap(sec)

4

3

2

1

0 0 10 20 30 40 50 60 70 80 90 100 110 120 130 140 150 160 170 180 190 200 210 Time(10units=1sec)

Figure 4.4: Time gap of CTG policy: Set value for Tg is 1 s. For CTG policy time gap never crosses the set value of 1 s. where Ts is the sampling period. The inner control loop must have smaller sampling period than the outer loops. The sampling interval for inner loop is chosen to be 5 ms. The implementation of outer controllers is explained next.

4.2.1

Automatic cruise control - Implementation

As mentioned in chapter 3, ACC cascade control scheme is used in Green Zone i.e., when the inter-distance d(t) is larger than the nominal inter-distance d0 . Every element of the implemented ACC controller is briefly described next. 1. Safe inter-distance: A constant time policy is used.

dsaf e (t) = hx˙ f (t) + dc where h is the headway or time-gap, and dc is the critical inter-distance between two vehicles. The parameters of the implemented controller are summarized in Table 4.2. 2. Implemented ACC controller: The acceleration command is computed from

49

Host Feedback Velocity Desired Host Velocity Lead Distance

Lead Distance(mm)

Velocity(mm/s)

Graph of Velocity, Lead Distance and Time 400 380 360 340 320 300 280 260 240 220 200 180 160 140 120 100 80 60 40 20 0

0 10 20 30 40 50 60 70 80 90 100 110 120 130 140 150 160 170 180 190 200 Time(10units=1sec)

Figure 4.5: ACC results shoeing follower car velocity in vehicle following state (VTG spacing policy): Cruise velocity is vf = 100 mm/s and vl = 100 mm/s.

x ¨f (t) =

1 (vr (t) − kǫd (t)) h

where vr (t) is the relative velocity, and ǫd is the inter-distance error, both are defined below ˆ˙l (t) − x˙ f vr (t) , x ǫd (t) , dsaf e (t) − d(t) ˆ˙ l is used to compute the relative velocity term in An estimate of lead vehicle velocity x| ACC control law. An estimate of lead velocity is computed from   d(nTs ) − d((n − 1)Ts ) ¯ x˙ l (nTs ) = x˙ f (nTs ) + Ts ¯˙l (t) due to noise in the measurement of inter-distance d(t), To avoid fluctuations in x exponential moving average method is used to obtain smooth estimate of lead velocity estimate, i.e., ˆ˙l (nTs ) = αx ¯˙l (nTs ) + (1 − α)x ˆ˙l ((n − 1)Ts ) x 50

Graph of TimeGap and Time 5 TimeGap Desired TimeGap

TimeGap(sec)

4

3

2

1

0 0 10 20 30 40 50 60 70 80 90 100 110 120 130 140 150 160 170 180 190 200 Time(10units=1sec)

Figure 4.6: Time gap of VTG policy: Safety time-gap is around 1 s. Gain k in the ACC control law is the controller tuning parameter. All parameters of ACC controller are summarized in Table 4.2.

4.2.2

Reference model-based control - Implementation

The reference model-based control scheme is used in Orange Zone when inter-distance d is less than the constant nominal inter-distance d0 . The control action is described by (3.23) and (3.26). That is, in terms of dr

c ˆ˙l − β d˙r = (d0 − dr )2 + x 2 ur = c|d0 − dr |d˙r where β is calculated from c β = (d0 − dr (0))2 + x˙ rf (0) 2 and parameter c is calculated from c=

2β (d0 − dc )2 51

(4.4)

Lead Distance(mm)

Graph of Lead Distance and Time 400 380 360 340 320 300 280 260 240 220 200 180 160 140 120 100 80 60 40 20 0

VTG CTG

0 10 20 30 40 50 60 70 80 90 100 110 120 130 140 150 160 170 180 190 200 Time(10units=1sec)

Figure 4.7: Smaller lead distance of VTG policy than that in CTG policy leads to the question of vehicle safety. ¯ ¯ The initial condition dr (0) is calculated from dr (0) = d(0), where d(0) is the initial interdistance measurement. Various parameters of the implemented reference model-based controller are summarized in Table 4.3.

4.3

Discussion of results

After all routine tests for actuators and calibration of sensors, an inner control loop is tested for an arbitrary reference velocity as shown in Fig. 4.8. The reference velocity and the output velocity are in encoder counts (can be converted in to speed value by using encoder’s known resolution value). Thus based on Fig. 4.8, we can accept the assumption

x˙ f ≃ u

(4.5)

where u is the reference velocity, a velocity command from the master (outer) loop to the slave (inner) loop. During the experimental tests, the absolute inter-distance value is obtained from a range finder. The follower vehicle velocity is obtained from the high resolution shaft encoder attached to the driving DC motor. Leader vehicle velocity is estimated using the rate of 52

Table 4.2: ACC controller parameters used during experiments Sampling period

Ts : 0.1 s

Time-gap (or headway)

h: 1 s

Controller gain

k: 1

Alpha

α: 0.1

Nominal inter-distance

d0 : 150 mm

Critical inter-distance

dc : 100 mm

Green Zone

300 mm ≤ d(t) < 150 mm

Maximal velocity

vmax : 200 mm/s

Cruise velocity

vcruise : 130 mm/s

change inter-distance value and follower velocity. Leader and follower vehicle acceleration were calculated from derivation of velocity measurements without any filtering. Similarly the follower vehicle jerk was calculated from derivation of acceleration values, again without any filtering. 1. Case I: Automatic cruise control: Car-following: Fig. 4.9 shows the inter-distance, safe inter-distance, velocities, acceleration/deceleration, and jerk during cruise control and automatic cruise control scenario. Notice that the range of inter-distance sensor is only 300 mm. For inter-distance above its range the value displayed is 300 mm and cruise control structure is used to control the motion of the vehicle. Leader velocity is not estimated in this cruise control mode, but is displayed to 0 mm/s. Cruise velocity of follower vehicle is set at 130 mm/s. Notice that at t = 2.1 s (1700 units on x-axis), the follower finds leader in its range (i.e., within 300 mm). As can be seen initial conditions for reference safe distance and inter-distance are different. Nevertheless, the controller attracts the system states to the desired states. Thus, so different initial conditions

Table 4.3: Reference model-based controller parameters used during experiments Sampling period

Ts : 0.1 s

Nominal inter-distance

d0 : 150 mm

Critical inter-distance

dc : 100 mm

Orange Zone

100 ≤ d(t) < 150 mm

Red Zone

d(t)¡100 mm

Maximal velocity

vmax : 200 mm/s

Max. braking capacity

Bmax : 50 mm/s2

53

Gray: Shaft Count, Black: Trajectory Count

7

x 10 1.7209 1.7209

1.7209

1.7209 1.7209

1.7209

1.7209

1.7209 1.7209

1.7209 366

368

370

372

374

376

378

Figure 4.8: Inner loop test in the CDBOT vehicular robot for an arbitrary reference velocity. On y-axis: encoder pulse count; x-axis: time (800 units = 1 s). could produce undesirable high acceleration/deceleration. After t = 2.4 s (1900 units on x-axis) the inter-distance tracking error and relative velocity remains bounded and the time-gap of 1 s is respected. However, jerk is sometimes higher in value. This behavior could be due to the non perfect tracking control performed by the PD-controller. These aspects could be improved by using advanced control law. 2. Case II: Stop-and-go scenario: Fig. 4.10 shows inter-distance, velocities, acceleration or deceleration, and jerks during a stop-and-go scenario. During car-following (i.e., between 0.9 s and 2.6 s or 900 and 2050 units on x-axis), the inter-distance tracking behavior is acceptable. However, during the stop scenario (after 2.6 s or 2050 units), the inter-distance decreases abruptly. The follower vehicle responds with its maximal braking capacity, which ensures the inter-distance never falls below a critical value, i.e., 100 m. However, the jerk magnitude is reasonable and is lesser than jerks during ACC. In fact, this scenario is quite extreme, permitting to test the effectiveness of the implemented control schemes, especially the fact to avoid a collision. In go scenario (after 3.4 s or 2750 units), ACC controller is used for car-following, which respects the time-gap of 1 s. Again at t = 5 s or 4010 units on x-axis, stop scenario is performed.

54

Inter−distance in mm 300 Inter−distance (mm) 200

Desired Safe Distance (mm) AUTOMATIC CRUISE CONTROL

CRUISE CONTROL 100 0

500

1000

1500 2000 2500 Velocity profiles in mm/sec

3000

3500

4000

200 Follower Velocity (mm/s) 100 Leader Velocity (mm/s) 0 0

500

1000

1500 2000 2500 Acceleration in mm/sq. sec

3000

3500

4000

60 40 20 0 −20 0

500

1000

1500

3000

3500

4000

500

1000

1500

3000

3500

4000

2000 2500 Jerk in mm/cubic sec

100 0 −100 0

2000

2500

Figure 4.9: Inter-distance, velocities, acceleration, and jerk from experiment: A automatic cruise control scenario. On x-axis: 800 units = 1 s.

55

Figure 4.10: Inter-distance, velocities, acceleration, and jerk from experiment: A stop-and-go scenario. On x-axis: 800 units = 1 s.

56

Chapter 5

Conclusion This report presented a novel approach for automotive longitudinal motion control. The control strategy combines automatic cruise control (ACC) and reference model-based control to be used in different traffic scenarios. The former is charged to control during free flowing traffic scenario, while the latter is charged with control during stop-and-go scenario. ACC is often found to exceed the acceleration/deceleration and jerks limits during stop-and-go traffic. The reference model on the other side, has few parameters that can be set to minimize the acceleration or deceleration and jerks during stop-and-go traffic scenario. In this way a smooth car-following can be ensured during free flowing traffic with the help of ACC, and safety and comfort (e.g., the maximum deceleration and the maximum jerk) are respected during stop-and-go scenario with the help of reference model-based control approach. Due to the integrability property of the reference model, the reference model has been expressed in terms of the leader speed instead of its acceleration, which provides better results. The experiments are performed on CDBOT vehicular robot, which shows satisfactory performances.

57

Chapter 6

Future Improvements ACC controller uses the PD controller structure thus results in somewhat larger jerk values during car-following. This aspect could be improved using advanced controller such as controller based on adaptive control theory. Also the string (or platoon) stability problem is not analyzed here. These two aspects could be the object of the future works.

58

Appendix A

Polynomial Root Loci for zoh and Tustin Digitization Theorem 1: The Tustin polynomial root-locus always starts from z = 1 and ends at z = −1, all with multiplicity n. Proof: Consider the continuous-time transfer function

G(s) =

a0 sm + a1 sm−1 + ... + am−1 + am , (n ≥ m) b0 sn + b1 sn−1 + ... + bn−1 s + bn

(A.1)

Substitute the Tustin operator in above expression we get s=

2 z−1 Ts z + 1

(A.2)

we then have G(z) = Let T = G(z) =

   2(z−1) 2(z−1) m + ... + a m−1 Ts (z−1) + am Ts (z+1)  n   , 2(z−1) + ... + b + b b0 T2(z−1) n−1 n Ts (z+1) s (z+1)

a0



Ts 2 (z−1)m 1 z−1 1 a0 (z+1) m T m + ... + am−1 z+1 T + am n

z−1 1 1 b0 (z−1) (z+1)n T n + ... + bn−1 z+1 T + bn

,

(n ≥ m)

(n ≥ m)

a0 (z − 1)m [T (z + 1)]n−m + ... + am [T (z + 1)]n bn [T (z + 1)]n + ... + b0 (z − 1)n N (z) = D(z)

G(z) =

The denominator polynomial is, D(z) = bn [T (z + 1)]n + ... + b1 (z − 1)n−1 [T (z + 1)] + b0 (z − 1)n 59

(A.3)

Substituting T = 0, i.e., Ts = 0, we have D(z) = b0 (z − 1)n . The roots of D(z) are the starting points of the Tustin polynomial root locus, i.e., the starting points are z = 1, with multiplicity n 1 . Similarly, the end points are the roots of D(z) when T = ∞ i.e., the roots of bn (z + 1)n . Hence the ends points are z = -1, with multiplicity n. It is well known that the Tustin approximation will always yield a stable digital system for a stable continuous-time system. Theorem 2: The zoh polynomial root locus always starts from z = 1 and ends at z = 0, all with multiplicity n. proof: Consider the continuous-time transfer function

G(s) =

a0 sm + a1 sm−1 + ... + am−1 + am , (n ≥ m) b0 sn + b1 sn−1 + ... + bn−1 s + bn

For zoh, digitization is obtained as follows.  G(s) G(z) = (1 − z )Z s   c c1 cn 0 = (1 − z −1 )Z + + ... + s s + p1 s + pn   c0 cn c1 −1 = (1 − z ) + ... + + 1 − z −1 1 − z −1 e−p1 Ts 1 − z −1 e−pn Ts N (z) = Dn (z) −1



(A.4)

Denominator polynomial can be written as Dn (z) = (z − e−p1 Ts )(z − e−p2 Ts )....(z − e−pn Ts )

(A.5)

= z n + .... + (−1)n e−(p1 +p2 +...+pn)Ts

(A.6)

For simplicity let us consider n = 2. D2 (z) = z 2 − z(e−p1 Ts + e−p2 Ts ) + e−(p1 +p2 )Ts

(A.7)

Substituting Ts = 0, D2 (z) = z 2 − 2z + 1 = (z − 1)2 . Therefore starting points are z = 1, with multiplicity 2 (n for general case). Similarly, for Ts = ∞, D2 = z 2 , i.e., end points are z = 0, with multiplicity 2.

1

n indicates the number of roots and hence the number of branches of root locus on the z plane

60

Appendix B

CDBOT - A vehicular robot CDBOT is used to integrate the control algorithms. CDBOT is a toy car developed for experimental purposes for graduate and research students. It has on board controller ATmega 128 to perform various cruise control functionalities. It is an autonomous platform meaning that it has on board sensors and controllers, and does not depend on any information from outside its world for performing its activities. It supports wireless communication, but for this project work we used only its on board resources. The important elements of the vehicular robot are described below. 1. Micro controller ATmega 128: The ATmega 128 is a low power CMOS 8-bit micro controller based on the AVR enhanced RISC architecture. It can execute complex instructions in one clock cycle, thus achieving throughput of 1 MIPS (million instructions per second) per MHz. The ATmega provides following features: 128 bytes of In-System Programming (ISP) flash memory wit read-while-write capability, 4 k bytes of EEPROM, 4 k bytes of SRAM, 53 I/O lines (six 8-bit I/O ports and one 5-bit I/O port), 32 general purpose registers, 4 timers/counters (two 8-bit and two 16-bit), 2 USART, a byte oriented serial wire interface, an 8 channel, 10 bit ADC, an SPI serial port, IEEE std. 1149.1 compliant JTAG test interface. For more information on ATmega 128, the interested readers are referred to data sheet on ATmega 128 [19]. All control algorithms such as cruise control, line following, inter-distance measurement, etc. are implemented on this single micro controller using available resources. Details on this are given later in this chapter. 2. Motor controller: Back wheels are the driving wheels, connected to the single DC motor through gear box with gear ratio of 1:2. Motor controller VNH2SP30 is used to control the DC motor. VNH2SP30 is a 30 A controller with optical isolation between low power and high power electronic circuits [20]. 3. Shaft encoder: A rotary shaft encoder is attached to the DC motor for speed measure61

ment. The resolution of the shaft encoder is very high and is computed by performing a series of experiments. The resolution is found to be 11 µm. 4. Differential steering: A vehicular robot is equipped with the differential steering arrangement. It has two servo motors connected to the fore wheels. Servo motors must be controlled simultaneously to ensure the correct direction of motion of the car. 5. Line following: A robot is supposed to move on white line pasted on the floor. Thus white lines forms the guiding path for the car. For this purpose, car is equipped with seven white line sensors (pair of LED and photo-transistor), which detects the presence or absence of white line underneath. The objective is to keep the center of the car on white guiding line. White line is about 3 cm in width, thus can accommodate multiple white line sensors at a time. Steering control described later in this chapter explains more on this. 6. Range finder: Sharp’s GP2D120C is used to measure the inter-distance between two vehicles. It has a sensing range of up to 300 mm. This range finder makes the use of IR LED and CCD array for measurement of inter-distance. It uses the triangulation principle to measure the inter-distance. Due to the trigonometry involved the output of the sensor is non-linear. The distance measurement from its output reading is obtained from



 1 d(t) = 10 − 0.48 0.001240875(analog sensor output) + 0.005

(B.1)

where d(t) is the inter-distance in mm. Such sensors detect the movement of light intensity distribution on the CCD array for the distance measurement. However, such sensors have various error sources such as inclination of the object surface, optical power fluctuation of the light source and variation in light intensity distribution due to noise. Also the sensor has a blind range of 40 mm meaning that it cannot detect object distance nearer than 40 mm 7. LCD display and controller: The vehicular robot has 2x16 character LCD display along with HD44780U LCD controller [21]. The data lines of LCD are connected to the Port C of the micro controller ATmega 128. In addition three control signal namely, RS, R/W, and EN are connected to the Port A pins PA7, PA6, and PA5 respectively. Each of the control signals are explained next. (a) EN (Enable): The EN line is called “Enable” and it is connected to Port A’s 5th pin, i.e., PA5. When this signal is logic 1, the LCD controller is active, else it is disabled. To send data to the LCD, program should make sure that this line is 62

logic low (0) and then set the other two control lines as required and put data on the data bus. When this is done, make EN logic high (1) and wait for the minimum amount of time as specified in the LCD data sheet, and end by bringing it to logic low (0) again. This sequence must be strictly followed for proper operations on LCD. (b) RS (Register select bit): The RS line is the “Register Select” line and it is connected to Port A’s 6th pin, i.e., PA6. When RS is logic low (0), the data is treated as a command or special instruction by the LCD (such as clear screen, position cursor, etc.). When RS is logic high (1), the data being sent is treated as text data which should be displayed on the screen. (c) R/W (Read/write select bit): The R/W line is the “Read/Write” control line and it is connected to Port A’s 7th pin, i.e., PA7. When R/W is logic low (0), the information on the data bus is being written to the LCD. When R/W is logic high (1), the program is effectively querying (or reading from) the LCD. 8. Power ratings: Table B.1: Power ratings Supply voltage (max)

24 VDC

Current ratings

300 mA

Power consumption (max)

3.60 W at 12 VDC

9. Communication: (a) Wired RS232 (serial) communication. (b) Simplex infrared communication (From infrared remote to robot). (c) Wireless 2.4 GHz CDMA communication.

B.1

Hardware details

This section describes various resources of ATmega 128 used to implement the control schemes discussed in chapter 3. Various features of ATmega 128 micro controller are already discussed in the previous section. Next we list specific aspects for which the resources of ATmega 128 micro controller such as timers, I/O ports, ADC, USART, etc. are used.

63

Table B.2: Hardware details: I/O ports details PA0 PA1

Port A

Direction control bit for DC motor

PA2

Unused

PA3

Unused

PA4

White line sensors LEDs on/off bit

PA5

EN (enable) pin of LCD controller

PA6

R/W pin of LCD controller

PA7

RS (register select) pin of LCD controller

PB0/-SS PB1/SCK PB2/MOSI Port B

Port C

Port D

PB3/MISO PB4

Unused

PB5/OC1A

PWM signal for Servo motor 1 (left fore wheel)

PB6/OC1B

PWM signal for Servo motor 2 (right fore wheel)

PB7/OC1C

PWM signal for Servo motor 3 (if installed)

PC0−7

To 8-data bus of LCD

PD0/INT0

Unused

PD1/INT1

Unused

PD2/RXD1 PD3/TDX1 PD4−7

B.2

To the radio module if installed or can be used as SPI bus

Serial 1 (UART 1) RS 232 serial communication Start-up mode select bits b0 - b3

Software - A Brief overview

Programming of micro controller ATmega 128 is done in C language. ICCAVR platform from ImageCraft C Development Tools1 is used for writing software codes. ICCAVR has the Application Builder, that’s where its power lies. It makes the task simple by automatically generating code to initialize all hardware resources that one may need and in the user specified mode. Softwares codes are written for ATmega 128, with crystal frequency of 11.0592 MHz. Programs can be burnt on flash memory of ATmega 128 by using either parallel port programmer (for e.g. STK-200) or serial port programmer. If using parallel port programmer, then programming can be done by using ICCAVR tool called In System Programming, else for serial port based programmer AVR Studio must be used for programming. 1

http://www.imagecraft.com/. Last visited on July 11, 2007

64

Table B.3: Hardware details: I/O ports details (continues from Table B.2) PE0/RXD0 PE1/TXD0

Port E

Port F

Port G

UART 0 and In System Programming (ISP)

PE2/XCK0

Unused

PE3/OC0

Pulse width modulation signal for DC motor

PE4

Unused

PE5

Power Down signal for the radio (if installed)

PE6

Reset signal for the radio (if installed)

PE7/INT7

Interrupt to micro controller from the radio (if installed)

PF0/ADC0

Left L3 (left most) white line sensor

PF1/ADC1

Left L2 white line sensor

PF2/ADC2

Left L1 white line sensor

PF3/ADC3

Center C white line sensor

PF4/ADC4

Right R1 white line sensor

PF5/ADC5

Right R2 white line sensor

PF6/ADC6

Right R3 (right most) white line sensor

PF7/ADC7

Infrared range finder

PG0−5

To (five) bump switches

65

Table B.4: Hardware details: Timers details Timer 0

Timer 0 is used to generate PWM drive signal for a DC motor. The frequency of PWM signal is 1349.975 Hz. Pre-scalar used to scale down the timer clock input frequency is 32.

Timer 1

Timer 1 is used to generate PWM input signal for two servo motors used to steer the vehicular robot. The frequency of PWM input signal is 42.187 Hz. Pre-scalar used to generate this frequency signal is 256.

Timer 2

Timer 2 is used in auto reload mode, once activated continues to run until shut down. It overflows every 5 ms. Upon overflow inter-distance measurement is recorded and inner speed control is run. Thus the sampling time for interdistance measurement is determined by timer 2 and is equal to 5 ms. Similarly, the inner control loop is executed every 5 ms. Pre-scalar used for timer 2 is 256.

Timer 3

Timer 3 is in counter mode, counting the encoder pulses. Thus timer 3 count is incremented on every rising edge of the encoder pulse. The timer 3 count is then converted in to corresponding speed value in mm/s using the resolution value (11 µm) of the encoder.

Table B.5: Hardware details: ADC and UART details ADC

ATmega 128 micro controller has 10-bit 8 channel ADC. The 8 channels are connected to seven white line sensors and a inter-distance sensor (range finder). The conversion time for ADC is 75 µs. Pre-scalar value used to scale down the clock input frequency for ADC is 64. The ADC output is left adjusted so that only upper 8 bits can be read instead of reading a 10 bit word upon every conversion interrupt.

UART 1

UART 1 is configured for a byte oriented serial communication via RS232 cable. The baud rate of 9600 bps is chosen. For the communication between CPU and micro controller, CPU acts as a master, thus a receive interrupt is enabled. When received numeral 1 from CPU, CDBOT continuously transmit data to CPU until numeral 0 is received.

66

Bibliography [1] B. D. Greenshield, “A study of traffic capacity”, Proceedings Highway Research Board, 14, pp. 468, 1935. [2] M. J. Lighthill and G. B. Whitham, “On kinematic waves II. A theory of traffic flow on long crowded roads”, Proceedings of Royal Society Series A, 229, pp. 317-345, 1955. [3] H. Greenberg, “An analysis of traffic flow”, Operations Research, 7, pp. 79-85, 1958. [4] D. Gazis, R. Herman, and R. Potts, “Car following theory of steady-state traffic flow”, Operations Research, 7, pp. 499-505, 1959. [5] Leslie Edie, “Car following and steady-state theory for non-congested traffic”, Operations Research, pp. 66-76, 1960. [6] P. Ioannou and C. Chien, Autonomous intelligent cruise control, IEEE Transactions on Vehicular Technology, vol. 42, pp. 657-672, November 1993. [7] D. Swaroop and R. Huandra, Intelligent cruise control system design based on a traffic flow specification, Special Issues on Intelligent transportation Systems, Vehicle Systems Dynamics Journal, 1999. [8] P. Ioannou and Z. Xu, Throttle and brake control systems for automatic vehicle following, PATH, University of California, 1992. [9] A. Hauksdottir and R. Fenton, On the design of a vehicle longitudinal controller, IEEE Transactions on Vehicular Technology, vol. VT-34, No. 4, pp. 182-187, November 1985. [10] J. Wang and R. Rajamani, Adaptive cruise control system design and its impact on highway traffic flow, Proceedings of the American Control Conference, Anchorage, AK, pp. 3690-3695, May 8-10, 2002. [11] K. Santhanakrishnan and R. Rajamani, On spacing policies for highway vehicle automation, IEEE Transactions on Intelligent Transportation Systems, vol. 4, No. 4, pp. 198-204, December 2003.

67

[12] J. Martinez and C. Wit, “A safe longitudinal control for adaptive cruise control and stop-and-go scenarios”, IEEE Transactions on Control Systems Technology, vol. 15, No. 2, pp. 246-258, March 2007. [13] K. Ogata, Discrete-time control systems, 2nd edition, Pearson Education, Inc., 2002. [14] K. Astrom and B. Wittenmark, Computer controlled systems: Theory and design, Prentice-Hall International, Inc., 1984. [15] C. Wang, W. Wang and T. Lee, Sampling time effects of higher-order digitization’s and their applications in digital redesign, IEE Proceedings - Control Theory Applications, vol. 141 No. 2, pp. 83-92, March 1993. [16] N. Zambare and M. Soroush, Robustness improvement in multi-rate state estimation, Proceedings of American Control Conference, Arlington, VA, pp. 993-998, June 25-27, 2001. [17] J. Ragazzini and G. Franklin, Sampled Data Control Systems, McGraw Hill, 1958. [18] Robert E. Fenton, “A headway safety policy for automated highway operations”, IEEE Transactions on Vehicular Technology, vol. VT-28, No. 1, pp. 22-28, February 1979. [19] ATMEL Inc., 8-bit Micro controller ATmega 128: Datasheet, [On line Document], July 2007. Available at HTTP: http://www.atmel.com/atmel/acrobat/doc2467.pdf. Last visited on July 11, 2007. [20] STMicroelectronic, Automotive fully integrated motor driver: Datasheet, [On line Document], July 2007. Available at HTTP: http://www.pololu.com/products/pololu/0707/vnh2sp30.pdf. Last visited on July 11, 2007. [21] Hitachi, Dot matrix liquid crystal display controller/driver: Datasheet, [On line Document], July 2007. Available at HTTP: http://cba.mit.edu/∼neilg/fab/dist/hello/hello7/44780. pdf. Last visited on July 11, 2007.

68