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

조회 수: 1 (최근 30일)
ZhiH
ZhiH 2014년 4월 7일
댓글: ZhiH 2014년 4월 8일
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.
ZhiH
ZhiH 2014년 4월 8일
OK. Thanks all the same.

댓글을 달려면 로그인하십시오.

카테고리

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