Matlab code to determine power spectrum without using fft

조회 수: 25 (최근 30일)
ANN MATHEWS
ANN MATHEWS 2016년 2월 26일
답변: Star Strider 2016년 2월 26일
can someone help to get power spectrum of a signal withou using fft

답변 (1개)

Star Strider
Star Strider 2016년 2월 26일
The only possible way to approximate that is to use a bank of bandpass filters, something like this:
Fs = 8200; % Samping Frequency (Hz)
Fn = Fs/2; % Nyquist Frequency
pf = linspace(20,4000,17); % Passband Frequencies
cf = pf(1:end-1)+(pf(2)-pf(1))/2; % Centre Frequencies
for k1 = 1:length(cf)
[z(k1,:),p(k1,:),k(k1)] = butter(7, [pf(k1) pf(k1+1)]/Fn);
[sos{k1},g{k1}] = zp2sos(z(k1,:),p(k1,:),k(k1));
[h(k1,:),w(k1,:)] = freqz(sos{k1},512,Fs);
end
figure(1)
plot(w([1 16],:), abs(h([1 16],:)))
grid
% axis([0 0.2 ylim])
figure(2)
freqz(sos{1})
hold on
for k1 = 2:16
freqz(sos{k1})
end
hold off
% filtfilt
You would then do the filtering in parallel to separate the signals in the different bands. A for loop would work for that, but it would of course be slow.
You may want to design your own filters. My filter design procedure is in: How to design a lowpass filter for ocean wave data in Matlab?
The filter bank of bandpass filters are from an earlier Answer for a similar Question. Make the necessary changes to work with your signal and to meet your requirements.

카테고리

Help CenterFile Exchange에서 Get Started with Signal Processing Toolbox에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by