An Optimal Quantitative PID Controller Design for Ball and Beam System
An Optimal Quantitative PID Controller Design for Ball and Beam System
An Optimal Quantitative PID Controller Design for Ball and Beam System
Hazem I. Ali, Ibtihal H. Ibrahim*
Control and Systems Engineering Department, University of Technology-Iraq, Baghdad 10066, Iraq
https://doi.org/10.18280/jesa.550304 ABSTRACT
Received: 16 February 2022 In this paper, the design of two degree of freedom controller for ball and beam system is
Accepted: 25 April 2022 proposed. The Quantitative Feedback Theory (QFT) constraints are used to design two
PID controllers to stabilize and compensate the nonlinear system with robust stability,
Keywords: robust performance and more desirable time response specifications. A multi objective
robust control, optimal control, PID cost function is proposed in this work to represent the function of QFT. The Black Hole
controller, black hole optimization, ball and Optimization (BHO) technique is a useful method to automate the design procedure of the
beam system proposed controller. The results of simulation indicate that the suggested optimal
quantitative PID controller can give a desirable performance in comparison to other
controllers designed in previous work.
1. INTRODUCTION ball on the system was controlled using adaptive PID (Q-PID).
The (Q-PID) was compared to traditional PID and heuristic
Quantitative Feedback Theory (QFT) is an engineering PID controllers techniques. It was discovered that the adaptive
methodology, which was developed by Horowitz (1960). It PID which based on Learning, was better than conventional
was designed to achieve the closed loop system requirements PID and heuristic PID controller techniques.
in the presence of system uncertainty. The fundamental idea is In this paper, optimal quantitative PID controller is
to convert model needs and plant uncertainty into open-loop, proposed for the ball and beam system. The Black Hole
which are then used to construct a controller using the gain- Optimization (BHO) method is used to automate the procedure
phase loop shaping approach [1, 2]. of (QFT). The method is used to automate the loop shaping
On the other hand, PID controller is still the most significant and obtain the optimal PID controller subject to QFT
controller, which is commonly used to solve many control constraints.
problems. The ability to make the PID controller with This paper is formatted as follows: The modeling of the
automatic tuning, automatic development of gain schedules system is presented in section 2. Section 3 explains the Black
and continuous adaptation has renewed interest in PID control Hole Optimization (BHO) method. controller design is
[3]. One of the fixed structure controllers is a PID controller presented in section 4. In section Finally, the results and
whose structure has been selected independently of the plant discussion are presented in section5 and the conclusion is
order [4-6]. given in section 6.
Many control approaches have been used to control the
system using a variety of design methodologies. Mehedi et al.
[7] in 2018 proposed Fractional Order PD Control (FOC) to 2. BALL AND BEAM MODEL
control the ball position. Ali et al. [8] in 2018 proposed PID
controller to stabilize the system, PSO method was used to
tune parameters of the controller. Shah et al. [9] in 2018
proposed LQR controller to control the system. Tahir et al.
[10] in 2019 Proposed PID controller to control the system
where the parameters tuned manual. Abdul Aziz et al. [11] in
2019 proposed a fuzzy PID controller for the system and the
output reference is modified as required by applying a model
reference at the input. The changes of system parameters did
not taken into account. Tsoi et al. [12] in 2020 proposed a
Genetic Algorithm (GA), the purpose of GA is to improve an
extra layer of fuzziness. Many objective functions were
analyzed to develop the performance of cost matrix ITAE, IAE
and ISE. Two events bring the optimum parameter search to a
close. The first was the achievement of the highest number of Figure 1. Ball and beam system structure
chromosomal generations, and the second stage was
determining the optimal controller parameter solution. The The ball and beam is one of the mechanical systems which
result of ITAE cost function was better than the other cost is commonly related to actual control issues, such as
functions. Amirudin and Kadir [13] in 2020, the location of the horizontally stabilizing the aircraft at the landing and turbulent
323
airflow [14]. The system consists of the ball, beam and the
ends of the beam are attached with level arms The motor's
output gear is attached to one of the level arms and the other
level arm, which is fixed. The drawback of this configuration
is that it necessitates a more excellent analysis of the
mechanical components. It has high nonlinearity and
uncertainty parameters [15, 16]. Figure 1. shows the system.
The following dynamic equation is created using the
Newton method as [17]:
𝑓𝑡 + 𝑓𝑟 = −𝑚𝑔𝑠𝑖𝑛 𝛼 (1)
where, ft is the force produced by translational motion, fr is the Figure 2. The beam angle and the angle of servo motor [18]
force produced by rotational motion, g is the gravitational
constant, and α is the angle of the beam. By analyzing the vector (d), the following two components
Then, the force due to ball rotational, fr is found as: the are obtained:
torque produce by the rotational motion of the ball is equal to
radius of the ball, R, multiplied by the rotational force as 𝑂𝑋 = 𝑑cos 𝜃; 𝑇𝑋 = 𝑑sin 𝜃 (10)
follows:
After subtracting OX from OS, the length of XS is obtained
𝑇𝑟 = 𝐹𝑟 𝑅 (2) as:
Also the torque can be written as its moment of inertia 𝑋𝑆 = 𝑑(1 − cos 𝜃) (11)
multiplied by the double derivative of its translational motion
By analyzing the vector (L), the following two components
𝑇𝑟 = 𝐹𝑟 𝑅 = 𝑟̈
𝐽
(3) are obtained:
𝑅
𝑂1 𝑀 = 𝐿cos 𝛼; 𝑄𝑀 = 𝐿sin 𝛼 (12)
where, J is moment of inertia, R is radius of the ball and 𝑟̈ is
by the double derivative of its translational motion. Then subtracting O1M from O1P, yields:
where, J is given as follow:
𝑀𝑃 = 𝐿(1 − cos 𝛼) (13)
2𝑚𝑅 2
𝐽= (4)
5
By analyzing the vector (A), the following two components
The force due to ball rotational is given From Eq. (3) as are obtained:
follow:
𝑇𝑁 = 𝐴sin 𝛽; 𝑄𝑁 = 𝐴cos 𝛽 (14)
2𝑚𝑅2
𝑓𝑟 = ( 5
𝑟̈ ) (5) Then subtracting QM from QN, yields:
𝑅2
324
where, d is the level arm, L represent the beam length, α(s) is where, z represents the value of fitness for Black Hole, zC
the beam angle, and θ(s) is the gear angle. represent the value of fitness for candidates and n represent the
Substituting Eq. (21) in Eq. (9), yields: number of candidates solutions. Figure 3 shows the flowchart
of BHO.
5 𝑑
𝑟̈ = 𝐺𝑏𝑏 = − 𝑔𝑠𝑖𝑛 𝜃 (22)
7 𝐿
Parameters Value
Gear ratio 70:1
Motor torque constant 0.0076 Nm/A
Beam length 43.18 cm
Level radius 2.54 cm
Equivalent inertia 0.0029 kg.m2
Motor resistance 2.6 Ω
Mass of ball 0.11 kg
Constant of Gravitational 9.8 m/s2
Constant of Back emf 0.00767 v/(rad/sec)
325
(4𝑠 + 4) loop controller is to control a motor angle. The inner controller
𝑇𝑢 = (27) must be designed in such a way that motor angle follows the
(𝑠 2 + 4𝑠 + 4)
reference signal. As shown in Figure 5, the outer loop uses the
4 inner loop to control a ball position. The structures of both
Tl = (28) controllers are:
(s + 2)(s + 2)(1 + 0.2s)
𝑘𝑖1
The specifications of the proposed upper tracking are: rise 𝐾1 (𝑠) = 𝑘𝑝1 +
𝑠
+ 𝑘𝑑1 𝑠 (37)
time equals to 0.3 sec, settling time equals to 2 sec, overshoot
equals 0.135 and the specifications of the proposed lower 𝑘𝑖2
𝐾2 (𝑠) = 𝑘𝑝2 + + 𝑘𝑑2 𝑠 (38)
tracking are: rise time equals to 1.7 sec, settling time equals to 𝑠
3 sec and overshoot equals zero.
To satisfy this constraint the following variation must be where, K1(s) and K2(s) represent the inner loop and outer loop
minimize: controllers.
And
𝑇𝑢 (𝑗𝑤𝑖 )−𝑇𝐿(𝑗𝑤𝑖 ) 𝐹(𝑗𝑤𝑖 )𝐾(𝑗𝑤𝑖 )𝐺𝑝 (𝑗𝑤𝑖 )
𝛿𝑛 (𝑗𝑤𝑖 ) = | |−| | (29) 1
2 1+𝐾(𝑗𝑤𝑖 )𝐺𝑝 (𝑗𝑤𝑖 ) 𝐹(𝑠) = (𝜏 (39)
1 𝑠+1)(𝜏2 𝑠+1)
1
PM = 𝑐𝑜𝑠 −1 (1 − ) (32) Figure 4. Block diagram of the controlled ball and beam
2𝑀𝑟2
system
3. To obtain δcl (jwi )for the controlled system which being where, K1(s) and K2(s) represent two controllers to be designed,
smaller than or equal to δv (jwi ) that it equals or less than F(s) is the prefilter, rd is desired position and r is actual
δd (jwi ) for each value ofwi as: position.
𝛿𝑐𝑙 (𝑗𝑤𝑖 ) ≤ 𝛿𝑣 (𝑗𝑤𝑖 ) ≤ 𝛿𝑑 (𝑗𝑤𝑖 ) (33)
̂ (jwi )| − |G(jwi )|
𝛿d (jwi ) = |G (34)
326
0.003
𝑘1 (𝑠) = 7 + + 0.017𝑠 (40) The constraints for robust stability have been achieved
𝑠
where the nominal system lies between the upper tracking and
0.003 lower tracking boundaries Figure 9 shows ball position in
𝑘2 (𝑠) = 0.003 +
𝑠
+ 5𝑠 (41) frequency domain. It is obvious that the response of the
nonlinear system with uncertain parameters lies between the
1
𝐹(𝑠) = (42) given tracking boundaries as shown in Figure 10. Also, it was
(0.24𝑠+1)(0.03𝑠+1)
found that the response of the Figure 11 shows the response of
the uncertain system in the frequency domain. It is clear that
the robustness requirements were satisfied by the proposed
5. RESULTS AND DISCUSSION
controllers.
The obtained control signal is shown in Figure 12 it is
The desired performance requirements have been satisfied
shown that a low control voltage is required to control the ball
by applying proposed controller. An achieved time response
and beam system. Table 2 contains a comparison between the
specifications are: rise time equals 0.9 sec, settling time equals
Optimal Quantitative PID Controller and fuzzy PID controller.
1.8 sec, and overshoot is zero, as shown in Figure 7. This
It is shown that the suggested optimal quantitative PID
means that the constraints of QFT represented by Eq. (36) have
controller can achieve a desirable performance.
been achieved. It is clear that the resulting steady state error is
zero which is the main advantage of the integral term in PID
controller. The nominal system lies between the desired upper
tracking and lower tracking boundaries. Figure 8 shows the
time response of the system.
327
6. CONCLUSIONS reference model for ball and beam mechanism. In 2019
IEEE International Conference on Automatic Control
In this work, the Black Hole Optimization method was and Intelligent Systems (I2CACIS), pp. 194-198.
utilized to develop a quantitative PID controller for the ball https://doi.org/10.1109/I2CACIS.2019.8825012
and beam system. The controller parameters were obtained [12] Tsoi, J.K., Patel, N.D., Swain, A.K., Huang, X. (2020).
subject to QFT constraints. The results showed that the QFT Dynamic fuzzy membership intervals with two-stage
constraints for robust stability and performance have been objective function for ball and beam system based on GA
achieved. Moreover, it was found that the proposed tuning. In 2020 16th International Conference on Control,
quantitative PID controller could compensate effectively the Automation, Robotics and Vision (ICARCV), pp. 898-
nonlinear system with parameters uncertainty. It was shown 903.
that the quantitative PID has satisfied the more desirable https://doi.org/10.1109/ICARCV50220.2020.9305475
performance in comparison to a fuzzy PID controller. [13] Amiruddin, B.P., Kadir, R.E.A. (2020). Ball and Beam
Control using adaptive PID based on Q-Learning. In
2020 7th International Conference on Electrical
REFERENCES Engineering, Computer Sciences and Informatics
(EECSI), pp. 203-208.
[1] Ali, H.I., Noor, S.B.B.M., Bashi, S.M., Marhaban, M.H. https://doi.org/10.23919/EECSI50503.2020.9251898
(2012). Quantitative feedback theory control design [14] Ali, A.T., Ahmed, A.M., Almahdi, H.A., Taha, O.A.,
using particle swarm optimization method. Transactions Naseraldeen, A. (2017). Design and implementation of
of the Institute of Measurement and Control, 34(4): 463- ball and beam system using PID controller. MAYFEB
476. https://doi.org/10.1177/0142331210397084 Journal of Electrical and Computer Engineering, 3(1): 1-
[2] Kobaku, T., Jeyasenthil, R., Sahoo, S., Ramchand, R., 4.
Dragicevic, T. (2020). Quantitative feedback design- [15] Shirke, H.R., Kulkarni, N.R. (2015). Mathematical
based robust PID control of voltage mode controlled DC- modeling, simulation and control of ball and beam
DC boost converter. IEEE Transactions on Circuits and system. International Journal of Engineering Research &
Systems II: Express Briefs, 68(1): 286-290. Technology, 4(3): 834-838.
https://doi.org/10.1109/TCSII.2020.2988319 [16] Soni, R. (2018). Optimal control of a ball and beam
[3] Ali, H.I., Noor, S.M., Bashi, S.M., Marhaban, M.H. system through LQR and LQG. In 2018 2nd International
(2010). Design of H-infinity based robust control Conference on Inventive Systems and Control (ICISC),
algorithms using particle swarm optimization method. pp. 179-184.
Mediterr. J. Measur. Control, 6(2): 70-81. https://doi.org/10.1109/ICISC.2018.8399060
[4] Ali, H.I. (2014). Robust PI-PD controller design for [17] Sharma, J., Pratap, B. (2015). Quantitative feedback
magnetic levitation system. Engineering and Technology theory based control of ball and beam system with
Journal, 32(3): 667-680. parametric uncertainty. In 2015 IEEE Students
[5] Ali, H.I., Saeed, A.H. (2016). Robust PI-PD controller Conference on Engineering and Systems (SCES), pp. 1-
design for systems with parametric uncertainties. 6. https://doi.org/10.1109/SCES.2015.7506443
Engineering & Technology Journal, 34: 2167-2173. [18] Anand. S., Prasad. R. (2017). Modeling and control of
[6] Ali, H.I., Abd, M.I. (2015). Optimal multi-objective Ball and Beam system. International Journal of
robust controller design for magnetic levitation system. Engineering Research in Electronics and
Iraqi Journals of Computers, Communications, Control Communication Engineering (IJERECE), 4(9): 1-7.
and Systems Engineering, 15(1): 13-34. [19] Abdulwahab, H.A., Noraziah, A., Alsewari, A.A., Salih,
[7] Mehedi, I.M., Al-Saggaf, U.M., Mansouri, R., Bettayeb, S.Q. (2019). An enhanced version of black hole
M. (2019). Two degrees of freedom fractional controller algorithm via levy flight for optimization and data
design: Application to the ball and beam system. clustering problems. IEEE Access, 7: 142085-142096.
Measurement, 135: 13-22. https://doi.org/10.1109/ACCESS.2019.2937021
https://doi.org/10.1016/j.measurement.2018.11.021 [20] Soto, R., Crawford, B., Olivares, R., Taramasco, C.,
[8] Ali, H., Albagul, A., Algitta, A. (2020). Optimization of Figueroa, I., Gómez, Á., Paredes, F. (2018). Adaptive
PID parameters based on Particle Swarm optimization black hole algorithm for solving the set covering problem.
for ball and beam system. Int. J. Eng. Technol. Manag. Mathematical Problems in Engineering, 2018: 2183214.
Res, 5(9): 59-69. https://doi.org/10.1155/2018/2183214
https://doi.org/10.5281/zenodo.1443549 [21] Hatamlou, A. (2013). Black hole: A new heuristic
[9] Shah, M., Ali, R., Malik, F.M. (2018). Control of ball and optimization approach for data clustering. Information
beam with LQR control scheme using flatness based Sciences, 222: 175-184.
approach. In 2018 International Conference on https://doi.org/10.1016/j.ins.2012.08.023
Computing, Electronic and Electrical Engineering (ICE [22] Arenas-Acuña, C.A., Rodriguez-Contreras, J.A.,
Cube), pp. 1-5. Montoya, O.D., Rivas-Trujillo, E. (2021). Black-Hole
https://doi.org/10.1109/ICECUBE.2018.8610968 optimization applied to the parametric estimation in
[10] Tahir, N.M., Yekinni, L.A., Bature, U.I., Yahuza, I., distribution transformers considering voltage and current
Shuaibu, A.N., Sambo, A.U. (2019). Control and measures. Computers, 10(10): 124.
Stability Studies of Ball and Beam System. In Proc. of https://doi.org/10.3390/computers10100124
the Journal of Modern Technology and Engineering, 4(2): [23] Ali, H.I., Hadi, M.A. (2020). Optimal nonlinear
122-131. controller design for different classes of nonlinear
[11] Aziz, N.S.A., Rahiman, M.H.F., Ishak, N., Adnan, R., systems using black hole optimization method. Arabian
Tajjudin, M. (2019). Design of fuzzy PID controller with Journal for Science and Engineering, 45(8): 7033-7053.
328
https://doi.org/10.1007/s13369-020-04650-z 𝑘𝑔 Gear ratio
[24] Ali, H.I. (2012). Hybrid H-infinity/QFT robust control 𝑘𝑏 Back emf constant, v/(rad/sec)
algorithm design using PSO for positioning a pneumatic 𝐿 the beam length, cm
servo actuator system. The Mediterranean Journal of m mass of the ball kg
Measurement and Control, 8(2): 413-430. r the ball position, m
[25] Moghadam, A.A.A., Marshall, M. (2021). Robust control 𝑅𝑎 motor resistance, Ω
of the flywheel inverted pendulum system considering
parameter uncertainty. In 2021 American Control Greek symbols
Conference (ACC), pp. 1730-1735.
https://doi.org/10.23919/ACC50511.2021.9483178 𝛼(𝑠) Beam angle
𝜃(𝑠) Gear angle
NOMENCLATURE Subscripts
329