Simulation doesn't work , it does't show the same image as the paper...

1 次查看(过去 30 天)
Hello there!
I do have a problem with this simulation. The image is not the same as that shown in this paper(attach file). The original code looks like this:
clear all
format long
a = 52.5e-6; %core radius of MMF
a0 = 4.1e-6; %core radius of SMF
wl = 1550e-9; %lambda
n01 = 1.4544; n02 = 1.45; %refractive index of SMF
n1 = 1.4574; n2 = 1.4420; %refractive index of MMF
V0 = 2*pi*a0/wl*sqrt(n01^2-n02^2); %normalized frequency of SMF
w = a0/sqrt(log(2)*(0.65+1.619*V0^-1.5+2.879*V0^-6)); %Gauss beam FWHM
v = 1:30; %order of core modes
V = 2*pi*a/wl*sqrt(n1^2-n2^2); %normalized frequency of MMF
uv = (2*v-1/2)*pi/2;
wv = sqrt(V^2-uv.^2);
up = 2*(w/a)^2*exp(-0.5*w^2/a*uv.^2);
down1 = besselj(0,uv).^2 + besselj(1,uv).^2;
down2 = besselk(1,wv).^2./besselk(0,wv).^2;
down3 = besselj(0,uv).^2;
down = down1+(down2-1).*down3;
eta = real(up./down); %power coupling efficency
%{
eta = 2*(w/a)^2*exp(-0.5*w^2/a*((2*v-1/2)*pi/2).^2)./ ...,
(besselj(0,((2*v-0.5)*pi/2)).^2 + besselj(1,((2*v-0.5)*pi/2)).^2+ ...,
(besselk(1,sqrt(V^2-((2*v-0.5)*pi/2).^2)).^2./besselk(0,sqrt(V^2-((2*v-0.5)*pi/2).^2)).^2 -1).* ...,
besselj(0,((2*v-0.5)*pi/2)).^2);
%}
plot(v,eta,'*','markersize',5)
xlabel('Order of core modes')
ylabel('The power coupling efficiency \eta_v of smf2mmf')
It doesn't work at all. I hope someone can give me a good advise, how to deal with that. Thank you!

回答(1 个)

Image Analyst
Image Analyst 2014-4-7
You can debug it yourself after you view this: http://blogs.mathworks.com/videos/2012/07/03/debugging-in-matlab/
  3 个评论
Image Analyst
Image Analyst 2014-4-8
Sorry, no. I don't know anything about tunable fiber lenses and don't have time to read the paper, understand it, and explain it to you. Good luck though.

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Fluid Dynamics 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by