WIP
This commit is contained in:
@@ -37,10 +37,10 @@ classdef Photodiode
|
||||
R = 50; %resistance of phdiode (50ohm is typical value)
|
||||
|
||||
% Magnitude squared detection
|
||||
yout = sum( abs(xin) .^2*obj.responsivity,1) ;
|
||||
yout = sum( abs(xin) .^2*obj.responsivity, 2 ) ;
|
||||
|
||||
% Shot Noise
|
||||
shot_noise = sqrt(k * obj.fsimu .* yout) .* randn(1,size(yout,1));
|
||||
shot_noise = sqrt(k * obj.fsimu .* yout) .* randn(size(yout,1),1);
|
||||
|
||||
yout = yout + shot_noise;
|
||||
|
||||
@@ -50,7 +50,7 @@ classdef Photodiode
|
||||
Bw = obj.fsimu; %is this correct? shouldnt it be the bandwidth of the actual component? e.g. 70GHz?
|
||||
therm_noise_pow = therm_current_psd * 2 * Bw; %squared
|
||||
|
||||
therm_noise = sqrt(therm_noise_pow) .* randn(1,size(yout,1));
|
||||
therm_noise = sqrt(therm_noise_pow) .* randn(size(yout,1),1);
|
||||
|
||||
yout = yout + therm_noise;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user