# Phase locked loops

Hi. So I thought I understood PLLs pretty well after I designed a couple over summer, but I've just been taught them at university and I'm now pretty stumped! The lecture notes use Phasors which just make things confusing. I wonder if anyone could explain the 2 initial setup equations used in my notes?

Here are the notes:
http://img835.imageshack.us/img835/5376/pllv.png [Broken]

please note that my big confusion is because of the possible mixing of phasors and phases, so it would be awesome if you could try and be clear between the two.

Any help would be really appreciated,

Cheers,

Sam

Last edited by a moderator:

## Answers and Replies

jim hardy
Science Advisor
Gold Member
Dearly Missed
i'd recommend the ancient Signetics PLL applications book, ca 1972

it's on the net as a pdf....

google on terms "signetics PLL applications", maybe add NE565

this public computer won't display any of the pages, i guess it's afraid of cookies or something

that book does a good job of developing the equations.

i dont see any ambiguity in your sketch - perhaps the author considered the terms interchangeable, or perhaps slightly mis-used one ?

Or - If V2 represents phase, VCO turns it back into a phasor, ie K0 includes requisite unit (inverse of Kp) ??

old jim

Last edited:
I am no expert in PLL, I did studied a few books on PLL and never use phasor representation. Sometimes phasor like this is for representation of sine and cosine wave.

$$Re [e^{j(\omega t +\theta_0)}] = \cos(\omega t +\theta_0)\;\hbox { and }\; Im [e^{j(\omega t +\theta_0)}] = \sin(\omega t +\theta_0)$$

Do you mean this? This is not phasor though.

For Phasor, let $\vec v(z)\;$ be a complex function:

$$\vec v(z)=Re[V_0e^{j(\omega t -kz+\theta_0)}]=Re[V_0 e^{j\omega t} e^{-j(kz-\theta_0)}]= Re[\tilde v(z) e^{j\omega t}]\;\hbox { where } \tilde v(z)=V_0e^{-j(kz-\theta_0)} \;\hbox { is defined as phasor.}$$

Where you see the phasor has no time component. If you Q0 is phasor

$$\vec Q_0= Re[\tilde Q_0 e^{j\omega t}]\;\Rightarrow\; \frac {d\vec Q_0}{ d t}= \frac{d\;Re[\tilde Q_0 e^{j\omega t}]}{dt} =Re[j\omega \tilde Q_0 e^{j\omega t}]\Rightarrow \; \frac {d \tilde Q_0}{dt}= j\omega \tilde Q_0$$

Hope this help.

Last edited:
thanks for the replies guy. turns out (i think) that the phasors are the actual phases of the input and output signals. the omega is the wobble in the input phase, not the input frequency... equation 2 still doesnt quite make sense though :(

thanks for the replies guy. turns out (i think) that the phasors are the actual phases of the input and output signals. the omega is the wobble in the input phase, not the input frequency... equation 2 still doesnt quite make sense though :(

That's what I thought, so the first part of the equation is what you want, just a fancy way of saying sine and cosine. Never seen people using phasor in PLL. BUT what you wrote in (2) is true phasor differentiation though, what is that??

To answer your last question, you can have the phase change even the frequency is kept constant.

$$cos(\omega t)=sin(\omega t-\frac {\pi} 2) \;\hbox{ compare to }\;sin (\omega t)\;\hbox { represent the same frequency but has phase diffrerence of 90 deg.}$$

my confusion is that in order to differentiate a phase to get a frequency, the phase should be an increasing function right? whereas the equation for phase here is oscillating around 0.

my confusion is that in order to differentiate a phase to get a frequency, the phase should be an increasing function right? whereas the equation for phase here is oscillating around 0.

Yes, this can be confusing!!! took me a while to understand this. $\omega t \;$ is a phase. If you differentiate this, you get only $\omega\;$, which is frequency. But $\theta_0\;$ is not time dependent, it is a constant with time. They are two independent thing. If you differentiate $\omega t +\theta_0\;\hbox { you get } \omega\;$ no matter what $\theta_0\;$ is.

theta-0 is time dependent here, it is a function of t right? theta-0 = e(jwt+theta)

theta-0 is time dependent here, it is a function of t right? theta-0 = e(jwt+theta)

Nop!!! Like what you gave $(\omega t +\theta)\;$, obviously it is not a function of time!!!

But if you think back, what is the theta represent? It is the difference between the phase of the incoming signal freq. to the "locked" local oscillator. When "locked" means they are at the same frequency. So the phase is not a time dependent thing, just the phase difference between the two.

Example is say if you incoming signal is $\omega t\;\hbox { and the LO signal after lock on is }\; ( \omega t +\theta)\;$ The two only different by a constant $\theta\;$ no matter you look at it now or a minute later. It is not time dependent.

Last edited:
Nop!!! Like what you gave $(\omega t +\theta_0)\;$, obviously it is not a function of time!!!

But if you think back, what is the theta represent? It is the difference between the phase of the incoming signal freq. to the "locked" local oscillator. When "locked" means they are at the same frequency. So the phase is not a time dependent thing, just the phase difference between the two.

Example is say if you incoming signal is $\omega t\;\hbox { and the LO signal after lock on is }\; ( \omega t +\theta_0)\;$ The two only different by a constant $\theta_0\;$ no matter you look at it now or a minute later. It is not time dependent.

sorry are we getting confused here, i mean $\theta_0 = e^{j(\omega t +\theta)}$ which definitely IS a function of time. i think the phase function should look more like $\theta_0 = 2 \pi f t + e^{j(\omega t +\theta)}$, because then, differentiating we get $frequency = 2 \pi f + j \omega e^{j(\omega t + \theta)}$

sorry are we getting confused here, i mean $\theta_0 = e^{j(\omega t +\theta)}$ which definitely IS a function of time. i think the phase function should look more like $\theta_0 = 2 \pi f t + e^{j(\omega t +\theta)}$, because then, differentiating we get $frequency = 2 \pi f + j \omega e^{j(\omega t + \theta)}$

OK, I read theta_0 is not a constant.

Last edited:
my confusion is that in order to differentiate a phase to get a frequency, the phase should be an increasing function right? whereas the equation for phase here is oscillating around 0.

Now I come back to your original question. I highlight the two words. You must be referring the first one to be $\theta_0\;$ and the second one to be $\theta.$

This is where all my confusion. All my following explanations still valid for $\theta.$ With that, what is your confusion again? They are of two different thing, first one is time dependent, the second is a constant!!!! There should be no confusion.

I am going to edit my post to reflect that.

sorry are we getting confused here, i mean $\theta_0 = e^{j(\omega t +\theta)}$ which definitely IS a function of time. i think the phase function should look more like $\theta_0 = 2 \pi f t + e^{j(\omega t +\theta)}$, because then, differentiating we get $frequency = 2 \pi f + j \omega e^{j(\omega t + \theta)}$

What you wrote is way off!!!

$$\cos \theta_0 = Re[e^{j(\omega t +\theta)}]\;\hbox { not what you wrote, this is very important to distinguish.}$$

$$\theta_0 = 2 \pi f t + e^{j(\omega t +\theta)}\; \hbox { is not correct at all.}$$

You got me confused!!! I went back and read your formulas. It is not correct that:

$$\theta_0=e^{(j\omega t + \theta)} \;\hbox { do not give you the phase at all.}$$

I think you really need to review the phase stuffs.

It all start with:

$$e^x= \cos x +j\sin x\;\; ,\;\; \cos x =\frac {e^x+e^{-x}}{2}\;\;,\;\; \sin x =\frac {e^x-e^{-x}}{2j}$$

$$\cos x =Re[e^x] \;\;,\;\; \sin x =Im[e^x]$$

Work out these few and if you have any question, come back.

Last edited:
dlgoff
Science Advisor
Gold Member
i'd recommend the ancient Signetics PLL applications book, ca 1972

it's on the net as a pdf....

Yep. I decided to download a copy and found it here:

"bitsavers.org/pdf/signetics/_dataBooks/1972_Signetics_PLL_Applications.pdf" [Broken]

Last edited by a moderator:
What you wrote is way off!!!

$$\cos \theta_0 = Re[e^{j(\omega t +\theta)}]\;\hbox { not what you wrote, this is very important to distinguish.}$$

$$\theta_0 = 2 \pi f t + e^{j(\omega t +\theta)}\; \hbox { is not correct at all.}$$

You got me confused!!! I went back and read your formulas. It is not correct that:

$$\theta_0=e^{(j\omega t + \theta)} \;\hbox { do not give you the phase at all.}$$

I think you really need to review the phase stuffs.

It all start with:

$$e^x= \cos x +j\sin x\;\; ,\;\; \cos x =\frac {e^x+e^{-x}}{2}\;\;,\;\; \sin x =\frac {e^x-e^{-x}}{2j}$$

$$\cos x =Re[e^x] \;\;,\;\; \sin x =Im[e^x]$$

Work out these few and if you have any question, come back.

i think i might have mentioned this in my 2nd post, omega is NOT the input frequency, omega is the wobble in the input phase.

edit: or at least i think it is, its the only way to make formula 1 make sense. omega is different to f

Last edited:
I see nothing wrong with $$V=K[\theta_0-\theta_{ref}]$$

This only said voltage is proportional to the phase difference of the two phase.

Remember $\theta_0 = (\omega t + \theta)\hbox{, say }\; \theta_{ref}= \omega t \;\Rightarrow\; V=K(\omega t +\theta-\omega t)=K\theta$

Therefore output voltage is K times the constant phase angle. There is nothing wrong and there is no time component in it.

Try work out the few equations I gave you, those are very important to be very familiar with. Also $\cos \theta \;$ is not a phase. It is the cosine of a PHASE!!! Look back at the forumlas how the exponential relate to cosine and sine. Don't take it offensive, I think you are confused with this whole phase thing and you need to go through it. Make sure you distinguish the difference between

frequency $\omega\hbox{, phase}\;(\omega t + \theta)\;\hbox { and the simple }\;\cos ( \omega t +\theta)\;\hbox { which is NOT a phase.}$

Please don't feel bad about this, I used to have problem with this for years. It was until only like two or three years ago that I really had it, I stop and spent the time to go through this a baby step at a time and finally got it. It might look quite easy, but it can be very confusing if you don't stop and for once work it out. Until then, it will pop up from time to time. I bet you if you just work it out, it will only take you a hour or two.

Last edited:
I see nothing wrong with $$V=K[\theta_0-\theta_{ref}]$$

This only said voltage is proportional to the phase difference of the two phase.

Remember $\theta_0 = (\omega t + \theta)\hbox{, say }\;$
that's not quite true. have a look back at the original formulae.
$$\theta_{ref}= \omega t \;\Rightarrow\; V=K(\omega t +\theta-\omega t)=K\theta$$

Therefore output voltage is K times the constant phase angle. There is nothing wrong and there is no time component in it.

Try work out the few equations I gave you, those are very important to be very familiar with. Also $\cos \theta \;$ is not a phase. It is the cosine of a PHASE!!! Look back at the forumlas how the exponential relate to cosine and sine. Don't take it offensive, I think you are confused with this whole phase thing and you need to go through it. Make sure you distinguish the difference between

frequency $\omega\hbox{, phase}\;(\omega t + \theta)\;\hbox { and the simple }\;\cos ( \omega t +\theta)\;\hbox { which is NOT a phase.}$

Please don't feel bad about this, I used to have problem with this for years. It was until only like two or three years ago that I really had it, I stop and spent the time to go through this a baby step at a time and finally got it. It might look quite easy, but it can be very confusing if you don't stop and for once work it out. Until then, it will pop up from time to time. I bet you if you just work it out, it will only take you a hour or two.

i spoke to my lecturer today and he agreed that this maths doesnt quite work. please try to differentiate the equation for $\theta_0$ given in the original formulae. you will see that we dont get $2 \pi f$.

I'm wondering how we can make this maths work to get to an eventual differential equation in theta_0...

Hi. So I thought I understood PLLs pretty well after I designed a couple over summer, but I've just been taught them at university and I'm now pretty stumped! The lecture notes use Phasors which just make things confusing. I wonder if anyone could explain the 2 initial setup equations used in my notes?

Here are the notes:
http://img835.imageshack.us/img835/5376/pllv.png [Broken]

please note that my big confusion is because of the possible mixing of phasors and phases, so it would be awesome if you could try and be clear between the two.

Any help would be really appreciated,

Cheers,

Sam

Read post #13 again, what you gave for theta_0 is wrong. I cannot imagine this is what the professor gave you. He should know better that

$$\theta_0= e^{j(\omega t +\theta )} \;\hbox { is absolutely wrong!!! This is not a phase!!!}$$

Read post #13 again carefully. learn the relation between sine and cosine function to exponential function and try again. You can verify my formulas on web. This is very basic stuff that you really have to learn, or else, you'll be bouncing back and fore between people that might not get the whole picture on just a specific question.

Here is the Wiki definition of Euler's formulas

http://en.wikipedia.org/wiki/Euler's_formula

You really need to get pass this before moving on.

BTW

$$e^{j(\omega t +\theta )}=e^{j\omega t }e^{j\theta}$$

Last edited by a moderator:
Read post #13 again, what you gave for theta_0 is wrong. I cannot imagine this is what the professor gave you. He should know better that

$$\theta_0= e^{j(\omega t +\theta )} \;\hbox { is absolutely wrong!!! This is not a phase!!!}$$

Read post #13 again carefully. learn the relation between sine and cosine function to exponential function and try again. You can verify my formulas on web. This is very basic stuff that you really have to learn, or else, you'll be bouncing back and fore between people that might not get the whole picture on just a specific question.

Here is the Wiki definition of Euler's formulas

http://en.wikipedia.org/wiki/Euler's_formula

You really need to get pass this before moving on.

BTW

$$e^{j(\omega t +\theta )}=e^{j\omega t }e^{j\theta}$$

These notes are EXACTLY what the professor gave us (as these are his writing from the online uploaded version of the notes)

I am quite familiar with eulers formulae and i know how multiplication and powers work, bear in mind that this is a 3rd year engineering degree course. the formula for theta_0 is one that defines a wobble in the phase itself, ie it is not constantly increasing but rather increasing and wobbling at frequency omega. what i think i need is an argument or explanation that allows equation 2 to be acceptable (even though it is wrong and neglects terms) for the derivation to a full differential equation on theta. here is a link to the full notes for this section of the course which shows the full working through to the differential equation: http://dl.dropbox.com/u/38907387/3B1+Lecture+11.pdf

Sorry, I can't help you anymore because if you said you are familiar with the Euler formulas and you get notes of the phase $\;\theta_0=e^{j(\omega t +\theta)}\;$, I don't know what to say anymore. This is just simply wrong, no other way to put it as you can see the Euler formula. I am not a professor and I am not going to say your professor is wrong. I might be missing this all together. I stand by everything I wrote so far, but what can I say? It's up to you to talk to your professor why he put it like that. Bring out the Euler formula and ask him why.

Equation 2 is not wrong, it is a simple differentiation of theta_0 that is defined at the beginning. It is the theta_0 right at the beginning I cannot accept. If everything follow are based on this, then I can't help you anymore. I cannot go any further until you resolve this.

Last edited:
Sorry, I can't help you anymore because if you said you are familiar with the Euler formulas and you get notes of the phase $\;\theta_0=e^{j(\omega t +\theta)}\;$, I don't know what to say anymore. This is just simply wrong, no other way to put it as you can see the Euler formula. I am not a professor and I am not going to say your professor is wrong. I might be missing this all together. I stand by everything I wrote so far, but what can I say? It's up to you to talk to your professor why he put it like that. Bring out the Euler formula and ask him why.

Equation 2 is not wrong, it is a simple differentiation of theta_0 that is defined at the beginning. It is the theta_0 right at the beginning I cannot accept. If everything follow are based on this, then I can't help you anymore. I cannot go any further until you resolve this.

agreed, the theta_0 at the beginning is wrong. ok, so what do we say theta_0 should be to make the final maths work? it must be a phase that gives a frequency of f, but is wobbling at omega. ie the intention is that the frequency, f, is wobbling at frequency omega

agreed, the theta_0 at the beginning is wrong. ok, so what do we say theta_0 should be to make the final maths work? it must be a phase that gives a frequency of f, but is wobbling at omega. ie the intention is that the frequency, f, is wobbling at frequency omega

$$\theta_0=\omega t +\theta \;\hbox { where }\; \omega t \;\hbox { is the phase of the main frequency that is changing at the rate of }\;\omega$$

$$\frac {d\theta_0}{dt}= \omega$$

Which said differentiation of a phase is the frequency in radian. But obvious this is not what you want to see because the notes don't agree. In the notes, the professor:

$$\theta_0=e^{j(\omega t +\theta)} \;\Rightarrow\; \frac {d\theta_0}{dt}= e^{j(\omega t +\theta)}\; d(j(\omega t +\theta)\;=\; j\omega \theta_0$$

This give you (2) in the notes. The professor use the theta_0 and get (2). If you accept his assertion, then (2) is correct. The problem is I cannot accept his assertion. So how are we going to get pass this? It is hard to keep going further and look at the formulas.

I don't see the phase wobble at the frequency $\omega\;$. the V1 wobble with $\theta_0-\theta_{ref}$. This is defined in (1).

Last edited:
this is why i thought up the formula of:

$\theta_0 = 2 \pi f t + e^{j(\omega t + \theta)}$ (note 2*pi*f =/= omega)
differentiating gives:
$differential = 2 \pi f + j \omega e^{j(\omega t + \theta)}$

which is a constant frequency of f with a wobble in the frequency, omega

As I said, I am not a PLL expert, but we never even get pass the gate so far. From my understand, the $\theta \;$ is the modulation and is changing. So your theta_0 is changing. If $\theta_{ref}\;$ is stationary( or varying much slower), V1 is changing with the modulation. That's how PLL demodulate the signal.

I don't want to give advice on the PLL as I only studied it a few years ago. The main thing I jumped in is the phase part of it that something is not right.

this is why i thought up the formula of:

$\theta_0 = 2 \pi f t + e^{j(\omega t + \theta)}$ (note 2*pi*f =/= omega)
differentiating gives:
$differential = 2 \pi f + j \omega e^{j(\omega t + \theta)}$

which is a constant frequency of f with a wobble in the frequency, omega

How do you come up with that equation?

But still $e^{j(\omega t + \theta)}\;$ is not a phase because by the definition of Euler equation of $e^{jx}= \cos x + j\sin x\;$ which is not a phase. In this example, x is the phase.

I don't think theta_0 wobble with frequency. it only wobble with theta.

I am pretty sure (1) is correct for PLL regardless of how you define theta_0. The the output of the phase detector V1 is $K_p(\theta_0-\theta_{ref})$.

Last edited:

Where did you find differential=2πf+jωej(ωt+θ)? Is this in your book for PLL? I am not very good in PLL, only studied it once. I don't feel comfortable to get deeper than the phase relation part. I have a few books, I think the book by William F. Egan is the best in explaining the theory. I don't like the most popular one by Roland Best.

Where did you find differential=2πf+jωej(ωt+θ)? Is this in your book for PLL? I am not very good in PLL, only studied it once. I don't feel comfortable to get deeper than the phase relation part. I have a few books, I think the book by William F. Egan is the best in explaining the theory. I don't like the most popular one by Roland Best.

i made it up to try and make the maths work right lol. i wondered if it made sense in the rest of the maths

i made it up to try and make the maths work right lol. i wondered if it made sense in the rest of the maths

I don't think that is the right way to do. Go to Amazon and see whether you can read the William Egan book. It is a very good book on formulas and theories. I studied it.......almost 6 years ago and most leaked out already. That's old age for you. At the time, I derived most of the formula and I did not spot any questionable formulas like this.

My personal laptop got infected after I came on this forum!!!! I likely won't be able to spend much time here in the next day or two as I need to fix the computer. I suck at computers!!!! While at this, don't ever get McAfee, they suck big, I have three attack this year alone on three different computers!!!! the kicker is I was only on this forum today and still got attacked!!! I have everything with McAfee, spam, firewall and anti virus!!!

sounds unlucky, but unless you have downloaded any files from this forum, i doubt you've got a virus from here. some browsers can help with keeping ur pc protected so have a look at that. i use AVG but there is a lot of hate out there for that. i tend to manage to stay relatively free of nasties (touch wood!).

So I *think* I have a solution for this problem based on my equation above. i think ill try and latex up a proper proof/document and post here and send to my lecturer.

here it is: http://dl.dropbox.com/u/38907387/PLLmaths.pdf If you can spot any errors in it before I sent it to my lecturer & make an arse of myself, that would be super.

Cheers

Sam

Last edited: