How to plot FFT of time domain data?
Mostrar comentarios más antiguos
Dear all...
I have vibration data from Digital Storage Oscilloscope (DSO), the extension is 'xxx.CSV' . I need to convert it into Freq Domain (Magnitude vs Freq). I've tried several times and still stuck, I can't import that data into the formula/function. I've attached an excel file I got from the DSO (only 75KB), maybe you can download and see the excel files for complete information (like sample rate, length of signal,sample interval, etc). Ignore the CH2 (Impulse Hammer input) for a while, I only need the FFT from CH1 and plot it.. Can you guys help and suggest me, what function/formula should I write?
Thanks in advance
Regards
Respuesta aceptada
Más respuestas (2)
Geoff Hayes
el 16 de Sept. de 2014
Nelson - it may be helpful to include what you have tried so that others can see what the problem may be and offer advice.
For importing the data from the csv file, consider using importdata. This will allow you to separate the header lines (of which you have ten) from the rest of the numeric data
myData = importdata('ADS00001.csv',',',10);
myData will be a structure; the numeric data (a 2992x6 matrix) will be in the field data. This matrix has three empty columns (the first three) followed by (presumably) the time stamp for each sample, the CH1 data, and the CH2 data
timestampsSec = myData.data(:,4); % in seconds
ch1Data = myData.data(:,5); % volts?
From timestampsSec we observe that the sample rate, Fs, is 1/2e-05 or 50000 samples per second. However there is only about 3/10 of a second's worth of valid data (the first 3/10 correspond to negative timestamps and the ch1 data is near zero - you will see this when you plot the data, time vs ch1).
See fft for examples on how you would transform ch1Data from the time domain to the frequency domain, and plot the result.
pilot 88
el 18 de Mzo. de 2016
0 votos
Dear all,
How can I do FFT from my excel data - this accelerometer data from vibration test. The
FS = 500 Hz
First column = time
Second column is acceleration (m/s^2).
Data is as attached.
Thank you very much.
Categorías
Más información sobre Descriptive Statistics en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!