Moving window integrator

Status
Not open for further replies.

Rani1234

Newbie level 2
Joined
Nov 17, 2017
Messages
2
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Activity points
12
how to implement this equation y(nT)=1/N[a(nT-(N-1)T)+a(nT-(N-2)T)+...+a(NT)] using moving average filter or moving window integrator?where N=65 samples
 

Hi,

To me it seems as a rather un-elaborated question.

What about a bit more explanation about the variables? and the function?
And the data format? The timing, the used device, what language...

Klaus
 
integer datatype
language: verilog
 

I usually start by opening my favorite text editor and mashing my fingers on the keyboard....
 

This is often implemented using a delay line. the expression also simplifies to a recursive version -- not an IIR filter, just a recursive implementation of a FIR filter.

on each cycle, the difference between the 66th prior input and the incoming input is taken and added to an accumulator. Thus you need a subtraction, a delay line, and an accumulator.

for 1/65, you compute (2**B)/65 as an integer and then find (((2**B)/65) * y)/(2**B). division by a power of two can be implemented as a shift. synthesis tools will do this for you, although signed types convert this to a shift and conditional add. At least for VHDL, I don't know if Verilog also follows C conventions, but I suspect it would.
 

Status
Not open for further replies.

Similar threads

Cookies are required to use this site. You must accept them to continue using the site. Learn more…