How to improve the FIR filter performance degradation when the amplitude of the input signal decreases? I'm tring to design a filter to restore the original signal from strong noise (low SNR). I have tried low pass FIR and it could work well as the amplitude of orignial signal is much higher than the background noise. My matlab code of a demo are as follows:
clear
clc
close all

time = 1:10000;
fre1 = 50;
fs = 8000;
amplitude = 100;      % amplitude of the noise

sin_signal1 = sin(2*pi*fre1*time/fs)*50;
noise = rand(1,length(sin_signal1));
noise = amplitude * sqrt(10^(-3/10))*noise;  %noise

sin_signal = sin_signal1+ noise;
figure()
plot(sin_signal);

fir_low = fir1(128,55/8000);
sin_after_filter = filter(fir_low,1,sin_signal);
figure()
plot(sin_after_filter)

When the amplitude of noise is low (eg. amplitude = 0.5), namely a high SNR, the low pass FIR works very well. But when the amplitude of noise is high (eg. amplitude = 150), namely a low SNR, the low pass FIR works very bad.
For a well-designed filter, only changing the amplitude of noise, but not the frequency, why will the performance of the filter degrade? Can't even filter the signal? How to improve the problem? Thanks!
A linear filter just attenuate some frequencies more and others less. If you alter the SNR, the output of the FIR filter should change accordingly.
Many applications use more elaborate noise reduction methods in stead of (or in addition to) linear filtering. If you know that your signal is going to be a sine of known frequency, you may estimate its phase and amplitude embedded in noise using a matched filter. If you know that your noise is shot-noise, you could try to exploit that.
You noise seems to be uniform (non-zero mean) noise. Did you intend to call the normal distributed randn()?
-k