Why and what should I do if a signal ampiltude decreased so much after it passed a low-frequency and a high-frequency butterpass filter

2 次查看(过去 30 天)
Hello,
I was trying to remove the noise of a heartsound, then I found in a reference that I should use a butterpass filter. But when I apply it to the signal the ampiltude decreased from 0.1 to 0.000001. I was wondering whether it is correct or how can I amplify the signal?
[y,fs] = audioread(total_path);
y = y(:,1);
dt = 1/fs;
total_t = length(y)*dt;
t = (0:dt:(total_t)-dt)';
fc=40; % the cut-off frequency for low-pass filter
filter_parameters.N=10; % order of the filter
filter_parameters.type='butter';%apply type
% of filter ('Butterworth')
filter_parameters.lphp='low'; % Set the filter to low-pass
[b,a]=make_digital_filter(fc,fs,filter_parameters);% make filter parameters
D1=filter(b,a,y);% apply the low-pass filter
N_IR=fs; % set length, in samples, of impulse
% rewponse to calculate
[h,th,H,fH]=i_f_response(b,a,fs,N_IR);%calculate the impulse and frequency response
figure
plot(th,h);% plot the impulse response
title('impulse response');
xlabel('time(s)');
figure
plot(fH,abs(H));%plot the amplitude response
title('amplitude response');
xlabel('frequency(Hz)');
ylabel('gain');
% Apply the high-pass filter
filter_parameters.lphp='high'; % Set the filter to high-pass
fc=190; % the cut-off frequency for high-pass filter
filter_parameters.N=4; % order of the filter
[b,a]=make_digital_filter(fc,fs,filter_parameters);% make new filter parameters
D2=filter(b,a,D1);
figure
plot (t,D2,'c');

采纳的回答

Star Strider
Star Strider 2022-7-13
The filtering operation removed much of the signal energy.
To amplify it, just multiply it by a constant:
D2 = D2*10;
Choose whatever value works best in your application.
.
  6 个评论
Jingyi Yuan
Jingyi Yuan 2022-7-14
Thank you so much for your reply, yes, I think it is the problem of the butterpass filter. The NaN result has been changed after I decrease the order of butterpass filter. Thanks again!

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Matched Filter and Ambiguity Function 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by