0% found this document useful (0 votes)
36 views36 pages

Signal Processing Fundamentals and Applications

The document covers fundamental concepts in signal processing, including signal types, Laplace and Z transforms, discrete Fourier transforms, and linear optimal filtering. It provides detailed questions and answers for each topic, illustrating key principles with examples. Additionally, it discusses digital filters, their applications, and structures, emphasizing the differences between recursive and non-recursive filters.

Uploaded by

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

Signal Processing Fundamentals and Applications

The document covers fundamental concepts in signal processing, including signal types, Laplace and Z transforms, discrete Fourier transforms, and linear optimal filtering. It provides detailed questions and answers for each topic, illustrating key principles with examples. Additionally, it discusses digital filters, their applications, and structures, emphasizing the differences between recursive and non-recursive filters.

Uploaded by

Ain Ahmad
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

"Unit-1Introduc on to signal processing, Review of Laplace

transform, Z transform, Fourier transform. Discrete Fourier


transform, Fast Fourier Transform, Algorithms and
Complexity. Introduction to linear Optimal Filtering." give 5
questions and answers with example in detail for each topic
of 15 marks each question

1. Introduction to Signal Processing

Q1: Explain the basic components of a signal processing


system and discuss the difference between analog and digital
signals with examples.

Answer:
A signal processing system comprises three main
components: an input signal source, a processing unit, and an
output device. The system manipulates signals—functions that
carry information about phenomena such as sound, images, or
sensor readings.

 Analog signals are continuous in time and amplitude (e.g.,


a microphone converting sound waves to continuous
electrical voltage).
Example: Human speech captured by a microphone—
output voltage varies smoothly with sound.

 Digital signals are discrete, existing at defined time


intervals and amplitude steps (e.g., a computer processing
binary data).
Example: The output of an analog-to-digital converter
turning a voice signal into a sequence of numbers for
digital storage or processing.

Signal processing systems convert real-world signals into a


form suitable for analysis, improvement, storage, or
transmission. For example, noise reduction in audio uses
filtering to remove unwanted frequencies, thus improving the
original sound.

2. Review of Laplace Transform

Q2: Solve the system described by the ordinary differential


equation $ \frac{dy}{dt} + 3y = 2u(t) $ using Laplace
Transform, where $ y(0) = 0 $.

Answer:
Step 1: Take the Laplace Transform on both sides:

𝑑𝑦
ℒ + 3ℒ{𝑦} = 2ℒ{𝑢(𝑡)}
𝑑𝑡
2
𝑠𝑌(𝑠) − 𝑦(0) + 3𝑌(𝑠) =
𝑠

2
(𝑠 + 3)𝑌(𝑠) =
𝑠

Step 2: Isolate $ Y(s) $:

2
𝑌(𝑠) =
𝑠(𝑠 + 3)

Step 3: Use partial fraction decomposition:

2 𝐴 𝐵
= +
𝑠(𝑠 + 3) 𝑠 𝑠 + 3

Solving,

2 = 𝐴(𝑠 + 3) + 𝐵𝑠

Let $ s = 0 $: $ 2 = 3A \Rightarrow A = \frac{2}{3} $


Let $ s = -3 $: $ 2 = -3B \Rightarrow B = -\frac{2}{3} $

So,

2 1 2 1
𝑌(𝑠) = ⋅ − ⋅
3 𝑠 3 𝑠+3

Taking the inverse Laplace,

2
𝑦(𝑡) = (1 − 𝑒 ), 𝑡 ≥ 0
3
This function describes the system's response to a unit step
input.

3. Z Transform

Q3: Use the Z Transform to solve the difference equation $


y[n] - 0.5y[n-1] = x[n] $, with initial condition $ y[-1]=0 $, for $
x[n] = 2^n u[n] $.

Answer:
Step 1: Take Z Transform on both sides:

𝑍{𝑦[𝑛]} − 0.5𝑍{𝑦[𝑛 − 1]} = 𝑍{𝑥[𝑛]}

Using properties,

𝑌(𝑧) − 0.5𝑧 𝑌(𝑧) = 𝑋(𝑧)

𝑌(𝑧)(1 − 0.5𝑧 ) = 𝑋(𝑧)

Given $ X(z) = \frac{z}{z-2} $ (for $ x[n] = 2^n u[n] $),

𝑋(𝑧) 𝑧 1
𝑌(𝑧) = = ⋅
1 − 0.5𝑧 𝑧 − 2 1 − 0.5𝑧

Multiply numerator and denominator by z:

𝑧
𝑌(𝑧) =
(𝑧 − 2)(𝑧 − 0.5)
Step 2: Partial fraction decomposition and inverse Z Transform
yields:

2 − 0.5
𝑦[𝑛] = ,𝑛 ≥ 0
1.5

4. Discrete Fourier Transform (DFT) and Fast Fourier


Transform (FFT)

Q4: Compute the 4-point DFT of the sequence $


x[n]={1,2,3,4} $. Then explain how FFT reduces the
computational complexity of DFT.

Answer:
DFT formula:

/
𝑋[𝑘] = 𝑥[𝑛]𝑒 , 𝑘 = 0,1,2,3

Calculate:

 $ X = 1+2+3+4 = 10 $

 $ X = 1 + 2(-j) + 3(-1) + 4j = 1-3 + (4-2)j = -2 + 2j $

 $ X = 1+2(-1)+3(1)+4(-1) = 1-2+3-4 = -2 $

 $ X = 1 + 2j + 3(-1) + 4(-j) = 1-3 + (2-4)j = -2 - 2j $

Thus, DFT output: $ {10, -2+2j, -2, -2-2j} $


FFT is a highly efficient algorithm to compute the DFT. While
DFT takes $ N^2 $ operations for N inputs, FFT reduces this to
$ N\log_2 N $ by exploiting symmetry and periodicity, making
analysis of large signals computationally feasible.

5. Introduction to Linear Optimal Filtering

Q5: What is a linear optimal filter? Explain the Wiener filter


design with an application example, such as noise reduction in
audio.

Answer:
A linear optimal filter aims to extract a desired signal from
noisy data by minimizing a cost function (mean square error
between estimated and desired signals).

The Wiener filter is a classic linear estimator:

 It minimizes the mean squared error (MSE) between the


estimated and true signal.

 Assumes signal and noise statistics are known.

 Frequency response $ H(f) = \frac{S_{xx}(f)}{S_{xx}(f) +


S_{nn}(f)} $, where $ S_{xx}(f) $ is signal, $ S_{nn}(f) $ is
noise power spectrum.
Application: In audio noise reduction, if the noise and speech
power are known, the Wiener filter attenuates frequencies
dominated by noise while retaining the speech.
Example: For a recorded voice with background hiss, the
Wiener filter suppresses the hiss, clarifying the speech output.

Each question above reviews a fundamental topic with a


worked example or explanation suitable for a 15-mark, long-
answer format. If you need Word formatting guidance (e.g.,
increasing text size), let me know!

Unit-2 Digital Filters: Five Detailed Questions and Answers


(15 Marks Each)

1. Definition and Anatomy of a Digital Filter

Q1: Define a digital filter and describe its main anatomical


components. Illustrate with an example of a simple first-order
filter.

Answer:
A digital filter is a system that processes a digital input
sequence 𝑥[𝑛] to produce a digital output sequence 𝑦[𝑛] by
performing mathematical operations on past and present input
and output samples. Its main components are:
 Delay elements (z⁻¹): Store previous samples.

 Multipliers: Scale samples by filter coefficients.

 Adders: Sum scaled samples.

Example – First-Order Low-Pass Filter:


Difference equation:

𝑦[𝑛] = (1 − 𝛼) 𝑥[𝑛] + 𝛼 𝑦[𝑛 − 1], 0 < 𝛼 < 1

 Delay: one unit 𝑦[𝑛 − 1].

 Coefficients: (1 − 𝛼) on current input, 𝛼 on past output.

If 𝛼 = 0.8, then

𝑦[𝑛] = 0.2 𝑥[𝑛] + 0.8 𝑦[𝑛 − 1].

This filter smooths rapid changes, passing low-frequency


components and attenuating high frequencies.

2. Frequency-Domain Description of Signals and Systems

Q2: Explain how signals and digital filters are described in the
frequency domain. Derive the frequency response 𝐻(𝑒 ) of
the first-order filter from Q1 and sketch its magnitude
response.

Answer:
 A discrete-time signal 𝑥[𝑛] has the Discrete-Time Fourier
Transform (DTFT):𝑋(𝑒 )=∑ 𝑥[𝑛] 𝑒 .

 A filter’s frequency response 𝐻(𝑒 ) is the DTFT of its


