Pole balancing robot and some control strategies
description
Transcript of Pole balancing robot and some control strategies
Pole balancing robot and some control
strategies
SRG Symposium 2004 - Pole Balancing Robot
2
Introduction
A sketch of PBR (Pole Balancing Robot)
f
| x
θ
Figure1: Pole balancing Robot
SRG Symposium 2004 - Pole Balancing Robot
3
Robotic vehicle would operate on the top of the table provided (refer to Fig.2a).
0.1 cm0.2 cm
1m 1m 1mRetro-reflectivetapes (1cm)
Region A(0.7 m)
(0. 9 m)
Region B( 1.6 m)
Region C(0.7 m)
0.1 m 0.1 m
X
X
Y
Y
0.5m
RoundedEdges
Fig.2.a. Pole Balancing Robot Table
Tabletop will have a slight gradient at the start (region A) and the end (region C) <shown in Fig.2a>
SRG Symposium 2004 - Pole Balancing Robot
4
A metallic wedge of cross section shown in Fig.2b.(not to scale) will be used as an obstacle.
The length of the wedge will match the width of the table.
The wedge will be painted to match the table surface.
A retro-reflective tape will be stuck to it at the middle to match the one on the table.
The judge will place the wedge in region B any where between the inner edges of the two innermost tapes so that the wedge is perpendicular to the path.
It will not be moved thereafter.
SRG Symposium 2004 - Pole Balancing Robot
5
Vehicle will be placed within the region A (See Fig. 2b).
L
H
5L
H= 5 mmL=10 mm
Fig.2.b Wedge Section (Enlarged View)
The operator may move the inverted pendulum to an upright position and release it upon receiving the signal from the judges.
The vehicle must balance the pole in the upright position for a minimum of 20 seconds without the vertical pole crossing the line X-X'.
SRG Symposium 2004 - Pole Balancing Robot
6
Upon completion of the task above, vehicle should move across the line X-X' once move through the region B, until the pole clears the
line Y-Y', without losing balance during transit
not hitting any part of the table or its own chassis
Upon completion of the task above, • vehicle must retrace the path, cross the line X-X'
again and get back to region A. This will complete one cycle.
• This time, during the retrace, the vehicle need not stay any length of time at region B or A, before the start of the second cycle.
SRG Symposium 2004 - Pole Balancing Robot
7
When an electronic sensing system is used for detecting the pole crossing Y-Y’ and X-X’ lines, the pole sensors at both sides will be placed such that the line of sight of the sensors will be 20 cm above the lines marked on the platform.
This may warrant that the robot moves further for the pole to intercept the line of sight of the sensors.
This is important since many robots have their poles inclined inwards towards the centre of platform at these points of turning back.
SRG Symposium 2004 - Pole Balancing Robot
8
Furthermore, no part of the robot other than the pole should be above 15 cm so that no other part of the robot (except the pole) would trigger the sensor.
The vehicle should repeat these cycles. To count these cycles as successful cycles they must be
followed by at least 20 seconds of static balancing at region A.
The robot may continue on (untouched) for more cycles, and complete them with 20 seconds of static balancing at the end, which if successful will be counted cumulatively.
If a robot is touched by the handler during the trial, it must be restarted for the next attempt.
SRG Symposium 2004 - Pole Balancing Robot
9
Pole Balancing Robot Dynamics The line diagram of a pole balancing robot is shown in
Fig.1.
The following equations can be written to describe the dynamics of the robot movement and the pole angle,θ.
[(M+m)s2 + Bs] X(s) + [(ml)s2 + (b/l)s] (s) = F(s) 1
ms2 X(s) + [mls2 + (b/l)s - mg] (s) = 0 2
SRG Symposium 2004 - Pole Balancing Robot
10
One Possible Approach:
mgsl
bslm
sm
sX
s
2
2
)(
)(
where,
M = mass of the vehicle
B = linear equivalent friction of the vehicle
m = mass of the pole
b = rotational friction of the pole
g = 9.81 m/s2
l = half length of the pole
x = distance
= angle in radians
3
SRG Symposium 2004 - Pole Balancing Robot
11
But, V(s) = s.X(s) 4
We can move a S from RHS to denominator. Hence,
mgsl
bslm
sm
sV
s
sXs
s
2)(
)(
)(
)( 5
The above Eqn.5 can be represented by Fig.3.
Figure.3. Angle versus velocity
-mS
mls2 + (b/l).S - mg
(s)V(s)
SRG Symposium 2004 - Pole Balancing Robot
12
Getting back to the problem at hand, for any vehicle with
Fig 4.Force acting on a vehicle
But torque is written as,
ta
bsm K
R
EVt
7
Also torque can be written as,
ww rft . 8
1
M s + B
F(s) V(s) a mass, M and friction coefficient, B, we can draw, for a given force f,
SRG Symposium 2004 - Pole Balancing Robot
13
Where r = diameter of the driving wheel
gta
bsw NK
R
EVt
9
§§ It has been assumed that there is only one motor §§
However, defining back emf as Eb,
Eb = Kb.m
Where,
m is the motor’s rotational velocity.
10.a
SRG Symposium 2004 - Pole Balancing Robot
14
v = r.w
Where, w is the driving wheel’s rotational velocity
wrgNvbK
bE
gNm
wrv
gNm
w
10.bBut,
10.c
SRG Symposium 2004 - Pole Balancing Robot
15
Connecting the above equations, a block diagram can be drawn
Kt.Ng
----------Ra r
1----------MS+B
Kb.Ng
--------------
r
VsV
Figure.5.Block diagram relating applied voltage to velocity
This can be simplified as:
2gb
2wa
wa
w
gb
NKrB)R(Ms
rB)R(Ms
r
NK
1
t
wgt
s
gt
s
K
rNK
V
V
NK
V
V
11
SRG Symposium 2004 - Pole Balancing Robot
16
With the above system as the core plant , one can produce a velocity control block diagram.
Tpwm
KtNg rMRa r
2S + BRa r2 + KtKbNg
2G
VR Vdel.Vs
Figure 6.Velocity Control of robotic vehicle
Where
Tpwm = PWM Period [half period]
del = ‘ON’ fractionG = Numerical Gain
SRG Symposium 2004 - Pole Balancing Robot
17
Block diagram can be drawn.
11 + MRa r
2S + BRar2+ KtKbNg2
(GVsKtNg r / Tpwm)
(GVsKtN r / Tpwm)
(MRa r2)S + [BRa r
2 + KtKbNg2 + (GVsKtNg r / Tpwm)]
VR(s) V(s)
V(s)VR(s)
Figure 7.Complete Block Diagrams
It all looks very complicated.
Note that it is still first order dynamics.
SRG Symposium 2004 - Pole Balancing Robot
18
Once you get the numbers, it is not as complicated as it appears.
Figure 8.Simplified Dynamics
Numerical Example:Let
G = 1000 Tpwm = 1000Kt = 0.033 Ng = 8.0 (gear ratio)r = 3 cm M = 2.5 KgRa = 6 B = 2Kb = Kt Vs = 28 Volts
Then the parameters can be easily computed.
Gm
Mm.S + Bm
VR(s) V(s)
SRG Symposium 2004 - Pole Balancing Robot
19
To get the overall picture, let us combine Fig 3 and Fig.8
Figure 9. Angle Versus Velocity Dynamics of a Pole balancing robot
Gm
Mm.S + Bm
-mS
mls2 + (b/l).S - mg
VR V(S)
(S)
SRG Symposium 2004 - Pole Balancing Robot
20
Control Options:
Common Strategy: Since there two outputs but only one manipulated
variable. In all our design we use two loop system. The position reference is in the outer loop and the
error generated is used as the angle reference to the inner loop to keep the pole vertical.
Actually many variations are possible.
SRG Symposium 2004 - Pole Balancing Robot
21
Implementation can be done using one of the following techniques:
1. Polynomial based controllers: In this controllers, one can describe the transfer function and form z-domain system and use a pole placement or LQC algorithms to derive a controllers. At times LQC controller may go unstable.
2. State space controllers: One can take a state apace model with x, v, angle, angular velocity as states. Again pole placement controllers can be implemented.
3. PD Controller: Simple proportional and derivative controllers also would work. But such system is only conditionally stable.
SRG Symposium 2004 - Pole Balancing Robot
22
Typical PBR
Fig.9. Typical PBR
In our design,
•use eZdsp™ mother board
•robot uses potentiometer, and one drop encoder.
•drivers are H-bridge drivers controlling two motors.
SRG Symposium 2004 - Pole Balancing Robot
23
CONCLUSION
During this brief talk, The basic competition event was described The model of a pole balancing robot as a
single input, multi-output system was derived Possibility of a two loop controller structure
was discussed A few controller design options were
suggested.