Digital simulation platform, method and equipment of wavefront sensor and storage medium

The Shak-Hartmann wavefront sensor digital simulation platform, with its modular architecture and hybrid diffraction model, bridges the gap between simulation data and real sensor output in existing technologies. It achieves a highly efficient and flexible simulation platform, generates high-fidelity data, meets the customized needs of different deep learning tasks, reduces R&D costs, and improves the application scenario adaptability of simulation data and the flexibility of the system.

CN121809217APending Publication Date: 2026-04-07JIHUA LAB
View PDF 1 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-11-27
Publication Date
2026-04-07

AI Technical Summary

Technical Problem

Existing Shaker-Hartmann wavefront sensor digital simulation platforms perform poorly under different optical parameters, and their noise models are incomplete, resulting in discrepancies between simulation data and real sensor outputs. It is difficult to balance computational efficiency and physical realism, and deep learning methods lack flexible and efficient data generation mechanisms.

Method used

The Zernike polynomial calculation module, microlens array simulation module, centroid extraction module, and wavefront reconstruction module are used. Combined with the hybrid diffraction propagation model and weighted centroid algorithm, a high-fidelity wavefront phase is generated through numerical optimization algorithm, and a modular architecture is constructed to adapt to different application scenarios.

Benefits of technology

It has achieved an efficient and flexible simulation platform, generated high-fidelity data, met the customized needs of different deep learning tasks, reduced R&D costs, improved simulation efficiency and system flexibility, adapted to various noise conditions, and supported traditional algorithm verification and deep learning training.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121809217A_ABST
    Figure CN121809217A_ABST
Patent Text Reader

Abstract

The invention relates to a digital simulation platform, method and device of a wavefront sensor and a storage medium. The system comprises a Zernike polynomial calculation module, a micro-lens array simulation module, a centroid extraction module and a wavefront reconstruction module. The Zernike polynomial calculation module is used for analyzing and generating incident wavefront by adopting a Zernike polynomial, the micro-lens array simulation module is used for simulating a micro-lens array by adopting a mixed diffraction propagation model to segment the incident wavefront to generate a light spot image, and the centroid extraction module is used for extracting the light spot image by adopting a weighted centroid algorithm. The light spot image acquisition module is used for acquiring a light spot image and calculating a mass center position of the light spot image in combination with global and local dynamic threshold mechanisms, and the wavefront reconstruction module is used for establishing a relationship between the mass center position and a wavefront slope, solving a Zernike coefficient by using a numerical optimization algorithm, generating wavefront aberration distribution and outputting a reconstructed wavefront phase. Through the modular design, the independence of each function is ensured, the simulation efficiency is improved, and the data generation capability and the system flexibility are enhanced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application belongs to the field of optical measurement and photoelectric detection technology, and specifically relates to a digital simulation platform, method, device and storage medium for a wavefront sensor. Background Technology

[0002] The Shaker-Hartmann wavefront sensor is an optical measurement instrument that segments and samples the incident wavefront using a microlens array and inverts the wavefront phase distribution based on the centroid offset of the sub-aperture spots. Its core principle is to use a microlens array to divide the incident wavefront into multiple sub-apertures, each focusing a local wavefront into a spot. By measuring the centroid offset of each spot relative to a reference position, the average wavefront slope within the corresponding sub-aperture range can be calculated. Then, a reconstruction algorithm can be used to recover the complete wavefront phase information. It is widely used in adaptive optics, optical inspection, and ophthalmology.

[0003] In practical applications, the performance of wavefront sensors is significantly influenced by various physical parameters, including the size of the microlens array (number of sub-apertures), spacing (aperture size), focal length, system operating wavelength, detector pixel size, and the type and intensity of optical aberrations. These parameters collectively determine the dynamic range, spatial resolution, and measurement accuracy of the wavefront sensor. Therefore, accurate digital simulation is of great value in the sensor design, algorithm research, and system integration stages. Digital simulation can simulate system responses under different parameter configurations at low cost and high efficiency, predict actual performance, optimize design parameters, and provide a large amount of controllable and repeatable training and testing data for the development of wavefront reconstruction algorithms (such as the region method and the pattern method) and emerging deep learning methods. A Shak-Hartmann wavefront sensor digital simulation platform capable of simulating real physical processes with high fidelity and possessing highly parameterized and modular characteristics is crucial for promoting the development of wavefront sensing technology.

[0004] In the existing technology, the literature [Wei Ping, Li Xinyang, Luo Xi, et al. Design and verification of digital simulation platform for Shaker-Hartmann wavefront sensor [J]. Chinese Journal of Lasers, 2021, 48(17): 141-150.] proposes a digital simulation platform for Shaker-Hartmann wavefront sensor. This platform uses numerical simulation technology to construct a complete simulation system containing three core modules: wavefront generation, wavefront detection, and wavefront reconstruction. The feature of this simulation platform is its configurable parameters. Users can adjust the wavefront type, sensor structural parameters, noise level, and reconstruction algorithm as needed, providing a flexible tool for system optimization and algorithm testing. However, because the diffraction model used by this platform is relatively simple, it is difficult to maintain optimal performance under different optical parameters, and the noise model is not complete enough, resulting in a gap between the simulation data and the actual sensor output, making it difficult to balance computational efficiency and physical realism.

[0005] Another patent, CN110044498A, proposes a deep learning-based method for reconstructing Hartmann wavefront modes in a Hartmann wavefront sensor. This method introduces deep neural networks into the simulation and data processing of the Shak-Hartmann wavefront sensor. Its core idea is to establish an end-to-end mapping from the focal plane image to the wavefront mode coefficients, avoiding the feature dimensionality reduction process based on sub-aperture slope in traditional methods. The greatest advantage of this method is its ability to utilize the complete morphological information of the light spot, rather than just the centroid position, thereby effectively reducing mode confusion and mode coupling errors. It can reconstruct higher-order mode coefficients with higher accuracy at the same noise level. Although this method introduces deep learning to improve reconstruction accuracy, it relies on predefined static datasets and lacks a flexible and efficient data generation mechanism, making it unable to adapt to the diverse and customized training data requirements of different tasks. Summary of the Invention

[0006] This application provides a digital simulation platform, method, device, and storage medium for wavefront sensors, aiming to at least partially solve one of the aforementioned technical problems in the prior art.

[0007] To address the above problems, this application provides the following technical solution: A digital simulation platform for a wavefront sensor includes a Zernike polynomial calculation module, a microlens array simulation module, a centroid extraction module, and a wavefront reconstruction module. The Zernike polynomial calculation module is used to analytically generate the incident wavefront using Zernike polynomials. The microlens array simulation module is used to simulate the microlens array segmenting the incident wavefront to generate a spot image using a hybrid diffraction propagation model. The centroid extraction module is used to calculate the centroid position of the spot image using a weighted centroid algorithm combined with global and local dynamic thresholding mechanisms. The wavefront reconstruction module is used to establish the relationship between the centroid position and the wavefront slope, and uses a numerical optimization algorithm to solve for the Zernike coefficients, generating the wavefront aberration distribution and outputting the reconstructed wavefront phase.

[0008] The technical solution adopted in this application embodiment also includes: the Zernike polynomial calculation module adopts a dual-mode operation mechanism of symbolic calculation mode and table lookup caching mode. The symbolic calculation mode is used to generate Zernike polynomials of arbitrary order and their derivative expressions, and the table lookup caching mode is used to pre-generate commonly used expressions and load a lookup table of commonly used Zernike terms.

[0009] The technical solution adopted in this application embodiment also includes: the Zernike polynomial calculation module includes: Index transformation component: used for mapping index schemes; Symbolic computation component: used to construct a symbolic representation of the radial polynomial through a recursive algorithm, generate a polar coordinate expression by combining it with the angular function, and then obtain the partial derivative analytical expression in Cartesian coordinates through coordinate transformation to obtain the full aperture incident wavefront; The table lookup management component is used for storing and quickly retrieving pre-compiled common expressions and loading metadata. The unified data interface is used to provide a unified function call interface.

[0010] The technical solution adopted in this application embodiment also includes: the microlens array simulation module further includes: Sub-aperture segmentation component: used to divide the full-aperture incident wavefront into N sub-apertures according to the layout parameters of the microlens array, and calculate the boundary coordinates and center position of each sub-aperture so that each sub-aperture corresponds to a microlens; Diffraction calculation component: used to automatically select the angle spectrum method or Fraunhofer diffraction method based on Fresnel number to simulate the propagation process of light field after passing through microlens. It applies pre-calculated lens phase modulation to the wavefront data of each sub-aperture to simulate the focusing effect of microlens. Then, it calculates the complex light field distribution on the focal plane through fast Fourier transform and converts it into light intensity value. Image synthesis and noise injection component: used to stitch the light intensity values ​​of each sub-aperture into a complete focal plane image according to the array layout, and add random perturbation or fixed pattern noise pixel by pixel according to the configured noise model, and finally output the spot image.

[0011] The technical solution adopted in this application embodiment further includes: the centroid extraction module includes: Image preprocessing component: used to enhance the signal-to-noise ratio of the spot image through background subtraction and filtering smoothing; Spot detection and coarse localization component: After converting the spot image into a binary image using adaptive binarization, dynamically calculates the global threshold, then applies morphological closing operation to fill the holes inside the spot image, and filters out noise points, outputs the bounding box and initial centroid coordinates of each spot image; Centroid Precision Localization Component: Used to extract sub-image regions from the bounding box of each spot image, dynamically calculate local thresholds, then use a weighted centroid algorithm to sum the pixels whose intensity exceeds the threshold, and finally use coordinate transformation to map the local centroid coordinates to the global image coordinate system; Centroid Sorting and Geometric Analysis Component: Used to sort centroids using a row-column priority strategy, statistically analyze centroid distribution, calculate aperture parameters, and finally output a structured list of centroids and aperture parameters.

[0012] The technical solution adopted in this application embodiment also includes: the wavefront reconstruction module includes: Wavefront slope calculation component: The input is the offset data between the measured centroid and the reference centroid. Combined with the microlens focal length parameters, the wavefront slope of each sub-aperture is calculated using geometric optics formulas. The wavefront slope is divided into x and y directions, forming a slope vector, which corresponds to the observed value in the reconstruction equation. Reconstruction matrix building component: Based on normalized coordinates, calculates the gradient field of each Zernike mode, realizes the numerical solution from wavefront slope to Zernike coefficients, and constructs the reconstruction matrix; Zernike coefficient solving component: It uses a numerical algorithm to solve a system of linear equations, and finally generates the wavefront phase through a linear combination of Zernike coefficients and Zernike basis functions.

[0013] The technical solution adopted in this application embodiment also includes: the relationship between the wavefront slope and the centroid offset is derived from geometric optics. The focal length of the microlens array is The pixel size is The optical path magnification is ,but and Wavefront slope in direction and The calculation is as follows:

[0014]

[0015] in and This represents the centroid offset.

[0016] Another technical solution adopted in this application embodiment is: a digital simulation method for a wavefront sensor, including: The incident wavefront was generated analytically using Zernike polynomials. A hybrid diffraction propagation model is used to simulate the microlens array to segment the incident wavefront and generate a spot image; The centroid position of the spot image is calculated by employing a weighted centroid algorithm and combining global and local dynamic thresholding mechanisms. The relationship between the centroid position and the wavefront slope is established, and the Zernike coefficient is solved using a numerical optimization algorithm to generate the wavefront aberration distribution and output the reconstructed wavefront phase.

[0017] Another technical solution adopted in this application embodiment is: a device, the device including a processor and a memory coupled to the processor, wherein, The memory stores program instructions for implementing a digital simulation method for the wavefront sensor; The processor is used to execute the program instructions stored in the memory to control the digital simulation method of the wavefront sensor.

[0018] Another technical solution adopted in this application embodiment is: a storage medium storing program instructions that can be run by a processor, the program instructions being used to execute the digital simulation method of the wavefront sensor.

[0019] Compared to existing technologies, the beneficial effects of the embodiments of this application are as follows: The digital simulation platform, method, device, and storage medium for wavefront sensors in the embodiments of this application adopt a modular architecture and algorithm optimization to construct an efficient, high-fidelity, and flexible Shake-Hartmann wavefront sensor digital simulation platform. By designing a highly modular and parameterized simulation architecture, it achieves flexible configuration of sensor parameters, wavefront phase, and noise conditions, and quickly adapts to different application scenarios. By constructing an adaptive hybrid diffraction model and noise model, it significantly improves simulation efficiency and physical realism while ensuring the accuracy of the physical process. By parameterizing the Zernike coefficients and noise type, it can generate high-fidelity paired data containing spot images, real wavefronts, and centroid information in batches, accurately meeting the customized needs of different deep learning tasks and effectively overcoming the shortcomings of existing methods in terms of data scarcity and generalization ability. By optimizing the data output interface, the simulation data can be conveniently used for traditional algorithm verification and directly used as a training dataset for deep learning networks, providing comprehensive data support for the research and development of wavefront sensing technology. This application, through modular design, not only ensures the independence of each function, but also allows for flexible parameter configuration to adapt to different application scenarios. This not only reduces R&D costs, but also provides strong support for the R&D and innovation of wavefront sensing technology by improving simulation efficiency, enhancing data generation capabilities and system flexibility. Attached Figure Description

[0020] Figure 1 This is a schematic diagram of the structure of the digital simulation platform for the wavefront sensor according to an embodiment of this application; Figure 2 This is a schematic diagram of the component composition and calculation process of the Zernike polynomial calculation module in the embodiments of this application; Figure 3 This is a schematic diagram of the component composition and calculation process of the microlens array simulation module in the embodiments of this application; Figure 4 This is a schematic diagram of the component composition and calculation process of the centroid extraction module in the embodiments of this application; Figure 5 This is a schematic diagram of the component composition and calculation process of the wavefront reconstruction module in the embodiments of this application; Figure 6 This is a flowchart of the wavefront sensor design verification scheme; Figure 7This is a flowchart of the algorithm verification scheme; Figure 8 This is a flowchart of a deep learning dataset generation scheme; Figure 9 This is a schematic flowchart of the digital simulation method for wavefront sensors according to an embodiment of this application; Figure 10 This is a schematic diagram of the device structure according to an embodiment of this application; Figure 11 This is a schematic diagram of the structure of the storage medium according to an embodiment of this application. Detailed Implementation

[0021] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of the embodiments. Based on the embodiments of this application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of this application.

[0022] The terms "first," "second," and "third" in this application are for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Therefore, a feature defined as "first," "second," or "third" may explicitly or implicitly include at least one of that feature. In the description of this application, "multiple" means at least two, such as two, three, etc., unless otherwise explicitly specified. All directional indications (such as up, down, left, right, front, back, etc.) in the embodiments of this application are only used to explain the relative positional relationships and movements between components in a specific orientation (as shown in the figures). If the specific orientation changes, the directional indications also change accordingly. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or device that includes a series of steps or units is not limited to the listed steps or units, but may optionally include steps or units not listed, or may optionally include other steps or units inherent to these processes, methods, products, or devices.

[0023] In this document, the term "embodiment" means that a particular feature, structure, or characteristic described in connection with an embodiment may be included in at least one embodiment of this application. The appearance of this phrase in various places throughout the specification does not necessarily refer to the same embodiment, nor is it a separate or alternative embodiment mutually exclusive with other embodiments. It will be explicitly and implicitly understood by those skilled in the art that the embodiments described herein can be combined with other embodiments.

[0024] Specifically, please refer to Figure 1This is a schematic diagram of the structure of the digital simulation platform for the wavefront sensor according to an embodiment of this application. The digital simulation platform for the wavefront sensor according to this embodiment includes a Zernike polynomial calculation module, a microlens array simulation module, a centroid extraction module, and a wavefront reconstruction module. Specifically, the Zernike polynomial calculation module is used to analytically generate the incident wavefront using Zernike polynomials; the microlens array simulation module is used to simulate the microlens array segmenting the incident wavefront to generate a spot image using a hybrid diffraction propagation model; the centroid extraction module is used to calculate the centroid position of the spot image using a weighted centroid algorithm combined with global and local dynamic thresholding mechanisms; and the wavefront reconstruction module is used to establish the relationship between the centroid position and the wavefront slope, and to solve for the Zernike coefficients using a numerical optimization algorithm, ultimately generating the wavefront aberration distribution and outputting the reconstructed wavefront phase.

