2. Multi-Carrier BPSK

NOTE: Please read first the notes to BPSK Normal.

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 BPSK model where 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 to calculate first for every carrier its amplitude and its phase. The amplitudes will be all eaqual, perhaps 1V, but the phases will be different -- each phase will be what it should be according to BPSK: if for a given carrier we need to transmit "1" we will set its phase to +90 degrees, and if for another carrier we need to transmit "0" we will set its phase to -90 degrees. Then 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 BPSK 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 BPSK. 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 next 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.

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!