Frame Synchronization Using Barker Code Preamble
Use a length 13 Barker code frame preamble for frame synchronization of data bits.
Based on detection of a Barker code preamble, the model performs frame synchronization on symbol stream. To load the model and to configure the runtime preamble setting, callback functions are used. For more information, see Model Callbacks (Simulink).
When loading the model, a
PostLoadFcncallback initializes the preamble value of the Frame Synchronizer block.
For runtime execution, an
InitFcncallback gets the runtime setting for the preamble from the Barker Code Generator block.
The Barker Code Generator block outputs a bipolar (-1,1) signal that must be converted to unipolar (0,1) for transmission as the preamble of BPSK signal frame. After modulation the signal is root raised cosine (RRC) filtered, then a fixed delay and AWGN impairments corrupt the signal and its timing. After adding impairments, the model applies RRC filtering to the received signal. To align the output signal with a valid clock reference, the Symbol Synchronizer block corrects the clock skew between the transmitted and received symbols.
The Frame Synchronizer block aligns the symbol stream along correct frame boundaries by detecting the specified preamble as the start of a packet and also outputs a valid frame indicator for the downstream data processing. The BER Data Decoding subsystem demodulates the signal, calculates the bit error rate (BER) and stops the simulation when 100 bit errors are counted. The model displays the BER achieved.
Simulation bit error rate: 0.002