Questions 9-10
This commit is contained in:
parent
f721f824b2
commit
e08a04f14d
3 changed files with 47 additions and 14 deletions
61
BE_Beam.m
61
BE_Beam.m
|
|
@ -60,8 +60,8 @@ plot(eig_cont, 'x');
|
||||||
axis square;
|
axis square;
|
||||||
grid on;
|
grid on;
|
||||||
xline(0, 'r--');
|
xline(0, 'r--');
|
||||||
xlabel('Axe Réel');
|
xlabel('Réel');
|
||||||
ylabel('Axe Imaginaire');
|
ylabel('Imaginaire');
|
||||||
title({'Valeurs propres en temps continu'});
|
title({'Valeurs propres en temps continu'});
|
||||||
|
|
||||||
subplot(1,3,2);
|
subplot(1,3,2);
|
||||||
|
|
@ -88,7 +88,7 @@ plot(eig_zoh2,'x', 'LineWidth',1);
|
||||||
plot(eig_zoh3,'x', 'LineWidth',1);
|
plot(eig_zoh3,'x', 'LineWidth',1);
|
||||||
axis square;
|
axis square;
|
||||||
legend("Ts1", "Ts2", "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','LineWidth',0.25);
|
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]);
|
||||||
|
|
@ -155,27 +155,60 @@ end
|
||||||
%% Question 9
|
%% Question 9
|
||||||
|
|
||||||
sys_CL = feedback(sys,k);
|
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)
|
% plot(t, Cw(L)*y, t, u)
|
||||||
eig_cont_CL = eig(sys_CL);
|
eig_cont_CL = eig(sys_CL);
|
||||||
figure;
|
Question9 = figure;
|
||||||
subplot(1,2,1) ;
|
subplot(1,2,1) ;
|
||||||
plot(eig_cont_CL, 'x');
|
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);
|
subplot(1,2,2);
|
||||||
eig_zoh1 = eig(c2d(sys_CL, Ts1, 'zoh')) ;
|
eig_zoh1 = eig(feedback(c2d(sys, Ts1, 'zoh'), k)) ;
|
||||||
eig_zoh2 = eig(c2d(sys_CL, Ts2, 'zoh')) ;
|
eig_zoh2 = eig(feedback(c2d(sys, Ts2, 'zoh'), k)) ;
|
||||||
eig_zoh3 = eig(c2d(sys_CL, Ts3, 'zoh')) ;
|
eig_zoh3 = eig(feedback(c2d(sys, Ts3, 'zoh'), k)) ;
|
||||||
plot(eig_zoh1,'x');
|
plot(eig_zoh1,'x', 'LineWidth',1);
|
||||||
hold on;
|
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;
|
hold off;
|
||||||
|
|
||||||
|
if SAVE
|
||||||
|
exportgraphics(Question9, './latex/Illustrations/Question9.pdf')
|
||||||
|
end
|
||||||
|
|
||||||
%%
|
%%
|
||||||
sys_CL_Ts = c2d(sys_CL, 1, 'zoh');
|
sys_CL_Ts = feedback(c2d(sys, 0.037, 'zoh'),k);
|
||||||
figure
|
t_d = 0:0.037:10 ;
|
||||||
step(sys_CL_Ts)
|
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
|
%% Question 11
|
||||||
|
|
||||||
|
|
|
||||||
BIN
latex/Illustrations/Question10.pdf
Normal file
BIN
latex/Illustrations/Question10.pdf
Normal file
Binary file not shown.
BIN
latex/Illustrations/Question9.pdf
Normal file
BIN
latex/Illustrations/Question9.pdf
Normal file
Binary file not shown.
Loading…
Reference in a new issue