# OFDM in multipath channel simulation in it++

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?

• 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. Mar 10, 2017 at 14:56
• @MaximilianMatthé If i remove the TDL channel and replace it with a awgn channel, the BER is 0.0002 Mar 11, 2017 at 4:34
• So, you are missing channel equalization. Mar 11, 2017 at 5:28
• @MaximilianMatthé So should i do OFDM and equalization too ? Mar 11, 2017 at 6:11
• 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). Mar 11, 2017 at 6:15