Skip to content
Snippets Groups Projects
Commit 6d8fcc4d authored by Eric Kooistra's avatar Eric Kooistra
Browse files

Added default dc_adjust=0. Made PFIR bypass selection easier.

parent 29076e74
Branches
No related tags found
No related merge requests found
...@@ -36,6 +36,9 @@ ...@@ -36,6 +36,9 @@
% rerun the impulse reponse tail of the previous sync interval. % rerun the impulse reponse tail of the previous sync interval.
% However if the sync interval is very large, than this rerun may be % However if the sync interval is very large, than this rerun may be
% ignored to simplify the implementation. % ignored to simplify the implementation.
% The FIR prefilter in the PFB can be bypassed by means of the pfir
% tb.pfir_subband_bypass or tb.pfir_channel_bypass. Without the
% FIR prefilter the PFB becomes a FFT.
% %
% * The Apertif subband beamformer is not modelled, therefore the corner % * The Apertif subband beamformer is not modelled, therefore the corner
% turn operates on the selected subbands. The channel correlator is not % turn operates on the selected subbands. The channel correlator is not
...@@ -62,11 +65,15 @@ else ...@@ -62,11 +65,15 @@ else
tb.nof_subbands = 512; tb.nof_subbands = 512;
tb.nof_channels = 64; tb.nof_channels = 64;
tb.subband_hp_adjust = true;
tb.subband_hp_adjust = false; tb.subband_hp_adjust = false;
tb.channel_hp_adjust = true; tb.channel_hp_adjust = false;
%tb.channel_hp_adjust = false;
tb.subband_dc_adjust = false;
tb.channel_dc_adjust = false;
end end
% Optionally bypass the FIR prefilter in the PFB
tb.pfir_subband_bypass = 0;
tb.pfir_channel_bypass = 0;
% Channel filterbank % Channel filterbank
tb.nof_tchan_per_sync = 20; % nof channel periods per sync interval tb.nof_tchan_per_sync = 20; % nof channel periods per sync interval
...@@ -244,6 +251,7 @@ else ...@@ -244,6 +251,7 @@ else
ctrl_pfir_subband.r_stop = 1e-4; % only for fircls1 ctrl_pfir_subband.r_stop = 1e-4; % only for fircls1
ctrl_pfir_subband.config.hp_factor = 1; % Default channel half power bandwidth ctrl_pfir_subband.config.hp_factor = 1; % Default channel half power bandwidth
ctrl_pfir_subband.config.hp_adjust = tb.subband_hp_adjust; ctrl_pfir_subband.config.hp_adjust = tb.subband_hp_adjust;
ctrl_pfir_subband.config.dc_adjust = tb.subband_dc_adjust;
ctrl_pfir_subband.BWchan = ctrl_pfir_subband.config.hp_factor / tb.subband_fft_size; % Channel bandwidth ctrl_pfir_subband.BWchan = ctrl_pfir_subband.config.hp_factor / tb.subband_fft_size; % Channel bandwidth
hfir_subband_coeff = pfir_coeff_adjust(ctrl_pfir_subband.nof_polyphases, ... hfir_subband_coeff = pfir_coeff_adjust(ctrl_pfir_subband.nof_polyphases, ...
ctrl_pfir_subband.nof_taps, ... ctrl_pfir_subband.nof_taps, ...
...@@ -264,7 +272,7 @@ ctrl_pfir_subband.gain = sum(ctrl_pfir_subband.coeff(:)) / ctrl_pfir_subband.nof ...@@ -264,7 +272,7 @@ ctrl_pfir_subband.gain = sum(ctrl_pfir_subband.coeff(:)) / ctrl_pfir_subband.nof
if tb.force_subband_pfir_coeff if tb.force_subband_pfir_coeff
ctrl_pfir_subband.gain = 1; ctrl_pfir_subband.gain = 1;
end end
ctrl_pfir_subband.bypass = 0; ctrl_pfir_subband.bypass = tb.pfir_subband_bypass;
disp(sprintf(['Subband FIR filter settings:\n', ... disp(sprintf(['Subband FIR filter settings:\n', ...
'. Bypass = %d\n', ... '. Bypass = %d\n', ...
...@@ -320,6 +328,7 @@ ctrl_pfir_channel.r_pass = 1e-3; % only for fircls1 ...@@ -320,6 +328,7 @@ ctrl_pfir_channel.r_pass = 1e-3; % only for fircls1
ctrl_pfir_channel.r_stop = 1e-4; % only for fircls1 ctrl_pfir_channel.r_stop = 1e-4; % only for fircls1
ctrl_pfir_channel.config.hp_factor = 1; % Default channel half power bandwidth ctrl_pfir_channel.config.hp_factor = 1; % Default channel half power bandwidth
ctrl_pfir_channel.config.hp_adjust = tb.channel_hp_adjust; ctrl_pfir_channel.config.hp_adjust = tb.channel_hp_adjust;
ctrl_pfir_channel.config.dc_adjust = tb.channel_dc_adjust;
ctrl_pfir_channel.BWchan = ctrl_pfir_channel.config.hp_factor / tb.channel_fft_size; % Channel bandwidth ctrl_pfir_channel.BWchan = ctrl_pfir_channel.config.hp_factor / tb.channel_fft_size; % Channel bandwidth
hfir_channel_coeff = pfir_coeff_adjust(ctrl_pfir_channel.nof_polyphases, ... hfir_channel_coeff = pfir_coeff_adjust(ctrl_pfir_channel.nof_polyphases, ...
ctrl_pfir_channel.nof_taps, ... ctrl_pfir_channel.nof_taps, ...
...@@ -333,7 +342,7 @@ ctrl_pfir_channel.coeff = reshape(hfir_channel_coeff, ctrl_pfir_channel.nof_poly ...@@ -333,7 +342,7 @@ ctrl_pfir_channel.coeff = reshape(hfir_channel_coeff, ctrl_pfir_channel.nof_poly
ctrl_pfir_channel.coeff = flipud(ctrl_pfir_channel.coeff); ctrl_pfir_channel.coeff = flipud(ctrl_pfir_channel.coeff);
ctrl_pfir_channel.Zdelays = zeros(ctrl_pfir_channel.nof_polyphases, ctrl_pfir_channel.nof_taps-1); ctrl_pfir_channel.Zdelays = zeros(ctrl_pfir_channel.nof_polyphases, ctrl_pfir_channel.nof_taps-1);
ctrl_pfir_channel.gain = sum(ctrl_pfir_channel.coeff(:)) / ctrl_pfir_channel.nof_polyphases; ctrl_pfir_channel.gain = sum(ctrl_pfir_channel.coeff(:)) / ctrl_pfir_channel.nof_polyphases;
ctrl_pfir_channel.bypass = 0; ctrl_pfir_channel.bypass = tb.pfir_channel_bypass;
disp(sprintf(['Channel FIR filter settings:\n', ... disp(sprintf(['Channel FIR filter settings:\n', ...
'. Bypass = %d\n', ... '. Bypass = %d\n', ...
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment