FFT of vibration data in real-time

9 views (last 30 days)
I have transmited my accelerometer data using wifi and Putty.
Can I do the FFT of this data in real-time?
If yes, some tips please.
I am doing some vibration analysis and just thinking of plotting the fft of the data as it comes with minimum delay.
I will appreciate any inputs or alternative method.

Accepted Answer

Keerthana Ramesh
Keerthana Ramesh on 16 Aug 2022
The function “fft” is applied to an entire signal and hence cannot be used on signal data as it comes. Instead, you can use the short-time fft “sfft” function on a signal of known length, after windowing the data
The "fft" function is logically applied to an entire signal, but you do not have an entire signal available in most real-time applications. Instead, you can use short time Fourier transform, "stft" on a non-stationary signal that changes over time. The “stft” of a signal is calculated by sliding an analysis window of fixed length over the signal and calculating the discrete Fourier transform of the windowed data.
You can use windowing and “stft” function because the windowing effectively cuts out the influence of events older than a certain time, then the implication is that you can process in real time by keeping a moving buffer. For example you might need to keep (say) the last 128 samples of the previous buffer, and put the current buffer at the end, and process.
You can use the buffer from the Audio System Toolbox or the DSP Toolbox and use an appropriate system object. Then you can step() the object to get the next buffer full.
I hope the above information helps you.
Thanks,
Keerthana

More Answers (0)

Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!