ROTARY INVERTED PENDULUM AND CONTROL OF ROTARY INVERTED PENDULUM BY ARTIFICIAL NEURAL NETWORK

Similar documents
Application of Neural Networks for Control of Inverted Pendulum

Neural Network Control of an Inverted Pendulum on a Cart

M2A2 Problem Sheet 3 - Hamiltonian Mechanics

Identification and Control of Nonlinear Systems using Soft Computing Techniques

Design and Comparison of Different Controllers to Stabilize a Rotary Inverted Pendulum

ANN Control of Non-Linear and Unstable System and its Implementation on Inverted Pendulum

AP Physics 1 Dynamics Free Response Problems ANS KEY

Rotary Inverted Pendulum

ORDER THEORY OF ALLOY β CuZn

SPECIFIC HEAT AT CONSTANT VOLUME FOR CRYOCRYSTALS OF NITROGEN TYPE

Matlab-Based Tools for Analysis and Control of Inverted Pendula Systems

Lab 6a: Pole Placement for the Inverted Pendulum

SRV02-Series Rotary Experiment # 7. Rotary Inverted Pendulum. Student Handout

Modelling, identification and simulation of the inverted pendulum PS600

Stability of backpropagation learning rule

Review: control, feedback, etc. Today s topic: state-space models of systems; linearization

Nonlinear Controller Design of the Inverted Pendulum System based on Extended State Observer Limin Du, Fucheng Cao

14.4 Energy in Simple Harmonic Motion 14.5 Pendulum Motion.notebook January 25, 2018

GAIN SCHEDULING CONTROL WITH MULTI-LOOP PID FOR 2- DOF ARM ROBOT TRAJECTORY CONTROL

EE Homework 3 Due Date: 03 / 30 / Spring 2015

In the presence of viscous damping, a more generalized form of the Lagrange s equation of motion can be written as

Chapter 2 PARAMETRIC OSCILLATOR

System simulation using Matlab, state plane plots

REVISING MECHANICS (LIVE) 30 JUNE 2015 Exam Questions

Essential Physics I. Lecture 9:

ADAPTIVE NEURAL NETWORK CONTROL OF MECHATRONICS OBJECTS

Identification of two-mass system parameters using neural networks

Oscillations. Phys101 Lectures 28, 29. Key points: Simple Harmonic Motion (SHM) SHM Related to Uniform Circular Motion The Simple Pendulum

Gain Scheduling Control with Multi-loop PID for 2-DOF Arm Robot Trajectory Control

International Journal of Advanced Research in Computer Science and Software Engineering

= M. L 2. T 3. = = cm 3

Non-Linear Response of Test Mass to External Forces and Arbitrary Motion of Suspension Point

Dynamic equilibrium: object moves with constant velocity in a straight line. = 0, a x = i

Using Neural Networks for Identification and Control of Systems

Daba Meshesha Gusu and O.Chandra Sekhara Reddy 1

4 A mass-spring oscillating system undergoes SHM with a period T. What is the period of the system if the amplitude is doubled?

Modeling, Identification and Control of Cart-Pole System

Fuzzy modeling and control of rotary inverted pendulum system using LQR technique

PHYSICS 221, FALL 2011 EXAM #2 SOLUTIONS WEDNESDAY, NOVEMBER 2, 2011

7 Pendulum. Part II: More complicated situations

1. Replace the given system of forces acting on a body as shown in figure 1 by a single force and couple acting at the point A.

FIRST YEAR MATHS FOR PHYSICS STUDENTS NORMAL MODES AND WAVES. Hilary Term Prof. G.G.Ross. Question Sheet 1: Normal Modes

ROBUST CONTROL OF A FLEXIBLE MANIPULATOR ARM: A BENCHMARK PROBLEM. Stig Moberg Jonas Öhr

A Novel Activity Detection Method

CHAPTER 7: OSCILLATORY MOTION REQUIRES A SET OF CONDITIONS

Physics 106a, Caltech 4 December, Lecture 18: Examples on Rigid Body Dynamics. Rotating rectangle. Heavy symmetric top

Dynamics ( 동역학 ) Ch.3 Kinetic of Particles (3.1)

Chapter 5. Force and Motion I

Newton s 3 Laws of Motion

1 Introduction. 2 Process description

Physics 23 Notes Chapter 6 Part Two

Modelling and Control of DWR 1.0 A Two Wheeled Mobile Robot

AP Pd 3 Rotational Dynamics.notebook. May 08, 2014

STRUCTURED NEURAL NETWORK FOR NONLINEAR DYNAMIC SYSTEMS MODELING

