Professional Documents
Culture Documents
Abstract—This document presents the implementation, PID controller is the one in [4], where the authors design the
modeling, identification and control in continuous-time of a controller using the Coefficient Diagram Method (CDM), and
ball and beam system. The prototype is different from the compare it with a controller developed following the Ziegler-
commercial ones in the sense that the coupling with the motor
is in the center of the beam, rather than in one of its ends. The Nichols tuning method, to show, in simulation, that under
model proposed is completely linear and from it a continuous- typical performance index and time response characteristics
time tracking with feedback state, as well as loops with PD and the CDM design performs better. Also, in the field of linear
PID controllers were designed. Practical and simulated data are control, we found an application in [5] with the design of a
presented, showing ball position control. Some comments about Linear Quadratic Regulator (LQR), together with an extended
the controllers implementation are presented. Finally, some
conclusions are drawn. state observer, which estimates the nonlinearities of the system
as an additional state, allowing to neglect them from the model
Keywords— ball and Beam, Analog control, PID, PD, Low- to design the LQR; results are validated through simulation.
cost, Tracking control with state-feedback Considering non-linear control, the simpler approaches are
related to mix PID controllers with fuzzy techniques, as in
I. I NTRODUCTION [6], where the authors compare the fuzzy PID performance
The ball and beam system has been used extensively in with a PID resulting of using the auto-tuned function of
the study of linear and non-linear control. Given its inherent Simulink; the study was performed in the ball and beam
instability and the possibility to model the physical effects system model GBB2004 produced by Googol Technology.
tacking place on ti as non-linear, it has caught the attention of Also, from the fuzzy control branch, we found the work in [7],
academics in the last decades. One of the very first works with where a Takagi-Sugeno fuzzy model is used together with an
this system is the one presented in the CDC1989, which then adaptive dynamic control surface (DCS), results are compared
evolved to a more complete work in [1], where the authors with classical DCS approaches through both, simulation and
perform a nonlinear control of the system via Approximate experimental setups, concluding that the adaptive DCS has
input-output linearization, and they show the ball and beam better performance.
tracking control from this linearization is more effective than Some other more complex non-linear control approaches for
the one from the standard Jacobian linearization, according the ball and beam system are related to optimal control, model
to the simulation results presented. From there, hundreds of predictive control (MPC), robust control, slide mode control,
works have been developed, using linear or nonlinear control; and so on. Regarding to MPC, in [8] the authors design and
through simulation, or implementation; using it as a very implement an MPC for the Quanser ball and beam system,
versatile system to prove the validity of different control comparing theoretical with experimental results. In [9], the
theories. In the following, we will discuss some of the works authors design a robust control via a discontinuous sliding
carried out during the last years, but the reader could find more mode control approach, the validation of the controller pro-
information in the references inside those works. posed is carried out through simulations of system behavior.
Between the works that consider linear controllers, we found In [10], the authors consider the possibility of disruptions in
[2], where the authors design and implement a PD controller the feedback, achieving a sort of switching control to keep the
for the system, using two loops, one for the motor and another states of the ball and beam system stable, they validate their
one for ball position and studying the stabilizing properties approach with the Quanser ball and beam system. In the same
of the controller. In [3], a very classical approach for a PID line, authors of [11] design an optimal bang-bang control to
control is shown, the use of the Ziegler-Nichols second tuning overcome disruptions in the feedback control.
method to tune the PID, some simulation and implementation In this work we start showing a low-cost implementation
results are included in the work. Another work that involves a of the system, that differs from the commercial ones (by
Quanser or Googol Technology) in the fact that the motor
axe is directly coupled to the center of the beam. Then, we
go throw a linear modelling process of the system, in order to
C. Angle sensor
The angle sensor is a linear potentiometer of 20 kΩ, which
variation is proportional to the angle of rotation of the motor,
this action is due to the fact that the axes are connected by the
mechanism shown in Figure 4. The sensor is polarized with
Vcc = 12V , and the proportional voltage to the beam angle
can be written as
TABLE I
C OST OF THE IMPLEMENTED SYSTEM
TABLE II
PARAMETERS OF THE BALL AND B EAM S YSTEM .
Amplitude
0.8
can write the state-space representation for the ball and beam
0.6
system
0.4
0 1 0 0 0
0.2
0 0 −g 0 0 0
ẋ = 0 0 0 1 x + 0 u,
-0.2
m g (9) 0 0.2 0.4 0.6 0.8 1 1.2
B kv βv k Time (seconds)
− 0 − −
Jv Jv Jv Jv Fig. 8. Closed loop step response for the beam angle.
y = 1 0 0 0 x+ 0 u
IV. S YSTEM PARAMETERS I DENTIFICATION V. C ONTROLLERS D ESIGN
In Table II, the known system parameters are listed. How- The control objective is for the ball position to be able to
ever, there are parameters that cannot be directly measured or track a desired set point, with zero position error, a setting
calculated. Notice that for (6), the parameters are know. But, time around 4 sec, and small overshoot, if possible. In order
for (8) there are some parameters that need to be identified in to do that, we decide to design two type of controllers, first
some way. Here, we decide to take the ball off the system, to a state-feedback control with tracking (to ensure the position
eliminate the last term of the right in (8). That is error to be zero), and a two loops PD-PID for the ball position
and beam angle, respectively. In the following, we will give
δθ δ2 θ some details about the design processes.
k Vin − βv − kv θ = Jv 2 . (10)
δt δt
Now, applying Laplace transform to obtain the transfer func- A. Tracking control with state-feedback
tion of Θ(s) = L{θ(t)} respect to Vin (s) = L{Vin (t)}, we
have
k
Θ(s) Jv
Gθ (s) = = . (11)
Vin (s) β v kv
s2 + s+
Jv Jv
What we are interested in doing is to prove a closed loop for Fig. 9. General scheme for a state-space tracking controller, adapted from
[12] (Chapter 12).
(11) in order to approach the unknown terms, which are the
same that in (9). That is, we analyze the step response of the
The control loop to design and implement is the one shown
system in Fig. 7. A transfer function that reflects the output
in Figure 9. For this system, we have to consider an additional
behavior of the system can be written as
state, due to the addition of the integrator,
148.6
Gcl (s) = . (12) ξ˙ = r − C x,
s2 + 7.265 s + 148.6
the control action is given by is, the transfer function of the PID controller for the beam
angle, can be written as
u = −K x + Ki ξ.
(s + 10.1872)2
We can write an extended state equation of the system, for a Cθ (s) = 0.1208 .
s
new state vector x̄ = [xT ξ]T , of the form
2) PD control of ball position: As it is seen in Fig. 10, the
0 ball position control acts on the bean angular position loop in
x̄˙ = Ā x̄ + B̄ u + r, (13)
1 series with the transfer function of X(s) respect to Θ(s), that
from (6) can be written as
with
A 0 B X(s) g
Ā = , B̄ = . (14) Gx (s) = = − 2. (17)
−C 0 0 Θ(s) s
Given that we define the desired response of the system, the In the same way we did the PID design, we proceed for the
dominant poles are going to be located at PD design for external loop. We define the closed loop step
response of the ball position to have a very small overshoot,
s1,2 = −1.3 ± 0.591i. (15)
1%, and a settling time of 3.4 sec. The transfer function of the
Since we have to set the location of five closed loop poles, PD controller for the external loop, to control the ball position,
the remaining poles are located in such a way that they do not can be written as
affect the behavior of the dominant poles. That is Cx (s) = 0.2263 (s + 1.16).
s3 = −6.5, s4 = −6.6, s5 = −6.7. VI. S IMULATION AND I MPLEMENTATION R ESULTS
In order to find the feedback control gains K and the integral A. Tracking control with state-feedback
gain ki , knowing the desired location of the system closed The implementation of the controller was done with dif-
loop poles, we follow the classic method presented in [13] ferent operational amplifiers configurations: a subtractor, an
(Chapter 11), for the extended system. Then, integrator with gain 1, and an adder-subtractor with the state-
variables and the integral action as inputs and with K̄ gains.
K̄ = K −Ki = −25.5 −13.9 37.7 3.7 12.2 . All those circuits where designed to implement the adequate
(16) control action for the ball and beam system, obtaining simula-
B. PID and PD controllers tion and implementation results as the ones shown in Fig. 11.
It is worth to notice that the final design was validated, after
In order to control the ball position over the beam using
verifying in the implementation that the control action does
PID controllers, after seen that many of related works usually
not saturate, in order to guaranty the behavior of the closed
work with servo motors, we decide to first control the beam
loop system. Also, the practical results shown in Fig. 11, as
angular position and, from that proceed to control the position
the ones shown after, where normalized in order to ease the
ball, as it is shown in the block diagram in Fig. 10. After some
comparison with the unit step response simulation.
trials, we end up using a PID for the beam angular position
and a PD for the ball position on the beam.
90
π
50
the system.
0.8
0.6 R EFERENCES
0.4 [1] J. Hauser, S. Sastry, and P. Kokotovic, “Nonlinear control via approx-
imate input-output linearization: the ball and beam example,” IEEE
0.2
Transactions on Automatic Control, vol. 37, no. 3, pp. 392–398, March
0 1992.
0 0.2 0.4 0.6 0.8 1 1.2 1.4
Time (seconds) [2] W. Yu and F. Ortiz, “Stability analysis of pd regulation for ball and
beam system,” in Proceedings of 2005 IEEE Conference on Control
Fig. 12. Simulation and practical results for the PID controller for angle Applications, 2005. CCA 2005., Aug 2005, pp. 517–522.
control. [3] W. Chen, X. Sui, and Y. Xing, “Modeling and modulation of nonlinear
ball-beam system controller based on matlab,” in 2012 9th International
Once, we guaranty the beam angle, we have to check if the Conference on Fuzzy Systems and Knowledge Discovery, May 2012, pp.
2388–2391.
ball position is controlled with the PD. The simulation and [4] B. Meenakshipriya and K. Kalpana, “Modelling and Control of Ball
practical results for the ball position loop are shown in Fig. and Beam System using Coefficient Diagram Method (CDM) based
VI-B. These results are practically the same, it is remarkable PID controller,” IFAC Proceedings Volumes, vol. 47, no. 1, pp. 620 –
626, 2014, 3rd International Conference on Advances in Control and
how alike they are, of course some noise is present and, also, Optimization of Dynamical Systems (2014).
some mistakes in the ball position measurements at some [5] M. K. Choudhary and G. N. Kumar, “ESO Based LQR Controller
time instants. for Ball and Beam System,” IFAC-PapersOnLine, vol. 49, no. 1, pp.
607 – 610, 2016, 4th IFAC Conference on Advances in Control and
Optimization of Dynamical Systems ACODS 2016.
But this result is very satisfactory, and verifies the presence [6] N. S. A. Aziz, R. Adnan, and M. Tajjudin, “Design and evaluation of
of at least one integrator in the direct way, that guaranties fuzzy PID controller for ball and beam system,” in 2017 IEEE 8th
Control and System Graduate Research Colloquium (ICSGRC), Aug
zero position error, as it is stated in (17). 2017, pp. 28–32.
[7] Y. Chang, W. Chan, and C. Chang, “T-S Fuzzy Model-Based Adaptive
Dynamic Surface Control for Ball and Beam System,” IEEE Transac-
1.2 tions on Industrial Electronics, vol. 60, no. 6, pp. 2251–2263, June 2013.
[8] D. Martı́nez and F. Ruiz, “Nonlinear model predictive control for a ball
1 beam,” in 2012 IEEE 4th Colombian Workshop on Circuits and Systems
(CWCAS), Nov 2012, pp. 1–5.
Amplitude
0.8 [9] R. Soni and S. Sathans, “Robust control of a ball and beam system
through sliding mode controller,” in 2018 International Conference on
0.6
Emerging Trends and Innovations In Engineering And Technological
Research (ICETIETR), July 2018, pp. 1–5.
[10] S. Oh, K. Lee, and H. Choi, “Control of a ball and beam system
0.4
under intermittent feedback,” in 2018 18th International Conference on
Control, Automation and Systems (ICCAS), Oct 2018, pp. 56–61.
0.2 simulation [11] K. Lee, S. Oh, and H. Choi, “Bounded control of a ball and beam system
practical
in the absence of feedback,” in 2017 17th International Conference on
0 Control, Automation and Systems (ICCAS), Oct 2017, pp. 1167–1169.
0 1 2 3 4 5 6
Time (seconds) [12] K. Ogata, Modern Control Engineering (3rd Ed.). Upper Saddle River,
NJ, USA: Prentice-Hall, Inc., 1997.
Fig. 13. Simulation and practical results for the PD controller for ball position [13] C.-T. Chen, Analog and Digital Control System Design: Transfer-
control. function, State-space, and Algebraic Methods. New York, NY, USA:
Oxford University Press, Inc., 1995.
[14] N. S. Nise, Control Systems Engineering, 3rd ed. New York, NY, USA:
John Wiley & Sons, Inc., 2000.
VII. C ONCLUSIONS
Even though the obtained results are satisfactory, there is a
system characteristic that needs to be improved. Particularly,