You are on page 1of 4

Trajectory Tracking Control of a Differential

Wheeled Mobile Robot: a Polar Coordinates


Control and LQR Comparison
Jair Cornejo∗ , Student Member, IEEE, Jose Magallanes∗, Student Member, IEEE,
Eddy Denegri∗, Student Member, IEEE, and Ruth Canahuire∗, Member, IEEE
∗ Department of Electrical and Mechatronics Engineering, Universidad de Ingenieria y Tecnologia - UTEC, Lima - Peru
Email: rcanahuire@utec.edu.pe

Abstract—Wheeled mobile robots (WMR) must be designed WMR must present good performance in terms of trajectory
in order to achieve good performance in activities such as tracking for several specific tasks. For that purpose, it is
exploration, navigation, mapping, etc. For the development of recommend to use a suitable control methodology to satisfy the
the WMR, the type of locomotion and its holonomic and non-
holonomic constraints should be considered. Some alternatives of performance requirements [1]. A polar coordinates controller
the operational configuration of the robot are differential drive, is commonly used in differential mobile robots [4] [6]. This
Ackerman steering, or Omni-directional. In that context, this methodology consists in the direct control of the kinematic
work uses the differential drive configuration due to its simple variables reducing the error position of the robot. Furthermore,
mathematical model and low computational cost which allows for this approach includes the design of two controllers using
easy implementation of several specific tasks. The focus of this
work is the implementation of a trajectory tracking control for kinematic and dynamic models to achieve good performance
a differential mobile robot based on polar coordinates where it of the controlled system in terms of trajectory tracking. The
will be compared to an LQR controller. The controllers based on second control methodology used in this work is the Linear
polar coordinates and LQR were implemented in an experimental Quadratic Regulator (LQR). This controller is designed assign-
prototype of a differential mobile robot where the NI MyRIO ing weights to the matrices that define its cost function [7].
embedded hardware and the Labview Software were used. The
obtained results of the performance of the differential wheeled The weights of the matrices must be chosen in order to obtain
mobile robot for the designed controllers are shown and discussed a reasonable performance in terms of trajectory tracking error.
in this paper. Finally, this paper presents a comparison between a con-
Index Terms—Tracking control, Polar coordinates control, troller based on polar coordinates and the LQR controller
LQR controller, differential drive on a differential drive mobile robot where the performance
is presented in terms of trajectory tracking error. For the
I. I NTRODUCTION
experimental implementation process the NI MyRIO board
The technological advances in robotics have allowed an and the Labview software were used.
increase in application areas of terrestrial, aerial and hybrid
systems in the fields of agriculture, mining, fishing and other II. K INEMATICS
industrial tasks [1]. In this context, terrestrial robots can be The kinematics of the mobile robot are obtained considering
a suitable option when it is necessary to achieve a good the location of the wheels and the restrictions for each wheel
performance in the development of activities such as mapping, in the robot body. The mechanical configuration of the WMR
location, navigation or exploration [2] . Terrestrial robots presents two wheels that control the movement of the robot
are principally divided in wheeled robots, stationary robots and a wheel to ensure stability as is shown in Figure 1.
and legged robots, according to their type of locomotion In a nonholonimic robot, wheels present parallel and per-
[4]. Wheeled robots are commonly used in activities where pendicular restrictions to the movement which can be obtained
velocity, manoeuvrability and equilibrium are required [3] [2]. as [4]:
Some of the classical operational configurations of the • Parallel restriction to the movement:
WMR are classified in differential drive, Ackerman steering,
lcos(µ) RR I
 
synchronous drive and Omni-directional drive [4]. A differen- −sin(γ + µ) cos(γ + µ) I ξ̇ + r ϕ̇ = 0 (1)

tial drive mobile robot presents 2-DOF where each actuator • Perpendicular restriction to the movement:
(motor) is located in the same shaft. One simple form of
lsin(µ) RR ˙I
 
characterizing its behavior in terms of trajectory tracking is cos(γ + µ) sin(γ + µ) I ξ = 0 (2)
based on the use of the kinematic model of the robot with the where γ is the angle between the spin center and the center of
dynamic model of the motors, allowing to design the controller the wheel (see Figure 2), µ is the rotation angle of the wheel,
with a low computational cost [5]. l is the distance between the spin center and the center of the
c
978-1-5386-5491-0/18/$31.00 2018 IEEE wheel, r is the radius of the wheel, ϕ̇ is the angular velocity
   
1 0 b r 0  
1 0 −b R 0 r
 ˙  ϕ̇r
