how do audio high pass and low pass filters work? (what’s the science behind it?)

99 views

how do audio high pass and low pass filters work? (what’s the science behind it?)

In: 5

4 Answers

Anonymous 0 Comments

The science behind analog high/low pass filters is inductance and capacitance. Inductivity is resistance to changes in the direction in the flow of current. High frequencies change direction very frequently, so a highly inductive circuit will resist them, making it more difficult for them to flow through. Capacitance works the opposite way. You can adjust a circuit’s inductance and capacitance values to determine which frequencies are affected by it and how.

Digital filtering is another story. There you throw math at the signal. You put it through an algorithm called fourier transform, which does some calculations on the signal and breaks it down into its frequency components. You then remove the frequencies you don’t want, and turn the remaining collection of frequencies back into a signal.

Anonymous 0 Comments

Assuming you are talking about audio filters due to your post history, but this itself is a topic in a larger subject of signal processing.

**The Math**

There’s a lot of theoretical math behind it, it involves something called the Fourier transform, which takes a signal, say audio, and decomposes it into a sum of waves, which we can then manipulate and remove.

It turns out that electronic circuits can be analyzed using the Fourier transform to see how they would effect the signal going through them. And with this lens, we can also build circuits that manipulate the Fourier transform in certain ways, such as a low pass filter.

**The Electronics**

A simple high pass filter would have the audio signal going through a device called a capacitor. I’m not going to explain how these work, search the subreddit if you don’t know, but what happens is that if a low frequency goes through the capacitor, there is enough time in between the waves to charge the capacitor and it once the capacitor is charged it stops electricity from passing through it. This stops the signal from passing through. For low frequencies, there is not enough time between the peaks to charge the capacitor, so its mostly let through.

To make a high pass filter we can take the same idea and flip it, we connect one side of the capacitor to ground and the other side to the wire carrying the signal. Now high frequencies want to go through the capacitor and as a result go to ground and not to the output, low frequencies on the other hand block the capacitor as mentioned above go to the output instead of being dumped to ground through the capacitor.

Anonymous 0 Comments

**Digital**

In the digital realm, filters are normally implemented via difference equations. These are the discrete counterpart to differential equations, so the math can get a bit beyond the ELI5 level.

But imagine you have a list of numbers which we’ll call x[n]. These represent the amplitude of your signal, sampled at a regular interval.

Now we send it through a difference equation y[n] = (x[n] + x[n-1])/2. The just says that the value of y at time n will be the average of the current and last value of x at time n.

The impact of doing this is that you ‘smooth’ the original signal x[n]. But ‘smoothing’ the signal is the same as subtracting the high frequency components. Conversely, if you only cared about the high frequency components, you could simply subtract your ‘smoothed’ waveform from the original waveform and all those low frequency components would be subtracted out while the high frequency ones remained.

Note: While Fourier Transforms can be used to mathematically analyze signals, they’re rarely used as part of the filtering algorithm because (a) they’re really slow compared to the difference equation method above and (b) masking off a discrete frequency spectrum before converting it back to a time-varying waveform creates all sorts of ‘artifacts’ due to the varying granularity of the phase analysis (at low frequencies, you have huge jumps between each phase angle you’re testing; at high frequencies, you have small ones; the size of those jumps corresponds to the amount of error that can exist in your math).

**Analog**

Let’s say you have a signal source, a resistor and a capacitor.

As the signal rises, it starts to charge up the capacitor. But the capacitor doesn’t want to charge and impedes changes to its voltage. So it slows down the charging. If you try to change the voltage very fast – as high frequency signals do – then the capacitor will not fully charge by the time the signal drops again. The high frequency components will essentially be ‘trapped’ in the resistor waiting their turn.

In contrast, the low frequency components only try to change the capacitor voltage slowly, so they’re able to locate their voltage in the capacitor rather than the resistor.

If you measure across the resistor, you’ll see all those high frequency components piled up. If you measure across the capacitor, you’ll see all the low frequency components. This effectively ‘filters’ high vs. low.

Note: Actual filter design is considerably more complicated that I outlined above. The above is just the basics.

Anonymous 0 Comments

Can you be more specific about what you don’t understand?