Reply by Eric Jacobsen October 5, 20112011-10-05
On Tue, 04 Oct 2011 20:38:15 -0500, "johnlovestohate"
<aliatolemiss@n_o_s_p_a_m.gmail.com> wrote:

>>On Tue, 04 Oct 2011 14:06:43 -0500, "johnlovestohate" >><aliatolemiss@n_o_s_p_a_m.gmail.com> wrote: >> >>>>On Mon, 03 Oct 2011 16:36:51 -0500, johnlovestohate wrote: >>>> >>>>> Hi, >>>>> I want to design a software PLL to correct a frequency offset in a >>>>> baseband BPSK signal and after referring to the book Phase Locked >Loops >>>>> by Ronald Best I understand most of it. I still have questions >>>regarding >>>>> designing of the loop filter. >>>>> >>>>> L(s) = tau2*s + 1 >>>>> ___________ >>>>> tau1*s >>>>> >>>>> The laplace transform of the loop filter is as shown above and I can >>>use >>>>> bilinear transform to convert this into a time-domain equation. The >>>>> question is how do I design the values of tau2 and tau1 when I have >the >>>>> following information available to me. >>>>> >>>>> Center frequency = 0Hz (Baseband signal) Frequency offset can be in >the >>>>> range of +/- 5000Hz. Sampling frequency = 1MHz. >>>>> >>>>> tau2 and tau1 are dependent upon the noise-bandwidth. How do I set >the >>>>> noise bandwidth with the information that I have? >>>> >>>>Since you don't have enough information to do a good job, just pick >>>>numbers that look right and run with them. >>>> >>>>You would like for your loop bandwidth to be greater than 5000Hz, to >>>>assist in locking to your frequency offset. But if your SNR is too low > >>>>for that then a wide-open loop bandwidth will result in too much carrier > >>>>jitter. What you really need is to know your SNR and the expected >>>>dynamics of the difference between your local reference oscillator and >>>>the carrier frequency of your signal. If you don't know these >absolutely >>> >>>>(which you often don't in a mobile system), then you least need to >decide >>> >>>>on design values outside of which you won't guarantee the system to >work. >>>> >>> >>>I am just doing this as a learning experiment using USRPs and GNU Radio >so >>>the SNR for my system will be very high (> 30dB). I tested the USRPs that >I >>>have and found out that the offset lies between +/-5000Hz. So as you >>>suggested I will choose a loop bandwidth of greater than 5000Hz to lock >to >>>the offset. >> >>The loop bandwidth should really be chosen as a function of the symbol >>rate, and you haven't indicated what symbol rate you're planning on >>using. > >samples per symbol = 2 >sampling rate = 1MHz > >With the above parameters how do we choose the loop bandwidth. Is there a >hard and fast rule or do I have to experiment and depending upon the way it >performs fine tune it? > >I am not a communications engineer. All I know is programming and computer >science. I am doing this as a hobby as my ultimate goal is to contribute to >GNU Radio project.
Setting tracking loop bandwidths may depend on the application, so you're the only one that can really decide where they should be. The general tradeoff is that the wider the loop the better it will track out perturbations but the more noise it will let through. If the loop bandwidth approaches the modulation bandwidth it will track out phase modulation, which removes the data, which is generally not considered good. If the loop bandwidth is too small, then any little perturbation, including phase noise, can cause a cycle slip, which is also bad if the signal is coherently modulated. In my experience many places keep their design practices for setting loop bandwidths proprietary, and, as mentioned, they're generally application-dependent, too, so it may take a bit of research to find what will work best for whatever it is you're trying to do. Eric Jacobsen Anchor Hill Communications www.anchorhill.com
Reply by johnlovestohate October 4, 20112011-10-04
>On Tue, 04 Oct 2011 14:06:43 -0500, "johnlovestohate" ><aliatolemiss@n_o_s_p_a_m.gmail.com> wrote: > >>>On Mon, 03 Oct 2011 16:36:51 -0500, johnlovestohate wrote: >>> >>>> Hi, >>>> I want to design a software PLL to correct a frequency offset in a >>>> baseband BPSK signal and after referring to the book Phase Locked
Loops
>>>> by Ronald Best I understand most of it. I still have questions >>regarding >>>> designing of the loop filter. >>>> >>>> L(s) = tau2*s + 1 >>>> ___________ >>>> tau1*s >>>> >>>> The laplace transform of the loop filter is as shown above and I can >>use >>>> bilinear transform to convert this into a time-domain equation. The >>>> question is how do I design the values of tau2 and tau1 when I have
the
>>>> following information available to me. >>>> >>>> Center frequency = 0Hz (Baseband signal) Frequency offset can be in
the
>>>> range of +/- 5000Hz. Sampling frequency = 1MHz. >>>> >>>> tau2 and tau1 are dependent upon the noise-bandwidth. How do I set
the
>>>> noise bandwidth with the information that I have? >>> >>>Since you don't have enough information to do a good job, just pick >>>numbers that look right and run with them. >>> >>>You would like for your loop bandwidth to be greater than 5000Hz, to >>>assist in locking to your frequency offset. But if your SNR is too low
>>>for that then a wide-open loop bandwidth will result in too much carrier
>>>jitter. What you really need is to know your SNR and the expected >>>dynamics of the difference between your local reference oscillator and >>>the carrier frequency of your signal. If you don't know these
absolutely
>> >>>(which you often don't in a mobile system), then you least need to
decide
>> >>>on design values outside of which you won't guarantee the system to
work.
>>> >> >>I am just doing this as a learning experiment using USRPs and GNU Radio
so
>>the SNR for my system will be very high (> 30dB). I tested the USRPs that
I
>>have and found out that the offset lies between +/-5000Hz. So as you >>suggested I will choose a loop bandwidth of greater than 5000Hz to lock
to
>>the offset. > >The loop bandwidth should really be chosen as a function of the symbol >rate, and you haven't indicated what symbol rate you're planning on >using.
samples per symbol = 2 sampling rate = 1MHz With the above parameters how do we choose the loop bandwidth. Is there a hard and fast rule or do I have to experiment and depending upon the way it performs fine tune it? I am not a communications engineer. All I know is programming and computer science. I am doing this as a hobby as my ultimate goal is to contribute to GNU Radio project. Thanks
> >e.g., if you want to handle QPSK with a symbol rate that allows a >couple samples per symbol or more with your 1MHz sample rate, then a >5000 Hz loop bandwidth for carrier recovery will be too wide for good >performance. > > >Eric Jacobsen >Anchor Hill Communications >www.anchorhill.com >
Reply by Eric Jacobsen October 4, 20112011-10-04
On Tue, 04 Oct 2011 14:06:43 -0500, "johnlovestohate"
<aliatolemiss@n_o_s_p_a_m.gmail.com> wrote:

>>On Mon, 03 Oct 2011 16:36:51 -0500, johnlovestohate wrote: >> >>> Hi, >>> I want to design a software PLL to correct a frequency offset in a >>> baseband BPSK signal and after referring to the book Phase Locked Loops >>> by Ronald Best I understand most of it. I still have questions >regarding >>> designing of the loop filter. >>> >>> L(s) = tau2*s + 1 >>> ___________ >>> tau1*s >>> >>> The laplace transform of the loop filter is as shown above and I can >use >>> bilinear transform to convert this into a time-domain equation. The >>> question is how do I design the values of tau2 and tau1 when I have the >>> following information available to me. >>> >>> Center frequency = 0Hz (Baseband signal) Frequency offset can be in the >>> range of +/- 5000Hz. Sampling frequency = 1MHz. >>> >>> tau2 and tau1 are dependent upon the noise-bandwidth. How do I set the >>> noise bandwidth with the information that I have? >> >>Since you don't have enough information to do a good job, just pick >>numbers that look right and run with them. >> >>You would like for your loop bandwidth to be greater than 5000Hz, to >>assist in locking to your frequency offset. But if your SNR is too low >>for that then a wide-open loop bandwidth will result in too much carrier >>jitter. What you really need is to know your SNR and the expected >>dynamics of the difference between your local reference oscillator and >>the carrier frequency of your signal. If you don't know these absolutely > >>(which you often don't in a mobile system), then you least need to decide > >>on design values outside of which you won't guarantee the system to work. >> > >I am just doing this as a learning experiment using USRPs and GNU Radio so >the SNR for my system will be very high (> 30dB). I tested the USRPs that I >have and found out that the offset lies between +/-5000Hz. So as you >suggested I will choose a loop bandwidth of greater than 5000Hz to lock to >the offset.
The loop bandwidth should really be chosen as a function of the symbol rate, and you haven't indicated what symbol rate you're planning on using. e.g., if you want to handle QPSK with a symbol rate that allows a couple samples per symbol or more with your 1MHz sample rate, then a 5000 Hz loop bandwidth for carrier recovery will be too wide for good performance. Eric Jacobsen Anchor Hill Communications www.anchorhill.com
Reply by johnlovestohate October 4, 20112011-10-04
>On Mon, 03 Oct 2011 16:36:51 -0500, johnlovestohate wrote: > >> Hi, >> I want to design a software PLL to correct a frequency offset in a >> baseband BPSK signal and after referring to the book Phase Locked Loops >> by Ronald Best I understand most of it. I still have questions
regarding
>> designing of the loop filter. >> >> L(s) = tau2*s + 1 >> ___________ >> tau1*s >> >> The laplace transform of the loop filter is as shown above and I can
use
>> bilinear transform to convert this into a time-domain equation. The >> question is how do I design the values of tau2 and tau1 when I have the >> following information available to me. >> >> Center frequency = 0Hz (Baseband signal) Frequency offset can be in the >> range of +/- 5000Hz. Sampling frequency = 1MHz. >> >> tau2 and tau1 are dependent upon the noise-bandwidth. How do I set the >> noise bandwidth with the information that I have? > >Since you don't have enough information to do a good job, just pick >numbers that look right and run with them. > >You would like for your loop bandwidth to be greater than 5000Hz, to >assist in locking to your frequency offset. But if your SNR is too low >for that then a wide-open loop bandwidth will result in too much carrier >jitter. What you really need is to know your SNR and the expected >dynamics of the difference between your local reference oscillator and >the carrier frequency of your signal. If you don't know these absolutely
>(which you often don't in a mobile system), then you least need to decide
>on design values outside of which you won't guarantee the system to work. >
I am just doing this as a learning experiment using USRPs and GNU Radio so the SNR for my system will be very high (> 30dB). I tested the USRPs that I have and found out that the offset lies between +/-5000Hz. So as you suggested I will choose a loop bandwidth of greater than 5000Hz to lock to the offset.
>-- >www.wescottdesign.com >
Reply by Tim Wescott October 4, 20112011-10-04
On Tue, 04 Oct 2011 10:26:17 -0700, HardySpicer wrote:

> On Oct 5, 4:19&nbsp;am, Tim Wescott <t...@seemywebsite.com> wrote: > > >> Since you don't have enough information to do a good job, just pick >> numbers that look right and run with them. >> > Love that - there speaks an engineer!
OK -- you might want to think about how the system is going to perform, first. -- www.wescottdesign.com
Reply by HardySpicer October 4, 20112011-10-04
On Oct 5, 4:19&#4294967295;am, Tim Wescott <t...@seemywebsite.com> wrote:

> > Since you don't have enough information to do a good job, just pick > numbers that look right and run with them. >
Love that - there speaks an engineer!
Reply by Tim Wescott October 4, 20112011-10-04
On Mon, 03 Oct 2011 16:36:51 -0500, johnlovestohate wrote:

> Hi, > I want to design a software PLL to correct a frequency offset in a > baseband BPSK signal and after referring to the book Phase Locked Loops > by Ronald Best I understand most of it. I still have questions regarding > designing of the loop filter. > > L(s) = tau2*s + 1 > ___________ > tau1*s > > The laplace transform of the loop filter is as shown above and I can use > bilinear transform to convert this into a time-domain equation. The > question is how do I design the values of tau2 and tau1 when I have the > following information available to me. > > Center frequency = 0Hz (Baseband signal) Frequency offset can be in the > range of +/- 5000Hz. Sampling frequency = 1MHz. > > tau2 and tau1 are dependent upon the noise-bandwidth. How do I set the > noise bandwidth with the information that I have?
Since you don't have enough information to do a good job, just pick numbers that look right and run with them. You would like for your loop bandwidth to be greater than 5000Hz, to assist in locking to your frequency offset. But if your SNR is too low for that then a wide-open loop bandwidth will result in too much carrier jitter. What you really need is to know your SNR and the expected dynamics of the difference between your local reference oscillator and the carrier frequency of your signal. If you don't know these absolutely (which you often don't in a mobile system), then you least need to decide on design values outside of which you won't guarantee the system to work. -- www.wescottdesign.com
Reply by October 3, 20112011-10-03
> Where you set the cross over point is dictated by your requirements > and the components used, i.e., phase noise. >
should change --> "i.e., the phase noise plot of your reference, VCO and eventual noise profile transfered to the output of your PLL."
> > Inside the loop bandwidth, you have a lowpass function outside it&#4294967295;s a > highpass function. >
should change ---> "highpass function from the VCO outside the loop bandwidth"
Reply by October 3, 20112011-10-03
On Oct 3, 2:36&#4294967295;pm, "johnlovestohate"
<aliatolemiss@n_o_s_p_a_m.gmail.com> wrote:
> Hi, > I want to design a software PLL to correct a frequency offset in a baseband > BPSK signal and after referring to the book Phase Locked Loops by Ronald > Best I understand most of it. I still have questions regarding designing of > the loop filter. > > L(s) = tau2*s + 1 > &#4294967295; &#4294967295; &#4294967295; &#4294967295;___________ > &#4294967295; &#4294967295; &#4294967295; &#4294967295; &#4294967295;tau1*s > > The laplace transform of the loop filter is as shown above and I can use > bilinear transform to convert this into a time-domain equation. The > question is how do I design the values of tau2 and tau1 when I have the > following information available to me. > > Center frequency = 0Hz (Baseband signal) > Frequency offset can be in the range of +/- 5000Hz. > Sampling frequency = 1MHz. &#4294967295; > > tau2 and tau1 are dependent upon the noise-bandwidth. How do I set the > noise bandwidth with the information that I have? > > Thanks
Setting PLL loop bandwidth is always application dependent. For example if your tracking a dirty short term but stable long term source you will use a narrow loop, i.e., GPS clock. If you&#4294967295;re tracking a good short term reference you&#4294967295;ll open up the bandwidth, i.e., want to transfer good phase noise performance of a TXCO to a high frequency VCO. Where you set the cross over point is dictated by your requirements and the components used, i.e., phase noise. By definition, in a PLL system, you are tracking you&#4294967295;re reference phase if the loop is locked. Inside the loop bandwidth, you have a lowpass function outside it&#4294967295;s a highpass function. Picking the compensation specs, (filter), is a function of the loop gain and cross over pt, i.e., your chosen bandwidth. Regards
Reply by Eric Jacobsen October 3, 20112011-10-03
On Mon, 03 Oct 2011 17:10:12 -0500, "johnlovestohate"
<aliatolemiss@n_o_s_p_a_m.gmail.com> wrote:

>>On Mon, 03 Oct 2011 16:36:51 -0500, "johnlovestohate" >><aliatolemiss@n_o_s_p_a_m.gmail.com> wrote: >> >>>Hi, >>>I want to design a software PLL to correct a frequency offset in a >baseband >>>BPSK signal and after referring to the book Phase Locked Loops by Ronald >>>Best I understand most of it. I still have questions regarding designing >of >>>the loop filter. >>> >>>L(s) = tau2*s + 1 >>> ___________ >>> tau1*s >>> >>>The laplace transform of the loop filter is as shown above and I can use >>>bilinear transform to convert this into a time-domain equation. The >>>question is how do I design the values of tau2 and tau1 when I have the >>>following information available to me. >>> >>>Center frequency = 0Hz (Baseband signal) >>>Frequency offset can be in the range of +/- 5000Hz. >>>Sampling frequency = 1MHz. >>> >>>tau2 and tau1 are dependent upon the noise-bandwidth. How do I set the >>>noise bandwidth with the information that I have? >>> >>>Thanks >> >>It's kind of the other way around, i.e., the loop noise bandwidth will >>be a result of the parameters selected that lead to the implementation >>of tau1 and tau2. You select the damping ratio and loop bandwidth, >>which determines tau1 and tau2, and then you can sort out the noise >>bandwidth from that. I suppose you could start with a noise >>bandwidth parameter and work it the other way, too. > >I want to track the carrier phase. So if my offset is in the range >+/-5000Hz, what will the loop bandwidth be? I read somewhere that it should >be at least equal to the maximum frequency content which in my case will be >5000Hz. Am I right?
Much depends on the symbol rate, assuming you update the loop once per symbol or so. If the frequency offset is a large fraction of the symbol rate it's a different problem than if it is a very small fraction of the symbol rate. Generally the loop parameters are set to best perform the task of the loop, in this case tracking carrier phase. This is a generally a separate design parameter from the frequency acquisition capability, of which the loop pull range may only be a part. If the frequency offset is larger than the pull range of the loop, you'll need to do something else to pull the frequency offset within the pull range. Opening up the loop parameters solely to increase the pull range may degrade the performance of the carrier tracking function. So there's potentially a tradeoff between managing the frequency offset correction, the pull range of the loop, and the carrier phase tracking performance. Those all depend on how you want the system to work and what it has to do, so you'll have to answer those within the context of your project. There is a lot of literature out there on signal acquisition and tracking, and BPSK is one of the simpler cases. You should be able to find what you need via searches. Eric Jacobsen Anchor Hill Communications www.anchorhill.com