I am trying to get the frequency response of a system, so, in theory I would need to do:

H = fft(y)./fft(x);

I have measured the system with a long stepped sine log sweep four times as I am planning to perform a spectral averaging to improve my SNR. This gives me a total of almost 5.000.000 samples per file. I have calculated the STFT of smaller chunks and averaged them as it looked like a too long signal to do an FFT. I used the cross spectrum and auto spectrum for that (I did the same procedure 4 times, one per audio file/repetition). However I think that's not the correct way to go as I am averaging a non stationary signal. Should I just do an FFT of the whole signal? Isn't it too long? Do you have any idea of how I should proceed?

Thanks a lot in advance!


Assuming that the system response is smooth, without narrow peaks or narrow valeys. And that the spectrum of the input signal does not vary so much from one chunk to another.

I think this approach is better than doing a single FFT, as you know the FFT of a random signal will have lots of randomness. Averaging may also remove effects due to quantization errors.

Since the FFT bins are equally distributed in the spectrum, each bin corresponds to a very narrow band of your spectrum, and the energy in this band is highly dependent on the signal you used, or noise, if the FFT is big. In order to have a smooth curve you can compute the energy in a wider band by applying a moving average, for instance.

  • $\begingroup$ Thanks for your answer! The spectrum of the input signal varies from one chunk to another, as it is a stepped sweep signal that changes frequency 10000 samples. $\endgroup$ – Emma1621 Apr 30 at 7:40
  • $\begingroup$ If you are stimulating your system with a harmonic wave what you have to do is to compute the power of the output in blocks within the 10k samples (excluding transient), you don't have to use FFT. $\endgroup$ – Bob Apr 30 at 9:15
  • $\begingroup$ Thanks for your quick answer! But then how do I obtain the frequency response over the whole frequency range of the sweep? $\endgroup$ – Emma1621 Apr 30 at 9:37
  • $\begingroup$ One frequency at a time. You can only, determine the frequency response in the frequencies you applied to the system. $\endgroup$ – Bob Apr 30 at 9:50
  • $\begingroup$ I'm sorry but I don't understand. If I used 500 frequencies and I do frame-by-frame deconvolution, then I would have 500 frequency responses. That is, if "f" is my 10k samples frame number, then I could do H(f) = Y(f)/X(f) My final goal is to obtain the overall frequency response of the system (in the frequency range that I applied). How do I combine each block to have an overall frequency response of the system? I saw that some people apply a weighted average, but not sure what the weights would be... $\endgroup$ – Emma1621 Apr 30 at 10:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.