Matlab code to determine power spectrum without using fft
5 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
can someone help to get power spectrum of a signal withou using fft
0 Kommentare
Antworten (1)
Star Strider
am 26 Feb. 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.
0 Kommentare
Siehe auch
Kategorien
Mehr zu Get Started with Signal Processing Toolbox finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!