Teoria Controlador PID PDF

You might also like

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

2016 IEEE Conference on Control Applications (CCA)

Part of 2016 IEEE Multi-Conference on Systems and Control


September 19-22, 2016. Buenos Aires, Argentina

Adaptive Quasi-Sliding Mode Control Based on a Recursive Weighted


Least Square Estimator for a DC Motor
Juan D. Valladolid1 , Juan P. Ortiz1 , Member, IEEE and Luis I. Minchala, Member, IEEE
RWLS-QSMC is the possibility to operate the dc motor in
nonlinear zones of its dynamics, with good results.
This paper is organized as follows: Section II presents the
model of the dc motor. Section III presents the algorithm of
the RWLS estimator. Section IV presents the methodology
of design of the QSMC. Section V presents the details on the
implementation and results of the RWLS-QSMC. Section VI
presents the conclusions.

Abstract This paper presents the methodology of design of


a discrete-time adaptive quasi-sliding mode controller (QSMC)
based on a recursive weighted least square (RWLS) estimator
for a dc motor. The proposed control scheme allows handling
the classic problem of a QSMCs, which is the steady-state error
due to the use of a saturation function instead of a switching
function in the sliding mode control (SMC) algorithm. The use
of linear and nonlinear signal references helps to show the
closed-loop performance of the control system and its tracking
capabilities. Experimental results show a better performance of
the RWLS-QSMC algorithm applied on the speed control of a
dc motor than a classic SMC.

II. DC MOTOR MODEL


A time-variant ARX model is used to represent the motor
dynamics by using the state-space approach:

I. INTRODUCTION
SMC is a powerful controller that offers good performances in systems, linear and nonlinear, with uncertainties
in their models. Many researches of SMC applied to the
energy field have been reported in literature [1][4] . Additional applications of SMC for unmanned aerial vehicles are
reported in [5], [6]. Further studies of SMC applied to an
engine cooling system [7], congestion control in communication networks [8], and the regulation of an electro-hydraulic
system [9] are also analyzed.
The implementation of SMC seems limited, sometimes,
for the theoretical requirement of a switching control signal.
The signal discontinuity due to such switching requirement
causes the chattering phenomenon. This issue has been
studied, and a solution where a saturation function is used
instead of the switching function is proposed under the name
of QSMC [10][12]. Although, the use of the saturation
function typically causes steady-state error.
Diminishing the steady-state error caused by the QSMC
is typically done by the introduction of an integral term in
the sliding surface [13][15]. This paper proposes a discrete
QSMC based on a RWLS estimator. The RWLS estimator
algorithm [16][18] allows the reduction of the steady state
error by adapting the parameters of an autoregressive model
with exogenous input (ARX) of the system to be controlled.
The proposed controller (RWLS-QSMC) is tested in the
speed regulation of a dc motor. The results show a good
performance of the system in the regulation and tracking of
linear and nonlinear references. One of the strengths of the

x (k + 1) = A (k) x (k) + B (k) u (k)


y (k) = C (k) x (k)

(1)

where x (k) <n is the state vector, y (k) <m is the


output vector, u (k) <r is the input vector, A (k) <nn
is the state matrix, B (k) <nr is the input matrix and
C (k) <mn is the output matrix.
Without loss of generality, the dc motor is represented by
a second order model where n = 2, m = 1 and r = 1,
which was adjusted from data measured from the system by
applying a pseudorandom binary signal.
III. RECURSIVE WEIGHTED LEAST SQUARE
ESTIMATOR
The ARX model to be used by the RWLS estimator is:
yk = a1 yk1 + a2 yk2 + b0 uk1 + b1 uk2

(2)

where y(k) is the system output, and u(k) is the control


signal. The time delay of the system is one sample, d = 1;
therefore b0 = 0.
The RWLS algorithm to be used in this work is presented
in [18]-[19], and summarized here as follows:
1) Select initial values of the weighting factor (a), the
forgetting factor (), and the number of samples (N )
2) Obtain the covariance matrix,
1
QN = TN WN N
where

