A method and system for automatic adjustment of a spectrometer for spot feature diagnosis

CN122753552APending Publication Date: 2026-09-15SHANGHAI TECH UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611137903.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-07-29
Publication Date
2026-09-15

AI Technical Summary

Technical Problem

当不同参数失调导致相似光斑变化时,单一黑箱输出容易产生诊断混淆

Benefits of technology

[0022] 1) This invention can convert two-dimensional light spot images into feature vectors with clear physical meaning and observable features, and establish the response relationship between parameters, light spot features and performance indicators, so that sensitive adjustable parameters can be traced by features such as centroid, width, direction, curvature, tail and edge risk, which is beneficial to distinguish similar light spot changes caused by different parameter misalignments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure FT_1
    Figure FT_1
  • Figure FT_2
    Figure FT_2
  • Figure FT_3
    Figure FT_3
Patent Text Reader

Abstract

The present application provides a kind of light spot feature diagnosis spectrometer automatic adjusting method, it is related to optical instrument automatic adjusting field.The present application includes: with the real scene light spot of acquisition in database is searched, obtains multiple candidate samples;Based on the candidate sample, sensitivity score is carried out to all adjustable parameters, and the several adjustable parameters with highest sensitivity score are used as sensitive adjustable parameter;Local diagnostic scanning is carried out to the sensitive adjustable parameter, and local diagnostic sample set is constructed, and the optimal sample with minimum objective function in local diagnostic sample set is obtained;In the process of local diagnostic scanning, only sensitive adjustable parameter is updated, when each sensitive adjustable parameter is updated, the rest adjustable parameter is fixed at reference value, and the light spot image recorded at each update is included in local diagnostic sample set;The sensitive adjustable parameter corresponding to the optimal sample is determined, and the error between the sensitive adjustable parameter corresponding to optimal sample and the adjustable parameter corresponding to real light spot is used as the amount of issue, and is issued to execution layer to adjust.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of automatic adjustment technology for optical instruments, and in particular to an automatic adjustment method for spectrometers and a spectrometer simulation system for diagnosing light spot characteristics. Background Technology

[0002] High-resolution spectrometers are widely used in scientific research, semiconductor metrology, life science imaging, and energy materials analysis. These spectrometers typically consist of a dispersive element, a two-dimensional detector, and a multi-degree-of-freedom adjustment mechanism. Due to the large number of adjustable parameters and the coupling relationships between them, realignment is often required to restore designed performance after equipment startup, sample replacement, optical component replacement, or environmental disturbances. Traditional adjustment processes rely heavily on experienced operators, resulting in long adjustment times and easily affected repeatability due to human factors.

[0003] Existing automatic alignment schemes mainly include surrogate model methods based on simulation training, black-box alignment methods based on Bayesian optimization, and automatic alignment methods based on reinforcement learning. Simulation-based methods typically input the entire two-dimensional spot image into the network, which then outputs the offset or compensation amount. However, they do not fully utilize interpretable spot features such as centroid, width, ellipticity, tail, and curvature. When different parameter misalignments cause changes in similar spots, the single black-box output can easily lead to diagnostic confusion. While Bayesian optimization and reinforcement learning methods can reduce human intervention, their online trial-and-error processes may cause detector saturation, actuator overreach, or ineffective actions, and the causes of abnormal adjustment behavior are difficult to trace.

[0004] Furthermore, there are differences between actual optomechanical systems and simulation models, such as surface shape errors, assembly errors, thermal drift, light source pointing drift, detector response nonlinearity, and environmental changes. Existing methods typically lack execution permission judgment and safety degradation mechanisms for candidate actions, and therefore, when candidates are not unique or lack sufficient confidence, unreliable actions may still be directly issued to the actuator.

[0005] Therefore, there is a need for a closed-loop automatic adjustment method for spectrometers that can explicitly utilize the physical characteristics of light spots, combine optical tracking digital twin models, have a mechanism for separating candidate action generation and execution permission, and can actively degrade under multiple solutions or low confidence conditions. Summary of the Invention

[0006] To address the aforementioned issues, this invention provides an automatic adjustment method for spectrometers based on spot feature diagnosis. This method can convert two-dimensional spot images into observable feature vectors with clear physical meanings and establish response relationships between parameters, spot features, and performance indicators. It enables sensitive and adjustable parameters to be traced by features such as centroid, width, direction, curvature, tailing, and edge risk, which is beneficial for distinguishing similar spot changes caused by different parameter misalignments.

[0007] The first aspect of this invention provides an automatic adjustment method for a spectrometer based on spot feature diagnosis, comprising: searching a database using real-world spot data to obtain multiple candidate samples; performing sensitivity scoring on all adjustable parameters based on the candidate samples, and selecting the adjustable parameters with the highest sensitivity scores as sensitive adjustable parameters; performing local diagnostic scanning on the sensitive adjustable parameters to construct a local diagnostic sample set, and obtaining the optimal sample with the smallest objective function in the local diagnostic sample set; during the local diagnostic scanning process, only the sensitive adjustable parameters are updated, and when updating each sensitive adjustable parameter, the remaining adjustable parameters are fixed at reference values, and the spot image recorded at each update is included in the local diagnostic sample set; determining the sensitive adjustable parameter corresponding to the optimal sample, and using the error between the sensitive adjustable parameter corresponding to the optimal sample and the adjustable parameter corresponding to the real spot as the sending quantity, and sending it to the execution layer for adjustment.

[0008] In one feasible implementation, the samples in the database are obtained by means of single-factor coarse scanning, local fine scanning, local supplementary fine scanning, and coupled fine scanning.

