Close

Loop Filter Shoot Off

A project log for Software Phase Locked Loop

The 567 tone decoder is perhaps most famous Phase Locked Loop (PLL) chip. This project looks at an Arduino software PLL.

agpcooperagp.cooper 02/20/2017 at 01:470 Comments

Loop Filters

I have been working my way through the loop filter types, so far:

No problem with the first three:

Low Pass

PID

Lead-Lag

The Active Lead Lag Filter

Here are the analog domain basic loop filters. The problem filter is shown at the bottom of the image:

(source: http://www.globalspec.com/reference/38390/203279/2-6-second-order-phase-locked-loops)

I have plotted the S domain versus the the modelled Z domain and the Z domain is good up until about Nyquist, so no problems:

The recursive equation was:

The issue is that this filter cannot be used directly. The DC gain is +46dB and as the structure is that of an integrator and the PD is 0 to K, the filter just blows up:

This can be fixed by using a differential PD (i.e. -K/2 to +K/2) or by using a filter like the second filter below:

(source: elcrost.com/wp-content/uploads/2016/11/pll-circuit-page-2-rf-circuits-next-gr-phase-locked-loop-fm-demodulator-part3_pll_i-pdf-tutorial-zambezi.jpg)

After substituting the PD for a differential PD (i.e. -K/2 to +K/2) I get something that basically works:

(Note that the vertical scale has changed compared to the other PLL filters)

The analog equivalent is:
K 4000 =KpKv
R1 5600 R
R2 5600 R
C 0.000000100 F
T1 0.00056
T2 0.00056
WN 2673 =sqrt(K/T1)
D 0.75 =T2/2*sqrt(K/T1)

The main advantage of the last filter is greater range of control of damping factor and natural frequency.

Choosing a Loop Filter (The Shoot Off)

Now that I have all the filters working which one to use going forward? Active Lead-Lag or PID?

Active Lead-Lag Loop

Inputs:

Intermediate:

Code (after calculating Z-transform coefficients):

PID Loop (First Order)

Inputs:

Intermediate:

Output:

Code:

Conclusion (The Shoot Off Results)

It looks rather like a "no-brainer" to go with PID from a computational point of view (all other things appearing to be equal). Funny how the common wisdom of PID in the discrete domain is confirmed!

AlanX

Discussions