Sei sulla pagina 1di 19

Magnetic Levitator

Modellistica
Rappresentazione a blocchi
Modello Simulink
Parametri modello

M = 0.025

M = 0.0250

g = 9.8

g = 9.8000

k_i = 2.0e-4

k_i = 2.0000e-04

p_0 = 0.03

p_0 = 0.0300

i_0 = 1.0

i_0 = 1

... provare valori differenti per i0 e p0... sistema instabile!

Modello LTI
Stati di equilibrio
i_eq = 0.8

i_eq = 0.8000

p_eq = sqrt(k_i/M/g)*i_eq

p_eq = 0.0229

Linearizzazione

A = [0 1; 2*g/i_eq*sqrt(M*g/k_i) 0];
Introducendo il modello statico di un amplificatore di transconduttanza come generatore di corrente
pilotato in tensione:

k_A = 0.3

k_A = 0.3000

B = [0; -2*g/i_eq * k_A];

Introducendo quindi il modello statico di un sensore di posizione (con uscita nulla in corrispondenza
della posizione di equilibrio):

k_P = 600

k_P = 600

C = [k_P 0];
D = 0;

Analisi modale

S_OL = ss(A, B, C, D)
S_OL =

A =
x1 x2
x1 0 1
x2 857.5 0

B =
u1
x1 0
x2 -7.35

C =
x1 x2
y1 600 0

D =
u1
y1 0

Continuous-time state-space model.

p_OL=eig(S_OL);
damp(S_OL), dcgain(S_OL)

Pole Damping Frequency Time Constant


(rad/seconds) (seconds)

-2.93e+01 1.00e+00 2.93e+01 3.41e-02


2.93e+01 -1.00e+00 2.93e+01 -3.41e-02
ans = 5.1429

pzmap(S_OL),sgrid
impulse(S_OL)

T=2*pi/imag(p_OL(1))
T = Inf

bode(S_OL)

tf(S_OL)

ans =

-4410
-------------------------
s^2 - 3.553e-15 s - 857.5

Continuous-time transfer function.

zpk(S_OL)

ans =

-4410
-------------------
(s-29.28) (s+29.28)

Continuous-time zero/pole/gain model.

rank(ctrb(S_OL))

ans = 2

rank(obsv(S_OL))

ans = 2
Regolatore dinamico

Retroazione statica

wn = 45

wn = 45

z = 0.2

z = 0.2000
s_0 = -z*wn

s_0 = -9

w_0 = wn*sqrt(1-z^2)

w_0 = 44.0908

T_0 = 2*pi/w_0

T_0 = 0.1425

p_CL = [s_0+j*w_0; s_0-j*w_0]

p_CL =
-9.0000 +44.0908i
-9.0000 -44.0908i

 
K=place(A,B,p_CL)

K =
-392.1769 -2.4490

A_CL=A-B*K;
S_CL=ss(A_CL,B,C,D);
damp(S_CL), dcgain(S_CL)
Pole Damping Frequency Time Constant
(rad/seconds) (seconds)

-9.00e+00 + 4.41e+01i 2.00e-01 4.50e+01 1.11e-01


-9.00e+00 - 4.41e+01i 2.00e-01 4.50e+01 1.11e-01
ans = -2.1778

pzmap(S_CL), sgrid

impulse(S_CL)
bode(S_CL, S_OL)

Osservatore degli stati


tau_Obs=.01;
p_Obs=[-1/(tau_Obs+.0001); -1/(tau_Obs-0.0001)]

p_Obs =
-99.0099
-101.0101

L=place(A',C',p_Obs)'

L =
0.3334
18.0975

A_R=[A-B*K-L*C]

A_R =
1.0e+04 *
-0.0200 0.0001
-1.2884 -0.0018

B_R=L

B_R =
0.3334
18.0975

C_R=-K

C_R =
392.1769 2.4490

D_R=0

D_R = 0

R=ss(A_R,B_R,C_R,D_R)

R =

A =
x1 x2
x1 -200 1
x2 -1.288e+04 -18

B =
u1
x1 0.3334
x2 18.1

C =
x1 x2
y1 392.2 2.449

D =
u1
y1 0
Continuous-time state-space model.

damp(R), dcgain(R)

Pole Damping Frequency Time Constant


(rad/seconds) (seconds)

-1.09e+02 + 6.78e+01i 8.49e-01 1.28e+02 9.17e-03


-1.09e+02 - 6.78e+01i 8.49e-01 1.28e+02 9.17e-03
ans = 0.4730

zpk(R)

ans =

175.06 (s+44.54)
-----------------------
(s^2 + 218s + 1.648e04)

Continuous-time zero/pole/gain model.

bode(R)

 
S_R=feedback(S_OL,R,+1)

S_R =

A =
x1 x2 x3 x4
x1 0 1 0 0
x2 857.5 0 -2882 -18
x3 200 0 -200 1
x4 1.086e+04 0 -1.288e+04 -18

B =
u1
x1 0
x2 -7.35
x3 0
x4 0

C =
x1 x2 x3 x4
y1 600 0 0 0

D =
u1
y1 0

Continuous-time state-space model.

damp(S_R), dcgain(S_R)

Pole Damping Frequency Time Constant


(rad/seconds) (seconds)

-9.00e+00 + 4.41e+01i 2.00e-01 4.50e+01 1.11e-01


-9.00e+00 - 4.41e+01i 2.00e-01 4.50e+01 1.11e-01
-9.90e+01 1.00e+00 9.90e+01 1.01e-02
-1.01e+02 1.00e+00 1.01e+02 9.90e-03
ans = -3.5895

impulse(S_R,S_CL)
Provare con 0.001 s...

Verifica con simulatore


Impianto con regolatore dinamico: