Compare commits

..

No commits in common. "4adb022e8ec629e722bc37378946d5edb4da9fa3" and "17314eb9df935f6b07768090c21014d9b33b6305" have entirely different histories.

7 changed files with 22 additions and 38 deletions

View file

@ -8,8 +8,6 @@ clear;
clc; clc;
close all; close all;
SAVE = 0;
set(0, 'DefaultLineLineWidth', 1) set(0, 'DefaultLineLineWidth', 1)
%% Question 3 %% Question 3
@ -53,30 +51,28 @@ eig_tustin3 = eig(c2d(sys, Ts3, 'tustin')) ;
eig_zoh1 = eig(c2d(sys, Ts1, 'zoh')) ; eig_zoh1 = eig(c2d(sys, Ts1, 'zoh')) ;
eig_zoh2 = eig(c2d(sys, Ts2, 'zoh')) ; eig_zoh2 = eig(c2d(sys, Ts2, 'zoh')) ;
eig_zoh3 = eig(c2d(sys, Ts3, 'zoh')) ; eig_zoh3 = eig(c2d(sys, Ts3, 'zoh')) ;
%%
Question4 = figure ; figure;
subplot(1,3,1) ; subplot(1,3,1) ;
plot(eig_cont, 'x'); plot(eig_cont, 'x');
axis square;
grid on; grid on;
xline(0, 'r--'); xline(0, 'r--');
xlabel('Axe Réel'); xlabel('Axe Réel');
ylabel('Axe Imaginaire'); ylabel('Axe Imaginaire');
title({'Valeurs propres en temps continu'}); title('Pôles du système');
subplot(1,3,2); subplot(1,3,2);
hold on; hold on;
plot(eig_tustin1,'x', 'LineWidth',1); plot(eig_tustin1,'x', 'LineWidth',2);
plot(eig_tustin2,'x', 'LineWidth',1); plot(eig_tustin2,'x', 'LineWidth',2);
plot(eig_tustin3,'x', 'LineWidth',1); plot(eig_tustin3,'x', 'LineWidth',2);
axis square;
theta = linspace(0, 2*pi, 100); theta = linspace(0, 2*pi, 100);
plot(cos(theta), sin(theta), 'k--', 'HandleVisibility','off','LineWidth',0.25); plot(cos(theta), sin(theta), 'k--', 'HandleVisibility','off');
xlim([-1.1, 1.1]); xlim([-1.1, 1.1]);
ylim([-1.1, 1.1]); ylim([-1.1, 1.1]);
grid on; grid on;
title({'Valeurs propres en temps discret',' avec la méthode de Tustin'}); title('Pôles dans le plan en Z (Discret)');
legend("Ts1", "Ts2", "Ts3");
xlabel('Réel'); xlabel('Réel');
ylabel('Imaginaire'); ylabel('Imaginaire');
hold off; hold off;
@ -86,38 +82,34 @@ hold on;
plot(eig_zoh1,'x', 'LineWidth',1); plot(eig_zoh1,'x', 'LineWidth',1);
plot(eig_zoh2,'x', 'LineWidth',1); plot(eig_zoh2,'x', 'LineWidth',1);
plot(eig_zoh3,'x', 'LineWidth',1); plot(eig_zoh3,'x', 'LineWidth',1);
axis square;
legend("Ts1", "Ts2", "Ts3"); legend("Eigen Values Ts1", "Eigen Values Ts2", "Eigen Values Ts3");
theta = linspace(0, 2*pi, 100); theta = linspace(0, 2*pi, 100);
plot(cos(theta), sin(theta), 'k--', 'HandleVisibility','off','LineWidth',0.25); plot(cos(theta), sin(theta), 'k--', 'HandleVisibility','off');
xlim([-1.1, 1.1]); xlim([-1.1, 1.1]);
ylim([-1.1, 1.1]); ylim([-1.1, 1.1]);
grid on; grid on;
title({'Valeurs propres en temps discret',' avec un bloqueur d''ordre 0'}); title('Valeurs propres avec un bloqueur d''ordre 0 (ZOH)');
xlabel('Réel'); xlabel('Réel');
ylabel('Imaginaire'); ylabel('Imaginaire');
hold off; hold off;
if SAVE % Conlsuion : On en conclut qqc.
exportgraphics(Question4, './latex/Illustrations/Question4.pdf')
end
%% Question 5 %% Question 5
t = 0:0.01:10; t = 0:0.01:10;
cmd = double (t >= 1) ; cmd = double (t >= 1) ;
[y, t] = lsim(sys,cmd,t) ; [y, t] = lsim(sys,cmd,t) ;
Question5 = figure ; figure ;
plot(t, cmd, t, y); plot(t, cmd, t, y);
xlabel("Temps (s)"); xlabel("Temps (s)");
ylabel("Amplitude"); ylabel("Amplitude");
legend("u(t)", "y(t)"); legend("u(t)", "y(t)");
title("Simulation en boucle ouverte") ; title("Simulation en boucle ouverte") ;
if SAVE
exportgraphics(Question5, './latex/Illustrations/Question5.pdf')
end
%% Question 7 %% Question 7
Cw = @(zeta) [zeta^2*(2*zeta^3-5*zeta^2+10)/20 ... Cw = @(zeta) [zeta^2*(2*zeta^3-5*zeta^2+10)/20 ...
@ -126,7 +118,6 @@ Cw = @(zeta) [zeta^2*(2*zeta^3-5*zeta^2+10)/20 ...
zeta^4*(3*zeta-5)/60 ... zeta^4*(3*zeta-5)/60 ...
0, 0, 0, 0]; 0, 0, 0, 0];
Cw_L = Cw(L); Cw_L = Cw(L);
%%
TransientTime = [] ; TransientTime = [] ;
for i = 0.01:0.01:10 for i = 0.01:0.01:10
@ -140,18 +131,13 @@ k = min_index * 0.01
H = inv(Cw_L*inv(-A+B*C*k)*B) H = inv(Cw_L*inv(-A+B*C*k)*B)
[y, t, x] = lsim(feedback(sys,k), H*cmd, t) ; [y, t, x] = lsim(feedback(sys,k), H*cmd, t) ;
u = H*cmd'-k*y ; u = H*cmd'-k*y ;
%% figure ;
Question8 = figure ;
plot(t, u, t, y, t, cmd, t, (Cw_L*x')'); plot(t, u, t, y, t, cmd, t, (Cw_L*x')');
xlabel("Temps (s)"); xlabel("Temps (s)");
ylabel("Amplitude"); ylabel("Amplitude");
legend("$u(t)$", "$y(t)$", "$w_c(L,t)$", "$w(L,t)$", 'Interpreter', 'latex'); legend("u(t)", "y(t)", "wc(t)", "w(t)");
title("Simulation du retour de sortie avec pré-gain") ; title("Simulation du retour de sortie avec pré-gain") ;
if SAVE
exportgraphics(Question8, './latex/Illustrations/Question8.pdf')
end
%% Question 9 %% Question 9
sys_CL = feedback(sys,k); sys_CL = feedback(sys,k);
@ -171,7 +157,6 @@ plot(eig_zoh1,'x');
hold on; hold on;
plot(eig_zoh3,'x'); plot(eig_zoh3,'x');
hold off; hold off;
%% %%
sys_CL_Ts = c2d(sys_CL, 10, 'zoh'); sys_CL_Ts = c2d(sys_CL, 10, 'zoh');
figure figure

Binary file not shown.

Binary file not shown.

Binary file not shown.

View file

@ -221,10 +221,10 @@ Pour :
2p^3 - 3p^2 + 1 & 3p^2 - 2p^3 & p^3 - 2p^2 + p & p^3 - p^2 2p^3 - 3p^2 + 1 & 3p^2 - 2p^3 & p^3 - 2p^2 + p & p^3 - p^2
\end{bmatrix} \end{bmatrix}
\end{equation*} \end{equation*}
\includegraphics[width=\textwidth]{Illustrations/Question4}
\subsection{Exercice 5} \subsection{Exercice 5}
\includegraphics[width=\textwidth]{Illustrations/Question5}\begin{align*} \begin{align*}
y = -\phi(L)^Te_{2d} && y = -e_2(L, t) & & e_2(\zeta, t) \approx \phi(\zeta)^Te_{2d}(t) y = -\phi(L)^Te_{2d} && y = -e_2(L, t) & & e_2(\zeta, t) \approx \phi(\zeta)^Te_{2d}(t)
\end{align*} \end{align*}
@ -283,7 +283,6 @@ $C_1$ et $C_2$ ?????????????????
\subsection{Exercice 8} \subsection{Exercice 8}
\includegraphics[width=\textwidth]{Illustrations/Question8}
\subsection{Exercice 9} \subsection{Exercice 9}

Binary file not shown.

View file

@ -8,7 +8,7 @@
\newcommand{\firstcouverture}{ \newcommand{\firstcouverture}{
\parbox{\textwidth}{ \parbox{\textwidth}{
\sffamily % arial \sffamily % arial
\textbf{Wissal GUARNI \\ Justin BOS \\ Nolan REYNIER NOMER \\ Aleksander TABAN}\\ \textbf{Wissal GUARNI \\ Justin BOS \\ Nolan REYNIER-NOMER \\ Aleksander TABAN}\\
Elèves Ingénieurs de l'INSA Toulouse\\ Elèves Ingénieurs de l'INSA Toulouse\\
Département GEI \\ Département GEI \\
Spécialité AE-SE \\ Spécialité AE-SE \\