gnuradio.digital: Signal Processing Blocks

gnuradio.digital.fll_band_edge_cc(float samps_per_sym, float rolloff, int filter_size, float bandwidth) → digital_fll_band_edge_cc_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.

Build the FLL

digital_fll_band_edge_cc_sptr.advance_loop(self, float error)
digital_fll_band_edge_cc_sptr.frequency_limit(self)
digital_fll_band_edge_cc_sptr.get_alpha(self) → float
digital_fll_band_edge_cc_sptr.get_beta(self) → float
digital_fll_band_edge_cc_sptr.get_damping_factor(self) → float
digital_fll_band_edge_cc_sptr.get_filter_size(self) → int

Returns the number of taps of the filter.

digital_fll_band_edge_cc_sptr.get_frequency(self) → float
digital_fll_band_edge_cc_sptr.get_loop_bandwidth(self) → float
digital_fll_band_edge_cc_sptr.get_phase(self) → float
digital_fll_band_edge_cc_sptr.get_rolloff(self) → float

Returns the rolloff factor used for the filter.

digital_fll_band_edge_cc_sptr.get_samples_per_symbol(self) → float

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

digital_fll_band_edge_cc_sptr.phase_wrap(self)
digital_fll_band_edge_cc_sptr.print_taps(self)

Print the taps to screen.

digital_fll_band_edge_cc_sptr.set_alpha(self, float alpha)
digital_fll_band_edge_cc_sptr.set_beta(self, float beta)
digital_fll_band_edge_cc_sptr.set_damping_factor(self, float df)
digital_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.

digital_fll_band_edge_cc_sptr.set_frequency(self, float freq)
digital_fll_band_edge_cc_sptr.set_loop_bandwidth(self, float bw)
digital_fll_band_edge_cc_sptr.set_phase(self, float phase)
digital_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).

digital_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.

digital_fll_band_edge_cc_sptr.update_gains(self)
gnuradio.digital.kurtotic_equalizer_cc(int num_taps, float mu) → digital_kurtotic_equalizer_cc_sptr

Implements a kurtosis-based adaptive equalizer on complex stream

“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.”.
digital_kurtotic_equalizer_cc_sptr.set_gain(self, float mu)
digital_kurtotic_equalizer_cc_sptr.set_taps(self, gr_complex_vector taps)
gnuradio.digital.lms_dd_equalizer_cc(int num_taps, float mu, int sps, digital_constellation_sptr cnst) → digital_lms_dd_equalizer_cc_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 teh 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.

digital_lms_dd_equalizer_cc_sptr.get_gain(self) → float
digital_lms_dd_equalizer_cc_sptr.set_gain(self, float mu)
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) → digital_mpsk_receiver_cc_sptr

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

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.

digital_mpsk_receiver_cc_sptr.advance_loop(self, float error)
digital_mpsk_receiver_cc_sptr.frequency_limit(self)
digital_mpsk_receiver_cc_sptr.gain_mu(self) → float

Returns mu gain factor.

digital_mpsk_receiver_cc_sptr.gain_omega(self) → float

Returns omega gain factor.

digital_mpsk_receiver_cc_sptr.gain_omega_rel(self) → float

Returns the relative omega limit.

digital_mpsk_receiver_cc_sptr.get_alpha(self) → float
digital_mpsk_receiver_cc_sptr.get_beta(self) → float
digital_mpsk_receiver_cc_sptr.get_damping_factor(self) → float
digital_mpsk_receiver_cc_sptr.get_frequency(self) → float
digital_mpsk_receiver_cc_sptr.get_loop_bandwidth(self) → float
digital_mpsk_receiver_cc_sptr.get_phase(self) → float
digital_mpsk_receiver_cc_sptr.modulation_order(self) → float

Returns the modulation order (M) currently set.

digital_mpsk_receiver_cc_sptr.mu(self) → float

Returns current value of mu.

digital_mpsk_receiver_cc_sptr.omega(self) → float

Returns current value of omega.

digital_mpsk_receiver_cc_sptr.phase_wrap(self)
digital_mpsk_receiver_cc_sptr.set_alpha(self, float alpha)
digital_mpsk_receiver_cc_sptr.set_beta(self, float beta)
digital_mpsk_receiver_cc_sptr.set_damping_factor(self, float df)
digital_mpsk_receiver_cc_sptr.set_frequency(self, float freq)
digital_mpsk_receiver_cc_sptr.set_gain_mu(self, float gain_mu)

Sets value for mu gain factor.

digital_mpsk_receiver_cc_sptr.set_gain_omega(self, float gain_omega)

Sets value for omega gain factor.

digital_mpsk_receiver_cc_sptr.set_gain_omega_rel(self, float omega_rel)

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

digital_mpsk_receiver_cc_sptr.set_loop_bandwidth(self, float bw)
digital_mpsk_receiver_cc_sptr.set_modulation_order(self, unsigned int M)

Sets the modulation order (M) currently.

digital_mpsk_receiver_cc_sptr.set_mu(self, float mu)

Sets value of mu.

digital_mpsk_receiver_cc_sptr.set_omega(self, float omega)

Sets value of omega and its min and max values.

digital_mpsk_receiver_cc_sptr.set_phase(self, float phase)
digital_mpsk_receiver_cc_sptr.set_theta(self, float theta)

Sets value of theta.

digital_mpsk_receiver_cc_sptr.update_gains(self)
gnuradio.digital.mpsk_snr_est_cc(snr_est_type_t type, int tag_nsamples = 10000, double alpha = 0.001) → digital_mpsk_snr_est_cc_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.

Factory function returning shared pointer of this class

Parameters:

digital_mpsk_snr_est_cc_sptr.alpha(self) → double

Get the running-average coefficient.

digital_mpsk_snr_est_cc_sptr.set_alpha(self, double alpha)

Set the running-average coefficient.

digital_mpsk_snr_est_cc_sptr.set_tag_nsample(self, int n)

Set the number of samples between SNR tags.

digital_mpsk_snr_est_cc_sptr.set_type(self, snr_est_type_t t)

Set type of estimator to use.

digital_mpsk_snr_est_cc_sptr.snr(self) → double

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

digital_mpsk_snr_est_cc_sptr.tag_nsample(self) → int

Return how many samples between SNR tags.

digital_mpsk_snr_est_cc_sptr.type(self) → snr_est_type_t

Return the type of estimator in use.

gnuradio.digital.clock_recovery_mm_cc(float omega, float gain_omega, float mu, float gain_mu, float omega_relative_limit) → digital_clock_recovery_mm_cc_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 Based: 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.
digital_clock_recovery_mm_cc_sptr.gain_mu(self) → float
digital_clock_recovery_mm_cc_sptr.gain_omega(self) → float
digital_clock_recovery_mm_cc_sptr.mu(self) → float
digital_clock_recovery_mm_cc_sptr.omega(self) → float
digital_clock_recovery_mm_cc_sptr.set_gain_mu(self, float gain_mu)
digital_clock_recovery_mm_cc_sptr.set_gain_omega(self, float gain_omega)
digital_clock_recovery_mm_cc_sptr.set_mu(self, float omega)
digital_clock_recovery_mm_cc_sptr.set_omega(self, float omega)
digital_clock_recovery_mm_cc_sptr.set_verbose(self, bool verbose)
gnuradio.digital.clock_recovery_mm_ff(float omega, float gain_omega, float mu, float gain_mu, float omega_relative_limit = 0.001) → digital_clock_recovery_mm_ff_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.
digital_clock_recovery_mm_ff_sptr.gain_mu(self) → float
digital_clock_recovery_mm_ff_sptr.gain_omega(self) → float
digital_clock_recovery_mm_ff_sptr.mu(self) → float
digital_clock_recovery_mm_ff_sptr.omega(self) → float
digital_clock_recovery_mm_ff_sptr.set_gain_mu(self, float gain_mu)
digital_clock_recovery_mm_ff_sptr.set_gain_omega(self, float gain_omega)
digital_clock_recovery_mm_ff_sptr.set_mu(self, float omega)
digital_clock_recovery_mm_ff_sptr.set_omega(self, float omega)
gnuradio.digital.constellation_decoder_cb(digital_constellation_sptr constellation) → digital_constellation_decoder_cb_sptr

Constellation Decoder.

gnuradio.digital.constellation_receiver_cb(digital_constellation_sptr constellation, float loop_bw, float fmin, float fmax) → digital_constellation_receiver_cb_sptr

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

This block takes care of receiving generic modulated signals through phase, frequency, and symbol synchronization. It performs carrier frequency and phase locking as well as symbol timing recovery.

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.

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.

digital_constellation_receiver_cb_sptr.advance_loop(self, float error)
digital_constellation_receiver_cb_sptr.frequency_limit(self)
digital_constellation_receiver_cb_sptr.get_alpha(self) → float
digital_constellation_receiver_cb_sptr.get_beta(self) → float
digital_constellation_receiver_cb_sptr.get_damping_factor(self) → float
digital_constellation_receiver_cb_sptr.get_frequency(self) → float
digital_constellation_receiver_cb_sptr.get_loop_bandwidth(self) → float
digital_constellation_receiver_cb_sptr.get_phase(self) → float
digital_constellation_receiver_cb_sptr.phase_wrap(self)
digital_constellation_receiver_cb_sptr.set_alpha(self, float alpha)
digital_constellation_receiver_cb_sptr.set_beta(self, float beta)
digital_constellation_receiver_cb_sptr.set_damping_factor(self, float df)
digital_constellation_receiver_cb_sptr.set_frequency(self, float freq)
digital_constellation_receiver_cb_sptr.set_loop_bandwidth(self, float bw)
digital_constellation_receiver_cb_sptr.set_phase(self, float phase)
digital_constellation_receiver_cb_sptr.update_gains(self)
gnuradio.digital.correlate_access_code_bb(string access_code, int threshold) → digital_correlate_access_code_bb_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.

digital_correlate_access_code_bb_sptr.set_access_code(self, string access_code) → bool
gnuradio.digital.costas_loop_cc(float loop_bw, int order) → digital_costas_loop_cc_sptr

Carrier tracking PLL for QPSK

input: complex; output: complex 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.

must be 2, 4, or 8.

digital_costas_loop_cc_sptr.advance_loop(self, float error)
digital_costas_loop_cc_sptr.frequency_limit(self)
digital_costas_loop_cc_sptr.get_alpha(self) → float
digital_costas_loop_cc_sptr.get_beta(self) → float
digital_costas_loop_cc_sptr.get_damping_factor(self) → float
digital_costas_loop_cc_sptr.get_frequency(self) → float
digital_costas_loop_cc_sptr.get_loop_bandwidth(self) → float
digital_costas_loop_cc_sptr.get_phase(self) → float
digital_costas_loop_cc_sptr.phase_wrap(self)
digital_costas_loop_cc_sptr.set_alpha(self, float alpha)
digital_costas_loop_cc_sptr.set_beta(self, float beta)
digital_costas_loop_cc_sptr.set_damping_factor(self, float df)
digital_costas_loop_cc_sptr.set_frequency(self, float freq)
digital_costas_loop_cc_sptr.set_loop_bandwidth(self, float bw)
digital_costas_loop_cc_sptr.set_phase(self, float phase)
digital_costas_loop_cc_sptr.update_gains(self)
gnuradio.digital.cma_equalizer_cc(int num_taps, float modulus, float mu, int sps) → digital_cma_equalizer_cc_sptr

Implements constant modulus adaptive filter on complex stream

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

“D. 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.”
digital_cma_equalizer_cc_sptr.get_gain(self) → float
digital_cma_equalizer_cc_sptr.get_modulus(self) → float
digital_cma_equalizer_cc_sptr.set_gain(self, float mu)
digital_cma_equalizer_cc_sptr.set_modulus(self, float mod)
digital_cma_equalizer_cc_sptr.set_taps(self, gr_complex_vector taps)
gnuradio.digital.binary_slicer_fb() → digital_binary_slicer_fb_sptr

slice float binary symbol outputting 1 bit output

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

gnuradio.digital.gmskmod_bc(unsigned int samples_per_sym = 2, double bt = 0.3, unsigned int L = 4) → digital_gmskmod_bc_sptr

GMSK modulator.

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.

Parameters:
  • samples_per_sym – Samples per symbol.
  • bt – The 3 dB time-bandwidth product.
  • L – The length of the phase duration in symbols. The Gaussian pulse is truncated after L symbols.
digital_gmskmod_bc_sptr.disconnect_all(self)
digital_gmskmod_bc_sptr.get_taps(self) → __dummy_4__
digital_gmskmod_bc_sptr.lock(self)
digital_gmskmod_bc_sptr.primitive_connect(self, gr_basic_block_sptr block)
primitive_connect(self, gr_basic_block_sptr src, int src_port, gr_basic_block_sptr dst, int dst_port)
digital_gmskmod_bc_sptr.primitive_disconnect(self, gr_basic_block_sptr block)
primitive_disconnect(self, gr_basic_block_sptr src, int src_port, gr_basic_block_sptr dst, int dst_port)
digital_gmskmod_bc_sptr.to_hier_block2(self) → gr_hier_block2_sptr
digital_gmskmod_bc_sptr.unlock(self)
gnuradio.digital.probe_mpsk_snr_est_c(snr_est_type_t type, int msg_nsamples = 10000, double alpha = 0.001) → digital_probe_mpsk_snr_est_c_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.

Factory function returning shared pointer of this class

Parameters:

digital_probe_mpsk_snr_est_c_sptr.alpha(self) → double

Get the running-average coefficient.

digital_probe_mpsk_snr_est_c_sptr.msg_nsample(self) → int

Return how many samples between SNR messages.

digital_probe_mpsk_snr_est_c_sptr.set_alpha(self, double alpha)

Set the running-average coefficient.

digital_probe_mpsk_snr_est_c_sptr.set_msg_nsample(self, int n)

Set the number of samples between SNR messages.

digital_probe_mpsk_snr_est_c_sptr.set_type(self, snr_est_type_t t)

Set type of estimator to use.

digital_probe_mpsk_snr_est_c_sptr.snr(self) → double

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

digital_probe_mpsk_snr_est_c_sptr.type(self) → snr_est_type_t

Return the type of estimator in use.

gnuradio.digital.cpmmod_bc(int type, float h, unsigned int samples_per_sym, unsigned int L, double beta = 0.3) → digital_cpmmod_bc_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.

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.
digital_cpmmod_bc_sptr.disconnect_all(self)
digital_cpmmod_bc_sptr.get_taps(self) → __dummy_4__

Return the phase response FIR taps.

digital_cpmmod_bc_sptr.lock(self)
digital_cpmmod_bc_sptr.primitive_connect(self, gr_basic_block_sptr block)
primitive_connect(self, gr_basic_block_sptr src, int src_port, gr_basic_block_sptr dst, int dst_port)
digital_cpmmod_bc_sptr.primitive_disconnect(self, gr_basic_block_sptr block)
primitive_disconnect(self, gr_basic_block_sptr src, int src_port, gr_basic_block_sptr dst, int dst_port)
digital_cpmmod_bc_sptr.to_hier_block2(self) → gr_hier_block2_sptr
digital_cpmmod_bc_sptr.unlock(self)
class gnuradio.digital.generic_demod(constellation, samples_per_symbol=2, differential=False, excess_bw=0.35, gray_coded=True, freq_bw=0.06283185307179587, timing_bw=0.06283185307179587, phase_bw=0.06283185307179587, verbose=False, log=False)
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, samples_per_symbol=2, differential=False, excess_bw=0.35, gray_coded=True, verbose=False, log=False)
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(constellation_points=2, differential=True, *args, **kwargs)
class gnuradio.digital.bpsk.dbpsk_mod(constellation_points=2, differential=True, *args, **kwargs)
class gnuradio.digital.qpsk.dqpsk_demod(constellation_points=4, differential=True, *args, **kwargs)
class gnuradio.digital.qpsk.dqpsk_mod(constellation_points=4, gray_coded=True, differential=True, *args, **kwargs)
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)
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)
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(constellation_points=2, differential=False, *args, **kwargs)
class gnuradio.digital.bpsk.bpsk_mod(constellation_points=2, differential=False, *args, **kwargs)
class gnuradio.digital.psk.psk_demod(constellation_points=4, mod_code='gray', *args, **kwargs)
class gnuradio.digital.psk.psk_mod(constellation_points=4, mod_code='gray', *args, **kwargs)
class gnuradio.digital.qam.qam_demod(constellation_points=16, differential=True, mod_code='none', *args, **kwargs)
class gnuradio.digital.qam.qam_mod(constellation_points=16, differential=True, mod_code='none', *args, **kwargs)
class gnuradio.digital.qpsk.qpsk_demod(constellation_points=4, *args, **kwargs)
class gnuradio.digital.qpsk.qpsk_mod(constellation_points=4, gray_coded=True, *args, **kwargs)
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.93043661e-310]), verbose=False, log=False)
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.

@param payload: data to send @type payload: 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.

class gnuradio.digital.ofdm_cyclic_prefixer(size_t input_size, size_t output_size) → digital_ofdm_cyclic_prefixer_sptr

adds a cyclic prefix vector to an input size long ofdm symbol(vector) and converts vector to a stream output_size long.

class gnuradio.digital.ofdm_frame_acquisition(unsigned int occupied_carriers, unsigned int fft_length, unsigned int cplen, gr_complex_vector known_symbol, unsigned int max_fft_shift_len = 4) → digital_ofdm_frame_acquisition_sptr

take a vector of complex constellation points in from an FFT and performs a correlation and equalization.

This block takes the output of an FFT of a received OFDM symbol and finds the start of a frame based on two known symbols. It also looks at the surrounding bins in the FFT output for the correlation in case there is a large frequency shift in the data. This block assumes that the fine frequency shift has already been corrected and that the samples fall in the middle of one FFT bin.

It then uses one of those known symbols to estimate the channel response over all subcarriers and does a simple 1-tap equalization on all subcarriers. This corrects for the phase and amplitude distortion caused by the channel.

class gnuradio.digital.ofdm_frame_sink(gr_complex_vector sym_position, __dummy_0__ sym_value_out, gr_msg_queue_sptr target_queue, unsigned int occupied_tones, float phase_gain = 0.25, float freq_gain = 0.25*0.25/4) → digital_ofdm_frame_sink_sptr

Takes an OFDM symbol in, demaps it into bits of 0’s and 1’s, packs them into packets, and sends to to a message queue sink.

NOTE: The mod input parameter simply chooses a pre-defined demapper/slicer. Eventually, we want to be able to pass in a reference to an object to do the demapping and slicing for a given modulation type.

class gnuradio.digital.ofdm_insert_preamble(int fft_length, std::vector<(std::vector<(gr_complex, std::allocator<(gr_complex)>)>, std::allocator<(std::vector<(gr_complex, std::allocator<(gr_complex)>)>)>)> preamble) → digital_ofdm_insert_preamble_sptr

insert “pre-modulated” preamble symbols before each payload.

Parameters:
  • fft_length – length of each symbol in samples.
  • preamble – vector of symbols that represent the pre-modulated preamble.
class gnuradio.digital.ofdm_mapper_bcv(gr_complex_vector constellation, unsigned int msgq_limit, unsigned int bits_per_symbol, unsigned int fft_length) → digital_ofdm_mapper_bcv_sptr

take a stream of bytes in and map to a vector of complex constellation points suitable for IFFT input to be used in an ofdm modulator. Abstract class must be subclassed with specific mapping.

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.

@param payload: data to send @type payload: 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).

class gnuradio.digital.ofdm_sampler(unsigned int fft_length, unsigned int symbol_length, unsigned int timeout = 1000) → digital_ofdm_sampler_sptr

does the rest of the OFDM stuff

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.blks2: Utility Functions

Next topic

gnuradio.digital: Constellations

This Page