M
A
Master D
MOD
U
Degree in
EL BA
FOR
UNIVE
Engi
n Automa
ASED D
R ABS
Anno acc
RSITY
neering
ation Eng
DESIG
S/ESP
C Scademico
Y OF P
g Facult
gineerin
GN ME
SYSTE
CandidateSupervisors Examiner:
2010/201
PISA
ty
ng and Ve
ETHO
EMS
: D Dr. I Dr. Ing. C
11
ehicle co
DOLO
Nicol
Dr. Ing. Anto Ing. Andrea Carlo Albertoontrol
OGY
a David
onio Bicchi a Ballucchi o Avizzano2
ABSTRACT
In this thesis, developed at LMS international company, is shown the use of Model Based Design methodology and tools to integrate the major development phases into one continuous design cycle process. This thesis is part of a project of the development of an Hardware in the Loop (HIL) test rig for representing the braking system of a car and in particular reproduce an antilock brake system controller. Following the V‐cycle process is realized a complete model of a vehicle and integrated with the model of the hydraulics brakes. With a graphical user interface it’s possible to visualize the signals coming from a Real time simulation.
After this integration is tested an ABS algorithm and an hardware valve controller.
INTRODUCTION
In recent years model based design methodology has become the preferred method for designing, modelling and simulating complex dynamic systems.
The traditional system design methodology, with steps of design, implementation, testing and production, is rather time consuming and error prone in nature.
With MBSE, complicated systems can be created by using mathematical models representing system components and their interactions with their surrounding environment.
For modelling multiphysics components LMS own Imagine AMESim® software, that has advanced features for automatic generation of source code that would mimic the simulated system and hence cutting time to market and reducing development costs.
3 The Vehicle Model in AMESim® The aim of this thesis is to set‐up a process to check for integration issues of a certain component in the whole vehicle context. The work begin with the vehicle model built in LMS Imagine AMESim®. From this it’s created an S‐function (automatically generate in C‐code) used for export the model in Simulink, where thanks to Triphase® interface, it’s possible to compile and run the model into a Xenomai® Real Time PC.
When the simulation is running we receive the arrays of timed signals representing the behaviour of the car. This signals are visualized directly by a created Graphical User Interface. For each step of the development of the vehicle model and the brake hydraulics integration is followed this process for verify that each new component of the model is compatible with the Xenomai interface.
Further task is a Model‐in‐the‐loop AMESim‐Simulink® cosimulation between the vehicle and brake modelization, testing a new Simulink ABS Sliding mode controller.
Final step is to setup an Hardware‐in‐the‐Loop test for implement the control algorithm on experimental board, connected to the AME models.
The Vehicle Model in AMESim®
The AMESim® Vehicle model developed is an evolution of a demo model available in the demo library of AMESim, the final layout is shown in the figure below. In particular we use the model and interconnect it with the model of the brakes.
4 For the with 6 D DOF, so The sev The sev frame (R For kno some se simulations DOF, Steeri 15 DOF. eral degree eral frames R1 ), the spi owing the d ensors. The s necessary ng rack bod s of freedom used in the ndle frame ynamic beh e absolute v The Vehi AMESim® y in this thes dy with 1 D m of the sys e 15 DOF ch ( R2 ) and th havior of th velocity sen cle Model in ® Vehicle mode sis, it’s used DOF, 4 Spind stem are de assis mode he wheel fra
he car, it’s n nsor, availab n AMESim® el developed d the Vehic dle body wi etailed on th l are the Ga ame ( R3 ) : necessary to ble in vehic
le model w ith 1 DOF, 4 he following alilean frame o connect o cle dynamic with 15 DOF 4 Wheel bo g figure : e ( R0 ), the
on the chas cs library ar : car body ody with 1 carbody ssis model re generic
5 models, and exp The abs some As seen the soli hereafte To the friction model a the brak A signal the fric multipli multipli friction For insta The dri accelera , express th pressed in fr solute positi point b previously, d connecte er, with the chassis mo force is m and is appli ke torque ac l input on a tional torq ed by a us ed by a use torque in N ance with t iver block ation contro e rotary vel rame "Rk". ion sensor a belonging , all Euler a ed to the se e associated
odel is linke odeled as C ed betwee ction acts o a rotary frict ue with 3 ser supplied er supplied Nm directly. the second o calculates ol (0= no ac The Vehi locity of sol allows the m to a ngles are re ensor mode solid conne Euler angl
ed to the r Coulomb fr en wheel an n the whee tion torque options, a d maximum coefficient option Fdyn the brakin cceleration; cle Model in id "i", with measuremen solid wh eachable wi el. Euler ang
ection : les used in vehi rotary fricti riction. Brak nd spindle, o el and the re e generator signal betw m value or of friction a is defined a ng control ; 1= maxim n AMESim® solid attach nt and the p hose sens ith Euler an gles used in cle dynamics on torque ke torque i on the relat eaction acts supplies a ween 0 an taken as n and the rad as Fdyn d (0= no b mum acceler hed frame " post treatm sor mode gle sensor, n vehicle dy generator f nputs are c tive DOF, a on the spin value which d 1, taken normal forc dius on whic dynFnormal braking; 1= ration) and Ri", versus f ent of the p el is co depending ynamics are for each w connected round y2 ax ndle. h is used to
as a fract ce in Newt ch the force maximum gear shiftin frame "Rj" position of onnected. only with e detailed wheel. The at chassis xis. Hence, o calculate ion to be ton to be e acts or a
m braking, ng control
6 Braking system having as input the speed control (usually supplied by a mission profile icon), vehicle speed and the engine rotary velocity.
The gearbox ratio is calculated from the engine rotary velocity. When the vehicle velocity is below a threshold (specified by a parameter), the neutral is engaged to avoid engine stalling. The velocity profile submodel define a mission profile based on tables for the vehicle velocity and gearbox ratio: for the particular test of this context it’s created a cycle imposing hard acceleration and braking requests called “FastAccelerationFastBreak”. This 11s cycle is made a linear request of velocity for first 8 s until 15 m/s (54 Km/h) and after an hard brake until stop the car. The tire kinematic model computes all kinematic elements of center of tire contact tire/ground between the tire belt model and the tire model it’s possible to connect a dedicated sensor; It allows the measurement of complete ground reaction motor (force and moment) . This represents the external forces acting from the ground on the wheel, that can be summed into one ground reaction force vector ( F w ) and one ground reaction moment vector ( M w ). The tuning of parameters model are made with a Ford S‐max 2.5 L spark ignition 4 strokes ICE having a mass of 1800 kg.
Braking system
A brake system is a system based on simple hydraulics. In the hydraulics the driver force, is transmitted by incompressible brake fluid to another point. This basic system consists of two pistons (master cylinder and wheel caliper or cylinder), which are filled with brake fluid and are connected by a brake line of any length or shape. When the brake pedal is forced down brake fluid from the master cylinder is transferred to the brake caliper piston, pressurized fluid is transmitted through the brake caliper to the brake pads or shoes, which are mounted to the brake caliper or wheel cylinder.
7 An anti decelera the othe it indica ABS sys wheel o In the f on the B Starting pressure amplifie amplific This for pressure The par brake p This flu electrom lock brake ation rates ers, or at a ates the whe tem respon or wheels. ollowing fig Bosch appro g from the b e signal thr ed by a pow cation ratio rce in Newt e to the hyd rameters us
ads are mea uid in pres
magnetic fo systems, is of the whee faster rate eel is startin nds by mom gure is show oach describ bottom of t rough a sim wer brake bo
to calculate ton is an in draulic brak ed in the m asured to ca ssure will p rce activato B s a system els during b than that w ng to slip an mentarily red wn the Hyd bed in ref. [ Braking Sy he figure, a mple model ooster. The e the output put to a sim e with the m model are re alculate the pass two s or. Braking syst that contro braking. If on which is pro nd is in dang ducing hydr raulic braki 1] . ystem Hydraulic a brake com of a brake input force t force on th mple mode maximum fo ealistic value e force appli steps of re em
ol the tire ne wheel st grammed in ger of break raulic pressu ng system i cs in AMESim mmand [0 1 pedal forc e coming fro he master c el of the ma
orce of 32 b es. The pres ed to a real egulation v slip by mo arts to slow nto the anti king traction ure to the b implemente 1] is given, ce 430 N m om the ped cylinder, in o aster cylind bars as outp ssure and th l brake disc. alves group onitoring th w at a faster ilock contro n and lockin brake on the ed in AMES this is conv ax; this for dal is multip our case is 1 er, which p ut. he dimensio . p, compose e relative r rate than ol module, ng up. The e affected Sim, based verted in a rce is now plied by an
1720 N. provides a
ons of the
8 Vehicle and Brake hydraulics integration With the valve activation of the is possible to have the control of the fluid flow and consequently reduce the pressure at the calipers at certain conditions.
In no activation condition, the passage is assumed open, so the same pressure that we have downstream is upstream.
Vehicle and Brake hydraulics integration
The integration in one layer of the two models has presented some issues. The braking model is a new developed model that is available with next AMESim revision, at beginning has had some problems that is solved during the model merging.
First tentative was lo leave them in different layers in AMESim and build up a Simulink cosimulation. In this way, in the Simulink sketch we have to manage two S‐function.
This solution has incompatibility with Simulink‐Real time PC interface (Triphase), the only possible solution was solving this issues by trying different vehicle models configuration.
The basic idea of this integration is that the vehicle model send to the brake pedal the command necessary at the vehicle to follow the vehicle profile imposed.
This signal, between 0 and 1, is amplified to better correspond to a human reaction press of 430 N (43 KgF). This force is amplified by the power booster and in the end the master cylinder convert it into a pressure in the circuit. Simulations of ABS intervention With the complete model now it’s possible to test better the braking hydraulics facilities and in particular the ABS valve controller on skidding conditions. For practicality is adopted velocity profile is the “ FastAccelerationFastBreak ”. The road grip model with adherence can be an independent input at each wheel. This is a value between [0‐1] and allows the possibility of several road grip modelling as constant or variable adherence. For set up a slipping condition, the grip modulation value is set to 0,4.
9 The cali an inpu Nm. In this s step size The bra calipers the rese iper block s t a signal b simulation is e of and a R Figure 1 speed Figure 3 A ke comman : when the ervoirs and t Ve imulator, in etween 0 a s used a sol Runge‐Kutta d control and ef Acceleration an nd can be se valve‐out c the brake p Figure ‐ ehicle and B nterfacing w and 1 and g lver option a based inte ffective velocity d braking contr een in the f command fo pressure dro ‐ Pressure at cal Brake hydrau with the car gives as an with four o grator meth y rol Figure figure 4 and or the intere op, allowing lipers with and ulics integra chassis, in output a dy order fixed s hod. Figure 2 Front w 4 Valve out co d how the va ested whee the wheels without ABS in ation this first ve ynamic torq step integra wheels angular mmand for Fro alves reduc el is activate s to continue tervention ehicle mode que of maxi ator of 0.00 r velocity (ZOOM ont wheels (ZOO e the press ed, some oil e rotating. el takes as imum 400 1 seconds M) OM) ure at the l flow into
10
AMESi
AMESim For this In the fi At the h loops, i inverter protocoGRAPH
For bett User Int model a Part of graph [ velocity The stre desired The use of the c until the the codim to Sim
m has not ye purpose it’ gure the ovheart of the t’s program r and other ols.
HICAL US
ter collect terface (GU and the brak the GUI wa Km/h ], en y, pressure, eaming data to the visua er can intera urrent mod e stop butt e catch up aulink Inte
et the facilit s needed M verview of th e system re mmed and r hardwareER INTER
and plot th I). The GUI kes integrat as already b ngine speed orientation a from Xeno alization, by act with the del. During s on press; th round 1500 AMESimerface
ty to interfa Matlab‐Simu he system. esides the T operated t componenRFACE IN
he informat is develope tion, so the begun: the [ rpm ], ge and forces omai PC has y scaling and e GUI with t simulation, his array ca 0 rows m to Simulink ace directly link in whic Triphase Re through MA nts via EtheMATLAB
tion coming d in the me final version displayed s ear lever po applied at t s to be buff d multiplyin he push but it’s buffered an be saved k Interface the softwar h it’s install al‐Time Tar ATLAB®/SIM ernet throug from the eantime of t n is compat ignals was osition, simu the wheels. fered and co ng that to a tton for loa d a vector o d with the s re with a re led the Trip rget. This ta MULINK®. It gh a variet Xenomai is he evolutio tible with al the vehicle ulation time onverted in rotational m d, unload, r of results wi ave button al time env hase toolbo arget runs a communic ty of comm
s created a on of the AM l models. speed indi e and was a the referen matrix . reload, start ith all the si . The final v ironment. ox. all control cates with munication Graphical ME Vehicle icator and added the nce frame t and stop ignal state version of
11
MIL co
Model‐i PCs. In t with the In this signals t driver. The hyd comma vehicleosimulatio
in‐the‐loop this case we e two AMES step it’s re that link th draulics elab nds for the speed and t MIL coson TEST f
testing mea e use a Simu Sim models: eplaced the e vehicle w borate the ABS valves the speed o simulation T GUI developedfor ABS Sim
ans that all ulink contro : the vehicle AMESim v with the bra brake press s are calcula of each whee MIL Sim TEST for ABS d showing the vmulink co
the simulat oller that dri e and the br valve contro ke hydrauli sure signal ated by the el. ulink Cosimulat S Simulink c vehicle behavioontroller
tions are m ives the hyd rake hydrau oller with a ics are theto send to e new Simul tion Layout controller our model based draulics and lics. a Simulink o brake comm the vehicle link scheme and run in d runs in cos one. Like b mand value
e model but e, taking as to normal simulation before the e from the t now the input the
12 In Simu necessa speed o The con output i This con make a For each Slip fact mode co The cho The max the slip picture ulink we wa ary. As inpu of each whe ntroller imp is calculated ntroller is d comparison h wheel is c tor λ and th ontrol. osen simulat G 1 S ximum frict is too high at the FrL c MIL cos ant to cont uts we catch
el and the v plements a d the comm developed in n between t calculated t he desired ted scenario Grip coefficie 100 km/h to SLIDING MOD tion achieve we have th aliper and a simulation T trol the val h the signa vehicle spee sliding mo mand at the v The S n reference the valve co the slip i one i o: ent lowered t 0 in 5 s strai DE CONTROL ed near 15% he valve out allow at the TEST for ABS ves that re ls needed f ed, as result de method valves to op imulink valve co e at the wor ommands of i v v R v v a des i . Th to 0.1 at fron ght path L with tanh a % of λ so we t command wheel velo S Simulink c elease the from the ve is calculate based on pen and clos ontroller rk described f this contro and the diffe his is the co
nt left wheel anti‐chatterin want to sta that releas city to avoid controller pressures a ehicle mode ed the slip fa a threshold se them. d in the art oller and the erence betw ontrolled va only ng function ay around t e the press d the blocki
at the calip el such as t actor for ea d of Slip fa ticle [8], ana e AMESim o ween of the ariable for t his paramet ure like sho ing. pers when the wheel ch wheel. ctor λ, as alyzed for one. e effective the sliding ter. When own in the
13 Simulat Ve The pre pressure
HIL CO
Followin hardwa complie Simulink internal The I/O devices represe 16 bits w 0.00 35.00 A m pl itude m/s 0 0.00 1.00 A m pl itude / HIL ted results ehicle speed and ssure in the e in the fronOSIMULAT
ng the V‐cy re and test ed and runk; the signa l virtual regi of the hard are input/o nting the w with sign an 1 2 3 L COSIMULA : d measured one e master cy nt left calipe
TION TES
ycle process it. First of at the sam als commun isters. dware cont output devic wheels speed nd linked to 4 5 6 s ATION TEST e at the FrL whe linder and i er it’s droppST OF THE
s we want all it’s conf e CPU. Eac ication betw roller is link ce which re d and the v a register’s HIL V W 6 7 8 OF THE ABS eel , below the n the other ped due to tE ABS HAR
to replace figured the ch model h ween the tw ked to the X eceive/send ehicle spee s value in th L ABS valve cont V ehic le Speed Wheel Speed FrL 10 9Des ired Slip s lip FrL 0 1.80 Pa 0 1 / S HARDWAR Slip and Maste rs calipers h the ABS algo
RDWARE
this contro Xenomai su as to be la wo models Xenomai tho a current b d. The curre e Xenomai. troller 0.00 0e+6 A m pl itude Pa 0 1 2 0.00 1.20 A m pl itude / RE CONTRO r cylinder and f have norma orithm interCONTRO
oller with a uch that the unched fro is made by ought Ether between 4 t ent is digitis 3 4 5 s OLLER front caliper pre l values, wh rvention.
OLLER
real one r e two mode m different setting the rCAT™. The to 20 mA, in sed to a res Master Cylin FrL caliper p FrR caliper p 6 7 8 FrL valve O essure hereas the realized in els can be t layers of e Xenomai EtherCAT n this case solution of nder pressure pressure pressure 10 9 OUT command14 BIBLIOGRAPHY In order to run the control algorithm on an embedded system, the model has to be converted to embedded c‐code, which can be compiled and ran independent of the modeling environment. The difficulties on this step is that many libraries are not available.
CONCLUSIONS
This work follow the model based design methodology, reducing the numbers of development stages by combining the design, implementation and test into one process and can be used in a wide range of application areas. In particular, here is developed a vehicle model and interfaced with the braking hydraulics model; it’s built the interface for Simulink in a first step and for a Real time PC in a second step. The behaviour of the car it’s shown in a Graphical user interface, developed taking into account all the rotational matrix of the reference systems.After, a new sliding mode controller is implemented, having good results in terms of performance and stability, taking into account the maximum admissible threshold of desired slip at the wheels.
In the end, a Hardware‐in‐The‐Loop setup is realized, linking the Real time PC via EtherCAT to an Hardware controller realized internally by the company.
Further development steps can be run the control algorithm on an embedded system, which can be compiled and ran independent of the modeling environment.