ADSP Unit 1
ADSP Unit 1
𝑦 𝑛 = 𝑥∗ℎ 𝑛 = 𝑥 𝑘 ℎ[𝑛 − 𝑘]
𝑘=−∞
o Where:
o 𝑥[𝑛] is the input signal.
o ℎ[𝑛] is the impulse response (or system's response).
o y[n] is the output signal (or the result of the convolution).
Convolution Sum
o The summation takes all possible shifts of 𝑥[𝑘] and multiplies them by the corresponding values of ℎ[𝑛−𝑘], then sums the
results.
o This operation essentially expresses how each value of the output signal is influenced by the entire input signal and the
system's impulse response.
∞
o When calculating y n = 𝑘=−∞ 𝑥 𝑘 ℎ[𝑛 − 𝑘], the term h[n-k], is the time-reversed and shifted version of
h[k].
o The summation essentially slides the signal ℎ[𝑛] over the input signal 𝑥[𝑛], multiplying corresponding values
and summing them up.
o If ℎ[𝑛] is causal (i.e., it is zero for 𝑛<0), the summation range simplifies, often starting at 𝑘=0 instead of −∞.
Example
o Consider two simple sequences: 𝑥[𝑛]={1,2,3} and ℎ[𝑛]={0,1,2}.
o To calculate their convolution:
o Reverse and Shift ℎ[𝑛] over the input sequence.
o Perform the sum of products for each time shift.
𝑦𝑛 = 𝑥 𝑘 ℎ[𝑛 − 𝑘]
𝑘=−∞
o For a small example, let’s assume: o In Signal Processing
o 𝑥[𝑛]={1,2,3} for 𝑛=0,1,2 and zero elsewhere. o Linear Systems: The convolution operation is used
to analyze the behavior of linear time-invariant
o ℎ[𝑛]={0,1,2} for 𝑛=0,1,2 and zero elsewhere.
(LTI) systems. For an LTI system, the output is the
o The resulting output sequence 𝑦[𝑛] would be:
convolution of the input signal with the system’s
𝑦[0]=1(0)=0 impulse response.
𝑦[1]=1(1)+2(0)=1 o Filtering: In signal processing, convolution is
𝑦[2]=1(2)+2(1)+3(0)=2+2=4 frequently used in filtering operations. For
instance, applying a filter to a signal is a form of
𝑦[3]=2(2)+3(1)=4+3=7
convolution where the filter's impulse response is
𝑦[4]=3(2)=6
convolved with the signal.
o Thus, the output sequence 𝑦[𝑛] is:
o Efficient Computation: Convolution can be
𝑦[𝑛]={0,1,4,7,6} computationally intensive, but efficient algorithms
like the Fast Fourier Transform (FFT) can speed up
the process by transforming the problem into the
frequency domain.
DFT (Discrete Fourier Transform)
o The Discrete Fourier Transform (DFT) is a key topic that plays an important role in signal analysis, processing, and the efficient implementation of
algorithms.
o The DFT is a mathematical technique that transforms a discrete-time signal from the time domain into the frequency domain.
o This allows for the analysis of the frequency content of the signal, which is essential for tasks like filtering, spectral analysis, and compression.
o The Discrete Fourier Transform (DFT) of a sequence 𝑥[𝑛] (for 𝑛=0,1,…,𝑁−1) is defined as:
𝑁−1
2𝜋
𝑋𝑘 = 𝑥 𝑛 . 𝑒 −𝑗 𝑁 𝑘𝑛 , 𝑘 = 0,1, … , 𝑁 − 1
𝑛=0
o Where
o 𝑋[𝑘] is the complex value representing the frequency component in index k.
o 𝑥(𝑛) is the signal in the time domain (of length N)
o N is the total number of samples in the signal
2𝜋
o 𝑒 −𝑗 𝑁 𝑘𝑛 is the complex exponential that provides the basis functions for the frequency components, where j is the imaginary unit
IDFT (Inverse Discrete Fourier Transform)
o It reconstructs the original signal 𝑥(𝑛) from its DFT 𝑋(𝑘). i.e.,
𝑁−1
1 2𝜋
𝑥𝑛 = 𝑋[𝑘]. 𝑒 𝑗 𝑁 𝑘𝑛 , 𝑛 = 0,1, … , 𝑁 − 1
𝑁
𝑘=0
FFT (Fast Fourier Transform)
o It is an efficient algorithm to compute the DFT. The DFT has a computational complexity of 𝑂(𝑁2), which can be prohibitive for
large values of 𝑁. However, the FFT reduces this to 𝑂(𝑁 log 𝑁), making it much more feasible for real-time applications.
o Spectral Analysis - By transforming a signal into the frequency domain, we can analyze its frequency content. This is useful for
identifying periodic components, noise characteristics, and for filtering.
o Filter Design - The DFT can be used to design and implement digital filters. In the frequency domain, the filter’s transfer
function can be directly manipulated and then transformed back into the time domain for implementation.
o Convolution and Correlation - As mentioned earlier, convolution in the time domain becomes simple pointwise multiplication
in the frequency domain, thanks to the convolution theorem. Similarly, correlation between two signals also simplifies to
multiplication in the frequency domain.
o Data Compression - In applications like audio and image compression (e.g., MP3 or JPEG), the DFT (or its related transforms,
such as the Discrete Cosine Transform, DCT) is used to reduce the data required to represent a signal.
o Speech and Audio Processing - The DFT is widely used in speech recognition, music signal processing, and other areas where
the frequency characteristics of the signal are important.
ZT (Z-transform)
o Z-transform is a key mathematical tool used in the analysis and design of discrete-time systems.
o The Z-transform generalizes the idea of the Fourier transform and provides a more versatile framework for analyzing signals and systems,
especially in the context of linear time-invariant (LTI) systems.
o The Z-transform is widely used in signal processing for solving difference equations, analyzing system stability, and designing filters.
o The Z-transform of a discrete-time sequence 𝑥[𝑛] (where 𝑛 is an integer index) is defined as:
𝑋 𝑧 = 𝑥 𝑛 . 𝑧 −𝑛
𝑛=−∞
o Where
o X(z) is the Z-transform of the sequence x(n)
o z is a complex variable, i.e., 𝑧 = 𝑟𝑒 𝑗𝜃 , where r is the magnitude and 𝜃 is the phase
o X(n) is the sequence (discrete-time signal) for which the z-transform is being computed
o The sum is usually taken from n=0 to n=∞ for causal sequences, or from n=−∞ to n=∞ for two-sided sequences
o The Z-transform converts a sequence in the time domain into a function of the complex variable 𝑧, which provides insight into the
system's behavior in the frequency domain.
o The Region of Convergence (ROC) is the set of values of z for which the Z-transform sum converges. The ROC is crucial in understanding
the behavior of the Z-transform and determining the stability of systems.
Application of the Z-Transform
o System Analysis - The Z-transform is used to analyze discrete-time linear systems, particularly in determining system
stability and solving difference equations.
o Filter Design - In digital filter design, the Z-transform is used to design filters and analyze their behavior in the Z-
domain. The system’s transfer function is often expressed as a ratio of polynomials in 𝑧.
o Solution of Difference Equations - The Z-transform provides a systematic way to solve linear difference equations by
transforming them into algebraic equations in the Z-domain.
o Control Systems - The Z-transform is useful in the analysis and design of discrete-time control systems, including the
design of digital controllers.
o It provides a comprehensive framework for studying signal behavior, system stability, and the interaction between
signals and systems.
o The Z-transform simplifies complex operations like convolution, making it an essential part of digital signal
processing.
Multi-rate Signal Processing
o In many practical applications of digital signal processing, one is faced with the problem of changing the sampling rate of a signal, either
increasing it or decreasing it by some amount.
o For example, in telecommunication systems that transmit and receive different types of signals (e.g., teletype, facsimile, speech, video,
etc.), there is a requirement to process the various signals at different rates commensurate with the corresponding bandwidths of the
signals.
o The process of converting a signal from a given rate to a different rate is called Sampling Rate Conversion.
o In turn, systems that employ multiple sampling rates in the processing of digital signals are called multirate digital signal processing
systems.
o Sampling rate conversion of a digital signal can be accomplished in one of two general methods. One method is to pass the digital signal
through a D/A converter, filter it if necessary, and then to resample the resulting analog signal at the desired rate (i.e., to pass the analog
signal through an A/D converter).
o The second method is to perform the sampling rate conversion entirely in the digital domain.
o One apparent advantage of the first method is that the new sampling rate can be arbitrarily selected and need not have any special
relationship to the old sampling rate.
o A major disadvantage, however, is the signal distortion, introduced by the D/A converter in the signal reconstruction, and by the
quantization effects in the A/D conversion.
o Sampling rate conversion performed in the digital domain avoids this major disadvantage.
Sampling Rate Conversion
o The process of sampling rate conversion in the digital domain can be viewed as a linear filtering operation, as
illustrated in Fig. 10.1(a).
o The input signal x(n) is characterized by the sampling rate Fx = 1/Tx, and the output signal y(m) is characterized by the
sampling rate Fy = 1/Ty, where Tx and Ty are the corresponding sampling intervals.
o In the main part of our treatment, the ratio Fy/Fx is constrained to be rational,
𝑭𝒚 𝑰
=
𝑭𝒙 𝑫
o where D and I are relatively prime integers. We shall show that the linear filter is characterized by a time-variant
impulse response, denoted as h(n,m).
o Hence the input x(n) and the output y(m) are related by the convolution summation for time-variant systems.
o The sampling rate conversion process can also be understood from the point of view of digital resampling of the
same analog signal.
o Let x(t) be the analog signal that is sampled at the first rate Fx to generate x(n).
o The goal of rate conversion is to obtain another sequence y(m) directly from x(n), Which is equal to the sampled
values of x(t) at a second rate Fy.
Decimation by a Factor of D
o Let us assume that the signal 𝑥(𝑛) with spectrum 𝑋(𝜔) is to be down-sampled by an integer factor 𝐷.
o The spectrum 𝑋(𝜔) is assumed to be non-zero in the frequency interval 0 < 𝜔 < 𝜋 or, equivalently, |𝐹| ≤ 𝐹𝑥 /2. We know
that if we reduce the sampling rate simply by selecting every 𝐷𝑡ℎ value of 𝑥(𝑛), the resulting signal will be an aliased version
of 𝑥(𝑛), with a folding frequency of 𝐹𝑥 /2𝐷.
o To avoid aliasing, we must first reduce the bandwidth of 𝑥(𝑛) to 𝐹𝑚𝑎𝑥 = 𝐹𝑥 /2𝐷 or, equivalently, to 𝜔max = 𝜋/𝐷.
o The input sequence 𝑥(𝑛) is passed through a lowpass filter, characterized by the impulse response ℎ(𝑛) and a frequency
response 𝑯𝑫 𝝎 , which ideally satisfies the condition
𝟏, 𝝎 ≤𝝅 𝑫
𝑯𝑫 𝝎 = →①
𝟎, 𝑶𝒕𝒉𝒆𝒓𝒘𝒊𝒔𝒆
o Thus the filter eliminates the spectrum of 𝑋(𝜔) in the range 𝜋 < 𝜔 < 𝜋. Of course, the implication is that only the
𝐷
frequency components of 𝑥(𝑛) in the range |𝜔|< 𝜋 𝐷 are of interest in further processing of the signal.
o The output of the filter is a sequence 𝜐 𝑛 given as
𝝊 𝒏 = 𝒉 𝒌 𝒙(𝒏 − 𝒌) →②
𝒌=𝟎
𝒚 𝒎 = 𝝊 𝒎𝑫 = 𝒉 𝒌 𝒙(𝒎𝑫 − 𝒌) →③
𝒌=𝟎
o Although the filtering operation on 𝑥(𝑛) is linear and time invariant, the down-sampling operation in combination with the
filtering results in a time-variant system.
o This is easily verified. Given the fact that 𝑥(𝑛) produces 𝑦(𝑚), we note that 𝑥(𝑛 − 𝑛0) does not imply 𝑦(𝑛 − 𝑛0) unless 𝑛0 is
a multiple of 𝐷.
o Consequently, the overall linear operation (linear filtering followed by down-sampling) on 𝑥(𝑛) is not time invariant.
o The frequency-domain characteristics of the output sequence 𝑦(𝑚) can be obtained by relating the spectrum of 𝑦(𝑚) to the
spectrum of the input sequence 𝑥(𝑛).
o First, it is convenient to define a sequence 𝜐(𝑛) as,
𝝊 𝒏 , 𝒏 = 𝟎, ±𝑫, ±𝟐𝑫, …
𝝊 𝒏 = →④
𝟎, 𝑶𝒕𝒉𝒆𝒓𝒘𝒊𝒔𝒆
o Clearly, 𝜐(𝑛) can be viewed as sequence obtained by multiplying 𝜐 𝑛 with a
periodic train of pulses 𝑝(𝑛), with period D, as illustrated in Figure 10.3. The
discrete Fourier series representation of 𝑝(𝑛) is
𝑫−𝟏
𝟏
𝒑 𝒏 = 𝒆𝒋𝟐𝝅𝒌𝒏/𝑫 →⑤
𝑫
𝒌=𝟎
o Hence,
𝝊 𝒏 =𝝊 𝒏 𝒑 𝒏 →⑥
o And
𝒚 𝒎 = 𝝊 𝒎𝑫 = 𝝊 𝒎𝑫 𝒑 𝒎𝑫 = 𝝊 𝒎𝑫 →⑦
o Now the z-transform of the output sequence 𝑦(𝑚) is
∞ ∞
𝒀 𝒛 = 𝒚(𝒎)𝒛−𝒎 = 𝝊(𝒎𝑫)𝒛−𝒎
𝒎=−∞ 𝒎=−∞
𝒀 𝒛 = 𝝊(𝒎)𝒛−𝒎/𝑫 →⑧
𝒎=−∞
o Where the last step follows from the fact that 𝜐 𝑚 = 0, except at multiples of 𝐷. By making use of the relations in ④ and ⑥ in ⑧, we obtain,
∞ 𝑫−𝟏
𝟏
𝒀 𝒛 = 𝝊 𝒎 𝒆𝒋𝟐𝝅𝒌/𝑫 𝒛−𝒎/𝑫
𝑫
𝒎=−∞ 𝒌=𝟎
𝑫−𝟏 ∞ −𝒎
𝟏 𝒋𝟐𝝅𝒌
= 𝝊 𝒎 𝒆( )
𝑫 𝒛𝟏/𝑫
𝑫
𝒌=𝟎 𝒎=−∞
𝑫−𝟏 −𝒎
𝟏 𝒋𝟐𝝅𝒌
= 𝑽 𝒆( )
𝑫 𝒛𝟏/𝑫
𝑫
𝒌=𝟎
𝑫−𝟏
𝟏 𝒋𝟐𝝅𝒌 𝒋𝟐𝝅𝒌
𝒀 𝒛 = 𝑯𝑫 𝒆( )
𝑫 𝒛𝟏/𝑫 𝑿 𝒆( )
𝑫 𝒛𝟏/𝑫 →⑨
𝑫
𝒌=𝟎
o Where the last step follows from the fact that 𝑽 𝒛 = 𝑯𝑫 𝒛 𝑿(𝒛)
o By evaluating 𝑌(𝑧) in the unit circle, we obtain the spectrum of the output signal 𝑦(𝑚). Since the rate of 𝑦(𝑚) is 𝐹𝑦 = 1/𝑇𝑦 , the frequency variable, which we
denote as 𝝎𝑦 , is in radians and is relative to the sampling rate 𝐹𝑦,
𝟐𝝅𝑭
𝝎𝒚 = = 𝟐𝝅𝑭𝑻𝒚 →⑩
𝑭𝒚
o Since the sampling rates are related by the expression
𝑭𝒙
𝑭𝒚 = →⑪
𝑫
o It follows that the frequency variables 𝜔𝑦 and
𝟐𝝅𝑭
𝝎𝒙 = = 𝟐𝝅𝑭𝑻𝒙 →⑫
𝑭𝒙
o Are related by
𝝎𝒚 = 𝑫𝝎𝒙 →⑬
o We conclude that the spectrum 𝑌(𝜔𝑦 ), which is obtained by evaluating ⑨ on the unit circle,
can be expressed as
𝑫−𝟏
𝟏 𝝎𝒚 − 𝟐𝝅𝒌 𝝎𝒚 − 𝟐𝝅𝒌
𝑌 𝜔𝑦 = 𝑯𝑫 𝑿 →⑭
𝑫 𝑫 𝑫
𝒌=𝟎
o With a properly designed filter 𝐻𝐷 (𝜔), the aliasing is eliminated and, consequently, all but the
first term in ⑭ vanish.
o Hence
𝟏 𝝎𝒚 𝝎𝒚 𝟏 𝝎𝒚
𝒀 𝝎𝒚 = 𝑯𝑫 𝑿 = 𝑿 → ⑮
𝑫 𝑫 𝑫 𝑫 𝑫
o For 0 ≤ 𝜔𝑦 ≤ 𝜋. The spectra for the sequences 𝑥 𝑛 , 𝜐 𝑛 𝑎𝑛𝑑 𝑦 𝑚 are illustrated in Figure
10.4.
Interpolation by a factor of I
o An increase in the sampling rate by an integer factor of I can be accomplished by interpolating 𝑰 − 𝟏 new
samples between successive values of the signal.
o We shall describe a process that preserves the spectral shape of the signal sequence 𝑥(𝑛).
o Let 𝜐(𝑚) denote a sequence with a rate 𝑭𝒚 = 𝑰𝑭𝒙, which is obtained from 𝑥(𝑛) by adding 𝑰 − 𝟏 zeros
between successive values of 𝑥(𝑛). Thus
𝒎
𝒙 , 𝒎 = 𝟎, ±𝑰, ±𝟐𝑰, …
𝝊 𝒎 = 𝑰 → ❶
𝟎, 𝒐𝒕𝒉𝒆𝒓𝒘𝒊𝒔𝒆
o And its sampling rate is identical to the rate of 𝑦(𝑚). This sequence has a z-transform
∞ ∞
𝑽 𝒛 = 𝝊(𝒎)𝒛−𝒎 = 𝒙(𝒎)𝒛−𝒎𝑰 = 𝑿 𝒛𝑰 → ❷
𝒎=−∞ 𝒎=−∞
o The corresponding spectrum of 𝜐(𝑚) is obtained by evaluating ❷ on the unit circle. Thus
𝑽 𝝎𝒚 = 𝑿 𝝎𝒚 𝑰 → ❸
o Where 𝜔𝑦 denotes the frequency variable relative to the new sampling rate 𝐹𝑦 (i.e., 𝜔𝑦 = 2𝜋𝐹/𝐹𝑦 ). Now the
relationship between sampling rates is 𝑭𝒚 = 𝑰𝑭𝒙 and hence, the frequency variables 𝜔𝑥 and 𝜔𝑦 are related
according to formula
𝝎𝒙
𝝎𝒚 = → ❹
𝑰
o The spectra 𝑋(𝜔𝑥 ) and 𝑉 𝜔𝑦 are illustrated in Figure 11.3.1.
o We observe that the sampling rate increases, obtained by addition of 𝑰 − 𝟏 zero samples between
successive values of 𝑥(𝑛), results in a signal whose spectrum 𝑉 𝜔𝑦 is an I-fold periodic repetition of
the input signal spectrum 𝑋(𝜔𝑥 ).
o Since only the frequency components of 𝑥(𝑛) in the range 0 ≤ 𝜔𝑦 ≤ 𝜋/𝐼 are unique, the images of
𝑋(𝜔) above 𝜔 = 𝜋/𝐼 should be rejected by passing the sequence 𝜐(𝑚) through a lowpass filter with
frequency response 𝐻𝐼 (𝜔𝑦 ) that ideally has the characteristic
𝝅
𝑪, 𝟎 ≤ 𝝎𝒚 ≤
𝑯𝑰 𝝎𝒚 = 𝑰 → ❺
𝟎, 𝒐𝒕𝒉𝒆𝒓𝒘𝒊𝒔𝒆
o Where C is a scale factor required to properly normalize the output sequence 𝑦(𝑚). Consequently, the output
spectrum is
𝝅
𝑪𝑿 𝝎𝒚 𝑰 , 𝟎 ≤ 𝝎𝒚 ≤
𝑌 𝜔𝑦 = 𝑰 → ❻
𝟎, 𝒐𝒕𝒉𝒆𝒓𝒘𝒊𝒔𝒆
𝑚
o The scale factor C is selected so that the output 𝑦 𝑚 = 𝑥 𝑓𝑜𝑟 𝑚 = 0, ±𝐼, ±2𝐼, … For mathematical
𝐼
𝜋 𝜋
𝐼
1 𝐶
𝑦 0 = 𝑌 𝜔𝑦 𝑑𝜔𝑦 = 𝑋 𝜔𝑦 𝐼 𝑑𝜔𝑦 → ❼
2𝜋 2𝜋
−𝜋 −𝜋
𝐼
𝜋
𝐶 1 𝐶
𝑦 0 = 𝑋 𝜔𝑥 𝑑𝜔𝑥 = 𝑥 0 → ❽
𝐼 2𝜋 𝐼
−𝜋
𝒚 𝒎 = 𝒉(𝒎 − 𝒌)𝝊(𝒌) → ❾
𝒌=−∞
𝒚 𝒎 = 𝒉 𝒎 − 𝒌𝑰 𝒙(𝒌) →❿
𝒌=−∞
o Consider the general case of sampling rate conversion by a rational factor 𝑰/𝑫. We can achieve this sampling rate
conversion by first performing interpolation by the factor 𝑰 and then decimating the output of the interpolator by the
factor 𝑫.
o In other words, sampling rate conversion by the rational factor 𝑰/𝑫 is accompanied by cascading an interpolator with
decimator.
o The importance of performing interpolation first and decimation second
is to preserve the desired spectral characteristics of 𝑥(𝑛).
o Furthermore, with the cascade configuration illustrated in Figure 11.4.1,
the two filters with impulse response {ℎ𝑢(𝑘)} and {ℎ𝑑 (𝑘)} are operated
at the same rate, namely 𝑰𝑭𝒙, and hence can be combined into a single
lowpass filter with impulse response ℎ(𝑘) as illustrated in Figure 11.4.2.
o The frequency response 𝐻(𝜔𝜐 ) of the combined filter must incorporate
the filtering operation for both interpolation and decimation and hence it
should ideally possess the frequency response characteristic
𝑰, 𝟎 ≤ 𝝎𝝊 ≤ 𝐦𝐢𝐧(𝝅 𝑫 , 𝝅 𝑰)
𝑯 𝝎𝝊 = → ①
𝟎, 𝒐𝒕𝒉𝒆𝒓𝒘𝒊𝒔𝒆
o Where 𝜔𝜐 = 2𝜋 𝐹 𝐹𝜐 = 2𝜋 𝐹 𝐼𝐹𝑥 = 𝜔𝑥 𝐼
𝒙 𝒍 𝑰 , 𝒍 = 𝟎, ±𝑰, ±𝟐𝑰, …
𝝊 𝒍 = → ②
𝟎, 𝒐𝒕𝒉𝒆𝒓𝒘𝒊𝒔𝒆
o And output of linear time-invariant filter is
∞ ∞
𝝎 𝒍 = 𝒉(𝒍 − 𝒌)𝝊(𝒌) = 𝒉 𝒍 − 𝒌𝑰 𝒙(𝒌) → ③
𝒌=−∞ 𝒌=−∞
o Finally the output of the sampling rate converter is the sequence {𝑦(𝑚)}, which is obtained by downsampling the sequence {𝝎 𝒍 } by a factor of 𝐷.
Thus
𝒚 𝒎 = 𝝎 𝒎𝑫 = 𝒉 𝒎𝑫 − 𝒌𝑰 𝒙(𝒌) → ④
𝒌=−∞
𝒎𝑫
𝒌= −𝒏 → ⑤
𝑰
o Where the notation 𝑟 denotes the largest integer contained in r. With this change in variable, ④ becomes
∞
𝑚𝐷 𝑚𝐷
𝒚 𝒎 = 𝒉 𝒎𝑫 − 𝑰 + 𝒏𝑰 𝒙 −𝑛 → ⑥
𝐼 𝐼
𝒏=−∞
o We note that
𝒎𝑫
𝒎𝑫 − 𝑰 = 𝒎𝑫, 𝒎𝒐𝒅𝒖𝒍𝒐 𝑰 = (𝒎𝑫)𝑰
𝑰
o Consequently, ⑥ can be expressed as
∞
𝒎𝑫
𝒚 𝒎 = 𝒉 𝒏𝑰 + (𝒎𝑫)𝑰 𝒙 −𝒏 →⑦
𝑰
𝒏=−∞
o It is apparent from this form that the output 𝑦(𝑚) is obtained by passing the input sequence 𝑥(𝑛) through a time-variant filter with impulse
response
𝒈 𝒏, 𝒎 = 𝒉 𝒏𝑰 + 𝒎𝑫 𝑰 , −∞ < 𝒎, 𝒏 < ∞ → ⑧
o Where ℎ(𝑘) is the impulse response of the time-invariant lowpass filter operating at the sampling rate 𝐼𝐹𝑥. We further observe that for any integer
𝑘,
𝒈 𝒏, 𝒎 + 𝒌𝑰 = 𝒉 𝒏𝑰 + 𝒎𝑫 + 𝒌𝑫𝑰 𝑰 = 𝒉 𝒏𝑰 + 𝒎𝑫 𝑰 = 𝒈 𝒏, 𝒎 → ⑨
o Hence 𝑔(𝑛, 𝑚) is periodic in the variable 𝑚 with period 𝐼.
o The frequency-domain relationship can be obtained by combining the results of the interpolation and decimation process.
o Thus the spectrum at the output of the linear filter with impulse response ℎ(𝑙) is
𝑰𝑿 𝝎𝝊 𝑰 , 𝟎 ≤ 𝝎𝝊 ≤ 𝐦𝐢𝐧(𝝅 𝑫 , 𝝅 𝑰)
𝑽 𝝎𝝊 = 𝑯 𝝎𝝊 𝑿 𝝎𝝊 𝑰 = → ⑩
𝟎, 𝒐𝒕𝒉𝒆𝒓𝒘𝒊𝒔𝒆
o The spectrum of the output sequence 𝑦(𝑚), obtained by decimating the sequence 𝜐(𝑛) by a factor of 𝐷 is
𝑫−𝟏
𝑰 𝝎𝒚 − 𝟐𝝅𝒌
𝒀 𝝎𝒚 = 𝑽 → ⑪
𝑫 𝑫
𝒌=𝟎
o Where 𝜔𝑦 = 𝐷𝜔𝜐 . Since the linear filter prevents aliasing as implied by ⑩, the spectrum of the output sequence given by ⑪ reduces to
𝑰 𝝎𝝊
𝒀 𝝎𝒚 = 𝑫 𝑿 , 𝟎 ≤ 𝝎𝝊 ≤ 𝐦𝐢𝐧(𝝅, 𝝅𝑫 𝑰) → ⑫
𝑫
𝟎, 𝒐𝒕𝒉𝒆𝒓𝒘𝒊𝒔𝒆
Applications of Multirate Signal Processing
o A variety of techniques have been developed to efficiently represent speech signals in digital form for either transmission or storage.
o Since most of the speech energy is contained in the lower frequencies, we would like to encode the lower-frequency band with more bits than the
high-frequency band.
o Subband coding is a method, where the speech signal is subdivided into several frequency bands and each band is digitally encoded separately.
o An example of a frequency subdivision is shown in Fig. 10.37(a). Let us assume that the speech signal is sampled at a rate 𝐹𝑠 samples per second.
o The first frequency subdivision splits the signal spectrum into two equal-width segments, a lowpass signal (0 ≤ 𝐹 ≤ 𝐹𝑠/4) and a high-pass signal
(𝐹𝑠/4 ≤ 𝐹 ≤ 𝐹𝑠 /2).
o The second frequency subdivision splits the lowpass signal from the first stage into two equal bands, a lowpass signal (0 ≤ 𝐹 ≤ 𝐹𝑠/8) and a high-
pass signal (𝐹𝑠/8 ≤ 𝐹 ≤ 𝐹𝑠/4).
o Finally, the third frequency subdivision splits the lowpass signal from the second stage into two equal bandwidth signals. Thus the signal is subdivided
into four frequency bands, covering three octaves, as shown in Fig. 10.37(b).
o By allocating a different number of bits per sample to the signal in the four subbands, we can achieve a reduction in the bit rate of the digitalized
speech signal.
o Filter design is particularly important in achieving good performance in subband coding. Aliasing resulting from decimation of the subband signals
must be negligible.
o It is clear that we cannot use brick wall filter characteristics as shown in Figure 10.38(a), since such filters are
physically unrealizable.
o A particularly practical solution to the aliasing problem is to use Quadrature Mirror Filters (QMF), which have the
frequency response characteristics as shown in Figure 10.38(b).
o The synthesis method for the subband encoded speech signal is basically the reverse of the encoding process.
o The signals in adjacent lowpass and high-pass frequency bands are interpolated, filtered, and combined as shown in Figure 10.39.
o A pair of QMF is used in the signal synthesis for each octave of the signal.
o Subband coding is also an effective method to achieve data compression in image signal processing.
o By combining subband coding with vector quantization for each subband signal, Safranek et al. (1988) have obtained coded images with
approximately ½ bit per pixel, compared with 8 bits per pixel for the un-coded image.
o In general, subband coding of signals is an effective method for achieving bandwidth compression in a digital representation of the
signal, when the signal energy is concentrated in a particular region of the frequency band.
o Multirate signal processing notions provide efficient implementations of the subband encoder.
Digital Filter Banks
o Filter banks are generally categorized as two types, analysis filter banks and synthesis filter banks.
o An analysis filter bank consists of a set of filters, with system functions {𝐻𝑘(𝑧)}, arranged in a parallel bank as
illustrated in Fig. 10.32(a).
o The frequency response characteristics of this filter bank splits the signal into a corresponding number of subbands.
o On the other hand, a synthesis filter bank consists of a set of filters with system functions {𝐺𝑘(𝑧)}, arranged as
shown in Fig. 10.32(b), with corresponding inputs {𝑦𝑘(𝑛)}. The outputs of the filters are summed to form the
synthesized signal {𝑥(𝑛)}.
o Filter banks are often used for performing spectrum analysis and signal synthesis.
o When a filter bank is employed in the computation of the discrete Fourier transform (DFT) of a sequence {𝑥(𝑛)}, the
filter bank is called a DFT filter bank.
o An analysis filter bank consisting of N filters {𝐻𝑘(𝑧), 𝑘 = 0,1, … 𝑁 − 1} is called a uniform DFT filter bank if
𝐻𝑘 (𝑧), 𝑘 = 0,1,2, … , 𝑁 − 1, are derived from a prototype filter 𝐻0(𝑧), where
𝟐𝝅𝒌
𝑯𝒌 𝝎 = 𝑯𝟎 𝝎 − , 𝒌 = 𝟏, 𝟐, … , 𝑵 − 𝟏 → ❶
𝑵
o Hence the frequency response characteristics of the filters {𝐻𝑘(𝑧), 𝑘 = 0,1, … 𝑁 − 1} are simply obtained by
uniformly shifting the frequency response of the prototype filter by multiples of 2𝜋/𝑁. In the time domain the filters
are characterized by their impulse response, which can be expressed as
𝒉𝒌 𝒏 = 𝒉𝟎 𝒏 𝒆𝒋𝟐𝝅𝒏𝒌/𝑵 , 𝒌 = 𝟎, 𝟏, … , 𝑵 − 𝟏 → ❷
o Where ℎ0 𝑛 is the impulse response of the prototype filter, which in general may be either an FIR or an IIR filter.
o If 𝐻0(𝑧) denotes the transfer function of the prototype filter, the transfer function of the kth filter is
𝑯𝒌 𝒛 = 𝑯𝟎 𝒛𝒆−𝒋𝟐𝝅𝒌/𝑵 , 𝟏 ≤𝒌≤𝑵−𝟏 → ❸
o The following figure provides a conceptual illustration of the frequency response characteristics of the N filters.
o The uniform DFT analysis filter bank can be realized as shown in Figure 10.33(a), where the frequency components in the
−𝑗2𝜋𝑛𝑘
sequence {𝑥(𝑛)} are translated in frequency to lowpass by multiplying 𝑥(𝑛) with the complex exponentials exp 𝑁
,𝑘
= 1,2, … , 𝑁 − 1, and the resulting product signals are passed through a lowpass filter with impulse response {ℎ0(𝑛)}.
o Since the output of the lowpass filter is relatively narrow in bandwidth, the signal can be decimated by a factor 𝐷 ≤ 𝑁.
𝑿𝒌 𝒎 = 𝒉𝟎 𝒎𝑫 − 𝒏 𝒙(𝒏)𝒆−𝒋𝟐𝝅𝒏𝒌/𝑵 𝒌 = 𝟎, 𝟏, … , 𝑵 − 𝟏 𝒎 = 𝟎, 𝟏, … → ❹
𝒏
o The resulting frequency translated signals from the N filters are then summed,. Thus we obtain the sequence
𝑵−𝟏 𝑵−𝟏
𝟏 𝒋𝟐𝝅𝒏𝒌/𝑵
𝟏
𝝊 𝒏 = 𝒆 𝒀𝒌 (𝒎)𝒈𝟎 (𝒏 − 𝒎𝑰) = 𝒈𝟎 (𝒏 − 𝒎𝑰) 𝒀𝒌 (𝒎)𝒆𝒋𝟐𝝅𝒏𝒌/𝑵 = 𝒈𝟎 𝒏 − 𝒎𝑰 𝒚𝒏 𝒎 → ❺
𝑵 𝑵
𝒌=𝟎 𝒎 𝒎 𝒌=𝟎 𝒎
o Where the factor 1/N is a normalization factor, {𝑦𝑛(𝑚)} represent samples of the inverse DFT sequence corresponding to {𝑌𝑘 (𝑚)},
{𝑔0(𝑛)} is the impulse response of interpolation filter, and 𝐼 = 𝐷.
o The relationship between the output {𝑋𝑘(𝑛)} of the analysis filter bank and the input {𝑌𝑘(𝑚)} to the synthesis filter
bank depends on the application.
o Usually, {𝑌𝑘(𝑚)} is a modified version of {𝑋𝑘(𝑛)}, where the specific modification is determined by the application.
o An alternative realization of the analysis and synthesis filter banks is illustrated in Figure 10.34.
o Where {𝑔0 𝑛 } is the impulse response of the prototype filter. The outputs of these filters are then summed to yield
𝑵−𝟏
𝟏 𝒋𝟐𝝅𝒌𝒎𝑰
𝝊 𝒏 = 𝒀𝒌 𝒎 𝒆 𝑵 𝒈𝒌(𝒏 − 𝒎𝑰) → ❾
𝑵 𝒌=𝟎 𝒎
o Where 𝐼 = 𝐷.
Quadrature Mirror Filters
o A quadrature mirror filter (QMF) is a digital filter that splits an input signal into subbands.
o The subbands are symmetric and "Mirrored" around half of the input signal's frequency and are processed
independently.
o Magnitude response of QMF is the mirror image around π/2 of that of another filter.
o The basic building block in application of quadrature mirror filters (QMF) is the two-channel QMF bank shown in
Figure 10.40.
o This is as multirate digital filter structure that employs two decimators in the signal analysis section and two
interpolators in the signal synthesis section.
o The lowpass and highpass filters in the analysis section have impulse responses h0(n) and h1(n) respectively.
o Similarly, the lowpass and highpass filters contained in the synthesis section have impulse responses of g0(n) and
g1(n) respectively.
o The fourier transforms of the signal at the outputs of the two decimators are
𝟏 𝝎 𝝎 𝝎 − 𝟐𝝅 𝝎 − 𝟐𝝅
𝑿𝒂𝟎 (𝝎) = 𝑿 𝑯𝟎 +𝑿 𝑯𝟎
𝟐 𝟐 𝟐 𝟐 𝟐
𝟏 𝝎 𝝎 𝝎 − 𝟐𝝅 𝝎 − 𝟐𝝅
𝑿𝒂𝟏 𝝎 = 𝑿 𝑯𝟏 +𝑿 𝑯𝟏 → ①
𝟐 𝟐 𝟐 𝟐 𝟐
o If 𝑋𝑠0 (𝜔) and 𝑋𝑠1 (𝜔) represent the two inputs to the synthesis section, the output is simply
𝑿 𝝎 = 𝑿𝒔𝟎 𝟐𝝎 𝑮𝟎 𝝎 + 𝑿𝒔𝟏 𝟐𝝎 𝑮𝟏 𝝎 → ②
o Now, suppose that we connect the analysis filter to the corresponding synthesis filter, so that 𝑋𝑎0 𝜔 = 𝑋𝑠0 (𝜔)and 𝑋𝑎1 𝜔 = 𝑋𝑠1 (𝜔), then by
substituting from ① into ②, we obtain
𝟏 𝟏
𝑿 𝝎 = 𝑯 𝝎 𝑮𝟎 𝝎 + 𝑯𝟏 𝝎 𝑮𝟏 𝝎 𝑿 𝝎 + 𝑯𝟎 𝝎 − 𝝅 𝑮𝟎 𝝎 + 𝑯𝟏 𝝎 − 𝝅 𝑮𝟏 𝝎 𝑿 𝝎 − 𝝅 → ③
𝟐 𝟎 𝟐
o The first term is the desired signal output from QMF bank and second term represent effect of aliasing, which we would like to eliminate.
o In the z-transform domain ③ is expressed as
𝟏 𝟏
𝑿 𝒛 = 𝑯𝟎 𝒛 𝑮𝟎 𝒛 + 𝑯𝟏 𝒛 𝑮𝟏 𝒛 𝑿 𝒛 + 𝑯𝟎 −𝒛 𝑮𝟎 𝒛 + 𝑯𝟏 −𝒛 𝑮𝟏 𝒛 𝑿 −𝒛 → ④
𝟐 𝟐
𝑿 𝒛 = 𝑸 𝒛 𝑿 𝒛 + 𝑨 𝒛 𝑿(−𝒛)
o Where, by definition
𝟏
𝑸 𝒛 = 𝑯 𝒛 𝑮𝟎 𝒛 + 𝑯𝟏 𝒛 𝑮𝟏 𝒛
𝟐 𝟎
𝟏
𝑨 𝒛 = 𝑯 −𝒛 𝑮𝟎 𝒛 + 𝑯𝟏 −𝒛 𝑮𝟏 𝒛 → ⑤
𝟐 𝟎
Elimination of Aliasing
𝑮𝟎 𝝎 = 𝑯𝟏 𝝎 − 𝝅 & 𝑮𝟏 𝝎 = −𝑯𝟎 𝝎 − 𝝅 → ⑧
o Thus, the second term in ③ vanishes and the filter bank is alias-free.
o To elaborate, let us assume that 𝑯𝟎 (𝝎) is a lowpass filter and 𝑯𝟏(𝝎) is a mirror-image highpass filter as shown in
Figure 11.11.2. Then we can express 𝑯𝟎 (𝝎) and 𝑯𝟏 (𝝎) as
𝑯𝟎 𝝎 = 𝑯 𝝎
𝑯𝟏 𝝎 = 𝑯 𝝎 − 𝝅 → ⑨
o Where 𝑯(𝝎) is the frequency response of a lowpass filter. In the time domain, the corresponding relations are
𝒉𝟎 𝒏 = 𝒉 𝒏
𝒉𝟏 𝒏 = (−𝟏)𝒏 𝒉 𝒏 → ⑩
o As a consequence, 𝑯𝟎 𝝎 and 𝑯𝟏 𝝎 have mirror image symmetry about the frequency 𝝎 = 𝝅 𝟐, as shown in
Figure 11.11.2. To be consistent with the constraint in ⑧, we select the lowpass filter 𝑮𝟎 𝝎 as
𝑮𝟎 𝝎 = 𝑯 𝝎 → ⑪
o In the z-transform domain, the relations for the elimination of aliasing are
𝑯𝟎 𝒛 = 𝑯 𝒛
𝑯𝟏 𝒛 = 𝑯 −𝒛
𝑮𝟎 𝒛 = 𝑯 𝒛
𝑮𝟏 𝒛 = −𝑯 −𝒛 → ⑭
Condition for Perfect Reconstruction
o With 𝐴(𝑧) = 0, we now consider the condition for which the output 𝑥(𝑛) of the QMF bank is identical to the input 𝑥(𝑛),
except for an arbitrary delay, for all possible inputs.
o When this condition is satisfied, the filter bank is called a perfect reconstruction QMF bank. Thus, we require that
𝟏
𝑸 𝒛 = 𝑯 (𝒁)𝑮𝟎 (𝒛) + 𝑯𝟏 (𝒛)𝑮𝟏 (𝒛) = 𝒛−𝒌 → ⑮
𝟐 𝒛
o By making use of the relations in ⑭, the condition for perfect reconstruction may be expressed as
𝑯𝟐 𝒛 − 𝑯𝟐 −𝒛 = 𝟐𝒛−𝒌 → ⑯
o Or equivalently
𝑯𝟐 𝝎 − 𝑯𝟐 𝝎 − 𝝅 = 𝟐𝒆−𝒋𝝎𝒌 → ⑰
o Therefore, for perfect reconstruction, the frequency response H 𝜔 of the lowpass filter in the two-channel QMF bank must
satisfy the magnitude condition
𝑯𝟐 𝝎 − 𝑯𝟐 𝝎 − 𝝅 =𝑪 → ⑱
o Where C is a positive constant, example: 𝐶 = 2. We know that if 𝐻 𝜔 satisfies the magnitude condition in ⑱ and is
designed to have linear phase, then the QMF output 𝑥(𝑛) is simply a delayed version of the input sequence 𝑥(𝑛). However,
linear phase is not a necessary condition for perfect reconstruction.