# Can you derive specs of audio filter if you have a recording of the filter output?

So the question is, if you have a recording of some sort of audio signal going through a bandpass filter and you know what type of waveform was put into the input of the filter, can you derive the frequency range of the filter and what type of filter ( Butterworth, Chebyshev , etc. ), without originally knowing the specifications of the filter?

I know something like a pure single sine wave you definitely wouldn't be able to do it , but I am guessing a waveform that is made up of different frequencies like a sawtooth waveform would make it possible?

Only if you have the input to compare. And yes, input needs to contain frequencies to be compared. Saw tooth has limited frequency content though I suppose there are worse choices. Using white noise which contains all frequencies is the ideal way.

But the real ideal way is to use a dirac delta function whose spectrum is such that the output is the impulse response of the filter whose spectrum directly gives you the filter spectrum. No comparison needed. This is by mathematical definition. Works for control systems too.

• Just as a note. Numerical Recipes (and there are far too many versions around to my taste) has a section on deconvolution and its difficulties, as well as considering the alternate methods of optimal filtering (Wiener, etc.) It's worth reading for anyone seriously considering the idea of engaging this.
– jonk
Commented Mar 20, 2022 at 4:36

Yes. You take the fourier transformation of the output signal divide it by the fourier transformation of the input signal (only possible at frequency points of the input signal which are not close to zero).

• This will get magnitudes but the phase. Commented Mar 20, 2022 at 20:41
• @DKNguyen you also get the phase, just take the full fourier transforms (with complex values) and not just the power spectrum. Commented Mar 20, 2022 at 20:52
• hmmmm I guess so if you have that level of access to the FFT data Commented Mar 20, 2022 at 20:53
• @DKNguyen why wouldnt you have access to the fft coefficients? Commented Mar 20, 2022 at 20:55
• You would if you're manually doing the steps for the FFT in something like Octave. If you're using a more canned approach (or canned commands), or grabbing the FFT off a scope you may not have it. Commented Mar 20, 2022 at 20:56

Yes. There are many ways to achieve this, and different ways may be used in different situations.

One method not yet mentioned is a sweep of sine wave over all frequencies of interest, such as 20 Hz to 20 kHz.