Matlab code to determine power spectrum without using fft

5 vues (au cours des 30 derniers jours)
ANN MATHEWS
ANN MATHEWS le 26 Fév 2016
can someone help to get power spectrum of a signal withou using fft

Réponses (1)

Star Strider
Star Strider le 26 Fév 2016
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.

Catégories

En savoir plus sur Get Started with Signal Processing Toolbox dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by