# Optimal Controller and Controller Based on Differential Flatness in a Linear Guide System: A Performance Comparison of Indexes

Authors: Fabio Abel Gómez Becerra; Víctor Hugo Olivares Peregrino; Andrés Blanco Ortega; Jesús Linares Flores
Journal: Mathematical Problems in Engineering
 (2015)

---

## Abstract

The use of linear slide system has been augmented in recent times due to features granted to supplement electromechanical systems; new technologies have allowed the manufacture of these systems with low coefficients of friction and offer a variety of types of sliding. In this paper, we present a comparison between the performance indexes of two techniques of control applying optimal control LQR (Linear Quadratic Regulator) acronym for STIs in English and the technique of differential flatness controller. The use of linear slide bolt of potency takes into account the dynamics of the DC motor; the Euler-Lagrange formalism was used to establish the mathematical model of the slide. Cosimulation via the MATLAB/Simulink-ADAMS virtual prototype package, including realistic measurement disturbances, is used to compare the performance indexes between the LQR controller versus differential flatness controller for the position tracking of linear guide system.


---

## Body

## 1. Introduction

The linear slides have been used in different electromechanical systems as actuators; these have great advantages, especially those consisting of screws-and-nuts; some advantages are as follows: the effect of gravity at the beginning of the movement introduces no disturbance of change of position by not overcoming the power screw, the degree of accuracy in positioning is very high, it is possible to track both soft paths laws of classic and modern control, and the force developed by using this type of device is very high usually requiring actuators (DC motor) of lower power than those requiring other types of systems. Blanco Ortega et al. [1] proposed a rehabilitation ankle device based on an X
Y table which uses two linear slidings, one on each axis, through a Generalized Proportional Integral (GPI) controller. Valdivia et al. [2] proposed a rehabilitation ankle TobiBot, which covers only the movements of dorsiflexion/plantarflexion, and a degree of freedom; it is controlled by an outline of PID control, to perform the movements, and uses a linear slide based on a power screw. Blanco Ortega et al. [3, 4] in turn presented a rehabilitation of the design and construction of an ankle rehabilitation based on a parallel robot of 3 degrees of freedom, which provides the movements of dorsiflexion/plantarflexion and inversion/eversion made by the ankle and uses a PID control technique to perform rehabilitation ankle movements by using three linear power sliding screws. Blanco Ortega et al. [3, 4] have presented an ankle rehabilitation machine, using a linear slide to effect movements dorsiflexion/ankle plantarflexion; the control technique using a PID was smooth trajectory tracking.As can be seen, linear slides have been widely used as actuators in various robotic devices from a simpleX
Y table. Various control techniques have been implemented for accurate position with smooth tracking paths. The present work proposes control technique for differential flatness, compared with optimal control, showing both its advantages and disadvantages over the other, considering the control technique for differential flatness as an option with highly acceptable results in tracking soft paths, and highlighting also the lack of optimization for optimum control trajectories mechanical tracking systems of this type; the randomness of the matrix appears when weighing matrixes R and Q. Control technique by feedback employed in this work is based on the concept of differential flatness, which come from differential plan systems (Fliess et al. [5]). This was made known fifteen years ago in France by professor Fliess and his collaborators. Differential flatness has had important uses within the areas of robotics, control processes, aerospace systems, optimization systems, trajectory planning in linear and nonlinear aspects, and systems of infinite dimensions described in partially controlled differential equations with border conditions (Fliess et al. [5, 6]; Linares-Flores and Sira-Ramírez [7]; and Sira-Ramírez and Agrawal [8]). Thounthong et al. [9] suggest the use of a differential based on flatness of a fuel cell system and a hybrid supercapacitors source achieving robustness, stability, and efficiency of the controlled system controller. Jörgl and Gattringer [10] proposed the control of a conveyor belt using a control law based on differential flatness reducing the trajectory tracking error compared with traditional drivers, flatness theory has been used in a variety of nonlinear systems in various engineering disciplines, Thounthong and Pierfederici [11], such as the inverted pendulum control and aircraft vertical rise and fall, Fliess et al. [12]. Danzer et al. [13] proposed driver in such a control system of the pressure of a cathode and oxygen excess of a chemical system. Gensior et al. [14] used a control of tracking of a DC voltage boost converter. Song et al. [15] have shown that based on flatness control is robust and provides improved performance monitoring transience compared to a traditional method of linear control (PI). A nonlinear system is flat if there is a set of independent variables (differentially equal in number to the number of entries) so that all the state variables x and input variables u can be expressed in terms of those output by Syed et al. [16], Rabbani et al. [17], and Agrawal et al. [18].In order to make a comparison between the performance index of different controllers, this paper also presents an optimal control law applied to the same linear slide (Figure1); optimal control theory focuses on the design of controllers to perform their objective and concurrently satisfy physical constraints to optimize predetermined performance criteria (Hassani and Lee [19]). With the new trend of seeking a high-performance, sustainable manufacturing, pollution awareness and finding ways for greater energy efficiency, greater emphasis on the optimal design of control systems is made. The optimality design criteria may include minimum fuel, low energy, minimum time (Lewis [20]). Because of this the focus in recent years has been directed to the use of various techniques of optimal control; Yu and Hwang [21] have presented an LQR (Linear Quadratic Regulator) approach for determining a control law PID optimal in order to control the speed of a DC motor; this contribution proposes a systematic approach to design a speed control of a DC motor based on an identification model and LQR design with a nonlinear increase with feedforward compensator. Ruderman et al. [22] propose a methodical approach LQR state feedback control of a DC motor. Likewise LQR optimal control has been used in conjunction with other control techniques such as that of Prasad et al. [23] who proposed a control system high nonlinearity such as the inverted pendulum. It is presented with a linearized dynamics using a PID controller LQR bringing out results in a robust control scheme for optimal system control.Figure 1
Linear slide system.The contributions of this paper are as follows: (1) the design of an LQR position tracking controller; (2) the design of a differential flatness position tracking controller; these tracking controllers are compared on the performance index of position tracking error. Thus, we conclude that the two controllers have a high capacity for the position tracking of the linear guide system. This paper is organized as follows. Section2 presents the mathematical model of linear slide system. In this section, we obtained the mathematical model via Euler-Lagrange formalism and incorporate the dynamic of DC motor to model. The position control based on linear quadratic regulator is presented in Section 3. In Section 4, we present the design of tracking controller based on differential flatness. In Section 5, the simulations results are obtained through the MATLAB/Simulink-ADAMS virtual prototype package, and we compare the performance indexes of the position tracking error of both controllers. In Section 6, the results are shown in the experiment using a physical slider and data acquisition card, using the LabView software with a graphical interface. Finally, in Section 7, we give the conclusions of all of the work.


