# Neural Adaptive PID and Neural Indirect Adaptive Control Switch Controller for Nonlinear MIMO Systems

Authors: Sabrine Slama; Ayachi Errachdi; Mohamed Benrejeb
Journal: Mathematical Problems in Engineering
 (2019)

---

## Abstract

This paper proposes an adaptive switch controller (ASC) design for the nonlinear multi-input multi-output system (MIMO). In fact, the proposed method is an online switch between the neural network adaptive PID (APID) controller and the neural network indirect adaptive controller (IAC). According to the design of the neural network IAC scheme, the adaptation law has been developed by the gradient descent (GD) method. However, the adaptive PID controller is built based on the neural network combining the PID control and explicit neural structure. The strategy of training consists of online tuning of the neural controller weights using the backpropagation algorithm to select the suitable combination of PID gains such that the error between the reference signal and the actual system output converges to zero. The stability and tracking performance of the neural network ASC, the neural network APID, and the neural network IAC are analyzed and evaluated by the Lyapunov function. Then, the controller results are compared between APID, IAC, and ASC, in this paper, applying to a nonlinear system. From simulations, the proposed adaptive switch controller has better effects both on response time and on tracking performance with smallest MSE.


---

## Body

## 1. Introduction

Tracking performance and fast response time are a major concern in industrial control theory. This interest comes in order to facilitate the use of the systems, to satisfy stricter design criteria, and to avoid the lack of some knowledge of the system. In this context, a great effort is being made within the area of system control. A lot of control system approaches have been studied, and many researchers have developed new techniques.For instance, the proportional integrate derivative (PID) controller has been widely spread in various applications until these days due to its simple structure and easy implementation [1, 2]. A challenging problem in designing a PID controller is to find its appropriate gain values [1]. For nonlinear systems, PID controller performance decreases under a great deal of tuning efforts of constant gains to get local stability. Then, there remains to explore autotuning schemes for the nonlinear system, which clearly leads to consider some sort of system estimation [3]. A new strategy called adaptive PID is needed which automatically detects the changes in the controlled system and readjusts its gains by improving the response of the PID controller.In [4–7], a PID controller-based neural network is proposed with self-learning and adaptive ability for nonlinear systems. In [1], the author proposed an adaptive PID controller using the recursive least square algorithm for single-input single-output stable and unstable systems. However, in [3] and in [8], respectively, a PID controller based, firstly, on the wavelet neural network is applied to the AC motor and, secondly, on radial basis function is applied to quadrator. In [9], online tuning of the neural PID controller is proposed for plant hybrid modelling. However, in [10], a PID-type fuzzy logic controller based on particle swarm optimization is proposed.The indirect adaptive control (IAC) is well used in [11–13]. This method is based on two parts: identification and control of the system. For the identification phase, the aim is to obtain a structure with the capacity of representing the behavior of the unknown system. This process may be performed offline or online using measurements of input and output of the system. Neural networks, under certain condition, can approximate any nonlinear function with arbitrary precision. It also has a strong ability of adaptive, self-learning, and self-organization. For the control phase, the goal is to design a controller with the capacity of generating the appropriate signal law in order to carry out the output of the system to the desired target. The IAC is applied for nonlinear dynamic systems using self-recurrent wavelet neural networks via adaptive learning rates [14], using fuzzy neural networks via kernel smoothing [15], and using radial basis function [11]. However, in [13], a performance comparison of neural network training approaches in indirect adaptive control is proposed. In [16], an indirect hierarchical FCMAC control is proposed for the ball and plate system.However, hybrid control has received considerable attention during the past two decades, and the class of switching systems is specifically employed in many industrial applications such as in [17–24] and [25]. In fact, in [17] and [21], respectively, the PID is mixed with the model reference adaptive control and the model predictive controller. In [19, 20], a mixed method between the PID controller and model reference control is proposed for the nonlinear hydraulic actuator and for an aerial inertially stabilized platform. These methods are proposed to suppress the effect of nonlinear and time-varying parameters and to get faster response time and better tracking performance. Motivated by the above discussion, we aim, in this paper, to combine the neural network adaptive PID (APID) controller with the neural network indirect adaptive control (IAC) and establish a unified framework to get fast better tracking performance for the nonlinear control system. By constructing the Lyapunov function, a sufficient condition is presented to ensure the asymptotic stability of the state tracking control. The proposed switch controller is applied to a nonlinear multi-input multi-output system.The rest of this paper is organized as follows. Section2 briefly introduces the nonlinear system problem of the control system. In Section 3, the proposed method is detailed and the stability properties of the adaptive designs are studied. In Section 4, an example of a nonlinear system is presented to illustrate the proposed efficiency of the methods. At last, concluding remarks are detailed in Section 5.


## 2. Problem Statement

Consider the above discrete nonlinear multivariable system withn inputs and n outputs expressed in terms of its difference equation in the following form [22]:(1)Yk+1=fYk,…,Yk−nY,Uk,…,Uk−nU,where Yk=yiki=1,…,nT, (Yk∈ℝn), and Uk=uiki=1,…,nT, (Uk∈ℝn), are, respectively, the input and output vectors; nY and nU are the number of past process input and output, respectively; f=fiki=1,…,n is the nonlinear function mapping specified by the model; and k is the discrete time index.The problem is to find a controlleruik to ensure that the system output yik tracks asymptotically the desired reference rik, i=1,…,n.In this paper, the control object is to combine the neural network PID controller and the neural network indirect adaptive control as a switch controller for the nonlinear system.


## 3. Adaptive Switch Controller Structure

In this section, an adaptive switch controller is proposed for the nonlinear MIMO system (1). The controller consists of the neural network APID and neural network IAC approach. We assume that the switching point is decided by the norm of the error between the system output and the desired value during the neural network APID and the neural network IAC stages.


