Automatic spectrograph debugging device and method

By using automated spectrometer calibration devices and methods, high-precision calibration of spectrometer wavelength accuracy and spectral resolution has been achieved, solving the problems of long calibration time, high cost and poor consistency of traditional spectrometers, and improving production efficiency and product quality.

CN121762029APending Publication Date: 2026-03-31HANGZHOU BOQING ENVIRONMENTAL PROTECTION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-23
Publication Date
2026-03-31

AI Technical Summary

Technical Problem

Traditional spectrometer calibration relies on manual operation, which is time-consuming, costly, and inconsistent. It also lacks automatic recording and analysis capabilities, affecting production efficiency and product quality.

Method used

An automated spectrometer calibration device is adopted, including a standard light source module, a grating adjustment mechanism and a control module. Through multi-point calibration and closed-loop control, the wavelength accuracy and spectral resolution are automatically calibrated. Combined with interpolation algorithms and step-by-step fine-tuning, fully digital recording and parameter optimization are achieved.

Benefits of technology

It significantly shortens the spectrometer debugging time, improves production efficiency and product consistency, reduces human error, and ensures the accuracy and traceability of spectrometer performance indicators.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121762029A_ABST
    Figure CN121762029A_ABST
Patent Text Reader

Abstract

The invention provides an automatic spectrograph debugging device and method, and the device comprises a standard light source module which is used for providing a reference light signal with a known characteristic spectral line for a to-be-debugged spectrograph; the grating adjusting mechanism comprises an electric rotary displacement table and a linear displacement table, the electric rotary displacement table is used for driving a grating in the spectrometer to rotate around a shaft so as to adjust wavelength accuracy, and the linear displacement table is used for translating the grating in the light path direction so as to adjust spectral resolution; the spectrum acquisition module is used for acquiring spectrum data processed by the spectrograph in real time; a reference spectrum is excited through a multi-spectral-line standard light source, the peak position and the full width at half maximum are accurately extracted by adopting spline interpolation, an electric rotary displacement table and a linear displacement table are driven to perform two-dimensional closed-loop adjustment on a grating, and the wavelength-pixel non-linear mapping correction and convergence criterion are combined, so that the resolution of the grating is improved. And full-automatic high-precision calibration of wavelength accuracy and spectral resolution is realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of spectrometer technology, specifically to an automated spectrometer debugging device and method. Background Technology

[0002] In recent years, spectral analysis technology has made significant progress in many fields, providing important detection methods for applications such as materials science, biomedicine, and environmental monitoring. As a core device in the field of optical analysis, the wavelength accuracy and spectral resolution of a spectrometer are key indicators that determine the instrument's performance. The calibration process of traditional spectrometers mainly relies on manual operation, achieving wavelength calibration and resolution optimization by manually adjusting the grating angle and position.

[0003] However, this approach has several limitations: the debugging of a single device typically takes 15 to 30 minutes, which restricts the efficiency of large-scale production; at the same time, it is highly dependent on experienced technicians, and the training cycle for personnel is as long as six months to a year, resulting in high labor costs; in addition, manual intervention is prone to introducing operational differences and random errors, affecting product consistency; in terms of data management, existing methods generally lack the ability to automatically record and analyze the parameters of the debugging process, which is not conducive to quality traceability and process improvement.

[0004] In conclusion, how to improve the automation level and consistency of spectrometer debugging while ensuring debugging accuracy is a technical problem that urgently needs to be solved. Summary of the Invention

[0005] In view of this, the purpose of this invention is to provide an automated spectrometer calibration device and method, which can complete high-precision calibration of spectrometer wavelength accuracy and spectral resolution without relying on manual intervention, and realize fully digital recording and parameter optimization of the calibration process. The specific technical solution is as follows:

[0006] In a first aspect, embodiments of this specification provide an automated spectrometer debugging device, comprising: a standard light source module for providing a reference light signal with known characteristic spectral lines to the spectrometer to be debugged;

[0007] The grating adjustment mechanism includes an electric rotary stage and a linear stage. The electric rotary stage is used to drive the internal grating of the spectrometer to rotate around an axis to adjust the wavelength accuracy, and the linear stage is used to translate the grating along the optical path to adjust the spectral resolution.

[0008] The spectral acquisition module is used to acquire spectral data processed by the spectrometer in real time;

[0009] The control module is connected to the standard light source module, the grating adjustment mechanism, and the spectrum acquisition module.

[0010] Furthermore, the control module is configured to perform the following steps:

[0011] Based on the spectral data, the actual peak position of the feature spectral line is determined by spline interpolation algorithm and compared with the preset standard peak pixel position. If the absolute value of the deviation is greater than the set threshold, the electric rotary displacement stage is controlled to adjust the grating angle according to the pre-calibrated rotation angle-pixel displacement relationship until the wavelength accuracy meets the requirements.

