• Non ci sono risultati.

Sintesi di reti correttrici

N/A
N/A
Protected

Academic year: 2021

Condividi "Sintesi di reti correttrici"

Copied!
10
0
0

Testo completo

(1)

Sintesi di reti correttrici

Block scheme for the continuous time case:

- -

C (s)

-

G(s)

-

6

r(t) e(t) m(t) y (t)

C (s) is the compensator to be designed:

C (s) = 1 + τ

1

s

1 + τ

2

s (1)

Let γ

0

and γ denote:

γ

0

= lim

s→0

C (s) = 1, γ = lim

s→∞

C (s) = τ

1

τ

2

The Bode magnitude and phase plots of compensator C(s):

10−2 10−1 100 101 102

−20

−15

−10

−5 0 5 10 15 20

γ > 1

γ < 1 γ

0

= 1

Magnitude|C(jω)|[db]

10−2 10−1 100 101 102

−60

−40

−20 0 20 40 60

γ > 1

γ < 1

PhaseofC(jω)[deg]

Frequency ω [Log10]

(2)

Design Problem (continuous time): find the parameters τ

1

and τ

2

of compensator (1) such that

C (jω) = 1 + j ωτ

1

1 + j ωτ

2

= M e

(2)

where M and ϕ are the magnitude and the phase desired at frequency ω.

Inversion formulas (continuous time): the continuous time design problem is solved by using the following inversion formulas:

τ

1

= M − cos ϕ

ω sin ϕ , τ

2

= cos ϕ −

M1

ω sin ϕ (3)

Graphical design procedure:

G(jω)

A

1

1

A

2

2

B

B

2

=

γB

2

B

1

=

γB

1

O

The parameters τ

1

and τ

2

of compensator C(s) that moves point A = M

A

e

A

in B = M

B

e

B

can be obtained using the following parameters:

M = M

B

M

A

, ϕ = ϕ

B

− ϕ

A

, ω = ω

A

(4)

(3)

Numerical example . Given the system:

G(s) = 25

s(s + 1)(s + 10) ,

let us design a lead compensator C

1

(s) which imposes a phase margin M

ϕ

= 60

o

and with the gain γ as small as possible. Nyquist diagram:

A

ω

G(jω) ω

1

ω

2

α

B

G

G

c

(jω)

−1 O

Point B is:

M

B

= 1, ϕ

B

= π + M

ϕ

= 240

o

, Choose point A:

M

A

= 0.538, ϕ

A

= 194.9

o

, ω

A

= 2.02.

The parameters M and ϕ are the following:

M = M

B

M

A

= 1.859, ϕ = ϕ

B

− ϕ

A

= 45.1

o

. Substituting one obtains::

C

1

(s) = (1 + 0.806 s)

(1 + 0.117 s) .

(4)

The step responses of the two systems G(s) and G

c

(s) = C

1

(s)G(s) controlled in closed loop:.

0 5 10 15

0 0.5 1 1.5

secondi

(5)

The Discrete Time Case

The considered block scheme for the discrete time case:

- -

C

d

(z)

-

HG(z)

-

6

r

n

e

n

m

n

y

n

HG(z) is the discrete system to be controlled, H

0

(s) is the zero-order hold:

HG(z) = Z[H

0

(s) G(s)], H

0

(s) = 1 − e

−T s

s C

d

(z) is the compensator to be designed:

C

d

(z) = 1 + α(z − 1)

1 + β(z − 1) (5)

The frequency response of function C

d

(z):

10−2 10−1 100 101 102

−15

−10

−5 0 5 10 15

γ

d

> 1 γ

d

= 1 γ

d

< 1 γ

0

= 1

Magnitude|Cd(z)|[db]

10−2 10−1 100 101 102

−60

−40

−20 0 20 40 60

γd>1

γd<1

PhaseofCd(z)[deg]

Frequency ω ∈ [0, π/T ]

Design Problem (discrete time): find the parameters α and β of compensator (5) such that:

C

d

(e

jωT

) = 1 + α(e

jωT

− 1)

1 + β(e

jωT

− 1) = M e

, (6)

(6)

Inversion formulas (discrete time): the discrete time design problem is solved by the following inversion formulas:

α = 1

2 + M − cos ϕ 2 sin ϕ tan

ωT2

β = 1

2 + cos ϕ −

M1

2 sin ϕ tan

ωT2

(7)

Remark: these formulas can also be rewritten in the following form:

α = 1

2 + ω τ

1

2 tan

ωT2

β = 1

2 + ω τ

2

2 tan

ωT2

(8)

where τ

1

and τ

2

are obtained from the continuous time inversion formulas.

Remark: the same result is obtained applying the bilinear transformation with prewarping to compensator C(s):

s = ω tan

ωT2

 z − 1 z + 1



↔ z = 1 +

ωs

tan

ωT2

1 −

ωs

tan

ωT2

Numerical example. Let us refer to the same system

G(s) = 25

s (s + 1)(s + 10)

considered in the previous numerical example. Design a discrete lead compen- sator C

d

(z) which imposes a phase margin M

ϕ

= 60

o

when T = 0.15 s. The discrete system HG(z) is the following:

HG(z) = Z [H

0

(s)G(s)] = (9.657z

2

+ 26.66z + 4.259)10

−3

z

3

− 2.084z

2

+ 1.276z − 0.192 .

(7)

Nyquist plane when T = 0.15 s:

−1.5 −1 −0.5 0 0.5

−1

−0.8

−0.6

−0.4

−0.2 0 0.2

Nyquist plane: T = 0.15 s

Re

Im

−1

A

B

HG(z)

Cd(z)HG(z) G(s)

The design specification M

ϕ

= 60

o

completely defines point B = M

B

e

B

: M

B

= 1, ϕ

B

= π + M

ϕ

= 240

o

Point A = HG(e

AT

) = M

A

e

A

is chosen on the Nyquist diagram of function HG(z) for ω = ω

A

:

M

A

= 0.5361, ϕ

A

= 186.2

o

, ω = 2.02.

Point A belongs to the admissible domain: the dotted half circle. Parameters M and ϕ are now the following:

M = M

B

M

A

= 1.865, ϕ = ϕ

B

− ϕ

A

= 53.76

o

.

Substituting M , ϕ, ω and T in the discrete inversion formulas (7) one obtains α = 5.673 and β = 0.723. The discrete compensator is the following:

C

d

(z) = 1 + α(z − 1)

1 + β(z − 1) = 1 + 5.673(z − 1) 1 + 0.723(z − 1)

The same C

d

(z) can be obtained applying the bilinear transformation with

(8)

In the figure it is also reported (blue dash-dotted thick line) the step response of the system C

b

(z)HG(z) controlled in closed loop, when the discrete com- pensator C

b

(z) is obtained from C

1

(s) by using the bilinear correspondence between the s and z complex variables:

C

b

(z) = (1 + 0.806 s) (1 + 0.117 s)

s=T2 z−1z+1

= 1.762 z − 1.462 0.384 z − 0.084 .

Step responses of the considered systems controlled in closed loop. Sampling period: T = 0.15 s.

0 0.5 1 1.5 2 2.5 3 3.5 4

0 0.2 0.4 0.6 0.8 1 1.2

Step response: T = 0.15 s

y (t )

Time (s) Matlab file “Formule di Inversione discrete.m”:

%

% Esempio di applicazione delle formule di inversione discrete clear all

close all

Mf=60; % Specifica di progetto

Mb=1; Fb=pi+Mf*pi/180;

B=Mb*exp(j*Fb); % Scelta del punto B

thick=1.8; % Linea spessa

thin=0.5; % Linea sottile

Tfin=4; % Durata della simulazione

s=tf(’s’);

gs=25/(s*(s+1)*(s+10)); % Funzione di trasferimento gs

(9)

gs0=feedback(gs,1); % Sistema retroazionato gs0=gs/(1+gs)

T=0.15; % Periodo di campionamento

z=tf(’z’,T);

gz=c2d(gs,T,’zoh’) % Si discretizza (gz) il sistema gs

wa=2.02; % Scelta della pulsazione

A=evalfr(gz,exp(T*wa*j)); % Scelta del punto A Ma=abs(A); Fa=angle(A);

M=Mb/Ma % Calcolo dei parametri per le formule di inversione phi=Fb-Fa-2*pi; phi*180/pi [alfa,beta]=alfa_beta(M,phi*180/pi,wa,T)

%

grz=(1+alfa*(z-1))/(1+beta*(z-1)); % Rete correttrice tempo discreto Ac=evalfr(gs,wa*j); % Scelta del punto Ac

Mac=abs(Ac); Fac=angle(Ac);

Mc=Mb/Mac; % Calcolo dei parametri per le formule di inversione phic=Fb-Fac; [tau1,tau2]=tau1tau2(Mc,phic*180/pi,wa);

grs=(1+0.806*s)/(1+0.117*s); % Rete correttrice tempo continuo [tau1,tau2]=tau1tau2(M,phi*180/pi,wa)

grs1=(1+tau1*s)/(1+tau2*s) % Rete correttrice tempo continuo grsz=c2d(grs1,T,’prewarp’,wa) minreal(grz)

%

gsr=grs*gs;

gsr0=feedback(gsr,1); % Sistema tempo continuo retroazionato gsr0=gsr/(1+gsr)

%

gzr=grz*gz;

gzr0=feedback(gzr,1); % Sistema tempo discreto retroazionato gzr0=gzr/(1+gzr)

%

k=1; tau1=0.806; tau2=0.117; % 3) Metodo della trasformazione bilineare

%

a=k*(T+ 2*tau1); b=k*(T-2*tau1); c=T+2*tau2; d=T-2*tau2;

grz3=(a*z+b)/(c*z+d) grgz3=grz3*gz;

gz3=feedback(grgz3,1); % Sistema con rete discretizzata: gz3=grgz3/(1+grgz3)

%

figure(1); hold off; clf

%

[y,t]=step(gsr0,Tfin); % Risposta del sistema continuo con rete correttrice h=plot(t,y,’k’); hold on set(h,’Linewidth’,thin)

%

[y,t]=step(gz3,Tfin); % Risposta del sistema discreto con rete discretizzata h=stairs(t,y,’b-.’); hold on set(h,’Linewidth’,thick)

%

[y,t]=step(gzr0,Tfin); % Risposta del sistema discreto con rete correttrice h=stairs(t,y,’r’); hold on set(h,’Linewidth’,thick)

%

plot([0 1000],[1 1],’:’) axis([0 Tfin 0 1.3]) xlabel(’Time (s)’) ylabel(’y(t)’) title([’Step response, T=’ num2str(T)])

%

(10)

[re,im]=nyquist(gs,{0.1,100}); % Nyquist del sistema continuo senza rete correttrice h=plot(re(:,:),im(:,:),’k--’); hold on set(h,’Linewidth’,thin)

%

[re,im]=nyquist(gsr,{0.1,100}); % Nyquist del sistema continuo con rete correttrice h=plot(re(:,:),im(:,:),’k’); hold on set(h,’Linewidth’,thin)

%

[re,im]=nyquist(gz,{0.1,100}); % Nyquist del sistema discreto senza rete correttrice h=plot(re(:,:),im(:,:),’r--’); hold on set(h,’Linewidth’,thick)

%

[re,im]=nyquist(gzr,{0.1,100}); % Nyquist del sistema discreto con rete correttrice h=plot(re(:,:),im(:,:),’r’); hold on set(h,’Linewidth’,thick)

[re,im]=nyquist(grgz3,{0.1,100}); % Nyquist del sistema discreto con rete discretizzata h=plot(re(:,:),im(:,:),’b-.’); hold on set(h,’Linewidth’,thick)

%

Dominio_Rete_Ant_Nyq(Mf,Mb) % Graficazione del dominio di ammissibilit

plot(A,’*’); % Graficazione del punto A

plot(B,’*’); % Graficazione del punto B

V=[-1.5 0.5 -1.1 0.4]; dx=(V(2)-V(1))/40; dy=(V(4)-V(3))/30;

freccia(real(A),imag(A),real(B),imag(B),dx,dy) axis(V) plot(-1,0,’*’) plotaxis(V) xlabel(’Real’) ylabel(’Imag’) title([’Nyquist. T=’ num2str(T)])

text(real(A)+0.02,imag(A)-0.02,’A’) text(real(B)-0.08,imag(B),’B’) text(-1-0.06,0.02,’m1’) C=evalfr(gz,exp(T*0.7*wa*j));

text(real(C)-0.08,imag(C),’C’) D=evalfr(gzr,exp(T*0.9*wa*j));

text(real(D)-0.08,imag(D),’D’) text(-1,-0.65,’G’)

%

File Matlab “alfa beta.m”

function [alfa,beta]=alfa_beta(M,phi,omega,T)

% [alfa,beta]=alfa_beta(M,phi,omega,T)

%

% calcola alfa, beta di una rete correttrice discreta

% M : guadagno

% phi : fase

% omega : pulsazione

% T : periodo di campionamento

%

phirad=phi*pi/180;

tw1=(M-cos(phirad))/(sin(phirad));

tw2=(cos(phirad)-1/M)/(sin(phirad));

tau1_tau2=[tw1/omega tw2/omega ] alfa=0.5+tw1/(2*tan(omega*T/2));

beta=0.5+tw2/(2*tan(omega*T/2));

return

Riferimenti

Documenti correlati

NOTA BENE: la collocazione dei domini dipende SOLO dal punto B, NON dipende dalla funzione

IL PROGETTO DEI REGOLATORI... IL PROGETTO

[r]

s h per fare una scelta ottimale del parametro K in modo da garantire la stabilit´a del sistema retroazionato ed eventualmente il minimo tempo di assestamento alla risposta al

s h per fare una scelta ottimale del parametro K in modo da garantire la stabilit´a del sistema retroazionato ed eventualmente il minimo tempo di assestamento alla risposta al

Generalmente, vengono utilizzate forme regolari di celle e quindi di cluster per coprire un'area di servizio. Possiamo fare un banale conto per renderci conto del fatto che il

● Il collegamento ad Internet avviene tramite un dispositivo Il collegamento ad Internet avviene tramite un dispositivo (scheda di rete, modem, scheda wireless) che utilizza un

Poich´ e ` e richiesto un errore a regime finito e non nullo in risposta alla rampa parabolica, il sistema deve essere di “tipo due” e quindi occorre aggiungere un secondo