FPGA Central - World's 1st FPGA / CPLD Portal

FPGA Central

World's 1st FPGA Portal

 

Go Back   FPGA Groups > NewsGroup > DSP

DSP comp.dsp newsgroup, mailing list

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 11-20-2003, 01:07 AM
Brian Reinhold
Guest
 
Posts: n/a
Default A dumb question running integrals...

What is wrong with this thinking about computing a running integral over a
data sample:

y(n) = ?x(i) * cos(w*i) where the sum is over the previous N data points.
y(n+1) = ?x(i+1) * cos(w*(i+1)) again where the sum is over the previous N
data points.

What this means is that
y(n+1) = y(n) + x(i+1)*cos(w*(i+1)) - x(n-N)*cos(w*(n-N)).

Thus one can compute the running integral with 2 multiplies and 2 adds.

Seems way too simple, though nothing says to me that I should not be able to
move the cosine function one phase increment each sample increment thus
avoiding the sum over N multiplies and adds.

What I want to do is an integrate and dump scheme for demodulating an FSK
signal. Perhaps use a Goertzel filter for each frequency as well (if I can
figure out how to apply it to a data stream.) Any sources or help greatly
appreciated. I am sure someone has figured out how to do a great FSK
demodulator (much better than I would come up with) and I don't want to
re-invent the wheel!

Thanks!

Brian Reinhold


Reply With Quote
  #2 (permalink)  
Old 11-20-2003, 05:52 AM
robert bristow-johnson
Guest
 
Posts: n/a
Default Re: A dumb question running integrals...

In article UATub.191555$275.664852@attbi_s53, Brian Reinhold at
[email protected] wrote on 11/19/2003 19:07:

> What is wrong with this thinking about computing a running integral over a
> data sample:
>
> y(n) = ?x(i) * cos(w*i) where the sum is over the previous N data points.
> y(n+1) = ?x(i+1) * cos(w*(i+1)) again where the sum is over the previous N
> data points.
>
> What this means is that
> y(n+1) = y(n) + x(i+1)*cos(w*(i+1)) - x(n-N)*cos(w*(n-N)).
>
> Thus one can compute the running integral with 2 multiplies and 2 adds.


i dunno what the 2 multiplies has to do with the "moving sum" (what is
commonly called this thing you're calling a "running integra").

x[i]*cos(w*i) is just a definition of the input to your moving summmer. the
multiplication is part of that signal definition. let's just call the input
"x[n]" and make our lives easier.

the moving sum operation:

N-1
y[n] = SUM{ x[n-i] }
i=0

is an FIR filter that can be computed with the recursion equation:

y[n] = y[n-1] + x[n] - x[n-N]

this is probably the simplest non-trivial example of what has been dubbed by
Julius Smith a "Truncated IIR" filter. it really is an FIR but it is
implemented with an IIR (in this case the IIR is an integrator), a delay
line and some subtraction.

you can pretty easily extend this concept to 1st order decaying exponential
impulse responses:

y[n] = alpha*y[n-1] + x[n] - (alpha^N)*x[n-N]

that's the same as

N-1
y[n] = SUM{ (alpha^i)*x[n-i] }
i=0

with a little more thought, you can extend it to 2nd order or any other IIR
filter where you can truncated the "infinite" impulse response at some
defined finite limit.

> Seems way too simple, though nothing says to me that I should not be able to
> move the cosine function one phase increment each sample increment thus
> avoiding the sum over N multiplies and adds.
>
> What I want to do is an integrate and dump scheme for demodulating an FSK
> signal. Perhaps use a Goertzel filter for each frequency as well (if I can
> figure out how to apply it to a data stream.) Any sources or help greatly
> appreciated. I am sure someone has figured out how to do a great FSK
> demodulator (much better than I would come up with) and I don't want to
> re-invent the wheel!


it would be doing that.

r b-j


Reply With Quote
  #3 (permalink)  
Old 11-20-2003, 12:03 PM
Brian Reinhold
Guest
 
Posts: n/a
Default Re: A dumb question running integrals...


Oops. I see that my "summation" sign (which looked fine when I typed it
using Alt-228) turned out to be a question mark. But you answered the
question anyways.

This integral operation is more like a Goertzel detector than a filter,
isn't it? I would suspect that the output of this running integral (if the
input x(n) were the frequency of the sinusoid) would approach a constant.

Brian

> > What is wrong with this thinking about computing a running integral over

a
> > data sample:
> >
> > y(n) = ?x(i) * cos(w*i) where the sum is over the previous N data

points.
> > y(n+1) = ?x(i+1) * cos(w*(i+1)) again where the sum is over the previous

N
> > data points.
> >
> > What this means is that
> > y(n+1) = y(n) + x(i+1)*cos(w*(i+1)) - x(n-N)*cos(w*(n-N)).
> >
> > Thus one can compute the running integral with 2 multiplies and 2 adds.

>
> i dunno what the 2 multiplies has to do with the "moving sum" (what is
> commonly called this thing you're calling a "running integra").
>
> x[i]*cos(w*i) is just a definition of the input to your moving summmer.

the
> multiplication is part of that signal definition. let's just call the

input
> "x[n]" and make our lives easier.
>
> the moving sum operation:
>
> N-1
> y[n] = SUM{ x[n-i] }
> i=0
>
> is an FIR filter that can be computed with the recursion equation:
>
> y[n] = y[n-1] + x[n] - x[n-N]
>
> this is probably the simplest non-trivial example of what has been dubbed

by
> Julius Smith a "Truncated IIR" filter. it really is an FIR but it is
> implemented with an IIR (in this case the IIR is an integrator), a delay
> line and some subtraction.
>
> you can pretty easily extend this concept to 1st order decaying

exponential
> impulse responses:
>
> y[n] = alpha*y[n-1] + x[n] - (alpha^N)*x[n-N]
>
> that's the same as
>
> N-1
> y[n] = SUM{ (alpha^i)*x[n-i] }
> i=0
>
> with a little more thought, you can extend it to 2nd order or any other

IIR
> filter where you can truncated the "infinite" impulse response at some
> defined finite limit.
>
> > Seems way too simple, though nothing says to me that I should not be

able to
> > move the cosine function one phase increment each sample increment thus
> > avoiding the sum over N multiplies and adds.
> >
> > What I want to do is an integrate and dump scheme for demodulating an

FSK
> > signal. Perhaps use a Goertzel filter for each frequency as well (if I

can
> > figure out how to apply it to a data stream.) Any sources or help

greatly
> > appreciated. I am sure someone has figured out how to do a great FSK
> > demodulator (much better than I would come up with) and I don't want to
> > re-invent the wheel!

>
> it would be doing that.
>
> r b-j
>
>



Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Dumb Verilog Questions - Mostly about assignments benn Verilog 8 04-13-2008 05:14 AM
XMD : Running XMD with Caches on Njuguna Njoroge FPGA 1 04-05-2005 06:43 AM
Running EDK 6.2i with ISE6.3i massoud shakeri FPGA 2 12-01-2004 09:19 AM
dumb question CPLD or FPGA Joseph Goldburg FPGA 2 04-19-2004 04:58 PM


All times are GMT +1. The time now is 04:22 AM.


Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0
Copyright 2008 @ FPGA Central. All rights reserved