itpp::Multicode_Spread_2d Class Reference
Communications Module » Digital Modulation

Multicode spreading of complex symbols to complex output. More...

`#include <itpp/comm/spread.h>`

## Public Member Functions

| Multicode_Spread_2d ()
| Constructor.
| Multicode_Spread_2d (const mat &incodesI, const mat &incodesQ)
| Constructor.
cvec | spread (const cvec &symbols)
| Spreading of signal.
cvec | despread (const cvec &receivedsignal, int timing)
| Despreading of signal. timing is the start position of the first symbol, given in number of samples.
void | set_codes (const mat &incodesI, const mat &incodesQ)
| Set the spreading codes.
mat | get_codesI ()
| Return the matrix containing the in-phase codes (as rows)
mat | get_codesQ ()
| Return the matrix containing the quadrature-phase codes (as rows)
int | get_period ()
| Returns the spreading factor.

## Protected Attributes

Multicode_Spread_1d | mcspreadI
Multicode_Spread_1d | mcspreadQ

## Detailed Description

Multicode spreading of complex symbols to complex output.

The spreading are done independently for the I and Q phases. That is real(symbols) are spread by the incodeI and imag(symbols) are spread by incodeQ.

Before despreading the phase should be corrected, that is the complex baseband signal should be multiplied by exp(j*PHIk), where PHIk is the phase of that user (and path).

Obeserve that the spreading is normalized so that the energy per bit is preserved before and after spreading (that is each symbol is multiplied with `1/sqrt`(N)). Hence, for the multicode case the energy is normalized for one symbol (code) but the transmitted signal consist of a sum of several signals.

Example: See Spread_1d

Definition at line 247 of file spread.h.

## Constructor & Destructor Documentation

## Multicode_Spread_2d() [1/2]

itpp::Multicode_Spread_2d::Multicode_Spread_2d | ( |  | ) |

inline

Constructor.

Definition at line 251 of file spread.h.

## Multicode_Spread_2d() [2/2]

itpp::Multicode_Spread_2d::Multicode_Spread_2d | ( | const mat & | incodesI,
|  | const mat & | incodesQ
| ) |  |

Constructor.

Definition at line 161 of file spread.cpp.

References set_codes().

## Member Function Documentation

## spread()

cvec itpp::Multicode_Spread_2d::spread | ( | const cvec & | symbols | ) |

Spreading of signal.

Definition at line 184 of file spread.cpp.

References itpp::imag(), mcspreadI, mcspreadQ, itpp::real(), itpp::Multicode_Spread_1d::spread(), and itpp::to_cvec().

## despread()

cvec itpp::Multicode_Spread_2d::despread | ( | const cvec & | receivedsignal,
|  | int | timing
| ) |  |

Despreading of signal. timing is the start position of the first symbol, given in number of samples.

Definition at line 189 of file spread.cpp.

References itpp::Multicode_Spread_1d::despread(), itpp::imag(), mcspreadI, mcspreadQ, itpp::real(), and itpp::to_cvec().

## set_codes()

void itpp::Multicode_Spread_2d::set_codes | ( | const mat & | incodesI,
|  | const mat & | incodesQ
| ) |  |

Set the spreading codes.

The codes are given as rows in the matricies incodesI and incodesQ. The number of rows shall equal the number of multiple spreading codes

Definition at line 176 of file spread.cpp.

References it_assert, mcspreadI, mcspreadQ, and itpp::Multicode_Spread_1d::set_codes().

Referenced by Multicode_Spread_2d().

## get_codesI()

mat itpp::Multicode_Spread_2d::get_codesI | ( |  | ) |

Return the matrix containing the in-phase codes (as rows)

Definition at line 166 of file spread.cpp.

References itpp::Multicode_Spread_1d::get_codes(), and mcspreadI.

## get_codesQ()

mat itpp::Multicode_Spread_2d::get_codesQ | ( |  | ) |

Return the matrix containing the quadrature-phase codes (as rows)

Definition at line 171 of file spread.cpp.

References itpp::Multicode_Spread_1d::get_codes(), and mcspreadQ.

## get_period()

int itpp::Multicode_Spread_2d::get_period | ( |  | ) |

inline

Returns the spreading factor.

Definition at line 270 of file spread.h.

## Member Data Documentation

## mcspreadI

Multicode_Spread_1d itpp::Multicode_Spread_2d::mcspreadI

protected

The multicode spreaders for the I and Q channels respectively

Definition at line 274 of file spread.h.

Referenced by despread(), get_codesI(), set_codes(), and spread().

## mcspreadQ

Multicode_Spread_1d itpp::Multicode_Spread_2d::mcspreadQ

protected

The multicode spreaders for the I and Q channels respectively

Definition at line 274 of file spread.h.

Referenced by despread(), get_codesQ(), set_codes(), and spread().

The documentation for this class was generated from the following files:

- itpp/comm/spread.h
- itpp/comm/spread.cpp

Generated on Mon Jun 10 2024 11:49:38 for IT++ by Doxygen 1.9.8