0
$\begingroup$

I want to figure out how much of my total noise is getting through my filter. To see this, I generated a noise vector, applied the filter, and measured the output variance. However, the output variance changes if I scale my filter (as would be expected). I suspected that I needed to normalize the DC gain to be one, but I'm not sure if that is the right approach. Here's my code:

noiseVector = randn(1,1e6);
varOrig=var(noiseVector)

filterCoeff = rcosdesign(0.2,10,12);

filteredNoise1 = conv(noiseVector,filterCoeff);
var1=var(filteredNoise1)

filteredNoise2 = conv(noiseVector, filterCoeff/sum(filterCoeff));
var2=var(filteredNoise2)

There's a big difference between var1 ($\approx 1.00$) and var2 ($\approx 0.08$). Var1 would indicate that essentially all of the noise power was getting through the filter, but var2 would say that most of the noise is filtered out.

I also plotted the response of the unnormalized filter Unnormalized filter response and of the normalized filter. Normalized filter response As expected, the DC gain of the normalized filter is 1 (0 dB).

For my purpose of characterizing how much noise is getting through the filter, should I be using the normalized one (and is that normalization factor the right one)?

$\endgroup$
  • $\begingroup$ Do you have to find out the numerical value of the variance of the output noise? In most cases, it is the signal-to-noise ratio (SNR) that is of interest, and since the signal power scales up with increased gain just as the noise variance does, the SNR does not depend on filter gain at all. If you insist that the numerical value of the variance is of paramount importance, then choose your gain and include this information in the data that you give to your boss or client. $\endgroup$ – Dilip Sarwate Apr 9 '18 at 23:15
  • $\begingroup$ I do want to find the value of the output noise. I see what you mean, that reporting SNR removes any source of confusion. But when you say to choose a gain, how would you report that? Is it the H(0) value or the max(H(w))? $\endgroup$ – Trey Apr 10 '18 at 11:15
  • $\begingroup$ As the scalar factor between the in and output amplitude of a signal passing through the matched filter. $\endgroup$ – Marcus Müller Apr 10 '18 at 13:49
0
$\begingroup$

For my purpose, the correct method should normalize the filter so that the sum of the filter coefficients is 1. The DC value is normalized because this is a low-pass filter. It would be different if the filter were something else, like pass-band.

Here's the code and plots that convinced me.

noiseVector = randn(1,1e5);
[Pxx_noiseOrig, W]=pwelch(noiseVector,hamming(100),[],[],60e6,'centered'); 

filterCoeff = rcosdesign(0.2,10,12);

filteredNoise1 = conv(noiseVector,filterCoeff);
[Pxx_noise1, ~]=pwelch(filteredNoise1,hamming(100),[],[],60e6,'centered'); 


filteredNoise2 = conv(noiseVector, filterCoeff/sum(filterCoeff));
[Pxx_noise2, ~]=pwelch(filteredNoise2,hamming(100),[],[],60e6,'centered'); 

figure('Units','inches')
plot(W/1e6,10*log10([Pxx_noiseOrig, Pxx_noise1, Pxx_noise2]),'Linewidth',2)
grid on
set(gca,'FontSize',12)
legend({'Unfiltered','No scaling','Scaled'},'FontSize',12,'Location','SouthEast')
xlabel('Frequency (MHz)','FontSize',12)
ylabel('Power (dBW)','FontSize',12)
title('Comparison of ouput PSDs','FontSize',14)
get(gcf,'Position');
set(gcf,'Position',[pos(1) pos(2) 5 3])
print('~/Downloads/filteredNoiseComparison','-dpng','-r400')

Plot of Unfiltered and Filtered Noise

The plot shows that the original filter had a gain in the passband. After scaling, the noise power in the passband stays the same. My goal was to see how much noise was getting through the filter, so scaled version was the one to use.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.