0% found this document useful (0 votes)
9 views

Multirate Signal Processing

Module 3 covers multirate signal processing, including concepts such as sampling rate conversion, decimation, and interpolation. It discusses the applications of multirate systems in digital audio processing, the importance of anti-aliasing filters, and the architecture of DSP processors. Additionally, it explains the effects of down-sampling and up-sampling on signal spectra and the necessity of filtering to prevent aliasing and ensure accurate signal reconstruction.

Uploaded by

vendhanvk2006
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views

Multirate Signal Processing

Module 3 covers multirate signal processing, including concepts such as sampling rate conversion, decimation, and interpolation. It discusses the applications of multirate systems in digital audio processing, the importance of anti-aliasing filters, and the architecture of DSP processors. Additionally, it explains the effects of down-sampling and up-sampling on signal spectra and the necessity of filtering to prevent aliasing and ensure accurate signal reconstruction.

Uploaded by

vendhanvk2006
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 147

MODULE 3

MULTIRATE SIGNAL PROCESSING


Module 3

• Introduction to Multi-rate signal processing:


Sampling Theorem, Decimation, Interpolation,
• Sampling rate conversion
• Quantization of signals
• Applications of multi-rate signal processing
• Architecture of TMS 320C54XX Digital Signal
processor
• On-board DSP Technologies applied to Robotics
Introduction
● In single-rate DSP systems, all data is sampled at the
same rate no change of rate within the system.

● In multirate DSP systems, sample rates are changed (or


are different) within the system
● In many practical applications of DSP, one is faced with
the problem of changing the sampling rate of a signal.

● The process of converting a signal from a given rate to a


different rate is called sampling rate conversion.
Multirate Digital Signal
Processing
• The system that employ multiple sampling rates in the
processing of digital signal are called multirate digital
signal processing system.
• Multirates systems are sometime used for sampling rate
conversion.
Multirate digital signal processing
• The sampling rate of a signal is changed in order to
increase the efficiency of various signal processing
operations.
• Decimation, or down-sampling, reduces the sampling rate.
• Expansion, or up-sampling, followed by interpolation
increases the sampling rate.
Applications of multirate signal
processing
• Up-sampling, i.e., increasing the sampling frequency, before
D/A conversion in order to relax the requirements of the
analog low pass anti aliasing filter.

• This technique is used in audio CD,

• where the sampling frequency 44.1 kHz is increased


fourfold to 176.4 kHz before D/A conversion.
Applications of multirate signal
processing
• Various systems in digital audio signal processing often
operate at different sampling rates.

• The connection of such systems requires a conversion of


sampling rate.
Applications of multirate signal
processing
• Implementation of high-performance filtering operations
• very narrow transition band is required.
• The requirement of narrow transition bands leads to very high filter
orders.
• By decomposing the signal into a number of subbands containing the
passband, stopband and transition bands, each component can be
processed at a lower rate, and the transition band will be less narrow.
• Required filter complexity may be reduced significantly.
Sampling
• A continuous-time signal x(t) can be converted into a
discrete-time signal x(nT) by sampling it at regular
intervals of time with sampling period T.
• The sampled signal x(nT) is given by

• Sampling process can also be interpreted as a


modulation or multiplication process.
Sampling Theorem
Sampling theorem states that a band limited signal
x(t) having finite energy, which has no spectral
components higher than F hertz can be completely
reconstructed from its samples taken at the rate of 2F
or more samples per second.
The Sampling Theorem
• To build a band-limited baseband (Fs>0) signal to be
“reconstructed” fully, it must be sampled at a rate
“Fs>2Fmax”.
• A signal sampled at Fs>2Fmax is said to be Nyquist
sampled, and Fs=2Fmax is called the Nyquist
Frequency.
• No information is lost if a signal is sampled at the
Nyquist Frequency, and no additional information is
gained by sampling faster than this rate.
Sampling Theorem
• The sampling rate of 2F samples per second is the
Nyquist rate
• Its reciprocal 1/2F is the Nyquist period.
Down sampling
• Reducing the sampling rate of a discrete-time signal is
called down sampling.
• The sampling rate of the discrete-time signal can be reduced
by a factor D by taking every Dth value of the signal.
• Mathematically, down sampling is represented by
Down sampling

x(2n) is obtained by keeping every second sample of x(n)


