I have a vibration signal coming from a motor measured from accelerometer (Irregular Time series) and I need to use these signals for analysis purpose.


I am in need to transform this signal to some form for analysis purpose. I read few blogs and websites containing vibration signal processing technique. The basic thing is to transform the signal from time domain to frequency domain.

So I used the fft function to transform using R

X.k <- fft(signal)

plot.frequency.spectrum() plot a frequency spectrum of a given fft [Link: here]

plot.frequency.spectrum <- function(X.k, xlimits=c(0,length(X.k))) {
  plot.data  <- cbind(0:(length(X.k)-1), Mod(X.k))

  plot.data[2:length(X.k),2] <- 2*plot.data[2:length(X.k),2] 

  plot(plot.data, t="h", lwd=2, main="", 
       xlab="Frequency (Hz)", ylab="Strength", 
       xlim=xlimits, ylim=c(0,max(Mod(plot.data[,2]))))

The frequency spectrum of this fft looks like this her

The first peak is extremely high. I don't know why this happens as am new to signal processing techniques. I cannot use this for analysis purpose and do prediction as it will end in bad results. Any other ways to do this method? Or do I need to use other techniques?

  • 2
    $\begingroup$ Can you zoom in to that signal? It looks very clipped, and like data is missing $\endgroup$
    – endolith
    Commented Aug 16, 2017 at 13:35

3 Answers 3


The first peak is the DC component of your spectrum which is large compared to the AC components (your signal doesn't have negative value and its always above zero which lead to large DC bias)

Find average of your signal over time and subtract it from your signal to remove the DC component.

Good luck.

  • $\begingroup$ Thank you. Are there any way i can extrapolate/predict the signal in frequency domain and again convert it into time domain? because i want to predict the future vibration data. I don't know whether i can use this frequency spectrum as a predictive model. $\endgroup$
    – dhinar1991
    Commented Aug 22, 2017 at 6:28
  • $\begingroup$ if you know the model which your signal obey you could predict it, e.g auto regressive predictions but it's not necessary to do it in frequency domain. $\endgroup$
    – Mohammad M
    Commented Aug 22, 2017 at 15:41

data get from accelerometer include so much noise, before doing FFT, you can use a notch filter to filter out dc component

  • $\begingroup$ that would only help the DC bin of the DFT? you can just not filter, and then DFT, and ignore the zeroth bin. $\endgroup$ Commented Aug 16, 2017 at 18:46

It seems your question has to do with the utility of FT. So first you need to decide what it is you want to see. Are you interested in seeing a distribution of power over frequency? If that is what you need then FFT is your tool of choice. There is really nothing else for this purpose. As the other people have said, your signal as it is obvious from the trace has a dc component. This needs to be taken out first, as it tells you nothing useful. You can already see it by the y-axis of your time domain signal.

Once you remove the average, then you will be able to see where the power falls , i.e. in what frequencies. For that to be meaning full, you need to have some idea of the bandwidth that you are interested in. Remember that for a given FFT size, N, your resolution will be Fs/N, where Fs is your sampling frequency, so you need to know that to convert your FFT x-axis (or bin numbers) to actual frequencies.

Charan Langton www.complextoreal.com


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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