Final1 ١ Al-khwarizmi Engineering Journal Al-Khwarizmi Engineering Journal, vol.1, no.1,pp 1-18, (2005) Neuro-Self Tuning Adaptive Controller for Non-Linear Dynamical Systems Ahmed Sabah Abdul Ameer Al-Araji University of Technology Abstract: In this paper, a self-tuning adaptive neural controller strategy for unknown nonlinear system is presented. The system considered is described by an unknown NARMA-L2 model and a feedforward neural network is used to learn the model with two stages. The first stage is learned off-line with two configuration serial-parallel model & parallel model to ensure that model output is equal to actual output of the system & to find the jacobain of the system. Which appears to be of critical importance parameter as it is used for the feedback controller and the second stage is learned on-line to modify the weights of the model in order to control the variable parameters that will occur to the system. A back propagation neural network is applied to learn the control structure for self-tuning PID type neuro- controller. Where the neural network is used to minimize the error function by adjusting the PID gains. Simulation results show that the self-tuning PID scheme can deal with a large unknown nonlinearity. Keyword: Self-Tuning, Neural Network, Adaptive Controller. 1. Introduction: In many applications, the control engineers face a number of practical difficulties. The large dimensionality of many processes & the significant interaction between variables from the major obstacle to the successful attempts of extending the classical techniques for the design of controllers for monovaraible plants to multivariable ones. The development of computer-aided techniques to design controllers aim to reduce interaction before applying classical theory to the individual loops. Most existing techniques are based on the design of tunable set-point tracking controllers with the dominance PI (Proportional, Integral) & PID (Proportional, Integral, Derivative) controllers in industry & certain assumptions such as linearity & interactions with in the controlled process have to be made [1,2]. Neural networks have broad applicability to real world problems, such as in pattern recognition,diagnostic, optimization, system identification & control. They have already been successfully applied in many industries, as they are well suited for predication or forecasting because of their abilities in identifying patterns or trend in data [3,4]. The neural network model can be used in control strategies that require a global model of the system forward or inverse dynamics, and these models are available in the form of neural networks, which have been trained using neural based system identification techniques. Papers by: Narandra & Parthasarathy [5,6] are some of those that can be referred to as the application of neural networks for Ahmed Sabah Abdul Ameer /Al khwarizmi Engineering Journal, vol. 1, no. 1, pp 1-18 (2005) ٢ system identification. The generalized learning method attempts to produce the inverse of a plant over the entire state space using off-line training while in the specialized architecture the training is on-line and uses error back- propagation through the plant to learn the plant inverse dynamics over a small operating region. Behera et al [7] in their paper are concerned with the design of a hybrid controller structure consisting of the adaptive control law and neural network based learning scheme for adaptation of time varying controller parameters. The global stability of the closed-loop feedback system is guaranteed provided the structure of the robot-manipulator dynamics model is exact. Generalization of the controller over the desired trajectory space has been established using an on-line weight learning scheme. The advantage of a neuron-adaptive hybrid control scheme is the high precision and better accuracy and computationally less intensive control scheme. Also for Self-Tuning Control (STC), Chen [8] used back-propagation trained neural network within a self-tuning control system to control Single-Input Single- Output (SISO) feedback linearizable system. Another approach is given in [9], where a neural network is used to tune the parameters of a conventional controller in an on-line way. The organization of the paper is as follows: Section two describes the use of FNNs to learn to act as input-output model. Model (NARMA-L2) for system identification are examined with the corresponding neural nets and learning mechanism used for this purpose. Section three represents the core of the present paper. It is suggested using self-tuning PID neural controller. Illustrative example that clarify the features of the proposed strategy are given in section four, where the example is discussed in detail. Finally, section five contains the conclusions of the entire work. 2- Identification of Dynamical System: The system identification and modeling is a very important step in control applications since it is a pre- requisitic for analysis and controller design. Due to the nonlinear nature of most of the processes encountered in many engineering applications there has been extensive research covering the field of nonlinear system identification [10]. This section focuses on nonlinear system identification using the model of multi- layered feedforward neural network, NARMA-L2 model. The neural network is trained using Back- Propagation Algorithm. To describe the process by using artificial neurons as basic building elements for the development of multi-layered and higher order neural network, the feedforward neural networks are widely used. The learning scheme for feedforward neural networks presented in this section includes the generalized Delta Rule based algorithms for Error Back Propagation for multi-layers neural networks [11]. A feedforward neural network can be seen as a system transforming a set of input patterns into a set of output patterns, and such a network can be trained to provide a desired response to a given input. The network achieves such a behavior by adapting its weights during the learning phase on the basis of some learning rules. The training of feedforward neural networks often requires the existence of a set of input and output patterns called the training set [11] and this kind of learning is called supervised learning. The feedforward network used here has two layers, the first is the hidden layer and the second is the output layer where Ahmed Sabah Abdul Ameer /Al khwarizmi Engineering Journal, vol. 1, no. 1, pp 1-18 (2005) ٣ each unit in the hidden layer has a continuous sigmoidal nonlinearity [12] and the output node has linear activation function. NARMA-L2 Model Identification: Nonlinear input-output behavior can be well approximated by NARMA-L2 (Nonlinear Auto Regressive Moving Average-Linear) two model which can be expressed as [13]: )]1(),...,1(),1(),...,([)1( +−−+−=+ nkukunkykyfky ppp )k(u)]1nk(u),...,1k(u),1nk(y),...k(y[g pp ×+−−+−+ ...(1) where n is the order of the system. The NARMA-L2 model requires only two neural networks to approximate the function f and g. Each of the two. functions, however has (2n-1) inputs By using NARMA-L2 model the weights of the neural networks are adjusted in a similar manner when using the NARMA model. )]1nk(u),...k(u),1nk(y),...,k(y[F)1k(y ppp +−+−=+ …(2) The difference between them is that NARMA-L2 model consists of two functions f[-] and g[-] in equation (1) while one neural network is needed for NARMA model. The first step in the identification procedure using feedforward neural network is quite straightforward with serial parallel model and at each instant of time. The past inputs and the past outputs of the system are fed into the neural network as shown Fig (1). Plant H H L N1= ][ − ∧ f H H L N2= ][− ∧ g 1Z− 1nZ +− y2 y1 Training mechanism + + + - 1nZ +− 1Z− u(k) y m (k+1) y p (k+1) Fig (1): NARMA-L2 Identification Model Serial-Parallel Configuration × Ahmed Sabah Abdul Ameer /Al khwarizmi Engineering Journal, vol. 1, no. 1, pp 1-18 (2005) ٤ The network’s output yields the prediction error: )1k(y)1k(y)1k(e mp +−+=+ …(3) the identification model for the NARMA-L2 model can be better illustrated as Fig.1, where X represents the input vector of the networks N1 and N2 (the argument of ][f − ∧ and ][g − ∧ ). The learning (training) algorithm is usually based on the minimization (with respect to the network weights) of the following objective cost function: ∑ ∑ = = +−+=+= np i np i i m i p i kykykeE 1 1 22 ))1()1(( 2 1 ))1(( 2 1 … (4) Where np is number of patterns, ie is the error of each step, ipy is the actual output of the plant of each step and i my is the model output of the plant of each step. From Fig.1, it is important to note that the error between the desired output and the estimated neural network output needed to apply a supervised learning algorithm which is not available at the output N1 and N2. Hence, a little modification must be done to fit the algorithm to our case. This can be simply done by back- propagating the error at the output of the NARMA-L2 model (between y p (k+1) and y m (k+1)) to the output of N2 after multiplying it by u(k) and to the output of N2 after multiplying it by u(k) and to the output of N1 directly. The second step in the identification procedure using the same feedforward neural network that its learned off-line with serial –parallel model. But now with parallel model and at each instant of time, the past inputs and the past model outputs of the neural network are fed into the same neural network as shown Fig.2. In order to minimize the error between the actual output & the model output and is equal to zero approximately then the model (NARMA-L2) will complete the same actual output response. When identification of the plant is complete then g[-] can be approximated by ][g − ∧ and f[-] by ][f − ∧ and the NARMA-L2 model of the plant can be described by equation (5) below: )]1(),...,1(),1(),...,([)1( +−−+−=+ ∧ nkukunkykyfky ppm )()]1(),...,1(),1(),...,([ kunkukunkykyg pp ×+−−+−+ ∧ … (5) Likewise if ][g − ∧ is sign definite in the operating region then the ][g − ∧ network can be used as the jacobain of the plant as given by equation (6). )]1nk(u),...,1k(u),1nk(y),...,k(y[g pp +−−+− ∧ …(6) where the jacobain is: ][ )( )1( ^ −= ∂ +∂ = g ku ky jacobain p …(7) The sign definiteness of ][g − ∧ in the operating region (the region of interest) ensures the uniqueness of the plant inverse at that operating region [14]. Now by using equation (5) as the model of the plant identifier and equation (6) as the jacobain of the plant. 3- The Controller Design: The control of nonlinear plants is considered in this section. The approach used to control the plant depends on the information available about the plant and the control objectives. The information of the unknown nonlinear plant can be known by the input-output data only and the plant is considered as (NARMA-L2 model). The first step in the procedure of the control structure is the identification of the plant from the input-output data, and then is used to Ahmed Sabah Abdul Ameer /Al khwarizmi Engineering Journal, vol. 1, no. 1, pp 1-18 (2005) ٥ find the jacobain of the plant as in section two. The feedback neural controller is used based on the minimization of the error between the desired “set-point” & the actual output plant in order to achieve good tracking of the reference signal and to use minimum effort. The integrated control structure that consists of the identifier of the plant and a self-tuning PID controller type neural networks thus brings together the advantages of the neural model with the robustness of feedback. The general structure of the neural controller type can be given in the form of the block diagram shown in Fig. 3.And this structure of the proposed controller can be applied to the nonlinear plants.It consists of: 1. Identifier as Feedforward Neural Networks (NARMA-L2) Model. 2. Self-Tuning PID Feedback Controller Type Neuro Controller. In the following sections, the proposed controller will be explained in detail. Plant H H L N1= ][ − ∧ f H H L N2= ][− ∧ g 1Z− 1nZ +− y2 y1 Training mechanism + + + - 1nZ +− 1Z− u(k) y m (k+1) y p (k+1) Fig (2): NARMA-L2 Identification Model Parallel Configuration × Ahmed Sabah Abdul Ameer /Al khwarizmi Engineering Journal, vol. 1, no. 1, pp 1-18 (2005) ٦ Self-Tuning PID Type Neuro- Controller: The feedback neural controller is very important because it is necessary to stabilize the tracking error dynamics of the system when the output of the plant is drifted from the input reference [14]. The adaptive Self-Tuning technique is to adjust the parameters of the PID feedback controller by using neural networks, so that, the output of the plant follows the output of the predefined desired model. In the following section, a self-tuning neuro- control scheme is discussed in which a neural network is used to tune the parameters of a PID controller referred to as the self-tuning PID neuro-control scheme. The PID control configuration is illustrated in Fig. 4, where Kp is the proportional gain, Ki is an integral gain, & Kd is the derivative gain, which are adjusted to achieve the desired output.The control input U(k) of the PID controller is given by equation (8): desy Fig (3): The general structure of the proposed controller + _ + _ u y p y m ∆ me PID Controller Nonlinear Plant Neural Network ∆ Neural network identifier ∆ ∆ e Kp Ki Kd Fig (4): General Configuration of PID controller ⊕ u e Kp S Ki KdS Ahmed Sabah Abdul Ameer /Al khwarizmi Engineering Journal, vol. 1, no. 1, pp 1-18 (2005) ٧ ∑ −−++= )1()(()()()( kekekdkeKikKpekU (8) The proposed control structure for the self-tuning PID learning where the network is used to minimize the error function by adjusting the PID gain. The discrete-time version of PID controller is described by: 2)]-e(k1)-2e(k-Kd[e(k) e(k) Ki1)]-e(k-Kp[e(k)1)-u(kU(k) ++ ++= (9) Where Kp, Ki, & Kd denote the PID gains. e(k)= )()( kyky mdes − (10) )(kydes is a desired output. )(kym is the model output. In order to derive the self-tuning algorithm of the PID controller, a cost function E should be minimize and it is defined as:: )1( 2 1 2 += keE (11) Using two layers neural network as shown in Fig.5, that will realize the learning rule to find the suitable PID gains. The multi-layered feedforward neural network shown in Fig.5 is composed of many interconnected processing units called neurons or nodes [10]. where: V : Weight matrix. W : Weight matrix. L : Denotes linear node. H : Denotes nonlinear node with sigmoidal function. As can be seen the net consists of three layers: An input layer (buffer layer), a single hidden layer with biases and a linear output layer with bias too. The neurons in the input layer simply store the scaled input values. The hidden layer neurons perform two calculations. To explain these calculations, consider the general j’th neuron in the hidden layer shown in Fig.6. The inputs to this neuron consist of an ni – dimensional vector X (ni is the number of the input nodes) and a bias whose value is “-1”[10]. Each of the inputs has a weight ijV , associated with it. The first calculation within the neuron consists of calculating the weighted sum jnet of the inputs as: ∑ = + ×+×= ni i nijiijj biasVXVnet 1 1,, (12) Next the output of the neuron jh is calculated as the continuous sigmoid function of the jnet as: jh = H( jnet ) (13) H( jnet )= 1 1 2 − + − jnete (14) Ahmed Sabah Abdul Ameer /Al khwarizmi Engineering Journal, vol. 1, no. 1, pp 1-18 (2005) ٨ Once the outputs of the hidden layer are calculated, they are passed to the output layer. In the output layer, a single linear neuron is used to calculate the weighted sum (neto) of its inputs (the output of the hidden layer as in equation(15). neto k = biasWhW nhk nh j jkj ×+× + = ∑ 1, 1 (15) where nh is the number of the hidden neuro (nodes) and kjW is the weight between the hidden neuron jh and the output neuron.The single linear neuron, then, pass the sum (neto k ) through a linear function of slope 1 (another slope can be used to scale the output) as: )( kk netoLO = ,whereL(x)=x (16) Thus the outputs at the output layer are Kp, Ki, & Kd which are denoted by O1, O2, & O3 respectively. Based on the steepest descent (gradient) method, at the output layer: Fig (5): Neural network is used to determine the PID gains H L jiV kjW H H Inputs Bias= -1 Bias= -1 Kp=O1 Inputs Layer Hidden Layer Output Layer L L Ki=O2 Kd=O3 ∑ H 1,jV 2,jV nijV , , +nijV jh X1 X2 Xni Bias = -1 Fig (6): Neuron j in the hidden layer. Ahmed Sabah Abdul Ameer /Al khwarizmi Engineering Journal, vol. 1, no. 1, pp 1-18 (2005) ٩ kj kj kj ww E kw ∆+ ∂ ∂ −=+∆ αη)1( (17) kj k kkj w net net E w E ∂ ∂ × ∂ ∂ = ∂ ∂ (18) kj k k k kkj w net net o o E w E ∂ ∂ × ∂ ∂ × ∂ ∂ = ∂ ∂ (19) kj k k k kkj w net net o o ku ku E w E ∂ ∂ × ∂ ∂ × ∂ ∂ × ∂ ∂ = ∂ ∂ )( )( ( 20) kj k k k k m mkj w net net o o ku ku ky ky E w E ∂ ∂ ∂ ∂ ∂ ∂ ∂ +∂ +∂ ∂ = ∂ ∂ )( )( )1( )1( (21) jk k m mkj onetf o ku ku ky ky E w E )( )( )( )1( )1( ′ ∂ ∂ ∂ +∂ +∂ ∂ = ∂ ∂ (22) ][ )( )1( ^ −= ∂ +∂ = g tu ky jacobain m (23) jk kmkj onetf o ku g ky ke ke E w E ×′× ∂ ∂ ×−× +∂ +∂ × +∂ ∂ = ∂ ∂ )( )( ][ )1( )1( )1( ^ (24) from equation (10 & 11) substituted in equation (24) jk k ^ kj o)net(f o )t(u ][g)1t(e w E ×′× ∂ ∂ ×−×+−= ∂ ∂ (25) where: C)net(f k =′ for linear activation function with gain is limited between (0 to 1).           =−+−− = =−− = ∂ ∂ 3)2()1(2)( 2)( 1)1()( )( kkekeke kke kkeke o ku k (26) Then substituted equation (25) in equation (12) kjj k kj woCo ku gkekw ∆+× ∂ ∂ −+=+∆ αη )( ][)1()1( ^ (27) at the hidden layer: ji ji ji vv E kv ∆+ ∂ ∂ −=+∆ αη)1( (28) ji j jji v net net E v E ∂ ∂ × ∂ ∂ = ∂ ∂ (29) j jji o net E v E × ∂ ∂ = ∂ ∂ (30) j j K 1k j j ji net o o E o v E ∂ ∂ × ∂ ∂ ×= ∂ ∂ ∑ = (31) j j j k K 1k k j ji net o o net net E o v E ∂ ∂ × ∂ ∂ × ∂ ∂ ×= ∂ ∂ ∑ = (32) )net(fw net E o v E jkj K 1k k j ji ′×× ∂ ∂ ×= ∂ ∂ ∑ = (33) from the derives of knet E ∂ ∂ in equation (19), we get: k k m k o ku netf ku ky ke net E ∂ ∂ ×′× ∂ +∂ ×+−= ∂ ∂ )( )( )( )1( )1( (34) from equation (34) substituted in equation (37) ∑ = ′ ∂ ∂ ′ ∂ +∂ +−= ∂ ∂ K k jkj k k m j ji netfw o ku netf ku ky keo v E 1 )( )( )( )( )1( )1( (35) then equation (35) substituted in equation (28) ∑ = ′ ∂ ∂ −+=+∆ K k jkj k jji netfwo ku Cgkeokv 1 ^ )( )( ][)1()1( η jiv∆α+ (36) Ahmed Sabah Abdul Ameer /Al khwarizmi Engineering Journal, vol. 1, no. 1, pp 1-18 (2005) ١٠ 4- Case Study: In this section, an example is taken to clarify the features of the neural controller explained in section three. In this example, the controller structure is applied to the plant whose difference equation is: )(2.1))(2(8.0)1( kukySinky pp +=+ (37) This plant has been adopted from [8 & 14]. For the open loop response of the plant )k(y p to the input signal u(k) is shown in Fig 7-a and b respectively. The plant response is very oscillatory when the input amplitude 4.0)k(u ≥ . To use the proposed controller first a neural network is trained for the identification the plant dynamics. There are two stages the first is a series-parallel configuration NARMA- L2 model identification structure as that in Fig.1 is used. The model is described by: +=+ )]([1)1( kyNky pm )()]([2 kukyN p (38) -1.8 -1.4 -1 -0.6 -0.2 0.2 0.6 1 1.4 1.8 0 10 20 30 40 50 60 70 80 90 100 K Y p [k ] Fig (7-a): The open loop response -1 -0.8 -0.6 -0.4 -0.2 0 0.2 0.4 0.6 0.8 1 0 10 20 30 40 50 60 70 80 90 100 K U [k ] Fig (7-b): The corresponding input signal Ahmed Sabah Abdul Ameer /Al khwarizmi Engineering Journal, vol. 1, no. 1, pp 1-18 (2005) ١١ where N1[-] and N2[-] are multi- layered neural networks which approximate ][f ^ − and ][g − ∧ of equation (5), respectively. Since each of N1[-] and N2[-] has three inputs )(kyp (see equation (38)), the initial guess of the number of hidden nodes is three for each network. Using a random input sequence u(k) with 1)( ≤ku a training set of 100 patterns input-output used with learning rate 1η for N1 and 2η for N2 and both were taken to be equal to 0.3. During the training phase, the training set has been presented to the network many times. A training event corresponding to a single pass over of the entire training set is called a training epoch or training cycle. However, for this example after 2000 epochs the Average System Error (ASE) computed for the latest epoch, which is described by equation (39) was 61077.2 −× . ( )∑ = +−+= np i i m i p kykynp ASE 1 2 )1()1( 2 1 (39) where np total number of patterns which is equal to 100 here. Fig.8-a compares the time response of the series-parallel model of equation (38) with the actual plant output for the input as a learning set. While Fig.8-b compares the time response of the series-parallel model of equation (38) with the actual plant output for the input applied as testing set generated from equation (40). ) 20 2 sin(5.0) 10 2 sin(5.0)( kk ku ππ ×+×= (40) The second stage is a parallel configuration NARMA-L2 model identification structure as that in Fig 2 is used. To guarantee the model output is equal to the actual output and also to find the jacobain of the plant. +=+ )]([1)1( kyNky mm )()]([2 kukyN m (41) where N1[-] and N2[-] are multi- layered neural networks which approximate ][f ^ − and ][g − ∧ of equation (5), respectively. Since each of N1[-] and N2[-] has three input )( Ky m (see equation (41)). Using the same random input sequence u(k) with 1)k(u ≤ a training set of 100 patterns input-output used on the same the neural networks N1[-] & N2[-] that there are learned off-line with serial- parallel identification with learning rate 1η for N1 and 2η for N2 and both were taken to be equal to 0.3. During the training phase, the training set has been presented to the network many times. However, for this example after 5000 epochs the Average System Error (ASE) computed for the latest epoch, which is described by equation (39) was 61013.1 −× . Fig.9-a compares the time response of the parallel model of equation (41) with the actual plant output for the input as a learning set, while Fig.9-b compares the time response of the parallel model of equation (36) with the actual plant output for the input u(k) applied as testing set generated from equation (35). Also Fig.10 shows a plot of the coefficient of u(k) which is ][g − ∧ for the NARMA-L2 models as a function of time with values computed using the corresponding network )()]([2 kukyN p , when a random input sequence u(k) with 1)k(u ≤ has been applied to the model. As shown in Fig.10, ][g − ∧ is sign definite in the region of interest. This means that the plant is invertable, or in other words; the model output )1k(y m + is monotonic with respect to Ahmed Sabah Abdul Ameer /Al khwarizmi Engineering Journal, vol. 1, no. 1, pp 1-18 (2005) ١٢ -2 -1.5 -1 -0.5 0 0.5 1 1.5 2 0 10 20 30 40 50 60 70 80 90 100 k Y m [k ] & Y p [k ] Fig (8-a): The response of the plant & the serial-parallel NARMA-L2 identification model for learning patterns Plant response -----Model response -2 -1.5 -1 -0.5 0 0.5 1 1.5 2 0 10 20 30 40 50 60 70 80 90 100 K Y p[ k] & Y m [k ] Fig (8-b): The response of the plant & the serial-parallel NARMA-L2 identification model for testing patterns Plant response -----Model response -2 -1.5 -1 -0.5 0 0.5 1 1.5 2 0 10 20 30 40 50 60 70 80 90 100 k Y m [k ] & Y p [k ] Fig (9-a): The response of the plant & the parallel NARMA-L2 identification model for learning patterns Plant response -----Model response Ahmed Sabah Abdul Ameer /Al khwarizmi Engineering Journal, vol. 1, no. 1, pp 1-18 (2005) ١٣ u(k). The variation of ][g − ∧ is approximately around 1.2 as it is expected. This can be explained easily by noting the fact what ][g − ∧ resembles the plant jacobain is equal to as equation (7) and for this example 2.1 )k(u )1k(yp = ∂ +∂ . To apply the proposed structure of controller after good learning of the identifier as pm yy ≈ . It used the desired trajectory and the training done by repeating the desired trajectory cycles over 26000 times. The neural networks are used to minimize the performance error between the reference and the model output, where the model output is similar to the actual output. Convergence is achieved when the performance error falls below a pre-specified value. After training, it can be observed that the actual output of the plant is following the desired trajectory and the model output is the same as the actual output in Figs.11 & 12. And also, the gains of the PID self- tuning neural controller as shown in Fig. 13 -a, b, & c Kp, Ki, & Kd 1.19 1.195 1.2 1.205 1.21 0 10 20 30 40 50 60 70 80 90 100 K Ja co ba in o f th e pl an t Fig (10): Estimated plant jacobain -2 -1.5 -1 -0.5 0 0.5 1 1.5 2 0 10 20 30 40 50 60 70 80 90 100 K Y p[ k] & Y m [k ] Fig (9-b): The response of the plant & the parallel NARMA-L2 identification model for testing patterns Plant response -----Model response Ahmed Sabah Abdul Ameer /Al khwarizmi Engineering Journal, vol. 1, no. 1, pp 1-18 (2005) ١٤ -1 -0.5 0 0.5 1 0 10 20 30 40 50 60 70 80 90 100 110 120 K Y p[ k] & Y de s[ k] Fig (11): The response of the plant with the set point Plant response ----- Set point -1 -0.5 0 0.5 1 0 10 20 30 40 50 60 70 80 90 100 110 120 K Y p[ k] & Y m [k ] Fig (12): The response of the plant & the response of the model Plant response -----Model response -2.5 -2 -1.5 -1 -0.5 0 0.5 1 1.5 2 2.5 0 10 20 30 40 50 60 70 80 90 100 110 120 K K p Fig (13-a): Kp gain of PID controller Ahmed Sabah Abdul Ameer /Al khwarizmi Engineering Journal, vol. 1, no. 1, pp 1-18 (2005) ١٥ Fig (13-b): Ki gain of PID controller -5.5 -4.5 -3.5 -2.5 -1.5 -0.5 0.5 1.5 2.5 3.5 4.5 5.5 0 10 20 30 40 50 60 70 80 90 100 110 120 K K i -2.5 -2 -1.5 -1 -0.5 0 0.5 1 1.5 2 2.5 0 10 20 30 40 50 60 70 80 90 100 110 120 K K d Fig (13-c): Kd gain of PID controller -1 -0.8 -0.6 -0.4 -0.2 0 0.2 0.4 0.6 0.8 1 0 10 20 30 40 50 60 70 80 90 100 110 120 K U [k ] Fig (14): The control signal of the PID controller Ahmed Sabah Abdul Ameer /Al khwarizmi Engineering Journal, vol. 1, no. 1, pp 1-18 (2005) ١٦ respectively. And the feedback control action as shown in Fig14. 5- Conclusion: The structure of the neural controller with an identifier based on neural NARMA-L2 model that is learned off- line with two configuration serial- parallel & parallel and applied the algorithm of the self-tuning PID neural controller as the proposed structure of controller and successfully simulated to nonlinear system as the example. Using neural NARMA-L2 model as a nonlinear model of the plant provides a simple check on the model jacobain, which appears to be of critical importance as it is used for the feedback controller. The on-line identifier NARMA-L2 model of the plant is used to updated of the weights of the identifier by using (BPA) in order to guarantee that model output approaches the actual output. Using PID feedback controller with self- tuning neural to adjust the parameters of the controller. So that, the output of the plant follows the output of the predefined desired input and (BP) algorithm is used to learn the model. The proposed control structure has shown the ability to minimize the error between the desired output and the actual output of the plant as well as the control action, excellent set point tracking, as it was clear when applied to the example. The simulation example in this paper is implemented using Turbo C++ programming language together with Microsoft Excel. References 1. Porter B. & Jones A.H.,“ Design of tunable digital set-point tracking PI controller using step response matrices for gas turbain” AlAA Guidance, Naving – 1986. Nomenclature Abbreviations 2. Porter B. & Jones A.H.,“ Genetic tuning of digital PID controllers” Electronics Letters: Vol. 28, PP 843-844, 1992. ASE Average System Error BPA Back Propagation Algorithm FBNC Feedback Neural Controller FFNC Feedforward Neural Controller NARMA Nonlinear Auto Regressive Moving Average PID Proportional Integral Derivative SISO Single-Input Single-Output STC Self-Tuning Control Symbol Description E Summation of error e The error between reference input and the model output ][2],[1 ],[],[ −− −− ∧∧ NN gf Neural input-output mapping functions H Sigmoidal activation function of the hidden nodes k Discrete time instant L Linear activation function of the output node n Plant order jnet The weighted sum of the inputs of the node j in the hidden layer neto The weighted sum of the inputs of the output node nh Number of nodes in hidden layer ni Number of nodes in input layer u Manipulated input V Weight matrix between the input and the hidden layer W Weight matrix between the hidden and the output layer X The input vector for the input layer desy The desired output py Plant output my Model output P Number of patterns in the training set η Learning rate of the neural network Ahmed Sabah Abdul Ameer /Al khwarizmi Engineering Journal, vol. 1, no. 1, pp 1-18 (2005) ١٧ 3. Patterson D.W. “Artificial neural networks, theory & applications” Prentice Hall 1996. 4. Lightbody G. and Irwin G.W.” Direct neural model reference adaptive control” IEEE Proce. On control theory and applications, Vol. 142; no. 1, pp. 31-42; Jun 1995. 5. K. S. Narendra and K. parthasarathy, “Identification and control of dynamical systems using neural networks,” IEEE Trans. Neural Networks, vol. 1,pp. 4-27, 1990. 6. K. S. Narendra and K. parthasarathy, “Gradient methods for the optimization of dynamical systems containing neural networks,” IEEE Trans. Neural Networks, vol. 2 no. 2, pp. 252-262, 1991. 7. L. Behera, S. Chaudhury, and M. Gopal, “Neuro-adaptive hybrid controller for robot-manipulator tracking control” IEE Proc. Control Theory Appl. Vol.143, no. 3, pp.270- 275, 1996. 8. F. C. Chen, “Back-propagation neural networks for nonlinear self- tuning adaptive control,” IEEE Control Systems Magazine, vol. 10, no. 3, pp. 44-48, 1990. 9. S. Omatu, M. Khalid, and R. Yusof, Neuro-Control and its Applications. London: Springer- Velag, 1995. 10. S. A. Billings, “Identification of nonlinear systems a survey,” IEE Proc., vol. 3,pp. 272-285,1980. 11. N. B. Karayiannis and A.N. Venetsanopoulos, Artificial Neural Networks Learning Algorithms, Performance Evaluation, and Applications. London: Kluwer Academic Publishers. 1993. 12. K. J. Hunt, D. Sbarbaro, R. Zbikowski and P. J. Gawthrop, ”Neural networks for control systems—A survey,” Automatica, vol. 28, no. 6, pp. 1083-1112, 1992. 13. K. S. Narendra and S. Mukhopadhyay, “Adaptive control using neural networks and approximate models,” IEEE Trans. Neural Networks, vol. 8, no. 3, pp. 475-485, 1997. 14. Ahmed S. Al-Araji “A Neural controller with a pre-assigned performance index” M.Sc. Thesis, University of technology, November 2000. Ahmed Sabah Abdul Ameer /Al khwarizmi Engineering Journal, vol. 1, no. 1, pp 1-18 (2005) ١٨ المسيطر المتكيف ذو التنغيم التلقائي العصبي لالنظمة الديناميكية الالخطية احمد صباح عبد االمير االعرجي لوجيةوالجامعة التكن :الخالصة يتم تعليمه بطريقة (NARMA-L2) الذي أساسه النموذج العصبي (Identifier) أن هيكلية المسيطر العصبي مع المعرف (off-line) مع صيغتين التوالي المتوازي و المتوازي وتطبيق خوارزمية التنغيم التلقائي العصبي للمسـيطر (PID) كمقتـرح .لبناء هيكلية المسيطر (Jacobain)هو نموذج ألخطي يصف المنظومة ألالخطية ويسـتخدم لتحقـق مـن (NARMA-L2)أن النموذج العصبي .منظومة و التي تعتبر من العناصر المهمة و الحرجة في إيجاد إشارة التغذية العكسيةلل للنموذج بطريقة خوارزمية االنتشار (Weights)لتحديث األوزان (on-line)يتم أيضا تعليمه (NARMA-L2)أن المعرف .العكسي العامة لكي يصبح النموذج مطابق الى المنظومة ألالخطية لكي يتبع إخراج المنظومة الحقيقية (PID ) يطر الراجع العصبي ذات التنغيم التلقائي لتعبير عناصر المسيطر يستخدم المس .خوارزمية االنتشار العكسي العامة" اإلدخال المطلوب وباستخدام أيضا .للمنظومةأن هيكلية المسيطر المقترح يستخدم لتقليل الخطاء بين اإلخراج المرغوب و اإلخراج الحقيقي .لقد تم الحصول على نتائج ممتازة باستخدام المسيطر المقترح عندما طبق هذا المسيطر على المنظومة ألالخطية