## 2. Mathematical Model of Linear Slide

The linear slide control in this work is formed with a motor coupled CD to a power screw through a gearbox speed, screw, and rotating, linearly moving massm, as shown in Figures 1 and 2.Figure 2
Schematic diagram of a linear slide system-DC motor.Motor mathematical model of linear guide system was obtained by applying the Euler-Lagrange formalism. It considers the dynamics of the DC motor. The generalized coordinates areq and θ.Consider Figure2 and the notation shown in Notation.


### 2.1. Electric Motor

Considering Figure2, the coenergy by storage of effort is given by (1), the coenergy storage of effort by (2), and the energy dissipation by (3).Coenergy by Storage of Effort. Consider(1)
T
∗
=
1
2
L
q
˙
2
.
The Storage of Energy Flow. Consider(2)
U
=
0
.Energy Dissipation. Consider(3)
G
=
1
2
R
q
˙
2
.


### 2.2. Linear Slide

The kinetic energy of the system of linear slide is given by (4) and the dissipated energy is represented by (7).Kinetic Energy. Consider(4)
K
=
1
2
I
θ
˙
2
2
+
1
2
m
x
˙
2
.Knowing that x
=
p
θ
2, x
˙
=
p
θ
˙
2, and x
¨
=
p
θ
¨
2 and substituting in (4), the following equation is obtained, with kinetic energy remaining in function of the angular velocity of the power screw (see Figure 2):(5)
K
=
1
2
I
θ
˙
2
2
+
1
2
m
p
θ
˙
2
2
.
Dissipated Energy. Consider(6)
D
=
1
2
b
2
θ
˙
2
2
.From (1) until (5) is represented total system in the kinetic energy and the following equation is obtained:(7)
K
T
=
1
2
L
q
˙
2
+
1
2
I
θ
˙
2
2
+
1
2
m
p
θ
˙
2
2
,where L is the Lagrangian and is given by(8)
L
=
1
2
L
q
˙
2
+
1
2
I
θ
˙
2
2
+
1
2
m
p
θ
˙
2
2
.For the generalized coordinate q,(9)
∂
L
∂
q
˙
=
L
q
˙
,
d
d
t
∂
L
∂
q
˙
=
L
q
¨
,
∂
L
∂
q
=
0
,
∂
D
∂
q
˙
=
R
q
˙
,where(10)
L
q
¨
+
R
q
˙
=
V
t
-
e
.Considering thate
=
k
b
θ
˙
1 and θ
˙
1
=
n
θ
˙
2 as well as θ
˙
2
=
x
˙
/
p and replacing them in (10), the following equation is obtained:(11)
L
q
¨
+
R
q
˙
=
V
t
-
k
b
n
p
x
˙
.Knowing that(12)
q
=
∫
0
t
i
d
t
,the following equation is obtained:(13)
L
d
i
d
t
+
R
i
=
V
t
-
k
b
n
p
x
˙
.For the generalized coordinate θ
2,(14)
∂
L
∂
θ
˙
2
=
I
θ
˙
2
+
m
p
θ
˙
2
,
d
d
t
∂
L
∂
θ
˙
2
=
I
θ
¨
2
+
m
p
θ
¨
2
,
∂
L
∂
θ
2
=
0
,
∂
D
∂
θ
˙
2
=
b
2
θ
˙
2
.Equation of Euler-Lagrange formalism is(15)
d
d
t
∂
L
∂
q
˙
i
-
∂
L
∂
q
i
+
∂
D
∂
q
˙
i
=
τ
,
to
i
=
1,2
,
…
,
n
.The mathematical model of the linear slide taking into account the dynamics of the DC motor is defined by(16)
L
d
i
d
t
+
R
i
=
V
t
-
k
b
n
p
x
˙
,
(17)
I
p
+
m
p
x
¨
+
b
2
p
x
˙
=
n
k
f
i
-
P
.


