Main goal of
Demodulator is to extract data of a channel selected by user from input samples, perform frequency deinterleaving, de-DQPSK calculation and pass the data back to
When instantiated by
Demodulator's constructor is being passed a structure containing values bound to currently used transmission mode (e.g. number of OFDM subcarriers, number of OFDM symbols per transmission frame). Before proceeding to DQPSK demodulation, frequency deinterleaver table is created and stored for later usage. The array consists of two columns, containing initial subcarrier index and its final value.
Main routine is handled by Process method called with input/output buffers and station info structure as arguments. Input samples are mapped to an array of OFDM symbols. Size and the address of a channel selected by user are extracted to calculate indexes of OFDM symbols containing data. In particular cases, when Scheduler operates in CONF mode, only FIC-containing symbols demodulation is possible.
Next step involves calculation of in-place FFT transform of selected symbols only. Here, fftw library is utilized to achieve high performance of computation. To further boost the process, pre-calculated transform plans are generated at startup instead of being computed on each execution of FFT method.
During the DQPSK demodulation, phase shift of selected OFDM symbols and their predecessors is calculated. Every subcarrier is described by two variables containing its real and imaginary part. Values corresponding to particular subcarriers are read from OFDM symbols array in an order enforced by already generated deinterleaver table. Frequency cropping and shifting is also taken into account when calculating indexes of input data. As a result, during de-DQPSK operation subcarriers are also swapped and written to output buffer in a format accepted by next modules of application. Thus, demodulation of DQPSK signal, frequency deinterleaving and data reshaping is performed without any temporary buffers, resulting in reasonably high performance.
Because DQPSK conveys information about difference between symbols and not their absolute value, any constant phase error is countered.