Research Article  Open Access
Khadija El Hamidi, Mostafa Mjahed, Abdeljalil El Kari, Hassan Ayad, "Adaptive Control Using Neural Networks and Approximate Models for Nonlinear Dynamic Systems", Modelling and Simulation in Engineering, vol. 2020, Article ID 8642915, 13 pages, 2020. https://doi.org/10.1155/2020/8642915
Adaptive Control Using Neural Networks and Approximate Models for Nonlinear Dynamic Systems
Abstract
In this research, a comparative study of two recurrent neural networks, nonlinear autoregressive with exogenous input (NARX) neural network and nonlinear autoregressive moving average (NARMAL2), and a feedforward neural network (FFNN) is performed for their ability to provide adaptive control of nonlinear systems. Three dynamical nonlinear systems of different complexity are considered. The aim of this work is to make the output of the plant follow the desired reference trajectory. The problem becomes more challenging when the dynamics of the plants are assumed to be unknown, and to tackle this problem, a multilayer neural networkbased approximate model is set up which will work in parallel to the plant and the control scheme. The network parameters are updated using the dynamic backpropagation (BP) algorithm.
1. Introduction
Linear control methods are based on the existence of an analytical model of the system. However, most physical systems have nonlinearity, and their mathematical model is unknown or partially known and variable in time. So, conventional methods suffer some limitation in terms of stabilization and performance [1, 2]. With the considerable development of artificial intelligence, which is found to be more suitable in handling such complex processes, the artificial neural network (ANN) is one of the powerful tools that has been recognized for tracking highly nonlinear dynamic and complex systems [2–5].
In the field of control engineering for a class of nonlinear discretetime systems, a neural network has recently emerged as adjustable approximators capable of reproducing the complex behavior of nonlinear systems. Artificial neural networks have been effectively used as tracking controllers for unknown linear and nonlinear dynamic plants [6, 7]. ANNs have been employed in various fields, like time series prediction, system identification and control, and function approximation [8]. It has been shown that ANNS can efficiently approximate dynamics without requiring detailed knowledge of the plant [8, 9]. Another advantage of ANNs is their possibility of learning, which can reduce the human effort during the design of the controllers and allows discovering more effective control structures than those already known.
There are different types of ANNs proposed in the literature: feedforward neural networks (FFNNs), Kohonen selforganizing network, radial basis function (RBF), and recurrent neural network [10–12]. In fact, two classes of neural networks are the most popular in practical applications and have received considerable attention in the area of artificial neural networks in recent years: multilayer feedforward neural networks and recurrent networks. Multilayer feedforward neural networks have an ability to model any nonlinear function and have proven extremely successful in pattern recognition tasks [13, 14] while recurrent networks have been used in associative memories as well as for the solution of optimization problems, and it constitutes also a powerful computational tool for sequence modeling and prediction. Both of these networks have common characteristics like parallelism in their operation, generalization, and learning capability, which make them suitable candidates for the control of nonlinear systems [2]; there are compelling reasons to view them in a unified fashion.
Various structures of neural networks have been proposed in the literature. In [2], the authors have applied a diagonal recurrent neural network (DRNN) as a controller for both singleinput singleoutput (SISO) and multipleinput multipleoutput (MIMO) plants. The responses of plants obtained with DRNN are compared with those obtained when a multilayer feedforward neural network is used as a controller. In [15], recurrent neural networks have been used for providing speed control to the nonlinear motordrive system using a modelfollowing control scheme. In [4], an adaptive controller for a class of unknown nonlinear discretetime systems based on a multiinput fuzzy rules emulated network (MIFREN) is introduced; the neural network is assigned to identify the unknown system under control. The authors in [3] designed a nonlinear autoregressive moving average (NARMAL2) controller, which is based on an adaptive neurofuzzy inference system. The NARMAL2 controller for a singlelink manipulator has also been used in [16, 17]. A Lyapunov functionbased neural network tracking (LNT) strategy for SISO discretetime nonlinear dynamic systems is proposed. The proposed scheme uses two Lyapunov function neural networks operating as the controller and estimator. In [18], both the feedforward and recurrent neural network approaches are proposed, tested, and compared.
The main contribution of this paper is to propose a strong nonlinear adaptive controller of unknown nonlinear dynamical systems based on the approximate models. Another objective is to present a prescriptive method for the dynamic adjustment of the parameters based on backpropagation. The big advantage of the proposed control system is that it does not require previous knowledge of the model. Our ultimate goal is to determine the control input using only the values of the input and output.
In our research study, the strong learning capability of the dynamic neural network in identification and control is combined with the functionality of the approximate model controller structure to propose a novel online NNbased controller for nonlinear singleinput singleoutput (SISO) dynamical systems. The main issues in the field of ANNbased control are the choice of neural network structure to be used as a controller. In our paper, an attempt has been made to compare the three types of neural networks: two recurrent neural networks, nonlinear autoregressive with exogenous input (NARX) neural network and nonlinear autoregressive and moving average (NARMAL2), and a feedforward neural network (FFNN). The control system configuration employed in our paper consists of an ANNbased controller in cascade with the plant, and the training is performed online.
This study differentiates from the studies in the literature in terms of mathematically obtaining nonlinear SISO controller parameters. Thus, the main novelty of this paper is that the parameters of the nonlinear SISO controller can be identified as neural network expressions for nonlinear SISO systems. All neural network simulations are performed in a Matlab environment. The results indicate that the online NARMAL2, NARX, and FFNN controllers attain good modeling and control performances.
The remainder of the paper is organized as follows: Section 2 includes a brief introduction about NARX, NARMAL2, and FFNN models and their mathematical formulation. Section 3 includes the discussion on the adaptive control of nonlinear systems. Section 4 contains the simulation study. In Section 5, the conclusion of the paper is given.
2. Neural Network Approximate Models and Their Mathematical Formulation
Generally, there are many different neural networks (NN) of nonlinear models. In this research study, the recurrent and feedforward neural networks are presented. Since a lot of literature exists on NARX, NARMAL2, and FFNN, in this section, a brief introduction regarding their mathematical formulation is given. Figures 1–3 show the structures of FFNN, NARX, and NARMAL2 models, respectively.
2.1. Feedforward Neural Network Model
In a feedforward neural network, the information moves only in one direction, from the input layer to the output layer, but not vice versa as presented in Figure 1 [19]. The input vector of FFNN at any th time instant is denoted by . Thus, there are numbers of inputs. The weighted sums of inputs of hidden neurons are denoted by the vector where . The output of hidden neurons is denoted by a vector . Further, a tangent hyperbolic function is used as an activation function for hidden neurons and a linear activation function for output neuron. The input weight vector shows the connection weight between the external applied inputs and the neurons of a hidden layer. The adjustable output weight vector, , represents the hidden to the output layer connections, and denotes the FFNN output. The mathematical model of FFNN is given by
2.2. NARX Model
The NARX model represents a generic recurrent neural network having one step ahead output, , depending upon the present and past values of the input which are called the exogenous inputs, namely, , as well as on its delayed values of the output, that is, [10]. In the NARX neural network model, the internal architecture that performs this approximation is the multilayer perceptron (MLP). The dynamic behavior of the NARX model may be written in the following form:
Note that in Figure 2, we have assumed that the two delay line memories and are both equal to the order of the plant or different with , where and are a hyperbolic tangent and a linear activation function characterizing the hidden and output layers of the MLP, respectively, and denotes the number of hidden layers.
2.3. NARMAL2 Model
The nonlinear autoregressive moving average (NARMA) (Figure 3) is one of the most certified representations of general discretetime nonlinear systems. This model representation is used in the form of the past, the current, and the future system parameters, as shown in [3] where and are the input and output of the system, respectively, the relative degree represents the delay of the system from control effort to the output , and is a nonlinear function. This model is not convenient for finding a control signal . To overcome this problem, an efficient method is proposed by Narendra and Mukhopadhyay by introducing approximation models. Two classes of the NARMA model have been proposed, namely, NARMAL1 and NARMAL2. It was found that the second class involving two subapproximation functions is more efficient and adequate in the identification and adaptation of control contexts [20].
The NARMAL2 is obtained by where and are, respectively, the activation functions of the hidden layers and the linear layers of the networks and .
Equations (5) to (7) represent singleinput singleoutput (SISO) systems. As it can be seen from equation (4), NARMAL2 consists of two nonlinear functions, and , which can be approximated using two subnetworks ( and ) as presented in equation (5). To design the neurocontroller, the number of delayed plant inputs and outputs is chosen based on a structural model. The size of the hidden layer is chosen such that the network can accurately approximate the nonlinearity of the system. There are two steps to construct the NARMAL2 controller: identification and control.
The two subfunctions, and , are used in the identification phase as well as to compute a signal as follows: where is the reference signal to follow. This controller can be implemented using the model of the NARMAL2 system previously identified. If the system is precisely approximated, the output of the system will be equal to the output of the reference model.
3. Controller Design
The control configuration based on the NN approximate model is shown in Figure 4. In this control scheme, a NN model is utilized to approximate the nonlinear function of the unmodeled dynamics. The system model is considered unknown. The use of neural networks is justified by this absence of a model. In this case, three approaches predominate. In the two approaches based on the FFNN and NARX models, a single network is used for system control. The third approach based on the NARMAL2 model uses two networks to deduce the controller adaptation law.
3.1. Learning Algorithm
The process of training consists in modifying the weights in an organized way using an appropriate algorithm. During the training process, a specified number of inputs and their desired output are introduced in the network. Then, the weights are tuned so that the neural network produces an output close to the target values. The fundamental training algorithm for multilayer networks is the backpropagation (BP) algorithm [20]. This algorithm is of iterative type, and it is based on the minimization of a sumsquared error (MSE) utilizing the optimization gradient descent method. The MSE is used as the cost function which is a function of error, which is defined as follows: where and are the desired output of the network and the actual response of the network on the given input pattern , respectively, and is the dimension of the training set. The modification of the weights of the th neuron in the th layer is performed according to the formula: where
Therefore, , , and
If we define , then, .
Thus, each element in and can be updated as
The error is defined as follows: where and .
4. Results and Discussion
Simulation studies have been carried out using the Matlab software environment to verify the performance of the proposed methods. Three different nonlinear dynamical systems are presented to evaluate the performance of the NN controllers. Two hidden layers are used with and (thus, 20 neurons are present in the first and 10 neurons in the second hidden layers).
4.1. Example 1
Consider the nonlinear discrete time which is described by the thirdorder difference equation [19]:
The system can be reformulated as
A reference model is described by the thirdorder difference equation: where is a bounded reference input. The function is considered to be unknown; it can be estimated using neural network . The control input to the plant at any instant is computed using in place of .
If , then, whereas for NARMAL2 the control signal is generated based on equation (7):
and are used to learn and ; then,
The simulation reported in Figures 5–7 indicates stable and efficient online control. The improvements in the responses, when the neural networks in the approximate model are used to generate the control input to the plant, are evident from the figure. The outputs of the controlled plant and the reference model are shown and indicate that the output error is almost zero. All three neural networks FFNN, NARX, and NARMAL2based controllers provided satisfactory results.
(a)
(b)
(c)
(d)
(a)
(b)
(c)
(d)
(a)
(b)
(c)
(d)
The performance index of the different controllers with various neural network models is given in Table 1. We can notice that all the designed controllers give better performance. Nevertheless, the performance of the FFNN and NARX indicated better attainment regarding the performance indices (MSE).
4.2. Example 2
Consider the nonlinear discretetime system [1, 17]: where stands for the system output and is the control input at time index . The output is required to track the desired trajectory given in
The order of the plant is , so the inputs for the FFNN controller are and and the inputs for the NARMAL2 controller are and, and NARX models are and.
The control results for different epochs and learning rates along with control error are shown in Figure 8. As we can see from the results, the network is unstable using in the delayed input/output (not enough information).
The model of discretetime plants introduced here can be also described by the following nonlinear difference equations:
The same proposed scheme in Figure 4 is considered. To approximate the unknown , an FNNbased identification model is used:
The control action is required to get .
In this example, performance comparisons of the BPNNs are carried out with the three approximate models, FFNN, NARX, and NARMAL2. The results are shown in Figures 9–11. Also, notice that after sufficient online training of the plant, it has also converged to the desired response. The result during the training is presented in the figures. It can be seen from these figures that the control error (ec) reduces quickly to zero in the case of the NARX and NARMAL2 controllers as compared to the control error obtained with FFNN. This suggests the strong learning ability of recurrent NN models over FFNN in this example.
(a)
(b)
(c)
(d)
(a)
(b)
(c)
(d)
(a)
(b)
(c)
(d)
The numerical parameters used in the second system are presented in Table 2, as well as the mean square error (MSE) obtained with different controllers.