### 3.1. Neural Network Indirect Adaptive Control

In this section, an indirect adaptive control scheme for a class of MIMO nonlinear systems, shown in Figure1, is proposed. The multilayer perceptron is used in the model block and in the controller block. Each block consists of three layers with the sigmoid activation function for all neurons. The tracking error and the identification error are used, respectively, to train the neural network controller and the neural network model. Since the learning rate is an essential factor for determining the performance of the neuroidentifier and the neurocontroller trained via the GD method, it is important to find the optimal learning rate.Figure 1
Neural network indirect adaptive control architecture for the MIMO system.Theith control law is uIACik, i=1,…,n, and is given as follows:(2)uIACik=λcif1∑k=1n2wki3f1∑j=1n1wjk2xcjk=λcif1∑k=1n2wki3f1hk,or in the compact vector-valued form as(3)UIACk=λcf1w3TF1W2xck=λcf1hc,with w2=wjk2j=1,…,n1,k=1,…,n2, w3=wki3k=1,…,n2,i=1,…,nT, xc=xcii=1,…,n1T, and F1W2xc=f1hkk=1,…,n2T, where n1 is the neuron number of the input layer, n2 is the neuron number of the hidden layer, and F1′W2xc=f1′h1,…,f1′hn5 is the Jacobian matrix of F1W2xc.To update the neural network controller parameters, let us consider the cost function:(4)Jck=12ec12k+⋯+eci2k+⋯+ecn2k,where the tracking error is(5)ecik=yik−rik;i=1,…,n.The gradient descent method is applied to train the weights of the neural network controller. The output synaptic weights and the hidden weights are given by the following expressions:(6)w3k+1=w3k+Δw3k,(7)w2k+1=w2k+Δw2k,where the incremental change of the output weights Δw3k and the hidden weights Δw2k of the neural network controller are given as follows [23]:(8)Δw2k=w3F1′W2xcxcEckλcf1′hcF1TW2xcF1W2xc+w3TF1′W2xcF1′W2xcw1w3xcTxc,Δw3k=F1W2xcEckλcf1′hcF1TW2xcF1W2xc+w3TF1′W2xc2w1w3xcTxc.The used partial derivatives of the cost function with respect toWk (Wk can take w2k or w3k) is(9)∂Jck∂Wk=−EckJk∂UIACk∂Wk,where Jk=∂Yk/∂UIACk≈∂Ymk/∂UIACk is the Jacobian of the multivariable by applying the system sensitivity approximation system and is as follows:(10)∂Ymk∂UIACk=∂ym1∂uIAC1⋯∂ym1∂uIACn⋮⋱⋮∂ymn∂uIACn⋯∂ym1∂uIACn.An important advantage of the presented method is that it allows the learning rate to change adaptively during the training process giving better performance than with the fixed one.On the contrary, the neural network model outputs are given as follows:(11)ymik+1=λf0∑k=1n4wki1f0∑j=1n3wjk0xjk=λf0∑k=1n4wki1f0h0k,and can be rewritten in the following compact form:(12)Ymk+1=λf0w1TF0Wxk,with w0=wjk0j=1,…,n3,k=1,…,n4, w1=wki1k=1,…,n4,i=1,…,nT, x=xjj=1,…,n3T, and F0Wx=f0h0kk=1,…,n4T, where n3 is the neuron number of the input layer, n4 is the neuron number of the hidden layer, and F0′Wx=diagf0′h01,…,f0′h0n4 is the Jacobian matrix of F0Wx.The update of the model synaptic weights is given by(13)w1k+1=w1k+Δw1k,(14)w0k+1=w0k+Δw0k,where the incremental change of the output weights Δw1k and the hidden layer weights Δw0k of the neural network model are given as follows [13, 16–24]:(15)Δw1k=4F0WxEmkλF0TWxF0Wx+w1TF0′WxF0′Wxw0xTx,Δw0k=4F0′Wxw1EmkxTλF0TWxF0Wx+w1TF0′WxF0′Wxw0xTx,where Emk=emikT,i=1,…,n, is the identification error vector between the system outputs’ vector Yk and the model network outputs’ vector Ymk and the model network parameters are updated by the minimization of the cost function, i=1,…,n:(16)Jmik=12emi2k.For the stability of the neural network model, the Lyapunov function is detailed. Indeed, let us define a discrete Lyapunov function as(17)Vmk=Jmik=12emi2k,where emik, i=1,…,n, is the identification error. The change in the Lyapunov function is obtained by(18)ΔVmk=Vmk+1−Vmk=12emi2k+1−emi2k.The identification error difference can be represented as follows [13]:(19)Δemik=emik+1−emik≈ηmik∂ymik∂wmkemik,where wmk is the synaptic weights of the neural network identifier (w0k, w1k). Using equation (19), the identification error is going to be(20)emik+1=emik−ηmikξmikemik,with(21)ξmik=λ22F0′WxF0TWxF0Wx+w1TF0′WxF0′Wxw0xTx.From (17), Vmk>0. Thus, from (20) and (21), the convergence of the identification error is guaranteed if limk⟶∞emik=0, and it is necessary that the condition 1−ηmikξmik<1 be satisfied, giving 0<ηmik<2ξmi−1k.The online algorithm suitable for real-time applications is the variable learning that occurs when the learning rate isηmik=ξmi−1k.Similar to the neural network model, for the stability of the neural network controller, the Lyapunov function is presented. Indeed, let us define a discrete Lyapunov function,i=1,…,n, as follows:(22)Vck=Jcik=12eci2k,where ecik, i=1,…,n, is the control error. The change in the Lyapunov function is obtained by(23)ΔVck=Vck+1−Vck=12eci2k+1−eci2k.The control error difference can be represented as follows [13]:(24)Δecik=ecik+1−ecik≈ηcik∂ecik∂wckT∂yik∂ucik∂ucik∂wckecik,where ∂yik/∂ucik≈∂ymik/∂ucik and wck is the synaptic weights of the neural network controller (w2k, w3k). Using (24), the control error is going to be(25)ecik+1=ecik−ηcikξcikecik,with(26)ξcik=λc22f1′hcF1TW2xcF1W2xc+w3TF1′W2xc2w1w3xcTxc.From (22), Vck>0. Thus, from (25) and (26), the convergence of the control error is guaranteed if limk⟶∞ecik=0, and it is necessary that the condition 1−ηcikξcik<1 be satisfied, giving 0<ηcik<2ξci−1k.The online algorithm suitable for real-time applications is the variable learning that occurs when the learning rate isηcik=ξci−1k.This controller will be applied in Section4 to a nonlinear MIMO system.