Instructions: (62 points) Answer the following questions. SHOW ALL OF YOUR WORK. A B = A x B x + A y B y + A z B z = ( 1) + ( 1) ( 4) = 5

Chapter 4. Forces and Newton s Laws of Motion. continued

Balancing and Control of a Freely-Swinging Pendulum Using a Model-Free Reinforcement Learning Algorithm

FUZZY SWING-UP AND STABILIZATION OF REAL INVERTED PENDULUM USING SINGLE RULEBASE

Classical Mechanics. FIG. 1. Figure for (a), (b) and (c). FIG. 2. Figure for (d) and (e).

P321(b), Assignement 1

Vector Mechanics: Statics

FUZZY-PID ALGORITHM CONTROL FOR HELI2DOF ABSTRACT

Energy present in a variety of forms. Energy can be transformed form one form to another Energy is conserved (isolated system) ENERGY

Different Modelling and Controlling Technique For Stabilization Of Inverted Pendulam

Rotational Kinetic Energy

Physics 101 Discussion Week 12 Explanation (2011)

Methods for Supervised Learning of Tasks

CONTROL OF ROBOT CAMERA SYSTEM WITH ACTUATOR S DYNAMICS TO TRACK MOVING OBJECT

MODELING OF A HOT AIR DRYING PROCESS BY USING ARTIFICIAL NEURAL NETWORK METHOD

MCE 366 System Dynamics, Spring Problem Set 2. Solutions to Set 2

Artificial Neural Network

Artificial Neural Network : Training

AP Physics. Harmonic Motion. Multiple Choice. Test E

Physics 2211 A & B Quiz #4 Solutions Fall 2016

FUZZY LOGIC CONTROL Vs. CONVENTIONAL PID CONTROL OF AN INVERTED PENDULUM ROBOT

VTU-NPTEL-NMEICT Project

Neural network modelling of reinforced concrete beam shear capacity

On the convergence speed of artificial neural networks in the solving of linear systems

Physics 2211 M Quiz #2 Solutions Summer 2017

Harmonic Oscillator. Mass-Spring Oscillator Resonance The Pendulum. Physics 109 Experiment Number 12

Examples Newton's Laws and Friction

Section 1 Changes in Motion. Chapter 4. Preview. Objectives Force Force Diagrams

is conserved, calculating E both at θ = 0 and θ = π/2 we find that this happens for a value ω = ω given by: 2g

Swinging-Up and Stabilization Control Based on Natural Frequency for Pendulum Systems

Neural Network Identification of Non Linear Systems Using State Space Techniques.

Robust Controller Design for Speed Control of an Indirect Field Oriented Induction Machine Drive

MEM04: Rotary Inverted Pendulum

Work and energy. 15 m. c. Find the work done by the normal force exerted by the incline on the crate.

STEP Support Programme. Mechanics STEP Questions

ENERGY BASED CONTROL OF A CLASS OF UNDERACTUATED. Mark W. Spong. Coordinated Science Laboratory, University of Illinois, 1308 West Main Street,

ECLT 5810 Classification Neural Networks. Reference: Data Mining: Concepts and Techniques By J. Hand, M. Kamber, and J. Pei, Morgan Kaufmann

Modelling of Ball and Plate System Based on First Principle Model and Optimal Control

Estimation of the Pre-Consolidation Pressure in Soils Using ANN method

NEURAL NETWORK ADAPTIVE SEMI-EMPIRICAL MODELS FOR AIRCRAFT CONTROLLED MOTION

Lab 5a: Pole Placement for the Inverted Pendulum

Oscillations. PHYS 101 Previous Exam Problems CHAPTER. Simple harmonic motion Mass-spring system Energy in SHM Pendulums

Newton s Laws Pre-Test

Grade 11/12 Math Circles Conics & Applications The Mathematics of Orbits Dr. Shahla Aliakbari November 18, 2015

Inter-Ing 2005 INTERDISCIPLINARITY IN ENGINEERING SCIENTIFIC CONFERENCE WITH INTERNATIONAL PARTICIPATION, TG. MUREŞ ROMÂNIA, NOVEMBER 2005.

Chapter 15 Periodic Motion

Transcription:

Proc. Natl. Conf. Theor. Phys. 37 (2012, pp. 243-249 ROTARY INVERTED PENDULUM AND CONTROL OF ROTARY INVERTED PENDULUM BY ARTIFICIAL NEURAL NETWORK NGUYEN DUC QUYEN (1, NGO VAN THUYEN (1 (1 University of Technical Education, 1 Vo Van Ngan Street, Thu Duc District, Ho Chi Minh City NGUYEN QUANG HOC (2 (2 Hanoi National University of Education, 136 Xuan Thuy Street, Cau Giay District, Hanoi and NGUYEN DUC HIEN (3 (3 Tay Nguyen University, 456 Le Duan Street, Buon Me Thuot City Abstract. Inverted pendulum is an unstable and highly nonlinear system. It is used as a common model for engineering applications in linear and nonlinear control. This paper presents the physical structure, the dynamic model of rotary inverted pendulum system and the method of identifying, controlling this system by an artificial neural network (ANN. This network is a mathematical model based on the structure and the function of a biological neural network. This is a state-ofthe-art method of controlling which has many advantages such as the control of nonlinear object, the ability of learning and accumulating experiences and the ability of adjusting to any change of parameters in the system. I. INTRODUCTION The inverted pendulum is a pendulum with its centre of gravity over its axis of rotation. The normal pendulum has its centre of gravity under its axis of rotation and therefore, it is in stable state when it directs downwards. The inverted pendulum is in unstable state because its centre of gravity is over its axis of rotation. A raised problem is how it is necessary to control the inverted pendulum so that it can keep its equilibrium state when it directs upwards. The study of mathematical model, dynamic model and algorithms in controlling the inverted pendulum plays very important role in controlling rockets and spacecrafts and in maintaining the equilibrium state for two legs robots, skyscraping buildings, etc. At present, there are many algorithms in controlling systems of pendulum such as: PID control, slide control, fuzzy logic control and artificial neural network (ANN control. Controllers based on their actions around a point will be unsuccessful if any change happens. An advantage of the ANN controller is that there is any change in action process of system, the ANN can adjust itself to this change and maintain its control. Other controllers cannot do that. This paper studies the mathematical model and the dynamic model of rotary inverted pendulum and applies the algorithm of ANN control in the form of feed-forward in order to identify the system and then carry out the control of a rotary inverted pendulum by the ANN on the Matlab and the DSP TMS320 F2812.

244 II. MATHEMATICAL MODEL FOR SYSTEM OF ROTARY INVERTED PENDULUM Figure 1. Calculation model for system of a rotary inverted pendulum The system of a rotary inverted pendulum shown in Figure 1 consists of a pendulum attached to a horizontal bar. The pendulum has the mass m and the length 2L and can rotate freely. It sets up the angle α for vertical direction. The horizontal bar has the length r and is used to move in inverse and forward directions with the angle θ. Supposing that the gravity of pendulum is at point B. Point B carries out a rotational motion compared with point A and the rotational velocity of point B has the following components { ẋab = L α cos α, (1 ẏ AB = L α sin α. Besides, the pendulum still rotates around point O with the velocity r θ. Therefore, the velocity of point B compared with fixed point O can be described by the equation as follows { ẋb = r θ L α cos α, (2 ẏ B = L α sin α. Differentiate two sides of (2, we obtain { ẍb = r θ + L α 2 sin α L α cos α, ÿ B = L α 2 (3 cos α L α sin α. This is the result of applying the Newton s Second Law in direction x and in direction y. Figure 2 describes forces acting on the arm and the pendulum. From that, mẍ B = F x mr θ + ml α 2 sin α ml α cos α = A x, (4 mÿ B = F y ml α 2 cos α ml α sin α + mg = A y. (5 Applying the Euler equation to the rotational motion of pendulum around point B, we obtain

245 J B α = M B 1 12 m (2L2 α = A x L cos α+a y L sin α 1 3 ml2 α = A x L cos α+a y L sin α. (6 The equation for the rotational motion of arm around point O has the form J O θ = MO J eq θ = TL B eq θ Ax r. (7 Figure 2. Forces acting on arm and pendulum Substituting (4 and (5 into (6, we have 1 ( 3 ml2 α = mr θ + ml α sin α ml α cos α L cos α+(mg ml α cos α ml α sin α L sin α mlr θ cos α + 4 3 ml2 α mgl sin α = 0. (8 Substituting (4 into (7, we obtain J eq θ = TL B eq θ (mr θ + ml α 2 sin α ml α cos α r where ( J eq + mr 2 θ mlr α cos α + mlr α 2 sin α = T L B eq θ, (9 V m K E θ T L = T m J m θ = µm K M I m J m θ = µm K M J m θ. (10 R m Substituting (9 into (10, we have ( ( Jeq + mr 2 + J m θ mlr α cos α + mlr α 2 K E V m sin α + B eq + µ m K M θ = µ m K M. R m R m (11 The system of equations describing the nonlinear kinetic characteristics of system has the form θ = 1 (b α cos α b α 2 sin α e a θ + fv m, α = 1 ( d sin α + b θ cos α, (12 c where the parameters a, b, c, d, e and f have the form a = J eq + mr 2 + J m, b = mlr, c = 4mL 2 /3, d = mdl, e = B eq + µ m K M K E /R m, f = µ m K M /R m (13

246 For small α, sin α α, cos α 1, the linearization of (12 leads to the system of equations as follows θ = 1 a (b α e θ + fv m, α = 1 ( dα + b θ. (14 c The mathematical model obtained in the system of equations (12 is used to build the model of inverted pendulum on the Simulink of Matlab in next sections. III. IDENTIFYING AND CONTROLLING ROTARY INVERTED PENDULUM SYSTEM BY ARTIFICIAL NEURAL NETWORK The artificial neural network (ANN is trained to identify the system of pendulum of 1 input and 2 outputs. Supervised learning uses the input and output data to train the network and the training data is derived from the model of pendulum system with the PID controller of two variables. The input is the signal of voltage and the output is the deflection angles α and θ of the pendulum. The trained ANN model is tested qualitatively by calculating the MSE (mean square error. The MSE is a good measure in order to determine the accuracy of model. The smaller the MSE between the identifying ANN and the model of pendulum is, the better the accuracy is. The ANN has the ability to model the pendulum. The MSE is small and the ANN model can foresee the deflection angle of pendulum. The results in Table 1 show that the more increases the number of neurons in hidden layer, the smaller the MSE between the identifying ANN and the model of pendulum is. The quality of the model of network identifying is tested more by putting a source of random perturbation in the system with the amplitude 0.01. The result of response shows that the ANN adjusts itself to this change and identifies well with rather small error as described in Figure 4. Figure 3. Identifying model of pendulum system by ANN

247 Figure 4. Result of identifying angle α by ANN and model of system with noise Table 1. Result of identifying when number of neurons changes Form of neural Number of neurons Number of train- Speed of Error (MSE network in hidden ing time learning layer FF 4 500 0.0001 2.5509.10 12 FF 10 500 0.0001 1.0448.10 12 FF 20 500 0.0001 9.325.10 13 FF 40 500 0.0001 6.7929.10 13 When the mass of pendulum is changed from 0.125 to 1 kg, the ANN controller adjusts itself to these changes so that the pendulum is in stable state as shown in Figure 5. Figure 5. Dependence of angle α on m IV. RESULTS OF EXPERIMENT The system of inverted pendulum is controlled by the ANN on the DSP TMS320F2812 with the sketch of control in Figure 6 and the system of experiment in Figure 7. The programme of control is written in the Matlab. The trained ANN controller keeps stable pendulum in vertical position and in upward direction. Figure 8 describes the response of pendulum angle in applying the ANN controller. When the pendulum moves to the position corresponding to L = 32 cm, the ANN controller adjusts well itself to this change and the result is shown in Figure 9. Results

248 Figure 6. System of controlling rotary inverted pendulum by ANN Figure 7. System of experiment of simulation show that the identification of system the multilayer ANN gives good result of identifying with small error as presented in Table 1. The ANN controller controls successfully the pendulum system. When the parameters of system change, the ANN controller adjusts well itself to these changes and that is described in Figure 5. The ANN controller controls stably the system of inverted pendulum with small deflection angle and that is shown in Figure 8. When changes the arm (L of pendulum, the ANN controller gives good response and that is illuminated in Figure 8 and in Figure 9. V. CONCLUSION This paper presented the physical structure and the dynamic model of rotary inverted pendulum and the method of identifying the system of rotary inverted pendulum by the multilayer ANN. The ANN controller is used to control stably this system. Obtained results of control algorithm can be applied to real physical systems with high nonlinearity and especially physical systems having the centre of gravity on the axis of rotation such as rockets, the spacecrafts, skyscraping buildings, etc. Obtained results of identifying nonlinear system can be applied to complex physical systems and objects mathematical model of that cannot be built exactly. Then, the application of identifying method by ANN is a very good method.

249 Figure 8. Angle α with neural network when m = 0.25 kg (L = 16 cm Figure 9. Angle α with neural network when m = 0.25 kg (L = 32 cm REFERENCES [1] T.Callinan, Master Thesis, Dublin City University (2003 [2] M.A. Khanesar, Sliding Mode Control of Rotary Inverted Pendulum, Iran (2007 [3] A.Guez and J.Selinsky, Journal of robotic systems 5, 4(1988 363 [4] K.J.Hunt, D. Sbarbaro, R. Zbikowski and P.J. Gawthrop, Automatica 28(1992 1083 [5] Neural Network Toolbox Users Guide, The Mathworks Inc (1998 [6] D.T.Pham and X. Liu, Neural Networks for Identification, Prediction and Control, Springer (1999.