Hi, everyone. I need to design a digital NCO for implementing costas loop for carrier recovery. What I know is that NCO is driven by the loop filter output, but I don't know how? I have designed a NCO with a counter and a sin cos lookup table that generates digital sin and cos wave depending on counter value. But how can i adjust counter value according to the loop filter output? Loop filter output is a digital value and how can i use this value to adjust NCO counter. I mean what is the adjustment step? How frequently it is adjusted? So on... Can anyone here give me some ideas? Thanks in advance. Thanks Nusrat
Regarding Digital NCO design
Started by ●September 23, 2009
Reply by ●September 23, 20092009-09-23
nowsheen wrote:> Hi, everyone. > > I need to design a digital NCO for implementing costas loop for carrier > recovery. What I know is that NCO is driven by the loop filter output, but > I don't know how?Absolutely idiotic question. It is all in your textbook. VLV
Reply by ●September 23, 20092009-09-23
On Wed, 23 Sep 2009 06:22:47 -0500, nowsheen wrote:> Hi, everyone. > > I need to design a digital NCO for implementing costas loop for carrier > recovery. What I know is that NCO is driven by the loop filter output, > but I don't know how? I have designed a NCO with a counter and a sin cos > lookup table that generates digital sin and cos wave depending on > counter value. But how can i adjust counter value according to the loop > filter output? Loop filter output is a digital value and how can i use > this value to adjust NCO counter. I mean what is the adjustment step? > How frequently it is adjusted? So on... > > Can anyone here give me some ideas? Thanks in advance.Without knowing what you've done it's hard to tell you what to do. Most NCO's with sine outputs use a phase accumulator approach, where the phase increment (per-sample frequency) is added to the accumulator at each sampling interval. To change the frequency you just change the value in the phase increment register. If all you need is a square wave or a pulse you can use a counter that counts from zero up to a limit, or down from a pre-loaded value to zero; with one of those you change the limit/pre-load to change the period -- but it would be exceedingly difficult to get a sine wave out of such a counter arrangement. Is it starting to make sense? -- www.wescottdesign.com
Reply by ●September 28, 20092009-09-28
On Sep 24, 11:21�am, Tim Wescott <t...@seemywebsite.com> wrote:> On Wed, 23 Sep 2009 06:22:47 -0500, nowsheen wrote: > > Hi, everyone. > > > I need to design a digital NCO for implementing costas loop for carrier > > recovery. What I know is that NCO is driven by the loop filter output, > > but I don't know how? I have designed a NCO with a counter and a sin cos > > lookup table that generates digital sin and cos wave depending on > > counter value. But how can i adjust counter value according to the loop > > filter output? Loop filter output is a digital value and how can i use > > this value to adjust NCO counter. I mean what is the adjustment step? > > How frequently it is adjusted? So on... > > > Can anyone here give me some ideas? Thanks in advance. > > Without knowing what you've done it's hard to tell you what to do. > > Most NCO's with sine outputs use a phase accumulator approach, where the > phase increment (per-sample frequency) is added to the accumulator at > each sampling interval. �To change the frequency you just change the > value in the phase increment register. > > If all you need is a square wave or a pulse you can use a counter that > counts from zero up to a limit, or down from a pre-loaded value to zero; > with one of those you change the limit/pre-load to change the period -- > but it would be exceedingly difficult to get a sine wave out of such a > counter arrangement. > > Is it starting to make sense? > > --www.wescottdesign.comThank you very much.
Reply by ●October 6, 20092009-10-06
I am actually designing a digital costas loop and now at the stage of feeding loop filter's output to phase accumulator of NCO. The loop filter produces a 32 bit digital data. The loop filter output is fed back to NCO. But how can i decide the phase increment value from the loop filter's output? I have designed my phase accumulator and Sinlookup table. But unable to feed the loop filter's output to NCO. Because i can't derive the phase increment value needed to accumulate the phase counter? Can you suggest me an approach to adjust phase increment value depending on loop filter's output? Thanks Nusrat>On Sep 24, 11:21=A0am, Tim Wescott <t...@seemywebsite.com> wrote: >> On Wed, 23 Sep 2009 06:22:47 -0500, nowsheen wrote: >> > Hi, everyone. >> >> > I need to design a digital NCO for implementing costas loop forcarrier>> > recovery. What I know is that NCO is driven by the loop filteroutput,>> > but I don't know how? I have designed a NCO with a counter and a sinco=>s >> > lookup table that generates digital sin and cos wave depending on >> > counter value. But how can i adjust counter value according to theloop>> > filter output? Loop filter output is a digital value and how can iuse>> > this value to adjust NCO counter. I mean what is the adjustmentstep?>> > How frequently it is adjusted? So on... >> >> > Can anyone here give me some ideas? Thanks in advance. >> >> Without knowing what you've done it's hard to tell you what to do. >> >> Most NCO's with sine outputs use a phase accumulator approach, wherethe>> phase increment (per-sample frequency) is added to the accumulator at >> each sampling interval. =A0To change the frequency you just change the >> value in the phase increment register. >> >> If all you need is a square wave or a pulse you can use a counter that >> counts from zero up to a limit, or down from a pre-loaded value tozero;>> with one of those you change the limit/pre-load to change the period-->> but it would be exceedingly difficult to get a sine wave out of such a >> counter arrangement. >> >> Is it starting to make sense? >> >> --www.wescottdesign.com > >Thank you very much. >
Reply by ●October 7, 20092009-10-07
nowsheen wrote:> I am actually designing a digital costas loop and now at the stage of > feeding loop filter's output to phase accumulator of NCO. The loop filter > produces a 32 bit digital data. The loop filter output is fed back to NCO. > But how can i decide the phase increment value from the loop filter's > output? I have designed my phase accumulator and Sinlookup table. But > unable to feed the loop filter's output to NCO. Because i can't derive the > phase increment value needed to accumulate the phase counter? Can you > suggest me an approach to adjust phase increment value depending on loop > filter's output?What is the lhe loop filter's outout when the phase is dead on? That is the offest. Subtract that and the signed result is an indication of which way the phase increment needs to change, and how much. Ssuitably scale that result and add it to the existing phase increment to make a new one. Don't let saturation screw up the result. Jerry -- Engineering is the art of making what you want from things you can get. �����������������������������������������������������������������������
Reply by ●October 7, 20092009-10-07
The loop filter output is the multiplied form of data coming from I and Q arm of Costas loop. So, after multiplying these two data i am getting the input of loop filter. How can i know when the phase is dead on? Which value is this subtracted from? How does the loop filter's output decide phase increment value?When is the phase locked?>nowsheen wrote: >> I am actually designing a digital costas loop and now at the stage of >> feeding loop filter's output to phase accumulator of NCO. The loopfilter>> produces a 32 bit digital data. The loop filter output is fed back toNCO.>> But how can i decide the phase increment value from the loop filter's >> output? I have designed my phase accumulator and Sinlookup table. But >> unable to feed the loop filter's output to NCO. Because i can't derivethe>> phase increment value needed to accumulate the phase counter? Can you >> suggest me an approach to adjust phase increment value depending onloop>> filter's output? > >What is the lhe loop filter's outout when the phase is dead on? That is >the offest. Subtract that and the signed result is an indication of >which way the phase increment needs to change, and how much. Ssuitably >scale that result and add it to the existing phase increment to make a >new one. Don't let saturation screw up the result. > >Jerry >-- >Engineering is the art of making what you want from things you can get. >����������������������������������������������������������������������� >
Reply by ●October 7, 20092009-10-07
On Tue, 06 Oct 2009 23:50:02 -0500, nowsheen wrote: (top posting fixed)> > > >>nowsheen wrote: >>> I am actually designing a digital costas loop and now at the stage of >>> feeding loop filter's output to phase accumulator of NCO. The loop > filter >>> produces a 32 bit digital data. The loop filter output is fed back to > NCO. >>> But how can i decide the phase increment value from the loop filter's >>> output? I have designed my phase accumulator and Sinlookup table. But >>> unable to feed the loop filter's output to NCO. Because i can't derive > the >>> phase increment value needed to accumulate the phase counter? Can you >>> suggest me an approach to adjust phase increment value depending on > loop >>> filter's output? >> >>What is the lhe loop filter's outout when the phase is dead on? That is >>the offest. Subtract that and the signed result is an indication of >>which way the phase increment needs to change, and how much. Ssuitably >>scale that result and add it to the existing phase increment to make a >>new one. Don't let saturation screw up the result. >> >>Jerry > > The loop filter output is the multiplied form of data coming from I and > Q arm of Costas loop. So, after multiplying these two data i am getting > the input of loop filter. How can i know when the phase is dead on? > Which value is this subtracted from? How does the loop filter's output > decide phase increment value?When is the phase locked?Have you studied phase locked loops much at all? That doesn't sound like the loop filters that I know and love. Any PLL should give you an estimate of phase error, often with some mangled form of the signal mixed in. You can lock phase because the mangled signal that is mixed in has an average value of zero, so any non- zero average value that's left must be phase error. _Normally_ in a real PLL the loop filter has at least one integrator in it to insure that the average phase error is zero, and will often have a low-pass filter in it to cut down (sometimes dramatically) on the amount of signal that gets applied to the variable oscillator and thus cut down on the phase jitter of the oscillator. -- www.wescottdesign.com
Reply by ●October 7, 20092009-10-07
Thank You very much for your suggestion. But i am working with a digital costas loop design.So,can you help me to get idea about the cut of frequencies and order of the low pass filters used in I and Q phase of costas loop? The output of these filters are multiplied together and pass through a loop filter to strobe the NCO. Since all the values are digital; i cant decide how to send the loop filter's output to the input of NCO. How does this value decide the Phase increment of NCO to lock the phase and frequency? According to your response i do understand that we should check whether the loop filter's output is non zero or not? but if it is nonzero then how can i use this value to adjust NCO?I am also worried about the design of loop filter though i am using an averaging filter as a loop filter? Thanks Nusrat>On Tue, 06 Oct 2009 23:50:02 -0500, nowsheen wrote: >(top posting fixed) >> >> >> >>>nowsheen wrote: >>>> I am actually designing a digital costas loop and now at the stageof>>>> feeding loop filter's output to phase accumulator of NCO. The loop >> filter >>>> produces a 32 bit digital data. The loop filter output is fed backto>> NCO. >>>> But how can i decide the phase increment value from the loopfilter's>>>> output? I have designed my phase accumulator and Sinlookup table.But>>>> unable to feed the loop filter's output to NCO. Because i can'tderive>> the >>>> phase increment value needed to accumulate the phase counter? Canyou>>>> suggest me an approach to adjust phase increment value depending on >> loop >>>> filter's output? >>> >>>What is the lhe loop filter's outout when the phase is dead on? Thatis>>>the offest. Subtract that and the signed result is an indication of >>>which way the phase increment needs to change, and how much. Ssuitably >>>scale that result and add it to the existing phase increment to make a >>>new one. Don't let saturation screw up the result. >>> >>>Jerry >> >> The loop filter output is the multiplied form of data coming from Iand>> Q arm of Costas loop. So, after multiplying these two data i amgetting>> the input of loop filter. How can i know when the phase is dead on? >> Which value is this subtracted from? How does the loop filter's output >> decide phase increment value?When is the phase locked? > >Have you studied phase locked loops much at all? That doesn't sound like>the loop filters that I know and love. > >Any PLL should give you an estimate of phase error, often with some >mangled form of the signal mixed in. You can lock phase because the >mangled signal that is mixed in has an average value of zero, so anynon->zero average value that's left must be phase error. > >_Normally_ in a real PLL the loop filter has at least one integrator in >it to insure that the average phase error is zero, and will often have a>low-pass filter in it to cut down (sometimes dramatically) on the amount>of signal that gets applied to the variable oscillator and thus cut down>on the phase jitter of the oscillator. > >-- >www.wescottdesign.com >
Reply by ●October 7, 20092009-10-07
nowsheen wrote:> The loop filter output is the multiplied form of data coming from I and Q > arm of Costas loop. So, after multiplying these two data i am getting the > input of loop filter. How can i know when the phase is dead on? Which value > is this subtracted from? How does the loop filter's output decide phase > increment value?When is the phase locked?By "multiplied form of data coming from I and Q" do you mean sqrt(I^2+Q^2)? The phase increment is right when the frequency is locked. Then the phase remains steady. When the phase is locked, the phase comparator output is zero. Jerry -- Engineering is the art of making what you want from things you can get. �����������������������������������������������������������������������






