scieee AI-readable full text Open interactive document viewer

Designing of proportional sliding mode controller for linear one stage inverted pendulum

Banrejee, Anirban

Abstract

The control of Inverted Pendulum (IP) is a hugely complex task. A great deal of nonlinearity is present inherently and as well as affected by the surrounding external conditions. The sliding mode controller (SMC) is very robust inherently. It is used in this paper to control the IP. This paper examines the designing of sliding mode controller (SMC) for a linear inverted pendulum (IP). The paper highlights the important features of the sliding mode and also throws ample lights on the designing guidelines. The paper puts special impetus on the mathematical modeling of the controller. The robustness of the design of SMC with proportional control is amply displayed with the help of simple mathematics. It gives rise to a controller which can control a highly nonlinear system like IP quite efficiently. The performance of the SMC is compared with fuzzy and PID controller. The edge this controller poses is the key aspect of this paper. External disturbances and internal inaccuracies are also introduced to the system to bring out the robustness of the controller to the fore. Background on sliding mode and the pendulum are provided. Simulation results are displayed in a vivid manner and explained suitably.

Full text

POWER ENGINEERING AND ELECTRICAL ENGINEERING VOLUME: 9 | NUMBER: 2 | 2011 | JUNE © 2011 ADVANCES IN ELECTRICAL AND ELECTRONIC ENGINEERING 84 DESIGNING OF PROPORTIONAL SLIDING MODE CONTROLLER FOR LINEAR ONE STAGE INVERTED PENDULUM Anirban BANREJEE1, M J NIGAM1 1Department of Electronics and Computer Engineering, Indian Institute of Technology Roorkee, 422, Park Rd, Roorkee Cantonment, 247 667, India [email protected], [email protected] Abstract. The control of Inverted Pendulum (IP) is a hugely complex task. A great deal of nonlinearity is present inherently and as well as affected by the surrounding external conditions. The sliding mode controller (SMC) is very robust inherently. It is used in this paper to control the IP. This paper examines the designing of sliding mode controller (SMC) for a linear inverted pendulum (IP). The paper highlights the important features of the sliding mode and also throws ample lights on the designing guidelines. The paper puts special impetus on the mathematical modeling of the controller. The robustness of the design of SMC with proportional control is amply displayed with the help of simple mathematics. It gives rise to a controller which can control a highly nonlinear system like IP quite efficiently. The performance of the SMC is compared with fuzzy and PID controller. The edge this controller poses is the key aspect of this paper. External disturbances and internal inaccuracies are also introduced to the system to bring out the robustness of the controller to the fore. Background on sliding mode and the pendulum are provided. Simulation results are displayed in a vivid manner and explained suitably. Keywords Sliding mode, inverted pendulum, sliding surface, PID controller, fuzzy controller. 1. Introduction In the field of control engineering, Inverted pendulums (IP) are one of the most commonly studied and at the same time IP represents one of the most difficult system to control. Various types of IP are available now days and they are namely linear, rotational, single joint or multi joint. In this paper for the case study and establish the method of designing we have considered a linear single joint inverted pendulum as seen in Fig. 1. A pole, hinged to a cart which moves on a track whose length is limited and balanced upward by a horizontal force applied to the cart via a motor. The cart is simultaneously motioned to an objective position on the track. Here the tricky part is, the control action has to be limited as, and the motor that has been used also has a saturation effect. The scope of this paper is to introduce a new Sliding Mode technique for an inverted pendulum and balancing the pole upwards, while minimizing the swing-up time. Many types of controllers have been tried on the pendulum such as: genetic Algorithm, fuzzy logic, and neural networks. Our work is totally based on the physical parameter’s that are available for the model of the linear inverted pendulum developed in [l]. An inverted pendulum system being a static unstable system has become a highly researched topic in control field for the similarity in various complex situations like control of helicopter, launching of space shuttle, operation of satellite and the stability of robot. Sliding mode control (SMC) is a typical nonlinear control which generated a huge interest since the publication of the pioneering paper with significant results and suitable. SMC systems demonstrate great control performance and have no relationship with the plant parameters and disturbances. Also it has some advantages such as quick response, insensitive to parameters variation and disturbance .The plants are not needed to be identified online. The main objective is the angle stabilization of the pendulum under the uncertainties. The system becomes less sensitive to parameter variation and external disturbances by implementation of a suitable sliding mode controller. Inverted pendulum because of it’s highly nonlinear characteristics, system imprecision may come from actual uncertainty about the plant (e.g., unknown plant parameters), or from the purposeful choice of a simplified representation of the system’s dynamics where order of the system is reduced for simplification. The resulting modeling inaccuracies have strong adverse effects on nonlinear control systems. In this paper we demonstrate the approach to deal with model uncertainty by implementing robust controller like sliding mode controller. It is seen that by incorporating a proportional gain, settling time for the system can be POWER ENGINEERING AND ELECTRICAL ENGINEERING VOLUME: 9 | NUMBER: 2 | 2011 | JUNE © 2011 ADVANCES IN ELECTRICAL AND ELECTRONIC ENGINEERING 85 reduced to a great extent. A comparative study is also presented. The proportional sliding mode controller (PSMC) design systematically reduces the problem of maintaining stability and consistent performance on the face of modeling imprecision. The objective of the paper is to design a switched control along with a suitably designed proportional gain that will drive the plant state to the switching surface and maintain it on the surface upon interception. Lyapunov stability criterion is used to clearly bring out the issue of the stability which is ensured in much faster time than some other controller. In this paper we considered an uncertain-dynamical system in interfered condition. The is designed based on proportional mode which is incorporated with the sliding surface to achieve a better dynamics. The proposed control scheme performance is compared with the PID and FUZZY design methodology, to show the effectiveness of the control design. Fig. 1: Pendulum configuration. 2. System Model [1] Figure 2 shows an inverted pendulum. The aim is to balance the bob of the pendulum to the upward desired equilibrium position without the pendulum falling. The base is driven by a DC motor, which is controlled by a controller (analog SMC in our implementation). The base x position and the pendulum angle θ are measured and supplied to the control system. A disturbance force can be applied on top of the pendulum. Fig. 2: Inverted pendulum. A mathematical model of the system has been developed, The Free Body Diagram of the system as shown in Fig. 3 is used to obtain the equations of motion. Since there is no motion in vertical direction, thus the sum of the forces acting on the cart in the horizontal direction will give us the equation of the motion Fig. 3: Free body diagram. uNxbxM    . (1) The moment on the pendulum will create a force which will act in the horizontal direction and is given by:   IrF  , (2) hence,     ml l ml r ml u 22 . (3) The horizontal component of this force acting in the direction of N is    cos  ml . Similarly the centripetal force acting on the pendulum is given by: 2 222     ml l ml r I uc . (4) The component of this force acting in the direction of N is    sin 2  ml . Therefore from the free body diagram the sum total of forces that are acting in the direction of N is given by    sincos 2   mlmlxmN  . (5) Substituting N in (1) gives us the first equation of motion which is given by:   umlmlxbxmM   sincos 2   . (6) Now the forces acting perpendicular to the pendulum are summed up and then equating all the vertical component we get        cossincossin xmmlmgNP    . (7) POWER ENGINEERING AND ELECTRICAL ENGINEERING VOLUME: 9 | NUMBER: 2 | 2011 | JUNE © 2011 ADVANCES IN ELECTRICAL AND ELECTRONIC ENGINEERING 86 The sum of the moments around the centre of the pendulum is given by:     INlPl  cossin . (8) Eliminating P and N From (7) and (8). The dynamic equation is given by:      cossin 2xmlmglmlI   . (9) Hence the sets of state dynamic equation for the linear 1 stage Inverted Pendulum are given by:    umlmlxbxmM   sincos 2   . (10)      cossin 2xmlmglmlI   . (11) Putting the value of x  from (10) into (11) we get:        2222 222 cos cossincossin mlIlm mlulmmgl         . (12) Considering the friction b = 0. 3. Back Ground of Sliding Mode Sliding mode is a nonlinear control strategy which is a special form of Variable structure system. Unlike other nonlinear control like state feedback law etc it’s not a continuous control law but a discontinuous one [2]. A control system can be described as:  tuxfx ,, RtRuRx nn  ,, The switching function is given by v = cx1 + x2 and the line v = 0 is the surface on which the control u has the discontinuity as seen in Fig. 4. The discontinuous control may be considered as: 0< 0> , , v v u u u      . Fig. 4: Sliding mode control. It is seen clearly that the state reaches the switching line in finite time. The state crosses the v=0 line resulting in the value of u being altered from u+ and u- . The system parameter and C will decide whether the trajectory will continue in the other side of v< 0 or not. There can be the other situations where trajectory will recross the switching line for sliding motion to occur when following conditions are met. 0vLt  and 0>v  Lt  0v  0v Let a Single input nonlinear system be defined as x(n) = f(x,t) + b(x,t)u(t), where x(t) is the state vector , u(t) is the control input and n is the order of differentiation. Though f(x,t) and b(x,t) are nonlinear in general but are bounded in the sense that their bounds are known [4]. A surface which varies with time is defined in state space and equated to zero, is given by   0 ~ , 1         tx dt d txS n  . Here δ being positive considered as Bandwidth (BW) of the system and    txtxtx d  ~ is the error. 4. Sliding Surface Design As we have seen the dynamic equations are established for the system, the states are xx  , and   ,. Lets define:  12 1 xxx xx     12 1       The state equation obtained from (12) is given by:        2222 2222 2 2 22 2 cos cos cos sincossin mlIlm Fml mlIlm lmmgl            . (13) Let, error des e   Let, the switching line or the sliding line is characterized by: e dt d s      1  . (14)                       x x x x x x s x x s desdesdes des des               1 2 2 2 1 . (15) POWER ENGINEERING AND ELECTRICAL ENGINEERING VOLUME: 9 | NUMBER: 2 | 2011 | JUNE © 2011 ADVANCES IN ELECTRICAL AND ELECTRONIC ENGINEERING 87 Since θdes is constant, therefore   1 s. The equation cane written in the form FuDS  , where   u and   1 F. Hence,        2222 2 2 22 cos sincossin mlIlm lmmgl uD       . (16)         222 2222 sintan cos cos     lgmmgl mlIlm uD     . (17) Therefore,     2222 cos cos mlIlm D     . (18) Let the control action be   ssignuU  0 . Hence,   FssignuDs   0 . (19) Now for the existence of the sliding mode   0>  uD  and     DCu  0, where 0>C. Then,       2222 0cos cos mlIlm C DCu      . (20) Since,    max 2222 1cos cos          mlIlm C    , C   1,    C  1. Hence,      C 1. Therefore,   ssignDCsignu   . (21)                                des CC sign mlIlm Csignu          2222 cos cos . (22) For the rotary inverted pendulum similar approaches are already been taken [3]. But this paper specifically deals with linear inverted pendulum whose system equation are totally different. Moreover the system taken is totally nonlinear and doesn’t disregard any dynamics of the system. Since the control is satisfying the existence of the sliding surface so the states will reach the sliding surface in finite time and will slide to origin along the switching line as derived. It is seen that though the performance of the controller was quite robust. At this point the paper proposes to improve the system performance by incorporating a suitable proportional gain in the. Proportional sliding mode control (PSMC) achieves the best of both that is the system not only becomes robust but also settles down at very short time compared to other controllers. 5. Simulation The plant is designed using Simulink. Then sliding mode controller is designed and incorporated to it. Following are the Plant and controller parameter:  mass of carriage, M = 0,5 kg,  mass of the pendulum, m = 0,1 kg,  inertia, I = 0,005 kg.m2,  length of the pendulum, l = 0,23 m,  acceleration due to Gravity, g = 9,8 m/sec2,  frictional coefficient, b = 0. At first a PID controller and a Fuzzy controller were connected to the plant and output was observed. Then to the same plant the conventional sliding mode controller was connected, whose output and phase plot are shown in the Fig. 5 and Fig. 6. Fig. 5: Output curve for SMC implementation. Fig. 6: Phase-plot for SMC implementation. PID and fuzzy, both controllers were able to stabilize the system but settling time is quite high for PID and as well as Fuzzy implementation. To address these two areas SMC was designed. The comparison of the POWER ENGINEERING AND ELECTRICAL ENGINEERING VOLUME: 9 | NUMBER: 2 | 2011 | JUNE © 2011 ADVANCES IN ELECTRICAL AND ELECTRONIC ENGINEERING 88 simulation results of PID, Fuzzy and SMC is shown in Fig. 7. Fig. 7: Output comparison of PID, fuzzy and SMC implementation. Fig. 8: Output comparison of PSMC and SMC implementation. Fig. 9: Output comparison of PSMC implementation with and without disturbance. Figure 8 and Fig. 9 demonstrate the fact that PSMC brings the stability to the plant in much shorter time than conventional SMC and at the same time highlights the robustness of the controller where in spite of introducing a considerable amount of disturbance, still could manage to stabilize the system within the almost the same settling time as it did when it’s not subjected to any disturbances. The immunity from the disturbances, parameter inaccuracy and modeling inaccuracy that PSMC inherently carries with it gives it a tremendous edge from the other controllers as seen in Fig. 10. Fig. 10: Output of PID, fuzzy and PSMC implementation. 6. Conclusion From the simulation analysis it clearly evident that Sliding mode controller is far more robust on the face of uncertainty than any other controller. By introducing a proportional gain we could retain the essential property of robustness and at the same time could enhance the system performance by reducing the settling time considerably. However further analysis and work can be directed upon reducing the chattering which inherently comes along with the sliding mode .The chattering may cause problem if the frequency of the chattering get matched with any un-modeled high frequency component. The future scope of work lies in reduction of chattering without disturbing the basic nature of the controller as such. References [1] KHALIL, S. Inverted pendulum analysis, design and implementation, Institute of the industrial Electronics Engineering. Karachi, Pakistan. [2] GIBSON J., et al. Nonlinear automatic control. 1st ed. McgrawGill book company, pp. 439 – 466. ISBN 978-0070232006. [3] GROSSIMON, P. G.; BARBIERI, E.; DRAKUNOV, S. Sliding mode control for rotational inverted pendulum. Electrical Engineering Department. Tulane University New Orleans, LA 70118. [4] WANG, W. Adaptive fuzzy sliding mode control for inverted pendulum. In: proceedings of the Second Symposium International Computer Science And Computational Echnology Huangshan, p. R. China. 26-28 December 2009, pp. 231-234. ISBN 978-9525726-07-7. [5] TECHNOLOGY. Inverted Pendulum Experimental Manual. 2nd ed. July 2006. [6] XING-GANG, Y.; SPURGEON, S. K.; EDWARDS, E. Sliding mode control for time-varying delayed systems based on a reduced-order observer. Automatica. August 2010, vol. 46, no. 8, pp. 1354-1362. ISSN 0005-1098. About Authors Anirban BANERJEE is a defence officer currently undergoing MTech program at Indian Institute of Technology, Roorkee, India. His field of interest is fuzzy POWER ENGINEERING AND ELECTRICAL ENGINEERING VOLUME: 9 | NUMBER: 2 | 2011 | JUNE © 2011 ADVANCES IN ELECTRICAL AND ELECTRONIC ENGINEERING 89 systems, non linear system stability analysis, optimal control, intelligent system, Automatic control systems and design of non linear controllers. M J NIGAM joined the faculty of University of Roorkee (Now IIT - Roorkee), Roorkee, India in the Department of Electronics and Computer Engineering. His main research interests for the thrust areas of Electronics and Computer Engineering are Guidance & Controls in Navigational Systems including high resolution real time intelligent Kalman State Estimator as well as Regulation, Tracking and Guidance for peace time work and industry also. High-resolution intelligent vision systems, smart/brilliant/Intelligent weapons like ICBM, & real time adaptive filtering, smoothing and prediction are some of his allied topics of interest in the field of Guidance and Control.