DSPRelated.com
Forums

Filters for frequency inputs

Started by Les Cargill May 29, 2015
eric.jacobsen@ieee.org (Eric Jacobsen) writes:

> On Sat, 30 May 2015 21:15:39 -0400, Randy Yates > <yates@digitalsignallabs.com> wrote: > >>Les Cargill <lcargill99@comcast.com> writes: >>> [...] >>> Tim Wescott wrote: >>>> Note that what I gave you was a 2-tap boxcar with a pole at z = 0; >>> >>> Yeah, it compares quite closely with a classic moving average. >> >>Boxcar, moving average - same damn thing. > > Ah, semantic fight!
Hello Eric, <BAP>, <POWIE>, <ZAP> (<=== that's supposed to be a simile of the old Batman series of fight verbs.)
> I argue that a boxcar is an equally-weighted Moving Average, and > anything else is a weighted Moving Average. So a FIR is always a > Moving Average. > > That's the MA in ARMA, anyway. ;)
Yes, except for that one case, most people think of a moving average as a <uhm> average.
> So a boxcar is perhaps a degenerate case of a Moving Average.
I thought you were going to say a boxcar doesn't necessarily have magnitude 1 / N.
> Just my dos centavos.
I'll raise you cinco centavos. -- Randy Yates Digital Signal Labs http://www.digitalsignallabs.com
Randy Yates <yates@digitalsignallabs.com> writes:

> I'll raise you cinco centavos.
Or should that be pesos? -- Randy Yates Digital Signal Labs http://www.digitalsignallabs.com
On Sat, 30 May 2015 22:04:37 -0400, rickman <gnuarm@gmail.com> wrote:

>On 5/30/2015 9:51 PM, Eric Jacobsen wrote: >> On Sat, 30 May 2015 21:15:39 -0400, Randy Yates >> <yates@digitalsignallabs.com> wrote: >> >>> Les Cargill <lcargill99@comcast.com> writes: >>>> [...] >>>> Tim Wescott wrote: >>>>> Note that what I gave you was a 2-tap boxcar with a pole at z = 0; >>>> >>>> Yeah, it compares quite closely with a classic moving average. >>> >>> Boxcar, moving average - same damn thing. >> >> Ah, semantic fight! >> >> I argue that a boxcar is an equally-weighted Moving Average, and >> anything else is a weighted Moving Average. So a FIR is always a >> Moving Average. >> >> That's the MA in ARMA, anyway. ;) >> >> So a boxcar is perhaps a degenerate case of a Moving Average. > >Don't you think a moving average is pretty clear without an explicit >indication that it is not weighted? I'm not sure what you are trying to >distinguish.
Weighted averages are not uncommon. So IMHO when it comes to a FIR filter and somebody says "moving average", it often needs a clarification of whether they mean a boxcar or not. One cannot assume either way, because that's Yet Another Term in DSP that is overloaded. Plus there's the whole ARMA thing, so it's been used in the lit for a long time to mean something other than a boxcar.
>BTW, why would you use the abbreviation ARMA, even in this group, >without explanation? I bet I'm not the only one who had to look it up.
I didn't spell out FIR, either. My bad.
> >> Just my dos centavos. > >Thanks, now I can have that operation I've been needing...
Boob job?
>-- > >Rick
Eric Jacobsen Anchor Hill Communications http://www.anchorhill.com
On Sun, 31 May 2015 00:41:52 -0400, Randy Yates
<yates@digitalsignallabs.com> wrote:

>Randy Yates <yates@digitalsignallabs.com> writes: > >> I'll raise you cinco centavos. > >Or should that be pesos?
Mas cerveza.
>-- >Randy Yates >Digital Signal Labs >http://www.digitalsignallabs.com
Eric Jacobsen Anchor Hill Communications http://www.anchorhill.com
On Sat, 30 May 2015 22:04:37 -0400, rickman wrote:

> BTW, why would you use the abbreviation ARMA, even in this group, > without explanation? I bet I'm not the only one who had to look it up.
I have two ARMA, two LEGA, one NOSA ... -- www.wescottdesign.com
Randy Yates wrote:
> Les Cargill <lcargill99@comcast.com> writes: > >> Randy Yates wrote: >>> Les Cargill <lcargill99@comcast.com> writes: >>>> [...] >>>> Tim Wescott wrote: >>>>> Note that what I gave you was a 2-tap boxcar with a pole at z = 0; >>>> >>>> Yeah, it compares quite closely with a classic moving average. >>> >>> Boxcar, moving average - same damn thing. >>> >> >> >> Very similar - but not exactly the same. > > Les, > > What difference do you think exists? >
Huh. Are they mathematically equivalent? Using the york.uk generated code for a first order* Butterworth it is (paraphrased): *higher order; just add buckets an constants. // alpha is the cutoff frequency: CONST1 = (alpha/Fs); foreach k in range { xv[0] = xv[1]; xv[1] = in[k] / DCGAIN; yv[0] = yv[1]; yv[1] = (xv[0] + xv[1]) + ( CONST1 * yv[0]); out[k] = yv[1]; } so CONST1 simply acts as a weight. I am not fully convinced I understand how the "delay" part of the 0 and 1 index use works. Naively, I would think a first-order, weighted, moving average would have one less "bucket". xv[0] and yv[0] are buckets; so are xv[1] and yv[1]. I'm being persnickety about "equivalent" and "very similar". They may well be functionally so similar as to be indistinguishable. -- Les Cargill
> >I'm being persnickety about "equivalent" and "very similar". They >may well be functionally so similar as to be indistinguishable. > >-- >Les Cargill
Les, These are worth being persnickety about. Just as "exact" and "approximate" are. Moving averages are not just used by DSP engineers. They are tools of time series data analysis. In the stock markets, it is known as "Technical Analysis". If you want to stretch the definition of financial data as a "digital signal", fine, then you also have to call technical analysts DSP engineers. My opinion, if anybody cares about this humble bit twiddler's opinion, is that "moving average" is a category and needs further specification to indicate a particular type. When somebody specifies a time period in front of it, as in 100 day moving average, I think that is sufficient to assume that it is an arithmetic moving average. Ced --------------------------------------- Posted through http://www.DSPRelated.com
[...snip...]

> >BTW, why would you use the abbreviation ARMA, even in this group, >without explanation? I bet I'm not the only one who had to look it up. > > >> Just my dos centavos. > >Thanks, now I can have that operation I've been needing... > >-- > >Rick
I had to look it up, too. I wouldn't have had to if you had copy and pasted the answer when you did. ARMA = Autoregressive-moving-average Ced --------------------------------------- Posted through http://www.DSPRelated.com
On 5/31/2015 2:02 PM, Cedron wrote:
> [...snip...] > >> >> BTW, why would you use the abbreviation ARMA, even in this group, >> without explanation? I bet I'm not the only one who had to look it up. >> >> >>> Just my dos centavos. >> >> Thanks, now I can have that operation I've been needing... >> >> -- >> >> Rick > > I had to look it up, too. I wouldn't have had to if you had copy and > pasted the answer when you did. > > ARMA = Autoregressive-moving-average
I'm glad that was enough for you. The name didn't mean anything to me until I read a bit about it. A fairly complex topic really. Nothing like a simple moving average. Not sure why Eric even brought it up. -- Rick
>> >> ARMA = Autoregressive-moving-average > >I'm glad that was enough for you. The name didn't mean anything to me >until I read a bit about it. A fairly complex topic really. Nothing >like a simple moving average. Not sure why Eric even brought it up. > >-- > >Rick
It was enough to answer what the acronym stood for. I glanced at the article, it did look fairly complicated. I won't speculate on Eric's motivation, he would have to answer that. Ced --------------------------------------- Posted through http://www.DSPRelated.com