Spectrometer wavelength calibration method and device

By combining the physical nature of the grating with the coupling framework of the mathematical model, introducing the virtual pixel center position and the physical constraint spline model, the problems of insufficient accuracy and stability of the existing spectrometer wavelength calibration method in wide-band high-precision calibration are solved, and high-precision spectrometer wavelength calibration is achieved.

CN120740755AInactive Publication Date: 2025-10-03奥谱天成(湖南)信息科技有限公司

Patent Information

Application Number
CN202511218085.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-08-28
Publication Date
2025-10-03
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

The existing wavelength calibration method for grating spectrometers based on polynomial fitting is simple to calculate in linear scenarios with small-angle diffraction, but its accuracy and stability are insufficient and lack physical constraints, resulting in a significant bottleneck in wide-band high-precision calibration scenarios.

Method used

By establishing a coupling framework between the physical essence of the grating and the mathematical model, introducing the virtual pixel center position, constructing a global physical model and a physical constraint spline model, and optimizing the algorithm to solve the virtual pixel center position, the inherent unity of the optical system and the mathematical model is achieved, breaking through the physical resolution limitation of the detector.

Benefits of technology

On the premise of ensuring the physical authenticity of optical laws, high-precision calibration of the spectrometer can be achieved with only a very small number of calibration points, which improves the stability and accuracy of the calibration.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120740755A_ABST
    Figure CN120740755A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of spectrum calibration, in particular to a spectrograph wavelength calibration method and device, and the method comprises the steps: obtaining the calibration data of a spectrograph based on the grating rotation of the spectrograph and a preset detector; performing virtual center solving on a global virtual pixel array corresponding to a preset detector in the calibration data to obtain an incident angle and a virtual pixel center position corresponding to the calibration data; constructing a global physical model based on the calibration data, the incident angle and the virtual pixel center position; constructing a physical constraint spline model based on the global physical model; converting the calibration data into a predicted incident angle based on a physical constraint spline model; and determining a target wavelength corresponding to the calibration data based on the physical model and the predicted incident angle. According to the method, a joint optimization mechanism of optical parameters and a mathematical model is established, high-precision calibration of the spectrograph can be achieved only through a small number of calibration points on the premise that the physical authenticity of the optical law is guaranteed, and the spectrum calibration stability is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of spectrum calibration, and in particular to a spectrometer wavelength calibration method and device in the technical field of spectrum calibration. Background Art

[0002] Existing wavelength calibration methods for grating spectrometers based on polynomial fitting rely on establishing a polynomial model between wavelength and pixel position, using the correspondence between the peak positions of characteristic spectral lines of a standard light source (such as a mercury or argon lamp) and detector pixels. Least-squares fitting is then used to map the pixels to wavelengths. While this method is computationally simple in linear scenarios with small-angle diffraction, it suffers from insufficient accuracy and stability, and lacks physical constraints. Summary of the Invention

[0003] The purpose of the present invention is to provide a method and device for calibrating the wavelength of a spectrometer. The technical solutions adopted are as follows: In a first aspect, an embodiment of the present invention provides a method for calibrating the wavelength of a spectrometer, the method comprising: Obtaining calibration data of the spectrometer based on a grating rotation and a preset detector of the spectrometer; Performing a virtual center solution on a global virtual pixel array corresponding to the preset detector in the calibration data to obtain an incident angle and a virtual pixel center position corresponding to the calibration data; Constructing a global physical model for calculating the wavelength of the spectrometer based on the calibration data, the incident angle, and the virtual pixel center position; Based on the global physical model, constructing a physical constraint spline model that characterizes the mapping relationship between wavelength and optical parameters corresponding to the calibration data; converting the calibration data into a predicted incident angle based on the physical constraint spline model; Based on the global physical model and the predicted incident angle, a target wavelength corresponding to the calibration data is determined.

[0004] In a second aspect, an embodiment of the present invention provides a spectrometer wavelength calibration device, the spectrometer wavelength calibration device comprising: An acquisition module, configured to acquire calibration data of the spectrometer based on a grating rotation and a preset detector of the spectrometer; A solution module, configured to perform a virtual center solution on a global virtual pixel array corresponding to the preset detector in the calibration data to obtain an incident angle and a virtual pixel center position corresponding to the calibration data; A first building module is configured to build a global physical model for calculating the wavelength of the spectrometer based on the calibration data, the incident angle, and the virtual pixel center position; A second construction module is configured to construct, based on the global physical model, a physical constraint spline model that characterizes a mapping relationship between wavelength and optical parameters corresponding to the calibration data; a conversion module, configured to convert the calibration data into a predicted incident angle based on the physical constraint spline model; A determination module is used to determine a target wavelength corresponding to the calibration data based on the global physical model and the predicted incident angle.

[0005] In a third aspect, a computer program product is provided, which includes: a computer program code, which, when executed on a computer, causes the computer to execute the method in the first aspect.

[0006] In a fourth aspect, a computer-readable storage medium is provided, which stores a computer program code. When the computer program code is run on a computer, the computer executes the method in the first aspect.

[0007] The present invention has the following beneficial effects: based on the grating rotation and preset detector of the spectrometer, the calibration data of the spectrometer is obtained; then, by performing a virtual center solution on the global virtual pixel array corresponding to the preset detector in the calibration data, the incident angle and virtual pixel center position corresponding to the calibration data are obtained; in this way, the actual detector at different grating rotation angles is regarded as a global virtual pixel domain, that is, the sampling points of the discrete detector are converted to a continuous virtual space, breaking through the physical resolution limit of the detector. Then, based on the calibration data, the incident angle and the virtual pixel center position, a global physical model for calculating the wavelength of the spectrometer is constructed; and using the global physical model, a physical constraint spline model is constructed to characterize the mapping relationship between the wavelength and the optical parameters corresponding to the calibration data, making the physical constraint spline model more rigorous; thus, the calibration data is converted into a predicted incident angle through the physical constraint spline model, which can improve the accuracy of the predicted incident angle. Finally, based on the global physical model and the predicted incident angle, the target wavelength corresponding to the calibration data is determined. In this way, by establishing a joint optimization mechanism of optical parameters and mathematical models, high-precision calibration of the spectrometer can be achieved with only a very small number of calibration points while ensuring the physical authenticity of optical laws, thereby improving the stability of the calibration. BRIEF DESCRIPTION OF THE DRAWINGS

