Reply by maury February 19, 20142014-02-19
On Monday, February 17, 2014 1:07:34 PM UTC-6, benjamin....@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
Do a search on best linear unbiased estimator (BLUE), and best least mean squared estimator (BLMSE).
Reply by mnentwig February 18, 20142014-02-18
> 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. Hi, For 1 ms, an integer number of cycles and knowing the bandwidth, you can check all the possible frequencies in parallel and pick the one that is most likely. There aren't many. A discrete Fourier transform (/FFT) will do this. Additional filtering cannot improve this type of receiver - with some disclaimer in the small print (spherical cows etc) it is optimal. _____________________________ Posted through www.DSPRelated.com
Reply by robert bristow-johnson February 18, 20142014-02-18
On 2/18/14 8:46 AM, Dave wrote:
> 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.
so Dave here points out a 0/0 solution that isn't really a solution. if you're trying to minimize the effect of white noise onto a signal that has a known and hopefully not white power spectrum, then maybe what you want is a matched filter. to design that you need to know either the power spectrum (or the autocorrelation) of the signal that you're trying to recover from the white noise. 2/18/14 1:46 PM, benjamin.couillard@gmail.com wrote:
> Sound advice, I'll try to acquire raw data (before the demodulation) and perform a noise analysis. >
yeah, i think you're on the right path.
> Thanks for the advices everyone.
have phun. -- r b-j rbj@audioimagination.com "Imagination is more important than knowledge."
Reply by February 18, 20142014-02-18
> 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.
Reply by Tim Wescott February 18, 20142014-02-18
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
Reply by Dave February 18, 20142014-02-18
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
Reply by Les Cargill February 18, 20142014-02-18
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
Reply by February 17, 20142014-02-17
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.


Reply by glen herrmannsfeldt February 17, 20142014-02-17
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
Reply by mnentwig February 17, 20142014-02-17
>> 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