[0012] After the wavelength accuracy meets the standard, the full width at half maximum (FWHM) is calculated based on the same characteristic spectral line using an interpolation algorithm. If the FWHM is not less than the target value, the linear displacement stage is controlled to advance the grating forward to reduce the FWHM until the spectral resolution meets the requirements.

[0013] Furthermore, the standard light source module includes at least two characteristic spectral line light sources of different wavelengths to cover the working band of the spectrometer to be debugged and supports multi-point wavelength calibration. During the wavelength accuracy adjustment process, the control module fits the wavelength pixel mapping relationship based on the peak positions of multiple characteristic spectral lines to achieve full-band linear or nonlinear correction.

[0014] Furthermore, the spectral acquisition module includes a high-sensitivity detector and an analog-to-digital conversion circuit connected to the output of the spectrometer to be debugged, which is used to convert the analog spectral signal output by the spectrometer into a digital signal and transmit it to the control module.

[0015] Furthermore, the control module is also equipped with an automatic gain adjustment unit, which is used to dynamically adjust the detector gain or integration time according to the intensity of the reference optical signal to ensure that the spectral data is acquired and analyzed within the optimal signal-to-noise ratio range.

[0016] Secondly, this specification provides an automated spectrometer debugging method, including: step S1, connecting a standard light source module to the spectrometer to be debugged, so that it outputs a reference light signal with known characteristic spectral lines;

[0017] Step S2: Obtain the initial spectral data output by the spectrometer through the spectral acquisition module;

[0018] Step S3: Based on the spectral data, the actual peak pixel position of the target feature spectral line is determined by an interpolation algorithm and compared with the preset standard peak pixel position. If the absolute value of the deviation between the two is greater than the first threshold, the electric rotary displacement stage is controlled to drive the grating to rotate according to the pre-calibrated correspondence between the grating rotation angle and the pixel displacement in order to adjust the wavelength accuracy. This step is repeated until the wavelength accuracy requirement is met.

[0019] Step S4: After the wavelength accuracy meets the standard, the full width at half maximum (FWHM) is calculated using an interpolation algorithm based on the same characteristic spectral line. If the FWHM is not less than the second threshold, the linear displacement stage is controlled to advance the grating along the optical path to reduce the FWHM, thereby improving the spectral resolution. This step is repeated until the spectral resolution requirement is met.

[0020] Step S5: After completing the spectral resolution adjustment, re-execute step S3 to check the wavelength accuracy. If it exceeds the first threshold again, return to step S3 and step S4 for alternating iterative correction until the wavelength accuracy and spectral resolution simultaneously meet the preset accuracy index.

[0021] Furthermore, in step S2, the control module automatically configures the detector gain or integration time of the spectral acquisition module according to the intensity of the reference optical signal, so that the peak value of the acquired spectral data is within the preset range of the dynamic range of the analog-to-digital converter.

[0022] Furthermore, in step S3, multi-point calibration is performed using at least two feature spectral lines of different wavelengths. The control module fits and establishes a wavelength pixel mapping function for the entire band based on the actual peak pixel position of each feature spectral line and the corresponding standard wavelength, and performs linear or nonlinear correction on the wavelength axis of the spectrometer according to the mapping function.

[0023] Furthermore, in step S4, the linear displacement stage adopts a step-by-step fine-tuning strategy, with each step displacement not exceeding a preset multiple of the grating depth of focus, and spectral data is reacquired and the full width at half maximum (FWHM) is calculated after each step.

[0024] Furthermore, during the iterative correction process in step S5, if the adjustment amounts of wavelength accuracy and spectral resolution are both less than their respective convergence thresholds in two consecutive steps, the system is determined to have reached a stable state, the iteration is terminated, and the final debugging parameters are output, including the rotation angle of the grating, the axial displacement position, and the corresponding wavelength pixel calibration mapping relationship.

[0025] The beneficial effects of the technical solutions provided in some embodiments of this specification include at least the following:

[0026] This specification provides an automated spectrometer calibration device and method in several embodiments. By integrating a standard light source module, a grating adjustment mechanism, a spectral acquisition module, and a control module into an integrated calibration system, a complete closed-loop calibration process is constructed. During calibration, a multi-spectral-line standard light source is first used to excite the spectrometer under calibration to generate a reference spectrum. Then, the peak positions and full width at half maximum (FWHM) of the spectral lines are precisely extracted through interpolation. This is then used to drive an electric rotary stage and a linear stage to perform two-dimensional precision adjustment of the grating. The adjustment process adopts a sequential strategy prioritizing wavelength accuracy over resolution, and wavelength shifts are verified after resolution adjustment, forming an alternating iterative mechanism. Furthermore, the system introduces multi-point wavelength calibration and nonlinear mapping function fitting, solving the problem of the linear assumption failing in traditional single-point calibration over a wide wavelength range. Over-adjustment and oscillation are avoided through step-by-step fine-tuning and convergence criterion design. Automatic gain configuration and synchronous control of data acquisition ensure consistent signal quality. Therefore, this invention significantly reduces the debugging time of a single spectrometer from 15 to 30 minutes without human intervention, while automatically recording and solidifying all debugging parameters, thus significantly improving production efficiency, product consistency and process traceability.

[0027] Other features and advantages of various embodiments of this specification will be further revealed in the following detailed description and accompanying drawings. Attached Figure Description

[0028] To more clearly illustrate the technical solutions in the embodiments of this specification, the accompanying drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this specification. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0029] Figure 1 This is a schematic diagram of an automated spectrometer debugging device provided as an embodiment of this specification.

[0030] Figure 2 This is a schematic diagram of an automated spectrometer debugging method provided in the embodiments of this specification.

[0031] Figure 3 This is a flowchart illustrating the adjustment of wavelength accuracy in an automated spectrometer debugging method provided in this specification.

[0032] Figure 4 This is a flowchart illustrating an automated spectrometer debugging method for improving spectral resolution, as provided in an embodiment of this specification.

[0033] Figure 5 A schematic diagram of an electronic device provided in an embodiment of this specification.

[0034] Explanation of reference numerals in the attached diagram: 1. Spectrometer base; 2. Slit module; 3. Spectrum acquisition module; 4. Grating module; 5. Motorized rotary stage; 6. First connecting rod; 7. Linear stage; 8. Second connecting rod; 9. Control module. Detailed Implementation

[0035] 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.

[0036] The terms "first," "second," "third," etc., in the description, claims, and accompanying drawings are used to distinguish different objects, not to describe a specific order. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or apparatus that includes a series of steps or units is not limited to the listed steps or units, but may optionally include steps or units not listed, or may optionally include other steps or units inherent to such processes, methods, products, or apparatus.

[0037] In the following description, terms such as “inner,” “outer,” “upper,” “lower,” “left,” and “right” are used only to facilitate the description of the embodiments and to simplify the description, and are not intended to 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 this specification.

[0038] This embodiment first provides an automated spectrometer debugging device; please refer to the appendix. Figure 1 The device includes a standard light source module, a grating adjustment mechanism, a spectral acquisition module 3, and a control module 9. The standard light source module provides a reference light signal with known characteristic spectral lines to the spectrometer under test. The grating adjustment mechanism includes an electrically driven rotary stage 5 and a linear stage 7, used to adjust the rotation angle and axial position of the grating, respectively. The spectral acquisition module 3 is connected to the output port of the spectrometer under test and is used to acquire the spectral data processed by the spectrometer in real time. The control module 9 is connected to each of the above modules through electrical interfaces and is used to coordinate operation and execute closed-loop correction algorithms. The modules work together to achieve automated debugging of the spectrometer.

[0039] A standard light source module is used to provide a reference light signal with known characteristic spectral lines to the spectrometer under test, serving as a benchmark for wavelength calibration and resolution adjustment. The standard light source module is optically coupled to the entrance slit of the spectrometer under test via an optical fiber or spatial optical path. This module includes one or more standard reference light sources, which can emit at least two different wavelengths of characteristic spectral lines to cover the main operating band of the spectrometer. In a preferred embodiment, the standard reference light source is a low-pressure mercury lamp. Mercury lamps emit a series of characteristic spectral lines in the visible and near-ultraviolet bands, including but not limited to: 404.66 nm (violet), 435.83 nm (blue), 546.07 nm (green), and 579.07 nm (yellow).

[0040] During automated debugging, the control module 9 first controls the standard light source module to operate. The spectrometer acquires the spectral signal of the mercury lamp and transmits it to the control module 9. Algorithms within the control module 9, such as cubic spline interpolation algorithms, sequentially or in the same spectral image, identify the measured pixel positions and their full width at half maximum (FWHM) of the aforementioned multiple characteristic spectral lines.

[0041] During wavelength accuracy calibration, control module 9 no longer relies solely on a single spectral line, but instead performs calibration procedures on multiple characteristic spectral lines separately to obtain their respective actual pixel positions. Subsequently, control module 9 uses the known standard wavelength values ​​of these characteristic spectral lines as the X-axis and the measured pixel positions as the Y-axis, employing the least squares method for linear or quadratic polynomial fitting to establish a pixel-wavelength mapping function across the entire working band. Afterward, control module 9 can evaluate the spectrometer's nonlinear error across the entire band based on this mapping function and perform overall correction. This multi-point calibration method effectively eliminates the influence of optical system distortion, ensuring the consistency of wavelength accuracy across the entire band, with calibration accuracy and reliability significantly superior to single-point calibration. By utilizing multiple characteristic spectral lines for calibration, this embodiment achieves multi-point wavelength fitting. Control module 9 can calculate the average wavelength deviation or fitting curve across the entire working band, thereby driving the rotary displacement stage to adjust the grating angle. This method overcomes the problem that single-spectral-line calibration may only be accurate at local wavelength points, significantly improving the consistency of wavelength accuracy and the reliability of calibration across the entire working band.

