diff --git a/BE_Beam.m b/BE_Beam.m index 976ddea..7c1f7fd 100644 --- a/BE_Beam.m +++ b/BE_Beam.m @@ -60,8 +60,8 @@ plot(eig_cont, 'x'); axis square; grid on; xline(0, 'r--'); -xlabel('Axe Réel'); -ylabel('Axe Imaginaire'); +xlabel('Réel'); +ylabel('Imaginaire'); title({'Valeurs propres en temps continu'}); subplot(1,3,2); @@ -88,7 +88,7 @@ plot(eig_zoh2,'x', 'LineWidth',1); plot(eig_zoh3,'x', 'LineWidth',1); axis square; legend("Ts1", "Ts2", "Ts3"); -theta = linspace(0, 2*pi, 100); +% theta = linspace(0, 2*pi, 100); plot(cos(theta), sin(theta), 'k--', 'HandleVisibility','off','LineWidth',0.25); xlim([-1.1, 1.1]); ylim([-1.1, 1.1]); @@ -155,27 +155,60 @@ end %% Question 9 sys_CL = feedback(sys,k); -[y, tOut] = lsim(sys_CL, -3.*cmd, t); +% [y, tOut] = lsim(sys_CL, H.*cmd, t); % plot(t, Cw(L)*y, t, u) eig_cont_CL = eig(sys_CL); -figure; +Question9 = figure; subplot(1,2,1) ; plot(eig_cont_CL, 'x'); -hold off; +axis square; +grid on; +xline(0, 'r--'); +title({'Valeurs propres en temps continu'}); +xlabel('Réel'); +ylabel('Imaginaire'); subplot(1,2,2); -eig_zoh1 = eig(c2d(sys_CL, Ts1, 'zoh')) ; -eig_zoh2 = eig(c2d(sys_CL, Ts2, 'zoh')) ; -eig_zoh3 = eig(c2d(sys_CL, Ts3, 'zoh')) ; -plot(eig_zoh1,'x'); +eig_zoh1 = eig(feedback(c2d(sys, Ts1, 'zoh'), k)) ; +eig_zoh2 = eig(feedback(c2d(sys, Ts2, 'zoh'), k)) ; +eig_zoh3 = eig(feedback(c2d(sys, Ts3, 'zoh'), k)) ; +plot(eig_zoh1,'x', 'LineWidth',1); hold on; -plot(eig_zoh3,'x'); +plot(eig_zoh2,'x','LineWidth',1); +plot(eig_zoh3,'x', 'LineWidth',1); +axis square; +plot(cos(theta), sin(theta), 'k--', 'HandleVisibility','off','LineWidth',0.25); +xlim([-1.5, 1.5]); +ylim([-1.5, 1.5]); +grid on; +legend("Ts1", "Ts2", "Ts3"); + +title({'Valeurs propres en temps discret',' avec un bloqueur d''ordre 0'}); +xlabel('Réel'); +ylabel('Imaginaire'); hold off; +if SAVE + exportgraphics(Question9, './latex/Illustrations/Question9.pdf') +end + %% -sys_CL_Ts = c2d(sys_CL, 1, 'zoh'); -figure -step(sys_CL_Ts) +sys_CL_Ts = feedback(c2d(sys, 0.037, 'zoh'),k); +t_d = 0:0.037:10 ; +cmd = double (t_d >= 1) ; +[y, t_d, x] = lsim(sys_CL_Ts, H*cmd, t_d) ; +u_d = H*cmd'-k*y ; + +Question10 = figure ; +plot(t_d, u_d, t_d, y, t_d, cmd, t_d, (Cw_L*x')'); +xlabel("Temps (s)"); +ylabel("Amplitude"); +legend("$u(t)$", "$y(t)$", "$w_c(L,t)$", "$w(L,t)$", 'Interpreter', 'latex'); +title({'Simulation du retour de sortie avec pré-gain'},{'avec un bloqueur d''ordre 0'}) ; + +if SAVE + exportgraphics(Question10, './latex/Illustrations/Question10.pdf') +end %% Question 11 diff --git a/latex/Illustrations/Question10.pdf b/latex/Illustrations/Question10.pdf new file mode 100644 index 0000000..75066a2 Binary files /dev/null and b/latex/Illustrations/Question10.pdf differ diff --git a/latex/Illustrations/Question9.pdf b/latex/Illustrations/Question9.pdf new file mode 100644 index 0000000..11a5a98 Binary files /dev/null and b/latex/Illustrations/Question9.pdf differ