Transforms and Digital Signal Processing: Fourier Series, Laplace, Fourier and z-Transforms, Frequency and Pulse Transfer Functions, DFT, FFT, FIR and IIR Filters

Section 4 of the IN paper names Fourier series; Laplace, Fourier and z-transforms; DFT and FFT; transfer function, frequency response and pulse transfer function; and the basics of IIR and FIR filters — and the first chapter taught only signals, LTI systems, convolution and sampling. This chapter supplies the transforms and the digital-filter half. A periodic signal is a sum of harmonics; a unit square wave has fundamental amplitude 4/π = 1.273, which carries 81.1% of its power. The Laplace transform turns differential equations into algebra; (s + 3)/[s(s + 1)(s + 2)] inverts to 1.5 − 2e^(−t) + 0.5e^(−2t). The z-transform does the same for difference equations, and a system is stable when its poles lie inside the unit circle. The DFT of [1, 2, 3, 4] is [10, −2 + 2j, −2, −2 − 2j], and the FFT computes a 1024-point DFT with 5120 complex multiplications instead of 1048576 (a factor of 205). A bilinear-transformed first-order low-pass at 100 Hz and 1 kHz sampling is y[n] = 0.5095y[n − 1] + 0.2452(x[n] + x[n − 1]).
Overview

Fourier Series, Fourier Transform and Laplace Transform

2 min read · 1 part

A periodic signal of period T with Dirichlet conditions is x(t) = Σ c_n e^(jnω₀t), c_n = (1/T)∫x(t)e^(−jnω₀t)dt, or in trigonometric form a₀ + Σ(a_n cos nω₀t + b_n sin nω₀t). Symmetry shortcuts: an even signal has only cosines (b_n = 0), an odd signal only sines (a_n = 0), and half-wave symmetry x(t + T/2) = −x(t) has only odd harmonics. Parseval: the power of a periodic signal is Σ|c_n|². A unit square wave (±1) is odd with half-wave symmetry: b_n = 4/(nπ) for odd n, so the fundamental amplitude is 4/π = 1.273, the third harmonic is one-third of it, and the fundamental carries ((4/π)²/2)/1 = 81.1% of the unit power; the rest, the THD of √(π²/8 − 1) = 48.3%, is in the odd harmonics. At a jump the series converges to the mean of the two sides, and the Gibbs overshoot of about 9% never disappears however many terms are kept.

The Fourier transform X(ω) = ∫x(t)e^(−jωt)dt extends this to aperiodic signals. Key pairs: e^(−at)u(t) ↔ 1/(a + jω); rect of width τ ↔ τ sinc(ωτ/2π) with first null at 1/τ; δ(t) ↔ 1; 1 ↔ 2πδ(ω). Key properties: time shift multiplies by e^(−jωt₀) (magnitude unchanged); compressing in time spreads in frequency (x(at) ↔ X(ω/a)/|a|); multiplication in time is convolution in frequency and the reverse; Parseval equates energy in the two domains. The Laplace transform X(s) = ∫₀^∞ x(t)e^(−st)dt turns d/dt into s (with initial conditions), so a linear differential equation becomes algebra; the transfer function is H(s) = Y(s)/X(s) with zero initial conditions and the frequency response is H(jω). Initial value x(0⁺) = lim sX(s) as s → ∞; final value x(∞) = lim sX(s) as s → 0, valid only if all poles of sX(s) lie in the left half-plane.

Worked inverse. X(s) = (s + 3)/[s(s + 1)(s + 2)]. Residues: at s = 0, 3/(1 × 2) = 1.5; at s = −1, 2/((−1)(1)) = −2; at s = −2, 1/((−2)(−1)) = 0.5. So x(t) = 1.5 − 2e^(−t) + 0.5e^(−2t) for t ≥ 0. Check: x(0) = 0, matching lim sX(s) = 0 as s → ∞; x(∞) = 1.5, matching lim sX(s) = 3/2 as s → 0 (all poles of sX(s), at −1 and −2, are in the left half-plane so the final-value theorem applies). Frequency response: for H(s) = 10/(s + 10) and input 2 sin 10t, |H(j10)| = 10/√200 = 0.707 and ∠H = −45°, so the output is 1.414 sin(10t − 45°).