### 3.2. Neural Network Adaptive PID Controller

In this section, a control structure based on PID for nonlinear MIMO systems is presented in Figure2 where the bold arrows indicate the vector-valued form. The PID structure includes the controlled system, the PID controller, and the neural network tuner that is used to adjust adaptively the controller parameters. For such system with n outputs, n PID controllers and neural network PID tuners have to be stacked in parallel. Each PID tuner gets the current system input u∈ℝ, the reference signal r∈ℝ, and the control error ec∈ℝ. The control system itself can be represented with a neural network model which represents this system.Figure 2
The neural network adaptive PID structure for MIMO system.The adaptive controller output is given as follows:(27)UPIDk=UPIDk−1+KPEck−Eck−1+KIEck+KDEck−2Eck−1+Eck−2,where KP∈ℝn,KI∈ℝn, and KD∈ℝn are the proportional, integral, and derivative gains of the PID controllers, where the proportional error is given as(28)ePik=ecik−ecik−1,the derivative error as(29)eDik=ecik−2ecik−1+ecik−2,and the integral error as(30)eIik=ecik.Then, theith adaptive controller output uPIDik can be represented in the updating algorithm as follows:(31)uPIDik=uPIDik−1+kPikePik+kIikeIik+kDikeDik.The PID-MLP structure is presented in Figure3, where the network parameters are given as follows:Figure 3
The PID auto-tuning structure for MIMO system.The PID-MLP tuner structure is presented in Figure3, where the output is given by the following expression:(32)Oik=kPikkIikkDikT,with(33)Oik=λcis∑j=1mzjlis∑k=1pwkjixcikk=λcis∑j=1mzjlishj,and in the following compact vector-valued form:(34)Oik=λcsziTSWxci=λcshPID,with λc as the scaling coefficients, SWxc=shjj=1,…,mT, wi=wkjik=1,…,p,j=1,…,m,i=1,…,n, and zi=zjlij=1,…,m,l=1,…,3T.The weights update of the PID tuner is obtained by minimizing the cost function as follows:(35)∂Jcik∂γik=−ecik∂yik∂uik∂uik∂Oik∂Oik∂hPIDik∂hPIDik∂γik,where γi can take wi or zi.Finally, the parameters’ update of the PID-MLP tuner is obtained as follows:(36)zik+1=zik+ηciλciλecikf′hz0F′TWxw10Ju,Os′hPIDSWxc,(37)wik+1=wik+ηciλciλecikf′hz0F′TWxw10Ju,Os′hPIDziS′Wxcxc,with(38)Ju,O=∂uik∂Oik=ePikeIikeDikT,(39)ηci=ηPiηIiηDiT,where ηzi=diagηkPi,ηkIi,ηkDi is the learning rate corresponding to the vector component zi.The PID controller parameters are dynamically tuned in accordance with the identification information and optimization index [5].For the stability of the neural network PID tuner, the Lyapunov function is presented. Indeed, let us define a discrete Lyapunov function,i=1,…,n, as follows:(40)VTk=JTik=12eci2k,where ecik, i=1,…,n, is the control error. The change in the Lyapunov function is obtained by(41)ΔVTk=VTk+1−VTk=12eci2k+1−eci2k.The control error difference can be represented as follows [15]:(42)Δecik=ecik+1−ecik≈ηzik∂ecik∂γikT∂yik∂uPIDik∂uPIDik∂Oik∂Oik∂γikecik,where ∂yik/∂uPIDik≈∂ymik/∂uPIDik.Using (24), the control error is going to be(43)ecik+1=ecik−ηzikξTikecik,with(44)ξTik=λT22λs′netPID2w1F0′TWxw10Ju,O×STWxcSWxc+ziTS′Wxc2zixcTxc.From (40), VTk>0. Thus, from (43) and (44), the convergence of the control error is guaranteed if limk⟶∞ecik=0, and it is necessary that the condition 1−ηzikξTik<1 be satisfied, giving 0<ηzik<2ξTi−1k.The online algorithm suitable for real-time applications is the variable learning that occurs when the learning rate isηzik=ξTi−1k.This controller will be applied also in Section4 to a nonlinear MIMO system.


### 3.3. Neural Network Adaptive Switch Controller Design

In this section, the adaptive switch controller (ASC) is proposed for the nonlinear system (1) to achieve closed-loop stability and tracking. In fact, in this structure, we design the switching controller consisting of 2 controllers: a neural network adaptive PID and a neural network indirect adaptive control, as shown in Figure 4.Figure 4
Switch controller design.In this section, a summary of the proposed algorithm of the ASC for the nonlinear MIMO system is presented.


#### 3.3.1. Offline Phase

