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
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
RTSD
HDL
Commits
e3c0da82
Commit
e3c0da82
authored
9 months ago
by
Eric Kooistra
Browse files
Options
Downloads
Patches
Plain Diff
Clarify SNR.
parent
d6d617c7
No related branches found
No related tags found
1 merge request
!419
Resolve RTSD-265
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
applications/lofar2/model/pfb_bunton_annotated/reconstruct.m
+8
-4
8 additions, 4 deletions
applications/lofar2/model/pfb_bunton_annotated/reconstruct.m
with
8 additions
and
4 deletions
applications/lofar2/model/pfb_bunton_annotated/reconstruct.m
+
8
−
4
View file @
e3c0da82
...
@@ -25,7 +25,7 @@ close all
...
@@ -25,7 +25,7 @@ close all
rng
(
'default'
)
rng
(
'default'
)
ImpulseResponse
=
0
;
% set to 1 to calculate correction filter
ImpulseResponse
=
0
;
% set to 1 to calculate correction filter
Correct
=
1
;
% set to 1 to allow correction filter to be applied
Correct
=
0
;
% set to 1 to allow correction filter to be applied
% cl is the prototype lowpass filter
% cl is the prototype lowpass filter
Ncoefs
=
length
(
cl
);
% = 2304
Ncoefs
=
length
(
cl
);
% = 2304
...
@@ -112,9 +112,13 @@ diff = outData - inData(1:length(outData));
...
@@ -112,9 +112,13 @@ diff = outData - inData(1:length(outData));
% . rng('default'); reconstruct, with Correct = 1: SNR = 62.24 dB
% . rng('default'); reconstruct, with Correct = 1: SNR = 62.24 dB
% Note:
% Note:
% . With the impulse data input the SNR = 304.46 dB, so perfect.
% . With the impulse data input the SNR = 304.46 dB, so perfect.
% . For other input data there is still some error, due to the limited stopband
% . For other input data there is still some error when Correct = 1, due to
% attenuation of the prototype LPF (can be seen using DEVS = 0.003 instead of
% the limited stopband attenuation of the prototype LPF (can be seen using
% 0.0003 in Gen_filter12).
% DEVS = 0.003 instead of 0.0003 in Gen_filter12).
% . When Correct = 0 then the error is caused largely by the passband ripple
% DEVP = 0.02 and W0 = 1 / 15.3 of the prototype LPF, and db(0.02) = -34 dB.
% With DEVP = 0.005 and W0 = 1 / 15.05 then db(0.005) = -46.0 dB and SNR =
% 38.8 dB, so increased.
SNR
=
10
*
log10
(
sum
(
abs
(
inData
(
10000
:
70000
)
.^
2
))
/
sum
(
abs
(
diff
(
10000
:
70000
)
.^
2
)));
SNR
=
10
*
log10
(
sum
(
abs
(
inData
(
10000
:
70000
)
.^
2
))
/
sum
(
abs
(
diff
(
10000
:
70000
)
.^
2
)));
sprintf
(
'SNR = %6.2f [dB]'
,
SNR
)
sprintf
(
'SNR = %6.2f [dB]'
,
SNR
)
...
...
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