API reference#
Every name is importable from the package: import comnum; comnum.awgn_ebn0(...).
The formulas, the conventions of OptiCommPy that a function follows and its
deviations are in its page.
One vocabulary runs through the package: fs is a sampling rate (Hz), fc_hz a
carrier, noise_var a noise variance E|w|², ebn0_db and esn0_db the SNRs
per bit and per symbol, MIMO matrices are (n_rx, n_tx); the tuning parameters are
keyword-only; the functions return NumPy arrays; the closed forms (theory_*,
qfunc(), db2lin()…) take a scalar (and return a float) or an array-like
(and return an array). The package is typed: comnum/_comnum.pyi describes the
extension.
The names are grouped by theme, in the order of a link: the foundations, coding, waveforms, MIMO, the channels (wireless and optical), the hardware, the receiver, the metrics, the standards and the simulation. The same themes order the gallery, the maturity table and the comparisons with the literature.
Foundations#
Random numbers, decibels, sources, constellations and the closed forms of their error and information rates.
Random numbers and conversions#
Every function that draws takes a Rng; the conversions use the power ratio
convention (10 log10).
|
A seeded random generator (xoshiro256** seeded through SplitMix64). |
|
Convert decibels to a linear ratio, |
|
Convert a linear ratio to decibels, |
|
Convert a power in dBm to watts, |
|
Convert a power in watts to dBm, |
|
The Gaussian tail function |
|
The Bessel function |
|
The entropy |
Sources#
|
Independent fair bits. |
|
A maximal-length pseudo-random binary sequence (ITU-T O.150 polynomials). |
|
A pseudo-random test sequence of ITU-T O.150 (05/96), Sec. |
|
Random symbols and their indices. |
|
Maxwell–Boltzmann probabilities |
Constellations#
|
A constellation with Gray labels: point |
|
The reflected binary Gray code of |
|
Differential M-PSK (DBPSK, DQPSK, D8PSK, …) with Gray-labelled phase transitions. |
Error rates in closed form#
On scalars or arrays.
|
Theoretical BER over AWGN with Gray mapping (OptiCommPy |
|
Theoretical SER over AWGN (exact for square QAM and PAM, a tight bound for PSK). |
|
Theoretical SER over AWGN as a function of |
|
Exact BER of Gray-mapped PAM, square QAM or rectangular QAM over AWGN (K. |
|
BER of BPSK (or Gray QPSK, per bit) with maximal-ratio combining of |
|
Bit error rate of Gray-labelled M-DPSK over AWGN. |
|
The probability that the phase angle between two vectors of the same SNR perturbed by independent Gaussian noise exceeds |
|
Density of the phase error of a carrier in circular Gaussian noise (S. |
|
The bit error rate over flat Rayleigh fading of a receiver that equalises with a channel estimate jointly Gaussian with the channel, of correlations |
|
The bit error rate of DBPSK ( |
Information rates and capacity#
The mutual information of constellations over AWGN or Rayleigh fading, the capacities and cutoff rates of coded modulation and BICM.
|
Mutual information of a constellation over AWGN (OptiCommPy |
|
Generalised mutual information of a Gray-labelled constellation over AWGN (OptiCommPy |
|
The CM capacity (bits per channel use) of a constellation with uniform inputs over AWGN or Rayleigh fading known at the receiver (Caire, Taricco & Biglieri 1998, eq. |
|
The BICM capacity (bits per channel use) of a labelled constellation with uniform inputs (Caire, Taricco & Biglieri 1998, eq. |
|
The CM cutoff rate (bits per channel use) with uniform inputs, in closed form (Caire, Taricco & Biglieri 1998, eq. |
|
The BICM cutoff rate (bits per channel use) of a labelled constellation, |
Coding and shaping#
Codes encode bits into bits and decode LLRs (positive for a 0) into bits, whole blocks
at a time (encode, decode); the algebraic codes also decode one word of hard
decisions (decode_bits).
Codes#
|
A cyclic redundancy check of 5G NR (3GPP TS 38.212, Sec. |
|
The Gold scrambler of 3GPP (TS 38.211, Sec. |
A permutation of the positions of a block: |
|
|
A terminated rate-1/n convolutional code on blocks of |
|
The turbo code of LTE: two (13, 15) recursive systematic codes in parallel, rate about 1/3, decoded by iterative log-MAP (Berrou, Glavieux & Thitimajshima 1993). |
|
An LDPC code: |
|
A polar code of length |
|
A Reed–Solomon code over GF(2^m) (symbols of |
|
A binary BCH code of GF(2^m), narrow sense, of designed distance |
|
The LDPC code of the data channels of 5G NR (3GPP TS 38.212, Sec. |
|
The polar code of the control channels of 5G NR (3GPP TS 38.212, Sec. |
|
The free distance of a feed-forward convolutional code, punctured or not: a shortest path on the periodically time-varying trellis. |
|
Pack bits into symbols of |
|
Unpack symbols of |
Distribution matching#
|
Constant-composition distribution matching (Schulte & Böcherer 2016): |
Limits and bounds#
The smallest |
|
|
Capacity of the binary-input AWGN channel for a code rate (the noise variance is |
|
The noise variance per dimension of BPSK at |
|
The LLRs of BPSK ( |
|
The normal approximation of the smallest block error probability of an |
|
The word error rate of a bounded-distance decoder of a |
|
The symbol error rate after decoding, approximating that a word of |
|
The bit error rate after decoding of a code over GF(2^m): a wrong symbol carries on average |
Waveforms#
OFDM#
The modulator, the resource grid and its pilots, the channel estimation, the synchronisation and the gain correction of OFDM.
|
An OFDM (or DFT-spread OFDM) modulator and demodulator. |
|
An OFDM resource grid of |
|
Channel estimation on a resource grid: LS at the pilots, then |
|
The preamble of Schmidl & Cox (1997): two identical halves. |
|
The timing metric of Schmidl & Cox, |
|
Timing and fractional frequency offset of the preamble of |
|
The SNR-loss budget of an OFDM receiver (Speth, Fechtel, Fock & Meyr 1999): the largest residual impairments for an allowed loss of SNR. |
|
The power of the intersymbol and intercarrier interference of an FFT window |
|
The two-dimensional Wiener interpolator of pilots in time and frequency (Hoeher, Kaiser & Robertson 1997), for a WSSUS channel of uniform delay spectrum: every position is estimated from the |
|
The robust channel estimator of Li, Cimini & Sollenberger (1998): designed for the worst channel of delay spread |
|
The rank-p LMMSE estimator of Edfors et al. (1998) for the correlation |
|
The noise enhancement of LS estimates over a constellation, |
|
The correlation matrix of |
|
Pilot-based gain correction limited to |
|
The signal-to-distortion ratio (dB) of gain-limited correction against a cochannel interferer in Rayleigh fading (Cimini 1985, eq. |
|
The signal-to-distortion ratio (dB) of the optimum gain correction against a cochannel interferer in Rayleigh fading (Cimini 1985, eq. |
PAPR#
A PAPR reduction technique for |
|
|
The PAPR of a block of samples, |
|
The PAPR of every block of |
|
The empirical complementary distribution |
|
The theoretical CCDF of the PAPR of OFDM with |
|
The Bussgang decomposition |
Constant-envelope waveforms#
Continuous-phase modulation (CPFSK, MSK, GMSK) and constant-envelope OFDM.
|
A continuous-phase modulator (CPFSK, MSK, GMSK, raised-cosine CPM) and its detectors. |
|
The differential precoder of MSK: the bits |
|
The information bits of MSK from the terminal phase states of a survivor path (the second array of |
|
The power spectral density of MSK at the normalised frequency |
|
A constant-envelope OFDM (CE-OFDM) modulator and phase demodulator (Thompson et al. 2008). |
|
The powers |
|
The optimum asymptotic gain |
|
The optimum asymptotic BER of QPSK CE-OFDM in AWGN, |
|
The occupied bandwidth |
Chirp spread spectrum#
The modulation of LoRa and its theory.
|
Chirp spread spectrum, the frequency-shift chirp modulation of LoRa (Chiani and Elzanaty 2019; Afisiadis et al. 2020): |
|
The SER of the noncoherent CSS receiver over AWGN at the SNR per sample (dB), exact (Afisiadis et al. 2020, eq. |
|
The BER of the noncoherent CSS receiver over AWGN, |
|
The cross-correlation of two continuous-time LoRa waveforms (Chiani and Elzanaty 2019, eq. |
The largest real cross-correlation of the continuous-time waveforms (Chiani and Elzanaty 2019, Table I). |
|
|
The continuous part of the power spectrum of LoRa, |
|
The lines of the spectrum of LoRa at |
|
The band (units of |
|
The pattern |
|
The approximate SER (or, with |
Filtered multicarrier and OTFS#
|
FBMC/OQAM (staggered multitone) with the PHYDYAS prototype filter. |
|
Split complex symbols ( |
|
The inverse of |
|
Universal filtered multicarrier (Schaich & Wild 2014): OFDM filtered per sub-band by Dolph–Chebyshev filters, no cyclic prefix, |
|
The Dolph–Chebyshev window (as |
|
Orthogonal time frequency space (Raviteja et al. 2019) with rectangular pulses: the symbols of the |
MIMO#
One channel matrix (n_rx, n_tx) per channel use, or one for all; the received streams are stream-major (n_rx, n) arrays and the decisions (n_tx, n).
Detection#
|
Detect the transmitted symbols of a MIMO link |
|
Bit log-likelihood ratios of a MIMO link (positive for a 0, most significant bit first), the LLR sequence of every transmitted stream: exact per-stream LLRs after the unbiased linear filter for |
|
The unbiased estimates of a linear detector and their noise variances. |
Message passing for large MIMO#
|
The iterations of LAMA or OAMP on one received vector: the MMSE estimate of every iteration, and the decoupled channel of the last one (Jeon et al. 2018; Ma & Ping 2017). |
|
The state evolution of LAMA (Jeon et al. 2018, Corollary 2): the variance of the decoupled channel and the predicted MSE of every iteration, in the large-system limit with columns of unit norm. |
|
The recovery thresholds of LAMA (Jeon et al. 2018, Table II): below |
|
The empirical state evolution of OAMP with the optimal denoiser (Ma & Ping 2017, eqs. |
Channel estimation#
Training-based estimation of a flat MIMO channel (Biguesh and Gershman 2006).
|
A training matrix |
|
The weights of the best linear unbiased combination of the LS estimates of several training periods (Biguesh & Gershman, Lemma 4); |
|
The combination |
|
The MSE |
Space-time codes, precoding and capacity#
|
An orthogonal space-time block code (Alamouti, or the rate-3/4 codes for 3 and 4 antennas), with linear maximum-likelihood decoding. |
|
Eigenmode (SVD) transmission over |
|
The (regularised) zero-forcing precoder |
|
Water-filling powers of parallel channels: |
|
Capacity of MIMO channel realisations (bits per channel use) at the SNR |
|
The ergodic capacity (bits per channel use) of the i.i.d. |
|
The probability that a Rayleigh channel drawn once cannot carry |
|
The ε-capacity (bits per channel use): the rate of outage probability |
Wireless channels#
Noise and flat fading#
|
Add circular complex Gaussian noise for an SNR of |
|
Add noise for an |
|
Flat MIMO channel matrices: Rayleigh or Rician fading, with exponential antenna correlation (Kronecker model). |
|
Independent flat MIMO channel matrices, one per channel use, as |
|
The exponential correlation matrix |
Multipath#
Tapped and clustered delay lines, delay–Doppler channels.
|
A tapped-delay-line multipath channel with Clarke/Jakes Doppler (sum of sinusoids of Zheng & Xiao 2003), SISO or MIMO: every tap is Rayleigh with its power, the delays are rounded to the sampling grid and the powers normalised. |
The taps of one realisation of a |
|
|
The taps of a power-delay profile of the standards. |
|
The RMS delay spread of a power-delay profile. |
|
A clustered delay line channel of 3GPP TR 38.901 (CDL-A to CDL-E) between two uniform linear arrays, with the Doppler of a moving receiver. |
|
The power-delay profile of a CDL profile of 3GPP TR 38.901 for a desired RMS delay spread: one tap per cluster. |
|
The Rician K-factor (dB) of the first cluster of a CDL profile. |
|
The path loss of a link of 3GPP TR 38.901 (Table 7.4.1-1). |
|
The standard deviation of the log-normal shadow fading of a link (Table 7.4.1-1). |
|
The probability of a line of sight (TR 38.901 Table 7.4.2-1). |
|
The effective environment height of a UMa link (TR 38.901 Table 7.4.1-1, NOTE 1). |
|
The outdoor-to-indoor penetration of a building (TR 38.901 eq. |
|
One realisation of a delay–Doppler channel: one path per tap of a power-delay profile, with a Rayleigh gain and a Doppler shift |
Optical#
Fibre and amplification#
|
The parameters of a fibre link of identical spans, each followed by an amplifier. |
|
Loss and dispersion of |
|
The symmetric split-step Fourier method of OptiCommPy ( |
|
Dual-polarisation propagation by the Manakov equation with polarisation-mode dispersion (coarse-step model). |
|
Dual-polarisation nonlinear propagation over the link: the Manakov equation solved by the symmetric split-step method ( |
|
An ideal erbium-doped fibre amplifier: flat gain and white ASE. |
|
The power profiles of a span with distributed Raman amplification: the coupled equations of stimulated Raman scattering for the co-propagating channels and any number of co- and counter-propagating pumps (RK4, forward-backward sweeps), and the spontaneous Raman noise of every channel (see |
|
The GN model of the nonlinear interference of a WDM link (Poggiolini 2012). |
|
Poggiolini's closed form of the NLI power spectral density at the centre of |
|
The closed form of the ISRS GN model of Semrau, Killey & Bayvel (2019). |
|
The moments of a modulation format that the EGN model needs: |
|
The centre frequencies of |
Optical devices#
|
The field of a laser: power, Wiener phase noise, relative intensity noise and frequency offset (OptiCommPy |
|
Wiener phase noise of a laser: a random walk starting at 0 whose increments have the variance |
|
The samples of a receiver whose sampling clock is off by |
|
Phase modulator |
|
Push-pull Mach–Zehnder modulator (OptiCommPy |
|
IQ modulator (OptiCommPy |
|
A PIN photodiode (OptiCommPy |
|
Balanced detection |
|
The 90° optical hybrid (OptiCommPy |
|
Single-polarisation coherent receiver (OptiCommPy |
Optical wireless#
Indoor visible-light and infrared links (Lambertian emitters, the reflections of a room, the PIN-FET receiver) and free-space optics (turbulence, pointing errors, fog).
|
An empty rectangular room |
The light of a set of emitters carried to the elements of a room ( |
|
The received optical power of an indoor channel, bin by bin (see |
|
|
The Lambertian mode |
|
The unit vector of elevation |
|
The illuminance (lx) at |
|
A PIN photodiode with a FET preamplifier: shot and thermal noise (Komine & Nakagawa 2004, eqs. |
|
A free-space optical link: a deterministic loss, turbulence and pointing errors, the gain of the intensity |
|
The gamma–gamma distribution of the intensity, of unit mean (Al-Habash, Andrews & Phillips 2001). |
|
The misalignment of a Gaussian beam on a circular aperture, a Rayleigh radial displacement (Farid & Hranilovic 2007). |
|
The Rytov variance |
|
The attenuation (dB/km) of haze and fog for a visibility |
Hardware impairments#
Amplifiers and predistortion#
|
Rapp's solid-state amplifier: |
|
Saleh's travelling-wave tube amplifier (AM/AM and AM/PM; Saleh 1981, default coefficients of his fit). |
The memory-polynomial amplifier of Ding et al. (2004): orders 1, 3, 5, memory 3. |
|
|
The static predistorter of Rapp's amplifier: the inverse AM/AM, up to |
|
A memory-polynomial digital predistorter, trained by indirect learning (Eun & Powers 1997; Ding et al. 2004; Morgan et al. 2006). |
|
Bussgang's decomposition |
|
The coefficients |
|
The power of the useful term and of the distortion on each of |
Converters#
|
An analogue-to-digital converter on the in-phase and quadrature components: the front-end bandwidth (Gaussian, 3 dB at |
|
A digital-to-analogue converter: a uniform mid-rise quantiser of |
|
The exact mean squared error of a uniform mid-rise quantiser of |
|
The loading factor |
|
The SQNR of a full-scale sine through an ideal quantiser: |
|
The effective number of bits of a SINAD measured on a full-scale sine: |
|
The SNR of a sine of frequency |
|
The amplitude response of a zero-order hold of |
Receiver DSP#
Filters and sampling#
|
Taps of a transmit pulse at |
|
Root of the raised-cosine spectrum on the |
|
The root-raised-cosine pulse at the times |
|
The raised-cosine pulse at the times |
|
FIR filtering with the |
|
Full linear convolution (direct for short filters, by FFT otherwise). |
|
Insert |
|
Keep the samples |
|
Decimate from |
|
Band-limited resampling of a periodic block to |
|
Low-pass FIR of cut-off |
|
A Butterworth low-pass IIR filter of order |
|
Scale to unit mean power. |
|
Scale to unit peak amplitude. |
|
Frequency shift |
|
One channel of a capture brought to baseband at the rate of its receiver: the mean of the capture removed (the DC offset of the converter), the channel |
|
The samples |
|
Centred moving average over |
|
Delay a periodic block by |
Carrier recovery#
|
Frequency offset of an |
|
Viterbi–Viterbi phase estimates (OptiCommPy |
|
Blind phase search (Pfau, Hoffmann and Noé 2009; OptiCommPy |
|
Decision-directed phase-locked loop (OptiCommPy |
|
Multiply every sample by |
|
Unwrap a phase sequence with a given period ( |
Clock recovery#
|
Gardner timing error |
Gardner timing error for Nyquist pulses, |
|
|
Cubic Lagrange (Farrow) interpolation of four samples at |
|
Gardner clock recovery at 2 samples per symbol (OptiCommPy |
Equalisation and compensation#
|
The |
|
Compensate the dispersion of |
|
Taps of the dispersion-compensating FIR (OptiCommPy |
|
Centred taps of the dispersion compensation of |
|
The dispersion factor |
|
Centred taps of Savory's dispersion-compensating FIR, |
|
Centred taps of the least-squares dispersion-compensating FIR over the band |
|
The energy of the error |
Blind estimation#
Modulation recognition, SNR and symbol rate without a reference.
|
The sample cumulants of order two and four of a zero-mean signal, and the normalised |
|
The cumulants of an alphabet (its theoretical features), with the probabilities of its points. |
|
Blind modulation classification at one sample per symbol, timing and carrier recovered. |
|
The M2M4 estimate of the SNR (Pauluzzi & Beaulieu 2000), generalised to alphabets of several amplitudes by their kurtosis; it degrades at high SNR for QAM. |
|
The Cramér–Rao bound on the normalised mean squared error of an unbiased SNR estimator from known PSK symbols (Pauluzzi & Beaulieu 2000, eq. |
|
The cyclic autocorrelation |
|
The symbol rate of a linearly modulated signal from the strongest line of the spectrum of its instantaneous power (cyclostationarity, Gardner 1991); the pulse must have an excess bandwidth. |
Metrics and analysis#
Error rates, SNR and information rates#
Estimates from received and transmitted sequences.
|
Bit error rate of two bit sequences of the same length. |
|
SNR (dB) of a received sequence against the transmitted one, |
|
The standard deviation (rad) of the phase error of received symbols against the transmitted ones, once the constant gain and phase of the least-squares fit are removed: |
|
BER, SER and SNR of a received symbol sequence (OptiCommPy |
|
Error vector magnitude as a power ratio |
|
The Q factor (dB) of a bit error rate, |
|
Generalised mutual information of bit-wise decoding (OptiCommPy |
|
Symbol-wise mutual information for a Gaussian channel of the measured noise variance (OptiCommPy |
|
Mutual information and GMI with the least-squares channel gain: consistent at every SNR, unlike the power normalisation of |
|
Achievable rates of a receiver with its own posterior |
Spectrum#
|
Welch's power spectral density (periodic Hann window, 50 % overlap), centred. |
|
The averaged periodogram of non-overlapping segments of |
|
The adjacent channel leakage ratio (dB) of a density ( |
Results and plots#
|
The results of a campaign: one |
The frame after every block of one trial ( |
|
|
Run several chains with the same arguments of |
The classical views of a signal and of the results of a campaign (matplotlib). |
Systems and standards#
Reference chains of standards (comnum-systems) and the physical layer of 5G NR.
DVB-S#
|
A DVB-S transmitter and frame-aligned receiver (ETSI EN 300 421 V1.1.2) of one inner code rate. |
|
MPEG-2 transport packets for a simulation: the sync byte |
DVB-S2#
|
A DVB-S2 transmitter and receiver (ETSI EN 302 307-1) of one MODCOD, constant coding and modulation. |
|
The BBFRAME of |
|
The data bits of a received BBFRAME and whether the CRC-8 of its BBHEADER holds. |
The MODCOD field, the short-frame flag and the pilot flag of a received PLHEADER (90 symbols), by maximum likelihood over the 128 PLS codewords. |
DVB-T#
|
A DVB-T transmitter and receiver (ETSI EN 300 744 V1.6.2) of one non-hierarchical configuration. |
|
The gains of the static channels of Annex B of EN 300 744 (DVB-T) at baseband frequencies: the fixed reception F1 (20 echoes and a direct path, Ricean factor 10 dB) and the portable reception P1 (the 20 echoes of Table B.1), normalised to a unit power gain. |
CCSDS#
The channel coding and synchronization of CCSDS 131.0-B-5 (telemetry).
|
The interleaved Reed–Solomon codeblock of CCSDS 131.0-B-5, Sec. |
|
An LDPC code of CCSDS 131.0-B-5, Sec. |
|
A turbo code of CCSDS 131.0-B-5, Sec. |
|
The convolutional code of CCSDS 131.0-B-5, Sec. |
|
The first bits of a pseudo-randomizer of CCSDS 131.0-B-5, Sec. |
|
A synchronization marker of CCSDS 131.0-B-5, Sec. |
|
A channel access data unit (CCSDS 131.0-B-5, Table 9-1): the bits of a marker, then the bits of a codeblock, randomized if |
5G NR#
|
The numerology |
|
OFDM-modulate a grid of NR: the subcarrier |
|
The NR primary synchronisation signal of |
|
The NR secondary synchronisation signal of |
|
The cell identity of a received SSB, by the PSS then the SSS (coherently, with the flat channel estimated on the PSS). |
|
The SSB of a cell: the PSS and the SSS of unit amplitude, the PBCH DMRS and the 432 PBCH symbols. |
|
The resource elements of one kind in the SSB, as |
|
The 144 QPSK values of the PBCH DMRS (TS 38.211, Sec. |
|
The DMRS of a PDSCH of mapping type A over a slot of 14 symbols, single-symbol, port 1000 (TS 38.211, Sec. |
|
An MCS of the PDSCH (TS 38.214 Tables 5.1.3.1-1 to 5.1.3.1-4). |
|
The transport block size of a PDSCH (TS 38.214 Sec. |
|
The constellation of the modulation mapper of NR (TS 38.211 Sec. |
|
A transport block of the PDSCH and its segmentation (TS 38.212 Sec. |
|
The soft buffers of a HARQ process of a transport block: the LLRs of every transmission combined on the bits of the full codewords. |
|
One slot of a single-layer PDSCH (TS 38.211 Sec. |
FM broadcasting#
|
The complex envelope of the frequency modulation of the message |
|
The instantaneous frequency (Hz) of |
|
The pre-emphasis of the message |
|
The de-emphasis |
|
The stereophonic multiplex of FM broadcasting (ITU-R BS.450-4 Sec. |
|
The left and right channels of a multiplex (ITU-R BS.450-4 Sec. |
|
The 104 bits of an RDS group of the four information words |
|
The differential encoding |
|
The RDS of a multiplex: the biphase symbols demodulated from 57 kHz (Gardner clock recovery, Viterbi-Viterbi phase of the BPSK), differentially decoded, synchronised on the offset words, and the groups assembled into the station's name, radiotext and clock (NRSC-4 / EN 50067 Sec. |
LTE#
|
The samples of every antenna port of one 10 ms frame of an LTE cell (FDD, normal cyclic prefix): the PSS and the SSS of slots 0 and 10 (port 0), the CRS of every port, the PBCH of slot 1 carrying the master information block of the frame (its 8 bits of frame number |
|
The PSS of LTE of the identity |
|
The cell search of LTE in samples at 1.92 MS/s (the six central resource blocks: |
|
The master information block of every frame of a capture at 1.92 MS/s whose PBCH decodes, for a cell of |
|
Register the bindings of this module. |
AIS#
|
The GMSK signal of the packets of messages (ITU-R M.1371-5, Annex 2: the training sequence, the HDLC frame with its frame check sequence and bit stuffing, NRZI, GMSK with |
|
The packets of an AIS channel at baseband: the polar discriminator, an integrator over half a bit, the frequency offset of the transmitter removed, a bit clock from the zero crossings, NRZI decoding and the HDLC frames whose frame check sequence is correct, decoded by |
|
Decode the bits of an AIS message (ITU-R M.1371-5, Annex 8): the position reports (messages 1, 2, 3, 18), the base station report (4), the static and voyage data (5) and the class B static data (24); any other message gives its type and MMSI. |
|
The bits of a position report (message 1) with the given fields, the other fields zero: the inverse of |
|
The |
|
The messages of |
The sampling rate of the AIS receiver: 16 samples per bit, 153 600 Hz. |
Simulation and specifications#
Chains#
|
An ordered, named sequence of blocks; a chain is itself a block. |
|
A block of a chain: |
|
A block of the registry of declarative links, |
|
A reference to a grid variable, substituted when the chain is built for a condition ( |
|
The state carried along a link during one trial: the current samples and what the metrics need (the transmitted bits, symbol indices and symbols, the constellation). |
|
One block of the registry of declarative links (see |
|
The metrics of one frame, as a declarative campaign records them (with the values that the blocks recorded), in the format of the metrics of |
The blocks of the registry of declarative links as classes, for |
var (the function that makes a Var) is documented here rather than on a
page of its own, whose file name would clash with that of Var on
case-insensitive file systems:
|
The grid variable |
Monte Carlo runner#
Monte Carlo campaigns of Python trials, on the Rust runner. |
Declarative campaigns#
|
Run a declarative campaign with the Rust runner (parallel, reproducible). |
|
Run a specification and check its expected results (closed forms, published curves). |
|
Search the operating point of a specification: the value of a variable at which a metric reaches a target, for every combination of the other grid axes. |
|
The conditions of a specification, in order, as dicts. |
The blocks of the declarative links, their parameters and their ports. |
|
The JSON Schema of a block of a declarative link: one alternative per block, with the type, default, unit, accepted values and bounds of every parameter, and the ports of the block ( |
|
|
Check the ports of a link of block types: every block finds the facts it needs among those the blocks before it give. |
|
The acceptance rule of a measured value |
Recordings#
|
Read a SigMF recording (SigMF 1.x: every data type, little or big endian, several channels, capture headers, trailing bytes, |
|
Write a SigMF recording |