Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
H
HDL
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Jira
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
RTSD
HDL
Commits
6d8fcc4d
Commit
6d8fcc4d
authored
Dec 1, 2016
by
Eric Kooistra
Browse files
Options
Downloads
Patches
Plain Diff
Added default dc_adjust=0. Made PFIR bypass selection easier.
parent
29076e74
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
applications/apertif/matlab/two_pfb.m
+14
-5
14 additions, 5 deletions
applications/apertif/matlab/two_pfb.m
with
14 additions
and
5 deletions
applications/apertif/matlab/two_pfb.m
+
14
−
5
View file @
6d8fcc4d
...
@@ -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'
,
...
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment