%% Simulation / Modélisation d'un système de photodétection % Module : Ingénierie Electronique % pour le Traitement de l'Information %-------------------------------------------------------------- % TD_10 : Photodétection - Modélisation %-------------------------------------------------------------- % Auteur : Julien VILLEMEJANE % Date : 27/08/2020 %-------------------------------------------------------------- clear all; close all; %% Constantes % Résistances de charge (3 valeurs différentes) Rphd1 = 1e6; Rphd2 = 1e5; Rphd3 = 1e4; % Valeur standard Cphd = 70e-12; % Oscilloscope Re = 1e8; Ce = 120e-12; %% Fonction de transfert d'un système de photodétection simple % Incluant le système de mesure à l'oscilloscope et 1m de cable coaxial % --> Hx(jw) = Rphdx / (1 + jw/wcx) f = logspace(1,7,101); % vecteur des pulsations entre 10^-1 et 10^7 % Système 1 Req1 = Re*Rphd1/(Re+Rphd1); Ceq1 = Ce+Cphd; wc1 = 2*pi*1/(Req1*Ceq1); tf_num1 = Rphd1; tf_den1 = 1 + 1*j * (2*pi*f)/wc1; % Fonction de transfert H_AOP_BO1 = tf_num1 ./ tf_den1; % Système 2 Req2 = Re*Rphd2/(Re+Rphd2); Ceq2 = Ce+Cphd; wc2 = 2*pi*1/(Req2*Ceq2); tf_num2 = Rphd2; tf_den2 = 1 + 1*j * (2*pi*f)/wc2; % Fonction de transfert H_AOP_BO2 = tf_num2 ./ tf_den2; % Système 3 Req3 = Re*Rphd3/(Re+Rphd3); Ceq3 = Ce+Cphd; wc3 = 2*pi*1/(Req3*Ceq3); tf_num3 = Rphd3; tf_den3 = 1 + 1*j * (2*pi*f)/wc3; % Fonction de transfert H_AOP_BO3 = tf_num3 ./ tf_den3; % Diagramme de Bode figure(1); subplot(2,1,1); semilogx(f, 20*log10(abs(H_AOP_BO1)), f, 20*log10(abs(H_AOP_BO2)), f, 20*log10(abs(H_AOP_BO3))); grid on; xlabel('fréquence (Hz)'); ylabel('Gain (dB)'); legend('R=1MO','R=100kO','R=10kO'); subplot(2,1,2); semilogx(f, angle(H_AOP_BO1),f, angle(H_AOP_BO2),f, angle(H_AOP_BO3)); grid on; xlabel('fréquence (Hz)'); ylabel('Phase (rd)'); %% Fonction de transfert d'un système de photodétection transimpédance % Incluant le système de mesure à l'oscilloscope et 1m de cable coaxial % --> Hx(jw) = Rphdx / (1 + jw/wcx) % Modèle de l'ALI A0 = 1e5; % Amplification différentielle A funitaire = 1e6; % Bande-passante unitaire fc = funitaire/A0; % Fréquence de coupure en boucle ouverte wc = 2*pi*fc; % Système 1 wc11 = 2*pi*1/(Rphd1*Cphd); tf_num11 = A0*Rphd1; tf_den11 = A0 + (1 + 1*j * (2*pi*f)/wc).*(1 + 1*j * (2*pi*f)/wc11); % Fonction de transfert H_AOP_BO11 = tf_num11 ./ tf_den11; % Système 2 wc12 = 2*pi*1/(Rphd2*Cphd); tf_num12 = A0*Rphd2; tf_den12 = A0 + (1 + 1*j * (2*pi*f)/wc).*(1 + 1*j * (2*pi*f)/wc12); % Fonction de transfert H_AOP_BO12 = tf_num12 ./ tf_den12; % Système 3 wc13 = 2*pi*1/(Rphd3*Cphd); tf_num13 = A0*Rphd3; tf_den13 = A0 + (1 + 1*j * (2*pi*f)/wc).*(1 + 1*j * (2*pi*f)/wc13); % Fonction de transfert H_AOP_BO13 = tf_num13 ./ tf_den13; % Diagramme de Bode figure(2); subplot(2,1,1); semilogx(f, 20*log10(abs(H_AOP_BO11)), f, 20*log10(abs(H_AOP_BO12)), f, 20*log10(abs(H_AOP_BO13))); grid on; xlabel('fréquence (Hz)'); ylabel('Gain (dB) / Trans'); legend('R=1MO','R=100kO','R=10kO'); subplot(2,1,2); semilogx(f, angle(H_AOP_BO11),f, angle(H_AOP_BO12),f, angle(H_AOP_BO13)); grid on; xlabel('fréquence (Hz)'); ylabel('Phase (rd)'); % Diag Bode entre simple et transimpédance figure(3); subplot(2,1,1); semilogx(f, 20*log10(abs(H_AOP_BO1)), f, 20*log10(abs(H_AOP_BO2)), f, 20*log10(abs(H_AOP_BO3))); grid on; title('Montage simple'); xlabel('fréquence (Hz)'); ylabel('Gain (dB)'); legend('R=1MO','R=100kO','R=10kO'); subplot(2,1,2); semilogx(f, 20*log10(abs(H_AOP_BO11)), f, 20*log10(abs(H_AOP_BO12)), f, 20*log10(abs(H_AOP_BO13))); grid on; title('Montage transimpédance'); xlabel('fréquence (Hz)'); ylabel('Gain (dB) / Trans'); legend('R=1MO','R=100kO','R=10kO'); %% Comparaison avec Cphd f2 = logspace(3,7,1001); % vecteur des pulsations entre 10^-1 et 10^7 Cphd2 = 10e-12; % Système 1 wc111 = 2*pi*1/(Rphd1*Cphd); tf_num111 = A0*Rphd1; tf_den111 = A0 + (1 + 1*j * (2*pi*f2)/wc).*(1 + 1*j * (2*pi*f2)/wc111); % Fonction de transfert H_AOP_BO111 = tf_num111 ./ tf_den111; % Système 2 wc112 = 2*pi*1/(Rphd1*Cphd2); tf_num112 = A0*Rphd1; tf_den112 = A0 + (1 + 1*j * (2*pi*f2)/wc).*(1 + 1*j * (2*pi*f2)/wc112); % Fonction de transfert H_AOP_BO112 = tf_num112 ./ tf_den112; % Système 3 wc113 = 2*pi*1/(Rphd2*Cphd); tf_num113 = A0*Rphd2; tf_den113 = A0 + (1 + 1*j * (2*pi*f2)/wc).*(1 + 1*j * (2*pi*f2)/wc113); % Fonction de transfert H_AOP_BO113 = tf_num113 ./ tf_den113; % Système 4 wc114 = 2*pi*1/(Rphd2*Cphd2); tf_num114 = A0*Rphd2; tf_den114 = A0 + (1 + 1*j * (2*pi*f2)/wc).*(1 + 1*j * (2*pi*f2)/wc114); % Fonction de transfert H_AOP_BO114 = tf_num114 ./ tf_den114; % Diagramme de Bode figure(4); subplot(2,1,1); semilogx(f2, 20*log10(abs(H_AOP_BO111)), f2, 20*log10(abs(H_AOP_BO112)),f2, 20*log10(abs(H_AOP_BO113)), f2, 20*log10(abs(H_AOP_BO114))); grid on; xlabel('fréquence (Hz)'); ylabel('Gain (dB) / Trans'); legend('R=1MO / Cphd=70pF','R=1MO / Cphd=20pF','R=100kO / Cphd=70pF','R=100kO / Cphd=20pF'); subplot(2,1,2); semilogx(f2, angle(H_AOP_BO111),f2, angle(H_AOP_BO112),f2, angle(H_AOP_BO113),f2, angle(H_AOP_BO114)); grid on; xlabel('fréquence (Hz)'); ylabel('Phase (rd)'); %% Comparaison % Diagramme de Bode figure(5); semilogx(f, 20*log10(abs(H_AOP_BO2)), f, 20*log10(abs(H_AOP_BO12))); grid on; xlabel('fréquence (Hz)'); ylabel('Gain (dB)'); legend('Simple R = 100kO','Transimpedance');