Chinese Journal of Engineering

Chinese Journal of Engineering / 2013 / Article

Research Article | Open Access

Volume 2013 |Article ID 962401 |

Sunil Kumar Mishra, Dinesh Chandra, "Stabilization of Inverted Cart-Pendulum System Using Controller: A Frequency-Domain Approach", Chinese Journal of Engineering, vol. 2013, Article ID 962401, 7 pages, 2013.

Stabilization of Inverted Cart-Pendulum System Using Controller: A Frequency-Domain Approach

Academic Editor: M. Zingales
Received26 Jun 2013
Accepted27 Aug 2013
Published01 Oct 2013


This paper focuses on the angular stabilization of inverted cart-pendulum system using controller. The tuning of controller is formulated as a nonlinear optimization problem, in which the objective function is composed of five design conditions in frequency domain. Particle swarm optimization technique has been used for optimizing parameters. Also a PID controller has been designed based on same specifications, and a comparative study has been carried out. All the responses have been calculated using FOMCON toolbox of Matlab/Simulink.

1. Introduction

In recent years, Fractional-order PID () controller has become a good generalization of standard PID controller using fractional calculus. Compared to PID controller, the tuning of is more complex and remains a challenging problem. As the PID controller is one of the most commonly used controllers in industries, and in recent years fractional calculus [15] has been used to present the more generalized form of PID controller, that is, controller.

It is well known that inverted cart-pendulum [6] is an example of underactuated, nonminimum phase and highly unstable system. Because of this, it is very difficult to design a controller for a system like inverted pendulum. The design becomes more difficult because of the physical constraints on track length, applied voltage, and the pendulum angle.

Podlubny has proposed a generalization of the PID controller as controller. He also demonstrated that the fractional order PID controller has better response than classical PID controller [1, 7]. Also, many valuable studies have been done for fractional order controllers and their implementations [814]. Tuning of the controller using the frequency-domain approaches is studied in many papers. For example, [15] propose a method based on optimization strategies. Tuning of H∞ controllers for fractional single-input single-output (SISO) system was suggested in [12]. In [16], tuning method for based on Ziegler-Nichols and Astrom-Hagglund tuning rules is presented.

In this study, a controller has been designed for an unstable system (inverted cart-pendulum system) using frequency-domain approach, and particle swarm optimization (PSO) has been used for obtaining the parameters (, , , , ).

This work is organized as follows: Section 2 covers inverted cart-pendulum system, Section 3 covers FOPID controller, Section 4 presents particle swarm optimization, Section 5 presents FOPID controller design, Section 6 presents simulation results, and the conclusion is provided in Section 7.

2. Inverted Cart-Pendulum System

The inverted pendulum system [6] has two degrees of freedom of motions as shown in Figure 1. The first is linear motion of the cart in the -axis and is given by where .

The second is rotation of the pendulum about the - plane and is described by

Now linearising (1) and (2) for small angle of from the equilibrium point and neglecting the friction coefficient (which is very small compared to other parameters), the following equations are obtained: where

Now taking the Laplace Transform of (3) and (4), the following transfer function is obtained: From Table 1 putting all values in (5),

S. no.Inverted cart—pendulum system parameters (in SI units)Values

(1)F—applied force to cart (N) 24
(2)X—position of cart from the reference (m) 0.3
(3) —angle of the pendulum with respect to vertical (rad) 0.1
(4)M—mass of cart (kg)2.4
(5)m—mass of the pendulum (kg)0.23
(6)L—length of the pendulum (m)0.4
(7)J—moment of inertia of pendulum (kg·m2)0.099
(8)b—coefficient of cart friction (Ns/m)0.055
(9)g—acceleration owing to gravity (m/s2)9.81

Now the DC motor used to convert control voltage to force is represented by only a gain block of gain = 15 for simplicity. Then become

3. Controller

The differential equation of the controller is described by [16, 17]

After the introduction of this definition, it is easily seen that classical types of PID controllers such as integral order PID, PI, or PD become special cases of the most general fractional order PID controller. In other words, the controller expands the integer-order PID controller from point to plane, as shown in Figure 2, thereby adding flexibility to controller design and allowing us to control our real world processes more accurately but only at the cost of increased design complexity.

Taking Laplace Transform of (8), the controller expression in -domain is obtained as

4. Particle Swarm Optimization Method

The PSO method [18] is a wide category of swarm intelligence methods for solving the optimization problems. This technique inspired by bird flocks, fish schools, and animal herds constitute representative examples of natural systems where aggregated behaviors are met, producing impressive, collision-free, and synchronized moves. The PSO is population-based stochastic optimization which was developed by Kennedy and Eberhart in 1995. The major advantage of the PSO over other stochastic optimization methods is its simplicity. It is a population-based search algorithm. The basic idea of the PSO is the mathematical modeling and simulation of the solution searching activities in multi-dimension search space where optimal solution exists. In a PSO system, particles fly around in a multi-dimensional search space. During flight, each particle adjusts its position according to its own experience and the experience of the neighboring particles. Update velocity and position of particle are depended upon inertia, cognitive, and social factors. Each particle has a memory, and hence it is capable of remembering the best previous position in the search space ever visited by it. The position corresponding to the best fitness is known as , and the overall best out of all the particles in the population is called . The modified velocity and position of each particle can be calculated using the current velocity and position as follows.

