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

electrical to optical conversion #2

Closed ghost closed 1 year ago

ghost commented 1 year ago

hi, I'm new in optics and FSO system and I'm using your code and sources to figure out the math for simulation in matlab but I'm having some problems and I appreciate if u can help me with these! in your code (FSO_system.m) in first line of section 3 where u calculate Laser_Sim_Out variable we have this equation: Laser_Sim_Out = DelP_Sim*(Signal_Sim_Out - Sig_Level); % generate laser output (W) this equation makes sense and I don't have problem with it, you are adding some DC values to your signal (Signal_Sim_Out - Sig_Level) then multiply it by DelP_Sim to convert it to optical power! the result as you comment is in Watt. but in the code we have 0 or 1 values for Signal_Sim_Out and 0.5 for Sig_Level which leads to negative values in Laser_Sim_Out for all 0 bits in Signal_Sim_Out which I can't understand what does negative values in Watt mean in optical signal! by the way it was a nice persian poem in the first of your thesis! :) I have some other problems and I would ask them in other issues cause they are related to other part of the code! thank you in advance :))

MansourM61 commented 1 year ago

Hi @mamadzol, I edited the comment to avoid any ambiguity. Thanks.