Professional Documents
Culture Documents
Modeling and PID Control of Single-Stage Inverted Pendulum System
Modeling and PID Control of Single-Stage Inverted Pendulum System
Abstract.The dynamic model is obtained based on researching the structure of single inverted
pendulum system in this paper. Mathematical model of inverted pendulum that is close to the working
point is deduced by linearization. A PID control algorithm is put forward by analyzing the factor of
influencing inverted pendulum stability. The effectiveness of proposed algorithm is verified by
simulation. This algorithm has the features of high control precision and good stability.
Introduction
Single-stage inverted pendulum system is a high order time, unstable, multivariable, nonlinear and
strong coupling system. Its structure is similar to the person on one foot. It is the most simplified
model of many controlled objects, such as biped walking robot and vertical posture of rockets. So it
has very important significance for a bipedal robot development research[1]. Many problems existing
in the industrial application and the robot system are revealed by the research of inverted pendulum
system, such as nonlinear characteristics of system, saturation phenomenon of actuator as well as
some physical variables with constraint conditions in system. So the control problem of inverted
pendulum system is used to test the effectiveness of the new control theory and algorithm. It is more
ideal experimental algorithm in control theory. The research of variable structure control algorithm
based on the mechanism of single-stage inverted pendulum has important theoretical significance and
practical application value[2].
All rights reserved. No part of contents of this paper may be reproduced or transmitted in any form or by any means without the written permission of Trans
Tech Publications, www.ttp.net. (ID: 128.210.126.199, Purdue University Libraries, West Lafayette, USA-24/05/15,23:27:50)
Applied Mechanics and Materials Vols. 644-650 143
2
dθ
cos θ = −1, sin θ = −φ , =0
dt ( 4)
Assumption: u represents the input force F of controlled object, equation (2) and equation (3) are
linearized.[4]
( I + ml 2 )φ − mglφ = mlx
( 5)
( M + m) x + bx − mlφ = u
1
Among them: I = ml 2 .
2
So the state equations of inverted pendulum are:
3 g ( M − m) −3
θ = l (4 M + m) θ + l (4 M + m) F
( 6)
− 3mg 4
x = θ− F
4M + m ( 4 M + m)
The laplace transform of formula (5) is:
( I + ml 2 )Φ ( s ) s 2 − mglΦ ( s ) = mlX ( s ) s 2
2
( 7)
( M + m) X ( s ) s + bX ( s) s − mlΦ( s ) s = U ( s )
When the initial conditions is 0, because the output angle is φ , the first equation of equations is:
( I + ml 2 ) g
X ( s) = − 2 Φ( s) ( 8)
ml s
Type (8) substitution into the second equation of type (7) is:
( I + ml 2 ) g ( I + ml 2 ) g ( 9)
( M + m) − Φ (s) s 2 + b + 2 Φ ( s) s − mlΦ( s) s 2 = U ( s )
ml s ml s
Getting:
ml
s
Φ ( s) q num ( 10)
= 2
=
U ( s) b( I + ml ) 2 ( M + m) mgl bmgl den
s3 + s − s−
q q q
Among them: q = [( M + m)( I + ml 2 ) − (ml 2 )] [5]。
The transfer functions and state equations of single-stage inverted pendulum system
1) The transfer function of swinging rod angle and displacement of the car:
Φ( s) 0.02725s 2
= ( 11)
X ( s ) 0.0102125s 2 − 0.26705
2) the transfer function of swinging rod angle and acceleration of the car:
Φ(s) 0.02725
= ( 12)
V ( s ) 0.0102125s 2 − 0.26705
3) the transfer function of swinging rod angle and external force of the car:
Φ ( s) 2.35655s
= 3
U ( s ) s + 0.0883167 s 2 − 27.9169s − 2.30942 (13)
4)the system state equation with outside forces as the input:
x 0 1 0 0 x 0
x 0 − 0.0883167 0.629317
0 x 0.883167
= = + u
φ 0 0 0 1 φ 0
φ 0 − 0.235655 27.8285 0 φ 2.35655 ( 14)
144 Machine Tool Technology, Mechatronics and Information Engineering
5) the system state equation with the car acceleration as the input:
x 0 1 0 0 x 0
x 0 0 0 0 x 1
= + u′
φ 0 0 0 1 φ 0 (15)
φ 0 0 29.4 0 φ 3
x
x 1 0 0 0 x 0
y= = + u′
φ 0 0 1 0 φ 0
φ
controlled
Integral
object
Differential
Simulation results
The bode graph and nyquist graph of system are shown in figure 2.
Bode Diagram
Gm = -11.6 dB (at 1.41 rad/sec) , Pm = 81.2 deg (at 25.9 rad/sec)
Phase (deg)Magnitude (dB)
100
-100
0
-180
-360
-2 -1 0 1 2
10 10 10 10 10
Frequency (rad/sec)
Nyquist Diagram
100
50
Imaginary Axis
-50
-100
-4.5 -4 -3.5 -3 -2.5 -2 -1.5 -1 -0.5 0
Real Axis
Figure 2 The bode graph and nyquist graph of system using the PID control
Applied Mechanics and Materials Vols. 644-650 145
It can be seen from nyquist diagram that curve counterclockwise week around - 1 point. So the
correction system is stability.
The unit step response of PID control system is shown in figure 3.
1.4
data1
data2
1.2
Amplitude(rad)
0.8
0.6
0.4
0.2
0
0 2 4 6 8 10
Time(sec)
It can be seen that achieving stability time is about 5 s from unit step response curve of swinging
rod. Steady-state error is zero. The stability of system is good. The overshoot of system is small. The
effect of simulation is better.
Conclusion
The model of single-stage inverted pendulum system is carried on strict theoretical analysis in this
paper. PID control method is applied to realize the displacement control of car. Using this algorithm
can realize the stability of system in 0.5 s time by simulation. Control precision is improved. The
dynamic characteristic, the robustness and anti-interference of system are improved.
References
[1] W.R.Sturegeon and M.V.Loscutoff. Application of modal control and dynamic observers
tocontrol of a double inverted pendulum[J]. Proc.JACC,Stanford,1972,857-865.
[2] S. Mori,H. Nishihara and K.Furuta. Control of unstable mechanical system control of
pendulum[J] Int.J Control 23, 673-692,1976.
[3] Tasuku Hoshino,Katsubusa Furuta. Stablibization of 2-D inverted pendulum via partial exact
linear iza tion[A]. Proc of the 2nd Asian Control Conf[C]. Seoul,1977,495-498.
[4] FURUTA K,HIROYUKI K,KOSUGE K. Digital control of a double inverted pendulum on an
inclined rail[J].International Journal of Control,1980,32:907-924.
[5] FURUTA K,OCHIAI T,ONO N. Attitude control of a triple inverted pendulum[J].International
Journal of Control ,1984,39:1321-1365.
[6] J.W.Watts.Control of an inverted pendulum[C].ASEE Annual Conference,session2527,
1984,706-710.
[7] Charier W.Andorson. Learning to Control an Inverted Pendulum Using Neural Networks
[J].IEEE Con trol System Magazine,1989:31-36.
Machine Tool Technology, Mechatronics and Information Engineering
10.4028/www.scientific.net/AMM.644-650