Optical system alignment method and system based on transformer
By employing a Transformer-based optical system assembly and adjustment method, utilizing a multi-layer fully connected neural network and a multi-head self-attention mechanism, combined with coarse and fine adjustment adaptive strategies and multi-index evaluation, the high complexity, low accuracy, and noise interference problems of existing optical system assembly and adjustment methods are solved, achieving efficient and accurate optical system assembly and adjustment.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- CHANGCHUN INST OF OPTICS FINE MECHANICS & PHYSICS CHINESE ACAD OF SCI
- Filing Date
- 2026-06-11
- Publication Date
- 2026-07-14
AI Technical Summary
Existing optical system assembly and adjustment methods suffer from problems such as increased complexity due to multi-field measurement requirements, lack of adaptive strategies for coarse and fine adjustment, noise interference affecting accuracy, and a single evaluation system, resulting in low assembly and adjustment efficiency and difficulty in meeting the requirements of high-precision imaging.
An optical system assembly and adjustment method based on Transformer is adopted. The mapping relationship between the Zernike coefficients of the central field of view and the Zernike coefficients of the off-axis field of view is established through a multi-layer fully connected neural network. The correlation features between the Zernike coefficients of the entire field of view are captured by the multi-head self-attention mechanism of Transformer. Combined with coarse and fine adjustment adaptive assembly and adjustment module and multi-index evaluation module, efficient and accurate optical system assembly and adjustment is achieved.
It reduces the complexity of assembly and adjustment operations, improves the accuracy and efficiency of assembly and adjustment, maintains high accuracy under noise interference, and comprehensively evaluates imaging performance to ensure that the assembly and adjustment quality meets the needs of actual applications.
Smart Images