## 2.1. Electric Motor

Considering Figure2, the coenergy by storage of effort is given by (1), the coenergy storage of effort by (2), and the energy dissipation by (3).Coenergy by Storage of Effort. Consider(1)
T
∗
=
1
2
L
q
˙
2
.
The Storage of Energy Flow. Consider(2)
U
=
0
.Energy Dissipation. Consider(3)
G
=
1
2
R
q
˙
2
.


## 2.2. Linear Slide

The kinetic energy of the system of linear slide is given by (4) and the dissipated energy is represented by (7).Kinetic Energy. Consider(4)
K
=
1
2
I
θ
˙
2
2
+
1
2
m
x
˙
2
.Knowing that x
=
p
θ
2, x
˙
=
p
θ
˙
2, and x
¨
=
p
θ
¨
2 and substituting in (4), the following equation is obtained, with kinetic energy remaining in function of the angular velocity of the power screw (see Figure 2):(5)
K
=
1
2
I
θ
˙
2
2
+
1
2
m
p
θ
˙
2
2
.
Dissipated Energy. Consider(6)
D
=
1
2
b
2
θ
˙
2
2
.From (1) until (5) is represented total system in the kinetic energy and the following equation is obtained:(7)
K
T
=
1
2
L
q
˙
2
+
1
2
I
θ
˙
2
2
+
1
2
m
p
θ
˙
2
2
,where L is the Lagrangian and is given by(8)
L
=
1
2
L
q
˙
2
+
1
2
I
θ
˙
2
2
+
1
2
m
p
θ
˙
2
2
.For the generalized coordinate q,(9)
∂
L
∂
q
˙
=
L
q
˙
,
d
d
t
∂
L
∂
q
˙
=
L
q
¨
,
∂
L
∂
q
=
0
,
∂
D
∂
q
˙
=
R
q
˙
,where(10)
L
q
¨
+
R
q
˙
=
V
t
-
e
.Considering thate
=
k
b
θ
˙
1 and θ
˙
1
=
n
θ
˙
2 as well as θ
˙
2
=
x
˙
/
p and replacing them in (10), the following equation is obtained:(11)
L
q
¨
+
R
q
˙
=
V
t
-
k
b
n
p
x
˙
.Knowing that(12)
q
=
∫
0
t
i
d
t
,the following equation is obtained:(13)
L
d
i
d
t
+
R
i
=
V
t
-
k
b
n
p
x
˙
.For the generalized coordinate θ
2,(14)
∂
L
∂
θ
˙
2
=
I
θ
˙
2
+
m
p
θ
˙
2
,
d
d
t
∂
L
∂
θ
˙
2
=
I
θ
¨
2
+
m
p
θ
¨
2
,
∂
L
∂
θ
2
=
0
,
∂
D
∂
θ
˙
2
=
b
2
θ
˙
2
.Equation of Euler-Lagrange formalism is(15)
d
d
t
∂
L
∂
q
˙
i
-
∂
L
∂
q
i
+
∂
D
∂
q
˙
i
=
τ
,
to
i
=
1,2
,
…
,
n
.The mathematical model of the linear slide taking into account the dynamics of the DC motor is defined by(16)
L
d
i
d
t
+
R
i
=
V
t
-
k
b
n
p
x
˙
,
(17)
I
p
+
m
p
x
¨
+
b
2
p
x
˙
=
n
k
f
i
-
P
.


