From 2b5757bb092c08203ee8cf18fb6104af07c8079f Mon Sep 17 00:00:00 2001 From: Thomas Dehaeze Date: Wed, 1 Sep 2021 11:35:25 +0200 Subject: [PATCH] Update tangled files --- matlab/matlab.zip | Bin 7701 -> 0 bytes .../1_synthesis_complementary_filters.m | 123 ++++++ matlab/matlab/2_ligo_complementary_filters.m | 258 +++++++++++ .../3_closed_loop_complementary_filters.m | 71 +++ ...ters.m => 4_three_complementary_filters.m} | 20 +- matlab/matlab/comp_filters_ligo.m | 410 ------------------ .../h_inf_synthesis_complementary_filters.m | 177 -------- 7 files changed, 463 insertions(+), 596 deletions(-) delete mode 100644 matlab/matlab.zip create mode 100644 matlab/matlab/1_synthesis_complementary_filters.m create mode 100644 matlab/matlab/2_ligo_complementary_filters.m create mode 100644 matlab/matlab/3_closed_loop_complementary_filters.m rename matlab/matlab/{three_comp_filters.m => 4_three_complementary_filters.m} (82%) delete mode 100644 matlab/matlab/comp_filters_ligo.m delete mode 100644 matlab/matlab/h_inf_synthesis_complementary_filters.m diff --git a/matlab/matlab.zip b/matlab/matlab.zip deleted file mode 100644 index 8d190b14d5e8c2d3f2be54e1a8677164cc97488f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 7701 zcma)>Wl&u~f`uP$4|jKWcMnc*cXxM!ySqIkxVyW1aFXB}JUGE24>lt^v$M6cHTPC^ zb^o~MRCnF#Q*}NS1t@4lz+avNuWOaRPX0c?0f+#OrXCKaW~`bT2mmN1B{X9vNkk)0 zA0z+-^a&II@Yg}*j{w%6PvHM5P*)UnJqil|)ZhRBEdLa+F}8KGGIsZM^02XVw{@e{4UJs8U;XI|uYlu4$&qz@iG#}@F1zh)N%6<$Q1bjzMhuUY24PSQJbw$K5^sA( zkpIBD4AtjkY~i=KjM~ek=z0^IW=G;eEfZ3ah+f|bQ78W#0vAY1FpLkRoFE*WXtI_` zy!!Ega0hnb^5W;i2wgx`$tC$90*oLOBx!JV`Lz+HJP$^SHMGVq7PZ z10bs(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liVa42Og-)0c2A`^S(KBQ(nhJ~_ z=9IQ`$&9sjE$IGmiFwzB9di7euVv%hOa?xv^Que8&H}3FgT^!Ju zV|dl=Dzq9@g8{IjH+{=qtHXRt{uW5tFVK3=?}_h^f^Qw+yhk4i)|}*XH_+7(tL#6D!9*yrtb&q5&?% z|1$jtjD-0cjQn4K@NZ)O4n_V=4C0SWX~=0 Y>=0 rho(XY)<1 p/f -% 1.795e+01 1.4e-07 0.0e+00 1.481e-16 p -% 2.406e+00 1.4e-07 0.0e+00 3.604e-15 p -% 8.806e-01 -3.1e+02 # -1.4e-16 7.370e-19 f -% 1.456e+00 1.4e-07 0.0e+00 1.499e-18 p -% 1.132e+00 1.4e-07 0.0e+00 8.587e-15 p -% 9.985e-01 1.4e-07 0.0e+00 2.331e-13 p -% 9.377e-01 -7.7e+02 # -6.6e-17 3.744e-14 f -% 9.676e-01 -2.0e+03 # -5.7e-17 1.046e-13 f -% 9.829e-01 -6.6e+03 # -1.1e-16 2.949e-13 f -% 9.907e-01 1.4e-07 0.0e+00 2.374e-19 p -% 9.868e-01 -1.6e+04 # -6.4e-17 5.331e-14 f -% 9.887e-01 -5.1e+04 # -1.5e-17 2.703e-19 f -% 9.897e-01 1.4e-07 0.0e+00 1.583e-11 p -% Limiting gains... -% 9.897e-01 1.5e-07 0.0e+00 1.183e-12 p -% 9.897e-01 6.9e-07 0.0e+00 1.365e-12 p - -% Best performance (actual): 0.9897 -% #+end_example - -% We then define the high pass filter $H_1 = 1 - H_2$. The bode plot of both $H_1$ and $H_2$ is shown on figure [[fig:hinf_filters_results]]. - - -H1 = 1 - H2; - -% Obtained Complementary Filters -% The obtained complementary filters are shown on figure [[fig:hinf_filters_results]]. - - -figure; -tiledlayout(3, 1, 'TileSpacing', 'None', 'Padding', 'None'); - -% Magnitude -ax1 = nexttile([2, 1]); -hold on; -set(gca,'ColorOrderIndex',1) -plot(freqs, 1./abs(squeeze(freqresp(W1, freqs, 'Hz'))), '--', 'DisplayName', '$w_1$'); -set(gca,'ColorOrderIndex',2) -plot(freqs, 1./abs(squeeze(freqresp(W2, freqs, 'Hz'))), '--', 'DisplayName', '$w_2$'); - -set(gca,'ColorOrderIndex',1) -plot(freqs, abs(squeeze(freqresp(H1, freqs, 'Hz'))), '-', 'DisplayName', '$H_1$'); -set(gca,'ColorOrderIndex',2) -plot(freqs, abs(squeeze(freqresp(H2, freqs, 'Hz'))), '-', 'DisplayName', '$H_2$'); -set(gca, 'XScale', 'log'); set(gca, 'YScale', 'log'); -hold off; -set(gca, 'XScale', 'log'); set(gca, 'YScale', 'log'); -ylabel('Magnitude'); -set(gca, 'XTickLabel',[]); -ylim([1e-4, 20]); -yticks([1e-4, 1e-3, 1e-2, 1e-1, 1, 1e1]); -leg = legend('location', 'southeast', 'FontSize', 8, 'NumColumns', 2); -leg.ItemTokenSize(1) = 18; - -% Phase -ax2 = nexttile; -hold on; -set(gca,'ColorOrderIndex',1) -plot(freqs, 180/pi*phase(squeeze(freqresp(H1, freqs, 'Hz'))), '-'); -set(gca,'ColorOrderIndex',2) -plot(freqs, 180/pi*phase(squeeze(freqresp(H2, freqs, 'Hz'))), '-'); -hold off; -xlabel('Frequency [Hz]'); ylabel('Phase [deg]'); -set(gca, 'XScale', 'log'); -yticks([-180:90:180]); - -linkaxes([ax1,ax2],'x'); -xlim([freqs(1), freqs(end)]);