[0025] Furthermore, the Zernike polynomial computation module employs a dual-mode operation mechanism: symbolic computation and table lookup caching. Symbolic computation mode can generate Zernike polynomials of arbitrary order and their derivative expressions in real time and compile them into high-performance numerical functions, improving computational accuracy. Table lookup caching mode, by pre-generating commonly used expressions and loading lookup tables of frequently used Zernike terms, avoids the overhead of real-time symbolic computation, significantly improving efficiency. This efficient dual-mode operation mechanism resolves the trade-off between flexibility and speed in traditional computational methods, providing reliable basis function support for wavefront simulation.

[0026] Specifically, such as Figure 2The diagram shows the component composition and calculation process of the Zernike polynomial calculation module in this embodiment. The Zernike polynomial calculation module includes an index conversion component, a symbolic calculation component, a lookup management component, and a unified data interface. Since Zernike polynomials have multiple indexing schemes, such as OSA / ANSI (ANSI Z80.28 and ISO 24157 standards) and Noll (the standard index used by commercial optical software such as Zemax), this embodiment uses the index conversion component to quickly map the indexing schemes, ensuring that the system can perform polynomial calculations under a unified index. The symbolic calculation component is the core component of the Zernike polynomial calculation module. It is used to construct the symbolic representation of the radial polynomial using a recursive algorithm, and then combine it with the angular direction function to generate a complete polar coordinate expression. Finally, through coordinate transformation, it obtains the partial derivative analytical expression in Cartesian coordinates, thus obtaining the full-aperture incident wavefront. The lookup management component is used for the storage and rapid retrieval of pre-compiled commonly used expressions, and for the rapid loading of metadata such as Zernike polynomial expressions, partial derivative expressions, and aberration names, which can improve calculation efficiency. The unified data interface provides a unified function call interface, supports automatic processing of scalar input and array input, and automatically routes to symbolic computation mode or table lookup cache mode based on the running mode selector.

[0027] The analytical algorithm for the symbolic computation component specifically includes: Zernike polynomials based on the polar coordinate system, containing radial polynomials. With angular direction function The product form. For a given radial order. and azimuth frequency The polynomial expression is: (1) Through the transformation relationship between polar coordinates and Cartesian coordinates: (2) (3) A polynomial can be converted into Cartesian coordinate form. ,in It is the term index of the polynomial. Furthermore, by... Differentiating the symbolic expression yields the partial derivative analytical expression in Cartesian coordinates. , .

[0028] Composed of the above components, the Zernike polynomial calculation module not only ensures calculation accuracy but also significantly improves performance through optimization strategies, providing a reliable basis for basis function calculations for wavefront sensor simulation. The module's output directly serves the microlens array simulation module and the wavefront reconstruction module, ensuring the coherence and efficiency of the entire simulation process.

[0029] It is understandable that the Zernike polynomial computation module can also use pure numerical iteration methods to replace analytical computation. For example, it can directly output polynomial values ​​in the Cartesian coordinate system through predefined recursive formulas, avoiding symbolic computation overhead. Although it sacrifices some symbolic flexibility, it can significantly improve real-time computation efficiency, making it particularly suitable for application scenarios with limited computing resources, such as embedded systems.

[0030] Furthermore, the microlens array simulation module, based on a physical optics model, employs a hybrid diffraction propagation model. It simulates the segmentation and focusing process of the microlens array using either the non-Nelle number automatic angle spectral selection method or the Fraunhofer diffraction method to achieve efficient and high-precision conversion from Zernike coefficients to sensor grayscale images. Specifically, as follows... Figure 3 The diagram shown illustrates the component composition and calculation process of the microlens array simulation module in this embodiment. Specifically, the microlens array simulation module includes a sub-aperture segmentation component, a diffraction calculation component, and an image synthesis and noise injection component.

[0031] The sub-aperture segmentation component divides the full-aperture incident wavefront into N sub-apertures based on the layout parameters of the microlens array. It calculates the boundary coordinates and center position of each sub-aperture, ensuring that each sub-aperture corresponds to a microlens. This guarantees the geometric accuracy of the wavefront segmentation and provides uniform input data for the diffraction calculation component. Specifically, the Zernike polynomial is used to segment the incident wavefront... Expanded into a linear combination of Zernike polynomials: (4) in Zernike coefficient, For the first Zernike polynomials, This represents the total number of terms. Constructing the complex wavefront field based on the wavefront phase: (5) in, It is the pupil function, representing the light wave's movement through the aperture. The amplitude portion at that point. Typically used to define the shape of an aperture stop; The imaginary unit, This indicates phase modulation.

[0032] The full-aperture incident wavefront is divided into Each sub-aperture corresponds to a microlens, and the extraction range of the sub-aperture is determined by the array layout. (6) in The coordinates of the sub-aperture center are This refers to the microlens spacing. and This is the index for the sub-aperture.

[0033] The diffraction calculation component is the core component of the microlens array simulation module. It is used to simulate the propagation process of light field after passing through a microlens by automatically selecting either the angular spectral method or the Fraunhofer diffraction method based on the Fresnel number. For the wavefront data of each sub-aperture, pre-calculated lens phase modulation is applied to simulate the focusing effect of the microlens. Subsequently, the complex light field distribution on the focal plane is calculated using a fast Fourier transform, converted into light intensity values, and normalized using energy conservation checks. This balances computational accuracy and efficiency while avoiding energy distortion during the simulation process. Specifically, for each sub-aperture, based on the Fresnel number... Value selection model: (7) in, The sub-aperture radius is usually taken as... ; The operating wavelength; This is the focal length of the microlens. If... Activate angular spectral method: (8) in, Indicates Fourier transform; Angular spectrum transfer function; For wave number. If Using Fraunhofer diffraction: (9) The light intensity distribution is calculated as follows: (10) The image synthesis and noise injection component is responsible for integrating the light intensity values ​​of all sub-apertures and adding noise to simulate the actual detector response. First, the light intensity values ​​of each sub-aperture are stitched together in an array layout to form a complete focal plane image; the size is determined by the number of microlenses and the number of sampling points per spot. Then, random perturbations or fixed-pattern noise are added pixel-by-pixel according to the user-configured noise model. Finally, the output spot image is: (11) Image size is ,in This represents the number of sampling points for each light spot. The light intensity distribution represents the focal plane image under ideal noise-free conditions. To simulate the response of an actual detector, the image synthesis and noise injection components integrate multiple noise models, including Gaussian, Poisson, and polar noise, to add noise after the light intensity calculation. Noise parameters can be adjusted via the user interface to match different experimental conditions. Among these, Gaussian noise simulates random noise from electronic readout, achieved by adding noise with a mean of zero and a variance of... Gaussian distribution implementation: (12) in, The noise level can be configured as a function of the signal-to-noise ratio (SNR).