## 3. Optimal Control

### 3.1. Considering Acceleration State Variable

Based on the mathematical model (16) and (17), i is derived and from (17) it is clear that (18)
i
=
α
n
k
f
x
¨
+
b
2
p
n
k
f
x
˙
,
d
i
d
t
=
α
n
k
f
x
⃛
+
b
2
p
n
k
f
x
¨
.Substituting in (16), one has(19)
L
α
n
k
f
x
⃛
+
b
2
p
n
k
f
x
¨
+
R
α
n
k
f
x
¨
+
b
2
p
n
k
f
x
˙
=
V
t
-
K
b
n
p
x
˙
.Fixing the equation, one gets(20)
L
α
n
k
f
x
⃛
+
b
2
p
n
k
f
+
R
α
n
k
f
x
¨
+
b
2
p
n
k
f
+
k
b
n
p
x
˙
=
u
.The state variables are(21)
x
˙
1
=
x
2
,
x
˙
2
=
x
3
,
x
˙
3
=
-
n
k
f
L
α
b
2
p
n
k
f
+
k
b
n
p
x
˙
-
n
k
f
L
α
b
2
p
n
k
f
+
R
α
n
k
f
x
¨
+
n
k
f
L
α
u
.Placing the state variables in the matrix form, one gets(22)
x
˙
=
A
x
+
B
u
,
y
=
C
x
,
x
˙
1
x
˙
2
x
˙
3
=
0
1
0
0
0
1
0
-
n
k
f
L
α
b
2
p
n
k
f
+
k
b
n
p
-
n
k
f
L
α
b
2
p
n
k
f
+
R
α
n
k
f
x
1
x
2
x
3
+
0
0
n
k
f
L
α
u
,
y
=
1
0
0
x
1
x
2
x
3
.In control systems, often we want to select the control vector u
(
t
) such that a given performance index is minimized. A quadratic performance index, where the integration limits are 0 to ∞, so that(23)
J
=
∫
0
∞
L
x
,
u
d
t
,where L
(
x
,
u
) is a quadratic function or a Hermitian function of x and u, produces linear control laws; that is to say,(24)
u
=
-
K
x
t
.For weight matrixes for semipositive definite Q and R, the optimal control system is based on minimizing the performance index. This requires numerically solving the Riccati algebraic equation: (25)
A
T
P
+
P
A
-
P
B
R
-
1
B
T
P
+
Q
=
0for a symmetric positive definite matrix P.Finally, gains are calculated as(26)
K
=
R
-
1
B
T
P
.In the present case, u is given by (27)
u
=
-
k
1
x
1
-
k
2
x
2
-
k
3
x
3
.The state weighting matrix is proposed as(28)
Q
=
C
T
C
,
Q
=
1
0
0
1
0
0
=
1
0
0
0
0
0
0
0
0which meets nonnegative definite. As for the scalar weighting for the control input, it is chosen as(29)
R
=
0.01
,
R
=
1
e
-
10
.


