gr::blocks::control_loop
gr::analog::pll_carriertracking_cc
gr::analog::pll_freqdet_cf
gr::analog::pll_refout_cc
gr::digital::constellation_receiver_cb
gr::digital::costas_loop_cc
gr::digital::fll_band_edge_cc
gnuradio/blocks/control_loop.h
float float gr::blocks::control_loop::d_phase d_phase gr::blocks::control_loop::d_phase advance_loop phase_wrap
float float gr::blocks::control_loop::d_freq d_freq gr::blocks::control_loop::d_freq advance_loop frequency_limit
float float gr::blocks::control_loop::d_max_freq d_max_freq gr::blocks::control_loop::d_max_freq frequency_limit
float float gr::blocks::control_loop::d_min_freq d_min_freq gr::blocks::control_loop::d_min_freq frequency_limit
float float gr::blocks::control_loop::d_damping d_damping gr::blocks::control_loop::d_damping
float float gr::blocks::control_loop::d_loop_bw d_loop_bw gr::blocks::control_loop::d_loop_bw
float float gr::blocks::control_loop::d_alpha d_alpha gr::blocks::control_loop::d_alpha advance_loop
float float gr::blocks::control_loop::d_beta d_beta gr::blocks::control_loop::d_beta advance_loop
gr::blocks::control_loop::control_loop
(void)
control_loop
gr::blocks::control_loop::control_loop
void
gr::blocks::control_loop::control_loop
(float loop_bw, float max_freq, float min_freq)
control_loop
gr::blocks::control_loop::control_loop
float loop_bw
float max_freq
float min_freq
virtual gr::blocks::control_loop::~control_loop
()
~control_loop
gr::blocks::control_loop::~control_loop
void void gr::blocks::control_loop::update_gains () update_gains gr::blocks::control_loop::update_gains

Update the system gains from the loop bandwidth and damping factor.

This function updates the system gains based on the loop bandwidth and damping factor of the system. These two factors can be set separately through their own set functions.

void void gr::blocks::control_loop::advance_loop (float error) advance_loop gr::blocks::control_loop::advance_loop float error

Advance the control loop based on the current gain settings and the inputted error signal.

d_alpha
d_beta
d_freq
d_phase
void void gr::blocks::control_loop::phase_wrap () phase_wrap gr::blocks::control_loop::phase_wrap

Keep the phase between -2pi and 2pi.

This function keeps the phase between -2pi and 2pi. If the phase is greater than 2pi by d, it wraps around to be -2pi+d; similarly if it is less than -2pi by d, it wraps around to 2pi-d.

This function should be called after advance_loop to keep the phase in a good operating region. It is set as a separate method in case another way is desired as this is fairly heavy-handed.

d_phase
GR_M_PI
void void gr::blocks::control_loop::frequency_limit () frequency_limit gr::blocks::control_loop::frequency_limit

Keep the frequency between d_min_freq and d_max_freq.

This function keeps the frequency between d_min_freq and d_max_freq. If the frequency is greater than d_max_freq, it is set to d_max_freq. If the frequency is less than d_min_freq, it is set to d_min_freq.

This function should be called after advance_loop to keep the frequency in the specified region. It is set as a separate method in case another way is desired as this is fairly heavy-handed.

d_freq
d_max_freq
d_min_freq
void virtual void gr::blocks::control_loop::set_loop_bandwidth (float bw) set_loop_bandwidth gr::blocks::control_loop::set_loop_bandwidth float bw

Set the loop bandwidth.

Set the loop filter's bandwidth to `bw`. This should be between 2*pi/200 and 2*pi/100 (in rads/samp). It must also be a positive number.

When a new damping factor is set, the gains, alpha and beta, of the loop are recalculated by a call to update_gains().

bw

(float) new bandwidth

void void gr::blocks::control_loop::set_damping_factor (float df) set_damping_factor gr::blocks::control_loop::set_damping_factor float df

Set the loop damping factor.

Set the loop filter's damping factor to `df`. The damping factor should be sqrt(2)/2.0 for critically damped systems. Set it to anything else only if you know what you are doing. It must be a number between 0 and 1.

When a new damping factor is set, the gains, alpha and beta, of the loop are recalculated by a call to update_gains().

df

(float) new damping factor

void void gr::blocks::control_loop::set_alpha (float alpha) set_alpha gr::blocks::control_loop::set_alpha float alpha

Set the loop gain alpha.

Sets the loop filter's alpha gain parameter.

This value should really only be set by adjusting the loop bandwidth and damping factor.

alpha

(float) new alpha gain

void void gr::blocks::control_loop::set_beta (float beta) set_beta gr::blocks::control_loop::set_beta float beta

Set the loop gain beta.

Sets the loop filter's beta gain parameter.

This value should really only be set by adjusting the loop bandwidth and damping factor.

beta

(float) new beta gain

void void gr::blocks::control_loop::set_frequency (float freq) set_frequency gr::blocks::control_loop::set_frequency float freq

Set the control loop's frequency.

Sets the control loop's frequency. While this is normally updated by the inner loop of the algorithm, it could be useful to manually initialize, set, or reset this under certain circumstances.

freq

(float) new frequency

void void gr::blocks::control_loop::set_phase (float phase) set_phase gr::blocks::control_loop::set_phase float phase

Set the control loop's phase.

Sets the control loop's phase. While this is normally updated by the inner loop of the algorithm, it could be useful to manually initialize, set, or reset this under certain circumstances.

phase

(float) new phase

void void gr::blocks::control_loop::set_max_freq (float freq) set_max_freq gr::blocks::control_loop::set_max_freq float freq

Set the control loop's maximum frequency.

Set the maximum frequency the control loop can track.

freq

(float) new max frequency

void void gr::blocks::control_loop::set_min_freq (float freq) set_min_freq gr::blocks::control_loop::set_min_freq float freq

Set the control loop's minimum frequency.

Set the minimum frequency the control loop can track.

freq

(float) new min frequency

float float gr::blocks::control_loop::get_loop_bandwidth () const get_loop_bandwidth gr::blocks::control_loop::get_loop_bandwidth

Returns the loop bandwidth.

float float gr::blocks::control_loop::get_damping_factor () const get_damping_factor gr::blocks::control_loop::get_damping_factor

Returns the loop damping factor.

float float gr::blocks::control_loop::get_alpha () const get_alpha gr::blocks::control_loop::get_alpha

Returns the loop gain alpha.

float float gr::blocks::control_loop::get_beta () const get_beta gr::blocks::control_loop::get_beta

Returns the loop gain beta.

float float gr::blocks::control_loop::get_frequency () const get_frequency gr::blocks::control_loop::get_frequency

Get the control loop's frequency estimate.

float float gr::blocks::control_loop::get_phase () const get_phase gr::blocks::control_loop::get_phase

Get the control loop's phase estimate.

float float gr::blocks::control_loop::get_max_freq () const get_max_freq gr::blocks::control_loop::get_max_freq

Get the control loop's maximum frequency.

float float gr::blocks::control_loop::get_min_freq () const get_min_freq gr::blocks::control_loop::get_min_freq

Get the control loop's minimum frequency.

A second-order control loop implementation class.

This class implements a second order control loop and is intended to act as a parent class to blocks which need a control loop (e.g., gr::digital::costas_loop_cc, gr::analog::pll_refout_cc, etc.). It takes in a loop bandwidth as well as a max and min frequency and provides the functions that control the update of the loop.

The loop works of alpha and beta gains. These gains are calculated using the input loop bandwidth and a pre-set damping factor. The damping factor can be changed using the set_damping_factor after the block is constructed. The alpha and beta values can be set using their respective set_alpha or set_beta functions if very precise control over these is required.

The class tracks both phase and frequency of a signal based on an error signal. The error calculation is unique for each algorithm and is calculated externally and passed to the advance_loop function, which uses this to update its phase and frequency estimates.

This class also provides the functions phase_wrap and frequency_limit to easily keep the phase and frequency estimates within our set bounds (phase_wrap keeps it within +/-2pi).

gr::analog::pll_carriertracking_cc
gr::analog::pll_freqdet_cf
gr::analog::pll_refout_cc
gr::blocks::control_loop
gr::digital::constellation_receiver_cb
gr::digital::costas_loop_cc
gr::digital::fll_band_edge_cc
- gr::blocks::control_loop
  advance_loop
- gr::blocks::control_loop
  control_loop
- gr::blocks::control_loop
  control_loop
- gr::blocks::control_loop
  d_alpha
- gr::blocks::control_loop
  d_beta
- gr::blocks::control_loop
  d_damping
- gr::blocks::control_loop
  d_freq
- gr::blocks::control_loop
  d_loop_bw
- gr::blocks::control_loop
  d_max_freq
- gr::blocks::control_loop
  d_min_freq
- gr::blocks::control_loop
  d_phase
- gr::blocks::control_loop
  frequency_limit
- gr::blocks::control_loop
  get_alpha
- gr::blocks::control_loop
  get_beta
- gr::blocks::control_loop
  get_damping_factor
- gr::blocks::control_loop
  get_frequency
- gr::blocks::control_loop
  get_loop_bandwidth
- gr::blocks::control_loop
  get_max_freq
- gr::blocks::control_loop
  get_min_freq
- gr::blocks::control_loop
  get_phase
- gr::blocks::control_loop
  phase_wrap
- gr::blocks::control_loop
  set_alpha
- gr::blocks::control_loop
  set_beta
- gr::blocks::control_loop
  set_damping_factor
- gr::blocks::control_loop
  set_frequency
- gr::blocks::control_loop
  set_loop_bandwidth
- gr::blocks::control_loop
  set_max_freq
- gr::blocks::control_loop
  set_min_freq
- gr::blocks::control_loop
  set_phase
- gr::blocks::control_loop
  update_gains
- gr::blocks::control_loop
  ~control_loop