Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Moving Average Filter (DSP)

Status
Not open for further replies.

DigiSig

Newbie level 2
Joined
Apr 8, 2011
Messages
2
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,300
Hello

one says that moving average filters (MAF) are good in the time domain (TD) and bad in freqeuency domain (FD). And that windowed-sinc filters are good in FD and bad in TD.

But now I am wondering if in case of MAF it's nevertheless okay to transform the kernel and the data via FFT to FD, doing there an elementwise multiplication and finally applying an iFFT to get the results in TD, instead of processing the convolution in TD?!

One the one hand it would be surprising myself if this mathematically procedure (convolution in TD is multiplication in FD) is not allowed here. One the other hand why is the result still good, even if I make the process in FD (where the MAF seems to be not good)?


And finally: Is there a difference between doing just a usual FFT on the time domain data, or applying a "convolution FFT" ("overlap-and-add"-method for example) on the data? I don't know when I should use the former or the latter?

Regards
Dig
 

Can you please define what good and bad is
A MAF gives the same results as oversampling; It increases the ENOB (effective number of bits) , increases the FFT line resolution and decreases the effective bandwidth (Low pass filter)
 

Literature says:

AMF is good smoothing filter (TD), bad low pass filter (FD).

Bad regarding: roll-off, stop-band-attenuation, separating frequencies from each other
 

the transform of a square box, moving average in td, or ideal lp in the fd is a sinc function.

but a sinc funtion is noncausal and iir. the fir filter can get the ideal frequency response at up to N frequencies. the window is used to trade off exact precision at these N frequencies for improved precision at the frequencies in between. it is also an easy way to design a filter.

simple moving average is used because it is easy to design and implement.

---------- Post added at 19:08 ---------- Previous post was at 19:02 ----------

oh, and the simple moving average can also be done using convolution, but if you need to do complex multiplies, why not choose a better filter? eg, one based on the actual bandwidth or requirements of the system
 

Hello!

Using FFT - multiplication - IFFT is called fast convolution.
I don't know if it's your intention, but it would be rather silly to use fast convolution for a
moving average. If you do a n-tap moving average, then you don't need a convolution.
You just add the current sample s[0] and subtract the nth element s[n]. Therefore 2 additions.
If you do it by FFT, then you will just waste processing power.

Dora.
 

It is possible that the statement "...good in the time domain" refers to the phase linearity of the MAF. If you consider the MAF as a filter with equal weighting coefficients of 1/n, where n is the number of coefficients, then it is apparent that the filter will have phase linearity, which is an important property in some applications. Any FIR filter, (not just the MAF), with coefficients that are symmetrical about the mid point tap will have linear phase.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top