Skip to content
GitLab
Explore
Sign in
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
bdcc3563
Commit
bdcc3563
authored
9 months ago
by
Eric Kooistra
Browse files
Options
Downloads
Patches
Plain Diff
Clarify multirate spectra.
parent
46a62ee4
No related branches found
No related tags found
No related merge requests found
Pipeline
#87674
passed
9 months ago
Stage: linting
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
applications/lofar2/model/pfb_os/dsp_study_erko.txt
+79
-42
79 additions, 42 deletions
applications/lofar2/model/pfb_os/dsp_study_erko.txt
with
79 additions
and
42 deletions
applications/lofar2/model/pfb_os/dsp_study_erko.txt
+
79
−
42
View file @
bdcc3563
...
@@ -1004,7 +1004,8 @@ c) s-plane and z-plane
...
@@ -1004,7 +1004,8 @@ c) s-plane and z-plane
12) Multirate processing:
12) Multirate processing:
- Linear Time Variant (LTV) process, because it depends on when the
- Linear Time Variant (LTV) process, because it depends on when the
downsampling and upsampling start.
downsampling and upsampling start. This causes that order of operations
matters [LYONS 10.3.1]
- Sampling and sampling rate conversion can be viewed as a modulation process
- Sampling and sampling rate conversion can be viewed as a modulation process
in which the spectrum of the digital signal contains periodic repetitions of
in which the spectrum of the digital signal contains periodic repetitions of
the baseband signal (images) spaced at harmonics of the sampling frequency.
the baseband signal (images) spaced at harmonics of the sampling frequency.
...
@@ -1013,36 +1014,66 @@ c) s-plane and z-plane
...
@@ -1013,36 +1014,66 @@ c) s-plane and z-plane
baseband [CROCHIERE 2.4.2].
baseband [CROCHIERE 2.4.2].
- Polyphase filtering ensures that only the values that remain are calculated,
- Polyphase filtering ensures that only the values that remain are calculated,
so there are D or U phases [LYONS 10.7]. The LPF with all phases is called
so there are D or U phases [LYONS 10.7]. The LPF with all phases is called
the prototype filter.
the prototype filter. Do not calculate samples that will be:
. discarded,
. inserted as zeros.
- For large D or U use two stage D = D1 * D2 or U = U1 * U2, where D1 > D2 and
- For large D or U use two stage D = D1 * D2 or U = U1 * U2, where D1 > D2 and
U1 < U2 [LYONS 10.8.2]
U1 < U2 [LYONS 10.8.2]
- Polyphase decomposition of H(z) [VAIDYANATHAN 4.3]:
- Sampling, downsampling and upsampling
. Sampling causes the analoge spectrum to alias around k 2pi, similar for
H(z) = H0(z^N) + H1(z^N) z^-1 + H2(z^N) z^-2 + ... + Hi(z^N) z^-i
downsamping the the digital spectrum aliases around k 2pi / D, as if the
analogue signal was sampled directly at the downsampled rate [LYONS 10.1].
. Hi(z^N ) is the z-transform of h(mN + i)
. Downsampled spectrum [LYONS 10.3.2]
. Phase i of h(n) with N - 1 zeros
1. Draw original spectrum beyond -2pi to + 2pi, to show 0 and at least one
spectral replication (alias) for both negative (-2pi) and positive
- Noble identities [LYONS Fig 10.20], [VAIDYANATHAN Fig 4.2.3]
(+2pi) frequency directions of the original sample frequency fs_old =
2pi.
. Up sampling : x[n] --> up Q --> H(z^Q) --> y[m], is equivalent to:
2. Draw D - 1 copies of the original spectrum shifted by k 2pi / D, note
H(z) --> up Q
k = 0 is the original spectrum of step 1
3. Scale up the frequency axis of the new spectrum by factor D to get the
. Down sampling : x[n] --> H(z^Q) --> down Q --> y[m], is equivalent to:
frequency axis for the down sample frequency. The downsampled spectrum
x[n] --> down Q --> H(z) --> y[m]
now ranges from -pi to pi for fs_new = 2pi.
4. Scale down magnitude of new spectrum by factor D. The time domain
. H_i(z^Q) is upsampled-by-Q version of H(z), so with Q-1 zero coefficients
amplitude of downsampled signal remains the same, but the frequency
in the H(z) power series, starting at phase i.
domain magnitude decreases by factor D, because the DFT magnitude is
proportional to number of time-domain samples used in the
- LPF + downsampling = decimation [LYONS 10.9, PROAKIS 10, CROCHIERE Fig 3.2,
transformation [LYONS 10.3.1].
VAIDYANATHAN Fig 4.1.4, SP4COMM 11.1.2]:
. Upsampled spectrum [LYONS 10.5.2]
. Downsampling:
1. Draw original spectrum beyond -U 2pi to +U 2pi, to show at least U
spectral replications of the original spectrum in both negative and
positive frequency directions of the original sample frequency fs_old =
2pi. That is all, because inserting U - 1 zeros merely increases the
effective sample frequency to fs_new = U fs_old. It does not change the
spectrum, but it does cause that U - 1 spectral replications (aliases)
are now also in the 2pi range of fs_new. Hence it looks like inserting
zeros replicates the spectrum around multiples of 2pi / U, but it is
easier to understand as that increasing fs_new now includes U - 1
replications of the original spectrum.
2. Scale down the frequency axis of the new spectrum by factor U to get the
frequency axis for the up sample frequency. The upsampled spectrum now
ranges from -pi to pi for fs_new = 2pi.
3. The magnitude of new spectrum remains the same.
. Decimation = LPF + Downsampling [LYONS 10.1]:
To avoid overlapping aliasing after downsampling to fs_new an LPF needs
to band limit the original spectrum to pi / D = fs_old/2 / D.
. Interpolation = Upsampling + LPF:
To interpolate the zero values for fs_new an LPF needs to band limit the
new spectrum to pi / U = fs_new/2 / D.
Using zero order hold would be a naive approach, because then all samples
need to be calculated and the LPF then needs to compensate for the
non-flat pass band of sin(x)/x [LYONS 10.5.1].
. Decimation and interpolation can also use a BPF to select another part of
the band [HARRIS 2.2, VAIDYANATHAN 4.1.1].
- Downsampling [LYONS 10.1, PROAKIS 10, CROCHIERE Fig 3.2, VAIDYANATHAN Fig
4.1.4, JOS4 11.1, SP4COMM 11.1.2]:
x_D[n] = x[nD], because x_D removes D-1 values from x
x_D[n] = x[nD], because x_D removes D-1 values from x
Define x' at x time grid, but with x' = 0 for samples in x that will be
Define x' at x time grid, but with x' = 0 for samples in x that will be
discarded:
discarded. This operation has no name in literature, probably because it
is a conceptual step and not an implementation operation:
x'[n] = d[n] x[n], with d[n] = 1, for n % D = 0
x'[n] = d[n] x[n], with d[n] = 1, for n % D = 0
= 0, otherwise
= 0, otherwise
...
@@ -1087,25 +1118,20 @@ c) s-plane and z-plane
...
@@ -1087,25 +1118,20 @@ c) s-plane and z-plane
X_D(z) on the unit circle with z = exp(jw) [PROAKIS Eq 10.2.9]:
X_D(z) on the unit circle with z = exp(jw) [PROAKIS Eq 10.2.9]:
D-1
D-1
X_D(e^jw) = 1/D sum X(exp(j (w - k 2pi
)
/ D))
X_D(e^jw) = 1/D sum X(exp(j (w
/ D
- k 2pi / D))
)
k=0
k=0
w in [0:2pi>
summation terms for k != 0 are aliasing terms
The resulting spectrum is the scaled sum of D superimposed copies of the
The resulting spectrum is the scaled sum of D superimposed copies of the
original spectrum X(e^jω), and each copy is shifted in frequency by a
original spectrum X(e^jω), and each copy is shifted in frequency by a
multiple of 2pi/D and the result is stretched by a factor of D. This is
multiple of 2pi/D and the result is stretched by a factor of D. This is
similar to sampling of an analogue signal that creates a periodization of
similar to sampling of an analogue signal that creates a periodization of
the analogue spectrum, but now the spectra are already inherently
the analogue spectrum, but now the spectra are already inherently
2pi periodic, and downsampling creates D − 1 additional interleaved copies.
2pi periodic, and downsampling creates D − 1 additional interleaved copies.
For the spectral copies not to overlap, the maximum (positive) frequency
the original spectrum must be less than pi / D. This is the non-aliasing
condition for the downsampling operator.
. Discarding samples copies the spectrum around multiples of 2pi / D. First
- Upsampling:
the LPF has to remove all copies.
. Do not calculate samples that will be thrown away.
- Upsampling + LPF = interpolation:
. Upsampling:
x_U[n] = x[n / U], for n % U = 0
x_U[n] = x[n / U], for n % U = 0
= 0, otherwise, because x_U inserts U-1 zeros in x
= 0, otherwise, because x_U inserts U-1 zeros in x
...
@@ -1116,15 +1142,26 @@ c) s-plane and z-plane
...
@@ -1116,15 +1142,26 @@ c) s-plane and z-plane
. Spectrum, evaluate X_U(z) on unit circle [PROAKIS Eq 10.3.3]:
. Spectrum, evaluate X_U(z) on unit circle [PROAKIS Eq 10.3.3]:
X_U(e^jw) = X(exp(jw U))
X_U(e^jw) = X(exp(jw U)), w in [0:2pi>
X(jwL) traverses unit circle U times
- Polyphase decomposition of H(z) [VAIDYANATHAN 4.3]:
. Inserting zeros replicates the spectrum around multiples of 2pi / U. Then
H(z) = H0(z^N) + H1(z^N) z^-1 + H2(z^N) z^-2 + ... + Hi(z^N) z^-i
the LPF has to remove all replicas and by that it interpolates to fill in
the zeros. To remove the replicas, the LPF pass band is pi / L.
. Hi(z^N ) is the z-transform of h(mN + i)
. Do not calculate samples that will be inserted as zeros.
. Phase i of h(n) with N - 1 zeros
. Using zero order hold would be a naive approach, because then all samples
need to be calculated and the LPF then needs to compensate for the non-flat
- Noble identities [LYONS Fig 10.20], HARRIS 2.2.1, VAIDYANATHAN Fig 4.2.3]
pass band of sin(x)/x [LYONS 10.5.1]
. Down sampling : x[n] --> H(z^Q) --> Q:1 --> y[m], is equivalent to:
x[n] --> Q:1 --> H(z) --> y[m]
. Up sampling : x[n] --> 1:Q --> H(z^Q) --> y[m], is equivalent to:
H(z) --> 1:Q
. H_i(z^Q) is upsampled-by-Q version of H(z), so with Q-1 zero coefficients
in the H(z) power series, starting at phase i.
- Fractional time delay [CROCHIERE 6.3]
- Fractional time delay [CROCHIERE 6.3]
. Up sampling Q --> LPF --> z^(-d) --> down sampling Q yields semi allpass
. Up sampling Q --> LPF --> z^(-d) --> down sampling Q yields semi allpass
...
...
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