[0034] Poisson noise is shot noise that simulates photon counting, achieved by sampling from a Poisson distribution: (13) in, The gain factor converts light intensity into the number of photons.

[0035] Polarity noise is analogous to detector dead pixels or fixed-mode noise, multiplied by a binary mask. (Value is 0 or 1) Implementation: (14) In the above-mentioned microlens array simulation module, light field propagation is simulated using the non-Nelle number automatic selection angular spectrum method or Fraunhofer diffraction method to simulate the segmentation and focusing process of the microlens array. This adaptive mechanism ensures optimal calculation under different optical parameters (such as microlens focal length and operating wavelength). It also integrates multiple physical noise models, including Gaussian noise, Poisson noise, and polar noise, making the simulation results closer to the actual sensor output and improving the physical realism and robustness of the simulation. The output of this module directly serves the subsequent centroid extraction module, providing crucial intermediate data for the entire wavefront sensing simulation process and ensuring the realism and reliability of the system-level simulation.

[0036] Furthermore, the centroid extraction module employs a weighted centroid algorithm, combined with global and local dynamic thresholding mechanisms, to calculate the centroid position of the spot image. This avoids noise interference and improves positioning accuracy, providing precise slope data for wavefront reconstruction. Specifically, as follows... Figure 4 The diagram shown illustrates the component composition and calculation process of the centroid extraction module in this embodiment. The centroid extraction module includes an image preprocessing component, a spot detection and coarse localization component, a centroid precise localization component, and a centroid sorting and geometric analysis component.

[0037] The image preprocessing component enhances the signal-to-noise ratio of the spot image through background subtraction and filtering smoothing, reduces noise interference, and improves the stability of subsequent binarization and centroid calculation. The spot detection and coarse localization component uses adaptive binarization to convert the spot image into a binary image, then dynamically calculates a global threshold to ensure effective segmentation of the spot image under different lighting conditions. Subsequently, morphological closing operations are applied to fill holes within the spot image, enhancing connectivity, and noise points are filtered out before outputting the bounding box and initial centroid coordinates of each spot image. For a given spot image (sub-aperture), the pixel coordinates are set as follows: Pixel intensity value Then the centroid coordinates The calculation is as follows: (15) (16) global threshold Used for initial binarization, defined as: (17) in and These are the minimum and maximum intensity values ​​of the light spot image, respectively. This is an adjustable parameter used to control the relative level of the threshold.

[0038] The centroid-based precise localization component achieves sub-pixel-level precise localization through a weighted centroid algorithm, avoiding the failure of fixed thresholds for low-contrast spots and improving the algorithm's adaptability. First, for each spot image's bounding box, sub-image regions are extracted, and local thresholds are dynamically calculated. Then, the weighted centroid algorithm is used to sum the values ​​of pixels with intensities exceeding the threshold, effectively suppressing local noise. Finally, coordinate transformation is used to map the local centroid coordinates to the global image coordinate system, and boundary constraints ensure the results fall within the image range. The summation only applies to pixels with intensity values ​​exceeding the threshold to exclude background noise. Local threshold. Defined as: (18) in and This represents the extreme intensity of the current light spot image. This is a local threshold parameter to ensure adaptive local contrast changes.

[0039] The centroid sorting and geometric analysis component is responsible for the post-processing and structured output of the centroid data. First, a row- and column-first strategy is used for centroid sorting to ensure the centroid order aligns with the microlens array layout. Then, the centroid distribution is statistically analyzed and aperture parameters are calculated to ensure coverage of all spot images. Finally, a structured list of centroids and aperture parameters are output.

[0040] In summary, the centroid extraction module achieves high-precision and high-efficiency centroid extraction through optimized design of mathematical principles and refined division of labor in component processes. By using adaptive binarization and local contrast processing, it effectively suppresses noise interference, achieves sub-pixel-level accurate positioning, avoids the limitations of fixed thresholds, and performs exceptionally well in low-contrast environments, providing a high-precision data foundation for wavefront slope calculation.

[0041] Furthermore, such as Figure 5 The diagram shown illustrates the component composition and calculation process of the wavefront reconstruction module in this embodiment. The wavefront reconstruction module includes: Wavefront Slope Calculation Component: This component converts the centroid position into wavefront slope, bridging optical measurement and mathematical modeling. The component takes as input the offset data between the measured centroid and the reference centroid, combines this with the microlens focal length parameters, and calculates the wavefront slope for each sub-aperture using geometric optics formulas. Strict unit conversion is handled during the calculation, and a focal length compensation factor is integrated to reflect the optical path amplification effect. The slope data is divided into x and y directions, forming a slope vector, which corresponds to the observed values ​​in the reconstruction equation. The component automatically filters invalid points beyond the analysis aperture using a data filtering function, improving reconstruction robustness. The relationship between the wavefront slope and the centroid offset is derived from geometric optics: the focal length of the microlens array is... The pixel size is The optical path magnification is ,but and Wavefront slope in direction and The calculation is as follows: (19) (20) in and This represents the centroid offset.

