Minor changes from lab pc
This commit is contained in:
54
Functions/Lab_helper/measureMZMtransferfunction.m
Normal file
54
Functions/Lab_helper/measureMZMtransferfunction.m
Normal file
@@ -0,0 +1,54 @@
|
||||
|
||||
% Measure Bias Curve of Modulator
|
||||
% 1) Loop over bias volate
|
||||
% 2) measure voltgae, current and input laser power and output laser power
|
||||
|
||||
|
||||
v_bias_range = [0:0.25:8];
|
||||
v_bias_meas = NaN(size(v_range));
|
||||
i_bias_meas = NaN(size(v_range));
|
||||
p_out_meas = NaN(size(v_range));
|
||||
|
||||
%% DC Source
|
||||
dcs = DC_supply("active",[1,0],"voltage",[0, 6]);
|
||||
|
||||
|
||||
%% Optical Attenuator
|
||||
voa = OptAtten("active",[0,0,2,0],"value",[0,0,0,0],"wavelength",[1550,1550,1550,1550]);
|
||||
voa.set('value',[0,0,2,0]);
|
||||
voa.readvals();
|
||||
|
||||
for i = 1:numel(v_bias_range)
|
||||
|
||||
dcs.set('voltage',[v_bias_range(i),6]);
|
||||
% pause(1);
|
||||
|
||||
[p1,p2,p_out_meas(i),p4]= voa.readPower;
|
||||
[v_meas,i_meas] = dcs.readVals;
|
||||
v_bias_meas(i)=v_meas(1);
|
||||
i_bias_meas(i)= i_meas(1);
|
||||
|
||||
figure(1)
|
||||
clf
|
||||
subplot(2,1,1)
|
||||
hold on
|
||||
plot(v_bias_meas,p_out_meas,'DisplayName','MZM TF in dB');
|
||||
xlabel('V_{bias} in V');
|
||||
ylabel('P_{out} in dBm');
|
||||
grid on
|
||||
xlim([min(v_bias_range), max(v_bias_range)])
|
||||
|
||||
|
||||
subplot(2,1,2)
|
||||
hold on
|
||||
plot(v_bias_meas,db2pow(p_out_meas),'DisplayName','MZM TF in mW');
|
||||
xlabel('V_{bias} in V');
|
||||
ylabel('P_{out} in mW');
|
||||
grid on
|
||||
xlim([min(v_bias_range), max(v_bias_range)])
|
||||
|
||||
end
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user