diff --git a/applications/lofar2/model/pfb_os/dsp_study_erko.txt b/applications/lofar2/model/pfb_os/dsp_study_erko.txt index baf30dad7c15f9739ca2274d23b8540498c214db..72eea03d208d04678a3baa39e80c01ff10d28605 100644 --- a/applications/lofar2/model/pfb_os/dsp_study_erko.txt +++ b/applications/lofar2/model/pfb_os/dsp_study_erko.txt @@ -64,11 +64,15 @@ # * [PM-REMEZ] https://pm-remez.readthedocs.io/en/latest/ # * [SELESNICK] Ivan Selesnick # . https://eeweb.engineering.nyu.edu/iselesni/EL713/zoom/mrate.pdf +# * [KIEL] Part 6: Multi-Rate Digital Signal Processing, Gerhard Schmidt +# https://dss-kiel.de/images/teaching/lectures/advanced_digital_signal_processing/slides/adsp_06_multirate_processing.pdf # # https://ocw.mit.edu/courses/6-341-discrete-time-signal-processing-fall-2005/ # Youtube: Guitars 4RL # Youtube: MATHEMATICAL METHODS AND TECHNIQUES IN SIGNAL PROCESSING - +# https://www.allaboutcircuits.com/technical-articles/pipelined-direct-form-fir-versus-the-transposed-structure/ +# +# FBMC = filter bank-based multicarrier 1) Linear Time Invariant (LTI) system [LYONS 1.6] @@ -547,7 +551,7 @@ c) s-plane and z-plane = sum bk x[n - k] - sum ak y[n - k] k=0 k=1 -- Implmentation structure [LYONS 6.6, JOS2 9.1]: +- Implmentation structure [LYONS 6.6, JOS2 9.1, VAIDYANATHAN 2.1.3]: . Direct-Form I: B(z) * 1 / A(z) x[n] ---v-----> b0 --> + --> + -------------v----> y[n] @@ -569,6 +573,22 @@ c) s-plane and z-plane --> b1 --> z^-1 <-- a1 <-- --> b2 --> z^-1 <-- a2 <-- + . With the Direct-Form FIR the input is passed through the delay line, and + then weighted at each tap and added all in parallel, so combinatorially. + With the Transposed Direct-Form FIR the input is first fanned out and + weighted in parallel for all taps and passed to the delay line for each + tap. The summation is done per tap and the (intermediate) sum is passed + through the delay line. + . Transposed Direct-Form is self pipelined + . Direct-Form implementation can be pipelined by adding registers in the + adder line (reg) and in the delay line (z^(-1) + reg). + . Transposed Direct-Form has input fanout to all multipliers. + . Direct-Form has b0, b1 at first delay, + Transposed Direct-Form has b_{N-1}, b_{N-2} at first delay, so the FIR + coefficients are flipped in order along the delay line. However, in + both cases b0 weights the current sample x[n] and connects + combinatorially to the output y[n], so the implementation differs, but + the formula is exactly the same. - For FIR b = h. For IIR it is not possible to directly derive b, a from h [LYONS 6.1]. Therefor use z-transform [LYONS 6.3]: @@ -1162,8 +1182,16 @@ c) s-plane and z-plane . 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. . If D and U are relatively prime, then they can be changed in order. + If D and U are relatively prime, then there are integers d, u such that + d*D - u*U = 1, so then a delay z^(-k) can be decomposed in [KIEL]: + + z^(-k) = z^(-k(d*D - u*U)) + = z^(-kdD) * z^(kuU) -- Polyphase decomposition of H(z) [VAIDYANATHAN 4.3, PROAKIS 10.5.2]: + which then can be pulled through a D and a U + +- Polyphase decomposition of H(z) [VAIDYANATHAN 4.3, PROAKIS 10.5.2, + CROCHIERE 3.3]: . Direct-Form FIR is first apply delay z^(-q) then apply coefficient. Fits down sampling because coefficients are then applied at low rate. @@ -1178,19 +1206,26 @@ c) s-plane and z-plane - up sampling output commutator rotates clockwise and yields U samples every rotation - . Type I polyphase + . Type I polyphase representation, based on delays z^(-q), yielding counter + clockwise commutator (Can also notate Hq = Eq, hq = eq) H(z) = E0(z^Q) + E1(z^Q) z^-1 + E2(z^Q) z^-2 + ... + E_{Q-1}(z^Q) z^-(Q-1) + = E0(z^Q) + + z^-1 E1(z^Q) + + z^-2 E2(z^Q) + + ... + + z^-(Q-1) E_{Q-1}(z^Q) + Q-1 = sum z^(-q) Eq(z^Q) [VAIDYANATHAN Eq 4.3.7] q=0 where Eq(z^Q) is the z-transform of eq[n]: - eq[n] = h(nQ + q), +q for counter clockwise [PROAKIS + eq[n] = h(Qn + q), +q for counter clockwise with delays z^(-1) +inf Eq(z) = sum eq[n] z^(-n), 0 <= q <= Q - 1 @@ -1198,16 +1233,44 @@ c) s-plane and z-plane - Note: For Q = 1 the Eq(z) are the single FIR coefficients in b - . Type II polyphase, clockwise commutator: + . Type II polyphase, based on advances z^(q), yielding clockwise commutator: + + H(z) = z^(-(Q-1)) z^(Q-1) H(z), multiply by delay * advance = 1 + + = z^(-(Q-1)) * [z^(Q-1) E0(z^Q) + # q = 0 + z^(Q-1) z^-1 E1(z^Q) + # q = 1 + z^(Q-1) z^-2 E2(z^Q) + # q = 2 + ... + + z^(Q-1) z^-(Q-2) E_{Q-2}(z^Q)] # q = Q-2 + z^(Q-1) z^-(Q-1) E_{Q-1}(z^Q)] # q = Q-1 + + = z^(-(Q-1)) * [z^(Q-1) E0(z^Q) + # q = 0 + z^(Q-1 - 1) E1(z^Q) + # q = 1 + z^(Q-1 - 2) E2(z^Q) + # q = 2 + ... + + z^( 1) E_{Q-2}(z^Q) + # q = Q-2 + E_{Q-1}(z^Q)] # q = Q-1 + + = z^(-(Q-1)) * [ E_{Q-1}(z^Q) + # q = Q-1 --> p = 0 + z^( 1) E_{Q-2}(z^Q) + # q = Q-2 --> p = 1 + ... + + z^(Q-1 - 2) E2(z^Q) + # q = 2 --> p = Q-3 + z^(Q-1 - 1) E1(z^Q) + # q = 1 --> p = Q-2 + z^(Q-1) E0(z^Q) + # q = 0 --> p = Q-1 Q-1 - H(z) = sum z^(-(Q-1-q) Rq(z^Q) [VAIDYANATHAN Eq 4.3.7] - q=0 + H(z) = sum z^(-(Q-1-p)) Rp(z^Q) [VAIDYANATHAN Eq 4.3.9] + p=0 + + Q-1 + = z^(-(Q-1)) sum z^p Rp(z^Q) + p=0 where: - rq[n] = h(nQ - q) + rp[n] = h(Qn - p), -p for clockwise with advances z^(+1) - Rq(z) = E_{M-1-q}(z) + Rq(z) = E_{Q-1-p}(z), so flipud phases, but keep coefficient order + per phase . Phase q of h(n) with Q - 1 zeros, so [VAIDYANATHAN Fig 4.3.1]: