Hello all
i have a digital signal which is an overlay of three signals. breathe(10-20/minute, lowest frequency of high energy), at the end of which there is a high frequency signal (snore) and a periodical signal (heart beat 60-80/minute). I need to create filters on matlab to isolate the three signals with almost zero phase distortion.
The signal (wav file) is here sites.google.com/site/wavesignalfile
I am no expert on dsp so all suggestions comments and ideas are very very welcomed. here is what i have done so far. i tried the fft on the signal and after that i filtered the frequency bands. breathe seems legit, heart beat seems not periodical and i do not know how to isolate snoring since i only know that the frequency is "high". feel free to tell me to try stuff but please be descriptive one step at a time.
Many thanks for reading this.
matlab code:
i have a digital signal which is an overlay of three signals. breathe(10-20/minute, lowest frequency of high energy), at the end of which there is a high frequency signal (snore) and a periodical signal (heart beat 60-80/minute). I need to create filters on matlab to isolate the three signals with almost zero phase distortion.
The signal (wav file) is here sites.google.com/site/wavesignalfile
I am no expert on dsp so all suggestions comments and ideas are very very welcomed. here is what i have done so far. i tried the fft on the signal and after that i filtered the frequency bands. breathe seems legit, heart beat seems not periodical and i do not know how to isolate snoring since i only know that the frequency is "high". feel free to tell me to try stuff but please be descriptive one step at a time.
Many thanks for reading this.
matlab code:
Code:
clear;
[x, Fs] = audioread('wave.wav'); %Fs Sampling frequency
figure,plot(x);
title(' Wave Signal');
xlabel('Time');
ylabel('Amplitude');
y=fft(x);
f = (0:size(y,1)-1)*Fs/size(y,1); % Frequency vector
figure,plot(f,real(y));
title('Power Spectrum of Wave');
xlabel('Frequency (Hz)');
ylabel('Power');
y1=y; y1(:)=0; %breathe
y2=y; y2(:)=0; %heart beat
y3=y; y3(:)=0; %snore
for i=1:size(y,1)
if(f(i)>0.1666 && f(i)<0.3334) % breathe 10-20/min equals to 0.16-0.33/sec is that correct????
y1(i)=y(i);
elseif(f(i)>1 && f(i)<1.33) %heart
y2(i)=y(i);
% elseif(f(i)> && f(i)> ) %snore
% y3(i)=y(i);
end
end
x1=ifft(y1,'symmetric');
figure,plot(real(x1));
title(' Breathe Wave Signal');
xlabel('Time');
ylabel('Amplitude');
x2=ifft(y2,'symmetric');
figure,plot(real(x2));
title(' Heart Wave Signal');
xlabel('Time');
ylabel('Amplitude');
%x3=ifft(y3,'symmetric');
%figure,plot(real(x3));
%title(' Snore Wave Signal');
%xlabel('Time ');
%ylabel('Amplitude');