Help understanding FFT plot

2 visualizaciones (últimos 30 días)
Laura Moylan
Laura Moylan el 13 de Ag. de 2016
Comentada: Star Strider el 17 de Ag. de 2016
Hello, I'm hoping someone might be able to help me understand what my plot means. I need to conduct an FFT and PSD for some EEG data. The sample rate is 512 and I am currently using 2 seconds worth of data. I have been given the following code
subplot (2,1,1); plot (F4, 'k'); title ('Original F4 Signal')
duration =2;
samples = 1024; %sample rate 1024Hz for all patients except Patient 2 (512Hz)
samplingInterval = duration/samples;
bandwidth = 70;
time = linspace (0, duration, samples);
freq = linspace (-bandwidth, bandwidth, 1024);
% freq = linspace (-1.0e3, 1.0e3, 500);alternative baseline
fourierSpace = fftshift(ifft(F4));
subplot (2,1,2); plot (freq, abs(fourierSpace),'k'); title ('frequency')
I set the bandwidth at 70 as the high frequency filter was 70 during recording. F4 is simply the name of the channel that I am analysing. All other information in the code is as it was given to me.
When I run the code on the data the plot looks like this:
The PSD code I've been given is
% For EEG
t = linspace (0, 2, 1024);
x = F4;
h = spectrum.periodogram('Rectangular');% Or Blackman-Harris
%h = spectrum.periodogram('Blackman-Harris');% Or Rectangular
hopts = psdopts(h,x); % Default options based on the signal x
set(hopts,'Fs',1/(t(2)-t(1)),'SpectrumType','twosided','CenterDC',true);
psd(h,x,hopts)
The plot comes out like this:
If anyone can help me shed a little light on what all of this means I'd be eternally grateful! Apologies for such basic questions.... I'm very new to this!

Respuesta aceptada

Star Strider
Star Strider el 13 de Ag. de 2016
I would use a one-sided fft as in the documentation (link), and not do the fftshift. Displaying a two-sided fft does not give you any more information, and actually makes the information you have more difficult to interpret.
I have no comments on the PSD section of the code. It looks correct to me.
  2 comentarios
Laura Moylan
Laura Moylan el 17 de Ag. de 2016
Thank you
Star Strider
Star Strider el 17 de Ag. de 2016
My pleasure.

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Parametric Spectral Estimation en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by