[0042] In some embodiments, the standard light source module may also be composed of multiple different types of monochromatic light sources, such as helium-neon lasers, sodium lamps, etc., or a tunable laser may be used, as long as it can provide two or more stable characteristic spectral lines of known wavelengths.

[0043] During the wavelength accuracy adjustment process, the control module 9 fits the wavelength pixel mapping relationship based on the peak positions of multiple characteristic spectral lines to achieve full-band linear or nonlinear correction.

[0044] The core actuator in this embodiment is a grating adjustment mechanism. By receiving commands from the control module 9, it performs high-precision micro-adjustments on the grating, the core spectroscopic element inside the spectrometer, to calibrate wavelength accuracy and spectral resolution respectively. The grating adjustment mechanism includes an electrically driven rotary stage 5 and a linear stage 7. The electrically driven rotary stage 5 is used to adjust the angular displacement of the grating around its central rotation axis to calibrate wavelength accuracy.

[0045] The electrically driven rotary stage 5 is fixedly connected to the rotation axis of the grating via the first connecting rod 6. It drives the grating to rotate precisely around its central axis, thereby changing the light diffraction angle and adjusting the wavelength accuracy of the spectrometer. When the control module 9 drives the electrically driven rotary stage 5 to rotate clockwise, it drives the grating to rotate in the same direction via the first connecting rod 6, causing the characteristic spectral lines collected by the spectrometer to shift to the right; conversely, counterclockwise rotation causes the spectral lines to shift to the left. The control module 9 can accurately calculate the required rotation angle based on the pixel deviation calculated by the algorithm and drive the stage to perform the corresponding action until the spectral lines are positioned within ±3 pixels of the preset standard pixel position. By precisely controlling the rotation angle, the characteristic spectral lines can be accurately positioned at the preset standard pixel position.

[0046] The linear displacement stage 7 is used to adjust the linear displacement of the grating along a specific direction to calibrate the spectral resolution. This stage 7 is connected to the side of the grating via a second connecting rod 8. Its sliding direction is strictly set along the propagation direction of the optical path inside the spectrometer being adjusted. It is used to translate the grating along the optical path, thereby changing the focusing state of the optical path and adjusting the spectral resolution. The initial position of the grating is set at the end of its travel, defined as starting point 0. Pushing the grating slightly along the optical path via the second connecting rod 8 will reduce the full width at half maximum (FWHM) of the characteristic spectral lines, thus improving the spectral resolution. Therefore, the grating can be adjusted in two independent degrees of freedom: its rotational motion around the axis is controlled by the electrically driven rotary displacement stage 5, directly affecting wavelength calibration; its translational motion along the optical axis is controlled by the linear displacement stage 7, directly affecting the resolution.

[0047] The spectral acquisition module 3 is used to acquire spectral data processed by the spectrometer in real time. In this embodiment, the spectral acquisition module 3 includes a high-sensitivity detector connected to the output of the spectrometer under test and a subsequent analog-to-digital conversion circuit. The detector converts the optical signal into an analog electrical signal, and the analog-to-digital conversion circuit converts it into a digital signal, which is then transmitted to the control module 9 via a data bus. The high-sensitivity detector ensures a good signal-to-noise ratio even under low-light conditions, while the high-precision design of the analog-to-digital conversion circuit guarantees accurate conversion and reliable transmission of spectral data.

[0048] The control module 9, acting as the brain of the entire device, is typically implemented using an industrial computer, embedded processor, or PLC. It connects to the standard light source module, grating adjustment mechanism, and spectrum acquisition module 3 via cables. It receives data from the spectrum acquisition module 3, runs the core control algorithm, and issues precise commands to the standard light source module, the electric rotary stage 5, and the linear stage 7, forming a closed-loop control system. It is responsible for the automated control and data processing of the entire commissioning process. The control module 9 uses an embedded processor based on the ARM Cortex-M7 core, with 512 KB of SRAM and 2 MB of Flash memory. Its non-volatile memory pre-stores a database of standard light source characteristic spectral lines, containing the standard wavelength values ​​of four spectral lines and their corresponding ideal peak pixel positions; it also stores a grating angle-pixel mapping calibration table, obtained through extensive calibration experiments on samples of the same model of spectrometer, recording the pixel offset of each characteristic spectral line on the detector under different grating rotation angles. The control module 9 communicates with the electric rotary stage 5 via an RS485 bus, sending rotation angle commands and receiving current position feedback; it connects to the stepper motor driver of the linear stage 7 via a TTL level pulse signal to control its forward or backward step count; and it connects to the spectral acquisition module 3 via a USB 2.0 interface to trigger data acquisition and read raw spectral data.

[0049] The control module performs the following steps to complete the spectrometer commissioning:

[0050] First, based on the spectral data containing wavelength and intensity acquired by the spectral acquisition module, the control module performs high-precision fitting on the data of the peak region of the selected characteristic spectral line (such as the 546.07nm spectral line of a mercury lamp) using an interpolation algorithm, determining the actual peak pixel position X of the characteristic spectral line at the sub-pixel level. In this embodiment, the interpolation algorithm uses cubic spline interpolation. Then, X is compared with the preset standard peak pixel position N, and the absolute value of the deviation |d|=|XN| is calculated. If the absolute value of the deviation d is less than or equal to a set threshold, such as 3 pixels, the wavelength accuracy is considered to initially meet the requirements, and the process proceeds to the next step. Otherwise, the control module controls the electric rotary stage to adjust the grating angle according to the pre-calibrated and stored rotation angle-pixel displacement relationship. During this process, the control module calculates the required rotation angle based on the calibration relationship, such as the change of X pixels corresponding to a 1-degree rotation, where the angle Δθ=d / X, and the rotation direction is determined by d; if d is positive, it rotates counterclockwise, and if d is negative, it rotates clockwise. Next, the control module controls the electric rotary stage to perform the corresponding rotation action. This adjustment process will be repeated to form a negative feedback loop for wavelength accuracy until the wavelength accuracy meets the requirements, that is, the absolute value of the deviation between the actual peak position of the characteristic spectral line and the preset standard position is not greater than the set threshold.

[0051] During wavelength accuracy adjustment, to further improve wavelength linearity across the entire wavelength band, the control module fits the wavelength-pixel mapping relationship based on the peak positions of multiple characteristic spectral lines to achieve linear or nonlinear correction across the entire wavelength band. This multi-point calibration method can effectively eliminate nonlinear errors that may exist in different wavelength regions of the spectrometer, ensuring that the wavelength accuracy meets the requirements throughout the entire operating band.

[0052] After wavelength accuracy meets the standard, the control module recalculates the full width at half maximum (FWHM) H of the same characteristic spectral line in the current spectral data using a cubic spline interpolation algorithm, as an indicator of spectral resolution. If the calculated FWHM H is less than the target value, for example, 2 pixels, the spectral resolution is considered to meet the requirements; otherwise, it indicates that the spectral line is too wide and the resolution is insufficient. At this time, the control module will control the linear displacement stage to advance the grating forward to reduce the FWHM and improve the spectral resolution. After adjustment, data is immediately reacquired and a new FWHM H is calculated. This adjustment process will continue until the spectral resolution meets the requirements, i.e., the FWHM is less than the target value of 2.

[0053] It should be noted that the linear displacement stage's movement of the grating may slightly alter the optical path, affecting the accuracy of the calibrated wavelength. Therefore, after adjusting the resolution, the control module rechecks whether the wavelength accuracy still meets the requirements. If the wavelength accuracy deviation exceeds the set threshold again, the wavelength accuracy needs to be adjusted again, followed by re-verification of the resolution. This alternating process of wavelength calibration → resolution calibration → wavelength re-verification → resolution re-verification is executed cyclically by the control module until both wavelength accuracy and spectral resolution meet the requirements. At this point, the calibration is complete, and the control module records the final grating rotation angle and axial position parameters.

[0054] In a preferred embodiment, the control module is further configured with an automatic gain adjustment unit for dynamically adjusting the detector gain or integration time based on the intensity of the reference light signal to ensure that the spectral data is acquired and analyzed within the optimal signal-to-noise ratio range. During the initial commissioning phase, when the standard light source module is triggered, the control module first instructs the spectral acquisition module to acquire one frame of spectral data using default parameters.

[0055] The automatic gain control (ABD) unit monitors the peak intensity of characteristic spectral lines in the data frame in real time. If the peak intensity approaches or exceeds the upper limit of the analog-to-digital converter (ADC) circuit, it automatically reduces the detector gain or shortens the integration time; if the peak intensity is too low, it automatically increases the gain or extends the integration time to ensure the signal is not overwhelmed by noise. Its control objective is to ensure the peak intensity falls within a preset optimal range of 60%–90% of the ADC's dynamic range. This process can be completed quickly within 1–2 acquisition cycles. The ABD function ensures that the system can always acquire high-quality spectral data with optimal signal-to-noise ratio, without saturation or undersampling, under different light source intensities or spectrometer response differences, providing a reliable guarantee for subsequent high-precision algorithm analysis. This dynamic adjustment mechanism greatly improves the quality and reliability of spectral data, providing a solid foundation for accurate wavelength calibration and resolution adjustment.

[0056] Throughout the commissioning process, all key parameters, including the final rotation angle, linear displacement, number of iterations, time consumption, and raw spectral data, are automatically recorded and stored in a local database. Furthermore, the system is equipped with an intelligent initialization module that builds a regression model based on historical commissioning data to predict the optimal initial grating position for the new equipment. For example, by analyzing the historical commissioning results of multiple devices in the same batch, it can be found that a certain model of spectrometer commonly exhibits an initial peak position biased to the left. Based on this, the grating can be preset to a slightly rightward position before the next batch of commissioning, thereby significantly shortening the convergence time. This model supports periodic updates to adapt to changes caused by production line process drift.