impulse response ℎ[𝑛] or the z-transform evaluated on the
unit circle 𝑧 = 𝑒 .

For 𝑦[𝑛] = (1 − 𝛼) 𝑥[𝑛] + 𝛼 𝑦[𝑛 − 1], the transfer function:

𝑌(𝑧) 1−𝛼
𝐻(𝑧) = = .
𝑋(𝑧) 1 − 𝛼𝑧

On the unit circle 𝑧 = 𝑒 :

1−𝛼
𝐻(𝑒 )= .
1 − 𝛼𝑒

Its magnitude:

1−𝛼
|𝐻(𝑒 )| = .
√1 − 2𝛼cos 𝜔 + 𝛼

Sketch:
– At 𝜔 = 0: |𝐻| = 1.

– As 𝜔 → 𝜋: |𝐻| → ≈ .
| |

With 𝛼 = 0.8, low frequencies pass near unity gain; high


frequencies attenuate toward 0.111.

3. Typical Applications of Digital Filters


Q3: Discuss three typical applications of digital filters in
practice, providing a specific example and the filter type used
in each case.

Answer:

1. Noise Reduction in Audio:


– Filter: Bandstop (notch) filter.
– Example: Remove 60 Hz power-line hum from recorded
speech by placing a sharp notch at 𝜔 = 2𝜋 ⋅ 60/𝑓 .

2. Image Processing – Edge Detection:


– Filter: High-pass FIR filter (e.g., Sobel operator).
– Example: Convolve a grayscale image with the 3×3
Sobel kernel to highlight horizontal or vertical edges.

3. Data Smoothing in Sensor Readings:


– Filter: Moving average (non-recursive) filter.
– Example: Smooth temperature sensor noise by averaging
the last 𝑁 = 5 samples:

1
𝑦[𝑛] = 𝑥[𝑛 − 𝑘].
5

4. Replacing Analog Filters with Digital Filters


Q4: Explain the process of designing a digital filter to replace
an analog prototype. Illustrate with the bilinear transform
method for designing a digital Butterworth low-pass filter with
analog cutoff 1 kHz and sampling rate 8 kHz.

Answer:
Process:

1. Analog Prototype: Start with analog Butterworth with


cutoff Ω = 2𝜋 ⋅ 1000.

2. Pre-warping: Digital cutoff 𝜔 = 2𝜋 ⋅ 1000/8000 = 0.25𝜋.


Compute pre-warped analog cutoff:Ω = tan (𝜔 /2) =
tan (0.125𝜋) ≈ 0.4142.

3. Analog Prototype Design: Determine Butterworth poles


for desired order (e.g., 3rd order).

4. Bilinear Transform: Map 𝑠 = to convert analog

𝐻 (𝑠) into digital 𝐻(𝑧).

Example (2nd Order):

 Normalized analog transfer: 𝐻 (𝑠) = .


 Substitute 𝑠 via bilinear transform (𝑇 = 1/8000).


 Result: a stable IIR filter with coefficients computed from
that substitution, realizing the desired 1 kHz cutoff in
digital domain.

5. Filter Categories: Recursive vs. Non-Recursive

Q5: Compare recursive (IIR) and non-recursive (FIR) digital


filters in terms of stability, linear phase, and computational
complexity. Provide an example design scenario for each.

Answer:
A recursive filter (IIR) has feedback:

𝑦[𝑛] = 𝑏 𝑥[𝑛 − 𝑘] − 𝑎 𝑦[𝑛 − 𝑚].

 Stability: May be unstable if poles lie outside unit circle;


careful pole placement required.

 Phase: Generally nonlinear phase.

 Complexity: Achieves sharp response with low order;


fewer coefficients.

Example: Design a 4th-order IIR Chebyshev low-pass filter


with cutoff 2 kHz at 𝑓 = 16 kHz—requires only 5 multipliers.

A non-recursive filter (FIR) has no feedback:


𝑦[𝑛] = ℎ[𝑘] 𝑥[𝑛 − 𝑘].

 Stability: Always stable (finite impulse response).

 Phase: Can be designed for exact linear phase by


symmetric coefficients.

 Complexity: Sharp transitions require high order (large 𝐿),


increasing computation.

Example: Design a 50-tap FIR bandpass filter from 1–2 kHz at


𝑓 = 10 kHz using the window method to ensure linear phase
for audio equalization.

