You are on page 1of 8

LINEAR MODELLING AND IDENTIFICATION OF A MOBILE

ROBOT WITH DIFFERENTIAL DRIVE

Patrı́cia N. G UERRA ∗ Pablo J. A LSINA ∗ Adelardo A. D. M EDEIROS ∗ Antônio P. A RA ÚJO∗


Federal University of Rio Grande do Norte – Departament of Computer Engineering and Automation
UFRN-CT-DCA – Campus Universitário – 59072-970 Natal RN Brazil
patricia,adelardo,pablo,toinhojr@dca.ufrn.br

Keywords: Nonholonomic robots, robot control, stabilization control, linear modeling of robots.

Abstract: This paper presents a modelling and identification method for a wheeled mobile robot, including the actuator
dynamics. Instead of the classic modelling approach, where the robot position coordinates (x, y) are utilized as
state variables (resulting in a non linear model), the proposed discrete model is based on the travelled distance
increment ∆l. Thus, the resulting model is linear and time invariant and it can be identified through classical
methods such as Recursive Least Mean Squares. This approach has a problem: ∆l can not directly measured.
In this paper, this problem is solved using an estimate ∆l f based on a second order curve approximation.
Experimental data were colected and the proposed method was used to identify the model of a real robot.

1 Introduction method (RLMS) is presented by Pereira (Pereira,


2000; Pereira et al., 2000). As the model to be iden-
Usually, realistic mathematical models of mobile tified through RLMS is non linear, a simplification is
robots are obtained through the physics laws that gov- used: the orientation θ(t), which is time-variant, is
ern their behavior. Approaches applying artificial in- considered constant during each sampling period.
telligence techniques to the input and output measure- In this work a linear (not a linearized one) dynamic
ments are also utilized. Several model types were de- model for mobile robots is presented. The proposed
veloped for non holonomic mobile robots. LTI (linear model is equivalent to the non linear dynamic model,
time invariant) models are usually obtained through commonly adopted for non-holonomic mobile robots
Taylor series linearization on only one point of opera- (Yamamoto et al., 2003). The proposed model uses
tion of the system. A QLPV (quasi-linear parameter- the variable ∆l, distance traveled by the robot during
varying) model for a car-like robot is presented in the a sampling interval, instead of the traditional mod-
literature (Economou et al., 2002). elling, where its absolute position is used (x, y). The
The classic mathematical model of a mobile robot problem due to the impossibility of measuring the
has a structure similar to the mathematical model of traveled distance ∆l during a sampling period is over-
robot manipulators, so that techniques of parametric come through the use of an estimate, ∆l,f of this value.
identification developed for the latter can be adapted The identification of this discrete dynamic model is
for the former. However, most of these techniques as- attained using a classic method of identification of lin-
sume that robot speed and acceleration measurements ear systems, the recursive least mean squares.
are available, which is not generally true.
Differently of the identification techniques for ma- The rest of this paper is organized as follows. Sec-
nipulators, enough discussed in the literature (Poignet tion 2 describes the robot and its modelling by the
and Gautier, 2000; Efe et al., 1999), the mobile equivalent linear and non-linear models. Section 3
robot identification techniques have been less stud- presents the proposed calculation method for a nu-
ied. An identification of the dynamic model of a meric value of the immeasurable variable ∆l. In sec-
micro-robot using the recursive least mean square tion 4, experimental results validating the proposed
approach are shown. Finally, in section 5, the ob-
1
The authors received partial financial support of the tained results are discussed and the conclusions and
Brazilian agencies CAPES and CNPq. future perspectives are presented.
2 Robot Modelling and left motors, K is the matrix which transforms the
electrical signals u into forces to be generated by the
Figure 1 presents a diagram of the kind of robot robot wheels, M is the generalized inertia matrix and
we consider in this work. The robot has two wheels, B is the generalized damping matrix, which includes
driven by two independent electric motors. The terms of viscous friction and electric resistance.
wheels are placed at each side of the robot, in such
a position that their rotation axis are coincident. The 2.3 Equivalent Linear Model
robot configuration is represented by the position of
the center of the axis between the two wheels in the The complete robot model, obtained from the union of
Cartesian space (x and y) and by its orientation θ (an- equations 1 and 2, can be represented by the following
gle between the vector of the robot orientation and the state equation:
abscissas axis).    ..
 