[0008] In order to more clearly illustrate the technical solutions and advantages of the embodiments of the present invention or the prior art, the following briefly introduces the drawings required for use in the embodiments or the prior art descriptions. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0009] Figure 1 This is a schematic diagram of the implementation process of a spectrometer wavelength calibration method provided by an embodiment of the present invention; Figure 2 This is another schematic diagram of the implementation process of a spectrometer wavelength calibration method provided by an embodiment of the present invention; Figure 3 This is another schematic diagram of an implementation flow of a spectrometer wavelength calibration method provided by an embodiment of the present invention; Figure 4 is a third-order polynomial fitting error distribution diagram provided by an embodiment of the present invention; Figure 5 is an error distribution diagram of a spectrometer wavelength calibration method provided by an embodiment of the present invention; Figure 6 This is a schematic diagram of the structure of a wavelength calibration device for a spectrometer provided by an embodiment of the present invention; Figure 7 It is a structural diagram of a computer device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0010] To further illustrate the technical means and effectiveness of the present invention in achieving its intended objectives, the following, in conjunction with the accompanying drawings and preferred embodiments, describes in detail a spectrometer wavelength calibration method according to the present invention, including its specific implementation, structure, features, and effectiveness. In the following description, references to different "one embodiment" or "another embodiment" do not necessarily refer to the same embodiment. Furthermore, specific features, structures, or characteristics of one or more embodiments may be combined in any suitable manner.

[0011] In the description of the embodiments of the present invention, unless otherwise specified, " / " means or, for example, A / B can mean A or B: "and / or" in the text is only a description of the association relationship of associated objects, indicating that there can be three relationships, for example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. In addition, in the description of the embodiments of the present invention, "multiple" refers to two or more than two.

[0012] In the following, the terms "first" and "second" are used for descriptive purposes only and should not be understood to imply or suggest relative importance or implicitly indicate the number of technical features indicated. Therefore, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the features.

[0013] Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs.

[0014] In the related technologies, the wavelength calibration method of grating spectrometer based on polynomial fitting is prone to overfitting noise with high-order polynomials, which leads to increased errors in the edge areas of the spectrum and is sensitive to small disturbances in the training data; pure mathematical fitting does not embed the physical parameters of the grating equation, the model coefficients have no physical interpretation, and the extrapolation ability is poor; due to its inherent mathematical defects, the related technologies face significant bottlenecks in wide-band high-precision calibration scenarios.

[0015] Based on this, an embodiment of the present invention provides a spectrometer wavelength calibration method that establishes a coupling framework between the physical nature of gratings and mathematical models. By converting the physical laws of the grating equation into mathematical constraints, the inherent unity of the optical system and the mathematical model is achieved. The actual detector at different grating rotation angles is regarded as a local sampling window in a global virtual pixel domain, and a "virtual detector center (e.g., virtual pixel center position)" is introduced as the reference origin of the global grating equation. Based on a small number of standard light source characteristic peaks, the virtual pixel center position is solved through an optimization algorithm. Further combined with the grating physical equation, a continuous mapping model between the virtual pixel position and the incident angle is constructed using spline interpolation. Ultimately, high-precision wavelength calculation of any pixel in the entire virtual domain is achieved through global physical model inversion. By establishing a joint optimization mechanism for optical parameters and mathematical models, the embodiment of the present invention achieves high-precision calibration over a wide band with only a very small number of calibration points while ensuring the physical authenticity of optical laws. This overcomes the inherent defects of polynomial fitting in related technologies, such as model distortion, error amplification, and edge failure.

[0016] The following is a detailed description of a spectrometer wavelength calibration method provided by the present invention in conjunction with the accompanying drawings. Figure 1 , which shows a schematic diagram of the implementation process of a spectrometer wavelength calibration method provided by an embodiment of the present invention, the method comprising: 101. Acquire calibration data of the spectrometer based on the grating rotation and the preset detector of the spectrometer.

[0017] Here, the preset detector can be a Charge-Coupled Device Detector (CCD) detector. By recording the actual detector pixel points under different grating rotation angles, a mapping relationship between pixel position and wavelength (i.e., an absolute mapping relationship) is established to obtain calibration data. That is, in some possible implementations, the above step 101 can be achieved by Figure 2 The steps shown achieve: 201. Based on the grating rotation of the spectrometer and a preset detector, determine corresponding position offsets, pixel offset values, and wavelength offset values ​​of different characteristic wavelengths on a pixel array of the preset detector.

[0018] To ensure accuracy during spectrometer calibration, high-precision calibration data is first collected. This process utilizes a precision light source with a stable emission spectrum and known wavelength, such as a mercury or argon lamp. The characteristic spectral lines (such as standard wavelengths like 532nm and 785nm) provided by these lamps have internationally recognized accuracy, providing a reliable benchmark for calibration. During the calibration data collection phase, the system records the corresponding positional offsets of different characteristic wavelengths on the detector's pixel array through grating rotation and a CCD detector, simultaneously acquiring both the pixel offset and the corresponding wavelength offset.

[0019] 202 : Convert the corresponding position offset, pixel offset value, and wavelength offset value into a global virtual pixel array and wavelength sequence.

[0020] 203 : Obtain calibration data based on the global virtual pixel array and the wavelength sequence.

[0021] In steps 202 and 203, to establish an absolute mapping between pixel position and wavelength, the corresponding position offsets, pixel offset values, and wavelength offset values ​​are converted into a global absolute pixel position sequence, namely, an extended global virtual pixel array x_data = [p1, p2, ..., pn] and a wavelength sequence y_data = [w0, w1, ..., wn]. The global virtual pixel array and wavelength sequence are then determined as calibration data. This allows for the acquisition of highly accurate calibration data by statistically analyzing the global virtual pixel array and wavelength sequence corresponding to the actual detector at different grating rotation angles.

