Forums

PLL fun : some personnal work that I'd like to share

Started by pylessard 5 months ago10 replieslatest reply 5 months ago180 views

A year ago, I've started working on some interactive apps to help visualize some engineering concepts that may be difficult to grasp for a beginner. I thought this forum might be a good place to share this.

Unfortunately, my determination has been forcibly challenged by little crawling humans at home requiring my ceaseless attention, therefore I only have one app available for the moment, and it is not as complete as I would like.. nevertheless, there is still fun to be shared.

So behold, the PLL app! http://interactiveengineering.org/apps/pll/

Try to lock the phase manually, check how you did and compare yourself to a PI regulator and explore how a poorly tuned regulator will behave.

I do plan on taking the work back and make some more of these. I have the ideas, just not the time.

Comments are welcome :)

[ - ]
Reply by Tim WescottDecember 10, 2020

Good work!  May I suggest more work?  Probably in order of importance:

  • Put a controller in there (or make it more obvious if it's already there!).  I'd start with just a PI controller and let the user vary the gains.  You probably want that block diagram that omersayli suggested, complete with phase detector and NCO gains.
  • Put in a choice of phase detectors -- I'd start with the one you have, and a multiplying phase detector.  A 3-state phase detector would be good, too.  Making a good display of the cycle-by-cycle output vs. the filtered output is left as an exercise for the programmer.
  • Put noise injection in there, at the discretion of the user -- both noise to make the input signal frequency (or phase) wander, and additive noise to the incoming signal.
  • Suggest experiments -- for instance, if you've got a lot of additive noise, is a 3-state detector better, or a multiplying detector?
[ - ]
Reply by omersayliDecember 10, 2020

This is nice indeed, could be made much better by showing model block diagram?

[ - ]
Reply by enahmadDecember 10, 2020

I was able to lock the phase perfectly, manually. I just used a control reference slightly larger than the control output.

As feedback for improvement: the buttons don't always work, I found that only the left segment of them work, and sometimes one needs to click more than one time; an explanation of what you have in mind would certainly be useful.

Thanks for sharing!

[ - ]
Reply by MarkSitkowskiDecember 11, 2020

Just in case you'd like to roll your own PLL (not as entertaining as your demo, unfortunately) you might like to try this:

https://www.researchgate.net/publication/3345067_S...


[ - ]
Reply by Y(J)SDecember 10, 2020

Very nice. I really enjoyed trying to manually lock.

I didn't see where I could "explore how a poorly tuned regulator will behave" (unless you mean the manual mode).

Y(J)S

[ - ]
Reply by pylessardDecember 12, 2020

There's a mode where you control the reference and let a PI regulator try to lock the phase. You can play with Kp and Ki and see how it behaves (no Kp = oscillation, No Ki = steadystate error. Kp too high = high frequency oscillation and so forth)

[ - ]
Reply by Rick LyonsDecember 10, 2020

Hi pylessard. Is the a tutorial web page we can read to help us understand what we're looking at when we visit your "PLL Application" web page?

[ - ]
Reply by pylessardDecember 12, 2020

Hi Rick,

Unfortunately, not yet, but it is indeed missing. What you see is a gray circle (the reference) that rotate at a given speed and a red circle that represent the output of an oscilator. The red circle speed (in mhz) is controlled by the main slider in the middle of the page. The goal is to lock the red circle on the gray circle. There's a graph that show your command and the angle error. 

You can click the "Control REference" button at the top to switch role. When you do so, you control the gray circle and you let a PI regulator try to catch up with you.  You can play with the gain of the regulator and look at some numerical data while it works.

[ - ]
Reply by PlatybelDecember 10, 2020

The app looks neat and interesting.  But I need some description as to what the app illustrates.  Please point towards a tutorial on the subject.  Thanks.

[ - ]
Reply by paulhampikianDecember 10, 2020

It would be nice to also see when you lock in frequency (constant phase).