% Run this scrip to start the simulation
% The round trip loop is defined as: Output - > SESAM -> Fiber -> Output
parameter;
disp(sprintf('Now counting...'))
if Clear_flag
delete('datas\f\*.mat');
delete('datas\rt\*.mat');
disp(sprintf('Warning: All former datas have been cleared!'))
disp(sprintf('\n'))
end
tic
for rt = Start_loop : Cycle_time
disp(sprintf('Round trip: %d',rt))
% Output coupler
A_oc = sqrt(1-Attenu_sys)*A_in; %A_in初始脉冲
U=sqrt(rho)*A_oc;
V=i*sqrt(1-rho)*A_oc;
%fiber
[V_1]=SMF_ccw(V,T_span,Beta_smf,Gama,T_2,L,H,Save_step);
[V_2]=PCF_ccw(V_1,T_span,Beta_2,Gama,G_0,E_l,T_2,L,H,Save_step);
[U_1]=PCF_cw(U,T_span,Beta_2,Gama,G_0,E_l,T_2,L,H,Save_step);
[U_2]=SMF_cw(U_1,T_span,Beta_smf,Gama,T_2,L,H,Save_step)
%coupler
A_c=sqrt(rho).*U_2+sqrt(1-rho).*V_2 ;
[A_final]=SMF_left(A_c,T_span,Beta_2smf,Gama,T_2,L,H,Save_step);
E_next = trapz(T,abs(A').^2);
disp(sprintf('Pulse energy after DDL is: %g nJ',E_next/1000))
Differ = abs(sum(abs(A').^2-abs(A_in).^2)/sum(abs(A_in).^2));
disp(sprintf('Relative change: %g',Differ))
disp(sprintf('\n'))
A_in=A_final;
clear U_1 U_2 V_1 V_2 A_final U V A_oc
end
toc
没有合适的资源?快使用搜索试试~ 我知道了~
资源推荐
资源详情
资源评论
收起资源包目录
simulation_激光光纤_光纤激光器_光纤锁模_激光器_锁模光纤_源码.zip (6个子文件)
simulation
main.m 1KB
SMF_cw.m 930B
PCF_ccw.m 1011B
SMF_ccw.m 930B
PCF_cw.m 958B
SMF_left.m 1022B
共 6 条
- 1
心梓
- 粉丝: 808
- 资源: 8057
下载权益
C知道特权
VIP文章
课程特权
开通VIP
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功
- 1
- 2
- 3
前往页