class sdr.LoopFilter

Implements a 2nd order, proportional-plus-integrator (PPI) loop filter.

Notes

Proportional-Plus-Integral Loop Filter Block Diagram
           +----+
       +-->| K1 |---------------------+
       |   +----+                     |
x[n] --+                              @--> y[n]
       |   +----+                     |
       +-->| K2 |-->@--------------+--+
           +----+   ^              |
                    |   +------+   |
                    +---| z^-1 |<--+
                        +------+

x[n] = Input signal
y[n] = Output signal
K1 = Proportional gain
K2 = Integral gain
z^-1 = Unit delay
@ = Adder

The transfer function of the loop filter is

H(z)=K1+K211z1=(K1+K2)K1z11z1.

The second-order proportional-plus-integrator loop filter can track a constant phase error and/or frequency error to zero. It cannot, however, track a constant chirp (frequency ramp) to zero.

References

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

Examples

See the Phase-locked loops example.

Constructors

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

Creates a 2nd order, proportional-plus-integrator (PPI) loop filter.

Special methods

__call__(x: ArrayLike) NDArray

Filters the input signal x[n].

Methods

reset() None

Resets the loop filter.

Properties

property noise_bandwidth : float

The normalized noise bandwidth BnT of the loop filter.

property damping_factor : float

The damping factor ζ of the loop filter.

property proportional_gain : float

The proportional gain K1 of the loop filter.

property integral_gain : float

The integral gain K2 of the loop filter.

property iir : IIR

The underlying IIR filter used to implement the loop filter.