[0042] The reconstruction matrix construction component is the core component of the wavefront reconstruction module. Based on normalized coordinates, it calculates the gradient field for each Zernike mode, achieving a numerical solution from the wavefront slope to the Zernike coefficients, and constructs the reconstruction matrix. The gradient field is implemented through symbolic computation or table lookup methods in the Zernike computation module. The relationship between the wavefront slope and the Zernike coefficients is determined by the gradient of the Zernike polynomial. (twenty one) (twenty two) for Each aperture, stacking all slopes into a vector: (twenty three) The coefficient vector is: (twenty four) The reconstruction equation is represented as a linear system: (25) in To reconstruct the matrix, its elements are calculated from the partial derivatives of the Zernike polynomials in normalized coordinates.

[0043] The Zernike coefficient solver component uses numerical algorithms to solve a system of linear equations. The solution process automatically handles mode truncation and noise suppression, outputting a Zernike coefficient vector. The equations can be solved using methods such as least squares, singular value decomposition (SVD), or Tikhonov regularization to suppress noise and ensure numerical stability. Finally, the wavefront phase is generated through a linear combination of Zernike coefficients and Zernike basis functions, and output as gridded data for evaluating aberration metrics such as root mean square (RMS) and peak-to-valley (PV) values.

[0044] As described above, the wavefront reconstruction module, through the collaborative work of the aforementioned components, achieves end-to-end reconstruction from the original centroid to the wavefront phase. Its design seamlessly integrates into the overall simulation process. The rigor of the mathematical principles and the modularity of the component flow ensure the realism and scalability of the simulation, providing a reliable tool for wavefront sensor design and algorithm verification.

[0045] It is understandable that the reconstruction matrix construction of the wavefront reconstruction module can also use Fourier modes instead of Zernike polynomials as basis functions, achieving efficient slope-phase conversion through fast Fourier transform. Furthermore, the solution algorithm can use iterative optimization methods such as conjugate gradients instead of the least squares method, directly mapping slope data to wavefront phase, avoiding numerical instability issues caused by large matrix inversions, which is particularly suitable for large-scale sub-aperture systems. At the system architecture level, an event-driven model or pipelined parallel design can replace the current modular sequential process. The event-driven architecture triggers the execution of each module through asynchronous message passing, facilitating concurrent processing of multiple tasks; while the pipelined parallel design can overlap the execution of wavefront generation, diffraction calculation, centroid extraction, and other stages, significantly improving the throughput of large-scale data batch processing. Although these two architectures increase scheduling complexity, they better meet the needs of applications with high real-time requirements.

[0046] The wavefront sensor digital simulation platform of this application can be applied to engineering design, algorithm development, and cutting-edge artificial intelligence technologies. It has high practical value and scalability. Its application schemes include, but are not limited to, wavefront sensor design verification schemes, algorithm verification schemes, and deep learning dataset generation schemes, as detailed below: Wavefront sensor design verification scheme: This application utilizes a wavefront sensor digital simulation platform to systematically and risk-free virtually test and evaluate the physical parameters of the sensor, such as the microlens array layout, focal length, aperture size, and pixel size, thereby guiding the optimized design of the physical sensor. This scheme constructs a closed-loop verification process from parameter input to performance feedback, as detailed below. Figure 6 As shown, the process begins by configuring an initial set of sensor parameters and test wavefront conditions based on the design objectives. Then, a complete wavefront sensing simulation is executed by sequentially calling the microlens array simulation module, centroid extraction module, and wavefront reconstruction module through a wavefront sensor digital simulation platform. Finally, the performance of the current sensor parameters is quantitatively evaluated by analyzing the error (such as root mean square error RMSE, Strell ratio, etc.) between the reconstructed wavefront phase and the input true wavefront. If the performance is unsatisfactory, the sensor parameters can be automatically or manually adjusted, and a new round of simulation verification can be initiated until the required parameter design is obtained. This closed-loop system comprehensively verifies the robustness of the sensor under different wavefront distortions (such as atmospheric turbulence and optical aberrations) and noise environments, significantly shortening the design cycle and reducing R&D costs.

[0047] The algorithm verification scheme process is as follows: Figure 7 As shown in the diagram, the process begins with the establishment of a standard test dataset. Utilizing the high-fidelity simulation capabilities of the wavefront sensor digital simulation platform of this application, a database of known real wavefront spot images is generated. Subsequently, the algorithm to be verified and the benchmark algorithm built into the wavefront sensor digital simulation platform simultaneously process this dataset, outputting the reconstructed wavefront results respectively. Finally, a multi-index evaluation module comprehensively analyzes the reconstruction accuracy, computational efficiency, resource consumption, and noise robustness of each algorithm, ultimately generating a detailed comparative analysis report. This report clearly demonstrates the advantages and disadvantages of each algorithm, ensuring a fair and comprehensive evaluation of the performance of both new and old algorithms. It not only clearly reveals the limitations of traditional algorithms in specific scenarios but also provides a unified benchmark testing environment for innovative algorithms.

