Preamble Detector
Detect preamble in data packet
- Library:
Communications Toolbox / Synchronization
Description
The Preamble Detector block detects the end of preambles in data packets. A preamble is a set of symbols or bits used in packet-based communications systems to indicate the start of a packet. Packets consist of preamble data and user data. The length of the user data portion of the packet can vary during a simulation run.
This icon shows the block with all ports enabled:
Ports
Input
Output
Parameters
Block Characteristics
Data Types |
|
Multidimensional Signals |
|
Variable-Size Signals |
|
Tips
For faster execution of the Preamble Detector block, set the Simulate using parameter to:
Algorithms
Bit Inputs
When the input data is composed of bits, the preamble detector uses an exact pattern match.
Symbol Inputs
When the input data is composed of symbols, the preamble detector uses a cross-correlation algorithm. A finite impulse response (FIR) filter, in which the coefficients are specified from the preamble, computes the cross-correlation between the input data and the preamble. When a sequence of input samples match the preamble, the filter output reaches its peak. The index of the peak corresponds to the end of the preamble sequence in the input data. See Discrete FIR Filter (Simulink) for further information on the FIR filter algorithm.
The cross-correlation values that are greater than or equal to the specified threshold are reported as peaks.
If the detection threshold is too low, the algorithm will detect false peaks, or, in the extreme case, detect as many detected peaks as there are input samples.
If the detection threshold is too high, the algorithm will miss detecting peaks, or, in the extreme case, detect no peaks.
Consequently, the selection of the detection threshold is critical.