Skip to content
Learn Netverks

Lesson

Step 27/36 75% through track

signal-filtering-preview

Signal filtering preview

Last reviewed Jun 1, 2026 Content v20260601
Track mode
server_script
Means
Server runner
Reading
~1 min
Level
intermediate

This lesson

This lesson teaches Signal filtering preview: SciPy scientific routines on NumPy arrays—statistics, optimization, linear algebra, and numerical methods.

Frequency-domain thinking unlocks audio, vibration, and seasonality analysis.

You will apply Signal filtering preview in contexts like: Audio processing, sensor diagnostics, and seasonal decomposition.

Read the narrative, run NumPy + SciPy snippets in the playground (install scipy and numpy with pip if needed), inspect outputs and convergence, and complete MCQs.

When you can explain the previous lesson's ideas in your own words.

scipy.signal designs digital filters (lowpass, highpass, bandpass) and applies them with filtfilt for zero-phase smoothing of sensor data.

Common workflow

  1. Design filter with butter, cheby1, etc.
  2. Get coefficients b, a or SOS form
  3. Apply sosfiltfilt for forward-backward filtering

Moving average alternative

Simple np.convolve or signal.savgol_filter for denoising without full IIR design—pick based on latency and phase requirements.

Butterworth lowpass sketch

import numpy as np
from scipy import signal

b, a = signal.butter(4, 0.1, btype='low')
x = np.random.default_rng(0).normal(size=100)
y = signal.filtfilt(b, a, x)
print('input std:', x.std(), 'filtered std:', y.std())

Important interview questions and answers

  1. Q: filtfilt vs lfilter?
    A: filtfilt runs forward and backward for zero phase delay—better for offline analysis.
  2. Q: Cutoff normalized?
    A: For butter, Wn is fraction of Nyquist (0–1), not Hz—scale by sample rate.

Self-check

  1. What does a lowpass filter remove?
  2. Why normalize cutoff to Nyquist?

Tip: filtfilt is for offline analysis; real-time streams often use causal lfilter.

Interview prep

filtfilt?

Forward-backward filter—zero phase for offline data.

Cutoff units?

Normalized to Nyquist in butter—multiply by fs/2 for Hz.

Interview tip Lesson completion confidence

Can you explain this lesson in 30 seconds without reading notes?

Not saved yet.

Playground

Runs on the configured server runner (dev: npm run runner with LEARNING_RUNNER_ENABLED=true). Output appears below the editor.

Check yourself

Multiple choice — immediate feedback.

Discussion

Past discussion is visible to everyone. Only logged-in users can post comments and replies.

Starter discussion topics

  • butter filter?
  • FIR vs IIR?

Sign up or log in to post comments and sync lesson progress across devices.

No discussion yet. Be the first to ask a question.

Jump