These five questions and their in-depth answers with concrete


examples cover the key topics of Unit-2 on digital filters,
suitable for 15-mark essay responses.

Unit-3 Digital Filter Structures: Five Detailed Questions and


Answers (15 Marks Each)

1. Direct Form I and II Structures

Q1: Explain the architectures of Direct Form I and Direct Form


II for realizing IIR filters. Compare their memory requirements
and numerical properties with a worked example of a 3-tap IIR
filter.

Answer:
A Direct Form I structure implements an IIR filter by cascading
an FIR section (feedforward) and an IIR section (feedback). Its
difference equation

𝑦[𝑛] = 𝑏 𝑥[𝑛] + 𝑏 𝑥[𝑛 − 1] + 𝑏 𝑥[𝑛 − 2] − 𝑎 𝑦[𝑛 − 1] − 𝑎 𝑦[𝑛 − 2]

is realized with two separate chains of delays: one for past


inputs 𝑥[𝑛 − 𝑘] and one for past outputs 𝑦[𝑛 − 𝑘].

A Direct Form II structure merges these delay lines into a


single chain, halving the number of required storage elements.
The same filter is implemented via an intermediate state 𝑤[𝑛]:

𝑤[𝑛] = 𝑥[𝑛] − 𝑎 𝑤[𝑛 − 1] − 𝑎 𝑤[𝑛 − 2], 𝑦[𝑛]


= 𝑏 𝑤[𝑛] + 𝑏 𝑤[𝑛 − 1] + 𝑏 𝑤[𝑛 − 2].

Memory Requirements:

 Direct I: 2 delays for input + 2 delays for output = 4 delay


units.

 Direct II: single chain of 2 delays = 2 delay units.

Numerical Properties:
Direct II is more efficient in memory but can suffer from round-
off noise and coefficient quantization because feedforward
and feedback operations share the same states. Direct I
isolates them, reducing sensitivity.

Worked Example:
Design a 2nd-order low-pass IIR with coefficients 𝑏 = 0.2,
𝑏 = 0.1, 𝑏 = 0.1, 𝑎 = −0.5, 𝑎 = 0.25.

 Direct I uses four unit delays: two for 𝑥[𝑛 − 1], 𝑥[𝑛 − 2] and
two for 𝑦[𝑛 − 1], 𝑦[𝑛 − 2].

 Direct II uses two delays storing 𝑤[𝑛 − 1], 𝑤[𝑛 − 2].

2. Cascade Combination of Second-Order Sections

Q2: Describe the cascade form of an IIR filter using second-


order sections. Illustrate how cascading improves numerical
stability with an example that factors a 4th-order filter into
two biquads.

Answer:
In cascade form, a high-order IIR filter is factored into a series
of second-order sections (biquads), each with transfer
function

𝑏 +𝑏 𝑧 +𝑏 𝑧
𝐻 (𝑧) = .
1+𝑎 𝑧 +𝑎 𝑧
The overall response is 𝐻(𝑧) = ∏ 𝐻 (𝑧).

Advantages:

 Limits the effect of coefficient quantization within each


biquad.

 Poles and zeros are grouped, ensuring poles close to the


unit circle remain stable.

 Each section can be implemented in Direct II form with


better dynamic range.

Example:
A 4th-order low-pass analog prototype yields digital poles at
𝑝 , = 0.8𝑒 ± .
and 𝑝 , = 0.7𝑒 ± .
. Factor into two biquads:

1 + 1.2𝑧 + 0.64 𝑧
𝐻 (𝑧) = , 𝐻 (𝑧)
1 − 1.6cos (0.4𝜋) 𝑧 + 0.64 𝑧
1 + 1.4𝑧 + 0.49 𝑧
= .
1 − 1.4cos (0.2𝜋) 𝑧 + 0.49 𝑧

Cascading these two ensures each section’s poles lie safely


within the unit circle, preserving stability and reducing
quantization error.

3. Parallel Combination of Second-Order Sections


Q3: Explain the parallel realization of an IIR filter using second-
order sections. Provide an example that decomposes a 4th-
order filter into two parallel biquads and the corresponding
partial-fraction expansion.

Answer:
In a parallel form, the filter’s overall transfer function 𝐻(𝑧) is
expressed as a sum of second-order sections plus direct
feedthrough:

