Multirate Signal Processing Chapter 8 Dr. Bradley J. Bazuin Western Michigan University College o Engineering and Applied Sciences Department o Electrical and Computer Engineering 903 W. Michigan Ave. Kalamazoo MI, 49008-539
Chapter 8: Hal-band Filters 8. Hal-band Low Pass Filters 0 8. Hal-band High Pass Filters 04 8.3 Window Design o Hal-band Filters 05 8.4 Remez Alorithm Design o Hal-band Filters 07 8.4. Hal-band Remez Algorithm Design Trick 08 8.5 Hilbert Transorm Band-pass Filter 0 8.5. Applying the Hilbert Transorm Filter 8.6 Interpolating with Low Pass Hal-band Filters 4 8.7 Dyadic Pass Hal-band Filters 7 Processing or Communication Systems, Prentice Hall PTR, 004. ISBN 0-3-465-.
Processing or Communication Systems, Prentice Hall PTR, 004. ISBN 0-3-465-. 3 Rectangular Low Pass Filter rect H t t h sinc t t t h sin t t t h sin : t t zero First zero st zero st
Processing or Communication Systems, Prentice Hall PTR, 004. ISBN 0-3-465-. 4 Hal-Band Low Pass Filter s H rect t t h s s sinc t t t h s s s 4 4 sin 4 t t t h s s s sin s zero st zero st s t t zero First : 4 s Let
Hal-Band Low Pass Filters Spectral Characteristics and Filter Coeicients h t s s sin t n Let t and scale by s t n sin n h n sinc n s s Even integers, except 0 or all coeiceints! Processing or Communication Systems, Prentice Hall PTR, 004. ISBN 0-3-465-. 5
Hal-Band Coeicients Filter length N+ But there are N zero coeicients or N even or N- zero coeicients or N odd Note: always select N as odd (i.e. i N=M+, then N+=>4M+3) 4M+3 and 4M+5 use the same non-zero coeicients! Chap8_.m - odd Chap8_c.m - even Processing or Communication Systems, Prentice Hall PTR, 004. ISBN 0-3-465-. 6
Computation Load There is one multiply or every unique coeicient Conventional ilter 4M-taps 4M Multiplies, 4M- Adds Hal-Band ilter 4M+3 taps M+3 Multiplies, M+ Adds Hal-Band ilter, i h(0) doesn t require a multiply, 4M+3 taps M+ Multiplies, M+ Adds Hal-Band ilter, i h(0) doesn t require a multiply and symmetric, 4M+3 taps M+ Multiplies, M+M+ Adds Potential savings: approximately ¼ the multiplies and ½ the adds! Processing or Communication Systems, Prentice Hall PTR, 004. ISBN 0-3-465-. 7
Hal-Band Length Consideration Since the hal-band ilter is originally deined by the sinc unction, it must be windowed to a inite length. Apply a rectangular ilter o length 4M+3 or 4M+5(?!) The inite length ilter will always appear as a perect hal-band convolved by a requency domain unction related to the window used (rect or other). Expect ripples in the passband and stopband! Improved i windowed by other than rect unction. Chap8_.m Chap8_c.m Processing or Communication Systems, Prentice Hall PTR, 004. ISBN 0-3-465-. 8
Hal-Band High Pass Filter Spectral Characteristics and Filter Coeicients Complex mix by s/ h HP n h expi n LP All odd n coeicients are negative Chap8_.m h HP n sin n n cos n n n sin n Processing or Communication Systems, Prentice Hall PTR, 004. ISBN 0-3-465-. 9
Mirror Property o Hal-Band Filters When the high-pass and low-pass versions o the ilter are summed, the coeicients or n 0 cancel! h h LP LP h neven : h neven : h nodd : h n sin n n sin n n h n cos n HP n n n h n sin sin cos n LP LP LP LP HP n n n n h n sin sin n n h HP HP n n n h n sink sink HP n h n sin sin 0 or n 0 HP Thereore, h LP 0 or n 0 n n n n or n 0 n h n 0, or N n N HP Processing or Communication Systems, Prentice Hall PTR, 004. ISBN 0-3-465-. 0
For a Causal Hal-Band For causality in the sample domain, the entire ilter is time shited by a actor o N (or M+) The resulting ilter summation is h n h n n N, or 0 n N LP HP Chap8_3.m Processing or Communication Systems, Prentice Hall PTR, 004. ISBN 0-3-465-.
Window Design o Hal-Band Filter Chap8_4.m Windowing provides additional side-lobe attenuation Kaiser windowing FirPM windowing h LP h LP h LP n n sin n N : N wn n 0.5*sinc.* kaiser* N,5.8 ; N : N n 0.5*sinc.* remez _ window* N ; Processing or Communication Systems, Prentice Hall PTR, 004. ISBN 0-3-465-. Passband narrows Ripple decreases Stopband improves
Design Example 8. Design a hal-band, kaiser windowed ilter Sample Rate 0 khz Transition BW 4 khz (0% o Fs) Out-o-Band Attenuation 60 db The parameter β o the Kaiser window is estimated rom Figure 3.8 o chapter 3 to be = 5.8 The estimated ilter length is obtained rom (3.) is N=9, but was used. (Note: zero coeicients!) Chap8_5.m Processing or Communication Systems, Prentice Hall PTR, 004. ISBN 0-3-465-. 3
Design Example Results h=0.5*sinc(-5:0.5:5).*kaiser(,5.8); Processing or Communication Systems, Prentice Hall PTR, 004. ISBN 0-3-465-. 4
Design Example 8. Repeated Design a hal-band, remez windowed ilter Sample Rate 0 khz Transition BW 4 khz Out-o-Band Attenuation 60 db h=remez(0,[0 5-5+ 0]/0,[ 0 0],[ ]); Note: Zeros should be orced. Matlab has computation round-o; thereore, the zeros may be very small values ater ilter generation. Correct them by orcing the appropriate coeicients to zero. Processing or Communication Systems, Prentice Hall PTR, 004. ISBN 0-3-465-. 5
Design Example Results h=remez(0,[0 5-5+ 0]/0,[ 0 0],[ ]); Processing or Communication Systems, Prentice Hall PTR, 004. ISBN 0-3-465-. 6
Hal-Band Remez Design Trick Can only the non-zero coeicients be generated? Yes. h3a=remez(9, [0 5-5 5]/5, [ 0 0]); h3 = zeros(, ); h3(::)=0.5*h3a; h3(0)=0.5; Chap8_6.m Interpolate the no-zeros ilter by and add the center tap. The sum o two ilters! Processing or Communication Systems, Prentice Hall PTR, 004. ISBN 0-3-465-. 7
Base Filter Responses h3a=remez(9, [0 5-5 5]/5, [ 0 0]); Processing or Communication Systems, Prentice Hall PTR, 004. ISBN 0-3-465-. 8
Coeicient Comparison Full remez hal-band ilter Design trick coeicients Processing or Communication Systems, Prentice Hall PTR, 004. ISBN 0-3-465-. 9
Thoughts on the Trick The initial trick ilter is interpolated by with no iltering. A spectral replica must exist at the high-requencies The only way to remove the HF is to have perect cancellation The sum o a delay element. The unit coeicients provide phase delay. Chap8_6.m see the inal plots Processing or Communication Systems, Prentice Hall PTR, 004. ISBN 0-3-465-. 0
When Windowing, Why use instead o 9? The windows are dierent! For a tap ilter, w() and w() are multiplied by zero We still must convolve in the requency domain, but the two windows are actually dierent. Selecting the best window means using taps, not 9 taps. Note that the irpm ilter is identical or 9 and. (4k- [or 4k+3] versus 4k+ [or 4k+5]) Processing or Communication Systems, Prentice Hall PTR, 004. ISBN 0-3-465-.
Hilbert Transorm Band-Pass Filter Could we keep just the positive requency segment o the spectrum? Real signal are conjugate symmetric, thereore the output would have to be complex! Chap8_7.m Forming the Hilbert Transorm using a hal-band ilter h exp HT n h LP i n h n expi n HP n sin n Processing or Communication Systems, Prentice Hall PTR, 004. ISBN 0-3-465-.
Why we might want this? Create an analytic signal Only have positive requency elements Easier to perorm some unctions on complex signals instead o a real signals AM demodulation, FM demodulation SSB signals I you want to decimate a complex signal Complex to real conversion What happens when you take the real part o a complex signal? What happens to the Nyquist requency bound it must change! Processing or Communication Systems, Prentice Hall PTR, 004. ISBN 0-3-465-. 3
Hilbert Transorm Band-Pass Filter Mix the ilter by a complex carrier at Fs/4 Alternating sequence or mixing: even coeicients real, odd imaginary Hal-band ilter zeros: odd coeicients exist, even coe are 0 except or h(0) h HT i F exp s n h n h expi n LP LP exp F s n sin h n cos n i sin n HP n 4 i n, i,, i,, i,, i... Processing or Communication Systems, Prentice Hall PTR, 004. ISBN 0-3-465-. 4
Processing or Communication Systems, Prentice Hall PTR, 004. ISBN 0-3-465-. 5 Hilbert Transorm Coeicients Resolving the even and odd samples in n n i n n n n h HT sin cos sin n i n n n i n h nodd n n n n n h neven HT HT sin sin : cos sin : One coeicient is real, all others are complex. Interpretation: the complex ilter coeicients cause the negative portion o the signal spectrum to be cancelled
Hilbert Transorm Response Chap8_7.m Chap8_8.m Notice: The real and (anti-symmetric) imaginary coeicients The shiting o the hal-band ilter spectrum Processing or Communication Systems, Prentice Hall PTR, 004. ISBN 0-3-465-. 6
Application o HB and Hilbert in MRSP Filter Decimation (by a actor o ) Ater application, the signal can be decimated by a actor o Real signal HB iltered to Fs/4, decimate by to allow signal-o-interest to ill the spectrum Complex Signal iltered to positive requencies 0 to Fs/, decimate by by to allow signal-o-interest to ill the spectrum Filter Interpolation (by a actor o ) Interpolate by and apply the ilter to remove spectral replicas Processing or Communication Systems, Prentice Hall PTR, 004. ISBN 0-3-465-. 7
Unique Filter Coeicients h(0) = 0.5, all other even coeicients h(n)=0 When decimating by, this results in only non-zero coeicient h(odd) are non-zero and anti-symmetric When decimated by, this sequence remains Two decimation ilters h 0 (n) and h (n) h 0 (n) has one non-zero coeicient, a pure time delay Always purely real h (n) has all the other coeicients For HB they are all purely real For Hilbert they are all purely imaginary Processing or Communication Systems, Prentice Hall PTR, 004. ISBN 0-3-465-. 8
Applying the Hilbert Transorm Filter Decimation with the hal-band ilter. Processing or Communication Systems, Prentice Hall PTR, 004. ISBN 0-3-465-. 9
Applying the Hilbert Transorm Filter Decimation with the hal-band Hilbert ilter. Note that since the values are real and imaginary, no addition o the H0 and H ilter outputs is required. Processing or Communication Systems, Prentice Hall PTR, 004. ISBN 0-3-465-. 30
Applying Noble Identity Simpliying the structure Processing or Communication Systems, Prentice Hall PTR, 004. ISBN 0-3-465-. 3
Complex Nyquist Representation Note that the input signal is eectively being decimated by a actor o, but that there are now both real and imaginary outputs or every samples. As a result, the overall data rate has not been reduced! For real data outputs, the Nyquist rate is x For Hilbert transormed outputs, the Nyquist rate is x, but there are two inormation containing samples per output. Processing or Communication Systems, Prentice Hall PTR, 004. ISBN 0-3-465-. 3
Using Hilbert Transormed Data The passband spectrum is centered about s/4. Signiicant attenuation at 0 and s/ Thereore, downconvert a communication signal to be centered at s/4. Perorm a Hilbert Transorm Hal-Band Filter Only the positive complex spectrum remains Process as required AM: envelope detection I^+Q^ FM: mix to baseband and use narrowband derivative unction PM: mix to baseband and extract phase Processing or Communication Systems, Prentice Hall PTR, 004. ISBN 0-3-465-. 33
Interpolating with LP Hal-Band Filters Processing or Communication Systems, Prentice Hall PTR, 004. ISBN 0-3-465-. 34
Interpolating A standard polyphase interpolation structure Processing or Communication Systems, Prentice Hall PTR, 004. ISBN 0-3-465-. 35
Computation Load (Repeat) There is one multiply or every unique coeicient Conventional ilter 4M-taps 4M Multiplies, 4M- Adds Hal-Band ilter 4M+3 taps M+3 Multiplies, M+ Adds Hal-Band ilter, i h(0) doesn t require a multiply, 4M+3 taps M+ Multiplies, M+ Adds Hal-Band ilter, i h(0) doesn t require a multiply and symmetric, 4M+3 taps M+ Multiplies, M+M+ Adds Potential savings: approximately ¼ the multiplies and ½ the adds! Processing or Communication Systems, Prentice Hall PTR, 004. ISBN 0-3-465-. 36
Workload per Output Curves Filter length and attenuation actors are critical The length o the ilter shown in Figure 8.9 can be estimated rom the harris approximation presented in Chapter 3. or rom the igure Processing or Communication Systems, Prentice Hall PTR, 004. ISBN 0-3-465-. 37
Filter Tap Estimation The closer to s/, the more taps are required. Processing or Communication Systems, Prentice Hall PTR, 004. ISBN 0-3-465-. 38
Dyadic Hal-Band Filters We now consider the use o a cascade o hal-band ilters to obtain a sample rate increase o any power o such as increase by 8 or by 6. Suppose, or instance, we want to increase the sample rate o an input sequence by a actor 8. We have two primary options available to us. We can use an 8-path polyphase ilter to accomplish this task, or we can use a cascade o three hal-band ilters. Processing or Communication Systems, Prentice Hall PTR, 004. ISBN 0-3-465-. 39
Dyadic Hal-Band Filters We irst examine the workload or the sequence o halband ilters and then compare this workload to the M-path ilter. The sequence o hal-band ilters operates at successively higher sample rates but with transer unctions that have successively wider transition bandwidths. There is a processing advantage to the cascade when the reduction in processing due to the wider transition bandwidth in successive ilter stages compensates or operating the consecutive ilter stages at successively higher sample rates. Processing or Communication Systems, Prentice Hall PTR, 004. ISBN 0-3-465-. 40
Cascaded Hal-Band Interpolation With each successive stage, the Hal-Band Filter requency responses can vary. Notice that the desired passband becomes relatively smaller as the sample rate increases. This allows the ractional bandwidth, alpha () to be continuously decreasing and the ilter sizes getting shorter. Processing or Communication Systems, Prentice Hall PTR, 004. ISBN 0-3-465-. 4
Hal-Band Frequency Responses Chap8_9.m Processing or Communication Systems, Prentice Hall PTR, 004. ISBN 0-3-465-. 4
Operations Per Stage Notice how the original alpha has a reduced eect on the ratio as the stage number increases. The value o K () including the interpolated rate actor. Processing or Communication Systems, Prentice Hall PTR, 004. ISBN 0-3-465-. 43
Operations Per Stage Example Let = 45% First Stage Second Stage Third Stage Forth Stage s / 0 3.64.58.68 Ops/Input 0 7.7 0.3.4 Ops Sum 0 7.7 37.59 59 Let = 40% First Stage Second Stage Third Stage Forth Stage s / 0 3.33.5. Ops/Input 0 6.67 0 7.78 Ops Sum 0 6.67 6.67 44.45 Processing or Communication Systems, Prentice Hall PTR, 004. ISBN 0-3-465-. 44
Operations per Output Proportionality actors based on interpolation stages Processing or Communication Systems, Prentice Hall PTR, 004. ISBN 0-3-465-. 45
Proportionality Factor Curves Processing or Communication Systems, Prentice Hall PTR, 004. ISBN 0-3-465-. 46
M-path Polyphase Interpolation For comparison, we can use an M-path polyphase ilter to change the sample rate by a actor o M. We can recast equations (8.6) and (8.7) or the M-path ilter to obtain (8.8). As shown in (8.9) we can determine the length o each path o the M-path ilter by distributing the N weights over the M-paths. I we assume that the top path, path-0, o the M-path ilter contains only delays, then only (M-) o the paths contributes to the workload and removing one o the M-paths rom the workload estimate reduces the average workload. This scaled workload is shown in (8.0). Figure 8.4 presents graphical representations o (8.8) and (8.0). Processing or Communication Systems, Prentice Hall PTR, 004. ISBN 0-3-465-. 47
Conventional Polyphase Curves Processing or Communication Systems, Prentice Hall PTR, 004. ISBN 0-3-465-. 48
Cascaded (K) vs. Conventional (K4) Cascaded becomes more eicient at higher Rate Changes! Processing or Communication Systems, Prentice Hall PTR, 004. ISBN 0-3-465-. 49
Selecting Approach Polyphase Filter Implementation Single structure or implementation Small initial alpha Cascaded Hal-Band Filters Multiple Stages Large alpha high rate change In general, evaluate both methods to see which is more appropriate! Processing or Communication Systems, Prentice Hall PTR, 004. ISBN 0-3-465-. 50
Hal-band Interpolation Interpolate Filter M= Interpolate Filter Polyphase Processing or Communication Systems, Prentice Hall PTR, 004. ISBN 0-3-465-. 5
Hal-band Decimation Filter Decimate M= Decimating Polyphase Filter Processing or Communication Systems, Prentice Hall PTR, 004. ISBN 0-3-465-. 5
Hal-band Polyphase Decimation and Interpolation A Cascade o M= Polyphase Filters Can you build MATLAB code that does this? brute orce versus polyphase ilter tap lengths change due to bandwidths Processing or Communication Systems, Prentice Hall PTR, 004. ISBN 0-3-465-. 53