clear
% INPUT PARAMETERS *****************************************************
c = 299792.458; %speed of ligth nm/ps
% Input Field Paramenters
N2 = 1^2; % Soliton Order
tfwhm = 50; % ps
lamda_pulse = 1030; % pulse central lambda (nm)
fo=c/lamda_pulse; % central pulse frequency (THz)
% smf1 module parameters
smf1.Aeff = 42.6488; % Effective mode area (um^2)
smf1.n2 = 30; % Kerr coefficient (10^-16*cm^2/W)
smf1.gamma = 2*pi*smf1.n2/lamda_pulse/smf1.Aeff*1e4; % W^-1 * km^-1
smf1.alpha = 0; % atenuation coef. (km^-1)
smf1.L = 0.0015; % fiber length (km)
smf1.betaw = [0 0 17.8777 39.4876e-6]; % beta coefficients (ps^n/nm)
smf1.raman = 0; % exclude raman effect
smf1.ssp = 0; % disable self sharpen effect
% amf module parameters
amf1 = smf1;
amf1.L = 0.00015;
amf1.gssdB = 20; % small signal gain coefficient(dB)
amf1.PsatdBm = 41; % saturation input power(dBm)
amf1.lamda_gain = lamda_pulse; % central wavelength of gain (nm)
amf1.landa_bw = 100; % gain bandwidth (FWHM, nm)
amf1.fc = c/amf1.lamda_gain; % central frequency of gain (THz)
amf1.fbw = c/(amf1.lamda_gain)^2*amf1.landa_bw; % gain bandwidth (THz)
% smf2 module parameters
smf2 = smf1;
smf2.L = 0.002-smf1.L-amf1.L;
% smf3 module parameters
smf3 = smf1;
smf3.L = 0.0005;
% smf4 module parameters
smf4 = smf1;
% smf5 module parameters
smf5 = smf1;
smf5.L = 0.0115; %
% amf2 module parameters
amf2 = amf1;
amf2.gssdB = 35; % small signal gain coefficient(dB)
amf2.L = 0.004; %
% filter parameters
filter.lamda_c = lamda_pulse;
filter.landa_bw = 15;
filter.fc = c/filter.lamda_c;
filter.f3dB = c/(filter.lamda_c)^2*filter.landa_bw;
filter.n = 1;
% coupler parameters
rho = 0.45; % NALM
rho_out = 0.35; % Output coupler
% Numerical Parameters
nt = 2^11; % number of spectral points
time = 70; % ps
dt = time/nt; % ps
t = -time/2:dt:(time/2-dt); % ps
df=1/(nt*dt); % frequencies separation (Thz)
f=-(nt/2)*df:df:(nt/2-1)*df; % frequencies vector (en THz)
lambda = c./(f + c/lamda_pulse); % lambdas vector (nm)
w = 2*pi*f; % angular frequencies vector (en THz)
dz = 0.00001; % longitudinal step (km)
tol = 2e-4; % photon error number, or local error, depending on the used method.
% INPUT FIELD ************************************************************
P_peak = 2*N2*abs(smf1.betaw(3))/smf1.gamma/tfwhm^2; % Peak power of the initial pulse (W)
u0 =sqrt(P_peak)*sech(t/tfwhm); %initial field shape in W^0.5
randn('state',0);
u0 = wgn(nt,1,25)'.*u0;
PeakPower = max(u0.^2);
fprintf(1,'\n----------------------------------------------\n');
fprintf('Input Peak Power (W) = %5.2f\n',PeakPower);
b = dt*sum(abs(u0.^2));
fprintf('Input Pulse Energy in pJ = %5.2f\n', b );
% uncomment next codes to exclude gain
% if isfield(amf,'gssdB')
% amf = rmfield(amf,'gssdB');
% end
% PR0PAGATE finding numerical solution **********************************
%************************************************************************
fprintf('\nInteraction Picture Method started\n');
tic
spec_z = [];
u_z = [];
u = u0;
h1 = waitbar( 0,'The program is running...');
N_trip = 25;
for ii = 1:N_trip
waitbar( (ii-1)/N_trip,h1);
[u,nf,Plotdata_smf4] = IP_CQEM_FD(u,dt,dz,smf4,fo,tol,1,0);
[u,nf,Plotdata_amf2] = IP_CQEM_FD(u,dt,dz,amf2,fo,tol,1,0);
[u,nf,Plotdata_smf5] = IP_CQEM_FD(u,dt,dz,smf5,fo,tol,1,0);
[uf,ub] = coupler(u,0,rho);
% forward light cp1o-smf1-amf-smf2-cp2o
[ufo,nf,Plotdata] = IP_CQEM_FD(uf,dt,dz,smf1,fo,tol,1,0);
[ufo,nf,Plotdata] = IP_CQEM_FD(ufo,dt,dz,amf1,fo,tol,1,0);
[ufo,nf,Plotdata] = IP_CQEM_FD(ufo,dt,dz,smf2,fo,tol,1,0);
% backward light cp2o-smf2-amf-smf1-cp1o
[ubo,nf,Plotdata] = IP_CQEM_FD(ub,dt,dz,smf2,fo,tol,1,0);
[ubo,nf,Plotdata] = IP_CQEM_FD(ubo,dt,dz,amf1,fo,tol,1,0);
[ubo,nf,Plotdata] = IP_CQEM_FD(ubo,dt,dz,smf1,fo,tol,1,0);
[ur,ut] = coupler(ubo,ufo,rho);
u = ut;
% ut->smf3->filter->output coupler->smf4->amf2->smf5->NALM
[u,nf,Plotdata_smf3] = IP_CQEM_FD(u,dt,dz,smf3,fo,tol,1,1);
[u,uout] = coupler(u,0,rho_out);
u_f = filter_gauss(u,filter.f3dB,filter.fc,filter.n,fo,df);
u = u_f;
%---------plot temporal input and output pulses
figure(1);
plot (t,abs(u0).^2,'b.-',t,abs(uout).^2,'r.-');axis tight;
grid on;
xlabel ('t (ps)');
ylabel ('|u(z,t)|^2 (W)');
title ('Initial (blue) and Final (green) Pulse Shapes');
%---------plot output spectrum------------------
spec = fftshift(abs(fft(uout)).^2);
specnorm = spec ./lambda.^2;
specnorm = specnorm/max(specnorm);
figure(3)
plot(c./(f + fo),specnorm,'r.-');axis tight;
grid on;
xlabel ('lambda (nm)');
ylabel ('Normalized Spectrum (a.u.)');
title ('Output Spectrum');
spec_z = [spec_z;specnorm];
u_z = [u_z;uout];
end
close(h1)
tx = toc;
fprintf('\nSimulation lasted (s) = %5.2f%\n', tx );
% PLOT RESULTS ************************************************************
figure(4),surf(t,1:N_trip,abs(u_z).^2);
colorbar;axis tight;shading interp;
ylabel ('run trip');
xlabel ('t (ps)');
zlabel ('|u(z,t)|^2 (W)');
title ('Output Optical Field Evolution');
% axis([-0.5,0.5,0,max(Plotdata.z),0,max(max(abs(Plotdata.u).^2))])
view(0,90);
figure(5),surf(c./(f + fo),1:N_trip,spec_z);
colorbar;axis tight;
shading interp;
ylabel ('run trip');
xlabel ('lambda (nm)');
zlabel ('Normalized Spectrum (a.u.)');
title ('Output Spectrum Evolution');
% axis([1500,1600,0,max(Plotdata.z),0,1])
view(0,90);
phase_out = phase(uout);
delta_w = diff(phase_out);
Eout = abs(uout).^2;
[uout_max,I_uout_max] = max(Eout);
[width,I_l,I_r] = fwhm(Eout);
range = floor((I_uout_max-1*width):(I_uout_max+0.9*width));
figure(6);[ax,p1,p2] = plotyy(t,Eout,t(range),delta_w(range),'plot','plot');
grid on; axis tight;
xlabel (['t (ps)',sprintf(',%.1fps',width*dt)]);
ylabel (ax(1),'|u(z,t)|^2 (W)');
ylabel(ax(2),'Chirp(THz)') % label right y-axis
ut_fft = repmat(abs(fftshift(fft(ut))),20,1);
u_f_fft = repmat(abs(fftshift(fft(u_f))),20,1);
uout_fft = repmat(abs(fftshift(fft(uout))),20,1);
Plotdata.ufft = [Plotdata_smf4.ufft;Plotdata_amf2.ufft;Plotdata_smf5.ufft;ut_fft;Plotdata_smf3.ufft;uout_fft;u_f_fft];
spec = abs(Plotdata.ufft').^2;
specnorm = spec ./(lambda'*ones(1,size(spec,2))).^2;
% specnorm = specnorm./(ones(size(spec,1),1)*max(specnorm));
specnorm = specnorm/max(specnorm(:));
figure(7),surf(c./(f + fo),1:size(Plotdata.ufft,1),specnorm');
colorbar;axis tight;
shading interp;
xlabel ('lambda (nm)');
zlabel ('Normalized Spectrum (a.u.)');
title ('Last Trip Spectrum Evolution');
view(0,90);
ut_t = repmat(ut,20,1);
u_f_t = repmat(u_f,20,1);
uout_t = repmat(uout,20,1);
Plotdata.u = [Plotdata_smf4.u;Plotdata_amf2.u;Plotdata_smf5.u;ut_t;Plotdata_smf3.u;uout_t;u_f_t];
figure(8),surf(t,1:size(Plotdata.u,1),(abs(Plotdata.u)).^2);
colorbar;axis tight;
shading interp;
xlabel ('t (ps)');
zlabel ('|u(z,t)|^2 (W)');
title ('Last Trip Pulse Evolution');
view(0,90);
没有合适的资源?快使用搜索试试~ 我知道了~
基于MATLAB实现的NALM锁模激光器仿真,非线性环路反射镜锁模获得飞秒激光脉冲+使用说明文档.zip
共95个文件
m:63个
ds_store:28个
md:1个
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
0 下载量 122 浏览量
2024-05-23
09:42:49
上传
评论
收藏 140KB ZIP 举报
温馨提示
CSDN IT狂飙上传的代码均可运行,功能ok的情况下才上传的,直接替换数据即可使用,小白也能轻松上手 【资源说明】 基于MATLAB实现的NALM锁模激光器仿真,非线性环路反射镜锁模获得飞秒激光脉冲+使用说明文档.zip 1、代码压缩包内容 主函数:main.m; 调用函数:其他m文件;无需运行 运行结果效果图; 2、代码运行版本 Matlab 2020b;若运行有误,根据提示GPT修改;若不会,私信博主(问题描述要详细); 3、运行操作步骤 步骤一:将所有文件放到Matlab的当前文件夹中; 步骤二:双击打开main.m文件; 步骤三:点击运行,等程序运行完得到结果; 4、仿真咨询 如需其他服务,可后台私信博主; 4.1 期刊或参考文献复现 4.2 Matlab程序定制 4.3 科研合作 功率谱估计: 故障诊断分析: 雷达通信:雷达LFM、MIMO、成像、定位、干扰、检测、信号分析、脉冲压缩 滤波估计:SOC估计 目标定位:WSN定位、滤波跟踪、目标定位 生物电信号:肌电信号EMG、脑电信号EEG、心电信号ECG 通信系统:DOA估计、编码译码、变分模态分解、管道泄漏、滤波器、数字信号处理+传输+分析+去噪、数字信号调制、误码率、信号估计、DTMF、信号检测识别融合、LEACH协议、信号检测、水声通信 5、欢迎下载,沟通交流,互相学习,共同进步!
资源推荐
资源详情
资源评论
收起资源包目录
基于MATLAB实现的NALM锁模激光器仿真,非线性环路反射镜锁模获得飞秒激光脉冲+使用说明文档.zip (95个子文件)
使用说明文档.md 13KB
【验】NALM锁模激光器仿真,非线性环路反射镜锁模获得飞秒激光脉冲
Figure8_NALM-master 1
GNLSE
.DS_Store 6KB
Solvers
IP_CQEM_TD.m 4KB
UPM_SSFM_with_Raman.m 4KB
Linearoperator_w.m 409B
Raman_response_w.m 793B
IP_CQEM_FD.m 5KB
NonLinearoperator_w.m 952B
SSFM_with_Raman.m 4KB
UPM_SSFM.m 3KB
.DS_Store 8KB
Ultility
main_Cascade.m 3KB
sim_compare.m 500B
load_simulator_data.m 3KB
fwhm.m 356B
Coupler
coupler.m 355B
Figure8_NALM-master
GNLSE
.DS_Store 6KB
Solvers
.DS_Store 6KB
Linearoperator_w.m 409B
Raman_response_w.m 793B
IP_CQEM_FD.m 5KB
NonLinearoperator_w.m 952B
.DS_Store 6KB
Coupler
.DS_Store 6KB
coupler.m 355B
.gitattributes 378B
main3.m 7KB
filter
filter_gauss.m 785B
Utility
.DS_Store 6KB
Amplifier
.DS_Store 6KB
testcodes
.DS_Store 6KB
plotsimp.m 864B
AmpSimp
.DS_Store 6KB
filter_lorentz_tf.m 673B
gain_saturated2.m 549B
main2.m 6KB
.gitignore 670B
main3.m 7KB
main.m 5KB
NonlinearEffects
main_SMF_N_order_Soliton.m 4KB
main_SMF_sechPulse.m 4KB
main_PCF_DW.m 4KB
main_SMF_RIFS.m 3KB
main.asv 5KB
SA
.DS_Store 6KB
NOLM
NOLM_withNRPS.m 3KB
plotSA.m 283B
NOLM.m 3KB
NALM
NALM.m 4KB
filter
filter_gauss.m 785B
Amplifier
.DS_Store 6KB
testcodes
plotall.m 722B
Amplifier_test.m 3KB
plotsimp.m 864B
AmpSimp
.DS_Store 6KB
AmpSimpNonoise.m 638B
filter_lorentz_tf.m 673B
testcodes
test_onetrip_gain.m 1019B
test_Pin_Pout.m 493B
test_fzero.m 250B
test_gain_saturated.m 374B
AmpSimpNoise.m 2KB
gain_saturated3.m 496B
gain_saturated2.m 549B
main2.m 6KB
Reference
.DS_Store 6KB
Optimized_GNLSE_Solvers
IP_CQEM_TD.m 4KB
IP_CQEM_FD.m 4KB
IP_LEM_TD.m 7KB
IP_LEM_FD.m 6KB
Supercontinuum_Generation.m 2KB
gnlse_solver
test_gnlse.m 2KB
gnlse.m 2KB
Soliton_In_PCF
UPM_SSFM_with_Raman.m 5KB
Soliton_in_PCF_betaw.m 5KB
SSFM_with_Raman_ASE.m 4KB
SSFM_with_Raman.m 4KB
Soliton_in_PCF.m 5KB
UPM_SSFM.m 3KB
__MACOSX
Figure8_NALM-master 1
GNLSE
._.DS_Store 120B
Figure8_NALM-master
GNLSE
._.DS_Store 120B
Solvers
._.DS_Store 120B
._main2.m 120B
Coupler
._.DS_Store 120B
Utility
._.DS_Store 120B
._.DS_Store 120B
Amplifier
testcodes
._.DS_Store 120B
AmpSimp
._.DS_Store 120B
._.DS_Store 120B
SA
NOLM
._NOLM_withNRPS.m 120B
._.DS_Store 120B
._.DS_Store 120B
Amplifier
AmpSimp
._.DS_Store 120B
._.DS_Store 120B
Reference
._.DS_Store 120B
共 95 条
- 1
资源评论
IT狂飙
- 粉丝: 4778
- 资源: 2640
下载权益
C知道特权
VIP文章
课程特权
开通VIP
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- 小程序版基于深度学习识别4种水果-不含数据集图片-含逐行注释和说明文档.zip
- 小程序版图像分类算法对珠宝首饰分类识别-不含数据集图片-含逐行注释和说明文档.zip
- 小程序版通过CNN训练识别家具-不含数据集图片-含逐行注释和说明文档.zip
- 小程序版通过CNN训练识别衣物纹样分类-不含数据集图片-含逐行注释和说明文档.zip
- 小程序版CNN图像分类识别水生动物分类-不含数据集图片-含逐行注释和说明文档.zip
- 小程序版基于深度学习对微生物分类识别-不含数据集图片-含逐行注释和说明文档.zip
- 小程序版python语言pytorch框架的图像分类海洋生物分类识别-不含数据集图片-含逐行注释和说明文档.zip
- 小程序版通过CNN卷积神经网络的乐器分类识别-不含数据集图片-含逐行注释和说明文档.zip
- 小程序版基于图像分类算法对职业工具分类识别-不含数据集图片-含逐行注释和说明文档.zip
- 小程序版通过CNN训练识别车辆类型-不含数据集图片-含逐行注释和说明文档.zip
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功