Initialization of parametersw0, w1, w2, w3, wi, zi, kPi, kIi, and kDi of the neural network model, neural network indirect adaptive controller, adaptive neural network PID tuner, and PID controller, respectively, is based on expressions (3), (12), (31), and (34) using a reduced number of observations.


#### 3.3.2. Online Phase

(i)
At time instant (k+1), we have a new data rik+1, using the obtained input vector xci
(ii)
If the conditionemik+1≤ε1, where ε1>0 is a given small constant, is satisfied, then the neural network model, given by equation (3), approaches sufficiently the behavior of the system
(iii)
If the conditionecik+1≤ε2, where ε2>0 is a given small constant, is satisfied, then the neural network adaptive PID controller provides sufficiently the control law uPIDik+1 using expression (31)
(iv)
If the conditionecik+1≤ε3 and 0<ε3<ε2, where ε3 is a given small constant, is satisfied, then the neural network indirect adaptive controller provides sufficiently the control law uIACik+1 using expression (2)
(v)
Ifecik+1≤ε3 is not satisfied, the update of the synaptic weights of the neural network indirect adaptive controller is necessary, using equations (6) and (7)
(vi)
Ifemik+1≤ε1 is not satisfied, the update of the synaptic weights of the neural network model is necessary, using equations (14) and (15)
(vii)
Ifecik+1≤ε2 is not satisfied, the update of the synaptic weights of the neural network adaptive PID controller is necessary, using equations (36) and (37)
(viii)
End


## 3.1. Neural Network Indirect Adaptive Control

In this section, an indirect adaptive control scheme for a class of MIMO nonlinear systems, shown in Figure1, is proposed. The multilayer perceptron is used in the model block and in the controller block. Each block consists of three layers with the sigmoid activation function for all neurons. The tracking error and the identification error are used, respectively, to train the neural network controller and the neural network model. Since the learning rate is an essential factor for determining the performance of the neuroidentifier and the neurocontroller trained via the GD method, it is important to find the optimal learning rate.Figure 1
Neural network indirect adaptive control architecture for the MIMO system.Theith control law is uIACik, i=1,…,n, and is given as follows:(2)uIACik=λcif1∑k=1n2wki3f1∑j=1n1wjk2xcjk=λcif1∑k=1n2wki3f1hk,or in the compact vector-valued form as(3)UIACk=λcf1w3TF1W2xck=λcf1hc,with w2=wjk2j=1,…,n1,k=1,…,n2, w3=wki3k=1,…,n2,i=1,…,nT, xc=xcii=1,…,n1T, and F1W2xc=f1hkk=1,…,n2T, where n1 is the neuron number of the input layer, n2 is the neuron number of the hidden layer, and F1′W2xc=f1′h1,…,f1′hn5 is the Jacobian matrix of F1W2xc.To update the neural network controller parameters, let us consider the cost function:(4)Jck=12ec12k+⋯+eci2k+⋯+ecn2k,where the tracking error is(5)ecik=yik−rik;i=1,…,n.The gradient descent method is applied to train the weights of the neural network controller. The output synaptic weights and the hidden weights are given by the following expressions:(6)w3k+1=w3k+Δw3k,(7)w2k+1=w2k+Δw2k,where the incremental change of the output weights Δw3k and the hidden weights Δw2k of the neural network controller are given as follows [23]:(8)Δw2k=w3F1′W2xcxcEckλcf1′hcF1TW2xcF1W2xc+w3TF1′W2xcF1′W2xcw1w3xcTxc,Δw3k=F1W2xcEckλcf1′hcF1TW2xcF1W2xc+w3TF1′W2xc2w1w3xcTxc.The used partial derivatives of the cost function with respect toWk (Wk can take w2k or w3k) is(9)∂Jck∂Wk=−EckJk∂UIACk∂Wk,where Jk=∂Yk/∂UIACk≈∂Ymk/∂UIACk is the Jacobian of the multivariable by applying the system sensitivity approximation system and is as follows:(10)∂Ymk∂UIACk=∂ym1∂uIAC1⋯∂ym1∂uIACn⋮⋱⋮∂ymn∂uIACn⋯∂ym1∂uIACn.An important advantage of the presented method is that it allows the learning rate to change adaptively during the training process giving better performance than with the fixed one.On the contrary, the neural network model outputs are given as follows:(11)ymik+1=λf0∑k=1n4wki1f0∑j=1n3wjk0xjk=λf0∑k=1n4wki1f0h0k,and can be rewritten in the following compact form:(12)Ymk+1=λf0w1TF0Wxk,with w0=wjk0j=1,…,n3,k=1,…,n4, w1=wki1k=1,…,n4,i=1,…,nT, x=xjj=1,…,n3T, and F0Wx=f0h0kk=1,…,n4T, where n3 is the neuron number of the input layer, n4 is the neuron number of the hidden layer, and F0′Wx=diagf0′h01,…,f0′h0n4 is the Jacobian matrix of F0Wx.The update of the model synaptic weights is given by(13)w1k+1=w1k+Δw1k,(14)w0k+1=w0k+Δw0k,where the incremental change of the output weights Δw1k and the hidden layer weights Δw0k of the neural network model are given as follows [13, 16–24]:(15)Δw1k=4F0WxEmkλF0TWxF0Wx+w1TF0′WxF0′Wxw0xTx,Δw0k=4F0′Wxw1EmkxTλF0TWxF0Wx+w1TF0′WxF0′Wxw0xTx,where Emk=emikT,i=1,…,n, is the identification error vector between the system outputs’ vector Yk and the model network outputs’ vector Ymk and the model network parameters are updated by the minimization of the cost function, i=1,…,n:(16)Jmik=12emi2k.For the stability of the neural network model, the Lyapunov function is detailed. Indeed, let us define a discrete Lyapunov function as(17)Vmk=Jmik=12emi2k,where emik, i=1,…,n, is the identification error. The change in the Lyapunov function is obtained by(18)ΔVmk=Vmk+1−Vmk=12emi2k+1−emi2k.The identification error difference can be represented as follows [13]:(19)Δemik=emik+1−emik≈ηmik∂ymik∂wmkemik,where wmk is the synaptic weights of the neural network identifier (w0k, w1k). Using equation (19), the identification error is going to be(20)emik+1=emik−ηmikξmikemik,with(21)ξmik=λ22F0′WxF0TWxF0Wx+w1TF0′WxF0′Wxw0xTx.From (17), Vmk>0. Thus, from (20) and (21), the convergence of the identification error is guaranteed if limk⟶∞emik=0, and it is necessary that the condition 1−ηmikξmik<1 be satisfied, giving 0<ηmik<2ξmi−1k.The online algorithm suitable for real-time applications is the variable learning that occurs when the learning rate isηmik=ξmi−1k.Similar to the neural network model, for the stability of the neural network controller, the Lyapunov function is presented. Indeed, let us define a discrete Lyapunov function,i=1,…,n, as follows:(22)Vck=Jcik=12eci2k,where ecik, i=1,…,n, is the control error. The change in the Lyapunov function is obtained by(23)ΔVck=Vck+1−Vck=12eci2k+1−eci2k.The control error difference can be represented as follows [13]:(24)Δecik=ecik+1−ecik≈ηcik∂ecik∂wckT∂yik∂ucik∂ucik∂wckecik,where ∂yik/∂ucik≈∂ymik/∂ucik and wck is the synaptic weights of the neural network controller (w2k, w3k). Using (24), the control error is going to be(25)ecik+1=ecik−ηcikξcikecik,with(26)ξcik=λc22f1′hcF1TW2xcF1W2xc+w3TF1′W2xc2w1w3xcTxc.From (22), Vck>0. Thus, from (25) and (26), the convergence of the control error is guaranteed if limk⟶∞ecik=0, and it is necessary that the condition 1−ηcikξcik<1 be satisfied, giving 0<ηcik<2ξci−1k.The online algorithm suitable for real-time applications is the variable learning that occurs when the learning rate isηcik=ξci−1k.This controller will be applied in Section4 to a nonlinear MIMO system.


## 3.2. Neural Network Adaptive PID Controller

In this section, a control structure based on PID for nonlinear MIMO systems is presented in Figure2 where the bold arrows indicate the vector-valued form. The PID structure includes the controlled system, the PID controller, and the neural network tuner that is used to adjust adaptively the controller parameters. For such system with n outputs, n PID controllers and neural network PID tuners have to be stacked in parallel. Each PID tuner gets the current system input u∈ℝ, the reference signal r∈ℝ, and the control error ec∈ℝ. The control system itself can be represented with a neural network model which represents this system.Figure 2
The neural network adaptive PID structure for MIMO system.The adaptive controller output is given as follows:(27)UPIDk=UPIDk−1+KPEck−Eck−1+KIEck+KDEck−2Eck−1+Eck−2,where KP∈ℝn,KI∈ℝn, and KD∈ℝn are the proportional, integral, and derivative gains of the PID controllers, where the proportional error is given as(28)ePik=ecik−ecik−1,the derivative error as(29)eDik=ecik−2ecik−1+ecik−2,and the integral error as(30)eIik=ecik.Then, theith adaptive controller output uPIDik can be represented in the updating algorithm as follows:(31)uPIDik=uPIDik−1+kPikePik+kIikeIik+kDikeDik.The PID-MLP structure is presented in Figure3, where the network parameters are given as follows:Figure 3
The PID auto-tuning structure for MIMO system.The PID-MLP tuner structure is presented in Figure3, where the output is given by the following expression:(32)Oik=kPikkIikkDikT,with(33)Oik=λcis∑j=1mzjlis∑k=1pwkjixcikk=λcis∑j=1mzjlishj,and in the following compact vector-valued form:(34)Oik=λcsziTSWxci=λcshPID,with λc as the scaling coefficients, SWxc=shjj=1,…,mT, wi=wkjik=1,…,p,j=1,…,m,i=1,…,n, and zi=zjlij=1,…,m,l=1,…,3T.The weights update of the PID tuner is obtained by minimizing the cost function as follows:(35)∂Jcik∂γik=−ecik∂yik∂uik∂uik∂Oik∂Oik∂hPIDik∂hPIDik∂γik,where γi can take wi or zi.Finally, the parameters’ update of the PID-MLP tuner is obtained as follows:(36)zik+1=zik+ηciλciλecikf′hz0F′TWxw10Ju,Os′hPIDSWxc,(37)wik+1=wik+ηciλciλecikf′hz0F′TWxw10Ju,Os′hPIDziS′Wxcxc,with(38)Ju,O=∂uik∂Oik=ePikeIikeDikT,(39)ηci=ηPiηIiηDiT,where ηzi=diagηkPi,ηkIi,ηkDi is the learning rate corresponding to the vector component zi.The PID controller parameters are dynamically tuned in accordance with the identification information and optimization index [5].For the stability of the neural network PID tuner, the Lyapunov function is presented. Indeed, let us define a discrete Lyapunov function,i=1,…,n, as follows:(40)VTk=JTik=12eci2k,where ecik, i=1,…,n, is the control error. The change in the Lyapunov function is obtained by(41)ΔVTk=VTk+1−VTk=12eci2k+1−eci2k.The control error difference can be represented as follows [15]:(42)Δecik=ecik+1−ecik≈ηzik∂ecik∂γikT∂yik∂uPIDik∂uPIDik∂Oik∂Oik∂γikecik,where ∂yik/∂uPIDik≈∂ymik/∂uPIDik.Using (24), the control error is going to be(43)ecik+1=ecik−ηzikξTikecik,with(44)ξTik=λT22λs′netPID2w1F0′TWxw10Ju,O×STWxcSWxc+ziTS′Wxc2zixcTxc.From (40), VTk>0. Thus, from (43) and (44), the convergence of the control error is guaranteed if limk⟶∞ecik=0, and it is necessary that the condition 1−ηzikξTik<1 be satisfied, giving 0<ηzik<2ξTi−1k.The online algorithm suitable for real-time applications is the variable learning that occurs when the learning rate isηzik=ξTi−1k.This controller will be applied also in Section4 to a nonlinear MIMO system.


