Saturday, December 10, 2011

Diffraction theory summary


This is a summary of the scalar diffraction theory after reading Ref. 1 and 2.

0. Scalar diffraction theory neglects the vectorial nature of the e&m wave. Two conditions need be met for scalar theory to produce accurate result: (1) the diffracting aperture larger than wavelength; and (2) the observing field not too close to the aperture. (Ref.1, p.35)

1. Scalar diffraction formula with least approximation:
In figure above, Σ is the diffration aperture, P1 is a point in it and U0(P1) is the complex amplitude waiting to be diffracted, P is the point we want to solve. The complex amplitude at P is:
    U(P) =  1

 ∫∫ U0(P1) ejkr

r
cos(n, r) ds
(1)
The approximation needed here is r >> λ . This is the Rayleigh-Summerfeld solution.

In frequency domain,  let Gz(fx, fy) and Gz=0(fx, fy) be the Fourier transform of U(P) and U0(P1) respectively; they are the amplitudes of each fundamental plane-waves (decomposed by Fourier transform).  By solving Helmholtz wave equation, Eq.(1) in frequency domain becomes (Ref.2, p.83):
     Gz(fx, fy) = G0(fx, fy) exp[jkz(1-α2+β2)12]                     (2)
where
    fx = α/λfy = β/λ                                                                  (2a)
are the spatial frequencies on 2-D planes normal to the z-axis; they depend on these plane-wave's propagation direction and α, β are the directional cosines relative to x and y axes respectively.  Eq.(1) analyzed in frequency domain is called "Angular Spectrum" approach (Ref.1, p.55).

2. Fresnel diffraction:
If further approximation is made:
    cos(n,r) ≈ 1                                                                                (3)
then
    U(x, y) =  ejkz

jλz
 ∫∫ U0(x1, y1) exp[jk (x-x1)2+(y-y1)2


2z
] dx1dy1
(4)

2.1
Eq.(4) can be written as:
    U(x, y) =  ejkz

jλz
 ∫∫ U0(x1, y1) h(x-x1, y-y1) dx1dy1
(5)

                 =  ejkz

jλz
 U0(x, y) ∗ h(x, y)
(5a)
where
    h(x, y) = exp(jk  x2+y2

2z

)(5b)
Eq.(5)-(5b) have the following physical meaning:
• Eq.(5b): the impulse response h is the complex amplitude of the spherical wave from a unit point source at (x, y) = (0, 0).
• Eq.(5a): the diffracted field is simply a convolution between the initial field U0 and the impulse response h.
• Fresnel diffraction is a space-invariant linear system.

2.2
Eq.(4) can also be written as:
    U(x, y) =  ejkz

jλz
exp(jk  x2+y2

2z

) F[U0(x1, y1) exp(jk  x12+y12

2z

)](6)
Eq.(6) means:
• The diffracted field is a Fourier transform of U0 multiplied by a diverging spherical wave.

3. Fraunhofer diffraction:
If an even more stringent approximation is made:
    z >>  (x12+y12)max

2λ


(7)
then
    U(x, y) = ejkz

jλz
exp(jk  x2+y2

2z

) F[U0(x1, y1)] 


(8)
So Fraunhofer diffraction is simple: the diffracted field is simply a Fourier transform of the initial field.

Eq.(7) is more often expressed by "Fresnel number":
    FR2

λz


(7a)
where R is aperture's radius. Fraunhofer diffraction is when F << 1. 

In summary,
     • When diffraction distance >> λ , scalar theory can be used. In frequency domain, the angular spectrum approach is very physically intuitive.
     • When diffraction angle is small (Eq.(3)), Fresnel diffraction is used.
     • When Eq. (3) and (7) are both satisfied, Fraunhofer diffraction can be used.

References:
[1] Goodman, "Introduction to Fourier Optics", 2nd Ed.
[2] 黄婉云,《傅里叶光学教程》,1985年第1版.

Thursday, December 8, 2011

Near Field and Far Field

1. In diffraction optics,

Fresnel number:
    FR2

λz


(1)
where R is aperture's radius.

Far field:
     • F << 1.
     • It is the Fraunhofer diffraction area.
     • The diffraction pattern remains its shape; only its size gets bigger at farther distance.  

Near field:
     • F ≥ 1.
     • It is the Fresnel diffraction area.
     • The diffraction pattern changes shape as a function of distance.

 There is also an "extreme near field" region where the field observed behind the aperture is simply a geometrical projection of the aperture. Geometrical optics zone is when F >> 1.

2. For laser beam,

Rayleigh range:
    z0 πW02

λ
 =  π w02

λ M2

(2)
where W0 is 1/e2 waist radius and w0 = W0/M is the 1/e2 waist radius of the embedded fundamental Gaussian beam. (i.e., a Gaussian beam and its embedded Gaussian beam have the same Rayleigh range).

Near field is near the laser beam waist, within its Rayleigh range.
Far field is outside of the Rayleigh range.

References:
[1] http://en.wikipedia.org/wiki/Fresnel_number
[2] 黄婉云,《傅里叶光学教程》,1985年第1版. Page 95.

Monday, November 14, 2011

Zemax POP macro: normalized plot and calculation of beam size

