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');
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1064260/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1064265/image.png)
0 个评论
采纳的回答
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.
.
更多回答(0 个)
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!