P2 Multi-Rate Signal Processing
P2 Multi-Rate Signal Processing
P2 Multi-Rate Signal Processing
1. Decimation: Sampling rate reduction by integer factors after band-limiting the input signal
The sampling rate of a sequence can be reduced by “sampling” it, i.e. by defining a new
sequence
xd[n] = x[nM] = xc(nMT)
The Sampling rate compressor reduces the sampling rate from Fs to Fs /M. In frequency domain,
it is equivalent to multiplying the original signal band-width by a factor M. Hence, if the signal
is not band-limited to p / M, down-sampling results in aliasing as shown in this following
Example. If this happens, the original signal cannot be recovered from the decimated version.
-2p -p 0 p
Decimation by M = ‘2’
-2p -p 0 p
2
Avoiding Aliasing:
Aliasing can be avoided if x(n) is low-pass signal band-limited to the region |w| < p / M..
To prevent aliasing at a lower rate, the digital filter h[k] is used to band-limit the input signal
to less than Fs /2M beforehand. Sampling rate reduction is achieved by discarding M-1 samples
for every M samples of the filtered signal w[n].
¥
y[n] = w[nM ] = å h[k ].x[nM - k ]
k =-¥
3
2. Interpolation: Sampling rate increase by integer factors followed by anti-imaging filter.
Interpolator:
Interpolation by a factor of ‘L’
Sampling Rate Anti-imaging
Expander filter
x(n) w(n) LPF y(n)
L
h[n]
Fs LFs LFs
Sample Rate Expander : For each sample of x[n], the expander inserts L-1
zero-valued samples to form a new signal w[n].
4
The input-output relationship is:
¥
y[n] = å h[k ].w[n - k ]
k =-¥
where,
5
Spectral interpretation of interpolation:
-2p -p 0 p
Original Signal
Note:
6
Sampling rate conversion by non-integer factors.
In some applications, the need often arises to change the sampling rate by a non-integer factor.
Ex:- Transferring data from Compact Disc system at rate of 44.1 kHz. to a Digital
Audio Tape (DAT) at 48 kHz. This can be achieved by increasing the data rate of the
CD by a factor of 48/44.1, a non-integer
Approach:
The non-integer factor is represented by a rational number, i.e.a ratio of two integers, say L and M,
such that L/M is as close to the desired factor as possible. First interpolation by factor L is done,
followed by decimation by a factor of M.
w(k) v(k)
x(n) y(n)
L h1[n] h2[n] ¯M
7
Example:
-p -2p/3 0 2p/3 p
w(k)
x(n) y(n)
L h1[n] ¯M
Upsampling by L = 2
compresses the bandwidth When L = 2
by factor of “2” and creates
images
-p -p/3 0 p/3 p
8
If we carefully select the frequency
characteristic of the filter h(n) as
shown in the figure, we can eliminate
the images.
-p -2p/3 0 2p/3 p
9
Example (contd.): Required sampling rate conversion by a factor of “1.5”
10
Spectral interpretation of sampling rate increase of a signal at 2 kHz rate by a factor of 3/2.
Signal rate first increased to 6 kHz by a factor of 3, then band-limited and then reduced to
3 kHz by a factor of 2.
11
Examples
1. Consider the following system. For the following input signals, determine whether the output is equal to input.
1. x[n] = cos(pn/4) 2. x[n] = cos(pn/2)
H(ejw)
x[n] xd[n] xe[n] xr[n]
3 ¯3
-p/3 p/3
Solution:
The output xr[n] = x[n] if no aliasing occurs as result of down-sampling. That is X(ejw) = 0 for p/3 < |w| < p .
1). Input is: x[n] = cos(pn/4)
X(ejw) has impulses at w = +p/2. and Xe(ejw) also has two impulses which are filtered by the filter
at the output So there is aliasing i..e. xr[n] ¹ x[n]
12
2.
Given that an input signal x[n] = sin(3pn/4) is applied to the following system, where L = 3, and M = 5.
Determine the corresponding output y[n].
x[n] xd[n]
L h1[n] h2[n] ¯M
13
3.
A signal at sampling frequency 2.048 kHz is to be decimated by a factor of 32 to yield a signal at
sampling frequency of 64 Hz. The signal band of interest extends from 0 to 30 Hz. The anti-aliasing
digital filter should satisfy the following specifications:
The signal components in the range from 30 to 32 Hz should be protected from aliasing. Design a
suitable one-stage decimator.
Solution:
x[n] w[n] y[n]
Block diagram: h[n] ¯32
0 30 32 1024
14
The block diagram of the single stage decimator, and the specifications for the lowpass anti-aliasing filter
are shown in the figure. From the given specifications,
An estimate of the number of filter coefficients for the single stage decimator is given by:
D¥ (δ p / δ s )
N» - f (δ p , δ s ).Df + 1,
Df
where,
D¥ (δ p / δ s ) = (log10 δ s ).[a1.(log10 δ p ) 2 + a2 .(log10 δ p ) + a3 ]
+ a4 .(log10 δ p ) 2 + a5 .(log10 δ p ) + a6 .
a1 = 5.309 x 10-3 ; a2 = 7.114 x 10-2 ;
a3 = -4.761 x 10-1 ; a4 = 2.66 x 10-3 ;
a5 = -5.941 x 10-1 ; a6 = -4.278 x 10-1 ;
Thus N = 3947. It is quite obvious that N is too large. In fact, none of the available filter design methods
can be used to obtain the coefficients for such a filter because approximation errors would be too large.
Hence multistage approach to sampling rate conversion is to be employed for all practical purposes.
15
Multistage approach to Sampling Rate Conversion.
When large changes in the sampling rate are required, it is more efficient to change the rate in
two or more stages than in a Single stage.
Advantage:
Allows gradual reduction or increase in sampling rate, leading to significant relaxation in the
requirements of the anti-aliasing or anti-imaging filter at each stage.
x[n] y[n]
h1[n] ¯M h2[n] ¯M … hI[n] ¯M
16
Design of Practical Sampling Rate Converters
• specify the overall anti-aliasing or anti-imaging filter requirements and those for individual stages
Filter specification:
Performance of a multi-rate system depends critically on the type and quality of filter used. Either IIR
or FIR filters can be used, but FIR is the more popular as it is computationally effective, as well have
desirable features such as linear phase response and low sensitivity to finite word-length effects, as well
as simple to implement.
Requirements: For decimation, overall filter requirements, to avoid aliasing after rate reduction are:
pass-band deviation dp
stop-band deviation ds
17
Requirements: For Interpolation, overall filter requirements are:
Pass-band 0 < f < fp
Stop-band Fs / 2 < f < LFs//2
pass-band deviation dp
stop-band deviation ds
18
Application Example
Audio Engineering:
Digital Audio Engineering is an area that has been benefited significantly from Multirate
Techniques.
• In A/D conversion process, High quality digital data is obtained from analog
data by combining multirate processing with delta modulation techniques
• Simplified the D/A conversion process
Disc
14-bit Lowpass
DAC filter
Laser Error Oversampling
EFM Time base
Optical Correction X4
demodulation correction
pickup & concealment Digital filter
14-bit Lowpass
DAC filter
19
After decoding, the digital signals are in 16-bit words representing the acoustic information
at a 44.1 kHz sampling rate which are needed to be converted into analog.
• If the digital codes are directly converted into analog, it causes overloading on the
player’s amplifier and set up intermodulation distortion, also needs analog filters
with tight specification (sharp transition from passband to stopband, and high
attenuation in stop band).
Achieved by first increasing, by interpolation, the sampling rate of data by 4 to 176 kHz
(4 x 44.1 = 176.4 kHz) before it can be applied to the DAC. The effects of this are:
• In time domain, the image frequencies are pushed to higher frequencies, making it
it easier to filter them out, using a relatively simple lowpass filter
• Also, reduces the noise as the noise is spread over a wider bandwidth.
20
Example:
A digital audio system exploits oversampling techniques to relax requirements of the
analog anti-imaging filter. The overall filter specifications for the system are given:
baseband 0 – 20 kHz
input sampling frequency 44.1 kHz
output sampling frequency 176.4 kHz
stopband attenuation 40 dB
passband ripple 1 dB
transition bandwidth 2 kHz
stopband edge frequency 22.05 kHz
21
Interpolator
x[n] y[n]
2 h1[n] 2 h2[n]
1 h[n] 118
h1[n] 39
2
h2[n] 6
We can see that by implementing a 2-stage interpolator we have simpler filters with filter
lengths much smaller compared to the filter in single stage.
22