## 3.3. Neural Network Adaptive Switch Controller Design

In this section, the adaptive switch controller (ASC) is proposed for the nonlinear system (1) to achieve closed-loop stability and tracking. In fact, in this structure, we design the switching controller consisting of 2 controllers: a neural network adaptive PID and a neural network indirect adaptive control, as shown in Figure 4.Figure 4
Switch controller design.In this section, a summary of the proposed algorithm of the ASC for the nonlinear MIMO system is presented.


### 3.3.1. Offline Phase

Initialization of parametersw0, w1, w2, w3, wi, zi, kPi, kIi, and kDi of the neural network model, neural network indirect adaptive controller, adaptive neural network PID tuner, and PID controller, respectively, is based on expressions (3), (12), (31), and (34) using a reduced number of observations.


### 3.3.2. Online Phase

(i)
At time instant (k+1), we have a new data rik+1, using the obtained input vector xci
(ii)
If the conditionemik+1≤ε1, where ε1>0 is a given small constant, is satisfied, then the neural network model, given by equation (3), approaches sufficiently the behavior of the system
(iii)
If the conditionecik+1≤ε2, where ε2>0 is a given small constant, is satisfied, then the neural network adaptive PID controller provides sufficiently the control law uPIDik+1 using expression (31)
(iv)
If the conditionecik+1≤ε3 and 0<ε3<ε2, where ε3 is a given small constant, is satisfied, then the neural network indirect adaptive controller provides sufficiently the control law uIACik+1 using expression (2)
(v)
Ifecik+1≤ε3 is not satisfied, the update of the synaptic weights of the neural network indirect adaptive controller is necessary, using equations (6) and (7)
(vi)
Ifemik+1≤ε1 is not satisfied, the update of the synaptic weights of the neural network model is necessary, using equations (14) and (15)
(vii)
Ifecik+1≤ε2 is not satisfied, the update of the synaptic weights of the neural network adaptive PID controller is necessary, using equations (36) and (37)
(viii)
End


## 3.3.1. Offline Phase

Initialization of parametersw0, w1, w2, w3, wi, zi, kPi, kIi, and kDi of the neural network model, neural network indirect adaptive controller, adaptive neural network PID tuner, and PID controller, respectively, is based on expressions (3), (12), (31), and (34) using a reduced number of observations.


## 3.3.2. Online Phase

(i)
At time instant (k+1), we have a new data rik+1, using the obtained input vector xci
(ii)
If the conditionemik+1≤ε1, where ε1>0 is a given small constant, is satisfied, then the neural network model, given by equation (3), approaches sufficiently the behavior of the system
(iii)
If the conditionecik+1≤ε2, where ε2>0 is a given small constant, is satisfied, then the neural network adaptive PID controller provides sufficiently the control law uPIDik+1 using expression (31)
(iv)
If the conditionecik+1≤ε3 and 0<ε3<ε2, where ε3 is a given small constant, is satisfied, then the neural network indirect adaptive controller provides sufficiently the control law uIACik+1 using expression (2)
(v)
Ifecik+1≤ε3 is not satisfied, the update of the synaptic weights of the neural network indirect adaptive controller is necessary, using equations (6) and (7)
(vi)
Ifemik+1≤ε1 is not satisfied, the update of the synaptic weights of the neural network model is necessary, using equations (14) and (15)
(vii)
Ifecik+1≤ε2 is not satisfied, the update of the synaptic weights of the neural network adaptive PID controller is necessary, using equations (36) and (37)
(viii)
End


## 4. Simulation Results

In this section, we examine the effectiveness of the proposed control system for the nonlinear system. Indeed, three different cases concerning the controller structure have been tested for comparison. First, the neural network adaptive PID controller is used. Second, the neural network indirect adaptive control is applied. Third, the new design of the switch structure is applied. Two simulation experiments were carried out for this study. The first one did not consider any disturbance or parameter perturbation. The second experiment was to demonstrate the control performance in presence of added disturbances.Consider the nonlinear MIMO system taken for this purpose described by the following equation [22]:(45)y1k+1=y1k1+y22k+u1k,y2k+1=y1ky2k1+y22k+u2k,where yik and uik are, respectively, the output and the input of the studied system, i=1:2.The model performance is evaluated using the mean square error (MSE) [26] between the system output and the model one:(46)MSE=1N∑k=1Nymjk−yjk2,where N is the number of observations.The tracking control objective for the system is to follow the reference signal,rik,i=1:2. In this simulation, the reference signal is defined as(47)r1k=sin2kπ100,r2k=0.8,fork≤50,0.4,for50≤k≤100,0.8,for100≤k≤150,0.4,fork>50..


### 4.1. Neural Network Indirect Adaptive Control Results

The first case is to apply the neural network indirect adaptive controller.Indeed, the mechanism of this approach is based on the online identification which ran firstly and gave good results. The found model parameters are used secondly to synthesize the neural network controller.Figure5 presents both the reference signal rik and the output system yik, i=1:2, using neural network indirect adaptive control.Figure 5
Neural network indirect adaptive controller responses for the nonlinear system.
(a)
(b)The evolution of tracking errorsecik is presented in Figure 6. The evolution of variable learning rate ηik is presented in Figure 7, and the evolution of control signal uIACik is shown in Figure 8.Figure 6
Tracking errorsec1(k) and ec2(k).
(a)
(b)Figure 7
Evolution of the variable learning rates.
(a)
(b)Figure 8
Evolution of control signals.
(a)
(b)To demonstrate the system stability and tracking performance, in the presence of noise, a white noise was applied to the system output.The control results after 150 observations are compared in Table1 where the MSE and time simulation are used as performance indexes in two cases: without noise and in presence of noise.Table 1
Performance of the neural network indirect adaptive controller.
Neural network indirect adaptive controller (IAC)
Without noise
With noise
M
S
E
r
1
−
y
1
2.73
×
10
−
4
2
.
78
×
10
−
4
M
S
E
r
2
−
y
2
8
.
21
×
10
−
4
8
.
28
×
10
−
4
Time(s)
2
.
12
2
.
58From Figures5–8 and Table 1, it is clear that the proposed neural network indirect adaptive control gives good results.


### 4.2. Neural Network Adaptive PID Controller

In this case, the neural network adaptive proportional integrate derivate controller is applied. However, the parametersKpi, Kdi, and KIi are obtained and adjusted using the neural network.Figure9 shows the response of the system yik toward the reference inputs rik. The evolution of the tracking errors ecik is presented in Figure 10, and the evolution of the control laws is presented in Figure 11.Figure 9
Neural network adaptive PID controller responses for the nonlinear system.
(a)
(b)Figure 10
Tracking errors.
(a)
(b)Figure 11
Evolution of control laws.
(a)
(b)The results show that the tracking of the neural network adaptive PID has some oscillations (overshot) at the beginning that might be caused by the randomly set neural network weights.As time goes on, the system outputs track the reference inputs satisfactorily.The PID parameterskp1,kp2,kd1,kd2,ki1, and ki2 are adjusted by the self-learning neural network until the tracking errors approach zero asymptotically. In this simulation, the three learning rates η1, η2, and η3 we used were set to 0.46, 0.46, and 0.35, respectively. Figure 12 corresponds to the behavior presented by the neural network adaptive PID controller gains during 150 iterations.Figure 12
Evolution of PID gains.In Table2, the performance of the online adaptive tuning based neural network PID algorithm in terms of MSE is summarized.Table 2
Performance of the neural network adaptive PID.
Neural network adaptive PID (APID)
Without noise
With noise
MSE
r
1
−
y
1
2
.
13
×
10
−
3
2
.
5
×
10
−
3
MSE
r
2
−
y
2
2
.
24
×
10
−
2
2
.
31
×
10
−
2
Time (s)
0.
93
1
.
06Analysis shows that the response speed, stability, and small system error of the neural network PID controller have been guaranteed.From these Figures9–11 and Table 2, the found results mean the efficiency of the used controller.In the next section, we focus on the proposed switch controller.


### 4.3. Neural Network Adaptive Switch Controller

The proposed method, presented in Figure4 and detailed by the proposed algorithm, is applied in this case.Indeed, the minimum of the tracking error between the used method is used to adapt the correspondent controller, as detailed in the proposed algorithm.Figure13 presents both the reference signal rik and the output system yik, i=1:2, using the proposed switch controller. The evolution of tracking errors ecik is presented in Figure 14.Figure 13
Neural adaptive switch controller responses for the nonlinear system.
(a)
(b)Figure 14
Tracking errors.
(a)
(b)Table3 Presents the performance of the adaptive switch controller in the two cases: with and without added noise compared to the other used controllers.Table 3
Comparison of different MSE of controllers.
Without noise
With noise
MSE
r
1
−
y
1
MSE
r
2
−
y
2
MSE
r
1
−
y
1
MSE
r
2
−
y
2
APID
2
.
13
×
10
−
3
2
.
24
×
10
−
2
2
.
5
×
10
−
3
2
.
31
×
10
−
2
IAC
2
.
73
×
10
−
4
8
.
21
×
10
−
4
2
.
78
×
10
−
4
8
.
28
×
10
−
4
ASC
6
.
61
×
10
−
5
1
.
60
×
10
−
4
7
.
42
×
10
−
5
1
.
67
×
10
−
4According to these Figures13 and 14 and Table 3, we can get that the switch controller has the best performance for the nonlinear system compared to other controllers (APID and IAC). And the mean squared errors are the smallest, controlled by the switch controller, as shown in Table 3. The output system tracks correctly the reference signals. This method gives good results because it uses in the same time an adaptive indirect controller based on a neural network with a variable learning rate and an adaptive self-tuning proportional integrate derivate.In Figures5 and 9, we can observe many oscillations caused by disturbances or the failure of the controller to reject them, especially in Figure 9. However, using the proposed neural network ASC, all these disturbances are rejected, as shown in Figure 13.Compared to others mentioned here or not, this scheme is based on the neural network which uses a variable learning rate in the neural network indirect adaptive control and in the neural network adaptive PID. This technique (neural network) is a universal approximator and well used in modeling and control. The use of the variable learning rate ameliorates the learning speed, the performance tracking, and the control system stability.


## 4.1. Neural Network Indirect Adaptive Control Results

The first case is to apply the neural network indirect adaptive controller.Indeed, the mechanism of this approach is based on the online identification which ran firstly and gave good results. The found model parameters are used secondly to synthesize the neural network controller.Figure5 presents both the reference signal rik and the output system yik, i=1:2, using neural network indirect adaptive control.Figure 5
Neural network indirect adaptive controller responses for the nonlinear system.
(a)
(b)The evolution of tracking errorsecik is presented in Figure 6. The evolution of variable learning rate ηik is presented in Figure 7, and the evolution of control signal uIACik is shown in Figure 8.Figure 6
Tracking errorsec1(k) and ec2(k).
(a)
(b)Figure 7
Evolution of the variable learning rates.
(a)
(b)Figure 8
Evolution of control signals.
(a)
(b)To demonstrate the system stability and tracking performance, in the presence of noise, a white noise was applied to the system output.The control results after 150 observations are compared in Table1 where the MSE and time simulation are used as performance indexes in two cases: without noise and in presence of noise.Table 1
Performance of the neural network indirect adaptive controller.
Neural network indirect adaptive controller (IAC)
Without noise
With noise
M
S
E
r
1
−
y
1
2.73
×
10
−
4
2
.
78
×
10
−
4
M
S
E
r
2
−
y
2
8
.
21
×
10
−
4
8
.
28
×
10
−
4
Time(s)
2
.
12
2
.
58From Figures5–8 and Table 1, it is clear that the proposed neural network indirect adaptive control gives good results.


## 4.2. Neural Network Adaptive PID Controller

In this case, the neural network adaptive proportional integrate derivate controller is applied. However, the parametersKpi, Kdi, and KIi are obtained and adjusted using the neural network.Figure9 shows the response of the system yik toward the reference inputs rik. The evolution of the tracking errors ecik is presented in Figure 10, and the evolution of the control laws is presented in Figure 11.Figure 9
Neural network adaptive PID controller responses for the nonlinear system.
(a)
(b)Figure 10
Tracking errors.
(a)
(b)Figure 11
Evolution of control laws.
(a)
(b)The results show that the tracking of the neural network adaptive PID has some oscillations (overshot) at the beginning that might be caused by the randomly set neural network weights.As time goes on, the system outputs track the reference inputs satisfactorily.The PID parameterskp1,kp2,kd1,kd2,ki1, and ki2 are adjusted by the self-learning neural network until the tracking errors approach zero asymptotically. In this simulation, the three learning rates η1, η2, and η3 we used were set to 0.46, 0.46, and 0.35, respectively. Figure 12 corresponds to the behavior presented by the neural network adaptive PID controller gains during 150 iterations.Figure 12
Evolution of PID gains.In Table2, the performance of the online adaptive tuning based neural network PID algorithm in terms of MSE is summarized.Table 2
Performance of the neural network adaptive PID.
Neural network adaptive PID (APID)
Without noise
With noise
MSE
r
1
−
y
1
2
.
13
×
10
−
3
2
.
5
×
10
−
3
MSE
r
2
−
y
2
2
.
24
×
10
−
2
2
.
31
×
10
−
2
Time (s)
0.
93
1
.
06Analysis shows that the response speed, stability, and small system error of the neural network PID controller have been guaranteed.From these Figures9–11 and Table 2, the found results mean the efficiency of the used controller.In the next section, we focus on the proposed switch controller.


## 4.3. Neural Network Adaptive Switch Controller

The proposed method, presented in Figure4 and detailed by the proposed algorithm, is applied in this case.Indeed, the minimum of the tracking error between the used method is used to adapt the correspondent controller, as detailed in the proposed algorithm.Figure13 presents both the reference signal rik and the output system yik, i=1:2, using the proposed switch controller. The evolution of tracking errors ecik is presented in Figure 14.Figure 13
Neural adaptive switch controller responses for the nonlinear system.
(a)
(b)Figure 14
Tracking errors.
(a)
(b)Table3 Presents the performance of the adaptive switch controller in the two cases: with and without added noise compared to the other used controllers.Table 3
Comparison of different MSE of controllers.
Without noise
With noise
MSE
r
1
−
y
1
MSE
r
2
−
y
2
MSE
r
1
−
y
1
MSE
r
2
−
y
2
APID
2
.
13
×
10
−
3
2
.
24
×
10
−
2
2
.
5
×
10
−
3
2
.
31
×
10
−
2
IAC
2
.
73
×
10
−
4
8
.
21
×
10
−
4
2
.
78
×
10
−
4
8
.
28
×
10
−
4
ASC
6
.
61
×
10
−
5
1
.
60
×
10
−
4
7
.
42
×
10
−
5
1
.
67
×
10
−
4According to these Figures13 and 14 and Table 3, we can get that the switch controller has the best performance for the nonlinear system compared to other controllers (APID and IAC). And the mean squared errors are the smallest, controlled by the switch controller, as shown in Table 3. The output system tracks correctly the reference signals. This method gives good results because it uses in the same time an adaptive indirect controller based on a neural network with a variable learning rate and an adaptive self-tuning proportional integrate derivate.In Figures5 and 9, we can observe many oscillations caused by disturbances or the failure of the controller to reject them, especially in Figure 9. However, using the proposed neural network ASC, all these disturbances are rejected, as shown in Figure 13.Compared to others mentioned here or not, this scheme is based on the neural network which uses a variable learning rate in the neural network indirect adaptive control and in the neural network adaptive PID. This technique (neural network) is a universal approximator and well used in modeling and control. The use of the variable learning rate ameliorates the learning speed, the performance tracking, and the control system stability.


## 5. Conclusion

In this paper, is proposed an adaptive switch controller consisting of indirect adaptive control and adaptive proportional integrate derivate controller for multi-input multi-output nonlinear system. The switch algorithm is based on the less tracking error between these two controllers and makes the designed system have faster response time and better tracking performance, simultaneously. This proposed controller is applied for a nonlinear MIMO system. According to the simulation, this method is the best in performance tracking.



---

*Source: 7340392-2019-08-14.xml*