SatCat5
satcat5::ptp::ControllerLR< MAX_WINDOW > Class Template Reference

Detailed Description

template<unsigned MAX_WINDOW>
class satcat5::ptp::ControllerLR< MAX_WINDOW >

Loop-filter for a linear-regression (LR) controller.

This filter uses linear regression to estimate phase and frequency offsets over a short window, then applies an IIR filter to track that piecewise-linear estimate with a controlled time-constant.

Definition at line 454 of file ptp_filters.h.

#include <ptp_filters.h>

Inheritance diagram for satcat5::ptp::ControllerLR< MAX_WINDOW >:
[legend]
Collaboration diagram for satcat5::ptp::ControllerLR< MAX_WINDOW >:
[legend]

Public Member Functions

 ControllerLR (const satcat5::ptp::CoeffLR &coeff)
 Constructor sets loop bandwidth, which can be changed later.
 
void set_window (unsigned window)
 Adjust window-size. More...
 
void reset () override
 Remaining API from ptp::Filter.
 
s64 update (s64 next, u32 elapsed_usec) override
 Implement the required API from ptp::Filter.
 
void set_coeff (const satcat5::ptp::CoeffLR &coeff)
 Adjust loop bandwidth.
 
void rate (s64 delta, u32 elapsed_usec) override
 Partial API from ptp::Filter.
 

Protected Member Functions

s64 update_inner (const u32 *dt, const s64 *y)
 

Protected Attributes

unsigned m_count
 
u32 m_elapsed
 
satcat5::ptp::SlidingWindow< u32, MAX_WINDOW > m_dly
 
satcat5::ptp::SlidingWindow< s64, MAX_WINDOW > m_dat
 
satcat5::ptp::CoeffLR m_coeff
 
satcat5::util::int128_t m_accum
 
unsigned m_window
 

Private Attributes

satcat5::ptp::Filterm_next
 

Member Function Documentation

◆ set_window()

template<unsigned MAX_WINDOW>
void satcat5::ptp::ControllerLR< MAX_WINDOW >::set_window ( unsigned  window)
inline

Adjust window-size.

Also note "set_coeff(...)" inherited from parent.

Definition at line 464 of file ptp_filters.h.


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