# How to compand an OFDM signal?

Im trying to run a simulation of an OFDM system with convolutional coding and u-law compander on MATLAB. The problem is I dont know how to compand the OFDM signal. Do I need to do something to the signal before compressing it? Because value coming out of the ifft block is a complex number.

Xofdm_compand= Xofdm_cp; %OFDM with cp
xofdmcompand=abs(Xofdm_compand);
for j=1:Nframe %Number of symbols
in=xofdmcompand(j,:);
v=max(abs(in));
X_compressed(j,:)=compand(in,mu,v,'mu/compressor');
end


Edit: Here is the snippet of the code where I compand the signal. Am I doing it wrongly?

• you're confusing things. So, it's not clear what you want to compand where. I don't think I'd be able to give you a great answer unless you're describing for which purpose, on which medium, you're using OFDM, and why you'd apply an speech compander on a digital multicarrier signal. From that arises the understanding of how you can do that. – Marcus Müller Jun 15 '20 at 14:48
• You can give great answers anything! – Laurent Duval Jun 15 '20 at 14:51
• The purpose in this case is to reduce the PAPR. I have seen on multiple articles that people implement the u-law compander to reduce the PAPR. – user150011 Jun 15 '20 at 14:59
• I have not used u-law companding, but have worked on several OFDM PAPR reduction techniques. Each time, what was done was to calculate the amplitudes of the complex values $\rho = \sqrt{I^2 + Q^2}$ and to calculate a correction based on these amplitudes – Damien Jun 17 '20 at 12:59
• Weww, I've tried this. Seems like it giving me correct result. The value of the companded signal all less than 0. Is this normal? – user150011 Jun 23 '20 at 23:20

µ-law is defined for real-valued PCM signals only. You will either need to produce a real-valued signal containing OFDM as passband signal, either

• by mixing it to a carrier frequency, or
• by modifying your OFDM system to only produce symmetrical spectrum baseband, or
• by u-law coding I and Q separately (but that makes little sense, since a high PAPR happens when both I and Q have a high value at the same time, i.e. coding them separately isn't logical),

but all three options wouldn't be "companding OFDM" anymore, that would be "companding a system which, among other things, involves OFDM".

General remark: Don't forget that you've got channel coding. It's often better to intentionally completely "delete" isolated subcarriers from extreme-peak OFDM symbols than to "make whole symbols slightly worse", as the former leads to a certain, but isolated, error, whereas the other has a chance of leading to multiple errors in the same symbol – which would, assuming there's no large interleaver at work, look like a burst error.

I think you'd want to read

X. Wang, T. Tjhung and C. Ng, "Reduction of peak-to-average power ratio of OFDM system using a companding technique", IEEEE Transactions of Broadcasting, vol. 45m, no. 3, Sept. 1999.

on what they did and what their results are.

While you do that, look at Figure 5:

Notice how the second (⛛) curve is the uncompanded one. This looks like for anything but very high SNR, the companded curves are better.

A. Mattsson, G. Mendenhall and T. Dittmer, "Comments on reduction of peak-to-average power ratio of OFDM system using a companding technique", IEEE Transaction on Broadcasting, vol. 45, no. 4, December 1999.

and especially this paragraph:

Which shows that there is a significant increase in power for the companded signal. I.e. the SER for the companded signal should in our opinion be compared to the SER for the non-companded signal amplified by 10.9 dB [for the µ=16 case], 17 dB [for the µ=255 case] etc. It appears that the SNR refered to in Fig. 5 on page 307, refers to the signal power of the signal before companding and not the actual SNR of the transmitted signal.

In other words: shift the red (uncompanded) curve 11 dB to the left to compare against the µ=16 case, and by 17 dB to the left to compare against the (standard) µ=255 case.

Look how the uncompanded signal (red line) is always better at the same power than the µ=16 companded signal, and how it's better for SNRs > 12 dB for the µ=255 case. I highlighted the amount that uncompanded is better than companded in green for µ=16, and in orange for µ=255.

If your SNR is below 12 dB, you get a SER > 10⁻³, which is a typical design goal for wireless communication; you might want to use a lower modulation than 16-QAM then, which will then typically be an 8-PSK or QPSK. Which is indifferent about amplitude variation – so instead of companding nonlinearly, you'd just look at the peak in your OFDM symbol and simply either drastically scale a few isolated subcarriers, or the whole symbol slightly. (which you do would depend on how steep the BER curve of your channel decoder is at that point.)

TL;DR: Literature research shows companding only works for low SNR. There, you might not be in a sweet spot for system design, so my expectations for companding to work are low.
Instead, I propose you generally rather design your FEC so that it can live with intentionally broken isolated symbols that you insert on purpose to reduce PAPR.

• Thank you for the information. I forgot to mention that the main purpose of doing the companding is reduce spectral splatter. – user150011 Jun 23 '20 at 23:21
• No need to thank me – if you really want to thank me, that's what the upvote button 🔺 next to the answer is for. – Marcus Müller Jun 23 '20 at 23:22