Modeling and Control of An Air Levitation Ball and Pipe Laboratory Setup
Modeling and Control of An Air Levitation Ball and Pipe Laboratory Setup
Modeling and Control of An Air Levitation Ball and Pipe Laboratory Setup
net/publication/337720691
Modeling and Control of an Air Levitation Ball and Pipe Laboratory Setup
CITATIONS READS
0 733
3 authors:
Ali Chaibakhsh
University of Guilan
77 PUBLICATIONS 433 CITATIONS
SEE PROFILE
Some of the authors of this publication are also working on these related projects:
All content following this page was uploaded by Saeed Amirkhani on 14 December 2020.
Abstract—in this paper, design, fabrication, modeling, and different fields of science. Advanced learning technologies
control of a low-cost ball and pipe air levitation laboratory have emerged to enhance learning, support new inventions
system for educational purposes is investigated. Ball and pipe and improve interest in engineering studies [1]. Moreover,
laboratory setup is a dynamic benchmark system, designed to advancement in technologies and automation are changing
control the position of the ball on a vertical upward airflow
the nature of these laboratories, and there is a long-running
that counteracts the gravitational force exerted on the ball
without mechanical support. A blower feeds airflow, and the debate about the value of hands-on versus simulated
position of the ball is measurable by using an infrared distance laboratories. Hands-on advocates emphasize design skills
meter. In this paper, the design and construction of a ball and while remote lab advocates focus on conceptual
pipe system are initially carried out. Detailed mathematical understanding [2]. Laboratory education with a focus on a
modeling of the process is included, followed by a system classroom demonstration device is always beneficial in
parameters identification process, and then a PID control teaching courses particularly for mechanical, electrical,
system is developed by establishing a connection between the robotics, control, and biomedical engineering curriculum.
Arduino circuit and Simulink real-time toolbox. The Robotics and biomedical engineering laboratory courses
performance of the controller represents small overshoot and
using fully equipped with state of the art setups can prepare
fast settling time. The system is intended to be used as a
benchmark and educational laboratory setup in control
students for real-world experience with minimal cost and
systems theory courses. This device would enhance the risk. Some affordable laboratory devices for engineering
understandings and skills of students by providing a proper education and prospering theories have already been
balance between the theoretical concepts and practical developed and exploited for different applications [3-8].
knowledge. Design and analysis of control systems have been of
Keywords—Ball and pipe air levitation setup; Arduino; interest and all-important for a long time to researchers and
mathematical modeling; system identification; PID controller engineers. Due to the development of science, the evolution
of technology and complexity of industries, the crucial role
I. INTRODUCTION of analysis and design of control systems have become more
One of the key elements for a practical approach to the and more worthy over time. Control engineers need to have
assumptions and theories in control systems is the laboratory both an extensive experience in implementing solutions in
setups that can assist students in linking theoretical concepts real plants and processes, and a deep understanding of the
to their practical application. Accordingly, the gap between mathematics and theories that lie behind these solutions.
industries and universities might reduce if correct simulation Therefore, reaching a balance between theoretical intuition
and implementation of real processes in laboratories become and their tangible proofs is a significant challenge in control
prevalent. Engineering is a professional work to exploit and education.
improve the essential human resources for achieving more One type of the devices, which can teach a wide range of
significant benefits. The crucial purpose of engineering algorithms used in control engineering are air levitation ball
education is to prepare students for engineering practice. In and pipe laboratory setups. Levitation systems have long
particular, to deal with the forces and materials in nature. been utilized in control system laboratories. Levitation is a
From the earliest days of engineering education, laboratories process in which an object is floated against gravity by a
have been essential parts of the undergraduate degrees. physical force. Many methods can be used for representing
Indeed, most engineering knowledge and perception are the levitating phenomenon, including magnetic repulsion,
obtained in laboratories. Nowadays, there is a massive viscous liquids, sound waves, and air currents. An exciting
collection of accessible and replicable laboratory setups that example of levitation is based on airflow. Air levitation uses
students can learn new concepts or develop the notions an air stream provided by a blower to obtain the levitating
through practicing with setups and implementing the theories force on a levitator. This phenomenon stems from the
on real systems. Student access to laboratory experiments is Bernoulli principle [9]. The air levitation control system is
critical in education because engineering is a practical considered as an interesting and impressive device for
discipline. Lab experimentation plays a vital role as a way to educational purpose. Besides, the system is small and
connect theories and applications. Therefore, more and more straightforward, that is very convenient to be carried from
universities began to build laboratory setups. Examples class to class. This kind of laboratory stand can be an
include DC motor experiments, coupled tank apparatuses, environment for implementing a variety of controllers, for
magnetic suspension control systems, and ball and pipe air instance: PID controller, hybrid controller, predictive
levitation systems. Universities give substantial financial controller, fuzzy logic controller, sliding mode controller and
support in providing traditional laboratory stands for others which are used for nonlinear systems [10].
30
In the literature, a complete dynamic model of ball and pipe
air levitation system based on the physical equations and
with several complex phenomena in the system has not been
presented in details. Hence, in this paper, detailed modeling
is developed to study the mathematical relations behind the
process.
The high-speed air hits the bottom of the ball, creating a
high-pressure zone under it. This high-pressure air moves
over the curved surface of the ball with high velocity,
creating a low-pressure zone. If the ball tends to move away
from the middle of the stream, the atmospheric air around
this low-pressure zone pushes it back to the middle because
of its relatively high pressure. Hence, the lateral motion of
the ball becomes stable in the middle of the flow. The
vertical motion of the ball around this equilibrium point is
stable as well, given by the balancing of gravity and the air
drag.
A. System model
The mathematical models of the air levitation system are
developed in several previous studies, concisely [11, 12].
The system dynamic equations are nonlinear. This is due to
the nonlinear description of the air stream, which subjects to Fig. 3. Schematic representation of forces inserted on the ball
the Bernoulli’s equation. This equation makes a crucial
prediction about the relationship between the pressure and d2y
the velocity of a moving ideal fluid: m = Fb + Fd − Fg (2)
dt 2
p1 + 1 2 ρ v12 + ρ gy1 = p2 + 1 2 ρ v2 2 + ρ gy2 (1) Fb = ρ gVb
where, 1 2 ρ v 2 is kinetic energy and ρ gy is gravitational Fd = f (Δp, Ff ) (3)
potential energy, p1 and p2 are the static pressures of air at Fg = mg
the cross-section, ρ is the density of the following air, y1
Where Δp is the air pressure difference, ρ is the density of
and y2 are the different distances between the ball and the air, g is the gravitational acceleration, m is the mass of the
bottom of the pipe, v1 and v2 are the mean velocities of fluid ball, Vb is the ball’s volume and Ff is the friction force caused
flow at the cross-section. Once a fluid moves with high by airflow. The drag coefficient is a term that depends on
velocity, it has lower pressure than the same fluid at low Reynold’s number, which, in turn, depends on the relative
velocity. In the experiments, one side of the Ping-pong ball velocity of the ball that moves inside the flow, and the
is in contact with a low pressure which creates a pressure velocity of the flow.
gradient, the other side of the Ping-pong ball is in contact
Fd ( ρ , cd , A, vf , y ) = 1 ⋅ Cd ⋅ ρ ⋅ A ⋅ (vf − y )2 (4)
with a higher pressure which results in the Ping-pong ball 2
being pushed towards the region of low pressure. Placing the
Where, vf is the velocity of the air inside the tube, Ab is the
ball in the tube allows to achieve higher heights but the ball’s area, Cd is the so-called drag coefficient, and y is the
Bernoulli principle still works. This is because the tube
accumulates the air increasing the speed around the ball and position of the ball in the tube. By summarizing and
reforming the relations mentioned above, the system’s
allow the ball to go higher. As air is blown out from the
dynamic equations can be obtained by exploiting net force
blower, it flows at high speed and this creates a region of low between the airflow force and gravitational force as:
pressure across the top of the pipe. The still air around the
ball is at a higher pressure and pushes on the ball and causes y = − mg + 1 ⋅ Cd ⋅ ρ ⋅ A ⋅ (vf − y )2 + ρ gVb
mΔ (5)
it to stay floating. 2
As it is shown in Eq. (2) and Eq. (3), Newton’s second In this study, it is assumed that cd is constant due to the
law gives us the dynamic equation for the air levitation ball small velocity of flow. The levitating ball will be in a steady
and pipe system, which has been studied by several previous state when it does not move ( y = y = 0 ). The IR sensor
works [13-15]. Forces acting over the levitating object are
measures the distance between the top of the pipe and the
the buoyancy force (Fb), drag force (Fd) and weight force of
ball. In this way, the sensor provides information about the
the ball (Fg). Drag force tries to prevent the levitator motion
position of the ball. In the following, veq defined as airspeed
and it is a function of air pressure difference and friction
force of air, and Buoyancy is an upward force exerted by a at the equilibrium point ( veq = vf − y ). Thus, g defines
fluid that opposes the weight of a plunged object. Upwards through:
effect of the airflow and the downwards effect of the gravity
Cd ⋅ ρ ⋅ A
will induce an up or down motion of the ball (Fig. 3). g= ⋅ veq 2 (6)
2(m − ρVb )
31
Finally, the dynamic equation of the process is expressed as 1 − Td s
follows: e −Td s = (12)
Td s + 1
m − ρVb vf − y 2
y = g ⋅(
)(( ) − 1) (7)
m veq Finally, the transfer function of the entire system defines as
follows:
The system can be modeled either linear or nonlinear.
Application of these two states of description depends on the y(s) b.kv.(1 − Td s )
G(s) = = (13)
type of control procedures adoption for designing a u ( s ) s ( s + b)(τ s + 1)(Td s + 1)
controller for the setup. Regardless of that, linearization for
the system is possible around the equilibrium point by using However, this function does not describe the behavior of the
Taylor’s expansion: system, solely, due to the limited length of the pipe, it is
f ( x) ≈ f ( x 0) + f ′( x 0) ⋅ ( x − x 0) (8) necessary to add a saturation block after the function. The
saturation function has a lower bound of 0 and an upper
vf − y bound of 40cm. Also, the behavior of the system indicates
By assuming x = , and expansion of the relation (7) that the ball does not move with small values of the input, so
veq adding a dead-zone block after the input in the model will
about the point x = 1 , it yields to: make the system performance more precise. In the next
section, the nonlinear least square method is adopted to
2 ⋅ g m − ρVb
y=
( )(vf − y − veq) (9) identify the parameters of the presented model.
veq m
B. Parameters Identification
Determining the response of a system at an operating
point is a critical step in system and controller design. The Although the physical modeling is an authentic method
identification of the process transfer function is carried out to obtain a reliable mathematical model of the system for
in the frequency domain with the open loop tests performed control purposes, there exist numerous unmodeled terms and
over the system. The system is with one input and one uncertainties in the system which makes this approach not
output (SISO). The input signal is wind speed generated by feasible at least in the context of this work. So, in this work,
blower and output is an accretion of the position of the ball. we decided to ameliorate the model through a system
Assuming the system is well described by the linearized identification procedure. Different open loop tests were
model, the transfer function between ball position and wind performed to identify the system. The idea here is to excite
speed is: the system with sinewave and square pulse PWM input
signals with different frequencies and log the system's
y(s) 1 b
= (10) output response in the form of ball position curves.
v( s ) s ( s + b) In the obtained data, the input which is in the form of
PWM was considered in the range of control input and
Where v( s ) and y ( s ) are wind speed and increment of sampling time was 0.02 seconds. After the data acquisition
ball’s position about the equilibrium point, respectively process, the data preparation process was accomplished and
and b = 2 g ( m − ρVb ) / mveq . Considering the fan can be the PWM signal was converted to a voltage.
modeled as a first-order process, the transfer function As described in the previous section, the system model
between the input voltage and the wind speed is represented was acquired as shown in Fig. 4. Consequently, four
as: unknown parameters related to G(S) and an unknown
v( s) kv parameter related to the upper bound of the dead-zone
= (11) block, must be obtained.
u(s) τ s + 1
where v(s), u(s), are wind speed and input voltage,
respectively. In addition, kv is the sensitivity gain that relates
the input voltage to the wind speed at steady state, and τ is
the time constant of the fan. It should be noted that there be Fig. 4. Model of the system
existed a delay in the operator, as well as measurement The known linear least squares error method is widely
delay, in the ball and pipe system, which needs to be used in solving linear optimization problems. By modifying
included in the model. The fan used in this setup has the structure of the linear least squares, this method will
electronic components that can bring out a delay in the time transform to the nonlinear least squares method which is
of performing the command. Moreover. A lowpass filter has more flexible and more capable of identifying parameters in
also been used to reduce the signal noise of the nonlinear systems. For the nonlinear least squares method,
measurement, which results in a delay in the system. It is there are different training algorithms, most notably Gauss-
necessary to mention, the values of these delays are not Newton and Levenberg-Marquardt are among them. In this
clear and are estimated at the identification phase. In the work, identification of unknown parameters of the model
present paper, the effect of the two delays is assumed to be was performed using the parameter estimation tools in the
Td , cumulatively. MATLAB Simulink environment, and Levenberg-
Marquardt training algorithm was used for this purpose. The
results of early attempts to identify the model showed that
presence of a pole in the zero point in G(s) reduces the
32
accuracy of identification, whereas a better result will be MATLAB toolbox with a trial and error paradigm is used
achieved by considering the pole in near-zero point. Hence, for choosing the best gains of the controller for optimal
a slight change was made in the G(s) structure and the performance. Finally, the PID controller was designed for
identification for the new system was performed. the system based on the identified model, taking into
In Figure 5, the results of the identification process are account the controller gains k p = 0.7 , ki = 0.4 , kd = 0.5 .
presented. Figure 5 (top) shows fan voltage open loop input
and Figure 5 (bottom) shows the position of the ball. The According to Fig. 7 and 8, the results obtained for the model
comparison between real values and the output of the and the real system. Fig. 7, shows the result of step
identified model is shown in Figure 5 (bottom). As can be trajectory tracking in the presence of the PID controller. The
seen, the model output closely follows the real data. real system oscillation is due to the noise of IR sensor
measurement. Zoomed-in images show that model and real
system behavior is consistent with acceptable accuracy.
Moreover, Fig. 8 shows the result of sinusoidal trajectory
tracking. In this figure, the outputs of the model and the real
system are consistent as well.
33
different experimental scenarios can be designed to give paper. Step and sinusoidal reference trajectories tracking in
students a deep understanding of the concepts of control. the presence of the PID controller were investigated. Even
Implementing the ball and pipe system in the Simulink though the designed controller is simple, it provides
environment of Matlab software makes it easy to work with promising results in reference tracking. Finally, several
the device, facilitate controller design or making changes to experimental scenarios were introduced with educational
the control system for students. In the following, several objectives. Meeting these objectives made it possible to let
experimental scenarios are introduced with educational the students deepen their knowledge about control systems
objectives. using real-time hardware and software.
• Investigating the open loop response of the system REFERENCES
• Design of proportional controller and investigating [1] L. D. Feisel and A. J. Rosa, "The role of the laboratory in
the closed-loop behavior of the system undergraduate engineering education," Journal of Engineering
• Design of PID controller Education, vol. 94, no. 1, pp. 121-130, 2005.
• Investigating the effect of each of control gains on [2] J. Ma and J. V. Nickerson, "Hands-on, simulated, and remote
laboratories: A comparative literature review," ACM Computing
performance characteristics such as settling time, Surveys, vol. 38, no. 3, p. 7, 2006.
overshoot, steady-state error, and stability. [3] X. Chen, G. Song, and Y. Zhang, "Virtual and remote laboratory
• Investigating the frequency response of the system development: A review," in Earth and Space 2010: Engineering,
and draw the Bode plots. Science, Construction, and Operations in Challenging Environments,
2010, pp. 3843-3852.
• Investigating delay on the control system
[4] A. Wojtulewicz, P. Chaber, and M. Ławryńczuk, "Multiple-input
• Investigating the frequency of the control loop on the multiple-output laboratory stand for process control education," in
system behavior. 2016 21st International Conference on Methods and Models in
• Design of state space controller and other types of Automation and Robotics (MMAR), 2016, pp. 466-471: IEEE.
controllers. [5] M. Gunasekaran and R. Potluri, "Low-cost undergraduate control
systems experiments using microcontroller-based control of a DC
• Investigating the robustness of the control system to motor," IEEE Transactions on Education, vol. 55, no. 4, pp. 508-516,
parametric and nonparametric uncertainties. 2012.
[6] K. A. Lilienkamp, "Low-cost magnetic levitation project kits for
As an example, in order to examine the effect of increasing teaching feedback system design," in Proceedings of the 2004
American Control Conference, 2004, vol. 2, pp. 1308-1313: IEEE.
or decreasing PID controller gains, students can study
[7] C. Meeker, S. Park, L. Bishop, J. Stein, and M. Ciocarlie, “EMG
various states in Table 1 and report their own observations1. pattern classification to control a hand orthosis for functional grasp
assistance after stroke,” International Conference on Rehabilitation
Table 1. Effect of variation in PID control gains Robotics (ICORR), London, pp. 1203-1210, 2017.
Response Steady [8] S. Amirkhani and A. Nahvi, "Design and implementation of an
Overshoot Stability interactive virtual control laboratory using haptic interface for
Time State Error undergraduate engineering students," Computer Applications in
Increase Engineering Education, vol. 24, no. 4, pp. 508-518, 2016.
in Kp [9] R. Qin and C. Duan, "The principle and applications of Bernoulli
equation," in Journal of Physics: Conference Series, 2017, vol. 916,
Decrease no. 1, p. 012038: IOP Publishing.
in Kp [10] C.-L. Kuo, T.-H. S. Li, and N. R. Guo, "Design of a novel fuzzy
Increase sliding-mode control for magnetic ball levitation system," Journal of
in Ki Intelligent Robotic Systems, vol. 42, no. 3, pp. 295-316, 2005.
Decrease [11] J. Chacon, J. Saenz, L. Torre, J. Diaz, and F. Esquembre, "Design of a
low-cost air levitation system for teaching control engineering,"
in Ki Sensors, vol. 17, no. 10, p. 2321, 2017.
Increase [12] E. Chołodowicz and P. Orłowski, "Low-cost air levitation laboratory
in Kd stand using MATLAB/Simulink and Arduino," Pomiary Automatyka
Robotyka, vol. 21, 2017.
Decrease
[13] P. Timmerman and J. P. van der Weele, "On the rise and fall of a ball
in Kd with linear or quadratic drag," American Journal of Physics, vol. 67,
no. 6, pp. 538-546, 1999.
VI. CONCLUSION [14] J. M. Escano, M. G. Ortega, and F. R. Rubio, "Position control of a
pneumatic levitation system," in 2005 IEEE Conference on Emerging
The aim of this work is to design, realize and test a ball Technologies and Factory Automation, 2005, vol. 1, pp. 6 pp.-528:
and pipe laboratory setup for educational purposes in control IEEE.
engineering. The total cost of the laboratory setup provided [15] S. R. Jernigan, Y. Fahmy, and G. D. Buckner, "Implementing a
to the students is under $50. System modeling, parameters remote laboratory experience into a joint engineering degree program:
Aerodynamic levitation of a beach ball," IEEE Transactions on
identification, model validation using sampled input data Education, vol. 52, no. 2, pp. 205-213, 2008.
and control of this nonlinear process was carried out in this [16] A. Tootchi and A. Chaibakhsh, "Fault Tolerant Control for Trajectory
Tracking of a Pneumatic Servo Positioning System," in 2018 6th RSI
1 International Conference on Robotics and Mechatronics (IcRoM),
A video clip from the system's operation is uploaded at the following:
URL: https://www.youtube.com/watch?v=j1qR7Cu3CrA 2018, pp. 53-58: IEEE.
34