You are on page 1of 9

A)

ka=80
Gc=tf(1,[1 20 0]);
G=ka*5*Gc;
T=feedback(G,1);
t=0:0.001:1;
r =t.^0;
y=lsim(T,r,t);
plot(t,y),grid on

b)
ka=80
Gc=tf(1,[1 20 0]);
G=ka*5*Gc;
T=feedback(G,1);
t=0:0.001:1;
r =t.^0;
y=lsim(T,r,t);
plot(t,y),grid on
hold on
disp('t. de retardo')
Yf=y(length(y))
for i=1:1:length(y)
if y(i)>=0.5*Yf
break
end
end
td=t(i)
plot(t(i),y(i),'kh')

ka =

80

ka =

80

t. de retardo

Yf =

1.0000

td =

0.0650

ka =

80

ka=80
Gc=tf(1,[1 20 0]);
G=ka*5*Gc;
T=feedback(G,1);
t=0:0.001:1;
r =t.^0;
y=lsim(T,r,t);
plot(t,y),grid on
hold on
disp('t. de retardo')
Yf=y(length(y))
for i=1:1:length(y)
if y(i)>=0.5*Yf
break
end
end
td=t(i)
plot(t(i),y(i),'kh')
disp('tiempo de levantamiento')
for i=1:1:length(y)
if y(i)>=Yf
break
end
end
tr=t(i)
plot(t(i),y(i),'kh')

tiempo de levantamiento

tr =

0.1210

ka=80
Gc=tf(1,[1 20 0]);
G=ka*5*Gc;
T=feedback(G,1);
t=0:0.001:1;
r =t.^0;
y=lsim(T,r,t);
plot(t,y),grid on
hold on
disp('t. de retardo')
Yf=y(length(y))
for i=1:1:length(y)
if y(i)>=0.5*Yf
break
end
end
td=t(i)
plot(t(i),y(i),'kh')
disp('tiempo de levantamiento')
for i=1:1:length(y)
if y(i)>=Yf
break
end
end
tr=t(i)
plot(t(i),y(i),'kh')
disp('t. pico')
Ymax=max(y)
i=find(y==Ymax);
tp=t(i)
plot(t(i),y(i),'kh')

t. pico
Ymax =
1.1630

tp =
0.1810

disp('sobrepaso maximo')
sob_max=((Ymax-Yf)/Yf)*100

sobrepaso maximo
sob_max =
16.3001

ka=80
Gc=tf(1,[1 20 0]);
G=ka*5*Gc;
T=feedback(G,1);
t=0:0.001:1;
r =t.^0;
y=lsim(T,r,t);
plot(t,y),grid on
hold on
disp('t. de retardo')
Yf=y(length(y))
for i=1:1:length(y)
if y(i)>=0.5*Yf
break
end
end
td=t(i)
plot(t(i),y(i),'kh')
disp('tiempo de levantamiento')
for i=1:1:length(y)
if y(i)>=Yf
break
end
end
tr=t(i)
plot(t(i),y(i),'kh')
disp('t. pico')
Ymax=max(y)
i=find(y==Ymax);
tp=t(i)
plot(t(i),y(i),'kh')
disp('sobrepaso maximo')
sob_max=((Ymax-Yf)/Yf)*100

You might also like