# OFDM Simulation process

I'm trying to understand OFDM by making a simulation. Are these steps correct?

1. generate M random complex QAM symbols. example: (1+j,1-j,-1-j,1-j....)
2. Split my M samples into a N 2048 sized arrays
3. Take IFFT of each array individually
4. Add cyclic prefix to each array
5. Make N square shaped signals by oversampling my IFFT arrays
6. Pulse shape the individual signals with raised cosine
7. Mix up the signals with frequency separation = 1/symbol_period by multiplying them by $$e^{j2\pi ft}$$
• I am not sure I completely follow your last step. Consider the OFDM QAM symbols are what we would see in the frequency domain if you had N QAM transmitters running in parallel on carriers each already separated by 1/symbol_period. So you take the IFFT to get back to the time domain, which is then the signal you would transmit (with the added cyclic prefix). Since this is the same signal (just in the time domain) of what you already mapped across frequencies prior to taking the IFFT there is no need for step 7? – Dan Boschen Oct 29 '18 at 0:45
• For step 7, I think you named it different, step 7 should be done for modulation if we'd considered ft is the carrier frequency. these steps are related to use OFDM in passband with multi-path environment such as: using ofdm in underwater acoustic channel. so at receiver you will start multiplying by exp(-2pijft) --> filtering with same parameters of raise cosine filter --> down-sampling --> so on. and that should work. – Zeyad_Zeyad Oct 29 '18 at 2:34
• @Zeyad_Zeyad can you lay off the RRC? I've read the patent you're citing for that, and what they do is only related to general OFDM. It only works if you do the magic trick to alternate the real and imaginary parts used on each subcarrier; what you get with that patent would be called IOTA FBMC these days. You can't just use a RRC on just any OFDM frame. If you do that, you gain nothing (none of the advantages from the patent apply), but lose power. And no, you can't then avoid the cyclic prefix, because you lose the ability to interpret the channel as cyclic convolution. – Marcus Müller Oct 30 '18 at 16:03
• @MarcusMüller .. Why do we gain nothing when using RRC, .. I don't think that is true in all cases because that will depends on other parameters, for example rolloff factor and other things. By the way, rolloff factors of RRC with OFDM was studied by a lab mates here ieeexplore.ieee.org/document/5633476. – Zeyad_Zeyad Oct 31 '18 at 9:34
• coming back to the possibility of using RRC or not, .. As I said in another comment that in OFDM, ISI can be caused by multipath fading channels and it can come directly from the physical layer itself Nowadays specially in real tests, upsampling and downsampling finite impulse response (FIR) filters are used to match sampling rate of the digital-to-analog converters (DACs) and the physical layer. here you can see brief introduction of using OFM with RRC nutaq.com/… and many articles are online also – Zeyad_Zeyad Oct 31 '18 at 9:36

1. generate M random complex QAM symbols. example: (1+j,1-j,-1-j,1-j....)
2. Split my M samples into a N 2048 sized arrays
3. Take IFFT of each array individually
4. Add cyclic prefix to each array

Exactly! In real-world OFDM systems, not all carriers are used; typically, you leave out one or two DC carriers and leave a few guard carriers at the band edges, so you'd have something like

1. split my M samples into 1950-sized chunks, and map them to the elements of a 2048-vector, leaving the center ones and edge ones free

The edge guard carriers make the fifth step unnecessary:

1. Make N square shaped signals by oversampling my IFFT arrays

so scratch that, usually.

1. Pulse shape the individual signals with raised cosine

Don't do that! That's wrong. This is OFDM, and it's only used when you encounter multipath channels; matched filtering does nothing good here; it only makes things worse by making the channel more complicated and reducing average power.

Remember why you'd do raised cosine with single carrier systems: You want things to be

• nicely pulse-shaped, which simply doesn't make sense in the context of OFDM, and
• you want matched filtering because you want to maximize SNR in an AWGN channel, and OFDM is never used in channels that are purely AWGN, and
• because after convolution with the conjugate pulse shaping filter in the receiver, you might have an easier time recovering timing, but that doesn't apply to OFDM either, because timing recovery must, in the wideband channel scenario, be done using other means (keywords: Schmidl-Cox, autocorrelation timing recovery methods).
1. Mix up the signals with frequency separation = 1/symbol_period by multiplying them by $$e^{j2\pi ft}$$

No; your subcarrier separation is what the IFFT does; you just mix up the baseband signal generated by step 4 to bandpass with your $$e^{j2\pi ft}$$.

Since you're only simulating things, and we know that bandpass-region channels have an equivalent representation in baseband (in fact, only because we know that works is that we can use OFDM at all): don't do this at all, but work with the complex baseband signal directly.

• Thanks for the answer. But i am still confused on why I should scrap step 5. If I don'y do step 5, I'll only have 2048 points for my simulation. is each of the 2048 points a symbol, or a sample in the wave form. How should I go about oversampling the 2048+cyclic_prefix points? – Alexander Armen Berian Oct 30 '18 at 3:14
• Simply don't. Why would you want to oversample? There's no advantage to it. – Marcus Müller Oct 30 '18 at 9:12
• I mean, sure, if you need, for some reasons, the signal embedded in a larger bandwidth, then upsample; but you could have done mathematically exactly the same by using a multiple of the subcarrier number (e.g. 4096 instead of 2048) and only using the original subcarrier set (of course, that means, you'd use the 1950 carriers "around the center carrier"). – Marcus Müller Oct 30 '18 at 9:26
• Thanks for the clear explanation! so if I put my 1950 around the center of 2^some_large_number, then take the ifft, that's my ofdm baseband signal? – Alexander Armen Berian Oct 30 '18 at 15:23
• indeed, that's the plan :) – Marcus Müller Oct 30 '18 at 16:00