### 3.2. Considering State Variable Motor Current CD

By representing mathematical model equations (16) and (17) in state space, one gets(30)
x
˙
1
=
x
2
,
α
x
˙
2
=
-
b
2
p
x
2
+
n
k
f
x
3
,
L
x
˙
3
=
-
R
x
3
-
n
k
b
p
x
2
+
u
t
,
x
˙
1
x
˙
2
x
˙
3
=
0
1
0
0
-
b
2
α
p
n
k
f
α
0
-
n
k
b
L
p
-
R
L
x
1
x
2
x
3
+
0
0
1
L
u
,
C
=
1
0
0
,
D
=
0
,
Q
=
1
0
0
1
0
0
=
1
0
0
0
0
0
0
0
0with(31)
R
=
0.01for the first case and (32)
R
=
1
e
-
10for the second case.


### 3.3. LQR Optimal Control in Virtual Prototype

A test was performed using a virtual prototype of the linear slide, Figure3, in room ADAMS MSC together with Matlab-Simulink in order to test the effectiveness of optimal control LQR; the results of this experiment can be seen in Section 5.Figure 3
Virtual prototype of the linear slide.


## 3.1. Considering Acceleration State Variable

Based on the mathematical model (16) and (17), i is derived and from (17) it is clear that (18)
i
=
α
n
k
f
x
¨
+
b
2
p
n
k
f
x
˙
,
d
i
d
t
=
α
n
k
f
x
⃛
+
b
2
p
n
k
f
x
¨
.Substituting in (16), one has(19)
L
α
n
k
f
x
⃛
+
b
2
p
n
k
f
x
¨
+
R
α
n
k
f
x
¨
+
b
2
p
n
k
f
x
˙
=
V
t
-
K
b
n
p
x
˙
.Fixing the equation, one gets(20)
L
α
n
k
f
x
⃛
+
b
2
p
n
k
f
+
R
α
n
k
f
x
¨
+
b
2
p
n
k
f
+
k
b
n
p
x
˙
=
u
.The state variables are(21)
x
˙
1
=
x
2
,
x
˙
2
=
x
3
,
x
˙
3
=
-
n
k
f
L
α
b
2
p
n
k
f
+
k
b
n
p
x
˙
-
n
k
f
L
α
b
2
p
n
k
f
+
R
α
n
k
f
x
¨
+
n
k
f
L
α
u
.Placing the state variables in the matrix form, one gets(22)
x
˙
=
A
x
+
B
u
,
y
=
C
x
,
x
˙
1
x
˙
2
x
˙
3
=
0
1
0
0
0
1
0
-
n
k
f
L
α
b
2
p
n
k
f
+
k
b
n
p
-
n
k
f
L
α
b
2
p
n
k
f
+
R
α
n
k
f
x
1
x
2
x
3
+
0
0
n
k
f
L
α
u
,
y
=
1
0
0
x
1
x
2
x
3
.In control systems, often we want to select the control vector u
(
t
) such that a given performance index is minimized. A quadratic performance index, where the integration limits are 0 to ∞, so that(23)
J
=
∫
0
∞
L
x
,
u
d
t
,where L
(
x
,
u
) is a quadratic function or a Hermitian function of x and u, produces linear control laws; that is to say,(24)
u
=
-
K
x
t
.For weight matrixes for semipositive definite Q and R, the optimal control system is based on minimizing the performance index. This requires numerically solving the Riccati algebraic equation: (25)
A
T
P
+
P
A
-
P
B
R
-
1
B
T
P
+
Q
=
0for a symmetric positive definite matrix P.Finally, gains are calculated as(26)
K
=
R
-
1
B
T
P
.In the present case, u is given by (27)
u
=
-
k
1
x
1
-
k
2
x
2
-
k
3
x
3
.The state weighting matrix is proposed as(28)
Q
=
C
T
C
,
Q
=
1
0
0
1
0
0
=
1
0
0
0
0
0
0
0
0which meets nonnegative definite. As for the scalar weighting for the control input, it is chosen as(29)
R
=
0.01
,
R
=
1
e
-
10
.


