Professional Documents
Culture Documents
Research Article
Adaptive PID Controller Using RLS for SISO Stable and
Unstable Systems
Copyright © 2014 Rania A. Fahmy et al. This is an open access article distributed under the Creative Commons Attribution License,
which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.
The proportional-integral-derivative (PID) is still the most common controller and stabilizer used in industry due to its simplicity
and ease of implementation. In most of the real applications, the controlled system has parameters which slowly vary or are
uncertain. Thus, PID gains must be adapted to cope with such changes. In this paper, adaptive PID (APID) controller is proposed
using the recursive least square (RLS) algorithm. RLS algorithm is used to update the PID gains in real time (as system operates) to
force the actual system to behave like a desired reference model. Computer simulations are given to demonstrate the effectiveness of
the proposed APID controller on SISO stable and unstable systems considering the presence of changes in the systems parameters.
1. Introduction given ideal model which is demonstrated in [3, 4]. There are
two main categories of adaptive control. (1) Indirect. It starts
A challenging problem in designing a PID controller is to find with controlled system identification and then uses those
its appropriate gain values (i.e., proportional gain 𝐾𝑃 , integral estimated parameters to design the controller as presented in
gain 𝐾𝐼 , and derivative gain 𝐾𝐷) [1]. Moreover, in case [5–7]. (2) Direct. This is more practical than indirect method.
where some of the system parameters or operating conditions It uses a parameter estimation method to get the controller
are uncertain, unknown, or varying during operation, a parameters directly the same as introduced in [8, 9].
conventional PID controller would not change its gains to An adaptive PID controller is presented in [10] using
cope with the system changes. Therefore a tuning method least square method which is an offline parameter estimation
is needed. Various PID controller tuning techniques have method. On the other hand, an optimal self-tuning PID
been reported in the literature. It is classified into two groups, controller is introduced in [5] using RLS to estimate the
offline tuning methods as Zeigler-Nichols method and online model from its dynamic data. RLS is a recursive algorithm
tuning methods or adaptive PID. APID can tune the PID for online parameter estimation that is frequently used
gains to force the system to follow a desired performance even because it has a fast rate of convergence. In [11] an online
with the existence of some changes in system characteristics type of controller parameter tuning method is presented
[2]. by utilizing RLS algorithm. It develops the standard offline
Adaptive control has been commonly used during the fictitious reference iterative tuning FRIT method to be used
past decades specially the model reference adaptive control as a modified estimation error for RLS algorithm. Also the
(MRAC). Its objective is to adapt the parameters of the controllers in [11–13] present online tuning based on input
control system to force the actual process to behave like some and output data of the system.
2 Advances in Power Electronics
1 and becomes
[ 1 ]
[ ] 𝐶 (𝑠) (1 − 𝑀 (𝑠)) 𝑟 (𝑡) ≡ 𝑢 (𝑡) . (9)
[ ]
𝐶 (𝑠) = [𝐾𝑃 𝐾𝐼 𝐾𝐷] [ 𝑠 ]. (2)
[ ] Now the modified estimation error of RLS can be defined
[ 𝑠 ]
[ ] as
𝜏𝑠 + 1
[ ] 𝜁 = 𝑢 (𝑡) − 𝐶 (𝑠) (1 − 𝑀 (𝑠)) 𝑟 (𝑡) . (10)
Define This means that
𝑇
𝜃 = [𝐾𝑃 𝐾𝐼 𝐾𝐷] , 𝜁 = 𝑢 (𝑡) − 𝜃𝑇 𝜙1 (1 − 𝑀 (𝑠)) 𝑟 (𝑡) . (11)
1 Based on the RLS algorithms, we tune the parameters
[ 1 ] 𝜃 which are the PID gain values so that the following
[ ] (3)
[ ] performance index is minimized:
𝜙1 = [ 𝑠 ].
[ ]
[ 𝑠 ] 𝑁
[ ]
𝜏𝑠 + 1 𝐽 = ∑ 𝜁2 (𝑘) . (12)
[ ] 𝑘=0
Advances in Power Electronics 3
On the other hand, in order to apply the classical Let the sampling time be 𝑇𝑠 = 0.001 and let the reference
equations of the RLS estimation algorithm used to find the model be
parameters 𝜃, a modified estimation error can be expressed
1
as 𝑀 (𝑠) = . (18)
(0.5𝑠 + 1)2
𝑇
𝜁 = 𝑢 − 𝜃 𝜙, (13)
The reference input signal is chosen to be a delayed square
where 𝜙 = 𝜙1 (1 − 𝑀(𝑠))𝑟(𝑡). wave.
To build the RLS algorithm using the 2nd-Level S- The proposed technique in Section 3 is applied. The initial
Function in Matlab, the first term in right hand side of (13) controller parameters and the initial correlation matrix are
has to be rewritten as ̂
set to be 𝜃(0) = [3 0 1] and 𝑃(0) = 104 𝐼, respectively also
𝑇
𝜁 = 𝑢 − 𝜙RLS 𝜃, (14) consider 𝛼 = 10−4 and 𝜏 = 0.1.
In order to evaluate the proposed control method to
𝑇 𝜙𝑇 0 plant uncertainties, we consider the case where there exists
where 𝜙RLS = [ 0 𝜙𝑇 ] and 𝜃 is a vector which contains all
a change in one of the system poles at 155 s (i.e., the pole 𝑠 = 1
parameters of PID gains. changes to 𝑠 = 3); moreover the gain of the plant is doubled
RLS is an algorithm which recursively finds the optimal suddenly at 225 s.
̂ of the controller parameter by using 𝜃(𝑘−1)
estimate 𝜃(𝑘) ̂ [3]. The output by the proposed APID using RLS controller
Thus, considering (14), the proposed RLS update laws will be is shown in Figure 2 and it is compared with the controller
as follows: presented in [11] and conventional PID. In the proposed con-
troller the PID gains are tuned adaptively despite the variation
𝜃̂ (𝑘) = 𝜃̂ (𝑘 − 1) + 𝐾 (𝑘) [𝑢 (𝑘) − 𝜙RLS
𝑇
(𝑘) 𝜃̂ (𝑘 − 1)] , of gain and poles of plant, and good tracking performance
is maintained. It is clear from the figure that the proposed
(15a) APID using RLS controller has superior performance as it has
smaller overshoot at the beginning of the simulation than the
𝐾 (𝑘) = 𝑝 (𝑘 − 1) 𝜙RLS (𝑘) controller in [11] and the conventional PID could not handle
−1
(15b) either the gain change or the pole change.
𝑇
× [𝐼 + 𝜙RLS (𝑘) 𝑝 (𝑘 − 1) 𝜙RLS (𝑘)] ,
𝑇 4.2. Unstable SISO System. Now, consider that the unstable
𝑝 (𝑘) = 𝑝 (𝑘 − 1) − 𝐾 (𝑘) 𝜙RLS (𝑘) 𝑝 (𝑘 − 1) , (15c)
system stated in [18] is a simple SISO model of inverted
where 𝐾 is the adaptation gain and 𝑃 is the covariance matrix. pendulum
According to the above RLS algorithm equations, the
̂ 1
controller parameters 𝜃(𝑘) are updated at each time. Thus, 𝐺 (𝑠) = . (19)
̂ 𝑠2 − 1
variation of the controller parameters 𝜃(𝑘) may be large at
the start of algorithm, at the time when plant characteristics And reference model can be expressed as
change rapidly, and at the time when the set-point reference
is changed. Due to this, the system may stop working steadily. 1
𝑀 (𝑠) = , (20)
In order to avoid such a problem and reduce the variation (𝑠 + 1)2
̂ is filtered by a low-pass filter
of the controller parameters 𝜃(𝑘)
which can be defined as where natural frequency 𝑤𝑛 = 2 and damping ration 𝜁 = 1.
The reference input signal is chosen to be a delayed square
𝛼
𝐻LPF = , 0 ≤ 𝛼 ≤ 1, (16) wave.
𝑧+𝛼−1 The proposed technique in Section 3 is applied and the
where 𝛼 is a sufficiently small positive constant. So 𝜃 is ̂ = [200 −10 200]
initialization parameters are set to be 𝜃(0)
changed reasonably. and 𝑃(0) = 10𝐼, also consider 𝜏 = 0.02.
It is shown in Figure 3 that the proposed APID using
4. Numerical Examples RLS controller can stabilize the system and achieve good
tracking performance despite the fact that the gain of the
In order to illustrate the main features of the proposed plant is doubled suddenly at 155 s and the system’s unstable
APID using RLS, simulation examples are now presented. The pole is changed at 255 s. On the contrary the conventional
following examples cover stable and unstable systems cases PID and the controller presented in [11] with the same initial
and consider the changes in the system parameters during parameters failed to stabilize the system.
simulation time.
5. Conclusions
4.1. Stable SISO System. Consider the plant used in [11]
In this paper, adaptive PID (APID) controller is proposed
12𝑠 + 8 using RLS algorithm which updates the PID gains automati-
𝐺 (𝑠) = . (17)
20𝑠 + 113𝑠 + 147𝑠2 + 62𝑠 + 8
4 3 cally online to force the actual system to behave like a desired
4 Advances in Power Electronics
1.2
[7] S. Xiao, Y. Li, and J. Liu, “A model reference adaptive PID
control for electromagnetic actuated micro-positioning stage,”
1 in Proceedings of the IEEE International Conference on Automa-
0.8 tion Science and Engineering: Green Automation Toward a
Sustainable Society (CASE ’12), pp. 97–102, August 2012.
0.6
Output
Rotating
Machinery
International Journal of
The Scientific
Engineering Distributed
Journal of
Journal of
Journal of
Control Science
and Engineering
Advances in
Civil Engineering
Hindawi Publishing Corporation Hindawi Publishing Corporation
http://www.hindawi.com Volume 2014 http://www.hindawi.com Volume 2014
Journal of
Journal of Electrical and Computer
Robotics
Hindawi Publishing Corporation
Engineering
Hindawi Publishing Corporation
http://www.hindawi.com Volume 2014 http://www.hindawi.com Volume 2014
VLSI Design
Advances in
OptoElectronics
International Journal of
International Journal of
Modelling &
Simulation
Aerospace
Hindawi Publishing Corporation Volume 2014
Navigation and
Observation
Hindawi Publishing Corporation
http://www.hindawi.com Volume 2014
in Engineering
Hindawi Publishing Corporation
http://www.hindawi.com Volume 2014
Engineering
Hindawi Publishing Corporation
http://www.hindawi.com Volume 2014
Hindawi Publishing Corporation
http://www.hindawi.com
http://www.hindawi.com Volume 2014
International Journal of
International Journal of Antennas and Active and Passive Advances in
Chemical Engineering Propagation Electronic Components Shock and Vibration Acoustics and Vibration
Hindawi Publishing Corporation Hindawi Publishing Corporation Hindawi Publishing Corporation Hindawi Publishing Corporation Hindawi Publishing Corporation
http://www.hindawi.com Volume 2014 http://www.hindawi.com Volume 2014 http://www.hindawi.com Volume 2014 http://www.hindawi.com Volume 2014 http://www.hindawi.com Volume 2014