Skip to content

Transmission Chain

The transmission process for a data vector \(u_t^{(0)}\) is given by the block diagram below.

pageplot

Transmitter

__init__(fc=4000, fs=128000, Rb=400, carrier_length=0.082, preamble='2BEEEEBF', channel_encode=('nrz', 'man'), G=np.array([[121, 91]]), output_print=True, output_plot=True)

Encapsulates the entire transmission process in the PTT-A3 standard.

Parameters:

Name Type Description Default
fc float

Carrier frequency in Hz.

4000
fs float

Sampling frequency in Hz.

128000
Rb float

Bit rate in bps.

400
carrier_length float

Prefix duration in seconds.

0.082
preamble str

Preamble string in hex.

'2BEEEEBF'
channel_encode tuple

Tuple with the type of encoding for channels I and Q respectively.

('nrz', 'man')
G ndarray

Generation matrix for convolutional encoding.

array([[121, 91]])
output_print bool

If True, prints intermediate vectors to the console.

True
output_plot bool

If True, generates and saves the graphs of the intermediate processes.

True

Raises:

Type Description
ValueError

If the sampling frequency is less than or equal to zero.

ValueError

If the bit rate is less than or equal to zero.

ValueError

If the carrier length is less than or equal to zero.

ValueError

If the preamble is empty.

ValueError

If the channel encoding types are not 'nrz' or 'manchester'.

Examples:

>>> import argos3
>>> import numpy as np 
>>> 
>>> fc = np.random.randint(10,80)*100
>>> print(fc)
2400
>>>
>>> transmitter = argos3.Transmitter(fc=fc, output_print=False, output_plot=False)
>>> t, s = transmitter.transmit(argos3.Datagram(pcdnum=1234, numblocks=1))
>>> 
>>> receiver = argos3.Receiver(fc=fc, output_print=False, output_plot=False)
>>> datagramRX, success = receiver.receive(s)
>>> 
>>> print(success)
True
>>> print(datagramRX.parse_datagram())
{
  "msglength": 1,
  "pcdid": 1234,
  "data": {
    "bloco_1": {
      "sensor_1": 37,
      "sensor_2": 198,
      "sensor_3": 9
    }
  },
  "tail": 7
}
Reference:
AS3-SP-516-274-CNES (sections 3.1 and 3.2)

datagram_build(datagram)

Prepares the datagram for transmission, returning the bit vector \(u_t\).

Returns:

Name Type Description
ut ndarray

Bit vector of the datagram.

Examples:

  • Bitstream Plot Example: pageplot

conv_encoder(ut)

Encodes the bit vector \(u_t\) using convolutional encoding, returning the bit vectors \(v_t^{(0)}\) and \(v_t^{(1)}\).

Parameters:

Name Type Description Default
ut ndarray

Bit vector to be encoded.

required

Returns:

Name Type Description
vt0 ndarray

Bit vector of channel I.

vt1 ndarray

Bit vector of channel Q.

Examples:

  • Bitstream Plot Example: pageplot

scramble(vt0, vt1)

Scrambles the bit vectors \(v_t^{(0)}\) and \(v_t^{(1)}\), creating the shuffled vectors \(X[n]\) and \(Y[n]\).

Parameters:

Name Type Description Default
vt0 ndarray

Bit vector of channel I.

required
vt1 ndarray

Bit vector of channel Q.

required

Returns:

Name Type Description
Xn ndarray

Scrambled bit vector of channel I.

Yn ndarray

Scrambled bit vector of channel Q.

Examples:

  • Bitstream Plot Example: pageplot

preamble_build()

Generates the preamble vectors \(S_I[n]\) and \(S_Q[n]\).

Returns:

Name Type Description
sI ndarray

Preamble vector of channel I.

sQ ndarray

Preamble vector of channel Q.

Examples:

  • Bitstream Plot Example: pageplot

mux(sI, sQ, X, Y)

Multiplexes the preamble vectors \(S_I[n]\) and \(S_Q[n]\) with the data vectors \(X[n]\) and \(Y[n]\), returning the multiplexed vectors \(X[n]\) and \(Y[n]\).

Parameters:

Name Type Description Default
sI ndarray

Preamble vector of channel I.

required
sQ ndarray

Preamble vector of channel Q.

required
Xn ndarray

Data vector of channel I.

required
Yn ndarray

Data vector of channel Q.

required

Returns:

Name Type Description
Xn ndarray

Multiplexed vector of channel I.

Yn ndarray

Multiplexed vector of channel Q.

Examples:

  • Bitstream Plot Example: pageplot

line_encoder(Xn, Yn)

Encodes the bit vectors \(X[n]\) and \(Y[n]\) using line coding (\(NRZ\)), returning the encoded symbol vectors \(I[n]\) and \(Q[n]\).

Parameters:

Name Type Description Default
Xn ndarray

Bit vector of channel I to be encoded.

required
Yn ndarray

Bit vector of channel Q to be encoded.

required

Returns:

Name Type Description
In ndarray

Encoded symbol vector of channel I.

Qn ndarray

Encoded symbol vector of channel Q.

Examples:

  • Signal Plot Example: pageplot

pulse_modulate(In, Qn)

Formats the line coded \(NRZ\) symbol vectors \(I[n]\) and \(Q[n]\) using RRC/Manchester filters, returning the formatted vectors \(d_I(t)\) and \(d_Q(t)\).

Parameters:

Name Type Description Default
In ndarray

Signal vector of channel \(I[n]\) to be formatted.

required
Qn ndarray

Signal vector of channel \(Q[n]\) to be formatted.

required

Returns:

Name Type Description
dI ndarray

Formatted vector of channel I.

dQ ndarray

Formatted vector of channel Q.

Examples:

  • Time Domain Plot Example: pageplot
  • Frequency Domain Plot Example: pageplot

bandpass_modulate(dI, dQ)

Modulates the signal vectors \(d_I(t)\) and \(d_Q(t)\) using QPSK modulation, returning the modulated signal \(s(t)\).

Parameters:

Name Type Description Default
dI ndarray

Formatted vector of channel I.

required
dQ ndarray

Formatted vector of channel Q.

required

Returns:

Name Type Description
t ndarray

Time vector \(t\).

s ndarray

Modulated signal \(s(t)\).

Examples:

  • Time Domain Plot Example: pageplot
  • Phase/Constellation Plot Example: pageplot
  • Frequency Domain Plot Example: pageplot
  • Pure Carrier Plot Example: pageplot

transmit(datagram)

Executes the entire transmission chain for a datagram, returning the modulated signal \(s(t)\) and the time vector \(t\).

Parameters:

Name Type Description Default
datagram Datagram

Instance of the datagram to be transmitted.

required

Returns:

Name Type Description
t ndarray

Time vector \(t\).

s ndarray

Modulated signal \(s(t)\).