## 3.2. Considering State Variable Motor Current CD

By representing mathematical model equations (16) and (17) in state space, one gets(30)
x
˙
1
=
x
2
,
α
x
˙
2
=
-
b
2
p
x
2
+
n
k
f
x
3
,
L
x
˙
3
=
-
R
x
3
-
n
k
b
p
x
2
+
u
t
,
x
˙
1
x
˙
2
x
˙
3
=
0
1
0
0
-
b
2
α
p
n
k
f
α
0
-
n
k
b
L
p
-
R
L
x
1
x
2
x
3
+
0
0
1
L
u
,
C
=
1
0
0
,
D
=
0
,
Q
=
1
0
0
1
0
0
=
1
0
0
0
0
0
0
0
0with(31)
R
=
0.01for the first case and (32)
R
=
1
e
-
10for the second case.


## 3.3. LQR Optimal Control in Virtual Prototype

A test was performed using a virtual prototype of the linear slide, Figure3, in room ADAMS MSC together with Matlab-Simulink in order to test the effectiveness of optimal control LQR; the results of this experiment can be seen in Section 5.Figure 3
Virtual prototype of the linear slide.


## 4. Control Based on Differential Flatness

This third-order linear system (30), where its Kalman controllability matrix is calculated by the following expression: C
=
B
,
A
B
,
A
2
B, is given as(33)
C
=
0
0
n
k
f
α
0
n
k
f
α
-
R
n
k
f
L
α
-
n
b
2
k
f
p
α
2
1
-
R
L
R
2
L
2
-
n
2
k
b
k
f
L
p
α
det
⁡
C
=
-
n
2
k
f
2
α
2
≠
0
.Since the determinant is nonzero, then the system is controllable and, therefore, is differentially flat (Sira-Ramírez and Agrawal [8]). The flat output of a linear system input output (I/O) is obtained by multiplying the inverse matrix of controllability by the state vector x, associated with the system. Column vector obtained by multiplying the last line is chosen to obtain the flat output (Linares-Flores and Sira-Ramírez [7]). In particular for reducing motor-drive CD, flat output system F is calculated as(34)
F
=
0
0
1
C
-
1
x
1
x
2
x
3
,
F
=
0
0
1
k
b
k
f
n
2
+
R
b
2
L
n
p
k
f
R
α
L
n
k
f
1
L
b
2
+
R
p
α
L
n
p
k
f
α
n
k
f
0
α
n
k
f
0
0
x
1
x
2
x
3
=
α
n
k
f
x
1
.Hence, we have chosen x
1 as the flat output. This flat output provides the following differential parametrization of the system variables: (35)
x
1
=
F
,
x
2
=
F
˙
,
x
3
=
α
n
k
f
F
¨
+
b
2
n
k
f
p
F
˙
+
P
n
k
f
p
,and the control input:(36)
u
=
L
α
n
k
f
F
⃛
+
L
b
2
n
k
f
p
+
R
α
n
k
f
F
¨
+
R
b
2
n
k
f
p
+
n
k
b
p
F
˙
+
R
P
n
k
f
p
.Considering (36) and in order to verify the stability of the system, applying the Laplace transform, the following holds:(37)
u
=
L
α
n
k
f
s
3
+
L
b
2
n
k
f
p
+
R
α
n
k
f
s
2
+
R
b
2
n
k
f
p
+
n
k
b
p
s
+
R
P
n
k
f
p
.Taking into account the values of Table1, the system transfer function is(38)
F
s
u
s
=
1
6.8854
∗
1
0
-
7
s
3
+
4.0902
∗
1
0
-
2
s
2
+
318.40
s
.Plotting the locus of roots verifies that the system is stable when these are in the left half of the complex plane (Figure 4).Table 1
Parameter values ​​for simulation.
Parameter
Value
n = speed ratio
0.19
P = force opposite to the movement of m
0.01 N
b
2
= coefficient of viscous friction
2
p = pitch of the screw thread power
0.00196 m
m = mass to be displaced
10 kg
J = moment of inertia
0.0000014 kg m2
V = voltage
12 volts
k
b
= constant emf
0.022 (Vs)/rad
R = resistance of DC motor
5.3 ohm
L = motor inductance
0.00058 henries
K
f = constant torque
90 (N-m)/AFigure 4
Roots locus.Hence, we have the fact that all state variables and the control input are in terms ofF and its successive derivatives, where it denotes the position of the mass as x. The differential parametrization above allows obtaining the equilibrium for the system in terms of the equilibrium values of the flat output and the disturbance inputs. Thus, (39)
x
-
1
=
F
-
d
,
x
-
2
=
0
,
x
-
3
=
P
-
n
k
f
p
,
u
-
=
R
P
-
n
k
f
p
.From (36), we design the average controller based on differential flatness property. Thus, we replace the higher-order derivative of the flat output by a virtual controller (see Slotine and Li [24]) resulting in the following:(40)
F
⃛
=
v
a
u
x
=
-
k
2
F
¨
-
k
1
F
˙
-
k
0
F
-
F
-
d
.For the tracking controller design, we use a nominal desired linear displacement profile F
d that exhibits a rather smooth start for the motor linear slide system. This is specified using an interpolating Bézier polynomial of 10th order where the initial linear displacement is set to be F
i
n
i
=
0 m valid until t
i
n
i
=
15 sec and the final desired value of the angular velocity is specified as F
f
i
n
=
0.5 m to be reached at t
f
i
n
=
45 sec; that is, we used(41)
F
d
=
F
i
n
i
,
t
<
t
i
n
i
,
F
i
n
i
+
F
f
i
n
-
F
i
n
i
b
x
,
t
i
n
i
≤
t
≤
t
f
i
n
,
F
f
i
n
,
t
>
t
f
i
n
,where b
x
(
t
,
t
i
n
i
,
t
f
i
n
) is a polynomial function of time, exhibiting a sufficient number of zero derivatives at times t
i
n
i and t
f
i
n, while also satisfying b
x
(
t
i
n
i
,
t
i
n
i
,
t
f
i
n
)
=
0 and b
x
(
t
f
i
n
,
t
i
n
i
,
t
f
i
n
)
=
1. For instance, one such polynomial may be given by(42)
b
x
t
,
t
i
n
i
,
t
f
i
n
=
β
5
r
1
-
r
2
β
+
r
3
β
2
-
r
4
β
3
+
r
5
β
4
-
r
6
β
5
,
β
=
t
-
t
i
n
i
t
f
i
n
-
t
i
n
i
.The differential parametrization of the control input, u, in terms of F
d shows that the proposed flat output trajectory tracking task is that of controlling the third derivative of F
d by means of v
a
u
x:(43)
v
a
u
x
=
F
⃛
d
-
k
2
F
¨
-
F
¨
d
-
k
1
F
˙
-
F
˙
d
-
k
0
F
-
F
d
.Therefore, the linear displacement-tracking controller is(44)
u
=
L
α
n
k
f
v
a
u
x
+
L
b
2
n
k
f
p
+
R
α
n
k
f
F
¨
d
+
R
b
2
n
k
f
p
+
n
k
b
p
F
˙
d
+
R
P
n
k
f
p
.Under these circumstances, the closed loop system tracking error, e
=
F
-
F
d, satisfies the linear differential equation(45)
e
3
+
k
2
e
¨
+
k
1
e
˙
+
k
0
e
=
0
.The appropriate choice of the constant coefficients k
2
,
k
1
,
k
0, as coefficients of the third-order Hurwitz polynomial, guarantees the asymptotic exponential stability to zero of the tracking error, e. One such choice, yielding a characteristic polynomial of the form s
+
γ
s
2
+
2
ξ
ω
n
s
+
ω
n
2 with γ
>
0, 0
<
ξ
<
1, and ω
n
>
0, is given by(46)
k
0
=
ω
n
2
γ
,
k
1
=
2
ξ
ω
n
γ
+
ω
n
2
,
k
2
=
2
ξ
ω
n
+
γ
.The virtual controller, v
a
u
x, achieves a smooth start for the linear displacement of the system. If we apply an unknown constant load torque on the system, we have to include a term of integral action into the virtual control (43). Thus, we minimize the tracking error near to zero.


