基于matlab的衍射系统仿真 -..docxVIP

  • 18
  • 0
  • 约5.96千字
  • 约 25页
  • 2019-10-14 发布于湖北
  • 举报
成绩: 《工程光学》综合性练习二 题目: 基于matlab的衍射系统仿真 学 院 精密仪器与光电子工程学院 专 业 测控技术与仪器 年 级 20**级 班 级 **班 姓 名 20**年**月 综合练习大作业二 一、要求 3-4人组成小组,对下面给出的各题目利用Matlab等工具进行仿真。练习结束时每组提交一份报告及仿真程序。在报告中应注明各仿真结果所对应的参数,如屏与衍射屏间距、孔径形状尺寸等。 二、仿真题目 改变观察屏与衍射屏间距,观察观察屏上发生的衍射逐渐由菲涅耳衍射转为夫琅和费衍射 原理图: S点光源发出的波长lam=500纳米 S点发出光线经过单缝, 缝宽a; 单缝到衍射屏的距离L Matlab代码 clear;clc l=10; %l=input (单缝到衍射屏的距离L=); a=0.2; %a=input(单缝的宽度(mm)a=); lam=500e-6; %lam=input(波长(nm)); x=-1:0.001:1; %接收屏边界 y=x./sqrt(x.^2+l^2); z=a.*y/lam; I=1000*(sinc(z)).^2; %计算接受屏某点光强 subplot(2,1,1) %绘制仿真图样及强度曲线 image(2,x,I) colormap(gray(3)) title(单缝衍射条纹) subplot(2,1,2) plot(x,I) title(光强分布) 3)初始仿真图样(d=10) 4)改变d之后的图样(d=1000) 变化规律 根据衍射屏以及接受屏的相对位置不同,由此产生菲涅尔衍射和夫琅禾费衍射的区别,根据我们模拟的情况得到菲涅尔衍射和夫琅禾费衍射的明显不同是 夫琅禾费衍射条件下:中央有一条特别明亮的亮条纹,其宽度是其他亮条纹的两倍;其他亮条纹的宽度相等,亮度逐渐下降。 改变孔径形状、尺寸,观察图样变化 1)原理图 矩孔衍射: 透镜焦距:1000mm; 照射光波长:500nm; 孔高:a(mm);孔宽:b(mm); 圆孔衍射: 圆孔直径:r(mm); 照射光波长:500nm; 照射光波长:500nm; 2)matlab代码 矩孔衍射: focallength=1000; lambda=500; a=2.0;b=2.0; resolution=64; center=(resolution)/2; A=zeros(resolution,resolution); for i=1:1:resolution for j=1:1:resolution if abs(i-center)a*10/2 abs(j-center)b*10/2 A(j,i)=255; end end end E=ones(resolution,resolution); k=2*pi*10000/focallength/lambda; imag=sqrt(-1); for m=1:1:resolution x=m-center; for n=1:1:resolution y=n-center; C=ones(resolution,resolution); for i=1:1:resolution p=i-center; for j=1:1:resolution q=j-center; C(j,i)=A(j,i)*exp(-imag*k*(x*p+y*q)); end end E(n,m)=sum(C(:)); end end E=abs(E); I=E.^2;I=I.^(1/3); I=I.*255/max(max(I)); L=I;I=I+256; CM=[pink(255).^(2/3);gray(255)]; Colormap(CM); edge=(resolution-1)/20; [X,Y]=meshgrid([-edge:0.1:edge]); x=linspace(-edge,edge,resolution); y=linspace(-edge,edge,resolution); subplot(1,2,1); surf(x,y,L); axis([-edge,edge,-edge,edge,0,255]); caxis([0,511]); subplot(1,2,2); image(x,y,I); axis([-edge,edge,-edge,edge,0,511]); view(2); axis square; 圆孔衍射: clear lmda=500e-9; %波长 r=1.2

文档评论(0)

1亿VIP精品文档

相关文档