Sie sind auf Seite 1von 15

REPBLICA BOLIVARIANA DE VENEZUELA

MINISTERIO DEL PODER POPULAR PARA LA EDUCACIN SUPERIOR


I.U.P. SANTIAGO MARIO
EXTENSIN- COL CIUDAD OJEDA
ESCUELA: ING. DE MANTENIMIENTO MECNICO

EJERCICIO DE CONTROLES
AUTOMATICOS MATLAB

REALIZADO POR:
DINMARY REYES
JEAN ZAMBRANO
YURIMAR BALVUENA
ELVIS MARCANO
CIUDAD OJEDA, MAYO DE 2011.

A=[0 0 1 0; 0 0 0 1; 32.66 0 0 10.62; 0 0 0 -11.8]


A=
0
0
32.6600
0

0
0
0
0

1.0000
0
0
0

0
1.0000
10.6200
-11.8000

>> B=[0; 0; -8.82; 9.8]


B=
0
0
-8.8200
9.8000
>> C=[1 0 0 0; 0 1 0 0; 0 0 1 0; 0 0 0 1]
C=
1
0
0
0

0
1
0
0

0
0
1
0

0
0
0
1

>> D=[0; 0; 0; 0]
D=
0
0
0
0
>> Q=C
Q=
1
0
0
0

0
1
0
0

0
0
1
0

0
0
0
1

>> step(A,B,C,D)
>> impulse(A,B,C,D)
>> espaciodeestado= ss(A,B,C,D)
a=
x1 x2 x3 x4
x1
0
0
1
0
x2
0
0
0
1
x3 32.66
0
0 10.62
x4
0
0
0 -11.8

b=
x1
x2
x3
x4

u1
0
0
-8.82
9.8

c=
y1
y2
y3
y4

x1 x2
1 0
0 1
0 0
0 0

x3
0
0
1
0

x4
0
0
0
1

d=
y1
y2
y3
y4

u1
0
0
0
0

Continuous-time model.
>> data= espaciodeestado
a=
x1 x2 x3 x4
x1
0
0
1
0
x2
0
0
0
1
x3 32.66
0
0 10.62
x4
0
0
0 -11.8
b=
u1
x1
0
x2
0
x3 -8.82
x4 9.8
c=
x1 x2 x3 x4
y1 1 0 0 0
y2 0 1 0 0
y3 0 0 1 0
y4 0 0 0 1
d=
u1
y1 0
y2 0
y3 0
y4 0

Continuous-time model.
>> [oltfnum, oltfden]= ss2tf(A,B,C,D,1)
oltfnum =
0
0
0
0

-0.0000
0
-8.8200
9.8000

-8.8200
9.8000
-0.0000
-0.0000

0.0000
0 -320.068
0.0000
-320.0680

0
0
0
0

oltfden =
1.0000 11.8000 -32.6600 -385.3880

>> oltfnum= [0 -0.0000 -8.8200 0.0000 0]


oltfnum =
0

0 -8.8200

>> oltfden= [1.0000 11.8000 -32.6600 -385.3880 0]


oltfden =
1.0000 11.8000 -32.6600 -385.3880

>> funciondetransferencia_tf= tf(oltfnum, oltfden)


Transfer function: 1 angulo del brazo
-8.82 s^2
-----------------------------------s^4 + 11.8 s^3 - 32.66 s^2 - 385.4 s
>> oltfnum= [0

9.8000

0 -320.0680]

oltfnum =
0

9.8000

0 -320.0680

>> oltfden= [1.0000 11.8000 -32.6600 -385.3880 0]


oltfden =
1.0000 11.8000 -32.6600 -385.3880

>> funciondetransferencia_tf= tf(oltfnum, oltfden)

Transfer function: 2 velocidad del brazo


9.8 s^2 - 320.1
-----------------------------------s^4 + 11.8 s^3 - 32.66 s^2 - 385.4 s
Warning: Using a default value of 0.2 for maximum step size. The simulation
step size will be equal to or less than this value. You can disable this diagnostic
by setting 'Automatic solver parameter selection' diagnostic to 'none' in the
Diagnostics page of the configuration parameters dialog.
Warning: Using a default value of 0.2 for maximum step size. The simulation
step size will be equal to or less than this value. You can disable this diagnostic
by setting 'Automatic solver parameter selection' diagnostic to 'none' in the
Diagnostics page of the configuration parameters dialog.
>> oltfnum= [ 0 -8.8200 -0.0000

0.0000

0]

oltfnum =
0 -8.8200

>> oltfden= [1.0000 11.8000 -32.6600 -385.3880 0]


oltfden =
1.0000 11.8000 -32.6600 -385.3880

>> funciondetransferencia_tf= tf(oltfnum, oltfden)


Transfer function: 3 angulo del pendulo
-8.82 s^3
-----------------------------------s^4 + 11.8 s^3 - 32.66 s^2 - 385.4 s
>> oltfnum= [0

9.8000 -0.0000 -320.0680

oltfnum =
0

9.8000

0 -320.0680

0]

