frame64 Generator/Synchronizer

Keywords: frame64 framegen64 framesync64 frame generator synchronizer

liquid comes packaged with two basic framing structures: frame64 and flexframe which can be used with little modification to transmit data over a wireless link. The interface for both of these objects is intended to be as simple as possible while allowing control over some of the parameters of the system. On the transmitter side, the appropriate frame generator object is created, configured, and executed. The receiver side uses an appropriate frame synchronizer object which simply picks packets of a stream of samples, invoking a callback function for each packet it finds. The simplicity of the receiver is that the frame synchronizer object automatically reconfigures itself for packets of different size, modulation scheme, and other parameters.

frame64 description


The framegen64 and framesync64 objects implement a basic framing structure for communicating packetized data over the air. The framegen64 object accepts an 8-byte header and 64-byte payload and assembles a 1440-sample frame. Internally, the frame generator encodes the header and payload each with a Golay(24,12) block code, 24-bit cyclic redundancy check , and modulates the result with a QPSK modem . The header and payload are encapsulated with special phasing sequences, and finally the resulting symbols are interpolated using a half-rate square-root Nyquist filter .

The true spectral efficiency of the frame is exactly \(4/5\) ; 64 bytes of data (512 bits) encoded into 640 symbols. The frame64 structure has the advantage of simplicity but lacks the ability for true flexibility.

#include <liquid/liquid.h>

// static callback function
static int callback(unsigned char *  _header,
                    int              _header_valid,
                    unsigned char *  _payload,
                    unsigned int     _payload_len,
                    int              _payload_valid,
                    framesyncstats_s _stats,
                    void *           _userdata)
    printf("*** callback invoked ***\n");
    return 0;

int main() {
    // create frame generator
    framegen64 fg = framegen64_create();

    // create frame synchronizer using default properties
    framesync64 fs = framesync64_create(callback,NULL);

    // data payload
    unsigned char header[8];
    unsigned char payload[64];

    // .. initialize header and payload data ..

    // generate the frame
    float complex frame[LIQUID_FRAME64_LEN];
    framegen64_execute(fg, header, payload, frame);

    // synchronize/receive the frame
    framesync64_execute(fs, frame, LIQUID_FRAME64_LEN);

    // clean up allocated objects

Performance in AWGN

A useful metric for assessing the performance of a particular waveform is to analyze its ability to both detect and decode a packet in variouis channel environments. The most basic channel environment is additive white Gauss noise, and the performance of the frame64 generator/synchronizer pair is shown in the figure, below.


Performance of the frame64 generator/synchronizer in the presence of additive white Gauss noise

Notice that with an SNR of only 2 dB, the packet is detected with near certainty, and the probability of a packet error is 0.1% with an SNR of 8 dB. The frame64 synchronizer recovers carrier frequency, phase, timing, and gain offsets. The "ideal" decoding curve in the figure representsthe performance with perfect knowledge of these offsets and indicates that the frame synchronizer has near-perfect estimation of these typical channel impairments.