v̇ −M −1
B . 0 v
 
 ω̇   . . . . . . . . . . . . . . .   ω 
 ẋ    
 = cos(θ) 0 .  x 
v  ẏ    sin(θ) 0 .. 0  y  
θ,ω θ̇ 0 1 θ
y  
M−1 K · ¸
er (3)
+ ....... 
el
0
x  
v
" #
Figure 1: Robot modelling 0 0 1 0 0  ω 
 
y= 0 0 0 1 0  x 
0 0 0 0 1  y 
θ
2.1 Cinematic Model where the system output y = [ x y θ ]T corre-
sponds to the robot configuration.
The cinematic model describes the relations between To allow the application of linear discretization
the derivatives of robot position and orientation and techniques, we will rewrite the system equations into
the robot linear and angular speeds, v and w, without a linear representation of the robot dynamic behav-
taking into account the causes of its movement: ior. To attain this objective, we need to change the set
  " # · of state variables: the robot’s configuration, given by
ẋ cos θ 0 ¸
 ẏ  = sin θ 0 · v (1) its position x and y and its orientation θ, will be de-
θ̇ 0 1
w scribed in terms of the robot linear displacement l and
the robot orientation θ.
This equation models the non-holonomic restrictions    
of the robot, due to the fact of its wheels not allowing . 
v̇ −M−1 B .. 0 v
lateral movements.  ω̇    ω 
   ............. 
 l˙  =   l 
1 0 ..
2.2 Dynamic Model θ̇ 0 1
. 0 θ
 
The dynamic model is derived from the physics laws M−1 K · ¸
+ ....... 
er (4)
that govern the several robot subsystems, including el
the actuator dynamics (electric and mechanical char- 0
acteristics of the motors), friction and robot dynamics  
· ¸ v
(movement equations). The derivation of this model 0 0 1 0  ω 
for a small mobile robot (Vieira et al., 2001) was pre- z=
0 0 0 1  l 
sented by Yamamoto (Yamamoto et al., 2003). θ
For most robots, the modelling process generates a The new state equation 4 has the same dynamic
second-order model expressed by equation 2: parameters than the original state equation 3 but a
Ku = Mv̇ + Bv (2) new system output z = [ l θ ]T . We observe
that the linear equivalent model was obtained with-
where v = [ v w ]T represents the robot linear and out any simplification assumption. In this way, the
angular speeds, u = [ er el ]T contains the input linear model is an exact equivalent representation of
signals (usually armature tensions) applied to the right the original non-linear representation in equation 3.
2.4 Model Discretization 3.1 Path Length Computation

To allow the application of the classical estimation It is possible to obtain with reasonable precision the
techniques, it is necessary to derive a discrete transfer robot configuration (x, y, θ) in two consecutive sam-
function equivalent to the model in equation 4. The pling instants, but we cannot be sure about the path
first step is the transformation of the state space form traveled by the robot between the first configuration
into a continuous transfer matrix: and the second configuration. However, a parametric
· ¸ · ¸ · ¸ curve (x(λ), y(λ)), 0 ≤ λ ≤ 1 can be interpolated
L(s) G11 (s) G12 (s) Er (s) between these points and the length of this curve can
= · (5) f (see figure 2).
θ(s) G21 (s) G22 (s) El (s) be used as an estimated value of |∆l|

where each term Gij (s) has the following structure:

Nij (s) αij s + βij 1st degree


