This commit is contained in:
Silas Oettinghaus
2023-05-15 15:55:16 +02:00
parent 55db794162
commit 0086346efd
6 changed files with 265 additions and 38 deletions

View File

@@ -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;