Open Access
Issue
Int. J. Simul. Multidisci. Des. Optim.
Volume 11, 2020
Article Number 12
Number of page(s) 8
DOI https://doi.org/10.1051/smdo/2020007
Published online 28 July 2020

© D. Maneetham and P. Sutyasadi, published by EDP Sciences, 2020

Licence Creative Commons
This is an Open Access article distributed under the terms of the Creative Commons Attribution License (https://creativecommons.org/licenses/by/4.0), which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.

1 Introduction

Rotational and on-cart inverted pendulum are good example of non linear, unstable and high order systems that need to be stabilized. This balancing system is applied on high precision control such as on Segway, humanoid or some legged robots and so forth [1]. There are many kinds of theoretical control that can be applied to the inverted pendulum such as root locus, PID, Fuzzy logic, sliding mode or such new algorithms to balance and stabilize the inverted pendulum [2]. During balancing, the inertia forces from the mechanisms results a very large shaking force [3]. Dynamic balance can be achieved by adding mass to the system so that the inertia forces resulting from the added mass will be equal and opposite to those causing the shaking moment. Single inverted pendulum is an interesting nonlinear system to investigate [4]. Inverted pendulum is one of the most important plants in the science and industrial technologies [5] and ideal experiment device to test new control algorithm [6]. It because this system is poorly stable and has such as large of overshoot problem [7] and has a unique trait such as unpredictable, non-linear and consists of multiple variables [8]. Used in many studies The Linear Quadratic Regulator was applied to the inverted pendulum system that analyze performance of two different outputs between control cart position and pendulum angle [9,10]. Results of the experiment and simulation show that the LQR controller was able to compensate disturbances in the system and balance the inverted pendulum following the reference angle and cart position. Figure 1 shows the model of two type of inverted pendulum.

thumbnail Fig. 1

(a) Rotary inverted pendulum. (b) On cart inverted pendulum.

2 Research method

An inverted pendulum can be balanced either statically or dynamically. Static balance is accomplished by adding or removing weights until the component will remain stable. Dynamic balance is done by dynamically control the force to balance the system. Figure 2 shows the drawing and sum of forces applied on the system. All parameters involved are shown in Table 1.

Considering the inverted pendulum link in Figure 2, if the direction of the acceleration change then the direction of the associated inertia force is also constantly changing. It would be most convenient if the mass of the connecting rod could be replaced by one or more masses located where the direction of acceleration is more easily determined.

The mathematics model for cart(1)

The mathematics model for rod(2) (3) (4)

Substitute equation (2) into equation (1) results in(5)

Substitute equations (2), (3) into equation (4) results in(6)

The velocity and acceleration of the link are defined as θ ≈ 0, and cosθ ≈ 1. The period of the nonlinear model can substitute equations (5) and (6) will be calculated.(7) (8)where J = I + ml 2.

With the use of equation (7) and (8), the equations to be solved are:(9)and the corresponding of the rod angular displacement is:(10)

The state space design will provide the equation as follows:(11) (12) (13)

(14) (15) (16)

With some simplifying assumptions may take the field an electrical part. Based on the indicated direction of power which generated by the motor and transmitted through belt and pulley, the resultant of an electrical part is also given by

The motor equation is:(17) (18)

With corresponding the belt and pulley are(19) (20)

Substitute equations (19) and (20) into equation (18) results in(21)

From equation (9) is the governing equation for the displacement of the cart. It is common to write these equations in the standard electrical from thus be used to obtain(22)

Continuation of the analysis as the equation (10) is integrated to obtain:

The active of rod angular displacement is finally given by

When

Thus(23)

With total inductance value L is very lower than resistance R value (L < < R). The governing equation for L as a function can be neglected then the externally applied the equation for R thus is(24)

From equation (22) solution is given by(25)

From equation (23) solution is given by(26)

Let

More commonly, with(27) (28)

The state space design will provide the equation as follows:(29) (30) (31)

(32) (33) (34)

where

thumbnail Fig. 2

Mechanical model of inverted pendulum.

Table 1

Parameter of inverted pendulum system.

3 Results and analysis

In this research the balancing platform was balanced and controller dynamically. Balancing is accomplished either by reducing the mass or acceleration of link or by introducing forces opposite in direction of the inertia forces. Since it is often very difficult to reduce mass or acceleration of the link, the addition of forces to counteract the inertia forces is the most attractive method for reducing shaking forces.

3.1 Data analysis and Simulink

LQR control also is highly nonlinear behavior of the inverted pendulum that can design closed loop poles. It is mostly DC motor, encoder, cart, rod and electric devices or their combinations. The parameters are constant value as shown in Table 2.

The toolbox from MATLAB software can be applied in order to take the advantage of using the mathematical model of the state space control system. The Simulink model of the LQR control system can be shown in Figure 3.

Table 2

Constant parameter.

thumbnail Fig. 3

The Simulink of LQR control block.

3.2 LQR and results

Consider the mathematics model in equation (32) and the linear quadratic function is substitute the parameters in matrix Q and matrix R then given by

The weight matrix has provided the complex poles at −13.93 ± 12.57i, −0.52 ± 0.47i and the optimal feedback gain matrix by pole placement method at and taking the initial state condition at . The cart and pendulum response are using of optimal feedback matrix shown in Figures 4 and 5, respectively.

The pendulum oscillated in a small range angle around ‑0.15 rad to 0.15 rad. However, the system has some spikes at the maximum angle around −0.07 rad to 0.05 rad. In response to balance the system, the cart moves back and forth at the range around −0.38 m to 0.58 m.

When the disturbance was altered, the system still able to balance itself. The range of angle oscillation happened from ‑0.125 rad to 0.125 rad. The cart travelled in the range of ‑0.68 m to 0.65 m. The additional disturbance caused the range of the oscillation angle increased two times larger. The cart travel distance also increased almost twice further.

The matrix can modified by using the robustness and applied the parameters in matrix Q and matrix R then given by

The weight matrix has provided the complex poles at −12.28 ± 10.73i, −1.04 ± 0.93i and the optimal feedback gain matrix at and taking the initial state condition at . The cart and pendulum response are using of robustness control matrix shown in Figure. 6.

Additional sliding mode robust control to the LQR control improved the balancing performance of the system. The robustness of the system reduced the range of pendulum oscillation. The range of the oscillation is from ‑0.1 rad to 0.6 rad. Even though the cart traveled a bit farther than the first experiment, but still less than the second experiment result.

The three experiments above was conducted from upright position.

Figure 7 shows the result of experiment using swinging algorithm. The pendulum starts from downward position, and then oscillate itself to reach upright position.

The system needs 9 seconds to go to upright position until stable. In order to reach the stable position, the cart traveled back and forth in the range from ‑0.5 m to 0.32 m.

thumbnail Fig. 4

The simulation result of LQR. (a) Pendulum response; (b) cart response.

thumbnail Fig. 5

The simulation result of LQR with modified the disturbance. (a) Pendulum response; (b) cart response.

thumbnail Fig. 6

The simulation result of LQR with apply the robustness. (a) Pendulum response; (b) cart response.

thumbnail Fig. 7

The simulation result of LQR with swinging algorithm. (a) Pendulum response; (b) cart response.

4 Conclusion

The inverted pendulum is successfully made. The controller is using LQR. The optimal gain for the LQR to balance the inverted pendulum was found. Applying the optimal gain gives good stability. The LQR method is also used to control the cart position and the pendulum angle. The range of the pendulum oscillation without disturbance was 0.12 rad with distance range of the cart 0.96 m. When the disturbance was applied, the range of the oscillation increased to 0.25 rad and the cart distance was 1.33 m. LQR with robust algorithm has less range of oscillation, which was only 0.7 rad. However, the distance traveled by the cart while oscillated was 1.2 m. The swinging algorithm also successfully balance the system. It took 9 second for the system to bring the pendulum to the upright position and stable. The cart oscillation range was 0.82 m.

References

  1. K. Udhayakumar, P. Lakshmi, Design of robust energy control for cart inverted pendulum, Int. J. Eng. Technol. 4, 66–76 (2007) [Google Scholar]
  2. B. Alan, S. Jindi, Swing-up control of inverted pendulum systems, Robotica 14, 397–405 (1996) [CrossRef] [Google Scholar]
  3. J. Yi, N. Yubazaki, H. Kaoru, A new fuzzy for stabilization of parallel − type double inverted pendulum system, Fuzzy Sets Syst. 126, 105–119 (2002) [CrossRef] [Google Scholar]
  4. P.C. Yon, L.C. Jeang, R.C. Sheng, PC-based sliding-mode control applied to parallel-type double inverted pendulum system, Mechatronics 9, 553–564 (1999) [CrossRef] [Google Scholar]
  5. L. Zhongjuan, Z. Xinzheng, C. Cuohai, G. Yuguang, The modeling and simulation on sliding mode control applied in the double inverted pendulum system, IEEE World Congr. Intell. Control Autom. 1089–1091 (2012) [Google Scholar]
  6. Y. Bian, J. Jiang, X. Xu, L. Zhu, Research on inverted pendulum network control technology, IEEE Third Int. Conf. Measur. Technol. Mechatr. Autom. 11–13 (2011) [Google Scholar]
  7. H.Y. Luo, J. Fang, An inverted pendulum fuzzy controller design and simulation, IEEE Int. Symp. Comput. Consum. Control 557–559 (2017) [Google Scholar]
  8. Y.L. Yon, L.H. Choon, M.F.W. Yen, Stabilising an inverted pendulum with PID controller, MATEC Web Conf. 152, 1–14 (2018) [Google Scholar]
  9. X. Yong, X. Jian, X. Bo, X. Hui, The inverted pendulum model with consideration of pendulum resistance and its LQR controller, IEEE Int. Conf. Electr. Mech. Eng. Inf. Technol. 3438–3441 (2011) [Google Scholar]
  10. B. Ramashis, U. Naiwritadey, Stabilization of double link inverted pendulum using LQR, IEEE Int. Conf. Curr. Trends Toward Conver. Technolog. India 1–6 (2018) [Google Scholar]

Cite this article as: Dechrit Maneetham, Petrus Sutyasadi, System design for inverted pendulum using LQR control via IoT, Int. J. Simul. Multidisci. Des. Optim. 11, 12 (2020)

All Tables

Table 1

Parameter of inverted pendulum system.

Table 2

Constant parameter.

All Figures

thumbnail Fig. 1

(a) Rotary inverted pendulum. (b) On cart inverted pendulum.

In the text
thumbnail Fig. 2

Mechanical model of inverted pendulum.

In the text
thumbnail Fig. 3

The Simulink of LQR control block.

In the text
thumbnail Fig. 4

The simulation result of LQR. (a) Pendulum response; (b) cart response.

In the text
thumbnail Fig. 5

The simulation result of LQR with modified the disturbance. (a) Pendulum response; (b) cart response.

In the text
thumbnail Fig. 6

The simulation result of LQR with apply the robustness. (a) Pendulum response; (b) cart response.

In the text
thumbnail Fig. 7

The simulation result of LQR with swinging algorithm. (a) Pendulum response; (b) cart response.

In the text

Current usage metrics show cumulative count of Article Views (full-text article views including HTML views, PDF and ePub downloads, according to the available data) and Abstracts Views on Vision4Press platform.

Data correspond to usage on the plateform after 2015. The current usage metrics is available 48-96 hours after online publication and is updated daily on week days.

Initial download of the metrics may take a while.