[0057] The aforementioned automated spectrometer calibration device can efficiently and accurately complete the calibration of the spectrometer's wavelength accuracy and spectral resolution, significantly improving the efficiency and precision of spectrometer calibration, reducing human error, and ensuring that the spectrometer's performance indicators meet the usage requirements.

[0058] This embodiment also provides an automated spectrometer calibration method, which uses an automated spectrometer calibration device provided in this embodiment. Please refer to the appendix. Figure 2 The method includes at least the following steps:

[0059] Step S1: Connect the standard light source module to the spectrometer to be debugged so that it outputs a reference light signal with known characteristic spectral lines;

[0060] Step S2: Obtain the initial spectral data output by the spectrometer through the spectral acquisition module;

[0061] In this step, the control module performs adaptive signal optimization, monitors the intensity of the reference light signal in real time, and automatically configures the detector gain or integration time of the spectral acquisition module so that the peak value of the acquired spectral data is within a preset range of the dynamic range of the analog-to-digital converter, such as 60%–90%. This automatic configuration ensures that the acquired spectral data has the best signal-to-noise ratio, providing a reliable data foundation for subsequent accurate analysis.

[0062] Step S3, please refer to the appendix. Figure 3 Based on the spectral data, the control module employs an interpolation algorithm to perform sub-pixel interpolation on the peak region of at least one target feature spectral line (such as the 546.07 nm spectral line of a mercury lamp) to accurately determine its actual peak pixel position X. Specifically, the interpolation algorithm uses cubic spline interpolation, comparing the actual peak position X with a preset standard peak pixel position N, and calculating the absolute value of the deviation |d|=|XN|. If the absolute value of the deviation is greater than a first threshold 3, then according to the pre-calibrated correspondence between the grating rotation angle and pixel displacement, the motorized rotary stage is controlled to drive the grating to rotate, thereby adjusting the wavelength accuracy. This step is repeated until the wavelength accuracy requirement is met.

[0063] Preferably, to further improve the calibration accuracy across the entire wavelength range, this step employs a multi-point calibration mode. The control module sequentially or synchronously performs multi-point calibration on at least two characteristic spectral lines of different wavelengths (e.g., 404.66 nm and 579.0 nm). Then, based on the actual peak pixel positions of each characteristic spectral line and their corresponding standard wavelengths, a wavelength-pixel mapping function for the entire wavelength range is established using fitting algorithms such as the least squares method. The wavelength axis of the spectrometer is then linearly or nonlinearly corrected according to this mapping function. This multi-point calibration method effectively eliminates potential nonlinear errors in different wavelength regions of the spectrometer, ensuring that the wavelength accuracy across the entire working wavelength range meets the requirements.

[0064] Step S4, please refer to the appendix. Figure 4 After the wavelength accuracy meets the standard, the control module calculates the full width at half maximum (FWHM) H again using the cubic spline interpolation algorithm based on the same characteristic spectral line in the current spectral data. If the FWHM H is not less than the second threshold 2, it means that the FWHM is too large. In this case, the linear displacement stage needs to be controlled to advance the grating along the optical path to reduce the FWHM, thereby improving the spectral resolution. This step is repeated until the spectral resolution requirement is met.

[0065] In this step, the linear displacement stage employs a step-by-step fine-tuning strategy. The control module drives the linear displacement stage to advance the grating along the optical path. To avoid over-adjustment, a step-by-step fine-tuning is used, with each step displacement precisely calculated to not exceed one-fifth of the grating's depth of focus. After each step, spectral data is reacquired and the full width at half maximum (FWHM) is calculated. This precise step-by-step adjustment strategy avoids excessive adjustment of the grating position, ensuring the accuracy and stability of the spectral resolution adjustment.

[0066] In step S5, since pushing the grating may slightly affect the optical path, thereby disturbing the calibrated wavelength accuracy, after completing the spectral resolution adjustment, the control module re-executes step S3 to check the wavelength accuracy. If it exceeds the first threshold again, it returns to step S3 and step S4 for alternating iterative correction until the wavelength accuracy and spectral resolution simultaneously meet the preset accuracy index.

[0067] The aforementioned process of wavelength calibration → resolution calibration → recalibration → recalibration constitutes a large iterative loop. To improve efficiency and avoid invalid iterations, a convergence judgment logic is set up: during this iterative correction process, if the adjustment amounts for wavelength accuracy and spectral resolution are both less than their respective convergence thresholds (e.g., angle adjustment < 0.01 degrees, displacement step size < 1 / 20 of the depth of focus), the system is determined to have reached a stable state, the iteration is terminated, and the final debugging parameters are output, including the grating rotation angle, axial displacement position, and the corresponding wavelength-pixel calibration mapping relationship. These parameters can be stored and directly loaded into the spectrometer's firmware to complete the entire automated debugging process. This convergence judgment mechanism avoids invalid excessive iterations and improves debugging efficiency.

[0068] The above-mentioned automated spectrometer calibration method can efficiently and accurately complete the calibration of the spectrometer's wavelength accuracy and spectral resolution, significantly improving the efficiency and precision of spectrometer calibration, reducing human error, and ensuring that the spectrometer's performance indicators meet the usage requirements.

[0069] Please see Figure 5 The diagram shown is a structural schematic of an electronic device provided in an embodiment of this specification.

[0070] like Figure 5As shown, the electronic device 1100 may include: at least one processor 1101, at least one network interface 1104, a user interface 1103, a memory 1105, and at least one communication bus 1102. The communication bus 1102 can be used to connect and communicate with the various components mentioned above. The user interface 1103 may include buttons, and optionally may include standard wired or wireless interfaces. The network interface 1104 may include, but is not limited to, a Bluetooth module, an NFC module, or a Wi-Fi module. The processor 1101 may include one or more processing cores. The processor 1101 connects to various parts within the electronic device 1100 using various interfaces and lines, and performs various functions of the routing device and processes data by running or executing instructions, programs, code sets, or instruction sets stored in the memory 1105, and by calling data stored in the memory 1105. Optionally, the processor 1101 may be implemented using at least one hardware form of DSP, FPGA, or PLA. The processor 1101 may integrate one or more combinations of CPU, GPU, and modem. The CPU primarily handles the operating system, user interface, and applications; the GPU is responsible for rendering and drawing the content that the display screen needs to show; and the modem is used for wireless communication.

[0071] It is understandable that the aforementioned modem may not be integrated into the processor 1101, but may be implemented using a separate chip.

[0072] The memory 1105 may include RAM or ROM. Optionally, the memory 1105 may include a non-transitory computer-readable medium. The memory 1105 may be used to store instructions, programs, code, code sets, or instruction sets. The memory 1105 may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for at least one function (such as touch function, sound playback function, image playback function, etc.), instructions for implementing the above-described method embodiments, etc.; the data storage area may store data involved in the above-described method embodiments, etc. Optionally, the memory 1105 may also be at least one storage device located remotely from the aforementioned processor 1101. As a computer storage medium, the memory 1105 may include an operating system, a network communication module, a user interface module, and application programs. The processor 1101 may be used to call the application programs stored in the memory 1105 and execute the methods in the above-described embodiments.

[0073] This specification also provides a computer-readable storage medium storing instructions that, when executed on a computer or processor, cause the computer or processor to perform multiple steps as described in the above embodiments. If the constituent modules of the above-described electronic device are implemented as software functional units and sold or used as independent products, they can be stored in the computer-readable storage medium.

[0074] This specification also provides a computer program product, including a computer program that, when executed by a processor, implements the multiple steps described in the above embodiments.

[0075] Where there is no conflict, the technical features in this embodiment and implementation scheme can be combined arbitrarily.

[0076] In the above embodiments, implementation can be achieved, in whole or in part, through software, hardware, firmware, or any combination thereof. When implemented using software, it can be implemented, in whole or in part, as a computer program product. The computer program product includes multiple computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of this specification are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted through the computer-readable storage medium. The computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, Digital Subscriber Line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium accessible to a computer or a data storage device such as a server or data center integrating multiple available media. The available media may be magnetic media (e.g., floppy disks, hard disks, magnetic tapes), optical media (e.g., digital versatile discs (DVDs)), or semiconductor media (e.g., solid-state drives (SSDs)).

[0077] When implemented through hardware or firmware, the aforementioned method flow is programmed into the hardware circuit to obtain the corresponding hardware circuit structure and achieve the corresponding function. For example, a Programmable Logic Device (PLD) (such as a Field Programmable Gate Array (FPGA)) is such an integrated circuit, whose logic function is determined by the user programming the device. Designers can program a digital system onto a PLD themselves, eliminating the need for chip manufacturers to design and fabricate dedicated integrated circuit chips. Furthermore, nowadays, instead of manually fabricating integrated circuit chips, this programming is mostly implemented using "logic compiler" software, similar to the software compiler used in program development. The original code before compilation must also be written in a specific programming language, called a Hardware Description Language (HDL). There is not just one HDL, but many. Those skilled in the art should understand that by simply performing some logic programming on the method flow using one of the aforementioned hardware description languages ​​and programming it into an integrated circuit, the hardware circuit implementing the logic method flow can be easily obtained.

[0078] The above description is merely an example and illustration of the concept of the present invention. Those skilled in the art can make various modifications or additions to the specific embodiments described or use similar methods to replace them, as long as they do not deviate from the concept of the invention or exceed the scope defined in the claims, they should all fall within the protection scope of the present invention.

Claims

1. An automated spectrometer commissioning device, characterized by, Comprising: a standard light source module for providing a reference light signal with known characteristic spectral lines to the spectrometer to be debugged; a grating adjustment mechanism including a motorized rotary displacement stage (5) for driving the rotation of the internal grating of the spectrometer around an axis to adjust the wavelength accuracy, and a linear displacement stage (7) for translating the grating along the optical path direction to adjust the spectral resolution; a spectral acquisition module (3) for acquiring the spectral data processed by the spectrometer in real time; a control module (9) connected with the standard light source module, the grating adjustment mechanism and the spectral acquisition module (3).

2. The automatic spectrometer debugging device according to claim 1, wherein the control module (9) is configured to perform the following steps: based on the spectral data, determining the actual peak position of the characteristic spectral line by an interpolation algorithm, and comparing it with the preset standard peak pixel position, if the absolute deviation is greater than a set threshold, then controlling the motorized rotary displacement stage (5) to adjust the grating angle according to the pre-calibrated rotation angle-pixel displacement relationship, until the wavelength accuracy meets the requirements; after the wavelength accuracy meets the requirements, calculating the full width at half maximum of the same characteristic spectral line by an interpolation algorithm, if the full width at half maximum is not less than the target value, then controlling the linear displacement stage (7) to advance the grating to reduce the full width at half maximum, until the spectral resolution meets the requirements.

3. The automatic spectrometer debugging device according to claim 1, wherein the standard light source module includes at least two different wavelength characteristic spectral line sources to cover the working wavelength band of the spectrometer to be debugged and support multi-point wavelength calibration, and the control module (9) fits the wavelength pixel mapping relationship based on the peak positions of multiple characteristic spectral lines during the wavelength accuracy adjustment process, to realize linear or nonlinear correction of the full wavelength band.

4. The automatic spectrometer debugging device according to claim 1, wherein the spectral acquisition module (3) includes a high-sensitivity detector and an analog-to-digital conversion circuit connected with the output end of the spectrometer to be debugged, for converting the analog spectral signal output by the spectrometer into a digital signal and transmitting it to the control module (9).

5. The automatic spectrometer debugging device according to claim 4, wherein the control module (9) is further configured with an automatic gain adjustment unit for dynamically adjusting the gain or integration time of the detector according to the reference light signal intensity, to ensure that the spectral data is collected and analyzed within the optimal signal-to-noise ratio range. Comprising: Step S1, connecting the standard light source module to the spectrometer to be debugged, so that it outputs a reference light signal with known characteristic spectral lines; Step S2, acquiring the initial spectral data output by the spectrometer through the spectral acquisition module; ​ 6. An automated spectrometer commissioning method using an automated spectrometer commissioning device according to any one of claims 1 to 5, characterized in that, ​ ​ ​ Step S3, based on the spectral data, an interpolation algorithm is used to determine the actual peak pixel position of the target characteristic spectral line, and is compared with the preset standard peak pixel position; if the absolute value of the deviation is greater than the first threshold value, the corresponding relationship between the pre-calibrated grating rotation angle and pixel displacement is used to control the electric rotary displacement table to drive the grating to rotate, so as to adjust the wavelength accuracy, and the step is repeated until the wavelength accuracy requirement is met; Step S4, after the wavelength accuracy meets the requirement, based on the same characteristic spectral line, the full width at half maximum is calculated by using the interpolation algorithm, if the full width at half maximum is not less than the second threshold value, the linear displacement table is controlled to advance the grating along the optical path direction to reduce the full width at half maximum, so as to improve the spectral resolution, and the step is repeated until the spectral resolution requirement is met; Step S5, after the spectral resolution adjustment is completed, the wavelength accuracy is checked again by executing step S3, if the first threshold value is exceeded again, steps S3 and S4 are returned to be iteratively corrected alternately until the wavelength accuracy and the spectral resolution meet the preset precision index at the same time.

7. The automatic spectrometer debugging method according to claim 6, characterized in that, In step S2, the control module automatically configures the detector gain or integration time of the spectral acquisition module according to the intensity of the reference light signal, so that the peak value of the collected spectral data is located in the preset interval of the dynamic range of the analog-to-digital converter.

8. The automatic spectrometer debugging method according to claim 6, characterized in that, In step S3, at least two characteristic spectral lines of different wavelengths are used for multi-point calibration, and the control module establishes a wavelength-pixel mapping function for the full wavelength band based on the actual peak pixel position of each characteristic spectral line and the corresponding standard wavelength, and performs linear or nonlinear correction on the wavelength axis of the spectrometer according to the mapping function.

9. The automatic spectrometer debugging method according to claim 6, characterized in that, In step S4, the advancing process of the linear displacement table adopts a step-by-step fine adjustment strategy, and each displacement amount is not more than a preset multiple of the focal depth of the grating, and the spectral data is re-collected and the full width at half maximum is calculated after each step.

10. The automatic spectrometer debugging method according to claim 6, characterized in that, In the iterative correction process of step S5, if the adjustment amount of the wavelength accuracy and the spectral resolution is less than the corresponding convergence threshold value for two times in succession, it is determined that the system has reached a stable state, the iteration is terminated, and the final debugging parameters are output, including the rotation angle of the grating, the axial displacement position and the corresponding wavelength-pixel calibration mapping relationship.