𝑏 +𝑏 𝑧 +𝑏 𝑧
𝐻(𝑧) = 𝐶 + .
1+𝑎 𝑧 +𝑎 𝑧

This arises from partial-fraction expansion of 𝐻(𝑧).

Benefits:

 Isolates each pole pair in its own path, simplifying


sensitivity analysis.

 Facilitates implementation when poles are widely


separated in radius.

Example:
A 4th-order transfer

𝑁(𝑧) 𝑧 + 0.5𝑧 + 0.2𝑧 + 0.1𝑧 + 0.05


𝐻(𝑧) = = .
𝐷(𝑧) (1 − 0.8𝑧 + 0.64𝑧 )(1 − 0.6𝑧 + 0.36𝑧 )
Partial-fraction yields

𝛼 𝛼 𝑧
𝐻(𝑧) = + ,
1 − 0.8𝑧 + 0.64𝑧 1 − 0.6𝑧 + 0.36𝑧

with computed residues 𝛼 = 0.3, 𝛼 = 0.7. Each path is a


biquad implemented separately, summed at the output.

4. Linear-Phase FIR Filter Structures

Q4: Discuss structures available for implementing linear-


phase FIR filters. Design a symmetric 6-tap FIR low-pass filter
using the window method and explain how symmetry enforces
linear phase.

Answer:
FIR filters of even or odd length can achieve exact linear
phase if their impulse response ℎ[𝑛] is symmetric (ℎ[𝑛] = ℎ[𝐿 −
𝑛]) or antisymmetric. Four classic structures:

1. Direct form with symmetric coefficients reduces


multipliers by about half.

2. Frequency-sampling form (covered next).

3. Linear phase lattice structure, offering numerical


robustness.

4. Transposed form of the above.


Window-Method Design Example (6-tap):
Desired cutoff at 0.4π:

( . ( . ))
1. Ideal impulse:ℎ [𝑛] = , 𝑛 = 0, … ,5.
( . )

2. Apply Hamming window 𝑤[𝑛] for 𝑛 = 0 … 5.

3. Compute ℎ[𝑛] = ℎ [𝑛] ⋅ 𝑤[𝑛].

Resulting coefficients satisfy ℎ = ℎ, ℎ = ℎ, ℎ = ℎ. This


symmetry ensures the phase

𝐿
∠𝐻(𝑒 ) = −𝜔
2

is a linear function of 𝜔, guaranteeing no phase distortion of


frequency components.

5. Frequency-Sampling Structure for FIR Filters

Q5: Describe the frequency-sampling structure for FIR


filters. Design and illustrate a 7-point frequency-sampling
implementation given desired frequency samples 𝐻[𝑘] at 𝑘 =
0, … ,6.

Answer:
In the frequency-sampling structure, the FIR filter’s length-𝑁
impulse response is synthesized by specifying frequency
response samples 𝐻[𝑘] at equally spaced frequencies 𝜔 =
2𝜋𝑘/𝑁. The impulse response is obtained by IDFT:

1 /
ℎ[𝑛] = 𝐻[𝑘] 𝑒 .
𝑁

Implementation uses an 𝑁-point DFT/IDFT network realized


with adders, multipliers, and delays.

Example (7-point):
Let desired magnitude at bins 𝑘 = {0,1,2,3} be {1,0.8,0.3,0} and
symmetric for 𝑘 > 3. Thus

𝐻 = {1,0.8,0.3,0,0.3,0.8,1}.

Compute

1 /
ℎ[𝑛] = 𝐻[𝑘] 𝑒 , 𝑛 = 0, … ,6.
7

The resulting ℎ[𝑛] are real and symmetric due to 𝐻[𝑘]’s


conjugate symmetry. The structure directly implements these
via 7 taps and a cyclic IDFT network, providing a flexible way
to approximate arbitrary frequency responses.

These five questions and comprehensive answers—with


concrete design steps and examples—address all key aspects
of Unit 3 digital filter structures at a depth appropriate for 15-
mark examinations.

Unit 4: Effect of Word Length—Five Detailed Questions and


Answers (15 Marks Each)

1. Round-Off Error in Digital Filters

Q1: Define round-off error in the context of fixed-point digital


filters. Explain how it arises in arithmetic operations, and
analyze its effect on a simple first-order IIR filter with
coefficient quantized to 4 bits.

Answer:
Definition: Round-off error is the difference between the
exact infinite-precision result and the finite-precision result
obtained after rounding to the nearest representable word-
length.

