Update matlab scripts
This commit is contained in:
		@@ -7,9 +7,6 @@ s = zpk('s');
 | 
			
		||||
%% Initialize Frequency Vector
 | 
			
		||||
freqs = logspace(-1, 3, 1000);
 | 
			
		||||
 | 
			
		||||
%% Add functions to path
 | 
			
		||||
addpath('./src');
 | 
			
		||||
 | 
			
		||||
%% Weighting Function Design
 | 
			
		||||
% Parameters
 | 
			
		||||
n = 3; w0 = 2*pi*10; G0 = 1e-3; G1 = 1e1; Gc = 2;
 | 
			
		||||
@@ -45,8 +42,8 @@ ylim([5e-4, 20]);
 | 
			
		||||
yticks([1e-4, 1e-3, 1e-2, 1e-1, 1, 1e1]);
 | 
			
		||||
 | 
			
		||||
%% Design of the Weighting Functions
 | 
			
		||||
W1 = generateWF('n', 3, 'w0', 2*pi*10, 'G0', 1000, 'G1', 1/10, 'Gc', 0.45);
 | 
			
		||||
W2 = generateWF('n', 2, 'w0', 2*pi*10, 'G0', 1/10, 'G1', 1000, 'Gc', 0.45);
 | 
			
		||||
W1 = generateWF('n', 3, 'w0', 2*pi*10, 'G0', 1000, 'Ginf', 1/10, 'Gc', 0.45);
 | 
			
		||||
W2 = generateWF('n', 2, 'w0', 2*pi*10, 'G0', 1/10, 'Ginf', 1000, 'Gc', 0.45);
 | 
			
		||||
 | 
			
		||||
%% Plot of the Weighting function magnitude
 | 
			
		||||
figure;
 | 
			
		||||
 
 | 
			
		||||
@@ -7,9 +7,6 @@ s = zpk('s');
 | 
			
		||||
%% Initialize Frequency Vector
 | 
			
		||||
freqs = logspace(-3, 0, 1000);
 | 
			
		||||
 | 
			
		||||
%% Add functions to path
 | 
			
		||||
addpath('./src');
 | 
			
		||||
 | 
			
		||||
%% Upper bounds for the complementary filters
 | 
			
		||||
figure;
 | 
			
		||||
hold on;
 | 
			
		||||
 
 | 
			
		||||
@@ -7,12 +7,9 @@ s = zpk('s');
 | 
			
		||||
%% Initialize Frequency Vector
 | 
			
		||||
freqs = logspace(-1, 3, 1000);
 | 
			
		||||
 | 
			
		||||
%% Add functions to path
 | 
			
		||||
addpath('./src');
 | 
			
		||||
 | 
			
		||||
%% Design of the Weighting Functions
 | 
			
		||||
W1 = generateWF('n', 3, 'w0', 2*pi*10, 'G0', 1000, 'G1', 1/10, 'Gc', 0.45);
 | 
			
		||||
W2 = generateWF('n', 2, 'w0', 2*pi*10, 'G0', 1/10, 'G1', 1000, 'Gc', 0.45);
 | 
			
		||||
W1 = generateWF('n', 3, 'w0', 2*pi*10, 'G0', 1000, 'Ginf', 1/10, 'Gc', 0.45);
 | 
			
		||||
W2 = generateWF('n', 2, 'w0', 2*pi*10, 'G0', 1/10, 'Ginf', 1000, 'Gc', 0.45);
 | 
			
		||||
 | 
			
		||||
%% Generalized plant for "closed-loop" complementary filter synthesis
 | 
			
		||||
