[time-nuts] Re: Complex PLL

d.schuecker at avm.de d.schuecker at avm.de
Thu Mar 18 12:59:11 UTC 2021


Hi,

yes, got it, I think, thanks. 

I calculate the complex quotient of the incoming complex signal and the 
local complex oscillator. I feed the imaginary part of the quotient to the 
PI controller, thus forcing it to zero. The local oscillator is updated by 
multiplying it with ( real(quotient)+j*PIOutput ). Forcing the imaginary 
part of the quotient to zero means that incoming signal and local 
oscillator are in phase.

See Matlab code and the image. 
No atan/cos/sin, just mere multiplication :)) 

Thanks

Cheers
Detlef Schücker
DD4WV

clear
n=10000;
T1=0;
T2=0.01;
s0=exp(j*2*pi*200*(0:n-1)/n);
s1=zeros(1,n);
s2=zeros(1,n);
s3=zeros(1,n);
for(k=1:n)
     s1(k)=(s0(k)/T2);
     T1=T1+imag(s1(k))/4000;
     s2(k)=0.03*imag(s1(k))+T1;
     s3(k)=T2;
     T2=T2*(real(s1(k))+j*s2(k));
 
end;
plot(1:n,real(s3),'b.-',1:n,real(s0),'r.-') 
return





"Magnus Danielson" <magnus at rubidium.se> schrieb am 17.03.2021 19:20:49:

> Von: "Magnus Danielson" <magnus at rubidium.se>
> An: time-nuts at lists.febo.com
> Datum: 17.03.2021 19:59
> Betreff: [time-nuts] Re: Complex PLL
> 
> Hi,
> 
> On 2021-03-17 17:20, Detlef Schuecker via time-nuts wrote:
> > Hi time-nuts,
> >
> > a PLL takes the phase difference of the incoming signal and the 
> > synthesized signal and feeds that in a loop filter. The output of the 
loop 
> > filter is used to steer the local oscillator. 
> >
> > In my setup I have an incoming complex signal and my local oscillator 
is 
> > generating a complex signal as well. So calculation of the phase 
> > difference is just the quotient of the incoming signal and the local 
> > oscillator, it is a sampled system. I take the quotient, calculate the 

> > angle using the atan function and then I feed it in the loop filter, a 
PI 
> > controller. The output of the loop filter is converted to a complex 
phase 
> > increment for the local oscillator with the sin and cos function. 
> >
> > Now I have to get rid of the atan, cos and sin functions.
> >
> > I am looking for a loop filter which takes the quotient of the 
> > incoming/synthesized signal as a complex value. The output of this 
loop 
> > filter should be the phase increment for the local oscillator. It 
should 
> > not use the angle of the complex value explicitly, as this will 
involve 
> > the atan/cos/sin functions.
> >
> > Is someone aware of such a loop filter? I surfed through Gardners' 
> > 'Phaselock Techniques' but did not find a hint.
> 
> That book is full of hints. Costas loop is one. Actually, you could just
> do complex multiplication and only use the real output (and thus remove
> half the complex multiplication) and use that output of the
> multiplication as input to normal PI-regulator, that will lock up and
> achieve everything you want. You can then also remove the sine with a
> squarewave. There is some benefits and losses in doing that, which may
> or may not be relevant.
> 
> There is a richness of complex detectors to be found in GPS literature,
> such as that of "Understanding GPS principles and applications" of
> Kaplan and Hegarty. You can also look at "Phase-locked loop circuit
> design" by Wolaver for additional inspiration. You end up finding that
> Garners' book is actually very comprehensive if you only take time to
> dwell into it.
> 
> Let me know if you need more hints.
> 
> Cheers and 73,
> Magnus SA0MAD
> _______________________________________________
> time-nuts mailing list -- time-nuts at lists.febo.com -- To unsubscribe
> send an email to time-nuts-leave at lists.febo.com
> To unsubscribe, go to and follow the instructions there.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: pll.png
Type: image/png
Size: 44573 bytes
Desc: not available
URL: <http://febo.com/pipermail/time-nuts_lists.febo.com/attachments/20210318/5b4d5ff1/attachment.png>


More information about the Time-nuts_lists.febo.com mailing list