How to calculate the BER for NLOS channel?

5 views (last 30 days)
Parul
Parul on 10 May 2023
Edited: Parul on 31 May 2023
qq

Answers (2)

William Rose
William Rose on 10 May 2023
The bit error rate for near-line-of-sight digital communication depends on many factors, including the carrier-to-noise ratio and the encoding. It appears that you are modeling a TV remote, or similar device, which transmits power optically to a detector. You need to estimate the noise in your system. Noise could include thermal noise (which scales with temperature), ambient light, other emitters in the room, reflections, etc.
SInce this is optical communicaiton, I would model the rception statistically with a chi-squared distribution, rather than Gaussian, since power is non-negative.
As an example of noise from ambient light, suppose the reciever were in direct sunlight, and suppose all the power in sunight would be noise in the detector. (This is unrealistic, because a detector is mainly sensitive to infrared, and the infrared power in sunlight is less than the total power. Details depend on the receiver bandwidth.) Noise power = solar constant * Adet. The units have watts, or milliwatts, as desired.
Please post the minimum amount of code that illusrates your question. Your code demonstrates that you can compute and plot the recieved power, in dBm (which is directly convertible to milliwatts of power), as a function of position in the X-Y plane. The power in your plot takes into account the detector area (Adet).
theta=70; % semi-angle at half power
m=-log10(2)/log10(cosd(theta)); %Lambertian order of emission
P_total=20; %tranmistted optical power by individeal LED
Adet=1e-4; %detector physical area of a PD
%% Optics parameters
Ts=1; %gain of an optical filter; ignore if no filter is used
index=1.5; %refractive index of a lens at a PD; ignore if no lens is used
FOV=60*pi/180; %FOV of a receiver
G_Con=(index^2)/sin(FOV); %gain of an optical concentrator
%% Room dimension
lx=5; ly=5; lz=3; % room dimension in meter
h=2.15; %the distance between source and receiver plane
Nx=lx*20; Ny=ly*20;
% number of grid in the receiver plane
XT=0; YT=0;% position of LED;
x=-lx/2:lx/Nx:lx/2;
y=-ly/2:ly/Ny:ly/2;
[XR,YR]=meshgrid(x,y);
% receiver plane grid
D1=sqrt((XR-XT(1,1)).^2+(YR-YT(1,1)).^2+h^2); % distance verctor from source 1
cosphi_A1=h./D1; % angle vector %%
H_A1=(m+1)*Adet.*cosphi_A1.^(m+1)./(2*pi.*D1.^2); % channel DC gain for source 1
P_rec=P_total.*H_A1.*Ts.*G_Con; % received power from source 1;
P_rec_dBm=10*log10(P_rec);
meshc(x,y,P_rec_dBm); xlabel('X (m)'); ylabel('Y (m)'); zlabel('Received power (dBm)');
axis([-lx/2 lx/2 -ly/2 ly/2 min(min(P_rec_dBm)) max(max(P_rec_dBm))]);
The code above runs without error, and makes a good looking surface plot with contour lines under it.

William Rose
William Rose on 10 May 2023
@Parul, the calculaiton of bit error rate depends strongly on how you model the encoding and decoding of bits, as well as how you model the noise.
For NRZ encoding, which is relatively simple, the BER is
where E is the signal power and N0 is the noise power, so E/N0 is the signal to noise ratio (SNR) (source).
Your code computes the signal power Prec, in milliwatts (I assume), at the receiver, at various X,Y positions. Do you want to know the BER at various positions? If so, you must estimate the SNR at each position. Let's assume that the noise is constant across the field. I think you are modeling a TV remote or similar deivce, which uses infrared, often at 940 nm. Let us assume that the noise is sunlight, and assume that an optical filter in the receiver passes 1% of sunlight energy to the detector. Then the noise power at the detector, in milliwatts, is
where Gsc=solar constant=1361 W/m^2, Adet=detector area=1e-4 m^2, kfilt=optical filter passband factor=0.01, and multiplication by 1000 converts power from Watts to milliwatts. Then the SNR at each postition is
Plug in the SNR to the formula above for BER.
In your code, the received power is about -36 dBm in the center to -45 dBm at the corners, i.e.
PrecdB=[-36,-45]; % received power at conter and at corner (dBm)
Prec=10.^(PrecdB/10); % received power (mW)
Gsc=1361; % solar constant (W/m^2)
Adet=1e-4; % detector area (m^2)
kfilt=0.01; % optical filter passband factor
N0=Gsc*Adet*kfilt*1000; % noise power at detector (mW)
SNR=Prec/N0; % signal to noise ratio
BER=0.5*erfc(SNR.^.5); % bit error rate
fprintf('Signal power (center,corner) = %.2e, %.2e mW\n',Prec);
Signal power (center,corner) = 2.51e-04, 3.16e-05 mW
fprintf('Noise power = %.2e mW\n',N0)
Noise power = 1.36e+00 mW
fprintf('Bit error rate (center,corner) = %.2f, %.2f\n',BER)
Bit error rate (center,corner) = 0.49, 0.50
The results above indicate that the noise is much more powerful than the signal. Therefore we get a high bit error rate, approximately 50%, which is what you expect for random guessing. The error rate is a little bit less bad in the center than in the corner, because the power is higher in the center.
  1 Comment
William Rose
William Rose on 15 May 2023
You wrote "as i increase the Modulation order above 2, it gives a flat graph. COule ypu please have a look?"
I am not sure what graph you mean. You attached a long peice of code (too long for me to analyze), and a plot. The plot does not show modulation order. The plot is not flat. Please show an example of a graph that is flat when the modulation order is above 2, and, for comparison, a plot that is NOT flat when the modulation order is less than 2. Please share the shortest and simplest version of the code that demonstrates the problem you are having. Thank you.

Sign in to comment.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!