[Python] Obtaining Dominant Frequency of a Time Series Data

Discussão em 'Python' iniciado por Stack, Junho 3, 2025.

  1. Stack

    Stack Membro Participativo

    I am working on accelerometer data and am trying to find the dominant frequency of my data. I use fft() function from fftpack in python. To find the dominant frequency I found the absolute value of the fft and found the frequency at which the magnitude is maximum. While doing this I get the dominant frequency to be around zero( 0-0.05 Hz). I've negated the DC content in the signal and found fft using

    import numpy as np
    import matplotlib.pyplot as plt
    from scipy import fftpack

    signal = signal - np.mean(signal)
    freq = np.linspace(0.0, sampling_rate / 2.0, row // 2) # row:-no. of readings
    signalFFT = fftpack.fft(signal)/row

    plt.plot(freq, abs(signalFFT[:row//2]))
    plt.show()


    Even then I obtain the dominant freq to be around zero.

    1. Is my method of finding the dominant freq and negating DC content correct?
    2. What does a Zero Dominant Freq imply? Or in general what does a Dominant Freq = f Hz tell about the data?
    3. What are the possible causes for Zero Dominant Frequency?
    4. Is it possible for accelerometer reading to have a Zero Dominant Frequency when we know the data is being read from a moving object
    5. What else can I do to get a Non-Zero Dominant Frequency?

    Thanks a lot :)

    Update 1:- Is there any rule that dominant frequencies of X, Y, Z axes of accelerometer should have a same or similar freq as Dominant Freq? If No could anyone please explain with an example.

    Continue reading...

Compartilhe esta Página