%-------------------------------------------------------------------------------
% Beginning of file f_Visualization.m
%-------------------------------------------------------------------------------
%
% P1 P2
% | |
% P4 | | P3
% | | DSI | |
% | S1 | | | S2 |
% | | | | | | |
% | | | | | | |
% ------------------------------------------> wavelength(nm)
% A4 A6 A1 A3 A2 A7 A5
% d g a c b h f
% (A5) (A3) (A1) (A0) (A2) (A4) (A6)
%
% Project : Calculation of nonlinear propagation in fiber for FOPA based PSA
% using 7-wave model
% FileName: f_Visualization.m
% Function: Visualization of FOPA-PSA simulation result
% Version :
% v0.0 @2015.03.20 created by W.L. Xie
% Using the ordinary differential equation (ODE) of the evolution of
% the power and phase resolved from the field evolution of the CNLSE.
%
% v0.1 @2015.12.15 modified by W.L. Xie
% Directly using the 7 complex ODE of the field evolution.
% Describe:
% Simulatie signal gain and delta_Beta vs. pump-signal separation
% Simulatie signal gain and delta_Beta vs. pump-signal relative phase
%-------------------------------------------------------------------------------
function f_Visualization( ...
sig_g, ...% Fig.01 Signal gain vs. PP_Separation
pwr_evo, ...% Fig.02 Power evolution vs. PP_Separation
del_kappa,...% Fig.03 Total phase mismatch vs. PP_Separation
sig_g_NPS,...% Fig.01 Signal gain vs. nonlineariy phase shift (rPL)
PSER_PSGA,...% Fig.06 Phase-sensitive extinction ratio and gain asymetry
PtA_TC, ...% Fig.05 Phase-to-Amplitude transfer characteristic
PtP_TC, ...% Fig.07 Phase-to-Phase transfer characteristic
PtT_TC_c ...% Fig.08 Phase-to-Trajectory transfer characteristic in complex space
)
%% Simulation paramters
global c;
global SimMod;
global NLM;
global ExcSet;
global Exc;
global Nis;
%% Global varibles
global beta_matrix;
global d_kappa_Lin;
global Var;
global Raw;
global Max;
global PCS;
global delta_beta
%% Visualizing the results
switch SimMod.Wave_mode,
case '3W1P', %
switch SimMod.Scan_mode,
case 'Center_Wavelength',
switch SimMod.Scan_cond,
case 'Normal',
%% Fig.01
% end of case 'Normal'
%---------------------------------------------------------------------
case 'Max_Min_Gain',
%% Fig.01
% end of case 'Max_Min_Gain'
%---------------------------------------------------------------------
end; % end of switch SimMod.Scan_cond
%--------------------------------------------------------------------
case 'PP_Separation',
switch SimMod.Scan_cond,
case 'Normal',
%% Fig.01 signal gain & delta kappa vs. PP_Separation
if sig_g && del_kappa,
%%
figure(01);
set(gcf,'Position',[100 100 600 450]);
hold on;
[AX,H1,H2] = plotyy(L_Detuning, G_SI_Log(:,1), L_Detuning, delta_beta(5,:));
set(H1,'LineStyle','-','Color','b','LineWidth',1.25);
set(H2,'LineStyle','-','Color','m','LineWidth',1.25);
set(AX(1),'xColor','k','yColor','b'); %
set(AX(1),'xLim',[0,100],'xTick',(0.0:10.0:100.0));
set(AX(1),'xTickLabel',sprintf('%03.1f|',get(gca,'xTick')), ...
'FontName','Arial','FontSize',12,'FontWeight','bold');
set(AX(1),'yLim',[-5.0,50.0],'yTick',(-10.0:5.0:100.0));
set(AX(2),'xColor','k','yColor','m'); %
set(AX(2),'xLim',[0,100],'xTick',(0.0:10.0:100.0));
set(AX(2),'xTicklabel',sprintf('%03.1f|',get(gca,'xTick')), ...
'FontName','Arial','FontSize',12,'FontWeight','bold');
% set(AX(2), 'yLim', [0.00,-0.05], 'yTick',(-0.05:-0.01:0.00));
grid on;
xlabel('\lambda_{sig}-\lambda_{pump} (nm)', ...
'FontName','Arial','FontSize',12,'FontWeight','bold');
set(get(AX(1),'yLabel'),'String','Signal gain (dB)');
set(get(AX(1),'yLabel'),'Color','b','FontName','Arial','FontSize',12,'FontWeight','bold');
set(get(AX(2),'yLabel'),'String','\Delta\beta_0_5 (dB)');
set(get(AX(2),'yLabel'),'Color','m','FontName','Arial','FontSize',12,'FontWeight','bold');
if SimMod.FLD_nPWR, % simulation with field
title({'Signal gain and \Delta\beta_{05}'; ...
'CM-ODE of Field, \delta\lambda_{ofs}=0, 7-wave model (Numerical)'}, ...
'FontName','Arial','FontSize',12,'FontWeight','bold');
else % SimMod.FLD_nPWR == 0, simulation with power and phase
if SimMod.PSA_nPIA, % simulation in PSA
else % SimMod.PSA_nPIA == 0, simulation in PIA
end; % SimMod.PSA_nPIA
end; % if-else SimMod.FLD_nPWR
legend([H1,H2], ...
{'Phase sensitive gain vs. \Delta\lambda'; ...
'\Delta\beta_{05} vs. \Delta\lambda_{PP}'}, ...
'FontName','Arial','FontSize',12,'FontWeight','bold','Location','Northeast');
else % sig_g && del_kappa == 0,
%
end; % end of if-else sgdb_s
%-------------------------------------------------------------------
%% Fig.02 signal gain vs. PP_Separation
if sig_g,
%%
figure(02);
set(gcf,'Position',[100 100 640 480]);
hold on;
f02 = zeros( 5, 1);
f02(01) = plot(ExcSet.Dl_PPS_wl, Max.G_SI_max_m(:,1),...
'Color', 'r',...
'LineStyle',' -',...
'LineWidth',1.25);
% f02(02) = plot(ExcSet.Dl_PPS_wl, Max.G_SI_min_m(:,1),...
% 'Color', 'b',...
% 'LineStyle',' -',...
% 'LineWidth',1.25);
%
set(gca,'xLim', [ 0, (SimMod.Freq_rang/125e9)],...
'xTick',( 0.0:SimMod.Freq_rang/125e10:SimMod.Freq_rang/125e9),...
'yLim', [floor(min(Max.G_SI_max_m(:,1))), ceil(max(Max.G_SI_max_m(:,1)))],...
'yTick',[floor(min(Max.G_SI_max_m(:,1))):...
(ceil(max(Max.G_SI_max_m(:,1)))-floor(min(Max.G_SI_max_m(:,1))))/10:...
ceil(max(Max.G_SI_max_m(:,1)))],...
'FontName','Arial',...
'FontSize',12,...
'FontWeight','normal');
grid on;
xlabel('\Delta\lambda_{PP} (nm)', ...
'FontName','Arial',...
'FontSize',12,...
'FontWeight','normal');
ylabel('Signal gain (dB)', ...
'FontName','Arial',...
'FontSize',12,...
'FontWeight','normal');
if SimMod.FLD_nPWR, % simulation with field
title({'Signal gain vs. \Delta\lambda_{PP}'; ...
'CM-ODE of Field, \delta\lambda_{OFS}=0, 5-wave Numerical'}, ...
'FontName','Arial',...
'FontSize',12,...
'FontWeight','normal');
else % SimMod.FLD_nPWR == 0, simulation with power and phase
if SimMod.PSA_nPIA, % simulation in PSA
else % SimMod.PSA_nPIA == 0, simulation in PIA
end; % SimMod.PSA_nPIA
end; % if-else SimMod.FLD_nPWR
%
legend([f02(01)], ...
{'Signal gain \the
没有合适的资源?快使用搜索试试~ 我知道了~
用7波模型计算光纤中FOPA基PSA的非线性传输matlab代码.zip
共15个文件
m:11个
mat:2个
tif:1个
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
0 下载量 12 浏览量
2024-03-18
16:18:44
上传
评论
收藏 24.27MB ZIP 举报
温馨提示
1.版本:matlab2014/2019a/2021a 2.附赠案例数据可直接运行matlab程序。 3.代码特点:参数化编程、参数可方便更改、代码编程思路清晰、注释明细。 4.适用对象:计算机,电子信息工程、数学等专业的大学生课程设计、期末大作业和毕业设计。
资源推荐
资源详情
资源评论
收起资源包目录
用7波模型计算光纤中FOPA基PSA的非线性传输matlab代码.zip (15个子文件)
用7波模型计算光纤中FOPA基PSA的非线性传输matlab代码
GaInP PhCW.mat 24.06MB
f_Cal_beta.m 2KB
f_Visualization.m 169KB
7w_Propagation_Z_ofs3.0_pps0.0_pwr15_phs421_z1x1.mat 110KB
dA_dz_7w.m 24KB
Prop_CODE_7w.m 114KB
helloword.m 20B
f_NLM.m 15KB
MaxExtraction.m 4KB
f_Init_Mem.m 19KB
f_delta_beta.m 13KB
PropZ_Pevo_7w_OFS=3.0_PP=0.0.fig 31KB
f_Create_Fld.m 10KB
PropZ_Pevo_7w_OFS=3.0_PP=0.0.tif 413KB
f_Nis_Gen.m 2KB
共 15 条
- 1
资源评论
matlab科研助手
- 粉丝: 2w+
- 资源: 2122
下载权益
C知道特权
VIP文章
课程特权
开通VIP
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功