Barker Code Generator
Generating the Barker sequence.
blockType: BarkerCodeGenerator
Path in the library:
|
Description
Block Barker Code Generator 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.
Ports
Output
Output — frame of the Barker pass sequence:q[<br>] column vector
The frame of the Barker sequence returned as a column vector. If the frame length exceeds the length of the sequence, the block fills the frame with a repetition of the sequence.
Dependencies
The output data type is set by the Output data type parameter.
Parameters
Code length is the length of the generated pass sequence:q[<br>] 7 (default) | 1 | 2 | 3 | 4 | 5 | 11 | 13
Length of the generated sequence: 1, 2, 3, 4, 5, 7, 11, or 13.
Example: value 2 sets the sequence [–1;1].
Sample time — sampling period of
1 (default) | −1 | positive scalar
The sampling period, set as a positive number. To inherit the sampling period, set this parameter to −1.
Samples per frame — number of samples in the output frame
1 (default) | −1 | a positive number
The number of samples in the output frame as a positive integer. If Samples per frame is equal to M, then the block outputs a frame containing M samples consisting of Barker sequences of length N. N — the length of the generated sequence, which is set by the Code length parameter. When M not multiple of N consecutive frames preserve the continuity of the Barker sequence across frame boundaries.
Data types: Int64
Output data type — output data type
double (by default) | Int8
The type of output data. Available data types: double or Int8.
Additional Info
Barker sequences
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 |
Choosing the time
The time between updates of the output signal is equal to the product of the values of the parameter Samples per frame and Sample time. For example, if Sample time and Samples per frame are equal 1 the block outputs a frame every second. If you increase Samples per frame to 10, then the block will output a 10-element vector every 10 seconds. This ensures that the equivalent output speed is independent of the Samples per frame parameter.