Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 9

Pass bas

A=1;
Wo=100;
Te=0.002;
m=0;
N=[A];
D=[(1/Wo) 1];
H=tf(N,D);
bode(H)
step(H)

Reponse frquencielle
Reponse indicielle
Derivation

A=1

W0= 100*pi;
Te = 0.002

Den = 1+W0*Te;
Num1 = A*W0*Te;
Num2 = 1;

k = 100;
y1 = 0;

for n = 1:1:k;
x(n)=1;
end
T = length(x);
n1 = linspace(0,100,T);

for n = 2:1:k;
y(n) = (Num2/Den)*y1+(Num1/Den)*x(n);
y1 = y(n);

end
y(1)=0
figure(1)
step(H);
figure(2)
plot(n1,y,'r')
grid on
axis([0 10 0 1]);

Pass haut

A=1;
Wo=100;
Te=0.002;
m=0;
N=[(A/Wo) 0];
D=[(1/Wo) 1];
H=tf(N,D);
step(H)
bode(H)
Integration

A=1

W0= 100*pi;
Te = 0.002

DEN=W0+2/Te;
NUM1=2/Te-W0;
NUM2=W0*A;

k = 100;
y1 = 0;
x1 = 0;

for n = 1:1:k;
x(n)=1;
end
T = length(x);
n1 = linspace(0,10,T);

for n = 1:1:k;
y(n) = (NUM1/DEN)*y1+(NUM2/DEN)*(x(n)+x1);
y1 = y(n);
x1 = x(n);
end
y(1)=0;

plot(n1,y,'r')
grid on
axis([0 1 0 A]);

passhaut

Reponse indicielle
Rponse frquencielle
Numerique

Derivation

A=1

W0= 100*pi;
Te = 0.002

Den = 1+W0*Te;

k = 100;
y1 = 0;
x1=0;

for n = 1:1:k;
x(n)=1;
end
T = length(x);
n1 = linspace(0,8,T);

for n = 2:1:k;
y(n) = 1/Den*y1+A/Den*(x(n)-x1);
y1 = y(n);
x1=x(n);
end
y(1)=A;
plot(n1,y,'r')
grid on
axis([0 0.9 0 1]);

Methode integration

A=1

W0= 100*pi;
Te = 0.002

DEN=W0+2/Te;
NUM1=2/Te-W0;
NUM2=2*A/Te;

k = 100;
y1 = 0;
x1 = 0;

for n = 1:1:k;
x(n)=1;
end
T = length(x);
n1 = linspace(0,10,T);

for n = 1:1:k;
y(n) = (NUM1/DEN)*y1+(NUM2/DEN)*(x(n)-x1);
y1 = y(n);
x1 = x(n);
end
y(1)=A;

plot(n1,y,'r')
grid on
axis([0 1 0 A]);

You might also like