Skip to content

Reception Chain

The reception chain is divided into two steps, carrier detection, responsible for verifying the received signal and identifying for each time segment the carriers present, and the receiver chain, responsible for receiving a signal segment and performing the reception process to recover the data vector \(u_t^{(0)}\), as shown in the block diagram below.

pageplot

Carrier Detector

Initializes a carrier detector, used to detect possible carriers in the received signal.

pageplot

Parameters:

Name Type Description Default
fs float

Sampling frequency [Hz]

128000
seg_ms float

Duration of each segment [ms]

10.0
threshold float

Power threshold for detection

-10
freq_window tuple[float, float]

Frequency interval (f_min, f_max). Frequencies outside this interval will be discarded.

(0, 10000)
bandwidth float

Bandwidth of span [Hz], used to ignore other frequencies that can be confirmed.

1600
history int

Number of previous segments to consider for carrier detection.

4

Raises:

Type Description
ValueError

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

ValueError

If the segment duration is less than or equal to zero.

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))
>>> 
>>> channel = argos3.Channel(duration=1, noise_mode="ebn0", noise_db=20)
>>> channel.add_signal(s, position_factor=0.5)
>>> channel.add_noise()
>>> st = channel.channel
>>> 
>>> detector = argos3.CarrierDetector(seg_ms=10, threshold=-15)
>>> detector.detect(st.copy())
>>> detections = detector.return_channels()
>>>
>>> print(detections)
[(np.float64(2400.0), 41, 65)]
>>>                   
>>> first_sample = int((detections[0][1] - 5) * detector.fs * detector.seg_s)
>>> last_sample = int(detections[0][2] * detector.fs * detector.seg_s)
>>> st_prime = st[first_sample:last_sample]
>>> 
>>> receiver = argos3.Receiver(fc=detections[0][0], output_print=False, output_plot=False)
>>> datagramRX, success = receiver.receive(st_prime)
>>> 
>>> 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
}
  • Waterfall Diagram: pageplot
  • Frequency Domain Segment: pageplot
  • Waterfall Detection Diagram: pageplot
  • Waterfall Decision Diagram: pageplot
Reference:
AS3-SP-516-2097-CNES (Section 3.3)

Reception Chain

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

Class that encapsulates the entire reception process in the ARGOS-3 standard.

Parameters:

Name Type Description Default
fs int

Sampling frequency in Hz.

128000
Rb int

Bit rate in bps.

400
fc int

Carrier frequency in Hz.

None
lpf_cutoff int

Cutoff frequency of the low-pass filter in Hz.

600
preamble str

String of preamble in hex.

'2BEEEEBF'
channel_encode tuple

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

('nrz', 'man')
G ndarray

Generation matrix for convolutional encoding.

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

If True, prints the 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 encoding types are not 'nrz' or 'manchester'.

Reference:
AS3-SP-516-2097-CNES (section 3.1 and 3.2)

bandpass_demodulate(s_prime, t)

Demodulates the received signal \(s'(t)\) with noise \(r(t)\), returning the signals \(dX'_{I}(t)\) and \(dY'_{Q}(t)\).

Parameters:

Name Type Description Default
s_prime ndarray

Received signal \(s'(t)\) to be demodulated.

required
t ndarray

Time vector.

required

Returns:

Name Type Description
dX_prime ndarray

Demodulated signal \(dX'_{I}(t)\).

dY_prime ndarray

Demodulated signal \(dY'_{Q}(t)\).

Examples:

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

low_pass_filter(dX_prime, dY_prime, t)

Applies the low-pass filter (LPF) with impulse response \(h(t)\) to the signals \(dX'(t)\) and \(dY'(t)\), returning the filtered signals \(d_{I}'(t)\) and \(d_{Q}'(t)\).

Parameters:

Name Type Description Default
dX_prime ndarray

Signal \(dX'(t)\) to be filtered.

required
dY_prime ndarray

Signal \(dY'(t)\) to be filtered.

required
t ndarray

Time vector.

required

Returns:

Name Type Description
dI_prime ndarray

Signal \(d_{I}'(t)\) filtered.

dQ_prime ndarray

Signal \(d_{Q}'(t)\) filtered.

Examples:

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

matched_filter(dI_prime, dQ_prime, t)

Applies the matched filter with impulse response \(g(-t)\) to the signals \(d_{I}'(t)\) and \(d_{Q}'(t)\), returning the filtered signals \(I'(t)\) and \(Q'(t)\).

Parameters:

Name Type Description Default
dI_prime ndarray

Signal \(d'_{I}(t)\) to be filtered.

required
dQ_prime ndarray

Signal \(d'_{Q}(t)\) to be filtered.

required
t ndarray

Time vector.

required

Returns:

Name Type Description
It_prime ndarray

Signal \(I'(t)\) filtered.

Qt_prime ndarray

Signal \(Q'(t)\) filtered.

Examples:

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

synchronizer(It_prime, Qt_prime)

Performs the signal synchronization, returning the synchronized signal.

Parameters:

Name Type Description Default
It_prime ndarray

Signal \(I'(t)\) to be synchronized.

required
Qt_prime ndarray

Signal \(Q'(t)\) to be synchronized.

required

Returns:

Name Type Description
delayI float

Delay of the signal \(I'(t)\).

delayQ float

Delay of the signal \(Q'(t)\).

Examples:

  • Time Domain Plot Example: pageplot
  • Correlation Module Plot Example: pageplot

sampler(It_prime, Qt_prime, t)

Performs the decision (sampling and quantization) of the signals \(I'(t)\) and \(Q'(t)\), returning the symbol vectors \(I'[n]\) and \(Q'[n]\).

Parameters:

Name Type Description Default
It_prime ndarray

Signal \(I'(t)\), matched filtered.

required
Qt_prime ndarray

Signal \(Q'(t)\), matched filtered.

required
t ndarray

Time vector.

required

Returns:

Name Type Description
In_prime ndarray

Symbol vector \(I'[n]\) sampled and quantized.

Qn_prime ndarray

Symbol vector \(Q'[n]\) sampled and quantized.

Examples:

  • Time Domain Plot Example: pageplot
  • Constellation Plot Example: pageplot
  • Phase Plot Example: pageplot

line_decoder(In_prime, Qn_prime)

Decodes the symbol vectors \(I'[n]\) and \(Q'[n]\), returning the bit vectors \(X'[n]\) and \(Y'[n]\).

Parameters:

Name Type Description Default
In_prime ndarray

Symbol vector \(I'[n]\) quantized.

required
Qn_prime ndarray

Symbol vector \(Q'[n]\) quantized.

required

Returns:

Name Type Description
Xn_prime ndarray

Bit vector \(X'[n]\) line decoded.

Yn_prime ndarray

Bit vector \(Y'[n]\) line decoded.

Examples:

  • Time Domain Plot Example: pageplot

unscramble(Xn_prime, Yn_prime)

Unscrambles the bit vectors \(X'[n]\) and \(Y'[n]\), returning the bit vectors \(v_{t}^{(0)} \prime\) and \(v_{t}^{(1)} \prime\).

Parameters:

Name Type Description Default
Xn_prime ndarray

Bit vector \(X'[n]\) line decoded.

required
Yn_prime ndarray

Bit vector \(Y'[n]\) line decoded.

required

Returns:

Name Type Description
vt0_prime ndarray

Bit vector \(v_{t}^{(0)} \prime\) unscrambled.

vt1_prime ndarray

Bit vector \(v_{t}^{(1)} \prime\) unscrambled.

Examples:

  • Time Domain Plot Example: pageplot

conv_decoder(vt0_prime, vt1_prime)

Decodes the bit vectors \(v_{t}^{(0)} \prime\) and \(v_{t}^{(1)} \prime\), returning the bit vector \(u_{t}'\).

Parameters:

Name Type Description Default
vt0_prime ndarray

Bit vector \(v_{t}^{(0)} \prime\) unscrambled.

required
vt1_prime ndarray

Bit vector \(v_{t}^{(1)} \prime\) unscrambled.

required

Returns:

Name Type Description
ut_prime ndarray

Bit vector \(u_{t}'\) decoded.

Examples:

  • Time Domain Plot Example: pageplot

datagram_parser(ut_prime)

Receives a decoded bit vector \(u_{t}'\) and returns a datagram in the ARGOS-3 format, or the bit vector \(u_{t}'\) if there is an error.

Parameters:

Name Type Description Default
ut_prime ndarray

Bit vector \(u_{t}'\) decoded.

required

Returns:

Name Type Description
datagram ndarray

Datagram generated, or the bit vector \(u_{t}'\) if there is an error.

success bool

Indicates if the operation was successful.

Examples:

  • Time Domain Plot Example: pageplot

receive(s_prime)

Receives a signal \(s(t)\) and returns the result of the reception.

Parameters:

Name Type Description Default
s_prime ndarray

Signal \(s(t)\) received.

required

Returns:

Name Type Description
datagramRX ndarray

Datagram generated, or the bit vector \(u_{t}'\) if there is an error.