Skip to content
Snippets Groups Projects

Resolve RTSD-265

Merged Eric Kooistra requested to merge RTSD-265 into master
1 file
+ 54
38
Compare changes
  • Side-by-side
  • Inline
@@ -326,18 +326,28 @@ c) s-plane and z-plane
input samples and a sequence of filter coefficients [LYONS 5.2].
- Convolution equation [LYONS Eq. 5.6, JOS4 7.2.4]:
N-1
y(n) = sum h(k) x(n - k) = h(k) * x(n)
k=0
N-1
y[n] = sum h[k] x[n - k] = h * x
k=0
Change of variable m = n - k yields:
n
y[n] = sum h[n - m] x[m] = x * h
m=n-(N-1)
- Impulse response h(k) are the FIR filter coefficients:
So convolution involves weight, multiply last, newest sample x[n] by h[0]
and oldest by h[N-1]. If x is impulse at n = 0, then y[n] = h[n] is the
impulse response.
x(n) --> x(n-1) --> ... --> x(n-(N-1)) --\
- Impulse response h[k] are the FIR filter coefficients:
x[n] --> x[n-1] --> ... --> x[n-(N-1)] --\
| | |
h(0) h(1) h(N-1)
\----------\-- ... ----------------\--> + --> y(n)
h[0] h[1] h[N-1]
\----------\-- ... ----------------\--> + --> y[n]
- Difference equation, so b(m) = h(m) for m = 0, 1, ...,N-1:
- Difference equation, so b[m] = h[m] for m = 0, 1, ...,N-1:
y[n] = b[0]x[n] + b[1]x[n-1] + ... + b[N-1] x[n-(N-1)]
@@ -350,14 +360,14 @@ c) s-plane and z-plane
- Convolution in time domain is equivalent to multiplication in frequency
domain:
y(n) = h(k) * x(n) ==> DFT ==> Y(z) = H(z) X(z)
y[n] = h[k] * x[n] ==> DFT ==> Y(z) = H(z) X(z)
For DFT this is circular convolution. With suffcient zero padding N >= len(h)
+ len(x) - 1 [LYONS 13.10], then the circular convolution can calculate the
linear convolution:
N-1
y[n] = sum h(k) x((n - k) % N)
y[n] = sum h[k] x[(n - k) % N]
k=0
- Number of FIR coefficients (Ntaps)
@@ -383,7 +393,7 @@ c) s-plane and z-plane
. -1 order no decay implies impulses at end-points of impulse response.
- Linear phase FIR filter
. Even or odd symmetrical h(n) = +-h(M - 1 - n), n = 0,1,...,N-1
. Even or odd symmetrical h[n] = +-h[M - 1 - n)] n = 0,1,...,N-1
[PROAKIS 8.2.1]. Reason for using FIR [LYONS 5.10.3]
. Group delay (= envelope delay[LYONS 5.8]) of symmetrical FIR filter is:
G = (N_taps - 1) / 2 [Ts] [LYONS 5.10.3]
@@ -405,7 +415,7 @@ c) s-plane and z-plane
. construct 2N + 1 half band from N (non zero) half band design, trick
to use different weights [HARRIS 8.5]
. Low pass, fc = fs / 4, sinc(t) = sin(pi t) / (pi t) [numpy]
. h_lp[n] = h_ideal(n) = 2 f_cutoff sinc(2 f_cutoff n) = 1/2 sinc(n / 2),
. h_lp[n] = h_ideal[n] = 2 f_cutoff sinc(2 f_cutoff n) = 1/2 sinc(n / 2),
n in Z
. h_hp[n] = h_lp[n] exp(j pi n) = h_lp[n] * cos(n pi)
. Low pass and high pass half band filters are complementary [HARRIS 8.2],
@@ -440,7 +450,7 @@ c) s-plane and z-plane
for different shifts (lag) in time. Autocorrelation can show the periodicity
of a signal, because then it has similarity for some k > 0.
. Difference between correlation and convolution is that convolution flips
one input, so corr(x, y) = conv(x, flip(y)). Hence if ne input is
one input, so corr(x, y) = conv(x, flip(y)). Hence if the input is
symmetrical then correlation and convolution are the same.
* The purpose of convolution is to determine the output of a filter with
impulse response h.
@@ -460,7 +470,7 @@ c) s-plane and z-plane
. To prove that correlation can be expressed as convolution use a helper
function [WOLFSOUND]:
xh[n] = sum_k x[n + k] h[k], with sum_k for k = -inf to +inf
xh[n] = sum_k x[n + k] h[k], correlation with sum_k for k = -inf to +inf
= sum_k x[-(-n - k)] h[k]
= sum_k x1[-n - k] h[k], with x1[p] = x[-p]
= (x1[n] * h[n])[-n], because convolution equation is [LYONS Eq. 5.6,
@@ -1012,7 +1022,7 @@ c) s-plane and z-plane
- for DCT it extends flipped to avoid a zero-th order discontinuity, the
slope (first order) is typically still discontinuous.
- and for type II it extends symmetrically half way between the end points
. The different types come from how the boudaries are defined.
. The different types come from how the boundaries are defined.
. The DCT makes the transform converge faster than the DFT, because any
discontinuities in a function reduce the rate of convergence of the Fourier
series.
@@ -1191,31 +1201,36 @@ c) s-plane and z-plane
sample instead of L samples [LYONS 10.11].
- Time domain Down, Up, Resample U/D:
. down [CROCHIERE Eq 2.55]:
+inf +inf
y[m] = sum h[k] x[mD - k] = sum h[mD - n] x[n], using n = mD - k
k=-inf n=-inf
. up [CROCHIERE Eq 2.78, 2.80]:
+inf
y[m] = sum h[m - k] x[k / U], for k / U is integer, else x[] = 0 for
k=-inf inserted zeros
+inf
= sum h[m - rU] x[r] = v[m], using r = m // U - n yields:
r=-inf
+inf
= sum h[nU + m % U] x[m // U - n]
n=-inf
. down [CROCHIERE Eq 2.55, PROAKIS Eq 10.23]: n = mD
+inf +inf
yd[m] = sum h[k] x[mD - k] = sum h[mD - n] x[n], using n = mD - k
k=-inf n=-inf
. up [CROCHIERE Eq 2.78]:
+inf
yu[n] = sum h[n - k] x[k / U], for r = k / U is integer, else x[] = 0
k=-inf for inserted zeros
. resample [CROCHIERE Eq 2.88, 2.90]
+inf
y[m] = v[mD] = sum h[mD - rU] x[r], using r = mD // U - n yields:
r=-inf
+inf
= sum h[nU + mD % U] x[mD // U - n]
n=-inf
= sum h[n - rU] x[r]
r=-inf
using r = n // U - m yields [CROCHIERE Eq 2.80]:
+inf
= sum h[mU + n % U] x[n // U - m]
m=-inf
. resample [CROCHIERE Eq 2.88]
+inf
yr[m] = yu[mD] = sum h[mD - rU] x[r]
r=-inf
using r = nD // U - m yields [CROCHIERE Eq 2.90]:
+inf
= sum h[mU + nD % U] x[nD // U - m]
m=-inf
- Noble identities [LYONS Fig 10.20], HARRIS 2.2.1, VAIDYANATHAN Fig 4.2.3]
. Downsampling : x[n] --> H(z^Q) --> Q:1 --> y[m], is equivalent to:
@@ -1533,6 +1548,7 @@ c) s-plane and z-plane
circular shift. Therefore R(m) / wb should be an integer then [TUTHILL].
13b) Single channel up converter [HARRIS 7]
Loading