DSPRelated.com
Forums

Gardner TED

Started by rider April 1, 2004
Hi!

I have a query regarding the computation of Gardner Timing Error
detector (TED). Dr. Gardner on his article "A BPSK/QPSK Timing Error
Detector for Sampled Receivers" states that Timing Error (for BPSK)
can be computed as:

U(r) = x(r-1/2)[x(r)-x(r-1)] 

He calls the samples x(r) as "STROBE" values and those like x(r-1/2)
as "MIDWAY"
between strobes [like x(r-1/2) is midway between x(r) and x(r-1)].

Its also mentioned that this algorithm  uses only 2 samples/symbol to
compute the error. I need to ask that:

1)What he means by these STROBE and MIDWAY values ,x(r) and x(r-1/2) ,
and how to compute them from the available 2 samples/symbol?

2) For the complete timing recovery loop, there is also an
interpolator. If the interpolator is fed with 2 samples/symbol, then
what is it computing? is it computing the midway value x(r-1/2) or
what?

Regards
Rider
"rider" <shabana_rizvi@yahoo.com> wrote in message
news:ca3a68c8.0403312046.7db78add@posting.google.com...
> Hi! > > I have a query regarding the computation of Gardner Timing Error > detector (TED). Dr. Gardner on his article "A BPSK/QPSK Timing Error > Detector for Sampled Receivers" states that Timing Error (for BPSK) > can be computed as: > > U(r) = x(r-1/2)[x(r)-x(r-1)] > > He calls the samples x(r) as "STROBE" values and those like x(r-1/2) > as "MIDWAY" > between strobes [like x(r-1/2) is midway between x(r) and x(r-1)]. > > Its also mentioned that this algorithm uses only 2 samples/symbol to > compute the error. I need to ask that: > > 1)What he means by these STROBE and MIDWAY values ,x(r) and x(r-1/2) , > and how to compute them from the available 2 samples/symbol? > > 2) For the complete timing recovery loop, there is also an > interpolator. If the interpolator is fed with 2 samples/symbol, then > what is it computing? is it computing the midway value x(r-1/2) or > what? > > Regards > Rider
You are sampling two samples per symbol, so if the loop is locked and you are sampling at the symbol instants and midway between the samples, then x(r-1), x(r-1/2), and x(r) will be three successive samples. These three would comprise two strobes and one midway or one strobe and two midway samples. The TED can be used to adjust a PLL that controls the sample clock. Then no interpolation is required; the sample clock is just adjusted so that the ADC samples at the correct points. That's mostly an older method. The other type of loop uses an ADC that samples at a constant rate, and then a resampling filter controlled by the loop interpolates the value at the sampling instant, which will be between the ADC samples. Before the loop is locked, the interpolator will not be sampling at the symbol instants, but the error value will be large and will push the loop until the interpolated values occur at the symbol instants and the midway points. -Kevin
"Kevin Neilson" <kevin_neilson@removethiscomcast.net> wrote in message news:<8oOac.52137$K91.127528@attbi_s02>...
> > You are sampling two samples per symbol, so if the loop is locked and you > are sampling at the symbol instants and midway between the samples, then > x(r-1), x(r-1/2), and x(r) will be three successive samples. These three > would comprise two strobes and one midway or one strobe and two midway > samples. > > The TED can be used to adjust a PLL that controls the sample clock. Then no > interpolation is required; the sample clock is just adjusted so that the ADC > samples at the correct points. That's mostly an older method. The other > type of loop uses an ADC that samples at a constant rate, and then a > resampling filter controlled by the loop interpolates the value at the > sampling instant, which will be between the ADC samples. Before the loop is > locked, the interpolator will not be sampling at the symbol instants, but > the error value will be large and will push the loop until the interpolated > values occur at the symbol instants and the midway points. > -Kevin
Why do you call tuned sampling an older method? It is really a matter of circumstances, rather than age. If you are, say, building modems to run in the PCM telephone network you have no control over the sampling, and have to fiddle things around by filtering. If you have control over the sampler, especially for very high speed channels, tuning the sampling time to match the symbols simplies things quite a bit. Regards, Steve
"Kevin Neilson" <kevin_neilson@removethiscomcast.net> wrote in message news:<8oOac.52137$K91.127528@attbi_s02>...
> "rider" <shabana_rizvi@yahoo.com> wrote in message > news:ca3a68c8.0403312046.7db78add@posting.google.com... > > Hi! > > > > I have a query regarding the computation of Gardner Timing Error > > detector (TED). Dr. Gardner on his article "A BPSK/QPSK Timing Error > > Detector for Sampled Receivers" states that Timing Error (for BPSK) > > can be computed as: > > > > U(r) = x(r-1/2)[x(r)-x(r-1)] > > > > He calls the samples x(r) as "STROBE" values and those like x(r-1/2) > > as "MIDWAY" > > between strobes [like x(r-1/2) is midway between x(r) and x(r-1)]. > > > > Its also mentioned that this algorithm uses only 2 samples/symbol to > > compute the error. I need to ask that: > > > > 1)What he means by these STROBE and MIDWAY values ,x(r) and x(r-1/2) , > > and how to compute them from the available 2 samples/symbol? > > > > 2) For the complete timing recovery loop, there is also an > > interpolator. If the interpolator is fed with 2 samples/symbol, then > > what is it computing? is it computing the midway value x(r-1/2) or > > what? > > > > Regards > > Rider > > You are sampling two samples per symbol, so if the loop is locked and you > are sampling at the symbol instants and midway between the samples, then > x(r-1), x(r-1/2), and x(r) will be three successive samples. These three > would comprise two strobes and one midway or one strobe and two midway > samples. > > The TED can be used to adjust a PLL that controls the sample clock. Then no > interpolation is required; the sample clock is just adjusted so that the ADC > samples at the correct points. That's mostly an older method. The other > type of loop uses an ADC that samples at a constant rate, and then a > resampling filter controlled by the loop interpolates the value at the > sampling instant, which will be between the ADC samples. Before the loop is > locked, the interpolator will not be sampling at the symbol instants, but > the error value will be large and will push the loop until the interpolated > values occur at the symbol instants and the midway points. > -Kevin
Thanks Kevin! Yes i m trying to follow the new method in which the sampling clock of the receiver is fixed at Fs and an all-digital interpolation/TED loop is use to recover timing. Like in the fig below: (~) Fixed Clk --/--Fs= Nfb (fb=symbol clock , Fs=sampling clock) Fs=1/Ts|-------------| Fi=1/Ti |---| x(mTs)----|Interpolator |--------->|TED| ----^-------- --- | | |-------| |---------| |Control|<-------------|Loop Fil | --------- ----------- However, i still cant understand a point . When the Gardner algorithm says it uses 2 samples/symbol, then does it mean that Fs in the above figure SHOULD exactly be 2fb? In my work, i have chosen fb=1khz and Fs=8khz. Do i have to decimate this 8khz signal to 2 Khz before applying it to the interpolator or i can feed this 8Khz signal directly? Thanks
"rider" <shabana_rizvi@yahoo.com> wrote in message
news:ca3a68c8.0404012151.576d0986@posting.google.com...
> "Kevin Neilson" <kevin_neilson@removethiscomcast.net> wrote in message
news:<8oOac.52137$K91.127528@attbi_s02>...
> > "rider" <shabana_rizvi@yahoo.com> wrote in message > > news:ca3a68c8.0403312046.7db78add@posting.google.com... > > > Hi! > > > > > > I have a query regarding the computation of Gardner Timing Error > > > detector (TED). Dr. Gardner on his article "A BPSK/QPSK Timing Error > > > Detector for Sampled Receivers" states that Timing Error (for BPSK) > > > can be computed as: > > > > > > U(r) = x(r-1/2)[x(r)-x(r-1)] > > > > > > He calls the samples x(r) as "STROBE" values and those like x(r-1/2) > > > as "MIDWAY" > > > between strobes [like x(r-1/2) is midway between x(r) and x(r-1)]. > > > > > > Its also mentioned that this algorithm uses only 2 samples/symbol to > > > compute the error. I need to ask that: > > > > > > 1)What he means by these STROBE and MIDWAY values ,x(r) and x(r-1/2) , > > > and how to compute them from the available 2 samples/symbol? > > > > > > 2) For the complete timing recovery loop, there is also an > > > interpolator. If the interpolator is fed with 2 samples/symbol, then > > > what is it computing? is it computing the midway value x(r-1/2) or > > > what? > > > > > > Regards > > > Rider > > > > You are sampling two samples per symbol, so if the loop is locked and
you
> > are sampling at the symbol instants and midway between the samples, then > > x(r-1), x(r-1/2), and x(r) will be three successive samples. These
three
> > would comprise two strobes and one midway or one strobe and two midway > > samples. > > > > The TED can be used to adjust a PLL that controls the sample clock.
Then no
> > interpolation is required; the sample clock is just adjusted so that the
ADC
> > samples at the correct points. That's mostly an older method. The
other
> > type of loop uses an ADC that samples at a constant rate, and then a > > resampling filter controlled by the loop interpolates the value at the > > sampling instant, which will be between the ADC samples. Before the
loop is
> > locked, the interpolator will not be sampling at the symbol instants,
but
> > the error value will be large and will push the loop until the
interpolated
> > values occur at the symbol instants and the midway points. > > -Kevin > > > Thanks Kevin! > > Yes i m trying to follow the new method in which the sampling clock of > the receiver is fixed at Fs and an all-digital interpolation/TED loop > is use to recover timing. Like in the fig below: > > > (~) Fixed Clk --/--Fs= Nfb (fb=symbol clock , Fs=sampling clock) > > Fs=1/Ts|-------------| Fi=1/Ti |---| > x(mTs)----|Interpolator |--------->|TED| > ----^-------- --- > | | > |-------| |---------| > |Control|<-------------|Loop Fil | > --------- ----------- > > > However, i still cant understand a point . When the Gardner algorithm > says it uses 2 samples/symbol, then does it mean that Fs in the above > figure SHOULD exactly be 2fb? In my work, i have chosen fb=1khz and > Fs=8khz. Do i have to decimate this 8khz signal to 2 Khz before > applying it to the interpolator or i can feed this 8Khz signal > directly? > > Thanks
For the Gardner algorithm I don't think the extra samples help at all. There are other algorithms that use more samples per symbol but I think you can throw out three of every four in your case. Then you would be left with a sample rate of about 2kHz and the control block would continuously adjust the phase so that the sampling instants are at the strobes and midpoints. The rate at which this phase "rolls" would be the difference in frequencies between the symbol rate and 1KHz (half the sample rate). This phase is often called mu in the texts. If the symbol rate is exactly 1kHz, for example, mu will remain constant. The error value would only be calculated every other sample. I think you may still operate the loop with an 8kHz sample rate and no decimation. But in that case, mu would have to have a large derivative and you would have to design the tracking loop especially for this mode of operation. Normally you want to design the loop so the derivative of mu is small. So it's probably best to get the effective sample rate as close to 2X the symbol rate as possible. If it's helpful, you can still use a lowpass-filter-based decimator instead of just throwing out samples; this increases precision. Decimation by 4 can give you two extra bits of precision, I think. In case you're not clear on the interpolator: it is fed with the 2kHz sample rate, and then it interpolates new samples that are ahead by a phase determined by mu. The Farrow filter is often used for this. -Kevin
"Steve Underwood" <steveu@coppice.org> wrote in message
news:80bddbd7.0404011640.df1e222@posting.google.com...
> "Kevin Neilson" <kevin_neilson@removethiscomcast.net> wrote in message
news:<8oOac.52137$K91.127528@attbi_s02>...
> > > You are sampling two samples per symbol, so if the loop is locked and
you
> > are sampling at the symbol instants and midway between the samples, then > > x(r-1), x(r-1/2), and x(r) will be three successive samples. These
three
> > would comprise two strobes and one midway or one strobe and two midway > > samples. > > > > The TED can be used to adjust a PLL that controls the sample clock.
Then no
> > interpolation is required; the sample clock is just adjusted so that the
ADC
> > samples at the correct points. That's mostly an older method. The
other
> > type of loop uses an ADC that samples at a constant rate, and then a > > resampling filter controlled by the loop interpolates the value at the > > sampling instant, which will be between the ADC samples. Before the
loop is
> > locked, the interpolator will not be sampling at the symbol instants,
but
> > the error value will be large and will push the loop until the
interpolated
> > values occur at the symbol instants and the midway points. > > -Kevin > > Why do you call tuned sampling an older method? It is really a matter > of circumstances, rather than age. If you are, say, building modems to > run in the PCM telephone network you have no control over the > sampling, and have to fiddle things around by filtering. If you have > control over the sampler, especially for very high speed channels, > tuning the sampling time to match the symbols simplies things quite a > bit. > > Regards, > Steve
That was just my observation from what I've seen. In the past, the PLL was usually external, because it took too many gates to do interpolation of new samples. I think the trend is to get rid of the analog loop, not because it is more complex, but because everybody wants to get rid of external analog parts and suck all that logic into the FPGA/ASIC. It's complex to do the loop and the Farrow filter interpolation in logic, but gates are cheaper than VCOs and analaog loop filters. People like to see reference designs that don't involve a lot of tweaking analog parts. -Kevin
"Kevin Neilson" <kevin_neilson@removethiscomcast.net> wrote in message news:<EOibc.161285$_w.1784112@attbi_s53>...
> "rider" <shabana_rizvi@yahoo.com> wrote in message > news:ca3a68c8.0404012151.576d0986@posting.google.com... > > "Kevin Neilson" <kevin_neilson@removethiscomcast.net> wrote in message > news:<8oOac.52137$K91.127528@attbi_s02>... > > > "rider" <shabana_rizvi@yahoo.com> wrote in message > > > news:ca3a68c8.0403312046.7db78add@posting.google.com... > > > > Hi! > > > > > > > > I have a query regarding the computation of Gardner Timing Error > > > > detector (TED). Dr. Gardner on his article "A BPSK/QPSK Timing Error > > > > Detector for Sampled Receivers" states that Timing Error (for BPSK) > > > > can be computed as: > > > > > > > > U(r) = x(r-1/2)[x(r)-x(r-1)] > > > > > > > > He calls the samples x(r) as "STROBE" values and those like x(r-1/2) > > > > as "MIDWAY" > > > > between strobes [like x(r-1/2) is midway between x(r) and x(r-1)]. > > > > > > > > Its also mentioned that this algorithm uses only 2 samples/symbol to > > > > compute the error. I need to ask that: > > > > > > > > 1)What he means by these STROBE and MIDWAY values ,x(r) and x(r-1/2) , > > > > and how to compute them from the available 2 samples/symbol? > > > > > > > > 2) For the complete timing recovery loop, there is also an > > > > interpolator. If the interpolator is fed with 2 samples/symbol, then > > > > what is it computing? is it computing the midway value x(r-1/2) or > > > > what? > > > > > > > > Regards > > > > Rider > > > > > > You are sampling two samples per symbol, so if the loop is locked and > you > > > are sampling at the symbol instants and midway between the samples, then > > > x(r-1), x(r-1/2), and x(r) will be three successive samples. These > three > > > would comprise two strobes and one midway or one strobe and two midway > > > samples. > > > > > > The TED can be used to adjust a PLL that controls the sample clock. > Then no > > > interpolation is required; the sample clock is just adjusted so that the > ADC > > > samples at the correct points. That's mostly an older method. The > other > > > type of loop uses an ADC that samples at a constant rate, and then a > > > resampling filter controlled by the loop interpolates the value at the > > > sampling instant, which will be between the ADC samples. Before the > loop is > > > locked, the interpolator will not be sampling at the symbol instants, > but > > > the error value will be large and will push the loop until the > interpolated > > > values occur at the symbol instants and the midway points. > > > -Kevin > > > > > > Thanks Kevin! > > > > Yes i m trying to follow the new method in which the sampling clock of > > the receiver is fixed at Fs and an all-digital interpolation/TED loop > > is use to recover timing. Like in the fig below: > > > > > > (~) Fixed Clk --/--Fs= Nfb (fb=symbol clock , Fs=sampling clock) > > > > Fs=1/Ts|-------------| Fi=1/Ti |---| > > x(mTs)----|Interpolator |--------->|TED| > > ----^-------- --- > > | | > > |-------| |---------| > > |Control|<-------------|Loop Fil | > > --------- ----------- > > > > > > However, i still cant understand a point . When the Gardner algorithm > > says it uses 2 samples/symbol, then does it mean that Fs in the above > > figure SHOULD exactly be 2fb? In my work, i have chosen fb=1khz and > > Fs=8khz. Do i have to decimate this 8khz signal to 2 Khz before > > applying it to the interpolator or i can feed this 8Khz signal > > directly? > > > > Thanks > > For the Gardner algorithm I don't think the extra samples help at all. There > are other algorithms that use more samples per symbol but I think you can > throw out three of every four in your case. > > Then you would be left with a sample rate of about 2kHz and the control > block would continuously adjust the phase so that the sampling instants are > at the strobes and midpoints. The rate at which this phase "rolls" would be > the difference in frequencies between the symbol rate and 1KHz (half the > sample rate). This phase is often called mu in the texts. If the symbol > rate is exactly 1kHz, for example, mu will remain constant. The error value > would only be calculated every other sample. > > I think you may still operate the loop with an 8kHz sample rate and no > decimation. But in that case, mu would have to have a large derivative and > you would have to design the tracking loop especially for this mode of > operation. Normally you want to design the loop so the derivative of mu is > small. So it's probably best to get the effective sample rate as close to > 2X the symbol rate as possible. If it's helpful, you can still use a > lowpass-filter-based decimator instead of just throwing out samples; this > increases precision. Decimation by 4 can give you two extra bits of > precision, I think. > > In case you're not clear on the interpolator: it is fed with the 2kHz > sample rate, and then it interpolates new samples that are ahead by a phase > determined by mu. The Farrow filter is often used for this. > -Kevin
Kevin! Thanks for the reply again. For sometimes i have been confused by the term Interpolator itself. Interpolator (opposite of decimator) is normally used to mention an upsampling of the signal sample rate (zero insertion and then an anti-imaging filter). But here in case of timing recovery, they sometimes mention that Ti > Ts (means fi<fs , with reference to fig above), so it means the "interpolator" is actually decimating? So we may ask: 1) Is Ti always > Ts? 2) Whatever filter structure we may employ for interpolator (like farrow) , wouldn't it be running at a fix clock (like in hardware, the clock signal driving the output register of interpolator would be fix?) . So how does it adjust the phase, if it is outputting samples after a fixed time? Regards Rider
shabana_rizvi@yahoo.com (rider) wrote in message news:<ca3a68c8.0404040722.6c9882c5@posting.google.com>...
> Kevin! > > Thanks for the reply again. For sometimes i have been confused by the > term Interpolator itself. Interpolator (opposite of decimator) is > normally used to mention an upsampling of the signal sample rate (zero > insertion and then an anti-imaging filter). But here in case of timing > recovery, they sometimes mention that Ti > Ts (means fi<fs , with > reference to fig above), so it means the "interpolator" is actually > decimating? So we may ask: > > 1) Is Ti always > Ts? > > 2) Whatever filter structure we may employ for interpolator (like > farrow) , wouldn't it be running at a fix clock (like in hardware, the > clock signal driving the output register of interpolator would be > fix?) . So how does it adjust the phase, if it is outputting samples > after a fixed time? > > Regards > Rider
If the term interpolator is confusing you, try saying phase shifter. That is what the filter is doing here. For example. Lets say you want a root raised cosine filter at you receiver. I think your incoming samples are at 8kHz, and your symbol rate is 1kHz. A +-4 symbol RRC filter would be 65 samples long (since you usually add one and make it odd). So, we could apply this 65 sample FIR every 4 incoming samples, and feed the results into the equalizer at 2k/s, and let the Gardner TED work out how well those samples are placed. However we have no way to apply a fine timing correction when the TED says we need one. Correcting by shifting in 8kHz samples is very coarse, and leads to problems. Now consider what happens if you ask the RRC filter designer to treat the input sample rate as 16*8kHz, and the filter length as 16*65 samples. Now, if you have a very long set of coefficients. If you use every 16th coeff. from this filter in the original RRC calculation, you will end up with much the same result as before. However, if you step along 1 coefficient, and take every 16th coeff. the RRC output will be phase shifted by 1/16th of an 8kHz sample. Why? because those coeffs were designed to be multiplied by samples 1/16th of an 8kHz sample away from the samples you are actually using. You have 16 of these phase shifting RRC filter coefficient sets spanning 0/16th of a sample to 15/16th of a sample of phase shift. Now, you have something fine enough to work with the TED. As the TED keeps telling you to nudge the timing in a particular direction, you step along the coefficient sets until you reach the end. Then you jump back to the other end, and hop one whole 8kHz sample. Voila, smooth TED operation. For very higher order QAM 16 is probably not high enough. For simple 16 state QAM is may be overkill. You need to tune that figure to the needs of your system, to stabilise the equalizer adaption and the constellation sufficiently for you actual system. Regards, Steve
Hi!

Thanks for detailed reply Steve and Kevin. I am now trying to
implement the Interpolator . The simplest form is the Linear
Interpolator defined as:

y[k] = x[m(k)] + u[k]*{ x[m(k)+1] - x[m(k)] }

I have a confusion in understanding the "base-point" index m(k). This
is defined in Gardner's Article (Interpolation in digital Modems
P-I)as:

                        m= m(k) - i 

1) Is x[m(k)+1] the "recent/current" sample and x[m(k)] is
previous/delayed sample of x or vice-versa?

2)Its written in paper that correct set of signals is identified by
m(k) and the current set of filter samples (coefficients) is
identified by u[k]. However, the Farrow structure doesnt show any
detail as to how m(k) is involved in computation. Its just a
combination of tapped delay lines and their sums controleld by u[k],
which is supplied by controller. About m(k) the article says: "The NCO
is operated such that its avarage period is Ti. Recycling the NCO
register indicates that a new interpolant is to be computed, using the
signal samples currently residing in the interpolator's shift
register. Thus, base-point index is identified by flagging the correct
set of signal samples, rather than explicitly computing m(k)". What
does this mean? We have to compute the interpolant on every clock
cycle Ts? If yes, what is the significance of
m(k)?

Regards
Rider