Figure CN122386531A_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of automatic optical assembly and adjustment technology, and in particular to a method and system for assembling and adjusting optical systems based on Transformer. Background Technology
[0002] High-precision optical systems play an irreplaceable and crucial role in fields such as space telescopes, deep space exploration instruments, gravitational wave detectors, semiconductor lithography equipment, and high-end inspection optical systems. These systems place extremely high demands on imaging quality, typically requiring diffraction-limited performance to ensure the smooth operation of scientific missions or industrial production. Even minute misalignments of optical components (micrometer-level displacement or arcsecond-level tilt) can introduce significant aberrations and distortions, leading to a decrease in imaging resolution and severely limiting the system's mission capabilities or operational accuracy.
[0003] As the complexity and size of optical systems continue to increase, off-axis or folded configurations with multiple mirrors and lenses are becoming increasingly common, making efficient, precise, and repeatable assembly and adjustment more and more difficult. Furthermore, factors such as mechanical tolerances and assembly stress further exacerbate the difficulty of assembly and adjustment, and these factors may dynamically change in actual working environments, further reducing assembly and adjustment stability. Therefore, developing automated, high-precision, and highly robust optical assembly and adjustment technologies has become one of the core requirements for the development of high-precision optical systems.
[0004] Currently, there are two main technical solutions in the field of optical system assembly and adjustment: traditional assembly and adjustment methods based on sensitivity matrices and assembly and adjustment methods based on artificial intelligence (AI) that have been developed in recent years. The core principle of the sensitivity matrix-based assembly and adjustment method is to establish a linear or linearized relationship between small perturbations in the position / attitude of optical elements and system performance indicators (such as wavefront error). By measuring changes in system performance indicators and combining them with a pre-constructed sensitivity matrix, the misalignment parameters of the optical elements are inferred, and then iterative adjustments are made by the operator. In practice, this requires experienced operators to lead the process, gradually approaching the ideal assembly and adjustment state through a cyclical process of repeatedly measuring system performance, calculating adjustment amounts, and executing adjustment operations. Existing AI-based assembly and adjustment methods mainly use deep learning models. By establishing a mapping relationship between the wavefront Zernike coefficient and the system misalignment, neural networks are used to predict the degrees of freedom of adjustable elements, enabling the direct inference of assembly and adjustment actions from wavefront error. Because traditional assembly and adjustment heavily relies on operator experience, it is inefficient, time-consuming, and has limited applicability. Therefore, the application and research of AI-based assembly and adjustment methods have gradually become mainstream, for example: The journal article "Improving neural-network-based prediction models for misalignment in off-axis three-mirror anastigmat telescopes" (Source: Applied Optics, authors İsmail Başlar, and Mahir Dursun) proposes a framework for the assembly and adjustment of an off-axis three-mirror anastigmat telescope system based on a fully connected neural network. This framework utilizes optical design software to generate training data, quantifies the sensitivity of the mirrors to wavefront errors, and incorporates noisy measurement samples into the training process, thereby increasing the model's robustness. The journal article "Misalignment Calculation on Off-Axis Telescope System via Fully Connected Neural Network" (published in IEEE Photonics Journal, authors Zhu Liu, Qi Peng, Yangjie Xu, Ge Ren, and Haotong Ma) proposes a fitting tool based on a deep neural network to establish a nonlinear mapping relationship between the Zernike coefficients of different fields of view and the element's eccentricity and tilt. The effectiveness of the proposed method is validated on a new dataset. Chinese patent CN120429906A, entitled "A Method for Coordinated Force and Position Assembly of Optical Lenses Based on Neural Networks", proposes a method for assembling and adjusting optical lenses. The method obtains the target misalignment by detecting the Zernike coefficient of the lens, takes the assembly force combination as input, obtains the assembly pose error through the target neural network model, and compensates for the error based on the target misalignment to obtain the actual adjustment amount, thereby realizing the coordinated force and position control of the reflective optical system. Chinese patent CN120822547A, entitled "An optical system assembly and adjustment method based on a dual-branch neural network model", proposes to simultaneously use the Zernike coefficient and wavefront diagram as the current state of the optical system, and fuse the two together as the network input to construct a mapping between the fused features and the misalignment, thereby guiding the system assembly and adjustment. The Chinese patent with publication number CN120257838A, entitled "Optimal Dislocation Angle Prediction Method for Optical System Error Elements Based on Neural Network," firstly determines the structural parameters of the optical system according to specific requirements, builds and assembles the system, and simultaneously records the surface error data of each optical element, including its relative coordinate system angle, and the system imaging performance index parameters. Then, by changing the relative coordinate system angle of the element, the above operation is repeated to construct a correlation dataset of the optical element surface error data and the system performance index parameters. This dataset is then input into a modular neural network to complete training and generate a prediction model. Finally, for the actual assembly and adjustment task, the surface error data of the element to be assembled and adjusted and the target performance index are input, and the optimal dislocation angle of the element is quickly output.
[0005] However, existing AI-based assembly and adjustment methods have the following drawbacks: 1. The need for multi-field measurement increases the complexity of setup and adjustment: Most existing AI setup and adjustment methods require the acquisition of measurement signals (such as wavefronts and images) from multiple fields of view in order to achieve accurate misalignment prediction. Multi-field measurement not only increases the workload of data acquisition, but also easily introduces cumulative measurement errors.
[0006] 2. Lack of adaptive coarse and fine adjustment strategies: Existing methods mostly adopt fixed adjustment strategies, which cannot dynamically switch between coarse adjustment (quickly reducing large imbalances) and fine adjustment (accurately approximating the ideal state) modes according to the degree of system misalignment. This results in either slow convergence speed or oscillations around the ideal assembly and adjustment state, making it difficult to balance assembly and adjustment efficiency and accuracy.
[0007] 3. Noise interference affects accuracy: Prediction accuracy decreases significantly under noise interference, affecting assembly and adjustment accuracy.
[0008] 4. Limited evaluation system: Most methods only use the root mean square error of the wavefront (RMS) as an evaluation index for assembly quality, which cannot fully reflect the imaging performance of the system (such as geometric distortion, spatial resolution, etc.), and may result in the assembled system failing to meet the actual application requirements. Summary of the Invention
[0009] Therefore, it is necessary to provide a Transformer-based optical system assembly and adjustment method and system to address the above problems.
[0010] To solve the above problems, the present disclosure adopts the following technical solution: In a first aspect, this disclosure provides a Transformer-based optical system assembly and adjustment system, comprising: The data acquisition module is used to acquire the wavefront information of the optical system to be installed and adjusted, and to process the wavefront information to obtain the Zernike coefficient of the central field of view. The center-off-axis field-of-view mapping module is used to establish a mapping relationship between the center field-of-view Zernik coefficient and the off-axis field-of-view wavefront Zernik coefficient through a multi-layer fully connected neural network, and to obtain the predicted off-axis field-of-view wavefront Zernik coefficient based on the center field-of-view Zernik coefficient using the mapping relationship. The Transformer offset inference module is used to capture the correlation features between the Zernike coefficients of the full-field wavefront using the multi-head self-attention mechanism of Transformer, establish the nonlinear mapping relationship between the correlation features and the offset parameters, and predict the offset parameters based on the nonlinear mapping relationship. The coarse and fine adjustment adaptive assembly module is used to calculate the coarse adjustment amount and the fine adjustment amount based on the misalignment parameter, calculate the attention entropy of each field of view, convert the attention entropy into a smoothing coefficient through a mapping function, obtain the assembly adjustment amount based on the average smoothing coefficient and through weighted fusion of the coarse adjustment amount and the fine adjustment amount, and convert the assembly adjustment amount into a control command that can be recognized by the assembly actuator. The multi-index evaluation module is used to obtain the root mean square value of the wavefront, the optical distortion value, and the modulation transfer function value, and to determine whether the assembly and adjustment meet the standards.
[0011] In a preferred embodiment, the multilayer fully connected neural network includes an input layer, five hidden layers, and an output layer, wherein each hidden layer contains a linear transformation, batch normalization, and a ReLU activation function.
[0012] In a preferred embodiment, the center-off-axis field-of-view mapping module outputs the off-axis field-of-view wavefront Zernike coefficient matrix; the Transformer misalignment inference module includes: The input preprocessing unit concatenates the Zernik coefficients of the center field of view with the off-axis Zernik coefficient matrix output by the center-off-axis field of view mapping module to obtain the full field of view Zernik coefficient matrix. ; Attention-weighted units are used to capture the correlation features between Zernike coefficients of the full-field wavefront using the multi-head self-attention mechanism of the Transformer; The feature fusion and misalignment prediction unit is used to establish a nonlinear mapping relationship between the associated features and the misalignment parameters, and to predict the misalignment parameters based on the nonlinear mapping relationship.
[0013] In a preferred embodiment, the attention weighting unit is specifically used to... Mapped to query vectors respectively Key vector Sum value vector ,Will , , Divide into The multiple heads queried by each head represent the multi-head representation. Multi-head representation of keys And the multiple representation of value Calculate the attention score for each head, and then use the attention score to... We obtain by weighted summation The attention features of each head are analyzed, and all attention features are concatenated and reconstructed to obtain the corresponding data. Same-dimensional attention-weighted feature matrix The As the associated feature.
[0014] In a preferred embodiment, the feature fusion and misalignment prediction unit is specifically used for... Applying residual connections and layer normalization operations yields normalized features. Based on these normalized features, a feedforward network is used to establish a nonlinear mapping relationship between the associated features and the offset parameters. The normalized features are then input into the feedforward network to extract nonlinear features, which are then mapped to the offset parameter vector of the optical element, thus obtaining the predicted offset parameters.
[0015] In a preferred embodiment, the formula for calculating the coarse adjustment amount is: in, Indicates the amount of coarse adjustment. This represents the coarse adjustment coefficient. Represents the misalignment parameter matrix; The formula for calculating the fine-tuning adjustment amount is: in, Indicates the amount of fine-tuning adjustment. Indicates the fine-tuning coefficient; The formula for calculating the attention entropy is: in, and All of these represent the field of view number. Indicates the field of view attention entropy, Representing the field of view With field of view Association weights, This represents the total number of fields of view of the optical system.
[0016] In a preferred embodiment, the formula for converting attention entropy into a smoothing coefficient using a mapping function is as follows: in, Represents a mapping function. Indicates the gain coefficient. Indicates the entropy threshold; The formula for calculating the assembly adjustment amount based on the average smoothing coefficient and the weighted fusion of coarse and fine adjustment amounts is as follows: , in, Indicates the amount of adjustment. This represents the mean of the smoothing coefficients for all fields of view.
[0017] In a preferred embodiment, the training of the Transformer misalignment inference module and the training of the coarse-fine tuning adaptive assembly module are completed using an end-to-end joint training method.
[0018] In a preferred embodiment, the calculation formula for the loss function of the joint training is as follows: in, This represents the total loss value. This represents the mean square error between the predicted off-axis wavefront Zernike coefficients and the actual off-axis wavefront Zernike coefficients. This represents the mean square error between the predicted and actual offset parameters. express The weighting coefficients, express The weighting coefficients.
[0019] Secondly, this disclosure provides a method for assembling and adjusting an optical system based on Transformer, including: The wavefront information of the optical system to be assembled is obtained, and the wavefront information is processed to obtain the Zernike coefficient of the center field of view. A mapping relationship between the Zernik coefficients of the central field of view and the Zernik coefficients of the off-axis wavefront is established using a multi-layer fully connected neural network. The predicted off-axis wavefront Zernik coefficients are obtained using the mapping relationship based on the Zernik coefficients of the central field of view. The correlation features between the Zernike coefficients of the full-field wavefront are captured using the multi-head self-attention mechanism of Transformer; a nonlinear mapping relationship between the correlation features and the misalignment parameters is established. Predict the misalignment parameters based on the nonlinear mapping relationship; The coarse adjustment amount and fine adjustment amount are calculated based on the misalignment parameters. The attention entropy of each field of view is calculated and converted into a smoothing coefficient through a mapping function. Based on the average smoothing coefficient, the assembly adjustment amount is obtained by weighted fusion of the coarse adjustment amount and the fine adjustment amount. The assembly adjustment amount is converted into a control command that can be recognized by the assembly actuator. Obtain the root mean square value of the wavefront, the optical distortion value, and the modulation transfer function value, and determine whether the assembly and adjustment meet the standards.
[0020] The aforementioned Transformer-based optical system setup and adjustment method and system can predict the off-axis wavefront Zernik coefficient based solely on the Zernik coefficient of the central field of view, eliminating the need for moving and repeatedly calibrating multi-field measurement equipment, thus reducing the operational complexity of setup and adjustment. The setup and adjustment amount is redefined based on attention entropy, coarse adjustment, and fine adjustment, balancing both setup and adjustment accuracy and efficiency. The Transformer's multi-head self-attention mechanism effectively captures feature correlations under noise interference, and the coarse and fine adjustment weighted fusion strategy further smooths adjustment fluctuations caused by noise, improving setup and adjustment accuracy. The fusion of three core indicators—wavefront root mean square value, optical distortion value, and modulation transfer function value—comprehensively evaluates wavefront quality, imaging fidelity, and spatial resolution. Attached Figure Description
[0021] Figure 1 This is a flowchart illustrating a method in one embodiment of the present disclosure; Figure 2 This is a schematic diagram of the system structure in one embodiment of the present disclosure. Detailed Implementation
[0022] The technical solutions of this disclosure will now be described in detail with reference to the accompanying drawings and preferred embodiments.
[0023] See Figure 1 This embodiment provides a Transformer-based optical system assembly and adjustment system, including: The data acquisition module is used to acquire the wavefront information of the optical system to be installed and adjusted, and to process the wavefront information to obtain the Zernike coefficient of the central field of view. The center-off-axis field-of-view mapping module is used to establish a mapping relationship between the center field-of-view Zernik coefficients and the off-axis field-of-view wavefront Zernik coefficients through a multi-layer fully connected neural network, and to obtain the predicted off-axis field-of-view wavefront Zernik coefficients based on the mapping relationship according to the center field-of-view Zernik coefficients. Transformer Offset Inference Module: Used to capture the correlation features between the Zernike coefficients of the full field of view wavefront using the multi-head self-attention mechanism of Transformer, establish the nonlinear mapping relationship between the correlation features and the offset parameters, and predict the offset parameters based on the nonlinear mapping relationship; The coarse and fine adjustment adaptive assembly module is used to calculate the coarse adjustment amount and the fine adjustment amount based on the misalignment parameter, calculate the attention entropy of each field of view, convert the attention entropy into a smoothing coefficient through a mapping function, obtain the assembly adjustment amount based on the average smoothing coefficient and through weighted fusion of the coarse adjustment amount and the fine adjustment amount, and convert the assembly adjustment amount into a control command that can be recognized by the assembly actuator. The multi-index evaluation module is used to obtain the root mean square value of the wavefront, the optical distortion value, and the modulation transfer function value, and to determine whether the assembly and adjustment meet the standards.
[0024] The system will now be described in detail.
[0025] The data acquisition module is used to acquire the wavefront information of the optical system to be installed and adjusted, and to process the wavefront information to obtain the Zernike coefficients of the central field of view.
[0026] The wavefront information is at least one of wavefront slope information, phase signal, and CCD / CMOS image signal.
[0027] Wavefront information is acquired through a wavefront sensor; here, it is not specified whether the wavefront sensor belongs to the data acquisition module.
[0028] The core function of the center-off-axis field-of-view mapping module is to establish a nonlinear mapping between the Zernike coefficients of the center field of view and the Zernike coefficients of the off-axis field of view, so as to obtain the full field-of-view wavefront information by measuring only the center field of view. The specific design is as follows: 1. Input and Output Definitions: The input is the Zernike coefficient vector of the central field of view. ( (The Zernike coefficient dimension is selected based on system requirements); the output is... Zernike coefficient matrix for each off-axis field of view ,in, This represents the total number of fields of view of the optical system. , The Zernike coefficients represent the off-axis field of view. The first mapping function is represented; that is, in this embodiment, the off-axis field-of-view wavefront Zernike coefficients predicted by the center-off-axis field-of-view mapping module are represented in matrix form, and the prediction results are output in matrix form.
[0029] 2. Network Structure: A multi-layer fully connected neural network (MLP) is used to implement the first mapping function. The network structure includes: input layer (dimensions). ), five hidden layers (with the following neuron counts: 32, 64, 128, 64, 32), and an output layer (dimension...). Each hidden layer contains a linear transformation, batch normalization (BN), and a ReLU activation function. The linear transformation module, batch normalization module, and ReLU activation function module are arranged sequentially to form the hidden layer. The batch normalization module is used to improve training stability, and the ReLU activation function module is used to enhance the model's nonlinear fitting ability.
[0030] 3. Training method: The Zernikal coefficients of the central field of view are used as inputs, and the corresponding true off-axis Zernikal coefficients are used as labels. The mean squared error (MSE) is used as the loss function, and the network parameters are trained by the stochastic gradient descent (SGD) optimizer until the loss function converges to the preset threshold.
[0031] The center-off-axis field-of-view mapping module allows for the acquisition of full field-of-view wavefront information by measuring only the center field-of-view wavefront.
[0032] The Transformer offset inference module utilizes the Transformer's multi-head self-attention mechanism to capture the correlation features between the Zernike coefficients of the full-field wavefront, establishes a nonlinear mapping between the correlation features and the offset parameters, and achieves accurate prediction of the offset parameters. The Transformer offset inference module is used to predict the offset parameters based on the nonlinear mapping relationship. The inputs are the Zernike coefficients of the center field of view (output by the data acquisition module) and the Zernike coefficients of the off-axis field of view (output by the center-off-axis field of view mapping module), and the output is the predicted offset parameters.
[0033] Understandably, in the field of optical system assembly and adjustment, misalignment refers to the deviation of the position or orientation of optical elements (such as lenses and reflectors) in space from their ideal design state, resulting in optical path offset, wavefront distortion, and ultimately reducing image quality or system performance. Misalignment parameters include some or all of the following: coma, astigmatism, field curvature, image plane tilt, distortion, spherical aberration, focal length drift, chromatic aberration, focus shift, spherical aberration variation, higher-order aberrations, field shift, and asymmetric aberrations.
[0034] The Transformer offset inference module includes an input preprocessing unit, an attention weighting unit, and a feature fusion and offset prediction unit. The input preprocessing unit concatenates the Zernikal coefficients of the central field of view with the off-axis Zernikal coefficient matrix output from the center-off-axis field-of-view mapping module to obtain the full-field-of-view Zernikal coefficient matrix. Attention-weighted units are used to capture the correlation features between Zernike coefficients of the entire wavefront using the Transformer's multi-head self-attention mechanism. Specifically, they are used to... Mapped to query vectors respectively Key vector Sum value vector ,Will , , Divide into The multiple heads queried by each head represent the multi-head representation. Multi-head representation of keys Multiple values represent Calculate the attention score for each head, and then use the attention score to... We obtain by weighted summation The attention features of each head are analyzed, and all attention features are concatenated and reconstructed to obtain the corresponding data. Same-dimensional attention-weighted feature matrix The attention-weighted feature matrix As a correlation feature between the Zernike coefficients of the wavefront in the field of view, the feature fusion and offset prediction unit is used to establish a nonlinear mapping relationship between the correlation feature and the offset parameter, and to predict the offset parameter based on the nonlinear mapping relationship; specifically, it is used to... Residual connections and layer normalization operations are applied to obtain normalized features. A nonlinear mapping relationship between the associated features and the offset parameters is established based on the normalized features. The establishment of the nonlinear mapping relationship between the associated features and the offset parameters is implemented using a feedforward network. The normalized features are input into the feedforward network to extract nonlinear features. The extracted nonlinear features are mapped to the offset parameter vector of the optical element through the feedforward network to obtain the predicted offset parameters.
[0035] The input preprocessing unit: processes the Zernik coefficients of the central field of view. The off-axis Zernike coefficient matrix output by the center-off-axis field-of-view mapping module By splicing, we obtain the full-field Zernikal coefficient matrix. , which serves as the input to the attention weighting unit.
[0036] The attention weighting unit: firstly, through three learnable projection matrices... ,Will Mapped to query vectors respectively Key vector Sum value vector ;Will , , Divide into One head, get , , ( (dimensions of each head). Indicates querying the projection matrix. Represents the key projection matrix. Represents the value projection matrix, This indicates a multi-head representation of the query. This represents a multi-headed representation of the key. Multi-head representation of values; calculation The attention score of each head in the dataset is used to obtain a score matrix consisting of all attention scores. This score represents the correlation weight between different fields of view, for the score matrix Aggregate along the head dimension to obtain the attention score matrix. This is used to characterize the overall correlation weight between the Zernik coefficients of different wavefronts in the full field of view; the attention score is used to... Perform a weighted summation to obtain The attention features of each head are analyzed, and then all attention features are spliced together and reshaped to... The outputs of all heads are merged into the original feature dimension (specifically, the outputs of all heads are concatenated and mapped back to the original dimension through a linear transformation) to obtain the attention-weighted features. , It can also be called an attention-weighted feature matrix.
[0037] The feature fusion and misalignment prediction unit: [This unit] applies an attention-weighted feature matrix... Residual connections and layer normalization (Add & Norm) operations are applied to improve gradient flow and training stability. The normalized features are then input into a feedforward network (consisting of two linear layers and a ReLU activation function) to further extract nonlinear features. Finally, the extracted nonlinear features are mapped to the offset parameter vector of the optical element through the output layer (linear layer). This yields the predicted misalignment parameters. The degrees of freedom for misalignment, such as the three translational degrees of freedom and three rotational degrees of freedom for each mirror, are determined based on the number of system components.
[0038] The training method is as follows: using the full-field Zernikal coefficient matrix The input is the true misalignment parameters, the label is the actual misalignment parameters, and the loss function is MSE. The system is jointly trained with the center-off-axis field-of-view mapping module.
[0039] The coarse and fine adaptive adjustment module quantifies and predicts uncertainty based on attention entropy, dynamically generates a smoothing coefficient, and adaptively fuses the coarse and fine adjustment results to achieve dynamic switching of adjustment strategies.
[0040] The adaptive assembly module for coarse and fine tuning dynamically adjusts the fusion ratio of coarse and fine tuning by quantifying the uncertainty of prediction, thereby achieving adaptive assembly. The specific design is as follows: 1. Input and Core Parameters: The input is the attention score matrix output by the Transformer Imbalance Inference module. and offset parameter vector The core parameters include the coarse adjustment amount. (based on Large step size adjustment , (Coarse adjustment coefficient, ranging from 1.0 to 1.2) and fine adjustment amount. (based on Small step adjustment amount, , This is the fine-tuning coefficient, with a value ranging from 0.1 to 0.3.
[0041] 2. Uncertainty Quantification: The uncertainty of each field-of-view prediction result is quantified using attention entropy. For each field of view... (This can also be referred to as the first) (each field of view), its attention distribution Attention score matrix No. The normalized result of the line, field of view attention entropy Defined as: in, and The number indicating the field of view. Representing the field of view With field of view Association weights, The larger the value, the higher the uncertainty of the relationship between the field of view and other fields of view, which corresponds to a lower degree of optical system misalignment and requires more fine-tuning. The smaller the value, the lower the correlation uncertainty, the higher the degree of optical system misalignment, and the more emphasis needs to be placed on coarse adjustment.
[0042] 3. Adaptive fusion strategy: through a mapping function (which can be called a second mapping function) attention entropy Convert to smoothing coefficient The mapping function uses the Sigmoid function: ,in This is the gain coefficient. This is the entropy threshold. The final adjustment amount. The result is obtained by weighted fusion of coarse and fine adjustment amounts: ,in This is the mean of the smoothing coefficients for all fields of view.
[0043] 4. Execution logic: Adjust the final assembly / adjustment amount. This is converted into control commands recognizable by the (optical system adjustment) adjustment actuators, which will drive the actuators to adjust the position / orientation of the optical elements. This module does not require pre-dividing into coarse and fine adjustment stages; through attention entropy-driven adaptive fusion, it automatically prioritizes coarse adjustment when the misalignment is large. Small, quickly reduce imbalance; automatically focus on fine-tuning when imbalance is small. (Large), precisely approximating the ideal state, avoiding oscillations.
[0044] The multi-index evaluation module is used to acquire the root mean square value of the wavefront, the optical distortion value, and the modulation transfer function value, and to determine whether the assembly and adjustment meet the standards. When the assembly and adjustment meet the standards, it is used to issue relevant notifications or instructions for completion of the assembly and adjustment. When the assembly and adjustment do not meet the standards, it is used to provide relevant notifications or instructions for failure to meet the standards, such as feedback causing the data acquisition module to restart.
[0045] The multi-index evaluation module integrates three core indicators: wavefront RMS, optical distortion, and MTF, to comprehensively evaluate assembly and adjustment quality and provide feedback. This module provides feedback for iterative assembly and adjustment by comprehensively evaluating assembly and adjustment quality through multiple indicators, and its specific design is as follows: 1. Evaluation index selection: Three core indicators are selected: wavefront root mean square value, optical distortion value, and modulation transfer function value. The wavefront root mean square value quantifies the overall wavefront deviation and reflects the magnitude of aberration; the optical distortion value quantifies the degree of geometric distortion of the image and reflects the image fidelity; the modulation transfer function value is selected as the value at the characteristic spatial frequency to quantify the spatial resolution transfer capability of the system.
[0046] 2. Index Calculation and Fusion: After assembly and adjustment, the root mean square value of the wavefront is measured using an interferometer, the optical distortion value is measured using a high-precision imaging target, and the modulation transfer function value at the characteristic frequency is measured using a modulation transfer function tester. These three indicators are then standardized to form a multi-index evaluation vector. ,in, This represents the root mean square value of the wavefront. Indicates the optical distortion value. This represents the value of the modulation transfer function.
[0047] 3. Termination Condition: Preset thresholds for the above indicators; if... If all indicators meet the corresponding thresholds, the assembly and adjustment is complete; otherwise, return to the data acquisition module and repeat the above assembly and adjustment process until all indicators meet the requirements.
[0048] The training process in this embodiment mainly targets the center-off-axis field-of-view mapping module and the Transformer offset inference module. This embodiment adopts an end-to-end joint training method: For dataset construction: Based on the optical system model, the Zernik coefficients of the center field of view, the wavefront Zernik coefficients of the off-axis field of view, the true offset parameters, and multi-index evaluation data are generated under different offset parameters; at the same time, simulated assembly and adjustment noise and interferometer measurement noise are added to the data to improve the robustness of the model.
[0049] For the loss function: the joint MSE loss function is used, and the loss value for joint training is... That is, the total loss value. ,in, This represents the mean square error between the predicted off-axis wavefront Zernike coefficients and the actual off-axis wavefront Zernike coefficients. This represents the mean square error between the predicted and actual offset parameters. for The weighting coefficients, for The weighting coefficients.
[0050] For the optimizer and training strategy: the Adam optimizer (adaptive moment estimation) is used with an initial learning rate of 0.001 and a learning rate decay strategy (decaying to 0.9 every 100 epochs); an early stopping strategy is used during training, when the total loss of the validation set does not decrease for 20 consecutive epochs, training is stopped and the optimal model parameters are saved.
[0051] See Figure 2 This embodiment provides a Transformer-based optical system assembly and adjustment method, including: The wavefront information of the optical system to be assembled is obtained, and the wavefront information is processed to obtain the Zernike coefficient of the center field of view. A mapping relationship between the Zernik coefficients of the central field of view and the Zernik coefficients of the off-axis wavefront is established using a multi-layer fully connected neural network. The predicted off-axis wavefront Zernik coefficients are obtained using the mapping relationship based on the Zernik coefficients of the central field of view. The correlation features between the Zernike coefficients of the full-field wavefront are captured using the multi-head self-attention mechanism of Transformer; a nonlinear mapping relationship between the correlation features and the misalignment parameters is established. Predict the misalignment parameters based on the nonlinear mapping relationship; The coarse adjustment amount and fine adjustment amount are calculated based on the misalignment parameters. The attention entropy of each field of view is calculated and converted into a smoothing coefficient through a mapping function. Based on the average smoothing coefficient, the assembly adjustment amount is obtained by weighted fusion of the coarse adjustment amount and the fine adjustment amount. The assembly adjustment amount is converted into a control command that can be recognized by the assembly actuator. Obtain the root mean square value of the wavefront, the optical distortion value, and the modulation transfer function value, and determine whether the assembly and adjustment meet the standards.
[0052] In this embodiment, the predicted off-axis field-of-view wavefront Zernik coefficients obtained by using the mapping relationship based on the central field-of-view Zernik coefficients are an off-axis field-of-view wavefront Zernik coefficient matrix. In this embodiment, the step of capturing the correlation features between the Zernike coefficients of the full-field wavefront using the multi-head self-attention mechanism of Transformer, establishing a nonlinear mapping relationship between the correlation features and the misalignment parameters, and predicting the misalignment parameters based on the nonlinear mapping relationship specifically includes: By concatenating the Zernik coefficients of the center field of view with the off-axis Zernik coefficient matrix output by the center-off-axis field of view mapping module, the full field of view Zernik coefficient matrix is obtained. ; The multi-head self-attention mechanism of Transformer is used to capture the correlation features between Zernike coefficients of the wavefront across the entire field of view. Establish a nonlinear mapping relationship between the correlation features and the misalignment parameters, and predict the misalignment parameters based on the nonlinear mapping relationship.
[0053] In one specific embodiment, the step of capturing the correlation features between the Zernike coefficients of the full-field wavefront using the multi-head self-attention mechanism of Transformer specifically involves: ... Mapped to query vectors respectively Key vector Sum value vector ,Will , , Divide into The multiple heads queried by each head represent the multi-head representation. Multi-head representation of keys And the multiple representation of value Calculate the attention score for each head, and then use the attention score to... We obtain by weighted summation The attention features of each head are analyzed, and all attention features are concatenated and reconstructed to obtain the corresponding data. Same-dimensional attention-weighted feature matrix The As the associated feature.
[0054] In one specific embodiment, the step of establishing the nonlinear mapping relationship between the associated features and the misalignment parameters, and predicting the misalignment parameters based on the nonlinear mapping relationship, specifically comprises: the feature fusion and misalignment prediction unit is specifically used to... Applying residual connections and layer normalization operations yields normalized features. Based on these normalized features, a feedforward network is used to establish a nonlinear mapping relationship between the associated features and the offset parameters. The normalized features are then input into the feedforward network to extract nonlinear features, which are then mapped to the offset parameter vector of the optical element, thus obtaining the predicted offset parameters.
[0055] In specific implementation, the optical system assembly and adjustment method can refer to the implementation of the optical system assembly and adjustment system in any of the above embodiments, and will not be described again.
[0056] An electronic device can be implemented according to the method of this disclosure, the electronic device comprising: a memory; one or more processors; one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the one or more processors, the one or more programs comprising instructions for performing the Transformer-based optical system adjustment method according to any of the above embodiments.
[0057] This disclosure also provides a computer-readable storage medium including instructions that, when executed on a computer, cause the computer to perform the steps of the Transformer-based optical system assembly method described in any of the above embodiments.
[0058] The Transformer-based optical system assembly and adjustment method and system disclosed herein can predict the off-axis wavefront Zernik coefficient based solely on the Zernik coefficient of the central field of view, eliminating the need for moving and repeatedly calibrating multi-field measurement equipment, thus reducing the operational complexity of assembly and adjustment. The assembly and adjustment adjustments are redefined based on attention entropy, coarse adjustment, and fine adjustment, balancing both accuracy and efficiency. The Transformer's multi-head self-attention mechanism effectively captures feature correlations under noise interference, and the coarse and fine adjustment weighted fusion strategy further smooths out adjustment fluctuations caused by noise, improving the accuracy of assembly and adjustment. The fusion of three core indicators—wavefront root mean square value, optical distortion value, and modulation transfer function value—comprehensively evaluates wavefront quality, imaging fidelity, and spatial resolution.
[0059] Specifically, this disclosure has the following advantages: (1) Reduce measurement complexity and decrease cumulative error. Existing AI-based assembly and adjustment methods require the acquisition of multi-field measurement signals, which not only increases the workload of data acquisition but also easily introduces cumulative error and reduces assembly and adjustment accuracy. This invention uses a center-off-axis field-of-view mapping module to predict the full-field Zernike coefficient by measuring only the center field-of-view wavefront, eliminating the need for moving and repeatedly calibrating multi-field measurement equipment, thus reducing the configuration cost and operational complexity of the measurement equipment.
[0060] (2) Achieving adaptive coarse and fine adjustment, balancing efficiency and accuracy. Existing AI assembly and adjustment methods use a fixed adjustment strategy, which cannot balance convergence speed and assembly and adjustment accuracy. This invention uses an adaptive coarse and fine adjustment module to dynamically quantify and predict uncertainty based on attention entropy, and automatically switches between coarse and fine adjustment modes: when the misalignment is large, the adjustment step size is large; when the misalignment is small, the adjustment step size is small, avoiding oscillation problems near the ideal state.
[0061] (3) High assembly and adjustment accuracy, high robustness, and adaptability to real working conditions. Existing AI assembly and adjustment methods do not fully consider environmental noise, and their accuracy is prone to decrease under real working conditions. This invention introduces simulated actuator adjustment noise and interferometer measurement noise during the model training stage, enabling the model to have noise adaptability; at the same time, the Transformer's self-attention mechanism can effectively capture feature correlations under noise interference, and the coarse and fine adjustment adaptive fusion strategy can further smooth the adjustment fluctuations caused by noise.
[0062] (4) Comprehensive evaluation of assembly and adjustment quality to ensure practical application needs. Existing methods only use wavefront RMS to evaluate assembly and adjustment quality, which cannot fully reflect imaging performance. The multi-index evaluation module of this invention integrates three core indicators: wavefront RMS, optical distortion, and MTF, which can comprehensively evaluate wavefront quality, imaging fidelity, and spatial resolution.
[0063] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0064] The embodiments described above are merely illustrative of several implementations of this disclosure, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of the invention patent. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this disclosure, and these all fall within the protection scope of this disclosure. Therefore, the protection scope of this patent should be determined by the appended claims.
Claims
1. A Transformer-based optical system assembly and adjustment system, characterized in that, include: The data acquisition module is used to acquire the wavefront information of the optical system to be installed and adjusted, and to process the wavefront information to obtain the Zernike coefficient of the central field of view. The center-off-axis field-of-view mapping module is used to establish a mapping relationship between the center field-of-view Zernik coefficient and the off-axis field-of-view wavefront Zernik coefficient through a multi-layer fully connected neural network, and to obtain the predicted off-axis field-of-view wavefront Zernik coefficient based on the center field-of-view Zernik coefficient using the mapping relationship. The Transformer offset inference module is used to capture the correlation features between the Zernike coefficients of the full-field wavefront using the multi-head self-attention mechanism of Transformer, establish the nonlinear mapping relationship between the correlation features and the offset parameters, and predict the offset parameters based on the nonlinear mapping relationship. The coarse and fine adjustment adaptive assembly module is used to calculate the coarse adjustment amount and the fine adjustment amount based on the misalignment parameter, calculate the attention entropy of each field of view, convert the attention entropy into a smoothing coefficient through a mapping function, obtain the assembly adjustment amount based on the average smoothing coefficient and through weighted fusion of the coarse adjustment amount and the fine adjustment amount, and convert the assembly adjustment amount into a control command that can be recognized by the assembly actuator. The multi-index evaluation module is used to obtain the root mean square value of the wavefront, the optical distortion value, and the modulation transfer function value, and to determine whether the assembly and adjustment meet the standards.
2. The Transformer-based optical system assembly and adjustment system according to claim 1, characterized in that, The multilayer fully connected neural network includes an input layer, five hidden layers, and an output layer. Each hidden layer contains a linear transformation, batch normalization, and a ReLU activation function.
3. The Transformer-based optical system assembly and adjustment system according to claim 1, characterized in that, The center-off-axis field-of-view mapping module outputs the off-axis field-of-view wavefront Zernike coefficient matrix; The Transformer misalignment inference module includes: The input preprocessing unit concatenates the Zernik coefficients of the center field of view with the off-axis Zernik coefficient matrix output by the center-off-axis field of view mapping module to obtain the full field of view Zernik coefficient matrix. ; Attention-weighted units are used to capture the correlation features between Zernike coefficients of the full-field wavefront using the multi-head self-attention mechanism of the Transformer; The feature fusion and misalignment prediction unit is used to establish a nonlinear mapping relationship between the associated features and the misalignment parameters, and to predict the misalignment parameters based on the nonlinear mapping relationship.
4. The Transformer-based optical system assembly and adjustment system according to claim 3, characterized in that, The attention weighting unit is specifically used to... Mapped to query vectors respectively Key vector Sum value vector ,Will , , Divide into The multiple heads queried by each head represent the multi-head representation. Multi-head representation of keys And the multiple representation of value Calculate the attention score for each head, and then use the attention score to... We obtain by weighted summation The attention features of each head are analyzed, and all attention features are concatenated and reconstructed to obtain the corresponding data. Same-dimensional attention-weighted feature matrix The As the associated feature.
5. The Transformer-based optical system assembly and adjustment system according to claim 4, characterized in that, The feature fusion and misalignment prediction unit is specifically used for... Applying residual connections and layer normalization operations yields normalized features. Based on these normalized features, a feedforward network is used to establish a nonlinear mapping relationship between the associated features and the offset parameters. The normalized features are then input into the feedforward network to extract nonlinear features, which are then mapped to the offset parameter vector of the optical element, thus obtaining the predicted offset parameters.
6. The Transformer-based optical system assembly and adjustment system according to claim 1, characterized in that, The formula for calculating the coarse adjustment amount is: in, Indicates the amount of coarse adjustment. This represents the coarse adjustment coefficient. Represents the misalignment parameter matrix; The formula for calculating the fine-tuning adjustment amount is: in, Indicates the amount of fine-tuning adjustment. Indicates the fine-tuning coefficient; The formula for calculating the attention entropy is: in, and All of these represent the field of view number. Indicates the field of view attention entropy, Representing the field of view With field of view Association weights, This represents the total number of fields of view of the optical system.
7. The Transformer-based optical system assembly and adjustment system according to claim 6, characterized in that, The formula for converting attention entropy into a smoothing coefficient using a mapping function is: in, Represents a mapping function. Indicates the gain coefficient. Indicates the entropy threshold; The formula for calculating the assembly adjustment amount based on the average smoothing coefficient and the weighted fusion of coarse and fine adjustment amounts is as follows: , in, Indicates the amount of adjustment. This represents the mean of the smoothing coefficients for all fields of view.
8. The Transformer-based optical system assembly and adjustment system according to claim 1, characterized in that, The training of the Transformer misalignment inference module and the coarse-fine tuning adaptive assembly module are completed using an end-to-end joint training method.
9. The Transformer-based optical system assembly and adjustment system according to claim 8, characterized in that, The formula for calculating the loss function of the joint training is as follows: in, This represents the total loss value. This represents the mean square error between the predicted off-axis wavefront Zernike coefficients and the actual off-axis wavefront Zernike coefficients. This represents the mean square error between the predicted and actual offset parameters. express The weighting coefficients, express The weighting coefficients.
10. A method for assembling and adjusting an optical system based on Transformer, characterized in that, include: The wavefront information of the optical system to be assembled is obtained, and the wavefront information is processed to obtain the Zernike coefficient of the center field of view. A mapping relationship between the Zernik coefficients of the central field of view and the Zernik coefficients of the off-axis wavefront is established using a multi-layer fully connected neural network. The predicted off-axis wavefront Zernik coefficients are obtained using the mapping relationship based on the Zernik coefficients of the central field of view. The multi-head self-attention mechanism of Transformer is used to capture the correlation features between Zernike coefficients of the wavefront across the entire field of view. Establish a nonlinear mapping relationship between the correlation features and the misalignment parameters; Predict the misalignment parameters based on the nonlinear mapping relationship; The coarse adjustment amount and fine adjustment amount are calculated based on the misalignment parameters. The attention entropy of each field of view is calculated and converted into a smoothing coefficient through a mapping function. Based on the average smoothing coefficient, the assembly adjustment amount is obtained by weighted fusion of the coarse adjustment amount and the fine adjustment amount. The assembly adjustment amount is converted into a control command that can be recognized by the assembly actuator. Obtain the root mean square value of the wavefront, the optical distortion value, and the modulation transfer function value, and determine whether the assembly and adjustment meet the standards.