gnuradio.gr: Signal Level Control (AGC)

gnuradio.gr.agc2_cc(float attack_rate = 1e-1, float decay_rate = 1e-2, float reference = 1.0, float gain = 1.0, float max_gain = 0.0) → gr_agc2_cc_sptr

high performance Automatic Gain Control class

For Power the absolute value of the complex number is used.

gr_agc2_cc_sptr.attack_rate(self) → float
gr_agc2_cc_sptr.decay_rate(self) → float
gr_agc2_cc_sptr.gain(self) → float
gr_agc2_cc_sptr.max_gain(self) → float
gr_agc2_cc_sptr.reference(self) → float
gr_agc2_cc_sptr.set_attack_rate(self, float rate)
gr_agc2_cc_sptr.set_decay_rate(self, float rate)
gr_agc2_cc_sptr.set_gain(self, float gain)
gr_agc2_cc_sptr.set_max_gain(self, float max_gain)
gr_agc2_cc_sptr.set_reference(self, float reference)
gnuradio.gr.agc2_ff(float attack_rate = 1e-1, float decay_rate = 1e-2, float reference = 1.0, float gain = 1.0, float max_gain = 0.0) → gr_agc2_ff_sptr

high performance Automatic Gain Control class

Power is approximated by absolute value

gr_agc2_ff_sptr.attack_rate(self) → float
gr_agc2_ff_sptr.decay_rate(self) → float
gr_agc2_ff_sptr.gain(self) → float
gr_agc2_ff_sptr.max_gain(self) → float
gr_agc2_ff_sptr.reference(self) → float
gr_agc2_ff_sptr.set_attack_rate(self, float rate)
gr_agc2_ff_sptr.set_decay_rate(self, float rate)
gr_agc2_ff_sptr.set_gain(self, float gain)
gr_agc2_ff_sptr.set_max_gain(self, float max_gain)
gr_agc2_ff_sptr.set_reference(self, float reference)
gnuradio.gr.agc_cc(float rate = 1e-4, float reference = 1.0, float gain = 1.0, float max_gain = 0.0) → gr_agc_cc_sptr

high performance Automatic Gain Control class

For Power the absolute value of the complex number is used.

gr_agc_cc_sptr.gain(self) → float
gr_agc_cc_sptr.max_gain(self) → float
gr_agc_cc_sptr.rate(self) → float
gr_agc_cc_sptr.reference(self) → float
gnuradio.gr.agc_ff(float rate = 1e-4, float reference = 1.0, float gain = 1.0, float max_gain = 0.0) → gr_agc_ff_sptr

high performance Automatic Gain Control class

Power is approximated by absolute value

gnuradio.gr.ctcss_squelch_ff(int rate, float freq, float level = 0.01, int len = 0, int ramp = 0, bool gate = False) → gr_ctcss_squelch_ff_sptr

gate or zero output if ctcss tone not present

gr_ctcss_squelch_ff_sptr.gate(self) → bool
gr_ctcss_squelch_ff_sptr.len(self) → int
gr_ctcss_squelch_ff_sptr.level(self) → float
gr_ctcss_squelch_ff_sptr.ramp(self) → int
gr_ctcss_squelch_ff_sptr.set_gate(self, bool gate)
gr_ctcss_squelch_ff_sptr.set_level(self, float level)
gr_ctcss_squelch_ff_sptr.set_ramp(self, int ramp)
gr_ctcss_squelch_ff_sptr.unmuted(self) → bool
gnuradio.gr.dpll_bb(float period, float gain) → gr_dpll_bb_sptr

Detect the peak of a signal

If a peak is detected, this block outputs a 1, or it outputs 0’s.

gnuradio.gr.feedforward_agc_cc(int nsamples, float reference = 1.0) → gr_feedforward_agc_cc_sptr

Non-causal AGC which computes required gain based on max absolute value over nsamples.

gnuradio.gr.peak_detector2_fb(float threshold_factor_rise = 7, int look_ahead = 1000, float alpha = 0.001) → gr_peak_detector2_fb_sptr

Detect the peak of a signal

If a peak is detected, this block outputs a 1, or it outputs 0’s. A separate debug output may be connected, to view the internal EWMA described below.

Parameters:
  • threshold_factor_rise – The threshold factor determins when a peak is present. An EWMA average of the signal is calculated and when the value of the signal goes over threshold_factor_rise*average, we call the peak.
  • look_ahead – The look-ahead value is used when the threshold is found to locate the peak within this range.
  • alpha – The gain value of a single-pole moving average filter
gr_peak_detector2_fb_sptr.alpha(self) → float

Get the alpha value of the running average.

gr_peak_detector2_fb_sptr.look_ahead(self) → int

Get the look-ahead factor value.

gr_peak_detector2_fb_sptr.set_alpha(self, int alpha)

Set the running average alpha.

gr_peak_detector2_fb_sptr.set_look_ahead(self, int look)

Set the look-ahead factor.

gr_peak_detector2_fb_sptr.set_threshold_factor_rise(self, float thr)

Set the threshold factor value for the rise time.

gr_peak_detector2_fb_sptr.threshold_factor_rise(self) → float

Get the threshold factor value for the rise time.

gnuradio.gr.pwr_squelch_cc(double db, double alpha = 0.0001, int ramp = 0, bool gate = False) → gr_pwr_squelch_cc_sptr

gate or zero output when input power below threshold

gr_pwr_squelch_cc_sptr.gate(self) → bool
gr_pwr_squelch_cc_sptr.ramp(self) → int
gr_pwr_squelch_cc_sptr.set_alpha(self, double alpha)
gr_pwr_squelch_cc_sptr.set_gate(self, bool gate)
gr_pwr_squelch_cc_sptr.set_ramp(self, int ramp)
gr_pwr_squelch_cc_sptr.set_threshold(self, double db)
gr_pwr_squelch_cc_sptr.threshold(self) → double
gr_pwr_squelch_cc_sptr.unmuted(self) → bool
gnuradio.gr.pwr_squelch_ff(double db, double alpha = 0.0001, int ramp = 0, bool gate = False) → gr_pwr_squelch_ff_sptr

gate or zero output when input power below threshold

gr_pwr_squelch_ff_sptr.gate(self) → bool
gr_pwr_squelch_ff_sptr.ramp(self) → int
gr_pwr_squelch_ff_sptr.set_alpha(self, double alpha)
gr_pwr_squelch_ff_sptr.set_gate(self, bool gate)
gr_pwr_squelch_ff_sptr.set_ramp(self, int ramp)
gr_pwr_squelch_ff_sptr.set_threshold(self, double db)
gr_pwr_squelch_ff_sptr.threshold(self) → double
gr_pwr_squelch_ff_sptr.unmuted(self) → bool
gnuradio.gr.regenerate_bb(int period, unsigned int max_regen = 500) → gr_regenerate_bb_sptr

Detect the peak of a signal and repeat every period samples

If a peak is detected, this block outputs a 1 repeated every period samples until reset by detection of another 1 on the input or stopped after max_regen regenerations have occurred.

Note that if max_regen=(-1)/ULONG_MAX then the regeneration will run forever.

gr_regenerate_bb_sptr.set_max_regen(self, unsigned int regen)

Reset the maximum regeneration count; this will reset the current regen.

gr_regenerate_bb_sptr.set_period(self, int period)

Reset the period of regenerations; this will reset the current regen.

gnuradio.gr.simple_squelch_cc(double threshold_db, double alpha = 0.0001) → gr_simple_squelch_cc_sptr

simple squelch block based on average signal power and threshold in dB.

gr_simple_squelch_cc_sptr.set_alpha(self, double alpha)
gr_simple_squelch_cc_sptr.set_threshold(self, double decibels)
gr_simple_squelch_cc_sptr.squelch_range(self) → __dummy_4__
gr_simple_squelch_cc_sptr.threshold(self) → double
gr_simple_squelch_cc_sptr.unmuted(self) → bool
gnuradio.gr.mute_cc(bool mute = False) → gr_mute_cc_sptr

output = input or zero if muted.

gr_mute_cc_sptr.mute(self) → bool
gr_mute_cc_sptr.set_mute(self, bool mute)
gnuradio.gr.mute_ff(bool mute = False) → gr_mute_ff_sptr

output = input or zero if muted.

gr_mute_ff_sptr.mute(self) → bool
gr_mute_ff_sptr.set_mute(self, bool mute)
gnuradio.gr.mute_ii(bool mute = False) → gr_mute_ii_sptr

output = input or zero if muted.

gr_mute_ii_sptr.mute(self) → bool
gr_mute_ii_sptr.set_mute(self, bool mute)
gnuradio.gr.mute_ss(bool mute = False) → gr_mute_ss_sptr

output = input or zero if muted.

gr_mute_ss_sptr.mute(self) → bool
gr_mute_ss_sptr.set_mute(self, bool mute)
gnuradio.gr.peak_detector_fb(float threshold_factor_rise = 0.25, float threshold_factor_fall = 0.40, int look_ahead = 10, float alpha = 0.001) → gr_peak_detector_fb_sptr

Detect the peak of a signal

If a peak is detected, this block outputs a 1, or it outputs 0’s.

Parameters:
  • threshold_factor_rise – The threshold factor determins when a peak has started. An average of the signal is calculated and when the value of the signal goes over threshold_factor_rise*average, we start looking for a peak.
  • threshold_factor_fall – The threshold factor determins when a peak has ended. An average of the signal is calculated and when the value of the signal goes bellow threshold_factor_fall*average, we stop looking for a peak.
  • look_ahead – The look-ahead value is used when the threshold is found to look if there another peak within this step range. If there is a larger value, we set that as the peak and look ahead again. This is continued until the highest point is found with This look-ahead range.
  • alpha – The gain value of a moving average filter
gr_peak_detector_fb_sptr.alpha(self) → float

Get the alpha value of the running average.

gr_peak_detector_fb_sptr.look_ahead(self) → int

Get the look-ahead factor value.

gr_peak_detector_fb_sptr.set_alpha(self, int alpha)

Set the running average alpha.

gr_peak_detector_fb_sptr.set_look_ahead(self, int look)

Set the look-ahead factor.

gr_peak_detector_fb_sptr.set_threshold_factor_fall(self, float thr)

Set the threshold factor value for the fall time.

gr_peak_detector_fb_sptr.set_threshold_factor_rise(self, float thr)

Set the threshold factor value for the rise time.

gr_peak_detector_fb_sptr.threshold_factor_fall(self) → float

Get the threshold factor value for the fall time.

gr_peak_detector_fb_sptr.threshold_factor_rise(self) → float

Get the threshold factor value for the rise time.

gnuradio.gr.peak_detector_ib(float threshold_factor_rise = 0.25, float threshold_factor_fall = 0.40, int look_ahead = 10, float alpha = 0.001) → gr_peak_detector_ib_sptr

Detect the peak of a signal

If a peak is detected, this block outputs a 1, or it outputs 0’s.

Parameters:
  • threshold_factor_rise – The threshold factor determins when a peak has started. An average of the signal is calculated and when the value of the signal goes over threshold_factor_rise*average, we start looking for a peak.
  • threshold_factor_fall – The threshold factor determins when a peak has ended. An average of the signal is calculated and when the value of the signal goes bellow threshold_factor_fall*average, we stop looking for a peak.
  • look_ahead – The look-ahead value is used when the threshold is found to look if there another peak within this step range. If there is a larger value, we set that as the peak and look ahead again. This is continued until the highest point is found with This look-ahead range.
  • alpha – The gain value of a moving average filter
gr_peak_detector_ib_sptr.alpha(self) → float

Get the alpha value of the running average.

gr_peak_detector_ib_sptr.look_ahead(self) → int

Get the look-ahead factor value.

gr_peak_detector_ib_sptr.set_alpha(self, int alpha)

Set the running average alpha.

gr_peak_detector_ib_sptr.set_look_ahead(self, int look)

Set the look-ahead factor.

gr_peak_detector_ib_sptr.set_threshold_factor_fall(self, float thr)

Set the threshold factor value for the fall time.

gr_peak_detector_ib_sptr.set_threshold_factor_rise(self, float thr)

Set the threshold factor value for the rise time.

gr_peak_detector_ib_sptr.threshold_factor_fall(self) → float

Get the threshold factor value for the fall time.

gr_peak_detector_ib_sptr.threshold_factor_rise(self) → float

Get the threshold factor value for the rise time.

gnuradio.gr.peak_detector_sb(float threshold_factor_rise = 0.25, float threshold_factor_fall = 0.40, int look_ahead = 10, float alpha = 0.001) → gr_peak_detector_sb_sptr

Detect the peak of a signal

If a peak is detected, this block outputs a 1, or it outputs 0’s.

Parameters:
  • threshold_factor_rise – The threshold factor determins when a peak has started. An average of the signal is calculated and when the value of the signal goes over threshold_factor_rise*average, we start looking for a peak.
  • threshold_factor_fall – The threshold factor determins when a peak has ended. An average of the signal is calculated and when the value of the signal goes bellow threshold_factor_fall*average, we stop looking for a peak.
  • look_ahead – The look-ahead value is used when the threshold is found to look if there another peak within this step range. If there is a larger value, we set that as the peak and look ahead again. This is continued until the highest point is found with This look-ahead range.
  • alpha – The gain value of a moving average filter
gr_peak_detector_sb_sptr.alpha(self) → float

Get the alpha value of the running average.

gr_peak_detector_sb_sptr.look_ahead(self) → int

Get the look-ahead factor value.

gr_peak_detector_sb_sptr.set_alpha(self, int alpha)

Set the running average alpha.

gr_peak_detector_sb_sptr.set_look_ahead(self, int look)

Set the look-ahead factor.

gr_peak_detector_sb_sptr.set_threshold_factor_fall(self, float thr)

Set the threshold factor value for the fall time.

gr_peak_detector_sb_sptr.set_threshold_factor_rise(self, float thr)

Set the threshold factor value for the rise time.

gr_peak_detector_sb_sptr.threshold_factor_fall(self) → float

Get the threshold factor value for the fall time.

gr_peak_detector_sb_sptr.threshold_factor_rise(self) → float

Get the threshold factor value for the rise time.

gnuradio.gr.sample_and_hold_bb() → gr_sample_and_hold_bb_sptr

sample and hold circuit

Samples the data stream (input stream 0) and holds the value if the control signal is 1 (intput stream 1).

gnuradio.gr.sample_and_hold_ff() → gr_sample_and_hold_ff_sptr

sample and hold circuit

Samples the data stream (input stream 0) and holds the value if the control signal is 1 (intput stream 1).

gnuradio.gr.sample_and_hold_ii() → gr_sample_and_hold_ii_sptr

sample and hold circuit

Samples the data stream (input stream 0) and holds the value if the control signal is 1 (intput stream 1).

gnuradio.gr.sample_and_hold_ss() → gr_sample_and_hold_ss_sptr

sample and hold circuit

Samples the data stream (input stream 0) and holds the value if the control signal is 1 (intput stream 1).

Previous topic

gnuradio.gr: Implementation Details

Next topic

gnuradio.gr: Mathematics

This Page