x(3n) is obtained by keeping every 3rd sample of x(n) and
removing other samples.
Down sampling
the signal x(n) and it's down sampled versions by a factor of 2 and 3
Down sampling
• If the input signal x(n) is not band limited, then overlapping
of spectra at the output of the down sampler may occur.
• This overlapping of spectra is called aliasing which is
undesirable.
• This can be eliminated by band limiting the input signal by
inserting a low-pass filter called anti-aliasing filter before
the down sampler.
Down sampling
• The anti aliasing filter and the down sampler together called
decimator.
• Decimation (sampling rate compression) is the process of
decreasing the sampling rate by an integer factor D by
keeping every Dth sample and removing D – 1 in between
samples.
block diagram of the decimator

• The decimator comprises two blocks such as anti-aliasing


filter and down sampler.
• Anti-aliasing filter is a low-pass filter to band limit the
input signal so that aliasing problem is eliminated
Spectrum of down Sample signal

• Let T be sampling period of input signal x(n), and F be its


sampling rate or frequency.
• When the signal is down sampled by D, let T’ be its new
sampling period and F’ be its sampling frequency,
Spectrum of down Sample signal
• Let us derive the spectrum of a down sampled signal x(Dn)
and compare it with the spectrum of input signal x(n).

• The Z-transform of the signal x(n) is given by
Spectrum of down Sample signal
• The down sampled signal y(n) is obtained by multiplying
the sequence x(n) with a periodic train of impulses p(n)
with a period D and then leaving out the D – 1 zeros
between each pair of samples.

• The periodic train of impulses is given by


discrete Fourier series representation of the
signal p(n) is given by

Multiplying the sequence x(n) with p(n) yields


If we leave D – 1 zeros between each pair of samples, we
get the output of down sampler
The Z-transform of the output sequence is given by

n=nD
n=n/D
Down-Sampler
Decimation, or down-sampling, consists of reducing
the sampling rate by a factor M.
Down-Sampler
Time-Domain Characterization
• An down-sampler with a down-sampling factor M,
where M is a positive integer, develops an output
sequence
• y[n] with a sampling rate that is (1/M)-th of that of the
input sequence x[n]
• Block-diagram representation
x[n M y[n
] ]
Down-Sampler
• Down-sampling operation is implemented by
keeping every M-th sample of x[n] and removing M-1
in-between samples to generate y[n]
• Input-output relation
y[n] = x[nM]
Down-Sampler
• Figure below shows the down-sampling by
a factor of 3 of a sinusoidal sequence of
frequency 0.042 Hz
Down-Sampler
Frequency-Domain Characterization
• Applying the z-transform to the input-output
relation of a factor-of-M down-sampler

we get

• The expression on the right-hand side cannot


be directly expressed in terms of X(z)
Down-Sampler
• Consider a factor-of-2 down-sampler
with an input x[n] whose spectrum is as
shown below

• The DTFTs of the output and the input


sequences of this down-sampler are
then related as
Down-Sampler
• Now implying
that the second term in the
previous equation is simply obtained by
shifting the first term to the right
by an amount 2π as shown below
Down-Sampler
• The plots of the two terms have an
overlap, and hence, in general, the
original “shape” of is lost when
x[n] is down-sampled as indicated below
Down-Sampler
• This overlap causes the aliasing that
takes place due to under-sampling
• There is no overlap, i.e., no aliasing,
only if

• Note: is indeed periodic with a


period 2π, even though the stretched version
of is periodic with a period 4π
Down-Sampler
• For the general case, the relation
between the DTFTs of the output and the
input of a factor-of-M down-sampler is
given by

• is a sum of M uniformly
shifted and stretched versions of
and scaled by a factor of 1/M
Down-Sampler
• Aliasing is absent if and only if

as shown below for M = 2


Down-Sampler
• Program 10_4 can be used to illustrate
the frequency-domain properties of the
up-sampler shown below for M = 2
Down-Sampler
• The input and output spectra of a down-
sampler with M = 3 obtained using
Program 10-4 are shown below

• Effect of aliasing can be clearly seen


Basic Sampling Rate Alteration
Devices
• Sampling periods have not been
explicitly shown in the block-diagram
representations of the up-sampler and
the down-sampler
• This is for simplicity and the fact that the
mathematical theory of multirate
systems can be understood without
bringing the sampling period T or the
sampling frequency into the picture
Down-Sampler
• Figure below shows explicitly the time-
dimensions for the down-sampler

Input sampling frequency Output sampling


