Академический Документы
Профессиональный Документы
Культура Документы
Overview
Introduction
Mathematical Model
Linear Model
LQR Controller
Conclusion
Introduction
The ball and beam is one of the most popular and
important bench systems for studying control
algorithms.
Mathematical Model
L
r
b
Ra
im
H
2
1
, m
Mathematical Model
L
Mathematical Model
Lagrangian Method
Kinetic energy:
o
T TB Tb Tm
1
2
&
+) Tb J b kinetic of the beam.
2
1
2
&
T
m
r
+)
kinetic of the ball.
B
B
2
2
1 K g .L
2
&
J
+) Tm
kinetic of rotor.
m
2 d
Mathematical Model
Potential energy:
L
P mB g .r.sin mb .g .sin mm g .H
2
Lagrange function:
Dynamical equations:
L TP
d L
L
b bf
dt &
d L
L
Bf
dt r&
r
Mathematical Model
We have:
K
L
g
&
J m &
J B J b mb r 2
And:
J B
2
&
&
&
mB 2 r mB .r. mB g .sin Bf
R
Mathematical Model
Kt
Kt
L
m K t .im U m K b& U m K b K g &
Ra
Ra
d
and
K g Kt L
L
b Kg m
.U m
d
Ra d
K b K t K g 2 L2
Ra d
.&
Mathematical Model
, we have state space
equations of ball and beam
&
&
x
r
,
x
r
,
x
,
x
2
3
4
system: 1
Set:
x&1 x2
Bf mB x1 x42 mB g .sin x3
x&2
7
mB
5
x&3 x4
K g Kt L
.U m bf
Ra .d
&
x
K b K t K g 2 L2
L
2mB x1 x2
x
m
g
.
r
m
g
B
4
b cos x3
2
Ra d
2
2
K
L
J b J B mB x12 g J m
d
Parameters of System
mB
Ball mass
21,64/ (g)
mb
Beam mass
81,27(g)
Ball radius
0,9cm)
Beam length
43 (cm)
Arm length
2,5(cm)
Kb
0,1174
Kt
0,1174
Parameters of System
Kg
Gear ratio
5(120/24)
Ra
Resistor of armature
10,4()
Jb
0.005(kg.m2)
JB
7,0114.10-7(kg.m2)
Jm
5,5136.10-5(kg.m2)
Ku
Amplifier gain
10(V/round)
Linear Model
Linear Model
x&1 f1 x, u
x&2 f 2 x, u
x&3 f 3 x, u
x& f x, u
4
4
In that:
f1 x, u x2
K g Kt L
f 4 x, u
Ra d
f 3 x, u x4
u
mB x1 x42 mB g sin x3
f 2 x, u
7
mB
5
K b K t K g2 L2
L
2mB x1 x2
x4 mB .gx1 mB g cos x3
2
Ra d
2
2
K
.
L
g
J b J B mB x12
Jm
d
Linear Model
rd ,0,0,0
Ra d
L
u
mB .g .rd mb .g
K g Kt L
2
*
*
f
x
,
u
0 we have:
With:
Linear Model
f1
x
1
f1
x2
f1
x3
f 2
x
1
f 2
x2
f 2
x3
f3
x2
f3
x3
f 4
x2
f 4
x3
dx
f x, u
dt
f3
x
1
f 4
x
1
Or:
f1
x4
f 2
x4
f 3
x4
f 4
x4
( x* , u * )
f1
u
f 2
u
*
x
f
3
u
f 4
u
dx
Ax% Bu% with: x% x x* , u% u u *
dt
u u
*
Linear Model
dt
y% 1 0 0 0 x%
Linear Model
0
5
0 g
7
0
0
K g L
J m mB g mB2 .g .rd2
Jb J B
2
2
K g L
J
J m mB .rd2
b
B
B 0 0 0
K g Kt L
Ra d J b J B
K g L
2
J m mB rd
d
K d Kt K L
2 2
g
K g L
2
Ra d J b J B
J m mB rd
Linear Model
Using above parameters, we have matrices:
0
1.0000
0
0
0
0
0
7.0000
0
0
, B
0
0
0
1.0000
0
0.8009
0
0
37.5428
3.7184
1 0 0 0
C
0
0
1
0
Linear Model
Inner structure of linear four states model:
Controller
Controller has to automatically regulate the position
of the ball on the beam.
Based on dynamic model, there are various controllers:
Controller
We can design many classical or modern feedback
controller for ball and beam system. Examples:
PID controllers.
LQR, LQG
PID-LQR
Fuzzy, Sliding mode,
Controller
State Feedback Controller:
The idea of feedback in state space control is similar
to that in the classical control system. The control
signal in full state feedback control is defined as
follow:
u K.x
Controller
State Feedback Controller:
LQR Controller
LQR Method:
The LQR stands for Linear Quadratic Regulator,
which seeks a gain matrix the minimises performance
index J:
J xT Qx u T Ru dt
0
LQR Controller
LQR Controller
Matrices are:
24 0 0 0
0 0.1 0 0
, R 0.03
Q
0 10 0
0
0 0 1
0
Control gains calculated using above Q, R is
presented as follow:
K LQR 28.5005 23.3660 67.1461 2.9950
LQR Controller
Simulation:
LQR Controller
Results from Simulation:
LQR Controller
Experiment:
To implement, we can use PC, or analog circuit. In this
case, an data acquisition card NI USB 6008 and PC
is used to implement LQR controller.
Experimental schematic:
LQR Controller
Real-Time
r
Sync
Real-Time
Synchronization
Subsystem6
r_dot
phi
phi_dot
Subsystem
Gain4
-30
-KGain
Scope
-KGain1
-KGain2
Um Gain5
*1
0.1
-1
U 0.2
m
*
-KGain3
LQR Controller
HWChannel0
1/1.77
USB-6008
Analog Output
(Single
Sample)
1
U
C
2.58
1
-Knidaq Dev1
USB-6008
HWChannel3
1
0.05s+1
Transfer Fcn
du
dt
Derivative
HWChannel7
Analog Input
(Single
Sample)
-K-
1
0.07s+1
Transfer Fcn1
du
1
r
2
r_dot
3
phi
dt
Derivative1
LQR Controller
Experimental Results:
Ball Position - r
LQR Controller
Tilt angle of the beam
LQR Controller
Velocity of ball - r&
LQR Controller
Angle velocity of beam - &
Conclusion