Why [1, -1] is a High-Pass Filter
1. What is a High-Pass Filter?
A high-pass filter (HPF) is a filter that allows high-frequency components to pass while attenuating (reducing) low-frequency components.
- Low frequency → smooth/slow changes
- High frequency → rapid/fast changes
2. The Filter [1, -1]
Consider a 1D discrete signal \( x[n] \). If we apply the filter [1, -1], the output \( y[n] \) is:
\[ y[n] = 1 \cdot x[n] + (-1) \cdot x[n-1] = x[n] - x[n-1] \]
3. What does it do?
- It computes the difference between consecutive samples.
- If the signal is constant (low frequency, smooth), then \( x[n] - x[n-1] \approx 0 \) → output is near zero.
- If the signal changes quickly (high frequency), then \( x[n] - x[n-1] \) is large → output is large.
This is exactly what a high-pass filter does.
4. Frequency Response
The frequency response \( H(\omega) \) of the filter [1, -1] is:
\[ H(\omega) = 1 - e^{-j\omega} \]
Magnitude:
\[ |H(\omega)| = \sqrt{(1 - \cos\omega)^2 + (\sin\omega)^2} = \sqrt{2 - 2\cos\omega} = 2\left|\sin\frac{\omega}{2}\right| \]
- At \( \omega = 0 \) (DC / zero frequency), \( |H(0)| = 0 \) → low frequencies blocked
- At \( \omega = \pi \) (highest frequency), \( |H(\pi)| = 2 \) → high frequencies passed
5. Why Does Discrete-Time Frequency Range From 0 to π?
5.1. Discrete-Time Frequencies Are Periodic With Period \(2\pi\)
In discrete-time systems, the Fourier transform is periodic:
\[ X(e^{j\omega}) = X(e^{j(\omega + 2\pi)}) \]
This means a frequency at \( \omega \) is identical to one at \( \omega + 2\pi k \). Therefore, only one full cycle of length \( 2\pi \) is needed to describe all discrete-time frequencies.
5.2. We Usually Use the Range \(-\pi \le \omega \le \pi\)
This range includes negative frequencies, zero, and positive frequencies. It represents one complete, unique cycle of the discrete-time frequency spectrum.
5.3. For Real-Valued Signals, Only \(0 \le \omega \le \pi\) Is Needed
Real signals have symmetric frequency magnitudes:
\[ |X(e^{j\omega})| = |X(e^{-j\omega})| \]
Because the negative side mirrors the positive side, the interval from \(0\) to \( \pi \) contains all non-redundant information. This range is called the non-negative baseband.
5.4. Meaning of the Boundaries
ω = 0 — Slowest possible frequency / DC
ω = Ï€ — Fastest possible oscillation in discrete time:
\[ x[n] = (-1)^n = 1, -1, 1, -1, \dots \]
Any frequency beyond \( \pi \) will wrap around (alias) back into this range.
5.5. Why Not Use π to 2π or Other Ranges?
- The DTFT repeats every \(2\pi\).
- All frequencies outside the 0…Ï€ range map back into it.
- Anything above π is not unique (it aliases).
Therefore, the range 0 to π gives all unique discrete-time frequency behaviors.
Example 1 — Constant Signal (ω = 0)
A constant signal has zero frequency:
\[ x[n] = 5 \]
Apply the filter [1, -1]:
\[ y[n] = x[n] - x[n-1] = 5 - 5 = 0 \]
Interpretation: the filter kills signals that never change (low frequency).
Example 2 — Slow-Changing Signal (Low ω)
A slow wave:
\[ x[n] = \cos(0.1n) \]
The difference is small because the wave changes slowly:
\[ x[n] - x[n-1] \approx \text{small} \]
Interpretation: slow signals produce small output → suppressed.
Example 3 — Medium Frequency Signal
A moderately fast wave:
\[ x[n] = \cos(0.7n) \]
Interpretation: medium frequencies produce moderate output.
Example 4 — Highest Frequency (ω = Ï€)
The fastest possible oscillation:
\[ x[n] = (-1)^n = \cos(\pi n) \]
Apply the filter:
\[ y[n] = x[n] - x[n-1] \]
Compute values:
- If \( x[n] = 1 \) and \( x[n-1] = -1 \), then \( y[n] = 2 \)
- If \( x[n] = -1 \) and \( x[n-1] = 1 \), then \( y[n] = -2 \)
\[ y[n] = 2, -2, 2, -2, \ldots \]
Rapid changes produce large output → high frequencies emphasized.
Summary
Discrete-time signals have a periodic spectrum. One full period is \(2\pi\), and for real signals, only half of it (0 to π) contains unique information. This range covers all behaviors from DC (0) to the fastest alternation (π).
- [1, -1] computes differences between adjacent samples.
- Smooth / slow signals → output ≈ 0
- Rapid / fast changes → output is large
- Effectively removes low-frequency content and passes high-frequency content → high-pass filter