AI Glossary / Time series and signal processing / Intermediate

Filter Design

Definition

Filter design is the process of choosing a filter structure and parameters to meet specified requirements for transforming a signal. Requirements can include which frequencies to preserve or attenuate, allowable distortion, delay, stability, and computational cost. A successful design is judged against those requirements and the intended use, rather than by how smooth its output looks.

What it means

Design starts with a question about the signal: which features are useful, which interference should be suppressed, and how quickly must the result be available? These choices determine whether a low-pass, high-pass, band-pass, band-stop, or another form is appropriate.
There is rarely a perfect separation between useful and unwanted content. A sharper frequency boundary may require greater complexity or delay. Consequently, filter design is an engineering tradeoff with measurable specifications, not a generic instruction to remove noise.

How it works

For a digital filter, establish the sampling rate and frequency units. Specify passband edges, acceptable passband loss or ripple, stopband edges, required attenuation, and transition regions. Then choose a suitable finite impulse response or infinite impulse response structure and calculate coefficients.
Check the resulting frequency response and time-domain behavior. Phase or group delay matters when timing and waveform shape are important. Recursive designs also require attention to stability and numerical representation; second-order sections often improve robustness over a single high-order polynomial implementation. Finally, test the actual implementation, including initial conditions and finite arithmetic, rather than assuming that theoretical coefficients guarantee operational behavior.

Three practical examples

  • An audio product designs a low-pass stage before reducing sample rate, so high-frequency content is attenuated before it could alias into the retained band.
  • A factory sensor pipeline suppresses a known interference band while checking that relevant equipment signatures remain measurable.
  • A wearable device chooses a filter compatible with battery and latency constraints. An offline algorithm that waits for later samples may be unsuitable for its real-time feedback feature.

Think of it this way

Think of specifying a doorway rather than merely asking for a smaller opening. The required objects, clearance, and available space determine its dimensions. In filter design, the passband and stopband describe what should pass or be suppressed, while delay and cost limit the structures available. An unspecified request to clean data leaves essential decisions unresolved.

Worked example

Consider an original digital low-pass candidate sampled at 100 Hz. Choose three coefficients [0.25, 0.5, 0.25], applied to the current and two previous samples. Its frequency response is H(f) = 0.25 + 0.5 exp(−i2πf/100) + 0.25 exp(−i4πf/100).
Factoring gives H(f) = exp(−i2πf/100) × cos squared(πf/100). Thus its magnitude is cos squared(πf/100), with one-sample delay where the response is nonzero. At zero frequency the gain is 1. At 10 Hz it is approximately 0.9045085; at 40 Hz it is approximately 0.0954915; at 50 Hz it is zero.
Suppose the stipulated requirements are magnitude at least 0.9 from 0 through 10 Hz, and at most 0.1 from 40 through 50 Hz. On this interval the magnitude decreases monotonically, so the band-edge calculations verify both complete bands, not just two isolated frequencies. The 40-Hz attenuation is about 20.40 dB, using −20 log10 of the magnitude. Delay is one sample, or 0.01 seconds. Frequencies between 10 and 40 Hz belong to an unrestricted transition band in this example. The candidate meets these deliberately loose requirements; it is not asserted to be optimal or suitable for an actual product.

Illustrative case study

Illustrative fictional case: Harbor Instruments asks for a filter that reduces vibration noise without delaying an alarm. The first proposal has excellent frequency rejection but more delay than the alarm workflow permits.
The team revises the specification to distinguish the monitoring display from the fast event detector. It tests both responses with simulated steps and recorded events, then records the accepted compromises. This fictional case shows why a numerical attenuation target alone is insufficient to define success.

Common misconceptions and mistakes

A cutoff frequency is not a universal boundary at which all lower frequencies pass unchanged and all higher ones disappear. Its meaning depends on the filter family and convention. For a Butterworth design, the critical frequency is associated with a specified amplitude reduction, not a brick-wall transition.
Do not confuse hertz, radians per sample, and frequency normalized to Nyquist. Passing the wrong units can produce a valid calculation for the wrong filter. More coefficients are not automatically better: numerical sensitivity, delay, ringing, and maintenance complexity may increase. Forward-backward filtering also changes the effective response and requires retrospective data handling.

Business use

Filter design affects the reliability of analytics built on sensor and time-series data. A well-documented design makes processing repeatable and helps explain why a feature changed after a software or acquisition update.
Retain the design specification, coefficient version, sampling-rate assumptions, and validation signals. Measure application outcomes such as detection timing or measurement bias, alongside frequency response. If acquisition conditions change, reassess the design rather than reusing coefficients solely because the software still runs.

People also ask

Is an FIR filter always preferable?

No. Its advantages and costs depend on phase, order, delay, and implementation requirements.

Can software select a filter order?

Yes, given a filter family and sufficiently precise specifications; that does not choose the business requirements for you.

Does meeting a stopband target eliminate all noise?

No. Noise may also lie inside the passband, and real measurements may violate assumed conditions.

Check your understanding

Why does the example need a sampling rate?

Answer: It converts frequency and sample delay into physical units.

What happens at 50 Hz?

Answer: The candidate has zero response at that Nyquist frequency.

Why check monotonicity in the example?

Answer: It justifies extending the edge calculations to the stated bands; arbitrary designs require a more careful response assessment.

Related terms

  • Filter
  • Nyquist frequency
  • frequency response
  • passband
  • stopband
  • transition band
  • FIR filter
  • IIR filter
  • group delay
  • filter order

Learn next

plot magnitude and phase responses for a few candidate filters under the same specifications. Inspect impulse and step responses, then compare causal processing with retrospective alternatives while tracking latency explicitly.

More in Time series and signal processing

  • Exponential smoothing - Exponential smoothing is a family of methods that updates estimates of a time series as new observations arrive.
  • Extended Kalman filter - An extended Kalman filter, or EKF, estimates the evolving hidden state of a system whose dynamics or measurements are nonlinear.
  • Fast Fourier transform - A fast Fourier transform, or FFT, is an algorithm for computing a discrete Fourier transform efficiently.
  • Filtering - Filtering is the process of estimating a system's current hidden state from observations available up to the present, in probabilistic AI.
  • First difference - A first difference is the change between a time-series observation and the immediately preceding observation: Δyt = yt − y(t−1).
  • Fixed-lag smoothing - Fixed-lag smoothing estimates a hidden state from a fixed number of time steps in the past using observations available through the present.

Sources

Sources: SciPy, official Signal Processing tutorial, Filter Design: https://docs.scipy.org/doc/scipy/tutorial/signal.html . Official Butterworth design and order-selection documentation: https://docs.scipy.org/doc/scipy/reference/generated/scipy.signal.butter.html and https://docs.scipy.org/doc/scipy/reference/generated/scipy.signal.buttord.html . Primary documentation consulted. The three-coefficient design and fictional scenario are original; complex-sum calculations independently verify the stated response.

Previous: Filter Next: Filtered-popping recursive transition network

  • Home
  • Daily AI Updates
  • Blog
  • AIFBL Academy
  • AI Glossary
  • Products and Tools
  • Store
  • Free CFO AI Prompt Pack
  • About Shihan Sheriff
  • Privacy Policy
  • Terms of Use
  • Refund Policy
  • Cookie Policy
  • Earnings Disclaimer