[0048] To meet the urgent need for massive, high-quality training data in data-driven wavefront sensing methods (such as deep learning), the wavefront sensor digital simulation platform can serve as a highly configurable dataset generator, customizing data formats and content according to different task requirements (such as centroid regression and end-to-end wavefront reconstruction). The workflow of the deep learning dataset generation scheme is as follows: Figure 8As shown, the dataset specifications are first defined, including size, Zernike coefficient range, and noise type. Then, the generator iteratively executes the following steps: randomly generating Zernike coefficients according to a preset statistical distribution; calculating the corresponding wavefront and generating a spot image using the wavefront sensor digital simulation platform of this application; injecting specified noise; and finally, saving the generated paired data (such as spot images, true centroids, wavefront phases, etc.) in a predetermined format. This loop continues until a specified number of samples are generated, and finally, a complete dataset and metadata files describing its statistical characteristics are packaged together.

[0049] Please see Figure 9 This is a schematic flowchart of a digital simulation method for a wavefront sensor according to an embodiment of this application. The digital simulation method for a wavefront sensor according to an embodiment of this application includes the following steps: S100: The incident wavefront is generated analytically using Zernike polynomials; S110: A hybrid diffraction propagation model is used to simulate the segmentation of the incident wavefront by a microlens array to generate a spot image; S120: The weighted centroid algorithm is used, combined with global and local dynamic thresholding mechanisms to calculate the centroid position of the spot image; S130: Establish the relationship between the centroid position and the wavefront slope, and use a numerical optimization algorithm to solve for the Zernike coefficients. Finally, generate the wavefront aberration distribution and output the reconstructed wavefront phase.

[0050] It should be noted that since the information interaction and execution process between the method embodiments of this application and the above-mentioned system / device / module / unit are based on the same concept, the specific functions and technical effects can be found in the system embodiments section, and will not be repeated here.

[0051] Based on the above, the digital simulation platform and method for wavefront sensors in this application adopts a modular architecture and algorithm optimization to construct an efficient, high-fidelity, and flexible Shake-Hartmann wavefront sensor digital simulation platform. By designing a highly modular and parameterized simulation architecture, it achieves flexible configuration of sensor parameters, wavefront phase, and noise conditions, quickly adapting to different application scenarios. By constructing an adaptive hybrid diffraction model and noise model, it significantly improves simulation efficiency and physical realism while ensuring the accuracy of the physical process. By parameterizing the Zernike coefficients and noise type, it can generate high-fidelity paired data containing spot images, real wavefronts, and centroid information in batches, accurately meeting the customized needs of different deep learning tasks and effectively overcoming the shortcomings of existing methods in terms of data scarcity and generalization ability. By optimizing the data output interface, the simulation data can be conveniently used for traditional algorithm verification and directly used as a training dataset for deep learning networks, providing comprehensive data support for the research and development of wavefront sensing technology. This application, through modular design, not only ensures the independence of each function, but also allows for flexible parameter configuration to adapt to different application scenarios. This not only reduces R&D costs, but also provides strong support for the R&D and innovation of wavefront sensing technology by improving simulation efficiency, enhancing data generation capabilities and system flexibility.

[0052] Please see Figure 10 This is a schematic diagram of the device structure according to an embodiment of this application. The device 50 includes: Memory 51 storing executable program instructions; Processor 52 connected to memory 51; The processor 52 is used to call the executable program instructions stored in the memory 51 and perform the following steps: using Zernike polynomial analysis to generate the incident wavefront; using a hybrid diffraction propagation model to simulate a microlens array to segment the incident wavefront and generate a spot image; using a weighted centroid algorithm and combining global and local dynamic thresholding mechanisms to calculate the centroid position of the spot image; establishing the relationship between the centroid position and the wavefront slope, and using a numerical optimization algorithm to solve for the Zernike coefficients, generating the wavefront aberration distribution and outputting the reconstructed wavefront phase.

[0053] The processor 52 can also be referred to as a CPU (Central Processing Unit). The processor 52 may be an integrated circuit chip with signal processing capabilities. The processor 52 can also be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), an off-the-shelf programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. A general-purpose processor can be a microprocessor or any conventional processor.

[0054] Please see Figure 11 This is a schematic diagram of the structure of the storage medium in an embodiment of this application. The storage medium in this embodiment stores program instructions 61 capable of implementing the following steps: generating an incident wavefront analytically using Zernike polynomials; segmenting the incident wavefront using a hybrid diffraction propagation model to simulate a microlens array and generate a spot image; calculating the centroid position of the spot image using a weighted centroid algorithm combined with global and local dynamic thresholding mechanisms; establishing the relationship between the centroid position and the wavefront slope; solving for the Zernike coefficients using a numerical optimization algorithm; generating the wavefront aberration distribution; and outputting the reconstructed wavefront phase. The program instructions 61 can be stored in the aforementioned storage medium in the form of a software product, including several instructions to cause a device (which may be a personal computer, server, or network device, etc.) or processor to execute all or part of the steps of the methods in various embodiments of this application. The aforementioned storage medium includes various media capable of storing program instructions, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks, or terminal devices such as computers, servers, mobile phones, and tablets. The server can be a standalone server or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, content delivery networks (CDN), and big data and artificial intelligence platforms.

[0055] In the several embodiments provided in this application, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. For example, the system embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection through some interfaces, apparatuses, or units, and may be electrical, mechanical, or other forms.

[0056] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated units described above can be implemented in hardware or as software functional units. The above are merely embodiments of this application and do not limit the patent scope of this application. Any equivalent structural or procedural transformations made based on the description and drawings of this application, or direct or indirect applications in other related technical fields, are similarly included within the patent protection scope of this application.

Claims

1. A digital simulation platform for a wavefront sensor, characterized in that, The system includes a Zernike polynomial calculation module, a microlens array simulation module, a centroid extraction module, and a wavefront reconstruction module. The Zernike polynomial calculation module is used to analytically generate the incident wavefront using Zernike polynomials. The microlens array simulation module is used to simulate the microlens array using a hybrid diffraction propagation model to segment the incident wavefront and generate a spot image. The centroid extraction module is used to calculate the centroid position of the spot image using a weighted centroid algorithm combined with global and local dynamic thresholding mechanisms. The wavefront reconstruction module is used to establish the relationship between the centroid position and the wavefront slope, and to solve for the Zernike coefficients using a numerical optimization algorithm to generate the wavefront aberration distribution and output the reconstructed wavefront phase.

2. The digital simulation platform for wavefront sensors according to claim 1, characterized in that, The Zernike polynomial calculation module adopts a dual-mode operation mechanism of symbolic calculation mode and table lookup caching mode. The symbolic calculation mode is used to generate Zernike polynomials of arbitrary order and their derivative expressions, while the table lookup caching mode is used to pre-generate commonly used expressions and load lookup tables of commonly used Zernike terms.

3. The digital simulation platform for wavefront sensors according to claim 2, characterized in that, The Zernike polynomial calculation module includes: Index transformation component: used for mapping index schemes; Symbolic computation component: used to construct a symbolic representation of the radial polynomial through a recursive algorithm, generate a polar coordinate expression by combining it with the angular function, and then obtain the partial derivative analytical expression in Cartesian coordinates through coordinate transformation to obtain the full aperture incident wavefront; The table lookup management component is used for storing and quickly retrieving pre-compiled common expressions and loading metadata. The unified data interface is used to provide a unified function call interface.

4. The digital simulation platform for wavefront sensors according to any one of claims 1 to 3, characterized in that, The microlens array simulation module also includes: Sub-aperture segmentation component: used to divide the full-aperture incident wavefront into N sub-apertures according to the layout parameters of the microlens array, and calculate the boundary coordinates and center position of each sub-aperture so that each sub-aperture corresponds to a microlens; Diffraction calculation component: used to automatically select the angle spectrum method or Fraunhofer diffraction method based on Fresnel number to simulate the propagation process of light field after passing through microlens. It applies pre-calculated lens phase modulation to the wavefront data of each sub-aperture to simulate the focusing effect of microlens. Then, it calculates the complex light field distribution on the focal plane through fast Fourier transform and converts it into light intensity value. Image synthesis and noise injection component: used to stitch the light intensity values ​​of each sub-aperture into a complete focal plane image according to the array layout, and add random perturbation or fixed pattern noise pixel by pixel according to the configured noise model, and finally output the spot image.

5. The digital simulation platform for wavefront sensors according to claim 4, characterized in that, The centroid extraction module includes: Image preprocessing component: used to enhance the signal-to-noise ratio of the spot image through background subtraction and filtering smoothing; Spot detection and coarse localization component: After converting the spot image into a binary image using adaptive binarization, dynamically calculates the global threshold, then applies morphological closing operation to fill the holes inside the spot image, and filters out noise points, outputs the bounding box and initial centroid coordinates of each spot image; Centroid Precision Localization Component: Used to extract sub-image regions from the bounding box of each spot image, dynamically calculate local thresholds, then use a weighted centroid algorithm to sum the pixels whose intensity exceeds the threshold, and finally use coordinate transformation to map the local centroid coordinates to the global image coordinate system; Centroid Sorting and Geometric Analysis Component: Used to sort centroids using a row-column priority strategy, statistically analyze centroid distribution, calculate aperture parameters, and finally output a structured list of centroids and aperture parameters.

6. The digital simulation platform for wavefront sensors according to claim 5, characterized in that, The wavefront reconstruction module includes: Wavefront slope calculation component: The input is the offset data between the measured centroid and the reference centroid. Combined with the microlens focal length parameters, the wavefront slope of each sub-aperture is calculated using geometric optics formulas. The wavefront slope is divided into x and y directions, forming a slope vector, which corresponds to the observed value in the reconstruction equation. Reconstruction matrix building component: Based on normalized coordinates, calculates the gradient field of each Zernike mode, realizes the numerical solution from wavefront slope to Zernike coefficients, and constructs the reconstruction matrix; Zernike coefficient solving component: It uses a numerical algorithm to solve a system of linear equations, and finally generates the wavefront phase through a linear combination of Zernike coefficients and Zernike basis functions.

7. The digital simulation platform for wavefront sensors according to claim 6, characterized in that, The relationship between the wavefront slope and the centroid shift is derived from geometric optics: The focal length of the microlens array is The pixel size is The optical path magnification is ,but and Wavefront slope in direction and The calculation is as follows: in and This represents the centroid offset.

8. A digital simulation method for a wavefront sensor, characterized in that, include: The incident wavefront was generated analytically using Zernike polynomials. A hybrid diffraction propagation model is used to simulate the microlens array to segment the incident wavefront and generate a spot image; The centroid position of the spot image is calculated by employing a weighted centroid algorithm and combining global and local dynamic thresholding mechanisms. The relationship between the centroid position and the wavefront slope is established, and the Zernike coefficient is solved using a numerical optimization algorithm to generate the wavefront aberration distribution and output the reconstructed wavefront phase.

9. A device, characterized in that, The device includes a processor and a memory coupled to the processor, wherein, The memory stores program instructions for implementing a digital simulation method for the wavefront sensor; The processor is used to execute the program instructions stored in the memory to control the digital simulation method of the wavefront sensor.

10. A storage medium, characterized in that, It stores processor-executable program instructions for performing a digital simulation method for the wavefront sensor.

Citation Information

Patent Citations

  • Hartmann wavefront sensor mode wavefront restoration method based on deep learning

    CN110044498A