SatCat5
satcat5::ptp::CoeffPI Struct Reference

Detailed Description

Loop-filter coefficients for use with the "ControllerPI" class.

All floating-point calculations can be run at build-time.

The process requires three arguments:

  • "tau_secs" is the desired filter time constant in seconds. A time constant of about 5.0 seconds is typical.
  • "damping" is the unitless damping ratio, zeta. Default 0.707 is slightly underdamped for reduced settling time.

See also: Stephens & Thomas, "Controlled-root formulation for digital phase-locked loops", IEEE Transactions on Aerospace and Electronic Systems 1995, doi: 10.1109/7.366295. https://ieeexplore.ieee.org/abstract/document/366295

Definition at line 224 of file ptp_filters.h.

#include <ptp_filters.h>

Public Member Functions

constexpr CoeffPI (double tau_secs)
 Calculate tracking-loop coefficients.
 
 CoeffPI (const CoeffPI &t)=default
 
CoeffPIoperator= (const CoeffPI &t)=default
 
bool ok () const
 Are all coefficients large enough to mitigate rounding error?
 

Static Public Attributes

static constexpr unsigned SCALE = 60
 Fixed-point scaling of each coefficient by 2^-N. More...
 

Static Protected Member Functions

static constexpr double alpha (double zeta)
 
static constexpr double k1 (double tau, double zeta)
 
static constexpr double k2 (double tau, double zeta)
 
static constexpr double fw_gain ()
 

Protected Attributes

u64 kp
 
u64 ki
 

Member Data Documentation

◆ SCALE

constexpr unsigned satcat5::ptp::CoeffPI::SCALE = 60
staticconstexpr

Fixed-point scaling of each coefficient by 2^-N.

Optimized for time constants circa 1-3600 seconds.

Definition at line 239 of file ptp_filters.h.


The documentation for this struct was generated from the following file: