Sistemas de Control I

SISTEMAS DE CONTROL I umich+matlab www.drexel.edu LABORATORIO DE CONTROL CON MATLAB. Suponemos que tenemos un modelo en

Views 124 Downloads 4 File size 511KB

Report DMCA / Copyright

DOWNLOAD FILE

Recommend stories

Citation preview

SISTEMAS DE CONTROL I umich+matlab www.drexel.edu

LABORATORIO DE CONTROL CON MATLAB. Suponemos que tenemos un modelo en el espacio de estados [A,B,C,D] A= matriz de estado, multiplicaba las variables de estado.

MODELO DE FUNCIÓN DE TRANSFERENCIA

De función de transferencia a espacio de estados [A,B,C,D] = tf2ss(num,dem)

̇

[num,dem]=ss2tf(A,B,C,D,iµ) ̇ [ ] ̇

[ [

Ejercicio #1 A=[0,1;-2,-3]; B=[1,0;0,1]; C=[1,0]; D=[0,0]; [num,den]=ss2tf(A,B,C,D,1) num = 0

1

3

3

2

den = 1 1

Uso de superposición en MATLAB

][ ] ][ ]

[

[

][ ][

]1

]

>> [num,den]=ss2tf(A,B,C,D,2) num = 0

0

1

3

2

den = 1

>> num=[2 5 3 6]; >> den=[1 6 11 6]; >> [r,p,k]=residue(num,den) r= -6.0000 -4.0000 3.0000 p= -3.0000 -2.0000 -1.0000 k= 2 Entonces:

ESCALÓN step(num,dem) step(num,dem,t)

step(A,B,C,D,iµ,t) [y,x,t]=step(num,den,t) [y,x,t]=step(A,B,C,D,iµ,t)

>> num=[0 0 2 4]; >> den=[1 1.3 7 4]; >> step(num,den)

RESPUESTA DEL SISTEMA

MULTIPLICACIÓN DE VECTORES. help conv Ejemplo (s+1)*(s+5) conv([1 1],[1 5])

ans =

1

6

5

MULTIPLICACIÓN DE BLOQUES help series Entonces el ejercicio:

Queda: Bloque 2: s(s+1)(s+5) conv([0 1 0],[1 6 5]) ans =

0

1

6

5

0

num=[0 0 0 0 1] dem=[0 1 6 5 0] Su FT: A=tf([0 0 0 0 1],[0 1 6 5 0])

A=

1 ----------------s^3 + 6 s^2 + 5 s Bloque 1: 6.3223(s+1.4235)2 >> conv([1 1.4235],[1 1.423])

ans =

1.0000 2.8465 2.0256

>> ans*6.3223

ans =

6.3223 17.9964 12.8067 B=tf([6.3223 17.9964 12.8067],[0 1 0])

B=

6.322 s^2 + 18 s + 12.81 -----------------------s

Continuous-time transfer function. Y para tener un solo bloque: M=series(B,A)

M=

6.322 s^2 + 18 s + 12.81 -----------------------s^4 + 6 s^3 + 5 s^2

Continuous-time transfer function. Dándonos:

Para el sistema en retroalimentación: help feedback2 F=feedback(M,1)

F=

6.322 s^2 + 18 s + 12.81 -------------------------------------s^4 + 6 s^3 + 11.32 s^2 + 18 s + 12.81

Continuous-time transfer function. Con respuesta al paso: >> num=[0 0 6.322 18 12.81]; >> den=[1 6 11.32 18 12.81]; >> step(num,den)

En 10 segundos se estabiliza

2

Asume directamente retroalimentación negativa, para colocarla positiva se coloca F=feedback(M,1,+1)

Con tiempo estimado: >> num=[0 0 6.322 18 12.81]; >> den=[1 6 11.32 18 12.81]; >> t=0:0.01:20; >> step(num,den,t)

USO DE SCRIPT’S

Ejemplo en script: num=[0 0 6.322 18 12.81]; den=[1 6 11.32 18 12.81]; [c,x,t]=step(num,den); plot(t,c,'0') grid on tittle('Respuesta al escalón') xlabel('t seg') ylabel('salida C')

Ejemplo: Control de un de:

Caso 1: J=1

Kp=1

b=0.5

J=1

Kp=1

b=0.5

Caso 2: num1=[0 0 1]; den1=[1 0.5 1]; num2=[0 0 1]; den2=[0 0.5 4]; step(num1,den1,'-r') hold on step(num2,den2,'-g') grid on title('Respuesta al escalón de dos sistemas') text(9,0.9,'Sistema 1')

TAREA:3 1)

[(

)]

A=[0,1,0,0;0,0,1,0;0,0,0,1;-100,-80,0,-8] B=[0;0;0;15] C=[0,0,0,0] D=[0] A= 0 0 0 -100

1 0 0 0 1 0 0 0 1 -80 0 -8

B= 0 0 0 15

C= 0

0

0

0

D= 0 >> [num,den]=ss2tf(A,B,C,D,1) num = 0

3

Leer Richard Dorf

0

0

0

0

[

]

den = 1.0000 8.0000 -0.0000 80.0000 100.0000 2)

Polos y ceros Efectuamos en el denominador la función convolución y la multiplicamos por la constante 5: conv([1 1],[1 10]) ans = 1 11 10 >> ans*5 ans = 5 55 50 Por lo que para hallar polos y ceros realizamos la operación: num=[20 20 10] den=[5 55 50] [r,p,k]=residue(num,den) num = 20 20 10

den = 5 55 50

r= -40.2222 0.2222

p= -10 -1

k= 4

3) Graficar la respuesta al paso

t=0:0.01:10 num=[0 0 25] den=[1 4 25] t=0:0.01:10; step(num,den,t) num = 0

0 25

den = 1

4 25

AYUDAS DE COMANDOS HELP CONV conv Convolution and polynomial multiplication. C = conv(A, B) convolves vectors A and B. The resulting vector is length MAX([LENGTH(A)+LENGTH(B)-1,LENGTH(A),LENGTH(B)]). If A and B are vectors of polynomial coefficients, convolving them is equivalent to multiplying the two polynomials.

C = conv(A, B, SHAPE) returns a subsection of the convolution with size specified by SHAPE: 'full' - (default) returns the full convolution, 'same' - returns the central part of the convolution that is the same size as A. 'valid' - returns only those parts of the convolution that are computed without the zero-padded edges. LENGTH(C)is MAX(LENGTH(A)-MAX(0,LENGTH(B)-1),0).

Class support for inputs A,B: float: double, single

See also deconv, conv2, convn, filter and, in the signal Processing Toolbox, xcorr, convmtx.

Overloaded methods: gf/conv gpuArray/conv

Reference page in Help browser doc conv

HELP SERIES series Series connection of two input/output models.

+------+ v2 --->| +------+ |

| M2 |-----> y2

|------->|

u1 ----->|

|

|

|y1 u2 +------+

| M1 | |

|---> z1

+------+

M = series(M1,M2,OUTPUTS1,INPUTS2) connects the input/ouput models M1 and M2 in series. The vectors of indices OUTPUTS1 and INPUTS2 specify which outputs of M1 and which inputs of M2 are connected together. The resulting model M maps u1 to y2.

If OUTPUTS1 and INPUTS2 are omitted, series connects M1 and M2 in cascade and returns M = M2 * M1.

If M1 and M2 are arrays of models, series returns a model array M of the same size where M(:,:,k) = series(M1(:,:,k),M2(:,:,k),OUTPUTS1,INPUTS2) .

For dynamic systems SYS1 and SYS2, SYS = series(SYS1,SYS2,'name') connects SYS1 and SYS2 by matching their I/O names. The output names of SYS1 and input names of SYS2 should be fully defined.

See also append, parallel, feedback, InputOutputModel, DynamicSystem.

Overloaded methods: InputOutputModel/series

Reference page in Help browser doc series

HELP FEEDBACK feedback Feedback connection of two input/output systems.

M = feedback(M1,M2) computes a closed-loop model M for the feedback loop:

u --->O---->[ M1 ]----+---> y |

|

y=M*u

+-----[ M2 ]|

|--------> z

| M1 | u --->O---->| | |

|----+---> y

+------+ | |

+-----[ M2 ]