Professional Documents
Culture Documents
521279S Multiratefiltering PDF
521279S Multiratefiltering PDF
Motivation for multirate signal processing: high sampling rate in digital domain distributes the quantization noise power over a wider spectrum.
Basic concepts necessary for understanding multirate processing structures and attractive filter designs that provide for computational benefits such
as filter banks, CIC and Farrow filters.
• Downsampling/Upsampling
• Noble identities
• Polyphase representation
1
6.1 Downsampling
Explanation:
• the signal (sampling rate Fs ) is first low pass filtered using a digital filter
• important: after the filtering the sampling rate is still Fs
• decimation by M : every M th sample is selected from the signal
• the final sampling rate is Fs /M
• the original interesting band was Fs /(2M )
At this point we realize that the filter is needed to prevent the propagation of input signal frequencies that exceed the new Nyquist frequency Fs /(2M ).
Otherwise aliasing occurs after downsampling. (Can you illustrate why?)
2
Operations in the time domain: example on downsampling by factor 3.
3
The process in the frequency domain: example on downsampling by factor 3. The dashed lines illustrate imaging frequencies.
4
6.2 Upsampling
Upsampling = Interpolation = increasing the sampling rate; signal reconstruction by interpolating additional samples.
Explanation:
• the signal sample rate Fs is increased by L by adding L − 1 zeros between each two original samples; the original samples and their timings do
not change
• the new sample rate is LFs
• the resulting signal is low pass filtered to eliminate imaging components
• notice: the original interesting band Fs /2 is still the same
What could be the eventual word length effects from upsampling: the energy of the original samples is distributed to the new samples.
5
The process in the time domain: example on upsampling by factor 3.
6
The process in the frequency domain: example on upsampling by factor 3, the dashed lines illustrate imaging frequencies .
7
6.3 Interpolation by a rational factor
The classic example (now hopelessly outdated; DAT should probably be changed to 24 bit 96 kHz audio that would not change much in the
presentation):
• the sample rates of CD and DAT audio are 44.1 kHz and 48 kHz, respectively
Important: interpolation must be done before decimation as otherwise desired frequency components could be lost.
8
The classic example continues: the conversion factor from CD to DAT is 48/44.1,
Important observation: the cascaded low pass filters h1 (k) and h2 (k) have the same sample rate,
The passband specifications of the filters h1 (k) and h2 (k) are the same if the interesting band is not touched in the process.
9
Let us consider interpolation by a rational factor 3/2
10
The process in the frequency domain below: initially the sample rate of x(n) is 2 kHz
11
6.4 Efficient implementations
Efficient designs for many DSP tasks can be derived via multirate solutions, such as
• noble identities
• polyphase representation
• filter banks
two channel filter banks: perfect reconstruction, QMF
some M-channel filter banks (tree and parallel structured: complex and cosine modulated)
• To avoid aliasing, before down-sampling, the bandwidth of the signal should be limited to the Nyquist rate of the reduced sampling frequency
• To get rid of the spectral images, after up-sampling, the band width of the increased sample rate signal should be limited to the original Nyquist
rate
12
6.5 Noble identities
Noble identities show us ways for changing the order of operations in signal flow graphs, when a downsampling or upsampling operation appears in
the graph.
There are total of six identities. First three identities are related to the downsampling operation. The first identity says that if multiplication and/or
addition operations are followed by a downsampling operation as illustrated in Fig.1a, then the order of these operations can be changed (Fig.1b).
We observe that it is wasteful to down-sample after the arithmetic operations as only every 1/M th result is kept: it is better to reduce the sample
rate first.
Figure 1: Noble identity 1. The structures shown give the same output, but the rate of arithmetic operations in case (b) is M times lower.
The second identity considers delaying of signals. Delay of M units before downsampling is equal to a one unit delay after downsampling (Fig.2).
Implementation of M -unit delay requires FIFO of M storage units, and thus application of the second identity can lead to reduced memory costs.
The third identity shown in Fig. 3 combines the ideas from the identities 1 and 2. For example, if the output of a system having a transfer
function A(z) = a0 + a1 z −2 + a2 z −4 is downsampled by 2, we can do the downsampling first (Noble identity 1) and then filter with the system
B(z) = a0 + a1 z −1 + a2 z −2 . We notice that A(z) = B(z 2 )
The identities 4-6 are related to the upsampling operation, and they are explained in Figs. 4-6.
13
Figure 2: Noble identity 2.
Figure 4: Noble identity 4. Upsamplings in (a) inserts zeros to the signal, but it is wasteful to multiply and add those zeros. Those operations are
avoided in (b).
Up-sampling by factor L inserts zeros into the input sequences, and multiplying them is wasteful. Up-sampling later avoids this stupidity and produces
an equivalent result.
Noble identity 5 saves memory by eliminating the need to store zeros in the delay line.
Noble identity 6 is a combination of identities 4 and 5 and avoids both the processing of samples to be discarded and storing of zeros.
14
Figure 5: Noble identity 5. If a structure shown in (a) appears in a signal flow graph, it can be replaced by a memory-saving structure (b).
Figure 6: Noble identity 6. The structure shown in (b) avoids processing of zeros.
To summarize, the preference is to perform arithmetic operations at a lower sample rate, which leads to lower computational complexity and savings
in memory. Noble identities show us ways to achieve this goal.
15
6.6 Polyphase representation
Polyphase filters or filter banks are not filter types but filter implementations. These implementations take advantage of zero coefficients in the filter
to cut the computational cost.
Due to their extremely attractive properties, the algorithm and system designers try to aim at polyphase formulations of filltering solutions, favoring
• filters that have zeros in the impulse response at regular intervals (Nyquist, half band, third band etc M th band filters that are special multirate
FIR filters. Their every M th coefficient is zero, except for the middle coefficient)
• and above all: formulating the filters in polyphase form
The basic formulation of a digital FIR filter in the z-plane can be derived by starting from
X
M−1
H(z) = h(k)z −k = h(0) + h(1)z −1 + ... + h(N − 1)z N −1 (1)
k=0
This can be written in an equivalent polyphase form (for simplicity, M = LN where L is the length of each polyphase component Ek (z))
X
N −1
H(z) = z −k Ek (z N ) (2)
k=0
FIR and IIR filters can be written into the polyphase form.
16
Looking at the formulation, we realize that it matches the potential of the noble identities.
Below we see an outcome: polyphase formulation of a filter (non-multirate). Odd and even samples from a sequence can be fed in parallel to a filter
at the intervals of two sample times = the operating frequency is cut.
17
Let us consider the following simple FIR filter
H(z) = 1 + 2z −1 + 3z −2 + 4z −3 (7)
The realization of this filter can be presented in transversal form (tapped delay line)
X
1
H(z) = z −0 (1 + 3z −2 ) + z −1 (2 + 4z −2 ) = E0 (z 2 ) + z −1 E1 (z 2 ) = z −k Ek (z 2 ) (8)
k=0
We see that E0 and E1 contain the odd and even coefficients of the filter, respectively (E0 (z 2 )) = 1, 0, 3 and z −1 (E1 (z 2 )) = 2, 0, 4
18
The same filter with four polyphase components (N=4) can be written as
X
3
H(z) = 1 + 2z −1
+ 3z −2
+ 4z −3
= 1z −0
+z −1
(2z −0
)+z −2
(3z −0
)+z −3
(4z −0
)= z −k Ek (z 4 ) (9)
k=0
Understanding the idea of reformulating the filter to exploit noble identities is easier by considering a little longer filter
H(z) = 1 + 2z −1 + 3z −2 + 4z −3 + 5z −4 + 6z −5 + 7z −6 (10)
We see that the first three polyphase components are filters that contain several zeros, as seen below for the very first one (E0 ((1 + 5z −4 )))
E0 (z 4 ) = (1 + 5z −4 ) = 1z −0 + 0z −1 + 0z −2 + 0z −3 + 5z −4 (12)
and
E0 (z) = (1 + 5z −1 ) (13)
The decomposition can also be done in a hierarchical fashion, by dividing h(n) first into two N/2 long filters that are in turn decomposed into N/4
long ones, etc.
19
6.6.1 Polyphase representation examples
The polyphase decomposition IIR-filters is also possible. For example, the IIR filter
1
H(z) = (14)
1 − bz −1
can easily be written into form
1 bz −1
H(z) = + (15)
1 − b2 z −2 1 − b2 z −2
so its polyphase components are
1 b
E0 (z 2 ) = and E1 (z 2 ) = (16)
1 − b2 z −1 1 − b2 z −1
As a more realistic example consider a 5th order Butterworth low-pass filter with 3dB point of at π/2.
1 0.1056 + z −2 −1 0.5279 + z
−2
H(z) = E0 (z 2 ) + z −1 E1 (z 2 ) = [ + z ] (18)
2 1 + 0.1056z −2 1 + 0.5279z −2
The blocks of this this decomposition are all-pass filters with different phase responses.
20
6.6.2 Efficient down and up-sampling examples
We need to down-sample a signal by M with a N=9 FIR antialiasing filter below:
X
8
H(z) = h(n)z −n (19)
n=0
H(z) = E0 (z 4 ) + z −1 E1 (z 4 ) + z −2 E2 (z 4 ) + z −3 E3 (z 4 ) (20)
21
The direct implementation of the polyphase decomposition of the filter
H(z) = E0 (z 4 ) + z −1 E1 (z 4 ) + z −2 E2 (z 4 ) + z −3 E3 (z 4 ) (21)
results in the structure (here we have already used noble identity 1 to cut the additions):
This implementation wastes memory, because each of the polyphase component Ek (z 4 ) has a delay line, for instance
Although most of the multipliers are zero, we still need memory for every unit delay.
22
We now employ the noble identity with the polyphase components and change our structure into a format that performs exactly the same filtering
23
In up-sampling the imaging components need to be suppressed after sample rate change See below for a linear phase FIR filter of length N=9 to be
H(z) = h(0) + h(1)z −1 + h(2)z −2 + h(3)z −3 + h(4)z −4 + h(3)z −5 + h(2)z −6 + h(1)z −7 + h(0)z −8 (23)
E0 (z) = h(0) + h(3)z −1 + h(2)z −2 , E1 (z) = h(1) + h(4)z −1 + h(1)z −2 and E2 (z) = h(2) + h(3)z −1 + h(0)z −2 (25)
We notice that E1 (z) is symmetric, while E0 (z) and E2 (z) are mirror images of each other
• these characteristics can be efficiently exploited in implementations
• as well as the benefits from polyphase formulation
24
The noble identity to change the order of the filtering in up-sampling is.
Below we see the changes in the actual filter structure: (1) long delay lines and higher rate filters and (2) with short delay lines and filtering at lower
rate
In the above solutions the polyphase decomposition does not provide any extra advantage compared to the noble identity based solution
• as a final operation, only the sum of the filtered polyphase components is used
• in filter bank applications the polyphase decomposition is useful
25