Gij (s) = = y1 polynomial
D(s) 2
s(s + k1 s + k2 )
λ=1
In the second step, we calculate the four discrete y0
transfer functions Gij (z): 2nd degree
λ=0 polynomial
· ¸ · ¸· ¸
L(z) G11 (z) G12 (z) Er (z) x0 x1
= · (6)
θ(z) G21 (z) G22 (z) El (z)
f computation
Figure 2: Diagram for |∆l|
where each term Gij (z) has the following structure:
Adopting a 1st order polynomial to interpolate, we
Nij (z) γij z 2 + δij z + ²ij
Gij (z) = = are using the Euclidean distance as a measure of the
D(z) (z − 1)(z 2 + α1 z + α2 ) length of the traveled distance. However, this solution
violates the non-holonomic constraints of the system
To obtain a parametrisation appropriated to the pa- when the traveled path is not a straight line.
rameter estimation, the transfer functions are con- In this work, we used a parametric curve of 2nd
verted to equivalent difference equations: f because
degree to calculate the absolute value of ∆l
∆lk = − α1 ∆lk−1 − α2 ∆lk−2 + (7) this is the simplest polynomial allowing interpolating
between the two configurations without violating the
+ γ11 er,k−1 + δ11 er,k−2 + ²11 er,k−3 +
non-holonomics
 constrains at the contour conditions:
+ γ12 el,k−1 + δ12 el,k−2 + ²12 el,k−3  x(λ) = a 2 λ2 + a 1 λ + a 0


∆θk = − α1 ∆θk−1 − α2 ∆θk−2 + (8) 
y(λ) = b2 λ2 + b1 λ + b0
+ γ21 er,k−1 + δ21 er,k−2 + ²21 er,k−3 + (9)

 dy/dλ 2b2 λ + b1
+ γ22 el,k−1 + δ22 el,k−2 + ²22 el,k−3 
 tan[θ(λ)] = d(λ) = =
dx/dλ 2a2 λ + a1
where ∆lk = lk − lk−1 is the linear distance traveled 

 x(0) = x0 = a0
in a sampling period, ∆θk = θk − θk−1 is the an- 
 y(0) = y = b0

 0
gular increment in the robot’s orientation in the same 
 x(1) = x1 = a2 + a1 + a0
period, and er,k and el,k are the plant input signals. y(1) = y1 = b2 + b1 + b0 (10)

 d(0) = tan(θ ) = b /a

 0 1 1

 2b2 + b1

 d(1) = tan(θ1 ) =
3 Traveled Distance Computation 2a2 + a1
Solving the system 10 results in the following gen-
eral 
solution:
The variable ∆l is not measurable. In spite of this,
 a0 = x 0
we can use heuristics to calculate a plausible value 


f The methodology developed to 
 2[tan(θ1 )(x1 − x0 ) − y1 + y0 ]
for this variable, ∆l. 
 a1 =
f 
 tan(θ1 ) − tan(θ0 )
calculate ∆l consists of the following steps: 
a2 = x 1 − x 0 − a 1 (11)
f
1. calculation of the path length |∆l| 


 b 0 = y 0


2. calculation of the direction of the movement, i.e. 
 b1 = a1 tan(θ0 )

f
the sign of ∆l 

b2 = y 1 − y 0 − b 1
0.002
calculated from non-linear simulation
0.0015 linear simulation

0.001

0.0005

0
delta_L(m)

-0.0005

-0.001

-0.0015

-0.002

-0.0025

-0.003
0 50 100 150 200 250 300 350 400
number of iterations

f and ∆l
Figure 3: Comparison between ∆l

Similar solutions can be found for the singular 0


cases where θ0 or θ1 have values close to ± π2 . x1
To calculate the length of this curve, we used: y1
Z 1r
g dx dy θ0
|∆l| = ( )2 + ( )2 dλ (12)
0 dλ dλ y0
dx dy
Substituting and in equation 12 we obtain:
dλ dλ
Z 1p x0 x1
g =
|∆l| Aλ2 + Bλ + C dλ (13)
0 f
Figure 4: Diagram for calculating the sign of ∆l
where  2 2
 A = 4a2 + 4b2

B = 4a1 a2 + 4b1 b2 (14) 3.3 Validation of Traveled Distance


Computation
2 2
C = a 1 + b1
The closed solution for the integral in equation 13
can be found in integral tables.
Several tests were performed to validate the approxi-
3.2 Computation of the Movement mation of ∆l by ∆l.f We simulated the linear system
Direction described by equation 4 and the non-linear system de-
scribed by equation 3 with the same input values (er
To obtain the sign of the traveled distance, i.e. know- and el ), obtaining as outputs, respectively:
ing if the robot moved forward or backward, we cal- " #
· ¸ x
culate the value of 0 x1 , the x coordinate of the cur- l
rent configuration point (x1 , y1 ) calculated with re- z= and y= y
θ
spect to the reference frame attached to the previous θ
robot position (x0 , y0 ), as indicated in the figure 4.
If 0 x1 is positive, the robot will have moved forward After this, we plotted the values of ∆l = lk − lk−1 ,
and ∆lf > 0. Otherwise, the robot will have moved generated by the linear system, and ∆l,f which was
backward and ∆l f < 0. calculated using the x and y outputs generated by
A simple coordinate transformation allows the cal- the non-linear system and the proposed approxima-
culation of 0 x1 : tion. From figure 3, we can observe that ∆l f (esti-
0
x1 = x1 cos θ0 − x0 cos θ0 + mated value) is very close to the actual distance trav-
(15) eled by the robot (∆l). The mean error was 0,058%,
+ y1 sin θ0 − y0 sin θ0 with a standard deviation of 0,274%.
4 Experimental results 5 Conclusion

The results presented in this section were obtained We proposed the substitution of the robot position
using a small (7.5 × 7.5 × 7.5cm) mobile robot, with variables (x, y) by the distance traveled in a sampling
two wheels driven by two independent DC motors, period ∆l. This substitution resulted in an equivalent
very used in robot soccer competitions. A detailed exact linear dynamic model, suitable for identification
description of the robot can be found in precedent ar- through the standard linear systems methods. More-
ticles (Vieira et al., 2001). over, the linearity of the proposed model allows its ap-
plication on the design of dynamic controllers based
The inputs signals er and el are the armature volt- on classic linear discrete techniques, as proposed by
ages of the right and left DC motors. The system out- Vieira (Vieira et al., 2004).
put y = [ x y θ ]T is measured by processing It can be observed that, in spite of the fact that the
the image from a fixed camera placed over the robot identified model have been defined in the discrete do-
workspace (Aires et al., 2001). We use a sampling main, there is no impediment of obtaining the contin-
rate of 30 samples per second, fixed by the image ac- uous model from the same, also allowing its use in the
quisition card. design of controllers in the continuous domain.
The classical method of Recursive Least Mean
Squares (Åström and Wittenmark, 1997) was utilized
for the estimation of the parameters of the model
(equations 7 and 8). The system was excited with REFERENCES
pseudo-random input signals, assuming values be-
tween 1.0 (100% of the motor supply voltage, 9V) Aires, K. R. T., Alsina, P. J., and Medeiros, A. A. D. (2001).
and -1.0 (-9V). As the robot has some high time con- A global vision system for mobile mini-robots. In
stants, the input values only changed at each 8 sam- SBAI - Simpósio Brasileiro de Automação Inteligente,
pling periods. To reduce the chance of high velocities, Canela, RS, Brasil.
the tensions near 0.0 were more probable than the ten-
Åström, K. J. and Wittenmark, B. (1997). Computer Con-
sions near ±1.0. troled Systems. Information and System Sciences.
Figure 9 shows the trajectory followed by the robot Prentice-Hall, EUA, 3 edition. ISBN 0-13-314899-8.
during an experiment with 500 samples. The resulting
Economou, J., Tsourdos, A., and White, B. (2002). Takagi-
estimated parameters are presented in table 1. sugeno model synthesis of a quasi-linear parameter
varying mobile robot. In IROS - IEEE/RSJ Interna-
α1 =-0.2125 α2 =-0.5362 tional Conference on Intelligent Robots and Systems,
ij γij δij ²ij volume 3, pages 2103–2108.
11 -0.0005195 -0.0005098 0.003019 Efe, M., Kaynak, O., and Rudas, I. (1999). A novel com-
12 -0.0001753 -0.001158 0.003347 putationally intelligent architecture for identification
21 0.01099 -0.02627 -0.03326 and control of nonlinear systems. In ICRA - IEEE In-
22 0.001818 -0.06038 0.1074 ternational Conference on Robotics and Automation,
volume 3, pages 2073–2077, Detroit, MI, USA.
Table 1: Estimated parameters Pereira, G. A. S. (2000). Identificação e controle de micro-
robôs móveis. Master’s thesis, Universidade Federal
de Minas Gerais, Belo Horizonte, MG, Brazil.
Figure 5 shows the measured and estimated val-
ues for ∆θ. The error in the estimation of ∆θ has Pereira, G. A. S., Campos, M. F. M., and Aguirres, L. A.
mean value of 0.000426rad and standard deviation of (2000). Modelo dinâmico para predição da posição
0.0685rad. Figure 6 shows the calculated values of e orientação de micro-robôs móveis observados por
f and the estimated values for ∆l. The error in the visão computacional. In CBA - Congresso Brasileiro
∆l de Automática, Florianópolis, SC, Brazil.
estimation of ∆l has mean value of -0.000297m and
standard deviation of 0.00261m. Poignet, P. and Gautier, M. (2000). Comparison of weighted
least squares and extended kalman filtering methods
To validate the generality of the obtained model, for dynamic identification of robots. In ICRA - IEEE
we calculate the estimation errors using the same pa- International Conference on Robotics and Automa-
rameters with a different trajectory (figure 10). Figure tion, volume 4, pages 3622–3627, San Francisco, CA,
7 shows the measured and estimated values for ∆θ USA.
(mean value of 0.00878rad and standard deviation of
Vieira, F. C., Alsina, P. J., and Medeiros, A. A. D. (2001).
0.0814rad) and figure 8 shows the calculated values Micro-robot soccer team - mechanical and hardware
f and the estimated values for ∆l (mean value of
of ∆l implementation. In Congresso Brasileiro de Engen-
-0.000435m and standard deviation of 0.00267m). haria Mecânica, pages 534–540.
0.4
measured
estimated

