Design method of diffractive optical elements based on automatic differentiation and free-form surface technology
By optimizing the phase distribution of DOE through automatic differentiation and free-form surface technology, the problems of local optimal solution and disordered phase in traditional DOE design methods are solved, efficient and continuous beam shaping effect is achieved, and the processing difficulty and speckle noise impact are reduced.
Patent Information
- Application Number
- CN202411324517.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-23
- Publication Date
- 2025-10-28
- Estimated Expiration
- 2044-09-23
AI Technical Summary
Traditional DOE design methods are prone to getting trapped in local optima, resulting in low computational efficiency and disordered phase distribution, which leads to high fabrication difficulty and speckle noise affecting beam shaping performance.
By employing automatic differentiation and freeform surface techniques, the phase distribution is characterized by locally controllable multi-layer superimposed freeform surfaces. The gradient of the loss function is solved by combining automatic differentiation techniques, and the phase distribution is optimized using the gradient descent algorithm to avoid random phase and phase singularities, thereby achieving fast optimization and continuous smooth phase design.
It significantly reduces the fabrication difficulty of DOEs, reduces speckle noise, improves beam shaping accuracy and design efficiency, and enables the design of DOEs with arbitrarily complex illumination distributions.
Smart Images

Figure CN119270500B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of optical design, specifically relating to a design method for diffractive optical elements based on automatic differentiation and freeform surfaces. Background Technology
[0002] Laser beam shaping, a crucial step in laser processing technology, effectively improves the precision and speed of advanced laser processing technologies such as laser additive manufacturing, laser welding, and wafer laser annealing by precisely controlling the spatial distribution characteristics of the laser beam, providing strong support for high-quality and high-efficiency production in modern manufacturing. Diffractive optical elements (DOEs), as key tools in laser beam shaping, demonstrate immense technological power.
[0003] However, traditional DOE design methods for beam shaping, such as iterative Fourier transform methods (including the Gerchberg-Saxton algorithm and its improvements) and simulated annealing algorithms, all have certain limitations. Iterative Fourier transform algorithms are prone to getting trapped in local optima, and their effectiveness is highly dependent on the choice of initial phase; while simulated annealing algorithms can find better global optima, their computational process is time-consuming and inefficient. More importantly, the phase distributions obtained by these traditional algorithms are often disordered, which not only increases the fabrication difficulty of the DOE, but also introduces phase singularities in the random phase, leading to speckle noise and significantly affecting the beam shaping performance on the target surface.
[0004] To overcome these challenges, a composite design method combining geometric optics and iterative Fourier transform algorithms has emerged, as seen in the literature [Feng ZX, Froese BD, Liang R G. Composite method for precise freeform optical beam shaping. Applied Optics, 2015, 54(31): 9364-9369]. This method first solves for the freeform surface used for beam shaping within the framework of geometric optics approximation, and then uses this freeform surface as the initial solution for the diffractive optical element for iterative Fourier transform algorithm. In this way, the method can design a phase distribution that is smoother and has a better shaping effect than the GS algorithm. However, despite the progress made by this method, its algorithm complexity is still high, and the obtained surface is quasi-regular in form, which still needs further optimization.
[0005] In recent years, deep learning has demonstrated its powerful application potential in numerous fields, and automatic differentiation, as a key technique, can autonomously calculate the gradient of the loss function with respect to variables. This makes gradient descent algorithms combined with automatic differentiation highly efficient, flexible, and accurate in solving complex problems. Therefore, it is hoped that by introducing this advanced technology, problems that are difficult to overcome in traditional DOE design methods can be solved, thus promoting the further development and application of DOE technology. Summary of the Invention
[0006] The purpose of this invention is to provide a design method for diffractive optical elements based on automatic differentiation and freeform surface technology. The design of diffractive optical elements based on automatic differentiation and freeform surface technology can be optimized quickly without relying on initial values, while ensuring that the optimized DOE phase distribution is continuous and smooth, and can achieve the goal of low processing difficulty and high optical performance.
[0007] The objective of this invention is achieved through the following technical solution.
[0008] The design method for diffractive optical elements based on automatic differentiation and freeform surface techniques includes the following steps.
[0009] Step 1: Characterize the phase distribution φ(x,y) of the diffractive optical element using locally controllable multilayer superimposed freeform surfaces:
[0010]
[0011] The above equation is formed by the superposition of k basis functions, where (x,y) represents the coordinates of the sampling point on the diffractive optical element, and n p and m p Let n be the number of basis functions contained in the p-th layer along the x and y directions, respectively. p and m p It increases with the number of layers. Let p be a basis function in the p-th layer. Let be the shape parameter of the basis function. For the weight parameters of this basis function, all and Let it be denoted as variable v.
[0012] Step 2: Let k = 1, and set n p m p , and Assign initial values, where and It can be obtained through phase fitting;
[0013] Step 3: Calculate the illuminance distribution I2(x',y') on the target surface after the incident light field has been phase-modulated by the diffractive optical element using scalar diffraction theory:
[0014]
[0015] In the formula, (x', y') represents the coordinates of the sampling point on the target plane, and P z Let z denote the diffraction propagation operator, z be the propagation distance, and u0(x,y) be the complex amplitude distribution of the incident light field;
[0016] Step 4: Based on the simulated illuminance distribution I2(x',y') and the required illuminance distribution I on the target surface... target Construct the loss function Loss(I2,I) for (x',y'). target This is used to express the degree of difference between the simulated illuminance distribution and the desired illuminance distribution;
[0017] Step 5: Automatically calculate the gradient grad(v) of the loss function Loss with respect to the variable v using automatic differentiation techniques:
[0018]
[0019] The variable v is updated using a differential-based optimizer, and the corresponding phase distribution data is also updated.
[0020] Step 6: Iterate through steps 3 to 5 until the number of iterations reaches a preset threshold to obtain optimized phase distribution data;
[0021] Step 7: Determine whether the difference between the optimized illuminance distribution I2(x',y') corresponding to the phase surface and the target illuminance distribution is acceptable. If acceptable, end the design. If unacceptable, add a basis function expression layer based on the existing phase distribution, i.e., set the current k = k0 to k = k0 + 1, and set the parameters of the new basis function layer, σ. np,i,j and w np,i,j This can be obtained from the phase distribution data obtained in step six;
[0022] Step 8: Iterate through steps 3 to 7 to obtain the phase distribution data of the final design and calculate the surface data of the corresponding diffractive optical element. That is, the design of the diffractive optical element is realized based on automatic differentiation and freeform surface technology.
[0023] In step one, f i,j (x,y;σ np,i,j The basis functions are specifically in the form of Gaussian radial basis functions or B-spline functions.
[0024] Preferably, in step two, n p | p=1 =5, m p | p=1 =5.
[0025] The scalar diffraction theory in step three includes angular spectrum calculation method, Rayleigh-Sommerfeld convolution calculation method, Fresnel diffraction calculation method, and Fraunhofer diffraction calculation method.
[0026] The loss function in step four includes root mean square deviation and relative root mean square deviation.
[0027] The differential-based optimizers in step five include stochastic gradient descent, Adam algorithm, momentum gradient descent, and adaptive gradient descent.
[0028] The diffractive optical element has a continuous surface, one side of which is preset to be a plane, a sphere, or a freeform surface, and the data of the other side surface is calculated based on the incident surface form and the calculated continuous phase distribution.
[0029] The diffractive optical element has a micro-relief surface, one side of which can be preset as a plane, a sphere, or a freeform surface, while the data of the other side surface is calculated by phase folding based on the incident surface form and the calculated phase distribution.
[0030] The materials of the diffractive optical element include fused silica, BK7 glass, zinc selenide, and polymethyl methacrylate.
[0031] The loss function also includes a curvature constraint on the phase function, which is introduced into the loss function in the form of a penalty function to control the curvature and thus improve machinability.
[0032] Beneficial effects:
[0033] 1. The design method for diffractive optical elements based on automatic differentiation and freeform surface technology disclosed in this invention ensures that the phase surface of the designed diffractive optical element is always continuous and smooth by representing the phase distribution of the diffractive optical element with a freeform surface, which significantly reduces the processing difficulty and reduces the influence of high-order diffraction orders and stray light on the shaping effect.
[0034] 2. The diffractive optical element design method based on automatic differentiation and freeform surface technology disclosed in this invention effectively suppresses speckle noise and improves the shaping accuracy of diffractive optical elements by avoiding the occurrence of random phase and phase singularity during the design process.
[0035] 3. The diffractive optical element design method based on automatic differentiation and freeform surface technology disclosed in this invention uses a gradient descent algorithm based on automatic differentiation to optimize the phase distribution of the diffractive optical element. It is simple to implement and can achieve rapid optimization with the help of GPU computing power, which greatly improves design efficiency.
[0036] 4. The diffractive optical element design method based on automatic differentiation and freeform surface technology disclosed in this invention adopts multi-order superimposed freeform surfaces to characterize the phase distribution and is combined with a multi-scale optimization strategy. It can get rid of the dependence on the initial phase, while ensuring the convergence of the iteration, reducing the design difficulty, and can design diffractive optical elements that generate arbitrarily complex illumination distributions. Attached Figure Description
[0037] Figure 1 This is a flowchart of the design method for diffractive optical elements based on automatic differentiation and freeform surface technology disclosed in this invention.
[0038] Figure 2 This refers to the diffraction field calculation steps in Embodiment 1 of the present invention;
[0039] Figure 3 (a) is a schematic diagram of the diffraction scene in Embodiment 1 of the present invention;
[0040] Figure 3 (b) is the target illuminance pattern of Embodiment 1 of the present invention;
[0041] Figure 3 (c) DOE phase distribution designed based on the traditional Iterative Fourier Transform (IFTA) algorithm for the purpose of Example 1;
[0042] Figure 3 (d) is the simulated illuminance distribution corresponding to the design results based on the traditional Iterative Fourier Transform (IFTA) algorithm for the objective of Example 1;
[0043] Figure 3 (e) A continuous DOE phase distribution designed using the method of the present invention for the purpose of Example 1;
[0044] Figure 3 (f) is the result of phase folding of the DOE phase distribution designed by the method of the present invention for the purpose of Example 1;
[0045] Figure 3 (g) The simulated illuminance distribution of the target surface corresponding to the result designed using the method of the present invention for the target of Example 1;
[0046] Figure 4 (a) is a schematic diagram of the diffraction scene in Embodiment 2 of the present invention;
[0047] Figure 4 (b) is the target light spot pattern of Embodiment 2 of the present invention;
[0048] Figure 4 (c) is the DOE phase distribution designed in Embodiment 2 of the present invention;
[0049] Figure 4(d) shows the simulated illuminance distribution on the target surface in Embodiment 2 of the present invention;
[0050] Figure 5 (a) is a schematic diagram of the diffraction scene in Embodiment 3 of the present invention;
[0051] Figure 5 (b) is the target light spot pattern of Embodiment 3 of the present invention;
[0052] Figure 5 (c) is the DOE phase distribution designed in Embodiment 3 of the present invention;
[0053] Figure 5 (d) shows the simulated illuminance distribution on the target surface in Embodiment 3 of the present invention;
[0054] Figure 6 (a) is a schematic diagram of the diffraction scene in Embodiment 4 of the present invention;
[0055] Figure 6 (b) is the illuminance distribution of the input beam in Embodiment 4 of the present invention;
[0056] Figure 6 (c) is the target light spot on the focal plane in Embodiment 4 of the present invention;
[0057] Figure 6 (d) is a three-dimensional schematic diagram of the CPP phase designed in Embodiment 4 of the present invention;
[0058] Figure 6 (e) is a two-dimensional schematic diagram of the CPP phase designed in Embodiment 4 of the present invention;
[0059] Figure 6 (f) shows the simulated illuminance distribution on the focal plane in Embodiment 4 of the present invention;
[0060] Figure 7 (a) is the target light spot pattern of Embodiment 5 of the present invention;
[0061] Figure 7 (b) is a 3D model of the continuous diffractive optical element designed in Embodiment 5 of the present invention;
[0062] Figure 7 (c) is the simulated illuminance distribution on the target surface in Embodiment 5 of the present invention;
[0063] Figure 7 (d) is the diffractive optical element processed in Embodiment 5 of the present invention;
[0064] Figure 7 (e) is Figure 7 (d) shows the actual spot distribution of the diffractive optical element. Detailed Implementation
[0065] The specific embodiments of the present invention will be further described below with reference to the accompanying drawings and examples.
[0066] Example 1
[0067] The diffractive optical element design method based on automatic differentiation and freeform surface technology disclosed in this embodiment is used to design a DOE that generates a Gaussian portrait illumination distribution. The input light field is a Gaussian beam with a beam waist radius of 2 mm and a wavelength of 632.8 nm. The side length of the DOE is 4 mm, and the discretized sampling grid of the DOE is 400×400. The target surface is located 150 mm behind the DOE, the side length of the target illumination distribution is 8 mm, and the discretized sampling grid of the target illumination distribution is 800×800.
[0068] like Figure 1 As shown, the specific implementation steps of the diffractive optical element design method based on automatic differentiation and freeform surface technology disclosed in this embodiment are as follows:
[0069] Step 1: Select the B-spline function as the basis function. The specific form of the phase distribution is as follows:
[0070]
[0071] In the formula: the values of u and v range from [0,1], and N i,3 (u) and N j,3 (v) is a cubic B-spline basis function. These are the coordinate parameters of the control points. In this example, the basis function only has... and The effect is equivalent to and All Let it be denoted as variable v;
[0072] Step 2: Given k and n p m p , Assign initial values, where k = 1, n1 = 5, m1 = 5, P 5,i,j The elements in the matrix are set to random numbers between 0 and 2π;
[0073] Step 3: Calculate the illuminance distribution I2(x',y') on the target surface after the incident light field propagates through the diffraction optical element using scalar diffraction theory:
[0074] I2(x',y')=|P z [u0(x,y)e jφ(x,y) ]| 2 (5)
[0075] In the formula, (x', y') represents the sampling point on the target plane, and P zLet z represent the diffraction propagation operator, z be the propagation distance, and u0(x,y) be the amplitude distribution of the incident light field. The scalar diffraction theory used in this embodiment is the angular spectrum theory, and formula (2) is written as:
[0076]
[0077] In the formula, and These represent the Fourier transform and the inverse Fourier transform, respectively, f x and f y Represents spatial frequency, H(f) x ,f y ) is the transfer function.
[0078] The specific calculation steps are as follows:
[0079] Step 3.1: Determine whether the sampling frequency of the transfer function in angular spectrum theory satisfies the sampling theorem, i.e., whether it satisfies the following inequality:
[0080]
[0081] In the formula, Δf is the sampling interval of the spectral surface, φ is the phase distribution, and f is the spatial frequency.
[0082] Step 3.2: In 1st Example, inequality (7) holds, and the diffracted light field is calculated using the angular spectrum method based on the fast Fourier transform. Since the discretized grids of the input and output light fields are 400×400 and 800×800 respectively, zero-padding is required around the input light field to make the calculation window for diffraction 1200×1200. A two-dimensional Fourier transform is performed on the zero-padding input light field, multiplied by the transfer function, and then a two-dimensional inverse Fourier transform is performed. The 800×800 rectangular region at the center is the light field distribution on the target surface at this time. The entire diffraction calculation process is as follows: Figure 2 As shown;
[0083] Step 4: Based on the illuminance distribution I2(x',y') on the target surface and the required illuminance distribution I... target Construct the loss function for (x', y'):
[0084]
[0085] In the formula, I2(i,j) is the value of I2(x',y') in the i-th row and j-th column. target (i,j) is I target The value of (x',y') in the i-th row and j-th column, I2(x',y') and I target (x',y') are all m×n matrices;
[0086] Step 5: Automatically calculate the gradient grad(v) of the loss function Loss with respect to the variable v using the automatic differentiation technique in deep learning:
[0087]
[0088] Update variable v using the Adam optimizer;
[0089] Step 6: Repeat steps 3 to 5 until the number of iterations reaches 500, to obtain the phase surface φ. k=1 ;
[0090] Step 7: Add a layer of basis functions based on the phase surface in Step 6. After adjustment, k = 2, n² = m² = 20, and the newly added parameter P... 20,i,j The value of φ at this time is due to the surface k=1 The results were obtained through fitting. The specific fitting method is as follows:
[0091] ① For the curved surface φ k=1 Uniform sampling yields a 20×20 uniform matrix, which serves as P. 20,i,j The initial value;
[0092] ② Construct the loss function:
[0093]
[0094] ③ Use automatic differentiation technology to automatically solve for variable P 20,i,j Regarding the loss function fit The gradient is used to optimize the loss function using the Adam optimizer. fit and update variable P 20,i,j After 500 rounds of optimization, the fitting was completed, and the final P was obtained. 20,i,j Repeat steps three through six;
[0095] Step 8: Add a layer of basis functions to the phase surface, k = 3, n3 = m3 = 40, and the newly added parameter P 40,i,j The value of φ is determined by the surface shape at that time. k=2 The results were obtained through fitting. Steps three through six were repeated.
[0096] Step 9: Add a layer of basis functions to the phase surface. After adjustment, k = 4, n4 = m4 = 80, and the newly added parameter P... 80,i,j The value of φ is determined by the surface shape at that time. k=3 The results were obtained through fitting. Steps three through six were repeated.
[0097] Step 10: Add a layer of basis functions to the phase surface. After adjustment, k = 5, n4 = m4 = 160, and the newly added parameter P... 160,i,j The value of φ is determined by the surface shape at that time. k=4 The results were obtained through fitting. Steps three through six were repeated.
[0098] Step 11: Obtain the phase distribution of the designed diffractive optical element, and perform phase folding on this continuous phase distribution, with the folded phase φ... wrap =mod 2πM [φ], where M is an integer greater than 1, and in this embodiment M = 1. The incident surface of the diffractive optical element is set to a plane, and the height function h(x,y) of the exit surface can be calculated by the following formula:
[0099]
[0100] In this formula, n is the refractive index and λ is the wavelength. The material of this diffractive optical element is polymethyl methacrylate. The input light field is modulated by the designed diffractive optical element to generate an illumination distribution I close to a specific target surface. target I2(x',y') is the illuminance distribution of (x',y').
[0101] A schematic diagram of the diffraction scene in Embodiment 1 of the present invention is shown below. Figure 3 As shown in (a). Figure 3 (b) is the normalized target spot pattern of Embodiment 1 of the present invention. Figure 3 (c) illustrates the DOE phase distribution designed based on the traditional iterative Fourier transform algorithm, characterized by randomness and disorder, which causes inconvenience in the processing. Figure 3 (d) shows the simulated illuminance distribution obtained after designing using the Iterative Fourier Transform (IFTA) algorithm, which is aimed at the target of Example 1. Due to the random disorder of the phase distribution, there is a lot of speckle noise in this simulated illuminance distribution. Figure 3 (e) The DOE phase distribution designed using the method of the present invention for the purpose of Example 1 is smooth and continuous overall; Figure 3 (f) is Figure 3 The phase distribution shown in (e) is the result after phase folding; the final simulated illuminance distribution is as follows: Figure 3 As shown in (g), the speckle noise is well suppressed and the result is very close to the target result;
[0102] Example 2
[0103] The diffractive optical element design method described in this embodiment can be used to design a DOE that generates a cubic illuminance distribution, as shown in the schematic diagram. Figure 4 As shown in (a), the target image is as follows: Figure 4(b) shows the design parameters, which are similar to those in Example 1, except that the propagation distance is changed from 180 mm to 400 mm. The design method and steps are basically the same as those in Example 1, except that the diffraction propagation operator needs to use the bandwidth-extended angular spectrum method based on fast Fourier transform [Zhang WH, Zhang H, Jin G F. Band-extended angular spectrum method for accurate diffraction calculation in a widepropagation range. Optics Letters, 2020, 45(6): 1543-1546] to calculate the diffraction field to avoid spectral aliasing errors.
[0104] Figure 4 (c) The DOE phase distribution of the final design in Example 2 is smooth and continuous overall; Figure 4 (d) shows the illumination distribution generated on the target surface by the Gaussian beam after being controlled by the designed DOE, which is very close to the target illumination distribution.
[0105] Example 3
[0106] The diffractive optical element design method described in this embodiment can be used to design a cube illuminance distribution (DOE) for large-angle diffraction scenes, as illustrated in the diagram. Figure 5 As shown in (a), the target image is as follows: Figure 5 As shown in (b). The input light field is a Gaussian beam with a beam waist radius of 0.5 mm and a wavelength of 632.8 nm. The side length of the DOE is 0.5 mm, and the discretized sampling grid of the DOE is 500×500. The target surface is located 100 mm behind the DOE, the side length of the target illuminance distribution is 60.3 mm, and the discretized sampling grid of the target illuminance distribution is 500×500. The design method is basically the same as that in Example 1, except that due to the different diffraction scenario, the diffraction propagation operator in Equation (1) adopts the Rayleigh-Sommerfeld diffraction integral calculation method.
[0107] Figure 5 (c) The DOE phase distribution of the final design in Example 3 is smooth and continuous overall; Figure 5 (d) shows the illumination distribution generated on the target surface by the Gaussian beam after being controlled by the designed DOE, which is very close to the target illumination distribution.
[0108] Example 4
[0109] The diffractive optical element design method described in this embodiment can be used to design special diffractive optical elements—continuous phase plates (CPP). The input light field distribution u0(x,y) is a 12th-order super-Gaussian beam:
[0110]
[0111] In the formula, R is 155 mm. The wavelength of the laser is 351 nm. The side length of the CPP is 336 mm, and the discretization sampling grid of the DOE is 1024 × 1024. After the input light field is phase-modulated by the CPP, it is focused by a lens with a focal length of 2232 mm. The focal plane is the target plane, as shown in the schematic diagram. Figure 6 As shown in (a), the input illuminance distribution is as follows: Figure 6 As shown in (b), the target illuminance distribution on the focal plane is as follows: Figure 6 As shown in (c), the side length of the target illuminance distribution is 2.385 mm, and the discretized sampling grid of the target illuminance distribution is 1024×1024. The design method of Example 4 is basically the same as that of Example 1, except that the diffraction propagation operator in Equation (1) in Example 4 is the Fraunhofer diffraction calculation method based on Fourier transform.
[0112] Figure 6 (d) and (e) are the three-dimensional and two-dimensional plots of the CPP phase distribution of the final design in Example 4, respectively, and the overall plots are smooth and continuous. Figure 6 (f) shows the illuminance distribution generated on the focal plane after the laser is modulated by CPP, which is very close to the target spot.
[0113] Example 5
[0114] The diffractive optical element design method described in this embodiment can be used to design continuous thin lenses to shape laser beams. The input illuminance distribution is obtained by actually measuring the laser beam illuminance distribution and fitting it.
[0115]
[0116] The laser wavelength is 632.8 nm. The lens has a side length of 10.08 mm, and the discretized sampling grid is 4200 × 4200. After the input light field passes through the thin lens, a specific pattern with a side length of 52.73 mm is generated at a distance of 200 mm. The target light spot pattern is as follows. Figure 7 As shown in (a), the Fresnel diffraction method based on single-step Fourier transform was used to calculate the diffraction field distribution. A 5×5 initial B-spline surface was used, and after initial optimization, a multi-surface superposition optimization strategy was adopted, with the highest-scale B-spline surface having 640×640 control points. The final designed diffractive optical element with a continuous surface is shown in (a). Figure 7 As shown in (b), the simulated illuminance distribution on the target surface is as follows: Figure 7 As shown in (c), with Figure 7 The target light spot shown in (a) is very close. Freeform lenses machined using diamond turning, such as... Figure 7 As shown in (d), the corresponding actual test spot is as follows: Figure 7 As shown in (e).
[0117] In summary, the above are merely preferred embodiments of the present invention and are not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be considered as included within the scope of protection of the present invention.
Claims
1. A method for designing diffractive optical elements based on automatic differentiation and freeform surface techniques, characterized in that: Includes the following steps, Step 1: Characterize the phase distribution φ(x,y) of the diffractive optical element using locally controllable multilayer superimposed freeform surfaces: The above equation is formed by the superposition of k basis functions, where (x,y) represents the coordinates of the sampling point on the diffractive optical element, and n p and m p Let n be the number of basis functions contained in the p-th layer along the x and y directions, respectively. p and m p It increases with the number of layers. Let p be a basis function in the p-th layer. Let be the shape parameter of the basis function. For the weight parameters of this basis function, all and Let it be denoted as variable v; Step 2: Let k = 1, and set n p m p , and Assign initial values, where and Obtained through phase fitting; Step 3: Calculate the intensity distribution I2(x',y') of the incident light field after phase modulation by the diffraction optical element and propagation to the target surface using scalar diffraction theory: I2(x',y')=|P z [u0(x,y)e jφ(x,y) ]| 2 (2) In the formula, (x', y') represents the coordinates of the sampling point on the target plane, and P z Let z denote the diffraction propagation operator, z be the propagation distance, and u0(x,y) be the complex amplitude distribution of the incident light field; Step 4: Based on the simulated light intensity distribution I2(x',y') on the target surface and the desired light intensity distribution I... target Construct the loss function Loss(I2,I) for (x',y'). target This is used to express the degree of difference between the simulated light intensity distribution and the desired light intensity distribution; Step 5: Automatically calculate the gradient grad(v) of the loss function Loss with respect to the variable v using automatic differentiation techniques: The variable v is updated using a differential-based optimizer, and the corresponding phase distribution data is also updated. Step 6: Iterate through steps 3 to 5 until the number of iterations reaches a preset threshold to obtain optimized phase distribution data; Step 7: Determine whether the difference between the optimized phase surface intensity distribution I2(x',y') and the target intensity distribution is acceptable. If acceptable, end the design. If unacceptable, add a basis function layer based on the existing phase distribution, i.e., set the current k = k0 to k = k0 + 1, and set the parameters of the new basis function layer. and This can be obtained from the phase distribution data obtained in step six; Step 8: Iterate through steps 3 to 7 to obtain the phase distribution data of the final design and calculate the surface data of the corresponding diffractive optical element.
2. The design method for diffractive optical elements based on automatic differentiation and freeform surface technology as described in claim 1, characterized in that: In step one, f i,j (x,y;σ np,i,j The basis functions are specifically in the form of Gaussian radial basis functions or B-spline functions.
3. The design method for diffractive optical elements based on automatic differentiation and freeform surface technology as described in claim 1, characterized in that, In step two, n p | p=1 =5, m p | p=1 =5.
4. The design method for diffractive optical elements based on automatic differentiation and freeform surface technology as described in claim 1, characterized in that: The scalar diffraction theory in step three includes angular spectrum calculation method, Rayleigh-Sommerfeld convolution calculation method, Fresnel diffraction calculation method, and Fraunhofer diffraction calculation method.
5. The design method for diffractive optical elements based on automatic differentiation and freeform surface technology as described in claim 1, characterized in that, The loss function in step four includes root mean square deviation and relative root mean square deviation.
6. The design method for diffractive optical elements based on automatic differentiation and freeform surface technology as described in claim 1, characterized in that, The differential-based optimizers in step five include stochastic gradient descent, Adam algorithm, momentum gradient descent, and adaptive gradient descent.
7. The design method for diffractive optical elements based on automatic differentiation and freeform surface technology as described in claim 1, characterized in that, The diffractive optical element has a continuous surface, one side of which is preset to be a plane, a sphere, or a freeform surface, and the data of the other side surface is calculated based on the incident surface form and the calculated continuous phase distribution.
8. The design method for diffractive optical elements based on automatic differentiation and freeform surface technology as described in claim 1, characterized in that, The diffractive optical element has a micro-relief surface, one side of which can be preset as a plane, a sphere, or a freeform surface, while the data of the other side surface is calculated by phase folding based on the incident surface form and the calculated phase distribution.
9. The design method for diffractive optical elements based on automatic differentiation and freeform surface technology as described in claim 1, characterized in that, The materials of the diffractive optical element include fused silica, BK7 glass, zinc selenide, and polymethyl methacrylate.
10. The design method for diffractive optical elements based on automatic differentiation and freeform surface technology as described in claim 5, characterized in that, The loss function also includes a curvature constraint on the phase function, which is introduced into the loss function in the form of a penalty function to control the curvature.