Zemax Physical Optics Propagation (POP) generates cross-sectional beam profile.  Two functions are lacking that are useful to me:
1. An irradiance-normalized plot. (The absolute "watts-per-sq-millimeter" value does not matter to me almost all the time).
2. Zemax gives "second-moment" beam diameter but again, almost all the time I just need a simple 1/e^2 diameter regardless of perfect Gaussian beam or not. (The second-moment beam diameter definition heavily weighs the tails or outer wings of the intensity profile. Therefore beams with side-lobes will have second-moment width substantially larger than their central lobe widths. [1])

So I wrote a macro file to do these two tasks:

!-----------------------------------------------------------
!FIRST, SAVE SETTINGS IN POP WINDOW. 
!The "Show As" in "Display" tab must be set as "Cross X (or Y)".
!----------------------------------------------------------- 
!Input POP parameters saved in POP window:
!-----------------------------------------------------------
sampling = 512
zoom = 8

AA$ = $TEMPFILENAME()
GETTEXTFILE AA$, POP    # Import POP text data file
OPEN AA$

!-----------------------------------------------------------
! Create a loop to read POP data
!-----------------------------------------------------------
invalid_row = 13        # The first 13 rows are text, not data
For i,1,invalid_row,1
    READ a,b
Next i

Grid_size = sampling/zoom        # POP grid size (=Sampling/zoom)
DECLARE xx, DOUBLE, 1, Grid_size+1                   
DECLARE Irrad, DOUBLE, 1, Grid_size+1
For i,1,Grid_size+1,1
    READ a,b
    xx(i) = a
    Irrad(i) = b
    print xx(i), ", ", Irrad(i)
Next i
CLOSE

!-----------------------------------------------------------
! Find peak
!-----------------------------------------------------------
Max_i = 1
For j,2,Grid_size+1,1
!    PRINT "j=",j,"xx=",xx(j),"Irrad=",Irrad(j)
    IF ( Irrad(j)>Irrad(j-1) ) & ( Irrad(j)>Irrad(Max_i) ) THEN Max_i = j
Next j

!-----------------------------------------------------------
! Normalize lineshape
!-----------------------------------------------------------
DECLARE Irrad_norm, DOUBLE, 1, Grid_size+1
For j,1,Grid_size+1,1
    Irrad_norm(j) = Irrad(j)/Irrad(Max_i)
    PRINT "j=",j," xx=",xx(j)," Irrad_norm=",Irrad_norm(j)
Next j
!-----------------------------------------------------------
! Find 1/e^2 radius at extreme left (linear interpolation)
!-----------------------------------------------------------
Radius_Li = 1
For j,1,Max_i,1
    IF ( Irrad_norm(j)<=0.135 ) & ( Irrad_norm(j+1)>=0.135 ) THEN GOTO 1    #once the condition is met, jump out loop.
Next j
LABEL 1
Radius_Li = j
R_L1 = xx(Radius_Li)
R_L2 = xx(Radius_Li+1)
Irrad_L1 = Irrad_norm(Radius_Li)
Irrad_L2 = Irrad_norm(Radius_Li+1)
R_L = (0.135-Irrad_L1)*(R_L1-R_L2)/(Irrad_L1-Irrad_L2) + R_L1
PRINT "At ", R_L, " Irradiance = 0.135"
!-----------------------------------------------------------
! Find 1/e^2 radius at extreme right (linear interpolation)
!-----------------------------------------------------------
Radius_Ri = 1
For j,Max_i,Grid_size,1
    IF ( Irrad_norm(j)>=0.135 ) & ( Irrad_norm(j+1)<=0.135 ) THEN Radius_Ri = j+1
Next j
R_R1 = xx(Radius_Ri)
R_R2 = xx(Radius_Ri-1)
Irrad_R1 = Irrad_norm(Radius_Ri)
Irrad_R2 = Irrad_norm(Radius_Ri-1)
R_R = (0.135-Irrad_R1)*(R_R1-R_R2)/(Irrad_R1-Irrad_R2) + R_R1
PRINT "At ", R_R, " Irradiance = 0.135"
!-----------------------------------------------------------
! Calculate 1/e^2 beam diameter
!-----------------------------------------------------------
dia = R_R - R_L
PRINT "Beam Diameter = ", dia
!-----------------------------------------------------------
! Plot normalized lineshape
!-----------------------------------------------------------
PLOT NEW
PLOT DATA, xx,Irrad_norm,Grid_size+1,0,0,0
PLOT BANNER, "Normalized POP beam profile"
PLOT RANGEX, xx(1), xx(Grid_size+1)
PLOT RANGEY, 0, 1
PLOT COMM1, $DATE()
PLOT COMM2, $FILEPATH()
PLOT COMM3, "1/e^2 Gaussian Diameter = ", $STR(dia)
PLOT GO


Save the above text as a "xxx.zpl" file in Zemax's ZPL folder (the folder path can be viewed/changed in File -> Preferences). To run this macro, press F9, choose this file and click "Execute".

Here is an example. The POP window generated by Zemax shows an aberrated beam profile:


My macro generates a plot shown below.  First, it is normalized.  Second, the 1/e^2 beam diameter is given.



Compare three beam sizes:
1. POP pilot beam radius (paraxial 1/e^2) = 0.0070
2. POP "second moment" beam radius = 0.0071
3. Simple 1/e^2 radius calculated by my POP macro = 0.0024
The three sizes are different. Most often I just need know the 3rd value.

Next: It would be nice to also generate a Gaussian-fit curve.  I will perhaps write a MATLab-linked code to do this task.

Reference
[1] A.E.Siegman, "How to measure laser beam quality". PDF available on web by googling it.