光学喵-光学课堂 首页 资讯 查看内容

简单的衍射光学元件的设计参考

2022-2-9 16:27| 发布者:Davis| 查看:313| 评论:0|原作者: 小小光08

摘要:本文使用MATLAB介绍了衍射光学元件的设计步骤和实例,包括一维二元振幅光栅、一维正弦相位光栅、二维黑白格光栅和菲涅尔波带片等,在文章中给出了相应的MATLAB程序以及光学元件的剖面图。

 
引言:
本文使用MATLAB介绍简单的衍射光学元件的设计步骤和参考实例。
 
1.简单的衍射光学元件的设计步骤
图1:简单的衍射光学元件的设计步骤
 
2.一维二元振幅光栅的设计
能对入射光波振幅进行调制的衍射光栅称为振幅光栅,又称黑白光栅。
本例中的衍射光学元件为一维二元振幅光栅,透射率分别为T=1和T=0。
MATLAB程序如下:
%%1D Amplitudegrating%%%1D Amplitude grating%%
clear %Clear all memory
% Defining GratingParameters
N=500; %Define Matrixsize
A=zeros(1,N); %Define arow Matrix by assigning 0 to all pixels
P=100; %Define theperiod of the grating
FF=0.5; %Define fillfactor
% Constructing the Grating
for q=1:N;
if rem(q,P),P*FF; %Useremainder function ¡®rem¡¯to construct
%the grating
A(1,q)=1;
end
end
A=repmat(A,N,1);%replicate the row to create a 2D grating
% Alternative code forconstructing the grating
O=ones(N,FF*P);
Z=zeros(N, P-FF*P);
unit=[O Z];
A=repmat(unit,1,N/P);%replicate to create a 1D grating
%Observing the gratingoutput in the far field
E=fftshift(fft2(A));%fftshift is used to re-order the terms
%in their natural order
IN=(abs(E)/(N*N)).*(abs(E)/(N*N));% Calculating intensity
figure (1)
colormap(gray);%colormap(gray) is used to display grayscale
%image
imagesc(A);% imagesc isused to display a high constrast image
figure (2)
colormap(gray);
imagesc(IN);
图2:一维二元振幅光栅的剖面图

3.一维正弦相位光栅的设计
本例中的衍射光学元件为一维正弦相位光栅,透射率是空间的正弦函数。
MATLAB程序如下:
%%1D Phase grating%%
clear; %Clear all memory
% Defining GratingParameters
N=500; %Define Matrixsize
A=ones(1,N); %Define aMatrix by assigning 1 to all pixels
P=100; %Define theperiod of the grating
FF=0.5; %Define fillfactor
%%1D sinusoidal phasegrating%%
for q=1:N;
A(1,q)=exp(1i*0.59*pi*(sin(rem(q,P)*(2*pi)/P)));
end
A=repmat(A,N,1);
%Observing the gratingoutput in the far-field
E=fftshift(fft2(A));%fftshift is used to re-order the terms in their natural order
IN=(abs(E)/(N*N)).*(abs(E)/(N*N));% Calculating intensity
figure(1)
colormap(gray);
imagesc(angle(A))
figure(2)
colormap(gray);
imagesc(IN);
图3:一维正弦相位光栅的剖面图
 
4.二维黑白格光栅的设计
MATLAB程序如下:
%%Checkerboard phasegrating%%
clear; %Clear all memory
% Defining GratingParameters
N=500; %Define Matrixsize
A1=zeros(N,N); %DefineMatrices by assigning 0 to all pixels
A2=zeros (N,N);
A=zeros (N,N);
Px=100; %Define theperiods of the gratings
Py=100;
FFx=0.5; %Define fillfactors
FFy=0.5;
% Constructing thegrating
tic
for p=1:N;
for q=1:N;
if rem(q,Px)<Px*FFx;
A1(p,q)=1;
end
if rem(p,Py)<Py*FFy;
A2(p,q)=1;
end
end
end
A=exp(1i*pi*xor(A1,A2));%%XOR operation between A1 and A2
toc
%Observing the gratingoutput in the far-field
E=fftshift(fft2(A));%fftshift is used to re-order the terms in their natural order
IN=(abs(E)/(N*N)).*(abs(E)/(N*N));% Calculating intensity
figure(1)
colormap(gray);
imagesc(angle(A))
figure(2)
colormap(gray);
imagesc(IN);
图4:黑白格光栅的剖面图
 