frequency
Aliasing effect and Anti-aliasing filter
• the spectrum obtained after down sampling will overlap if the
original spectrum is not band limited to ω= π /D.
• This overlapping of spectra is called aliasing.
• Therefore, aliasing due to down sampling a signal by a factor
of D is absent if and only if the signal x(n) is band limited to
± π /D.
• If the signal x(n) is not band limited to ± π /D, then a low-
pass filter with a cutoff frequency π /D is used prior to down
sampling.
• This low-pass filter which is connected before the down
sampler to prevent the effect of aliasing by band limiting the
input signal is called the anti-aliasing filter.
Up-Sampler

• Up-sampling operation is implemented


by inserting equidistant zero-
valued samples between two
consecutive samples of x[n]
• Input-output relation
Up-Sampler
• Figure below shows the up-sampling by a factor
of 3 of a sinusoidal sequence with a frequency
of 0.12 Hz obtained using Program 10_1
Up-Sampler
• In practice, the zero-valued samples
inserted by the up-sampler are replaced
with appropriate nonzero values using
some type of filtering process
• Process is called interpolation and will
be discussed later
Up-Sampler
• Figure below shows explicitly the time-
dimensions for the up-sampler

L y[n
]

Input sampling Output sampling


frequency frequency
Basic Sampling Rate
Alteration Devices
• The up-sampler and the down-sampler
are linear but time-varying discrete-time
systems
• We illustrate the time-varying property
of a down-sampler
• The time-varying property of an up-
sampler can be proved in a similar
manner
Basic Sampling Rate
Alteration Devices
• Consider a factor-of-M down-sampler
defined by y[n] =
• Its output x[nM]for an input
is then given by

• From the input-output relation of the


down-sampler we obtain
Up-Sampler
Frequency-Domain Characterization
• Consider first a factor-of-2 up-sampler
whose input-output relation in the time-
domain is given by
Up-Sampler
• In terms of the z-transform, the input-
output relation is then given by
Up-Sampler
• In a similar manner, we can show that
for a factor-of-L up-sampler

• On the unit circle, for , the input-


output relation is given by
Up-Sampler
• Figure below shows the relation between
and for L = 2 in the
case of a typical sequence x[n]
Up-Sampler
• As can be seen, a factor-of-2 sampling
rate expansion leads to a compression
of by a factor of 2 and a 2-fold
repetition in the baseband [0, 2p]
• This process is called imaging as we
get an additional “image” of the input
spectrum
Up-Sampler
• Similarly in the case of a factor-of-L
sampling rate expansion, there will be
additional images of the input
spectrum in the baseband
• Lowpass filtering of removes the
images and in effect “fills in” the zero-
valued samples in with
interpolated sample values
Up-Sampler
• Program 10_3 can be used to illustrate
the frequency-domain properties of the
up-sampler shown below for L = 4
INTERPOLATOR.
ANTI-IMAGING FILTER

• Usually an anti-imaging filter is to be kept


after the up sampler to remove the unwanted
images developed due to up sampling.
• The anti-imaging filter and the up sampler
together is called interpolator.
• Interpolation is the process of increasing the
sampling rate by an integer factor I by
interpolating I – 1 new samples between
successive values of the signal.
ANTI-IMAGING FILTER
• The low-pass filter placed after the up sampler to remove the
images created due to up sampling is called the anti-imaging
filter.
• Usually an anti-imaging filter is to be kept after the up
sampler to remove the unwanted images developed due to up
sampling.
• The anti-imaging filter and the up sampler together is called
interpolator.
• Interpolation is the process of increasing the sampling rate by
an integer factor I by interpolating I – 1 new samples
between successive values of the signal.
Cascade Equivalences
• A complex multirate system is formed by an
interconnection of the up-sampler, the
down-sampler, and the components of an
LTI digital filter
• In many applications these devices appear
in a cascade form
• An interchange of the positions of the
branches in a cascade often can lead to a
computationally efficient realization
Cascade Equivalences
• To implement a fractional change in the
sampling rate we need to employ a cascade
of an up-sampler and a down-sampler
• Consider the two cascade connections
shown below
M L

L M
Cascade Equivalences
• A cascade of a factor-of-M down-sampler
and a factor-of-L up-sampler is
interchangeable with no change in the input-
output relation:

if and only if M and L are relatively prime,


i.e., M and L do not have any common factor
that is an integer k > 1
Cascade Equivalences
• Two other cascade equivalences are shown
below
Cascade equivalence
#1
M

