# Phase locked loops

1. Nov 23, 2011

### samski

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: May 5, 2017
2. Nov 25, 2011

### jim hardy

i'd recommend the ancient Signetics PLL applications book, ca 1972

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

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: Nov 25, 2011
3. Nov 25, 2011

### yungman

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: Nov 25, 2011
4. Nov 27, 2011

### samski

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 :(

5. Nov 27, 2011

### yungman

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.}$$

6. Nov 28, 2011

### samski

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.

7. Nov 28, 2011

### yungman

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.

8. Nov 28, 2011

### samski

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

9. Nov 28, 2011

### yungman

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: Nov 28, 2011
10. Nov 28, 2011

### samski

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)}$

11. Nov 28, 2011

### yungman

OK, I read theta_0 is not a constant.

Last edited: Nov 28, 2011
12. Nov 28, 2011

### yungman

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.

13. Nov 28, 2011

### yungman

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.

$$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: Nov 28, 2011
14. Nov 28, 2011

### dlgoff

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

Last edited by a moderator: May 5, 2017
15. Nov 28, 2011

### samski

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: Nov 28, 2011
16. Nov 28, 2011

### yungman

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: Nov 28, 2011
17. Nov 29, 2011

### samski

that's not quite true. have a look back at the original formulae.
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...

18. Nov 29, 2011

### yungman

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: May 5, 2017
19. Nov 29, 2011

### samski

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

20. Nov 29, 2011

### yungman

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: Nov 29, 2011