>> oltfden= [1.0000 11.8000 -32.6600 -385.3880 0]


oltfden =
1.0000 11.8000 -32.6600 -385.3880

>> funciondetransferencia_tf= tf(oltfnum, oltfden)


Transfer function: 4 velocidad del pendulo
9.8 s^3 - 320.1 s
-----------------------------------s^4 + 11.8 s^3 - 32.66 s^2 - 385.4 s
>> R=1
R=
1
>> [K,S,E]=lqr(A,B,Q,R)
K=
-30.8614 -1.0000 -5.4892 -3.1907
S=
87.0555
5.4892
14.5656
9.9599

5.4892
1.9866
0.9449
0.7484

14.5656
0.9449
2.5214
1.7091

9.9599
0.7484
1.7091
1.2126

E=
-18.1794
-5.0636 + 1.3756i
-5.0636 - 1.3756i
-0.6395
Warning: Using a default value of 0.4 for maximum step size. The simulation
step size will be equal to or less than this value. You can disable this diagnostic
by setting 'Automatic solver parameter selection' diagnostic to 'none' in the
Diagnostics page of the configuration parameters dialog.
>> R=200
R = 200
>> [K,S,E]=lqr(A,B,Q,R)

K=
-22.9593 -0.0707 -4.0181 -2.4410
S=
1.0e+003 *
9.2272
0.0568
1.6140
0.9840

0.0568
0.0175
0.0099
0.0075

1.6140
0.0099
0.2824
0.1722

0.9840
0.0075
0.1722
0.1051

E=
-11.8479
-5.7057 + 0.1689i
-5.7057 - 0.1689i
-0.0586
Warning: Using a default value of 2 for maximum step size. The simulation step
size will be equal to or less than this value. You can disable this diagnostic by
setting 'Automatic solver parameter selection' diagnostic to 'none' in the
Diagnostics page of the configuration parameters dialog.
NOTA: se aplico el mtodo de tanteo para conseguir el R mas efectivo y se
colocaron los dos que ha consideracin describen la seal de manera mas
representativa. Resultando R= 200 un valor eficiente
DISCRETA
Ts =
0.0050
>> [A,B]= c2d(A,B,Ts)
A=
1.0004
0
0.1633
0
B=
-0.0001
0.0001

0
1.0000
0
0

0.0050
0
1.0004
0

0.0001
0.0049
0.0516
0.9427

-0.0428
0.0476
>> [K,S,E]=dlqr(A,B,Q,R)
K=
-22.6310 -0.0687 -3.9606 -2.4060
S=
1.0e+006 *
1.8456
0.0114
0.3228
0.1968

0.0114
0.0035
0.0020
0.0015

0.3228
0.0020
0.0565
0.0344

0.1968
0.0015
0.0344
0.0210

E=
0.9425
0.9719 + 0.0008i
0.9719 - 0.0008i
0.9997
Warning: Using a default value of 2 for maximum step size. The simulation step
size will be equal to or less than this value. You can disable this diagnostic by
setting 'Automatic solver parameter selection' diagnostic to 'none' in the
Diagnostics page of the configuration parameters dialog.
Warning: Using a default value of 4 for maximum step size. The simulation step
size will be equal to or less than this value. You can disable this diagnostic by
setting 'Automatic solver parameter selection' diagnostic to 'none' in the
Diagnostics page of the configuration parameters dialog.
Warning: Using a default value of 0.4 for maximum step size. The simulation
step size will be equal to or less than this value. You can disable this diagnostic
by setting 'Automatic solver parameter selection' diagnostic to 'none' in the
Diagnostics page of the configuration parameters dialog.

Respuesta al Step de las matrices

Respuesta al Impulse de las matrices

SIMULACION A LAZO ABIERTO 1era ECUACION DE TRANFERENCIA


ANGULO DEL BRAZO

SIMULACION A LAZO CERRADO 1era ECUACION DE TRANFERENCIA


ANGULO DEL BRAZO

SIMULACION A LAZO ABIERTO 2da ECUACION DE TRANFERENCIA


VELOCIDAD DEL BRAZO

SIMULACION A LAZO CERRADO 2da ECUACION DE TRANFERENCIA


VELOCIDAD DEL BRAZO

SIMULACION A LAZO ABIERTO 3era ECUACION DE TRANFERENCIA


ANGULO DEL PENDULO DEL BRAZO

SIMULACION A LAZO CERRADO 3era ECUACION DE TRANFERENCIA


ANGULO DEL PENDULO DEL BRAZO

SIMULACION A LAZO ABIERTO 4ta ECUACION DE TRANFERENCIA


VELOCIDAD DEL PENDULO DEL BRAZO

SIMULACION A LAZO CERRADO 4ta ECUACION DE TRANFERENCIA


VELOCIDAD DEL PENDULO DEL BRAZO

SIMULACION CON R=1

SIMULACION CON R=200

MEJORA LA SEAL CON R=200


SIMULACION DISCRETA