Implementaion of OFDM using matlab

Started by May 23, 2008
Im doing a project on OFDM, the block diagram and the simulation code used is present in the following path

Below are my questions regarding OFDM and also on this code. Kindly help me on this as early as possible. Im in a hurry please...

1. At the beginning of transmission, we are getting the digital signal, is the signal getting converted to Analog before traveling through the medium?

If yes, where are we doing this D/A conversion? Or if we are sending the digital signals through the medium, they are immune to noise since they are digital what is it happening exactly?
2. Mathematical representation of SNR as related to OFDM?

They have used a the below code for SNR:
if SNR < 300,

SigPow = std(TimeSignal); %find the signal power
NoiseFac = 10^(0-(SNR/20));
TimeSignal = TimeSignal + randn(1,length(TimeSignal))*SigPow*NoiseFac;

Here if im not wrong, They are converying the ndb value set in the settings.m file to normal value. But, normally the db value for power is converted to normal value by taking a anti log of it i.e; 10^(SNR/10).
But in the code they have used 10^(0-(SNR/20)); I dont understand wht they have used this equation.

3. There are lots of equations used to calulate BER/SNR/Signal Power/Noise power/RMS valu etc.. dont know what is the exact equations used. Can you plase suggest the document where I can find all the equations used in the code? It will help me in understanding the code.
Or can you just mail the exact equations used to write the code so that if the matlab version is not understanble i can try with normal equations.

4. There are Two headers in the code, One with f=0.25 and the other with f=0.117. What do they signify?

Generate a set of tones for the pre and post signals

f = 0.25; %Frequency 0.5 = nyquist rate

N = (ifftsize+guardtime)*8;

Header = sin(0:f*2*pi:f*2*pi*(N-1));

f = 0.117;

Header = Header + sin(0:f*2*pi:f*2*pi*(N-1));

5.What do you mean by scaling the signal? Why are we doing that? Please let us know the significance of FullScaleFlag variable used in the code.
The following piece of code is present in imagetx.m file. Please explain

Scale the signal
%================disp([\'N: \' num2str(N)]);
disp([\'Lenght: \' num2str(Len)]);
MaxSig = max(abs(TimeSignal(N:length(TimeSignal)-N))); %Find the max of the OFDM signal
%removing the header and trailer before
%finding the maximum
RMSSig = std(TimeSignal(N:length(TimeSignal)-N));
if (FullScaleFlag==1)
TimeSignal = TimeSignal*FullScale/MaxSig;
RMSSig = RMSSig/MaxSig*FullScale;
MaxSig = FullScale;
TimeSignal = TimeSignal*sqrt(TxSignalPow)/RMSSig;
ind = find(abs(TimeSignal)>0.9999); %Clip the signal to -1 to +1
TimeSignal(ind) = ones(size(ind)).*sign(TimeSignal(ind))*0.9999;
%Recalculate the Maximum and the RMS signal
MaxSig = max(abs(TimeSignal(N:length(TimeSignal)-N)));
RMSSig = std(TimeSignal(N:length(TimeSignal)-N));

Kindly reply with the answers as early as possible and do the needful.