EngeeComms.BarkerCodeGenerator
The Barker sequence.
| Library |
|
| Block |
Description
System object EngeeComms.BarkerCodeGenerator generates a Barker sequence. The short length and minimal level of the side lobes of the autocorrelation function make it possible to use Barker sequences for frame synchronization in communication systems.
To generate a Barker sequence, follow these steps:
-
Create an object EngeeComms.BarkerCodeGenerator 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.
Creation
Syntax
-
barkerCode = EngeeComms.BarkerCodeGenerator()— creates a system object to generate a Barker sequence with the default properties.Example:
barkerCode = EngeeComms.BarkerCodeGenerator() -
object = EngeeComms.BarkerCodeGenerator(Name=Value)— creates a system object to generate a Barker sequence with specified properties in the form of a pairName=Value, whereName— the name of the property, andValue— the appropriate value. You can specify multiple pairs «name-value» the order of the pairs does not matter. Unspecified properties retain their default values.Example:
# длина последовательности 11, кадр содержит 11 отсчетов barkerCode = EngeeComms.BarkerCodeGenerator(Length=11,SamplesPerFrame=11)
Features
Length — the length of the generated sequence
+
7 (default) | 1 | 2 | 3 | 4 | 5 | 11 | 13
Details
Length of the generated sequence: 1, 2, 3, 4, 5, 7, 11, or 13.
Example: value 2 sets the sequence [–1;1].
Data types: Float64
SamplesPerFrame — the number of samples in the output frame
+
1 (default) | a positive integer
Details
The number of samples in the output frame as a positive integer. If SamplesPerFrame equally , then the block outputs a frame containing samples consisting of Barker sequences of length , where — set by the property Length. If necessary, the object repeats the sequence to achieve counts.
Data types: Int64
OutputDataType — type of output data
+
double (by default) | Int
Details
The type of output data. Available data types: double or Int.
Using
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 data type for the output using the property OutputDataType.
Example:
y = barkerCode(OutputDataType=:int)
Additional Info
Barker sequences
Details
The Barker sequence is a finite sequence of values +1 and -1, having an autocorrelation function, the level of the side lobes in which does not exceed .
The side lobe of the autocorrelation function is the correlation of a codeword with a time—shifted version of itself. The lateral lobe of correlation, , to shift by characters in -bit code sequence equal to
.
For is an individual code character equal to +1 or –1.
The output sequence has a bipolar format, where 0 and 1 displayed in 1 and –1. The maximum known length of the Barker sequence is 13. The short length and low level of the side lobes of the autocorrelation function make Barker sequences useful for frame synchronization in digital communication systems. The Barker sequence generator outputs the following sequences:
| Length | The Barker Sequence | The level of the side lobes |
|---|---|---|
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] |
-16.9 dB |
11 |
[−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] |
-22.3 dB |