[0022] 102 , performing a virtual center solution on a global virtual pixel array corresponding to the preset detector in the calibration data to obtain an incident angle and a virtual pixel center position corresponding to the calibration data.

[0023] Here, after obtaining the input parameters from the calibration data, the incident angle and virtual pixel center position corresponding to the calibration data are obtained by initializing the input parameters, optimizing physical constraints, jointly optimizing parameters, and performing output post-processing.

[0024] In some possible implementations, the above step 102 may be implemented by the following steps 121 to 124 (not shown): 121. Acquire input parameters based on the calibration data, where the input parameters include: position information of a global virtual pixel array, a measurement wavelength corresponding to each pixel point, a grating installation angle, a pixel size, a grating constant, and a focal length.

[0025] Here, when the spectrometer wavelength calibration algorithm is started, the input parameters need to be loaded. For example, the pixel coordinate array x_data is the global virtual pixel position information obtained from data acquisition; the measured wavelength (i.e., measured wavelength) array y_data corresponds to the measured value of each pixel; the grating installation angle D is a fixed parameter, indicating the physical installation angle of the grating; the pixel size pixel_size describes the physical size of a single pixel of the detector; the grating constant d is the spacing between the grating lines; and the focal length f represents the focal length of the optical system. After initializing the input parameters, set the initial values ​​and boundary constraints of the variables to be optimized. Angle of incidence Initialized to 0, virtual center p c Initialized to 12363 microns (based on empirical values ​​or pre-calibrated data, representing the estimated position of the center of the optical path). Boundary constraints enforce physical plausibility: the angle of incidence Limited to (-1) to 0 radians (negative angle constraints ensure that the incident direction of the light conforms to the light path geometry and avoids physical violations caused by positive angles); virtual center p c The initialization process also includes the pre-definition of the residual function, which provides a basis for subsequent optimization.

[0026] 122. Construct a residual function that characterizes the difference between the predicted wavelength and the measured wavelength based on the input parameters.

[0027] Here, by inputting parameters, a residual function is constructed to characterize the difference between the predicted wavelength and the measured wavelength, thereby achieving physical constraint optimization. In the physical constraint optimization stage, the focus is on minimizing the wavelength residual using the physical model as a pre-optimization step to provide a stable starting point for parameter joint optimization. The core of the physical constraint optimization stage is to construct a residual function: the residual function is defined as the predicted wavelength and the measured wavelength The predicted wavelength is calculated by the physical model. In the specific calculation, the diffraction angle By pixel coordinate x_data and virtual pixel center position p c Derivation: , which embodies the coordinate transformation chain: pixel positions are first mapped to angles , and then combined with the incident angle and installation angle D to map to wavelength .

[0028] 123. Determine the minimum residual sum of squares of the residual function.

[0029] Here, the optimization goal of the residual function is to minimize the residual sum of squares (that is, the residual sum of squares of all data points is minimized), and the Levenberg-Marquardt algorithm is used to minimize the residual sum of squares. This algorithm handles nonlinear characteristics: since the model involves sin functions (such as sin and , resulting in a highly nonlinear problem. The Levenberg-Marquardt method combines gradient descent with the Gauss-Newton method to iteratively update the parameters by calculating the Jacobian matrix (the partial derivatives of the residual with respect to the parameters). A damping parameter is introduced to dynamically adjust the step size. When the residual varies significantly, damping is increased to prevent oscillation; when approaching the optimum, damping is reduced to accelerate convergence. Physical constraints, such as a negative bound on the angle of incidence, are directly applied to the optimization loop to ensure that the output of each iteration meets the optical path geometry requirements.

[0030] 124. Based on the minimized residual sum of squares, obtain the incident angle and the virtual pixel center position corresponding to the calibration data.

[0031] Here, based on the physical constraint optimization, comprehensive parameter optimization is performed in the parameter joint optimization stage, and the incident angle and the virtual pixel center position are adjusted at the same time to achieve a more accurate optical path center solution. The optimization goal is still to minimize the residual sum of squares, but it is expanded to dual-parameter collaborative optimization. The input is inherited from the previous stage, but the initial parameter value is updated to the output of the physical constraint optimization (or the initial value is retained). , p c0 =12363). Optimize the model to reuse the diffraction angle calculation: , then predict the wavelength , the optimization method is implemented by minimizing the residual sum of squares function. After the optimization is completed, the algorithm outputs the final parameters: ,in is the optimized incident angle, p c is the virtual pixel center. By treating the actual detector at different grating rotation angles as a local sampling window within a global virtual pixel domain and introducing the "virtual detector center" as the reference origin for the basic grating equation, the actual discrete detector sampling points are converted to a continuous virtual space, breaking through the physical resolution limitations of the detector and improving the accuracy of the basic grating equation.

[0032] 103. Construct a global physical model for calculating the wavelength of a spectrometer based on the calibration data, the incident angle, and the virtual pixel center position.

[0033] Here, by determining the grating structure and incident angle of the spectrometer and calculating the diffraction angle, the intrinsic relationship between the wavelength and the incident angle, the diffraction angle and the grating structure is analyzed to construct a global physical model.

[0034] In some possible implementations, the above step 103 may be implemented by the following steps 131 to 135 (not shown): 131. Determine the grating structure and incident angle of the spectrometer in the calibration data.

[0035] Here, according to the calibration data of the spectrometer, the grating structure of the spectrometer is analyzed, and the incident angle in the calibration data is obtained.

[0036] 132. Determine a pixel offset of any pixel point corresponding to the preset detector relative to the center position of the virtual pixel based on the rotation of the grating structure.

[0037] Here, by rotating the grating, the position of the pixel corresponding to the preset detector at any angle of grating rotation can be obtained, and the pixel offset of the pixel position relative to the virtual pixel center position can be calculated.

[0038] 133 , fuse the pixel offset, the incident angle, and a preset reference angle to generate a diffraction angle.

