DSPRelated.com
Forums

FIR Interpolation

Started by Dhawan December 7, 2005
Hi


I am sorry for repeating my question. ..

I have a data from 3 different data sets. Each dataset has a
periodicity in itself .
1st: 1 4 7 10 13 16...
2nd: 2 6 10 14...
3rd: 5 10 15 20....
but after combining my data sets , its like:  1 2 4 5 6 7 10 13 14 15
16...

How can I determine the sampling rate from given data, so that I can
calculate the filter coefficients? In case my data is 300 samples long,
how do I determine the number of Filter coefficients I need ?

Does someone has an FIR implementation algorithm for that !!

Thanks

Dhawan wrote:
> Hi > > > I am sorry for repeating my question. ..
You didn't get an answer because (I suspect) nobody understood your questions.
> I have a data from 3 different data sets. Each dataset has a > periodicity in itself .
A periodicity in itself? What does that mean?
> 1st: 1 4 7 10 13 16... > 2nd: 2 6 10 14... > 3rd: 5 10 15 20.... > but after combining my data sets , its like: 1 2 4 5 6 7 10 13 14 15 > 16... > > How can I determine the sampling rate from given data, so that I can > calculate the filter coefficients? In case my data is 300 samples long, > how do I determine the number of Filter coefficients I need ?
What sampling rate? Is any of this sampled? How? What filter? What do you want it to do?
> Does someone has an FIR implementation algorithm for that !!
An algorithm for what? Jerry -- Engineering is the art of making what you want from things you can get. �����������������������������������������������������������������������
"Dhawan" <anshu.dhawan@gmail.com> wrote in message 
news:1133971290.650519.96670@g44g2000cwa.googlegroups.com...
> Hi > > > I am sorry for repeating my question. .. > > I have a data from 3 different data sets. Each dataset has a > periodicity in itself . > 1st: 1 4 7 10 13 16... > 2nd: 2 6 10 14... > 3rd: 5 10 15 20.... > but after combining my data sets , its like: 1 2 4 5 6 7 10 13 14 15 > 16... > > How can I determine the sampling rate from given data, so that I can > calculate the filter coefficients? In case my data is 300 samples long, > how do I determine the number of Filter coefficients I need ? > > Does someone has an FIR implementation algorithm for that !!
It may well be driven by your need or objective but I think you're jumping into the solution too quickly. It's probably a good idea to understand some fundamentals first. Let's take a look at the data sets individually first. We note that the sample intervals are 3,4 and 5. So, a common sample interval would be 1. You need to at least interpolate to a sample interval of 1 in order to add them like this: x1 0 0 x4 0 0 x7 0 0 x10 0 0 x13 0 0 x16 0 y2 0 0 0 y6 0 0 0 y10 0 0 0 y14 0 0 0 0 0 0 z5 0 0 0 0 z10 0 0 0 0 z15 x1 y2 x4 z5 y6 x7 0 0 xyz 0 0 x y z x I note that they overlap at a number of points. So, after adding them they can't be separated and this is a concern... Let's look at some possible spectra for the sequences: Please view in a fixed-width font such as Courier. | | | | | | | | | | | x x x x x x x x x x x |x x|x x|x x|x x|x x|x x|x x|x x|x x|x x| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | +-ooo-+-ooo-+-ooo-+-ooo-+-ooo-+-ooo-+-ooo-+-ooo-+-ooo-+-ooo-+ 0 0.2 0.4 0.6 0.8 1.0 1.2 1.4 1.6 1.8 2.0 1/T frequency -> Original spectrum for "3rd" | | | | | | | x x x x x x x |x x|x x|x x|x x|x x|x x|x | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | +-ooooooo-+-ooooooo-+-ooooooo-+-oooooooo-+-oooooo-+-ooooooo-+-o 0 0.33 0.66 1.0 1.33 1.66 2.0 Original spectrum for "1st" | | | | | x x x x x |x x|x x|x x|x x|x | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | +-ooooooooooooo-+-ooooooooooo-+-oooooooooooo-+-ooooooooooooo-+-o 0 0.5 1.0 1.5 2.0 Original spectrum for "2nd" If you simply add the samples, then you are also simply adding the spectra and will get quite a mess! So, what you want to do is upsample (interpolate) the ones with the lower sample rates to bring them up to the higher sample rates. The first common sample rate is 1.0 as I've mentioned above. In order to do this with "3rd" means adding zeros to the time sequence and then lowpass filtering to get rid of the spectral terms at 0.2, 0.4, 0.6 and 0.8. This is a lowpass filter with cutoff around 0.08. In order to do this with "1st" means adding zeros to the time sequence and then lowpass filtering to get rid of the spectal terms at 0.33 and 0.66. This is a lowpass filter with cutoff around 0.1333. Now you can add all the samples in parallel and have something that makes sense. Fred
Fred Marshall wrote:

Fred,

You seem to know what's at issue here. Can you enlighten me? I can 
deduce a fair amount from your response, but I don't see any of that in 
the original question. Can you expand on your train if thought?

Jerry
-- 
Engineering is the art of making what you want from things you can get.
&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;
On Wed, 07 Dec 2005 18:24:20 -0500, Jerry Avins <jya@ieee.org> wrote:

>Dhawan wrote: >> Hi >> >> >> I am sorry for repeating my question. .. > >You didn't get an answer because (I suspect) nobody understood your >questions. > >> I have a data from 3 different data sets. Each dataset has a >> periodicity in itself . > >A periodicity in itself? What does that mean? > >> 1st: 1 4 7 10 13 16... >> 2nd: 2 6 10 14... >> 3rd: 5 10 15 20.... >> but after combining my data sets , its like: 1 2 4 5 6 7 10 13 14 15 >> 16... >> >> How can I determine the sampling rate from given data, so that I can >> calculate the filter coefficients? In case my data is 300 samples long, >> how do I determine the number of Filter coefficients I need ? > >What sampling rate? Is any of this sampled? How? What filter? What do >you want it to do? > >> Does someone has an FIR implementation algorithm for that !! > >An algorithm for what? > >Jerry
Go get im' Jerry. Pour it on. ha ha. [-Rick-]
"Jerry Avins" <jya@ieee.org> wrote in message 
news:ao-dncOEeIVNGwrenZ2dnUVZ_tOdnZ2d@rcn.net...
> Fred Marshall wrote: > > Fred, > > You seem to know what's at issue here. Can you enlighten me? I can deduce > a fair amount from your response, but I don't see any of that in the > original question. Can you expand on your train if thought? > > Jerry
Jerry, Dhawan posted a recent thread entitled Sinc Interpolation. I connected the two. I suspect that the later post on FIR interpolation came after he read the responses on sinc interpolation. I've assumed that the application remained the same. Fred
Hi Fred,

Thanks a lot for ur answer. I have one more question- How did u
calculate cut off frequency from given spectral content? And one more
thing, if i am not wrong, shudnt the samples of 1st signal be 0.25
apart on frequency scal instead of 0.5?

Thanks

Fred Marshall wrote:

   ...

> Jerry, > > Dhawan posted a recent thread entitled Sinc Interpolation. I connected the > two. I suspect that the later post on FIR interpolation came after he read > the responses on sinc interpolation. I've assumed that the application > remained the same.
That's good detective work. Well done! Jerry -- Engineering is the art of making what you want from things you can get. &#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;
"Dhawan" <anshu.dhawan@gmail.com> wrote in message 
news:1134058716.868607.170360@g43g2000cwa.googlegroups.com...
> Hi Fred, > > Thanks a lot for ur answer. I have one more question- How did u > calculate cut off frequency from given spectral content? And one more > thing, if i am not wrong, shudnt the samples of 1st signal be 0.25 > apart on frequency scal instead of 0.5? > > Thanks >
I set the cutoff frequency at 0.8*(fs/2). It has to be somewhere below fs/2....
>1st: 1 4 7 10 13 16... has a sample interval of 3 and fs of 1/3 - 0.3333..
I think you may mean 2nd:
>2nd: 2 6 10 14... which has a sample interval of 4 and fs of 1/4 = 0.25
So, yes, I erred. It should be 0.25 for "2nd". Fred