[0009] In one feasible implementation, during the single-factor coarse scan, all adjustable parameters are updated. When updating each adjustable parameter, the remaining adjustable parameters are fixed at the reference value, and the spot image recorded at each update is included in the database.

[0010] In one feasible implementation, during the local fine scanning process, the adjustable parameters with the highest sensitivity scores during the single-factor coarse scanning process are used as update parameters, while the remaining adjustable parameters are fixed at reference values; each update parameter selects multiple sampling points, performs full factor combination on all sampling points, and incorporates the light spot images recorded under the full factor combination into the database.

[0011] In one feasible implementation, during the local supplementary fine scan, the sample with the optimal objective function among the baseline sample, the single-factor coarse scan sample, and the sample with the optimal objective function among the local fine scan samples are selected, and the above three samples are used as baselines to perform single-factor coarse scans on all adjustable parameters.

[0012] In one feasible implementation, during the coupled fine scanning process, two adjustable parameters in the same direction are selected as coupling parameters for updating, while the remaining adjustable parameters are fixed at reference values; each coupling parameter selects multiple sampling points, performs full factor combination on all sampling points, and incorporates the light spot image recorded under the full factor combination into the database.

[0013] In one feasible implementation, the process of searching in the database includes: obtaining the feature vector of the real spot as the first feature vector, and obtaining the feature vector of the sample in the database as the second feature vector; calculating the standardized spot feature distance, image similarity distance and prior penalty of deviation from the reference working point between the first feature vector and each second feature vector; determining the comprehensive score by the weighted sum of the above three, and determining the candidate samples in order of comprehensive score from high to low.

[0014] In one feasible implementation, during the sensitivity scoring process, the normalized parameter deviation of each adjustable parameter in each candidate sample is calculated, and the adjustable parameter with the largest normalized parameter deviation is taken as the dominant direction of that candidate sample; the number of times each adjustable parameter becomes the dominant direction in all candidate samples is calculated, and the more times it becomes the dominant direction, the higher the sensitivity score.

[0015] In one feasible implementation, the objective function includes an evaluation value term, a detector hit rate penalty term, an effective pixel count penalty term, and a per-pixel ray ratio penalty term. The evaluation value term is the ratio between the sample spot evaluation value and the real-world spot evaluation value. The evaluation value is the weighted average energy half-width per pixel. The detector hit rate penalty term penalizes cases where the detector hit rate is below a threshold. The detector hit rate represents the proportion of all effective rays participating in ray tracing that ultimately reach the detector. The effective pixel count penalty term penalizes cases where the number of effective pixels is below a threshold. The effective pixel count penalty term represents the number of pixels on the detector hit by effective rays among all effective rays participating in ray tracing. The per-pixel ray ratio penalty term penalizes cases where the per-pixel ray ratio is below a threshold. The per-pixel ray ratio represents whether an effective pixel has received sufficient ray support.

[0016] In one feasible implementation, the weighted average energy half-width per pixel is as follows: for each pixel that meets the statistical conditions, the corresponding energy half-width is calculated based on the energy distribution of each ray reaching the pixel, and the energy half-width of each pixel is weighted and averaged using the hit intensity of the pixel as the weight.

[0017] In one feasible implementation, during the construction of the local diagnostic sample set, if two or more sensitive adjustable parameters are covered in a certain direction, a coupled fine scan is performed on these covered sensitive adjustable parameters.

[0018] In one feasible implementation, the amount of data sent is subjected to a safety projection before being sent to the execution layer for adjustment. The safety projection constrains the amount of data sent by upper and lower limits of position, upper limit of single-step displacement, upper limit of speed or acceleration, detector saturation threshold and software limit. If the amount of data sent after safety projection is not within the preset set of safety actions, the sending is stopped.

[0019] In one feasible implementation, the process further includes a calibration process for the spectrometer: acquiring multiple sets of virtual and real light spots with the same parameters; constructing a loss function between the virtual and real light spots; determining the weights of each item that minimize the loss of the loss function; and determining the calibration value based on the weights.

[0020] A second aspect of the present invention provides a spectrometer simulation system, comprising: a candidate acquisition module, used to search a database using real field light spots to obtain multiple candidate samples; a scoring module, used to perform sensitivity scoring on all adjustable parameters based on the candidate samples, and to use the adjustable parameters with the highest sensitivity scores as sensitive adjustable parameters; a diagnostic scanning module, used to perform local diagnostic scanning on the sensitive adjustable parameters, construct a local diagnostic sample set, and obtain the optimal sample with the minimum objective function in the local diagnostic sample set; during the local diagnostic scanning process, only the sensitive adjustable parameters are updated, and when updating each sensitive adjustable parameter, the remaining adjustable parameters are fixed at reference values, and the light spot image recorded at each update is included in the local diagnostic sample set; and a distribution module, used to determine the sensitive adjustable parameters corresponding to the optimal sample, and to use the error between the sensitive adjustable parameters corresponding to the optimal sample and the adjustable parameters corresponding to the real light spots as the distribution amount, and to distribute it to the execution layer for adjustment.

[0021] The automatic adjustment method and system for spectrometers for spot feature diagnosis provided by this invention have the following beneficial effects:

[0022] 1) This invention can convert two-dimensional light spot images into feature vectors with clear physical meaning and observable features, and establish the response relationship between parameters, light spot features and performance indicators, so that sensitive adjustable parameters can be traced by features such as centroid, width, direction, curvature, tail and edge risk, which is beneficial to distinguish similar light spot changes caused by different parameter misalignments.

[0023] 2) This invention separates candidate generation from execution permission. The candidate generation layer only proposes candidate directions and candidate adjustment values; the execution permission layer then makes judgments based on posterior probability, normalized posterior entropy, candidate direction consistency, prediction improvement amount, and safety constraints, while simultaneously entering a diagnostic local scan, thereby reducing the risk of misadjustment caused by low-confidence candidates from a mechanism perspective.

[0024] 3) This invention applies safety constraints such as upper and lower limits for position, upper limit for single-step displacement, upper limit for velocity or acceleration, detector saturation threshold, and software limits before issuing candidate actions. For candidates that do not meet the conditions for direct execution, the candidate range is first narrowed down through diagnostic local scanning, and then the optimal diagnostic state is safely projected. This reduces invalid actions and mechanical wear, and lowers engineering risks such as detector saturation and actuator over-limit. The online updating of the sliding window after execution enables the system to adapt to environmental drift and long-term aging. Attached Figure Description

[0025] Figure 1 This is a schematic diagram of the overall process of an embodiment of the present invention.

[0026] Figure 2 This is a schematic diagram of the overall process of an embodiment of the present invention.

[0027] Figure 3 This is a spot image of a candidate sample in an embodiment of the present invention.

[0028] Figure 4 This is a distribution map corresponding to the diagnostic local scan in an embodiment of the present invention.

[0029] Figure 5 The images shown are light spot diagrams before and after adjustment in an embodiment of the present invention. Detailed Implementation

[0030] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention. In the description of the present invention, it should be noted that the terms "left side", "right side", "upper side", "lower side", "above", "below", etc., indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings, and are only for the convenience of describing the present invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation, and therefore should not be construed as a limitation of the present invention. In addition, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance.

[0031] In the description of this invention, it should be noted that, unless otherwise explicitly specified and limited, the terms "installation," "connection," and "linking" should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral connection; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or an indirect connection through an intermediate medium; and they can refer to the internal connection of two components. Those skilled in the art can understand the specific meaning of the above terms in this invention according to the specific circumstances.

[0032] Furthermore, in the description of this invention, unless otherwise stated, "a plurality of" means two or more.

[0033] This invention provides an automatic adjustment method for a spectrometer for diagnosing light spot characteristics, such as... Figure 1 As shown, it includes:

[0034] Step 1) Search the database using the collected real-world light spots to obtain multiple candidate samples.

[0035] Furthermore, the samples in the database are obtained using single-factor coarse scanning, local fine scanning, local supplementary fine scanning, and coupled fine scanning methods.

[0036] Furthermore, during the single-factor coarse scan, all adjustable parameters are updated. While updating each adjustable parameter, the remaining adjustable parameters are fixed at the reference value, and the spot images recorded at each update are included in the database.

[0037] Furthermore, during the local fine scanning process, the adjustable parameters with the highest sensitivity scores during the single-factor coarse scanning process are used as update parameters, while the remaining adjustable parameters are fixed at reference values. For each update parameter, multiple sampling points are selected, and all sampling points are combined using all factors. The light spot images recorded under the combination of all factors are then included in the database.

[0038] Furthermore, during the local supplementary fine scan process, the sample with the optimal objective function among the baseline sample, the single-factor coarse scan sample, and the sample with the optimal objective function among the local fine scan sample are selected, and these three samples are used as baselines to perform single-factor coarse scans on all adjustable parameters.

[0039] Furthermore, during the coupled fine scanning process, two adjustable parameters in the same direction are selected as coupling parameters for updating, while the remaining adjustable parameters are fixed at reference values; each coupling parameter selects multiple sampling points, performs full factor combination on all sampling points, and incorporates the light spot image recorded under the full factor combination into the database.

[0040] Furthermore, the process of searching in the database includes the following steps:

[0041] Step 1-1) Calculate the standardized spot feature distance, image similarity distance, and prior penalty for deviation from the reference working point between the real spot and each sample spot.

[0042] Steps 1-2) Determine the comprehensive score by the weighted sum of the above three factors, and determine the candidate samples in descending order of the comprehensive score.

[0043] Specifically, the formula for the comprehensive score is shown in Formula 1:

[0044]

[0045] in, Represented as the first The overall score of each sample Represented as the standardized spot feature distance, Represented as weights, Represented as the real light spot and the first The Euclidean distance between each sample spot in the standardized space; Represented as image similarity distance, Represented as weights, Represented as the real light spot and the first Image similarity distance of individual sample light spots; This represents the prior penalty for deviating from the reference operating point. Represented as weights, For the first The prior penalty value for each sample spot.

[0046] Furthermore, , and The non-negative weights are determined through offline simulation and satisfy the following conditions:

[0047]

[0048] Step 2) Based on the candidate samples, perform sensitivity scoring on all adjustable parameters, and select the adjustable parameters with the highest sensitivity scores as sensitive adjustable parameters.

[0049] Furthermore, during the sensitivity scoring process, the normalized parameter deviation of each adjustable parameter in each candidate sample is calculated, and the adjustable parameter with the largest normalized parameter deviation is taken as the dominant direction of that candidate sample; the number of times each adjustable parameter becomes the dominant direction in all candidate samples is calculated, and the more times it becomes the dominant direction, the higher the sensitivity score.

[0050] Specifically, the sensitivity scoring formula is shown in Formula 2:

[0051]

[0052] in, Represented as the first Sensitivity score for each adjustable parameter This represents the number of candidate samples. Represented as decreasing weights, and satisfying ; This is represented as a judgment term, when When the condition is met, the value of this term is 1; otherwise, it is 0. Represented as the first The dominant direction of each sample This indicates the number of the adjustable parameter.