[0039] Here, the preset reference angle can be an initial value of the sum of the incident angle and the diffraction angle, representing the optical path geometry when the grating is in its original position. The final diffraction angle is formed by integrating the pixel offset with other angle parameters (such as the incident angle and the preset reference angle).

[0040] 134. Based on the grating diffraction principle, determine the intrinsic relationship between the wavelength and the incident angle, diffraction angle and grating structure.

[0041] Here, first, the basic grating equation is constructed through the grating structure, incident angle and diffraction angle, as shown in formula (1): (1); Where d is the grating period, Indicates the wavelength is The incident angle of the incident light relative to the grating normal is is the diffraction angle of the light, and n is the diffraction order.

[0042] Secondly, based on the basic grating equation, the CCD detector rotation grating equation is determined; wherein, the CCD detector rotation grating equation characterizes the correlation between the wavelength of any point at the spectrometer slit and the image pixel position of any point on the array detector.

[0043] Finally, based on the CCD detector rotation grating equation, the intrinsic relationship between wavelength and incident angle, diffraction angle and grating structure is determined.

[0044] Here, by analyzing the correlation between the wavelength of any point at the spectrometer slit and the image pixel position of any point on the array detector, the intrinsic relationship between the wavelength and the incident angle, diffraction angle and grating structure can be obtained.

[0045] 135. Construct the global physical model based on the intrinsic relationship between the wavelength and the incident angle, the diffraction angle and the grating structure.

[0046] Here, after obtaining the intrinsic connection between wavelength and incident angle, diffraction angle and grating structure, the intrinsic connection between wavelength and incident angle, diffraction angle and grating structure is expressed in the form of a function, thereby obtaining the functional form of the global physical model, that is, constructing the global physical model.

[0047] The above steps 131 to 135 can be implemented through the following process: The basic grating equation (such as formula (1)) describes the relationship between the grating structure, the incident angle and the angle of diffracted light.

[0048] The calculation equation of the global physical model is shown in formula (2): (2); in, Indicates pixel position The corresponding wavelength, d is the grating period, represents the angle of incidence, is the diffraction angle of the light, D is the sum of the incident angle and the diffraction angle in the initial state (grating installation angle), and n is the diffraction order. represents the pixel position of the i-th pixel, s represents the pixel size, f represents the focal length, Indicates the virtual pixel center position.

[0049] The calculation equation of the global grating physical model is derived from the basic grating equation to derive the CCD detector rotating grating equation, which links the wavelength of the point light source at the spectrometer slit with the image pixel position of that point on the array detector.

[0050] The specific derivation logic is as follows: A rotating grating dynamically adjusts the optical path, while a detector statically captures its position, converting physical deviations into wavelength information. In spectrometer design, a rotating grating is a core mechanism that leverages the diffraction properties of light to measure wavelengths of light in different bands. The entire system relies on a fixed detector. As the grating rotates, the light path changes, causing light of different wavelengths to be precisely projected onto specific pixels on the detector. This process translates physical geometry and optical principles into wavelength calculations. Among some possible implementations: First, the spectrometer's operation begins with light impinging on a grating. A grating is essentially an optical element with uniformly grooved surfaces, and the groove spacing (called the grating period) is a known, fixed value. As the grating rotates, the angle at which light enters the grating (the incident angle) changes, and the angle at which the diffracted light exits the grating (the diffraction angle) also adjusts accordingly. The detector is fixed in position and consists of a series of tiny pixels, each corresponding to a spatial coordinate (i.e., pixel position). The purpose of grating rotation is to focus light of different wavelengths onto different pixels in sequence, allowing wavelength to be inferred from changes in pixel position. The logic for calculating wavelength begins with the analysis of pixel position, as small shifts in the detector directly reflect changes in the angle of the optical path. This process can be achieved by following these steps: The first step is to calculate the angular offset from the pixel offset. The center pixel of the detector's regularly arranged pixels (i.e., the virtual pixel center position) is used as a reference point. When light is projected onto a pixel, the difference in position of that pixel relative to the center pixel, called the pixel offset, is the key input data. The focal length of the optical system plays a central role here, as it determines the proportional relationship between position change and angular change. A longer focal length means that a small movement of the pixel corresponds to a smaller angular change, and vice versa. Using a mathematical function, the system combines the pixel offset with the focal length to calculate the angular offset of the diffracted light. This angular offset is essentially the angular deviation between the actual landing point of the light and the theoretical center, capturing subtle adjustments to the optical path caused by grating rotation. For example, a large pixel offset indicates a significant angular deflection of the light, which typically corresponds to longer or shorter wavelengths.

[0051] In the second step, the angle offset is integrated with other angle parameters to form the final diffraction angle. When the system is initialized, there is a preset reference angle, which is the initial value of the sum of the incident angle and the diffraction angle, representing the optical path geometry when the grating is in its original position. The incident angle is the angle at which the light hits the grating surface, and changes in real time as the grating rotates. During the calculation process, the system combines the initial reference angle, the current incident angle, and the angle offset obtained in the first step. Specifically, the angle offset is added to the initial reference angle, and then the incident angle is subtracted to compensate for the effect of grating rotation. The result of this synthesis is the final diffraction angle, which fully describes the precise direction of the diffracted light leaving the grating. In this way, all geometric factors are taken into account, including the dynamic rotation of the grating and the static position of the detector, thereby providing accurate angle input for subsequent wavelength calculations.

[0052] The third step is to apply the grating diffraction principle to solve the wavelength.

[0053] The fundamental principles of this step are the basic grating equations and the CCD detector rotating grating equations, which describe the intrinsic relationship between wavelength, incident angle, diffraction angle, and grating period. The grating period is a physical property of the groove spacing, which is known and constant. In principle, the wavelength is proportional to the difference between the sine of the incident angle and the sine of the diffraction angle, and inversely proportional to the grating period. The wavelength is calculated using the final diffraction angle obtained in the second step and the current incident angle, thus forming a global physical model.

[0054] 104. Construct a physical constraint spline model based on the global physical model to characterize the mapping relationship between the wavelength and the optical parameters corresponding to the calibration data.

[0055] Here, the mapping relationship between the incident angle and each pixel point is analyzed through the global physical model to realize the mapping of the incident angle to the pixel position of each pixel point, and combined with it, the mapping relationship between the optical parameters corresponding to the wavelength and the calibration data is constructed, thereby strictly constraining the conditions, that is, obtaining a physical constraint spline model.

[0056] In some possible implementations, the above step 104 can be performed by Figure 3 The steps shown achieve: 301 : Determine a mapping relationship between incident angles and pixels in the calibration data based on the global physical model.

[0057] Here, the initial wavelength of the calibration data is calculated using a global physical model, and the corresponding incident angle is calculated using a basic grating equation, thereby analyzing the mapping relationship between the incident angle and the pixel position of each pixel point.

[0058] In some possible implementations, the above step 301 may be implemented by the following steps 311 to 314 (not shown): 311. Determine an initial wavelength of the calibration data based on the global physical model.

[0059] Here, the calibration data is input to the global physical model to output the initial wavelength of the calibration data.

[0060] 312. Calculate the incident angle in the basic grating equation based on the initial wavelength.

[0061] Here, the initial wavelength is input into the basic grating equation, thereby obtaining the output result of the basic grating equation, namely the incident angle.

[0062] 313 : Determine the pixel position of each pixel point in the calibration data.

[0063] Here, the position of the pixel point corresponding to each observation point is obtained in the calibration data, that is, the pixel position of each pixel point is obtained.

[0064] 314 , traverse the pixel positions of the pixel points in the calibration data to generate a mapping table between the incident angle and the pixel position of each pixel point.

[0065] Here, by traversing each observation point in the calibration data, a mapping table between the incident angle and the pixel position of each pixel point can be obtained.

[0066] The above steps 311 to 314 are based on the formula (2) of the global physical model, and the nonlinear equation is numerically solved to achieve the precise mapping of the pixel position to the incident angle. The core process of the virtual pixel center position uses the known wavelength value to reversely solve the incident angle in the grating equation and establish a quantitative relationship model between the pixel and the incident angle. The specific implementation of the virtual pixel center position includes three key links: 1. Equation construction: Based on the grating equation and geometric relationship, the equation formula (2) about the incident angle is established; 2. Numerical solution: The least squares method is used to solve the equation, and the initial guess is the virtual pixel center position of 0 radians; 3. Mapping table generation: Traverse all observation points x_data and generate the pixel position p n to the incident angle Mapping table In this way, by mapping the pixel position and incident angle of each pixel point, a physical constraint spline model can be constructed more accurately.

[0067] 302 : Based on the mapping table, construct a physical constraint spline model that characterizes a mapping relationship between a wavelength and an optical parameter corresponding to the calibration data.

[0068] Here, based on the discrete pixel-incident angle mapping table generated in the incident angle mapping step (i.e., the mapping table between the incident angle and the pixel position of each pixel point), a global continuous pixel-incident angle mapping model (i.e., a physically constrained spline model) is constructed by integrating the physical laws of grating diffraction and cubic spline theory. That is, step 302 can be implemented through the following process: First, based on the mapping relationship, the physical properties of the optical system edge corresponding to the calibration data are simulated. Here, a natural cubic spline is used to initialize the model. Based on the generated discrete mapping table, the boundary condition is set to zero curvature change at the system edge to accurately simulate the physical properties of the optical system edge. The basis function adopts a cubic B-spline structure with a support interval covering five control points, and the reliability of the model is ensured by limiting the extrapolation range.

[0069] Secondly, based on the physical characteristics of the optical system edge, a coupling relationship model between the wavelength gradient, grating constant, diffraction angle, and optical geometric parameters is established. Here, strict constraints are established by using the differential form of the grating equation to establish a coupling relationship model between the wavelength gradient, grating constant, diffraction angle, and optical geometric parameters.

[0070] Finally, a double regularization balance term is embedded in the coupling relationship model to generate the physical constraint spline model.

[0071] The dual regularization balance term includes: minimizing the residual between the predicted and measured wavelengths, and forcing the first-order derivative of the spline to match the dispersion law of the optical system. The dual regularization balance term is embedded in the objective function corresponding to the coupling relationship model: the first term minimizes the residual between the predicted and measured wavelengths, and the second term forces the first-order derivative of the spline to match the dispersion law of the optical system. The optimal regularization coefficient is determined through cross-validation. , effectively balancing the weights of mathematical interpolation and physical constraints. During the optimization phase, an improved Gauss-Newton method is used iteratively: a hybrid technique of analytical derivation and numerical differentiation is used to construct the Jacobian matrix, and the numerical stability of the Hessian matrix is ​​improved by adding the identity matrix. Strict convergence criteria are set, ultimately generating a globally continuous mapping function, which ultimately yields the physically constrained spline model described by this globally continuous mapping function.

[0072] 105. Convert the calibration data into a predicted incident angle based on the physical constraint spline model.

[0073] Here, by obtaining the coordinates of the pixel to be measured and the system parameters corresponding to the calibration data, the measured pixel coordinates are converted into the predicted incident angle based on the physical constraint spline model and the system parameters. The coordinates of the pixel to be measured can be the pixel position of the point to be observed in the calibration data. First, the coordinates of the pixel to be measured and the system parameters (such as the grating constant d, the installation angle D, etc.) are input; then, the coordinates of the pixel to be measured are converted into the incident angle by the physical constraint spline function S(x) representing the physical constraint spline model. .

[0074] 106. Determine a target wavelength corresponding to the calibration data based on the global physical model and the predicted incident angle.

[0075] Here, the incident angle Substitute into the global physical model formula (2), execute the wavelength Then, based on the error distribution map generated by leave-one-out cross-validation, Gaussian process regression is applied to establish the residual correction model. To achieve error compensation and obtain the target wavelength.

