Compare commits

...

4 commits

Author SHA1 Message Date
4adb022e8e Merge branch 'Branche-Figures' 2026-04-20 12:41:41 +02:00
81c5ed6ee4 Ajout figures debut 2026-04-20 12:35:40 +02:00
2d8693d084 ajout variable SAVE 2026-04-20 12:31:53 +02:00
24477a4182 Ajout des figures 1eres questions 2026-04-16 22:00:32 +02:00
7 changed files with 38 additions and 22 deletions

View file

@ -8,6 +8,8 @@ clear;
clc; clc;
close all; close all;
SAVE = 0;
set(0, 'DefaultLineLineWidth', 1) set(0, 'DefaultLineLineWidth', 1)
%% Question 3 %% Question 3
@ -51,28 +53,30 @@ 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')) ;
%%
figure; Question4 = 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('Pôles du système'); title({'Valeurs propres en temps continu'});
subplot(1,3,2); subplot(1,3,2);
hold on; hold on;
plot(eig_tustin1,'x', 'LineWidth',2); plot(eig_tustin1,'x', 'LineWidth',1);
plot(eig_tustin2,'x', 'LineWidth',2); plot(eig_tustin2,'x', 'LineWidth',1);
plot(eig_tustin3,'x', 'LineWidth',2); plot(eig_tustin3,'x', 'LineWidth',1);
axis square;
theta = linspace(0, 2*pi, 100); theta = linspace(0, 2*pi, 100);
plot(cos(theta), sin(theta), 'k--', 'HandleVisibility','off'); plot(cos(theta), sin(theta), 'k--', 'HandleVisibility','off','LineWidth',0.25);
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('Pôles dans le plan en Z (Discret)'); title({'Valeurs propres en temps discret',' avec la méthode de Tustin'});
legend("Ts1", "Ts2", "Ts3");
xlabel('Réel'); xlabel('Réel');
ylabel('Imaginaire'); ylabel('Imaginaire');
hold off; hold off;
@ -82,34 +86,38 @@ 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("Eigen Values Ts1", "Eigen Values Ts2", "Eigen Values Ts3"); legend("Ts1", "Ts2", "Ts3");
theta = linspace(0, 2*pi, 100); theta = linspace(0, 2*pi, 100);
plot(cos(theta), sin(theta), 'k--', 'HandleVisibility','off'); plot(cos(theta), sin(theta), 'k--', 'HandleVisibility','off','LineWidth',0.25);
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 avec un bloqueur d''ordre 0 (ZOH)'); title({'Valeurs propres en temps discret',' avec un bloqueur d''ordre 0'});
xlabel('Réel'); xlabel('Réel');
ylabel('Imaginaire'); ylabel('Imaginaire');
hold off; hold off;
% Conlsuion : On en conclut qqc. if SAVE
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) ;
figure ; Question5 = 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 ...
@ -118,6 +126,7 @@ 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
@ -131,13 +140,18 @@ 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)", "wc(t)", "w(t)"); legend("$u(t)$", "$y(t)$", "$w_c(L,t)$", "$w(L,t)$", 'Interpreter', 'latex');
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);
@ -157,6 +171,7 @@ 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}
\begin{align*} \includegraphics[width=\textwidth]{Illustrations/Question5}\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,6 +283,7 @@ $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 \\