T1=2;
T2=5;
K1=3/2;
K2=2;
s = tf('s')
G1=K1/(1+s*T1);
G2=K2/(1+s*T2);
G3=K2/((1+s*T1)*(1+s*T2));

%[num3, den3] = tfdata(G3)
[num3, den3] = tfdata(G3, 'v');
%G1=tf(K1, [T1 1]);
roots(G3.den{1});
pole(G3);
zero(G3);
%figure;
pzmap(G1,G2,G3);
grid;
pzmap((G2*G3)/(1+G2*G3));
pole((G2*G3)/(1+G2*G3));
zero((G2*G3)/(1+G2*G3));
grid;

%figure
G4=((G2*G3)/(1+G2*G3));
pzmap(minreal(G4))

%Application sur G1 d'un echelon

[ys, ts]=step(G1) %methode simple pour un echelon ; step(G, t) précise l'échelle de temps
%t=[0:0.01:20];
t=ts; %Pour avoir la même echelle de temps
y=K1*(1-exp(-t/T1)); %Diapo 2-42
plot(ts, y, ts, ys);

Gs=G1/s
[coef, pol, PE] = residue(Gs.num{1}, Gs.den{1})

yresidue=coef(1)*exp(pol(1)*t)+coef(2)*exp(pol(2)*t) %=Y(s)=G1*U(s) ; U(s) = echelon en laplace