Velocity update equation is given by

Position update equation is given by where = number of iterations, = velocity of particle, = inertia weight factor = iteration number, , = cognitive and social acceleration factors respectively, = random numbers uniformly distributed in the range , = position of particle, and = th particle.

As shown in Figure 3, the PSO algorithm consists of just three steps, which are repeated until some stopping condition is met.(1)Evaluate the fitness value of each particle.(2)Update individual and global best fitness values and positions.(3)Update velocity and position of each particle.

The first two steps are fairly trivial. Fitness evaluation is conducted by supplying the candidate solution to the objective function. Individual and global best fitness values and positions are updated by comparing the newly evaluated fitness values against the previous individual and global best fitness values and replacing the best fitness values and positions as necessary.

5. Controller Design

The concept of frequency domain design of controllers was first proposed at [8]. If is the transfer function of the process, then the objective is to find out a controller , so that the open loop system meets the following design specifications.

5.1. Phase Margin Specification

Consider where is the desired phase margin and is the desired gain crossover frequency.

5.2. Gain Crossover Frequency Specification


5.3. Robustness against System’s Gain Variation


5.4. Complementary Sensitivity Specification

Consider where is the specified magnitude of the complementary sensitivity function or noise attenuation for frequencies for all .

5.5. Sensitivity Specification

Consider where is the specified magnitude of the sensitivity function or load disturbance rejection for frequencies for all . Now five specifications (12)–(16) have been solved using PSO to obtain the controller parameters, and also a conventional PID controller has been designed using the same specifications.

To formulate the objective function (also known as fitness function), (12) and (13) can be combined as From (18), let From (14), (15), and (16), let Now, the objective function which is minimized to satisfy specifications (12)–(16) is given as where , , , , and are the magnitudes of , , , , and , respectively. , , , , and are corresponding weights assigned to , , , , and .

6. Simulation Results

In Figure 4, the block diagram of whole system is given. The angle of the rod is controlled via the controller where the aim is to hold the rod at the upright position. Some parameters for PSO program are given in Table 2.

PSO parametersValues

Number of particles100
Number of iterations100

The values of , , , , and are given in Table 4, and the overall value of objective function is less in case of controller as compared to PID controller. In (23), the values of all weights are considered as .

Here design specifications have been considered as  rad/sec, ,  rad/sec,  rad/sec, and  dB. Using the objective function of (23) and after running the PSO program with parameters given in Table 2, the parameters are given in Table 3, and by taking , PID controller has been designed using the same conditions as used for controller. The PID parameters are given in Table 3. These are the values for particular case and may vary for running the PSO many times, but the results are almost same for all cases.




0.0099−0.00580.00140.0302 0.0473
PID 0.02250.0814−0.09950.2035

The initial angle has been taken as 0.1 rad. The simulation results are shown in Figures 5, 6, and 7 for cart angle, control voltage, and error, respectively, using both and PID controllers. The Bode diagrams of open loop system are given in Figures 8 and 9 for both and PID cases. All results are obtained using FOMCON toolbox of MATLAB/SIMULINK [19]. As it can be noticed in Figures 5 and 7 that cart angle has less deviation around its upright position for controller and settles to upright position slightly faster than PID controller. In Figure 6, controller takes less control effort than PID controller. In Figures 8 and 9, the phase margin condition is almost satisfied for both controller and PID controller.

7. Conclusion

In this work, an attempt has been made to test the effectiveness of controller for a highly unstable system like inverted cart pendulum. Two different controllers ( and PID controllers) using frequency domain approach based on the same specifications have been designed. It is shown in Figures 57 that controller performs better than conventional PID controller. In Bode diagrams as shown in Figures 8 and 9, it is clear that gain margin is better for controller than that for conventional PID controller.

It is also seen that the use of particle swarm optimization technique for calculating controller parameters is very simple and provides good convergence towards optimal values.