P = [ W1 0   1;
 | 
			
		||||
 
 | 
			
		||||
@@ -6,15 +6,10 @@ s = zpk('s');
 | 
			
		||||
 | 
			
		||||
freqs = logspace(-2, 3, 1000);
 | 
			
		||||
 | 
			
		||||
addpath('./src');
 | 
			
		||||
 | 
			
		||||
% Weights
 | 
			
		||||
% First we define the weights.
 | 
			
		||||
 | 
			
		||||
%% Design of the Weighting Functions
 | 
			
		||||
W1 = generateWF('n', 2, 'w0', 2*pi*1, 'G0', 1/10, 'G1', 1000, 'Gc', 0.5);
 | 
			
		||||
W1 = generateWF('n', 2, 'w0', 2*pi*1, 'G0', 1/10, 'Ginf', 1000, 'Gc', 0.5);
 | 
			
		||||
W2 = 0.22*(1 + s/2/pi/1)^2/(sqrt(1e-4) + s/2/pi/1)^2*(1 + s/2/pi/10)^2/(1 + s/2/pi/1000)^2;
 | 
			
		||||
W3 = generateWF('n', 3, 'w0', 2*pi*10, 'G0', 1000, 'G1', 1/10, 'Gc', 0.5);
 | 
			
		||||
W3 = generateWF('n', 3, 'w0', 2*pi*10, 'G0', 1000, 'Ginf', 1/10, 'Gc', 0.5);
 | 
			
		||||
 | 
			
		||||
%% Inverse magnitude of the weighting functions
 | 
			
		||||
figure;
 | 
			
		||||
@@ -32,28 +27,20 @@ xlim([freqs(1), freqs(end)]); ylim([2e-4, 1.3e1])
 | 
			
		||||
leg = legend('location', 'northeast', 'FontSize', 8);
 | 
			
		||||
leg.ItemTokenSize(1) = 18;
 | 
			
		||||
 | 
			
		||||
% H-Infinity Synthesis
 | 
			
		||||
% Then we create the generalized plant =P=.
 | 
			
		||||
 | 
			
		||||
%% Generalized plant for the synthesis of 3 complementary filters
 | 
			
		||||
P = [W1 -W1 -W1;
 | 
			
		||||
     0   W2  0 ;
 | 
			
		||||
     0   0   W3;
 | 
			
		||||
     1   0   0];
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
% And we do the $\mathcal{H}_\infty$ synthesis.
 | 
			
		||||
 | 
			
		||||
%% Standard H-Infinity Synthesis
 | 
			
		||||
[H, ~, gamma, ~] = hinfsyn(P, 1, 2,'TOLGAM', 0.001, 'METHOD', 'ric', 'DISPLAY', 'on');
 | 
			
		||||
 | 
			
		||||
% Obtained Complementary Filters
 | 
			
		||||
% The obtained filters are:
 | 
			
		||||
 | 
			
		||||
%%
 | 
			
		||||
%% Synthesized H2 and H3 filters
 | 
			
		||||
H2 = tf(H(1));
 | 
			
		||||
H3 = tf(H(2));
 | 
			
		||||
 | 
			
		||||
%% H1 is defined as the complementary filter of H2 and H3
 | 
			
		||||
H1 = 1 - H2 - H3;
 | 
			
		||||
 | 
			
		||||
%% Bode plot of the obtained complementary filters
 | 
			
		||||
 
 | 
			
		||||
@@ -14,7 +14,8 @@
 | 
			
		||||
 | 
			
		||||
@inproceedings{dehaeze21_new_method_desig_compl_filter,
 | 
			
		||||
  author          = {Dehaeze, Thomas and Vermat, Mohit and Collette, Christophe},
 | 
			
		||||
  title           = {A New Method of Designing Complementary Fil},
 | 
			
		||||
  title           = {A New Method of Designing Complementary Filters for Sensor
 | 
			
		||||
                  Fusion Using the $\mathcal{H}_\infty$ Synthesis},
 | 
			
		||||
  booktitle       = {Gravitational Wave and Particle Astrophysics Detectors},
 | 
			
		||||
  year            = 2004,
 | 
			
		||||
  volume          = 5500,
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user