%%%%%% Tracage de La Figure 2

You might also like

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

t=0:0.01e-3:0.

06;
y=10*exp(-60*t).*cos(120*pi*t);
z=10*exp(-60*t).*sin(120*pi*t);
figure (1)
plot(t,y,'r'),grid
hold
plot(t,a,'b--')
plot(t,-a,'b--')
title('Fonction sinusoidales amorties')
xlabel('Temps , s'),ylabel('Tension, , V')
figure (2)
plot(t,z,'g'),grid
a=10*exp(-60*t);
hold
plot(t,a,'b--')
plot(t,-a,'b--')
title('Fonction sinusoidales amorties')
xlabel('Temps , s'),ylabel('Tension, , V')

--------------------------------------------------------------------------------------------------

t=0:0.01e-3:0.06;
y=10*exp(-60*t).*cos(120*pi*t);
z=10*exp(-60*t).*sin(120*pi*t);
figure (1)
plot(t,y,'r'),grid
hold
plot(t,a,'b--')
plot(t,-a,'b--')
title('Fonction sinusoidales amorties')
xlabel('Temps , s'),ylabel('Tension, , V')
%%%%%% tracage de la figure 2
figure (2)
plot(t,z,'g'),grid
a=10*exp(-60*t);
hold
plot(t,a,'b--')
plot(t,-a,'b--')
title('Fonction sinusoidales amorties')
xlabel('Temps , s'),ylabel('Tension, , V')

--------------------------------------------------------------------------------------------------

t=0:0.01e-3:0.06;
y=10*exp(-60*t).*cos(120*pi*t);
z=10*exp(-60*t).*sin(120*pi*t);
figure (1)
plot(t,y,'r'),grid
hold
plot(t,a,'b--')
plot(t,-a,'b--')
title('Fonction sinusoidales amorties')
xlabel('Temps , s'),ylabel('Tension, , V')
%%%%%% tracage de la figure 2
figure (2)
plot(t,z,'g'),grid
a=10*exp(-60*t);
hold
plot(t,a,'b--')
plot(t,-a,'b--')
title('Fonction sinusoidales amorties')
xlabel('Temps , s'),ylabel('Tension, , V')
figure(3)
plot(y,z),grid
axis equal
xlabel('y'),ylabel('z')
--------------------------------------------------------------------------------------------------

t=0:0.01e-3:0.06;
y=10*exp(-60*t).*cos(120*pi*t);
z=10*exp(-60*t).*sin(120*pi*t);
figure (1)
plot(t,y,'r',t,a,'b--',t,-a,'b--'),grid
title('Fonction sinusoidales amorties')
xlabel('Temps , s'),ylabel('Tension, , V')
%%%%%% tracage de la figure 2
figure (2)
plot(t,z,'g',t,a,'b--',t,-a,'b--'),grid
a=10*exp(-60*t);
title('Fonction sinusoidales amorties')
xlabel('Temps , s'),ylabel('Tension, , V')
figure(3)
plot(y,z),grid
axis equal
xlabel('y'),ylabel('z')

--------------------------------------------------------------------------------------------------

w=logspace(0,3,1000);
s=j*w;
H=225./(s.*s+3*s+225);
AdB=20*log10(abs(H));
phase=angle(H)*(180/pi);
subplot(2,1,1),semilogx(w,AdB),grid
xlabel('w , rad/s'),ylabel('amplitude , dB')
subplot(2,1,2),semilogx(w,phase),grid
xlabel('w , rad/s'),ylabel('phase , degree')
--------------------------------------------------------------------------------------------------

t=0:0.05:25;
x=exp(-0.05*t).*cos(t);
y=exp(-0.05*t).*sin(t);
z=t;
plot3(x,y,z),grid
--------------------------------------------------------------------------------------------------

num=10
den=[1 2 10]
printsys(num,den)
--------------------------------------------------------------------------------------------------

num=10
den=[1 2 10]
printsys(num,den)

step(num,den)
t=0:0.1:10;
y=step(num,den,t);
plot(t,y)
--------------------------------------------------------------------------------------------------

num=10
den=[1 2 10]
printsys(num,den)

step(num,den)
t=0:0.1:10;
y=step(num,den,t);
plot(t,y)
grid
line ([0 10],[1.05 1.05])
line ([0 10],[1.05 1.05])
num=10
den=[1 2 10]
printsys(num,den)

step(num,den)
t=0:0.1:10;
y=step(num,den,t);
plot(t,y)
grid
line ([0 10],[1.05 1.05])
line ([0 10],[0.95 0.95])
--------------------------------------------------------------------------------------------------

num=10
den=[1 2 10]
printsys(num,den)

step(num,den)
t=0:0.1:10;
y=step(num,den,t);
plot(t,y)
grid
line ([0 10],[1.05 1.05])
line ([0 10],[1.05 1.05])
num=10
den=[1 2 10]
printsys(num,den)

step(num,den)
t=0:0.1:10;
y=step(num,den,t);
plot(t,y)
grid
line ([0 10],[1.05 1.05])
line ([0 10],[0.95 0.95])
ramp=t;
y=lsim(num,den,ramp,t);
plot(t,y)

--------------------------------------------------------------------------------------------------

num=10
den=[1 2 10]
printsys(num,den)

step(num,den)
t=0:0.1:10;
y=step(num,den,t);
plot(t,y)
grid
line ([0 10],[1.05 1.05])
line ([0 10],[1.05 1.05])
num=10
den=[1 2 10]
printsys(num,den)

step(num,den)
t=0:0.1:10;
y=step(num,den,t);
plot(t,y)
grid
line ([0 10],[1.05 1.05])
line ([0 10],[0.95 0.95])
ramp=sin(t);
y=lsim(num,den,ramp,t);
plot(t,y)

