Phase locked loops

steveb

Joined Jul 3, 2008
2,436
boom! think I've sussed it. I'll scan stuff in later today

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
One thing that bothers me is something I mentioned above. When you add the phase perturbation exp(jwt) I think it should have an amplitude. Personally I like to use Laplace transforms which automatically take care of this, but without an amplitude, the magnitude of the frequency response is corrupted, and it is also not possible to have a small signal perturbation because the added signal has magnitude 1 radian.
 

Thread Starter

samski

Joined Nov 23, 2011
20
One thing that bothers me is something I mentioned above. When you add the phase perturbation exp(jwt) I think it should have an amplitude. Personally I like to use Laplace transforms which automatically take care of this, but without an amplitude, the magnitude of the frequency response is corrupted, and it is also not possible to have a small signal perturbation because the added signal has magnitude 1 radian.
agreed, there does need to be some scaling on the theta_wibble and wobble terms as they are way too large, but this wouldn't affect the maths too much would it? even if they had different scales, they never really interact with each other through the derivation.
 

steveb

Joined Jul 3, 2008
2,436
agreed, there does need to be some scaling on the theta_wibble and wobble terms as they are way too large, but this wouldn't affect the maths too much would it? even if they had different scales, they never really interact with each other through the derivation.
I'll have to look at it in more detail after work, but my worry is that you are forcing both the input and the output to have the same magnitude (of one). Isn't the whole idea to put in a small sinusoidal signal and to see how both the phase and magnitude are affected by the system? I'm not too worried about inputing an amplitude of one, just as you decided to input a phase of zero, but I think you need to at least need to allow the output amplitude to be different, just as you allowed the output phase to be different.
 

Thread Starter

samski

Joined Nov 23, 2011
20
I'll have to look at it in more detail after work, but my worry is that you are forcing both the input and the output to have the same magnitude (of one). Isn't the whole idea to put in a small sinusoidal signal and to see how both the phase and magnitude are affected by the system? I'm not too worried about inputing an amplitude of one, just as you decided to input a phase of zero, but I think you need to at least need to allow the output amplitude to be different, just as you allowed the output phase to be different.
ah ok. if you have a look at the pdf of the actual course notes i popped up, i think the final differential equation would just have a constant multiplying all of the left hand side to represent gain between the phases. i think this would still be solvable (brain whirring slowwwwllly today though)
 

steveb

Joined Jul 3, 2008
2,436
ah ok. if you have a look at the pdf of the actual course notes i popped up, i think the final differential equation would just have a constant multiplying all of the left hand side to represent gain between the phases. i think this would still be solvable (brain whirring slowwwwllly today though)
OK, so I had a better chance to review this after dinner. I understand what you did now. At the top of the second page you wrote that the output phasor had an amplitude of one, but you really did not use this fact in your work, so it didn't matter. As was the case with your professor's notes, I don't understand the need to write the phasor this way. It just seems useless to me. But, maybe I'm just missing the point of it. Anyway, this is not critical in my view.

There are a few issues I see, as follows.

1. It's not clear to me why you are using a proportional control filter rather than the PI filter shown originally. Almost universally, a PI filter is the preferred choice. As you correctly noted, the proportional gain allows a fairly large offset on the phase, in steady state. Anyway, let' focus on what you did, but you might want to redo this for the PI control case.

2. It looks to me like you accidentally implemented positive feedback with the sign of the phase detector inverted. If you flip the sign on the output of the phase detector, it seems to work out.

3. You should finish the last step by solving for the output in terms of the input, or writing the transfer function output/input. Your solution seems to show a first order system, which seem correct for proportional control. It would not perform well in terms of stability/accuracy tradeoffs in a real implementation. The PI filter will result in a second order system that can be tuned to perform well, in reality.
 
Last edited:

Thread Starter

samski

Joined Nov 23, 2011
20
OK, so I had a better chance to review this after dinner. I understand what you did now. At the top of the second page you wrote that the output phasor had an amplitude of one, but you really did not use this fact in your work, so it didn't matter. As was the case with your professor's notes, I don't understand the need to write the phasor this way. It just seems useless to me. But, maybe I'm just missing the point of it. Anyway, this is not critical in my view.

There are a few issues I see, as follows.

1. It's not clear to me why you are using a proportional control filter rather than the PI filter shown originally. Almost universally, a PI filter is the preferred choice. As you correctly noted, the proportional gain allows a fairly large offset on the phase, in steady state. Anyway, let' focus on what you did, but you might want to redo this for the PI control case.
I haven't done this for any particular case, I just used a constant Kf to keep the maths at a high level. Equation 3 in the notes is an expression for Kf, so that can always be subbed in.
2. It looks to me like you accidentally implemented positive feedback with the sign of the phase detector inverted. If you flip the sign on the output of the phase detector, it seems to work out.
Ah yep, you are right. That's another leftover from the notes.

EDIT: hang on, are we sure about this, there is some negative gain from the filter...
3. You should finish the last step by solving for the output in terms of the input, or writing the transfer function output/input. Your solution seems to show a first order system, which seem correct for proportional control. It would not perform well in terms of stability/accuracy tradeoffs in a real implementation. The PI filter will result in a second order system that can be tuned to perform well, in reality.
By the time i got to that last line I've written, i considered it solved, subbing in for K_f would give the same as the first line on page 61 of the notes (the 2nd page in this pdf: http://dl.dropbox.com/u/38907387/3B1+Lecture+11.pdf) and so I was satisfied.
The equation pops out as 2nd order.
 
Last edited:
Top