PairTransformCondition
u(t)1/sRe s > 0
e^(−at)u(t)1/(s + a)Re s > −a
t u(t)1/s²Re s > 0
sin ωt · u(t)ω/(s² + ω²)Re s > 0
δ(t)1all s

A periodic signal of period T with Dirichlet conditions is x(t) = Σ c_n e^(jnω₀t), c_n = (1/T)∫x(t)e^(−jnω₀t)dt, or in trigonometric form a₀ + Σ(a_n cos nω₀t + b_n sin nω₀t). Symmetry…

z-Transform, Stability and the Pulse Transfer Function

2 min read · 3 parts

For a sequence, X(z) = Σ x[n]z^(−n); the region of convergence (ROC) is part of the answer: x[n] = aⁿu[n] gives 1/(1 − az⁻¹) for |z| > |a| (right-sided), while −aⁿu[−n − 1] gives the same expression for |z| < |a| (left-sided). Delay by k multiplies by z⁻ᵏ; convolution becomes a product, so H(z) = Y(z)/X(z). A causal LTI system is BIBO stable iff all poles are inside the unit circle (the ROC then includes |z| = 1); the frequency response is H(e^(jω)) on the unit circle and repeats with period 2π. For y[n] = 0.5y[n − 1] + x[n]: H(z) = 1/(1 − 0.5z⁻¹), h[n] = 0.5ⁿu[n], and at ω = π/2, |H| = 1/|1 + 0.5j| = 0.894, phase −26.6°. Final value of a stable step response: lim(z → 1) H(z) = 2.

Pulse transfer function. A sampled-data loop puts a sampler and zero-order hold (ZOH) in front of the plant. The pulse transfer function is G(z) = (1 − z⁻¹)Z{G(s)/s}, the z-transform of the step response of G(s) sampled and differenced. For G(s) = 1/(s + 1) with sample time T = 0.5 s: G(s)/s = 1/s − 1/(s + 1), so G(z) = (1 − z⁻¹)[1/(1 − z⁻¹) − 1/(1 − e^(−T)z⁻¹)] = (1 − e^(−T))/(z − e^(−T)) = 0.3935/(z − 0.6065). The continuous pole at s = −1 maps to z = e^(−sT) = 0.6065, inside the unit circle. A pole at s = σ + jω maps to z = e^(σT)e^(jωT), so the left half s-plane maps to the interior of the unit circle; sampling too slowly aliases the pole positions.

⚠️ The s-to-z map is not "just substitute"
Replacing s by (z − 1)/T (Euler) can map a stable analog pole outside the unit circle for large T. The exact pole map is z = e^(sT); the bilinear transform s = (2/T)(1 − z⁻¹)/(1 + z⁻¹) always keeps stability but warps frequency.
Mapping an analog pole into z
s-plane to z-plane
  • Exact: z = e^(sT)Left half-plane to inside the unit circle
  • Euler: s = (z − 1)/TLarge T can push a stable pole outside
  • Bilinear transformAlways keeps stability; warps frequency

For a sequence, X(z) = Σ x[n]z^(−n); the region of convergence (ROC) is part of the answer: x[n] = aⁿu[n] gives 1/(1 − az⁻¹) for |z| > |a| (right-sided), while −aⁿu[−n − 1] gives the same…

The DFT and the FFT

2 min read · 1 part

The DFT of N samples is X[k] = Σ x[n]e^(−j2πkn/N), k = 0 … N − 1 — the DTFT sampled at N equally spaced frequencies. For x = [1, 2, 3, 4]: X[0] = 10, X[1] = −2 + 2j, X[2] = −2, X[3] = −2 − 2j; Parseval, Σ|x|² = (1/N)Σ|X|², checks as 30 = (100 + 8 + 4 + 8)/4. For a real x, X[N − k] = X[k]*, so half the spectrum is redundant. Bin spacing is f_s/N: sampling at 8 kHz with N = 1024 gives 7.8125 Hz per bin; resolving two tones needs a record longer than 1/Δf. Zero-padding interpolates the spectrum without improving resolution. A tone that does not fit an integer number of cycles in the record leaks across bins; a window (Hann, Hamming) trades a wider main lobe for lower sidelobes (rectangular ≈ −13 dB, Hamming ≈ −43 dB).

