资源简介
matlab对耦合模理论的仿真代码,可以运行。
代码片段和文件信息
% APPENDIX A : Matlab Code for Simulation of
% Gratings using the Transfer
% Matrix Method
%THIS M-FILE USES THE TRANFER MATRIX METHOD TO EVALUATE THE COUPLED-MODE
%EQUATIONS. THE REFLECTION SPECTRUM OF THE GRATING AND THE TRANSMISSION
%SPECTRUM DELAY AND DISPERSION OF THE FABRY-PEROT FILTER ARE SIMULATED
clear all
clc
%======================================================================
% Fibre simulation parameters
walD = 1.55e-6; %design wavelength
wal1 = 0.999*walD;
wal2 = 1.001*walD;
step = 500;
wal = [wal1:(wal2-wal1)/step:wal2];
%======================================================================
%For a grating of maximun reflectance R = 0.2
Rmax = 0.2; %required maximum reflectivity
rmax = sqrt(Rmax);
kacL = atanh(rmax);
c = 2.99793e8; %Speed of light
h = 25e-9;
v = 1; %Fringe visibilty
%======================================================================
%Implementation of the transfer matrix method for solution of
%coupled-mode equations
nef = 1.47; %core index of photosensitive fibre
L = 3000e-6; %length of grating in micrometers
M = 100;
dz = L/M;
dzo = - L + 10.69e-3; %Distance between gratings
kac = kacL/L; %“AC“ coupling coefficient
kdc = 2*kac/v; %“DC“ coupling coefficient
for (r = 1:step+1)
w = wal(r);
F = [1 0; 0 1];
for(s = 1:M)
det = 2*pi*nef*(1/w - 1/walD);
gdc = det + kdc;
p1 = sqrt(kac^2 - gdc^2);
p2 = gdc^2/kac^2;
f11 = cosh(p1*dz) - i*(gdc/p1)*sinh(p1*dz);
f12 = -i*(kac/p1)*sinh(p1*dz);
f21 = i*(kac/p1)*sinh(p1*dz);
f22 = cosh(p1*dz) + i*(gdc/p1)*sinh(p1*dz);
ff = [f11 f12; f21 f22];
F = ff*F;
end
r3(r) = F(21)/F(11); %amplitude reflection coefficient
R3(r) = (abs(r3(r)))^2; %power reflection coefficient
%of single grating
PHI = 2*pi*nef*dzo/w; %phase difference between gratings
Fp = [exp(-i*PHI) 0; 0 exp(i*PHI)];
Ffp = F*Fp*F;
t3(r) = 1/Ffp(11); %amplitude transmission coefficient
T3(r) = (abs(t3(r)))^2; %power transmission coefficient of
%Fabry-Perot filter
end
%==================================================================
%Calculate Delay and Dispersion of Fabry-Perot Filter
theta = phase(r3);
dtheta1 = gradient(theta h);
dtheta2 = gradient(dtheta1 h);
DELAY3 = -((wal.^2)./(2*pi*c)).*dtheta1;
DELAYu3 = DELAY3*1e12; %delay in (ps)
DISPERSION3 = (2*DELAY3./wal) - ((wal.^2)./(2*pi*c)).*dtheta2;
DISPERSIONu3 = DISPERSION3*(1e12/1e9); %dispersion in (ps/nm)
%=====================================================================
%Plots for reflection and transmission spectra for Bragg reflector and
%Fabry-Perot filter respectively
figure (1)
plot(wal*1e9 R3 ‘k‘)
grid
axis([1549 1551.5 0 0.2])
title(‘Reflection Spectrum of Bragg Reflector‘)
xlabel(‘Wavelength (nm)‘)
ylabel(‘Power (p.u)‘)
figure (2)
plot(wal*1e9 T3 ‘k‘)
grid
axis([1549 1551.5 0.4 1])
title(‘Transmission Spectrum of the Fabry-Perot Filter‘)
xlabel(‘Wavelength (nm)‘)
ylabel(‘Power (p.u)‘)
figure (3)
plot(wal*1e9 DELAYu3 ‘k‘)
grid
axis([1549 1551.5 0.4 1]
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 3361 2010-05-04 15:21 tmmcoupling.m
- 上一篇:光栅反射率光谱的matlab仿真代码
- 下一篇:蜂窝网无线定位仿真程序
相关资源
- 蜂窝网无线定位仿真程序
- 光栅反射率光谱的matlab仿真代码
- matlab中如何实现平均梯度的计算
- 使用matlab实现的小波变换彩色图像水
- Matlab气体模拟扩散编程代码
- 捷联惯导仿真程序-MATLAB源代码
- matlab图像处理小波变换m文件及部分注
- Rake接收机 Matlab程序仿真
- 802.11DCF matlab仿真程序
- CT图像重建、投影matlab代码
- 基于MATLAB的滤波器 毕业设计
- 基于RLS和LMS的自适应滤波器的MATLAB代
- 混沌系统驱动响应同步代码
- DMC动态矩阵控制MATLAB程序(简易
- 无功补偿与谐波抑制APF,PPF,以及混
-
变步长的INC_MPPT算法仿真(simuli
nk - 简单matlab车牌字符分割
- 交通仿真Matlab程序
- SOFC Matlab 仿真
- 信号调制识别matlab程序
- 用MATLAB编写的混沌序列图像加密程序
- T-S模糊系统结论参数的MATLAB仿真研究
- Matlab2012a破解i包全部资源
- matlab实现sift提取特征点
- 啁啾光纤光栅
- Tight Binding处理Graphene能带的Matlab程序
-
MATLAB SIMUli
nk通信系统建模仿真讲解 - 分支定界法Matlab程序实现与验证.pdf
- pro+sail的计算matlab版本
- matlab版本频率估计
评论
共有 条评论