Professional Documents
Culture Documents
Hilmi KUU
Trakya University / TURKEY
hilmi@trakya.edu.tr
Abstract
The control of The Ball and Beam system is very important in the aviation and space fields because of its similarity
to the control of aircraft during the flight, landing and turbulent,. Since real experiments are not possible in these
areas, using Ball and Beam systems in the control laboratories has become necessary. The system aims to keep the ball
on the beam in desired position. Current position of the ball is measured by using various sensors and the location of
the ball is changed by changing the angle of beam by using various motors. The mathematical model of this system is
not linear. By using several control algorithms, system tries to move the ball to the desired position appropriately. Here
system tries to set the rising time, the overshoot and offset in optimum level. In this study the PID control method is
applied and system is fixed as an experimental set. The aim is lecturing the effects of PID constants to students in
control laboratories.
Keywords: Ball and Beam, PID, Control, Microprocessor
INTRODUCTION
This study aims to control the position of
the ball moving freely on a beam. The angle
between the horizontal and the beam depends
on the movement of the motor that controls the
beam. The system brings the ball to the desired
area on the beam by using closed loop control.
Designed as an experimental set, this system
suggests a new control method and material
selection way for one of the most popular
models of automatic control.
The control of unstable systems is very
important for many control problems. Since
such systems prove dangerous to test in
vertical position control of aerospace and
airplanes, we can only study them in
laboratories by modeling the system.
In this project we used an aluminum beam,
a stepper motor, a ping pong ball, and two
infrared sensors to measure the position of the
ball. The system attempts to measure the angle
of beam and the position of the ball. We can
calculate the angle between beam and
horizontal because we know the motors angle
per step. But we cant calculate the linear
speed of the ball which is under outer effects.
We designed P, PD, PI and PID
controllers for this system. The user can
choose Kp, Kd and Ki coefficients freely. So
2013
III-41
(5)
The angle is variable between 00 and 300.
Also
is variable between 0 and 0,5. The
force on the ball is also variable between 0N
and 0,0095 N.
The moment of the motor is
(6)
(1)
The position of the ball on the beam is
(2)
where is angular turning and r is the distance
between turning axis of ball and contact
position between ball and beam. r is nearly
equal to radius of the ball. The momentum of
the ball is
(3)
where
III-42
2013
START
LCD1
LM044L
OK
b1
b2
SOL
SAG
D0
D1
D2
D3
D4
D5
D6
D7
RS
RW
E
b3
R1
R2
R3
R4
1k
1k
1k
1k
7
8
9
10
11
12
13
14
4
5
6
1
2
3
VSS
VDD
VEE
b4
+6V
d4
d5
d6
d7
rs
rw
e
+6V
U3
sharp_digital
rw
d4
d5
d6
d7
33
34
35
36
37
38
39
40
18
RA0/AN0
RC0/T1OSO/T1CKI
RA1/AN1
RC1/T1OSI/CCP2/UOE
RA2/AN2/VREF-/CVREF
RC2/CCP1/P1A
RA3/AN3/VREF+
RC4/D-/VM
RA4/T0CKI/C1OUT/RCV
RC5/D+/VP
RA5/AN4/SS/LVDIN/C2OUT
RC6/TX/CK
RA6/OSC2/CLKO
RC7/RX/DT/SDO
OSC1/CLKI
RB0/AN12/INT0/FLT0/SDI/SDA
RB1/AN10/INT1/SCK/SCL
RB2/AN8/INT2/VMO
RB3/AN9/CCP2/VPO
RB4/AN11/KBI0/CSSPP
RB5/KBI1/PGM
RB6/KBI2/PGC
RB7/KBI3/PGD
VUSB
RD0/SPP0
RD1/SPP1
RD2/SPP2
RD3/SPP3
RD4/SPP4
RD5/SPP5/P1B
RD6/SPP6/P1C
RD7/SPP7/P1D
RE0/AN5/CK1SPP
RE1/AN6/CK2SPP
RE2/AN7/OESPP
RE3/MCLR/VPP
15
16
17
23
24
25
26
Q1
R5
motor_puls
b1
BC556AP
sens1
1K
motor_enable
R6
sens2
RV1
RV2
100
100
Q2
BC556AP
1k
+3
48%
53%
+5
19
20
21
22
27
28
29
30
U2
b3
sens1
sens2
motor_ileri_geri
b2
e
rs
8
9
10
1
D1
LED-BLUE
8
1
5
7
6
VCC1
VCC2
X1
X1
RST
SCLK
I/O
CRYSTAL
X2
sharp2
b4
2
3
4
5
6
7
14
13
sharp1
sharp1
sharp2
pot
DS1302
RV3
+5V
100k
PIC18F4550
R7
pot
1k
56%
+5V
transformation
(10)
Voltage
(V)
sensors
Position
(cm)
(9)
Position
(cm)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
2,14
2,07
2,05
2,01
1,98
1,94
1,92
1,89
1,86
1,83
1,80
1,77
1,74
1,70
1,67
1,63
1,61
1,57
1,56
1,54
1,52
1,50
1,48
1,46
1,45
1,44
1,43
1,42
1,41
1,40
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
1,33
1,34
1,35
1,36
1,365
1,37
1,385
1,40
1,405
1,41
1,44
1,47
1,49
1,51
1,55
1,58
1,64
1,68
1,74
1,79
1,81
1,88
1,93
1,98
2,02
2,05
2,07
2,10
2,18
2,25
III-43
III-44
2013
Kp
Ki
0,2
0,2
0,2
0,4
0,4
0,4
0,6
0,6
0,6
0,8
0,8
0,8
0,3
0,6
0,9
0,3
0,6
0,9
0,3
0,6
0,9
0,3
0,6
0,9
Time
(s)
30
47
91
-
Offset
(cm)
+2
-1
-0,5
-
Result
Success
Success
Unstable
Unstable
Unstable
Success
Unstable
Unstable
Unstable
Unstable
Unstable
Unstable
Kp
Time (s)
0,2
0,4
0,6
0,8
36
74
11
-
Offset
(cm)
+2
+1,5
+0,5
-
Result
Success
Success
Success
Unstable
Kp
Kd
0,3
Time
(s)
9
Offset
(cm)
+9
0,2
0,2
0,6
22
+9
0,2
0,4
0,4
0,4
0,6
0,6
0,6
0,8
0,8
0,8
0,9
0,3
0,6
0,9
0,3
0,6
0,9
0,3
0,6
0,9
30
15
5
51
118
77
107
-1,5
0
-0,5
-2
-1
+0,5
+0,5
Result
Big Steadystate Error
Big Steadystate Error
Success
Success
Success
Unstable
Success
Delayed
Unstable
Unstable
Success
Delayed
Kp
Kd
Ki
Time (s)
0,2
0,2
0,2
0,2
0,2
0,2
0,2
0,2
0,2
0,4
0,4
0,4
0,4
0,4
0,4
0,4
0,4
0,4
0,6
0,6
0,6
0,6
0,6
0,6
0,6
0,6
0,6
0,8
0,8
0,3
0,3
0,3
0,6
0,6
0,6
0,9
0,9
0,9
0,3
0,3
0,3
0,6
0,6
0,6
0,9
0,9
0,9
0,3
0,3
0,3
0,6
0,6
0,6
0,9
0,9
0,9
0,3
0,3
0,3
0,6
0,9
0,3
0,6
0,9
0,3
0,6
0,9
0,3
0,6
0,9
0,3
0,6
0,9
0,3
0,6
0,9
0,3
0,6
0,9
0,3
0,6
0,9
0,3
0,6
0,9
0,3
0,6
11
44
9
27
37
20
15
25
29
31
59
88
40
52
30
-
2013
Offset
(cm)
+1
0
-2
+1
-0,5
0
0
0
+1
-0,5
-0,5
+0,5
-0,5
+0,5
+1,5
-
Result
Success
Success
Unstable
Success
Success
Unstable
Success
Unstable
Success
Unstable
Unstable
Unstable
Success
Success
Unstable
Unstable
Success
Unstable
Success
Success
Success
Unstable
Success
Unstable
Success
Success
Unstable
Unstable
Unstable
III-45
0,8
0,8
0,8
0,8
0,8
0,8
0,8
0,3
0,6
0,6
0,6
0,9
0,9
0,9
0,9
0,3
0,6
0,9
0,3
0,6
0,9
131
-
+0,5
-
Unstable
Delayed
Unstable
Unstable
Unstable
Unstable
Unstable
CONCLUSION
This study presents a new model and
design of Ball and Beam system for one of the
most popular models of automatic control. The
set developed can be used in automatic control
labs. The goal of in this study is not to bring
the ball to the desired position in the most
optimal way, but rather to observe the effects
of coefficients Kp, Kd and Ki clearly. To that
end, we kept working independently from the
computer and created a control panel to
conduct experiments with the system easily
and rapidly.
Upon getting the system to work as
desired, we conducted a number of
experiments to observe the effects of the
coefficients by increasing and decreasing
them. Approximately 52% of the trials were
successful, and the ball settled in a reasonable
period by an appropriate steady-state error
(Tables 2, 3, 4, 5).
During this experiment P, PD, PI and
PID controllers were tested separately. P
controller was successful in 75% of the trials,
but if a very large coefficient Kp is selected,
the oscillations continued (Table 2). ..PD
controllers succeeded in 83% of the cases, but
when the proportional coefficient is increased,
it failed too (Table 3).
Proportional coefficient is significant
for PI-controlled first order systems. This is
because, when ramp input is applied, steadystate error is proportional to the amplitude of
the input, but high
may render the system
unstable [7]. PI controller was successful in
25% of the cases, with no attempt with zero
offset, and all the attempts with higher values
of the proportional coefficient failed (Table 4).
PID controller attempts had a success rate of
48%, 25% of which had zero offset (Table 5).
PD controller structure came out as the most
III-46
REFERENCE
[1] E. P. Dadios, R. Baylon, R. D. Guzman, A.
Florentino, R. M. Lee ve Z. Zulueta, Vision
Guided Ball-Beam Balancing System Using
Fuzzy Logic, 26th Annual Conference of the
IEEE Industrial Electronics Society, Cilt 3,
pp. 1973-1978, 2000.
[2] J. Whelan ve J. W. Ringwood, A
Demonstration Rig for Control Systems Based
on the Ball and Beam with Vision Feedback,
Proc.3rd IFAC Symposium on Control
Education, Tokyo, 1994.
[3] S. Sridharan ve G. Sridharan, Ball and Beam
on Roller: A New Control Labrotary Device,
Proceedings of the 2002 IEEE International
Symposium on Industrial Electronics, Cilt 4,
pp. 1318-1321, 2002.
[4] T. Tez, Manyetik Ask Sisteminde Kullanlan
Kontrol Algoritmalarnn Deneysel ve Teorik
Aratrlmas, Master Thesis, Trakya Uni.
Inst. of Science, p. 64., Edirne, 2011,
[5] Quin Tep;Tamagawa Seiki Co., Ltd., 5 Phase
Step Motor and Driver, Motro Compo, No.
T12-1596N2, 1989.
[6] D. Uygun, Hibrit Adm Motorunun Saysal
Kontrol, Master Thesis, Marmara Uni.
Inst.of Science, stanbul, 2006.
[7] H. N. Hurma, PID Kontrolr ve PLC
Uygulamas,
Master
Thesis,
stanbul
Technical Uni. Inst. of Science, pp. 1130,istanbul, 1998.
2013