[0053] Furthermore, the first The dominant direction of each sample This can be expressed as Formula 3:

[0054]

[0055] in, This means that when the value of formula three is at its maximum, The possible values ​​of ; Indicates the number of the adjustable parameter; Indicates the first The first sample The deviation of the normalized parameter of each adjustable parameter.

[0056] Furthermore, the first The first sample Deviation of normalized parameter for each adjustable parameter This can be represented as Formula 4:

[0057]

[0058] in, Represented as the first In the candidate samples, the first The parameter values ​​of each adjustable parameter. Indicated as the reference state or reference operating point, the first The parameter values ​​of each adjustable parameter. Represented as the first The maximum allowed value for each adjustable parameter. Represented as the first The minimum allowable value for each adjustable parameter.

[0059] Step 3) Perform local diagnostic scanning on the sensitive adjustable parameters, construct a local diagnostic sample set, and obtain the optimal sample with the minimum objective function in the local diagnostic sample set; during the local diagnostic scanning process, only the sensitive adjustable parameters are updated. When updating each sensitive adjustable parameter, the other adjustable parameters are fixed at the reference value, and the spot image recorded at each update is included in the local diagnostic sample set.

[0060] Specifically, the objective function includes an evaluation value term, a detector hit rate penalty term, an effective pixel count penalty term, and a per-pixel ray ratio penalty term. More specifically, as shown in Formula 5, the evaluation value is the ratio between the sample spot evaluation value and the actual spot evaluation value; the detector hit rate represents the proportion of all effective rays participating in ray tracing that ultimately reach the detector; the effective pixel count represents the number of pixels on the detector that are hit by effective rays among all effective rays participating in ray tracing; and the per-pixel ray ratio represents whether the effective pixels have received sufficient ray support.

[0061]

[0062] in, Represented as the objective function, This is represented as an evaluation value item. This is represented as a penalty for detector hit rate. This is represented as a penalty for the number of valid pixels. This is represented as a per-pixel light ratio penalty.

[0063] The detector hit rate penalty is used to penalize situations where the detector hit rate is lower than a threshold; the effective pixel count penalty is used to penalize situations where the effective pixel count is lower than a threshold; and the per-pixel ray ratio penalty is used to penalize situations where the per-pixel ray ratio is lower than a threshold.

[0064] Further, the evaluation value is the weighted average energy half-width per pixel. The weighted average energy half-width per pixel is calculated as follows: for each pixel that meets the statistical conditions, the corresponding energy half-width is calculated based on the energy distribution of each ray reaching that pixel, and the energy half-width of all pixels is weighted and averaged using the hit intensity of that pixel as the weight. The weighted average energy half-width per pixel is shown in Formula Six:

[0065]

[0066] in, It represents the weighted average energy full width at half maximum (FWHM) of each effective pixel on the detector under the current scanning state; Represented as the position coordinates of a pixel on the detector; This represents the number of rays that hit that pixel. Represented as pixels Full width at half maximum (FWHM) of the energy distribution of light rays at a given location.

[0067] In a feasible implementation, during the construction of the local diagnostic sample set, if two or more sensitive adjustable parameters are covered in a certain direction, a coupled fine scan is performed on these covered sensitive adjustable parameters.

[0068] Step 4) Determine the sensitive adjustable parameter corresponding to the optimal sample, and use the error between the sensitive adjustable parameter corresponding to the optimal sample and the adjustable parameter corresponding to the real spot as the sending amount, and send it to the execution layer for adjustment.

[0069] Specifically, as shown in Formula 7:

[0070]

[0071] in, Represented as the first Candidate adjustment values ​​generated in each parameter direction This is expressed as the condition in diagnostic local scanning where the objective function is optimal and relevant constraints are satisfied. The optimal parameter values ​​corresponding to each parameter. Represented as the current time of the i-th The actual state values ​​of each parameter.

[0072] Furthermore, before the data is sent to the execution layer for adjustment, the data is projected safely to obtain a safe action. The safe projection constrains the data by upper and lower limits of position, upper limit of single-step displacement, upper limit of speed or acceleration, detector saturation threshold, and software limit. If the safe action is not within the preset set of safe actions, the data is sent out.

[0073] Specifically, the safety action is obtained according to Formula 8:

[0074]

[0075] in, This indicates a safe action. Represented as a set of safety actions, This represents the amount distributed.

[0076] When deployed on real devices, data can be collected. By calibrating the samples and obtaining simulation feature vectors at the same actuator position, a set of calibration samples were obtained. and measured feature vectors And establish the correction relationship as described in Formula 9:

[0077]

[0078] in, This is represented as a corrected feature vector used for comparison with the measured features; Represented as the original simulation feature vector; It is represented as a feature transformation matrix and is used to correct scaling errors and coupling between different features; It is represented as an offset vector and is used to correct for fixed deviations.

[0079] Among them, the correction parameters and It can be determined by regularized least squares as shown in Formula 10:

[0080]

[0081] in, Represented as simulation feature vectors, Represented as the measured feature vector, This represents the number of calibration samples. It is represented as an identity matrix.

[0082] During candidate retrieval, the simulation features in the database can be converted into corrected features first. Then, perform standardized distance calculations with the measured query features; or map the measured features to the simulated feature domain before performing the retrieval.

[0083] After each license execution on the real device, the most recent Each valid record is written into the sliding window to update the correction parameters and parameter inversion model. If detector saturation, approaching hard limit, or continuous [damage / continuity] occurs... If there is no improvement or the prediction error exceeds the threshold, the relevant parameter direction or parameter combination area is marked as a risk area, and the risk is determined according to the contraction coefficient. Reduce the upper limit of single-step displacement in this direction:

[0084]

[0085] in, This represents the maximum allowable single parameter change before tightening. This represents the maximum allowable single parameter change after tightening. It is expressed as the shrinkage coefficient.

[0086] The aforementioned deviation correction, online update, and security domain tightening mechanisms are preferred implementation methods for real-world device deployment.

[0087] Example

[0088] The fifteen online adjustable geometric degrees of freedom in this embodiment include the three-dimensional position offsets of the light source point, crystal, and detector, as well as the three-axis tilt angles of the crystal and detector.

[0089] 1) Online adjustable geometric degrees of freedom and scanning range

[0090] Each parameter was actually written into the optical tracking model, with position units in millimeters and angle units in degrees. The coarse scan intervals of each parameter are symmetrical about their reference values, as shown in Table 1.

[0091] Table 1. Fifteen online adjustable geometric degrees of freedom and coarse sweep range

[0092] Parameter name benchmark value Rough sweep lower limit Coarse sweep limit unit X-direction offset of the light source point 157.39 155.89 158.89 mm Y-direction offset of the light source point -5.0346 -5.8346 -4.2346 mm Z-direction offset of the light source point 0.5913 -0.2087 1.3913 mm Crystal X-direction offset 6.7587 5.9587 7.5587 mm Crystal Y-direction offset -2.5595 -3.3595 -1.7595 mm Crystal Z-direction offset -0.6474 -1.4474 0.1526 mm Crystal tilt angle about the X-axis 1.8674 1.6174 2.1174 deg Crystal tilt angle about the Y-axis -0.4040 -0.6540 -0.1540 deg Crystal tilt angle about the Z-axis -1.0396 -1.2896 -0.7896 deg Detector X-direction offset 13.979 13.179 14.779 mm detector Y-direction offset 1.5959 0.7959 2.3959 mm Detector Z-direction offset 5.8978 5.0978 6.6978 mm detector tilt angle around the X-axis -1.6141 -1.8641 -1.3641 deg detector tilt angle around the Y-axis -0.4257 -0.6757 -0.1757 deg detector tilt angle around the Z-axis 1.2879 1.0379 1.5379 deg

[0093] 2) Build the database

[0094] The single-factor coarse scan uses the baseline as the common center point, changing only one geometric degree of freedom each time, while keeping the remaining fourteen parameters at the baseline value. Each parameter has seven equally spaced sampling points between its lower and upper coarse scan limits, with the baseline point centered and three points on each side. Fifteen parameters share a single baseline point, resulting in 91 samples for the single-factor coarse scan. The local fine scan revolves around the first three sensitive directions identified in the coarse scan stage. Each of the three parameters has three levels, and a full factorial combination is performed, resulting in 27 samples for the local fine scan. Local supplementary samples are generated centered on the low-scoring operating points obtained from the local fine scan. For the first three sensitive parameters, the sampling range is taken from their local fine scan range. Local supplementary samples are generated using the baseline point, the optimal point of the coarse scan, and the optimal point of the local fine scan as local sampling anchor points. The optimal point of the local fine scan comes from the operating point with the lowest objective function score among the 27 three-parameter joint fine scan samples that satisfies the constraints. In the three-parameter local fine scan stage, only the first three sensitive parameters are changed, while the remaining parameters remain at the baseline value. In the local supplementation phase, the reference point, the optimal point of the coarse scan, and the optimal point of the fine scan are used as anchor points. Small-scale random perturbations are performed around all 15 online adjustable parameters to encrypt the response database. For the remaining online adjustable parameters, the sampling range is limited to within 20% of the width of their respective coarse scan intervals, centered on the local optimal point or the reference point. 300 sets of samples are generated using Latin hypercube sampling with independent random seeds. Coupled parameter samples are used to cover parameter combinations that have degradation or joint effects. In this embodiment, two parameter pairs are selected: "Y-direction offset of light source point - Y-direction offset of crystal" and "Z-axis tilt angle of crystal - Y-direction offset of light source point". Each pair uses a 7×7 two-dimensional grid, generating a total of 98 sets of coupled samples. At the same time, 50 sets of test samples are retained, generated using a different random seed than the search samples, and do not participate in the construction of the nearest neighbor search database. The composition of the database samples is shown in Table 2.

[0095] Table 2. Database Sample Composition

[0096] Sample categories quantity use Single-factor coarse scan samples 91 Identify sensitive directions (1 baseline + 15 parameters × 6 offset points) Local fine scanning of samples 27 3×3×3 full factorial scan of the top three sensitive parameters Local supplementary samples 300 Encrypt near the work site Coupling parameter samples 98 Covering strongly coupled parameter combinations Retain test samples 50 Acts as virtual on-site input, without entering the search database.

[0097] 3) Objective function and constraints

[0098] In this embodiment, the weighted average energy full width at half maximum (FWHM) per pixel is used as the primary objective for evaluating simulation performance. This quantity differs from the geometric full WHM extracted from a two-dimensional intensity image: the former is only used for offline simulation performance evaluation, candidate performance prediction, and virtual loop closure verification, while the latter is used for observable spot diagnostic input. The objective function is shown in Equation 5, and the penalty terms are shown in Equations 51 to 53.

[0099]

