International Journal of Advance Electrical and Electronics Engineering (IJAEEE)
_______________________________________________________________________________________________
Stability Analysis of Inverted Cart Pendulum Using PID and H∞
Controller
1Channabasayya I. S., 2Ushakiran B Mathpati
1Assistant Professor, (Department of EEE), AGMRCET,Varur
2Assistant Professor, (Department of EEE), KLS‟s VDRIT, Haliyal Email: 1[email protected], 2[email protected] Abstract— As stability analysis and stabilization of
pendulum is a benchmark problem in control systems, here in this first we design a proportional-integral-derivative controller to obtain the discrete states from the ICP with linear quadratic regulator to define the stability of the system. Furthermore by developing H∞ controller improved stability conditions are obtained. In practice, state variables are not always available for direct measurement, so state estimation, as a strategy through available measurements to estimate the states of a dynamic system, is important for investigating and controlling a system.
A proportional-integral-derivative controller (PID controller) is a generic control loop feedback mechanism (controller) widely used in industrial control systems. A PID controller calculates an "error" value as the difference between a measured process variable and a desired set point. The controller attempts to minimize the error by adjusting the process control inputs.
H∞ methods are used in control theory to synthesize controllers achieving stabilization with guaranteed performance. To use H∞ methods, a control designer expresses the control problem as a mathematical optimization problem and then finds the controller to solve.
I. INTRODUCTION
A pendulum is a rod object that is hinged on one end of its length and is free to rotate about the hinge. Often one encounters pendulums in clocks, where a rod hangs and swings from a joint at the top of the rod. If the pendulum were inverted, the hinge would be located on the bottom of the rod. If the rod length made a perfect right angle with the horizontal axis of the earth, the rod would remain vertical. As soon as the rod angle changes, the rod would immediately rotate back to the non-inverted configuration. However, if the hinge would move to prevent the pendulum from falling when the angle changed, the pendulum angle could be maintained at about 90 degrees from the horizontal axis.
Remember when you were a child and you tried to balance a broom-stick on your index finger or the palm of your
hand? You had to constantly adjust the position of your hand to keep the object upright. An INVERTED PENDULUM does basically the same thing. However, it is limited in that it only moves in one dimension, while your hand could move up, down, sideways, etc.
Fig.1. Diagram of cart pendulum with applied force.
The inverted pendulum is a system that has a cart which is programmed to balance a pendulum as shown by a basic block diagram in Figure 1.1 This system is adherently instable since even the slightest disturbance would cause the pendulum to start falling. Thus some sort of control is necessary to maintain a balanced pendulum. An ideal controller would keep the pendulum balanced with very little change in the angle, θ, or cart displacement, q.
obviously limitations would be imposed based on the actual parameters of the system as well as the method for implementing a controller. Thus designing a controller that is close to ideal is a challenging design problem [1][3][6]
II. METHODOLOGY
It is virtually impossible to balance a pendulum in the inverted position without applying some external force to the system. The Carriage Balanced Inverted Pendulum (CBIP) system, shown below, allows this control force to be applied to the pendulum carriage. The aim of the study is to stabilize the pendulum such that the position of the carriage on the track is controlled quickly and accurately The problem involves a cart, able to move backwards and forwards, and a pendulum, hinged to the cart at the bottom
plane as the cart, shown below. That is, the pendulum mounted on the cart is free to fall along the cart's axis of motion. The system is to be controlled so that the pendulum remains balanced and upright, and is resistant to a step disturbance. So briefly, the Inverted Pendulum system is made up of a cart and a pendulum. The goal of the controller is to move the cart to its commanded position without causing the pendulum to tip over. In open loop this system is unstable. The task assigned is: to analyze, design & develop a control loop for the given inverted pendulum (with PID and H∞ controller).[2] [5]
Fig.2: Mathematical model of the pendulum A. Inverted pendulum system equations
The Free Body Diagram of the system is used to obtain the equations of motion. Below are the two Free Body Diagrams of the system. Summing the forces in the Free Body Diagram of the cart in the horizontal direction, you get the following equation of motion:
Fig. 3: Free body diagram for cart and pendulum (1)
(2)
(3)
Component of this force in the direction of N is The component of the centripetal force acting along the horizontal axis is as follows:
(5)
(6) (7)
To get rid of the P and N terms in the equation above, sum the moments around the centroid of the pendulum to get the following equation:
(8) Combining these last two equations, you get the second
dynamic equation:
(9) The set of equations completely defining the dynamics of the inverted pendulum are:
(10) (11) These two equations are non-linear and need to be linearized for the operating range. Since the pendulum is being stabilized at an unstable equilibrium position, which is „Pi‟ radians from the stable equilibrium position, this set of equations should be linearized about theta = Pi.
Assume that theta = Pi+ø, (where ø represents a small angle from the vertical upward direction). Therefore, cos (theta) = -1, sin (theta) = -ø, and (d(theta)/dt)^2 = 0.
After linearization the two equations of motion become (where u represents the input):
(12) (13)
To obtain the transfer function of the linearized system equations analytically, we must first take the Laplace transform of the system equations. The Laplace transforms are:
(14) (15) When finding the transfer function, initial conditions are assumed to be zero. The transfer function relates the variation from desired position [Output] to the force on the cart [Input].
Since we will be looking at the angle Phi as the output of interest, solve the first equation for X(s),
(16)
(17) Re-arranging, the transfer function is:
(18) Where ,
From the transfer function above it can be seen that there is both a pole and a zero at the origin. These can be canceled and the transfer function becomes:
(19)
The transfer function can thus be simplified as:
(20) Where,
If we neglect the friction in the system, that is, we take the coefficient of friction b=0, then
(21)
Where,
Thus, the LINEARIZED APPROXIMATION TRANSFER FUNCTION for the IP has been obtained.
In time domain, the transfer function can be stated a
(22)
Thus the above cited are the system of equations which will formulate the system defining inverted pendulum and its transfer functions.
B. State Space Representation of the system
= +
(23)
(24)
(25)
(26) Where ,
III. SIMULATION PARAMETERS
Considering the response of the pendulum to a 1-Nsec impulse applied to the cart, the design requirements for the pendulum are:
Settling time for Ө of less than 5 seconds
Pendulum angle Ө never more than 0.05 radians from
the vertical.
Additionally, the requirements for the response of the system to a 0.2-meter step command in cart position are:
Settling time for x and Ө of less than 5 seconds.
Rise time for x of less than 0.5 seconds
Pendulum angle Ө never more than 20 degrees (0.35 radians) from the vertical.
IV. SIMULATION RESULTS
Open-loop impulse response:
Open-loop step response:
Fig.4:Simulink model combining PID and LQR
Fig.5 Pendulum visualization of stable system
Fig6. Response of cart position under stable condition
Fig7. Response of pendulum Variation under stable condition
Fig. 8Output response for the stable system
Fig.9 Pendulum visualization of unstable system
Fig10. Response of cart position under unstable condition
Fig11. Response of pendulum nariation under unstable condition
Fig. 12Output response for unstable system H-INFINTIY RESULTS:
Fig14. Variation of typical transfer function matrices for controller
Fig15. Plot singular values of closed loop system under unstable state
Fig16. Desired stability response
Fig.17 Unstable response for the system
V. CONCLUSION
Defining the plant and its transfer functions the open loop responses were obtained and was unstable then by designing pid controller we obtained the stability for unstable system by root locus plots which determined to be stable for cart position only not for the pendulum angle or the system determined to be stable only for pendulum angle not for cart position, so this design with root locus would not be feasible to implement any physical systems.
In further part we designed Linear Quadratic Regulator controller and setting up the tuning values with PID controller the system analysis became feasible and thus the stable parameters were obtained (Analysis also included for unstable system). Linearizing the simulink model for stable system the response were obtained. Thus the performances for both stable and unstable system are obtained. In the later part we designed a H∞ controller to stabilize the unstable system Thus obtaining the results and analyzing the performance of H∞ controller.
REFERENCES
[1] "Stability Analysis for High Frequency Networked Control Systems" by Hongjiu Yang, Yuanqing Xia, Peng Shi, Senior Member, IEEE, Mengyin Fu.
[2] “Output Feedback Stabilization of Networked Control Systems With Random Delays Modeled by Markov Chains “ by Yang Shi, Member, IEEE, and Bo Yu, Student Member, IEEE.
[3] “Filtering for Discrete-Time Networked Nonlinear Systems With Mixed Random Delays and Packet
Dropouts” by Rongni Yang, Peng Shi, Senior Member, IEEE, and Guo-Ping Liu, Fellow, IEEE.
[4] “Robust H∞ Filtering for a Class of Nonlinear Networked Systems With Multiple Stochastic Communication Delays and Packet Dropouts” by Hongli Dong, Zidong Wang, Senior Member, IEEE, and Huijun Gao, Member, IEEE
[5] “Design and Control of an Inverted Pendulum” by Andrew Hovingh and Matt Roon ,Western Michigan University Department of Aeronautical and Mechanical Engineering.
[6] “Inverted pendulum analysis design and implementation” IEEE visionaries.
[7] “Control of a Dual Inverted Pendulum System Using Linear-Quadratic and H-Infinity Methods”
by Lara C. Phillips,B.S., University of Missouri – Rolla.
[8] “Fault Detection for T–S Fuzzy Discrete Systems in Finite –Frequency Domain”-By Hongjiu Yang, Yuanqing Xia, and Bo Liu.
[9] “Design and Implementation of Intelligent PID Controller Based on FPGA” by Liguo Qu, Yourui Huang, Liuyi Ling.
[10] “H-infinity output-feedback control: application to unmanned aerial vehicle” by Jyotirmay Gadewadikar.