## 5. Simulation Results

These results were obtained using the parameter values of Table1.In Figure5, one can see the movement of the mass 0.5 meters in 60 seconds following a path originated by a tenth-order Bézier polynomial; the tracking error can be seen as zero in the whole path; in this case, the acceleration is taken as a state variable.Figure 5
Graphics optimal controller response withR
=
1
e
-
10.Figure6 shows the graphs of results taking into account the current as state variable; considering the matrix R
=
0.01 and considering the matrix R
=
1
e
-
10, Figure 7, in both cases the tracking error can be seen as zero in the whole path.Figure 6
Graphics optimal controller response withR
=
0.01.Figure 7
Graphics optimal controller response withR
=
1
e
-
10.Figure8 shows the results of simulation based on differential flatness controller observed; it also shows that it is capable of moving the mass to a position 0.5 meters along a desired path of a Bézier polynomial of tenth order.Figure 8
Graphics controller response flatness based on difference.The results of the performance index are as follows: the two controllers are shown in Figures9, 10, and 11; the indexes of performance of the optimal controller for two values of the matrix R are shown.Figure 9
Performance Index LQR optimal controller withR
=
0.01.Figure 10
Performance Index LQR optimal controller withR
=
1
e
-
10.Figure 11
Controller performance index based on differential flatness.Figure12 shows the results using a virtual prototype environment ADAMS MSC and MATLAB-Simulink; we can see that the offset for this test was set at 0.7 meters corresponding to the desired position; a tenth-order Bézier polynomial was used as desired path.Figure 12
Graphic of LQR optimal controller results in the virtual prototype.