0.3

0.2

0.1

-0.1

-0.2

-0.3

-0.4
0 50 100 150 200 250 300 350 400 450 500

Figure 5: ∆θ measured and ∆θ estimated

0.03
measured(calculated)
estimated

0.02

0.01

-0.01

-0.02

-0.03
0 50 100 150 200 250 300 350 400 450 500

f calculated and ∆l estimated


Figure 6: ∆l

Vieira, F. C., Medeiros, A. A. D., Alsina, P. J., and ference on Informatics in Control, Automation and
Araújo Jr., A. P. (2004). Position and orientation con- Robotics, Setúbal, Portugal.
trol of a two-wheeled differentially driven nonholo-
Yamamoto, M. M., Pedrosa, D. P. F., and Medeiros, A.
nomic mobile robot. In ICINCO – International Con-
A. D. (2003). Um simulador dinâmico para mini-
0.8
measured
estimated

0.6

0.4

0.2

-0.2

-0.4

-0.6
0 50 100 150 200 250 300 350 400 450 500

Figure 7: ∆θ measured and ∆θ estimated

0.02
measured(calculated)
estimated

0.015

0.01

0.005

-0.005

-0.01

-0.015

-0.02

-0.025

-0.03
0 50 100 150 200 250 300 350 400 450 500

f calculated and ∆l estimated


Figure 8: ∆l

robôs móveis com modelagem de colises. In SBAI -


Simpósio Brasileiro de Automação Inteligente, Bauru,
SP, Brazil.
0.7
×500 ×450

0.5

0.3

×350
0.1 ×400
×50
×0

−0.1

×300
×250
−0.3
×200

×150
−0.5
×100

−0.7
−0.25 −0.21 −0.17 −0.13 −0.09 −0.05 −0.01 0.03 0.07

Figure 9: First example of system trajectory output

0.3

0.2
×150
×200

0.1
×300 ×450

×500
0 ×100 50
×
×0
×250

−0.1
×350

−0.2

−0.3 ×400

−0.4
−0.21 −0.17 −0.13 −0.09 −0.05 −0.01 0.03 0.07 0.11 0.15 0.19

Figure 10: Second example of system trajectory output

You might also like