3. Multi-Carrier QAM or M-ary PSK

NOTE: Please read first the notes to simple BPSK and Multi-Carrier BPSK.

NOTE: if your Excel is like mine, then it may run this simulation very slowly even on a very fast computer due to what appears to be a bug. In such a case please see When Excel runs simulations slowly.

A. The Letter

The following is an extract from a letter to my friend, attempting to explain in an accessible way the principle.

Dear Xxx,

This workbook implements a more comlex modulation than BPSK -- it implements QAM or M-ary PSK, and again the data is transmitted on several carriers simultaneously (one bit per one carrier). This is a very popular of lately idea called OFDMA (it is believed to be the principle for the 4th generation of mobile communications, just like CDMA is the principle for the 3rd generation). In this case we begin with inverse Fourier transform. Why? because we need to generate many carriers, which need to be very close to each other and to be very stable relative to each other. It seems like that the best thing to do is first to calculate for every carrier its amplitude and its phase. The amplitudes will be all equal, perhaps 1V, and the phases will be different -- for QAM to transmit "11" we will set the phase to +90 degrees, for 10 the phase will be 135 degrees, for 00 it will be -135 degrees and for 01 it will be -45 degrees. This the right most bit will repreasent the real part of the signal and will be coded, as bofeore, so that data value of "1" will be represented with +1 and data value of "0" with -1. The left-most bit will represent the imaginary part of the signal and will be similarly coded with +1 to represent data value "1" and -1 to represent data value "0". Thus, as an exmple we can see that data value of "01" will be translated to (1 - i), and data value of "00" will become (-1 -i) = -(1 + i). The four combinations of data bits "00", "01", "10" and "11" when ploted in the complex plane will form a locus of four points, which is called "constellation". QAM can be mapped in several different ways to a constellation and the one used here is the traditional way. It is a simple extension of the logic and priciples of BPSK. It also is a special case of M-ary PSK when the data values are coded with Gray's code in order to reduce the number of errored bits when the phase is decoded with a small error (e.g. when the docoder instead of selecting the correct point of the constellation, erroneously selects its neighbour). In addition, the modulation could be made differential, where the new phase offset will depend on the difference between the current data value and the previous data value (e.g. the current symbol will need to be known to decode the next symbol). The scheme chosen here is purely for illustraions and it uses constant amplitude with the phase jumping between 45, 135, 215 (-135) and 315 (-45) degrees. I will leave it to you to implement a scheme of greater practical interest to you. Please note that you will need to change both, the signal modulation algorithm and the signal demodulation one.

As before, instead of building as many wave generators as there are carriers, we will simply put in one array all the amplitudes and in another array all the phases. Thus the first array will be the discrete amplitude spectrum of all carriers and the second array will be discrete phase spectrum of all the carriers -- the two arrays together will be the discrete spectrum of the QAM modulated signal. Now that we already have the spectrum for the modulated signal all that we need to do is convert it into a signal in the time domain. This, of course, can be done using the inverse fast Fourirer transform (iFFT in our case). Taking the discrete spactrum and feeding it to the input of an iFFT module will produce at its output the discrete signal. This is why we must start first with the inverse FFT and not the forward FFT.

Now to summarise: we will use an inverse FFT (iFFT) to generate the discrete modulated signal from its discrete spectrum. We will before that calculate its discrete spectrum, which is a very easy thing: all the amplitudes will be equal, all the phases will be determined by the QAM. We will use one random bit per carrier to set its phase (we use random bits in order to simulate data, because we do not have any real data here). Each random bit will be generated by a random process. Each random process we will call here "data source" for that bit. (I hope this answers your question about what these "data sources" in front of the iFFT module are). Each such data source will be in fact a Bernoulli binary generator. This in Excel is all very simple -- just generate one random number.

After the iFFT we will have an ordinary time-domain signal, which will be mixed with white noise and attenuated just like in the case of normal BPSK. The demodulation will be done in the same way too. Please see and re-read first the notes to the Normal BPSK in order to understand why we use in our model not a BPSK demodulator but forward Fourirer transform (fast Fourier transform -- FFT).

The simulation worksheet implements this model.

See below a diagram of the setup. To start a simulation display its worksheet, enter appropriate values in the white cells only (do not change the values in the coloured cells -- they are calculated automatically). Press F9 key to recalculate.

You can press several times F9 key to see several different realisations of the signal and the interference. You may even press and hold down F9 key and then, if you have a fast computer, you will see everything moving "live" like on a digital analyser.

The best way for running the worksheet is to check the START radio button. It will then run automatically. You can change the valus of the different parameters while the worksheet is running and see immediatelty the effect of the change.

Each time you press F9 a new instance of the signals is generated, a new FFT is calculated and as many bits of information are sent and received as there are carriers. The interference between different pressings of F9 is uncorrelated, and the phases of the carriers are discontinuous. Hence this model calculates the bit probability of error, not the system probability of error.

Most of the signals are displayed as graphs and as tables. Where FFT is used its formula is entered as an Excel Array Formula. Please read Excel Help file on how to work, enter and edit Array Formulas. (This is very much like working with ordinary formulas, but you have first to select all cells with the same formula, then edit the formula and at the end you MUST press Ctrl-Shift-Enter and NOT just Enter).

There is an FFT module which you may look at and use in a different way or even in your other work. To see it go to Tools menu, Macro, Visual Basic Editor (or simply press Alt-F11 key).

There is a lot more to this model, which I have created for you. Please look around it carefully and use your own judgement. It is impossible to say everything and to explain everything here. Also note, that this workbook is not entirely foolproof, yet. For this reason entering any input values which do not follow its simple logic will break it and will produce erroneous results without any warning.

Yours truly,

Plamen

16-27/Apr./2005 (last updated 18/May/2007)

B. The Setup

This is a static picture illustrating the structure of the simulation:

C. The Simulation Displays

This is a screenshot of the simulation display with its input and output parameters (on one worksheet, click on the image to see it in true scale):

D. The Workbooks

Two workbooks are attached below, they are largely identical and the main difference is that one is for Excel 2003 and earlier, while the other is for Excel 2007 and later.

Both workbooks contain VBA code, which is required for them to perform the simulation. The Excel spreadsheet contains barely any calculations, so if VBA code (also known as 'macros') is disabled, then the workbooks will be static and of little use. Please make sure that you do not disable macros when you open the workbooks.

The latest edition of the workbooks (attached below) has a feature which will not show the simulation worksheets if macros are disabled. So if after opening the simulation workbook you only see a single sheet with a warning that macros are disabled, then please follow the instructions on that worksheet and enable running macros in order to see the simulation and play with it.

E. How to Download a Workbook or Leave a Comment

You can download the workbooks by clicking on the small arrow icon on the far right end in each line [].

You are also very welcome to leave a comment. To do so you need to sign in to your Google Account (or create one):Sign in

Thanks for looking here and eventually downloading a simulation workbook. I hope you find something useful in them. Enjoy!