• Non ci sono risultati.

ZERO Transmission zeros of LTI systems.

N/A
N/A
Protected

Academic year: 2021

Condividi "ZERO Transmission zeros of LTI systems. "

Copied!
8
0
0

Testo completo

(1)

LABORATORIO FONDAMENTI AUTOMATICA – 2ª ESERCITAZIONE TF Creation of transfer functions or conversion to transfer function.

Creation:

SYS = TF(NUM,DEN) creates a continuous-time transfer function SYS with numerator(s) NUM and denominator(s) DEN. The output SYS is a TF object.

SYS = TF(NUM,DEN,TS) creates a discrete-time transfer function with sample time TS (set TS=-1 if the sample time is undetermined).

S = TF('s') specifies the transfer function H(s) = s (Laplace variable).

Z = TF('z',TS) specifies H(z) = z with sample time TS.

You can then specify transfer functions directly as rational expressions in S or Z, e.g., s = tf('s'); H = (s+1)/(s^2+3*s+1)

SYS = TF creates an empty TF object.

SYS = TF(M) specifies a static gain matrix M.

POLE Compute the poles of LTI models.

P = POLE(SYS) computes the poles P of the LTI model SYS (P is a column vector). For state-space models, the poles are the eigenvalues of the A matrix.

descriptor case.

ZERO Transmission zeros of LTI systems.

Z = ZERO(SYS) returns the transmission zeros of the LTI model SYS.

[Z,GAIN] = ZERO(SYS) also returns the transfer function gain (in the zero-pole-gain sense) for SISO models SYS.

DCGAIN DC gain of LTI models.

K = DCGAIN(SYS) computes the steady-state (D.C. or low frequency) gain of the LTI model SYS.

ZPK Create zero-pole-gain models or convert to zero-pole-gain format.

Creation:

SYS = ZPK(Z,P,K) creates a continuous-time zero-pole-gain (ZPK) model SYS with zeros Z, poles P, and gains K. The output SYS is a ZPK object.

SYS = ZPK(Z,P,K,Ts) creates a discrete-time ZPK model with sample time Ts (set Ts=-1 if the sample time is undetermined).

S = ZPK('s') specifies H(s) = s (Laplace variable).

Z = ZPK('z',TS) specifies H(z) = z with sample time TS.

You can then specify ZPK models directly as rational expressions in S or Z, e.g., z = zpk('z',0.1); H = (z+.1)*(z+.2)/(z^2+.6*z+.09)

Conversion:

SYS = ZPK(SYS) converts an arbitrary LTI model SYS to the ZPK representation. The result is a ZPK object.

Data format:

For SISO models, Z and P are the vectors of zeros and poles (set Z=[] if no zeros) and K is the scalar gain.

PZMAP Pole-zero map of LTI models.

PZMAP(SYS) computes the poles and (transmission) zeros of the LTI model SYS and plots them in the complex plane. The poles are plotted as x's and the zeros are plotted as o's.

When invoked with left-hand arguments, [P,Z] = PZMAP(SYS)

returns the poles and zeros of the system in the column vectors P and Z. No plot is drawn on the screen.

(2)

The functions SGRID or ZGRID can be used to plot lines of constant damping ratio and natural frequency in the s or z plane.

For arrays SYS of LTI models, PZMAP plots the poles and zeros of each model in the array on the same diagram.

TZERO Transmission zeros of LTI systems.

Z = TZERO(SYS) returns the transmission zeros of the LTI system SYS.

[Z,GAIN] = TZERO(SYS) also returns the transfer function gain if the system is SISO.

Z = TZERO(A,B,C,D) works directly on the state space matrices and returns transmission zeros of the state-space system:

RESIDUE Partial-fraction expansion (residues).

[R,P,K] = RESIDUE(B,A) finds the residues, poles and direct term of a partial fraction expansion of the ratio of two polynomials B(s)/A(s).

If there are no multiple roots,

B(s) R(1) R(2) R(n)

--- = --- + --- + ... + --- + K(s) A(s) s - P1 s - P2 s - Pn

Vectors B and A specify the coefficients of the numerator and denominator polynomials in descending powers of s. The residues are returned in the column vector R, the pole locations in column vector P, and the direct terms in row vector K.

The number of poles is n = length(A)-1 = length(R) = length(P). The direct term coefficient vector is empty if length(B) < length(A), otherwise length(K) = length(B)-length(A)+1.

If P(j) = ... = P(j+m-1) is a pole of multplicity m, then the expansion includes terms of the form

Rj R(j+1) R(j+m-1)

--- + --- + ... + --- (s - Pj) (s - Pj)2 (s - Pj)m

SS2TF State-space to transfer function conversion.

[NUM,DEN] = SS2TF(A,B,C,D,iu) calculates the transfer function:

C sI A B D

s DEN

s s NUM

H = = ⋅( − )−1⋅ + )

( ) ) (

( of the system:



+

= +

=

Du Cx y

Bu Ax x&

from the iu'th input. Vector DEN contains the coefficients of the denominator in descending powers of s. The numerator coefficients are returned in matrix NUM with as many rows as there are outputs y.

TF2SS Transfer function to state-space conversion.

[A,B,C,D] = TF2SS(NUM,DEN) calculates the state-space representation:



+

= +

=

Du Cx y

Bu Ax x&

of the system:

) (

) ) (

( DEN s

s s NUM

H = )

from a single input. Vector DEN must contain the coefficients of the denominator in

descending powers of s. Matrix NUM must contain the numerator coefficients with as many rows as there are outputs y. The A,B,C,D matrices are returned in controller canonical form. This calculation also works for discrete systems. To avoid confusion when using this function with discrete systems, always use a numerator polynomial that has been padded with zeros to make it the same length as the denominator. See the User's guide for more details.

(3)

ESERCIZIO 1

: Si consideri il sistema continuo descritto dalla funzione di trasferimento:

G s s

s s

( ) = + + + 2 1 10

2

5 1

1a) Definizione del sistema

» num=[2 1];den=[10 5 1];

» G1=tf(num,den) Transfer function:

2 s + 1 --- 10 s^2 + 5 s + 1

1b1) Calcolo dei poli, degli zeri e del guadagno

» p=pole(G1)

» p=pole(G1) p =

-0.2500 + 0.1936i due poli complessi coniugati a parte reale negativa, -0.2500 - 0.1936i CNES soddisfatta per l’asintotica stabilità del sistema

» z=zero(G1) z =

-0.5000

» mi=dcgain(G1) mi =

1

1b2) Calcolo dei poli e degli zeri col comando pzmap;

calcolo degli zeri e della costante di trasferimento

» [pm,zm] = pzmap(G1) pm =

-0.2500 + 0.1936i -0.2500 – 0.1936i zm =

-0.5000

» [Z,GAIN] = tzero(G1) Z =

-0.5000 GAIN =

0.2000 non è il guadagno µ bensì la costante di trasferimento k 1b3) Calcolo dei poli e degli zeri col comando roots;

» zeri=roots(num) zeri =

-0.5000

» poli=roots(den) poli =

-0.2500 + 0.1936i -0.2500 – 0.1936i

1c) Determinazione del movimento forzato dell’uscita

» t=0:0.01:25;

» [y t]=step(G1,t);

» plot(t,y),grid

(4)

1e) Conversione Funzione di Trasferimento nel formato Zeri Poli e costante di trasferimento

» G1zp=zpk(G1) Zero/pole/gain:

0.2 (s+0.5)

--- 0,2 è la costante di trasferimento k e non il guadagno µ.

(s^2 + 0.5s + 0.1)

ESERCIZIO 2:

Si consideri ancora il sistema descritto dalla funzione di trasferimento G(s) 2a) Definizione del sistema mediante col comando tf

» num=[2 1];den=[10 5 1];

» G1tf=tf(num,den) Transfer function:

2 s + 1 --- 10 s^2 + 5 s + 1

2b) Calcolo della fdt fattorizzata poli, zeri e costante di trasferimento col comando zpk

» G1zpk=zpk(G1tf) Zero/pole/gain:

0.2 (s+0.5) --- (s^2 + 0.5s + 0.1)

2b) Calcolo dei Residui dello sviluppo di Heaviside della Trasformata di Laplace dell’uscita del sistema a un ingresso a scalino unitario col comando residue

[R,P,K] = residue(num,den) R =

0.1000 – 0.1291i 0.1000 + 0.1291i P =

–0.2500 + 0.1936i –0.2500 – 0.1936i K =

[]

(5)

ESERCIZIO 3:

Si considerino i sistemi descritti dalle seguenti funzioni di trasferimento:

1 3 2 ) 1

( 2

1 = + +

s s s

G

1 4

) 1

( 2

2 = + +

s s s

G

1 ) 1

( 2

3 = +

s s

G

1 1 . 0 ) 1

( 2

4 = − +

s s s

G

3.a) Tracciare nella stessa finestra i grafici della risposta forzata allo scalino unitario sca(t) dei quattro sistemi assegnati.

» num=1;den1=[2 3 1];den2=[4 1 1];den3=[1 0 1];den4=[1 -0.1 1];

» G1=tf(num,den1); ωωωωn2

= ½ ξξξξωωωωn = ¾ Ta = (5/ξξξωξωωωn) = 20/3

» G2=tf(num,den2); ωωωωn2

= ¼ ξξξξωωωωn = 1/8 Ta = (5/ξξξωξωωωn) = 40

» G3=tf(num,den3); ωωωωn2

= 1 ξξξξ = 0 →→→→ oscillazione persistente ampiezza Ymax = 1

» G4=tf(num,den4); ωωωωn2

= 1 ξξξξ < 0 →→→→ oscillazione amplificata

» t=0:0.005:40;

» y1=step(G1,t);

» y2=step(G2,t);

» y3=step(G3,t); oscillazione persistente, due poli p1,2 =±j, sovraelongazione pari a µ = 1

» y4=step(G4,t); oscillazione persistenti d’ampiezza crescente due poli complessi Re(p)

> 0

» plot(t,y1,t,y2,t,y3,t,y4),grid

Una seconda possibilità, sempre nell’ipotesi che la durata della simulazione sia stabilita dallo operatore, è fornita dal comando:

» figure(2),step(G1,G2,G3,G4,t)

Una possibile alternativa, non volendo definire il tempo della simulazione lasciando la scelta a Matlab, è fornita dall’istruzione seguente:

» figure(2),step(G1,G2,G3,G4)

Per meglio vedere la correttezza del calcolo relativo al tempo di assestamento

T

a

= 5/(ξω

n

)

si deve ritracciare in un’altra finestra solamente le risposte forzate y1(t) e y2(t); ciò si ottiene con il comando seguente:

» figure(3),plot(t,y1,t,y2),grid

(6)

3.b) Convertire uno dei sistemi in forma di stato

» [A,B,C,D] = tf2ss(num,den1) A =

-1.5000 -0.5000 1.0000 0 B =

1 0 C =

0 0.5000 D =

0

Si consideri anche il comando seguente

» G1ss=ss(G1) a =

x1 x2

x1 -1.5 -0.5 x2 1 0 b =

u1

x1 1 x2 0 c =

x1 x2

y1 0 0.5 d =

u1

y1 0 Continuous-time model

(7)

ESERCIZIO 5:

Si consideri lo schema a blocchi e le relative funzioni di trasferimento.

5.a) Calcolo della funzione di trasferimento tra l’ingresso u(t) e l’uscita y(t) )]

( ) (

·[

) (

· )

(s AU s B U s W s

Y = + − Y(s)=A(sU(s)+B·U(s)−B(sW(s)]

Ma: W(s) = C(s)·Y(s); la sostituzione nella relazione precedente fornisce la scrittura:

) ( )·

( )·

( ) (

· ) ( )·

( )

(s A s U s BU s B s C s Y s

Y = + − , da cui:

) ( )]·

( ) ( [ ) ( )]·

( )·

( 1

[ +B s C s Y s = A s +B s U s

La funzione di trasferimento fra l’ingresso U(s) e l’uscita Y(s) è definita dalla relazione:

) ( ) ( 1

) ( ) ) (

) ( (

) (

s C s B

s B s s A

s G U

s Y

uy + ⋅

= +

=

5.a1) Definire in Matlab le tre funzioni di trasferimento A(s), B(s) e C(s), indi definire Guy(s)

» numa=1;dena=[0.1 1];

» numb=41/18;denb=[5 1];

» numc=2;denc=[5/9 1];

» FDTA=tf(numa,dena);

» FDTB=tf(numb,denb);

» FDTC=tf(numc,denc);

» Guy=(FDTA+FDTB)/(1+FDTB*FDTC)

5.a2) Definire i vettori dei poli e degli zeri di Guy(s), indi definire il guadagno.

» poliGuy=pole(Guy) poliGuy =

-10.0000 -1.0000 + 1.0000i -1.0000 - 1.0000i -0.2000

» zeriGuy=zero(Guy)

zeriGuy = cancellazione NON critica POLO-ZERO -1.8000

-0.6270 -0.2000

» miGuy=dcgain(Guy) miGuy =

0.5900

5.a3) Simulare la risposta allo scalino unitario di Guy(s)

» [y,t]=step(Guy);

» plot(t,y),grid ⇔⇔⇔⇔ Matlab determina il grafico di y(t) utilizzando un tempo pari a t = 5 meglio considerare una maggiore durata della simulazione; consiglierei di usare t ≥≥≥≥ 6

C B A

+

y

u

w ( 1 0 . 1 · )

) 1

( s s

A = +

)

· 5 1 (

18 ) 41

( s s

B = +

] )·

9 / 5 ( 1 [ ) 2

( s s

C = +

(8)

5.a4) Determinare una funzione di trasferimento Kuy(s) che sia un’approssimazione a poli dominanti della funzione di trasferimento Guy(s) e confrontare l’andamento della risposta allo scalino unitario di Kuy(s) rispetto a quella di Guy(s)

» miKuy=miGuy*(poliGuy(2)*poliGuy(3))/(-zeriGuy(2)) miKuy =

1.8820

» Kuy=zpk(zeriGuy(2),poliGuy(2:3),miKuy) Zero/pole/gain:

1.882 (s+0.627) --- (s^2 + 2s + 2)

» step(Kuy,Guy)

Si considerano come poli dominanti i due poli complessi coniugati p2 = -1.0000 +1.0000i p3 = -1.0000 −−−−1.0000i e come zero lo zero più vicino all’asse immag.

z2=−−−−0.6270

(si ricordi che il polo p4=-0,2 viene cancellato dallo zero z3=-0,2)

Riferimenti

Documenti correlati

Sobre el parcelario de la villa –que se documenta desde los años 1120, mucho antes de su “po- blación” oficial–, se aprecia un cierto núme- ro de unidades de aspecto regular

Interventions that reduce high blood pressure, cholesterol, and glucose might address about half of excess risk of coronary heart disease and three-quarters of excess risk of

In general, the FEL radiation can be of two different kinds: basic spontaneous emission, i.e., synchrotron radiation, which comes from the direct interaction of the e-beam with

► Per una gestione ottima della QoS, le infrastrutture di rete devono soddisfare due vincoli fondamentali:.. ƒ Traffic Oriented: instradare i flusso di traffico sulla base dei

• L’obiettivo è di identificare delle formule per il progetto dei gradi di libertà (, ) al fine di assegnare una certa pulsazione di attraversamento e un certo margine di

Thus, the primary objective of the present review is to summarize and collect information available in the literature on the effect of heat stress, resulting from global warming,

Figure 22: A cytoplasmic mutant p53 drives the oncogenic response to insulin. A-B) Insulin-induced proliferation and invasion are mediated by cytoplasmic mutant p53.