DSPRelated.com
Forums

Optimal filter(s) to remove white noise

Started by Unknown February 17, 2014
Hi everyone,

I' have stumbled upon some interesting info while looking for Digital signal processing litterature.

http://www.analog.com/static/imported-files/tutorials/MT-017.pdf

"Many scientists and engineers feel guilty about using the moving average filter.
Because it is so very simple, the moving average filter is often the first thing
tried when faced with a problem. Even if the problem is completely solved,
there is still the feeling that something more should be done. This situation is
truly ironic. Not only is the moving average filter very good for many
applications, it is optimal for a common problem, reducing random white noise
while keeping the sharpest step response."

So the moving-average filter is an optimal filter to reduce random white noise while keeping the sharpest step respose. Suppose that we do not want to keep the sharpest step response, which filter(s) would be better to reduce random white noise compared to the moving-average?

Regards
On Mon, 17 Feb 2014 11:07:34 -0800, benjamin.couillard wrote:

> Hi everyone, > > I' have stumbled upon some interesting info while looking for Digital > signal processing litterature. > > http://www.analog.com/static/imported-files/tutorials/MT-017.pdf > > "Many scientists and engineers feel guilty about using the moving > average filter. > Because it is so very simple, the moving average filter is often the > first thing tried when faced with a problem. Even if the problem is > completely solved, > there is still the feeling that something more should be done. This > situation is truly ironic. Not only is the moving average filter very > good for many applications, it is optimal for a common problem, reducing > random white noise while keeping the sharpest step response." > > So the moving-average filter is an optimal filter to reduce random white > noise while keeping the sharpest step respose. Suppose that we do not > want to keep the sharpest step response, which filter(s) would be better > to reduce random white noise compared to the moving-average?
That depends on what you want. There's a whole body of literature on finding optimal filters. I used to sweat about things like this, until I realized two things: first, that I was sweating on my employer's dime; and second, that the whole optimal filter design exercise usually depends on assumptions that are chosen more to make the math easy than to actually fit the problem at hand. So now I generally figure that if I've exceeded the requirements then I'm golden, even if I could hold my customer's products back for months and charge them tens of thousands of dollars looking for "best" when what they want is "good enough and on store shelves". -- Tim Wescott Wescott Design Services http://www.wescottdesign.com
On Mon, 17 Feb 2014 11:07:34 -0800 (PST), benjamin.couillard@gmail.com
wrote:

>Hi everyone, > >I' have stumbled upon some interesting info while looking for Digital signa= >l processing litterature. > >http://www.analog.com/static/imported-files/tutorials/MT-017.pdf > >"Many scientists and engineers feel guilty about using the moving average f= >ilter. >Because it is so very simple, the moving average filter is often the first = >thing >tried when faced with a problem. Even if the problem is completely solved, >there is still the feeling that something more should be done. This situati= >on is >truly ironic. Not only is the moving average filter very good for many >applications, it is optimal for a common problem, reducing random white noi= >se >while keeping the sharpest step response." > >So the moving-average filter is an optimal filter to reduce random white no= >ise while keeping the sharpest step respose. Suppose that we do not want to= > keep the sharpest step response, which filter(s) would be better to reduce= > random white noise compared to the moving-average? > >Regards
For something to be "optimal" there first has to be an optimality criterion. What do you want optimized? What does "optimal" mean to you? To muddy it up even more, what does "reduce random white noise" mean to you? Reduce the psd equally at all frequencies? Reduce the psd in a particular band? Something else? So it's kind of hard to answer your question. Eric Jacobsen Anchor Hill Communications http://www.anchorhill.com
>> So the moving-average filter is an optimal filter to reduce random white
noise while keeping the sharpest step respose. Well, in my book, a step response that doesn't overshoot a little is not the sharpest I could do, in a sense of (for example) getting from 10% to 90% as quickly as possible. Nonetheless, it can be an excellent engineering solution because it is extremely cheap for the filtering you get out of it, both in RTL and software (i.e. CIC filter). They are especially popular at higher sample rates, where taps are expensive but the fractional bandwidth is narrow and the filter doesn't have to be razor-sharp. I've got a matlab script to study those, here: http://www.dsprelated.com/showcode/262.php _____________________________ Posted through www.DSPRelated.com
benjamin.couillard@gmail.com wrote:
 
> I' have stumbled upon some interesting info while looking for > Digital signal processing litterature.
> http://www.analog.com/static/imported-files/tutorials/MT-017.pdf
> "Many scientists and engineers feel guilty about using the moving > average filter. > Because it is so very simple, the moving average filter is often > the first thing tried when faced with a problem. Even if the > problem is completely solved, there is still the feeling that > something more should be done. This situation is truly ironic.
Well, even simpler in many cases is the decaying average filter. In the DSP world, where one considers the frequency domain response of a filter, it is easy to see the response of moving average, and ask if that is what you wanted.
> Not only is the moving average filter very good for many > applications, it is optimal for a common problem, reducing > random white noise while keeping the sharpest step response."
If you don't have hardware mulitiply, then moving average is easy enough. If you have multiply available, and you can run any FIR of a specified length, then you can compare other FIR to moving average. It is when you show the frequency response, and someone says "Oh, I didn't want that!" that you move away from moving average. If you are doing the calculation by hand, it is a lot easier! -- glen
Basically, I'm analyzing an old design that we have and I'm trying to see if it could be improved in terms of noise rejection. I understand that noise rejection is quite vague.

