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
#
OUT_1
—
frame of the Barker sequence
column vector
Details
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.
The output data type is set by the Output data type parameter.
| Data types |
|
| Complex numbers support |
No |
Parameters
Main
#
Code length —
length of the generated sequence
1 | 2 | 3 | 4 | 5 | 7 | 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].
| Values |
|
| Default value |
|
| Program usage name |
|
| Tunable |
No |
| Evaluatable |
No |
#
Sample time —
sampling period
SampleTime (real number / vector of two real numbers)
Details
The sampling period, set as a positive number. To inherit the sampling period, set this parameter to −1.
| Default value |
|
| Program usage name |
|
| Tunable |
No |
| Evaluatable |
Yes |
#
Samples per frame —
the number of samples in the output frame
Int64 integer
Details
The number of samples in the output frame as a positive integer. If Samples per frame equally , then the block outputs a frame containing samples consisting of Barker sequences of length , where is set by the parameter Code length. When not multiple of consecutive frames preserve the continuity of the Barker sequence across frame boundaries.
| Default value |
|
| Program usage name |
|
| Tunable |
No |
| Evaluatable |
Yes |
#
Output data types —
type of output data
double | int
Details
The type of output data.
| Values |
|
| Default value |
|
| Program usage name |
|
| Tunable |
No |
| Evaluatable |
No |
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 lateral lobe of an 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 |
|---|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Choosing the time
The time between updates of the output signal is equal to the product of the parameter values Samples per frame and Sample time. For example, if Sample time and Samples per frame equal 1 the block outputs a frame every second. If you zoom in Samples per frame before 10, then the block will output a 10-element vector every 10 seconds. This ensures that the equivalent output speed is independent of the parameter. Samples per frame.