itpp::Spread_2d Class Reference
Communications Module » Digital Modulation

Spreading of complex symbols to complex output. More...

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

## Public Member Functions

| Spread_2d ()
| Constructor.
| Spread_2d (const vec &incodeI, const vec &incodeQ)
| Constructor.
void | spread (const cvec &symbols, cvec &out)
| Spreading of signal.
cvec | spread (const cvec &symbols)
| Spreading of signal.
void | despread (const cvec &rec_signal, cvec &out, int timing)
| Despreading of signal. timing is the start position of the first symbol, given in number of samples.
cvec | despread (const cvec &rec_signal, int timing)
| Despreading of signal. timing is the start position of the first symbol, given in number of samples.
void | set_code (const vec &incodeI, const vec &incodeQ)
| Set the in-phase and the quadrature-phase spreading codes.
vec | get_codeI ()
| Returns the in-phase spreading code.
vec | get_codeQ ()
| Returns the quadrature-phase spreading code.
int | get_period ()
| Get the period of the code (length of code vector).

## Protected Attributes

Spread_1d | spreadI
Spread_1d | spreadQ

## Detailed Description

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 152 of file spread.h.

## Constructor & Destructor Documentation

## Spread_2d() [1/2]

itpp::Spread_2d::Spread_2d | ( |  | ) |

inline

Constructor.

Definition at line 156 of file spread.h.

## Spread_2d() [2/2]

itpp::Spread_2d::Spread_2d | ( | const vec & | incodeI,
|  | const vec & | incodeQ )

Constructor.

Definition at line 86 of file spread.cpp.

References set_code().

## Member Function Documentation

## spread() [1/2]

void itpp::Spread_2d::spread | ( | const cvec & | symbols,
|  | cvec & | out )

Spreading of signal.

Definition at line 98 of file spread.cpp.

References itpp::imag(), itpp::real(), spreadI, spreadQ, and itpp::to_cvec().

## spread() [2/2]

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

inline

Spreading of signal.

Definition at line 162 of file spread.h.

References spread().

Referenced by spread().

## despread() [1/2]

void itpp::Spread_2d::despread | ( | const cvec & | rec_signal,
|  | cvec & | out,
|  | int | timing )

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

Definition at line 103 of file spread.cpp.

References itpp::imag(), itpp::real(), spreadI, spreadQ, and itpp::to_cvec().

Referenced by despread().

## despread() [2/2]

cvec itpp::Spread_2d::despread | ( | const cvec & | rec_signal,
|  | int | timing )

inline

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

Definition at line 170 of file spread.h.

References despread().

## set_code()

void itpp::Spread_2d::set_code | ( | const vec & | incodeI,
|  | const vec & | incodeQ )

Set the in-phase and the quadrature-phase spreading codes.

Definition at line 91 of file spread.cpp.

References it_assert, spreadI, and spreadQ.

Referenced by Spread_2d().

## get_codeI()

vec itpp::Spread_2d::get_codeI | ( |  | ) |

Returns the in-phase spreading code.

Definition at line 76 of file spread.cpp.

References spreadI.

## get_codeQ()

vec itpp::Spread_2d::get_codeQ | ( |  | ) |

Returns the quadrature-phase spreading code.

Definition at line 81 of file spread.cpp.

References spreadQ.

## get_period()

int itpp::Spread_2d::get_period | ( |  | ) |

inline

Get the period of the code (length of code vector).

Definition at line 179 of file spread.h.

References spreadI.

## Member Data Documentation

## spreadI

Spread_1d itpp::Spread_2d::spreadI

protected

The spreaders for the I and Q channels respectively

Definition at line 183 of file spread.h.

Referenced by despread(), get_codeI(), get_period(), set_code(), and spread().

## spreadQ

Spread_1d itpp::Spread_2d::spreadQ

protected

The spreaders for the I and Q channels respectively

Definition at line 183 of file spread.h.

Referenced by despread(), get_codeQ(), set_code(), and spread().

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

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

Generated on for IT++ by Doxygen 1.15.0