We have a sampled carrier of 50 kHz, sampled at 1 MHz. The acquisition windows is 1 ms  After that 1 ms, another frequency is generated say 60 kHz for another 1 ms.

We perform a synchronous demodulation with a sine and cosine of 50 kHz. After the demodulation, we will have a "DC" component along with 50Khz (because of a slight DC bias) 100 kHz, 150 kHz, etc.

Now the data is averaged on 1 ms, which gives an integer number of period of the carrier so there should be perfect cancellation of the noise from the harmonics of the carrier. Sorry I have been misleading with the term "moving-average", it's more of a block average followed with a decimation of 1000.


benjamin.couillard@gmail.com wrote:
> Hi everyone, > > I' have stumbled upon some interesting info while looking for Digital > signal processing litterature. > > http://www.analog.com/static/imported-files/tutorials/MT-017.pdf > > "Many scientists and engineers feel guilty about using the moving > average filter. Because it is so very simple, the moving average > filter is often the first thing tried when faced with a problem. Even > if the problem is completely solved, there is still the feeling that > something more should be done. This situation is truly ironic. Not > only is the moving average filter very good for many applications, it > is optimal for a common problem, reducing random white noise while > keeping the sharpest step response." > > So the moving-average filter is an optimal filter to reduce random > white noise while keeping the sharpest step respose. Suppose that we > do not want to keep the sharpest step response, which filter(s) would > be better to reduce random white noise compared to the > moving-average? > > Regards >
But if moving average works - meets spec - wouldn't the prudent thing be to stop looking? -- Les Cargill
On Monday, February 17, 2014 4:49:22 PM UTC-5, benjamin....@gmail.com wrote:
> Basically, I'm analyzing an old design that we have and I'm trying to see if it could be improved in terms of noise rejection. I understand that noise rejection is quite vague. > > > > We have a sampled carrier of 50 kHz, sampled at 1 MHz. The acquisition windows is 1 ms After that 1 ms, another frequency is generated say 60 kHz for another 1 ms. > > > > We perform a synchronous demodulation with a sine and cosine of 50 kHz. After the demodulation, we will have a "DC" component along with 50Khz (because of a slight DC bias) 100 kHz, 150 kHz, etc. > > > > Now the data is averaged on 1 ms, which gives an integer number of period of the carrier so there should be perfect cancellation of the noise from the harmonics of the carrier. Sorry I have been misleading with the term "moving-average", it's more of a block average followed with a decimation of 1000.
Unfortunately reducing the random white noise leads to the trivial answer - Just zero the output and you'll get infinite noise rejection. To get a more meaningful answer you need to modify what you mean by optimal and often that means understanding the problem well enough to know what the consequences are. Often you define an optimality criterion and design a filter to solve it - only to find out it has some unintended consequences. Dave
On Mon, 17 Feb 2014 13:49:22 -0800, benjamin.couillard wrote:

> Basically, I'm analyzing an old design that we have and I'm trying to > see if it could be improved in terms of noise rejection. I understand > that noise rejection is quite vague. > > We have a sampled carrier of 50 kHz, sampled at 1 MHz. The acquisition > windows is 1 ms After that 1 ms, another frequency is generated say 60 > kHz for another 1 ms. > > We perform a synchronous demodulation with a sine and cosine of 50 kHz. > After the demodulation, we will have a "DC" component along with 50Khz > (because of a slight DC bias) 100 kHz, 150 kHz, etc. > > Now the data is averaged on 1 ms, which gives an integer number of > period of the carrier so there should be perfect cancellation of the > noise from the harmonics of the carrier. Sorry I have been misleading > with the term "moving-average", it's more of a block average followed > with a decimation of 1000.
For a lot of noise, and a lot of optimality criteria, that'll be optimal or close to it. It's almost certain that you need to change the problem -- i.e., less noise in your source (or sensors, or preamp, or whatever), a longer integration time, etc. Without more information it's hard to tell. If you know how to do a noise analysis I'd suggest that you just buckle down, prepare to be bored for a few days, and go through the system with a fine-toothed comb. -- Tim Wescott Wescott Design Services http://www.wescottdesign.com
> For a lot of noise, and a lot of optimality criteria, that'll be optimal > > or close to it. > > > > It's almost certain that you need to change the problem -- i.e., less > > noise in your source (or sensors, or preamp, or whatever), a longer > > integration time, etc. Without more information it's hard to tell. > > > > If you know how to do a noise analysis I'd suggest that you just buckle > > down, prepare to be bored for a few days, and go through the system with > > a fine-toothed comb. > > > > -- > > > > Tim Wescott > > Wescott Design Services > > http://www.wescottdesign.com
Sound advice, I'll try to acquire raw data (before the demodulation) and perform a noise analysis. Thanks for the advices everyone.