International Research Journal of Alied and Basic Sciences 016 Available online at www.irjabs.com ISSN 51-838X / Vol, 10 (6): 679-684 Science Exlorer Publications Design of NARMA L- Control of Nonlinear Inverted Pendulum Mehdi Ramezani, Mahmood Mohseni Motlagh * Deartment of Electrical Engineering, University of Tafresh, Tafresh, Iran. *Corresonding Author email: s_mahmood_mohseni@yahoo.com ABSTRACT: An inverted endulum is a endulum which has its center of mass above its ivot oint. It is usually alied with the ivot oint mounted on a cart that can move horizontally and may be called a cart and ole. The inverted endulum roblem is one of the classic and commonly used roblem in the control engineering field. In this aer a nonlinear technique based on NARMA L neuro-controller is alied to control a nonlinear inverted endulum. Inverted endulum is oscillated from its unaffected osition and stabilized at the desired osition. The resented NARMA L controller is first trained to eliminate both the nonlinearity and dynamic of the inverted endulum. Then, it is used as a controller. Thie roosed method is successfully alied to control the inverted endulum. Matlab is used to simulate and analysis the erformance of the control schemes. The simulation results shows the advantage of the roosed NARMA L method. Keywords: Inverted endulum, Nonlinear system, Narma L controller, Neural network INTRODUCTION The single inverted endulum is a classical roblem in the field of control engineering (H. Kwakernaak and R. Sivan, 197). Generally, an inverted endulum consists of a cart and a endulum jointed to it as shown in figure 1. By imlementing a force to the cart, for examle through a built-in electrical motor, and thus moving it backwards and forwards will make the endulum to swing. Although, dynamic modeling of inverted endulum yields a highly non-linear roblem. The main urose of the controller in here is to erform the right amount of force which will stabilize the endulum in the uright osition. This rocess can either be alied with the endulum being held uright or through an uswing manouevre. One technique to find a roer control law is to linearize the system equations around the equilibrium oint. But the linearized model does not characterize the real system for larger deviations this is not a roer technique for a comlete uswing and stabilization control. However, an indeendent second controller can be designed which erforms the uswing movement and then hands over to the linear controller. A direct way for swinging the endulum to the desired osition is to consider the energy stored in the system and comaring it with the value which corresonds to the maximum height (Karl Johan, and Furuta. 000). This energy control technique yields a switching control law, similar to the design of a sliding mode control (Banrejee and M. J. Nigam, 011). Generally, to overcome the linearity issues, the control technique is designed as it does not only eliminate the nonlinearity, but also the dynamics of the system. The closed loo system becomes an algebraic relation between the outut and control effort. The osition reference can be utilized as reference directly. In such a way, we need only the osition reference and the system still erfectly tracks a smooth trajectory. This technique extends higher comlexity into the state feedback controller but simlify everything else. Here, the controller is designed based on discrete-time neural network model in order to decrease an effort to model the nonlinearity and to form the controller (Srakaew et al., 010). Discrete time neural network is trained offline by using the data airs from the oeration of the system and afterwards formed as controller. The concet of NARMA L controller is based on the illustrated technique and is a roer candidate for controlling a nonlinear system.
Intl. Res. J. Al. Basic. Sci. Vol., 10 (6), 679-684, 016 In this aer, the NARMA L is designed to control the nonlinear endulum lant. NARMA L is based on neural network and is trained based on the inut-outut data airs, the nonlinearity and the dynamics of the system is simle and efficient modeled in a single activity. Modeling of Inverted Pendulum For modeling the inverted endulum system, a horizontal movement electrical car comosed by the single inverted endulum can be considered (Komine et al., 010; Diao and Ma, 006; Driver and Thore, 004). Figure1. Inverted endulum. The main urose of controlling the inverted endulum is to make it fix in the uright osition when it commences with some nonzero angle off the vertical osition in order to external interference. Force balance on the system in the x-direction can be written as below: m c F N (1) By considering the Newton s second law for the inverted endulum in both (horizontal and vertical) directions, We have: d () N m ( l sin( )) dt m P m d dt m g m ( l cos( ) l sin( )( ) d dt g m ( l cos( )) l( sin( ) cos( )( ) The center of mass for endulum is balanced in the moments as below: I Pl sin( ) Nl cos( ) (3) By substituting Eq. () into Eq. (1): F ( m m ) m l cos( ) m l sin( )( ) (4) c Substituting Eq. () and (3) into Eq.4 results: ( I m l ) m gl sin( ) m l cos( ) (5) For simlifying eq. (5), we have: ) ) 680
Intl. Res. J. Al. Basic. Sci. Vol., 10 (6), 679-684, 016 M m m (6) c I m l L m l Relationshi between voltage and force in the motor cart can be illustrated as below: K K K K (7) m g m g F V Rr Rr By eliminating from Eq.(5), from Eq. (6), and by relacing M,L and the equation for the force results: m l cos ( ) K K K K (8) m g m g ( M ) V L Rr Rr mlg cos( ) sin( ) m l sin( )( ) L m l cos ( ) m l( ) (9) ( L ) g sin( ) cos( ) sin( ) M M cos( ) K m K ( M Rr g m K K V Rr g ) Narma L Neurocontroller NARMA is a discrete-time which illustrates the nonlinear dynamical system in neighborhood of the equilibrium state. Generally, an identical NN model of the system which needs to be controlled has to be realized. Subsequently, a develoed NN model can be then used to train the controller. NARMA L- is a technique to simly a readjustment for the lant model in an off-line training mode with batch rocess. NARMA L- needs the least comutation rather than the other neural architectures because the only comutation is forward ass through the neural network controller. For an n order nonlinear SISO system with a relative degree d,the comanion form of NARMA can be describes as (Middleton and Goodwin, 1988): y(k d) F[(y(k), y(k 1),..., y(k n 1)),u(k),...,u(k m 1)] (10) Here u (k) R is the control effort sequence, y (k) R is the outut sequence and F : R n R and F C. To train NN for identification art, the nonlinear function N is aroximated. When the system outut followed the reference trajectory y (k + d) = y r (k + d), nonlinear controller can be develoed by using the equation below: u(k) G[(y(k), y(k 1),..., y(k n 1), y (k d )u(k 1),...,u(k m 1)] (11) r Because of some reasons like: dynamic back roagation training and creation of a function G for minimizing the mean square error Imlementation, the NARMA L- Controller is a little slow. Since, the solution can be aroximated as below: y (k d) f [(y(k), y(k 1),..., y(k n 1)), u(k),..., u(k m 1)] (1) g[(y(k), y(k 1),..., y(k n 1)), u(k),..., u(k m 1)] The achieved model is now in comanion form (Hagan et al., 00), where the next controller inut u (k) is not confined inside the nonlinearity. This form of control inut makes the outut to follow the reference, i.e. y (k + d) = yr (k + d). The obtained controller can be illustrated as: y r (k d) f[y(k), y(k 1),..., y(k n 1),u(k 1),...,u(k n 1)] (13) u (k) g[y(k), y(k 1),..., y(k n 1),u(k 1),...,u(k n 1)] By utilizing the illustrated equation, we can achieve the realization of roblems, as the control inut u (k) has to be nominated in order to the outut y (k), at the same time. Therefore, the develoed model can be used instead of the revious model as below: y (k d) f [(y(k), y(k 1),..., y(k n 1)),u(k),..., u(k n 1)] (14) g[(y(k), y(k 1),..., y(k n 1)),u(k),..., u(k m 1)].u(k 1) Here, d. Figure shows the structure of the NN reresentation for NARMA L-. 681
Intl. Res. J. Al. Basic. Sci. Vol., 10 (6), 679-684, 016 Figure. structure of the NN reresentation for NARMA L- NARMA L- Controller Design Nowadays neural networks are introduced as a widely used technique for identification of nonlinear systems. NARMA L- has essentially two main stes: The first ste is to identify of the system which includes develoing an aroximate NN model of the NLDS. The second ste is to achieve NN model of the system to train the controller. The model of a NARMA L- for controlling the considered nonlinear system is shown in Figure.3. Figure 3. NARMA L- Controlled nonlinear inverted endulum model An adequate number as training samles (10000) were generated with the above secification. The number of eochs for the mean squared error (MSE) for minimizing was set to 1000; the training algorithm used for the nonlinear inverted endulum was Levenberg- Marquandt (trainlm) technique. SIMULATION RESULTS In this aer, for model simulation, analysis, and control of nonlinear inverted endulumcart dynamical system, Matlab/Simulink models are develoed. Here, we rovide some exerimental results from imlementing the Narma L controller illusrated above to the inverted endulum. Figure 4 shows the initial osition, angle and inut signal of the cart is in the centre of the beam 68
Intl. Res. J. Al. Basic. Sci. Vol., 10 (6), 679-684, 016 Figure 4. Initial state of angle θ, cart osition x, and control force u for the inverted endulum system The object is to achieve the following constraints: the inut is constrained via u(t) 0.5 and the cart osition is constrained via (t) 0.7. To achieve the desired urose, Narma L- is emloyed. As it can be seen in the figs. 5 and 6, both the DC motor inut and the cart osition hit their resective constraints. Figure 5. Narma L- based inverted Pendulum Resonse for angle θ and control force u 683
Intl. Res. J. Al. Basic. Sci. Vol., 10 (6), 679-684, 016 Figure 6. Narma L- based inverted Pendulum Resonse for angle θ and osition x CONCLUSION In this aer the alication of NARMA L controller on the inverted endulum is discussed. NARMA L- controller I here is a discrete-time controller which contains the internal feedback of ast control effort and outut, designed to omit both of the nonlinearity and the dynamic behavior of the nonlinear inverted endulum system. NARMA L- can transform the considered nonlinear system into an imlicit algebraic model easily and efficient control of the trajectory. Exerimental results show that the roosed NARMA L controller can control the nonlinear inverted endulum to follow the smooth desired trajectory. REFERENCES A. Banrejee and M. J. Nigam, Designing of roortional sliding mode controller for linear one stage inverted endulum, POWER ENGINEERING AND ELECTRICAL ENGINEERING, vol. 9,. 84-89, June 011. Åström, Karl Johan, and Katsuhisa Furuta. "Swinging u a endulum by energy control." Automatica 36. (000): 87-95. H. Kwakernaak and R. Sivan, Linear Otimal Control Systems. Wiley-Interscience, 197. J. Driver and D. Thore. (004). Design, Built and Control of a Single/Double Rotational Inverted Pendulum. School of Mechanical Engineering. The University of Adelaide. Komine, Iwase, Suzuki, Furuta. (000). Rotational Control of Double Pendulum, Graduate School of Systems Engineering. Tokyo Denki University Hatoyama-cho, Hiki-gun, Saitama, Jaan. M.T.Hagan, H.B.Demuth, O.D.Jesus An Introduction to the Use of Neural Networks in Control System International Journal of Robust and Nonlinear Control, John Wiley&Sons, Vol.1,No.11,.959-985,00. R. H. Middleton and G. C. Goodwin. Adative comuted torque control for rigid link maniulations, Systems and Control Letters, vol. 10,. 9-16, 1988. Srakaew K, Sangverahunsiri V, Chantranuwathana S, Chancharoen R. Design of NARMA-L neurocontroller for nonlinear dynamical system. In9th International Conference on Modeling, Identification, and ontrol, Innsbruck, Austria 010 Feb 15 (. 10-15). X. Diao and O. Ma. (006). Rotary Inverted Pendulum, Deartment of Mechanical Engineering, New Mexico State University. 684