How to evaluate (signal power at a given frequency) compared to time in python

I am looking for a good way to evaluate the signal power (sampling frequency, say, at a frequency of 10 kHz), versus time at a single frequency (e.g. 50 Hz). I could calculate the spectrogram, and then take part of it at the target frequency. This seems inefficient, though, since I only care about power at one frequency versus time. I understand that the power at one frequency is zero (in the limit), I would like to calculate the signal power within a small frequency interval around the target frequency.

My current "solution" is to use the Matplotlib mlab.specgram () function, which returns a 2d power array, and I just slice it. I do not agree with this because I do not completely trust the mab.specgram () function, since it takes a huge amount of time to calculate the spectrogram for different signals (even if they have the same length).

+3
source share
1 answer

There are many ways to do this. One crude but effective way is to use a band-pass filter (at a frequency of 50 Hz), thereby eliminating all other signals, and then calculate the RMS power of the last N samples.

FFT, FFT - . , (, Kaiser -8). - e ^ (i * n * w) ( w - 50 , n - ).

, , . , , . , .

+7

Source: https://habr.com/ru/post/1791123/


All Articles