[0076] In a specific example, the spectrometer hardware configuration employed includes an 1800 lines / mm grating system, an optical structure with a focal length of f = 510 mm, a pixel size of 15 microns, and a grating mounting angle of D = 25°. The data acquisition method uses a neon lamp as a reference light source to emit characteristic spectral lines, with a reference wavelength of 532 nm. A stepper motor controls the grating's rotation, and a host computer synchronously collects pixel and wavelength offsets, converting them into a global virtual pixel array and wavelength sequence. The dataset contains 25 sets of wavelength-pixel position mapping points, covering the range of 532.0-671.7 nm.

[0077] In the experimental verification and performance comparison, the leave-one-out cross-validation (LOOCV) test method was used. The strategy was to hide the mapping data of one wavelength point each time, use the remaining 24 points to build a spline model to predict the wavelength value of the hidden point, and traverse all 25 data points. The results show that the RMSE of the polynomial fitting algorithm (for example, third-order polynomial fitting) is 0.0577 nm and the MAE is 0.0433 nm (the error distribution of the third-order polynomial fitting is shown in Figure 4 As shown in the figure), the RMSE of the spectrometer wavelength calibration method provided by the embodiment of the present invention is 0.0199 nm (improved by 65.51%) and the MAE is 0.0151 nm (improved by 65.13%) (the error distribution is shown in the figure). Figure 5 The polynomial fitting shows systematic deviation at the edge wavelength, with the maximum error reaching 0.22nm, as shown in Figure 4 As shown, the error distribution of the embodiment of the present invention is uniform across the entire band, as shown in Figure 5 As shown, the maximum error is 0.0472nm, which can effectively suppress edge distortion.

[0078] In an embodiment of the present invention, calibration data for the spectrometer is obtained based on the grating rotation and preset detector of the spectrometer. Subsequently, the incident angle and virtual pixel center position corresponding to the calibration data are obtained by performing a virtual center calculation on the global virtual pixel array corresponding to the preset detector in the calibration data. In this way, the actual detector at different grating rotation angles is regarded as a global virtual pixel domain, which achieves the conversion of the discrete detector sampling points into a continuous virtual space, breaking through the physical resolution limit of the detector. Subsequently, a global physical model for calculating the wavelength of the spectrometer is constructed based on the calibration data, the incident angle, and the virtual pixel center position. The global physical model is then used to construct a physical constraint spline model that characterizes the mapping relationship between the wavelength and the optical parameters corresponding to the calibration data, making the physical constraint spline model more rigorous. Thus, the calibration data is converted into a predicted incident angle using the physical constraint spline model, which can improve the accuracy of the predicted incident angle. Finally, the target wavelength corresponding to the calibration data is determined based on the global physical model and the predicted incident angle. In this way, by establishing a joint optimization mechanism of optical parameters and mathematical models, high-precision calibration of the spectrometer can be achieved with only a very small number of calibration points while ensuring the physical authenticity of optical laws, thereby improving the stability of the calibration.

[0079] The embodiment of the present invention provides a spectrometer wavelength calibration device, please refer to Figure 6 , which shows a schematic structural diagram of a spectrometer wavelength calibration device provided by one embodiment of the present invention, the device 600 includes: An acquisition module 601 is configured to acquire calibration data of the spectrometer based on the grating rotation and the preset detector of the spectrometer; A solving module 602 is configured to perform a virtual center solution on a global virtual pixel array corresponding to the preset detector in the calibration data to obtain an incident angle and a virtual pixel center position corresponding to the calibration data; A first construction module 603 is configured to construct a global physical model for calculating the wavelength of the spectrometer based on the calibration data, the incident angle, and the virtual pixel center position; A second construction module 604 is configured to construct a physical constraint spline model that characterizes a mapping relationship between wavelength and optical parameters corresponding to the calibration data based on the global physical model; A conversion module 605 is configured to convert the calibration data into a predicted incident angle based on the physical constraint spline model; The determination module 606 is configured to determine a target wavelength corresponding to the calibration data based on the global physical model and the predicted incident angle.

[0080] In some possible implementations, the acquisition module is further used to determine the corresponding position offsets, pixel offset values, and wavelength offset values ​​of different characteristic wavelengths on the pixel array of the preset detector based on the grating rotation and preset detector of the spectrometer; convert the corresponding position offsets, pixel offset values, and wavelength offset values ​​into a global virtual pixel array and wavelength sequence; and obtain the calibration data based on the global virtual pixel array and wavelength sequence.

[0081] In some possible implementations, the first construction module is further used to determine the grating structure and incident angle of the spectrometer in the calibration data; determine the pixel offset of any pixel point corresponding to the preset detector relative to the center position of the virtual pixel based on the rotation of the grating structure; fuse the pixel offset, the incident angle and the preset reference angle to generate a diffraction angle; based on the grating diffraction principle, determine the intrinsic relationship between the wavelength and the incident angle, diffraction angle and grating structure; and construct the global physical model based on the intrinsic relationship between the wavelength and the incident angle, diffraction angle and grating structure.

[0082] In some possible implementations, the first building module is further configured to construct a basic grating equation based on the grating structure, the incident angle, and the diffraction angle; Based on the basic grating equation, the correlation between the wavelength of any point at the spectrometer slit and the pixel position of any point on the preset detector is determined; based on the correlation, the intrinsic connection between the wavelength and the incident angle, diffraction angle and grating structure is determined.

[0083] In some possible implementations, the second construction module is further used to determine a mapping table between incident angles and pixel points in the calibration data based on the global physical model; and based on the mapping table, construct a physical constraint spline model that characterizes the mapping relationship between wavelength and optical parameters corresponding to the calibration data.

[0084] In some possible implementations, the second construction module is further used to determine the initial wavelength of the calibration data based on the global physical model; calculate the incident angle in the basic grating equation based on the initial wavelength; determine the pixel position of each pixel point in the calibration data; and traverse the pixel positions of the pixel points in the calibration data to generate a mapping table between the incident angle and the pixel position of each pixel point.