Origin: In fixed-point arithmetic, every multiplication or


addition produces a result that must be represented in a
limited number of bits. If the true result lies between two
quantization levels, it is rounded to the nearest level,
introducing round-off error.
Example Filter:
Difference equation:

𝑦[𝑛] = 0.75 𝑦[𝑛 − 1] + 𝑥[𝑛].

With coefficients stored in signed 4-bit Q3 format (1 integer


bit, 3 fraction bits), 0.75 is represented exactly as 0.110₂. But
an operation such as 0.75 × 𝑦[𝑛 − 1] might produce a product
like 0.5625, which is 0.1001₂—rounded to 0.101₂ (0.625) in Q3,
causing an error of +0.0625.

Effect Analysis:
This error accumulates each sample. After 𝑁 iterations, the
output deviation can grow, distorting the filter’s frequency
response—particularly near resonant poles—resulting in gain
error and potential stability degradation.

2. Truncation Error and Its Impact

Q2: What is truncation error? Compare truncation with


rounding. For a 6-tap FIR filter implemented in 8-bit arithmetic,
illustrate how truncation of partial sums alters the impulse
response.

Answer:
Definition: Truncation error occurs when a value is simply cut
off (“chopped”) to fit within available bits, discarding least
significant bits without rounding.

Comparison:

 Rounding chooses the nearest representable value;


truncation always rounds towards zero, introducing a bias.

 Magnitude: Truncation error can be up to one LSB, same


as rounding, but its bias accumulates in one direction.

Example FIR Filter:


Impulse response ℎ[𝑘] = {0.1,0.15,0.5,0.15,0.1}. In 8-bit Q1.7
format, each coefficient multiplied by 128 yields {13, 19, 64,
19, 13}.

During convolution, a partial sum like 0.1 𝑥[𝑛] + 0.15 𝑥[𝑛 − 1] =


0.25 should be 32 in Q1.7. But if the exact sum is 31.5
(0.2461…), truncation yields 31 (0.2422…), introducing –
0.0039 error. Over successive outputs, these negative biases
reduce passband gain and distort the designed frequency
response.

3. Quantization Error in Coefficients and Signals

Q3: Explain quantization error in both filter coefficients and


input signals. For a second-order IIR notch filter implemented
in 12-bit arithmetic, demonstrate how coefficient quantization
shifts the notch frequency.

Answer:
Definition: Quantization error is the discrepancy between an
exact real-valued parameter (coefficient or signal sample) and
its nearest finite-precision representation.

Filter Example:
Ideal analog notch at 𝜔 = 0.4𝜋 with normalized digital
transfer:

1 − 2cos 𝜔 𝑧 + 𝑧
𝐻(𝑧) = , 𝑟 = 0.95.
1 − 2𝑟cos 𝜔 𝑧 + 𝑟 𝑧

Exact coefficient 𝑎 = −2𝑟cos 𝜔 = −1.802. In 12-bit Q1.11


format (2048 steps), −1.802 × 2048 ≈ −3690.5, rounded to –
3691 (–1.8027).

Effect on Notch Frequency:


The realized pole angle 𝜔 = cos ( ) becomes

1.8027
𝜔 = cos ( ) ≈ 0.398𝜋,
1.9
shifted from 0.400𝜋 by 0.002𝜋 rad/sample. In audio (fs=8 kHz),
this shift equals (0.002 π)/(2π)×4000 Hz ≈ 4 Hz—potentially
audible in precision-critical systems.

4. Limit Cycle Oscillations in IIR Filters

Q4: Describe limit-cycle oscillations in fixed-point IIR filters.


Using a Direct Form II implementation of a resonator 𝑦[𝑛] =
1.9 𝑦[𝑛 − 1] − 0.9 𝑦[𝑛 − 2] + 𝑥[𝑛] in Q2.14 format, explain how a
nonzero output arises with zero input.

Answer:
Definition: Limit-cycles are self-sustained oscillations that
occur in fixed-point IIR filters due to round-off or coefficient
quantization, even when the input is zero.

Mechanism: In Direct Form II, the two delay states 𝑤[𝑛 − 1]


and 𝑤[𝑛 − 2] feed back through quantized multipliers. Finite
precision introduces small nonzero residuals in these states,
which the feedback amplifies, leading to persistent
oscillations.

Example Resonator:
Difference:

𝑤[𝑛] = 𝑥[𝑛] + 1.9 𝑤[𝑛 − 1] − 0.9 𝑤[𝑛 − 2], 𝑦[𝑛] = 𝑤[𝑛].


In Q2.14 (16 bits, 2 integer,14 fraction), 1.91.9000 1.9000₂
(exact), –0.9≈–0.9000₂ (exact). But multiplications produce
results requiring rounding to 14 bits. With x[n]=0, any residual
𝑤 ≠ 0 (e.g., due to initial condition or quantization) evolves as

𝑤[𝑛] ≈ 1.9 𝑤[𝑛 − 1] − 0.9 𝑤[𝑛 − 2],

which for certain initial states yields a periodic nonzero


sequence. This limit-cycle persists indefinitely, corrupting the
filter’s silence response.

5. Mitigation Techniques for Word-Length Effects

Q5: Discuss methods to mitigate round-off, truncation, and


quantization errors in digital filters. Provide examples such as
dithering, scaling, and robust filter structures.

Answer:
1. Dithering: Add small, broadband noise to the signal before
quantization, decorrelating quantization error from the signal.
Example: In audio ADCs, inject low-level white noise so that
quantization becomes random, audibly more benign.

2. Scaling and Block Floating-Point: Dynamically adjust the


block exponent or scale factors to fully utilize available bits,
minimizing quantization noise.
Example: In DSP processors, after each filter stage, scale
down large intermediate results to prevent overflow while
maintaining maximum precision.

3. Filter Structure Choice:

 Use cascade or parallel second-order sections to localize


quantization effects.

 Prefer lattice or orthogonal structures for IIR filters to


reduce sensitivity to coefficient quantization.
Example: A 6th-order IIR is implemented as three biquads
in cascade, each realized in Direct Form II Transposed
lattice form, dramatically reducing limit-cycle oscillations
and coefficient-quantization sensitivity.

4. Coefficient Quantization Optimization: Use minimax or


frequency-warped quantization methods to allocate more bits
where filter response is most critical.
Example: In a speech coder’s bandwidth-expansion filter,
allocate extra fractional bits around formant frequencies to
preserve spectral shaping.

These five questions and detailed answers, complete with


numerical examples, address the key aspects of Unit 4 on the
effects of word length, suitable for 15-mark examination
responses.

UNIT-5

1. Design of Digital Filters: FIR and IIR

Q1: Describe the steps involved in designing a digital FIR filter


using the windowing method. Provide a complete example to
design a low-pass filter.

Answer:
Steps in FIR Filter Design using Windowing:

1. Specify filter requirements: Define desired cutoff


frequency, passband, stopband, and attenuation
requirements.

2. Obtain ideal impulse response: For a low-pass filter, the


ideal impulse response $ h_d[n] $ is given by the sinc
function.

3. Select a window function: Common window types include


Hamming, Hanning, and Blackman. The window tapers the
ideal response, controlling sidelobes and transition width.

4. Multiply ideal response by window: Actual $ h[n] = h_d[n]


\times w[n] $.
5. Implement the filter with calculated coefficients.

Example:
Design a 21-tap (N=21), normalized cutoff frequency $
\omega_c = 0.3\pi $ low-pass FIR using the Hamming window.

 $ h_d[n] = \frac{\sin[0.3\pi(n-10)]}{\pi(n-10)} $, $ n =
0,1,...,20 $.

 Hamming window: $ w[n] = 0.54 - 0.46\cos\left(2\pi n/(N-


1)\right) $.

 Multiply element-wise to get the final coefficients.

Application: This FIR filter can remove high-frequency noise


from an ECG signal due to its linear phase property, ensuring
no phase distortion[1][2].

2. Introduction to DSP Hardware

Q2: Explain the architecture and components of a typical DSP


(Digital Signal Processor) hardware system. Why is DSP
hardware preferred for real-time digital filtering?

Answer:
Architecture and Components:
 DSP Processor: Specialized microprocessor optimized for
arithmetic operations (multiply-accumulate, add, shift) at
high speed.

 Memory: Separate program and data memories in Harvard


Architecture enable simultaneous access and faster
computation.

 Peripherals:

o ADC (Analog-to-Digital Converter): Converts analog


signals to digital for processing.

o DAC (Digital-to-Analog Converter): Reconstructs


analog signals from processed digital data.

o Timers, GPIO, and communication interfaces (SPI,


UART).

