Australian Journal of Basic and Applied Sciences, 3(3): 2322-2333, 2009 ISSN 1991-8178 Predictive Control of a Single Link Flexible Joint Robot Based on Neural Network and Feedback Linearization 1 2 1 S. Shams Shams Abad Frahani, M.A. Nekouei, Mehdi Nikzad 1 Department of electrical engineering, Azad Islamic University, Eslamshahr,Iran. 2 Department of electrical engineering, K.N Toosi University, Tehran, Iran. Abstract: This paper deals wi control of a single link flexible joint Robot. First, a neural network based predictive controller using Multi Layer Perceptron (MLP) is designed to govern e dynamics of e proposed Robot en e performance of e controller is compared wi at of Feedback Linearization rough simulation studies. Key words: Neural network control, Multi Layer Perceptron, Feedback Linearization, predictive control INTRODUCTION Predictive control is now widely used in industry and a large number of implementation algorims. Most of e control algorims use an explicit process model to predict e future behavior of a plant and because of is, e term model predictive control (MPC) is often utilized (Camacho, E.F., 1998; Garcia, C.E., D.M). The most important advantage of e MPC technology comes from e process model itself, which allows e controller to deal wi an exact replica of e real process dynamics, implying a much better control quality. The inclusion of e constraints is e feature at most clearly distinguishes MPC from oer process control techniques, leading to a tighter control and a more reliable controller. Anoer important characteristic, which contributes to e success of e MPC technology, is at e MPC algorims consider plant behavior over a future horizon in time. Thus, e effects of bo feedforward and feedback disturbances can be anticipated and eliminated e fact, which permits e controller to drive e process output more closely to e reference trajectory. It is clear at e task of obtaining a high-fidelity model is more difficult to build for nonlinear processes. Recently, neural networks have become an attractive tool in e construction of models for complex nonlinear systems (Nelles, O., 2001; Narendra, K.S. and K. Parasaray, 1990). A large number of control structures based on neural networks have been proposed (Arahal, M.R., M. Berenguelm, 1998; Gomm, J.B., J.T. Evans, 1997). Most of e nonlinear predictive control algorims imply e minimization of a cost function, by using computational meods for obtaining e optimal command to be applied to e process. The implementation of e nonlinear predictive control algorims becomes very difficult for real-time control because e minimization algorim must converge at least to a sub-optimal solution and e operations involved must be completed in a very short time (corresponding to e sampling period). In is paper we analyze an artificial neural network based nonlinear predictive controller for a single link flexible joint Robot. The procedure is based on construction of a neural network model for e process and e proper use of at in e optimization process. The meod eliminates a neural predictor and providing a rapid, reliable solution for e control algorim. Using e proposed controller, e tracking behavior of e plant is studied. Also, e performance of e proposed neural network based predictive controller is compared wi at of Feedback Linearization, which e latter leads to better performance. The organization of is paper is as follows: In Section 2 and 3 e predictive control meodology based on MLP and e simulation results in a single link flexible joint Robot is briefly presented. Section 4 and 5 present e predictive control meodology based on Feedback Linearization and e simulation results for e proposed Robot, finally e paper is concluded in section 6. Corresponding Auor: S. Shams Shams Abad Frahani, Department of electrical engineering, Azad Islamic University, Eslamshahr,Iran Emails: Shoorangiz_shams@yahoo.com, Manekoui@eetd.kntu.ac.ir, mehdi.nikzad@yahoo.com 2322
Predictive Control Meodology Based on Multi Layer Perceptron: This section presents e role and architecture of e neural predictors resulting from e following nonlinear modeling techniques based on neural network principles.(hunt, K.J., D. Sbarbaro, 1992; Montague, G.A., M.J. Willis, 1991). A network wi k+1 layers and n 0,n 1, n k points in each layer is recognized. Where, is e bias in e weigh vector of k layer. In zero and first layers, we mention x as input layer vector, w 1 as weight vector, z as state vector and y as output vector. Thus we obtain: 1 k (1) f is a function which is considered to be: (2) to implement BP algorim we have to minimize e following cost function: (3) w is a vector including bias and weights. Using steepest descent algorim to minimize at cost function, we have: (4) where ì is e learning rate. In a Multi Layer Perceptron (MLP) wi Back propagation as training meod wi just one hidden layer, h neurons in hidden layer and p neurons in input layer, e output of MLP network becomes: (5) (6) and y(i) is e output of e i neuron, f j output function of j neuron in hidden layer, z(j) Output function of j neuron, h e neuron number in hidden layer, p e number of input neurons, w j e connecting weigh of j neuron of hidden layer to output neuron, w j,k connecting weigh of i input neuron to j neuron of hidden layer, b j e bias of j neuron in hidden layer and b as e bias in output neuron. A quadratic cost function is utilized to compute e prediction error and to derive e optimal predictive control strategy. 2323
(7) (8) Where ë and ë are weighting matrixes and N 1, N,N 2 u are e minimum, maximum of prediction horizon and control horizon, respectively. Minimization of e cost function (j) occurs in each sampling time and ends in a control signal. But wi e aim of receding horizon only e first element of it will be used as control signal. Using steepest descent strategy we have: (9) + Where á R is e optimization step. This algorim is continued until e variation of u(t) becomes less an a small value of. The derivation of å. The cost function (j) in time of t+h,(h=1,2...,n ) is as follows: u (10) Possibly we write in e form of Kronecker delta function and we have: (11) While Kronecker delta function is (12) So, we have: (13) In accordance to (5) and (6), we have: 2324
(14) And can be written as: (15) Using Chain rule we obtain: (16) Can be calculated using output function deviation. is depended on inpu t,delayed inputs,,, and output, delayed output,,,. Suppose having k neurons as input while e first neurons from1 to q introduce Neurons from q+1 to K show. So we have: (17) and can be calculated as follows: (18) Then, (19) can be calculated rough a repetitive calculation considering e case of ending in zero as a result. 2325
Fig. 1: The scheme of neural network based predictive control Simulation Results of Predictive Control in e Single Link Flexible Joint Robot wi e Use of MLP: To implement e algorim, a network wi one hidden layer and ten neurons is considered. The set point tracking results of e simulation on e plant and e corresponding input signal are depicted in Figures 2 and 3. Clearly e system could track e set points wi satisfactory performance using a numerical optimization also e prediction and control horizons are 7 and 2, respectively also ë i is 0.05. Next, e cost function J is constructed (20) The minimization algorim gives e control input vector U=[u(t),u(t-1),u(t-2),y(t),y(t-1),y(t-2)] to be applied to e plant. Clearly e system could track e set points wi satisfactory performance. Fig. 2: Tracking 2326
Fig. 3: Control signal Predictive Control Meodology Based on Feedback Linearization (Ljung, L., 1992): The idea of feedback linearization can be simply applied to a class of nonlinear systems described by: (21) Using e following control input And This section presents e design of generalized predictive control in parts A and B as follows: A.System Model and Prediction Consider a system described by e linear state equations: (22) (23) (24) Where, are e state, output and control, respectively; also A,B and H,matrixes wi appropriate dimensions. The structure of e given model is used for formulating e predictive controllers. First, define a state prediction model of e form: (25) 2327
Where v denotes e state vector prediction at instant t for instant t+j and u(0 t ) denotes e sequence of control vectors wiin e prediction interval. This model is redefined at each sampling instant t from e actual state vector and e controls previously applied, (26) Applying e state prediction model recursively to e initial conditions, e following equations can be obtained: (27) (28) B. Minimization of e performance criterion The predictive control law is usually formulated to minimize a cost function, also called e performance criterion. A simple performance criterion at can be used in predictive control design is given by : Or (29) Linear Where y d(t+j) j=1,2...,p 1 is a reference trajectory for e output vector which may be redefined at each instant t, also Q is a non-negative definite matrix and R is a symmetric matrix. This performance criterion is used in many predictive controllers. To cope wi control increments instead of e control input, e composite equation may be written as: Where (30) (31) (32) (33) 2328
(34), (35) The solution minimizing e performance index may en be obtained by solving: (36) From which direct computations may be obtained: Alough (36) gives e complete control sequence minimizing j over e prediction horizon, only e first row values are actually applied to e system as e control signal. 5- Simulation Results of Predictive control in e Single Link Flexible Joint Robot wi e use of Feedback Linearization The proposed Robot has e following dynamics: (37) (38) where x is e link of Robot, z is e momentum across e joint of Robot and u is e momentum of Robot. considering u as input and x as output e nonlinear dynamics of Robot will be: (39) writing em in e standard form of: (40) 2329
We have: (41) using z=t(x) e system can be easily changed to companion form: (42) so (43) where (44) Considering we have: (45) finally e companion state dynamics will be linearized as follows: (46) Wi 2330
,, (47) now using Z.O.H. meod wi e sampling time equal to 1 we can obtain:,, (48) And using state feedback in e form of, (49) The linear system will be stabled. If For e mentioned stable discrete system we can easily use predictive control strategy. The following diagram is made in simulink and e tracking results will be later presented. (50) Fig. 4: System output and reference signal considering prediction and control horizon 45 and 44 respectively wi e sampling time equal to 1 e tracking result using feedback linearization for K=(1.0296, 2.6146,3.0148, 2.1139) will be as follows 2331
Fig. 5: System output and reference signal Fig. 6: Control signal Clearly e system could track e setpoints wi more satisfactory performance comparing wi at of MLP. Based upon e above simulations, e following table is presented and we can conclude at Feedback Linearization algorim provides a better performance. 2332
Table 1: Comparison between MLP and Feedback Linearization Meod Mean square error Over shoot percentage Settling time MLP 0.176 %14 22 Feedback Linearization 0.0164 %0.06 4 It can be concluded from e table at e mean square error, overshoot percentage and e settling time have been significantly decreased in Feedback Linearization comparing wi MLP resulting from e fact at in Feedback Linearization an analytical optimization is used however a numerical optimization is used in MLP. Conclusions: A neural network based predictive control strategy was applied to a single link flexible joint Robot. Using e neural predictive controller, e output of e plant tracked e desired set points. A neural network model for e plant was constructed. Once having such a model, i-step ahead predictions were obtained and a quadratic form cost function was utilized to compute e prediction error and to derive e optimal predictive control strategy. The performance of e proposed control strategy was compared wi at of Feedback Linearization strategy when dealing wi e tracking problem, simulation results showed at e latter strategy performs much better an e former one in case of mean square error, e percent overshoot and e settling time. ACKNOWLEDGMENTS This work was implemented in Process Laboratory in K.N. Toosi University of Technology. REFERENCES Arahal, M.R., M. Berenguel and E.F. Camacho, 1998. Neural identification applied to predictive control of a solar plant, Con. Eng. Prac, 6(3): 333-344. Camacho, E.F., 1998. Model predictive control, Springer Verlag. Draeger, A., S. Engel and H. Ranke, 1995. Model predictive control using neural networks, IEEE Control System Magazine, 15: 61-66. Garcia, C.E., D.M. Prett and M. Morari, 1989. Model predictive control: eory and practice- a survey, Automatica, 25(3): 335-348. Gomm, J.B., J.T. Evans and D. Williams, 1997. Development and performance of a neural network predictive controller. Control Engineering Practice, 5(1): 49-60. Hunt, K.J., D. Sbarbaro, R. Zbikowski, P.J. Gawrop, 1992. Neural networks for control system A survey. Automatica, 28: 1083-1112. Montague, G.A., M.J. Willis, M.T. Tham, A.J. Morris, 1991. Artificial neural network based control. International Conference on Control, pp: 266-271. Nelles, O., 2001. Nonlinear system identification: from classical approach to neuro-fuzzy identification, Springer Verlag. Narendra, K.S. and K. Parasaray, 1990. Identification and control of dynamic systems using neural networks. IEEE Transactions on Neural Networks, 1: 4-27. Lennox, B. and G. Montague, 2001. Neural network control of a gasoline engine wi rapid sampling, In Nonlinear predictive control eory and practice, Kouvaritakis, B, Cannon, M (Eds.), IEE Control Series, pp: 245-255. Ljung, L., 1992. (System Identification :Theory For The User,)Prentice Hall. Petrovic, I., Z. Rac and N. Peric, 2001. Neural network based predictive control of electrical drives wi elastic transmission and backlash, Proc. EPE2001, Graz, Austria. Takahashi, Y., 1993. Adaptive predictive control of nonlinear time varying system using neural network, in Proc. IEEE International Symposium on Neural Networks, pp: 1464-1468. Tan, Y. and A. Cauwenberghe, 1996. Non-linear one step ahead control using neural networks: control strategy and stability design, Automatica, 32(12): 1701-1706. Temeng, H., P. Schenelle and T. McAvoy, 195. Model predictive control of an industrial packed bed reactor using neural networks, J. Proc. Control, 5(1): 19-28. Zamarrano, J.M., P. Vega, 1999. Neural predictive control. Application to a highly nonlinear system, Engineering Application of Artificial Intelligence, 12(2): 149-158. 2333