Vous êtes sur la page 1sur 7

Chapter (2)

Modelling: The balancing robot

The set of assumptions made to simplify modelling is as follow:

1 The wheels are always in contact with the floor and experience rolling with
no slip.
2 The electrical and mechanical losses can be approximated to zero.
3 The electrical system response is significantly faster than that of the
mechanical system, so the dynamic of the electrical system may be
neglected.
4 The motion of the robot is constrained to a straight line, so that the
system may be analysed as 2-D system
with only planar motion.
5 All bodies are rigid.
6 The angle of tilt from the vertical of the
upper body is sufficiently small to allow

linearization of the system ( sin( 2)=

2 )

7 And the angular velocity of the tilt of the upper


body is sufficientently small such (
.22 =0 ) that the centrifugal force may be neglected

For Wheel:

By applying Newtons second law:

FH= M1r ..

..
N+F= M1 r 1

FV = 0

V= P + M1g
T = I1 1..

..
T-F r = I1 1

..
I1 1 + Fr = T
..
I1 1 + (m1 + N) r =

.. ..
I1 1 + m1 r2 1
Nr =

..
I1 1 + m1 r2 ..1 + m2 r2 ..1 +m2Lr ..2 cos 2 - m2Lr

.2
2 sin 2 =

..
(I1+ m1 r 2 + m2 r 2 ) 1 + (m2Lr cos 2 ) ..2 m Lr .22 sin 2
2

For Body:

.. d2
FH = m2r 1 + m2 2 (L
sin 2 )
dt

-N= m2 r ..1 + m2L ..2 cos 2 - m2L

.2
2 sin 2

d2
FV = m2 (L- L
cos 2 )
dt 2

..
m2g p = m2L ( 2
sin 2 + .22 cos 2 )

-p =- m2g + m2L ..2 sin 2 + m2L .22 cos 2

P = m2g - m2L ..2 sin 2 - m2L .22 cos 2

T = J 2 2

- +PLSin
2 +NLCos 2 = J 2 ..
..
J 2 -PLSin
2 -NLCos 2 = -

..m2 glSi n2 2 + m2 l 2 .. Si n2 2 2 .2
J2 + m 2 l 2 Cos
2 Sin 2 + m2

..
rl 1 Cos
2 + m2 l 2 .. Co s 2 2 - m2 l 2 .22 cos 2 sin 2=

Linearization:

Replace

Sin =

.2 =0

Cos =1

1+ m1 r 2 +m2 r 2
( .. + m2 Lr ..1 =
I 1

2+ m2 L2 m2 rL 1m2 gL 2= -
( ) 2 +
I

Transfer function:

2
1=

G
..
.. m2 rl 2
=
1 2 2
I 1 +m 1 r + m2 r

2+ m 2 l 2 ..
m 2 rl 2
m rl m2 gl 2= -
( I ) 2 + 2
I 1 +m 1 r 2 +m 2 r 2 -

2+ m2 l 2
( )( I 1 +m 1 r 2+ m2 r 2 )
I

..2 +m2 rl ( m 2 rl 2 )m2 gl 2( I 1+ m1 r 2 +m2 r 2 ) = ( I 1+ m1 r 2 +m2 r 2 ) ( ( I 2+ m2 l 2 )( I 1+ m1 r 2+ m2 r 2 ) m22 l 2 r 2) ..2

ugal force may be neglected

ody is sufficientently small llow stem , so the dynamic of the electrical syst

2
G1 = By Laplace transformation

2+ m2 l 2
I
I
G1 2 2 2 2 2 2 2 2
=- ( ( I 1 +m 1 r + m2 r ) m 2 l r ) s m 2 gl( 1+m 1 r +m 2 r )

m2 rl+ I 1+(m1+ m2 )r 2

And zero initial condition

The modelling parameters:

[ ]
2 2
0.049 +0.065 2
I 1 = 0.08 2 = 5.3008*10-4 k.g. m
2

I 2 =0.24 0.06 2=8.64 104 k.g. m


2

m1=0.08 kg

m2=0.24 kg

L=0.06 m
R =0.0325 m

Transfer function after calculation:

2274.4451
G= 2
s 208.753

#--nichols and zigler

k u =0.1198

pu=0. .787

Initial calculation of PID constant:

k p =1.6 0.1198=0.19168

T i =0.5 0.787=0.3939

T D =0.125 0.787=0.0984

[
Dc ( s ) =0.19168 1+
1
0.3939 S
+ 0.0984 S
]

Iterations:
by using matlab:

D=-0.19168*(1+(1/(0.3935*s))+0.0984*s);
sys=G*D/(1+G*D);
step(sys);
D=-0.3*(1+(1/(0.3935*s))+0.0984*s);
sys=G*D/(1+G*D);
step(sys);
D=-0.3*(1+(1/(0.3935*s))+0.2*s);
sys=G*D/(1+G*D);
step(sys);
D=-0.3*(1+(1/(0.3935*s))+0.1*s);
sys=G*D/(1+G*D);
step(sys);
D=-0.5*(1+(1/(0.3935*s))+0.3*s);
sys=G*D/(1+G*D);
step(sys);
D=-0.5*(1+(1/(0.3935*s))+0.2*s);
sys=G*D/(1+G*D);
step(sys);
D=-0.5*(1+(1/(0.5*s))+0.2*s);
sys=G*D/(1+G*D);
step(sys);
D=-0.7*(1+(1/(0.5*s))+0.3*s);
sys=G*D/(1+G*D);
step(sys);

we obtained compensation equation:

[
D c ( s ) = 1+
1
2S
+ 0.35 S
]

Vous aimerez peut-être aussi