Reply by panabiker September 12, 20072007-09-12
On Sep 12, 1:56 pm, "tcnasc" <thiago.nasciu...@tecsysbrasil.com.br>
wrote:
> > So I've read a few things about the Farrow Structure now. If I understood > correctly it is able to create a new sample between two existing samples > and the delay factor is adjustable by the designer. That's the "fractional > delay" part of the thing right? > Going back to my example, when I need a 5.48x interpolation and must > create more than one sample between two exisisting samples. How is that > done? In this case the delay factor is dynamic?
In your case, you need to keep calculating the sampling fraction by incrementing (or decrementing, depending on which way you look at it) by 1/5.48 for every output sample created. For example, with 5.48x, the fraction values can be 0, 1/5.48, 2/5.48, 3/5.48, 4/5.48, 5/5.48. Once the value exceeds 1, you move to the next input sampling period starting at 0.52/5.48, and so on. In some implementations, the fractional delay goes betweem -0.5 to 0.5.
>How can I control it? > After I create one new sample, the next will take into consideration this > new sample or ignore it and use the original pair? >
You create output samples from the original input samples and the fractional delay only. Actually, it becomes obvious if you follow one of the papers and write some Matlab/octave scripts.
Reply by tcnasc September 12, 20072007-09-12
>The answer is yes, Farrow structure is able to interpolate any non- >integer factors because it doesn't even care about input or output >frequencies. All you need is to tell it is where between two sample >points you want to interpolate data. It can be 50%, 25%, or 27.83498%. >As a designer, you have to supply this number between 0 and 1. > >The original structure was developed by C.W. Farrow at Bell Labs to >take care of the clock drifting problem between two sampling domains. >The two clocks were of the same frequency but from two different >crystals. >
Thanks panabike! :) So I've read a few things about the Farrow Structure now. If I understood correctly it is able to create a new sample between two existing samples and the delay factor is adjustable by the designer. That's the "fractional delay" part of the thing right? Going back to my example, when I need a 5.48x interpolation and must create more than one sample between two exisisting samples. How is that done? In this case the delay factor is dynamic? How can I control it? After I create one new sample, the next will take into consideration this new sample or ignore it and use the original pair? Thanks again! Thiago Thanks!
Reply by panabiker September 10, 20072007-09-10
On Sep 10, 12:55 pm, "tcnasc" <thiago.nasciu...@tecsysbrasil.com.br>
wrote:
> >Farrow is usually used for variable rate interpolation as the > >interpolation ratio is an input to the filter. If all you want is an > >interpolation by a fixed ratio, you can interpolate by N and decimate > >by M to get to 5.48 where N & M are suitable integers. > > I need a variable interpolation because the data rate is 1-31MSPS (in > steps of 1KSPS) and the DAC sample rate is fixed at 125MSPS. That is why I > want to know if the Farrow is able to interpolate by fractional factors or > only integers.
The answer is yes, Farrow structure is able to interpolate any non- integer factors because it doesn't even care about input or output frequencies. All you need is to tell it is where between two sample points you want to interpolate data. It can be 50%, 25%, or 27.83498%. As a designer, you have to supply this number between 0 and 1. The original structure was developed by C.W. Farrow at Bell Labs to take care of the clock drifting problem between two sampling domains. The two clocks were of the same frequency but from two different crystals.
Reply by mnentwig September 10, 20072007-09-10
>>Farrow is usually used for variable rate interpolation
And the reference says: .. "We have rederived the Farrow filter which supports continously variable resampling". But if you have too little time, too loose specs and/or too much memory, a large polyphase filter and rounding to the nearest row will do, too.
Reply by tcnasc September 10, 20072007-09-10
>Farrow is usually used for variable rate interpolation as the >interpolation ratio is an input to the filter. If all you want is an >interpolation by a fixed ratio, you can interpolate by N and decimate >by M to get to 5.48 where N & M are suitable integers.
I need a variable interpolation because the data rate is 1-31MSPS (in steps of 1KSPS) and the DAC sample rate is fixed at 125MSPS. That is why I want to know if the Farrow is able to interpolate by fractional factors or only integers.
Reply by mk September 10, 20072007-09-10
On Mon, 10 Sep 2007 10:24:15 -0500, "tcnasc"
<thiago.nasciutti@tecsysbrasil.com.br> wrote:

>Hi! Thanks for the replies > >Let me see if I get this straight: the Farrow Structure you suggested is >able to interpolate by non-integer factors? >Take this for example: >The data rate is 5.7MSPS. After the pulse shaping FIR filter the sample >rate goes to 4*5.7 = 22.8MSPS. Now, to bring this to 125MSPS I would need >to interpolate by a factor of 5.48x and that would be realized using a >Farrow Filter?
Farrow is usually used for variable rate interpolation as the interpolation ratio is an input to the filter. If all you want is an interpolation by a fixed ratio, you can interpolate by N and decimate by M to get to 5.48 where N & M are suitable integers.
Reply by tcnasc September 10, 20072007-09-10
Hi! Thanks for the replies

Let me see if I get this straight: the Farrow Structure you suggested is
able to interpolate by non-integer factors?
Take this for example:
The data rate is 5.7MSPS. After the pulse shaping FIR filter the sample
rate goes to 4*5.7 = 22.8MSPS. Now, to bring this to 125MSPS I would need
to interpolate by a factor of 5.48x and that would be realized using a
Farrow Filter?

Thanks
Thiago

Reply by mnentwig September 6, 20072007-09-06
Hello,

agree. Here is one reference:
http://www.signumconcepts.com/IP_center/paper018.pdf

I've got some slides here, mostly for my own use:
http://www.elisanet.fi/mnentwig/multirate.pdf
Those aren't polished, the polyphase filter is on page 15/16. 

In case of discrepancies, I'd tend to believe Fred Harris :)

Each polyphase "bank" (row) corresponds to a sub-sample time delay. The
more banks, the finer time resolution. 
For a variable rate conversion, the commutator switch doesn't advance in
increments of 1 anymore, but in larger steps (at some rate it may actually
appear to run backwards, that's OK). 
If memory is a problem, use a high number of bits for the commutator
switch (phase), and disregard the least significant bits for indexing.

This scheme is used for example in fluidsynth
(http://savannah.nongnu.org/projects/fluid#options).

Cheers

Markus

Reply by panabiker September 6, 20072007-09-06
On Sep 6, 3:13 pm, "tcnasc" <thiago.nasciu...@tecsysbrasil.com.br>
wrote:
> Hi all! > > Here's a brief description of my application: > -> I'm using a Stratix II FPGA to generate data samples and send them to > an external DAC. > -> Data is generated at rates from 1MSPS to 31.25MSPS. > -> I've instantiated an Altera FIR Filter to mask shape this data. This > filter also does an 4x interpolation > > With that I get my signal spectrum and several images at Fs, 2*Fs, etc., > where Fs=DataRate*4 because of the FIR interpolation. > The problem is that I really need to get rid of these images. To do that I > must upsample the data to 125MSPS which is the DAC sampling rate. > I've tried using a CIC Filter to interpolate and it helps but doesn't > solve the problem. It's only good when 125MHz is an integer multiple of > the (data rate*4). If it is not, then there are still images around my > spectrum. > Has anyone heard about a "fractional interpolation" or something like it, > that would cover the spaces between integers interpolation factors? > > Thank you very much! > Thiago
Do a search on Farrow Interpolation or Farrow Structure. It is essentially an polynomial interpolator implemented with a clever structure to reduce the computation requirement. It will require more multiplications than an FIR would but not by much (< 10x). It allows arbitrary ratio between input and output sampling rates.
Reply by tcnasc September 6, 20072007-09-06
Hi all!

Here's a brief description of my application:
-> I'm using a Stratix II FPGA to generate data samples and send them to
an external DAC.
-> Data is generated at rates from 1MSPS to 31.25MSPS.
-> I've instantiated an Altera FIR Filter to mask shape this data. This
filter also does an 4x interpolation

With that I get my signal spectrum and several images at Fs, 2*Fs, etc.,
where Fs=DataRate*4 because of the FIR interpolation.
The problem is that I really need to get rid of these images. To do that I
must upsample the data to 125MSPS which is the DAC sampling rate.
I've tried using a CIC Filter to interpolate and it helps but doesn't
solve the problem. It's only good when 125MHz is an integer multiple of
the (data rate*4). If it is not, then there are still images around my
spectrum.
Has anyone heard about a "fractional interpolation" or something like it,
that would cover the spaces between integers interpolation factors?

Thank you very much!
Thiago