Nonlinear Control of A Single-Link Flexible Joint Manipulator Using Differential Flatness

You might also like

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

NONLINEAR CONTROL OF A SINGLE-LINK

FLEXIBLE JOINT MANIPULATOR USING


DIFFERENTIAL FLATNESS
Markus E, Didam∗ , John T. Agee∗, Adisa A. Jimoh∗ and Ngatho Tlale†
∗ Department of Electrical Engineering, Tshwane University of Technology, Pretoria, South Africa
Email:markused@tut.ac.za;ageejt@tut.ac.za;jimohaa@tut.ac.za
† Anglo-American, Johannesburg, South Africa

Email:Nkgatho.Tlale@angloamerican.com

Abstract—In this paper, a nonlinear feedback controller is trivializes exact linearization of nonlinear dynamics as is the
proposed for a single link flexible joint manipulator based on the case with robotic dynamics and can significantly reduce the
concept of differential flatness. The control design is approached burden of a robot control problem, as well as the computational
from the perspective of using input state feedback linearization
via the flatness property of the robot. It is shown that the overhead involved [8], [11].
nonlinear dynamics of the manipulator satisfies the controllability Flatness based control takes advantage of the nonlinear
and involutivity conditions required for the selection of a flat structure of the system by computing flat output(s) and their
output. With the flat output, trajectories of motion are generated. derivatives [7], [13]. The robot arm is made to follow the
A feedback controller is then designed to track the trajectories. trajectory of these outputs which are functions of its states and
Tracking results show the effectiveness of the proposed flatness
based control scheme. inputs [12], [14]. The diffeomorphic property of flat systems,
keywords: Flexible manipulator, Differential flatness, non- usually classified by endogenous feedback [14] enables system
linear control, trajectory tracking. trajectories to be generated thereby replacing the tedious
dynamical computations of such systems. The flexible joint
I. I NTRODUCTION manipulator arm will be modeled and controlled using its
The nonlinear control of flexible robotic arms has remained flatness property. Trajectories will then be generated and a
an active area of research. Flexibility in these arms are desired controller designed to track these trajectories as closely as
due to the obvious advantages of low inertia, lighter weight, possible.
lower energy consumption, faster movements, compliance,
low cost and wider reach. However, the challenge involved II. MATHEMATICAL MODEL
in the controller design of these robots lies in their flexible The model used for the study is the standard Quanser
nature which brings about undesired vibrations and deflections. flexible joint manipulator platform [15] shown in Fig. 1. The
Moreso, trajectory generation and tracking for these nonlinear robot is oriented vertically which introduces nonlinearities in
systems is quite tasking. The convention used in the design the spring. The robot arm is attached to the motor by two linear
of controllers for these class of systems is first to linearize springs in a tendon-like fashion. This results in flexibility at
the nonlinear dynamics of the manipulator by feedback lin- the joint. We define θ as the motor angular displacement and
earization [1]–[6]. This enables the use of linear techniques for α as the joint twist or link deflection. The position of the the
controller design. Such approach to controller design for the arm endeffector is given as the sum of the two angles (θ + α)
flexible manipulator leaves tracking errors since the nonlinear which is our generalized coordinates. The nonlinear dynamic
system dynamics are not fully captured in the design. model of the flexible joint robot is formulated using Lagrange
In this paper, the controller design for trajectory tracking of equations [16].
the flexible manipulator will be carried out using the differ- From the Lagrangian, the energy equation for the flexible
ential flatness approach. The technique of differential flatness manipulator is formulated as:
first introduced by Fliess et al. [7] has been successfully used
in motion planning and control for nonlinear systems [8]–[11]. L=K −V (1)
A major benefit of differential flatness based control is its abil-
ity to simplify trajectory planning and improve stabilization where
in task space [12]. A system is said to be differentially flat
when a set of variables (called flat output) equal in dimension K = Kh + Kl
to the number of inputs is found for a system such that all V = Vg + Vs (2)
the states and inputs of the system are expressible in terms of
1 2
these outputs and their higher derivatives. The flatness property Kh = 2 Jh θ̇ is the Kinetic energy of the hub

978-1-4673-5184-3/12/$31.00 ©2012 IEEE


