Design method of thin freeform surface lens based on differentiable ray tracing and multi-subregion collaborative control
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-06-26
- Publication Date
- 2026-08-11
AI Technical Summary
[0006]有鉴于此,本发明的目的是为了解决现有轻薄型自由曲面设计方法难以适应多种光源,以及难以兼顾辐照度调控精度与表面光滑可加工性的问题,提供一种基于可微光线追迹与多子区域协同调控的薄型自由曲面光学系统设计方法
1、本发明提出的多子区域协同调控方法,通过在自由曲面上主动引入空间分离的不同子区域,共同作用于同一目标辐照度分布,突破了传统方法设计自由曲面的厚度限制,能够在显著减小的表面起伏幅度内实现高质量的辐照度调控。
Smart Images

Figure FT_1 
Figure FT_2 
Figure FT_3
Abstract
Description
Technical Field
[0001] This invention belongs to the fields of non-imaging optics, freeform surface optics design and irradiance control technology, specifically involving a design method for thin freeform surface lenses based on micro-ray tracing and multi-sub-region synergistic control. Background Technology
[0002] Freeform optical elements, with their asymmetric surface shape and high degree of design freedom, exhibit significant advantages in controlling light distribution (such as irradiance). Within the framework of geometric optics, the design of freeform surfaces typically boils down to solving second-order partial differential equations of the Monge-Ampère type. Most traditional design methods based on solving the Monge-Ampère equations essentially derive elliptic partial differential equations. The freeform surfaces obtained by such methods usually correspond to globally orientation-preserving ray mappings, resulting in relatively large lens thicknesses, which are difficult to meet the requirements of compact optical systems for thinner components.
[0003] In recent years, several design attempts have emerged in the pursuit of thinner freeform surface components. Some studies utilize deep learning to predict the shape of freeform surfaces, enabling them to overcome thickness limitations and generate specific irradiance patterns. Other studies optimize randomly undulating initial surfaces through gradient descent or construct freeform surfaces similar to microlens arrays by flipping ray maps. However, these methods either lack sufficient theoretical analysis or involve highly complex mathematical derivations, and there is still room for further improvement in irradiance modulation effects.
[0004] Differentiable ray tracing, as a flexible and versatile method, enables rapid gradient evaluation of surface parameters and incorporates effects that are difficult to model analytically, such as Fresnel loss, demonstrating significant advantages in the design of novel freeform surface optical systems. Existing methods utilize differentiable ray tracing to enhance the predictive ability of neural networks for thin surfaces. However, designing thin freeform surface lenses under various optical conditions (especially extended light sources and near-field target conditions) remains an open challenge. Existing design methods struggle to achieve high-precision irradiance control within finite lens thickness, while also failing to simultaneously ensure surface smoothness, manufacturability, and adaptability to extended light sources with large divergence angles.
[0005] This invention discloses a more universal design method for lightweight freeform surface optical systems. Based on the surface shape characteristics of multi-sub-region collaborative control, and optimized by differential ray tracing, it can design lightweight freeform surface control of light distribution under various light source conditions (including point light source, parallel light, extended light source, etc.) and receiver conditions (far-field receiver and near-field receiver). Summary of the Invention
[0006] In view of this, the purpose of this invention is to address the problems of existing thin-film freeform surface design methods being unable to adapt to multiple light sources and struggling to balance irradiance control accuracy with surface smoothness and manufacturability. This invention provides a design method for thin-film freeform surface optical systems based on differential ray tracing and multi-sub-region collaborative control. This method constructs a highly free-form initial surface shape and utilizes a multi-sub-region collaborative control mechanism to achieve effective irradiance control within a finite thickness. It achieves efficient gradient calculation and surface optimization through differential ray tracing; balances irradiance quality and surface smoothness through curvature regularization; and, depending on requirements, can apply strict periodic constraints using the gradient averaging method to improve manufacturability and scalability. Essentially, this method is a parameter optimization method, transforming the optical surface design problem into an optimization problem of surface parameters. This method is applicable to the control of parallel light, point sources, and extended sources, as well as various optical conditions such as far-field and near-field receivers.
[0007] It should be noted that the differentiable ray tracing described in this invention is not merely used for forward performance verification of a given optical system, but rather serves as a differentiable computation module in the optimization design of multi-sub-region thin freeform surfaces. For thin freeform surfaces containing multiple spatially separated sub-regions, the irradiance of the same target region is typically formed by the combined energy of the outgoing rays from multiple sub-regions. Target irradiance errors are difficult to distribute to each sub-region through traditional analytical mapping or local empirical correction methods. This invention establishes a complete differentiable link through differentiable ray tracing, from surface parameters, ray intersections, surface normals, refraction or reflection directions, target surface landing points, energy statistics to the irradiance loss function. This allows errors on the target surface to propagate back to the surface parameters of multiple related sub-regions, thereby driving the co-evolution of multiple sub-regions and forming a thin freeform lens within a limited surface undulation range.
[0008] A design method for a thin freeform surface optical system based on differentiable ray tracing and multi-sub-region synergistic control includes the following steps:
[0009] Step 1: Construct the optical system and define the surface parameterization expression: Suppose that the optical system has N optical surfaces, and set the refractive index of the medium before and after each optical surface; select all or some of the surfaces as the surfaces to be optimized, where the thin freeform surfaces to be optimized that need to achieve a thin structure are parameterized using a surface expression method with high design freedom, and the vector formed by the surface parameters of all the thin freeform surfaces to be optimized is denoted as P; Step 2: Construct the initial surface shape of the thin freeform surface to be optimized: The initial surface shape includes multiple spatially separated surface sub-regions, which are convex, concave, saddle-shaped, or combinations thereof; the initial surface shape is represented as the superposition of a reference plane and surface shape functions of multiple sub-regions; the initial surface shape is fitted using the surface expression defined in Step 1 to obtain the initial surface parameter vector, which serves as the starting point for subsequent optimization; Step 3: Perform Monte Carlo ray tracing of the differentiable freeform surface, including the following sub-steps: Step 3.1: Sample the light source multiple times based on the light source parameters to obtain random light clusters; Step 3.2: Calculate the coordinates of the intersection points between the ray cluster and the current optical surface to determine the differentiable path of ray transmission on the multi-sub-region surface; for a free surface containing multiple spatially separated local sub-regions, when there are multiple candidate intersection points along the ray propagation direction, take the intersection point with the smallest positive real number parameter in the propagation direction. Candidate intersections are considered as valid intersections; Step 3.3: Based on the light clusters and optical surfaces obtained in Step 3.2 Intersection parameters Solving for optical surfaces Parameters of the light cluster after action ; and calculate the coordinates of the intersection point and the surface normal vector at the intersection point; Step 3.4: Process all optical surfaces sequentially according to Steps 3.2 and 3.3 to obtain the ray cluster parameters after being processed by the last optical surface; Step 3.5: Calculate the irradiance distribution on the target plane based on the parameters of the light cluster after passing through the optical system. ; Step 3.6: Calculate the irradiance distribution Compared with the expected irradiance distribution The irradiance modulation loss function between; Step 4: Calculate the total loss function: Based on the irradiance control loss function, add one or more of the following terms: curvature regularization term, surface undulation amplitude constraint term, and slope constraint term, in order to balance the irradiance control quality and surface geometric characteristics. Step 5: Calculate the gradient of the total loss function with respect to all the surface parameter vectors P to be optimized using backpropagation; Step 6: Using the gradient obtained in Step 5, update the surface parameters through parameter optimization and perform optimization iterations until the preset convergence condition is met. Step 7: Obtain the final designed thin freeform surface optical system.
[0010] Preferably, in step one, the surface representation with high design freedom is a non-uniform rational B-spline NURBS surface, a radial basis function RBF surface, a Bézier surface, a T-spline surface, or a subdivision surface; the thin free surface to be optimized is represented in the form of a single-valued height field, that is, the x and y coordinates of the control points are preset by a regular grid and remain unchanged during the optimization process, and only the z coordinate of the control points is used as the optimization variable.
[0011] Preferably, in step two, the expression for the initial surface shape is:
[0012] In the formula: This is the initial freeform surface shape; As a reference datum plane; The number of surface sub-regions; For the first The fluctuation range of each sub-region; For the first The weight function or window function corresponding to each sub-region; For the first Location parameters of each sub-region; and The first Each sub-region direction and Scale parameters in the direction; For the first Local surface shape functions for each sub-region; When each sub-region uses the same or similar local surface shape function and is arranged according to a fixed spatial period, the initial surface shape is a periodic initial surface shape, represented as:
[0013] in, express, It is a two-dimensional periodic function that satisfies: .
[0014] Preferably, in step four, the total loss function is expressed as:
[0015] In the formula: The irradiance regulation loss function; , , The first Weight coefficients of each constraint term corresponding to each optical surface; Curvature regularization term Used to balance the Surface smoothness of each optical surface:
[0016] In the formula: and For the first The number of curvature sampling points along the two principal axes on an optical surface; For the first Sampling points on the optical surface Curvature measurement at; and For the first Curvature control parameters for each surface; Surface undulation amplitude constraint Used to restrict the The undulation amplitude of each optical surface, together with the initial thickness parameters of the system, controls the degree of thinness of the optical system:
[0017] In the formula: For the first Sampling points on the optical surface place Coordinate values For the first The maximum allowable undulation range is preset for each curved surface; Slope constraint term Used to restrict the Maximum local slope of an optical surface:
[0018] In the formula: For the first Sampling points on the optical surface The modulus of the surface gradient, For the first The maximum allowable slope of each surface is preset.
[0019] Preferably, in step 3.2, the intersection parameters The solution methods include: To set intervals Linear search for parameters starting from 0 When light rays pass through a curved surface, the sign of the function value at the intersection point changes, revealing the range of values for the smallest positive real solution. Then, within this interval, the bisection method is used to narrow down the range of values, and the initial solution of the parameter t is obtained at the intersection point of any value within the interval. Use the initial solution Perform Newton's method iterations to obtain the precise intersection parameters:
[0020] In the formula and These are the calculation results from the previous step and the current iteration, respectively. Indicates the first A vector consisting of all surface parameters of a thin freeform surface to be optimized; For optical curved surfaces The intersection point equation function.
[0021] Preferably, in step six, under scenarios involving far-field distribution control, collimated or small divergence angle beam incidence, or periodic array expansion, a strict periodic constraint is applied to the gradient calculated in step five, ensuring that the constrained freeform surface exhibits strict spatial periodicity within the effective aperture range, i.e., satisfying... and ,in and They are respectively and The period length of the direction; the strict period constraint is achieved by the gradient averaging method: the parameterized mesh of the surface is divided into multiple periodic units, the average gradient of the control points corresponding to the same local position in all periodic units is calculated, and then the gradient of the control points corresponding to the same local position in all periodic units is uniformly assigned to this average value.
[0022] Preferably, step six employs multi-scale optimization iteration, including: repeatedly executing steps three to six at the current scale for optimization until the loss function no longer decreases significantly or reaches the preset number of iterations for the current stage; then increasing the number of parameters of the surface to be optimized, and mapping the current optimization result to the surface representation after increasing the parameters through interpolation, as the initial surface type for the next stage, and entering a new stage of optimization; repeating the above process until the number of surface parameters reaches a preset upper limit value.
[0023] Preferably, in step five, the backpropagation starts from the total loss function and propagates the gradient layer by layer along the reverse order of the calculation operations in steps three and four until the surface parameter P is reached. A single backpropagation simultaneously obtains the gradients of all surface parameters to be optimized with respect to the total loss function.
[0024] Preferably, in step one, the optical system is a transmissive optical system or a reflective optical system; the light source is a parallel light source, a point light source, or an extended light source; and the target plane is a far-field receiving surface or a near-field receiving surface.
[0025] Preferably, in step 3.5, the irradiance distribution... The calculation methods include: The energy distribution of a single ray on the target plane is considered as a distribution function with a specific spatial extension, and its energy weights are assigned according to a preset energy allocation method. The irradiance is assigned to one or more pixels on the target plane; the irradiance of a single pixel on the target plane is:
[0026] In the formula: The area of a single pixel; The radiant flux of the light source; The energy weights of all rays after sampling; The energy weight of all light rays received by this pixel. The 1-norm of the vector; the irradiance of all pixels constitutes the irradiance distribution. .
[0027] The present invention has the following beneficial effects: 1. The multi-sub-region collaborative control method proposed in this invention actively introduces different spatially separated sub-regions on a freeform surface to work together on the same target irradiance distribution. This breaks through the thickness limitation of traditional methods for designing freeform surfaces and can achieve high-quality irradiance control within a significantly reduced surface undulation amplitude.
[0028] 2. The multi-sub-region initial surface construction strategy based on a general expression proposed in this invention provides a physically meaningful starting point for the optimization process. This general expression, through the flexible selection of sub-region functions and weight functions, covers various initial surface shapes, including periodic, quasi-periodic, and block-based types. The periodic initial surface shape, specifically implemented using a cosine function, naturally includes regularly arranged convex, concave, and saddle-shaped sub-regions, effectively guiding the optimization process towards thinning.
[0029] 3. The gradient averaging method proposed in this invention imposes strict periodic constraints, which force freeform surfaces to maintain strict periodicity under far-field conditions. This not only improves the manufacturability of the system, but also allows individual periodic units to be scaled, replicated, and tiled as needed to construct lens arrays of arbitrary sizes, significantly enhancing the scalability of the design.
[0030] 4. The differentiable ray tracing simulation framework used in this invention utilizes automatic differentiation to obtain the gradients of all freeform surface parameters in a single backpropagation, significantly reducing the number of forward simulations required for the optimization process and greatly improving the design efficiency of thin freeform surfaces. Simultaneously, this framework can automatically incorporate effects such as Fresnel loss, making the optimization results closer to the actual physical process. This effect is evident in high-degree-of-freedom surface representation methods, such as NURBS surfaces.
[0031] 5. The curvature regularization term introduced in this invention suppresses excessive local bending of the surface through higher-order penalties of Gaussian curvature, effectively balancing the irradiance control accuracy and surface smoothness, making the optimization results more conducive to actual processing.
[0032] 6. The thin freeform surface optical system designed in this invention can achieve strong robustness against local occlusion in some scenarios under the action of multi-sub-region collaborative control mechanism: when the system is partially occluded, other sub-regions can still maintain the overall shape of the target irradiance distribution. Attached Figure Description
[0033] Figure 1 This is a schematic diagram illustrating the principle of the multi-sub-region collaborative control mechanism in the thin freeform surface optical system design method of the present invention; Figure 2 This is a flowchart of the design method for the thin freeform surface optical system described in this invention; Figure 3 This describes the optimization objective and the changes in the loss function under parallel light far-field conditions in Embodiment 1 of the present invention. Figure 3 A is the optimization objective. Figure 3 B represents the change in the loss function (the vertical axis is a logarithmic scale); Figure 4 This is a comparison of the design results of two lenses under parallel light far-field conditions in Embodiment 1 of the present invention, wherein... Figure 4 A represents the final designed periodic thin freeform surface lens structure. Figure 4 B represents the corresponding irradiance distribution. Figure 4 C represents the structure of a freeform thick lens in the comparative design. Figure 4 D represents the corresponding irradiance distribution; Figure 5 This is a schematic diagram illustrating the scaling, replication, and tiling of a periodic thin freeform lens according to different periodic scales in Embodiment 1 of the present invention, wherein... Figure 5 A is for scaling and splicing. The lens structure at that time, Figure 5 B represents the corresponding irradiance distribution. Figure 5 C is for scaling and splicing. The lens structure at that time, Figure 5 D represents the corresponding irradiance distribution; Figure 6 This is the design result under the parallel light near-field condition in Embodiment 2 of the present invention, wherein... Figure 6 A represents the final designed lens and the verified irradiance distribution. Figure 6 B is a schematic diagram of the lens when it is partially blocked, and the corresponding irradiance distribution; Figure 7 This is a schematic diagram and design result of the extended light source with divergence angle compression controlled by a thin freeform surface lens in Embodiment 2 of the present invention, wherein... Figure 7 A represents the final designed lens and the verified irradiance distribution. Figure 7 B is a schematic diagram of the lens when it is partially blocked, and the corresponding irradiance distribution; Figure 8 This is the result of direct control of the extended light source in Embodiment 3 of the present invention, wherein... Figure 8 A is a freeform surface lens structure. Figure 8 B represents the corresponding irradiance distribution. Detailed Implementation
[0034] The present invention will now be described in detail with reference to the accompanying drawings and embodiments.
[0035] The design method for thin freeform surface optical systems based on differentiable ray tracing and multi-sub-region coordinated control includes the following steps: Step 1: Construct the optical system and define the parametric expression for the surface. Place the optical surface to be designed (which can be a transmissive or reflective surface) behind the specified light source. The optical system has... An optical surface ( ), denoted in order as optical surfaces Optical surfaces ..., optical surfaces Set the refractive indices of the media before and after each optical curve, denoted as [reference needed]. , of which An optical surface ( The refractive index of the incident medium is The refractive index of the exit-side medium is The light source, optical surface, and target plane constitute an optical system. The optical surface can be a simple optical surface (such as a plane, sphere, or aspherical surface) or a freeform surface. All or some of the surfaces are selected as the surfaces to be optimized. The surfaces to be optimized that require a thin structure (referred to as the thin freeform surfaces to be optimized) are parameterized using a surface expression method with high design freedom.
[0036] The highly customizable surface representation provides a sufficient number of adjustable parameters for the surface shape, supporting fine-grained control of surface details. This facilitates the formation of a zoned collaborative control structure within a limited range of surface undulations. As one implementation method, this invention uses a non-uniform rational B-spline (NURBS) surface as an example for detailed explanation.
[0037] A NURBS surface is constructed by tensor products of NURBS curves in two directions, defined in a Cartesian coordinate system, and its general formula is:
[0038] Where: parameters ; The three-dimensional coordinates of the control points; The weights are the corresponding weights of the control points; the denominator is the weighted sum of all basis functions and control point weights, used for normalization to ensure the unity decomposition of the basis functions; and They are respectively direction and Direction Subsequent B-spline basis functions of degree 1; and They are respectively direction and Number of control points for direction.
[0039] B-spline basis functions Defined by the De Boor-Cox recurrence relation:
[0040] in For the node vector Each node has a value. The node vector is a non-decreasing sequence of real numbers; Taking direction as an example, the node vector includes Each node has a value; adjacent distinct node values define a valid node range. Duplicate node values reduce the continuity of the surface at that point. Adjusting the number of control points... and It allows for flexible control over the design freedom of surface representation, providing a foundation for subsequent multi-scale optimization.
[0041] It should be understood that any surface representation method that can provide a sufficient number of adjustable parameters to describe the local details of a freeform surface can be used to implement the technical solution of this invention. The NURBS surface is merely an exemplary implementation of the high-degree-of-freedom surface representation in this invention, and this invention is not limited to any specific surface representation form. Other surface representation methods with high design freedom, such as radial basis function (RBF) surfaces, Bézier surfaces, T-spline surfaces, subdivision surfaces, etc., are also applicable to the method described in this invention.
[0042] For ease of expression, the first... The vector consisting of all surface parameters of a thin freeform surface to be optimized is denoted as . Taking NURBS surfaces as an example, It is composed of the three-dimensional coordinates of all control points on the surface. Preferably, to reduce the dimensionality of the optimization variables, the control points can be... The coordinates are fixed to preset values, and only the control points are used. Coordinates are used as optimization variables. For other surface representation methods, It consists of control parameters in the corresponding form.
[0043] Preferably, the thin freeform surface to be optimized is represented in the form of a single-value height field, i.e., control points. The coordinates are preset by a regular grid and remain unchanged during the optimization process, with only control points used. Coordinates are used as optimization variables, so that the surface can be represented as .
[0044] Step 2: Based on the light source type, target irradiance distribution characteristics, and surface spacing constraints, construct the initial surface shape of the thin freeform surface to be optimized. As a general method for constructing initial surface shapes with high design freedom, the initial freeform surface shape can have multi-sub-region collaborative control capabilities. Different surfaces can be initialized separately or uniformly using the following method. The initial surface shape includes multiple spatially separated surface sub-regions, which can be convex, concave, saddle-shaped, or combinations thereof.
[0045] Unlike traditional freeform surfaces where a single large-scale continuous region bears the main responsibility for beam deflection, this invention employs multiple sub-regions to jointly achieve irradiance control. The same target point can receive energy from multiple sub-regions, and the same sub-region can contribute energy to multiple positions on the target plane. The key is that the outgoing light direction of each sub-region remains essentially unchanged (the local slope of the corresponding surface remains essentially unchanged), and the surface elevation is the integral result of the slope. Multiple sub-regions divide the integral width into several narrower intervals, thus significantly reducing the surface elevation of each sub-region, which is beneficial for achieving target irradiance control within a finite thickness.
[0046] The initial freeform surface shape can be represented as:
[0047] In the formula: This is the initial freeform surface shape; The reference surface can be a plane, a sphere, an aspherical surface, or a preset freeform surface; The number of surface sub-regions; For the first The fluctuation range of each sub-region; For the first The weight function or window function corresponding to each sub-region; For the first Location parameters of each sub-region; and The first Each sub-region direction and Scale parameters in the direction; For the first Local surface shape functions for each sub-region. Different sub-regions use different... , , and This expression can represent a quasi-periodic or segmented initial surface shape. Under a specified light source, by increasing or decreasing... The convergence of the initial surface shape can be adjusted so that the initial light spot formed is close to the approximate range of the target light distribution.
[0048] Preferably, when each sub-region uses the same or similar local surface shape function and is arranged according to a fixed spatial period, the initial surface shape is a periodic or quasi-periodic initial surface shape. In this case, the above general expression degenerates into:
[0049] in, It is a two-dimensional periodic function that satisfies:
[0050] It can be a periodic analytic function such as a cosine function, a sine function, or a Fourier series, or it can be a numerically generated periodic unit surface. Therefore, this expression can represent a periodic freeform surface formed by the repeated arrangement of arbitrary periodic units.
[0051] Preferably, the two-dimensional periodic function Choose a combination of cosine functions:
[0052] The initial surface shape can then be represented as:
[0053] when When the above equation is used, it represents the initial cosine periodic surface shape based on the plane. This surface shape naturally includes convex, concave, and saddle-shaped features within a periodic unit, which is beneficial for forming a multi-subregion collaborative control structure. Typically, we take... , so that the sub-region is and The directions have the same spatial period.
[0054] It should be understood that the above combination of cosine functions is only a two-dimensional periodic function in this invention. One exemplary choice, others satisfy and Periodic functions (such as sine functions, Fourier series, etc.) are also applicable to the method described in this invention.
[0055] It should be noted that a plane, as a special case, also falls within the scope of the above general expression. When the undulation amplitude of all sub-regions... At that time, the initial surface shape degenerates into a plane. At this point, the reference datum plane can be set to (in (the initial thickness), i.e. In this invention, the above general expression is... The initial surface type of the sub-regions coordinated and controlled is collectively referred to as the "initial freeform surface type"; under the freeform surface parameterization framework, the plane (i.e. The degenerate form can be considered a degenerate special case of the initial face type.
[0056] After constructing the initial surface shape, the surface expression defined in step one is used to fit the initial freeform surface shape to obtain the initial surface parameter vector. This serves as the starting point for subsequent optimizations. For an optical system with multiple thin freeform surfaces to be optimized, each surface can independently construct its initial surface shape according to the aforementioned general expression, and the number of sub-regions for each surface... Amplitude ,Location ,scale and local surface function The parameters can be the same or different to accommodate the different functional requirements of different curved surfaces in optical systems.
[0057] Step 3: Perform Monte Carlo ray tracing on a differentiable freeform surface, simulating the rays passing sequentially through the optical surfaces in the optical system constructed in Step 1. To optical surfaces The propagation process (which can be initiated by a multi-sub-region surface) is used to calculate the irradiance distribution formed on the target plane. And calculate the expected irradiance distribution. loss function between .
[0058] The ray tracing described above is used to establish a differentiable mapping between the parameters of the freeform surface in multiple sub-regions and the target irradiance loss function. Since the thin freeform surface to be optimized contains multiple sub-regions formed by local convex surfaces, concave surfaces, saddle surfaces, or combinations thereof, the outgoing rays from different sub-regions will superimpose on the target plane. The irradiance error of the same target region is usually caused by multiple sub-regions. Therefore, this step not only calculates the forward propagation result of the rays but also provides a gradient transfer path from the target irradiance error to the surface parameters of each sub-region for subsequent backward propagation. The specific implementation method of this step is as follows: Step 3.1: Sample the light source multiple times based on its parameters to obtain random ray clusters. The light source parameters include the shape, position, size, spatial distribution of radiation, directional distribution of radiation, and radiant flux of the light source. For general extended light sources, a single ray is used. This indicates that it includes the coordinates of the starting point. Transmission direction and energy weight ; It is obtained by uniformly sampling based on the shape, position, and size of the light source. It is obtained by sampling the radiation direction distribution of the light source on a unit sphere. It is proportional to the product of the spatial distribution of radiation, the directional distribution of radiation, and the radiant flux. Repeated sampling processes are used to obtain data with… Clusters of rays ,in , , These represent the starting point coordinates, propagation direction, and energy weight of all light rays after sampling. For a point source, all light rays have the same starting point coordinates but different directions. For a collimated light source, all light rays have the same propagation direction, and their starting point coordinates are uniformly sampled within the source aperture.
[0059] After completing the light sampling, the light is arranged in the order of the optical surfaces, starting from the optical surfaces. Begin processing each optical surface sequentially. Steps 3.2 and 3.3 follow the procedure for the currently processed optical surface. ( Taking an example, the process of ray tracing on a single optical surface is described: Step 3.2: Calculate the relationship between the light cluster and the optical surface The coordinates of the intersection points are used to determine the differentiable path of ray propagation on the multi-sub-region surface. Within the same medium, the coordinates of any point on the ray propagation path are determined using its distance from the ray's origin. The coordinates of a three-dimensional point on a ray are shown. Substitute the coordinates of this point into the parametric surface expression defined in step one to establish the intersection point equation. .
[0060] Since the thin freeform surface to be optimized contains multiple spatially separated local sub-regions, light rays may have multiple candidate intersection points with the continuous freeform surface along the propagation direction. If the traditional single-local iterative method is directly used to solve for the intersection points, it may converge to a non-first intersection point or an incorrect local intersection point, causing the light ray to be incorrectly assigned to a subsequent sub-region. To ensure that the light propagation path is consistent with the actual physical process and to accurately simulate the collaborative control effect of multiple sub-regions, this invention preferably obtains the minimum positive real number intersection point parameter (all parameters satisfying the intersection point equation) along the light propagation direction. The minimum positive value is taken from the middle, which is the parameter of the first valid intersection point.
[0061] Specifically, the intersection points of the light rays and the curved surface are determined using the following numerical method: at certain intervals... Linear search for parameters starting from 0 When light rays pass through a curved surface, the sign of the function value at the intersection point changes (passing through zero), thus revealing the range of values for the smallest positive real solution. Then, within this interval, the bisection method is used to narrow down the range of values. Take any value within the interval as the initial solution. Using the initial solution Perform Newton's method iteration:
[0062] In the formula and These are the calculation results from the previous step and the current iteration, respectively. For optical curved surfaces The intersection point equation function. Finally, the precise intersection point parameters are obtained. .
[0063] Step 3.3: Based on the light clusters and optical surfaces obtained in Step 3.2 Intersection parameters Solving for optical surfaces Parameters of the light cluster after action Calculate the coordinates of the intersection points sequentially. The surface normal vector at the intersection point.
[0064] If optical surface As a transmission surface, based on Snell's law, it is an optical curved surface. The refractive index of the incident medium and the refractive index of the exit side medium Using the refractive index as input, the direction vectors of all outgoing rays are calculated through the surface normal vector. And Fresnel transmittance. The coordinates of the starting point of the outgoing ray are the coordinates of the intersection point, the propagation direction is the refraction direction, and the energy weight is the product of the Fresnel transmittance and the energy weight of the incident ray. If there exists a ray with a Fresnel transmittance of 0 (total internal reflection ray), its energy weight is assigned to 0 (i.e., it is treated as an invalid transmitted ray and ignored in subsequent calculations), and its transmission direction can be assigned any unit vector.
[0065] If optical surface As a reflecting surface, based on the law of reflection, the direction vectors of all outgoing rays are directly determined by the surface normal vector and the incident direction. The coordinates of the starting point of the outgoing ray are the coordinates of the intersection point, the propagation direction is the reflection direction, and the energy weight is taken as the energy weight of the incident ray (reflectivity can be introduced as needed).
[0066] Through optical curved surface The parameters of the light cluster after the action are: .
[0067] It is worth noting that the coordinates of the intersection point are... It can also be used to distinguish the specific sub-regions into which the intersection points fall. When it is necessary to analyze the control effect of a certain sub-region of a surface and optimize it separately, it is only necessary to adjust the weight of the light energy that does not fall into that sub-region. Set to 0 to execute subsequent simulation and optimization processes.
[0068] Step 3.4: During the simulation, calculate the sequential passage of all light rays through the optical surface according to the procedures in Steps 3.2 and 3.3. To optical surfaces The parameters of the light cluster after the action. The parameters obtained in step 3.3... As the next optical surface For the incident light cluster, repeat steps 3.2 and 3.3 until all are processed. Each optical surface is used to obtain the result after passing through the last optical surface. Parameters of the light cluster after action .
[0069] Step 3.5: Based on the parameters of the light cluster after passing through the optical system Calculate the irradiance distribution on the target plane. Based on the position and orientation of the target plane, calculate the discrete coordinates of the intersection point of the ray and the target plane. and energy weight .
[0070] Divide the target plane in the length and width directions into There are 100 pixels, and the area of a single pixel is:
[0071] In the formula: and These are the length and width of the target plane, respectively. Therefore, based on the coordinates of the discrete points... and energy weight Statistical analysis of irradiance distribution .
[0072] Preferably, to ensure that the target irradiance loss function is continuously differentiable or approximately continuously differentiable with respect to the coordinates of the ray landing point, bilinear interpolation, Gaussian kernel diffusion, or other continuous kernel functions are used for energy statistics, thus avoiding the loss of spatial derivative information caused by forcibly allocating the energy of the ray to a single pixel. Therefore, when the ray landing point moves slightly on the target plane, the energy weights received by adjacent pixels change continuously, allowing the target irradiance loss to be stably backpropagated to the ray landing point, emission direction, surface normal vector, and corresponding surface control parameters. Specifically, the energy distribution of a single ray on the target plane is considered as a distribution function with a specific spatial extension, and its energy weights are assigned according to a preset energy allocation method (such as bilinear interpolation, Gaussian smoothing, etc.). The irradiance is assigned to one or more pixels on the target plane. The irradiance of a single pixel on the target plane is:
[0073] In the formula: The energy weight of all light rays received by this pixel. Let be the 1-norm of the vector. The irradiance of all pixels constitutes the irradiance distribution. .
[0074] Step 3.6: Calculate the irradiance distribution obtained in Step 3.5. Compared with the expected irradiance distribution Irradiance modulation loss function The loss function It is used to measure the deviation between the simulated irradiance distribution and the target distribution, and its specific form can be flexibly selected according to the optimization requirements.
[0075] Preferably, this method uses a normalized mean square error loss function:
[0076] In the formula: This represents the Frobenius norm of the computation matrix. This loss function directly measures the deviation between the simulated irradiance distribution and the target distribution, without independent normalization, to ensure that the optimized system has sufficient energy efficiency.
[0077] Preferably, for irradiance control under extended light source conditions, a uniformity loss function can also be used to improve the uniformity within the target area:
[0078] In the formula: Define a binary mask matrix for a uniform target region (1 within the region, 0 outside the region). The initial average irradiance value within the mask area is fixed after the first evaluation. Total number of pixels; It is a matrix of all 1s; This indicates element-wise multiplication. While reducing the variance of irradiance within a specified area, the irradiance outside the target area is not constrained by this loss function.
[0079] It should be understood that, in addition to the loss functions mentioned above, other loss functions that can be used to measure differences in irradiance distribution (such as mean absolute error (MAE), structural similarity (SSIM), etc.) are also applicable to the method described in this invention.
[0080] Step 4: Calculate the total loss function. (This is related to the irradiance control loss function.) Based on this, one or more constraint terms are added to balance the irradiance control quality and surface geometry:
[0081] In the formula: for or Choose according to the specific optimization objective; , , The first The weight coefficients of each constraint term corresponding to each optical surface can be adjusted independently or set to zero according to the actual needs of each surface.
[0082] Among them, the curvature regularization term Used to balance the Surface smoothness of each optical surface:
[0083] In the formula: and For the first The number of curvature sampling points along the two principal axes on an optical surface is much greater than the number of NURBS control points. For the first Sampling points on the optical surface The curvature at a given point can be measured using Gaussian curvature, mean curvature, principal curvature, or a combination thereof; and For the first The curvature control parameters of each surface, among which Preferably positive integers, but by adding the absolute value, it can support any positive real number. When At that time, due to the amplification effect of the power-law term, the curvature penalty loss increases sharply, thereby suppressing the excessively rapid local changes on the surface of the curved surface and obtaining a smooth surface that is conducive to processing.
[0084] Surface undulation amplitude constraint Used to restrict the The undulation amplitude of each optical surface, together with the initial thickness parameters of the system, controls the degree of thinness of the optical system:
[0085] In the formula: For the first Sampling points on the optical surface place Coordinate values For the first The maximum allowable undulation range is preset for each surface.
[0086] Slope constraint term Used to restrict the Maximum local slope of an optical surface:
[0087] In the formula: For the first Sampling points on the optical surface The modulus of the surface gradient, For the first The maximum allowable slope of each surface is preset.
[0088] Step 5: Calculate the total loss function using backpropagation. For all surface parameter vectors to be optimized The gradient. Backpropagation is implemented based on computational graph techniques and the chain rule, from the total loss function. Starting from the beginning, following the reverse order of the calculation operations in steps three and four, the gradient is passed layer by layer until the surface parameters are reached. Finally, the gradient vector is obtained:
[0089] In the formula: The vector formed by all parameters of the surface to be optimized (taking a NURBS surface as an example, i.e., all control points). (A vector formed by coordinates).
[0090] Preferably, the micro-ray tracing simulation process is built on computing platforms such as PyTorch and Tensorflow to efficiently realize chain rule operations.
[0091] Step Six: When the target control task can be achieved by repeated contributions from periodic units, and the effects of different periodic units are approximately equivalent, a periodic constraint can be applied to the gradient calculated in Step Five. This is typically applicable to scenarios such as far-field distribution control, collimation or small divergence angle beam incidence, and periodic array expansion. The periodic constraint ensures that the constrained freeform surface has strict spatial periodicity within the effective aperture range, i.e., satisfies... and ,in and They are respectively and The period length in the direction. This method not only avoids non-uniform deformation of different periodic units under the influence of random light sampling noise, but also facilitates the subsequent construction of lens arrays of different sizes by scaling, copying and tiling different numbers of sub-regions.
[0092] The periodic constraint can be applied to any one or more free-form surfaces in the optical system, and these surfaces can have the same or different period parameters. The specific implementation of the periodic constraint depends on the parametric expression of the surface. Taking a surface expression with control points arranged in a regular grid (such as a NURBS surface, a Bézier surface, etc.) as an example, the periodic constraint can be implemented using the gradient averaging method: the parametric grid of the surface is divided into... Each periodic unit contains 10 periodic units, and each periodic unit contains 100 periodic units. There are several control points. For any given control point, it is indexed by its corresponding periodic cell. ( , ) and local indexes within cells ( , Unique identifier. First, calculate the corresponding local positions in all periodic cells. The average value of the control point gradients is used to obtain the periodicized reference gradient. :
[0093] In the formula: Indicates that it is located in a periodic unit Local position The original gradient components corresponding to the control points at that location are then assigned to this reference gradient. Finally, the gradients of all control points at the same local location within all periodic units are uniformly assigned to this reference gradient.
[0094] That is, using a periodic reference gradient Replace the original gradient .because By relying solely on the local location within a cell, control points at the same local location in all periodic cells receive the exact same gradient update, thus strictly maintaining the initial periodic structure throughout the optimization process. It should be understood that the periodic constraint is used to maintain the existing periodic structure during optimization, requiring that the initial surface parameters already satisfy the periodic consistency condition.
[0095] Preferably, by extending the range of the control point mesh to a size larger than the actual aperture (e.g., extending control points outward in each direction at least a certain number of times along the surface at the aperture edge), the periodic elements are unaffected by boundary effects within the aperture range. In this case, the periodicity of the surface within the effective aperture can be guaranteed solely by the periodicity of the control point parameters. For cases where there are still incomplete elements with truncated edges, these control points do not participate in the periodic gradient averaging, allowing them to evolve independently to adapt to boundary conditions.
[0096] For near-field conditions or extended light source direct control conditions (where the spatial distribution of different periodic units on the receiving surface is translated and misaligned), the above periodic constraints are not applied, allowing each sub-region to evolve independently to adapt to the target distribution.
[0097] Step 7: Using the gradient obtained in Step 5 (or the gradient processed in Step 6), update the surface parameters using parameter optimization methods and perform multi-scale optimization iterations. Parameter updates follow an optimization framework based on gradient information, including but not limited to stochastic gradient descent (SGD), adaptive moment estimators such as Adam, and quasi-Newton methods such as BFGS, which can be flexibly selected according to requirements.
[0098] In the formula: and These are the parameter vectors of all surfaces to be optimized before and after the update; To update the step size (learning rate); The optimizer function can be any of the following, including but not limited to adaptive moment estimation optimizers such as SGD and Adam, which can be flexibly selected according to requirements. Adaptive moment estimation optimizers can adaptively adjust the learning rate using historical information of the first and second moments, thereby improving convergence stability.
[0099] Step 7.1: At the current scale, repeatedly execute steps three through six for optimization. Each execution of steps three through six is called one optimization cycle. As optimization progresses, the surface parameters of each freeform surface to be optimized are gradually adjusted, and the irradiance distribution on the target plane gradually approaches the target distribution. When the total loss function... When the loss function no longer decreases significantly (e.g., the change in the loss function after multiple iterations is below a specified threshold), or when the number of optimizations reaches the preset upper limit for the current stage, the current stage of optimization ends.
[0100] Step 7.2: Determine whether the number of surface parameters has reached the preset upper limit. If it has, proceed to step eight; if not, proceed to step 7.3.
[0101] Step 7.3: Increase the number of parameters of the surface to be optimized through methods such as direct parameter insertion or surface fitting, thereby increasing the design freedom of the surface representation. Taking NURBS surfaces as an example, this is reflected in increasing the number of control points. and The optimization results from the previous stage are mapped onto the surface representation after parameter increases through interpolation, serving as the initial surface shape for the next stage. Then, the process returns to step three to enter a new stage of optimization. This progressive optimization strategy, from coarse to fine, enables rapid convergence to a near-optimal solution in the initial stage with minimal computational cost. Subsequent stages gradually introduce detailed control capabilities, ultimately balancing design efficiency and quality.
[0102] Furthermore, the loss function type can be switched as needed during any optimization stage (e.g., from...). Switch to This is to adapt to the different emphases on convergence speed, irradiance accuracy, and uniformity at different stages.
[0103] Step 8: Obtain the final designed thin-film freeform surface optical system. This system can achieve high-precision irradiance control from the light source to the target plane within a finite thickness. Furthermore, the freeform surface, under constraints such as curvature, slope, and thickness, possesses smooth surface features suitable for precision machining and can be adapted to one or more machining methods, including diamond turning, slow-tool servo, fast-tool servo, ultra-precision milling, and die-cutting replication.
[0104] To better illustrate the purpose and advantages of the present invention, the invention will be further described below in conjunction with the accompanying drawings and embodiments.
[0105] In the described embodiment, the surface shape representation in step one uses a NURBS surface. A quasi-uniform node distribution is employed to ensure that the surface boundary coincides with the control point mesh boundary, while simplifying the mathematical form of the B-spline basis function. To reduce the dimensionality of the optimization variables and improve computational efficiency, this invention uses a control point... A simplified NURBS surface with a regular grid arrangement. All control points. The coordinates are preset values and remain unchanged during the optimization process; only the control points... Coordinates are used as optimization variables. Control point weights. All values are set to 1 (i.e., degenerates into a B-spline surface). This simplified model establishes... The explicit mapping relationship avoids the nonlinear iterative problem of inversely deriving parameter coordinates from Cartesian coordinates, while retaining the excellent local feature representation ability of NURBS surfaces. With this simplification, the surface is essentially equivalent to an explicit function. Its expression is:
[0106] In the formula: Control points corresponding Coordinate values, all control points Coordinates constitute the optimization variable vector For the sake of simplicity, the following text will use "..." and This indicates the number of control points in both directions.
[0107] Example 1: Design of a thin freeform lens under parallel light far-field conditions This embodiment demonstrates the process of designing a thin freeform lens using the multi-sub-region collaborative control method and strict periodic constraints of the present invention under parallel light and far-field receiving conditions.
[0108] In this embodiment, the light source is a rectangular aperture. A parallel beam of light. The optical system has... There are two optical surfaces: optical surface 1 is a planar incident surface, and optical surface 2 is a free-form exit surface. The refractive indices of the media are respectively... (Air), (Lens material) (Air). Optical surface 2 is a thin freeform surface to be optimized. The receiving surface is located in the far field, and its coordinates are determined by the angle of the light emission direction. and The tangent value is represented by [value]. Optical surface 2 is expressed using cubic NURBS surface parametric method, with control points ranging from [value]. , (Slightly larger than the effective light transmission range) The coordinates are arranged in a uniform grid and remain unchanged during optimization. The initial thickness of the lens is... The front surface is located at the origin of the coordinate system. The target irradiance distribution is confined to... Within the corresponding angular range, such as Figure 3 As shown in Figure A.
[0109] Following step two, construct a periodic initial surface shape based on a cosine function. Set two periods within the light source aperture range, i.e. Under collimated incident beam conditions, amplitude parameter The lens half-aperture angle corresponding to the target irradiance distribution is determined by the following formula:
[0110] In the formula, and The first step defined in step one The refractive indices of the incident and exit media of a freeform surface to be optimized. for The maximum beam deflection angle required for the direction. , , (Lens material) Substituting (air) into the above formula, we can calculate... . Move the initial surface along and The direction is shifted by a quarter of a period, so that the two complete periods fall within the aperture range. A NURBS surface is then used to fit this initial surface shape to obtain an initial surface parameter vector, which serves as the starting point for optimization.
[0111] In contrast, this embodiment also designs a lens (lens 2) that uses a concave surface as its initial surface shape. A defined parabolic surface of revolution was used to verify the advantages of the method of the present invention in thinning.
[0112] Perform optimization according to steps three through seven. A multi-scale optimization strategy is adopted, with the number of control points sequentially as follows: , , and On average each The control point densities along the length are approximately 2, 4, 8, and 16, respectively. Using the Adam optimizer, the learning rates for each scale are... , , and Each scale is optimized using the normalized MSE loss function for 500 steps, with approximately [number] samples per simulation. The root ray, the receiving surface is discretized into A pixel grid is used to evaluate the irradiance distribution. The change of the loss function during the optimization process is as follows: Figure 3 As shown in B (the vertical axis is a logarithmic coordinate), the strict periodic constraint described in step six is applied to lens 1 throughout the optimization process. The curvature regularization parameter is set to... , The sampling grid is In this embodiment, only curvature regularization constraints are applied ( ), surface undulation amplitude constraint coefficient and slope constraint coefficient All values were set to zero. After optimization at each scale, to further improve irradiance uniformity, an additional 100 optimizations were performed using a uniformity loss function. During this stage, approximately [number missing] samples were collected. Root rays are used to improve the accuracy of uniformity assessment.
[0113] The design results are as follows: the back surface undulation amplitude of lens 1 (using the method of this invention) is... The maximum Gaussian curvature is The rear surface undulation of lens 2 (which uses a traditional concave initial surface shape) is... The maximum Gaussian curvature is The method of this invention achieves a thickness reduction of approximately 47.8%. Both lenses achieve irradiance modulation effects close to the target distribution. The lens structure of lens 1 is as follows... Figure 4 As shown in Figure A, its corresponding irradiance distribution is as follows: Figure 4 As shown in B; the structure of lens 2 is as follows: Figure 4 As shown in C, its corresponding irradiance distribution is as follows Figure 4As shown in D. Lens 1 strictly maintains its periodic structural characteristics throughout the optimization process, and lens arrays of different sizes can be easily obtained by linearly scaling, copying, and tiling the optimized curved surface. The surface undulation amplitudes at the aforementioned different periodic scales are all obtained by independently optimizing the corresponding periodic parameters. When the periodic unit size... At that time, the surface undulation amplitude further decreased to Its lens structure is as follows Figure 5 As shown in Figure A, the corresponding irradiance distribution is as follows: Figure 5 As shown in B; when At that time, the surface undulation amplitude was only Its lens structure is as follows Figure 5 As shown in C, the corresponding irradiance distribution is as follows: Figure 5 As shown in D. This thickness reduction capability comes from a multi-sub-region collaborative control mechanism: smaller periodic units correspond to more sub-regions working together, and each sub-region only needs to bear a small beam deflection angle, thereby further reducing the surface undulation amplitude.
[0114] Example 2: Extended light source control based on parallel light near-field conditions and divergence angle compression This embodiment demonstrates a thin freeform lens design for an extended light source under near-field conditions with parallel light and a compressed divergence angle. The optical system structure in this embodiment is the same as in Embodiment 1. Optical surface 1 is a planar incident surface, and optical surface 2 is a thin freeform surface to be optimized; , , ).
[0115] For parallel light near-field conditions, the light source is a rectangular aperture. A parallel beam of light. The receiving surface is located at... At this location, the dimensions are The ratio of the distance to the receiving surface to the lens aperture size is 5:1. Five cycles are set within the range of the light source aperture, i.e. The amplitude parameter was calculated according to the formula described in Example 1. Multi-scale optimization is employed, with the number of control points sequentially as follows: , and Each corresponds to approximately within each period , and There are [number] control points. The learning rates for each scale are as follows: , and Each simulation sample is approximately Root rays. Due to the close proximity of the receiving surfaces, rays from different periodic units exhibit translational misalignment on the receiving surfaces, resulting in overlapping artifacts in the synthesized irradiance. Therefore, the strict periodic constraint described in step six is not applied, allowing each sub-region to evolve independently to adapt to the target distribution. In this embodiment, only curvature regularization constraint is applied ( ), surface undulation amplitude constraint coefficient and slope constraint coefficient All are set to zero.
[0116] For extended light source control with divergence angle compression, a relay lens can be placed between the extended light source and the freeform lens to achieve compression of the extended light source's divergence angle. This relay lens is a spherical lens with the following specific parameters: front surface radius... The rear surface is flat, and the center thickness is... The refractive index of the lens material is 1.4936, and its focal length is... The relay lens is positioned in front of the freeform surface lens. The light source is a circular surface light source with a diameter of [missing information]. The relay lens is located at its focal plane. The divergent beam emitted by the extended light source is compressed into an approximately parallel beam by the relay lens before incident on the thin freeform surface lens of this invention. Because the beam has better uniform incidence conditions after being compressed by the relay lens, each sub-region can effectively coordinate to distribute energy to the complete target area. At this point, a cosine-type periodic initial surface shape can be constructed and optimized according to the design process described above for near-field conditions. It should be noted that the specific parameters of the relay lens described above are only examples; in practical applications, they should be selected and adjusted according to the size of the extended light source, the divergence angle, and the target irradiance requirements. This scheme combines the beam shaping capability of the relay lens with the multi-sub-region coordinated control mechanism of this invention, and is particularly suitable for irradiance control of large-size extended light sources.
[0117] The optimization results are as follows: For an ideal parallel light source, the surface undulation amplitude is... The final designed lens and the verified irradiance distribution are as follows: Figure 6 As shown in Figure A, a schematic diagram of the lens being partially blocked and the corresponding irradiance distribution are as follows: Figure 6 As shown in B. For the extended light source with divergence angle compression, the designed freeform surface profile undulation amplitude is... The final designed lens and the verified irradiance distribution are as follows: Figure 7 As shown in Figure A, a schematic diagram of the lens being partially blocked and the corresponding irradiance distribution are as follows: Figure 7As shown in Figure B, the designed freeform exit surface exhibits an undulating structure resembling a microlens array, but each sub-region has a different surface shape. These different sub-regions work together to form the overall irradiance distribution. Under extended light source conditions, the irradiance boundary exhibits a relatively smooth transition characteristic due to the influence of the light source's extension. Under ideal parallel light source conditions, the irradiance distribution has a clear boundary and a relatively uniform contour. When the lens is partially blocked, although the irradiance uniformity decreases, the overall distribution shape is maintained, demonstrating the strong robustness conferred by the multi-sub-region collaborative control mechanism.
[0118] Example 3: Direct Control of Extended Light Source This embodiment demonstrates the process of designing a thin freeform lens using a high-degree-of-freedom initial freeform surface profile (degenerate planar morphology) under direct illumination from an extended light source.
[0119] In this embodiment, the optical system has There are two optical surfaces: optical surface 1 is a planar incident surface, and optical surface 2 is a free-form exit surface. The refractive indices of the media are respectively... (Air), (Lens material) (Air). Optical surface 2 is a thin freeform surface to be optimized. The extended light source is a square surface light source with dimensions of... The distance from the optical surface is 1. The lens's half-angle with respect to the center of the light source reaches This is a typical scenario for controlling a large divergence angle extended light source. Unlike parallel light conditions, the light emitted by the extended light source illuminates the optical surface 2 at different incident angles. In this case, if a large-amplitude cosine-shaped periodic initial surface shape is used, the periodic sub-region can only introduce a limited deflection angle based on the original light direction. When this deflection angle is smaller than the divergence angle of the light source itself, the sub-region beams cannot work synergistically to affect the entire target distribution. Therefore, this embodiment uses the plane described in step two as the initial surface shape, that is, the initial freeform surface shape... A special case of degradation at that time.
[0120] The specific parameter settings are as follows: Initial lens thickness is... Optical surface 1 is located at the origin of the coordinate system. (Using...) The NURBS surface with control points represents the initial plane, and the control points are... The coordinate range is , All control points Coordinates initialized to The initial structure has tens of thousands of independent parameters to be optimized, providing ample degrees of freedom for the thinning evolution of freeform surfaces.
[0121] The target irradiance distribution is a pentagonal star shape. Taking into account the diffusion effect of the extended light source on the target distribution, a moderate attenuation is applied to the boundary region, allowing the irradiance to gradually transition from its maximum value in the central region to zero. The receiving surface is located at... At this location, the dimensions are During the simulation, the receiving surface was discretized into A pixel grid is used to evaluate the irradiance distribution. Each simulation sample... (Approximately 1 million) rays.
[0122] The optimization process is as follows: Using the Adam optimizer, the learning rate is set to... Without applying the periodic constraint described in step six, the normalized mean square error loss function is first used. 2500 rounds of optimization were performed to gradually bring the irradiance distribution closer to the target distribution; then the uniformity loss function was switched. An additional 100 rounds of optimization are performed to further improve the uniformity of the target region. The learning rate is determined through tuning to ensure a gradual decrease in the loss function during the initial optimization process. In this embodiment, only curvature regularization constraints are applied ( ), surface undulation amplitude constraint coefficient and slope constraint coefficient All are set to zero.
[0123] The optimization results are as follows: After optimization, the initial planar lens automatically exhibits obvious zoning characteristics. The central region is a gently sloping curved surface, whose boundary roughly corresponds to the boundary of the target irradiance distribution, contributing to the overall target irradiance. The edge region evolves into a high-frequency changing region, refracting edge light as much as possible into the target area, thus modulating the various angles of the pentagram target. The energy modulated by different regions superimposes to form the final uniform irradiance distribution, which is the core reason for the formation of an ultrathin freeform surface. It is worth noting that although these structures resemble the folded surface features of a Fresnel lens in morphology, because the surface is characterized by cubic NURBS and has a continuous curvature distribution, the designed freeform surface maintains smooth characteristics. The final designed freeform surface undulation amplitude is only [missing information]. The maximum Gaussian curvature is Its lens structure is as follows Figure 8 As shown in Figure A, the corresponding irradiance distribution is as follows: Figure 8 As shown in B. Evaluation showed that the energy on the receiving surface after this freeform surface modulation was approximately 92.0% compared to the initial energy modulation by the planar lens, indicating that the undulating structure at the edge did not deflect excessive energy out of the receiving surface range, and the system maintained high energy efficiency.
[0124] In the above embodiments, the thinning of the freeform surface does not simply originate from the numerical search of the optimizer, but rather from a multi-sub-region collaborative control mechanism. As the number of sub-regions increases, the target irradiance distribution is contributed by more spatially separated sub-regions. The key is that while the outgoing ray direction (i.e., local slope) of each sub-region remains essentially unchanged, the integral result of the surface sag as the slope decreases due to the reduced lateral width of each sub-region. Differentiable ray tracing further enables the target surface error to be automatically reverse-allocated to relevant sub-regions, prompting each sub-region to form a collaborative rather than isolated control structure during optimization.
[0125] 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 included within the scope of protection of the present invention.
Claims
1. A design method for a thin freeform surface optical system based on differentiable ray tracing and multi-sub-region synergistic control, characterized in that, Includes the following steps: Step 1: Construct the optical system and define the surface parameterization expression: Suppose that the optical system has N optical surfaces, and set the refractive index of the medium before and after each optical surface; select all or some of the surfaces as the surfaces to be optimized, among which the thin freeform surfaces to be optimized that need to achieve a thin structure are parameterized, and the vector formed by the surface parameters of all the thin freeform surfaces to be optimized is denoted as P; Step 2: Construct the initial surface shape of the thin freeform surface to be optimized: The initial surface shape includes multiple spatially separated surface sub-regions, which are convex, concave, saddle-shaped, or combinations thereof; the initial surface shape is represented as the superposition of a reference plane and surface shape functions of multiple sub-regions; the initial surface shape is fitted using the surface expression defined in Step 1 to obtain the initial surface parameter vector, which serves as the starting point for subsequent optimization; Step 3: Perform Monte Carlo ray tracing of the differentiable freeform surface, including the following sub-steps: Step 3.1: Sample the light source multiple times based on the light source parameters to obtain random light clusters; Step 3.2: Calculate the coordinates of the intersection points between the ray cluster and the current optical surface to determine the differentiable path of ray transmission on the multi-sub-region surface; for a free surface containing multiple spatially separated local sub-regions, when there are multiple candidate intersection points along the ray propagation direction, take the intersection point with the smallest positive real number parameter in the propagation direction. Candidate intersections are considered as valid intersections; Step 3.3: Based on the light clusters and optical surfaces obtained in Step 3.2 Intersection parameters Solving for optical surfaces Parameters of the light cluster after action ; and calculate the coordinates of the intersection point and the surface normal vector at the intersection point; Step 3.4: Process all optical surfaces sequentially according to Steps 3.2 and 3.3 to obtain the ray cluster parameters after being processed by the last optical surface; Step 3.5: Calculate the irradiance distribution on the target plane according to the parameters of the light ray cluster after passing through the optical system ; Step 3.6: Calculate irradiance distribution Irradiance profile Irradiance profile; Step 4: Calculate the total loss function: Based on the irradiance control loss function, add one or more of the following terms: curvature regularization term, surface undulation amplitude constraint term, and slope constraint term, in order to balance the irradiance control quality and surface geometric characteristics. Step 5: Calculate the gradient of the total loss function with respect to all the surface parameter vectors P to be optimized using backpropagation; Step 6: Using the gradient obtained in Step 5, update the surface parameters through parameter optimization and perform optimization iterations until the preset convergence condition is met. Step 7: Obtain the final designed thin freeform surface optical system.
2. The method of claim 1, wherein, In step one, the surface representation of high design freedom is a non-uniform rational B-spline NURBS surface, radial basis function RBF surface, Bézier surface, T-spline surface, or subdivision surface; the thin free surface to be optimized is represented in the form of a single-valued height field, that is, the x and y coordinates of the control points are preset by a regular grid and remain unchanged during the optimization process, and only the z coordinate of the control points is used as the optimization variable.
3. The method of claim 1, wherein, In step two, the expression for the initial surface shape is: In the formula: This is the initial freeform surface shape; As a reference datum plane; The number of surface sub-regions; For the first The fluctuation range of each sub-region; For the first The weight function or window function corresponding to each sub-region; For the first Location parameters of each sub-region; and The first Each sub-region direction and Scale parameters in the direction; For the first Local surface shape functions for each sub-region; When each sub-region uses the same or similar local surface shape function and is arranged according to a fixed spatial period, the initial surface shape is a periodic initial surface shape, represented as: in, express, It is a two-dimensional periodic function that satisfies: .
4. The method of claim 1, wherein, In step four, the total loss function is expressed as: In the formula: is the irradiance regulation loss function; , , are the weight coefficients of the constraint terms corresponding to the first optical surface, respectively. Curvature regularization term For balancing the surface smoothness of the first Optical surface In the formula: and For the first The number of curvature sampling points along the two principal axes on an optical surface; For the first Sampling points on the optical surface Curvature measurement at; and For the first Curvature control parameters for each surface; Curvature fluctuation amplitude constraint term For limiting the fluctuation amplitude of the first Optical surface, the initial thickness parameter of the system is used to control the thinness degree of the optical system together. In the formula: For the first Sampling points on the optical surface place Coordinate values For the first The maximum allowable undulation range is preset for each curved surface; Slope constraint term For limiting the maximum local slope of the first optical surface: In the formula: For the first Sampling points on the optical surface The modulus of the surface gradient, For the first The maximum allowable slope of each surface is preset.
5. The method of claim 1, wherein, In step 3.2, the intersection parameter is solved by a method comprising: To set intervals Linear search for parameters starting from 0 When light rays pass through a curved surface, the sign of the function value at the intersection point changes, revealing the range of values for the smallest positive real solution. Then, within this interval, the bisection method is used to narrow down the range of values, and the initial solution of the parameter t is obtained at the intersection point of any value within the interval. Use the initial solution Perform Newton's method iterations to obtain the precise intersection parameters: In the formula and These are the calculation results from the previous step and the current iteration, respectively. Indicates the first A vector consisting of all surface parameters of a thin freeform surface to be optimized; For optical curved surfaces The intersection point equation function.
6. The method of claim 1, wherein, In step six, under scenarios involving far-field distribution control, collimated or small divergence angle beam incidence, or periodic array expansion, a strict periodic constraint is applied to the gradient calculated in step five. This ensures that the constrained freeform surface exhibits strict spatial periodicity within the effective aperture range, i.e., satisfies... and ,in and They are respectively and The period length of the direction; the strict period constraint is achieved by the gradient averaging method: the parameterized mesh of the surface is divided into multiple periodic units, the average gradient of the control points corresponding to the same local position in all periodic units is calculated, and then the gradient of the control points corresponding to the same local position in all periodic units is uniformly assigned to the average value.
7. The method of claim 1, wherein, In step six, multi-scale optimization iteration is adopted, including: repeatedly executing steps three to six at the current scale for optimization until the loss function no longer decreases significantly or reaches the preset number of iterations for the current stage; then increasing the number of parameters of the surface to be optimized, and mapping the current optimization result to the surface expression after adding parameters through interpolation, as the initial surface type for the next stage, and entering the new stage of optimization; repeating the above process until the number of surface parameters reaches the preset upper limit value.
8. The method of claim 1, wherein, In step five, the backpropagation starts from the total loss function and proceeds in the reverse order of the calculation operations in steps three and four, passing the gradient layer by layer until the surface parameter P is reached. A single backpropagation simultaneously obtains the gradients of all surface parameters to be optimized with respect to the total loss function.
9. The method of claim 1, wherein, In step one, the optical system is a transmissive optical system or a reflective optical system; the light source is a parallel light source, a point light source, or an extended light source; and the target plane is a far-field receiving surface or a near-field receiving surface.
10. The method of claim 1, wherein, In step 3.5, the irradiance distribution The calculation method comprises: The energy distribution of a single ray on the target plane is considered as a distribution function with a specific spatial extension, and its energy weights are assigned according to a preset energy allocation method. The irradiance is assigned to one or more pixels on the target plane; the irradiance of a single pixel on the target plane is: In the formula: The area of a single pixel; The radiant flux of the light source; The energy weights of all rays after sampling; The energy weight of all light rays received by this pixel. The 1 norm of the vector; the irradiance of all pixels constitutes the irradiance distribution. .