Reply by Andor August 16, 20062006-08-16
philgo wrote:

> Hi Andor, > > I didn't see your second reply before my previous post. > It's getting more interesting now. > > Suppose I choose M a very large number, say 1024, as I want to make it > quite an accurate approximation. > > And as you suggested, I first calculate the discrete time fourier > transform, ie. the frequency response H(w). > > The next step, I am supposed to sample 1024 points from H(w), i.e., to > get the DFT of the original a[k]'s. Because H(w) is a continuous signal > and is periodical, then I just sample 1024 uniformly distributed points > in a single period of H(w).
H(w) is not necessarily periodic - if one single ratio t_k / t_m is irrational, there is no common time grid which covers all the delay times t_k. This means that H(w) is not periodic. However, that does not concern you, as you are only interested applying the filter to bandlimited signals. Therefore you sample H(w) in the interval [-pi, pi[ at N evenly distributed points.
> > The next step, I do size 1024 IDFT. > > I am a little unclear about the windowing. What shall I do exactly to > the size 1024 sequence that I obtained after the IDFT. What should I > with the window length and the window shape to control the > approximation? Thanks a lot.
Thinking about this more, I'm also a little unclear :-). H(w) is probably not a linear-phase filter, so one would have to come up with some sort of asymmetric window. I haven't seen the windowing method mentioned for general phase FIR filters. It would require some more thought. In the meantime, just take the IDFT of the sampled H(w) as FIR coefficients. By the way, yet another method would be to sample the impulse response. Continuing with our notation, the (continuous time) impulse response of your filter is h(t) = sum_k a_k sinc(t - t_k). An FIR approximation could be h_n = h(n), for n = - M1, -(M1-1), ..., -1, 0, 1, 2, ..., M2, where the two tuning constants M1 and M2 can be chosen to satisfy your approximation condition for the filter. For positive t_k, one would probably chose M2 > M1. Regards,
> > Andor wrote: > > I wrote: > > > philgo wrote: > > > > hi, suppose I have the FIR channel with 10 taps. > > > > My target sampling rate is, for example, 50MHz, i.e., the sampling > > > > period is 20ns. > > > > But my channel taps do not fall on integer units of the sampling > > > > period, say they fall on > > > > 33, 44, 55, 66, 77, 88, 99, 111, 122, 133 ns respectively. > > > > What shall I do to create a FIR channel with taps falling exactly on > > > > integer number of samplings? thank you in advance. > > > > > > Let's say the input signal was x[n], and you wanted to compute > > > > > > y[n] = sum_k a_k delay( x[n], t_k), > > > > > > where the function delay(x[n], t) simply delays the signal x[n] by the > > > real value t, the t_k are the tap delays and the a_k are the tap > > > weights. The only problem is to compute the delay function. You can do > > > this by seperating t into integer and fractional part, ie. > > > > > > t = m + f, > > > > > > for example 3.14142... = 3 + sqrt(2) / 10. This way you can reduce the > > > delay function to compute delays that lie in [0, 1[ by using > > > > > > delay(x[n], t) = delay(x[n-m], f). > > > > > > That last function is called a fractional delay and can be implemented > > > using an FIR filter (with integer tap delays). An easy method to design > > > the filter is via windowed sinc. Do you need more help with this? > > > > On second thoughts, perhaps a more direct approach to model your filter > > is with the windowing technique. If we assume the above impulse > > response, the frequency response is given by > > > > H(w) = sum_k a_k exp(-j w t_k). > > > > You can sample H on a regular grid with M points, compute the inverse > > DFT and then window with a window of size N<M to get the impulse > > response (the regularly-tapped FIR filter coefficients). M, N and the > > window are parameters that allow you to determine the grade of the > > approximation. > > > > > > > > Regards, > > > Andor
Reply by philgo August 16, 20062006-08-16
Hi Andor,

I didn't see your second reply before my previous post.
It's getting more interesting now.

Suppose I choose M a very large number, say 1024, as I want to make it
quite an accurate approximation.

And as you suggested, I first calculate the discrete time fourier
transform, ie. the frequency response H(w).

The next step, I am supposed to sample 1024 points from H(w), i.e., to
get the DFT of the original a[k]'s. Because H(w) is a continuous signal
and is periodical, then I just sample 1024 uniformly distributed points
in a single period of H(w).

The next step, I do size 1024 IDFT.

I am a little unclear about the windowing. What shall I do exactly to
the size 1024 sequence that I obtained after the IDFT. What should I
with the window length and the window shape to control the
approximation? Thanks a lot.

Andor wrote:
> I wrote: > > philgo wrote: > > > hi, suppose I have the FIR channel with 10 taps. > > > My target sampling rate is, for example, 50MHz, i.e., the sampling > > > period is 20ns. > > > But my channel taps do not fall on integer units of the sampling > > > period, say they fall on > > > 33, 44, 55, 66, 77, 88, 99, 111, 122, 133 ns respectively. > > > What shall I do to create a FIR channel with taps falling exactly on > > > integer number of samplings? thank you in advance. > > > > Let's say the input signal was x[n], and you wanted to compute > > > > y[n] = sum_k a_k delay( x[n], t_k), > > > > where the function delay(x[n], t) simply delays the signal x[n] by the > > real value t, the t_k are the tap delays and the a_k are the tap > > weights. The only problem is to compute the delay function. You can do > > this by seperating t into integer and fractional part, ie. > > > > t = m + f, > > > > for example 3.14142... = 3 + sqrt(2) / 10. This way you can reduce the > > delay function to compute delays that lie in [0, 1[ by using > > > > delay(x[n], t) = delay(x[n-m], f). > > > > That last function is called a fractional delay and can be implemented > > using an FIR filter (with integer tap delays). An easy method to design > > the filter is via windowed sinc. Do you need more help with this? > > On second thoughts, perhaps a more direct approach to model your filter > is with the windowing technique. If we assume the above impulse > response, the frequency response is given by > > H(w) = sum_k a_k exp(-j w t_k). > > You can sample H on a regular grid with M points, compute the inverse > DFT and then window with a window of size N<M to get the impulse > response (the regularly-tapped FIR filter coefficients). M, N and the > window are parameters that allow you to determine the grade of the > approximation. > > > > > Regards, > > Andor
Reply by philgo August 16, 20062006-08-16
I didn't see your second reply before my previous post.
It's getting more interesting now.

Suppose I choose M a very large number, say 1024, as I want to make it
quite an accurate approximation.

And as you suggested, I first calculate the discrete time fourier
transform, ie. the frequency response H(w).

The next step, I am supposed to sample 1024 points from H(w), i.e., to
get the DFT of the original a[k]'s. Because H(w) is a continuous signal
and is periodical, then I just sample 1024 uniformly distributed points
in a single period of H(w).

The next step, I do size 1024 IDFT.

I am a little unclear about the windowing. What shall I do exactly to
the size 1024 sequence that I obtained after the IDFT. What should I
with the window length and the window shape to control the
approximation? Thanks a lot.


Andor wrote:
> I wrote: > > philgo wrote: > > > hi, suppose I have the FIR channel with 10 taps. > > > My target sampling rate is, for example, 50MHz, i.e., the sampling > > > period is 20ns. > > > But my channel taps do not fall on integer units of the sampling > > > period, say they fall on > > > 33, 44, 55, 66, 77, 88, 99, 111, 122, 133 ns respectively. > > > What shall I do to create a FIR channel with taps falling exactly on > > > integer number of samplings? thank you in advance. > > > > Let's say the input signal was x[n], and you wanted to compute > > > > y[n] = sum_k a_k delay( x[n], t_k), > > > > where the function delay(x[n], t) simply delays the signal x[n] by the > > real value t, the t_k are the tap delays and the a_k are the tap > > weights. The only problem is to compute the delay function. You can do > > this by seperating t into integer and fractional part, ie. > > > > t = m + f, > > > > for example 3.14142... = 3 + sqrt(2) / 10. This way you can reduce the > > delay function to compute delays that lie in [0, 1[ by using > > > > delay(x[n], t) = delay(x[n-m], f). > > > > That last function is called a fractional delay and can be implemented > > using an FIR filter (with integer tap delays). An easy method to design > > the filter is via windowed sinc. Do you need more help with this? > > On second thoughts, perhaps a more direct approach to model your filter > is with the windowing technique. If we assume the above impulse > response, the frequency response is given by > > H(w) = sum_k a_k exp(-j w t_k). > > You can sample H on a regular grid with M points, compute the inverse > DFT and then window with a window of size N<M to get the impulse > response (the regularly-tapped FIR filter coefficients). M, N and the > window are parameters that allow you to determine the grade of the > approximation. > > > > > Regards, > > Andor
Reply by philgo August 16, 20062006-08-16
here, channel means some medium that the signal goes through from the
transmitter to the receiver. The signal gets distorted during this
process and the distortion can be modeled as an FIR filter. We call it
multipath channel.

Jerry Avins wrote:
> philgo wrote: > > ... > > > I agree it might not end up w ith 10 taps. Coud you be more specific on > > how to generate the new channel from the old one? thanks > > Could be more specific about what you mean by "channel" in this context? > > Jerry > -- > Engineering is the art of making what you want from things you can get. > =AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=
=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF= =AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF
Reply by philgo August 16, 20062006-08-16
Hi Andor,

Thanks for your reply.

Let me rephrase your reply first to see if I understand correctly.
Basically, the bottomline is to represent the fractional-delayed signal

delay(x[n-m], f) with 0<f<1

by a summation of integer-delayed signal

delay(x[n-m], k) across many different k's where k's are integers only.

To do so, we may reconstruct the signal delay(x[n-m], f] by a sinc
function delayed by time f. We then resample the delayed sinc function
on all integer positions and then get the coefficients to represent the
fractional-delayed signal by integer-delayed signal.

in mathematics, if we denote the signal as delta(x-f) as the impluse
with f being defined as above, then we are trying to reconstruct it
first as

sinc(x-f)=sin(x-f)/(x-f)

and then resample it to

..., sin(-2-f)/(-2-f), sin(-1-f)/(-1-f), sin(0-f)/(0-f),
sin(1-f)/(1-f), sin(2-f)/(2-f), ...

therefore, to represent delta(x-f), we need to use

summuation {i from minus infinity to positive infinity, integers only}
sin(i-f)/(i-f) delta(x-i)

Is it right?

Andor wrote:
> philgo wrote: > > hi, suppose I have the FIR channel with 10 taps. > > My target sampling rate is, for example, 50MHz, i.e., the sampling > > period is 20ns. > > But my channel taps do not fall on integer units of the sampling > > period, say they fall on > > 33, 44, 55, 66, 77, 88, 99, 111, 122, 133 ns respectively. > > What shall I do to create a FIR channel with taps falling exactly on > > integer number of samplings? thank you in advance. > > Let's say the input signal was x[n], and you wanted to compute > > y[n] = sum_k a_k delay( x[n], t_k), > > where the function delay(x[n], t) simply delays the signal x[n] by the > real value t, the t_k are the tap delays and the a_k are the tap > weights. The only problem is to compute the delay function. You can do > this by seperating t into integer and fractional part, ie. > > t = m + f, > > for example 3.14142... = 3 + sqrt(2) / 10. This way you can reduce the > delay function to compute delays that lie in [0, 1[ by using > > delay(x[n], t) = delay(x[n-m], f). > > That last function is called a fractional delay and can be implemented > using an FIR filter (with integer tap delays). An easy method to design > the filter is via windowed sinc. Do you need more help with this? > > Regards, > Andor
Reply by philgo August 16, 20062006-08-16
Hi Andor,

Thanks for your reply.

Let me rephrase your reply first to see if I understand correctly.
Basically, the bottomline is to represent the fractional-delayed signal

delay(x[n-m], f) with 0<f<1

by a summation of integer-delayed signal

delay(x[n-m], k) across many different k's where k's are integers only.

To do so, we may reconstruct the signal delay(x[n-m], f] by a sinc
function delayed by time f. We then resample the delayed sinc function
on all integer positions and then get the coefficients to represent the
fractional-delayed signal by integer-delayed signal.

in mathematics, if we denote the signal as delta(x-f) as the impluse
with f being defined as above, then we are trying to reconstruct it
first as

sinc(x-f)=sin(x-f)/(x-f)

and then resample it to

..., sinc(-2-f)/(-2-f), sinc(-1-f)/(-1-f), sinc(0-f)/(0-f),
sinc(1-f)/(1-f), sinc(2-f)/(2-f), ...


therefore, to represent delta(x-f), we need to use

summuation {i from minus infinity to positive infinity, integers only}
sin(i-f)/(i-f) delta(x-i)

Is it right?

but am not very clear about it yet. Suppose we are trying to implement
it in Matlab,
could you please show some example?




Andor wrote:
> philgo wrote: > > hi, suppose I have the FIR channel with 10 taps. > > My target sampling rate is, for example, 50MHz, i.e., the sampling > > period is 20ns. > > But my channel taps do not fall on integer units of the sampling > > period, say they fall on > > 33, 44, 55, 66, 77, 88, 99, 111, 122, 133 ns respectively. > > What shall I do to create a FIR channel with taps falling exactly on > > integer number of samplings? thank you in advance. > > Let's say the input signal was x[n], and you wanted to compute > > y[n] = sum_k a_k delay( x[n], t_k), > > where the function delay(x[n], t) simply delays the signal x[n] by the > real value t, the t_k are the tap delays and the a_k are the tap > weights. The only problem is to compute the delay function. You can do > this by seperating t into integer and fractional part, ie. > > t = m + f, > > for example 3.14142... = 3 + sqrt(2) / 10. This way you can reduce the > delay function to compute delays that lie in [0, 1[ by using > > delay(x[n], t) = delay(x[n-m], f). > > That last function is called a fractional delay and can be implemented > using an FIR filter (with integer tap delays). An easy method to design > the filter is via windowed sinc. Do you need more help with this? > > Regards, > Andor
Reply by Andor August 16, 20062006-08-16
I wrote:
> philgo wrote: > > hi, suppose I have the FIR channel with 10 taps. > > My target sampling rate is, for example, 50MHz, i.e., the sampling > > period is 20ns. > > But my channel taps do not fall on integer units of the sampling > > period, say they fall on > > 33, 44, 55, 66, 77, 88, 99, 111, 122, 133 ns respectively. > > What shall I do to create a FIR channel with taps falling exactly on > > integer number of samplings? thank you in advance. > > Let's say the input signal was x[n], and you wanted to compute > > y[n] = sum_k a_k delay( x[n], t_k), > > where the function delay(x[n], t) simply delays the signal x[n] by the > real value t, the t_k are the tap delays and the a_k are the tap > weights. The only problem is to compute the delay function. You can do > this by seperating t into integer and fractional part, ie. > > t = m + f, > > for example 3.14142... = 3 + sqrt(2) / 10. This way you can reduce the > delay function to compute delays that lie in [0, 1[ by using > > delay(x[n], t) = delay(x[n-m], f). > > That last function is called a fractional delay and can be implemented > using an FIR filter (with integer tap delays). An easy method to design > the filter is via windowed sinc. Do you need more help with this?
On second thoughts, perhaps a more direct approach to model your filter is with the windowing technique. If we assume the above impulse response, the frequency response is given by H(w) = sum_k a_k exp(-j w t_k). You can sample H on a regular grid with M points, compute the inverse DFT and then window with a window of size N<M to get the impulse response (the regularly-tapped FIR filter coefficients). M, N and the window are parameters that allow you to determine the grade of the approximation.
> > Regards, > Andor
Reply by glen herrmannsfeldt August 16, 20062006-08-16
robert bristow-johnson wrote:

> philgo wrote:
>>hi, suppose I have the FIR channel with 10 taps. >>My target sampling rate is, for example, 50MHz, i.e., the sampling >>period is 20ns. >>But my channel taps do not fall on integer units of the sampling >>period, say they fall on >>33, 44, 55, 66, 77, 88, 99, 111, 122, 133 ns respectively.
> are you sure that is not 110, 121, and 132 ns? everything else was a > multiple of 11 ns.
At 90.49MHz they will round to those numbers. That would be an unusual clock, though. -- glen
Reply by Andor August 16, 20062006-08-16
philgo wrote:
> hi, suppose I have the FIR channel with 10 taps. > My target sampling rate is, for example, 50MHz, i.e., the sampling > period is 20ns. > But my channel taps do not fall on integer units of the sampling > period, say they fall on > 33, 44, 55, 66, 77, 88, 99, 111, 122, 133 ns respectively. > What shall I do to create a FIR channel with taps falling exactly on > integer number of samplings? thank you in advance.
Let's say the input signal was x[n], and you wanted to compute y[n] = sum_k a_k delay( x[n], t_k), where the function delay(x[n], t) simply delays the signal x[n] by the real value t, the t_k are the tap delays and the a_k are the tap weights. The only problem is to compute the delay function. You can do this by seperating t into integer and fractional part, ie. t = m + f, for example 3.14142... = 3 + sqrt(2) / 10. This way you can reduce the delay function to compute delays that lie in [0, 1[ by using delay(x[n], t) = delay(x[n-m], f). That last function is called a fractional delay and can be implemented using an FIR filter (with integer tap delays). An easy method to design the filter is via windowed sinc. Do you need more help with this? Regards, Andor
Reply by Fred Marshall August 16, 20062006-08-16
"philgo" <philgo@gmail.com> wrote in message 
news:1155700345.187970.125490@m79g2000cwm.googlegroups.com...
> > robert bristow-johnson wrote: >> philgo wrote: >> > hi, suppose I have the FIR channel with 10 taps. >> > My target sampling rate is, for example, 50MHz, i.e., the sampling >> > period is 20ns. >> > But my channel taps do not fall on integer units of the sampling >> > period, say they fall on >> > 33, 44, 55, 66, 77, 88, 99, 111, 122, 133 ns respectively. >> >> are you sure that is not 110, 121, and 132 ns? everything else was a >> multiple of 11 ns. > > I actually wanted to give some random numbers that are not integers of > 20ns. > >> >> > What shall I do to create a FIR channel with taps falling exactly on >> > integer number of samplings? thank you in advance. >> >> so what you're trying to do is scale an existing FIR design from an FIR >> filter that ran at a sampling rate of about 90.9 MHz or 1/(11 ns) to a >> not-yet-existing FIR design that is meant to run at 50 MHz? is that >> it? > > I do not get it. Basically, I am given an FIR channel at non-integer > samples and want to convert the FIR channel with only integer delayed > samples , but without changing the channel characteristics.
I suppose you mean that you have either a real FIR filter that you are calling a "channel" or you have a multipath channel that is well approximated by a FIR filter with arbitrary delays between the paths. Here are some suggestions for modeling such a "channel": 1) Carefully examine just how accurate the delays can be measured/specified. Then consider moving the delays within the range of error so that they fall on a regular grid - perhaps a sparsely populated regular grid. That is, there can be lots of zero FIR coefficients. 2) Carefully consider sampling at a very high rate and then quantizing the times at which each of the nonzero FIR coefficients lie - such that the error introduced by quantizing delays is negligible. Sort of the same thing as #1 but taken from slightly another perspective. 3) Consider randomizing the delays (or, if narrowband signals, the phase) to simulate channel behavior on a statistical basis. This may be the most realistic simulation of all if the delays really aren't known that well or if they vary due to relative motion or a time-varying channel. If the signal is narrowband then the original objective is may not be completely achievable. If the signal is broadband then the original objective may be reasonably achievable. Fred