Modelling and Control of Ball and Beam System Using PID Controller
Modelling and Control of Ball and Beam System Using PID Controller
Abstract: The ball and beam is a basic reference point the ball role along the beam and also finds position and
system with high nonlinearity and unstable system in its locates one side of the beam. An actuator acquires the
dynamics. Many simple and present day control methods beam at a desired angle, by sending a torque at the end
have been used to balance the ball and beam system. The of the beam.
goal of this project is to model and control the ball and
beam system. Here considering the beam angle of servo
motor and designing controllers to control the ball
position. Lagrange approach is used to find the ball
position of the system. It is based on energy balance of the
system. Based on the transfer function and state space
model, open loop system and closed loop system are
designed. The system is designed by using two Degrees-of-
Freedom. The nonlinear characteristic of the second order
system is regulated by using PID controller. The controller
controls the ball position in moving the beam using the
motor and beaten the disturbances. The parameters of the
PID are tuned using PID tuning Algorithm. In order to
analyse the accomplishment of PID to learn the effect of
simplifying expectation, two control methods are designed
and implemented using Proportional Derivative Integral
(PID) as non-model based control method, Proportional
Derivative and Proportional integral combination of model
based and non-model based control methods.
models for teaching control systems. However, the behaviour of the system is sensed and then feed back to
motion of the ball and the motor angle communicate in the controller and mixed with the citation or desired
the real system. The ball has a poor value during the state of the system to modify the system to its desired
slow movement of the angular velocity of the beam. state. The goal of the control system is to estimate
Therefore, this specification was neglected in modeling solutions for the proper corrective action to the system
of the ball and beam system. so that it can hold the set point (reference) and not
fluctuate around it.
However, when the ball is away from the familiar
point, the beam should rotate with noticeable velocity in
association to the alternative parameters. In addition, the II. MATHEMATICAL MODELLING
carioles acceleration term straightly relates to the beam
angle. In order to acquire ball and beam system
dynamic equation, Lagrange approach is used to find
Due to the complexity and the nonlinearity of the the ball position of the system. It is based on energy
administrative dynamics, some research workers used balance of the system. The Lagrange approach is used to
non-model based control strategies such as Fuzzy Logic, acquire the motion equations for the ball and beam
Neural Network and PID to command the ball position system. The ball and beam system is the greatest model
and beam angle. The non-model based approach does based research work.
not require mathematical operation to acquire the
dynamic equations and to employ linearization. The mechanism of the ball and beam system
However, these approaches are mainly knowledge- contains two DOFs. Initially the Euler-Lagrange
based and cannot guarantee the stability of the system, equation is used to define the kinetic energy (1) and
which May aspect challenge to control the unstable ball potential energy (2) for the system.
and beam system. 1 1 r' 1 1
K mB r '2 J B ( )2 ( J B mB r '2 )D '2 J bD '2 (1)
The current research has focus on three main 2 2 Rb 2 2
issues: comparing the performances of model based and 1
non-model based control strategies, learning the P mb g sin D mB gr sin D (2)
coupling effect in the dynamic equations and designing 2
an optimal control approach seeing the system dynamic The parameters m is ball mass, m is beam
B b
requirements (i.e. the moment of inertia of the beam and mass, J is the beam moment of inertia and R is radius of
ball, and beam angular velocity). the ball, and also g is the gravity acceleration and l is
the length of the beam; variable is the linear movement
Model-Based Design (MBD) is a mathematical and
of the ball and beam and another variable is beam
visual method of addressing problems it combines with
angle.
creating complex control, communication systems and
signal processing. It is used in different movement The Lagrange function is the dissimilarity between
controls, aerospace, industrial equipment and kinetic energy and potential energy, which is defined by
automotive applications. Model-based design is a L equation,
technique applied in designing embedded software.
(3)
Then an Open-loop system, also reference to as
without feedback system, is a type of continuous control The dynamic equation (4) representing the
system in which the output has no power or effect on variation effect of system variable. Equation (4),
the control action of the input signal. In other words, in equation (5) and (6) show the dynamic equation for two
an open-loop control system the output is neither DOFs of the ball and beam system.
calculated nor fed back for comparison with the input. J
Therefore, an open-loop system is predictable to firmly 0 ( 2
mb )rbcc mb g sin D mb rbD ' 2 (4)
follow its input command or set point indifferent of the Rb
final result. In an open-loop system, it has no
information of the output condition so it cannot rectify d wL wL
any errors it could make when the present value drifts, ( ) Q (5)
dt wq ' wq
even if this results in large deviations from the present
value. Another drawback of open-loop systems is that
they are poorly equipped to handle disturbances or J
changes in the conditions which may decrease its ( 2
mb )rbcc mb gD (6)
perform to complete the desired task. Rb
where is the torque produced by the motor
Closed loop control systems are those that applied on the end of the beam.
supply the feedback of the actual state of the system and d
compare it to the desired state of the system in order to D T (7)
L
change the system. It supplies the desired output. The J d
closed loop control system is a system where the actual ( 2
mb )r cc mb g (T ) (8)
Rb LB
323
2016 International Conference on Advanced Communication Control and Computing Technologies (ICACCCT)
III.SIMULATION RESULT
This diagram represents full view of the Simulink Ball and Beam is modelled by calculating mathematical
model of open loop system for ball and beam. Ball and modelling which is implemented by matlab Simulink.
Beam is modelled by calculating mathematical The step input value 5 is given to the summer then to
modelling which is implemented by MATLAB get the output of transfer function. Summer send to the
Simulink. In the Ball and Beam Open Loop System, the proportional Integral controller which is to eliminate
step input value is 5 and the system has Lagrange steady state error but yield the poor transient response.
function. The transfer function has the Lagrange equation. The
proportional controller response does not reach the
target for that reason we go to the PI controller.
This is the subsystem of Ball and Beam, It consist of Figure 3.4 Closed Loop Systems with PI Controller
Multiplexer, Integrator and derivative function.
Multiplexer add multiple inputs and provide single This diagram represents full view of the Simulink model
output. The ball and beam Lagrange function have the of closed loop system for Ball and Beam. Ball and
equation of transfer function. Beam is modelled by calculating mathematical
modelling which is implemented by matlab Simulink.
B. CLOSED LOOP SYSTEM The step input value 5 is given to the summer then to
get the output of transfer function. Summer send to the
This diagram represents full view of the Simulink model proportional Derivative controller which is provide the
of closed loop system for Ball and Beam. good system stability and transient response. It reduces
the overshoot.
324
2016 International Conference on Advanced Communication Control and Computing Technologies (ICACCCT)
2
Figure 3.5 Responses with PI Controller
1
0
0 10 20 30 40 50 60
Figure 3.7 Responses with PD Controller Figure 3.10 PID Controller with Disturbance
0
0 10 20 30 40 50 60 70
Figure 3.8 Closed Loop Systems with PID Controller Figure 3.11 Regulator response of PID Controller
325
2016 International Conference on Advanced Communication Control and Computing Technologies (ICACCCT)
REFERENCES
326