Communications Blockset    
Hadamard Code Generator

Generate a Hadamard code from an orthogonal set of codes

Library

Sequence Generators sublibrary of Comm Sources

Description

The Hadamard Code Generator block generates a Hadamard code from a Hadamard matrix, whose rows form an orthogonal set of codes. Orthogonal codes can be used for spreading in communication systems in which the receiver is perfectly synchronized with the transmitter. In these systems, the despreading operation is ideal, as the codes are decorrelated completely.

The Hadamard codes are the individual rows of a Hadamard matrix. Hadamard matrices are square matrices whose entries are +1 or -1, and whose rows and columns are mutually orthogonal. If N is a nonnegative power of 2, the Hadamard matrix, denoted , is defined recursively as follows.

The Hadamard matrix has the property that

where is the identity matrix.

The Hadamard Code Generator block outputs a row of . The output is bipolar. You specify the length of the code, N, by the Code length parameter in the block's mask. The Code length must be a power of 2. You specify the index of the row of the Hadamard matrix, which is an integer in the range [0, 1, ... , N - 1], where N is the Code length, by the Code index parameter.

Dialog Box

Code length
A positive integer that is a power of two specifying the length of the Hadamard code.
Code index
An integer between 0 and N - 1, where N is the Code length, specifying a row of the Hadamard matrix.
Sample time
A positive real scalar specifying the sample time of the output signal.
Frame-based outputs
Determines whether the output is frame-based or sample-based.
Samples per frame
The number of samples in a frame-based output signal. This field is active only if you select the Frame-based outputs check box.

See Also

OVSF Code Generator, Walsh Code Generator


  Gold Sequence Generator Hamming Decoder