gnuradio.digital: Signal Processing Blocks

gnuradio.digital.fll_band_edge_cc(float samps_per_sym, float rolloff, int filter_size, float bandwidth) → sptr

Frequency Lock Loop using band-edge filters.

The frequency lock loop derives a band-edge filter that covers the upper and lower bandwidths of a digitally-modulated signal. The bandwidth range is determined by the excess bandwidth (e.g., rolloff factor) of the modulated signal. The placement in frequency of the band-edges is determined by the oversampling ratio (number of samples per symbol) and the excess bandwidth. The size of the filters should be fairly large so as to average over a number of symbols.

The FLL works by filtering the upper and lower band edges into x_u(t) and x_l(t), respectively. These are combined to form cc(t) = x_u(t) + x_l(t) and ss(t) = x_u(t) - x_l(t). Combining these to form the signal e(t) = Re{cc(t) imes ss(t)^*} (where ^* is the complex conjugate) provides an error signal at the DC term that is directly proportional to the carrier frequency. We then make a second-order loop using the error signal that is the running average of e(t).

In practice, the above equation can be simplified by just comparing the absolute value squared of the output of both filters: abs(x_l(t))^2 - abs(x_u(t))^2 = norm(x_l(t)) - norm(x_u(t)).

In theory, the band-edge filter is the derivative of the matched filter in frequency, (H_be(f) = frac{H(f)}{df}). In practice, this comes down to a quarter sine wave at the point of the matched filter’s rolloff (if it’s a raised-cosine, the derivative of a cosine is a sine). Extend this sine by another quarter wave to make a half wave around the band-edges is equivalent in time to the sum of two sinc functions. The baseband filter fot the band edges is therefore derived from this sum of sincs. The band edge filters are then just the baseband signal modulated to the correct place in frequency. All of these calculations are done in the ‘design_filter’ function.

Note

We use FIR filters here because the filters have to have a flat phase response over the entire frequency range to allow their comparisons to be valid.

It is very important that the band edge filters be the derivatives of the pulse shaping filter, and that they be linear phase. Otherwise, the variance of the error will be very large.

Constructor Specific Documentation:

Make an FLL block.

Parameters:
  • samps_per_sym – (float) number of samples per symbol
  • rolloff – (float) Rolloff (excess bandwidth) of signal filter
  • filter_size – (int) number of filter taps to generate
  • bandwidth – (float) Loop bandwidth
fll_band_edge_cc_sptr.active_thread_priority(self) → int
fll_band_edge_cc_sptr.advance_loop(self, float error)
fll_band_edge_cc_sptr.filter_size(self) → int

Returns the number of taps of the filter.

fll_band_edge_cc_sptr.frequency_limit(self)
fll_band_edge_cc_sptr.get_alpha(self) → float
fll_band_edge_cc_sptr.get_beta(self) → float
fll_band_edge_cc_sptr.get_damping_factor(self) → float
fll_band_edge_cc_sptr.get_frequency(self) → float
fll_band_edge_cc_sptr.get_loop_bandwidth(self) → float
fll_band_edge_cc_sptr.get_max_freq(self) → float
fll_band_edge_cc_sptr.get_min_freq(self) → float
fll_band_edge_cc_sptr.get_phase(self) → float
fll_band_edge_cc_sptr.phase_wrap(self)
fll_band_edge_cc_sptr.print_taps(self)

Print the taps to screen.

fll_band_edge_cc_sptr.rolloff(self) → float

Returns the rolloff factor used for the filter.

fll_band_edge_cc_sptr.samples_per_symbol(self) → float

Returns the number of sampler per symbol used for the filter.

fll_band_edge_cc_sptr.set_alpha(self, float alpha)
fll_band_edge_cc_sptr.set_beta(self, float beta)
fll_band_edge_cc_sptr.set_damping_factor(self, float df)
fll_band_edge_cc_sptr.set_filter_size(self, int filter_size)

Set the number of taps in the filter.

This sets the number of taps in the band-edge filters. Setting this will force a recalculation of the filter taps.

This should be about the same number of taps used in the transmitter’s shaping filter and also not very large. A large number of taps will result in a large delay between input and frequency estimation, and so will not be as accurate. Between 30 and 70 taps is usual.

fll_band_edge_cc_sptr.set_frequency(self, float freq)
fll_band_edge_cc_sptr.set_loop_bandwidth(self, float bw)
fll_band_edge_cc_sptr.set_max_freq(self, float freq)
fll_band_edge_cc_sptr.set_min_freq(self, float freq)
fll_band_edge_cc_sptr.set_phase(self, float phase)
fll_band_edge_cc_sptr.set_rolloff(self, float rolloff)

Set the rolloff factor of the shaping filter.

This sets the rolloff factor that is used in the pulse shaping filter and is used to calculate the filter taps. Changing this will force a recalculation of the filter taps.

This should be the same value that is used in the transmitter’s pulse shaping filter. It must be between 0 and 1 and is usually between 0.2 and 0.5 (where 0.22 and 0.35 are commonly used values).

fll_band_edge_cc_sptr.set_samples_per_symbol(self, float sps)

Set the number of samples per symbol.

Set’s the number of samples per symbol the system should use. This value is uesd to calculate the filter taps and will force a recalculation.

fll_band_edge_cc_sptr.set_thread_priority(self, int priority) → int
fll_band_edge_cc_sptr.thread_priority(self) → int
fll_band_edge_cc_sptr.update_gains(self)
gnuradio.digital.kurtotic_equalizer_cc(int num_taps, float mu) → sptr

Implements a kurtosis-based adaptive equalizer on complex stream.

Warning

This block does not yet work.

“Y. Guo, J. Zhao, Y. Sun, “Sign kurtosis maximization based blind equalization algorithm,” IEEE Conf. on Control, Automation,
Robotics and Vision, Vol. 3, Dec. 2004, pp. 2052 - 2057.”

Constructor Specific Documentation:

Parameters:
  • num_taps
  • mu
kurtotic_equalizer_cc_sptr.active_thread_priority(self) → int
kurtotic_equalizer_cc_sptr.gain(self) → float
kurtotic_equalizer_cc_sptr.set_gain(self, float mu)
kurtotic_equalizer_cc_sptr.set_thread_priority(self, int priority) → int
kurtotic_equalizer_cc_sptr.thread_priority(self) → int
gnuradio.digital.lms_dd_equalizer_cc(int num_taps, float mu, int sps, constellation_sptr cnst) → sptr

Least-Mean-Square Decision Directed Equalizer (complex in/out)

This block implements an LMS-based decision-directed equalizer. It uses a set of weights, w, to correlate against the inputs, u, and a decisions is then made from this output. The error in the decision is used to update the weight vector.

y[n] = conj(w[n]) u[n] d[n] = decision(y[n]) e[n] = d[n] - y[n] w[n+1] = w[n] + mu u[n] conj(e[n])

Where mu is a gain value (between 0 and 1 and usualy small, around 0.001 - 0.01.

This block uses the digital_constellation object for making the decision from y[n]. Create the constellation object for whatever constellation is to be used and pass in the object. In Python, you can use something like:

self.constellation = digital.constellation_qpsk()

To create a QPSK constellation (see the digital_constellation block for more details as to what constellations are available or how to create your own). You then pass the object to this block as an sptr, or using “self.constellation.base()”.

The theory for this algorithm can be found in Chapter 9 of: S. Haykin, Adaptive Filter Theory, Upper Saddle River, NJ: Prentice Hall, 1996.

Constructor Specific Documentation:

Make an LMS decision-directed equalizer

Parameters:
  • num_taps – Numer of taps in the equalizer (channel size)
  • mu – Gain of the update loop
  • sps – Number of samples per symbol of the input signal
  • cnst – A constellation derived from class ‘constellation’. Use base() method to get a shared pointer to this base class type.
lms_dd_equalizer_cc_sptr.active_thread_priority(self) → int
lms_dd_equalizer_cc_sptr.gain(self) → float
lms_dd_equalizer_cc_sptr.set_gain(self, float mu)
lms_dd_equalizer_cc_sptr.set_taps(self, std::vector<(gr_complex, std::allocator<(gr_complex)>)> taps)
lms_dd_equalizer_cc_sptr.set_thread_priority(self, int priority) → int
lms_dd_equalizer_cc_sptr.taps(self) → std::vector<(gr_complex,std::allocator<(gr_complex)>)>
lms_dd_equalizer_cc_sptr.thread_priority(self) → int
gnuradio.digital.mpsk_receiver_cc(unsigned int M, float theta, float loop_bw, float fmin, float fmax, float mu, float gain_mu, float omega, float gain_omega, float omega_rel) → sptr

This block takes care of receiving M-PSK modulated signals through phase, frequency, and symbol synchronization.

It performs carrier frequency and phase locking as well as symbol timing recovery. It works with (D)BPSK, (D)QPSK, and (D)8PSK as tested currently. It should also work for OQPSK and PI/4 DQPSK.

The phase and frequency synchronization are based on a Costas loop that finds the error of the incoming signal point compared to its nearest constellation point. The frequency and phase of the NCO are updated according to this error. There are optimized phase error detectors for BPSK and QPSK, but 8PSK is done using a brute-force computation of the constellation points to find the minimum.

The symbol synchronization is done using a modified Mueller and Muller circuit from the paper:

“G. R. Danesfahani, T. G. Jeans, “Optimisation of modified Mueller and Muller algorithm,” Electronics Letters, Vol. 31, no. 13, 22
June 1995, pp. 1032 - 1033.”

This circuit interpolates the downconverted sample (using the NCO developed by the Costas loop) every mu samples, then it finds the sampling error based on this and the past symbols and the decision made on the samples. Like the phase error detector, there are optimized decision algorithms for BPSK and QPKS, but 8PSK uses another brute force computation against all possible symbols. The modifications to the M&M used here reduce self-noise.

Constructor Specific Documentation:

Make a M-PSK receiver block.

The constructor also chooses which phase detector and decision maker to use in the work loop based on the value of M.

Parameters:
  • M – modulation order of the M-PSK modulation
  • theta – any constant phase rotation from the real axis of the constellation
  • loop_bw – Loop bandwidth to set gains of phase/freq tracking loop
  • fmin – minimum normalized frequency value the loop can achieve
  • fmax – maximum normalized frequency value the loop can achieve
  • mu – initial parameter for the interpolator [0,1]
  • gain_mu – gain parameter of the M&M error signal to adjust mu (~0.05)
  • omega – initial value for the number of symbols between samples (~number of samples/symbol)
  • gain_omega – gain parameter to adjust omega based on the error (~omega^2/4)
  • omega_rel – sets the maximum (omega*(1+omega_rel)) and minimum (omega*(1+omega_rel)) omega (~0.005)
mpsk_receiver_cc_sptr.active_thread_priority(self) → int
mpsk_receiver_cc_sptr.gain_mu(self) → float

Returns mu gain factor.

mpsk_receiver_cc_sptr.gain_omega(self) → float

Returns omega gain factor.

mpsk_receiver_cc_sptr.gain_omega_rel(self) → float

Returns the relative omega limit.

mpsk_receiver_cc_sptr.modulation_order(self) → float

Returns the modulation order (M) currently set.

mpsk_receiver_cc_sptr.mu(self) → float

Returns current value of mu.

mpsk_receiver_cc_sptr.omega(self) → float

Returns current value of omega.

mpsk_receiver_cc_sptr.set_gain_mu(self, float gain_mu)

Sets value for mu gain factor.

mpsk_receiver_cc_sptr.set_gain_omega(self, float gain_omega)

Sets value for omega gain factor.

mpsk_receiver_cc_sptr.set_gain_omega_rel(self, float omega_rel)

Sets the relative omega limit and resets omega min/max values.

mpsk_receiver_cc_sptr.set_modulation_order(self, unsigned int M)

Sets the modulation order (M) currently.

mpsk_receiver_cc_sptr.set_mu(self, float mu)

Sets value of mu.

mpsk_receiver_cc_sptr.set_omega(self, float omega)

Sets value of omega and its min and max values.

mpsk_receiver_cc_sptr.set_theta(self, float theta)

Sets value of theta.

mpsk_receiver_cc_sptr.set_thread_priority(self, int priority) → int
mpsk_receiver_cc_sptr.theta(self) → float

Returns current value of theta.

mpsk_receiver_cc_sptr.thread_priority(self) → int
gnuradio.digital.mpsk_snr_est_cc(snr_est_type_t type, int tag_nsamples = 10000, double alpha = 0.001) → sptr

A block for computing SNR of a signal.

This block can be used to monitor and retrieve estimations of the signal SNR. It is designed to work in a flowgraph and passes all incoming data along to its output.

The block is designed for use with M-PSK signals especially. The type of estimator is specified as the parameter in the constructor. The estimators tend to trade off performance for accuracy, although experimentation should be done to figure out the right approach for a given implementation. Further, the current set of estimators are designed and proven theoretically under AWGN conditions; some amount of error should be assumed and/or estimated for real channel conditions.

Constructor Specific Documentation:

Factory function returning shared pointer of this class

Parameters:
  • type – the type of estimator to use gr::digital::snr_est_type_t “snr_est_type_t” for details about the available types
  • tag_nsamples – after this many samples, a tag containing the SNR (key=’snr’) will be sent
  • alpha – the update rate of internal running average calculations
mpsk_snr_est_cc_sptr.active_thread_priority(self) → int
mpsk_snr_est_cc_sptr.alpha(self) → double

Get the running-average coefficient.

mpsk_snr_est_cc_sptr.set_alpha(self, double alpha)

Set the running-average coefficient.

mpsk_snr_est_cc_sptr.set_tag_nsample(self, int n)

Set the number of samples between SNR tags.

mpsk_snr_est_cc_sptr.set_thread_priority(self, int priority) → int
mpsk_snr_est_cc_sptr.set_type(self, snr_est_type_t t)

Set type of estimator to use.

mpsk_snr_est_cc_sptr.snr(self) → double

Return the estimated signal-to-noise ratio in decibels.

mpsk_snr_est_cc_sptr.tag_nsample(self) → int

Return how many samples between SNR tags.

mpsk_snr_est_cc_sptr.thread_priority(self) → int
gnuradio.digital.clock_recovery_mm_cc(float omega, float gain_omega, float mu, float gain_mu, float omega_relative_limit) → sptr

Mueller and M?ller (M&M) based clock recovery block with complex input, complex output.

This implements the Mueller and M?ller (M&M) discrete-time error-tracking synchronizer.

The complex version here is based on: Modified Mueller and Muller clock recovery circuit:

    1. Danesfahani, T.G. Jeans, “Optimisation of modified Mueller

    and Muller algorithm,” Electronics Letters, Vol. 31, no. 13, 22 June 1995, pp. 1032 - 1033.

Constructor Specific Documentation:

Make a M&M clock recovery block.

Parameters:
  • omega – Initial estimate of samples per symbol
  • gain_omega – Gain setting for omega update loop
  • mu – Initial estimate of phase of sample
  • gain_mu – Gain setting for mu update loop
  • omega_relative_limit – limit on omega
clock_recovery_mm_cc_sptr.active_thread_priority(self) → int
clock_recovery_mm_cc_sptr.gain_mu(self) → float
clock_recovery_mm_cc_sptr.gain_omega(self) → float
clock_recovery_mm_cc_sptr.mu(self) → float
clock_recovery_mm_cc_sptr.omega(self) → float
clock_recovery_mm_cc_sptr.set_gain_mu(self, float gain_mu)
clock_recovery_mm_cc_sptr.set_gain_omega(self, float gain_omega)
clock_recovery_mm_cc_sptr.set_mu(self, float mu)
clock_recovery_mm_cc_sptr.set_omega(self, float omega)
clock_recovery_mm_cc_sptr.set_thread_priority(self, int priority) → int
clock_recovery_mm_cc_sptr.set_verbose(self, bool verbose)
clock_recovery_mm_cc_sptr.thread_priority(self) → int
gnuradio.digital.clock_recovery_mm_ff(float omega, float gain_omega, float mu, float gain_mu, float omega_relative_limit) → sptr

Mueller and M?ller (M&M) based clock recovery block with float input, float output.

This implements the Mueller and M?ller (M&M) discrete-time error-tracking synchronizer.

See “Digital Communication Receivers: Synchronization, Channel
Estimation and Signal Processing” by Heinrich Meyr, Marc Moeneclaey, & Stefan Fechtel. ISBN 0-471-50275-8.

Constructor Specific Documentation:

Make a M&M clock recovery block.

Parameters:
  • omega – Initial estimate of samples per symbol
  • gain_omega – Gain setting for omega update loop
  • mu – Initial estimate of phase of sample
  • gain_mu – Gain setting for mu update loop
  • omega_relative_limit – limit on omega
clock_recovery_mm_ff_sptr.active_thread_priority(self) → int
clock_recovery_mm_ff_sptr.gain_mu(self) → float
clock_recovery_mm_ff_sptr.gain_omega(self) → float
clock_recovery_mm_ff_sptr.mu(self) → float
clock_recovery_mm_ff_sptr.omega(self) → float
clock_recovery_mm_ff_sptr.set_gain_mu(self, float gain_mu)
clock_recovery_mm_ff_sptr.set_gain_omega(self, float gain_omega)
clock_recovery_mm_ff_sptr.set_mu(self, float mu)
clock_recovery_mm_ff_sptr.set_omega(self, float omega)
clock_recovery_mm_ff_sptr.set_thread_priority(self, int priority) → int
clock_recovery_mm_ff_sptr.set_verbose(self, bool verbose)
clock_recovery_mm_ff_sptr.thread_priority(self) → int
gnuradio.digital.constellation_decoder_cb(constellation_sptr constellation) → sptr

Constellation Decoder.

Decode a constellation’s points from a complex space to (unpacked) bits based on the map of the object.

Constructor Specific Documentation:

Make constellation decoder block.

Parameters:constellation – A constellation derived from class ‘constellation’. Use base() method to get a shared pointer to this base class type.
constellation_decoder_cb_sptr.active_thread_priority(self) → int
constellation_decoder_cb_sptr.set_thread_priority(self, int priority) → int
constellation_decoder_cb_sptr.thread_priority(self) → int
gnuradio.digital.constellation_receiver_cb(constellation_sptr constellation, float loop_bw, float fmin, float fmax) → sptr

This block makes hard decisions about the received symbols (using a constellation object) and also fine tunes phase synchronization.

The phase and frequency synchronization are based on a Costas loop that finds the error of the incoming signal point compared to its nearest constellation point. The frequency and phase of the NCO are updated according to this error.

Constructor Specific Documentation:

Constructor to synchronize incoming M-PSK symbols.

The constructor chooses which phase detector and decision maker to use in the work loop based on the value of M.

Parameters:
  • constellation – constellation of points for generic modulation
  • loop_bw – Loop bandwidth of the Costas Loop (~ 2pi/100)
  • fmin – minimum normalized frequency value the loop can achieve
  • fmax – maximum normalized frequency value the loop can achieve
constellation_receiver_cb_sptr.active_thread_priority(self) → int
constellation_receiver_cb_sptr.phase_error_tracking(self, float phase_error)
constellation_receiver_cb_sptr.set_thread_priority(self, int priority) → int
constellation_receiver_cb_sptr.thread_priority(self) → int
gnuradio.digital.correlate_access_code_bb(string access_code, int threshold) → sptr

Examine input for specified access code, one bit at a time.

input: stream of bits, 1 bit per input byte (data in LSB) output: stream of bits, 2 bits per output byte (data in LSB, flag in next higher bit)

Each output byte contains two valid bits, the data bit, and the flag bit. The LSB (bit 0) is the data bit, and is the original input data, delayed 64 bits. Bit 1 is the flag bit and is 1 if the corresponding data bit is the first data bit following the access code. Otherwise the flag bit is 0.

Constructor Specific Documentation:

Make a correlate_access_code block.

Parameters:
  • access_code – is represented with 1 byte per bit, e.g., “010101010111000100”
  • threshold – maximum number of bits that may be wrong
correlate_access_code_bb_sptr.active_thread_priority(self) → int
correlate_access_code_bb_sptr.set_access_code(self, string access_code) → bool

Set a new access code.

correlate_access_code_bb_sptr.set_thread_priority(self, int priority) → int
correlate_access_code_bb_sptr.thread_priority(self) → int
gnuradio.digital.costas_loop_cc(float loop_bw, int order) → sptr

A Costas loop carrier recovery module.

The Costas loop locks to the center frequency of a signal and downconverts it to baseband. The second (order=2) order loop is used for BPSK where the real part of the output signal is the baseband BPSK signal and the imaginary part is the error signal. When order=4, it can be used for quadrature modulations where both I and Q (real and imaginary) are outputted.

More details can be found online:

  1. Feigin, “Practical Costas loop design: Designing a simple
and inexpensive BPSK Costas loop carrier recovery circuit,” RF signal processing, pp. 20-36, 2002.

The Costas loop can have two output streams: stream 1 is the baseband I and Q; stream 2 is the normalized frequency of the loop

Constructor Specific Documentation:

Make a Costas loop carrier recovery block.

Parameters:
  • loop_bw – internal 2nd order loop bandwidth (~ 2pi/100)
  • order – the loop order, either 2, 4, or 8
costas_loop_cc_sptr.active_thread_priority(self) → int
costas_loop_cc_sptr.advance_loop(self, float error)
costas_loop_cc_sptr.frequency_limit(self)
costas_loop_cc_sptr.get_alpha(self) → float
costas_loop_cc_sptr.get_beta(self) → float
costas_loop_cc_sptr.get_damping_factor(self) → float
costas_loop_cc_sptr.get_frequency(self) → float
costas_loop_cc_sptr.get_loop_bandwidth(self) → float
costas_loop_cc_sptr.get_max_freq(self) → float
costas_loop_cc_sptr.get_min_freq(self) → float
costas_loop_cc_sptr.get_phase(self) → float
costas_loop_cc_sptr.phase_wrap(self)
costas_loop_cc_sptr.set_alpha(self, float alpha)
costas_loop_cc_sptr.set_beta(self, float beta)
costas_loop_cc_sptr.set_damping_factor(self, float df)
costas_loop_cc_sptr.set_frequency(self, float freq)
costas_loop_cc_sptr.set_loop_bandwidth(self, float bw)
costas_loop_cc_sptr.set_max_freq(self, float freq)
costas_loop_cc_sptr.set_min_freq(self, float freq)
costas_loop_cc_sptr.set_phase(self, float phase)
costas_loop_cc_sptr.set_thread_priority(self, int priority) → int
costas_loop_cc_sptr.thread_priority(self) → int
costas_loop_cc_sptr.update_gains(self)
gnuradio.digital.cma_equalizer_cc(int num_taps, float modulus, float mu, int sps) → sptr

Implements constant modulus adaptive filter on complex stream.

The error value and tap update equations (for p=2) can be found in:

  1. Godard, “Self-Recovering Equalization and Carrier Tracking
in Two-Dimensional Data Communication Systems,” IEEE Transactions on Communications, Vol. 28, No. 11, pp. 1867 - 1875, 1980.

Constructor Specific Documentation:

Make a CMA Equalizer block

Parameters:
  • num_taps – Numer of taps in the equalizer (channel size)
  • modulus – Modulus of the modulated signals
  • mu – Gain of the update loop
  • sps – Number of samples per symbol of the input signal
cma_equalizer_cc_sptr.active_thread_priority(self) → int
cma_equalizer_cc_sptr.gain(self) → float
cma_equalizer_cc_sptr.modulus(self) → float
cma_equalizer_cc_sptr.set_gain(self, float mu)
cma_equalizer_cc_sptr.set_modulus(self, float mod)
cma_equalizer_cc_sptr.set_taps(self, std::vector<(gr_complex, std::allocator<(gr_complex)>)> taps)
cma_equalizer_cc_sptr.set_thread_priority(self, int priority) → int
cma_equalizer_cc_sptr.taps(self) → std::vector<(gr_complex,std::allocator<(gr_complex)>)>
cma_equalizer_cc_sptr.thread_priority(self) → int
gnuradio.digital.binary_slicer_fb() → sptr

slice float binary symbol outputting 1 bit output

x < 0 –> 0 x >= 0 –> 1

Constructor Specific Documentation:

Make binary symbol slicer block.

binary_slicer_fb_sptr.active_thread_priority(self) → int
binary_slicer_fb_sptr.set_thread_priority(self, int priority) → int
binary_slicer_fb_sptr.thread_priority(self) → int
gnuradio.digital.gmskmod_bc(int samples_per_sym = 2, int L = 4, double beta = 0.3) → sptr

Make GMSK modulator block.

The type is GAUSSIAN and the modulation index for GMSK is 0.5. This are populated automatically by this factory function.

gmskmod_bc_sptr.beta(self) → double

Return the value of beta for the modulator.

gmskmod_bc_sptr.make_gmskmod_bc(self, int samples_per_sym = 2, int L = 4, double beta = 0.3) → sptr

Make GMSK modulator block.

The type is GAUSSIAN and the modulation index for GMSK is 0.5. This are populated automatically by this factory function.

gmskmod_bc_sptr.samples_per_sym(self) → int

Return the number of samples per symbol.

gmskmod_bc_sptr.taps(self) → pmt_vector_float

Return the phase response FIR taps.

gnuradio.digital.probe_mpsk_snr_est_c(snr_est_type_t type, int msg_nsamples = 10000, double alpha = 0.001) → sptr

A probe for computing SNR of a signal.

This is a probe block (a sink) that can be used to monitor and retrieve estimations of the signal SNR. This probe is designed for use with M-PSK signals especially. The type of estimator is specified as the parameter in the constructor. The estimators tend to trade off performance for accuracy, although experimentation should be done to figure out the right approach for a given implementation. Further, the current set of estimators are designed and proven theoretically under AWGN conditions; some amount of error should be assumed and/or estimated for real channel conditions.

Constructor Specific Documentation:

Make an MPSK SNR probe.

Parameters:

Parameters:
  • type – the type of estimator to use see gr::digital::snr_est_type_t for details about the types.
  • msg_nsamples – [not implemented yet] after this many samples, a message containing the SNR (key=’snr’) will be sent
  • alpha – the update rate of internal running average calculations.
probe_mpsk_snr_est_c_sptr.active_thread_priority(self) → int
probe_mpsk_snr_est_c_sptr.alpha(self) → double

Get the running-average coefficient.

probe_mpsk_snr_est_c_sptr.msg_nsample(self) → int

Return how many samples between SNR messages.

probe_mpsk_snr_est_c_sptr.set_alpha(self, double alpha)

Set the running-average coefficient.

probe_mpsk_snr_est_c_sptr.set_msg_nsample(self, int n)

Set the number of samples between SNR messages.

probe_mpsk_snr_est_c_sptr.set_thread_priority(self, int priority) → int
probe_mpsk_snr_est_c_sptr.set_type(self, snr_est_type_t t)

Set type of estimator to use.

probe_mpsk_snr_est_c_sptr.snr(self) → double

Return the estimated signal-to-noise ratio in decibels.

probe_mpsk_snr_est_c_sptr.thread_priority(self) → int
gnuradio.digital.cpmmod_bc(cpm_type type, float h, int samples_per_sym, int L, double beta = 0.3) → sptr

Generic CPM modulator.

Examples:

The input of this block are symbols from an M-ary alphabet +/-1, +/-3, ..., +/-(M-1). Usually, M = 2 and therefore, the valid inputs are +/-1. The modulator will silently accept any other inputs, though. The output is the phase-modulated signal.

Constructor Specific Documentation:

Make CPM modulator block.

Parameters:
  • type – The modulation type. Can be one of LREC, LRC, LSRC, TFM or GAUSSIAN. See gr_cpm::phase_response() for a detailed description.
  • h – The modulation index. is the maximum phase change that can occur between two symbols, i.e., if you only send ones, the phase will increase by every samples. Set this to 0.5 for Minimum Shift Keying variants.
  • samples_per_sym – Samples per symbol.
  • L – The length of the phase duration in symbols. For L=1, this yields full- response CPM symbols, for L > 1, partial-response.
  • beta – For LSRC, this is the rolloff factor. For Gaussian pulses, this is the 3 dB time-bandwidth product.
cpmmod_bc_sptr.beta(self) → double

Return the value of beta for the modulator.

cpmmod_bc_sptr.make_gmskmod_bc(self, int samples_per_sym = 2, int L = 4, double beta = 0.3) → sptr

Make GMSK modulator block.

The type is GAUSSIAN and the modulation index for GMSK is 0.5. This are populated automatically by this factory function.

cpmmod_bc_sptr.samples_per_sym(self) → int

Return the number of samples per symbol.

cpmmod_bc_sptr.taps(self) → pmt_vector_float

Return the phase response FIR taps.

gnuradio.digital.glfsr_source_b(int degree, bool repeat = True, int mask = 0, int seed = 1) → sptr

Galois LFSR pseudo-random source.

Constructor Specific Documentation:

Make a Galois LFSR pseudo-random source block.

Parameters:
  • degree – Degree of shift register must be in [1, 32]. If mask is 0, the degree determines a default mask (see digital_impl_glfsr.cc for the mapping).
  • repeat – Set to repeat sequence.
  • mask – Allows a user-defined bit mask for indexes of the shift register to feed back.
  • seed – Initial setting for values in shift register.
glfsr_source_b_sptr.active_thread_priority(self) → int
glfsr_source_b_sptr.mask(self) → int
glfsr_source_b_sptr.period(self) → unsigned int
glfsr_source_b_sptr.set_thread_priority(self, int priority) → int
glfsr_source_b_sptr.thread_priority(self) → int
gnuradio.digital.glfsr_source_f(int degree, bool repeat = True, int mask = 0, int seed = 1) → sptr

Galois LFSR pseudo-random source generating float outputs -1.0 - 1.0.

Constructor Specific Documentation:

Make a Galois LFSR pseudo-random source block.

Parameters:
  • degree – Degree of shift register must be in [1, 32]. If mask is 0, the degree determines a default mask (see digital_impl_glfsr.cc for the mapping).
  • repeat – Set to repeat sequence.
  • mask – Allows a user-defined bit mask for indexes of the shift register to feed back.
  • seed – Initial setting for values in shift register.
glfsr_source_f_sptr.active_thread_priority(self) → int
glfsr_source_f_sptr.mask(self) → int
glfsr_source_f_sptr.period(self) → unsigned int
glfsr_source_f_sptr.set_thread_priority(self, int priority) → int
glfsr_source_f_sptr.thread_priority(self) → int
gnuradio.digital.framer_sink_1(sptr target_queue) → sptr

Given a stream of bits and access_code flags, assemble packets.

input: stream of bytes from digital_correlate_access_code_bb output: none. Pushes assembled packet into target queue

The framer expects a fixed length header of 2 16-bit shorts containing the payload length, followed by the payload. If the 2 16-bit shorts are not identical, this packet is ignored. Better algs are welcome.

The input data consists of bytes that have two bits used. Bit 0, the LSB, contains the data bit. Bit 1 if set, indicates that the corresponding bit is the the first bit of the packet. That is, this bit is the first one after the access code.

Constructor Specific Documentation:

Make a framer_sink_1 block.

Parameters:target_queue – The message queue where frames go.
framer_sink_1_sptr.active_thread_priority(self) → int
framer_sink_1_sptr.set_thread_priority(self, int priority) → int
framer_sink_1_sptr.thread_priority(self) → int
gnuradio.digital.framer_sink_1(sptr target_queue) → sptr

Given a stream of bits and access_code flags, assemble packets.

input: stream of bytes from digital_correlate_access_code_bb output: none. Pushes assembled packet into target queue

The framer expects a fixed length header of 2 16-bit shorts containing the payload length, followed by the payload. If the 2 16-bit shorts are not identical, this packet is ignored. Better algs are welcome.

The input data consists of bytes that have two bits used. Bit 0, the LSB, contains the data bit. Bit 1 if set, indicates that the corresponding bit is the the first bit of the packet. That is, this bit is the first one after the access code.

Constructor Specific Documentation:

Make a framer_sink_1 block.

Parameters:target_queue – The message queue where frames go.
framer_sink_1_sptr.active_thread_priority(self) → int
framer_sink_1_sptr.set_thread_priority(self, int priority) → int
framer_sink_1_sptr.thread_priority(self) → int
gnuradio.digital.additive_scrambler_bb(int mask, int seed, int len, int count = 0) → sptr

Scramble an input stream using an LFSR.

This block works on the LSB only of the input data stream, i.e., on an “unpacked binary” stream, and produces the same format on its output.

The scrambler works by XORing the incoming bit stream by the output of the LFSR. Optionally, after ‘count’ bits have been processed, the shift register is reset to the seed value. This allows processing fixed length vectors of samples.

Constructor Specific Documentation:

Create additive scrambler.

Parameters:
  • mask – Polynomial mask for LFSR
  • seed – Initial shift register contents
  • len – Shift register length
  • count – Number of bits after which shift register is reset, 0=never
additive_scrambler_bb_sptr.active_thread_priority(self) → int
additive_scrambler_bb_sptr.count(self) → int
additive_scrambler_bb_sptr.len(self) → int
additive_scrambler_bb_sptr.mask(self) → int
additive_scrambler_bb_sptr.seed(self) → int
additive_scrambler_bb_sptr.set_thread_priority(self, int priority) → int
additive_scrambler_bb_sptr.thread_priority(self) → int
gnuradio.digital.descrambler_bb(int mask, int seed, int len) → sptr

Descramber an input stream using an LFSR.

Descramble an input stream using an LFSR. This block works on the LSB only of the input data stream, i.e., on an “unpacked
binary” stream, and produces the same format on its output.

Constructor Specific Documentation:

Make a descrambler block.

Parameters:
  • mask – Polynomial mask for LFSR
  • seed – Initial shift register contents
  • len – Shift register length
descrambler_bb_sptr.active_thread_priority(self) → int
descrambler_bb_sptr.set_thread_priority(self, int priority) → int
descrambler_bb_sptr.thread_priority(self) → int
gnuradio.digital.diff_decoder_bb(unsigned int modulus) → sptr

Differential encoder: y[0] = (x[0] - x[-1]) % M.

Uses current and previous symbols and the alphabet modulus to perform differential decoding.

Constructor Specific Documentation:

Make a differntial decoder block.

Parameters:modulus – Modulus of code’s alphabet
diff_decoder_bb_sptr.active_thread_priority(self) → int
diff_decoder_bb_sptr.set_thread_priority(self, int priority) → int
diff_decoder_bb_sptr.thread_priority(self) → int
gnuradio.digital.diff_encoder_bb(unsigned int modulus) → sptr

Differential decoder: y[0] = (x[0] + y[-1]) % M.

Uses current and previous symbols and the alphabet modulus to perform differential encoding.

Constructor Specific Documentation:

Make a differntial encoder block.

Parameters:modulus – Modulus of code’s alphabet
diff_encoder_bb_sptr.active_thread_priority(self) → int
diff_encoder_bb_sptr.set_thread_priority(self, int priority) → int
diff_encoder_bb_sptr.thread_priority(self) → int
gnuradio.digital.map_bb(__dummy_5__ map) → sptr

output[i] = map[input[i]]

This block maps an incoming signal to the value in the map. The block expects that the incoming signal has a maximum value of len(map)-1.

-> output[i] = map[input[i]]

Constructor Specific Documentation:

Make a map block.

Parameters:map – a vector of integers that maps x to map[x].
map_bb_sptr.active_thread_priority(self) → int
map_bb_sptr.map(self) → __dummy_5__

Apply element-wise to the elements of list and returns a list of the results, in order.

must be a list. The dynamic order in which is applied to the elements of is unspecified.

map_bb_sptr.set_map(self, __dummy_5__ map)
map_bb_sptr.set_thread_priority(self, int priority) → int
map_bb_sptr.thread_priority(self) → int
gnuradio.digital.scrambler_bb(int mask, int seed, int len) → sptr

Scramble an input stream using an LFSR.

This block works on the LSB only of the input data stream, i.e., on an “unpacked binary” stream, and produces the same format on its output.

Constructor Specific Documentation:

Make a scramber block.

Parameters:
  • mask – Polynomial mask for LFSR
  • seed – Initial shift register contents
  • len – Shift register length
scrambler_bb_sptr.active_thread_priority(self) → int
scrambler_bb_sptr.set_thread_priority(self, int priority) → int
scrambler_bb_sptr.thread_priority(self) → int
gnuradio.digital.pn_correlator_cc(int degree, int mask = 0, int seed = 1) → sptr

PN code sequential search correlator.

Receives complex baseband signal, outputs complex correlation against reference PN code, one sample per PN code period. The PN sequence is generated using a GLFSR.

Constructor Specific Documentation:

Make PN code sequential search correlator block.

Parameters:
  • degree – Degree of shift register must be in [1, 32]. If mask is 0, the degree determines a default mask (see digital_impl_glfsr.cc for the mapping).
  • mask – Allows a user-defined bit mask for indexes of the shift register to feed back.
  • seed – Initial setting for values in shift register.
pn_correlator_cc_sptr.active_thread_priority(self) → int
pn_correlator_cc_sptr.set_thread_priority(self, int priority) → int
pn_correlator_cc_sptr.thread_priority(self) → int
gnuradio.digital.simple_framer(int payload_bytesize) → sptr

add sync field, seq number and command field to payload

Takes in enough samples to create a full output frame. The frame is prepended with the GRSF_SYNC (defind in simple_framer_sync.h) and an 8-bit sequence number.

Constructor Specific Documentation:

Make a simple_framer block.

Parameters:payload_bytesize – The size of the payload in bytes.
simple_framer_sptr.active_thread_priority(self) → int
simple_framer_sptr.set_thread_priority(self, int priority) → int
simple_framer_sptr.thread_priority(self) → int
gnuradio.digital.chunks_to_symbols_bc(std::vector<(gr_complex, std::allocator<(gr_complex)>)> symbol_table, int D = 1) → sptr

Map a stream of symbol indexes (unpacked bytes or shorts) to stream of float or complex constellation points in D dimensions (D = 1 by default)

input: stream of unsigned char; output: stream of gr_complex.

out[n D + k] = symbol_table[in[n] D + k], k=0,1,...,D-1

The combination of gr::blocks::packed_to_unpacked_XX followed by digital_chunks_to_symbols_XY handles the general case of mapping from a stream of bytes or shorts into arbitrary float or complex symbols.

Constructor Specific Documentation:

Make a chunks-to-symbols block.

Parameters:
  • symbol_table – list that maps chunks to symbols.
  • D – dimension of table.
chunks_to_symbols_bc_sptr.D(self) → int
chunks_to_symbols_bc_sptr.active_thread_priority(self) → int
chunks_to_symbols_bc_sptr.set_thread_priority(self, int priority) → int
chunks_to_symbols_bc_sptr.symbol_table(self) → std::vector<(gr_complex,std::allocator<(gr_complex)>)>
chunks_to_symbols_bc_sptr.thread_priority(self) → int
gnuradio.digital.chunks_to_symbols_bf(pmt_vector_float symbol_table, int D = 1) → sptr

Map a stream of symbol indexes (unpacked bytes or shorts) to stream of float or complex constellation points in D dimensions (D = 1 by default)

input: stream of unsigned char; output: stream of float.

out[n D + k] = symbol_table[in[n] D + k], k=0,1,...,D-1

The combination of gr::blocks::packed_to_unpacked_XX followed by digital_chunks_to_symbols_XY handles the general case of mapping from a stream of bytes or shorts into arbitrary float or complex symbols.

Constructor Specific Documentation:

Make a chunks-to-symbols block.

Parameters:
  • symbol_table – list that maps chunks to symbols.
  • D – dimension of table.
chunks_to_symbols_bf_sptr.D(self) → int
chunks_to_symbols_bf_sptr.active_thread_priority(self) → int
chunks_to_symbols_bf_sptr.set_thread_priority(self, int priority) → int
chunks_to_symbols_bf_sptr.symbol_table(self) → pmt_vector_float
chunks_to_symbols_bf_sptr.thread_priority(self) → int
gnuradio.digital.chunks_to_symbols_ic(std::vector<(gr_complex, std::allocator<(gr_complex)>)> symbol_table, int D = 1) → sptr

Map a stream of symbol indexes (unpacked bytes or shorts) to stream of float or complex constellation points in D dimensions (D = 1 by default)

input: stream of int; output: stream of gr_complex.

out[n D + k] = symbol_table[in[n] D + k], k=0,1,...,D-1

The combination of gr::blocks::packed_to_unpacked_XX followed by digital_chunks_to_symbols_XY handles the general case of mapping from a stream of bytes or shorts into arbitrary float or complex symbols.

Constructor Specific Documentation:

Make a chunks-to-symbols block.

Parameters:
  • symbol_table – list that maps chunks to symbols.
  • D – dimension of table.
chunks_to_symbols_ic_sptr.D(self) → int
chunks_to_symbols_ic_sptr.active_thread_priority(self) → int
chunks_to_symbols_ic_sptr.set_thread_priority(self, int priority) → int
chunks_to_symbols_ic_sptr.symbol_table(self) → std::vector<(gr_complex,std::allocator<(gr_complex)>)>
chunks_to_symbols_ic_sptr.thread_priority(self) → int
gnuradio.digital.chunks_to_symbols_if(pmt_vector_float symbol_table, int D = 1) → sptr

Map a stream of symbol indexes (unpacked bytes or shorts) to stream of float or complex constellation points in D dimensions (D = 1 by default)

input: stream of int; output: stream of float.

out[n D + k] = symbol_table[in[n] D + k], k=0,1,...,D-1

The combination of gr::blocks::packed_to_unpacked_XX followed by digital_chunks_to_symbols_XY handles the general case of mapping from a stream of bytes or shorts into arbitrary float or complex symbols.

Constructor Specific Documentation:

Make a chunks-to-symbols block.

Parameters:
  • symbol_table – list that maps chunks to symbols.
  • D – dimension of table.
chunks_to_symbols_if_sptr.D(self) → int
chunks_to_symbols_if_sptr.active_thread_priority(self) → int
chunks_to_symbols_if_sptr.set_thread_priority(self, int priority) → int
chunks_to_symbols_if_sptr.symbol_table(self) → pmt_vector_float
chunks_to_symbols_if_sptr.thread_priority(self) → int
gnuradio.digital.chunks_to_symbols_sc(std::vector<(gr_complex, std::allocator<(gr_complex)>)> symbol_table, int D = 1) → sptr

Map a stream of symbol indexes (unpacked bytes or shorts) to stream of float or complex constellation points in D dimensions (D = 1 by default)

input: stream of short; output: stream of gr_complex.

out[n D + k] = symbol_table[in[n] D + k], k=0,1,...,D-1

The combination of gr::blocks::packed_to_unpacked_XX followed by digital_chunks_to_symbols_XY handles the general case of mapping from a stream of bytes or shorts into arbitrary float or complex symbols.

Constructor Specific Documentation:

Make a chunks-to-symbols block.

Parameters:
  • symbol_table – list that maps chunks to symbols.
  • D – dimension of table.
chunks_to_symbols_sc_sptr.D(self) → int
chunks_to_symbols_sc_sptr.active_thread_priority(self) → int
chunks_to_symbols_sc_sptr.set_thread_priority(self, int priority) → int
chunks_to_symbols_sc_sptr.symbol_table(self) → std::vector<(gr_complex,std::allocator<(gr_complex)>)>
chunks_to_symbols_sc_sptr.thread_priority(self) → int
gnuradio.digital.chunks_to_symbols_sf(pmt_vector_float symbol_table, int D = 1) → sptr

Map a stream of symbol indexes (unpacked bytes or shorts) to stream of float or complex constellation points in D dimensions (D = 1 by default)

input: stream of short; output: stream of float.

out[n D + k] = symbol_table[in[n] D + k], k=0,1,...,D-1

The combination of gr::blocks::packed_to_unpacked_XX followed by digital_chunks_to_symbols_XY handles the general case of mapping from a stream of bytes or shorts into arbitrary float or complex symbols.

Constructor Specific Documentation:

Make a chunks-to-symbols block.

Parameters:
  • symbol_table – list that maps chunks to symbols.
  • D – dimension of table.
chunks_to_symbols_sf_sptr.D(self) → int
chunks_to_symbols_sf_sptr.active_thread_priority(self) → int
chunks_to_symbols_sf_sptr.set_thread_priority(self, int priority) → int
chunks_to_symbols_sf_sptr.symbol_table(self) → pmt_vector_float
chunks_to_symbols_sf_sptr.thread_priority(self) → int
class gnuradio.digital.generic_demod(constellation, differential=False, samples_per_symbol=2, pre_diff_code=True, excess_bw=0.35, freq_bw=0.06283185307179587, timing_bw=0.06283185307179587, phase_bw=0.06283185307179587, verbose=False, log=False)

Hierarchical block for RRC-filtered differential generic demodulation.

The input is the complex modulated signal at baseband. The output is a stream of bits packed 1 bit per byte (LSB)

Parameters:
  • constellation – determines the modulation type (gnuradio.digital.digital_constellation)
  • samples_per_symbol – samples per baud >= 2 (float)
  • differential – whether to use differential encoding (boolean)
  • pre_diff_code – whether to use apply a pre-differential mapping (boolean)
  • excess_bw – Root-raised cosine filter excess bandwidth (float)
  • freq_bw – loop filter lock-in bandwidth (float)
  • timing_bw – timing recovery loop lock-in bandwidth (float)
  • phase_bw – phase recovery loop bandwidth (float)
  • verbose – Print information about modulator? (boolean)
  • log – Log modulation data to files? (boolean)
static add_options(parser)

Adds generic demodulation options to the standard parser

classmethod extract_kwargs_from_options(options)

Given command line options, create dictionary suitable for passing to __init__

class gnuradio.digital.generic_mod(constellation, differential=False, samples_per_symbol=2, pre_diff_code=True, excess_bw=0.35, verbose=False, log=False)

Hierarchical block for RRC-filtered differential generic modulation.

The input is a byte stream (unsigned char) and the output is the complex modulated signal at baseband.

Parameters:
  • constellation – determines the modulation type (gnuradio.digital.digital_constellation)
  • samples_per_symbol – samples per baud >= 2 (float)
  • differential – whether to use differential encoding (boolean)
  • pre_diff_code – whether to use apply a pre-differential mapping (boolean)
  • excess_bw – Root-raised cosine filter excess bandwidth (float)
  • verbose – Print information about modulator? (boolean)
  • log – Log modulation data to files? (boolean)
static add_options(parser)

Adds generic modulation options to the standard parser

classmethod extract_kwargs_from_options(options)

Given command line options, create dictionary suitable for passing to __init__

class gnuradio.digital.bpsk.dbpsk_demod(mod_code=None, *args, **kwargs)

Hierarchical block for RRC-filtered DBPSK modulation.

The input is a byte stream (unsigned char) and the output is the complex modulated signal at baseband.

Parameters:
  • mod_code – Argument is not used. It exists purely to simplify generation of the block in grc.
  • samples_per_symbol – samples per baud >= 2 (float)
  • excess_bw – Root-raised cosine filter excess bandwidth (float)
  • freq_bw – loop filter lock-in bandwidth (float)
  • timing_bw – timing recovery loop lock-in bandwidth (float)
  • phase_bw – phase recovery loop bandwidth (float)
  • verbose – Print information about modulator? (boolean)
  • log – Log modulation data to files? (boolean)
class gnuradio.digital.bpsk.dbpsk_mod(mod_code=None, *args, **kwargs)

Hierarchical block for RRC-filtered DBPSK modulation.

The input is a byte stream (unsigned char) and the output is the complex modulated signal at baseband.

Parameters:
  • mod_code – Argument is not used. It exists purely to simplify generation of the block in grc.
  • samples_per_symbol – samples per baud >= 2 (float)
  • excess_bw – Root-raised cosine filter excess bandwidth (float)
  • verbose – Print information about modulator? (boolean)
  • log – Log modulation data to files? (boolean)
class gnuradio.digital.qpsk.dqpsk_demod(mod_code='gray', *args, **kwargs)

Hierarchical block for RRC-filtered DQPSK modulation.

The input is a byte stream (unsigned char) and the output is the complex modulated signal at baseband.

Parameters:
  • mod_code – Whether to use a gray_code (digital.mod_codes.GRAY_CODE) or not (digital.mod_codes.NO_CODE).
  • samples_per_symbol – samples per baud >= 2 (float)
  • excess_bw – Root-raised cosine filter excess bandwidth (float)
  • freq_bw – loop filter lock-in bandwidth (float)
  • timing_bw – timing recovery loop lock-in bandwidth (float)
  • phase_bw – phase recovery loop bandwidth (float)
  • verbose – Print information about modulator? (boolean)
  • log – Log modulation data to files? (boolean)
class gnuradio.digital.qpsk.dqpsk_mod(mod_code='gray', *args, **kwargs)

Hierarchical block for RRC-filtered DQPSK modulation.

The input is a byte stream (unsigned char) and the output is the complex modulated signal at baseband.

Parameters:
  • mod_code – Whether to use a gray_code (digital.mod_codes.GRAY_CODE) or not (digital.mod_codes.NO_CODE).
  • samples_per_symbol – samples per baud >= 2 (float)
  • excess_bw – Root-raised cosine filter excess bandwidth (float)
  • verbose – Print information about modulator? (boolean)
  • log – Log modulation data to files? (boolean)
class gnuradio.digital.gmsk.gmsk_demod(samples_per_symbol=2, gain_mu=None, mu=0.5, omega_relative_limit=0.005, freq_error=0.0, verbose=False, log=False)

Hierarchical block for Gaussian Minimum Shift Key (GMSK) demodulation.

The input is the complex modulated signal at baseband. The output is a stream of bits packed 1 bit per byte (the LSB)

Parameters:
  • samples_per_symbol – samples per baud (integer)
  • verbose – Print information about modulator? (boolean)
  • log – Print modualtion data to files? (boolean)
  • gain_mu – controls rate of mu adjustment (float)
  • mu – fractional delay [0.0, 1.0] (float)
  • omega_relative_limit – sets max variation in omega (float)
  • freq_error – bit rate error as a fraction (float)
static add_options(parser)

Adds GMSK demodulation-specific options to the standard parser

static extract_kwargs_from_options(options)

Given command line options, create dictionary suitable for passing to __init__

class gnuradio.digital.gmsk.gmsk_mod(samples_per_symbol=2, bt=0.35, verbose=False, log=False)

Hierarchical block for Gaussian Minimum Shift Key (GMSK) modulation.

The input is a byte stream (unsigned char) and the output is the complex modulated signal at baseband.

Parameters:
  • samples_per_symbol – samples per baud >= 2 (integer)
  • bt – Gaussian filter bandwidth * symbol time (float)
  • verbose – Print information about modulator? (boolean)
  • debug – Print modulation data to files? (boolean)
static add_options(parser)

Adds GMSK modulation-specific options to the standard parser

static extract_kwargs_from_options(options)

Given command line options, create dictionary suitable for passing to __init__

class gnuradio.digital.bpsk.bpsk_demod(mod_code=None, differential=False, *args, **kwargs)

Hierarchical block for RRC-filtered BPSK modulation.

The input is a byte stream (unsigned char) and the output is the complex modulated signal at baseband.

Parameters:
  • mod_code – Argument is not used. It exists purely to simplify generation of the block in grc.
  • differential – whether to use differential encoding (boolean)
  • samples_per_symbol – samples per baud >= 2 (float)
  • excess_bw – Root-raised cosine filter excess bandwidth (float)
  • freq_bw – loop filter lock-in bandwidth (float)
  • timing_bw – timing recovery loop lock-in bandwidth (float)
  • phase_bw – phase recovery loop bandwidth (float)
  • verbose – Print information about modulator? (boolean)
  • log – Log modulation data to files? (boolean)
class gnuradio.digital.bpsk.bpsk_mod(mod_code=None, differential=False, *args, **kwargs)

Hierarchical block for RRC-filtered BPSK modulation.

The input is a byte stream (unsigned char) and the output is the complex modulated signal at baseband.

Parameters:
  • mod_code – Argument is not used. It exists purely to simplify generation of the block in grc.
  • differential – Whether to use differential encoding (boolean).
  • samples_per_symbol – samples per baud >= 2 (float)
  • excess_bw – Root-raised cosine filter excess bandwidth (float)
  • verbose – Print information about modulator? (boolean)
  • log – Log modulation data to files? (boolean)
class gnuradio.digital.psk.psk_demod(constellation_points=4, mod_code='gray', differential=True, *args, **kwargs)

Hierarchical block for RRC-filtered PSK modulation.

The input is a byte stream (unsigned char) and the output is the complex modulated signal at baseband.

Parameters:
  • constellation_points – Number of constellation points (must be a power of two) (integer).
  • mod_code – Whether to use a gray_code (digital.mod_codes.GRAY_CODE) or not (digital.mod_codes.NO_CODE).
  • differential – Whether to use differential encoding (boolean).
  • samples_per_symbol – samples per baud >= 2 (float)
  • excess_bw – Root-raised cosine filter excess bandwidth (float)
  • verbose – Print information about modulator? (boolean)
  • log – Log modulation data to files? (boolean)
class gnuradio.digital.psk.psk_mod(constellation_points=4, mod_code='gray', differential=True, *args, **kwargs)

Hierarchical block for RRC-filtered PSK modulation.

The input is a byte stream (unsigned char) and the output is the complex modulated signal at baseband.

Parameters:
  • constellation_points – Number of constellation points (must be a power of two) (integer).
  • mod_code – Whether to use a gray_code (digital.mod_codes.GRAY_CODE) or not (digital.mod_codes.NO_CODE).
  • differential – Whether to use differential encoding (boolean).
  • samples_per_symbol – samples per baud >= 2 (float)
  • excess_bw – Root-raised cosine filter excess bandwidth (float)
  • verbose – Print information about modulator? (boolean)
  • log – Log modulation data to files? (boolean)
class gnuradio.digital.qam.qam_demod(constellation_points=16, differential=True, mod_code='none', large_ampls_to_corner=False, *args, **kwargs)

Hierarchical block for RRC-filtered QAM modulation.

The input is a byte stream (unsigned char) and the output is the complex modulated signal at baseband.

Parameters:
  • constellation_points – Number of constellation points (must be a power of four) (integer).
  • mod_code – Whether to use a gray_code (digital.mod_codes.GRAY_CODE) or not (digital.mod_codes.NO_CODE).
  • differential – Whether to use differential encoding (boolean).
  • samples_per_symbol – samples per baud >= 2 (float)
  • excess_bw – Root-raised cosine filter excess bandwidth (float)
  • verbose – Print information about modulator? (boolean)
  • log – Log modulation data to files? (boolean)
class gnuradio.digital.qam.qam_mod(constellation_points=16, differential=True, mod_code='none', *args, **kwargs)

Hierarchical block for RRC-filtered QAM modulation.

The input is a byte stream (unsigned char) and the output is the complex modulated signal at baseband.

Parameters:
  • constellation_points – Number of constellation points (must be a power of four) (integer).
  • mod_code – Whether to use a gray_code (digital.mod_codes.GRAY_CODE) or not (digital.mod_codes.NO_CODE).
  • differential – Whether to use differential encoding (boolean).
  • samples_per_symbol – samples per baud >= 2 (float)
  • excess_bw – Root-raised cosine filter excess bandwidth (float)
  • verbose – Print information about modulator? (boolean)
  • log – Log modulation data to files? (boolean)
class gnuradio.digital.qpsk.qpsk_demod(mod_code='gray', differential=False, *args, **kwargs)

Hierarchical block for RRC-filtered QPSK modulation.

The input is a byte stream (unsigned char) and the output is the complex modulated signal at baseband.

Parameters:
  • mod_code – Whether to use a gray_code (digital.mod_codes.GRAY_CODE) or not (digital.mod_codes.NO_CODE).
  • differential – Whether to use differential encoding (boolean).
  • samples_per_symbol – samples per baud >= 2 (float)
  • excess_bw – Root-raised cosine filter excess bandwidth (float)
  • freq_bw – loop filter lock-in bandwidth (float)
  • timing_bw – timing recovery loop lock-in bandwidth (float)
  • phase_bw – phase recovery loop bandwidth (float)
  • verbose – Print information about modulator? (boolean)
  • log – Log modulation data to files? (boolean)
class gnuradio.digital.qpsk.qpsk_mod(mod_code='gray', differential=False, *args, **kwargs)

Hierarchical block for RRC-filtered QPSK modulation.

The input is a byte stream (unsigned char) and the output is the complex modulated signal at baseband.

Parameters:
  • mod_code – Whether to use a gray_code (digital.mod_codes.GRAY_CODE) or not (digital.mod_codes.NO_CODE).
  • differential – Whether to use differential encoding (boolean).
  • samples_per_symbol – samples per baud >= 2 (float)
  • excess_bw – Root-raised cosine filter excess bandwidth (float)
  • verbose – Print information about modulator? (boolean)
  • log – Log modulation data to files? (boolean)
class gnuradio.digital.cpm.cpm_mod(samples_per_symbol=2, bits_per_symbol=1, h_numerator=1, h_denominator=2, cpm_type=0, bt=0.35, symbols_per_pulse=1, generic_taps=array([ 6.89927770e-310]), verbose=False, log=False)

Hierarchical block for Continuous Phase modulation.

The input is a byte stream (unsigned char) representing packed bits and the output is the complex modulated signal at baseband.

See Proakis for definition of generic CPM signals: s(t)=exp(j phi(t)) phi(t)= 2 pi h int_0^t f(t’) dt’ f(t)=sum_k a_k g(t-kT) (normalizing assumption: int_0^infty g(t) dt = 1/2)

Parameters:
  • samples_per_symbol – samples per baud >= 2 (integer)
  • bits_per_symbol – bits per symbol (integer)
  • h_numerator – numerator of modulation index (integer)
  • h_denominator – denominator of modulation index (numerator and denominator must be relative primes) (integer)
  • cpm_type – supported types are: 0=CPFSK, 1=GMSK, 2=RC, 3=GENERAL (integer)
  • bt – bandwidth symbol time product for GMSK (float)
  • symbols_per_pulse – shaping pulse duration in symbols (integer)
  • generic_taps – define a generic CPM pulse shape (sum = samples_per_symbol/2) (list/array of floats)
  • verbose – Print information about modulator? (boolean)
  • debug – Print modulation data to files? (boolean)
static add_options(parser)

Adds CPM modulation-specific options to the standard parser

static extract_kwargs_from_options(options)

Given command line options, create dictionary suitable for passing to __init__

class gnuradio.digital.pkt.mod_pkts(modulator, access_code=None, msgq_limit=2, pad_for_usrp=True, use_whitener_offset=False, modulate=True)

Wrap an arbitrary digital modulator in our packet handling framework.

Send packets by calling send_pkt

send_pkt(payload='', eof=False)

Send the payload.

Parameters:payload – data to send (string)
class gnuradio.digital.pkt.demod_pkts(demodulator, access_code=None, callback=None, threshold=-1)

Wrap an arbitrary digital demodulator in our packet handling framework.

The input is complex baseband. When packets are demodulated, they are passed to the app via the callback.

gnuradio.digital.ofdm_cyclic_prefixer

alias of make

gnuradio.digital.ofdm_frame_acquisition

alias of make

gnuradio.digital.ofdm_frame_sink

alias of make

gnuradio.digital.ofdm_insert_preamble

alias of make

gnuradio.digital.ofdm_mapper_bcv

alias of make

class gnuradio.digital.ofdm_mod(options, msgq_limit=2, pad_for_usrp=True)

Modulates an OFDM stream. Based on the options fft_length, occupied_tones, and cp_length, this block creates OFDM symbols using a specified modulation option.

Send packets by calling send_pkt

static add_options(normal, expert)

Adds OFDM-specific options to the Options Parser

send_pkt(payload='', eof=False)

Send the payload.

Parameters:payload – data to send (string)
class gnuradio.digital.ofdm_demod(options, callback=None)

Demodulates a received OFDM stream. Based on the options fft_length, occupied_tones, and cp_length, this block performs synchronization, FFT, and demodulation of incoming OFDM symbols and passes packets up the a higher layer.

The input is complex baseband. When packets are demodulated, they are passed to the app via the callback.

static add_options(normal, expert)

Adds OFDM-specific options to the Options Parser

class gnuradio.digital.ofdm_receiver(fft_length, cp_length, occupied_tones, snr, ks, logging=False)

Performs receiver synchronization on OFDM symbols.

The receiver performs channel filtering as well as symbol, frequency, and phase synchronization. The synchronization routines are available in three flavors: preamble correlator (Schmidl and Cox), modifid preamble correlator with autocorrelation (not yet working), and cyclic prefix correlator (Van de Beeks).

gnuradio.digital.ofdm_sampler

alias of make

class gnuradio.digital.ofdm_sync_fixed(fft_length, cp_length, nsymbols, freq_offset, logging=False)
class gnuradio.digital.ofdm_sync_ml(fft_length, cp_length, snr, kstime, logging)
class gnuradio.digital.ofdm_sync_pn(fft_length, cp_length, logging=False)
class gnuradio.digital.ofdm_sync_pnac(fft_length, cp_length, kstime, logging=False)

Previous topic

gnuradio.atsc: Signal Processing Blocks

Next topic

gnuradio.digital: Constellations

This Page