14Control Tutorials for MATLAB and Simulink - Ball & Beam_ System Analysis
14Control Tutorials for MATLAB and Simulink - Ball & Beam_ System Analysis
INTRODUCTION CRUISE CONTROL MOTOR SPEED MOTOR POSITION SUSPENSION INVERTED PENDULUM
SYSTEM
FREQUENCY
Time Resp Video
STATE-SPACE
DIGITAL
Contents
Pole/zero map
MODELING
Open-loop step response
CONTROL
SIMSCAPE
System model
The transfer function from the gear angle ( ) to the ball position ( ), as derived in the Ball & Beam: System Modeling page.
ctms.engin.umich.edu/CTMS/index.php?example=BallBeam§ion=SystemAnalysis 1/4
3/25/2020 Control Tutorials for MATLAB and Simulink - Ball & Beam: System Analysis
(1)
Open a new m-file and add the following code to create a transfer function model in MATLAB.
m = 0.111;
R = 0.015;
g = -9.8;
L = 1.0;
d = 0.03;
J = 9.99e-6;
s = tf('s');
P_ball = -m*g*d/L/(J/R^2+m)/s^2
P_ball =
0.21
----
s^2
Pole/zero map
The Ball and Beam system is a type II system which has two poles at the origin, as seen in the pole/zero map below. Since the poles are
not strictly in the left half plane, the open loop system will be unstable as seen in the step response below.
ctms.engin.umich.edu/CTMS/index.php?example=BallBeam§ion=SystemAnalysis 2/4
3/25/2020 Control Tutorials for MATLAB and Simulink - Ball & Beam: System Analysis
pzmap(P_ball)
Now, we would like to observe the ball's response to a step input on the motor servo gear angle (1-radian step). To do this you will need
to add the following line to your m-file.
step(P_ball)
ctms.engin.umich.edu/CTMS/index.php?example=BallBeam§ion=SystemAnalysis 3/4
3/25/2020 Control Tutorials for MATLAB and Simulink - Ball & Beam: System Analysis
From this plot it is clear that the system is unstable in open-loop causing the ball to roll right off the end of the beam. Therefore, some
method of controlling the ball's position in this system is required. Several examples of controller design are provided in these tutorials to
address this problem.
All contents licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.
ctms.engin.umich.edu/CTMS/index.php?example=BallBeam§ion=SystemAnalysis 4/4