This work was supported by the Transportation Engineering Research


Group (GIIT) of the Universidad Politecnica Salesiana, Cuenca, Ecuador.
1 The
authors are with the Department of Automative
Engineering, Universidad Politecnica Salesiana, Cuenca, Ecuador

WN

jvalladolid@ups.edu.ec; jortizg@ups.edu.ec
Luis I. Minchala is with the Department of Electrical, Electronic and
Telecommunications Engineering, Universidad de Cuenca, Cuenca, Ecuador

ismael.minchala@ucuenca.edu.ec
978-1-5090-0754-7/16/$31.00 2016 IEEE

886

a N nm
0
..
.
0
0

0
a N (nm+1)
..
.

...
...
..
.

0
0
..
.

0
0

...
...

a
0

0
0
..
.

0
a

B. Chattering reduction

y2
y3

..
=
.

yN 2
yN 1

y1
y2
..
.

u0
u1
..
.

yN 3
yN nm

uN (nm+1)
uN nm

Some methods have been proposed to mitigate the chattering effects in the SMC. As stated previously, the switching
function (sgn (s)) is to be replaced by the saturation function
in Eq. (9) [12]:

1 for s <
1
s for |s|
(9)
sat (s) =

1
for s >

3) Compute the estimator values by the use of weighted


least squares (WLS) for the first N samples,
N = QN N WN YN

This modification makes


 the control
 variable to get values
in the continuous range p p . Fig. 1 shows the behavior of the saturation function.

(3)

4) Obtain new values of uk and yk


T
5)
 k =

yk1 ykna uk1d uknbd
6) c = a1 + Tk Qk1
k i
h
1
7) k = c + Qk1 k
8) Update the estimator values
i
h
(4)
k = k1 + k yk Tk k1

1
-

-1

Fig. 1. Function sat (s)

k =

a1

9) Update the matrix Qk =


10) k = k + 1
11) Go to step 4

a2
h

Qk1

b1

T

k Tk Qk1

C. Adaptation Criterion

Fig. 2 shows the block diagram of the control system. The


adaptation law guarantees the convergence of the output of
the system, y(k), to the desired value, yd (k). The canonical
form of the state matrix and input matrix, are:

 

0
0
1
, B (k) =
(10)
A (k) =
1
a2 a1

IV. ADAPTIVE QUASI-SLIDING MODE


CONTROLLER DESIGN
A. Quasi-Sliding Mode Controller
Firstly, the error vector has to be defined:


yd (k) y (k)
x
(k) =
y d (k) y (k)

The input matrix B(k) = B is a constant matrix, while the


state matrix A is updated online by the recursive estimation
of the parameters a1 and a2 . Therefore, the control signal
of the QSMC adapts to model changes and assures error
convergence to zero.
Fig. 3 shows the adaptation criterion algorithm. The parameters of the system are updated by the RWLS only if the
system experiments a variation in its parameters (a1 and a2 )
of more that 2% from the previous estimation. This strategy
optimizes the processing time in the microcontroller, and
liberates resources to assure a constant sampling time in the
control loop.
The adaptive control law for the RWLS-QSMC can be
obtained from Eqs. (8) - (10), as follows:

1  T
(k)
u (k) = cT B
c 
A (k) cT + qT cT x
+T sat cT x
(k)
(11)

(5)

The sliding surface is defined as:


s (k) = cT x
(k)

(6)

where c <n is a constant vector arbitrarily chosen to keep


the system stable.
The reachability condition must be satisfied [11]:

s (k + 1) s (k) = qT s (k) T sgn (s (k))

(7)

where T > 0 is the sampling time, s (k) = cT x


(k) = 0 is
the sliding plane, q and are controller parameters to satisfy
the conditions 1 qT > 0, > 0 and q > 0.
The control law that satisfies the conditions of Eq. (7) is
defined as [11]:

1  T
(k)
u (k) = cT B
c A
cT + qT cT x

+T sgn cT x
(k)

D. Controller Stability Analysis


The system model and the control law shown in Eq. (1)
and Eq. (8) respectively. The stability analysis is performed
at the equilibrium point
 
0
e=
x
(12)
0

(8)

887

x(k+1)=A(k)x(k)+B(k)u(k)
y(k)=C(k)x(k)

Adaptation
Criterion
QSMC
yd (k)

Update
model

a 1 a 2 b1
RWLS
System
Identification
y(k)

e(k)

u(k)

Plant

Fig. 4. The setup of experiment

Fig. 2. Blocks diagram

V. EXPERIMENTAL IMPLEMENTATION AND


RESULTS ANALYSIS

POWER ON
Inicialize estimation
parameters ( =0.99, a=1)

A. Experimental setup
An Arduino DUE board and MATLAB perform the data
acquisition of the motor speed. The sampling time is set
at 20ms. Fig. 4 shows the experimental setup of the control system. The communication setup between the humanmachine interface (HMI) developed in a computer, and
the real time control system is developed through a serial
communication with a speed of 115200 baud. The PWM
signal for controlling the speed of the dc motor is generated
with a frequency of 500 Hz.
The parameters configured for the RWLS-QSMC, Eq.
(11), are the following:
T = 20ms, = 50, q = 0.8

and cT = 1 0 . The saturation function of Eq. (9) varies
depending on the parameter 10 < < 60, which depends
on the reference signal and the calculation performed by the
adaptation criterion.

Compute the WLS


algorithm for the
first 10 samples

Run RLWS to
calculate new model
QSMC
Adjust controller
parameters
A(k) and B(k)

New samples
y(k) and u(k)
Adaptation
Criterion
Variation 2% of the
Previous model vs.
Current model

NO

YES

B. Results analysis
To compare the advantages of the proposed controller, the
experiments performed in the dc motor considered an SMC
algorithm and the RWLS-QSMC algorithm. Fig 5 shows
the system response by using these two algorithms, and
the same testing conditions in both of them to compare
their performance. Fig. 5a shows a considerably amount of
chattering, since a standard SMC where used. Fig. 5b shows
the result of implementing an SMC with RWLS, where
clearly the chattering effect is still present. Fig. 5c shows a
significant improvement by the implementation of the QSMC
algorithm, although there is steady state error. Fig. 5d shows
the result of the RWLS-QSMC; the first ten seconds show
the convergence of the RWLS, and afterwards the system
does not present steady-state error, as it was proposed in the
methodology of design of the controller.
Fig. 6 shows a comparison of the QSMC and the RWLSQSMC under a reference change (tracking). After a convergence time (approximately ten seconds), the RWLS-QSMC
eliminates the steady-state error of the system, compared
with the QSMC that presents a slight steady-state error.
Fig. 7 shows the results of the system when tracking linear

Update Model
Fig. 3. Flowchart of the adaptation criterion

By considering the Lyapunov candidate function


T

V (x) = x (k) Px (k)


T
T
V (x) = x (k + 1) Px (k) + x (k) Px (k + 1)

(13)

where P is a symmetric positive definite matrix.


Let R be the set of point for which
V (x) = 0

(14)

and M be the largest invariant set in R. This particular


case,

T
e = 0 0
.
M is composed by the equilibrium point x
Therefore, considering the invariant set theorem [20] attributed to la Salle, we can conclude that the closed-loop
control system is stable.
Additionally, by noting that V (x) as ke
xk ,
the equilibrium point is globally asymptotically stable.
888

250

250

200

150

300
Speed [rps]

300

Speed [rps]

200

10

20

Output
Reference
100
0

30

10

20
Time [s]

(a)

(b)

300

300

250

250

200

150

100
0

20

30

100
0

10

20
Time [s]

(c)

(d)

15

20

25