[0085] In some possible implementations, the second construction module is further used to simulate the edge physical characteristics of the optical system corresponding to the calibration data based on the mapping table; establish a coupling relationship model of wavelength gradient, grating constant, diffraction angle and optical geometric parameters based on the edge physical characteristics of the optical system; embed a double regularization balance term in the coupling relationship model to generate the physical constraint spline model; wherein the double regularization balance term includes: maintaining the minimization of the residual between the predicted wavelength and the measured wavelength, and forcing the first-order derivative of the spline to match the dispersion law of the optical system.

[0086] In some possible implementations, the solution module is further used to obtain input parameters based on the calibration data, where the input parameters include: position information of the global virtual pixel array, the measurement wavelength corresponding to each pixel point, the grating installation angle, the pixel size, the grating constant and the focal length; based on the input parameters, construct a residual function that characterizes the difference between the predicted wavelength and the measured wavelength; determine the minimized residual sum of squares of the residual function; and based on the minimized residual sum of squares, obtain the incident angle and virtual pixel center position corresponding to the calibration data.

[0087] In some possible implementations, the conversion module is further configured to obtain the measured pixel coordinates and system parameters corresponding to the calibration data; and convert the measured pixel coordinates into the predicted incident angle based on the physical constraint spline model and the system parameters.

[0088] Optionally, the transmission medium may be a wired link (such as, but not limited to, coaxial cable, optical fiber, and digital subscriber line (DSL)) or a wireless link (such as, but not limited to, wireless Fidelity (WIFI), Bluetooth, and mobile device network). It should be noted that the apparatus provided in the above embodiment is only illustrated by the division of the above functional modules. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the computer device can be divided into different functional modules to complete all or part of the functions described above. In addition, the method embodiments provided in the above embodiment belong to the same concept. The specific implementation process is detailed in the method embodiment and will not be repeated here.

[0089] Figure 7 Schematic diagram of the structure of a computer device provided by an embodiment of the present invention. Figure 7As shown, the computer device 700 includes: a memory 701, a processor 702, and a computer program 703 stored in the memory 701 and running on the processor 702, wherein when the processor 702 executes the computer program 703, the computer device can execute any one of the spectrometer wavelength calibration methods described above.

[0090] In addition, an embodiment of the present invention also protects a system, which may include a memory and a processor, wherein an executable program code is stored in the memory, and the processor is used to call and execute the executable program code to perform a spectrometer wavelength calibration method provided by an embodiment of the present invention. This embodiment can divide the system into functional modules according to the above method example. For example, it can correspond to each functional module, or two or more functions can be integrated into one processing module, and the above integrated module can be implemented in the form of hardware. It should be noted that the division of modules in this embodiment is schematic, which is only a logical function division, and there may be other division methods in actual implementation. It should be noted that all relevant contents of each step involved in the above method embodiment can be referred to the functional description of the corresponding functional module, and will not be repeated here.

[0091] It should be understood that the device provided in this embodiment is used to perform the above-mentioned method for calibrating the wavelength of a spectrometer, and therefore can achieve the same effect as the above-mentioned implementation method. In the case of an integrated unit, the device may include a processing module and a storage module. Specifically, when the device is applied to a device, the processing module can be used to control and manage the actions of the device. The storage module can be used to support the device in executing mutual program codes, etc. Specifically, the processing module can be a processor or a controller, which can implement or execute various exemplary logic blocks, modules and circuits described in conjunction with the disclosure of the present invention. The processor can also be a combination that implements computing functions, such as a combination of one or more microprocessors, a combination of digital signal processing (DSP) and a microprocessor, etc., and the storage module can be a memory.

[0092] In addition, the apparatus provided in the embodiments of the present invention may be specifically a chip, component, or module. The chip may include a connected processor and memory; the memory is used to store instructions. When the processor calls and executes the instructions, the chip can execute the spectrometer wavelength calibration method provided in the above embodiment. This embodiment also provides a computer-readable storage medium storing computer program code. When the computer program code is executed on a computer, the computer executes the above-mentioned method steps to implement the spectrometer wavelength calibration method provided in the above embodiment.

[0093] This embodiment also provides a computer program product, which, when executed on a computer, causes the computer to execute the above-mentioned steps to implement a spectrometer wavelength calibration method provided in the above embodiment. The device, computer-readable storage medium, computer program product, or chip provided in this embodiment are all used to execute the corresponding method provided above. Therefore, the beneficial effects that can be achieved can refer to the beneficial effects of the corresponding method provided above, and will not be repeated here. Through the description of the above embodiments, those skilled in the art will understand that, for the convenience and simplicity of description, only the division of the above-mentioned functional modules is used as an example. In actual application, the above-mentioned functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above. In the embodiments provided by the present invention, it should be understood that the disclosed device and method can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the division of modules or units is only a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another device, or some features can be ignored or not executed. On the other hand, the mutual coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection through some interface, device or unit, which may be electrical, mechanical or other forms.

[0094] It should be noted that the above-mentioned order of the embodiments of the present invention is for description only and does not represent the advantages and disadvantages of the embodiments. The processes depicted in the accompanying drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multi-task processing and parallel processing are also possible or may be advantageous. The various embodiments in this specification are described in a progressive manner, and the same or similar parts between the various embodiments can be referenced to each other. Each embodiment focuses on the differences from other embodiments. The above content is only a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any technician familiar with the technical field can easily think of changes or replacements within the technical scope disclosed by the present invention, which should be covered within the scope of protection of the present invention.

Claims

1. A spectrometer wavelength calibration method, characterized in that: The spectrometer wavelength calibration method comprises: Obtaining calibration data of the spectrometer based on a grating rotation and a preset detector of the spectrometer; Performing a virtual center solution on a global virtual pixel array corresponding to the preset detector in the calibration data to obtain an incident angle and a virtual pixel center position corresponding to the calibration data; Constructing a global physical model for calculating the wavelength of the spectrometer based on the calibration data, the incident angle, and the virtual pixel center position; Based on the global physical model, constructing a physical constraint spline model that characterizes the mapping relationship between wavelength and optical parameters corresponding to the calibration data; converting the calibration data into a predicted incident angle based on the physical constraint spline model; Based on the global physical model and the predicted incident angle, a target wavelength corresponding to the calibration data is determined.

2. A spectrometer wavelength calibration method according to claim 1, characterized in that: The step of obtaining calibration data of the spectrometer based on the grating rotation and the preset detector of the spectrometer includes: Based on the grating rotation of the spectrometer and the preset detector, determining corresponding position offsets, pixel offset values, and wavelength offset values ​​of different characteristic wavelengths on the pixel array of the preset detector; Converting the corresponding position offsets, pixel offset values, and wavelength offset values ​​into a global virtual pixel array and wavelength sequence; The calibration data is obtained based on the global virtual pixel array and the wavelength sequence.

3. A spectrometer wavelength calibration method according to claim 1, characterized in that: The method of constructing a global physical model for calculating the wavelength of a spectrometer based on the calibration data, the incident angle, and the virtual pixel center position includes: In the calibration data, determining the grating structure and incident angle of the spectrometer; Determining a pixel offset of any pixel point corresponding to the preset detector relative to the center position of the virtual pixel based on the rotation of the grating structure; fusing the pixel offset, the incident angle, and a preset reference angle to generate a diffraction angle; Based on the grating diffraction principle, determining the intrinsic relationship between the wavelength and the incident angle, diffraction angle and grating structure; The global physical model is constructed based on the intrinsic relationship between the wavelength and the incident angle, the diffraction angle and the grating structure.

4. A spectrometer wavelength calibration method according to claim 3, characterized in that: The determination of the intrinsic relationship between the wavelength and the incident angle, the diffraction angle, and the grating structure based on the grating diffraction principle includes: Constructing a basic grating equation based on the grating structure, incident angle, and diffraction angle; Based on the basic grating equation, determining the correlation between the wavelength of any point at the slit of the spectrometer and the pixel position of any point on the preset detector; Based on the correlation, the intrinsic relationship between the wavelength and the incident angle, the diffraction angle and the grating structure is determined.

5. A spectrometer wavelength calibration method according to claim 1, characterized in that: The constructing of a physical constraint spline model based on the global physical model to characterize the mapping relationship between the wavelength and the optical parameters corresponding to the calibration data includes: Determining a mapping table between incident angles and pixel points in the calibration data based on the global physical model; Based on the mapping table, a physical constraint spline model is constructed to characterize the mapping relationship between the wavelength and the optical parameters corresponding to the calibration data.

6. A spectrometer wavelength calibration method according to claim 5, characterized in that: Determining a mapping table between incident angles and pixel points in the calibration data based on the global physical model includes: determining an initial wavelength of the calibration data based on the global physical model; Calculating the incident angle in the basic grating equation based on the initial wavelength; Determining the pixel position of each pixel point in the calibration data; The pixel positions of the pixel points in the calibration data are traversed to generate a mapping table between the incident angle and the pixel position of each pixel point.

7. A spectrometer wavelength calibration method according to claim 5, characterized in that: The constructing, based on the mapping table, a physical constraint spline model that characterizes a mapping relationship between wavelength and optical parameters corresponding to the calibration data includes: Based on the mapping table, simulating the edge physical characteristics of the optical system corresponding to the calibration data; Based on the physical characteristics of the edge of the optical system, a coupling relationship model of wavelength gradient, grating constant, diffraction angle and optical geometric parameters is established; In the coupling relationship model, a double regularization balance term is embedded to generate the physical constraint spline model; wherein, the double regularization balance term includes: maintaining the minimization of the residual between the predicted wavelength and the measured wavelength, and forcing the first-order derivative of the spline to match the dispersion law of the optical system.

8. A spectrometer wavelength calibration method according to claim 1, characterized in that: The performing virtual center solving on the global virtual pixel array corresponding to the preset detector in the calibration data to obtain the incident angle and the virtual pixel center position corresponding to the calibration data includes: Based on the calibration data, input parameters are obtained, wherein the input parameters include: position information of a global virtual pixel array, a measurement wavelength corresponding to each pixel point, a grating installation angle, a pixel size, a grating constant, and a focal length; Based on the input parameters, constructing a residual function that characterizes the difference between the predicted wavelength and the measured wavelength; Determining the residual function that minimizes the residual sum of squares; Based on the minimization of the residual square sum, the incident angle and the virtual pixel center position corresponding to the calibration data are obtained.

9. A spectrometer wavelength calibration method according to claim 1, characterized in that: The converting the calibration data into a predicted incident angle based on the physical constraint spline model comprises: Obtaining the coordinates of the pixels to be measured and the system parameters corresponding to the calibration data; The measured pixel coordinates are converted into the predicted incident angle based on the physical constraint spline model and the system parameters.

10. A spectrometer wavelength calibration device, characterized in that: The spectrometer wavelength calibration device comprises: An acquisition module, configured to acquire calibration data of the spectrometer based on a grating rotation and a preset detector of the spectrometer; A solution module, configured to perform a virtual center solution on a global virtual pixel array corresponding to the preset detector in the calibration data to obtain an incident angle and a virtual pixel center position corresponding to the calibration data; A first building module is configured to build a global physical model for calculating the wavelength of the spectrometer based on the calibration data, the incident angle, and the virtual pixel center position; A second construction module is configured to construct, based on the global physical model, a physical constraint spline model that characterizes a mapping relationship between wavelength and optical parameters corresponding to the calibration data; a conversion module, configured to convert the calibration data into a predicted incident angle based on the physical constraint spline model; A determination module is used to determine a target wavelength corresponding to the calibration data based on the global physical model and the predicted incident angle.

Citation Information

Patent Citations

  • High-sensitivity high-resolution full-spectrum optical system

    CN115931129A

  • Camera calibration method and device, equipment and storage medium

    CN118982585A

  • Spectral measurement method of two-dimensional spectrometer

    CN119935310A

Cited By

  • Multi-source disturbance self-calibration method and system for rotary filtering type monochromator

    CN122016255A