Simple Car Dynamics

Download as pdf or txt
Download as pdf or txt
You are on page 1of 16

Simple Car Dynamics

Claude Lacoursi`ere
HPC2N/VRlab, Ume
a Universitet, Sweden,
and CMLabs Simulations, Montreal, Canada
May 18, 2005

Typeset by FoilTEX May 16th 2005

Outline

basics of vehicle dynamics


different models for different applications
analysis of the different components
building a simple car simulation

Typeset by FoilTEX May 16th 2005

Basic definition
Ground vehicles consist of:

a frame: either one rigid part or some articulated components


ground support: wheels, tracks, or pods, and suspension
steering mechanism (sometimes coupled to suspension)
power plant (engine)
drive train (transmission, gear box, differential, brakes)

Ground vehicle dynamics addresses all these issues by providing models for each of
the components.
Track vehicles will not be considered in this (short) lecture.
From now on, ground vehicle = car.

Typeset by FoilTEX May 16th 2005

Driving conditions

Race Track perfectly flat road, absolutely no obstacle


Well Maintained Street very flat surface, hills, no obstacles
Bumpy Road mostly flat surface, some holes and bumps, hills, small obstacles
Rough Road not very flat, many holes, small and big obstacles
Off Road arbitrary terrain conditions, arbitrary obstacles
These are increasingly difficult when it comes to finding the contact points on the
wheels or track, and computing the forces between the ground and the ground support.
Off road will require full rigid body model as well as detailed geometric inteference
computation (collision detection).
Race track driving requires very little geometric information.
We will concentrate race track conditions but build a model that is suitable for bumpy
road conditions.

Typeset by FoilTEX May 16th 2005

Some basic numbers


Car driving at 100 Km per hour is : 28 metres per second
Typical wheel: 35cm radius 12 revolutions per second
At 60 frames per second, thats 1/5 revolution per frame or 1.2 rad per frame.
Small angle formula i.e., sin() works only for || 0.2. Were way off.
Racing car: 200km per second, 25 revolutions per second, 2.5 rads per frame!
Using real wheels to simulate race cars is difficult!
This is why we concentrate on a point approximation for the wheels i.e., the car is
now a frame and at most one contact point per wheel.

Typeset by FoilTEX May 16th 2005

Basic physics of a simple car


The forces acting on a car

Nr
Nf

Fw
Fr
Nr
Nf
Fr
Ff
W
Fw

Ff

Normal force on the rear wheel


Normal force on the front wheel
Traction (friction) force on the rear wheel
Traction (friction) force on the front wheel
Gravitational force on Center of Mass (CM)
Drag resistance on CM

The diagram is that of a rear traction car which is accelerating.

Typeset by FoilTEX May 16th 2005

Basic physics of a simple car


Note carefully: gravity acts on the CM but normal, traction, and braking forces act
at the contact area of the wheels.
Traction, braking and normal forces apply torques on the CM.
Because of this, we need a rigid body model for the frame, at least.
Wind drag also applies torques but that will be neglected.

Typeset by FoilTEX May 16th 2005

Basic physics of circles

v2

r2

v1

F2

F1
r1
2
1

Essential relationships:
Linear velocity v = /r
Centripetal force F = mv 2/r , without this force, you dont turn!
Velocity ratios for common angular velocity: v2 = v1r2/r1

Typeset by FoilTEX May 16th 2005

What does that mean for cars?


Inside and outside wheels are on different radii during cornering.
To turn without skidding, need different linear velocities for inside or outside.
Wheels are subject to tangential force of mv 2/r which can be high.

Typeset by FoilTEX May 16th 2005

Basic Wheel Physics


A perfectly cylindrical wheel cannot turn without slipping!
2

1
v2

v1
I.e., 1 = 2 and v1 = v2 so we can only have straight line motion.
This is why we use tires which are deformable.
A tire under stress will deform and slip i.e., direction of travel will differ from that of
a perfectly rigid cylinder.
Despite the abundand folklore, tire slip has nothting to do with the contact patch
slipping on the ground. Tire slip is the net kinematic result of bulk tire deformations.

Typeset by FoilTEX May 16th 2005

Details of wheel-ground contact

Tangential slip

Longitudinal slip

Actual direction of travel

R0

Slip angle

Re
Direction of the wheel
When the tire is under a load, it compresses and the effective radius is R e < R0,
i.e., the velocity of the center of the wheel is not v = R0 but instead, v = Re .
This generates a friction force because work is done to compress the tire, not because
the contact patch slips on the ground!!!!
When there is a tangential force on a tire, it compresses tangentially and doesnt go
along a line of travel that is in the vertical plane.

Typeset by FoilTEX May 16th 2005

10

Longitudinal slip

longitudinal force (relative units)

Wheel center of mass moves at linear velocity vx, angular velocity


Point on contact patch is actually moving at vr = Re = vx
R v

.
The slip is defined as: = |v0x| x , and = 1+
Longitudinal force as a function of slip ratio
1.5
1
0.5
0

-0.5
-1

-1.5
-20 -15 -10 -5
0
5 10 15
longitudinal slip ratio in percent

20

The relative units are actually ratios to the normal force.


We can approximate the slip with Fs = Cl and clip this at |Fs| = 1, and
Cl 1/0.06.
To use these relations, we need to integrate the angular velocities of the wheels.
Typeset by FoilTEX May 16th 2005

11

Tangential slip
Here, the line of travel of the tire differs from the plane by angle .
If the forward velocity of the wheel is vx and the tangential velocity of the contact
patch is vy , the slip is defined as:

t =

vy
= tan().
vx

Again, this shows up in the force ratio i.e., the ratio of the tangential force, F y , to
the normal load, Fz , and we essentially have:

F y = t Ct F z
Of course, we need to clip to the friction coefficient but for good tires, this can be
high i.e., 1.5.
The relationship between slip angle and tangential force is very similar to that of the
longitudinal slip.

Typeset by FoilTEX May 16th 2005

12

The Power Plant


Engines have rating curves which describes how much torque they can deliver for a
given RPM. Typically, two pairs of numbers are given:

max power rating: given max power achieved at given rpm


max torque rating: given max torque achieved at given rpm
a typical figure is given here:

Non-descript

Typeset by FoilTEX May 16th 2005

Actual Diesel engine

13

The Power Plant


For most cases, its enough to assume that power delivered is proportional to engine
RPM up to the max.
This means that P = Cp0 is the power, and that:
max = P/0 Cp is the constant max torque.
Of course, using curve lookup is a better idea.

Typeset by FoilTEX May 16th 2005

14

The throttle, and the RPM


The gas pedal controls the acceleration of the engine, we know that!
Simple model: torque delivered = throttle max torque
The RPM is estimated by the current velocity of the drive wheels i.e.,

0 =

d
rf

where d is the average angular velocity of the drive wheels, 0 is the engine angular
velocity, and rf is the final gear ratio, i.e., the ratio from the gear box times the
ratio from the differential.
Note: this is working in open loop fashion i.e., there is no self inertia and no feedback
mechanism.
A good drive train model would have all these inertias and feedback loops simulated
but thats too complicated for our purposes.

Typeset by FoilTEX May 16th 2005

15

Differentials
When traction is delivered to the wheels, it goes through a differential which is a
device that enforces the following constraint:

s = rd(l + r )
where s is the drive shaft angular velocity, l is the angular velocity of the left
wheel, r is the angular velocity of the right wheel, and rd is the differential gear
ratio.
In practice, this constraint means that the torque applied on each wheel is equal:
thats why you can get stuck in the snow if one wheel is free.
Therefore, this can be ignored i.e., after computing the torque on each wheel based
on wheel slip, one can simply average the two and use that value instead to model a
differential.

Typeset by FoilTEX May 16th 2005

16

Steering
A typical steering mechanism does a lot of fancy things i.e.,:

set different steering angles on each wheels


set an inclination angle which depends on the steering angle
adjust differential parameters (for front wheel driving)
But the difference in steering angle
high order corrections.
Therefore, use the simplest possible
respect to the chassis direction.
To really model steering, we need
wheel i.e., tangential forces on the
We ignore that.

Typeset by FoilTEX May 16th 2005

is very small and the other adjustments are also


model: steering angle = angle of the wheel with
to also account the self-aligning torque on the
wheel tend to set them back to a straight line.

17

Brakes
A brake delivers a force roughly proportional to the brake pedal input times some
maximum torque. The result is applied directly to the wheels but in the direction
opposite to the motion.
Give max braking torque b, and a brake pedal signal db [0, 1], a simple model is
this:

,  > 0.
= dbb
|| + 
Of course, this will have problems when 0 and there are other forces on the car:
the wheels will jitter.
This can be clamped near zero with smart control but its not trivial.

Typeset by FoilTEX May 16th 2005

18

The simplest model: soap box car


The frame is a box: use a rigid body. Use symmetric inertia tensor.
Wheels are also rigid bodies but:

only integrate angular velocities (i) about axle


inertia tensor: I (i) = m(i) R02/2, and m(i) m/50
Suspension is modelled using springs: aim at 5% of R0 under normal weight so that
k = (gm/4)/(R0/20)
Ground forces are applied at the contact points.
The drive train is modeled by feeding back the wheels angular velocities.

Typeset by FoilTEX May 16th 2005

19

The simplest model: soap box car


Dynamics model:

location of contact points


compute traction forces
compute cornering forces
compute drive torques
compute brake torques
distribute forces on frame and torques on wheels
gravity on CM
wind drag on CM

Typeset by FoilTEX May 16th 2005

20

Locating the contact points


Fixed locations of wheel attachments in chassis frame: a(i) , i = 1, 2, 3, 4.
World coordinates: A(i) = X + Ra(i) , X is the CM position, R rotation matrix.
At each of these points, find the point of the ground that is closest.
For flat ground, its going to be the intersection of the ray: A(i) Rz with ground
plane:
z T A(i)
T
(i)
(i)
(i)
(i)
z [A Ra ] = 0 = T
z [Rz]
T
where z = (0, 0, 1) is the unit vector pointing upwards.
If the ground is not flat, one must compute the quantities:
T

(i,j)

n(j) A(i)
T

n(j) [Rz]

for each triangle j which is in the neighborhood of point a(i) , and where n(j) is
the normal of the polygon. One must then find out which triangle contains the
intersection and from this, recover (j) . This will not be covered here but its not
difficult. Look for ray and polygon intersection on the web.
Typeset by FoilTEX May 16th 2005

21

Computing normal loads


Once we know the distance from the ground (i) , we get the normal force
magnitudes:
(
0
if (i) > l0
(i)
N =
k(l0 ) otherwise
Normal forces get applied at the location of the contact points: A(i) (i) Rz , and
in the direction of n(i) , the normal to the ground contact at point i.
Its a good idea to compute a damping force for the suspension spring as well. To do
this, you need to project the velocity of the attachment point on the axis of the
suspension.

Typeset by FoilTEX May 16th 2005

22

Computing traction and cornering torques


Geometry.
First, for each contact point, compute local contact plane basis vectors.
Compute velocity in the contact plane i.e., v (i) = v + [Ra(i) (i) Rz] and
vz(i) = n(i) v (i) , vx(i) = s(i) v (i) , vy(i) = t(i) v (i) , and s(i) , t(i), n(i) form a right
handed coordinate system at the point of contact. Also, is the angular velocity of
the frame, R is the current rotation matrix, a(i) is the body fixed position of the ith
attachment point, z is the upward unit vector, and (i) was computed previously.
For the driving wheels, s(i) should be in the plane of the drive wheel i.e., given zero
slip, s(i) would be the direction of travel.
Compute the longitudinal velocity of the car i.e., vx = (Rx) v where v is the
velocity of the car, and x is a normal vector pointing forward.

Typeset by FoilTEX May 16th 2005

23

Computing traction and cornering torques


Each wheel will get a net torque which is the sum of the drive torque, the longitudinal
rolling resistance torque, and a brake torque.
The corresponding net force is applied to the frame at the contact point.
(i)

Tangential slip Compute tan((i) ) = vy(i) /vx vxvy(i) /(|vx|+)2 = t (avoid


(i)

(i)

dividing by zero). Set Ft = t CtN (i) and clamp this with N (i) where
is the friction coefficient. Apply this force on the cassis at the contact point,
ignore self-aligning torque.
Longitudinal Slip Compute

the

longitudinal

slip:

(i)

(i) =

(i) R0 vx
|vx |+ ,

and

l = (i)/(1 + (i) ) (avoid dividing by zero!), and from this, compute the
(i)
(i)
traction force: Fl = Cl l N (i) . Apply this as a torque on wheel i:
(i)
(i)
l = F l R 0 .
(i)

Brake Compute the brake torque b


(i)
Fb

= dbb

(i)
| (i) |+

and corresponding brake

(i)
b s(i) /R0,

force
=
where db is the break pedal value (could have a
different one for each wheel).

Typeset by FoilTEX May 16th 2005

24

Computing drive torque


Estimate engine angular velocity 0
d/(rg rd) where d is the average driving
wheel angular velocity (last time step), and rg , rd are the gear and differential gear
ratios, respectively.
Get the gas pedal input: dg
Get max torque from table and RPM value (0)
Compute: e = dg max(0)
Compute: d = rg rdefl where fl is a loss factor (if you like)
(i)

(i)

Apply d = d 2 to each drive wheel, where d is the average drive-wheel


d
velocity: this will balance the power delivered on each wheel.

Typeset by FoilTEX May 16th 2005

25

Wind drag
Simple wind drag of Fw = Cw vx|vx|, add to CM
Could add up a number of drag forces, including downward pressure and lifts,
depending on the shape of the car... not today!

Typeset by FoilTEX May 16th 2005

26

Summing up and integrating


Sum all the torques on the drive wheels.
Sum up all the forces on the contact points and compute torques on CM.
Integrate using symplectic Euler:

vn+1 = vn + hm
n+1 = n + hI
qn+1 = qn +

Fn(xn, vn)

(1)

n(xn, vn)

(2)

h T
E (qn)n+1,
2

qn+1 = qn+1/|
qn+1|

xn+1 = xn + hvn+1
(i)

(i)

n+1 = n + hI
and

q1
E(q) = 4q2
q3

Typeset by FoilTEX May 16th 2005

(4)

(i) 1 (i)

(3)

q0
q3
q2

(5)

q3
q0
q1

3
q2
q15
q0
27

Open issues
Multiple contacts on a wheel e.g., obstacles
Problems at low velocity:

misbehaves near vx 0
brakes can go unstable

Typeset by FoilTEX May 16th 2005

28

Conclusions
Cars are very sophisticated things!
A good model needs many coupled differential equations and algebraic conditions.
Much work to do on tire models to get nice stable contacts and good handling.

Typeset by FoilTEX May 16th 2005

29

References
Pedestrians references:
Basic game physics car tutorial: http://home.planet.nl/ monstrous/tutcar.html
Another interesting set of tutorials: http://www.miata.net/sport/Physics/index.html
Advanced references:
Jo Yung Wong, Theory of Ground Vehicles, 3rd ed., Wiley and Sons, 2001.
Tyre models: Hans B. Pacejka, Tyre and Vehicle Dynamics, ButterworthHeinemann, Oxford, 2002.
Milliken and Milliken, Race Car Vehicle Dynamics, SAE, 1995
Milliken and Milliken, Chassis Design Principle and Analysis, SAE, 1995

Typeset by FoilTEX May 16th 2005

30

You might also like