"Dhawan" <
[email protected]> wrote in message
news:
[email protected] ups.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