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 frame bits. 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
PostLoadFcn callback initializes the preamble value of the Preamble Detector block.
For runtime execution, an
InitFcn callback 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.
To align the bit stream along correct frame boundaries and to determine valid frame indicators in the demodulated bit stream, the Frame Synchronizer block uses the start of packet index detected by the Preamble Detector block. The BER Data Decoding subsystem 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