## 6. Results with Linear Slide

Experimentation was held using a physical linear slide (Figure13); the laws of LQR control are implemented based on differential flatness with the same parameter values and gains controllers; the results of the experiment can be seen in Figures 14, 15, and 16, where it can be seen that in all three cases the controller is able to zero the position error; it is clear that the experiment was carried out with an acquisition card myRIO data of National Instruments; the measurement units were centimeters so that they should be taken into account in the interpretation of Figures 14, 15, and 16.Figure 13
Experiment with physical linear slide.Figure 14
Controller based on differential flatness.Figure 15
Performance Index LQR optimal controller withR
=
0.01.Figure 16
Performance Index LQR optimal controller withR
=
1
e
-
10.It is verified by the results the correct operation for achieving desired trajectories and references.On thex-axis is the number of samples; to determine the time it must be multiplied by the sampling period, that is, 0.1 s.


## 7. Conclusions

By applying control techniques and optimal LQR and based on differential flatness it can be seen that the results for the trajectory tracking are highly achievable in both cases, with regard to the performance indices of each controller for the optimal controller; a great disadvantage exists since it is necessary that the values of the weighting matrixR be too low to achieve a speed of response adapted to the needs of the plant to controlling; this means that the gains are higher further input values, such as the voltage that must be adjusted by trial and error of said matrix with the purpose of respecting the voltages of the actuators.Figures12 and 13 show that the values of the performance index are minimizing in the measure that the value of the weighting matrix, R, is minor compared to the index controller performance differential flatness, if it is minor, but this is not guaranteed to be optimal because the values of the control force are lower than those required for the good functioning of DC motors.In conclusion it follows that the use of control laws differential flatness is by far better than the use of laws of optimal control; the concept of optimality, in this particular case, is lost due to the randomness representing search for the value of theR matrix to obtain appropriate response speed without sacrificing system actuators.



---

*Source: 589184-2015-12-27.xml*