MATLAB Examples

Detect Complex Preamble in Packet

Open the model. The model creates a packet by generating a complex preamble and prepending it to a sequence of QPSK symbols. The packet passes through a noisy channel and is input to a Preamble Detector block. The preamble locations and the detection metric outputs are displayed by two Time Scope blocks.

Run the model.

There are many preamble locations shown for each 1 s frame. This is because the detection metric exceeds the threshold multiple times in each frame. This indicates that the detection threshold is too low. Ideally, there should only be a single location shown for each frame because there is only one preamble. Looking at the detection metric plot, it suggests that a threshold of 15 will result in the selection of the peak detection metric.

Change the detection threshold from 3 to 15. Rerun the model.

In each frame, the location index is 16. This is correct because the preamble is 16 symbols long.