Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Ergodic Capacity Rayelig Fading Channel

Status
Not open for further replies.

RajaKashif

Newbie level 3
Joined
May 23, 2010
Messages
3
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Location
Trondheim, Norway
Activity points
1,297
Ergodic Capacity Rayeligh Fading Channel

Hi,

Is the following correct to obtain the ergodic capacity in a Rayleigh Fading Channel.

******************************************************************************

SNRdB=2;
SNR = 10 ^ (SNRdB/10);

nsample_h=2000;
N0=1; % Noise power density

cap_inst=zeros(1,nsample_h);

for ChannelLoop = 1:nsample_h
h_11 = sqrt( N0 /2)* ( randn + sqrt(-1) * randn ) ;
cap_inst(ChannelLoop)=log2 (1 + SNR * abs(h_11)^2 );
clear h_11;
end

cap_ergodic=mean ( cap_inst );
 

Check out the following code. It give Ergodic capacity for Rayleigh channel
clear all;close all;clc;
global SNRVal;
BW = 1;
SNRdB = -15:5:20;
x0 = 1; % Make a starting guess at the solution
GammaArr = zeros(1,length(SNRdB));
for ii = 1:length(SNRdB)
SNRVal = 10^(SNRdB(ii)/10);
[x,fval] = fsolve(@myfun,x0);
GammaArr(ii)= x;
end
Crayleigh = BW*(log(1+GammaArr));

%%--------------------Calling function:myfun.m------
function F = myfun(x)
global SNRVal;
% F = [2*x(1) - x(2) - exp(-x(1)); -x(1) + 2*x(2) - exp(-x(2))];
F = x-log(1+x)-SNRVal;
end
 
Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top