Digital Signal Processing

DSP Interviews: Filters, Spectrum, Tradeoffs

A Dolby Labs engineer described his interview: 5 minutes at the whiteboard on FIR vs IIR, 15 minutes designing a noise cancellation system, 10 minutes on why FFT is faster than DFT. No LeetCode algorithmic puzzles - pure DSP. These are specialized roles paying USD 200-350k/year with a rigorous and specific selection process.

  • Dolby Labs: DSP engineer interview covers designing an audio pipeline from requirements to fixed-point implementation
  • Qualcomm DSP team: questions on Hexagon DSP intrinsics, Q15 arithmetic, and LMS adaptive filters
  • Apple AirPods team: ANC system design with latency budget analysis and adaptive convergence
  • NVIDIA audio AI: FFT windowing, spectral leakage, and STFT parameters for speech enhancement

Filters in Interviews: FIR vs IIR

Every DSP interview at Apple, Qualcomm, or Dolby contains some variation of: 'You need to remove a 60 Hz mains hum from an ECG signal sampled at 1000 Hz. Do you use FIR or IIR? Why?' The correct answer depends on requirements that need to be clarified first.

**FIR vs IIR checklist.** FIR: always stable, linear phase (constant group delay), tolerates fixed-point quantization without instability. IIR: fewer coefficients for the same rolloff steepness, non-linear phase, can become unstable under fixed-point quantization. For ECG: FIR (linear phase is critical for diagnosis). For audio EQ: IIR is sufficient.

**Bilinear transform.** IIR filters are designed in the analog domain (Laplace s-domain) then converted to digital via bilinear transform: s = 2/T * (z-1)/(z+1). This maps the entire left half-plane (stable analog poles) into the unit circle (stable digital poles). Side effect: frequency warping - frequencies are compressed non-linearly, requiring pre-warping correction at the target frequency.

Why is an FIR filter preferred for diagnostic ECG rather than IIR?

Spectral Analysis: FFT Interview Questions

FFT is a mandatory topic in DSP interviews. 'What is the complexity of FFT and why?' and 'Explain spectral leakage and how to reduce it' appear in 90% of interviews. The right answer is not a formula - it is understanding cause and effect.

**STFT vs Wavelet tradeoff.** STFT (Short-Time Fourier Transform): fixed time and frequency resolution. Adequate for speech analysis. Wavelet: frequency resolution is adaptive - good at low frequencies, temporal resolution good at high frequencies. For ECG with QRS complexes - Wavelet is preferred. The Morlet wavelet gives the optimal time-frequency balance according to the Heisenberg uncertainty principle.

What is spectral leakage and how does windowing reduce it?

Implementation: Typical Coding Problems

DSP interviews at Dolby, Qualcomm, and NVIDIA often include live coding: 'implement a moving average filter' or 'write a circular buffer'. The tasks are simple but the traps are in edge cases and overflow.

**Goertzel vs FFT.** When only one frequency is needed from an N-point FFT, Goertzel saves computation: O(N) instead of O(N log N). Applications: DTMF decoding in telephony (8 frequencies from 512 points), tone detection, frequency meters. When K frequencies are needed: Goertzel wins if K < log2(N), FFT wins if K > log2(N).

Why does MovingAverage use a running sum (total += x) rather than recomputing the sum each time?

System Design: Tradeoffs in DSP Systems

The final part of a FAANG DSP interview is system design: 'Design audio noise cancellation for headphones with latency under 5 ms'. This is not a question about knowing a specific algorithm - it is a question about arguing through tradeoffs.

**Heisenberg uncertainty in DSP.** The time-frequency uncertainty principle: sigma_t * sigma_f >= 1/(4*pi). High temporal and frequency resolution cannot coexist. Consequence for design: short FFT window = good time resolution, poor frequency resolution. Long window = the reverse. Wavelets work around this by using adaptive resolution, but they do not violate the principle - they allocate the resolution budget optimally across frequencies.

DSP interviews require memorizing every formula

Interviewers evaluate understanding of tradeoffs: when FIR vs IIR, why linear phase matters, how latency and filter order are related. Formulas can be derived - understanding cause and effect cannot.

Apple DSP engineer: 'I do not care if a candidate remembers the bilinear transform formula. I care whether they understand why an IIR can become unstable under quantization and what to do about it'.

Why are LMS filter weights stored in Q31 rather than Q15 in a fixed-point implementation?

Key ideas

  • FIR vs IIR: FIR is stable with linear phase, IIR is more efficient with non-linear phase - choice depends on requirements
  • FFT leakage: finite window = rectangular taper -> sinc sidelobes; Hann/Blackman trade sidelobe level for main lobe width
  • Live coding: circular buffer O(1) delay, running sum O(1) moving average, Goertzel O(N) for a single frequency
  • Adaptive filters: LMS is O(N) and stable, weights in Q31 for fixed-point, mu trades convergence vs stability
  • System design: requirements -> latency budget breakdown -> algorithm selection -> fixed-point tradeoffs

Related topics

DSP interviews span the full course - from filter theory to real-time implementation.

  • FIR Filters — FIR design, linear phase, Parks-McClellan method - standard interview questions
  • FFT: The Fast Fourier Transform — FFT complexity, leakage, and windowing are mandatory interview topics
  • Real-Time DSP: FPGA and DSP Cores — Fixed-point and real-time constraints from the previous lesson

Вопросы для размышления

  • An interviewer asks: 'Why not just use a long FIR for everything?' How do you answer, considering latency, compute cost, and when FIR is genuinely the wrong choice?
  • How would you explain the Heisenberg uncertainty principle in DSP context without formulas - using only intuition?
  • Under what conditions does the LMS algorithm diverge, and how does NLMS (Normalized LMS) address this problem?

Связанные уроки

  • dsp-15 — Real-time DSP questions follow from understanding FPGA and fixed-point
  • dsp-08 — IIR filters - Butterworth, Chebyshev, bilinear transform - are standard filter design interview questions
  • dsp-05 — FFT is a fundamental question in every DSP interview
  • cv-18 — CV System Design interviews have the same structure: requirements -> algorithm -> tradeoffs
  • calc-01-sequences
DSP Interviews: Filters, Spectrum, Tradeoffs

0

1

Sign In