Abstract
This study focuses on the design of controllers for inverted cart-pendulum system. This cart-pendulum system, a nonlinear one, has been linearized around the equilibrium point to obtain linearized model transfer function. In this paper, the design of two-loop proportional integral derivative (PID) controller that gives more flexibility to control the inverted cart-pendulum system has been considered and the controller parameters have been optimized through modified genetic algorithm (GA). Furthermore, other methods such as LQR and LQG have been applied to verify closed loop response of the system for unit step signal. A performance comparison between the above mentioned techniques is investigated and the analysis shows superiority of two-loop PID controller in terms of both overshoot and settling time as compared to other mentioned methods. A comprehensive analysis of robustness to model uncertainties will be incorporated in the future work.
The first author would like to thank AICTE, Govt. of India for the financial support.
Access provided by CONRICYT-eBooks. Download conference paper PDF
Similar content being viewed by others
Keywords
1 Introduction
Inverted cart-pendulum is an example of inherently nonlinear, unstable, multivariable and non-minimum phase system. It has always been a challenging task for the engineers to develop a proper control strategy to control this system. Many researchers have proposed different control techniques which include use of classical methods to modern methods, such as artificial neural network (ANN), fuzzy logic, genetic algorithm (GA), and swarm intelligence. [1–4]. In last few decades, the use of these modern methods has gained immense popularity in different field of research because of the ability to provide satisfactory and accurate result [5, 6].
The aim of this paper is to design a two-loop PID controller for cart-pendulum system so that it moves the cart to a desired position and pendulum stabilizes in an upright equilibrium position [7, 8]. In this paper, modified genetic algorithm has been applied to optimize the controller parameters.
This paper is organized in eight sections. Section 1 gives the introduction of the paper. In Sect. 2 brief overview, specifications, free body diagram, mathematical model and state space representation of cart-pendulum system is provided. Sections 3 and 4 deals with dominant pole calculation and the structure of plant with two-loop PID controller. In Sect. 5, optimization of objective function through modified GA has been provided. Section 6 is about the simulation diagram and response of the system with two-loop PID, LQR and LQG control. Performance comparison between different methods and conclusion are provided in Sects. 7 and 8 respectively.
2 Cart-Pendulum System
The schematic diagram of cart-pendulum system considered in this paper is provided in Fig. 1.
The system consists of an inverted pendulum mounted on a motorized cart. In this paper, a two dimensional problem is considered where the pendulum is allowed to move in the vertical plane with the presence of the control force ‘F’. This force works as the input to this system and it moves the cart horizontally. The outputs of the systems are the horizontal position of the cart ‘x’ and the angular position of the pendulum ‘\( \theta \)’.
The parameters of the cart pendulum system [9] are taken as follows:
M—mass of the cart (2.4 kg), m—mass of the pendulum (0.23 kg), b—coefficient of cart friction (0.055 Ns/m), L—length of the pendulum (0.4 m), J—moment of inertia of pendulum (0.099 kg m2), g—gravitational constant (9.81 m/s2), F—applied force to cart \( \pm \)24 N, x—position of the cart from reference (\( \pm \)0.3 m), \( \theta \)—angle of pendulum with respect to vertical (\( \le \)0.1 rad).
By applying the laws of dynamics on cart-pendulum system, the equations of motions [9] are obtained as:
where
Linearizing Eqs. (1) and (2) for a small angle \( \theta \) from the vertical equilibrium point and by neglecting friction coefficient b which is very small, the state space model is obtained as:
where \( x,\dot{x},\theta ,\dot{\theta } \) are the states and y is the output vector. A DC motor is used to convert control voltage U to force F and represented by a single block with gain taken as unity, i.e., U = F. For U = F, from this state space representation, the transfer function can be derived as [9]:
3 Dominant Pole Calculation
The design specifications for this study have been taken as
According to these specifications, dominant poles have been found to be at \( s_{1,2} = - 1.33335 \pm 1.65845i. \)
4 Cart-Pendulum System with Two-Loop PID Controller
The cart-pendulum system with two-loop PID Controller is shown in the following Fig. 2
The characteristics equation for the system given in Fig. 2 becomes
And the PID controllers are represented by
After substituting s = −1.33335 + j1.65845 in Eq. (6) and separating the real (R) and imaginary (I) part, R and I will be
where kp1, ki1 and kd1 denote the coefficient for the proportional, integral and derivative terms, respectively, for Controller 1 (C1) and kp2, ki2 and kd2 denote the same for Controller 2 (C2).
The objective function ‘f’ considered for obtaining the value of kp1, ki1, kd1, kp2, ki2 and kd2 has the following format:
5 Objective Function Optimization Using Modified GA
In this paper, we have proposed modified genetic algorithm (GA) where best solution in each iteration does not take part in the process of crossover and mutation, rather its cloned one is used for that purpose. In the next stage, best solution along with off springs created is taken into consideration. It could be useful for optimizing those multimodal functions where there are number of maxima and minima having close value, due to which there is a chance of the solution to be trapped in local optima while solving directly through normal GA. The specifications taken for writing MATLAB code are as follows:
Population size, bit size, crossover probability, mutation probability and number of iteration are taken as 100, 10, 0.8, 0.125 and 25, respectively.
The objective function considered over here has six unknowns, i.e., \( k_{p1} ,k_{i1} ,k_{d1} ,k_{p2} ,k_{i2} \,{\text{and}}\,k_{d2} \). The range of these parameters taken for writing the code is: \( 3 \le k_{p1} \le 5, 0 \le k_{i1} \le 0.002, 2 \le k_{d1} \le 4, 220 \le k_{p2} \le 222, 120 \le k_{i2} \le 122\,{\text{and}}\,59 \le k_{d2} \le 61 \), respectively, and it has been decided after a number of trial runs.
After optimizing the objective function through modified GA one obtains the values of \( k_{p1} ,k_{i1} ,k_{d1} ,k_{p2} ,k_{i2} {\text{and }}k_{d2} \) as 4.5213, 0.0012, 2.5712, 220.3164, 120.9867 and 60.7956, respectively.
It should be noted that the objective function value for these set of parametric values is not exactly zero as expected because of approximate linearization of nonlinear system around the equilibrium point.
6 Simulation Diagram and Result
6.1 With Two-Loop PID Controller
The simulation diagram for the cart-pendulum system with two-loop PID is shown in Fig. 3.
Unit step signal has been taken as reference signal for this study and the closed loop simulation is carried out for 100 s. The output response in terms of position and angle is shown in Fig. 4.
6.2 With LQR Control
For LQR design,
The gain matrix ‘k’ has been identified by optimizing the cost function
where Q is the semi positive definite, R is the positive definite and N is the state reference gain matrix and all the notations are conventional.
The state feedback gain matrix ‘k’ required for LQR control is given by
The simulation diagram for the cart-pendulum system with LQR control is shown in Fig. 5.
The output response of LQR control in terms of position and angle is shown in Fig. 6.
6.3 With LQG Control
For LQG design
The cost function that to be minimized in LQG control is given by
The simulation diagram for the cart-pendulum system with LQG control is shown in Fig. 7.
The matrix L required for LQG control is mathematically represented as
The output response of LQG control in terms of position and angle is shown in Fig. 8.
In this study, pre-compensation technique has been used for both LQR and LQG and it has been shown as a gain block after the reference step input. The value of the gain is taken as −1 and has been confirmed from MATLAB code written for the LQR and LQG control of cart-pendulum system.
7 Performance Comparisons Between Two-Loop, LQR and LQG Control
The performance of different control techniques is provided in the Table 1 which clearly indicates the superiority of two-loop PID controller as compared to LQR and LQG control.
8 Conclusion
In this study, two-loop PID, LQR and LQG controllers have been designed for the cart-pendulum system and the performance of these controllers has been compared. It has been found that two-loop PID controller along with modified GA provides better response than LQR and LQG controller in terms of both overshoot and settling time. For improving time domain response and robustness, this particular approach of using two-loop PID along with proposed modified GA can be extended to the other class of MIMO plants. A comprehensive analysis of robustness to model uncertainties for inverted cart-pendulum system will be incorporated in the future work.
References
Chaturvedi, D.K., Qamar, T., Malik, O.P.: Quantum inspired GA based neural control of inverted pendulum. Int. J. Comput. Appl. 122(23), 46–52 (2015)
Malik, S., Mishra, S.K.: Optimal design of a fuzzy PID controller for inverted pendulum system. In: International Conference on Communication, Computing and Power Technologies, 22–23, April. Chennai, India. Springer (2015)
Moghaddas, M., Dastranj, M. R., Changizi. N., Khoori, N.: Design of optimal PID controller for inverted pendulum using genetic algorithm. Int. J. Innov. Manag. Technol. 3(4), 440–442 (2012)
Jain, N., Gupta, R., Parmar, G.: Intelligent controlling of an inverted pendulum using PSO-PID controller. Int. J. Eng. Res. Technol. 2(12), 3712–3716 (2013)
Mishra, S.K., Panda, G., Majhi, R.: A comparative performance assessment of a set of multiobjective algorithms for constrained portfolio assets selection. Swarm Evol. Comput. Elsevier 16, 38–51 (2014)
Gaurav, K., Sahoo, A., Mishra, S.K.: Nonlinear system identification using functional link multilayer perceptron artificial neural network. Int. J. Appl. Eng. Res. 10(44), 31542–31546 (2015). ISSN 0973-4562
Ogata, K.: Modern Control Engineering, 4th edn. Pearson Education (Singapore) Pvt. Ltd., New Delhi, Chapter 12 (2005)
Mandal, A.K.: Introduction to Control Engineering. New Age International Pub., New Delhi, Chapter 13, (2000)
Ghosh, A., Krishnan, T.R., Subudhi, B.: Robust proportional-integral-derivative compensation of an inverted cart-pendulum system: an experimental study. IET Control Theory Appl. 6(8), 1145–1152 (2012)
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2017 Springer Science+Business Media Singapore
About this paper
Cite this paper
Sain, D., Swain, S.K., Mishra, S.K. (2017). Design of Two-Loop PID Controller for Inverted Cart-Pendulum System Using Modified Genetic Algorithm. In: Sahana, S.K., Saha, S.K. (eds) Advances in Computational Intelligence. ICCI 2015. Advances in Intelligent Systems and Computing, vol 509. Springer, Singapore. https://doi.org/10.1007/978-981-10-2525-9_11
Download citation
DOI: https://doi.org/10.1007/978-981-10-2525-9_11
Published:
Publisher Name: Springer, Singapore
Print ISBN: 978-981-10-2524-2
Online ISBN: 978-981-10-2525-9
eBook Packages: EngineeringEngineering (R0)