QSMC

RWLSQSMC

10

15
Time [s]

20

30

25

30

Fig. 7. Tracking nonlinear and linear path respectively

Output
Reference

Time [s]

10
Reference

200

150

10

300

200

Output
Reference
100
0

30

Speed [rps]

Time [s]

Speed [rps]

Speed [rps]

100
0

200

100
0

150
Output
Reference

30

300
u(k) [PWM]

Speed [rps]

300

Fig. 5. Close-loop step response: (a) SMC with function sgn(s), (b) SMC
with RWLS and function sgn(s), (c) QSMC with function sat (s), (d)
QSMC with RWLS and function sat (s)

200
100
0
0

and nonlinear references (trajectories), where it is possible


to see the good performance of the proposed algorithm in
reducing the steady-state error while adapting its response
to the dynamic changes through the RWLS estimator. The
control effort is also smaller in the proposed controller over
the QSMC, as it shown in Fig. 8. Fig. 9 shows the errors
of the trajectory tracking from Fig. 7, where it is possible
to note the enhanced performance of the RWLS-QSMC over
the QSMC.

10
15
20
QSMC
RWLSQSMC

25

30

10

25

30

25

30

25

30

u(k) [PWM]

300
200
100
0
0

15
Time [s]

20

Fig. 8. Control signal u(k) for Fig. 7

300

e(k) [rps]

60
40
20
0
20
0

200

10
QSMC

15

20

RWLSQSMC

60
150

e(k) [rps]

Speed [rps]

250

Reference
QSMC
RWLSQSMC
100
0

10

15
Time [s]

20

25

30

Fig. 6. Step response

40
20
0
20
0

10

15
Time [s]

20

Fig. 9. Error signal e(k) for Fig. 7

889

VI. CONCLUSIONS

[13] D. Cho, Y. Kato, and D. Spilman, Sliding mode and classical


controllers in magnetic levitation systems, Control Systems, IEEE,
vol. 13, no. 1, pp. 4248, 1993.
[14] F. J. Bejarano, L. M. Fridman, and A. S. Poznyak, Output integral
sliding mode for min-max optimization of multi-plant linear uncertain
systems, IEEE Transactions on Automatic Control, vol. 54, no. 11,
pp. 26112620, 2009.
[15] Y. Shen, Y. Y. Qiu, and B. Y. Ma, Design of sliding-mode controller
with gain-scheduling integral switched term, Systems Engineering
and Electronics, vol. 33, no. 9, pp. 20792084, 2011.
[16] F. Ding, T. Chen, and L. Qiu, Bias compensation based recursive
least-squares identification algorithm for MISO systems, IEEE Transactions on Circuits and Systems II: Express Briefs, vol. 53, no. 5, pp.
349353, 2006.
[17] Y. Yasui, Robust identification algorithms for adaptive engine controls, in Proc. of the IEEE Mountain Workshop on Adaptive and
Learning Systems. Logan, UT: IEEE, July, 2006, pp. 5459.
[18] T. Kara and I. Eker, Nonlinear closed-loop direct identification of
a DC motor with load for low speed two-directional operation,
Electrical Engineering, vol. 86, no. 2, pp. 8796, 2004.
[19] U. Qidwai and O. Qidwai, Infrared image enhancement using recursive weighted least squares algorithm based pixel mapping for
surveillance applications, in Proc. Student Conference On Engineering, Sciences and Technology. IEEE, Dec, 2004, pp. 5153.
[20] J.-J. E. Slotine, W. Li et al., Applied nonlinear control. prentice-Hall
Englewood Cliffs, NJ, 1991, vol. 199, no. 1.

This paper shows the methodology of design and the


implementation results of an RWSL-QSMC to diminish the
steady-state error that is typically present in QSMC designs.
The experimental results show good performance in the
regulation of the speed of a dc motor compared with other
SMC techniques. A trajectory tracking is also analyzed,
which offered also better results than a non-adaptive QSMC,
in both the steady-state error and the control effort. The
RWSL-QSMC shows an adaptation time, which depends on
the design of the RWSL estimator, and particularly on the
forgetting factor (), and the number of samples (N ).
VII. ACKNOWLEDGMENTS
The authors are thankful to the Transportation Engineering
Research Group (GIIT) of the Universidad Politecnica Salesiana and Department of Electrical, Electronic and Telecommunications Engineering of the Universidad de Cuenca for
the support provided during this research.
R EFERENCES
[1] C. Evangelista, P. Puleston, F. Valenciaga, and L. M. Fridman,
Lyapunov-designed super-twisting sliding mode control for wind
energy conversion optimization, IEEE Transactions on Industrial
Electronics, vol. 60, no. 2, pp. 538545, 2013.
[2] E. Bianconi, J. Calvente, R. Giral, E. Mamarelis, G. Petrone, C. A.
Ramos-Paja, G. Spagnuolo, and M. Vitelli, A fast current-based
MPPT technique employing sliding mode control, IEEE Transactions
on Industrial Electronics, vol. 60, no. 3, pp. 11681178, 2013.
[3] P. Bhartiya, N. Rathore, and D. Fulwani, A tutorial on implementation
of Sliding mode observer for DC/DC power converters using FPGA,
in Proc. of the 40th Annual Conference of the IEEE Industrial
Electronics Society, IECON 2014. Dallas, TX: IEEE, Oct, 2014,
pp. 41534159.
[4] J. D. Valladolid, I. Minchala, and M. J. Vergara, Design of modelbased controllers applied to a solid-state low voltage dc breaker, in
Proc. of the IEEE PES on Innovative Smart Grid Technologies Latin
America (ISGT LATAM), 2015 . Montevideo, UY: IEEE, Oct, 2015,
pp. 316320.
[5] H. Bouadi, A. Aoudjif, and M. Guenifi, Adaptive flight control for
quadrotor UAV in the presence of external disturbances, in Proc.
of the 6th International Conference on Modeling, Simulation, and
Applied Optimization (ICMSAO), 2015 . Istanbul, Turkey: IEEE,
May, 2015, pp. 1 6.
[6] Sudhir and A. Swamp, Second order sliding mode control for
quadrotor, in Proc. of the 1st IEEE International Conference on
Control, Measurement and Instrumentation (CMI), 2016. Kolkata,
India: IEEE, Jan, 2016, pp. 9296.
[7] S. S. Butt, R. Prabel, and H. Aschemann, Second-order sliding mode
control of an innovative engine cooling system, in Proc. of the 41st
Annual Conference of the IEEE Industrial Electronics Society, IECON
2015. Yokohama, CN: IEEE, Nov, 2015, pp. 24792484.
[8] R. C. Joshi and V. K. Thakar, Congestion control in communication
networks using discrete sliding mode control, in Proc. of the 31st
Chinese Control Conference (CCC), 2012. Hefei, CN: IEEE, July,
2012, pp. 55535557.
[9] O. Cerman and P. Husek, Adaptive fuzzy sliding mode control for
electro-hydraulic servo mechanism, Expert Systems with Applications,
vol. 39, no. 11, pp. 10 26910 277, 2012.
[10] J. J. Slotine and S. S. Sastry, Tracking control of non-linear systems using sliding surfaces, with application to robot manipulators,
International journal of control, vol. 38, no. 2, pp. 465492, 1983.
[11] W. Gao, Y. Wang, and A. Homaifa, Discrete-time variable structure control systems, IEEE Transactions on Industrial Electronics,,
vol. 42, no. 2, pp. 117122, 1995.
[12] A. Bartoszewicz, Variable structure control-from principles to applications, in Proc. of the Int. Symposium on System Theory, Automation,
Robotics, Computers, Informatics, Electronics and Instrumentation,
Craiova, RO, Oct, 2007, pp. 1820.

890

You might also like