The FFT is not a different transform but a fast algorithm. Radix-2 decimation-in-time splits the N-point DFT into two N/2-point DFTs (even and odd samples) and combines them with N/2 "butterflies", each one complex multiplication by a twiddle factor W_N^k = e^(−j2πk/N) and two additions; applied log₂N times it needs (N/2)log₂N complex multiplications against N² for the direct sum. For N = 1024: 5120 against 1048576, a factor of 205. N must be a power of 2 (or the algorithm is mixed-radix); the input is in bit-reversed order for in-place DIT, and the output is natural. A 2^m-point FFT has m stages, each with N/2 butterflies. The same code computes the inverse DFT with conjugated twiddles and a 1/N scale. Fast convolution multiplies two FFTs and inverts, which beats direct convolution once the lengths exceed a few tens of samples.

NDirect N²FFT (N/2)log₂NRatio
864125.3
64409619221.3
102410485765120204.8

The DFT of N samples is X[k] = Σ x[n]e^(−j2πkn/N), k = 0 … N − 1 — the DTFT sampled at N equally spaced frequencies. For x = [1, 2, 3, 4]: X[0] = 10, X[1] = −2 + 2j, X[2] = −2, X[3] = −2 −…

FIR and IIR Filters

2 min read · 2 parts

An FIR filter is y[n] = Σ b_k x[n − k]: no feedback, finite h[n], poles only at the origin, hence always stable, and with symmetric coefficients (h[n] = h[N − 1 − n]) it has exactly linear phase, a constant delay of (N − 1)/2 samples — 25 samples for 51 taps — so it does not distort waveform shape. It needs a high order for a sharp cutoff; design by windowing the ideal impulse response, by frequency sampling or by equiripple optimisation. A moving average of M samples is FIR with first null at ω = 2π/M (here M = 8: 0.785 rad). An IIR filter uses feedback, y[n] = Σ b_k x[n − k] − Σ a_k y[n − k]: far fewer coefficients for the same selectivity (a small-order Butterworth or elliptic matches a long FIR), but it can be unstable and its phase is non-linear. Fixed-point coefficient rounding can move poles, so high-order IIRs are built as cascaded second-order sections.

IIR design by the bilinear transform maps s = (2/T)(1 − z⁻¹)/(1 + z⁻¹); the analog frequency Ω and digital ω are related by Ω = (2/T)tan(ω/2), so critical frequencies must be pre-warped. Design a first-order low-pass with f_c = 100 Hz at f_s = 1 kHz: ω_c = 2π × 100/1000 = 0.6283 rad; pre-warped Ω_c = 2f_s tan(ω_c/2) = 649.84 rad/s; H(s) = Ω_c/(s + Ω_c). With k = Ω_c/(2f_s) = 0.32492: H(z) = 0.2452(1 + z⁻¹)/(1 − 0.5095z⁻¹), i.e. y[n] = 0.5095y[n − 1] + 0.2452(x[n] + x[n − 1]). Check: DC gain = 2 × 0.2452/(1 − 0.5095) = 1, and |H| at ω_c is 0.7071, as designed. The pole at 0.5095 is inside the unit circle. The zero at z = −1 puts the null at Nyquist, a characteristic of the bilinear map (no aliasing, but frequency warping).

PropertyFIRIIR
FeedbackNoneYes
StabilityAlways stablePoles must be inside unit circle
PhaseExactly linear if symmetricNon-linear
Order for a sharp cutoffHighLow
Typical designWindow, equirippleBilinear transform of analog prototype
Bilinear IIR design, worked low-pass
  1. Digital cutoffω_c = 0.6283 rad
  2. Pre-warpΩ_c = 2f_s tan(ω_c/2) = 649.84 rad/s
  3. Analog prototypeH(s) = Ω_c/(s + Ω_c)
  4. Bilinear substitutionH(z) = 0.2452(1 + z⁻¹)/(1 − 0.5095z⁻¹)
  5. CheckDC gain 1; |H| = 0.7071 at ω_c
