Documentation

This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English verison of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

Preamble Detector

Detect preamble in data

Description

The Preamble Detector block detects a preamble in a data sequence. A preamble is a set of symbols or bits used in packet-based communication systems to indicate the start of a packet. The block finds the location corresponding to the end of the preamble.

Ports

Input

expand all

This port accepts real or complex input data sequences. The input data can be either symbols or bits. This port accepts variable-size arrays.

Data Types: single | double | Boolean | int8 | uint8
Complex Number Support: Yes

Output

expand all

This port outputs the index corresponding to the last element of each detected preamble. This port outputs variable-size arrays.

Data Types: double

This port outputs the detection metric. The detection metric has the same size and data type as the input data. This port is available when the Input parameter is Symbol and the Output detection metric is selected.

  • If either the preamble or input data is complex, the detection metric is the absolute value of the cross-correlation of the preamble and the input signal.

  • If both the preamble and input data are real, the detection metric is the cross-correlation of the preamble and the input signal.

Data Types: single | double

Parameters

expand all

Specify the input signal type as Symbol or Bit. For binary inputs, set this parameter to Bit. For all other inputs, set this parameter to Symbol.

Specify the preamble sequence as a column vector. If Input is Bit, the preamble must be binary. If Input is Symbol, the preamble can be any real or complex sequence.

Specify the detection threshold as a nonnegative real scalar. When the detection metric is greater than or equal to the threshold, the block detects the preamble and updates the index. Tunable.

Select this check box to create the DtMt port, from which the detection metric data is output.

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. An 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 matches 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 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. As a result, there may be no detected peaks or there may be as many detected peaks as there are input samples. Consequently, the selection of the detection threshold is very important.

Introduced in R2016b

Was this topic helpful?