Professional Documents
Culture Documents
Abstract: The inverted pendulum is a common, interesting control problem that involves many basic elements of control theory. This
paper deals with modeling and simulation of the inverted pendulum. This system is unstable and highly nonlinear with one input –
voltage of a DC motor which can change position of the cart and two outputs – cart position and angle of the pendulum rod. First, a
mathematical model of the inverted pendulum is derived, followed by stabilization of three basic control methods (Root locus, Frequency
response, PID). Then, the created mathematical model is implemented into the MATLAB/Simulink environment and its properties are
reflected by simulation results.
Key Words: Inverted Pendulum (IP), Transfer function (TF), Root locus, Frequency response, PID
978-1-4799-7016-2/15/$31.00 2015
c IEEE 548
ሺ݉ ݉ଵ ሻݔሷ െ ݉ଵ ݈ߠሷ
ߠ ൌ ݂ ݔሶ െ ݉ଵ ݈ߠሶ ଶ ߠ ܨ (1)
Pendulum balancing port ୬ -
ሷ ݉ଵ ݈݃ ߠ െ ݂ଵ ߠሶ ݉ଵ ݔሷ ݈
ߠ
ሺ ܬ ݉ଵ ݈ ଶ ሻߠ ൌ (2) Consuming maximum overshoot
୬ M p = e − (ζ 1−ζ 2 )π
≤ 10% ˈ (13)
By (1) & (2) yields -
ܽ ݔሷ െ ܽଵ ߠሷ
ߠ ൌ െܽଵ ߠሶ ଶ ߠ െ ݂ ݔሶ ݑ We get ζ ≥ 0.5912 ൎ ζ = 0.6ˈ (14)
ቊ (3)
െܽଵ ݔሷ
ߠ ܾଵ ߠሷ ൌ െ݂ଵ ߠሶ ܽଵ ݃ ߠ ζ = cos θ , we get θ = 0.9273rad (15)
4
[Here,ܽ ൌ ݉ଵ ݉ Ǣܽଵ ൌ ݉ଵ ݈Ǣܾଵ ൌ ܬ ݉ଵ ݈ ଶ ܽ and Also Consuming ts = ≤ 0.5s (16)
u=F] ζωn
We know, IP rod rotation angle is not too much large, i.e. We get ω n ≥ 1 3 .3 3 3 3 ൎ ω n = 1 3 .5 (17)
ߠ ͳ اሺ݀ܽݎሻ.
ర
It have two root,ߣ ൌ േǤͶ 0
-10
• Adjustment time t s = 0 .5 s ˗ (9) Fig 3. The system Root locus figure after adjustment
• Maximum overshoot M p ≤ 10% (10) 2.2 Frequency Control Method
Block diagram of the controller scheme of Root Locus If two TF are different in equivalent numerator i.e.
method- (݀݁݊ଵ ൌ ݀݁݊ଶ ). So the streamlined TF-
మ ሺ୬୳୫ ሻሺୢୣ୬ୡ୭୬୲୰୭୪୪ୣ୰ሻ
ሺሻ ൌ ሺୢୣ୬ୡ୭୬୲୰୭୪୪ୣ୰ሻሺୢୣ୬ሻାሺ୬୳୫ୡ୭୬୲୰୭୪୪ୣ୰ሻሺ୬୳୫ (20)
భሻ
భ
௦ା
Controller Scheme, ܩ ሺݏሻ ൌ ܭ భ (21)
௦ା
Fig 2. Dynamic control block diagram for Root locus control method of IP ഀ
system. In system has OLTF ܩ ሺݏሻܩሺݏሻ-
ୋమ ሺୱሻ ௨మ Τௗమ Ǥଵଶଶכ
ሺሻ ൌ ሺୱሻ
ଵାୈሺୱሻୋభ
ൌ ೖሺೠೌሻሺೠೌሻሺೠభሻ
ܨሺݏሻ
ଵା ሺೌሻሺೌሻሺ ሻ
(11) ܩଵ ሺݏሻ ൌ ܩܭሺݏሻ ൌ మ (22)
మ
௦ ି
To evaluate the gain,
Ǩ
If pole/zero at the foundation point i.e. (݀݁݊ଵ ൌ ݀݁݊ଶ ) was ௦ା Ǥଵଶଶ
ܭൌ ௦՜ ܭ భ ൈ ൌ ͳͲ (23)
cancelled. So the streamlined TF- ௦ା ௦ మ ି
ഀ
-180
-181
0 1 2
10 10 10
Frequency (rad/sec)
-8
x 10 Nyquist Diagram
1
20
-2
2-10
-4
10
-6
-20
dB
6dB
4dB
0
dB
dB
dB
dB
dB
0.5
Imaginary Axis
100
-100
-90
-135
-180
-1 0 1 2 3 4
10 10 10 10 10 10
Frequency (rad/sec)
Nyquist Diagram
Fig 8. Simulink diagram for Root Locus method of IP system.
0.5
10 dB 6 dB 4 dB 2 dB 0 dB -2 dB -4 dB
-6 dB
-10 dB
Imaginary Axis
20 dB -20 dB
0
-0.5
-1.8 -1.6 -1.4 -1.2 -1 -0.8 -0.6 -0.4 -0.2 0
Real Axis
Impulse Response
10
6
Figure 9. Simulation results for root locus after correction.
Amplitude
4
To attempt this paper more challenging first we add an extra
positive step signal as a positive noise in root locus method
2
and we observe the output of the system after controller.
Simulink diagram for Root Locus method of IP system with
0
noise is shown in Fig 10. Noise curve and step response
curve is gained in Fig 11. This simulation result has shown
-2
0 0.5 1 1.5 2 2.5 3 that the IP system dynamic performance is good even
Time (sec)
though we add an extra positive step signal as a noise after
Fig 6. IP Impulse Response plot after adjustment controller.
Fig 15. Simulation result for Frequency response method after correction.
Fig 16. Simulink diagram for Frequency Response method adding a step
signal as a noise of IP system.
Figure 12. Simulink diagram for Root Locus method of IP system with a
negative step noise signal before controller.
Figure 13. Simulation results for root locus with subtract a step noise
signal as a feedback signal before controller after correction.
Fig 17. Simulation result for Frequency response method adding a step
signal as a noise after correction.
3.2 Frequency response
A controller for the inverted pendulum system will be 3.3 PID
designed by using Frequency Response method. Simulink A controller for the inverted pendulum system will be
diagram for Frequency Response method of IP system is designed by using PID method. Simulink diagram for PID
shown in Fig 14.Step response curve is gained in Fig method of IP system is shown in Fig 18. Step response
15.This simulation result has shown that the IP system curve is gained in Fig 19 and Fig 20.Because we will
stability is good and the steady state error is very small. attempt to control the pendulum's angle without regard for
the cart's position, the cart's position curve is unstable in Fig
19 and the pendulum's angle curve is stable in Fig 20.
Fig 21. Simulink diagram for PID method of IP system after adding a step
signal as a noise.
Figure 22. Simulation result of PID controller output graphs car position
and increase integral control parameters PID controller after adding a step
signal as a noise.
Figure 19. Simulation result of PID controller output graphs car position
4 CONCLUSION