For anyone interested, here's the essence of a phase-locked loop:<p>Say you're climbing up a long staircase and the step height increases suddenly - then you'll bump into the next step. If the height were to go the other way i.e; decrease, then you'll put your foot down hard trying to place the next step. That change in step height is in fact a change in <i>frequency</i>, and you're forced to adjust your pace abruptly by adjusting the timing (phase) of your subsequent steps.<p>Is there a 'gentler' way to adjust the phase? Now say you're wearing some kind of spongy sandals that can take up the slack, so at every step you <i>increasingly</i> sense that the frequency has changed. This accumulation indicates that phase is mathematically the <i>integral</i> of instantaneous frequency with respect to time.<p>We now put this integral in a feedback loop. Then, if the staircase step height changes suddenly we use the <i>slow</i> accumulated phase to produce an error signal that gradually drives the frequency generator (in this case, our brain) to adjust the pace of our step till we get in <i>lock</i>-step.<p>The actual dynamics is more complicated, involving a non-linear frequency capture (which linearizes the system) and then the <i>slower</i> phase lock. You can see this in the waveforms in the original post.