Kl = 21 Jl (θ̇ + α̇)2 is the Kinetic energy of the load
Vg = mgh cos(θ + α) is the potential energy due to gravity
Vs = 12 Ks α2 is the potential energy due to the springs
where Jh and Jl are the motor and link inertia respectively.
m is the link mass, h is the height of the center of mass of
the link. Ks and g represents the spring stiffness and gravity
constant respectively.
The equations of motion will be:
 
d ∂L ∂L
. − =0 (3)
dt ∂ α ∂α
 
d ∂L ∂L
. − =τ (4)
dt ∂ θ ∂θ Fig. 1. Model of flexible joint robot manipulator
Solving equation (3) and (4), we obtain equation for the
Torque as:
The system in (9) is said to be differentially flat if there
..
Jh θ −Ks α = τ (5) exists a variable or set of variables y ∈ ℜm called the flat
output of the form:
The Torque of the motor is driven by the voltage applied
to the armature V. The relationship between Torque and the y = h(x, u, u̇, ü, ......, u(p) ) (10)
applied voltage is:
such that:
2
Km Kg Km Kg2 .
τ= V − θ (6) . .
Rm Rm x = α(y, y , y, ......, y (q) ),
.
τ
Where θ = w, i= Kg Km and V = iRm + Km Kg w and
. .
u = β(y, y, y , ......, y (q+1) ) (11)
We choose our state variables as:
p and q being finite integers, and the system of equations
θ = x1
d . .
α(y, y, y , ......, y (q+1) ) =
θ̇ = x2 dt
. . . .
α = x3 f (α(y, y , y, ......, y (q) ), β(y, y , y, ......, y (q+1) )) (12)
α̇ = x4 (7) are identically satisfied [13].
which can be written as: B. Determination of the Flat output
Choosing the tip position of the manipulator as [16]
ẋ =
y = x1 + x3
 
x2
2
 Ks Km Kg2 Km Kg 
x2 +  and representing the equations of motion in affine form:
Jh x3 − Rm J h V

 Rm J h 
x4
 
 
 2
Km Kg2 Km Kg
 ẋ = f (x) + g(x)u
mgh
−K
Jh x3 +
s
Rm Jh x2 − Rm J h V − Ks
Jl x3 + Jl sin(x1 + x3 )
(8) y = h(x) (13)
h . . iT
III. D IFFERENTIAL F LATNESS A NALYSIS OF T
where x = [x1 x2 x3 x4 ] = θ θ α α
M ANIPULATOR
A. Differential Flatness Overview with f and g being smooth vector fields.
Given a nonlinear system of the form:
 
x2
ẋ = f (x, u) (9)  Ks K2 K2 

Jh x3 − Rm g
m Jh
x2 
f =
 
where: x ∈ ℜn is the state vector and u ∈ ℜm is the input  x4


vector.  2
Km Kg2 mgh

−K
Jh x3 +
s
Rm Jh x2 − Ks
Jl x3 + Jl sin(x1 + x3 )
 T
Km Kg Km Kg One of the intrinsic properties of differential flatness is that
g= 0 0 − (14)
Rm Jh Rm Jh it allows for characterisation of the system by more than one
flat output, ie. the flat output for a system is not unique. Hence
and h(x) = x1 + x3
we are at liberty to select any of the variables to use for
characterizing the dynamics of the system. In this paper, x1
To determine the relative degree r of the fourth order system,
was chosen.
we employ the Lie derivative [17]. For a SISO system given
The simplest term of the state vector
by (13), the relative degree r at point x0 must satisfy the
following conditions [17]: ∂Z1 ∂Z1 ∂Z1 ∂Z1
6= 0, = 0, = 0, =0
∂x1 ∂x2 ∂x3 ∂x4
Lg Lk−1
f h(x) = 0 (15)
Therefore Z1 must be a function of x1 only.
0
∀x in a neighbourhood of x , k = 1..........m − 1 and Z1 = x1 and other states can be obtained from Z1 as:

Lg Lm−1
f h(x0 ) 6= 0 (16) Z1 = x1
Evaluating the Lie derivative on the vector fields of equation
Z2 = ∇Z1 f = x2
(14), we obtain the following set of equations:
2
y = h(x) = L0f h Ks Km Kg2
Z3 = ∇Z2 f = x3 − x2
. Jh Rm Jh
y = L1f + Lg (h)u = L1f h with Lg h = 0 2
Ks Km Kg2 4
Km Kg4 Ks
.. Z4 = ∇Z3 f = − x + x + x4 (19)
y= L2f + Lg (L1f h)u = L2f h with Lg (L1f h) =0 Rm Jh2
3 2 J2 2
Rm h Jh
y (3) = L3f + Lg (L2f h)u = L3f h with Lg (L2f h) = 0 from (19) the inverse of the state transformation gives the
original system variables:
y (4) = L4f + Lg (L3f h)u = V with Lg (L3f h) 6= 0 (17)
x1 = Z1
It can be seen from the above computations that equation
(14) easily satisfies the conditions in (15) and (16) hence the x2 = Z2
relative degree of the manipulator is 4 which implies that r = !
2
n, the order of the manipulator arm. We can now apply the Jh Km Kg2
x3 = Z3 + Z2
input state linearization conveniently to solve the flexible joint Ks Rm Jh
manipulator control problem. !
2
Checking for controllability and involutivity conditions; Jh Km Kg2
Using the definition of the Lie bracket of [f , g] represented x4 = Z4 + Z3 (20)
Ks Rm Jh
in the controllability matrix of the form:
The original variables in Equation (20) are well defined and
[g adf g ad2f g ad3f g] = differentiable everywhere. With the above transformation, a set
of linear equations is obtained as:
0 −ξ −λξ −λ2 ξ + µξ
 
2
ξ
 λξ λ ξ − µξ λ3 ξ − 2µλξ 
 Z˙1 = Z2
0
 2 
ξ λξ λ ξ − µξ − ξν
Z˙2 = Z3

2
−ξ −λξ −λ ξ + µξ + ξν −λ3 ξ + 2µλξ + λξν
(18) Z˙3 = Z4
Km Kg Ks Ks
where ξ = Rm J h , λ = Km Kg ξ, µ = Jh and ν = Jl
Z˙4 = v (21)
The above matrix is full rank and its vector fields are linearly
independent. Since the fields in the matrix are constants, The nonlinear flexible joint manipulator has been trans-
it shows that they are completely integrable and form an formed into an equivalent linear form of equation (21).
involutive set. The system is said to be input state linearisable Through this transformation (state and input), we will be able
and therefore differentially flat [18]. It should be noted that to stabilize the original dynamics of the manipulator using the
the involutivity condition is easily satisfied in the linear system control input u. This is done by stabilizing the newly designed
but not so for the nonlinear case [17]. dynamics v. Hence the linear control design tools for trajectory
Now we find the state transformation (diffeomorphism) tracking can now be applied to the flexible joint manipulator.
Z = Z(x) and the input transformation u = α(x) + β(x)V The input transformation is:
so we can express the system in normal form. The state
transformantion gives us the flat output F . v = α(x) + β(x)u (22)
such that u = β −1 (x) [v − α(x)], where
1
α(x) = − 3 J 3 Jl
(α4 x4 (t) + α3 x3 (t) + α2 x2 (t) + α1 )
Rm h
(23)
3
α1 = −Ks Rm Jh2 mgh sin(x1 (t) + x3 (t))
6 Fig. 2. Block diagram of input-state feedback linearization controller based
α2 = Km Kg6 Jl − Ks Rm
2 2
Jh K m Kg2 Jl on Differential Flatness
4
α3 = −Km Kg4 Jl Ks Rm + Ks2 Rm
3
Jh Jl + Ks2 Rm
3 2
Jh
2
α4 = Ks Rm 2
Jh K m Kg2 Jl hurwitz coefficients so that the polynomial P 4 +K3 P 3 +.....K0
has all its root strictly in the left complex plane leading to the
and 5
trajectory tracking error dynamics:
Km Kg5 Km Kg Ks
β(x) = 3 J3
− (24)
Rm h Rm Jh2 s4 + K 3 s3 + K 2 s2 + K 1 s + K 0 = 0 (27)
here v is the virtual input to be designed to place poles of Figure 2 shows the block diagram of the flatness based non-
the equivalent linear dynamics. And the physical input u is linear feedback controller design for the flexible manipulator.
computed using the corresponding input transformation. The resulting controller design is a multi-loop system. The
Since the system in equation (13) exhibits full state trans- inner loop linearizes the manipulator dynamics while the outer
formation, the flat output has been chosen as F = x1 . The loop stabilizes and tracks the trajectories.
differential flatness property of the system with this flat output
can be shown by expressing all states and input variables in A. Trajectories of Motion
terms of the flat output and a finite number of their derivatives. One key benefit of flatness based control is the simplifica-
Hence it can be seen from equation (20) that: tion of trajectory planning and tracking of these trajectories.
Using the flatness property of the manipulator, the desired
x1 = F trajectories of motion and the input required to track them
. from rest to rest could be solved as an interpolation problem
x2 = F
! without integrating the system equations. Newton interpolation
2
Jh Km Kg2 method is employed to generate the coefficients of the flat
x3 = F̈ + Ḟ
Ks Rm Jh output polynomial. For the 4th order dynamics of the flexible
! manipulator already expressed, the flat output and its deriva-
2
Jh Km Kg2 tives are parameterised at an instant in time t = t1 to another
x4 = F (3) + F̈ instant t = t2 . The problem is to generate a desired trajectory
Ks Rm Jh
of motion for between these two points. The interpolation
3 3
Rm Jh 
(4)

polynomial for the fourth order flexible manipulator system
u= 4 K 4 − R2 J K )
F − α(F ) (25)
Km Kg (Km g m h s is given by [13]:
where α(F ) is defined from equation (23).
F ∗ (τ ) = α0 +α1 τ +α2 τ 2 +α3 τ 3 +.......+α2n+1 τ 2n+1 (28)
IV. FLATNESS BASED NONLINEAR FEEDBACK
CONTROLLER DESIGN where n = 4 and
Having obtained the flat output and dynamics of the ma- t − t1
nipulator in terms of the flat output, we now proceed to τ= (29)
t2 − t 1
design the feedback controller for trajectory tracking. Based
on the equivalent linear system in equation (21), the linearising Equation(28)gives the desired trajectory for the flat output as
controller v can be designed. From equation(19), Z1 = x1 and F1∗ . Differentiating equation(28), we obtain:
the relationship between the states and the flat output of the F2∗ (τ ) = α1 + 2α2 τ + 3α3 τ 2 + .... + (2n + 1)α2n+1 τ 2n (30)
system can be expressed as: F = x1 = Z1 . The closed loop
relation between the new input and the flat output is given as and so on.
(4)
F (4) = Z1 = v. So the control law can be chosen to satisfy B. Trajectory Planning
the linearizing controller as following
For the flat output F , the reference trajectories were derived
(3) ¨ ˙ for F1∗ , F2∗ , F3∗ , and F4∗ using the boundary conditions t1 = 0
v=F ∗(4)
− K3 F̂ − K2 F̂ − K1 F̂ − K0 F̂ (26)
and t2 = 20s; F1 , F2 , F3 , F4 at t1 = [0.6, 0, 0, 0] respectively
where F̂ = F − F ∗ , and F1 , F2 , F3 , F4 at t2 = [0, 0, 0, 0] respectively.
A ninth degree polynomial with ten coefficients was used
F ∗ is the desired reference trajectory to be tracked. for the trajectories. The coefficients of the polynomial were
Ki , i = 0, 1, 2, 3 the controller gains are chosen to have determined as:
0.8 0.04

F2*(rads/s)
0.03
0.6

F1*(rads)
0.02
0.4
0.01
0.2
0

0 −0.01
0 5 10 15 20 0 5 10 15 20
time (s) time (s)
−3
!" x 10
0.015 4

F3*(rads/s2)

F4*(rads/s )
0.01

3
2
#
0.005
0
0
−2
−0.005

−0.01 −4
0 5 10 15 20 0 5 10 15 20
time (s) time (s)

Fig. 4. Rest to rest trajectories for manipulator

control effort
0.1

0.08

0.06

Voltage (V)
0.04

0.02

Fig. 3. Simulation block in Matlab environment 0


0 2 4 6 8 10 12 14 16 18 20
time (s)

Fig. 5. Computed input voltage for manipulator

−1   Torque

1 1 1 1 1
  
a5 a0 0.025

   5 6 7 8 9 0.02
a6    a1 
  
a7  =  20 30 42 56 72  a2 
      0.015
Torque

      (31)
   60 120 210 336 504    0.01

a8    a3 
0.005

a9 120 360 840 1680 3024 a4


0
0 2 4 6 8 10 12 14 16 18 20
time (s)
V. SIMULATION AND RESULTS
The dynamics of the flexible manipulator was implemented Fig. 6. computed input torque for manipulator
in Matlab/Simulink. The Flatness based controller was de-
signed using the S-function in matlab. This function enables 0.8 1.5

0.6 1
seamless integration between the controller and the dynamics
F1

F2

0.4 0.5

being simulated. Simulations were run in both dicrete time 0.2 0

0 −0.5
and continuous time. However, there was no much difference 0 1 2
Time(s)
3 4 5 0 1 2
Time(s)
3 4 5

in the results. The Dormand-Prince solver [19] was used for 0

−20
4000

3000

all simulations. The parameters for the gains were selected


F3

F4

−40 2000

using pole placement. Fig. 3 shows the implentation of the −60

−80
1000

0
0 1 2 3 4 5 0 1 2 3 4 5
simulation environment in Simulink. Time(s) Time(s)
First we present the reference trajectories of motion gen-
erated for the flexible manipulator as shown in Fig.4. The Fig. 7. Set Point control using PID
ammature voltage and torque input are presented in Fig. 5
and (6) respectively. These trajectories are also used for the 0.7

0.6
8

6
0.5

closed loop control design of the flexible manipulator.The 0.4 4


F1

F2

0.3 2

performance of the proposed flat controller was tested using 0.2

0.1
0

the boundary conditions defined in section(IV-B).


0 −2
0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 5 0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 5

Time(s) Time(s)
4

In order to buttress the advantages of the proposed control 200

100
2.5

2
x 10

technique, simulations were also performed on the traditional


0 1.5

−100 1
F3

F4

−200 0.5

PID controller. Results were compared with those obtained −300

−400 −0.5
0

using the flatness based tracking controller. The response of −500


0 0.5 1 1.5 2 2.5

Time(s)
3 3.5 4 4.5 5
−1
0 0.5 1 1.5 2
Time(s)
2.5 3 3.5 4 4.5 5

the controller to a set point was checked. The results are shown
in Fig. 7 and 8. Fig. 8. Set Point control using Flatness controller
The PID controller performed more favourably on the
setpoint control. The PID control brought the tip of the
manipulator to the desired position with maximum damping
6
desired flatness has been presented. More importantly, trajectories
actual
4
of motion and the nominal control required to drive the
manipulator through those trajectories were generated as an
2
interpolation problem. This greatly simplifies motion planning
0 for the manipulator as there is no need to solve system equa-
−2
tions. The tracking of these trajectories were demonstrated for
the manipulator using the designed flatness based controller.
−4
Tracking results show minimum errors which acts as proof
−6
0 2 4 6 8 10 12 14 16 18 20
of the effectiveness of the differential flatness based control
Time(s) technique. Further work will involve carrying out tracking
control on a real manipulator in the presence on various
Fig. 9. Trajectory tracking of sine wave using PID
constraints.

4 R EFERENCES
3 [1] L. Bascetta and P. Rocco, “Revising the robust-control design for rigid
2 robot manipulators,” Robotics, IEEE Transactions on, vol. 26, no. 1, pp.
180–187, 2010.
1
[2] X. Bian, Y. Qu, Z. Yan, and W. Zhang, “Nonlinear feedback control
0 for trajectory tracking of an unmanned underwater vehicle,” in IEEE
−1
International Conference on Information and Automation (ICIA). IEEE,
pp. 1387–1392.
−2
[3] B. Song, J. Mills, Y. Liu, and C. Fan, “Nonlinear dynamic modeling and
−3 desired control of a small-scale helicopter,” International Journal of Control,
actual
Automation and Systems, vol. 8, no. 3, pp. 534–543, 2010.
−4
0 2 4 6 8 10
Time(s)
12 14 16 18 20 [4] D. Chwa, “Tracking control of differential-drive wheeled mobile robots
using a backstepping-like feedback linearization,” Systems, Man and
Cybernetics, Part A: Systems and Humans, IEEE Transactions on,
Fig. 10. Trajectory tracking of sine wave using Flatness controller vol. 40, no. 6, pp. 1285–1295, 2010.
[5] G. Oriolo, A. De Luca, and M. Vendittelli, “Wmr control via dynamic
0.7
feedback linearization: design, implementation, and experimental val-
desired
actual
idation,” Control Systems Technology, IEEE Transactions on, vol. 10,
0.6 no. 6, pp. 835–852, 2002.
[6] M. Kandroodi, M. Mansouri, M. Shoorehdeli, and M. Teshnehlab,
0.5
“Control of flexible joint manipulator via reduced rule-based fuzzy
0.4 control with experimental validation,” International Scholarly Research
F1*

Network ISRN Artificial Intelligence, 2012.


0.3
[7] M. Fliess, J. Lvine, P. Martin, and P. Rouchon, “Flatness and defect
0.2
of non-linear systems: introductory theory and examples,” International
journal of control, vol. 61, no. 6, pp. 1327–1361, 1995.
0.1 [8] J. Ryu and S. Agrawal, “Differential flatness-based robust control of
0
mobile robots in the presence of slip,” The International Journal of
0 2 4 6 8 10 12 14 16 18 20
Time(s) Robotics Research, vol. 30, no. 4, p. 463, 2011.
[9] C. Tang, P. Miller, V. Krovi, J. Ryu, and S. Agrawal, “Differential-
flatness-based planning and control of a wheeled mobile manipulator–
Fig. 11. Tracking the flat output using Flatness based controller theory and experiment,” Mechatronics, IEEE/ASME Transactions on,
no. 99, pp. 1–6, 2010.
[10] F. Bullich, S. Agrawal, and V. Sangwan, “Differential flatness of a class
of n-dof planar manipulators driven by 1 or 2 actuators,” 2010.
response and a settling time of 1 second. However, there were [11] M. Fliess, J. Lvine, P. Martin, F. Ollivier, and P. Rouchon, “Controlling
large dynamics unaccounted for in the acceleration and jerk. nonlinear systems by flatness,” Systems and Control in the Twenty-first
The flat controller showed some underdamping at the begining Century, p. 137154, 1997.
[12] G. Rigatos, “Autonomous robots navigation using flatness based control
but quickly stabilized to the desired position. Also, all the and multi sensor fusion,” Robotics, Automation and Control (A. Lazinica
manipulator dynamics were catered for though with some little ed.), ITech Education and Publishing KG, Vienna Austria, 2008.
errors. To further test the designed flat controller, an arbitrary [13] P. Rouchon, M. Fliess, J. Lvine, and P. Martin, “Flatness, motion
planning and trailer systems.” IEEE, 1993, pp. 2700–2705 vol. 3.
sine wave of the form 4 sin 0.8t was used as tracking reference. [14] M. Fliess, J. Lvine, P. Martin, and P. Rouchon, “A lie-backlund approach
The results are presented in Fig. 9 and Fig. 10 for the PID to equivalence and flatness of nonlinear systems,” Automatic Control,
and flat controller respectively. IEEE Transactions on, vol. 44, no. 5, pp. 922–937, 1999.
[15] Quanser. (February). [Online]. Available: http://www.quanser.com
The result in Fig. 11 shows the tracking of the flat output [16] K. Groves and A. Serrani, “Modeling and nonlinear control of a single-
using the flatness based controller. The performance of con- link flexible joint manipulator,” 2004.
troller shows a very close tracking of the reference trajectory [17] J. Slotine and W. Li, Applied nonlinear control. Prentice-Hall Engle-
wood Cliffs, NJ, 1991, vol. 199.
as desired. [18] J. Levine, “On necessary and sufficient conditions for differential
flatness,” Arxiv preprint math/0605405, 2006.
VI. C ONCLUSION [19] M. Calvo, J. Montijano, and L. Randez, “A fifth-order interpolant for
the dormand and prince runge-kutta method,” Journal of computational
In this paper, a nonlinear feedback control for a single link and applied mathematics, vol. 29, no. 1, pp. 91–100, 1990.
flexible joint manipulator using the concept of differential

You might also like