I am trying to simulate OFDM for an multi-path channel. I am using it++ for simulation.

transmit_bits = randb(FrameLength);                   //The frame bits. 1024
coded_bits = conv_code.encode(transmit_bits);    //The convolutional encoder function.

modulator->modulate_bits(coded_bits, trans_symbols); //The  modulator.

ofdm.set_parameters(trans_symbols.size(), 100);
trans_symbols = ofdm.modulate(trans_symbols);

rec_symbols = channel(trans_symbols, coeff);        //The TDL channel.

rec_symbols = ofdm.demodulate(rec_symbols.split(trans_symbols.size()));

modulator->demodulate_soft_bits(rec_symbols, 0, recived_bits);  //Demodulate
decoded_bits = conv_code.decode(recived_bits);   //The decoder function.

berc.count(transmit_bits, decoded_bits);

I am always getting an BER of around 0.5. what am i doing wrong? Also after passing through channel, the length of the ofdm symbols will increase (due to multipath), currently i am blindly removing the extra bits, Is it the wright thing to do?

  • 3
    $\begingroup$ If you get BER of 0.5 this means that actually the RX signal is completely independent of the TX signal, i.e. you have a serious bug in the implementation. Go through the documentation of each block, debug the input-output relations of each block. Start small with connecting encoder directly with decoder. Remove the channel in between. Go step by step. $\endgroup$ Mar 10, 2017 at 14:56
  • $\begingroup$ @MaximilianMatthé If i remove the TDL channel and replace it with a awgn channel, the BER is 0.0002 $\endgroup$
    – Nithin
    Mar 11, 2017 at 4:34
  • $\begingroup$ So, you are missing channel equalization. $\endgroup$ Mar 11, 2017 at 5:28
  • $\begingroup$ @MaximilianMatthé So should i do OFDM and equalization too ? $\endgroup$
    – Nithin
    Mar 11, 2017 at 6:11
  • 1
    $\begingroup$ Yes, otherwise you want be able to receive it correctly. Also, check if you have a CP added, otherwise the standard equalization one-tap equalization for OFDM wont work. You might have a look e.g. here though it's in python (Disclaimer: I wrote this article, on my website) on how channel equalization is done or here. Also, you need to know the channel (or estimate it from the received signal). $\endgroup$ Mar 11, 2017 at 6:15


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.