2008:010 HIP BACHE LO R’S TH ESIS Vehicle dynamics - optimization of Electronic Stability Program for sports cars Johan Andersson B.Sc PROGRAMME IN AUTOMOTIVE ENGINEERING Luleå University of Technology Department of Applied Physics and Mechanical Engineering Division of Computer Aided Design Universitetstryckeriet, Luleå 2008:010 HIP • ISSN: 1404 - 5494 • ISRN: LTU - HIP - EX - - 08/010 - - SE Abstract This thesis was performed during the spring of 2008 at the Bosch test facility in Arjeplog. The thesis describes how to optimize the intervention of an ESP system for a sports car. The problem with ESP today is that it is very often defensively programmed and affects the feel when the car is driven. What to be researched in this thesis is if an optimization of the program can be done that allows greater body slip without affecting the vehicle dynamics and stability in a negative way. The thesis describes programming and simulation of ESP, the code for ABS, TCS and ESP has been written and then tested in the simulation environment where after the parameters and code have been changed in attempt to achieve a ESP that allows greater body slip without compromising the stability. The ESP has been created with several setups depending on wanted behaviour and intervention. The results from the simulations shows that greater body slip is possible without affecting stability, the feel when driving is more or less similar as without ESP and TCS. The measurements prove that the lap times are faster with ESP in race mode compared to only ABS and TCS. Worth to be mentioned is that a simulation is a reproduction of a real measurement, results and feel can differ from the reality when testing a vehicle. Keywords: ABS, ESP, TCS, vehicle dynamics, oversteer, understeer, lateral acceleration, yaw rate, steady-state cornering Sammanfattning Detta examensarbete genomfördes under våren 2008 i Arjeplog på Bosch testanläggning. Arbetet beskriver hur ingripande av ett antisladdsystem kan optimeras för en sportbil. Problemet med ESP idag är att det ofta är väldigt defensivt inställt och påverkar känslan i körningen av bilar. Det som undersöks är om en optimering av ESP kan göras som tillåter större driftvinklar utan att påverka stabiliteten. Examensarbetet behandlar programmering och simulering av antisladdsystem, kod för ABS, TCS och ESP har skrivits som sedan testats i simulatormiljö varefter parametrar och koden ändrats för att försöka uppnå ett stabilt system som tillåter ökade driftvinklar jämfört med standard. ESP har skapats med olika inställningar beroende på önskat uppträdande och ingrepp. Resultaten från simuleringen visar att ökade driftvinklar är möjliga utan att påverka fordonsstabiliteten, känslan i körningen är nästan densamma som utan ESP och TCS. Mätningarna visar att varvtiderna är lägre med ESP i raceläge jämfört med endast ABS och TCS, ESP i normalläge samt endast ABS. Dock skall nämnas att en simulering är en simulation av en verklig mätning, resultat och känsla kan vara annorlunda vid test på ett fordon. Nyckelord: ABS, ESP, TCS, fordonsdynamik, överstyrning, understyrning, sidoacceleration, girvinkelhastighet (yaw rate), stationär kurvtagning Preface This is the thesis and final course of my three years to Bachelor of Automotive Engineering at Luleå University of Technology. One of my biggest interests is cars, it has first of all been very interesting to perform the education in Luleå, but the best part has of course been to finalize all the theoretic knowledge in a thesis in a subject that I feel is very interesting. During my time in Arjeplog where I except from my thesis also have worked some for Arjeplog Test Management AB and Bosch with testing and presentations, I have learned a lot. It has been great to do my thesis at such an interesting company and facility, this has given me great knowledge in how the testing and developing of a new production car is performed. I would like to thank Lars Holmgren, executive manager of ATM for giving me this possibility to do my thesis at the Bosch facility. Thanks to Jean-Marc Jacquin who was my examiner at ATM and helped me whenever I had problems I could not solve by myself. Thanks to Ove Isaksson that has been my examiner at Luleå University of Technology and helped me with all kind of questions and thoughts throughout the thesis. As well thanks to Frederic Potdevin at ATM that helped me with some questions about simulation. David Holmlund, Prashant Rana and Håkan Jonsson at ATM, thanks for the help with the ABS code in the beginning. Many thanks to Erik Hellström at Linköping University for all the help with the simulation environment and the measurements. Last of all, thanks to my girlfriend, my family and friends for being there for me all the time. Umeå 08-06-03 Johan Andersson Notation Variables and parameters Symbol Description Unit ax Lateral acceleration [m/s2] az Longitudinal acceleration [m/s2] αf Side slip angle front tire [rad] αr Side slip angle rear tire [rad] β Body slip angle [rad] cαf Front tire cornering stiffness [kN/rad] cαr Rear tire cornering stiffness [kN/rad] δf Steering wheel angle [rad] fxf Front tire longitudinal force [N] fxr Rear tire longitudinal force [N] fzf Front tire lateral force [N] fzr Rear tire lateral force [N] g Gravity [9,82 m/s2] k1 Body slip regulator coefficient k2 Yaw rate regulator coefficient Kus Understeer coefficient [rad] L Wheelbase [m] Lf Distance from CoG to front axle [m] Lr Distance from CoG to rear axle [m] m Total vehicle weight [kg] mf Weight front axle [kg] mr Weight rear axle [kg] R Turning radius [m] v1-4 Wheel speed [rad/s] v Vehicle speed [km/h] vx Lateral vehicle speed [km/h] vz Vehicle longitudinal speed [km/h] Ψ Yaw rate [rad/s] Glossary ABS Antilock Braking System CoG Centre of Gravity ECU Electronic Control Unit ESP Electronic Stability Program NHTSA National Highway Traffic Safety Administration TCS Traction Control System VTI Statens väg - och transportforskningsinstitut Characteristic speed The speed when the steer angle required to negotiate a turn is equal to 2L/R, typical for an understeered vehicle. Critical speed The speed at which the steerangle required to negotiate any turn is zero, typical for an oversteered vehicle. Understeer The front of the car slides towards the outside of the bend. Oversteer Describes the situation when the rear of the vehicle starts to slide outwards, i.e. the car rotates faster round its vertical axis than required to take corners it is supposed to make. Table of Contents 1. Introduction ............................................................................................................................ 1 1.1 Background ....................................................................................................................... 1 1.2 Problem ............................................................................................................................. 1 1.3 Goal ................................................................................................................................... 2 1.4 Structure of thesis for the reader ....................................................................................... 2 2. Method ................................................................................................................................... 3 2.1 Basic motor-vehicle dynamics .......................................................................................... 3 2.1.1 2-Wheel bicycle model................................................................................................... 4 2.1.2 Friction circle ................................................................................................................. 7 2.2 The construction and function of the ESP system ............................................................. 8 2.3 Simulation software........................................................................................................... 9 2.4 Programming ..................................................................................................................... 9 2.4.1 Regulator shell............................................................................................................... 10 2.4.2 Measurement sampling ................................................................................................. 10 2.4.3 ABS ............................................................................................................................... 10 2.4.4 TCS................................................................................................................................ 11 2.4.5 ESP ................................................................................................................................ 11 2.5 Testing ............................................................................................................................. 12 2.6 Simulation ....................................................................................................................... 13 2.6.1 ABS ............................................................................................................................... 13 2.6.2 TCS................................................................................................................................ 14 2.6.3 ESP ................................................................................................................................ 14 3. Results .................................................................................................................................. 17 4. Conclusion ............................................................................................................................ 18 5. Discussion ............................................................................................................................ 19 References ................................................................................................................................ 20 Appendix A ................................................................................................................................ 1 ABS ............................................................................................................................................ 1 TCS............................................................................................................................................. 4 ESP ............................................................................................................................................. 6 Appendix B .............................................................................................................................. 10 Regulator shell.......................................................................................................................... 10 MATLAB measurement sampling ........................................................................................... 12 1. Introduction This chapter gives a brief history about the ESP system. The problem and the goal of the thesis is presented as well as the structure of the report. 1.1 Background The ESP was invented and set in to serial production by Robert Bosch GmbH in 1995. The system improves vehicle stability by intervening if the car gets into a skid and helps the driver to maintain the vehicle in the desired direction. Whether the car becomes over- or under steered during a corner, the ESP maintains the vehicle on its course by either braking one or more wheels to correct it. Today ESP more and more becomes standard equipment in many countries. In the USA all new production cars shall be equipped with ESP in 2012. According to a study made by the University of Cologne shows that 4.000 lives can be saved and 100.000 accidents avoided every year if all European cars have ESC. Data from Mercedes shows that vehicles standard equipped with ESP has resulted in a 29 percent reduction in single-vehicle crashes and 15 percent fewer crashes overall. Based on these figures, if ESP was standard equipment on cars in the United States as many as 5,000 lives and nearly $35 billion in economic losses annually could be save every year. The Swedish VTI study indicates that ESP was found to reduce accidents with personal injuries [1]. 1.2 Problem How can the Electronic Stability Program be optimized for a sports car? Some people that use their cars with ESP at for example track days believe that the system interferes and makes the driving less enjoyable and slower compared with the system of. They do want the extra safety that the ESP gives them, but they prefer the system to allow more slip and a softer more progressive intervene. More slip might generate a hard intervene of the system to prevent a total loss of control, that might be a problem that is tough to solve. This will be investigated throughout the thesis if it is possible to solve this. This setup of the ESP may not be recommended for public roads, only to track days and special occasions. One more problem is that the ESP system heats the brakes if the driver pushes to the limit of grip lap after lap on a track, the program can make the brake pads to almost melt because of the heat. This can lead to brake failure with metal against metal because the brake pads are worn out. In this case safety programs like ESP can become a danger. If you had a more forgiving ESP that allows some extra slip and a softer intervene, this would lead the driver to better learn to control the vehicle and to save the brake pads from wearing out prematurely. With the type of method for this thesis it is though not possible to measure or calculate the wear of the brake pads. 1 1.3 Goal The goal was to create an ESP code that could be implemented and tested in a simulation software. The main task was to define how to optimize ESP for a sports car. Depending on surface, the friction coefficient mue varies from about 1,0 on asphalt to about 0,1 on polished ice. Based from these conditions the ESP must have different setups for different friction conditions. In this thesis these subjects will be presented with programming and simulations for each surface, asphalt and snow that will be used in the simulations, ESP will be programmed with different settings depending on preferred characteristics: Low mue Ice Snow Race Off – zero slip, zero wheel spin – little slip, little wheel spin – moderate slip, moderate wheel spin – ESP does not intervene High mue Normal Sport Race Off – zero slip, zero wheel spin – little slip, little wheel spin – moderate slip, moderate wheel spin – ESP does not intervene 1.4 Structure of thesis for the reader Chapter 2 presents basic vehicle dynamics to explain the physics that affects a car. Physics is shown with the 2-wheel bicycle model and the friction circle. The ESP system is shown in detail as well as the programming, testing and simulation procedures of ABS, TCS and ESP are described in its context. Chapter 3 presents the results that have been achieved about the subject. Chapter 4 summarizes the conclusions that have been drawn upon the presented results of the thesis. Chapter 5 contains discussion about personal reflections of the work and possible future work of the study in this thesis. 2 2. Method Basic vehicle dynamics is presented in this chapter to explain the physics that affects a car. The ESP system is shown in detail as well as the testing, programming and simulation procedures of the system are described in its context. Vehicle handling concerns two basic issues, controlling the direction of motion of the vehicle and to stabilize the direction of the vehicle against external disturbances. For the understanding of vehicle dynamics it is critical to find out which forces that affects on the vehicle. When accelerating, braking and turning a vehicle is under influence of forces in longitudinal, transversal and vertical axes. A vehicle has six degrees of freedom, these three translation axes mentioned before and also rotation about these axes [2]. 2.1 Basic motor-vehicle dynamics Yaw is the rotation around the vertical axis of the vehicle. Pitch is the rotation around the transverse axis of the vehicle. Roll is the rotation of the vehicle around the longitudinal axis. Pitch and control are controlled by the suspension of the vehicle. Each wheel is affected by a vertical force, a motive force on the driven wheels and a braking force when braking on all wheels that is affecting in the opposite direction to the motive force. If the car starts to slide on any of the wheels, this means that the lateral, motive or braking force exceeds the force that that wheel can handle and then slides in transverse and or longitudinal axis. See figure 1 below. Figure 1. Forces affecting a vehicle. During steering the response of the car depends on its characteristics and speed, the car can be neutral, under or over-steered at the limit of friction. Understeer is when the vehicle wants to go straight ahead in a corner, oversteer is when the car turns more than wanted, or more than the angle of the curve that is taken, figure 2. 3 Figure 2. Oversteering and understeering. 2.1.1 2-Wheel bicycle model For the analysis of transient motion and steady state handling the model of the car is simplified as a bicycle model [2]. The axes are chosen according to axes in Racer simulation for the figure below. δf z αf Fzf x δ - αf αr Fxf v α r + δ - αf = L/R vz Lf β R vx L Fzr αr Lr Fxr Figure 3. Simplified bicycle model for transient motion analysis and steady state handling. To a great extent, the vehicle characteristics depend on the relationship between the front tires and their slip angles, αf and αr. The relationship for the steering angle 𝛿𝑓 , the turning radius 𝑅, the wheel base 𝐿, slip angles αf and αr is explained by (2.1). The equation explains that to make a given curve the required steer angle 𝛿𝑓 is a function not only affected by the turning radius 𝑅, also the slip angles αf and αr affects steering ability. 4 𝐿 𝛿𝑓 = 𝑅 + 𝛼𝑓 − 𝛼𝑟 (2.1) To calculate the slip angles αf and αr, the side forces on the wheels and the cornering stiffness must be known. For small steer angles, the cornering forces are given by 𝐹𝑥𝑓 = 𝐹𝑥𝑟 = 𝑚 𝑣 2 𝐿𝑓 𝑔 𝑅 𝐿 (2.2) 𝑚 𝑣 2 𝐿𝑟 (2.3) 𝑔 𝑅 𝐿 The total weight of the vehicle is 𝑚, 𝑔 is the acceleration due to gravity, 𝑣 is the velocity of the vehicle. See figure 3 above for the other parameters. The load on each tire is expressed by equation (2.4) and (2.5). 𝑚𝑓 = 𝑚𝑟 = 𝑚 𝑙𝑟 (2.4) 2𝐿 𝑚 𝑙𝑓 (2.5) 2𝐿 (2.2) and (2.3) can be rewritten as 𝑣2 𝐹𝑥𝑓 = 2𝑚𝑓 𝑔𝑅 (2.6) 𝑣2 𝐹𝑥𝑟 = 2𝑚𝑟 𝑔𝑅 (2.7) The slip angles and cornering forces of the tires may within a certain range considered to be linearly correlated with a constant tire cornering stiffness for front and rear tires, 𝐶𝛼𝑓 and 𝐶𝛼𝑟 . According to [3], the slip angles are given by 𝑚 𝑓 𝑣2 𝐹 𝛼𝑓 = 2𝐶𝑥𝑓 = 𝐶 𝛼𝑓 𝛼𝑓 𝑔𝑅 𝑚 𝑟 𝑣2 𝐹 𝛼𝑟 = 2𝐶𝑥𝑟 = 𝐶 𝛼𝑟 𝛼𝑟 𝑔𝑅 (2.8) (2.9) By substituting equation (2.8) and (2.9) into equation (2.1), the steer angle 𝛿𝑓 to take a given curve is equation (2.10). 𝐾𝑢𝑠 is the understeer coefficient and 𝑎𝑥 is the lateral acceleration. 𝐿 𝛿𝑓 = 𝑅 + 𝐾𝑢𝑠 𝑎𝑥 𝑔 (2.10) For the steady state handling behaviour of a vehicle equation (2.10) is fundamental. 𝐾𝑢𝑠 is a function of the tire cornering stiffness and the weight distribution on the front and rear axle as equation (2.11). 𝑚𝑓 𝐾𝑢𝑠 = 𝑐 𝛼𝑓 𝑚𝑟 −𝑐 𝛼𝑟 (2.11) The understeer coefficient depends on the relationship between the front and rear slip angles, depending on the value the steady state handling characteristics can be sorted into three types, 5 neutral steering, oversteer and understeer. The normal understeer coefficient value for a passenger car is in the range of 0,3 radians, that means that most of the cars are designed so that they understeer in the linear lateral acceleration range [3]. 𝐾𝑢𝑠 = 0 = Neutral steering 𝐾𝑢𝑠 < 0 = Oversteered car 𝐾𝑢𝑠 > 0 = Understeered car When the slip angles αf and αr for front and rear tires are equal the steer angle to take a given curve is shown by equation (2.12) This means that the vehicle is neutral steered, when grip is lost the vehicle slides as much front as rear. 𝐿 𝛿𝑓 = 𝑅 (2.12) If the vehicle understeers, if 𝐾𝑢𝑠 > 0, it means that the slip angle αf is greater than αr. Typical for an understeered vehicle is that the steering wheel angle must be increased when accelerating in a turn with a constant radius, the vehicle wants to go straight ahead in a corner. The term characteristic speed 𝑣𝑐𝑎𝑟 in equation (2.13) is used to describe the phenomenon of a understeered vehicle, it is the speed at which the required steering wheel angle to perform a curve is equal to 2L/R, according to [2]. 𝑣𝑐𝑎𝑟 = 𝑔𝐿 (2.13) 𝐾𝑢𝑠 If a vehicle is oversteered, if 𝐾𝑢𝑠 < 0, it means that the slip angle of the rear wheel αr is greater than the front wheel αf. This means that the rear end of the vehicle slides more than the front, which demands the driver to countersteer in order to keep the vehicle in the desired course. For an oversteered vehicle the term critical speed 𝑣𝑐𝑟𝑖𝑡 is used to describe the behaviour at which the steering wheel angle is zero to take any turn (2.14). 𝑣𝑐𝑟𝑖𝑡 = 𝑔𝐿 (2.14) −𝐾𝑢𝑠 The body slip of a vehicle can be calculated by equation (2.15), where 𝑣𝑥 is the lateral velocity and 𝑣𝑧 is the longitudinal velocity. Body slip is one of two key parameters required to create vehicle stability regulation. 𝑣 𝛽 = tan−1 𝑣𝑥 (2.15) 𝑧 Typical behaviour for ESP regulating a vehicle is a body slip close to zero. 𝛽𝑛𝑜𝑚 = 0 (2.16) The yaw rate 𝛹 𝑛𝑜𝑚 can be calculated with equation (2.17) if the vehicle speed, understeer coefficient, wheel base, gravity and steering wheel angle are known. 𝛹 𝑛𝑜𝑚 = 𝐿+𝐾 𝑣 𝑢𝑠 𝑣 2 /𝑔 𝛿𝑓 (2.17) 6 According to [2] and [4] the simplest method to create an ESP system is to proportionally regulate 𝛽 and 𝛹, equation (2.18). k1 is the body slip regulator coefficient, k2 is the yaw rate regulator coefficient, if k1 = 0 gives yaw control only, k2 = 0 gives only body slip control. ∆𝑀 = 𝑘1 𝛽 𝑛𝑜𝑚 − 𝛽 + 𝑘2 (𝛹 𝑛𝑜𝑚 − 𝛹) (2.18) If oversteer occurs, the ESP must create a straightening momentum by braking the outer forward wheel. If understeer occurs, the ESP brakes the inner real wheel creating a turning momentum. By this simplified bicycle model it is now possible to create a ESP based on the equations that where derived from the model. 2.1.2 Friction circle The friction circle shows the lateral and longitudinal acceleration of a vehicle, when no acceleration, braking or turning, there is no measurement, the pointer is in the cross section of the cross [5]. It is a good example to show of how the ESP can be optimized. The interesting part of the friction circle is the boundary area of the circle, i.e. on the limit of grip for the vehicle. If the tires of the car lose the grip at 10 m/s2 on asphalt, this limit area is where the optimization shall be done for the ESP system. Longitudinal acceleration is during braking and acceleration and lateral acceleration is during cornering. When the acceleration exceeds the limit of the grip ESP intervenes to stabilize the vehicle. The friction circle figure below shows a typical plot of a car accelerating, braking and cornering on a race track. Brake 10 m/s2 10 m/s2 10 m/s2 Acceleration 10 m/s2 Figure 4. Sampled measurement for friction circle 7 2.2 The construction and function of the ESP system The key functions for the ESP are to improve directional stability and keeping the vehicle on the track under all operating conditions. The ESP system is built into the brake system of the vehicle. The hydraulic modulator is connected to the brake master cylinder and functions as the central component of electronic brake systems. Control commands from the ECU are converted by the hydraulic modulator and the solenoid valves are opened and closed to control the pressures of the brakes in the vehicle. By braking individual wheels the stability of the vehicle maintains as desired and keeping the vehicle in the given direction. Also by accelerating the driven wheels, the ESP can regulate stability [3] [6]. As the ESP function is integrated with the ABS and TCS, the system uses the same components as those systems. The parts of the ESP are: Hydraulic modulator with ESP ECU and integrated hydraulic valves (1) Wheel brakes and wheel-speed sensors (2) Steering wheel angle sensor (3) Yaw sensor with acceleration sensor (4) Engine management ECU (5) Brake master cylinder (6) Figure 5. The components of the ESP. The input parameters of the ESP system are: Longitudinal velocity Lateral acceleration Yaw rate Brake pressure Throttle pedal position Steering wheel angle 8 The output parameters that control the directional stability are: Individual wheel braking Engine management, acceleration or reducing output power The ESP measures steering wheel angle, lateral acceleration and yaw rate. Based on these inputs it records and calculates the estimated vehicle direction and behaviour, suppose an intervention is needed, if the vehicle over or understeers for example one or more wheels are braked to correct the directional stability according to the float schematics in figure 6. ESP Measurement of steering wheel angle and wheel speed Measurement of lateral acceleration Recording of the intended vehicle direction Measurement of yaw rate Recording of the actual vehicle behaviour Calculation of the deviation of wanted and actual vehicle behaviour Decision if ESP intervention is needed to stabilize vehicle To counter oversteer brake force is applied at the outer front wheel To counter understeer, brake force is applied on inner rear wheel Figure 6. The function of the ESP 2.3 Simulation software For the simulations in this thesis the software Racer release 0.5.0 has been used. This version is free ware but not open source for commercial use, but the source code has possibilities to be modified and to implement your own code for non commercial purposes [7]. The simulation has realistic vehicle dynamics which was important to the decision of simulation tool. The 0.5.0 version of Racer has to be run in Linux, which was done for the thesis. 2.4 Programming The language that is used in Racer is C++ [8]. The programming has been created in different libraries for each program. In the development of active safety systems in cars as ABS, TCS and ESP, the first that was set into serial production was ABS in 1978 by Bosch [6]. For the thesis the first code to be implemented was ABS. Each code is independent, but ABS & TCS are integrated into the ESP. Therefore ABS and TCS had to be created first in order and then ESP. 9 2.4.1 Regulator shell The Racer simulation software has been used at the Linköping University and through them the foundation for the regulator was given, with the input and output signals that was required to implement code for ABS, TCS and ESP. Input signals PedalLevel BrakeLevel SteerAngle Time A_x YawRate // Accelerator pedal level [0, 1000] // Brake pedal level [0, 1000] // Steer angle [rad] // Time [ms] // Lateral acceleration [m/s2] // Yaw rate [rad/s] // The rotational speed of the wheels [rad/s] omega_1 // 1 - FrontLeft wheel omega_2 // 2 - FrontRight wheel omega_3 // 3 - RearLeft wheel omega_4 // 4 - RearRight wheel Output signals PedalLevel BrakeLevel BrakeFactors (0, 0, 0, 0) // Accelerator pedal level [0, 1000] // Brake pedal level [0, 1000] // Brake scaling (FrontLeft, FrontRight, RearLeft, RearRight) [%] 2.4.2 Measurement sampling All simulations have been logged with MATLAB, the measurements have been sampled and visualized with MATLAB m-files for the specific measurement. All this MATLAB data acquisition for the Racer Simulation was created by Erik Hellström, Linköping University. See appendix B for m-file. For all measurements, [km/h] was chosen as the unit for velocity instead of SI-units, as it is often used as the unit for speed when referring to vehicles, also [ ̊ ] was chosen as the unit for the steering wheel angle. 2.4.3 ABS For the code of ABS the important input signals are wheel speed and brake level. For output brake factors are the key parameters. By measuring the speed of the wheels and the velocity of the car, if any of the wheels go below a value of speed for the other wheels the brake factor for that wheel is reduced in order to avoid locking the wheel. In reality on a vehicle the wheel speed are measured wheel by wheel, if the derivative for the wheel speed is too steep the brake pressure is reduced [6]. 10 if FrontLeft < RearLeft BrakePressure FrontLeft = 0% else FrontLeft > RearLeft BrakePressure FrontLeft = 100% If FrontRight < RearRight BrakePressure FrontRight = 0% else FrontRight > RearRight BrakePressure FrontRight = 100% if RearLeft < FrontLeft BrakePressure RearLeft = 0% else RearLeft > FrontLeft BrakePressure RearLeft = 100% if RearRight < FrontRight BrakePressure RearRight = 0% else RearRight > FrontRight BrakePressure RearRight = 100% if Brake Figure 7. Float schematics ABS code. 2.4.4 TCS The code for the TCS only intervenes with engine management to regulate the driven wheels when accelerating. If brakes are used as well on TCS some noise occurs when the system is activated. For this part the goal was to see if a TCS could work with expected results even without brake intervention in the code. The TCS was programmed with several setups with 235% slip depending on conditions and preferred behaviour. if Throttle if RearLeft > FrontLeft X 1,02-1,35 Throttle = 20-50% if RearRight > FrontRight X 1,02-1,35 Throttle = 20-50% else RearLeft < FrontLeft X 1,02-1,35 Throttle = PedalLevel else RearRight < FrontRight X 1,02-1,35 Throttle = PedalLevel Figure 8. Float schematics TCS code. 2.4.5 ESP The code for ESP has understeer and oversteer control. The important input signals for ESP are A_x, YawRate and SteerAngle. Based on the input, if it goes above a certain threshold the output signals BrakeLevel and PedalLevel corrects the direction and stability of the vehicle. If the vehicle oversteers, by braking outside front wheel it will help the car to maintain on the preferred course. If understeer occurs, correction will be done by braking inside rear wheel. The code is created with several settings, ice and snow, race and off for low friction surfaces, normal, sport, race and off for high friction surfaces. 11 All parameters are set based on testing, for optimal performance, the parameters could have been chosen according to physical formulas in 2.1.1, but instead tested values for ESP worked better than calculated. The code more or less works mainly on yaw rate, because lateral velocity could not be used in the regulator, but it regulates based on maximal possible yaw rate and lateral acceleration. if Oversteer Brake FrontLeft if Understeer Brake RearRight if RightTurn ESP else no Intervention if Oversteer Brake FrontRight if Understeer Brake RearLeft if LeftTurn Figure 9. Float schematics ESP code. 2.5 Testing Under the development of new production cars several manoeuvres must be performed to analyse the performance and characteristics of the car. Among these tests the skid pad shows the characteristics of the car and understeer gradient, characteristic speed and or critical speed can be verified. The skid pad is a big circle with a constant radius from 50 meters to 500 meters. The lane change manoeuvre shows the vehicle response in a critical situation, where the driver has to avoid from obstacles in the lane. Even a well balanced car can easily go into a spin when performing the lane change, therefore it is a good test to make when calibrating the ESP for a car. The test was performed to as similar conditions as possible as the ISO 3888-2 double lane change according to [6] and [9] see figure below. Figure 10. Detailed figure of the double lane change. 12 The slalom test track is valuable to perform, in order to find out how the vehicle behaves on a pendulum effect when turning from left to right repeatedly. The cones for the slalom test are on a straight line with a distance of 15 m between every cone, a total of 5 cones. For ESP a handling track with curves of different radius and shape, s-curve combination clearly shows how the car and the system are behaving. For ABS and TCS split friction surfaces are used to develop the systems, this is great to optimize the stability with one side of the car on slippery surface and the other on a surface with higher friction. These split friction test were not possible to perform in the simulation software, all ABS and TCS tests were performed on either high friction or low friction surfaces. 2.6 Simulation The simulation has been done with a steering wheel, equipped with throttle and brake pedal to achieve such a realistic environment as possible. The car that has been used is the Porsche 997 Carrera S, which is a rear engine real wheel drive car with manual gearbox. Maximum steering angle is +/- 29 ̊, with the specific steering wheel gear ratio for the vehicle. The car has the same setup on the different surfaces, summer tires are used both on high and low friction. 2.6.1 ABS Braking tests from 100km/h to 0 km/h was performed at conditions similar to packed snow with a friction coefficient set to 0,4. This condition is more interesting to analyse compared to a surface as asphalt and a friction coefficient about 1,0, which would lead to smaller differences when comparing the results. The tests were done with and without ABS, the speed was 100 km/h +/- 4 km/h, in neutral, second and fourth gear and with full brake pressure. The brake distance is longer with ABS than without in neutral gear, the distance with ABS was 100 m compared to 85 m without ABS. The longitudinal acceleration goes up to 5 m/s2 without ABS and only just above 4,5 m/s2 with ABS. In second gear, the brake distance is longer without ABS, 88 m compared to only 73 m with ABS. Maximal retardation is 5,8 m/s2 without ABS and 5,7 m/s2 with ABS. In fourth gear, with ABS the brake distance is shorter, 73 m compared to 79 m without. With ABS, maximal retardation is 5,5 m/s2 compared to 5,2 m/s2 without ABS. See appendix A for graphs A1-6 for the table below. Brake test Speed [km/h] Max retardation [m/s2] Braking distance [m] Gear [R, N, 1-6] no ABS 101 -5 85 N no ABS no ABS 103 98 -5,8 -5,2 88 79 2 4 ABS 104 -4,5 100 N ABS 97 -5,7 73 2 4 73 ABS 97 -5,5 Table 2.1. Brake test 100-0 km/h with and without ABS in neutral, second and fourth gear. Brake balance is the same with and without ABS in order not to change any conditions of the testing. Without ABS the front wheels lock immediately when the brakes are applied, with ABS the wheels are braked and released repeatedly in order to not lock the wheels, until the vehicle has stopped or the brake pedal is released. 13 When braking the distance becomes shorter if a gear is engaged but it can also lead to instability on a rear wheel driven car due to the fact that the engine helps to reduce the speed of the rear wheels because of motor torque. 2.6.2 TCS For these 0-100 km/h tests, acceleration was done with a standing start. For the test without TCS, the throttle was regulated by the driver and the test with TCS full throttle was engaged and regulated by the TCS code. The conditions was the same as the braking measurements, the surface is packed snow and the friction coefficient 0,4. Measurements were performed on asphalt as well, but in that case TCS is more or less not necessary, there were small or non difference when comparing with and without TCS. The start is done in first gear on idle, accelerating as hard as possible, second gear is engaged just above 60 km/h. The acceleration from 0-100 km/h were performed in 11,33 seconds without TCS and 8,93 seconds with TCS with 10 % slip. In this case, TCS with a slip of 10 % gives optimal acceleration. For better stability, a slip between 5-10 % is recommended. For table 2.2, see appendix A for graphs A7-10. Acceleration 2 Longitudinal acceleration [m/s ] Time [s] no TCS 2 11,33 TCS 5% slip 3 9,98 3,2 8,93 TCS 10% slip TCS 15% slip 3,1 9,05 Table 2.2. Acceleration test 0-100 km/h with TCS 1,05, TCS 1,1, TCS 1,15 and without TCS. 2.6.3 ESP The key parameters for ESP are yaw rate and lateral acceleration, if the values of yaw rate and or lateral acceleration are too high, makes the vehicle unstable. By setting the maximum limits of the lateral acceleration and the yaw rate the stability of the car is maintained with ESP, without ESP the car goes into a skid or a spin with counter steering and losing control as result, with ESP the car is easy to maintain on the preferred course with some slip. To find out the characteristics during steady state cornering of a vehicle, the skid pad is a great test to perform. On the limit of friction, this test shows if the car is under or oversteered, how it behaves during load transfer when lifting of throttle or when braking. The skid pad with a constant radius of 200 m has a friction coefficient of 0,4 for the tests below. One lap is performed for each measurement, one with ABS and TCS, one with ESP in race mode. The lap is done with standing start and braking in the end, with attempt to keep as high speed as possible during the lap. For both test runs the TCS was programmed with a slip of 25 %, more slip on the driven wheels results in greater body slip angles, but also the counter momentum of the ESP during under- or oversteer must be bigger due to bigger side slip on the driven wheels. 14 With ABS and TCS, the car goes into a skid after three quarters of the circle is performed, when the driver countersteers, the car goes into a spin and the control is lost. With ESP, the driver does not have to steer as much due to greater stability as with ABS and TCS only, also the speed is higher. For table 2.3, graphs for each test are figures A11 and A12 in appendix A. Skid pad ABS and TCS 2 Max lateral acceleration [m/s ] ESP 1,5 1,26 -0,75 0,85 Max yaw rate [rad/s] 0,92 0,16 Min yaw rate [rad/s] -1,9 -0,35 Max steering wheel angle [ ̊ ] 29 8 Min steering wheel angle [ ̊ ] -29 -8 Max body slip [ ̊ ] 89 25 Min body slip [ ̊ ] -88 0 Max speed [km/h] 124 129 2 Min lateral acceleration [m/s ] Min speed [km/h] -58 106 Table 2.3. Skid pad with ABS and TCS 1,25, skid pad with ESP in race mode. The lane change is performed according to the ISO 3888-2 standard procedure, but the entry speed is below 90 km/h in third gear. The surface friction for the test was set to 0,4. Without ESP the car spins, with ESP in race mode the car maintains stable and avoids the obstacle and is easy to handle. TCS was set with 5 % slip for straight ahead stability, during steering in the lane change test the throttle pedal is disengaged according to test procedure ISO 3888-2. Table 2.4 show the results of the measurements of the lane change in appendix A, figure A1314. Lane change ABS and TCS 2 Max lateral acceleration [m/s ] ESP 5 2,02 -6 -1,43 Max yaw rate [rad/s] 0,98 1,01 Min yaw rate [rad/s] -1,42 -0,66 Max steering wheel angle [ ̊ ] 29 28 Min steering wheel angle [ ̊ ] -29 -14 Max body slip [ ̊ ] 61 14 Min body slip [ ̊ ] -26 -12 88 85 2 Min lateral acceleration [m/s ] Max speed [km/h] Min speed [km/h] -10 0 Table 2.4. Lane change with ABS and TCS 1,05, lane change with ESP in race mode. For the slalom test the entry speed is just below 90 km/h in third gear, the surface on the slalom track has a friction coefficient of 0,4. Without ESP only two cones were possible to make, the first cone is no problem but when turning it creates a pendulum affect that makes the car spin when coming to the second cone. With ESP all five cones were passed easily. 15 For both runs throttle is engaged through the cones, otherwise speed would have been lost, which would result in, that the limit of the friction would not be passed other than for the first or the second cone, then ESP would not be engaged to regulate the stability of the vehicle and the outcome of the test would be different. Table 2.5 show the results of the measurements of the slalom in appendix A, figure A15-16. Slalom ABS and TCS 2 Max lateral acceleration [m/s ] ESP 0,83 1,15 -1,01 -1,32 Max yaw rate [rad/s] 0,65 1,02 Min yaw rate [rad/s] -1,45 -0,98 2 Min lateral acceleration [m/s ] Max steering wheel angle [ ̊ ] 29 29 Min steering wheel angle [ ̊ ] -27 -29 Max body slip [ ̊ ] 88 14 Min body slip [ ̊ ] -89 -20 86 89 Max speed [km/h] Min speed [km/h] -12 0 Table 2.5. Slalom with ABS and TCS 1,05, slalom with ESP in race mode. The race track has a high friction surface, the friction coefficient is 1,0. The track has big altitude variations and a rather uneven and bumpy surface which is perfect for dynamic tests. As seen below in table 2.6, from the results of the measurements in figure A17-18 in appendix A, there are no bigger differences with only ABS and TCS compared to with ESP, here the ESP is setup in race mode. But the ESP in this setup still makes the car more forgiving, which allows the driver to push harder without losing control. Driving without the ESP feels less stable and demands faster reactions from the driver when grip is suddenly lost. Especially in tight low speed corners and s-curve sections it is more confident driving with ESP. Race track ABS and TCS 2 Max lateral acceleration [m/s ] ESP 7,6 7,5 -11,6 -6,6 Max yaw rate [rad/s] 1,4 1,64 Min yaw rate [rad/s] -1,31 -1,36 Max steering wheel angle [ ̊ ] 27 26 Min steering wheel angle [ ̊ ] 2 Min lateral acceleration [m/s ] -29 -29 Max body slip [ ̊ ] 14 18 Min body slip [ ̊ ] -25 -18 Max speed [km/h] 190 190 Min speed [km/h] 0 0 Time [s] 1,30,012 1,28,480 Table 2.6. Race track with ABS and TCS 1,25, race track with ESP in race mode. 16 3. Results Chapter 3 presents the results that have been achieved about the subject. The goal for this thesis was to create an optimized ESP for a sports car, which have been done. The results from the simulations show that the code for ABS, TCS and ESP works well. The ABS works with equal or better brake distances compared without ABS, with increased stability and manoeuvrability. During acceleration tests the differences with and without TCS are almost 2,5 seconds from 0-100 km/h to the benefit of TCS. A better driver might decrease that difference but it is hard to feel have much throttle that can be given by the pedal for optimal acceleration. All tests with ESP indicate that the subject for this thesis is possible, more slip and later intervention is possible without compromising stability and comfort. The skid pad test can be done without ESP, but if the car skids and the driver countersteers it is easy to lose stability and control. With ESP the driver can steer and countersteer more than necessary without losing control. On the lane change and slalom manoeuvres the importance of the ESP is clearly shown, without ESP it is not possible to make the track in the same speed as with ESP. On low mue friction surfaces it is evident that ESP is important for vehicle stability. On high mue friction it is not as clear cause is it harder to pass the limit, but once the limit of grip is exceeded the ESP will be needed for most drivers in order not to lose control of the vehicle. On the race track the lap time is 1,5 seconds faster with ESP than without. Even though the race mode setting for ESP on high friction is very permitting it still helps the driver just enough without feeling intervening or unstable, although on this setting the driver must countersteer some to maintain on the preferred course, but will not spin. 17 4. Conclusion The conclusions that have been drawn upon the presented results of the thesis is summarized in this chapter. The simulation of the ESP has worked well when the code for each system and library behaved as preferred. In most cases the Racer Simulation has been realistic and useful for the conditions of the performed tests. Although some measurements indicate that the values for longitudinal and especially lateral acceleration are below the values that should be reachable in reality for the specific surfaces and frictions. This must depend on vehicle and or tire parameters in Racer simulation. Due to this phenomenon yaw rate was more important to focus on when creating ESP code. For all the measurements it is possible to have a higher speed with ESP than without on low friction surfaces. On high mue friction the speed is more or less the same, here it is much easier for the driver to control the car up to the limit of friction. It is much harder to pass the limit of friction on high mue surfaces and therefore the differences are smaller compared to low mue conditions. But once the limit of friction is passed, whether the surface has low or high friction, the function of the ESP is clearly shown, it works as required. The ESP works exceptional with body slip up to 25 degrees or more without compromising stability, when it activates and regulates the intervention is smooth and comfortable. Still, all tests were performed with simulations, if the tests could have been performed on a vehicle the test results could have been different, this was though not possible due to confidentiality agreement issues. 18 5. Discussion Chapter 5 contains discussion about personal reflections of the work and possible future work of the study in this thesis. During simulation and programming the biggest problem was to achieve an ABS that was stable. In the beginning there were problems with bugs, for example one front wheel sometimes locked completely without reason, this could change from side to side as well which made it hard to understand why it did behave like this. Also the engine creates braking torque when throttle pedal is released, which makes the driven wheels brake harder than the undriven, which results in an unstable vehicle. Especially on a rear wheel drive car this creates instability. One problem was that if lateral velocity was used in the regulator shell, the wheel speed for each wheel did not work correctly, which lead to the fact that lateral velocity of the vehicle in the simulation could not be used. Lateral velocity is achieved by integrating the signal of lateral acceleration. It could strangely though be sampled and measured in the log-file for MATLAB. Due to this, code to regulate body slip was created empirically. For the simulation it would have been preferable if the Force Feedback for the steering wheel would have worked, unfortunately it did not. This would have done the simulation more realistic with more feedback to the driver. The steering wheel has a support for 900 (+/-450) degrees of rotation but that does not include Linux, so all measurement were done with 200 (+/-100) degrees of rotation of the steering wheel as it is by default in Linux. Body slip only measures up to +/- 90 degrees in MATLAB, the calculation according to the equation [2.1] does not result in higher values even if the car spins 360 degrees. The ABS regulation code would not work as well in the reality on a car, because reducing brake pressure to zero would create a slow, unsafe and inefficient brake system. This would have been changed, if more time could have been spent on the ABS code. Further work could be to optimize the code and research the possibilities of implementing P1regulation, or PI2-regulation even PID3-regulation [10]. Last of all, I have learned a lot about how ABS, TCS and ESP work and how they can be optimized for the specific behaviour that is required. 1 proportional. proportional and integrating. 3 proportional, integrating and derivating. 2 19 References [1] ChooseESC, http://www.chooseesc.eu/en/facts_about_electronic_stability_control/ general_ information_about_esc/ 080516 [2] WONG, J. Y., Theory of Ground Vehicles. John Wiley & Sons Ltd, 3rd Edition, 2001. [3] Robert Bosch GmbH, Automotive Handbook. Bentley Publishers, 6th Edition, 2004. [4] Linköping University TSFS02, http://www.fs.isy.liu.se/~jaasl/Fordonsdynamik/F8.pdf 080521 [5] Lopez, C, Going Faster! Mastering the Art of Race Driving. Bentley Publishers, 2001. [6] Robert Bosch GmbH, Safety, Comfort and Convenience Systems. John Wiley & Sons Ltd, 2006. [7] www.racer.nl 080516 [8] C++ Reference, http://www.cppreference.com/ 080516 [9]NHTSA, http://www-nrd.nhtsa.dot.gov/pdf/nrd-01/esv/esv19/05-0221-O.pdf 080521 [10] Thomas, B, Modern Reglerteknik. Liber AB, 3rd Edition, 2003. 20 Appendix A ABS Brake test with and without ABS from 100-0 km/h. The velocity of the car is the blue line, the speed of the rear wheels are the red lines and the speed of the front wheels are the purple lines. As seen on the graphs the front wheels lock immediately without ABS when braking. Longitudinal acceleration Position 550 500 Velocity 2 Path start Plot start End 120 1 450 100 0 80 Z [m] 350 300 250 -1 60 Velocity [km/h] Longitudinal acceleration [m/s²] 400 -2 40 -3 20 -4 200 100 -50 0 -5 150 0 X [m] 50 -6 300 350 400 Distance [m] 450 -20 300 350 400 Distance [m] 450 Figure A.1. Brake test 100-0 km/h without ABS in neutral gear. Position 400 Longitudinal acceleration Velocity 6 Path start Plot start End 350 4 300 2 120 100 250 200 Velocity [km/h] Longitudinal acceleration [m/s²] Z [m] 80 0 60 40 -2 20 150 100 -50 -4 0 X [m] 50 -6 150 0 200 250 Distance [m] 300 -20 150 200 250 Distance [m] 300 Figure A.2. Brake test 100-0 km/h without ABS in second gear. 1 Position 800 Longitudinal acceleration Path start Plot start End 700 Velocity 6 100 4 80 2 60 Z [m] 500 400 Velocity [km/h] Longitudinal acceleration [m/s²] 600 0 40 -2 20 -4 0 300 200 100 -50 0 X [m] -6 500 50 520 540 560 Distance [m] 580 -20 500 600 520 540 560 Distance [m] 580 600 Figure A.3. Brake test 100-0 km/h without ABS in fourth gear. Position 500 Longitudinal acceleration Path start Plot start End 450 Velocity 2 120 1 100 0 80 -1 60 Z [m] 350 300 250 Velocity [km/h] Longitudinal acceleration [m/s²] 400 -2 40 -3 20 -4 0 200 150 100 -50 0 X [m] 50 -5 200 250 300 Distance [m] 350 -20 200 250 300 Distance [m] 350 Figure A.4. Brake test 100-0 km/h with ABS in neutral gear. 2 Position 550 Longitudinal acceleration Path start Plot start End 500 Velocity 2 120 1 100 450 0 80 Z [m] 350 300 250 -1 Velocity [km/h] Longitudinal acceleration [m/s²] 400 -2 60 40 -3 20 -4 200 100 -50 0 -5 150 0 X [m] -6 300 50 350 400 450 Distance [m] -20 300 500 350 400 450 Distance [m] 500 Figure A.5. Brake test 100-0 km/h with ABS in second gear. Position 600 Longitudinal acceleration Path start Plot start End 550 Velocity 1 120 0 100 -1 80 -2 60 Longitudinal acceleration [m/s²] 450 Z [m] 400 350 300 250 Velocity [km/h] 500 -3 40 -4 20 -5 0 200 150 100 -50 0 X [m] 50 -6 300 350 400 450 Distance [m] 500 -20 300 350 400 450 Distance [m] 500 Figure A.6. Brake test 100-0 km/h with ABS in fourth gear. 3 TCS Acceleration 0-100 km/h with and without TCS. The velocity of the car is the blue line, the speed of the rear wheels are the red lines and the speed of the front wheels are the purple lines. As seen in figure A.7, that under these conditions it is hard to regulate the throttle for the driver for an optimal acceleration without TCS, the speed of the rear wheels are much higher than for the car. Position Velocity 450 120 Path start Plot start End 400 100 Velocity [km/h] 350 Z [m] 300 250 200 80 60 40 20 150 0 100 -100 -80 -60 -40 -20 -20 0 0 50 100 150 Distance [m] X [m] Longitudinal acceleration 250 300 Time / Velocity 3.5 120 3 Longitudinal acceleration [m/s²] 200 100 Velocity [km/h] 2.5 2 1.5 1 80 60 40 0.5 20 0 -0.5 0 50 100 150 Distance [m] 200 250 0 300 15 25 25 Time [s] 30 Figure A.7. Acceleration test 0-100 km/h without TCS. Velocity Position 450 400 100 Velocity [km/h] 350 Z [m] 120 Path start Plot start End 300 250 200 60 40 20 150 100 -80 80 -70 -60 -50 X [m] -40 -30 0 -20 0 50 150 Time / Velocity 120 3 100 Velocity [km/h] Longitudinal acceleration [m/s²] Longitudinal acceleration 4 2 1 0 -1 100 Distance [m] 80 60 40 20 0 50 100 150 Distance [m] 200 250 300 0 14 16 18 Time [s] 20 22 24 Figure A.8. Acceleration test 0-100 km/h with TCS 5 % slip. 4 Velocity Position 450 400 100 Velocity [km/h] 350 Z [m] 120 Path start Plot start End 300 250 200 80 60 40 20 150 100 -80 -70 -60 -50 X [m] -40 -30 0 -20 0 50 100 120 3 100 2 1 0 -1 200 250 300 Time / Velocity 4 Velocity [km/h] Longitudinal acceleration [m/s²] Longitudinal acceleration 150 Distance [m] 80 60 40 20 0 50 100 150 Distance [m] 200 250 0 300 15 20 Time [s] 25 30 Figure A.9. Acceleration test 0-100 km/h with TCS 10 % slip. Position Velocity 450 120 Path start Plot start End 400 100 Velocity [km/h] Z [m] 350 300 250 80 60 40 20 200 150 -80 -70 -60 -50 X [m] -40 -30 0 -20 0 20 40 Longitudinal acceleration 120 120 100 3 Velocity [km/h] Longitudinal acceleration [m/s²] 100 Time / Velocity 4 2 1 0 -1 60 80 Distance [m] 80 60 40 20 0 20 40 60 80 Distance [m] 100 120 0 13 14 15 16 17 18 Time [s] 19 20 21 22 Figure A.10. Acceleration test 0-100 km/h with TCS 15 % slip. 5 ESP Skid pad with and without ESP. Position Velocity 200 0 -100 50 0 -50 -200 -300 -200 -100 0 X [m] 100 -100 200 0 500 1000 Distance [m] 10 0 -10 -20 -30 1500 0 Lateral acceleration 2 0.5 1.5 0 -0.5 -1 -1.5 500 1000 Distance [m] 1500 Body slip 50 1 0.5 0 0 -50 -0.5 -1 1500 500 1000 Distance [m] 100 Body slip [ ] Lateral acceleration [m/s²] Yaw rate [rad/s] Yaw rate 1 0 20 Steering wheel angle [ ] Path start Plot start End Velocity [km/h] Z [m] 30 100 100 -2 Steering wheel angle 150 0 500 1000 Distance [m] 1500 -100 0 500 1000 Distance [m] 1500 Figure A.11. Skid pad with ABS and TCS. Position Velocity Steering wheel angle 150 10 0 Velocity [km/h] Z [m] 100 Path start Plot start End 100 Steering wheel angle [ ] 200 -100 50 0 5 0 -5 -200 -200 -100 0 X [m] 100 -50 200 0 Yaw rate 0 -0.1 -0.2 -0.3 500 1000 Distance [m] 1500 500 1000 Distance [m] 1500 30 25 1 20 Body slip [ ] Lateral acceleration [m/s²] 0.1 0 0 Body slip 1.5 0.2 Yaw rate [rad/s] -10 1500 Lateral acceleration 0.3 -0.4 500 1000 Distance [m] 0.5 0 15 10 5 -0.5 -1 0 0 500 1000 Distance [m] 1500 -5 0 500 1000 Distance [m] 1500 Figure A.12. Skid pad with ESP in race mode. 6 Lane change with and without ESP. Position Velocity Path start Plot start End 350 30 80 20 60 Velocity [km/h] Z [m] 300 250 200 40 20 150 0 100 -100 -80 -60 -40 X [m] -20 -20 0 0 Yaw rate 0 -10 -20 -30 300 0 100 200 Distance [m] 0 -0.5 -1 100 200 Distance [m] 80 4 60 2 0 -2 -4 300 40 20 0 -20 -6 -8 300 Body slip 6 Body slip [ ] Lateral acceleration [m/s²] Yaw rate [rad/s] 0.5 0 100 200 Distance [m] 10 Lateral acceleration 1 -1.5 Steering wheel angle 100 Steering wheel angle [ ] 400 0 100 200 Distance [m] -40 300 0 100 200 Distance [m] 300 Figure A.13. Lane change with ABS and TCS. Position Velocity 400 300 250 200 30 80 Velocity [km/h] Z [m] 350 60 40 20 0 150 100 -100 -80 -60 -40 X [m] -20 -20 0 0 Yaw rate 200 300 Distance [m] 0 -0.5 100 0 -10 0 100 200 300 Distance [m] 400 400 Body slip 10 2 1 0 -1 -2 200 300 Distance [m] 15 Body slip [ ] Lateral acceleration [m/s²] 0.5 0 10 -20 400 3 1 Yaw rate [rad/s] 100 20 Lateral acceleration 1.5 -1 Steering wheel angle 100 Path start Plot start End Steering wheel angle [ ] 450 5 0 -5 -10 0 100 200 300 Distance [m] 400 -15 0 100 200 300 Distance [m] 400 Figure A.14. Lane change with ESP in race mode. 7 Slalom with and without ESP. Position Velocity Path start Plot start End 350 Velocity [km/h] Z [m] 300 250 200 150 30 80 20 60 40 20 0 100 -100 -80 -60 -40 X [m] -20 -20 0 0 Yaw rate -20 0 100 200 Distance [m] -0.5 -1 100 200 Distance [m] Body slip 0.5 50 0 -0.5 0 -50 -1 -1.5 300 300 100 Body slip [ ] Lateral acceleration [m/s²] 0 0 0 -10 -30 300 1 0.5 Yaw rate [rad/s] 100 200 Distance [m] 10 Lateral acceleration 1 -1.5 Steering wheel angle 100 Steering wheel angle [ ] 400 0 100 200 Distance [m] 300 -100 0 100 200 Distance [m] 300 Figure A.15. Slalom with ABS and TCS. Position Velocity Path start 450 Plot start 350 Z [m] 30 80 20 End Velocity [km/h] 400 Steering wheel angle 100 Steering wheel angle [ ] 500 300 250 60 40 20 200 0 150 100 -100 -80 -60 -40 X [m] -20 -20 0 0 Yaw rate 0.5 0 -0.5 100 -10 -20 -30 400 0 100 200 300 Distance [m] 400 15 1 10 400 5 0.5 0 -0.5 0 -5 -10 -1 -1.5 200 300 Distance [m] Body slip 1.5 Body slip [ ] Lateral acceleration [m/s²] Yaw rate [rad/s] 1 0 200 300 Distance [m] 0 Lateral acceleration 1.5 -1 100 10 -15 0 100 200 300 Distance [m] 400 -20 0 100 200 300 Distance [m] 400 Figure A.16. Slalom change with ESP in race mode. 8 Race track with and without ESP. Path start Plot start End Position 100 0 -300 -400 Steering wheel angle [ ] Velocity [km/h] -200 100 50 0 -500 -600 -600 -400 -200 0 X [m] 200 -50 400 0 Yaw rate 10 0 -10 -20 -30 3000 0 0.5 0 -0.5 -1 1000 2000 Distance [m] 20 5 10 0 -5 -10 -15 3000 1000 2000 Distance [m] 3000 Body slip 10 Body slip [ ] Lateral acceleration [m/s²] Yaw rate [rad/s] 1 0 1000 2000 Distance [m] 20 Lateral acceleration 1.5 -1.5 Steering wheel angle 30 150 -100 Z [m] Velocity 200 0 -10 -20 0 1000 2000 Distance [m] -30 3000 0 1000 2000 Distance [m] 3000 Figure A.17. Race track with ABS and TCS. Path start Plot start End Position 100 0 -300 -400 Steering wheel angle [ ] Velocity [km/h] -200 100 50 0 -500 -600 -600 -400 -200 0 X [m] 200 -50 400 0 Yaw rate 10 0 -10 -20 -30 3000 0 1 0.5 0 -0.5 -1 1000 2000 Distance [m] 3000 20 5 10 0 -5 -10 1000 2000 Distance [m] 3000 Body slip 10 Body slip [ ] Lateral acceleration [m/s²] Yaw rate [rad/s] 1.5 0 1000 2000 Distance [m] 20 Lateral acceleration 2 -1.5 Steering wheel angle 30 150 -100 Z [m] Velocity 200 0 -10 0 1000 2000 Distance [m] 3000 -20 0 1000 2000 Distance [m] 3000 Figure A.18. Race track with ESP in race mode. 9 Appendix B Regulator shell // // controller.cpp: implementation of a controller // // // Erik H, 20070213. // // Johan Andersson, 20080404 // #include #include #include #include #include #include <math.h> <control.h> <iostream.h> <abs.h> <tcs1.25slip.h> <esphighrace997.h> // // Controller main function // void Controller(const ControlInput& In, ControlOutput& Out) { // // Declare work variables // float dt; // // The keyword static causes a variable that is defined within a // function to be preserved in subsequent calls to the function. // It is thus suitable for keeping state variables. // // States static int t0 = 0; // Last time stamp [ms] // // ESP Parameters // // // Retrieve inputs // const int PedalLevel = In.PedalLevel; // Accelerator pedal level [0,1000] const int BrakeLevel = In.BrakeLevel; // Brake pedal level [0,1000] const float SteerAngle = In.SteerAngle; // Steer angle [rad] const int t1 = In.Time; // Time [ms] const float A_x = In.A_x; // Lateral acceleration [m/s^2] const float YawRate = In.YawRate; // Yaw rate [rad/s] // The rotational speed of the respective wheels [rad/s] // 1 - Front left wheel 3 - Rear left wheel // 2 - Front right wheel 4 - Rear right wheel const float omega_1 = In.FrontLeft().AngVel; const float omega_2 = In.FrontRight().AngVel; const float omega_3 = In.RearLeft().AngVel; const float omega_4 = In.RearRight().AngVel; // Velocity of Car [m/s] const float V_y = (((omega_1+omega_2+omega_3+omega_4)/4)*0.331); // 10 // Update states // dt = t1-t0; // Time difference since last call [ms] if(t0 > 0) { // Update } else {t0 = t1; // Reset } // Update time stamp // // Default output values // Out.SetPedalLevel(PedalLevel); Out.SetBrakeLevel(BrakeLevel); Out.SetBrakeFactors(0,0,0,0); Out.State = ON; Out.Monitor = 1; // Accelerator pedal level [0,1000] // Brake pedal level [0,1000] // Brake scaling [%] // Controller state {OFF,ON} // Monitor variable // // Controller implementation // // For ABS abs(omega_1, omega_2, omega_3, omega_4, V_y, BrakeLevel, YawRate, &Out); // For TCS tcs(omega_1, omega_2, omega_3, omega_4, V_y, PedalLevel, BrakeLevel, &Out); // For ESP esp(omega_1, omega_2, omega_3, omega_4, V_y, BrakeLevel, PedalLevel, SteerAngle, A_x, YawRate, &In, &Out); } 11 MATLAB measurement sampling % LoadRacerData.m % % Erik H, 20061214. % % modified by Johan Andersson, 20080414 % % Load data from last run load /tmp/logger.mat % % EXTRACT DATA % % % Definition of axes: % % X: Out of the front door % Y: Up through the roof % Z: Out of the front windshield % % X % ^ % | % |---.---| -> Z % Y % Rear Front % % % Static properties % % Radius of the wheels [m] r_FL = RacerStatic.FrontLeftRadius; r_FR = RacerStatic.FrontRightRadius; r_RL = RacerStatic.RearLeftRadius; r_RR = RacerStatic.RearRightRadius; % % Dynamic data % % Information Time = 1e-3*RacerInfo(:,1); Dist = RacerInfo(:,2); State = RacerInfo(:,3); N = length(Time); % X Y Z % % % % Time [s] Driven meters [m] Controller status flag Number of samples Position of the car (in world orientation) [m] = RacerPosition(:,1); = RacerPosition(:,2); = RacerPosition(:,3); % Velocity of the car (in car orientation) [km/h] V_x = RacerVelocity(:,1); V_y = RacerVelocity(:,2); V_z = RacerVelocity(:,3); % Acceleration of the car (in car orientation) [m/s^2] A_x = RacerAcceleration(:,1); A_y = RacerAcceleration(:,2); A_z = RacerAcceleration(:,3); % Rotational velocity of the car (in car orientation) [rad/s] R_x = RacerRotVelocity(:,1); R_y = RacerRotVelocity(:,2); R_z = RacerRotVelocity(:,3); 12 % Angular velocities of the wheels [rad/s] a_FL = RacerWheel(:,1); a_FR = RacerWheel(:,2); a_RL = RacerWheel(:,3); a_RR = RacerWheel(:,4); % Controls Pedal = RacerControl(:,1); % Pedal Brake = RacerControl(:,2); % Brake Angle = RacerControl(:,3); % Steer BrakeFactor = RacerControl(:,4:7); level [0,1000] [-] level [0,1000] [-] angle [rad] % Brake factor [0,100] [%] 13