class sdr.ClosedLoopPLL

A class that defines the performance of a closed-loop PLL.

Note

This class is meant for performance analysis only.

Notes

Closed-Loop PLL Block Diagram
         bb[n]    phase_err[n]
             +-----+    +----+
x[n] -->X--->| PED |--->| LF |---+
        ^    +-----+    +----+   |
        |                        | phase_est[n]
        |    +-----+             |
 lo[n]  +----| NCO |<------------+
             +-----+

x[n] = Input signal
bb[n] = Baseband signal
phase_err[n] = Phase error signal
phase_est[n] = Phase estimate signal
lo[n] = Local oscillator signal
PED = Phase error detector
LF = Loop filter
NCO = Numerically controlled oscillator
X = Complex multiplier

The transfer function of the 2nd order, proportional-plus-integrator loop filter is

\[H_{LF}(z) = K_1 + K_2 \frac{ 1 }{ 1 - z^{-1}} = \frac{(K_1 + K_2) - K_1 z^{-1}}{1 - z^{-1}} .\]

The transfer function of the NCO is

\[H_{NCO}(z) = K_0 \frac{z^{-1}}{1 - z^{-1}} .\]

The closed-loop transfer function of the PLL is

\[ H_{PLL}(z) = \frac{K_p K_0 (K_1 + K_2) z^{-1} - K_p K_0 K_1 z^{-2}} {1 - 2 (1 - \frac{1}{2} K_p K_0 (K_1 + K_2) z^{-1} + (1 - K_p K_0 K_1) z^{-2} } . \]

References

  • Michael Rice, Digital Communications: A Discrete-Time Approach, Appendix C: Phase Locked Loops.

Examples

See the Phase-locked loops example.

Constructors

ClosedLoopPLL(noise_bandwidth: float, damping_factor: float, ...)

Creates a closed-loop PLL analysis object.

Methods

phase_lock_time() float

Returns the phase lock time of the PLL.

frequency_lock_time(freq_offset: float) float

Returns the frequency lock time of the PLL.

lock_time(freq_offset: float) float

Returns the lock time of the PLL.

phase_error_variance(cn0: float) float

Returns the variance of the phase error of the PLL in steady state.

Properties

property sample_rate : float

The sample rate \(f_s\) of the PLL in samples/s.

property BnT : float

The normalized noise bandwidth \(B_n T\) of the PLL.

property Bn : float

The noise bandwidth \(B_n\) of the PLL in Hz.

property zeta : float

The damping factor \(\zeta\) of the PLL.

property K0 : float

The NCO gain \(K_0\).

property Kp : float

The phase error detector (PED) gain \(K_p\).

property K1 : float

The proportional gain \(K_1\) of the loop filter.

property K2 : float

The integral gain \(K_2\) of the loop filter.

property iir : IIR

The IIR filter that represents the closed-loop transfer function of the PLL.

property omega_n : float

The natural frequency \(\omega_n\) of the PLL in radians/s.

property omega_3dB : float

The 3-dB bandwidth \(\omega_{3\textrm{dB}}\) of the PLL in radians/s.