Final
Final
1.1.1 Introduction
The ball and plate system is a classic control engineering example that demonstrates key
principles of dynamics and control in a practical. It involves controlling the position of a ball on
a tilting beam by adjusting the plate's angle, showcasing fundamental concepts like stability,
feedback, and system response. This project explores the modeling and automated control of the
ball and plate system, aiming to enhance precision and reliability compared to traditional manual
control methods.
The Ball-on-Plate balancing system has its roots in the Ball-on-Beam system, a classic control
engineering experiment introduced in the mid-20th century. Early systems relied on manual
control, where operators visually monitored the ball's position and adjusted the beam’s tilt, but
these methods were prone to human error and lacked precision. By the 1970s, advancements in
control theory enabled the adoption of automated techniques like Proportional-Integral-
Derivative (PID) control, significantly improving performance and reliability. The transition
from a beam to a plate in later years added complexity, allowing for two-dimensional control and
paving the way for modern applications in robotics and automation.
This project is inspired by the Ball-on-Plate system's ability to demonstrate key control
principles like stability and feedback. By addressing the limitations of manual systems, the focus
is on developing automated control strategies to enhance performance and reliability. Through a
review of existing literature, challenges in manual operation were identified, emphasizing the
need for innovative approaches. This project aims to create a mathematical model and implement
control techniques to effectively manage the ball's position on the plate.
1.1.3 General Description
The ball and plate balance project are an engaging exploration of controlling a dynamic system
where a ball rolls along a tilted plate. Our main goal is to keep the ball at a specific position by
adjusting the plate’s angle in real time, effectively demonstrating key principles of control
engineering.
We will start by developing a mathematical model to describe the system's dynamics, including
the equations of motion that govern the ball's behavior when the palate is tilted. This model will
help us design effective control strategies.
By the end of the project, we expect to achieve a reliable mathematical model, effective control
algorithms, and a MATLAB and Solidwork simulation that demonstrates automated control
principles. Ultimately, this project aims to bridge theoretical concepts with practical applications,
providing valuable insights into dynamic systems in a hands-on manner.
By engaging with this hands-on project, we aim to deepen our understanding of automated
control systems and their implications across various engineering domains, enriching both
academic knowledge and practical skills.
The problem statement for the Ball-on-Plate Balancing System involves developing a control
mechanism to maintain the position of a ball on a flat surface, which is inherently unstable due to
external disturbances. The primary challenge lies in accurately controlling the plate's tilt using
motors to counteract these disturbances and keep the ball centered.
The problem under study focuses on designing an effective control strategy and utilizing
techniques such as PID control and simulation tools like MATLAB to achieve precise trajectory
tracking and stabilization of the ball on the plate while addressing issues of system non-linearity
and instability.
1.3 Objectives
The general objective of the "Ball-on-Plate Balancing System Simulation and Control Design
Using MATLAB Simscape project is to develop a comprehensive understanding of dynamic
systems and control theory through the design and simulation of a ball-on-plate balancing
system. This system serves as a practical example of how to apply theoretical concepts in a real-
world scenario.
Utilize MATLAB Simscape to create a detailed simulation model that accurately represents
the physical characteristics and behaviors of the system.
2. Control Design
Implement the control algorithm within the MATLAB Simscape environment and ensure it
can effectively balance the ball on the plate.
3. Simulation Analysis
Conduct simulations to visualize the ball's movement and the plate's response to control
inputs.
Analyze the system's behavior under various initial conditions and disturbances to
understand stability and performance metrics.
4. Performance Evaluation
Evaluate the performance of the control system through simulations, assessing metrics such
as settling time, overshoot and steady-state error.
Compare different control strategies to identify the most effective approach for maintaining
the ball's position on the plate.
Document the entire process, including modeling, simulation results, control design, and
performance evaluations to provide a comprehensive report.
Present findings and insights gained from the project, highlighting the importance of control
design in dynamic systems.
The ball and beam balance system has become an essential tool in control engineering, providing
a hands-on way to explore various control strategies and dynamic behaviors. This literature
review will look at key developments related to modeling, control techniques, educational
applications, and some of the limitations of the ball and beam system—all of which are relevant
to our project.
Accurate modeling is crucial for effectively controlling the ball and beam system. Early studies
focused on deriving equations of motion based on Newtonian mechanics, examining the forces
acting on the ball and the torque applied to the beam. For instance, Ogata (2009) highlights how
important it is to develop precise mathematical models to ensure that controllers perform well,
especially when dealing with nonlinear dynamics. Creating state-space representations is also
vital, as they provide a comprehensive view of how the system behaves.
Recent research has refined these models by incorporating factors like friction, variations in
mass, and external disturbances, which leads to more robust control designs. However, it's
important to note that many models rely on idealized assumptions that might not hold true in
real-world scenarios. This can create gaps between predicted and actual performance, making it a
challenge for engineers to achieve the desired results.
The ball and beam system has been widely used to test various control strategies. One of the
most commonly applied methods is Proportional-Integral-Derivative (PID) control, known for its
simplicity and effectiveness. Research by Astrom and Wittenmark (1997) shows how well PID
controllers can stabilize the ball’s position, demonstrating their robustness in different
conditions. However, while PID control works well for many applications, it has its limitations,
particularly when it comes to handling nonlinearities and time delays.
State-space control methods have gained traction for their ability to provide better performance
through full state feedback. Lewis and Syrmos (1995) discuss how these methods can manage
the dynamic nature of the ball and beam system more effectively. Additionally, nonlinear control
strategies, highlighted by Khalil (2002), have shown promise in managing the system's
complexities, especially during transient responses. Yet, these advanced techniques can
introduce new challenges, such as increased computational demands and the need for precise
modeling.
Chapter Two
2.1 Introduction
The Ball-on-Plate Balancing System serves as a benchmark for testing classical control
techniques due to its inherently unstable and nonlinear dynamics. This system requires precise
control to maintain the ball's position on a flat plate by adjusting the plate's inclination. The study
of such systems is crucial in robotics, aerospace, and industrial automation, where stability and
dynamic control are essential.
This paper focuses on the simulation and control design of a Ball-on-Plate system using
Solidwork and MATLAB, a powerful platform for modeling multidomain physical systems. By
leveraging Simscape's capabilities, the study aims to provide an intuitive understanding of the
system's dynamics and evaluate control strategies such as PID. The development process
highlights the integration of mechanical and computational models, enabling a comprehensive
approach to system analysis and controller design.
The Ball-on-Plate Balancing System must maintain the ball's position at a desired target point on
the plate with minimal error and rapid response. The system should exhibit stability under
disturbances, ensuring precise and reliable operation. Key user requirements include real-time
control, intuitive visualization of system performance, and the flexibility to test various
disturbance signals.
The Ball-on-Plate Balancing System is designed to achieve precise ball positioning within a
tolerance of ±2 mm from the target point. The system should respond to position changes within
1 second, maintaining stability under disturbances such as external forces. The simulation model
must accurately represent real-world dynamics, including friction and inertia, while supporting
the integration of control algorithms like PID. The MATLAB Simscape environment should
allow for adjustable parameters to optimize performance and support iterative testing for
controller refinement.
The three-servo motor configuration and a camera for position sensing offers more degrees of
freedom, enabling precise and versatile control over the plate's movement. This setup is
particularly beneficial for applications requiring advanced, multidirectional adjustments. The
camera sensor provides high-resolution feedback and flexibility in detecting the ball's position
across the entire plate. However, the system's complexity increases significantly, demanding
higher computational power. Additionally, the reliance on image processing may introduce
latency, making it less ideal for scenarios where real-time responsiveness is critical.
The two-servo motor configuration with Resistive Touch Sensor excels in simplicity, efficiency,
and reliability. This design achieves real-time control with minimal latency due to the near-
instantaneous feedback provided by the Resistive Touch Sensor. It is highly cost-effective and
requires less computational power, making it accessible for practical and standard balancing
tasks. The two-servo system is robust, easy to implement, and requires minimal maintenance,
making it a practical choice for applications.
CONCEPT
SELECTION A B
EASE OF HANDLING 0 +
EASE OF USE - +
DURABILITY 0 +
RESPONSE TIME + 0
SYSTEM COMPLEXITY + 0
EASE OF - +
MANUFACTURING
PORTABILITY - +
SUM +’S 2 5
SUM 0’S 2 2
SUM –‘S 3 0
NET SCORE -1 5
RANK 2 1
CONTINUE NO YES
CONCEPT
SELECTION A B
CONTINU NO YES
E
Component Purpose
Plate Ball rolling surface
Supporting Frame Structural stability
Servo Motor Arms Connects motor to plate
Pivot Joint Enables smooth multi-
directional tilt
Ball Rolling object
Bearings Smooth rotation of moving
parts
Base Platform Stability and foundation
Fasteners Assembly of components
Spring Dampers Reduces vibrations
When selecting a material different parameters must be considered those considerations include
several factors including their mechanical properties which contain strength stiffness weight and
wear resistance also their functional requirements and manufacturability also machinability
regarding to their cost and safety must be in consideration in order to achieve a reliable, efficient,
and cost-effective design.
3.1.2.1 Mechanical Properties
A. Strength
The material must withstand the forces and stresses applied during operation without
deforming or breaking.
A. Plate
The plate must be flat, rigid, and lightweight to provide a stable rolling surface for
the ball.
It should resist bending under the ball’s weight and external disturbances.
B. Servo Arms
Servo arms must be lightweight and strong to minimize inertia and maximize the
system’s speed and efficiency.
They must also resist bending and torsional stresses.
C. Frame
The frame must provide stability and durability, ensuring that vibrations or
external forces do not compromise the system’s operation.
D. Pivot Joint
The pivot joint must allow smooth, low-friction motion while being strong
enough to handle the forces from the tilting plate.
E. Ball
The ball must have a smooth surface for consistent rolling and minimal friction
but should also resist wear and deformation from repeated impacts.
F. Base Platform
The base must be rigid and stable to prevent the system from tipping over during
operation.
We must ensure that the selected materials for different components work well together:
I. Thermal Expansion
Different materials expand and contract at different rates when exposed to
temperature changes. This must be considered to avoid stress or misalignment.
II. Friction and Wear
Components in contact (e.g. the ball and plate) should have low friction and wear
properties to avoid degradation over time.
Why Aluminium?
Lightweight: Reduces the load on servo motors, allowing faster and more
efficient plate tilting.
High Strength-to-Weight Ratio: Ensures the plate can withstand the
weight of the ball and external forces without deforming.
Corrosion Resistance: Suitable for long-term use and reduces wear.
Ease of Machining: Can be easily cut and shaped to precise dimensions
using CNC or manual tools.
Analysis of the Plate:
Mc
Formula: σ=
I
Where;
m p=0 .1 kg
3
I =W t /12
I =1∗¿
−9 4
I =8 . 333∗10 m
Bending Moment (Mmax): Mmax =W b *L/4
Where C=t/2=0.005m
𝛔=0.2698*0.005/8.333*10−9=161.88MPa
The plate fails under this load. To make it safe, we need to increase the thickness of the plate.
Updated Plate Thickness: To ensure the stress does not exceed 60 MP, we adjust the
thickness t. the bending stress is:
Rearranging for t= t=
√ 6 Mmax
Wσall
=
√
6∗0 . 2698
1∗60∗10 6 = √ 2 .698∗10
−8
= 0.000164m
𝞉max=
3
1.07091∗1 1.0971
9 −9 = 2 = 0.385 mm
48.70∗10 ∗8.333∗10 28.0∗10
2. Supporting Frame
Why Aluminium/Steel?
High Durability: Steel provides excellent structural rigidity; aluminium
offers lightweight alternatives.
Stability: The frame must resist vibrations and external forces.
Cost-Effectiveness: Both materials are widely available and affordable.
𝛔leg=
Wleg 1.7413
= −3 = 1.386 KPa
A 1.256∗10
F
τ=
A
Where; τ = is shear stress from the torque applied
F= is the Force applied by the weight of the plate and ball
A= is Cross-sectional area of the arm.
Torque Analysis
The torque required to tilt the plate is unchanged:
T= F*r = 1.0791*0.5 = 0.5396 Nm
The servo motor must provide at least 0.5396 Nm of torque.
Vibration Analysis
The natural frequency of the servo motor arm is:
fn=
√
1 3 EI
2 π m L3
For aluminium:
E=70 GPa =70*109 Pa
I= π ¿ ¿ = 4.91*10-9m4
M= 0.05 kg
L= 0.1 m
√
9 −9
1 3∗70∗10 ∗4.91∗10 1
fn= =
2π
√ 6
2.058∗10 = 229.1 Hz
2π 0.05∗0.1
3
The shear stress due to the force of the plate and ball is given by;
F pivot
τ=
A pin
2 2
π d pin π (0.01)
Apin= = = 7.854*10-5m2
4 4
𝜏=
2.0601
−5 = 26.23 kPa
7.854∗10
This is much less than aluminum’s allowable shear stress (𝜏all= 60MPa). The pivot joint
is safe.
P = (XFr + YFa)S
Where Fr is the radial force acting on the bearing due to the rotation of a shaft
S is a service factor
Fa/Fr (6.9651/107.92)=0.0645
Then from SKF table e=0.22 since Fa/Fr<e, the load is mostly radial so lets use X=1
and Y=0 then P=129.50N
A. Hardened Steel:
Excellent wear resistance for consistent rolling.
Smooth surface for minimal friction.
B. Acrylic
A lightweight alternative for low-cost systems.
Suitable for educational setups or low-precision applications
In this section we are going to derive the motion equations of system. In these part we assume
following simplifications:
Where qi stands for i-direction coordinate, T is kinetic energy of the system, V is potential
energy of system and Q is composite force. The system has 4 degree of freedom; two in ball
motion and two in inclination of plate. Here we assume the generalized coordinates of system to
be xb and yb ball’s position on plate and α and β the inclination of the plate. It is important to
note that we assume the center of x − y coordinates be at center of plate. The kinetic energy of
ball consists of its both rotational with respect to its center of mass and translational energy
Where mb is mass of the ball and Ib is moment of inertia of the ball; ˙x b and Yb are ball’s
translation velocities along x-axis and y-axis; ωx and ωy are ball’s rotational velocities along x-
axis and y-axis.
The following relations between translational velocities and rotational velocities:
In which rb denotes ball’s radius. By substituting equations 3 into equations 4 we will have:
The kinetic energy of the plate, by considering ball as a point mass which is placed in (x b, yb),
consists of the its rotational energy with respect to its center of mass:
Where α and β are plate’s angle of inclination along x-axis and y-axis, respectively. Therefore ά
and β֠ are plate’s rotational velocity. Here we can calculate the kinetic energy of system as
followings:
Where α and β are plate’s angle of inclination along x-axis and y-axis, respectively. Therefore ά
and β֠ are plate’s rotational velocity. Here we can calculate the kinetic energy of system as
followings
The potential energy of the ball relative (the relative potential) to horizontal plane in the center of
the inclined plate can be calculated as:
We assume generalized toques as τ x and τy which are exerted torques on the plate. From
Lagrange-Euler equation we can write:
Plant value
In this project we use the values that are shown in following table
The approximate value for a solid ball’s moment of inertia is I b = 2/5mbrb2 Therefore equations
(17) and (18) can be written as:
One can write state equations of ball-on-plate system by considering Equations (17)-(20)[3]. As
mentioned τx and τy are toques exerted on the plane
Because of the low velocity and acceleration of the plate rotation(|α˙ | << 1 and to sub-systems
and control them independently. (|β˙| < < 1) we can omit the coupling term in f(x, u) and divide
the system into
Motor Model
Transfer function
Chapter Four
The position of the ball on the plate is detected using an analog resistive touch screen sensor,
which enables direct interaction with the surface. This sensor operates by varying its resistance
through a straightforward design, typically composed of two layers made of glass or acrylic.
Both layers are coated with indium tin oxide (ITO). In its default state, a small gap exists
between these layers.
Fig
Fig
Working principle
When pressure is applied, the layers make contact, allowing the sensor to determine the
coordinates at the point of contact. Four-wire resistive touch screens utilize a single pair of
electrodes on each Indium Tin Oxide( ITO) layer. The electrodes, known as busbars, are
arranged perpendicular to one another, with connections established through a four-wire flexible
cable. These wires are designated as X+ (left), X- (right), Y+ (top), and Y- (bottom). However,
simultaneous reading of both X and Y axes is not possible. Instead, the system alternates by
applying a voltage across one layer and measuring the resulting voltage on the other. These
voltages are processed through an analog-to-digital (A/D) converter, which interprets them as
coordinate values.
A servomotor is a type of motor equipped with a gearbox and a shaft transmission, which
provides higher torque and greater precision in motion. These motors are capable of rotating 180
degrees, and certain models can rotate up to 360 degrees. In this prototype, we utilized a 180-
degree servomotor.
Regarding its control mechanism, a servomotor contains an internal control circuit, often
managed by microcontrollers. The motor responds to pulses delivered at specific time intervals,
causing it to rotate to an angle that corresponds to the duration of these pulses. A widely used
technique for generating analog signals from digital signals is called Pulse Width Modulation
(PWM).
Servomotors can be classified as either analog or digital, with the type influencing the
characteristics of the control signal required. Analog servos typically use signals with a 20-
millisecond (ms) period, which corresponds to a frequency of 50 Hz. As shown in Figure 8, the
pulse width, or duty cycle duration, ranges between 600 microseconds (μs) and 2400
microseconds (μs).
The pulse width determines the position of the servo motor. For example:
Since the relationship between pulse width and position is linear, pulse durations for intermediate
positions can be calculated easily. However, it is important to note that these values may differ
for other servomotor models, as the mapping between pulse width and angular position can vary
depending on the manufacturer and design.
Servo motor
Chapter Five
In control system design, selecting the appropriate controller is critical to achieving desired
performance, stability, and precision. Various control strategies, such as PID, Fuzzy Logic, and
Linear Quadratic Regulator (LQR), are commonly used, each offering unique advantages and
challenges. The choice of controller depends on factors like system dynamics, implementation
complexity, cost, and real-time performance requirements. For a ball-on-plate balancing system,
which involves stabilizing a dynamic, nonlinear system, comparing these controllers can help
identify the most effective approach for achieving balance with minimal error and smooth
operation. The table below highlights this comparison.
Performance High with tuning Excellent but costly Good but slower
Suitability Best for this project Too complex for scale Unnecessary
Based on the comparison above, we selected the PID controller for its simplicity, cost-
effectiveness, and high performance. We will now proceed to design the PID controller to ensure
precise and stable control of the ball-on-plate system.
PID Controller
Proportional Control
The proportional controller reduces steady-state error by adjusting the proportional gain K p. The
proportional term is:
Increasing Kp reduces error but excessive gain may cause instability, while too little gain may
hinder the system's ability to handle disturbances.
Integral controller
The integral controller eliminates steady-state error by summing past errors over time. The
integral term is:
However, excessive KI can cause oscillations and worsen system response, leading to instability.
Derivative controller
The derivative controller predicts error changes by calculating the slope of the error over time,
reducing overshoot and improving stability. The derivative term is:
While KD improves transient response, excessive derivative gain can slow the system
unnecessarily.
The ball's position on the plate is measured using a touch panel and fed back to the
microcontroller. Based on the desired setpoint and the measured position, the microcontroller
calculates the error and determines the necessary corrections using the PID control algorithm. It
generates two control signals, corresponding to the angles for Servo 1 and Servo 2, to adjust the
plate's inclination along the X and Y axes. These servos act to tilt the plate accordingly, thereby
influencing the ball's position. The system operates in a closed-loop configuration, continuously
updating the ball's position to maintain stability and ensure it reaches the setpoint.
Controloblity
Stability
Obsevablity
Chapter Six
6. System Simulation
The image illustrates a Simulink model designed to simulate the dynamics of a ball balancing on
a tilting plate. The model incorporates various components, including a World Frame defining
the inertial reference, a Solver to numerically integrate the equations of motion, and a
Mechanism Configuration block to set initial conditions for the ball and plate. The Ball and Plate
blocks represent their respective dynamics, while a Universal Joint connects the plate to the
world frame, allowing for rotation in two axes. The Ball-Plate Interaction block accounts for the
contact forces between the ball and the plate. Control signals, represented by Fx_command and
Fy_command, are applied to tilt the plate in the x and y directions. Finally, sensors measure the
ball's position (x, y) providing feedback for control purposes.
Conclusion
The step input response demonstrates the dynamic behavior of the system with an initial overshoot and
subsequent oscillations in the "x", “Y” signal, indicating inertia and a requirement for settling time. The
"x", “Y” signal likely represents a filtered or estimated version of the measured acceleration, providing a
smoother representation of the system's behavior. Notably, the absence of any "x Failure Detected"
signals during the step input suggests that the system functioned without encountering any significant
issues. Further analysis, including parameter tuning, robustness analysis, and the quantification of
performance metrics, is recommended to optimize the system's performance and ensure reliable
operation under various conditions.
Chapter seven
7. Conclusion and Recommendation
7.1 Conclusion
The ball-on-plate system is the integration of dynamic modeling, control design, and simulation
to address a challenging control engineering problem. By developing a mathematical model and
implementing a PID controller, the project successfully stabilized the ball on the plate, ensuring
precise trajectory tracking and robustness against disturbances. Simulations conducted in
MATLAB/Simulink demonstrated the system's performance and provided insights into its
dynamics, stability, and response under various conditions. This work highlights the importance
of combining theoretical and practical approaches in control engineering, offering a foundation
for future advancements in dynamic and nonlinear systems.
7.2 Recommendation
1. To enhance the system's functionality and broaden its applications, future work should
include incorporating a Kalman filter for improved state estimation and noise reduction.
2. Increasing the degrees of freedom to three-dimensional(3d) control would allow the system
to handle more complex tasks in advanced robotics and automation.
3. exploring and implementing alternative control algorithms, such as Fuzzy Logic Controllers
and Linear Quadratic Regulators (LQR), could optimize performance by addressing system
nonlinearities more effectively.
4. real-world prototype testing and robustness analysis under diverse conditions are
recommended to validate the system's reliability and expand its practical utility.
References
Appendices (optional)