M
Cascade equivalence
#2
L

L
Filters in Sampling Rate
Alteration Systems
• From the sampling theorem it is known
that a the sampling rate of a critically
sampled discrete-time signal with a
spectrum occupying the full Nyquist range
cannot be reduced any further since such
a reduction will introduce aliasing
• Hence, the bandwidth of a critically
sampled signal must be reduced by
lowpass filtering before its sampling rate is
reduced by a down-sampler
Filters in Sampling Rate
Alteration Systems
• Likewise, the zero-valued samples
introduced by an up-sampler must be
interpolated to more appropriate values for
an effective sampling rate increase
• We shall show next that this interpolation
can be achieved simply by digital lowpass
filtering
• We now develop the frequency response
specifications of these lowpass filters
Filter Specifications
• Since up-sampling causes periodic
repetition of the basic spectrum, the
unwanted images in the spectra of the up-
sampled signal must be removed
by using a lowpass filter H(z), called the
interpolation filter, as indicated below
L

• The above system is called an interpolator


Filter Specifications
• On the other hand, prior to down-
sampling, the signal v[n] should be
bandlimited to by means of
a lowpass filter, called the decimation
filter, as indicated below to avoid aliasing
caused by down-sampling
M
• The above system is called a decimator
Interpolation Filter
Specifications
• Assume x[n] has been obtained by
sampling a continuous-time signal at
the Nyquist rate
• If and denote the
Fourier transforms of and x[n],
respectively, then it can be shown

• where is the sampling period


Interpolation Filter
Specifications
• Since the sampling is being performed at
the Nyquist rate, there is no overlap
between the shifted spectras of
• If we instead sample at a much
higher rate yielding y[n], its
Fourier transform is related to
through
Interpolation Filter
Specifications
• On the other hand, if we pass x[n] through
a factor-of-L up-sampler generating ,
the relation between the Fourier
transforms of x[n] and are given by

• It therefore follows that if is passed


through an ideal lowpass filter H(z) with a
cutoff at p/L and a gain of L, the output of
the filter will be precisely y[n]
Interpolation Filter
Specifications
• In practice, a transition band is provided
to ensure the realizability and stability of
the lowpass interpolation filter H(z)
• Hence, the desired lowpass filter should
have a stopband edge at and
a passband edge close to to
reduce the distortion of the spectrum of
x[n]
Interpolation Filter
Specifications
• If is the highest frequency that needs to
be preserved in x[n], then

• Summarizing the specifications of the


lowpass interpolation filter are thus given by
Decimation Filter
Specifications
• In a similar manner, we can develop the
specifications for the lowpass decimation
filter that are given by
Show that the up sampler and down
sampler are time-variant systems
Consider a signal x(n) = u(n).
(i) Obtain a signal with a decimation
factor 3.
(ii) Obtain a signal with an interpolation
factor 3.
Consider a ramp sequence and sketch its
interpolated and decimated versions with a
factor of 3.
Consider a signal x(n) = sin πnu(n).
(i) Obtain a signal with a decimation
factor 2.
(ii) Obtain a signal with an
interpolation factor 2
Consider the signal x(n) = nu(n).
(i) Determine the spectrum of the signal.
(ii) The signal is applied to a decimator that
reduces the sampling rate by a factor
3.Determine the output spectrum.
(iii) Show that the spectrum in part (ii) is
simply Fourier transform of x(3n).
Consider the signal.
(i) Determine the spectrum of the signal.
(ii) The signal is applied to an interpolator
that increases sampling rate by a factor of
2. Determine its output spectrum.
(iii) Show that the spectrum in part (ii) is
simply Fourier transform of x(n/2)
SAMPLING RATE CONVERSION

•In some applications sampling rate


conversion by a non-integer factor
may be required.
• For example transferring data from a
compact disc at a rate of 44.1 kHz to
a digital audio tape at 48 kHz.
• Here the sampling rate conversion
factor is 48/44.1, which is a non-
integer.
SAMPLING RATE CONVERSION
SAMPLING RATE
CONVERSION
• Hence, the desired configuration for the
fractional sampling rate alteration is as
indicated below where the lowpass filter
H(z) has a stopband edge frequency given
by

L M
SAMPLING RATE CONVERSION

• There are two possible such cascade connections as


indicated below

• The second scheme is more computationally efficient


