EngeeComms.BarkerCodeGenerator
Barker Sequence.
Library |
EngeeComms |
Block |
Description
The EngeeComms.BarkerCodeGenerator system object generates a Barker sequence. The short length and minimal side lobe level of the autocorrelation function allow Barker sequences to be used for frame synchronisation in communication systems.
To generate a Barker sequence, perform the following steps:
-
Create an EngeeComms.BarkerCodeGenerator object and set its properties.
-
Call the object with arguments as if it were a function.
To learn more about how to work with system objects, see Engee system objects.
Creating
Syntax
-
barkerCode = EngeeComms.BarkerCodeGenerator()
creates a system object to generate a Barker sequence with by default properties. Example:barkerCode = EngeeComms.BarkerCodeGenerator()
-
object = EngeeComms.BarkerCodeGenerator(Name=Value)
creates a system object to generate a Barker sequence with each specified Name (name) property set to the specified Value (value). You can specify additional arguments as a name-value pair in any order (Name1
=Value1
,…,NameN
=ValueN
). Example:# длина последовательности 11, кадр содержит 11 отсчетов barkerCode = EngeeComms.BarkerCodeGenerator(Length=11,SamplesPerFrame=11)
Properties
Length -
generated sequence length
7 (by default)
| 1
| 2
| 3
| 4
| 5
| 11
| 13
Details
The length of the generated sequence is 1
, 2
, 3
, 4
, 5
, 7
, 11
, or 13
.
Example: the value 2
specifies the sequence [-1;1]
.
Data types: Float64
SamplesPerFrame -
number of samples in the output frame
1 (by default)
| positive integer
Details
The number of samples in the output frame as a positive integer. If SamplesPerFrame
is , then the block outputs a frame containing samples consisting of Barker sequences of length , where is specified by the Length
property. If necessary, the object repeats the sequence to reach samples.
Data types: Int64
OutputDataType -
output data type
double (by default)
| Int
Details
Output data type. Available data types: double
or Int
.
Usage
Syntax
y = barkerCode()
outputs a frame of the Barker sequence as a column vector. If the frame length exceeds the length of the Barker sequence, the object fills the frame by repeating the Barker sequence. Set the type of data to output using the OutputDataType
property. Example:
y = barkerCode(OutputDataType=:int)
Optional
Barker sequences
Details
A Barker sequence is a finite sequence of values +1
and -1
having an autocorrelation function whose side lobe level does not exceed .
The Side lobe of the autocorrelation function is the correlation of the codeword with a time-shifted version of itself. The side lobe of the correlation, , for a shift of symbols in a -bit code sequence is equal to
.
For is an individual code symbol equal to +1
or -1
.
The output sequence has a bipolar format, where 0
and 1
are mapped to 1
and -1
. The maximum known length of the Barker sequence is 13
. The short length and low side lobes of the autocorrelation function make Barker sequences useful for frame synchronisation in digital communication systems. The Barker sequence generator produces the following sequences:
Length | Barker sequence | Side lobe level |
---|---|---|
1 |
[-1] |
0 dB |
2 |
[-1; 1] |
-6 dB |
3 |
[-1; − 1; 1] |
-9.5 dB |
4 |
[-1; −1; 1;-1] |
-12 dB |
5 |
[-1; −1; −1; 1; −1] |
-14 dB |
7 |
[-1; −1; −1; 1; 1; 1; −1; 1] |
-16.9 dB |
11 |
[-1; −1; −1; 1; 1; 1; 1; 1; −1; 1; 1; 1; 1; −1; 1] |
-20.8 dB |
13 |
[-1; −1; −1; −1; −1; 1; 1; 1; −1; −1; 1; −1; 1; 1; −1] |
-22.3 dB |