0 −1 0  ξ = 0 (7)
 
0 ϕ̇l
0 −1 0 0 0
where:    
1 0 b r 0
1 0 −b 0 r
A=
0
, B =  , (8)
−1 0  0 0
0 −1 0 0 0
 
  ẋ
Figure 1. Geometric distribution of WMR ϕ̇
ϕ̇ = r , ξ˙R = ẏ  (9)
ϕ̇l
θ̇
of the wheel, ξ˙I is the velocity matrix and RR
I is the rotation The restrictions are used to obtain the following forward
matrix. kinematics, ξ˙ = f (ϕ̇):
R
Aξ˙ = Bϕ̇ (10)

ξ˙R = A# Bϕ̇ (11)


˙
and the inverse kinematics, ϕ̇ = f (ξ):
R
Bϕ̇ = Aξ˙ (12)
R
ϕ̇ = B# Aξ˙ (13)

where # represents Moore-Penrose Pseudo-inverse.


Using (8) in the equations (11) and (13), the forward
kinematics is obtained as
r(ϕ̇r + ϕ̇l )
ẋ = (14)
2
r(ϕ̇r − ϕ̇l )
θ̇ = (15)
Figure 2. Parameters of the restriction 2b
and the inverse kinematics is defined as
For the right wheel is considered l = b, µ = 0, γ = −90◦. ẋ + bθ̇
Replacing these values in the equations (1) and (2), the ϕ̇r = (16)
r
following parallel (3) and perpendicular (4) restrictions to the
movement can be generated: ẋ − bθ̇
ϕ̇l = (17)
˙I r
1 0 b RR
 
I ξ + rϕ̇r = 0 (3)
III. D ESIGN OF C ONTROLLER WITH P OLAR COORDINATES
This approach is based on the use the polar coordinates of
−1 0 RR ˙I
 
0 I ξ = 0 (4) the WMR in order to achieve the position control of the robot.
For the transformation process to polar coordinates is defined
For the left wheel is considered l = −b, µ = 0, γ = −90◦
the following:
and the parallel (5) and perpendicular (6) restrictions to the p
movement equation obtained were: ρ = ∆x2 + ∆y 2 (18)

˙I ∆y
1 0 −b RR
 
I ξ + rϕ̇l = 0 (5) α = −θ + arctan( ) (19)
∆x
β = −θ − α (20)
−1 0 RR ˙I
 
0 I ξ = 0 (6)
where ρ represents the distance between the WMR and the
Using the equations (3), (4), (5) and (6), it can be written final position, ∆x is the distance between the reference point
as and the final position in the X-axis and ∆y is the distance
where x is the state space vector and u is the vector of control
effort.
The cost function (25) contains the Q and R matrices which
weigh the states and the control effort of the system. The LQR
method are based on the state space model of the plant as is
shown as follow.
x(k + 1) = Gx(k) + Hu(k) (26)
y(k) = Cx(k) (27)
The appropriate definition of the matrices Q and R allows
the penalties on the states of the plant and the control effort
respectively. In this context, the controller K can be obtained
of the solution of the Riccati equation as [7]
K = (HT SH + R)−1 (HT SG) (28)
where S > 0 is a symmetric matrix.
From the equation (28), the control law using LQR synthesis
can be calculated as
u(k) = −Kx(k) (29)
Figure 3. Robot kinematics and frames of reference
V. R ESULTS
The controllers designed were implemented in a prototype
between the reference point and the final position in the Y-
of a WMR. Considering the scheme of Figure 1, the value of
axis. As shows in Figure 3. Thus, the new polar coordinate
r is 0.06 m and the value of b is 0.275 m and the models
system is determined as
of the two motors of the WMR are defined in the space state
  
ρ̇ −cosα 0  
 form as
α̇ =  sinα −1 v
   
ρ (21) 0.6494 0.0084 0.3506
ω G= , H=
β̇ − sinα
ρ −0 −64.6204 0.5769 64.6204

The controller is designed so that the angular and linear


   
C= 0 1 , D= 0
velocities of the robot are the manipulated variables of the
controlled system. In this context, it should be considered that with the dynamic and kinematic models. Both control method-
the control system presents angular velocities controllers in ologies (polar coordinates and LQR) will be implemented
each wheel. Therefore, the polar controllers of the WMR can based on the scheme shown in Figure 4.
be defined as For the design of the controller using polar coordinates,
the following parameters were used with the objective of
v = kρ ρ (22)
obtaining a reasonable performance and ensuring stability of
ω = kα α + kβ β (23) the controlled system.
   
kρ kα kβ = 0.2 0.39 −0.1 (30)
where v and ω are the control efforts for the linear and angular
velocities, kρ , kα and kβ are the controller gains. Using the gain vector shown in the equation (30) in the
Finally, using (22) and (23) in (21), the closed-loop system closed-loop system presented in (24), the trajectory tracking
can be written as of the WMR to the circumference of radius 1 m is shown in
    Figure 6. It can be seen that the WMR follows the desired
ρ̇ −kρ ρ cos α trajectory with some trajectory tracking error. The maximum
α̇ = −kρ sin α − kα α − kβ β  (24) error obtained of the controlled system using polar coordinates
β̇ −kρ sin α is shown in Table I.
IV. L INEAR Q UADRATIC R EGULATOR For the design of the LQR, the weighting matrix Q and the
scalar R are defined as follow:
The LQR control method is an efficient technique and  
1 0 0
commonly used to design controllers of complex systems.  
Q = 0.98  0 1 0  , R = 30.2
This methodology tries to find a controller that minimizing
0 0 1
the following cost function [7].

Using Q and R in the equation (28), the gain vector K of
X
T T the LQR is:
J= (x[n] Qx[n] + u[n] Ru[n]) (25)
K = [−0.7824 0.01].
n=1
x
xd VRd + E1 U1
Generator of Inverse Forward
y
Kinematics VLd Controller DC Motors Kinematics
Trajectory yd E2 U2
(Wc , Vc ) + (Wc , Vc ) θ
- -
Desired Desired velocities of VR Measured
Trajectory the motors position of
VL the WMR
Measurement of the
motors velocities

Figure 4. Scheme of the trajectory tracking control

TABLE I
R ESULTS OF ERROR IN TERMS OF EUCLIDEAN NORM FOR THE
CONTROLLERS

Max Norm of error X (max error) Y (max error)


vector [m] [%] [%]
Polar control 0.198 15.08 12.76
LQR control 0.144 7.56 12.24

wheeled mobile robot based on kinematics models. The tra-


jectory control system was designed using the inverse and
forward kinematics of the WMR and the dynamic model of
the motors. The two control methods implemented in this work
Figure 5. Trajectory tracking of the robot using LQR controller in XY-plane
were used in the position control of the two DC motors.
The polar coordinates control and the LQR implemented
presented a reasonable performance in terms of trajectory
The LQR controller was implemented on an NI myRIO
tracking error ensuring stability of the closed-loop system. In
controller and programmed in LabVIEW with a sample time
this context, the LQR controller presents a maximum trajectory
of 10 ms.
error of 12,24% (Y-axis) which was lower than the polar
The trajectory tracking control of the WMR using LQR
coordinates control that presents a maximum trajectory error
is shown in Figure 5, where the desired trajectory was a
of 15,08% (X-axis).
circumference of 1 m of radius. In Figure 5, it is shown that
For this specific example, the LQR showed a better potential
the WMR follows the desired trajectory while presenting some
to achieve the trajectory tracking control with a reasonable
trajectory tracking error. The maximum error obtained of the
performance than using polar coordinates control. For future
controlled system using LQR is shown in the Table I.
works, the performance can be improved using robust methods
for the trajectory tracking, although it could lead to higher
computational cost.
ACKNOWLEDGMENT
The authors would like to thank to seed funding UTEC
2017.
R EFERENCES
[1] B. Siciliano,L. Sciavicco, L. Villani, G. Oriolo, Robotics Modeling,
Planning and Control 2009.
[2] E. Zamora Mao-building and planning for autonomous mavigation of a
mobile robot 2015.
[3] c. Delgado, R. Velzquez and C. Gutierrez, A Differential-Drive Mobile
Robot Driven by an Ethology Inspired Behaviour Architecture 2012.
Figure 6. Trajectory tracking of the robot using polar controller in XY-plane [4] R. Siegwart, I. Nourbakhsh and D. Scaramuzza, Introduction to Autonu-
mous Mobile Robots 2011.
[5] F. A. Salem, Dynamic and Kinematic Models and Control for Differential
Drive Mobile Robots 2013.
VI. C ONCLUSIONS [6] S. Kumar and J. Majumdar, Kinematics, Localization and Control of
Differential Drive Mobile Robot 2014.
The objective of this work was the comparison of two [7] O. Brian, Optimal Control : Linear Quadratic Methods 2014.
methods of control to achieve the trajectory tracking of a

You might also like