Stabilization of Inverted Pendulum (IP) Using Two Fuzzylogic Controllers (FLC’s) Having Nine Linguistic Variables

DOI : 10.17577/IJERTV2IS90261

Download Full-Text PDF Cite this Publication

Text Only Version

Stabilization of Inverted Pendulum (IP) Using Two Fuzzylogic Controllers (FLC’s) Having Nine Linguistic Variables

Stabilization of Inverted Pendulum (IP) Using Two Fuzzylogic Controllers (FLCs) Having Nine Linguistic Variables

Ashwani Kharola *1, Punit Gupta *2

*Department of Mechanical Engineering, Graphic Era University, Dehradun, India.

ABATRACT- This paper presents a Modelling and Simulation study of a control strategy for an Inverted Pendulum system. Inverted Pendulum is well known as a testing bed for various controllers. For independent control of Cart and Pendulum two FLCs have been defined separately using nine linguistic variables. Modelling and Simulation has been done in Matlab and Simulink respectively. In addition to Step-responses and Pulse- responses, an Open-loop and Closed-loop response using PID controllers are also shown. The proposed fuzzy control scheme successfully fulfils the control objectives and also has an excellent stabilizing ability to overcome the external impact acting on the pendulum system.

KEYWORDS- Inverted Pendulum, Fuzzy logic Controller, Unit-Step response, Pulse- response.

the major concerns in industry machineries. In conventional control theory, most of control problems are usually solved by mathematical tools based on system models. But in true sense, there are many complex systems whose accurate mathematical models are not available or difficult to formulate. As an alternative to conventional control approach, the fuzzy control techniques can provide a good solution for these problems by introducing linguistic information

[2]. The control of inverted pendulum is fundamentally same as those involved in rocket or missile propulsion, walking robot, flying objects in space etc [3]. Figure 1.0 shows a view of inverted pendulum [3].

  1. INTRODUCTION

    The inverted pendulum is a classical problem in control system [1]. It is a system that is inherently unstable. The pendulum is mounted onto a non-stationary cart in the vertical position or at equilibrium position. The pendulum is unstable and free to fall over if there are any disturbances. On the other hand, if the pendulum is too thin and the cart is move by a force, it can flex and cause vibrations. These vibrations are one of the

    (1)

    Figure 1.0 view of Inverted Pendulum An Inverted Pendulum has two

    equilibrium points: vertical upright equilibrium point and downward equilibrium point [4]. When the pendulum is standing at vertical upright position and the resultant of forces acting from all sides is

    zero it is said to be in vertical upright equilibrium point. The vertical upright equilibrium point is inherently unstable, as any small disturbance may cause the pendulum to fall on the either side when the cart is at rest. When there is no external force acting on pendulum it will come into rest in downward position. This equilibrium position is stable.

  2. MATHEMATICAL MODELLING OF INVERTED PENDULUM

    The system consists of a pole with mass, m , hinged by an angle from vertical axis on a cart with mass, M, which is free to move in the x direction as shown in figure 1.1[2] . A force, F is required to push the cart horizontally, the friction coefficient of cart b, the length between axle centre and the centre of pendulum L, the inertia of pendulum I [6].

    Figure 1.1 Diagram of Inverted Pendulum

    For simulation the dynamic equations of the actual inverted pendulum system are derived as follows consider figure 1.2[2,7].

    Figure 1.2 FBD of Cart & Pendulum

    By Newtons Equation: For Cart:

    Where, N and P are the interaction forces between the cart and pendulum.

    For Pendulum:

    It is necessary, however, to include the interaction forces N and P between the cart and the pendulum in order to model the dynamics. The inclusion of these forces requires modelling the x and y dynamics of the pendulum in addition to its theta dynamics. Therefore, the additional x and y equations for the pendulum are modelled as given by the equations below:

    However xp and Yp are exact functions of theta. Therefore, their derivatives are

    represented in terms of the derivatives of theta

    (2)

    After substituting these equations into eq. 7 and 9, we get:

    Using the above nonlinear equations, a Matlab Simulink model has been developed [8]. This Simulink model is used in this work for stabilizing the upright position of the pendulum and to move the cart at desired position.

  3. DESIGN OF FUZZY LOGIC CONTROLLER FOR INVERTED PENDULUM SYSTEM

In order to implement four inputs to the controller, the FLC were divided into two parts as can be seen in the figure

1.3[2,4]. The FLC 1 is used for controlling the carts position, where as the FLC 2 controls the pendulums angle. The FLC 1 receives Position (x) and Del Position (x- dot) as the inputs while the FLC 2 receives Angle () and Del Angle (-dot) as the inputs. The output variable of both the FLCs is force.

(3)

Figure1.3 FLC Overview IV.MEMBERSHIP FUNCTIONS:FLCs

According to the complexity of this inverted pendulum system, we have taken nine fuzzy subsets to quantize each fuzzy variable for both FLC as shown in table.

LINGUISTIC TERM

LABEL

Negative Extreme

NE

Negative Big

NB

Negative Medium

NM

Negative Small

NS

Zero

ZE

Positive Small

PS

Positive Medium

PM

Positive Big

PB

Positive Extreme

PE

Table 1.3 Standard labels of quantization.

Figure 1.4 till figure 1.6 show the membership functions of FLCs.

Figure 1.4 input 1 for FLC 1

Figure 1.5 input 2 of FLC 1

Figure 1.6 output of FLC 1

  1. RULE BASE:

    The following rule bases are applied for simulation study to control the Inverted Pendulum.

    Table1.4 Fuzzy Rule Matrix (9×9) :FLC 1

    Table 1.5 Fuzzy Rule Matrix (9×9):FLC 2

    (4)

  2. SURFACE VIEWERS

    Figure 1.7 and Figure 1.8 shows surface viewer for FLC 1 and FLC 2 respectively.

    Figure 1.7 Surface Viewer for

    FLC 1

    Figure 1.8 Surface Viewer for

    FLC 2

  3. SIMULINK MODEL:INVERTED PENDULUM

    1. Simulink model for Step- response of Inverted Pendulum using two FLCs

      Figure 1.9 Simulink model using two

      FLCs

    2. Simulink Sub-System model for Inverted Pendulum

      Figure 2.1 Open-loop pulse response

      (d) Closed-loop response : using PID controller

      Figure 2.2 Closed-loop pulse response

      (5)

    1. Step-Responses

      Figure 2.0 IP: sub-system

      model

      1. Open-loop response for Inverted Pendulum

Figure 2.3 output step response :Position x

Fig 2.4 output step response Del Position x

Figure 2.5 output step response for Angle

Fig 2.6 output step response for del_ angle

  1. Pulse-responses

    Fig 3.0 Output pulse-response Del_angle

  2. Open-loop responses

    Fig3.1 open-loop impulse response Position x

    Figure 3.2 open loop impulse response for angle

    (6)

  3. Closed-loop response

Fig2. Oputut pulse-response Del position

Figure 3.3 closed-loop response for Position implementing PID control

Figure 3.4 closed-loop response for Angle implementing PID control

CONCLUSION

As a conclusion, the objective in stabilizing the inverted pendulum has been achieved by using two block of Fuzzy Logic Controllers[5]. This can be verified through output responses of the system which satisfy the design criteria. The Output Step-response for both the FLCs shows that after 20sec all the transient behaviour stops and the Pendulum is stabilized. The Output Pulse-response for both the FLCs shows that there is no carry over of the previous pulses and the system need not to be re-initialized. As can be seen from the Open-loop response that the Pendulum swings all the way around due to impact, and the cart travels along with a jerky motion due to pendulum. We can infer from the Closed-Loop response that the PID Controller handles the nonlinear system very well because the angle is very small (.04 radians).

REFERENCES

  1. Trihastuti Agustinah, Achmad Jazidie and Mohammad Nuh , Swinging Up and Tracking Controller Design for a Pendulum- Cart System Using Hybrid Fuzzy Control, European Journal of Scientific Research ISSN 1450-216X Vol.62 No.2 , pp. 182- 197,2011

  2. Mohan Akole, Barjeev Tyagi, design of fuzzy logic controller for nonlinear model of inverted pendulum-cart system, XXXII National Systems Conference, NSC 2008,

    December 17-19, 2008

  3. Shubhobrata Rudra and Ranjit Kumar Barai, Robust Adaptive Backstepping Control of Inverted Pendulum on Cart System, International Journal of Control and Automation Vol. 5, No. 1, March, 2012

  4. Valeri Mladenov, Application of Neural Networks for Control of Inverted Pendulum,Wseas Transactions on Circuits and Systems, Issue 2, Volume 10, February 2011

  5. S.N.Deepa, Investigating Stability of a Fuzzy Logic Controller based Inverted Pendulum Model, International Journal of The Computer, the Internet and Management Vol. 18.No.2 (May – August, 2010) pp 55 62

  6. Website http://www.library.cmu.edu

  7. Singh Vivekkumar Radhamohan, Mona Subramaniam a, Dr. M.J.Nigam, fuzzy swing-up and stabilization of real inverted pendulum using single rule base, Journal of Theoretical and Applied Information Technology

  8. Mohit Kumar Srivastava, Analysis of Control of Inverted Pendulum using Adaptive Neuro Fuzzy System, 2009.

Leave a Reply