4.3. Example 3
The secondorder differential equation which describes the dynamics of a singlelink robotic manipulator is given as
The angular position of the robotic manipulator arm is represented by . The other parameters include link length which is denoted by . Also, the term quantifies the viscous friction torque, and is the acceleration due to gravity. For simplicity, the values of are used in this paper. Further, is the control torque exerted on the robotic arm. The corresponding state space representation of the above differential equation is given by
The difference equation of the onelink robotic manipulator with a sampling period is given by where the nonlinear function is
The desired reference model dynamics is given by the following difference equation: where is the externally applied input.
Before control action, the sampling period should be chosen with care. It is taken to be . In this part, the control is to make the robotic link output follow the reference trajectory signal. The response of the plant without control is shown in Figure 12. Clearly, the plant’s output is not following the reference input. So, the control scheme is set up and the training is continued for 100 epochs, and each epoch contains 100 training samples.
In the simulation studies, and were multilayer neural networks chosen with threelayer networks with inputs, 20 neurons in the first hidden layer, 10 neurons in the second hidden layer, and one output neuron.
From equation (25), the control input can be computed from acknowledging and its past values as
The mean square error (MSE) obtained with different controllers for example 3 is presented in Table 3. From the table, it can be seen that the MSE obtained with FFNN, NARX, and NARMAL2 is minimum as compared to the MSE obtained with the RBFN and DRNNbased controllers.
In this study, all the three methods provide simultaneous structure and parameter learning within the approximate models. The learning rate, , is taken to be 0.01. From Figures 13–15, it can be seen that the response of the robotic link is successfully controlled.
(a)
(b)
(c)
(d)
(a)
(b)
(c)
(d)
(a)
(b)
(c)
(d)
5. Conclusions
This paper describes the application of NN models as a controller. Both feedforward and two recurrent NARX and NARMAL2 predictors are proposed, tested, and compared. The method for the adjustment of parameters in generalized neural networks is treated, and the concept of dynamic back propagation is introduced. The training of all the three neural networks is done online. Simulation and comparative studies demonstrate the superior performance of the proposed approaches. It can be concluded that the ANNs can be successfully utilized for controlling different nonlinear dynamic systems. In addition, future works will explore the adaptive neural network control for nonlinear MIMO systems under disturbances using the hybrid learning method.
Data Availability
No data were used to support this study.
Conflicts of Interest
The authors declare that they have no conflicts of interest.
References
 A. Askarzadeh, “A novel metaheuristic method for solving constrained engineering optimization problems: crow search algorithm,” Computers and Structures, vol. 169, pp. 1–12, 2016. View at: Publisher Site  Google Scholar
 R. Kumar, S. Srivastava, and J. R. P. Gupta, “Diagonal recurrent neural network based adaptive control of nonlinear dynamical systems using Lyapunov stability criterion,” ISA Transactions, vol. 67, pp. 407–427, 2017. View at: Publisher Site  Google Scholar
 Y. Aldunainawi, M. F. Abbod, and A. Jizany, “A new MIMO ANFISPSO based NARMAL2 controller for nonlinear dynamic systems,” Engineering Applications of Artificial Intelligence, vol. 62, pp. 265–275, 2017. View at: Publisher Site  Google Scholar
 C. Treesatayapun, “Nonlinear discretetime controller with unknown systems identification based on fuzzy rules emulated network,” Applied Soft Computing, vol. 10, no. 2, pp. 390–397, 2010. View at: Publisher Site  Google Scholar
 K. El Hamidi, M. Mjahed, A. El Kari, and H. Ayad, “Neural and fuzzy based nonlinear flight control for an unmanned quadcopter,” International Review of Automatic Control, vol. 11, no. 3, pp. 98–106, 2018. View at: Publisher Site  Google Scholar
 X. L. Li, C. Jia, D. X. Liu, and D. W. Ding, “Adaptive control of nonlinear discretetime systems by using OSELM neural networks,” Abstract and Applied Analysis, vol. 2014, Article ID 267609, 11 pages, 2014. View at: Publisher Site  Google Scholar
 K. El Hamidi, M. Mjahed, A. El Kari, and H. Ayad, “Quadcopter attitude and altitude tracking by using improved PD controllers,” International Journal of Nonlinear Dynamics and Control, vol. 1, no. 3, pp. 287–303, 2019. View at: Publisher Site  Google Scholar
 Z. Cömert and A. F. Kocamaz, “A study of artificial neural network training algorithms for classification of cardiotocography signals,” Bitlis Eren University Journal of Science and Technology, vol. 7, no. 2, pp. 93–103, 2017. View at: Publisher Site  Google Scholar
 R. Kumar, S. Srivastava, and J. R. P. Gupta, “Comparative study of neural networks for control of nonlinear dynamical systems with lyapunov stabilitybased adaptive learning rates,” Arabian Journal for Science and Engineering, vol. 43, no. 6, pp. 2971–2993, 2018. View at: Publisher Site  Google Scholar
 S. Haykin and N. Network, “A comprehensive foundation,” Neural Networks, vol. 2, no. 2004, p. 41, 2004. View at: Google Scholar
 K. Patan, Artificial Neural Networks for the Modelling and Fault Diagnosis of Technical Processes, Springer, 2008.
 H. Wu, Y. Zhou, Q. Luo, and M. A. Basset, “Training feedforward neural networks using symbiotic organisms search algorithm,” Computational intelligence and neuroscience, vol. 2016, Article ID 9063065, 14 pages, 2016. View at: Publisher Site  Google Scholar
 K. S. Narendra and K. Parthasarathy, “Identification and control of dynamical systems using neural networks,” IEEE Transactions on Neural Networks, vol. 1, no. 1, pp. 4–27, 1990. View at: Publisher Site  Google Scholar
 E. Diaconescu, “The use of NARX neural networks to predict chaotic time series,” Wseas Transactions on computer research, vol. 3, no. 3, pp. 182–191, 2008. View at: Google Scholar
 K. Nouri, R. Dhaouadi, and N. B. Braiek, “Adaptive control of a nonlinear dc motor drive using recurrent neural networks,” Applied Soft Computing, vol. 8, no. 1, pp. 371–382, 2008. View at: Publisher Site  Google Scholar
 R. Celikel, “NARMAL2 controller for single link manipulator,” in 2018 International Conference on Artificial Intelligence and Data Processing (IDAP), pp. 1–6, Malatya, Turkey, 2018. View at: Publisher Site  Google Scholar
 M. S. Aftab and M. Shafiq, “Neural networks for tracking of unknown SISO discretetime nonlinear dynamic systems,” ISA Transactions, vol. 59, pp. 363–374, 2015. View at: Publisher Site  Google Scholar
 Y. Gao and M. J. Er, “NARMAX time series model prediction: feedforward and recurrent fuzzy neural network approaches,” Fuzzy sets and systems, vol. 150, no. 2, pp. 331–350, 2005. View at: Publisher Site  Google Scholar
 R. G. S. Asthana, “Evolutionary algorithms and neural networks,” in Soft Computing and Intelligent Systems, pp. 111–136, Elsevier Inc., 2000. View at: Publisher Site  Google Scholar
 M. T. Hagan, H. B. Demuth, M. H. Beale, and O. De Jess, Neural Network Design, vol. 20, Pws Pub, Boston, 1996.
Copyright
Copyright © 2020 Khadija El Hamidi 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.