11 views (last 30 days)

Hello guys!

I am working on a frequency analysis for skin conductance. The frequencies expected on those kinds of signals are very low (between 0.045 and 0.25 Hz), so I would like to get the PSD in specific low-frequency ranges, i.e. (0 - 0.045), (0.045 - 0.15), (0.15 - 0.25), and the total power of the signal. To do so, I computed the Fast Fourier Transform, but now the problem is computing the power spectrum after the fourier.

The tutorials from Matlab have not been of much help, and also there are so many functions that can be used that I'm feeling a little lost at the moment! Can anyone help me work out this issue? Among the many options, which one do you think works best, in terms of both efficacy and computational time? I'm not looking for anything too fancy really, just an efficacious and standard protocol.

The processing pipeline I am following is:

- 8th order Chebyshev Type I lowpass filter, with 0.8 cutoff
- Downsampling from 4 to 2 Hz (factor = 2)
- 8th order Butterworth highpass filter with 0.01 cutoff (do you think is appropriate, given that I'm mostly interested in low frequencies?)
- Welch's periodogram (50% overlap)
- Blackman window (128 points) applied to each segment
- FFT computer on each windowed segment

I also attached the code because it would be amazing to have examples or suggestions about how to proceed based on real examples! Any advice is always appreciated!

Thank you very much to any of you who is willing to help!

Luca

LO
on 13 Jul 2020

try this example:

sampling_freq = 5000

window = 8192,

noverlap = 4096,

nfft = 8192,

[p,f] = pwelch(your_signal, 8192,4096,8192,5000);

max_power=10*log10(max(p)); % this would be the max power

plot(f,10*log10(p)); % this would be the power plot

LO
on 13 Jul 2020

well they fit my data. is like the binning for the histogram function.

in general nfft is a power of 2 (in my case I use often 2^10), in this case is much higher because I want to estimate the power over a larger sample (but is the sampling freq which determines the time range of what you want to measure the power of... for instance you have a sampling freq of 5000, it means you have 5000 points per sec.

for how many seconds you want to measure of your signal? this is basically the question you need to answer, but there is no rule, it depends on your data and what you want to get out of them.

the window size also, it represents just the amount of data points you want to analyze at each FFt cycle

the overlap improves the "resolution" of such analysis - as it determines the percentage of overlap between adjacent FFT analysis windows (you could set it very low or even very high, normally in my formulas is a fraction of the nfft, such as overlap = round(0.9*nfft) for a 90% overlap).

hope it helps !

LO
on 14 Jul 2020

Opportunities for recent engineering grads.

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

Start Hunting!
## 4 Comments

## Direct link to this comment

https://www.mathworks.com/matlabcentral/answers/563720-power-spectra-estimation-after-fft#comment_933767

⋮## Direct link to this comment

https://www.mathworks.com/matlabcentral/answers/563720-power-spectra-estimation-after-fft#comment_933767

## Direct link to this comment

https://www.mathworks.com/matlabcentral/answers/563720-power-spectra-estimation-after-fft#comment_934883

⋮## Direct link to this comment

https://www.mathworks.com/matlabcentral/answers/563720-power-spectra-estimation-after-fft#comment_934883

## Direct link to this comment

https://www.mathworks.com/matlabcentral/answers/563720-power-spectra-estimation-after-fft#comment_935126

⋮## Direct link to this comment

https://www.mathworks.com/matlabcentral/answers/563720-power-spectra-estimation-after-fft#comment_935126

## Direct link to this comment

https://www.mathworks.com/matlabcentral/answers/563720-power-spectra-estimation-after-fft#comment_935174

⋮## Direct link to this comment

https://www.mathworks.com/matlabcentral/answers/563720-power-spectra-estimation-after-fft#comment_935174

Sign in to comment.