In this work, only cart angle has been stabilized at its upright position, but on the other hand, cart position stabilization along with cart angle using controller and real time implementation might be the subject of future work.


  1. I. Podlubny, “Fractional-order systems and PIλDμ controllers,” IEEE Transactions on Automatic Control, vol. 44, no. 1, pp. 208–214, 1999. View at: Publisher Site | Google Scholar
  2. J. Sabatier, S. Poullain, P. Latteux, J. L. Thomas, and A. Oustaloup, “Robust speed control of a low damped electromechanical system based on CRONE control: application to a four mass experimental test bench,” Nonlinear Dynamics, vol. 38, no. 1–4, pp. 383–400, 2004. View at: Publisher Site | Google Scholar
  3. Y. Chen, H.-S. Ahn, and I. Podlubny, “Robust stability check of fractional order linear time invariant systems with interval uncertainties,” Signal Processing, vol. 86, no. 10, pp. 2611–2618, 2006. View at: Publisher Site | Google Scholar
  4. N. Tan, Ö. F. Özgüven, and M. M. Özyetkin, “Robust stability analysis of fractional order interval polynomials,” ISA Transactions, vol. 48, no. 2, pp. 166–172, 2009. View at: Publisher Site | Google Scholar
  5. P. S. V. Nataraj, “Computation of spectral sets for uncertain linear fractional-order systems using interval constraints propagation,” in Proceedings of the 3rd IFAC Workshop on Fractional Differentiation and its Application (FDA '08), Ankara, Turkey, November 2008. View at: Google Scholar
  6. A. Ghosh, T. R. Krishnan, and B. Subudhi, “Robust proportional-integral-derivative compensation of an inverted cart-pendulum system: an experimental study,” IET Control Theory & Applications, vol. 6, no. 8, pp. 1145–1152, 2012. View at: Publisher Site | Google Scholar
  7. I. Podlubny, Fractional Differential Equations, Academic Press, San Diego, Calif, USA, 1999.
  8. C. A. Monje, B. M. Vinagre, V. Feliu, and Y. Chen, “Tuning and auto-tuning of fractional order controllers for industry applications,” Control Engineering Practice, vol. 16, no. 7, pp. 798–812, 2008. View at: Publisher Site | Google Scholar
  9. K. Bettou, A. Charef, and F. Mesquine, “A new design method for fractional PIλDμ controller,” International Journal on Sciences and Techniques of Automatic Control & Computer Engineering, vol. 2, no. 1, pp. 414–429, 2008. View at: Google Scholar
  10. B. M. Vinagre, C. A. Monje, A. J. Caldern, and J. I. Surez, “Fractional PID controllers for industry application: a brief introduction,” Journal of Vibration and Control, vol. 13, no. 9-10, pp. 1419–1429, 2007. View at: Publisher Site | Google Scholar
  11. B. M. Vinagre, I. Podlubny, L. Dorcak, and V. Feliu, “On fractional PID controllers: a frequency domain approach,” in Proceedings of the IFAC Workshop on Digital Control. Past, Present and Future of PID Control, pp. 53–58, Terrasa, Spain, April 2000. View at: Google Scholar
  12. I. Petras and M. Hypiusova, “Design of fractional-order controllers via H norm minimization,” Selected Topics in Modelling and Control, vol. 3, pp. 50–54, 2002. View at: Google Scholar
  13. D. Xue and Y. Q. Chen, “A comparative introduction of four fractional order controllers,” in Proceedings of the 4th World Congress on Intelligent Control and Automation (WCICA '02), pp. 3228–3235, Shanghai, China, June 2002. View at: Google Scholar
  14. S. E. Hamamci, “An algorithm for stabilization of fractional-order time delay systems using fractional-order PID controllers,” IEEE Transactions on Automatic Control, vol. 52, no. 10, pp. 1964–1969, 2007. View at: Publisher Site | Google Scholar
  15. R. S. Barbosa, J. A. T. Machado, and I. M. Ferreira, “Tuning of PID controllers based on bode's ideal transfer function,” Nonlinear Dynamics, vol. 38, no. 1–4, pp. 305–321, 2004. View at: Publisher Site | Google Scholar
  16. C. Yeroglu and N. Tan, “Note on fractional-order proportional-integral-differential controller design,” IET Control Theory and Applications, vol. 5, no. 17, pp. 1978–1989, 2011. View at: Publisher Site | Google Scholar
  17. D. Maiti, A. Acharya, M. Chakraborty, A. Konar, and R. Janarthanan, “Tuning PID and PIλDμ controllers using the integral time absolute error criterion,” in Proceedings of the 4th International Conference on Information and Automation for Sustainability (ICIAFS '08), pp. 457–462, Colombo, Sri Lanka, December 2008. View at: Publisher Site | Google Scholar
  18. J. Kennedy and R. Eberhart, “Particle swarm optimization,” in Proceedings of the IEEE International Conference on Neural Networks (ICNN '95), vol. 4, pp. 1942–1948, December 1995. View at: Publisher Site | Google Scholar
  19. A. Tepljakov, E. Petlenkov, and J. Belikov, “FOMCON: fractional-order modeling and control toolbox for MATLAB,” in Proceedings of the 18th International Conference Mixed Design of Integrated Circuits and Systems (MIXDES '11), pp. 684–689, Gliwice, Poland, June 2011. View at: Google Scholar

Copyright © 2013 Sunil Kumar Mishra and Dinesh Chandra. This is an open access article distributed under the Creative Commons Attribution License, which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.

More related articles

2300 Views | 700 Downloads | 6 Citations
 PDF Download Citation Citation
 Download other formatsMore
 Order printed copiesOrder

Related articles

We are committed to sharing findings related to COVID-19 as quickly as possible. We will be providing unlimited waivers of publication charges for accepted research articles as well as case reports and case series related to COVID-19. Review articles are excluded from this waiver policy. Sign up here as a reviewer to help fast-track new submissions.