Professional Documents
Culture Documents
System Identification Using LMS, RLS, EKF and Neural Network
System Identification Using LMS, RLS, EKF and Neural Network
System Identification Using LMS, RLS, EKF and Neural Network
Abstract—Model accuracy is the most important step towards work. Section III presents the plant description of the DC
efficient control design. Various system identification techniques motor. In section IV, each system identification technique will
exist which are used to identify model parameters. However, be discussed. The results will be shown in section V. The
these techniques have their merits and demerits which need to
be considered before selecting a particular system identification estimation accuracy of the identified parameters, the compu-
technique. In this paper, we compared different types of system tational complexity and convergence rate of each algorithms
identification techniques and used them to identify our DC- are discussed in this section. The paper will be concluded with
motor use-case. Using the identified system, we designed different a comparison of the identification techniques in section VI.
discrete PI controllers in order to investigate the system response.
We concluded EKF provided the best performance in terms of
parameter accuracy and convergence rate.
Index Terms—PID, EKF, LMS, RLS, NARX, System Identifi- II. R ELATED W ORK
cation Algorithms
978-1-7281-3473-4/19/$31.00
Authorized licensed use limited to: Universidad©2019
Nacional IEEE
de Colombia (UNAL). Downloaded on April 30,2021 at 21:50:19 UTC from IEEE Xplore. Restrictions apply.
2019 IEEE International Conference on Vehicular Electronics and Safety (ICVES)
Ia If Noise
Ra La Rf
Plant +
+
Lf Vf G(z)
Va ω
d(k)
X(k) + ε(k)
-
Model
Adaptive filters are considered to be suited for time-variant Wk+1 = Wk + µ [dk − (WkT Xk )] Xk (5)
| {z }
systems because their weights attempt to converge to the k
unknown system transfer function coefficients through an The step size should be chosen in a range of 0 ≤ µ ≤ 2/λmax
optimization technique as shown in Fig. 2 [6], [11]. The to have a higher convergence probability where λmax is the
coefficients of a discrete linear transfer function (Equation (2)) maximum eigenvalue of the autocorrelation matrix R [14]. A
are identified by means of minimizing the error. lower step size leads to a better convergence probability of the
b0 + b1 z −1 + b2 z −2 + ... + bm z −m real parameter. But it requires also more time to identify this
G(z) = (2) parameter. The convergence rate can be improved through a
1 + a1 z −1 + a2 z −2 + ... + an z −n
higher step size but the parameter may not converge to the
Each coefficient is summarized in the weight vector W (Equa- real value [14].
tion (3)). 2) RLS Algorithm: RLS is a recursive method of the least
W T = [−a1 , ..., −an , b0 , ..., bm ] (3) squares algorithm which aims to minimize the sum of the
squared error k as shown in Fig. 2. The gain Kk+1 is obtained
by Equation (6) which recursively predicts the weights with
TABLE I the decreasing error k+1 (Equation (7)).
PHYSICAL PARAMETERS OF THE DC MOTOR
Pk Xk+1
Kk+1 = T P X
(6)
Parameters Values λ + Xk+1 k k+1
Moment of inertia of the rotor (J) 0.05 kgm2
T
Viscous friction constant (b) 0.5 Nms Wk+1 = Wk + Kk+1 · [dk+1 − Xk+1 Wk ] (7)
Electromotive force constant(Ke ) 0.836 Vsrad−1 | {z }
Torque constant (Kt ) 0.836 NmA−1 k+1
Electric resistance (R) 1Ω
Electric inductance (L) 0.1 H In Equation (6), Pk is the covariance matrix and λ is the
forgetting factor. It can be chosen in a range of 0 ≤ λ ≤ 1
Authorized licensed use limited to: Universidad Nacional de Colombia (UNAL). Downloaded on April 30,2021 at 21:50:19 UTC from IEEE Xplore. Restrictions apply.
2019 IEEE International Conference on Vehicular Electronics and Safety (ICVES)
u(k)
Q P0 Pk-1 R W1
u(k-1) Z-1
Pk Kk
Covariance Matrix Calculating Kalman Updating Covariance
Prediction Gain Matrix u(k-2) Z-1 W2
x0 Kk u(k-n) Z-1
x̂k x̂k y(k)
State Vector
Updating State Vector
Prediction
y(k-n) Z-1
uk-1 x̂k-1 yk
Delay
y(k-2) Z-1
[12]. The covariance matrix can be initialized as P0 =I (identity Fig. 4. Block diagram of NARX neural network
matrix) since the system parameters are unknown at the first
iteration. Afterwards, the covariance matrix can be updated by
Equation (8) in each iteration. EKF identifies the parameters ωn and ζ with the extended state
vector x̂k based on the set of equations in [15]. Each step of
1 T
Pk+1 = (Pk − Kk+1 Xk+1 Pk ) (8) EKF is illustrated in Fig. 3.
λ
C. NARX Neural Network
NARX Neural network is a recurrent multi-layer perceptron
B. Extended Kalman Filter neural network that is used as a black-box identification
method. The main advantage of this identification method to
Kalman Filter (KF) is originally used to estimate the states
the previously explained algorithms is that it is not important
of linear systems. In this research work, KF is designed based
to have knowledge about the real system. Moreover, it shows
upon the set of equations in [15]. It consists of a prediction
its effectiveness for linear and nonlinear systems because
and correction step. In the prediction step, KF estimates the
it is based on autoregressive models with exogenous inputs
internal states of the system x̂k based on previous estimated
which are known for their efficiency in complex system
states x̂k−1 and the previous control signal uk−1 . The states
identifications [17]. NARX can be described as follows:
get updated based on the estimated output signal ŷk , the
real system measurement yk and the calculated Kalman gain y(k) = f (y(k−1), ..., y(k−ny ), u(k−1), ..., u(k−nu )) (11)
Kk [15]. The gain parameter Kk updates the covariance
matrix Pk−1 within the correction step. The dimension of NARX is based on a parallel architecture and series parallel
the estimated states x̂k needs to be extended for the system architecture. The series parallel architecture is used during the
identification. Equation (9) shows the extension of the state training phase while parallel architecture is used during the
vector through the unknown parameters as ωn the natural testing phase [18]. The output signal depends on the previous
frequency and ζ the damping ratio for a second order system. values of the output signal and exogenous input signal [18] as
Furthermore, the state x1 represents the angular acceleration illustrated in Fig. 4. The high number of the neurons in hidden
and x2 angular velocity of DC motor. layer lead to a high prediction accuracy whereby the training
time and computational complexity may increase accordingly
x1 to it [19].
x2
x̂k = ζ
(9) IV. R ESULTS
ωn The results were performed on a model of a DC motor in
MATLAB/Simulink 2018b. The input and output data were
The extension leads to a non-linearity in the state space model recorded to identify it with the identification algorithms.
whereby EKF has to be used for the identification. EKF is
known for its efficiency in estimating the parameters and A. Parameters of the Reference System
internal states of the system [16]. Equation (10) shows the 1) Transfer Function Parameters: RLS and LMS identify
obtained non-linearity in the second order system where TS the reference system parameters using Equation (2) which
is the sampling time. leads to the resulting parameters in (12).
Authorized licensed use limited to: Universidad Nacional de Colombia (UNAL). Downloaded on April 30,2021 at 21:50:19 UTC from IEEE Xplore. Restrictions apply.
2019 IEEE International Conference on Vehicular Electronics and Safety (ICVES)
The systems identified using the algorithms exhibit disparity System Convergence time MSE final value (appx)
with the reference system. The Mean Square Error (MSE) RLS 28 seconds 1.2 · 10−6
of the identified systems parameters are shown in Fig. 5. LMS 280 seconds 3.2 · 10−6
EKF 9.3seconds 7.6 · 10−7
Two main factors for the comparison are convergence rate NARX 15 seconds 2.5 · 10−6
and estimation accuracy. Although the best approach would
Authorized licensed use limited to: Universidad Nacional de Colombia (UNAL). Downloaded on April 30,2021 at 21:50:19 UTC from IEEE Xplore. Restrictions apply.
2019 IEEE International Conference on Vehicular Electronics and Safety (ICVES)
TABLE III
PI C ONTROLLER G AINS
System Kp Ki
Reference System 0.0071750 1.4350145
LMS 0.0071960 1.4392110
RLS 0.0071758 1.4351679
EKF 0.0071750 1.4350147
NARX 0.0071639 1.4327966
Fig. 7. Error between system responses Fig. 8. Comparison of controlled systems responses
Authorized licensed use limited to: Universidad Nacional de Colombia (UNAL). Downloaded on April 30,2021 at 21:50:19 UTC from IEEE Xplore. Restrictions apply.
2019 IEEE International Conference on Vehicular Electronics and Safety (ICVES)
TABLE IV
C OMPARISON B ETWEEN SYSTEM IDENTIFICATION TECHNIQUES
R EFERENCES
Authorized licensed use limited to: Universidad Nacional de Colombia (UNAL). Downloaded on April 30,2021 at 21:50:19 UTC from IEEE Xplore. Restrictions apply.