Sie sind auf Seite 1von 8

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%PRACTICA 10 ******************************

%%%%%%%%%%%%%%Laboratorio de Control Automatico**********************


%Nombre: William Apupalo GR2
%***** Respuesta a escalon unitario de sistema compensado y no compensado
% Primer Ejercicio

num1=[11.45 23.47];
den1=[1 5.42 16.86 23.47];
num=[76.39];
den=[1 1.32 76.39];
t=0:0.05:10;
c1=step(num1,den1,t);
c=step(num,den,t);
plot(t,c1,'-',t,c,'-')
grid
title('Grafica')
xlabel('t')
ylabel('Salidas c1,c')

%Grafico del sistema compensado


F=tf([11.45 23.47],[1 5,42 16.86 23.47])
margin(F)
stepinfo(F)

F =

11.45 s + 23.47
--------------------------------------
s^4 + 5 s^3 + 42 s^2 + 16.86 s + 23.47

Continuous-time transfer function.

ans =

RiseTime: 1.3963
SettlingTime: 21.5755
SettlingMin: 0.7553
SettlingMax: 1.5151
Overshoot: 51.5122
Undershoot: 0
Peak: 1.5151
PeakTime: 3.8908

1
Respuesta a escalon unitario de sistema com-
pensado y no compensado
Primer Ejercicio

numb=[140 670.6];
denb=[1 18.42 173.8 686.36];
numa=[4];
dena=[1 1 0.96];
t=0:0.05:10;
cb=step(numb,denb,t);
ca=step(numa,dena,t);
plot(t,cb,'-',t,ca,'-')
grid
title('Grafica')
xlabel('t')
ylabel('Salidas c1,c')

%Grafico del sistema compensado


H=tf([140 670.6],[1 18.42 173.8 686.36])
margin(H)
stepinfo(H)

H =

2
140 s + 670.6
---------------------------------
s^3 + 18.42 s^2 + 173.8 s + 686.4

Continuous-time transfer function.

ans =

RiseTime: 0.1355
SettlingTime: 0.8037
SettlingMin: 0.9192
SettlingMax: 1.2443
Overshoot: 27.3502
Undershoot: 0
Peak: 1.2443
PeakTime: 0.3360

%***** Respuesta a escalon unitario de sistema compensado y no compensado


% DC DC REDUCTOR

nume=[0.28e-6 1];
dene=[4.24e-10 2.22e-6 1];

3
numd=[1.036e-6 3.7 555];
dend=[4.24e-10 0.000071 5.056 180866];
t=0:0.0000005:0.001;
ce=step(nume,dene,t);
cd=step(numd,dend,t);
figure(1)
plot(t,cd,'-',t,ce,'-')
grid
title('Grafica')
xlabel('t')
ylabel('Salidas c1,c')
figure(2)
M=tf([0.28e-6 1],[4.24e-10 2.22e-6 1])
margin(M)

M =

2.8e-07 s + 1
-----------------------------
4.24e-10 s^2 + 2.22e-06 s + 1

Continuous-time transfer function.

4
Sintonizacion PID
F1=tf([2.5 ],[0.4 1]);
F2=tf([ 2 ],[0.25 1]);
G=F1*F2
dt=1
t=0:0.05:10;
step(G)
y=step(G,t);
dy=diff(y)/dt;
[m,p]=max(dy);
yi=y(p);
ti=t(p);
L=ti-yi/m
T=((y(end)-yi)/m)+ti
kp1=1.2*T/L
Ti=2*L
Ti=Ti+0.2
Td=0.5*L
ki=kp1/Ti
kd=Td*kp1
num=[kd kp1 ki];
den=[1 0];
Gc=tf([kd kp1 ki],[1 0]);
hold on

5
pause()
Gr=feedback(G,1)
step(Gr)
pause()
G2=feedback((G*Gc),1)
step(G2)

G =

5
--------------------
0.1 s^2 + 0.65 s + 1

Continuous-time transfer function.

dt =

L =

-3.9504

T =

13.5883

kp1 =

-4.1276

Ti =

-7.9009

Ti =

-7.7009

Td =

-1.9752

ki =

6
0.5360

kd =

8.1530

Gr =

5
--------------------
0.1 s^2 + 0.65 s + 6

Continuous-time transfer function.

G2 =

40.76 s^2 - 20.64 s + 2.68


------------------------------------
0.1 s^3 + 41.41 s^2 - 19.64 s + 2.68

Continuous-time transfer function.

7
Published with MATLAB R2013a