f_c = 100 Hz at f_s = 1 kHz.

An FIR filter is y[n] = Σ b_k x[n − k]: no feedback, finite h[n], poles only at the origin, hence always stable, and with symmetric coefficients (h[n] = h[N − 1 − n]) it has exactly linear…

Key takeaways

  • A periodic signal is Σ c_n e^(jnω₀t); even → cosines, odd → sines, half-wave symmetry → odd harmonics only. A unit square wave has a fundamental of 4/π and 48% THD.
  • Laplace inversion is partial fractions; the final-value theorem needs all poles of sX(s) in the left half-plane.
  • z-transform: stability means poles inside the unit circle; the ROC is part of the answer; the pulse transfer function with a ZOH is (1 − z⁻¹)Z{G(s)/s}.
  • DFT bin spacing is f_s/N; the FFT cuts N² to (N/2)log₂N multiplications; windows trade main-lobe width for sidelobe level.
  • FIR: always stable, linear phase if symmetric, high order. IIR: feedback, low order, may be unstable, designed by bilinear transform with pre-warping.

Practice questions (24)

Attempt each one before opening the answer. Every explanation names the tempting wrong option as well as the right one, because that is where marks are lost.

  1. A unit-amplitude (±1) square wave has the Fourier series Σ b_n sin nω₀t over odd n. The amplitude of its fundamental component is:

    1. 2/π
    2. 1
    3. 4/π
    4. π/4
    Show answer

    Answer: C — 4/π

    b_n = 4/(nπ) for odd n, so the fundamental is 4/π = 1.273, larger than the square wave's own amplitude of 1. 2/π is the DC term of a full-wave rectified sine, a different signal.
  2. The final value of x(t) whose Laplace transform is X(s) = (s + 3)/[s(s + 1)(s + 2)] is:

    1. 0.5
    2. 1.5
    3. 0
    4. 3
    Show answer

    Answer: B — 1.5

    lim s→0 sX(s) = 3/(1 × 2) = 1.5; the poles of sX(s) are at −1 and −2, so the theorem applies. Partial fractions give 1.5 − 2e^(−t) + 0.5e^(−2t).
  3. A system H(s) = 10/(s + 10) is driven by 2 sin(10t). The steady-state output amplitude (two decimals) is:

    Numerical answer — type the value.

    Show answer

    Answer: 1.41

    |H(j10)| = 10/√(10² + 10²) = 0.7071, so the amplitude is 2 × 0.7071 = 1.414 with a −45° phase shift. The input is exactly at the corner frequency.
