Monthly Archives: January 2015

Shannon Capacity CDMA vs OFDMA

We have previously discussed Shannon Capacity of CDMA and OFMDA, here we will discuss it again in a bit more detail. Let us assume that we have 20 MHz bandwidth for both the systems which is divided amongst 20 users. For OFDMA we assume that each user gets 1 MHz bandwidth and there are no guard bands or pilot carriers. For CDMA we assume that each user utilizes full 20 MHz bandwidth. We can say that for OFDMA each user has a dedicated channel whereas for CDMA the channel is shared between 20 simultaneous users.

We know that Shannon Capacity is given as

C=B*log2(1+SNR)

or in the case of CDMA

C=B*log2(1+SINR)

where ‘B’ is the bandwidth and SINR is the signal to noise plus interference ratio. For OFDMA the SNR is given as

SNR=Pu/(B*No)

where ‘Pu’ is the signal power of a single user and ‘No’ is the Noise Power Spectral Density. For CDMA the calculation of SINR is a bit more complicated as we have to take into account the Multiple Access Interference. If the total number of users is ‘u’ the SINR is calculated as

SINR=Pu/(B*No+(u-1)*Pu)

The code given below plots the capacity of CDMA and OFDMA as a function of Noise Power Spectral Density ‘No’.

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% CAPACITY OF CDMA and OFDMA
% u - Number of users
% Pu - Power of a single user
% No - Noise Power Spectral Density
%
% Copyright RAYmaps (www.raymaps.com)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

clear all
close all

u=20;
Pu=1;
No=1e-8:1e-8:1e-6;

B=20e6;
C_CDMA=u*B*log2(1+Pu./(B*No+(u-1)*Pu));

B=1e6;
C_OFDMA=u*B*log2(1+Pu./(B*No));

plot(No,C_CDMA/1e6);hold on
plot(No,C_OFDMA/1e6,'r');hold off
xlabel('Noise Power Spectral Density (No)')
ylabel('Capacity (Mbps)')
legend('CDMA','OFDMA')
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Shannon Capacity of CDMA and OFDMA
Shannon Capacity of CDMA and OFDMA

We see that the capacity of OFDMA is much more sensitive to noise than CDMA. Within the low noise region the capacity of OFDMA is much better than CDMA but as the noise increases the capacity of the two schemes converges. In fact it was seen that as the noise PSD is further increased the two curves completely overlap each other. Therefore it can be concluded that OFDMA is the preferred technique when we are operating in the high SNR regime.

Sum of Sinusoids Fading Simulator

We have previously looked at frequency domain fading simulators i.e. simulators that define the Doppler components in the frequency domain and then perform an IDFT to get the time domain signal. These simulators include Smith’s Simulator, Young’s Simulator and our very own Computationally Efficient Rayleigh Fading Simulator. Another technique that has been widely reported in the literature is Sum of Sinusoids Method. As the name suggests this method generates the Doppler components in the time domain and then sums them up to generate the time domain fading envelope. There are three parameters that define the properties of the generated signal.

1) Number of sinusoids – Higher the number better the properties of the generated signal but greater the computational complexity
2) Angle of arrival – This can be generated statistically or deterministically, spread from –pi to pi.
3) Phase of the arriving wave – This is uniformly distributed between –pi and pi.

The MATLAB code below gives three similar sum of sinusoids techniques for generating a Rayleigh faded envelope [1].

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% SUM OF SINUSOIDS FADING SIMULATORS
% fd - Doppler frequency  
% fs - Sampling frequency
% ts - Sampling period
% N - Number of sinusoids
%
% www.raymaps.com
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

clear all
close all

fd=70;
fs=1000000;
ts=1/fs;
t=0:ts:1;
N=100;

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Method 1 - Clarke
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
x=zeros(1,length(t));
y=zeros(1,length(t));

for n=1:N;n
    alpha=(rand-0.5)*2*pi;
    phi=(rand-0.5)*2*pi;
    x=x+randn*cos(2*pi*fd*t*cos(alpha)+phi);
    y=y+randn*sin(2*pi*fd*t*cos(alpha)+phi);
end
z=(1/sqrt(N))*(x+1i*y);
r1=abs(z);

plot(t,10*log10(r1))
hold on

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Method 2 - Pop, Beaulieu
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
x=zeros(1,length(t));
y=zeros(1,length(t));

for n=1:N;n
    alpha=2*pi*n/N;
    phi=(rand-0.5)*2*pi;
    x=x+randn*cos(2*pi*fd*t*cos(alpha)+phi);
    y=y+randn*sin(2*pi*fd*t*cos(alpha)+phi);
end
z=(1/sqrt(N))*(x+1i*y);
r2=abs(z);

plot(t,10*log10(r2),'r')
hold on

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Method 3 - Chengshan Xiao
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
x=zeros(1,length(t));
y=zeros(1,length(t));

for n=1:N;n
    phi=(rand-0.5)*2*pi;
    theta=(rand-0.5)*2*pi;
    alpha=(2*pi*n+theta)/N;
    x=x+randn*cos(2*pi*fd*t*cos(alpha)+phi);
    y=y+randn*sin(2*pi*fd*t*cos(alpha)+phi);
end
z=(1/sqrt(N))*(x+1i*y);
r3=abs(z);

plot(t,10*log10(r3),'g')
hold off

xlabel('Time(sec)')
ylabel('Envelope(dB)')
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

All the three techniques given above are quite accurate in generating a Rayleigh faded envelope with the desired statistical properties. The accuracy of these techniques increases as the number of sinusoids goes to infinity (we have tested these techniques with up to 1000 sinusoids but realistically speaking even 100 sinusoids are enough). If we want to compare the three techniques in terms of the Level Crossing Rate (LCR) and Average Fade Duration (AFD) we can say that the first and third technique are a bit more accurate than the second technique. Therefore we can conclude that a statistically distributed angle of arrival is a better choice than a deterministically distributed angle of arrival. Also, if we look at the autocorrelation of the in-phase and quadrature components we see that for the first and third case we get a zero order Bessel function of the first kind whereas for the second case we get a somewhat different sequence which approximates the Bessel function with increasing accuracy as the number of sinusoids is increased.

Correlation of Real and Imaginary Parts
Correlation of Real and Imaginary Parts

The above figures show the theoretical Bessel function versus the autocorrelation of the real/imaginary part  generated by method number two. The figure on the left considers 20 sinusoids whereas the figure on the right considers 40 sinusoids. As can be seen the accuracy of the autocorrelation sequence increases considerably by doubling the number of sinusoids. We can assume that for number of sinusoids exceeding 100 i.e. N=100 in the above code the generated autocorrelation sequence would be quite accurate.

[1] Chengshan Xiao, “Novel Sum-of-Sinusoids Simulation Models for Rayleigh and Rician Fading Channels,” IEEE TRANSACTIONS ON WIRELESS COMMUNICATIONS, VOL. 5, NO. 12, DECEMBER 2006.