Professional Documents
Culture Documents
University)
function [Prx_total, Prx_total_nolen, SNRdB, impulse_response_t,
impulse_response_tdiff, impulse_response_f, impulse_response_fdiff ]=
RxSNR(incidence,hdist,t,phi)
% ---------------------------------ENTER
PARAMETERS------------------------------------ %
% -------For 2 Prx_los------------------------------- %
% Transmitter Semi-angle, angle of irradiance in half (Radian)
%phi = (7.5*pi)/180;
% --------For 3 Prx_diff----------------------------- %
% Room Size and reflectivity % (Meter)
L = 5;
W = 5;
H = 3;
n_floor = 0.15;
n_wall = 0.7;
n_ceiling = 0.8;
% --------For 4 Prx_total---------------------------- %
% Photodetect Concentrator refractive index %
n_conc = 1.46;
% Gain of len %
Tf = 10.0;
% --------For 5 SNR---------------------------------- %
% Noise-bandwidth factor %
I2 = 0.562;
% Data rate (Bit per second)
Rb = 115200;
% Ambient light power (Ampere) %
Iamb = 7E-8;
% Photodiode responsivity (A/W )%
R = 0.55;
% Electron charge (C)
q = 1.60E-19;
% Amplifier bandwidth (Hz)%
Ba = 4.5E6;
% Amplifier noise density (Ampere/Hz^0.5)%
Iamf = 5e-12 ;
%----------------------------- END OF PARAMETERS
-------------------------------------%
% 2. For Prx_los %
% 3. For Prx_diff %
% 4. For Prx_total %
% 5. For SNR %
% 5. For impulse_response %
Prx_max = max(max(Prx_total));
timefunction = t.*exp(-2.*t);
diffusedtimefunction = t.*exp(-2.*(t+2));
frequencyfunction = 1./(2 + (1./t)).^2;
diffusedfreqfunction = 1./(exp(4).*(2 + (1./t)*1i).^2);
impulse_response_t = conv(Prx_max,timefunction)*0.01;
impulse_response_tdiff = conv(Prx_diff_total,diffusedtimefunction)*0.01;
impulse_response_f = Prx_max.*frequencyfunction;
impulse_response_fdiff = Prx_diff_total.*diffusedfreqfunction;
end