Matlab code to determine power spectrum without using fft

5 ビュー (過去 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 Center および File ExchangeGet 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