Chapter 4 夫琅禾费衍射-Matlab仿真

此内容理论部分出自书《Numerical Simulation Of Optical Wave Propagation With Example In Matlab》第四章 "Fraunhofer Diffraction and Lenses"


1、Fraunhofer Diffraction (夫琅禾费衍射)理论

当光从一个很远的source aperture传播过来,在探测平面其光场分布可以近似为夫琅禾费衍射的积分:

U(x_{2},y_2) =\frac{e^{ik\Delta z}e^{i \frac{k}{2\Delta z}(x_{2}^{2}+y_{2}^{2})} }{i\lambda \Delta z}\int_{-\infty }^{\infty }\int_{-\infty }^{\infty }U(x_{1},y_1) e^{-i\frac{k}{\Delta z}(x_1x_2+y_1y_2)}dx_1dy_1                      (4.1)

其中,这个“很远”的距离满足公式:

\Delta z> \frac{2D^2}{\lambda }                                                                          (4.2)

其中,\Delta z为传播距离,D为source aperture的直径,\lambda为光波长,\vec{r}_1 = (x_1,y_1)为源平面的坐标,\vec{r}_2 = (x_2,y_2)为观测平面坐标。

则公式(4.1)可以用傅里叶变换的方式表示:

U(x_{2},y_2) =\frac{e^{ik\Delta z}e^{i \frac{k}{2\Delta z}(x_{2}^{2}+y_{2}^{2})} }{i\lambda \Delta z}\Gamma \left \{ U(x_1,y_1) \right \}|_{f_{x_1}=\frac{x_2}{\lambda\Delta z},f_{y_1}=\frac{y_2}{\lambda\Delta z}}                               (4.3)

因此可以利用傅里叶变换来计算这个夫琅禾费衍射积分

公式(4.3)中,e^{ik\Delta z}为轴上相位(on-axis phase)(在下文Matlab程序中,会暂时被忽略掉。)

Note:

        为了获得一个准确的仿真结果,在程序当中应注意采样参数的设置,即grid spacing δ,spacial frequency的设置。 从上述公式推导可见,观测平面的坐标与源的空间频率存在以下关系:

x_2 = \lambda \Delta z f_{x1}                                                                     (4.4a)

y_2 = \lambda \Delta z f_{y1}                                                                     (4.4b)

则当观测平面的尺寸确定,则便会确定可观测到的来自源平面的最大空间频率:

f_{x_1,max} = \frac{x_{2,max}}{\lambda \Delta z}                                                                 (4.5a)

f_{y_1,max} = \frac{y_{2,max}}{\lambda \Delta z}                                                                 (4.5b)


2、Matlab code:

例程仿真的是一个单色平面波从一个圆形孔阑出射,传播到观测平面上,描绘其光场分布情况。

  • 主程序:
% example_fraunhofer_circ.m
% Simulating a Fraunhofer diffraction pattern with comparison to the
% analtic result

close all; clear all; clc;

N = 512;                % number of grid points per side
L = 7.5e-3;             % total size of the grid [m]
delta = L/N;            % source-plane grid spacing [m]
D = 1e-3;               % diameter of the aperture [m]
lambda = 1e-6;          % optical wavelength [m]
k = 2*pi/lambda;
Dz = 20;                % propagation distance [m]
x = (-N/2:N/2-1)*delta;
[x1,y1] = meshgrid(x);
Uin = circ(x1,y1,D);
[Uout, x2, y2] = fraunhofer_prop(Uin, lambda, delta, Dz);

Iout = Uout .* conj(Uout); % Numerical intensity

% analytic result
Uout_th = exp(1i*k/(2*Dz)*(x2.^2+y2.^2))...
    / (1i*lambda*Dz)*D^2*pi/4 ...
    .*jinc(D*sqrt(x2.^2+y2.^2)/(lambda*Dz));

Iout_th = Uout_th .* conj(Uout_th); % analytic intensity

% line profile
U_y0 = Uout(:,find(x==0));        % Amplitude
U_y0_th = Uout_th(:,find(x==0));

I_y0 = Iout(:,find(x==0));        % Intensity
I_y0_th = Iout_th(:,find(x==0));

%
figure,
imagesc(x2(1,:),y2(:,1),Iout)
axis([-0.1 0.1 -0.1 0.1]);axis square;
title('Numerical Intensity On detection plane')

figure,
imagesc(x2(1,:),y2(:,1),Iout_th),
axis([-0.1 0.1 -0.1 0.1]);axis square;
title('Analytic Intensity On detection plane')

figure, 
plot(x2(1,:),I_y0,'x',x2(1,:),I_y0_th,'-s','linewidth',1.2)
xlim([-0.2 0.2]); xlabel('x [m]'); ylabel('Intensity');
legend('Numerical', 'Analytic')
grid on

figure, 
plot(x2(1,:),abs(U_y0),'x',x2(1,:),abs(U_y0_th),'-s','linewidth',1.2)
xlim([-0.2 0.2]); xlabel('x [m]'); ylabel('Irradiance');
legend('Numerical', 'Analytic')
grid on
  •  调用子函数:
function [Uout, x2, y2] = fraunhofer_prop(Uin, lambda, delta, Dz)
% function [Uout, x2, y2] = fraunhofer_prop(Uin, wave, delta, Dz)
% performing a Fraunhofer propagation 

% Uin : Source-plane optical field
% lambda : wavelength of the source
% delta : grid spacing in source plane
% Dz : the distance between object and lens
% Uout : optical field of observation plane 
% x2, y2 : the coordinate in the observation plane

    N = size(Uin,1); % assume square grid
    k = 2*pi/lambda; % optical wavevector
    fx = (-N/2:N/2-1)/(N*delta);
    % observation plane coordinates
    [x2, y2] = meshgrid(lambda * Dz * fx);
    clear('fx');
    Uout = exp(1i*k/(2*Dz)*(x2.^2+y2.^2))...
        / (1i*lambda*Dz) .* ft2(Uin,delta);
function z = circ(x,y,D)
% matlab code for evaluating the circ function
    r = sqrt(x.^2+y.^2);
    z = double(r
function y = jinc(x)
% function y = jinc(x)
% code for evaluating the jinc function

    y = ones(size(x));
    idx = x ~= 0;
    y(idx) = 2.0*besselj(1, pi*x(idx)) ./ (pi*x(idx));
function G = ft2(g, delta)
% function G = ft2(g, delta)
    G = fftshift(fft2(fftshift(g))) * delta^2;

3、运行结果:

Chapter 4 夫琅禾费衍射-Matlab仿真_第1张图片

你可能感兴趣的:(Numerical,Simulation)