UNIT 3: Digital Signal Processing
1.0 DISCRETE-TIME SYSTEMS ANALYSIS
1.1 Definitions & Classifications
| Property | Definition | Mathematical Condition / Example |
|---|---|---|
| Linear | Satisfies superposition (additivity & homogeneity). | T{a x₁[n] + b x₂[n]} = a y₁[n] + b y₂[n] |
| Time-Invariant | System behavior does not change with time shift. | If y[n] = T{x[n]}, then y[n-n₀] = T{x[n-n₀]} |
| Causal | Output depends only on present & past inputs. | y[n] depends only on x[k] for k ≤ n |
| BIBO Stable | Bounded input yields bounded output. | |x[n]| ≤ Mₓ < ∞ ⇒ |y[n]| ≤ Mᵧ < ∞ |
| Memoryless | Output depends only on current input. | y[n] = f(x[n]) |
| Invertible | Unique input for every output exists. | x₁[n] ≠ x₂[n] ⇒ y₁[n] ≠ y₂[n] |
[!TIP] Exam Focus: Be prepared to classify a given system equation (e.g.,
y[n] = n·x[n]is time-varying,y[n] = x²[n]is non-linear).
1.2 Linear Time-Invariant (LTI) Systems
- Convolution Sum: The fundamental operation for LTI systems.
$$y[n] = x[n] * h[n] = \sum_{k=-\infty}^{\infty} x[k]\, h[n-k]$$
where `h[n]` is the **impulse response** (output when `x[n] = δ[n]`). Completely characterizes an LTI system.
- Linear Constant-Coefficient Difference Equation (LCCDE):
$$\sum_{k=0}^{N} a_k\, y[n-k] = \sum_{k=0}^{M} b_k\, x[n-k]$$
* **Solution:** `y[n] = y_zs[n] + y_zi[n]`
* **Zero-State Response (y_zs):** Response due to input *only*, with **zero initial conditions**. Found via convolution: `y_zs[n] = x[n] * h[n]`.
* **Zero-Input Response (y_zi):** Response due to **initial conditions only**, with input `x[n]=0`. Found by solving homogeneous equation.
1.3 System Properties from Difference Equations
-
Causality: If the equation can be written as
y[n] = f(y[n-1], y[n-2], ..., x[n], x[n-1], ...), the system is causal. -
Stability: For rational
H(z), the system is BIBO stable iff the ROC of H(z) includes the unit circle (|z|=1). For causal LTI systems, this is equivalent to all poles lying strictly inside the unit circle.
[!TIP] Common Pitfall: An unstable system can have a rational
H(z)but an ROC that does not include the unit circle (e.g., ROC|z|>0.9for a pole atz=0.95is stable; ROC|z|<0.9for same pole is unstable).
2.0 SYSTEM REPRESENTATIONS & STRUCTURES
2.1 Block Diagram Representations
| Structure | Description | Key Feature |
|---|---|---|
| Direct Form I | Direct implementation of the difference equation using delays for x[n] and y[n] branches. |
2N delays (N for input, N for output path). |
| Direct Form II (Canonical) | Combines the two delay chains of Direct Form I into a single chain. | N delays (minimum possible). More efficient in memory. |
Example (2nd-order): y[n] - a₁y[n-1] - a₂y[n-2] = b₀x[n] + b₁x[n-1] + b₂x[n-2]
-
DF I: Two separate delay lines (one for
x, one fory). -
DF II: One shared delay line.
x[n]path feeds into the first adder, output feeds back.
[!TIP] Exam Question: "Draw Direct Form I & II for a given 3rd-order equation." Always count delays to highlight the difference.
2.2 Signal Flow Graphs (SFG)
-
Nodes: Represent signals (variables).
-
Branches: Represent system functions (multipliers) connecting nodes.
-
Mason's Gain Formula:
T = (Σ P_k Δ_k) / Δ-
P_k: Gain of k-th forward path. -
Δ: 1 - (sum of all loop gains) + (sum of gains of all non-touching loop pairs) - ... -
Δ_k: Δ with loops touching the k-th forward path removed.
-
-
State-Space to SFG: Convert state equations
x[n+1]=Ax[n]+Bu[n],y[n]=Cx[n]+Du[n]into a graph with nodes for each statex_i[n], inputu[n], outputy[n], and branches forA, B, C, Dmatrices.
2.3 State-Space Representation
$$\mathbf{x}[n+1] = \mathbf{A}\,\mathbf{x}[n] + \mathbf{B}\,u[n]$$
$$y[n] = \mathbf{C}\,\mathbf{x}[n] + D\,u[n]$$
-
x[n]: State vector (internal variables). -
A, B, C, D: System, input, output, feedthrough matrices. -
Relationship to H(z):
H(z) = C (zI - A)⁻¹ B + D. The poles ofH(z)are the eigenvalues of matrixA.
3.0 Z-TRANSFORM ANALYSIS
3.1 Definition & Rationale
-
Bilateral Z-Transform:
X(z) = Σ_{n=-∞}^{∞} x[n] z^{-n}. ROC is an annular region in z-plane. -
Unilateral Z-Transform:
X(z) = Σ_{n=0}^{∞} x[n] z^{-n}. Used for solving difference equations with initial conditions. ROC is always|z| > r(exterior). -
Relationship to DTFT: DTFT
X(e^{jω})is the z-transform evaluated on the unit circle (z = e^{jω}), provided the ROC includes|z|=1.
3.2 Properties (Key for Proofs)
| Property | Time Domain | Z-Domain | ROC |
|---|---|---|---|
| Linearity | a x₁[n] + b x₂[n] |
a X₁(z) + b X₂(z) |
At least ROC₁ ∩ ROC₂ |
| Time Shifting | x[n-n₀] |
z^{-n₀} X(z) |
Same as X(z) |
| Scaling (Frequency) | aⁿ x[n] |
X(z/a) |
|a|·ROC |
| Convolution | x₁[n] * x₂[n] |
X₁(z) X₂(z) |
At least ROC₁ ∩ ROC₂ |
| Differentiation | n x[n] |
-z (dX(z)/dz) |
Same as X(z) |
| Initial Value | x[0] |
lim_{z→∞} X(z) |
ROC: ` |
| Final Value | lim_{n→∞} x[n] |
lim_{z→1} (z-1)X(z) |
ROC includes ` |
[!TIP] Proof Strategy: For convolution, start from definition:
Y(z) = Σ (x₁ * x₂)[n] z^{-n} = Σ Σ x₁[k]x₂[n-k] z^{-n}. Change variablesm=n-kand separate sums.
3.3 Region of Convergence (ROC)
-
Importance: Determines uniqueness (same
X(z)can have differentx[n]with different ROC), stability (ROC must include unit circle), and causality (for rationalX(z), causal ⇔ ROC is exterior of outermost pole). -
For Rational
X(z):X(z) = (polynomial in z⁻¹) / (polynomial in z⁻¹).-
ROC boundaries are circles determined by pole locations.
-
Right-sided sequence (causal): ROC is
|z| > max{|p_i|}(exterior of outermost pole). -
Left-sided sequence (anti-causal): ROC is
|z| < min{|p_i|}(interior of innermost pole). -
Two-sided: ROC is an annulus
min{|p_i|} < |z| < max{|p_i|}.
-
3.4 Inverse Z-Transform
-
Partial Fraction Expansion (PFE): For rational
X(z).-
Expand
X(z)/zinto sum of termsA_i / (1 - p_i z⁻¹). -
Inverse is
x[n] = Σ A_i (p_i)ⁿ u[n](for causal ROC).
-
-
Power Series Expansion: Long division of
X(z)to get coefficients ofz⁻ⁿ. Directly givesx[n]. -
Contour Integration (Residue Method):
x[n] = (1/(2πj)) ∮ X(z) z^{n-1} dz. Not typically computed by hand.
3.5 Applications & Pole-Zero Analysis
-
System Function:
H(z) = Y(z)/X(z)for LTI system with zero initial conditions. -
Pole-Zero Plot: Plot poles (
×) and zeros (○) on z-plane.-
Stability: For causal LTI, all poles must be inside unit circle.
-
Causality: For rational
H(z), ROC is exterior of outermost pole. -
Frequency Response:
H(e^{jω})isH(z)evaluated on unit circle. Zeros on unit circle cause nulls (frequencies with zero gain). -
Impulse Response Nature:
-
Real pole
pinside unit circle (|p|<1): Exponential decaypⁿ u[n]. -
Complex pole pair
re^{±jθ}inside unit circle (r<1): Damped sinusoidrⁿ cos(θn+φ) u[n]. -
Pole on unit circle (
|p|=1): Sustained oscillation. -
Pole outside unit circle (
|p|>1): Exponential growth ⇒ unstable.
-
-
[!TIP] Critical Rule: For a causal and stable LTI system, the ROC of
H(z)is always|z| > max{|p_i|}(exterior of outermost pole), andmax{|p_i|} < 1.
4.0 DISCRETE FOURIER SERIES (DFS) & DISCRETE FOURIER TRANSFORM (DFT)
4.1 Discrete Fourier Series (DFS)
For a periodic sequence x[n] with period N: x[n] = x[n+N].
- DFS Coefficients (Analysis):
$$C[k] = \frac{1}{N} \sum_{n=0}^{N-1} x[n]\, e^{-j(2π/N)kn}, \quad k=0,1,...,N-1$$
- Synthesis:
$$x[n] = \sum_{k=0}^{N-1} C[k]\, e^{j(2π/N)kn}$$
Key Properties (Proof Required):
-
Linearity:
a x₁[n] + b x₂[n]↔a C₁[k] + b C₂[k]. -
Time Shifting (Circular Shift):
x[(n-n₀) mod N]↔C[k] e^{-j(2π/N)kn₀}. -
Frequency Shifting (Modulation):
x[n] e^{j(2π/N)m₀ n}↔C[(k-m₀) mod N]. -
Time Reversal:
x[(-n) mod N]↔C[(-k) mod N]. -
Convolution: Periodic convolution
x₁[n] ⊛ x₂[n]↔N·C₁[k] C₂[k]. -
Parseval's Theorem:
Σ_{n=0}^{N-1} |x[n]|² = N Σ_{k=0}^{N-1} |C[k]|².
4.2 Discrete Fourier Transform (DFT)
For a finite-length sequence x[n], 0 ≤ n ≤ N-1.
- DFT (Analysis):
$$X[k] = \sum_{n=0}^{N-1} x[n]\, e^{-j(2π/N)kn}, \quad k=0,1,...,N-1$$
- Inverse DFT (IDFT):
$$x[n] = \frac{1}{N} \sum_{k=0}^{N-1} X[k]\, e^{j(2π/N)kn}$$
Relationship to DFS: The DFT X[k] is exactly N·C[k] from the DFS of the periodic extension x̃[n] = Σ_{m=-∞}^{∞} x[n-mN].
Key Properties (Proof Required):
-
Linearity: Same as DFS.
-
Circular Time Shifting:
x[(n-n₀) mod N]↔X[k] e^{-j(2π/N)kn₀}. -
Circular Frequency Shifting:
x[n] e^{j(2π/N)m₀ n}↔X[(k-m₀) mod N]. -
Time Reversal:
x[(-n) mod N]↔X[(-k) mod N]. -
Circular Convolution:
x₁[n] ⊛ x₂[n]↔X₁[k] X₂[k]. -
Linear Convolution via DFT:
x₁[n] * x₂[n](lengthL₁+L₂-1) can be obtained by zero-padding both to lengthN ≥ L₁+L₂-1, computing DFTs, multiplying pointwise, then IDFT. -
Symmetry (for real
x[n]):-
X[N-k] = X*[k](Conjugate symmetry). -
Re{X[k]}is even,Im{X[k]}is odd. -
|X[k]|is even,∠X[k]is odd.
-
4.3 Circular Convolution
-
Definition:
(x₁ ⊛ x₂)[n] = Σ_{m=0}^{N-1} x₁[m] x₂[(n-m) mod N]. -
Computation Methods:
-
Concentric Circles (Graphical): Plot sequences on two circles. Rotate one relative to the other, multiply overlapping values, sum for each
n. -
Matrix (Toeplitz): Construct a circulant matrix from
x₂[n]and multiply by vectorx₁[n].
-
-
Key Point: Circular convolution is periodic with period
N. To compute linear convolution of length-Lsequences, zero-pad toN ≥ L₁+L₂-1.
[!TIP] Exam Trap: "Compute circular convolution of two length-4 sequences." Always use
N=4(no zero-padding). If question asks for "linear convolution using DFT," you must first zero-pad to length≥ 4+4-1 = 7.
5.0 FAST FOURIER TRANSFORM (FFT) ALGORITHMS
5.1 Need for FFT
-
Direct DFT Complexity:
Noutputs, each requiringNmultiplications & additions ⇒ O(N²) operations. -
FFT Goal: Exploit symmetry (
W_N^{k+N/2} = -W_N^k) and periodicity (W_N^{k+N} = W_N^k) of twiddle factorsW_N = e^{-j2π/N}to reduce to O(N log₂ N).
5.2 Decimation-in-Time (DIT) FFT
- Principle: Decompose input
x[n]into even-indexed and odd-indexed samples.
$$X[k] = \sum_{n=even} x[n] W_N^{kn} + \sum_{n=odd} x[n] W_N^{kn}$$
Let `n=2m` for even, `n=2m+1` for odd:
$$X[k] = \sum_{m=0}^{N/2-1} x[2m] W_N^{k(2m)} + \sum_{m=0}^{N/2-1} x[2m+1] W_N^{k(2m+1)}$$
$$= \sum_{m=0}^{N/2-1} x[2m] (W_N^2)^{km} + W_N^k \sum_{m=0}^{N/2-1} x[2m+1] (W_N^2)^{km}$$
$$= E[k] + W_N^k O[k]$$
where `E[k]` and `O[k]` are `N/2`-point DFTs of even/odd sequences.
-
Butterfly Computation: For
k=0,1,...,N/2-1:-
X[k] = E[k] + W_N^k O[k] -
X[k+N/2] = E[k] - W_N^k O[k](sinceW_N^{k+N/2} = -W_N^k).
-
-
Bit-Reversal Permutation: Input sequence
x[n]must be reordered in bit-reversed order before the first butterfly stage (for radix-2). -
Complexity:
(N/2)·log₂Ncomplex multiplications,N·log₂Ncomplex additions.
5.3 Decimation-in-Frequency (DIF) FFT
- Principle: Decompose output
X[k]into even-frequency bins (k even) and odd-frequency bins (k odd).
$$X[k] = \sum_{n=0}^{N-1} x[n] W_N^{kn}$$
Split sum based on `k`:
* For `k` even (`k=2m`): `X[2m] = Σ_{n=0}^{N-1} x[n] W_N^{2mn} = Σ_{n=0}^{N-1} x[n] (W_N^2)^{mn}` → `N/2`-point DFT of `x[n]`.
* For `k` odd (`k=2m+1`): `X[2m+1] = Σ_{n=0}^{N-1} x[n] W_N^{n(2m+1)} = Σ_{n=0}^{N-1} (x[n] W_N^n) (W_N^2)^{mn}` → `N/2`-point DFT of `x[n]·W_N^n`.
-
Butterfly Computation: For
n=0,1,...,N/2-1:-
X[k](even) andX[k+N/2](odd) computed from twoN/2-point DFTs. -
No bit-reversal at input. May require bit-reversal at output.
-
-
Comparison to DIT:
-
DIT: Decomposes input, bit-reversal at input, twiddle factors applied after smaller DFTs.
-
DIF: Decomposes output, no bit-reversal at input, twiddle factors applied before smaller DFTs.
-
5.4 Cooley-Tukey Algorithm (Mixed-Radix)
-
General framework for composite
N = N₁·N₂. -
Radix-2: Special case where
N₁=N₂=2(or powers of 2). -
Mixed-Radix (e.g., N=6=2×3):
-
Decompose
nandkas:n = n₁ + N₁·n₂,k = k₂ + N₂·k₁. -
X[k] = Σ_{n₂=0}^{N₂-1} [ Σ_{n₁=0}^{N₁-1} x[n₁ + N₁ n₂] W_N^{n₁ k} ] W_N^{N₁ n₂ k} -
Inner sum:
N₁-point DFT of subsequences (for eachn₂). -
Outer sum:
N₂-point DFT of results multiplied by twiddle factors.
-
-
Result:
N₁·N₂complex multiplications for twiddle factors, plusN₂·(N₁ log₂ N₁) + N₁·(N₂ log₂ N₂)for smaller DFTs.
5.5 2-D DFT
For M x N matrix x[m,n]:
$$X[k,l] = \sum_{m=0}^{M-1} \sum_{n=0}^{N-1} x[m,n]\, e^{-j2π(km/M + ln/N)}$$
-
Separable Property: Compute 1D DFT on rows (length
N) to get intermediateX₁[m,l], then compute 1D DFT on columns (lengthM) ofX₁to getX[k,l]. Order (rows then columns or vice-versa) does not matter. -
Complexity:
M·N·(M+N)vs. directM²N². For2x2matrix, compute directly or via separability.
6.0 DIGITAL FILTER DESIGN
6.1 FIR vs. IIR Filter Comparison
| Feature | FIR Filters | IIR Filters |
|---|---|---|
| Stability | Always stable (poles only at z=0). |
Can be unstable (poles can be anywhere). |
| Phase | Linear phase possible (symmetric/anti-symmetric h[n]). |
Non-linear phase (except all-pass). |
| Order | Higher order for sharp transitions. | Lower order for same spec. |
| Design | Direct (window, optimal). | Indirect (analog prototype → digital). |
| Implementation | Non-recursive (y[n] = Σ b_k x[n-k]). |
Recursive (y[n] = Σ b_k x[n-k] - Σ a_k y[n-k]). |
| Sensitivity | Less sensitive to coefficient quantization. | More sensitive. |
6.2 FIR Filter Design (Window Method)
Design Steps:
-
Specifications: Filter type (LP/HP/BP/BS), cutoff
ω_c, lengthM(orderN=M-1). -
Ideal Impulse Response
h_d[n]:-
LP:
h_d[n] = (ω_c/π) sinc(ω_c n/π)forn≠0,h_d[0] = ω_c/π. -
HP, BP, BS: Derived by subtracting appropriate LP responses.
-
-
Apply Window
w[n]:h[n] = h_d[n] · w[n], forn = -(M-1)/2, ..., (M-1)/2(symmetric aboutn=0). Window must be symmetric. -
Shift for Causal Filter:
h_causal[n] = h[n + (M-1)/2]forn=0,1,...,M-1.
Common Windows (Main Lobe Width / Side Lobe Attenuation):
| Window | Main Lobe Width | Side Lobe Attenuation |
|---|---|---|
| Rectangular | 4π/M |
-13 dB |
| Hanning | 8π/M |
-31 dB |
| Hamming | 8π/M |
-41 dB |
| Blackman | 12π/M |
-58 dB |
Gibbs Phenomenon: Undershoot/overshoot near discontinuities due to truncation. Wider main lobe (better window) reduces side lobes but increases transition width.
Linear Phase Conditions:
-
Type I (N even, symmetric):
h[n] = h[N-n].H(ω) = e^{-jωN/2} · A(ω), whereA(ω)is real & even. -
Type II (N odd, symmetric):
h[n] = h[N-n].H(ω) = e^{-jω(N-1)/2} · A(ω). -
Type III (N even, anti-symmetric):
h[n] = -h[N-n].H(ω) = j e^{-jωN/2} · B(ω),B(ω)real & odd ⇒H(0)=H(π)=0(high-pass/band-stop). -
Type IV (N odd, anti-symmetric):
h[n] = -h[N-n].H(ω) = j e^{-jω(N-1)/2} · B(ω),H(0)=0.
[!TIP] Design Question: "Design LP FIR with
ω_c = 0.4π,M=21using rectangular window." Steps:N=20(even),ω_c=0.4π. Computeh_d[n]forn=-10,...,10. Multiply byw_R[n]=1(rectangular). Shift by 10 to geth[n]forn=0,...,20.
6.3 IIR Filter Design (Analog Prototype Transformation)
Impulse Invariant Transformation
-
Principle: Sample the continuous-time impulse response
h_a(t)of analog filter to get digitalh[n] = T·h_a(nT). -
Mapping:
z = e^{sT}. Frequency mapping:ω = ΩT(mod2π). -
Disadvantage: Aliasing in frequency response because analog filter's frequency response is not bandlimited. Only suitable for bandlimited analog filters (e.g., low-pass with very small
Ω_c). -
Procedure: Find analog
H_a(s), do partial fraction, inverse Laplace to geth_a(t), sample to geth[n], take Z-transform to getH(z).
Bilinear Transformation
- Principle: Use trapezoidal rule for integration to map
stoz.
$$s = \frac{2}{T} \cdot \frac{1 - z^{-1}}{1 + z^{-1}} \quad \text{or} \quad z = \frac{1 + (T/2)s}{1 - (T/2)s}$$
-
Mapping: One-to-one mapping from entire left-half
s-plane (Re{s}<0) to inside of unit circle inz-plane (|z|<1). No aliasing. -
Disadvantage: Frequency Warping:
Ω = (2/T) tan(ω/2). Non-linear relationship between analogΩand digitalω. -
Pre-warping: To meet digital spec at
ω_c, design analog filter at warped frequencyΩ_c = (2/T) tan(ω_c/2). -
Design Steps:
-
Pre-warp digital specs (
ω_p,ω_s) to analog (Ω_p,Ω_s). -
Design analog prototype (Butterworth, Chebyshev) with
Ω_cand orderNto meet pre-warped specs. -
Apply bilinear transform
s = (2/T)(1-z⁻¹)/(1+z⁻¹)toH_a(s)to getH(z). -
(Optional) Transform to desired filter type (LP→HP/BP/BS) using analog frequency transformations before bilinear transform.
-
Analog Prototypes:
-
Butterworth: Maximally flat passband. Monotonic magnitude. Poles on circle in LHP.
-
Chebyshev I: Equiripple passband, monotonic stopband. Sharper transition than Butterworth for same
N. -
Chebyshev II (Inverse): Monotonic passband, equiripple stopband. Poles not on circle.
-
Elliptic: Equiripple in both bands. Sharpest transition for given
N, but most sensitive to quantization.
[!TIP] Comparison Question: "Compare impulse invariant and bilinear transformation." Key points: Impulse invariant preserves impulse response shape, has aliasing, simple mapping
z=e^{sT}. Bilinear has no aliasing, warps frequency (needs pre-warping), one-to-one mapping. Bilinear is preferred for most designs.
\boxed{\text{End of Unit 3 Notes}}