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

Abstract This paper presents the methodology of design of RWLS-QSMC is the possibility to operate the dc motor in
a discrete-time adaptive quasi-sliding mode controller (QSMC) nonlinear zones of its dynamics, with good results.
based on a recursive weighted least square (RWLS) estimator This paper is organized as follows: Section II presents the
for a dc motor. The proposed control scheme allows handling
the classic problem of a QSMCs, which is the steady-state error model of the dc motor. Section III presents the algorithm of
due to the use of a saturation function instead of a switching the RWLS estimator. Section IV presents the methodology
function in the sliding mode control (SMC) algorithm. The use of design of the QSMC. Section V presents the details on the
of linear and nonlinear signal references helps to show the implementation and results of the RWLS-QSMC. Section VI
closed-loop performance of the control system and its tracking presents the conclusions.
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
I. INTRODUCTION dynamics by using the state-space approach:
SMC is a powerful controller that offers good perfor- x (k + 1) = A (k) x (k) + B (k) u (k)
mances in systems, linear and nonlinear, with uncertainties (1)
y (k) = C (k) x (k)
in their models. Many researches of SMC applied to the
energy field have been reported in literature [1][4] . Addi- where x (k) <n is the state vector, y (k) <m is the
tional applications of SMC for unmanned aerial vehicles are output vector, u (k) <r is the input vector, A (k) <nn
reported in [5], [6]. Further studies of SMC applied to an is the state matrix, B (k) <nr is the input matrix and
engine cooling system [7], congestion control in communica- C (k) <mn is the output matrix.
tion networks [8], and the regulation of an electro-hydraulic Without loss of generality, the dc motor is represented by
system [9] are also analyzed. a second order model where n = 2, m = 1 and r = 1,
The implementation of SMC seems limited, sometimes, which was adjusted from data measured from the system by
for the theoretical requirement of a switching control signal. applying a pseudorandom binary signal.
The signal discontinuity due to such switching requirement
III. RECURSIVE WEIGHTED LEAST SQUARE
causes the chattering phenomenon. This issue has been
ESTIMATOR
studied, and a solution where a saturation function is used
instead of the switching function is proposed under the name The ARX model to be used by the RWLS estimator is:
of QSMC [10][12]. Although, the use of the saturation
function typically causes steady-state error. yk = a1 yk1 + a2 yk2 + b0 uk1 + b1 uk2 (2)
Diminishing the steady-state error caused by the QSMC where y(k) is the system output, and u(k) is the control
is typically done by the introduction of an integral term in signal. The time delay of the system is one sample, d = 1;
the sliding surface [13][15]. This paper proposes a discrete therefore b0 = 0.
QSMC based on a RWLS estimator. The RWLS estimator The RWLS algorithm to be used in this work is presented
algorithm [16][18] allows the reduction of the steady state in [18]-[19], and summarized here as follows:
error by adapting the parameters of an autoregressive model
with exogenous input (ARX) of the system to be controlled. 1) Select initial values of the weighting factor (a), the
The proposed controller (RWLS-QSMC) is tested in the forgetting factor (), and the number of samples (N )
speed regulation of a dc motor. The results show a good 2) Obtain the covariance matrix,
performance of the system in the regulation and tracking of 1
QN = TN WN N
linear and nonlinear references. One of the strengths of the
where
This work was supported by the Transportation Engineering Research
a N nm

Group (GIIT) of the Universidad Politecnica Salesiana, Cuenca, Ecuador. 0 ... 0 0
1 The authors are with the Department of Automative 0 a N (nm+1) ... 0 0
Engineering, Universidad Politecnica Salesiana, Cuenca, Ecuador
jvalladolid@ups.edu.ec; jortizg@ups.edu.ec WN =
.. .. .. .. ..
. . . . .
Luis I. Minchala is with the Department of Electrical, Electronic and
Telecommunications Engineering, Universidad de Cuenca, Cuenca, Ecuador
0 0 ... a 0
ismael.minchala@ucuenca.edu.ec 0 0 ... 0 a

978-1-5090-0754-7/16/$31.00 2016 IEEE 886


B. Chattering reduction

y2 y1 u0
Some methods have been proposed to mitigate the chatte-
y3 y2 u1 ring effects in the SMC. As stated previously, the switching
function (sgn (s)) is to be replaced by the saturation function

N =
.. .. ..
. . .
in Eq. (9) [12]:
yN 2 yN 3 uN (nm+1)

yN 1 yN nm uN nm 1 for s <
1
sat (s) = s for |s| (9)
3) Compute the estimator values by the use of weighted
1 for s >
least squares (WLS) for the first N samples,
This modification makes
 the control
 variable to get values
N = QN N WN YN (3) in the continuous range p p . Fig. 1 shows the beha-
vior of the saturation function.
4) Obtain new values of uk and yk
T
 k =
5)  1
yk1 ykna uk1d uknbd
6) c = a1 + Tk Qk1
k i
h - 0
1
7) k = c + Qk1 k
8) Update the estimator values
h i -1
k = k1 + k yk Tk k1 (4)
Fig. 1. Function sat (s)
 T
k = a1 a2 b1
h i C. Adaptation Criterion
Qk1
9) Update the matrix Qk = k Tk Qk1
Fig. 2 shows the block diagram of the control system. The
10) k = k + 1 adaptation law guarantees the convergence of the output of
11) Go to step 4 the system, y(k), to the desired value, yd (k). The canonical
form of the state matrix and input matrix, are:
IV. ADAPTIVE QUASI-SLIDING MODE    
CONTROLLER DESIGN 0 1 0
A (k) = , B (k) = (10)
a2 a1 1
A. Quasi-Sliding Mode Controller
The input matrix B(k) = B is a constant matrix, while the
Firstly, the error vector has to be defined: state matrix A is updated online by the recursive estimation
  of the parameters a1 and a2 . Therefore, the control signal
yd (k) y (k) of the QSMC adapts to model changes and assures error
x (k) = (5)
yd (k) y (k) convergence to zero.
The sliding surface is defined as: Fig. 3 shows the adaptation criterion algorithm. The pa-
rameters of the system are updated by the RWLS only if the
s (k) = cT x (k) (6) system experiments a variation in its parameters (a1 and a2 )
of more that 2% from the previous estimation. This strategy
where c <n is a constant vector arbitrarily chosen to keep optimizes the processing time in the microcontroller, and
the system stable. liberates resources to assure a constant sampling time in the
The reachability condition must be satisfied [11]: control loop.
The adaptive control law for the RWLS-QSMC can be
obtained from Eqs. (8) - (10), as follows:
s (k + 1) s (k) = qT s (k) T sgn (s (k)) (7) 1  T 
u (k) = cT B A (k) cT + qT cT x (k)
c 
where T > 0 is the sampling time, s (k) = cT x (k) = 0 is +T sat cT x (k)
the sliding plane, q and are controller parameters to satisfy (11)
the conditions 1 qT > 0, > 0 and q > 0. D. Controller Stability Analysis
The control law that satisfies the conditions of Eq. (7) is
defined as [11]: The system model and the control law shown in Eq. (1)
and Eq. (8) respectively. The stability analysis is performed
at the equilibrium point
1  T 
u (k) = cT B c A cT + qT cT x (k)  
0
(8)
x
e= (12)

+T sgn cT x (k) 0

887
x(k+1)=A(k)x(k)+B(k)u(k) Update
y(k)=C(k)x(k) model
a 1 a 2 b1
Adaptation RWLS
Criterion System
Identification
QSMC
yd (k) y(k)
S Plant
e(k) u(k)

Fig. 2. Blocks diagram Fig. 4. The setup of experiment

POWER ON V. EXPERIMENTAL IMPLEMENTATION AND


RESULTS ANALYSIS
Inicialize estimation A. Experimental setup
parameters ( =0.99, a=1)
An Arduino DUE board and MATLAB perform the data
Compute the WLS acquisition of the motor speed. The sampling time is set
algorithm for the at 20ms. Fig. 4 shows the experimental setup of the con-
first 10 samples trol system. The communication setup between the human-
machine interface (HMI) developed in a computer, and
Run RLWS to
the real time control system is developed through a serial
calculate new model communication with a speed of 115200 baud. The PWM
QSMC signal for controlling the speed of the dc motor is generated
Adjust controller New samples with a frequency of 500 Hz.
parameters y(k) and u(k) The parameters configured for the RWLS-QSMC, Eq.
A(k) and B(k) Adaptation (11), are the following: T = 20ms, = 50, q = 0.8
Criterion 
and cT = 1 0 . The saturation function of Eq. (9) varies
Variation 2% of the
Previous model vs. NO depending on the parameter 10 < < 60, which depends
Current model on the reference signal and the calculation performed by the
adaptation criterion.
YES B. Results analysis
Update Model To compare the advantages of the proposed controller, the
experiments performed in the dc motor considered an SMC
Fig. 3. Flowchart of the adaptation criterion 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
By considering the Lyapunov candidate function their performance. Fig. 5a shows a considerably amount of
T
chattering, since a standard SMC where used. Fig. 5b shows
V (x) = x (k) Px (k) the result of implementing an SMC with RWLS, where
T T (13)
V (x) = x (k + 1) Px (k) + x (k) Px (k + 1) clearly the chattering effect is still present. Fig. 5c shows a
significant improvement by the implementation of the QSMC
where P is a symmetric positive definite matrix.
algorithm, although there is steady state error. Fig. 5d shows
Let R be the set of point for which
the result of the RWLS-QSMC; the first ten seconds show
V (x) = 0 (14) the convergence of the RWLS, and afterwards the system
does not present steady-state error, as it was proposed in the
and M be the largest invariant set in R. This particular
 case,
T methodology of design of the controller.
M is composed by the equilibrium point x e = 0 0 . Fig. 6 shows a comparison of the QSMC and the RWLS-
Therefore, considering the invariant set theorem [20] attri- QSMC under a reference change (tracking). After a conver-
buted to la Salle, we can conclude that the closed-loop gence time (approximately ten seconds), the RWLS-QSMC
control system is stable. eliminates the steady-state error of the system, compared
Additionally, by noting that V (x) as ke xk , with the QSMC that presents a slight steady-state error.
the equilibrium point is globally asymptotically stable. Fig. 7 shows the results of the system when tracking linear

888
300 300
300

Speed [rps]
250 250
Speed [rps]

Speed [rps]
200
200 200

150 150 100


Output Output 0 5 10 15 20 25 30
Reference Reference
100 100 Reference QSMC RWLSQSMC
0 10 20 30 0 10 20 30
Time [s] Time [s] 300

Speed [rps]
(a) (b)
300 300
200
250 250
Speed [rps]

Speed [rps]

100
200 200
0 5 10 15 20 25 30
Time [s]

150 150 Fig. 7. Tracking nonlinear and linear path respectively


Output Output
Reference Reference
100 100
0 10 20 30 0 10 20 30
Time [s] Time [s]
300
(c) (d)
u(k) [PWM]
Fig. 5. Close-loop step response: (a) SMC with function sgn(s), (b) SMC 200
with RWLS and function sgn(s), (c) QSMC with function sat (s), (d)
QSMC with RWLS and function sat (s) 100

0
0 5 10 15 20 25 30
and nonlinear references (trajectories), where it is possible QSMC RWLSQSMC
to see the good performance of the proposed algorithm in 300
u(k) [PWM]

reducing the steady-state error while adapting its response


200
to the dynamic changes through the RWLS estimator. The
control effort is also smaller in the proposed controller over 100
the QSMC, as it shown in Fig. 8. Fig. 9 shows the errors
of the trajectory tracking from Fig. 7, where it is possible 0
0 5 10 15 20 25 30
to note the enhanced performance of the RWLS-QSMC over Time [s]
the QSMC.
Fig. 8. Control signal u(k) for Fig. 7

300
60
40
e(k) [rps]

250
20
0
Speed [rps]

200 20
0 5 10 15 20 25 30
QSMC RWLSQSMC
60
150 40
e(k) [rps]

Reference
QSMC 20
RWLSQSMC 0
100
0 5 10 15 20 25 30 20
Time [s] 0 5 10 15 20 25 30
Time [s]
Fig. 6. Step response
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,
This paper shows the methodology of design and the vol. 13, no. 1, pp. 4248, 1993.
implementation results of an RWSL-QSMC to diminish the [14] F. J. Bejarano, L. M. Fridman, and A. S. Poznyak, Output integral
steady-state error that is typically present in QSMC designs. sliding mode for min-max optimization of multi-plant linear uncertain
systems, IEEE Transactions on Automatic Control, vol. 54, no. 11,
The experimental results show good performance in the pp. 26112620, 2009.
regulation of the speed of a dc motor compared with other [15] Y. Shen, Y. Y. Qiu, and B. Y. Ma, Design of sliding-mode controller
SMC techniques. A trajectory tracking is also analyzed, with gain-scheduling integral switched term, Systems Engineering
and Electronics, vol. 33, no. 9, pp. 20792084, 2011.
which offered also better results than a non-adaptive QSMC, [16] F. Ding, T. Chen, and L. Qiu, Bias compensation based recursive
in both the steady-state error and the control effort. The least-squares identification algorithm for MISO systems, IEEE Trans-
RWSL-QSMC shows an adaptation time, which depends on actions on Circuits and Systems II: Express Briefs, vol. 53, no. 5, pp.
349353, 2006.
the design of the RWSL estimator, and particularly on the [17] Y. Yasui, Robust identification algorithms for adaptive engine con-
forgetting factor (), and the number of samples (N ). trols, in Proc. of the IEEE Mountain Workshop on Adaptive and
Learning Systems. Logan, UT: IEEE, July, 2006, pp. 5459.
VII. ACKNOWLEDGMENTS [18] T. Kara and I. Eker, Nonlinear closed-loop direct identification of
a DC motor with load for low speed two-directional operation,
The authors are thankful to the Transportation Engineering Electrical Engineering, vol. 86, no. 2, pp. 8796, 2004.
Research Group (GIIT) of the Universidad Politecnica Sale- [19] U. Qidwai and O. Qidwai, Infrared image enhancement using re-
siana and Department of Electrical, Electronic and Telecom- cursive weighted least squares algorithm based pixel mapping for
surveillance applications, in Proc. Student Conference On Engineer-
munications Engineering of the Universidad de Cuenca for ing, Sciences and Technology. IEEE, Dec, 2004, pp. 5153.
the support provided during this research. [20] J.-J. E. Slotine, W. Li et al., Applied nonlinear control. prentice-Hall
Englewood Cliffs, NJ, 1991, vol. 199, no. 1.
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 model-
based 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 sys-
tems 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 struc-
ture control systems, IEEE Transactions on Industrial Electronics,,
vol. 42, no. 2, pp. 117122, 1995.
[12] A. Bartoszewicz, Variable structure control-from principles to appli-
cations, 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