23 #ifndef GR_BLOCKS_CONTROL_LOOP 24 #define GR_BLOCKS_CONTROL_LOOP 71 control_loop(
float loop_bw,
float max_freq,
float min_freq);
87 void advance_loop(
float error);
117 void frequency_limit();
136 virtual void set_loop_bandwidth(
float bw);
152 void set_damping_factor(
float df);
165 void set_alpha(
float alpha);
178 void set_beta(
float beta);
191 void set_frequency(
float freq);
204 void set_phase(
float phase);
214 void set_max_freq(
float freq);
224 void set_min_freq(
float freq);
233 float get_loop_bandwidth()
const;
238 float get_damping_factor()
const;
243 float get_alpha()
const;
248 float get_beta()
const;
253 float get_frequency()
const;
258 float get_phase()
const;
263 float get_max_freq()
const;
268 float get_min_freq()
const;
273 -0.96402758, -0.96290241, -0.96174273, -0.96054753, -0.95931576, -0.95804636,
274 -0.95673822, -0.95539023, -0.95400122, -0.95257001, -0.95109539, -0.9495761,
275 -0.94801087, -0.94639839, -0.94473732, -0.94302627, -0.94126385, -0.93944862,
276 -0.93757908, -0.93565374, -0.93367104, -0.93162941, -0.92952723, -0.92736284,
277 -0.92513456, -0.92284066, -0.92047938, -0.91804891, -0.91554743, -0.91297305,
278 -0.91032388, -0.90759795, -0.9047933, -0.90190789, -0.89893968, -0.89588656,
279 -0.89274642, -0.88951709, -0.88619637, -0.88278203, -0.87927182, -0.87566342,
280 -0.87195453, -0.86814278, -0.86422579, -0.86020115, -0.85606642, -0.85181914,
281 -0.84745683, -0.84297699, -0.83837709, -0.83365461, -0.82880699, -0.82383167,
282 -0.81872609, -0.81348767, -0.80811385, -0.80260204, -0.7969497, -0.79115425,
283 -0.78521317, -0.77912392, -0.772884, -0.76649093, -0.75994227, -0.75323562,
284 -0.74636859, -0.73933889, -0.73214422, -0.7247824, -0.71725127, -0.70954876,
285 -0.70167287, -0.6936217, -0.68539341, -0.67698629, -0.66839871, -0.65962916,
286 -0.65067625, -0.64153871, -0.6322154, -0.62270534, -0.61300768, -0.60312171,
287 -0.59304692, -0.58278295, -0.57232959, -0.56168685, -0.55085493, -0.53983419,
288 -0.52862523, -0.51722883, -0.50564601, -0.49387799, -0.48192623, -0.46979241,
289 -0.45747844, -0.44498647, -0.4323189, -0.41947836, -0.40646773, -0.39329014,
290 -0.37994896, -0.36644782, -0.35279057, -0.33898135, -0.32502449, -0.31092459,
291 -0.2966865, -0.28231527, -0.26781621, -0.25319481, -0.23845682, -0.22360817,
292 -0.208655, -0.19360362, -0.17846056, -0.16323249, -0.14792623, -0.13254879,
293 -0.11710727, -0.10160892, -0.08606109, -0.07047123, -0.05484686, -0.0391956,
294 -0.02352507, -0.00784298, 0.00784298, 0.02352507, 0.0391956, 0.05484686,
295 0.07047123, 0.08606109, 0.10160892, 0.11710727, 0.13254879, 0.14792623,
296 0.16323249, 0.17846056, 0.19360362, 0.208655, 0.22360817, 0.23845682,
297 0.25319481, 0.26781621, 0.28231527, 0.2966865, 0.31092459, 0.32502449,
298 0.33898135, 0.35279057, 0.36644782, 0.37994896, 0.39329014, 0.40646773,
299 0.41947836, 0.4323189, 0.44498647, 0.45747844, 0.46979241, 0.48192623,
300 0.49387799, 0.50564601, 0.51722883, 0.52862523, 0.53983419, 0.55085493,
301 0.56168685, 0.57232959, 0.58278295, 0.59304692, 0.60312171, 0.61300768,
302 0.62270534, 0.6322154, 0.64153871, 0.65067625, 0.65962916, 0.66839871,
303 0.67698629, 0.68539341, 0.6936217, 0.70167287, 0.70954876, 0.71725127,
304 0.7247824, 0.73214422, 0.73933889, 0.74636859, 0.75323562, 0.75994227,
305 0.76649093, 0.772884, 0.77912392, 0.78521317, 0.79115425, 0.7969497,
306 0.80260204, 0.80811385, 0.81348767, 0.81872609, 0.82383167, 0.82880699,
307 0.83365461, 0.83837709, 0.84297699, 0.84745683, 0.85181914, 0.85606642,
308 0.86020115, 0.86422579, 0.86814278, 0.87195453, 0.87566342, 0.87927182,
309 0.88278203, 0.88619637, 0.88951709, 0.89274642, 0.89588656, 0.89893968,
310 0.90190789, 0.9047933, 0.90759795, 0.91032388, 0.91297305, 0.91554743,
311 0.91804891, 0.92047938, 0.92284066, 0.92513456, 0.92736284, 0.92952723,
312 0.93162941, 0.93367104, 0.93565374, 0.93757908, 0.93944862, 0.94126385,
313 0.94302627, 0.94473732, 0.94639839, 0.94801087, 0.9495761, 0.95109539,
314 0.95257001, 0.95400122, 0.95539023, 0.95673822, 0.95804636, 0.95931576,
315 0.96054753, 0.96174273, 0.96290241, 0.96402758
338 int index = 128 + 64 * x;
339 return tanh_lut_table[index];
static float tanhf_lut(float x)
Definition: control_loop.h:331
float d_loop_bw
Definition: control_loop.h:66
float d_beta
Definition: control_loop.h:67
GNU Radio logging wrapper for log4cpp library (C++ port of log4j)
Definition: basic_block.h:43
#define BLOCKS_API
Definition: gr-blocks/include/gnuradio/blocks/api.h:30
static float tanh_lut_table[256]
Definition: control_loop.h:272
float d_phase
Definition: control_loop.h:64
A second-order control loop implementation class.
Definition: control_loop.h:61
float d_min_freq
Definition: control_loop.h:65
control_loop(void)
Definition: control_loop.h:70