since only one of the filters, Hu(Z) or Hd(Z) , is
adequate to serve as both the interpolation and the
decimation filter
SAMPLING RATE CONVERSION
• Figure 10.20 shows the sampling rate conversion by a
factor of 5/3.
• Figure 10.20(a) shows the actual signal x(n).
• The sampling rate is increased by 5, by inserting 4 zero
valued samples between successive values of x(n) as
shown in Figure 10.20(b).
• The output of anti-imaging filter is shown in Figure
10.20(c). The filtered data is then reduced for every three
samples as shown in Figure 10.20(d).
• A cascade of a factor of D down sampler and a factor of I
up sampler is interchangeable with no change in the
input and output relation if and only if I and D are co-
prime.
Considering an example
x(n) = {1, 3, 2, 5, 4, –1, –2, 6, –3, 7, 8, 9, ...}
show that a cascade of D down sampler and I up
sampler is interchangeable only when D and I are co-
prime.
Given x(n) = {1, 3, 2, 5, 4, –1, –2, 6, –3, 7, 8, 9, ...}
(i) Let D = 2 and I = 3. Here D and I are co-prime.
Show that the transpose of a factor of D
decimator is a factor of D
interpolator if the transpose of a factor of D
down sampler is a factor of D up sampler.
Computational Requirements
• The lowpass decimation or interpolation
filter can be designed either as an FIR or an
IIR digital filter
• In the case of single-rate digital signal
processing, IIR digital filters are, in general,
computationally more efficient than
equivalent FIR digital filters, and are
therefore preferred where computational
cost needs to be minimized
Computational Requirements
• This issue is not quite the same in the case
of multirate digital signal processing
• To illustrate this point further, consider the
factor-of-M decimator shown below
M
• If the decimation filter H(z) is an FIR filter
of length N implemented in a direct form,
then
Computational Requirements
• Now, the down-sampler keeps only every M-
th sample of v[n] at its output
• Hence, it is sufficient to compute v[n] only
for values of n that are multiples of M and
skip the computations of in-between
samples
• This leads to a factor of M savings in the
computational complexity
Computational Requirements
• Now assume H(z) to be an IIR filter of order
K with a transfer function

where
Computational Requirements
• Its direct form implementation is given by

• Since v[n] is being down-sampled, it is


sufficient to compute v[n] only for values of
n that are integer multiples of M
Computational Requirements
• However, the intermediate signal w[n] must
be computed for all values of n
• For example, in the computation of

K+1 successive values of w[n] are still


required
• As a result, the savings in the computation
in this case is going to be less than a factor
of M
Computational Requirements
• For the case of interpolator design, very
similar arguments hold
• If H(z) is an FIR interpolation filter, then the
computational savings is by a factor of L
(since v[n] has zeros between its
consecutive nonzero samples)
• On the other hand, computational savings is
significantly less with IIR filters
Sampling Rate Alteration
Using MATLAB
• Example - The input and output plots of a
factor-of-2 interpolator designed using
Program 10_6 are shown below
Sampling Rate Alteration
Using MATLAB
• The function resample can be employed
to increase the sampling rate of an input
vector x by a ratio of two positive integers,
L/M, generating an output vector y
• The M-file employs a lowpass FIR filter
designed using fir1 with a Kaiser
window
• The fractional interpolation of a sequence
can be obtained using Program 10_7 which
employs the function resample
Sampling Rate Alteration
Using MATLAB
• Example - The input and output plots of a
factor-of-5/3 interpolator designed using
Program 10_7 are given below
Multistage Decimators And
Interpolators
MULTISTAGE DECIMATORS AND
INTERPOLATORS
• If the sampling rate alteration system is
designed as a cascade system, the
computational efficiency is improved
significantly.
• The reasons for using multistage structures are
as follows:
1. Multistage system requires less computation.
2. Storage space required is less.
3. Filter design problem is simple.
4. Finite word length effects are less.
• Demerits: Proper control structure is required in
implementing the system and proper values of I
should be chosen.
For the multi-rate system shown in
Figure 10.44, develop an expression
for the output y(n) as a function of
the input x(n )
• In Figure 10.45 the down sampler with D
= 12 is split into 2 down samplers with
D1 = 3 and D2 = 4.
• The up sampler with I = 4 and the down
sampler with D = 3 are interchanged and
finally the up sampler with I = 4 and
down sampler with D = 4 cancel, and we
will be left with a down sampler with D =
3 and an up sampler with I = 3.

A multi-rate system is shown in Figure
10.46. Find the relation between x(n)
and y(n)

You might also like