--------------------------------------------------------------------------------------------------

num=10
den=[1 2 10]
printsys(num,den)

step(num,den)
t=0:0.1:10;
y=step(num,den,t);
plot(t,y)
grid
line ([0 10],[1.05 1.05])
line ([0 10],[1.05 1.05])
num=10
den=[1 2 10]
printsys(num,den)

step(num,den)
t=0:0.1:10;
y=step(num,den,t);
plot(t,y)
grid
line ([0 10],[1.05 1.05])
line ([0 10],[0.95 0.95])
ramp=sin(t);
y=lsim(num,den,ramp,t);
plot(t,y,t,ramp,'g')

--------------------------------------------------------------------------------------------------

num=10
den=[1 2 10]
printsys(num,den)

step(num,den)
t=0:0.1:10;
y=step(num,den,t);
plot(t,y)
grid
line ([0 10],[1.05 1.05])
line ([0 10],[1.05 1.05])
num=10
den=[1 2 10]
printsys(num,den)

step(num,den)
t=0:0.1:10;
y=step(num,den,t);
plot(t,y)
grid
line ([0 10],[1.05 1.05])
line ([0 10],[0.95 0.95])
ramp=t;
y=lsim(num,den,ramp,t);
plot(t,y,ramp,t)

--------------------------------------------------------------------------------------------------

num=10
den=[1 2 10]
printsys(num,den)

step(num,den)
t=0:0.1:10;
y=step(num,den,t);
plot(t,y)
grid
line ([0 10],[1.05 1.05])
line ([0 10],[1.05 1.05])
num=10
den=[1 2 10]
printsys(num,den)

step(num,den)
t=0:0.1:10;
y=step(num,den,t);
plot(t,y)
grid
line ([0 10],[1.05 1.05])
line ([0 10],[0.95 0.95])

y=lsim(num,den,sin(t),t);
plot(t,y,sin(t),t)
nichols (num,den)
ngrid
line([-135 -135],[0,-50])
--------------------------------------------------------------------------------------------------
num=10
den=[1 2 10]
printsys(num,den)

step(num,den)
t=0:0.1:10;
y=step(num,den,t);
plot(t,y)
grid
line ([0 10],[1.05 1.05])
line ([0 10],[1.05 1.05])
num=10
den=[1 2 10]
printsys(num,den)
step(num,den)
t=0:0.1:10;
y=step(num,den,t);
plot(t,y)
grid
line ([0 10],[1.05 1.05])
line ([0 10],[0.95 0.95])

y=lsim(num,den,sin(t),t);
plot(t,y,sin(t),t)
nichols (num,den)
ngrid
line([-135 -135],[0,-50])

bode(num,den)

--------------------------------------------------------------------------------------------------

num=10
den=[1 2 10]
printsys(num,den)

step(num,den)
t=0:0.1:10;
y=step(num,den,t);
plot(t,y)
grid
line ([0 10],[1.05 1.05])
line ([0 10],[1.05 1.05])
num=10
den=[1 2 10]
printsys(num,den)

step(num,den)
t=0:0.1:10;
y=step(num,den,t);
plot(t,y)
grid
line ([0 10],[1.05 1.05])
line ([0 10],[0.95 0.95])

y=lsim(num,den,sin(t),t);
plot(t,y,sin(t),t)
nichols (num,den)
ngrid
line([-135 -135],[0,-50])

bode(num,den)
[Gm,Pm,Wcg,Wcp]=margin(num,den)
num=10
den=[1 2 10]
printsys(num,den)

step(num,den)
t=0:0.1:10;
y=step(num,den,t);
plot(t,y)
grid
line ([0 10],[1.05 1.05])
line ([0 10],[1.05 1.05])
num=10
den=[1 2 10]
printsys(num,den)

step(num,den)
t=0:0.1:10;
y=step(num,den,t);
plot(t,y)
grid
line ([0 10],[1.05 1.05])
line ([0 10],[0.95 0.95])
y=lsim(num,den,sin(t),t);
plot(t,y,sin(t),t)
nichols (num,den)
ngrid
line([-135 -135],[0,-50])
figure(1)
bode(num,den),grid
[Gm,Pm,Wcg,Wcp]=margin(num,den)
figure(2)
nyquist(num,den),grid

num=10
den=[1 2 10]
printsys(num,den)

step(num,den)
t=0:0.1:10;
y=step(num,den,t);
plot(t,y)
grid
line ([0 10],[1.05 1.05])
line ([0 10],[1.05 1.05])
num=10
den=[1 2 10]
printsys(num,den)

step(num,den)
t=0:0.1:10;
y=step(num,den,t);
plot(t,y)
grid
line ([0 10],[1.05 1.05])
line ([0 10],[0.95 0.95])
y=lsim(num,den,sin(t),t);
plot(t,y,sin(t),t)
nichols (num,den)
ngrid
line([-135 -135],[0,-50])
figure(1)
bode(num,den),grid
[Gm,Pm,Wcg,Wcp]=margin(num,den)

% nyquist(num,den),grid
%
figure(2)
[numf,denf]=cloop(num,den,-1)
printsys (numf,denf)
step(numf,denf)

num=[1 0];
den=[1 2 101];
%%Pole zero diagram
figure(1)
pzmap(num,den),grid
figure(2);
bode(num,den),grid
figure(3);
step(num,den),grid

clear all;
load f;
t=f(1,:);
%%%%%%%%%%%%%
entree=f(2,:);
sortie=f(3,:);
erreur=f(4,:);

%%%%%%%%%%%%%
figure(1): plot(t,entree,'r',t,sortie,'b',t,erreur,'g');
xlabel('time (s)');
ylabel('--------');

You might also like