[0100] in, Represented as the objective function, This is represented as an evaluation value item. This is represented as a penalty for detector hit rate. This is represented as a penalty for the number of valid pixels. This is represented as a per-pixel light ratio penalty.

[0101]

[0102] in, This represents the detector hit rate in the current scanning state. This is the preset minimum hit rate.

[0103]

[0104] in, This represents the number of pixels on the detector that are effectively hit by light. This is the preset minimum number of valid pixels.

[0105]

[0106] in, To calculate the proportion of light on a pixel-by-pixel basis, This is the preset minimum per-pixel statistical light ratio.

[0107] In this embodiment, the constraint indicators and thresholds are shown in Table 3.

[0108] Table 3 Constraint Indicators and Thresholds

[0109] constraint indicators threshold illustrate Detector hit rate = 0.0731 Avoid selecting scanning points with insufficient effective light. Effective pixel count = 657 Avoid local resolution artifacts on a few pixels Pixel-by-pixel statistical light ratio = 0.50 Ensure that the full width and height are calculated using a sufficient number of hit rays.

[0110] 4) Candidate generation

[0111] From the 50 retained test samples, select one sample that meets the criteria of "detector hit, energy half-width at half-maximum can be calculated, performance is inferior to the local optimal state and not entered the search library" as the virtual field state.

[0112] The virtual scene light spot was preprocessed and feature extracted using the same rules as the database to obtain a query feature vector. The query feature vector was then compared with 516 samples from the search database in a standardized space with zero mean and unit variance, and a comprehensive score was calculated using Formula 1. Take the overall score The 20 smallest samples are used as the candidate set.

[0113]

[0114] in, Represented as the first The overall score of each sample Represented as the standardized spot feature distance, Represented as weights, Represented as the real light spot and the first The Euclidean distance between each sample spot in the standardized space; Represented as image similarity distance, Represented as weights, Represented as the real light spot and the first Image similarity distance of individual sample light spots; This represents the prior penalty for deviating from the reference operating point. Represented as weights, For the first The prior penalty value for each sample spot.

[0115] For the Each candidate is calculated according to Formula 4, showing its deviation from the normalized parameter relative to the reference state.

[0116]

[0117] in, Represented as the first In the candidate samples, the first The parameter values ​​of each adjustable parameter. Indicated as the reference state or reference operating point, the first The parameter values ​​of each adjustable parameter. Represented as the first The maximum allowed value for each adjustable parameter. Represented as the first The minimum allowable value for each adjustable parameter.

[0118] According to Formula 3, the direction of the parameter with the largest absolute deviation value is taken as the dominant direction of the candidate:

[0119]

[0120] in, This means that when the value of formula three is at its maximum, The possible values ​​of ; Indicates the number of the adjustable parameter; Indicates the first The first sample The deviation of the normalized parameter of each adjustable parameter.

[0121] Rank according to Formula 2 Candidates are assigned decreasing weights and votes are accumulated according to the dominant direction: the directions of the parameters with the highest accumulated votes are used as diagnostic scan directions.

[0122]

[0123] in, Represented as the first Sensitivity score for each adjustable parameter This represents the number of candidate samples. Represented as decreasing weights, and satisfying ; This is represented as a judgment term, when When the condition is met, the value of this term is 1; otherwise, it is 0. Represented as the first The dominant direction of each sample This indicates the number of the adjustable parameter.

[0124] 5) Diagnostic local scanning and safety action generation

[0125] A diagnostic local scan is generated based on the cumulative votes of the top 20 candidates' dominant directions.

[0126] The three suspected directions selected in this embodiment are the Y-direction offset of the light source point, the Y-direction offset of the crystal, and the tilt angle of the crystal around the Z-axis.

[0127] To simultaneously verify the one-dimensional response and key coupling relationships, this embodiment performed a total of 70 diagnostic scans. Among these, three one-dimensional scans each included 7 evaluations, totaling 21; the two-dimensional coupling scan involving the Y-direction offset of the light source point and the Y-direction offset of the crystal included 7 × 7 = 49 evaluations. The above number of scans may include repeating parameter states used to compare the one-dimensional response curve and the two-dimensional coupling response surface. Table 4 shows the diagnostic scan design table for this embodiment.

[0128] Table 4 Diagnostic Scan Design in this Embodiment

[0129] Scanning Object Scan range and level Scanning method Sample size effect offset of light source point in the Y direction Centered on the current value of −4.9624 mm, within a range of ±0.3000 mm, there are 7 equally spaced levels. One-dimensional scan 7 Verify the centroid, curvature, and objective function response. Crystal Y-direction offset Centered on the current value of −2.3550 mm, within a range of ±0.2000 mm, there are 7 equally spaced levels. One-dimensional scan 7 Verify curvature, focus, and objective function response. Crystal tilt angle around the Z-axis Centered on the current candidate center value, within a range of ±0.2500 degrees, there are 7 equally spaced levels. One-dimensional scanning 7 Verification of the most sensitive areas during the preliminary scanning stage Y-direction offset of light source point — Y-direction offset of crystal The local safety range using the two parameters mentioned above has 7 levels for each. 7×7 2D grid 49 Eliminate the coupling ambiguity between light source Y and crystal Y total 70

[0130] During the diagnostic scan, states that do not meet the constraints of hit rate, effective pixel count, and per-pixel statistical light ratio are first eliminated, and then the state with the minimum objective function J is selected as the preferred diagnostic state.

[0131] Let the current parameter state be the current state vector, and the diagnostic preferred state be the optimal parameter state obtained through scanning and screening, then the... The candidate adjustment values ​​for each parameter direction are determined by Equation 7:

[0132]

[0133] in, Represented as the first Candidate adjustment values ​​generated in each parameter direction This is expressed as the condition in diagnostic local scanning where the objective function is optimal and relevant constraints are satisfied. The optimal parameter values ​​corresponding to each parameter. Represented as the current time of the i-th The actual state values ​​of each parameter. Therefore, Formula 7 represents the difference between the optimal parameter value obtained from the diagnostic scan and the current parameter value to obtain the candidate adjustment amount in the direction of that parameter. As shown in Table 4, for example, the current light source point Y is −4.9624mm, and the optimal value after scanning is −4.7624mm.

[0134] .

[0135] The light source point is adjusted 0.2000mm in the positive Y direction.

[0136] For suspicious directions that do not improve the objective function or are not confirmed through coupling, the corresponding candidate adjustment values ​​are set to zero. Let the set of safety actions be U. Perform a safety projection on the candidate adjustment values ​​to obtain the safety actions:

[0137]

[0138] Among them, the set of safety actions It should at least include upper and lower position limits, upper limit of single-step displacement, upper limit of velocity or acceleration, detector saturation threshold, and software limit. If the candidate action does not belong to... If the system does not issue the action to the actual actuator, it will instead output suggestions for recalibration, rollback, or manual confirmation. Table 5 shows the safety adjustment suggestions after a diagnostic local scan.

[0139] Table 5 Safety Adjustment Recommendations After Diagnostic Local Scans

[0140] parameter Current value Recommended value Recommended adjustment amount unit safe status Y-direction offset of the light source point -4.9624 -4.7624 +0.2000 mm Meet the single-step safety limit Crystal Y-direction offset -2.3550 -2.4883 -0.1333 mm Meet the single-step safety limit

[0141] Therefore, in this embodiment, the tilt angle of the crystal around the Z-axis is used as the diagnostic verification direction rather than the final action to be issued.

[0142] 6) Deployment of actual equipment

[0143] When deployed on real devices, data can be collected. By calibrating the samples and obtaining simulation feature vectors at the same actuator position, a set of calibration samples were obtained. and measured feature vectors And establish the correction relationship as described in Formula 9:

[0144]

[0145] in, This is represented as a corrected feature vector used for comparison with the measured features; Represented as the original simulation feature vector; It is represented as a feature transformation matrix and is used to correct scaling errors and coupling between different features; It is represented as an offset vector and is used to correct for fixed deviations.

[0146] Among them, the correction parameters and It can be determined by regularized least squares as shown in Formula 10:

[0147]

[0148] in, Represented as simulation feature vectors, Represented as the measured feature vector, This represents the number of calibration samples. It is represented as an identity matrix.

[0149] During candidate retrieval, the simulation features in the database can be converted into corrected features first. Then, perform standardized distance calculations with the measured query features; or map the measured features to the simulated feature domain before performing the retrieval.

[0150] After each license execution on the real device, the most recent Each valid record is written into the sliding window to update the correction parameters and parameter inversion model. If detector saturation, approaching hard limit, or continuous [damage / continuity] occurs... If there is no improvement or the prediction error exceeds the threshold, the relevant parameter direction or parameter combination area is marked as a risk area, and the risk is determined according to the contraction coefficient. Reduce the upper limit of single-step displacement in this direction, as shown in Formula 11:

[0151]

[0152] in, This represents the maximum allowable single parameter change before tightening. This represents the maximum allowable single parameter change after tightening. It is expressed as the shrinkage coefficient.

[0153] After processing using the diagnostic local scan and safety action generation workflow described above, the weighted average half-height and full width at half-maximum (FWHM) of the virtual scene decreased from 1.319 eV to 1.023 eV, an improvement of 22.41%; the number of effective pixels increased from 1668 to 1980; and the hit rate changed from 0.1386 to 0.1346, remaining within the constraints. The final action category was "Executable after diagnostic confirmation".

[0154] Table 6 Changes in indicators before and after loop closure

[0155] index Before adjustment After adjustment change Weighted average half-height full width per pixel 1.319 eV 1.023 eV Improvement of 22.41% Effective pixel count 1668 1980 Increase 312 Hit rate 0.1386 0.1346 Basically unchanged Action categories — Once the diagnosis is confirmed, the procedure can be performed. —

[0156] This embodiment illustrates how executable adjustment suggestions are generated while meeting safety constraints. The above process integrates the optical tracing response database, observable spot features, candidate generation, execution authorization, diagnostic scanning, and safety action generation into a single closed loop.

[0157] The above description is only a preferred embodiment of the present invention. It should be noted that for those skilled in the art, several improvements and substitutions can be made without departing from the technical principles of the present invention, and these improvements and substitutions should also be considered within the scope of protection of the present invention.

Claims

1. An automatic adjustment method for a spectrometer for diagnosing light spot characteristics, characterized in that, include: The collected real-world light spots are searched in the database to obtain multiple candidate samples; Based on the candidate samples, sensitivity scores are performed on all adjustable parameters, and the adjustable parameters with the highest sensitivity scores are selected as sensitive adjustable parameters. Local diagnostic scanning is performed on the sensitive adjustable parameters to construct a local diagnostic sample set and obtain the optimal sample with the minimum objective function in the local diagnostic sample set. During the local diagnostic scanning process, only the sensitive adjustable parameters are updated. When updating each sensitive adjustable parameter, the other adjustable parameters are fixed at the reference value, and the spot image recorded at each update is included in the local diagnostic sample set. The sensitive adjustable parameter corresponding to the optimal sample is determined, and the error between the sensitive adjustable parameter corresponding to the optimal sample and the adjustable parameter corresponding to the real light spot is used as the sending quantity and sent to the execution layer for adjustment.

