Gr4-packet-modem waveform design

From GNU Radio
Revision as of 09:40, 21 August 2024 by Destevez (talk | contribs)
Jump to navigation Jump to search

This page documents all the aspects of the waveform used by gr4-packet-modem.

Modulation

The modulation is a single-carrier RRC (root-raised-cosine) filtered PAM (pulse amplitude modulation) waveform. The RRC filter has a roll-off of 0.35.

The following constellations are defined. There are provisions in the modem to use higher-order constellations for the payload data.

  • BPSK. Formed by the points 1, -1, which encode the bits 0 and 1 respectively. This is used for the synchronization word.
  • QPSK. Formed by the points , , , , which encode the values 0, 1, 2, and 3 respectively. This is used for the header and the payload data.

The modem transmitter supports two modes of operation:

  • Burst mode. Each packet is radiated as a standalone RF burst, without radiation of any RF signal between packets. In this mode there is amplitude shaping: the amplitude at the beginning and end of the packet are tapered off to avoid amplifier clicks caused by sudden amplitude changes. The taper is done over the duration of 4 symbols using a quarter-sine waveform ( for ). At the beginning of the packet, the taper is applied to the first symbols of the synchronization word. At the end of the packet, the payload symbols are extended with pseudorandom QPSK symbols to which the taper is applied, in order to avoid applying the taper to payload symbols. This pseudorandom sequence is known as the ramp-down sequence. It is 9 symbols long: 5 are used to flush the RRC filter history and 4 for the amplitude taper. The modem transmitter generates a different pseudorandom sequence for each packet, and the receiver ignores its contents, so the sequence to be used is not specified in the waveform design. The history of the RRC filter starts filled with zeros at the beginning of each packet and the RRC filter is flushed with zeros at the end of each packet. (Design note: With an RRC filter it is not really necessary to include amplitude shaping, since the RRC pulse shape already provides a smooth amplitude change. The amplitude shaping is included mainly to mimic the operation of other modems in which it is necessary, such as modems using a constant-envelope waveform.)
  • Stream mode. The transmitter radiates an RF signal continuously. The RF signal is phase continuous and composed of back-to-back packets. If there are no packets available to be transmitted, idle packets are inserted. All the stream of symbols is RRC filtered as a continuous stream, so the symbols at the beginning and end of a packet affect how the neighboring packets are modulated. This mode emulates the way that a continuous carrier system such as DVB-S2 works.

The receiver in gr4-packet-modem treats these two modes in the same way. It detects and estimates the parameters of each packet independently, without assuming that an RF signal is always present. It would be possible to design a different receiver that takes advantage of the characteristics of the stream mode.

Packet structure

The following table describes the structure of a packet. Each of the sections of the packet is explained in more detail below.

Symbols Constellation Notes
Synchronization word 64 BPSK CCSDS 64-bit ASM
Header 128 QPSK 32 bit with r=1/4 LDPC and r=1/2 repetition
Payload Variable QPSK/other
CRC-32 32 bits QPSK/other CRC-32 of payload
Ramp-down sequence 9 QPSK Only burst mode; pseudorandom

Synchronization word

The synchronization word is the CCSDS 64-bit ASM, defined in CCSDS 131.0-B-5, given in hex by 034776C7272895B0. It is BPSK modulated and transmitted at the beginning of each packet.

Scrambling

The header, payload and CRC-32 sections of the packet are scrambled with an additive (synchronous) scrambler. In the transmitter, scrambling is the last operation that is done before mapping to constellation symbols. In particular, it is done before any FEC encoding. The scrambling algorithm is the 17-bit scrambler defined in CCSDS 131.0-B-5 Section 10.4.

Header

The header contains information about the length, format (MODCOD, etc.) and type of the packet. There is provision for user customization in the format of the header. It has 32 bits and is formed by the following fields.

Field name Bits Description
Packet length 16 The payload length in bytes as a 16-bit big-endian integer.
Packet type 8 Indicates the packet type and MODCOD (see below).
Spare 8 Included to support future extensions and user customization. It is filled with the value 0x55.

The following values for the packet type field are defined:

  • 0x00 Uncoded QPSK-modulated payload containing user data.
  • 0x01 Uncoded QPSK-modulated payload containing idle data.

This list can be extended with other MODCODs and packet types.

Header FEC

The header is encoded by a concatenation of an r=1/4 LDCP outer code and an r=1/2 repetition inner code. This r=1/8 coding results in 128 QPSK symbols and is design to allow decoding the header at SNRs as low as 0 dB Es/N0. Design note: the reason for this is that if a MODCOD is defined using state-of-the art r=1/2 FEC that works at around 0 dB Eb/N0 and QPSK modulation, then the Es/N0 will be 0 dB, so header decoding should not be the limiting factor in the design.

The LDPC code is a (128, 32) LDPC code which has been designed using the PEG (progressive edge growth) algorithm with ldpc-toolbox. It has a column weight of 3, and the row weight is 4 except in two of the rows (which have weights 3 and 5). Many LDPC codes with these parameters were generated pseudorandomly and simulated, and the one with a best FER at 6 dB Eb/N0 was selected. Note that with r=1/2 repetition inner coding and QPSK modulation, 6 dB Eb/N0 is equivalent to 0 dB Es/N0. In the figure below, the FER versus Eb/N0 of all the codes tested is shown, with the selected code marked in red.

Gr4 packet modem fer peg codes.png

The alist for the LDPC code can be found in the header_fec_decoder.hpp file. Systematic encoding is done using a dense generator matrix. The r=1/2 repetition coding is implemented by repeating twice the 128-bit LDPC codeword to form a 256-bit vector.