DSPRelated.com
Forums

Mueller and Muller timing recovery

Started by cpshah99 April 28, 2009
HI All

I am trying to simulate M&M timing recovery, just trying to understand
this timing method.

I am working on baseband system with BPSK for now. I have 12 samples per
symbol. The received signal is:

y=\sum d_n g(t-nT-\tau) + noise

where d_n are data symbols and g(t) is raised cosine pulse.

ideally, the optimum sampling point should be middle of the pulse and I am
getting exact BER performance for BPSK.

Now, if I dont sample at middle but anywhere else, BER degrades, which is
correct.

I have decided to use M&M timing recovery because the TED o/p depends on
data symbols and I have training sequence in my packet.

the error signal e = Re{x_n conj(a_{n-1}) - x_{n-1} conj(a_n)}
where x_n is nth symbol sample and a_n is nth transmitted symbol.

then \tau=\tau + k*e is the update eqn where k is loop gain.

the picture is clear to me: take first sample (at wrong instant), measure
the error, update timing phase and then interpolate between two samples to
get next sample.

but how do i simulate this. Instead of sampling at middle of the pulse
take first sample anywhere else, lets say 3 samples before the ideal
sample, but then I am stuggling how to move forward. Because in the error
signal eqn, the first error will be 0 as (n-1)th terms are zero;

Any guidance will be appreciated.

Thanks,

Best Regards,

Chintan
On Apr 28, 1:48&#4294967295;pm, "cpshah99" <cpsha...@rediffmail.com> wrote:
> HI All > > I am trying to simulate M&M timing recovery, just trying to understand > this timing method. > > I am working on baseband system with BPSK for now. I have 12 samples per > symbol. The received signal is: > > y=\sum d_n g(t-nT-\tau) + noise > > where d_n are data symbols and g(t) is raised cosine pulse. > > ideally, the optimum sampling point should be middle of the pulse and I am > getting exact BER performance for BPSK. > > Now, if I dont sample at middle but anywhere else, BER degrades, which is > correct. > > I have decided to use M&M timing recovery because the TED o/p depends on > data symbols and I have training sequence in my packet. > > the error signal e = Re{x_n conj(a_{n-1}) - x_{n-1} conj(a_n)} > where x_n is nth symbol sample and a_n is nth transmitted symbol. > > then \tau=\tau + k*e is the update eqn where k is loop gain. > > the picture is clear to me: take first sample (at wrong instant), measure > the error, update timing phase and then interpolate between two samples to > get next sample. > > but how do i simulate this. Instead of sampling at middle of the pulse > take first sample anywhere else, lets say 3 samples before the ideal > sample, but then I am stuggling how to move forward. Because in the error > signal eqn, the first error will be 0 as (n-1)th terms are zero; >
Why don't you start computing the error signal at the 2nd symbol? Typically one has to assume that either: * there is a preamble that is detected, thus the symbol sychronizer starts at the first symbol after the preamble. * it's a continuous stream of symbols so there is always a "n-1"th symbol. Also note that M&M has quite a bit of self-noise for certain choices of the rolloff factor. Julius
STUPIDENT

cpshah99 wrote:

> HI All > > I am trying to simulate M&M timing recovery, just trying to understand > this timing method. > > I am working on baseband system with BPSK for now. I have 12 samples per > symbol. The received signal is: > > y=\sum d_n g(t-nT-\tau) + noise > > where d_n are data symbols and g(t) is raised cosine pulse. > > ideally, the optimum sampling point should be middle of the pulse and I am > getting exact BER performance for BPSK. > > Now, if I dont sample at middle but anywhere else, BER degrades, which is > correct. > > I have decided to use M&M timing recovery because the TED o/p depends on > data symbols and I have training sequence in my packet. > > the error signal e = Re{x_n conj(a_{n-1}) - x_{n-1} conj(a_n)} > where x_n is nth symbol sample and a_n is nth transmitted symbol. > > then \tau=\tau + k*e is the update eqn where k is loop gain. > > the picture is clear to me: take first sample (at wrong instant), measure > the error, update timing phase and then interpolate between two samples to > get next sample. > > but how do i simulate this. Instead of sampling at middle of the pulse > take first sample anywhere else, lets say 3 samples before the ideal > sample, but then I am stuggling how to move forward. Because in the error > signal eqn, the first error will be 0 as (n-1)th terms are zero; > > Any guidance will be appreciated. > > Thanks, > > Best Regards, > > Chintan
Hey Julius

Thanks for replying as always.


>Why don't you start computing the error signal at the 2nd symbol? >
so take 2nd symbol and 1st symbol and then compute error.
>Typically one has to assume that either: > * there is a preamble that is detected, thus the symbol sychronizer > starts at the first symbol after the preamble.
ok. makes sense.
> * it's a continuous stream of symbols so there is always a "n-1"th > symbol. >
just not clear about this. if you could please explain.
>Also note that M&M has quite a bit of self-noise for certain choices >of >the rolloff factor. >
I have read this thing, but want to understand this topic completely. I want to also learn about S-curves and all the terminology. Because this is great topic. You know we have discussed a lot on this.
>Julius >
Thanks again. Chintan (Stupident) :-)
cpshah99 wrote:
> Hey Julius > > Thanks for replying as always. > > >> Why don't you start computing the error signal at the 2nd symbol? >> > > so take 2nd symbol and 1st symbol and then compute error. > >> Typically one has to assume that either: >> * there is a preamble that is detected, thus the symbol sychronizer >> starts at the first symbol after the preamble. > > ok. makes sense. > >> * it's a continuous stream of symbols so there is always a "n-1"th >> symbol. >> > > just not clear about this. if you could please explain.
If you're monitoring a continuous stream it's assumed that your receiver can take it's sweet time acquiring sync, and that you'll just throw away any data that you couldn't sync to. "There's always an 'n-1'th symbol" just asserts that you can assume that whatever symbol is getting transmitted _now_, there is a practically infinite number of predecessors and successors to it. So there's no need for a preamble or training sequence as long as it's possible for the receiver to eventually lock on. Contrast this with a discrete packet of data, where if you miss the first few bits of the payload you may have well have missed the whole packet. For those protocols, it's not a bad idea to make life easy for the receiver by transmitting a preamble.
>> Also note that M&M has quite a bit of self-noise for certain choices >> of >> the rolloff factor. >> > > I have read this thing, but want to understand this topic completely. I > want to also learn about S-curves and all the terminology. Because this is > great topic. You know we have discussed a lot on this. > >> Julius >> > > Thanks again. > > Chintan (Stupident) :-)
Thank you for taking our resident curmudgeon's ranting in good humor. -- Tim Wescott Wescott Design Services http://www.wescottdesign.com Do you need to implement control loops in software? "Applied Control Theory for Embedded Systems" was written for you. See details at http://www.wescottdesign.com/actfes/actfes.html
Hey Tim

Thanks. I guess, it is clear to me now. Let me just repeat again.

Assuming that I have detected preamble by correlation and then I start my
synchronization, means i will use last symbol of the preamble as (n-1)th to
calculate error. I think this is correct.


> >Thank you for taking our resident curmudgeon's ranting in good humor. >
Anytime :-). I believe some stupidents like *me* are *willing to learn* regardless of any comments. Thanks again to all of you. Chintan

cpshah99 wrote:

> Hey Tim > > Thanks. I guess, it is clear to me now. Let me just repeat again. > > Assuming that I have detected preamble by correlation and then I start my > synchronization, means i will use last symbol of the preamble as (n-1)th to > calculate error. I think this is correct.
No. 1. If you have detected the preamble, you already have synchronization. 2. The whole point of M&M synchronizer is one sample per symbol. If you can afford more then one sample per symbol, there are much better schemes.
> >>Thank you for taking our resident curmudgeon's ranting in good humor. >> > > > Anytime :-). I believe some stupidents like *me* are *willing to learn* > regardless of any comments. > > Thanks again to all of you.
Go to hell, clueless studiot. Nobody yet learned anything by bla-bla-bla. VLV
Hi VLV

Thanks for reply.

>1. If you have detected the preamble, you already have synchronization. >
this occured to me after i posted my reply.
>2. The whole point of M&M synchronizer is one sample per symbol. If you >can afford more then one sample per symbol, there are much better
schemes.
>
I can afford more than one sample per symbol, but i just want to implemet this. It will be great if somebody can tell me this: I start sampling at wrong instants (as I have stated before) and use M&M, will I be able to get rid of timing error?
>Go to hell
I am nearly there :-) Thanks again. Chintan.

cpshah99 wrote:


> I start sampling at wrong instants (as I have stated before) and use M&M, > will I be able to get rid of timing error?
I don't think that you will be able to get rid of errors ever. However the correctly implemented M&M synchronizes eventually provided the data stream is random and the eye pattern has at least a slight opening. VLV
On Apr 28, 5:34&#4294967295;pm, "cpshah99" <cpsha...@rediffmail.com> wrote:
[snip]
> It will be great if somebody can tell me this: > > I start sampling at wrong instants (as I have stated before) and use M&M, > will I be able to get rid of timing error? >
Maybe I misunderstood you, but M&M is a timing error detector, meaning that all it does is generate an estimate of the timing error. I suppose that you can then use the resulting error as an input to a filter to be able to track it, and then the output of this filter can be used to steer your sampler. Of course, it's easier to debug all the above by considering the open- loop response first.