2. The method according to claim 1, characterized in that, The samples in the database were obtained using single-factor coarse scanning, local fine scanning, local supplementary fine scanning, and coupled fine scanning.

3. The method according to claim 2, characterized in that, During the single-factor coarse scan, all adjustable parameters are updated. While updating each adjustable parameter, the remaining adjustable parameters are fixed at the reference value, and the spot images recorded at each update are included in the database.

4. The method according to claim 3, characterized in that, During the local fine scanning process, the adjustable parameters with the highest sensitivity scores during the single-factor coarse scanning process are used as update parameters, while the remaining adjustable parameters are fixed at the reference values. For each update parameter, multiple sampling points are selected, and all sampling points are combined using all factors. The light spot images recorded under the combination of all factors are then included in the database.

5. The method according to claim 4, characterized in that, During the local supplementary fine scan process, the sample with the optimal objective function among the baseline sample, the single-factor coarse scan sample, and the sample with the optimal objective function among the local fine scan sample are selected. These three samples are used as baselines to perform single-factor coarse scans on all adjustable parameters.

6. The method according to claim 2, characterized in that, During the coupled fine scanning process, two adjustable parameters in the same direction are selected as coupling parameters for updating, while the remaining adjustable parameters are fixed at the reference value. Each coupling parameter selects multiple sampling points, performs full factor combination on all sampling points, and incorporates the light spot image recorded under the full factor combination into the database.

7. The method according to claim 1, characterized in that, The process of searching in a database includes: The feature vector of the real-world light spot is obtained as the first feature vector, and the feature vector of the sample in the database is obtained as the second feature vector; Calculate the standardized spot feature distance, image similarity distance, and prior penalty for deviation from the reference working point between the first feature vector and each second feature vector, respectively. The comprehensive score is determined by the weighted sum of the above three factors, and the candidate samples are determined in descending order of the comprehensive score.

8. The method according to claim 1, characterized in that, In the sensitivity scoring process, the normalized parameter deviation of each adjustable parameter in each candidate sample is calculated, and the adjustable parameter with the largest normalized parameter deviation is taken as the dominant direction of the candidate sample; the number of times each adjustable parameter becomes the dominant direction in all candidate samples is calculated, and the more times it becomes the dominant direction, the higher the sensitivity score.

9. The method according to claim 1, characterized in that, The objective function includes an evaluation value term, a detector hit rate penalty term, an effective pixel count penalty term, and a per-pixel ray ratio penalty term; The evaluation value is the ratio between the sample spot evaluation value and the actual spot evaluation value; wherein, the evaluation value is the weighted average energy half-width per pixel. The detector hit rate penalty is used to penalize situations where the detector hit rate is below a threshold; wherein, the detector hit rate is represented as the proportion of all effective rays participating in ray tracing that ultimately reach the detector; The effective pixel count penalty is used to penalize situations where the effective pixel count is lower than a threshold; wherein, the effective pixel count penalty is represented as the number of pixels on the detector that are hit by an effective ray out of all effective rays participating in ray tracing; The per-pixel ray ratio penalty is used to penalize cases where the per-pixel ray ratio is lower than a threshold; wherein, the per-pixel ray ratio represents whether a valid pixel has received sufficient ray support.

10. The method according to claim 8, characterized in that, The weighted average energy half-width per pixel is as follows: for each pixel that meets the statistical conditions, the corresponding energy half-width is calculated based on the energy distribution of each ray reaching the pixel, and the energy half-width of each pixel is weighted and averaged using the hit intensity of the pixel as the weight.

11. The method according to claim 6, characterized in that, During the construction of the local diagnostic sample set, if two or more sensitive adjustable parameters are covered in a certain direction, a coupled fine scan is performed on these covered sensitive adjustable parameters.

12. The method according to claim 1, characterized in that, Before being sent to the execution layer for adjustment, the sent amount is subjected to a safety projection; the safety projection constrains the sent amount with upper and lower limits of position, upper limit of single-step displacement, upper limit of speed or acceleration, detector saturation threshold and software limit; if the sent amount after safety projection is not within the preset set of safety actions, the sending is stopped.

13. The method according to claim 1, characterized in that, It also includes the calibration process for the spectrometer: Collect multiple sets of virtual and real light spots with the same parameters; A loss function is constructed between the virtual light spot and the real light spot. The weights of each item are determined to minimize the loss of the loss function, and the correction value is determined based on the weights.

14. A spectrometer simulation system, characterized in that, include: The candidate acquisition module is used to search the database using the collected real-world light spots to obtain multiple candidate samples. The scoring module is used to perform sensitivity scoring on all adjustable parameters based on the candidate samples, and select the adjustable parameters with the highest sensitivity scores as sensitive adjustable parameters; the diagnostic scanning module is used to perform local diagnostic scanning on the sensitive adjustable parameters, construct a local diagnostic sample set, and obtain the optimal sample with the minimum objective function in the local diagnostic sample set. During the local diagnostic scan, only the sensitive adjustable parameters are updated. When updating each sensitive adjustable parameter, the other adjustable parameters are fixed at the reference value, and the spot image recorded at each update is included in the local diagnostic sample set. The distribution module is used to determine the sensitive adjustable parameter corresponding to the optimal sample, and uses the error between the sensitive adjustable parameter corresponding to the optimal sample and the adjustable parameter corresponding to the real light spot as the distribution amount, which is then distributed to the execution layer for adjustment.