5.菲涅尔波带片的设计
MATLAB程序如下:
clear; %Clear all memory
%Defining FZP parameters
N=500; %Define Matrixsizes
M=32;%Define the numberof grating lines
A=ones(N,N); %DefineMatrices by assigning 1 to all pixels
x=zeros(M,M);
f=3000;%Define the focallength of FZP in micrometers
lambda=0.633;%Definewavelength in micrometers
%%Circular FZP%%
% Constructing the FZP
for n=1:M; %Calculatethe width of the grating lines
r1(n)=sqrt(n*f*lambda);
end
for n=1:2:M;
for p=1:N;
for q=1:N;
r(p,q)=sqrt((p-N/2)*(p-N/2)+(q-N/2)*(q-N/2));
if r(p,q)>r1(n)&& r(p,q)<r1(n+1);
A(p,q)=exp(1i*pi);
end
end
end
end
%Observing the gratingoutput in the far-field
E=fftshift(fft2(A));%fftshift is used to re-order the terms in their natural order
IN=(abs(E)/(N*N)).*(abs(E)/(N*N));% Calculating intensity
figure(1)
colormap(gray);
imagesc(angle(A))
figure(2)
colormap(gray);
imagesc(IN);
图5:菲涅尔波带片的剖面图
 
6.多阶的衍射光学元件的设计
通常把衍射光学元件m级次的衍射效率定义为m级衍射光的能量Em与入射到衍射光学元件上的总能量E0之比,即

上式中,L=2、4、8、16…..为台阶数。
衍射效率是衍射光学元件中的关键性能指标。
衍射光学元件的衍射效率与台阶数有关。计算得不同台阶数台阶状相位光栅的一级衍射效率如下表:
台阶数
2
4
8
16
一级衍射效率
0.405
0.811
0.950
0.987
衍射效率随着台阶数的增多而增大,当台阶数L=32时接近于1,但由于工艺复杂,实际应用中多2台阶、4台阶或8台阶。
 
7.4阶相位光栅的设计
一维4阶相位光栅的最大衍射效率约为81%,其相位和对应的厚度值(@633nm)如图6所示。
图6:4阶相位DOE对应的相位和厚度值@633nm
 
一维4阶相位光栅的剖面图如图7所示。
图7:一维4阶相位光栅的示意图
 
MATLAB程序如下:
%% 4-level 1D grating
clear %Clear all memory
%% Defining gratingparameters
N=500; % Matrix size
P=100; % Grating period
A1=ones(P,N); % Size offundamental building block of grating
g=4; % Number of phaselevels
delphase= 2*pi/g; %Phasestep size
% Constructing onen-level section of the phase grating
sub=round(P/g)-1;
for count=1:g;
A1((count-1)*sub+1:count*sub,:)=exp(1i*(count-1)*delphase);
end
%Constructing the fullgrating
A2=repmat(A1,N/P,1);
%Observation of thediffraction pattern
E=fftshift(fft2(A2));%fftshift is used to re-order the terms in
%their natural order
IN=(abs(E)/(N*N)).*(abs(E)/(N*N));% Calculating intensity
figure (1)
colormap(gray);%colormap(gray) is used to display grayscale
%image
imagesc(angle(A2));%imagesc is used to display a high constrast
%image
figure (2)
colormap(gray);
imagesc(IN);
图8:4阶相位DOE的剖面图

 
8.8阶相位光栅的设计
一维8阶相位光栅的最大衍射效率约为95%,其相位如图9所示。
图9:8阶相位DOE对应的相位
 
一维8阶相位光栅的剖面图如图10所示。
图10:一维8阶相位光栅的示意图
MATLAB程序如下:
%% 4-level 1D grating
clear %Clear all memory
%% Defining gratingparameters
N=500; % Matrix size
P=100; % Grating period
A1=ones(P,N); % Size offundamental building block of grating
g=4; % Number of phaselevels
delphase= 2*pi/g; %Phasestep size
% Constructing onen-level section of the phase grating
sub=round(P/g)-1;
for count=1:g;
A1((count-1)*sub+1:count*sub,:)=exp(1i*(count-1)*delphase);
end
%Constructing the fullgrating
A2=repmat(A1,N/P,1);
%Observation of thediffraction pattern
E=fftshift(fft2(A2));%fftshift is used to re-order the terms in
%their natural order
IN=(abs(E)/(N*N)).*(abs(E)/(N*N));% Calculating intensity
figure (1)
colormap(gray);%colormap(gray) is used to display grayscale
%image
imagesc(angle(A2));%imagesc is used to display a high constrast
%image
figure (2)
colormap(gray);
imagesc(IN);
图11:8阶相位DOE的剖面图


路过

雷人

握手

鲜花

鸡蛋

最新评论

联系客服 关注微信 访问手机版 返回顶部