MansourM61 / FSO-Simulator-MATLAB

A fully explaned MATLAB code for simulating a free-space optical (FSO) communication system featuring channels loss, pointing error, turbulence, fog/smoke condition comparing with all analystical solutions
44 stars 23 forks source link

channel effect on signal #3

Closed ghost closed 1 year ago

ghost commented 1 year ago

hi again, I have one another question so far and I would appreciate if you can help me in this too! :) to calculate Rec_Sim_Opt in your code(FSO_System.m) in section 4, there is 3 possible ways which is defined by Fading_Add variable in GlobalParameters.m ( 'M1' for Pavg, 'M2' for signal and 'M3' for both signal and Pavg), I can't figure out what is P_avg doing here at all!! in your thesis in page 213 in last paragraph we have this: "It is possible to produce the arrived optical signal at the Rx side A by multiplying the optical signal S and the fading channel coefficient ℎ (i.e., r = S×ℎ)." in this we have no P_avg variable in the equation and we only need Laser_Sim_Out and Fading_Sim variables in the code to calculate the result by this equation: "Rec_Sim_Opt = Fading_Sim .* Laser_Sim_Out" as this paragraph in your thesis is saying! can you tell me what I'm missing here plz?

MansourM61 commented 1 year ago

Hi @mamadzol, The BER expression derived by mathematician and experts in probability and statistics is based on the fact that the signal is a time varying voltage/current with average of zero. Hence they assume that the hard decision threshold is zero.

This is not the case when you deal with optical signal and you want to do direct detection. The optical power has a non-zero average. Usually for detection purposes we remove the DC part and only deal with ac signal which is fine. However, when you deal with fading effects, the amount of fading will be significantly different when you change the average value and amplitude of the signal. Therefore, I have added all these possibilities to give the freedom to the code user to play with the results. From practical point of view, M3 is most accurate simulation. However, if you want to compare your results with what BER expressions outcome, M1 is the option to go. M2 is something in between. For those who want to deal with thresholding and adaptive techniques and also compare their results with BER expressions, M2 is the best option.

In fact if you change the methods in the code, you will see that M3 simulation results won;t match BER expression.

Hope that helped.