modeling and control of a motorbike - ulisboa · the motorbike dynamics model in this chapter is...
TRANSCRIPT
Modeling and Control of a Motorbike
Marco De Vittori
Under supervision of Joao Fernando Cardoso Silva Sequeira
Dep. of Electrical and Computer Engineering, IST, Lisbon, Portugal
July 21, 2011
Abstract
The work developed in this thesis explains firstly the construction of both kinematic and dynamic models
for a motorcycle, and then the design of an automatic control that can command the bike avoiding instability
under normal driving conditions. All final and intermediate results have been tested in several diverse conditions
through a Matlab implementation, in order to validate the model and to educe information about the motorcycle
behavior.
Keywords: Motorbike, Control, Model, Simulation, Automation, Dynamics, Kinematics.
1 Introduction
Autonomous four-wheel vehicles already exist and the
research in this field has widely evolved in the last
decades. In what concerns motorbike control this is
not the case despite the increasing attention the sub-
ject is attracting. The development of an autonomous
motorbike is thus a natural topic of interest in future
transportation systems. The innumerable advantages
of an autonomous driving reside in transports optimiza-
tion, user comfort, and driving security, among others.
The unstable physical equilibrium intrinsic of the two-
wheels vehicles makes them somewhat more complex
to control, even from the mere theoretical perspective.
The first contribution of this study is the creation of
a realistic physical model which includes diverse kine-
matic and dynamic effects that are often not included in
other models. The underlying idea is that the more ef-
fects are included, the more information the automatic
control will have available, and, eventually, the easier
will be to find an autonomous controller capable of high
performance riding such as that found in motorbike rac-
ing.
The motorcycle modeling has been extensively
studied by a number of researchers over many years.
The study of bicycle modeling and control dates back
1
to the last years of 19th century, namely through the
work of F.J. Whipple (see for instance [1]). During
most of the 20th century, the development of the mo-
torbike industry kept the focus of the research in the
engines but it was not until the 80s that a renewed inter-
est in modeling emerged from an academic viewpoint,
with multiple researchers discussing different kinemat-
ics and addressing also dynamics and control issues.
Sharp et al, [3], studied the effects of an advanced
tyre modeling on the motorcycle dynamic simulation.
A linearized model for an uncontrolled bicycle is de-
scribed in [5]. General dynamics from the perspective
of control have been analyzed in [2]. In the paper, a
wide range of different bike architectures are studied
along with the consequences of the particular aspects
of each one of them. In an on-line article, [6], Mariotti
and Vitale explain the global issue of the rear wheel
damping system. Popov et al, [4], explain the aspects
related to the steering angle control in human driving.
2 Kinematics
2.1 Theoretical basis
The kinematics equations for a simple bicycle model
can be easily obtained as (see for instance [1]),
x = vcosψ ; y = vsinψ ; ψ =v tanδ
wcosϕ(1)
Figure 1 illustrates the meaning of the main compo-
nents in this model, v is the linear speed at the back
wheel, x direction is longitudinal with respect to the
bike’s frame, and y is perpendicular to the plane de-
fined by the rear wheel.
Figure 1: Main variables for the basis bike kinematic model
The bicycle model (1) is the basis model to de-
velop a motorbike kinematics but still does not include
key features that are readily observed in commercially
available motorbikes such as the front fork and back
swingarm.
Consider now the structure in Figure 2, where a
front fork structure is added to the basis bicycle model.
This front fork is characterized by the fork angle λ . As
λ is included in model (1) the angle between front and
rear wheels does not correspond to the δ angle between
the frame and the front fork anymore (as in Figure 1).
In fact, the front wheel rotation is now only a vector
portion of the front fork rotation, as shown in figure 2.
Figure 2: Additional geometric variables
In addition, the front fork structure commonly in-
2
cludes the front suspension, meaning that the kinemat-
ics must include a degree-of-freedom (dof) to account
for this possibility, i.e., the length of the front fork is a
variable, leading to a more realistic model. Let l rep-
resent the length of front fork. All of the motorbike’s
geometry will be affected by the movement of the front
fork, in particular the λ and w parameters. To complete
the kinematics modeling it remains to include a moving
swingarm to support the back wheel. Figure 2 shows
the typical swingarm arrangement with the angle be-
tween the swingarm and the horizontal x axis denoted
by β . For the Honda CBR600RR motorbike, the result-
ing linearized kinematics for the model with swingarm
can be found as,
x = vcosψ ; y = vsinψ
ψ =−7.7×108 vδ
cosϕ
[l3(β +132.1)2 −4253l2(β+
75.8)(β +132.1)+5×106l(β 2 +195.3β +8925.6)
−9.6×108(β 2 +516.7β +53326.4)]2[l(β+
132.1)−1959.5(β +150.3)]−3 [l2(β +132.1)
−2293.4l(β +12.2)+487247(β +366.4)]−3
(2)
Equation (2) provides a realistic kinematics that can
easily be simulated.
A damping model can be easily obtained assuming
that the suspension elements are described by two com-
mon second order models for the front suspension and
for the back suspension respectively:
Ff = lm f + lc f + lk f
Fr =d2
dt2 (578.5sinβ )mr +ddt(578.5sinβ )cr
+578.5sinβkr
(3)
where l is front fork length, β is the swingarm angle,
m f and mb the suspended masses at front and back,
cr,c f the friction coefficients, kr,k f the elastic coeffi-
cients, and Ff ,Fb the forces applied on the forward and
back suspensions by the contact with the road.
An important effect in a motorbike model is that of
the change in the wheel radius as the bike leans in a
corner, caused by the cross section shape of the tyres.
As the motorbike leans (ϕ angle) the distance between
the wheel center and floor decreases. To include the
variation in the model one must define the bike speed
as Rrθr and specify Rr as a function depending on ϕ ,
Rr = rt cosϕ + rw cosarcsin(rt
rwsinϕ) (4)
where Rr is real wheel radius, rw = 227.7 mm and
rt = 87.2 mm for the Honda CBR600RR motorbike.
2.2 A double swingarm model
An interesting case of motorbike geometry is the dou-
ble swingarm system. It has seldom been used in pro-
duction bikes, the Yamaha GTS 1000 (Figure 3) and
Bimota Tesi, and even racing applications, which in a
sense tend to use more extreme designs, has a single
known case, the Elf 500cc, raced during the 80’s decade
The reason for developing such an innovative geome-
try has mostly been argued by manufacturers to be the
intent of separate the steering dynamics and damping
ones and eliminating the λ angle and trail.
3
Figure 3: Yamaha GTS 1000
However, one can look for a completely different
argument, based solely on the kinematics design, as it
will appear among the kinematics simulation results.
Figure 4: Double swingarm geometry
The new model geometry is illustrated in Figure 4.
Following this diagram, kinematics equations can be
calculated as a modification of the conventional model
ones,
x = vcosψ ; y = vsinψ
ψ =θgrRrδ
wcosϕ; w = scosβ + s2 cosβ2 +231
(5)
2.3 Kinematics simulations
The models obtained in the previous sections were sim-
ulated in Matlab, where the complete model is used,
with front and rear suspension and pneumatic shape ef-
fect.
Some interesting intermediate results can be ob-
served after the kinematics simulation; for example the
fact that when the driver brakes while turning, the equi-
librium leaning angle becomes smaller. In other words,
when braking during a curve, rotating speed increases,
which means that the driver can turn with a smaller ra-
dius curve.
In the experiments, simulating braking means that
l decreases 60mm approximately, whereas β augments
1.6 after some little oscillations. Another significant
issue is the fact that, although θ engine speed is con-
stant, forward velocity decreases when Rr rear wheel
radius is also decreasing due to increasing ϕ leaning
angle, owing to the tyres shape effect.
Simulations of the double swingarm model have
been run under the same conditions as in the previous
experiments. The main characteristics of the simulation
results remain very similar to the conventional motor-
bike ones. However, the effects of hard braking on driv-
ing variables are not as subject to oscillation as they are
in the front fork motorcycle model.
This is due to the fact that in brake conditions the
front swingarm angle decreases whereas the rear one
increases. As in a conventional motorbike, inclina-
tion angle during the path will depend on the wheel-
base value. The big difference is that wheelbase will
now tends to increase due to the decreasing of front
swingarm angle and in the meanwhile will tend to de-
crease due to the augment of rear swingarm angle, as it
can be seen in Figure 4. This fact leads to a non-direct
relation between the loads distribution and the wheel-
base value, which means also a different behavior of
motorbike leaning. As a consequence, when braking
hard, ψ is less disturbed, leading to a smaller wobbling
4
phenomena (Figures 5 and 6).
Figure 5: Braking effect on ψ for the conventional motorbike model
Figure 6: Braking effect on ψ for the double swingarm model
3 Dynamics
3.1 Kinetic energy
The motorbike dynamics model in this chapter is de-
veloped using the Lagrangian approach. In the first
step the free Lagrangian is computed from the total ki-
netic energy. The kinetic energy in the motorbike is
due to any moving component, namely frame, engine
and wheels. It is assumed that energy associated to el-
evation changes can be neglected. Some kinetic ener-
gies will not be included in the system because their
values can be assumed to be irrelevant in comparison
with the included ones. For example, the translation
energy of the front and rear suspensions, the rotational
energy of the swingarm and the front fork and the trans-
lation energy of the engine pieces are not included. The
kinetic energy is thus calculated through following ex-
pressions,
Kϕψ =12
Ω A Ω =12
(ϕ ψ
)m
h2 hb
hb b2
ϕ
ψ
Kxy =
12
(x y
)m
x
y
K
θ f=
14
m f r2f θ
2f ; K
θr=
14
mrr2r θ 2
r ; Kθ=
14
mmr2mθ 2
(6)
where Ω is the angular speed vector, A is the inertia ma-
trix, which depends on the distances between mass cen-
ter and the rotating axis (h = h(l,β ) and b = b(l,β ) are
coordinates of total mass center), m is the total mass,
m f is the front wheel mass, mr is the rear wheel mass,
mm is the engine’s rotating part mass, r f is the front
wheel radius, rr is the rear wheel radius, rm is the en-
gine’s rotating part radius, θ f = θ f (θ ,ϕ) is the front
wheel angular speed, θr = θr(θ) is the rear wheel an-
gular speed, θ is the engine angular speed. All masses
and inertias are simplified as point-masses (m) or thin
disks (m f , mr and mm).
To complete the equations system that represents
the dynamic model, the kinematics model of section 2
will be used, in addition to some other kinematic equa-
tions:
x = θgrRr cosψ ; y = θgrRr sinψ
θ f =θgrRr
cosδ r f; θr = grθ
(7)
Where gr is the rear wheel-engine angular speeds ratio.
The kinetic energy is therefore calculated with the
5
following equations,
K = Kϕψ +Kxy +Kθ f+K
θr+K
θ
K =m(ϕh+ ψb)2
2+
mR2r θ 2
mgr2
2+
m f R2r θ 2
mgr2
4cos2(δ cosγ)
+mrr2
r θ 2mgr2
4+
mmr2mθ 2
m
4(8)
3.2 Lagrangian
Following the Lagrange method procedure, the dynam-
ics equations are obtained by calculating the kinetic en-
ergy derivatives.
ddt
∂K∂ ϕ
− ∂K∂ϕ
= Γϕ ;ddt
∂K∂ θ
− ∂K∂θ
= Γθ (9)
This system of equations can also be written in matrix
form,
M
ϕ
θ
+V = τ (10)
The dynamics model obtained from the free, that is un-
constrained, Lagrangian it is required to account for the
constraints imposed by the kinematics of the bike and
the contact with the ground. Motorbike dynamics falls
under the general class of constrained multibody me-
chanical systems, but in a real motorbike the variety
of situations rends difficult the identification of these
constraints. Therefore a common strategy when identi-
fying constrained dynamics is to rely on a priori knowl-
edge on the physical effects affecting the vehicle.
The external forces/torques, τext , are thus simpli-
fied and they will be considered the direct consequence
of the reaction forces applied on the center of the to-
tal mass. As it has already been used in [1], contact
forces, which is calculated at each instant and depends
on the global system state, are now reduced to the sum
of gravitational and centrifugal forces that the motor-
bike receives in the contact points between the wheels
and the floor referred to the center of mass. These
forces are calculated as,
N = mg ; T = mRrgrθ ψ (11)
where N is the vertical force due to gravitation and de-
pends on the total mass, m, and the gravitational accel-
eration, g. T is the centrifugal force mainly due to ψ
rotating speed. These forces are applied ideally on the
motorbike total mass center, and have to be related to
ϕ as torques,
M
ϕ
θ
+V =
Γϕ
Γθ
+ Nhsinϕ −T hcosϕ
0
(12)
3.3 Dynamics simulations
After having implemented it, the dynamics model must
be validated before being used for control analysis. To
this purpose, several tests have been made, encom-
passing different situations. Namely, the spectrum of
simulation comprehends diverse torques applied by the
driver, starting conditions, external forces and driving
environments.
Some special tests have been made to complete the
study of the model behavior. For example some simula-
tions without gravity force or without centrifugal force
show the torque related to the gyroscopic effect. This
negative torque is due to the system’s tendency of con-
serving the inertial moment. In fact, when the wheels
and the engine are rotating in y direction while motor-
6
bike is turning around z axis, a torque in x appears as
results of the following equation:
Γgyroscopic = Ω×A Ω (13)
where Ω is the vector of the angular speeds and A is the
inertia matrix.
4 Control
4.1 Motivation
The control system has been designed using a con-
trol strategy that can mimic the behavior of a human
rider. Humans ride bikes, motorbikes, drive cars using
a relatively simple set of principles; namely, estimat-
ing information on (i) the current state of the vehicle,
(ii) the expected variation in the state, and (iii) the rid-
ing/driving history. These have close relations with the
well known PID structure.
Basically, there are two values that have to be con-
trolled: firstly the error between the real ψ angle and
the one that corresponds to the trajectory to be followed
by the motorbike and secondly the sum of the torque
due to the centrifugal force, the one due to the gravity
force and the gyroscopic ones.
A human rider has available four actuation points.
The first is the engine torque, which is strongly con-
nected to the forward velocity. Braking actions can be
also represented with the engine torque variable1. The
second actuation point is the steering angle in the front
fork, imposed by applying a torque through the handle-
bar. The third point is the torque applied through the
footpegs, used by riders to control the leaning angle.
The fourth point is the mass center position variation on
y axis, obtained by changing the position of the body,
namely the contact of the upper torso with the seat and
the position of the legs.
4.2 PID simulations
To implement this PID control additional Matlab code
was implemented. The results for the empirical con-
trol simulations show that with well-chosen P, D and I
values, the motorbike follows a reference trajectory.
Many driving conditions have been simu-
lated. For example, when the forward veloc-
ity is 100km/h and the curve radius is 50m, the
system manages to control the motorbike thanks
to some specific PID parameters and the equilib-
rium is reached with δ = 1.218 and ϕ = 53.37.
Figure 7: Autonomous driving during a 50m-radius curve. Leaning angle
[] (red); forward velocity [Km/h] (green); rotation speed [/s] (blue); steer-
ing angle [10x] (magenta); equivalent mass for ϕ-torque [Kg] (black)
1In fact, the current motorbike engines have excellent motor-braking properties.
7
The system response can be modified by changing
the values of the PID control constants. Many further
driving condition have been simulated with several PID
parameters in order to study the the model functioning.
The six control constants have to be carefully chosen in
order to avoid the diverse negative effects that appears
after having assigned both excessively small or exces-
sively big values.
5 Results
The first three curves of the Montmelo circuit, located
in the outskirts of Barcelona, Spain, have been chosen
to simulate the model in realistic conditions. The con-
trol model can thus be tested in fast and slow curves,
left and right rotation, under braking and accelerating
conditions. The simulation must analyze if the control
strategies are able to make the motorbike follow the cir-
cuit path by changing the values of control variables δ
and Γϕ .
The circuit has been simulated with control con-
stants that have been empirically found using a trial
and error strategy until acceptable results have been ob-
tained. This strategy reflects in some sense the driving
learning by a human rider. In fact, by changing the con-
trol parameters for each circuit section, the trajectory is
gradually improved in order to make coincide the mo-
torbike trajectory with the curves of real path
The evolution of the variables during the simula-
tion is shown in Figure 8. Γϕ torque has been limited
to a correspondent feet force of 280Kg because that is
the approximate limit of human applicable force. The
engine torque will be set in order to obtain forward ve-
locities (green line) that are normally used in each sec-
tion of the circuit. The steering angle δ (magenta line)
and rotation speed ψ (blue line), that are strongly re-
lated with each other, respond as a second degree sys-
tem reaching the final value after a delay time of ap-
proximately 1s. The inclination angle ϕ (red line) has
a smooth evolution when its value is modified. The
values for permanent δ variable respect the kinematic
equations, since the system search the equilibrium posi-
tion for a determined curve at a concrete speed. These
values are approximately 1.6 degrees in the first two
curves and 0.8 in the third faster curve.
The torque Γϕ (black line) appears when entering
in the first curve and decreases gradually after having
managed to incline the motorbike. The torque does not
disappear after having arrived to the required leaning
because the forward speed is constantly increasing. A
greater torque is also needed after the curve in order to
recover the vertical position.
Controlled model has been also simulated in other
conditions, such as without forces limitations and with
leaning angle borderline of 60.
6 Conclusions
During this study a great improvement in the motorcy-
cle modeling has been made. The major achievements
of the thesis can be assessed on the one side to the kine-
matics and dynamic equations that model the motor-
bike system, and on the other side to the results of the
controlled model simulations.
8
Figure 8: Autonomous motorbike under PID-based control. Leaning angle [] (red); forward velocity [Km/h] (green); rotation speed [/s] (blue); steering
angle [10x] (magenta); equivalent mass for ϕ-torque [Kg] (black)
The kinematics model can be considered highly re-
alistic thanks to the gradually incorporated improve-
ments (the front fork inclination, the damping sys-
tem with the consequent variable front fork length and
swingarm angle and the pneumatic shape effect on the
real back wheel radius). The results reveal some inter-
esting aspects. One of this item is the fact that the pneu-
matic shape causes a variation in the forward speed
when the motorcycle inclines. Moreover, changes in
suspensions loads affect the equilibrium kinematic po-
sition. During hard braking, the load on the front wheel
augment whereas the one on the back wheel decreases
and, as a consequence, geometry variation produce a
change on the relation between leaning angle and steer-
ing angle. The simulations show indeed that leaning
angle is smaller when braking, so that, in that case,
maintaining a curved trajectory would require a minor
torque on the inclination direction as dynamic analysis
will explain.
Besides, a kinematic model for the motorbikes
based on a double swingarm damping system has been
developed. The results of the different simulations,
along with some empirical and intuitive considerations,
expose advantages and disadvantages of this particular
kind of motorcycles. A benefit is the fact that when
the loads on the wheels change (i.e. when braking or
accelerating) some variations appear in the swingarms
angles, which could compensate each other in terms of
maintaining the wheelbase length constant. In addition,
tensions received by the system from the floor are not
transmitted directly to the driver’s hand, since there is
no front fork and steering angle is independent form
the damping system. Contrary to these features, some
maneuverability is lost due to the fact that the angle of
the front wheel is not directly controlled anymore, but
a complex systems of special bars transmits the move-
9
ment of the handlebars to the wheel.
The dynamics model was obtained through the La-
grangian method based on the kinetic energy of the sys-
tem. After having calculated the free Lagrangian equa-
tion system, model has been completed with the incor-
poration of the external forces due to the contact be-
tween the motorbike and the floor. The model has been
finally validated with several simulations that tested di-
verse driving situations. The results of the simulations
show the validity of the model and demonstrate how
the equilibrium position is reached or lost by the sys-
tem by modifying the variable values. Moreover, they
explain the importance of each one of the dynamic and
kinematic variable for the system and how they affect
the behavior of the motorbike.
The system by itself is unstable, because it is not
capable of maintaining the equilibrium position for the
driving situation. Therefore a PID control has been de-
signed. The objective of the feedback control is on the
one side to eliminate the difference between the torque
due to the centrifugal effect, the gravitational force and
the gyroscopic one by applying a torque that corre-
sponds to the change of the mass center position pro-
duced by the movement of the driver’s body; on the
other side the steering angle attempts to remove the er-
ror that appears between the rotation of the bike end the
trajectory to be followed.
The final model has been finally tested on a real
driving situation. The behavior of the motorbike model
has been simulated in first part of the circuit of Mont-
melo, where a rich variety of driving conditions can be
found.
The arrival point of this thesis can be considered
the starting one for several further developments. Pos-
sible future work should extend the control implemen-
tation to all feasible situations in order to ensure stabil-
ity and performance requirements, namely in the fully
autonomous motorbike scenario.
References
[1] David J.N. Limbeer and Robin S. Sharp Bicy-
cles, Motorcycles, and Models IEEE Control
Systems Magazine, October, 2006
[2] Karl J. Astrom, Richard E. Klein, Anders
Lennartsson Bicycle Dynamics and Control
IEEE Control Systems Magazine, pp 26-47, Au-
gust 2005
[3] R.S. Sharp and S. Evangelou and D.J.N. Lime-
beer Advances in the Modelling of Motorcycle
Dynamics Multibody System Dynamics, pp 251-
283, number 12, 2004
[4] A.A. Popov and S. Rowell and J.P. Meijaard A
review on motorcycle and rider modelling for
steering control Vehicle System Dynamics, pp
775-792, volume 48, number 6, 2010
[5] A.L. Schwab and J.P. Meijard and J.M. Pa-
padopoulus Benchmark results on the linearized
equations of motion of an uncontrolled bicycle
Proc. 2nd Asian Conf. Multibody Dynamics, Au-
gust 2004
[6] Francesco Vitale and Gabriele Virzı Mar-
iotti Innovative progressive suspensions
http://www.atnet.it/lista/casuni.htm, 2007 [On-
line]10