Hands-On Example: How Signals Are Attenuated
To understand attenuation clearly, let us test simple filters using real numeric signals. We will use two filters:
- Low-pass filter: h = [1/2, 1/2]
- High-pass filter: h = [1, -1]
We will apply these filters to two different signals:
- A slowly varying signal (low frequency)
- A rapidly changing signal (high frequency)
Example 1: Slowly Varying Signal (Low Frequency)
Suppose the input signal is:
x[n] = [10, 11, 12, 13, 14]
This signal changes slowly from one sample to the next.
Low-Pass Filter
Impulse response:
h = [1/2, 1/2]
Output equation:
y[n] = 1/2 x[n] + 1/2 x[n−1]
| n | x[n] | Calculation | y[n] |
|---|---|---|---|
| 1 | 11 | 0.5(11) + 0.5(10) | 10.5 |
| 2 | 12 | 0.5(12) + 0.5(11) | 11.5 |
| 3 | 13 | 0.5(13) + 0.5(12) | 12.5 |
| 4 | 14 | 0.5(14) + 0.5(13) | 13.5 |
The output signal remains almost the same as the input signal. This means low-frequency signals pass through the low-pass filter.
High-Pass Filter
h = [1, -1]
y[n] = x[n] − x[n−1]
| n | Calculation | y[n] |
|---|---|---|
| 1 | 11 − 10 | 1 |
| 2 | 12 − 11 | 1 |
| 3 | 13 − 12 | 1 |
| 4 | 14 − 13 | 1 |
Most of the signal disappears and only small differences remain. Low frequencies are therefore attenuated by the high-pass filter.
Example 2: Rapidly Changing Signal (High Frequency)
Now consider a rapidly oscillating signal:
x[n] = [1, −1, 1, −1, 1, −1]
Low-Pass Filter Result
y[n] = 1/2 (x[n] + x[n−1])
Output:
y[n] = [0, 0, 0, 0]
The signal disappears because the averaging process cancels rapid oscillations. High-frequency signals are therefore strongly attenuated.
High-Pass Filter Result
y[n] = x[n] − x[n−1]
y[n] = [-2, 2, -2, 2]
The signal becomes larger in magnitude. This shows that high-pass filters emphasize rapid changes in the signal.
Connection to the 1/(1 + x) Expression
In frequency-domain filters described by
H(ω) = 1 / (1 + x)
the denominator grows as frequency increases. As a result, the gain decreases for higher frequencies.
This is exactly what we observed in the examples above: slowly varying signals pass through the filter while rapidly changing signals become smaller or disappear.