Key Features:

 Hardware accelerators for FFT, FIR, and matrix


calculations.

 Low power consumption and real-time deterministic


response.

 Parallelism and pipelining for boosting instruction


throughput.
Example:
In digital hearing aids, a DSP chip takes in microphone input
via the ADC, performs frequency shaping and noise reduction
using real-time digital filtering, and outputs the processed
sound through the DAC with minimal delay.

Why Preferred:
Dedicated DSP hardware rapidly performs the necessary
calculation-heavy tasks (e.g., filtering, transforms) required for
real-time processing, outperforming general-purpose
processors in speed, efficiency, and power use[3][4][5][6].

3. Application of DSP in Control Systems

Q3: Illustrate how DSP is used in a feedback control system.


Present an example of digital filtering for sensor data
smoothing in a motor control application.

Answer:
DSP in Control Systems:

 Role: DSP is used in sensor data processing, control


algorithm implementation, and actuator signal generation.

 Example Application:
o In electric motor speed control, shaft position sensors
(e.g., encoders) provide noisy measurements.

o A DSP filters this data in real-time using a digital low-


pass filter to estimate the true speed.

o The processed speed is then used in a digital PID


controller implemented in the DSP to compute actuator
commands.

Detailed Example:
Suppose a motor has an encoder whose output is
contaminated with high-frequency noise.

 Implement a 5-tap moving average FIR filter in the

DSP:𝑦[𝑛] = ∑ 𝑥[𝑛 − 𝑘]

 The filtered output 𝑦[𝑛] is used in a PID control algorithm to


regulate the motor speed with better stability and reduced
noise-induced oscillations.

Benefits:
Smoother sensor data leads to more precise control, improved
stability, and less actuator wear due to noisy corrections.
DSPs also enable advanced control algorithms, such as state
estimators and adaptive control, that would be difficult or
impossible with analog hardware[7][8][9][10].
4. Application of DSP in Instrumentation

Q4: Discuss the role of DSP in scientific and medical


instrumentation. Present a detailed example involving DSP-
based filtering in ECG signal analysis.

Answer:
Role of DSP in Instrumentation:

 Processes signals from sensors for improved accuracy,


resolution, and data extraction.

 Implements tasks such as filtering, feature extraction,


event detection, and data compression.

Example: ECG Signal Processing:

 Problem: ECG signals are often contaminated by baseline


wander, muscle activity, and powerline interference.

 Solution:

o DSP is used to implement a digital bandpass filter (e.g.,


0.5–40Hz) that removes both slow drift and high-
frequency noise.

o Further DSP-based algorithms detect QRS complexes


and compute heart rate.
Digital Filter Example:
A 2nd-order IIR bandpass filter is designed with passband 0.5–
40Hz (assuming a 250Hz sampling rate). The DSP implements
the difference equations in real time as data arrives from the
A/D converter connected to the ECG electrodes.

Benefit:

 Enables precise real-time analysis and monitoring,

 Filtering and event detection algorithms can be updated


via software without hardware changes,

 Real-time alarm systems for arrhythmias and other


conditions[11][12][13].

5. Comparison and Choice: FIR vs IIR Digital Filters

Q5: Compare FIR and IIR digital filter design methods. Discuss
their relative advantages, disadvantages, and select
appropriate applications for each with examples.

Answer:

Aspect FIR Filters IIR Filters


Design Windowing, Analog-to-digital
Equiripple, transformation (bilinear,
Least-squares, impulse invariant), using
Frequency- Butterworth, Chebyshev,
sampling Elliptic prototypes

Phase Can achieve Generally nonlinear phase


exact linear
phase

Stability Always stable Not always stable


(no feedback) (feedback may lead to
instability)

Order Typically higher Lower order for same


order for same specs
specs

Computation More multipliers, Computationally efficient


costlier in
hardware

Example Audio equalizer Low-order digital notch


with linear- filter for removing
phase response powerline hum
Applications:

 FIR: When linear phase is critical (e.g., in data


communications or image filtering).

 IIR: When computational resources are limited and phase is


less important (e.g., in real-time audio filtering or vibration
analysis).

Example 1:

 FIR using Hamming window reduces spectral leakage in


audio equalization.
Example 2:

 IIR Butterworth low-pass filter used for smoothing output


from a temperature sensor in control systems for rapid
response and low memory use.

You might also like