Show the other 21 questions
  1. A causal discrete system has H(z) = 1/(1 − 0.5z⁻¹). Which statement is correct?

    1. It is stable only if |z| < 0.5
    2. It is stable, with ROC |z| > 0.5
    3. It is unstable because the pole is at z = 0.5
    4. Its impulse response is (−0.5)ⁿu[n]
    Show answer

    Answer: B — It is stable, with ROC |z| > 0.5

    The pole at 0.5 is inside the unit circle, and for a causal system the ROC is outside the pole, |z| > 0.5, which includes the unit circle. h[n] = 0.5ⁿu[n].
  2. For G(s) = 1/(s + 1) preceded by a zero-order hold with sampling period 0.5 s, the pulse transfer function is G(z) = K/(z − a). Enter a (two decimals):

    Numerical answer — type the value.

    Show answer

    Answer: 0.61

    The continuous pole s = −1 maps to z = e^(−1 × 0.5) = 0.6065, and K = 1 − e^(−0.5) = 0.3935.
  3. The DFT of x[n] = [1, 2, 3, 4] has X[0] equal to:

    1. 4
    2. −2
    3. 2.5
    4. 10
    Show answer

    Answer: D — 10

    X[0] is the sum of the samples, 10 (the DC term times N); the mean is 2.5. X[1] = −2 + 2j and X[2] = −2.
  4. A 1024-point radix-2 FFT needs (N/2)log₂N complex multiplications. How many (integer)?

    Numerical answer — type the value.

    Show answer

    Answer: 5120

    (1024/2) × 10 = 5120, against N² = 1 048 576 for the direct DFT, a speed-up of about 205.
  5. A signal is sampled at 8 kHz and a 1024-point DFT is taken. The spacing between DFT bins is:

    1. 7.81 Hz
    2. 1024 Hz
    3. 3.9 Hz
    4. 8 Hz
    Show answer

    Answer: A — 7.81 Hz

    Δf = f_s/N = 8000/1024 = 7.8125 Hz. Zero-padding makes the bins closer but does not let you resolve tones closer than about f_s/(record length in samples).
  6. Which statements about FIR and IIR filters are correct?

    1. A FIR filter with symmetric coefficients has exactly linear phase
    2. An IIR filter can match a sharp response with a lower order than a FIR
    3. Every IIR filter has exactly linear phase
    4. A FIR filter is always stable
    Show answer

    Answer: A — A FIR filter with symmetric coefficients has exactly linear phase; B — An IIR filter can match a sharp response with a lower order than a FIR; D — A FIR filter is always stable

    Symmetry gives linear phase, no feedback gives unconditional stability, and recursion gives selectivity per coefficient. Causal IIR filters cannot have exactly linear phase.
  7. A first-order IIR low-pass with f_c = 100 Hz at f_s = 1 kHz is designed with the bilinear transform (pre-warped). Its feedback coefficient a in y[n] = a·y[n − 1] + b(x[n] + x[n − 1]) is (four decimals):

    Numerical answer — type the value.

    Show answer

    Answer: 0.5095

    k = tan(ω_c/2) = tan(0.31416) = 0.32492; a = (1 − k)/(1 + k) = 0.5095 and b = k/(1 + k) = 0.2452.
  8. The Laplace transform of e^(−at)u(t), for Re(s) > −a, is

    1. 1/(s − a)
    2. 1/(s + a)
    3. s/(s + a)
    4. a/(s + a)
    Show answer

    Answer: B — 1/(s + a)

    ∫₀^∞ e^(−at)e^(−st) dt = 1/(s + a), a pole at s = −a. 1/(s − a) is the transform of the GROWING exponential e^(at)u(t), the usual sign slip.
  9. The z-transform of the delayed impulse δ[n − 2] is

    1. z⁻²
    2. z²
    3. 1/(1 − z⁻²)
    4. 1
    Show answer

    Answer: A — z⁻²

    Σδ[n − 2]z⁻ⁿ = z⁻², valid for all z ≠ 0; each sample of delay multiplies by z⁻¹. z² would be an advance of two samples.
  10. A half-wave rectified sine of peak value π volts has a dc (average) component, in V, of ____.

    Numerical answer — type the value.

    Show answer

    Answer: 1

    For a half-wave rectified sine the average is V_m/π = π/π = 1 V. The full-wave value 2V_m/π = 2 V is the tempting answer; the half-wave output is zero for half the period.
  11. The 4-point DFT of x[n] = {1, 1, 1, 1} has X[1] = ____.

    Numerical answer — type the value.

    Show answer

    Answer: 0

    A constant sequence contains only dc, so X[0] = 4 and X[1] = X[2] = X[3] = 0 (the four unit phasors cancel). Answering 4 copies X[0] to every bin.
  12. The magnitude of H(s) = 1/(s + 1) at ω = 1 rad/s, in dB (two decimals), is ____.

    Numerical answer — type the value.

    Show answer

    Answer: -3.01

    |H(j1)| = 1/√2, i.e. −3.01 dB: the corner frequency is where the response is 3 dB down. Answering −6.02 dB uses 1/2, which is the magnitude at the corner of two cascaded poles, not one.
  13. Using the initial-value theorem, x(0⁺) for X(s) = (2s + 3)/(s² + 4s + 5) is ____.

    Numerical answer — type the value.

    Show answer

    Answer: 2

    x(0⁺) = lim_(s→∞) sX(s) = lim (2s² + 3s)/(s² + 4s + 5) = 2. Setting s = 0 in X(s) (0.6) applies neither theorem correctly; the final value, lim_(s→0) sX(s), is 0 here.
  14. The causal sequence with X(z) = 1/(1 − 0.5z⁻¹) has x[3] = ____ (three decimals).

    Numerical answer — type the value.

    Show answer

    Answer: 0.125

    x[n] = (0.5)ⁿu[n], so x[3] = 0.125. Answering 1.5 adds the terms up to n = 3 (that would be the step response), and 0.5 × 3 = 1.5 also mistakes a power for a product.
  15. A ±1 square wave has total average power 1. The fraction of that power carried by its fundamental, whose amplitude is 4/π (three decimals), is ____.

    Numerical answer — type the value.

    Show answer

    Answer: 0.811

    P₁ = (4/π)²/2 = 8/π² = 0.811, so about 81 % of the power is in the fundamental. Answering 1.273 (= 4/π) gives an amplitude, not a power fraction.
  16. The 3-point circular convolution of x[n] = {1, 2, 3} with h[n] = {0, 0, 1} gives y[0] = ____.

    Numerical answer — type the value.

    Show answer

    Answer: 2

    h is δ[n − 2], so y is x circularly shifted by 2: {2, 3, 1}, giving y[0] = 2. Linear convolution would give {0, 0, 1, 2, 3}, whose first sample 0 is the trap; wrap-around moves the tail to the front.
  17. The two-tap averager y[n] = ½(x[n] + x[n − 1]) has magnitude response |H(e^(jω))| at ω = π/2 equal to ____ (four decimals).

    Numerical answer — type the value.

    Show answer

    Answer: 0.7071

    H(e^(jω)) = e^(−jω/2)cos(ω/2), so |H| = cos(π/4) = 0.7071. Answering 0.5 adds the magnitudes of the two terms without their phases; the filter is low-pass with a null at ω = π.
  18. The inverse Laplace transform of 1/[s(s + 2)], evaluated at t = 1 (four decimals), is ____.

    Numerical answer — type the value.

    Show answer

    Answer: 0.4323

    Partial fractions: ½(1/s − 1/(s + 2)), so x(t) = ½(1 − e^(−2t)) and x(1) = 0.4323. Forgetting the ½ gives 0.8647, the response of 2/[s(s + 2)].
  19. A system y[n] = 0.5y[n − 1] + x[n] with y[−1] = 0 is driven by the unit step x[n] = u[n]. The output y[3] (three decimals) is ____.

    Numerical answer — type the value.

    Show answer

    Answer: 1.875

    y[0] = 1, y[1] = 1.5, y[2] = 1.75, y[3] = 1.875, approaching the dc gain 1/(1 − 0.5) = 2. Answering 0.125 gives the impulse response h[3] = 0.5³, not the step response.
  20. For N = 256, a direct DFT needs N² complex multiplications and a radix-2 FFT needs (N/2)log₂N. The ratio of the two counts is ____.

    Numerical answer — type the value.

    Show answer

    Answer: 64

    N² = 65 536 and (N/2)log₂N = 128 × 8 = 1024, so the ratio is 64 = 2N/log₂N. Using N log₂N (2048) for the FFT gives 32, double-counting the butterflies.
  21. Which statements about digital filters are correct?

    1. For the same transition sharpness, an FIR filter always needs fewer coefficients than an IIR filter.
    2. An FIR filter has exactly linear phase if its coefficients are symmetric or antisymmetric.
    3. An IIR filter can be unstable if a pole lies outside the unit circle.
    4. The bilinear transform maps the whole jω axis onto the unit circle, so it causes no aliasing.
    Show answer

    Answer: B — An FIR filter has exactly linear phase if its coefficients are symmetric or antisymmetric.; C — An IIR filter can be unstable if a pole lies outside the unit circle.; D — The bilinear transform maps the whole jω axis onto the unit circle, so it causes no aliasing.

    Symmetric taps give linear phase; feedback poles outside |z| = 1 make an IIR filter unstable; the bilinear map is one-to-one (with frequency warping) so there is no aliasing. It is the IIR filter that usually meets a sharp specification with far fewer coefficients, so the last statement is reversed.