A Dynamic Reference Calibration Method for Spectral Measurement Based on Optical Path Switching

By employing optical path switching and dynamic reference calibration methods, the problem of reference spectrum mismatch in the spectral measurement system was solved, enabling dynamic tracking and stability calibration of the system's optical reference, thereby improving the accuracy and reliability of the measurement results.

CN122487265APending Publication Date: 2026-07-31JIANGSU FULAT AUTOMATION EQUIP CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
JIANGSU FULAT AUTOMATION EQUIP CO LTD
Filing Date
2026-04-28
Publication Date
2026-07-31

AI Technical Summary

Technical Problem

In existing spectral measurement systems, the reference spectrum cannot be flexibly adjusted, resulting in a mismatch between the system's optical reference and the actual state. During long-term operation, slow drift and short-term fluctuations overlap. Single reference sampling is easily affected by noise, and abnormal references are carried into subsequent calculations, affecting the reliability of the results.

Method used

A dynamic reference calibration method based on optical path switching is adopted. The optical path switching bridge switches between the reference and sample optical paths. Combined with periodic and triggered reference updates, multiple sampling and judgments are performed to construct a weighted reference spectrum. The update cycle is dynamically adjusted, and a time-series interlock control is set to perform drift compensation and baseline correction.

Benefits of technology

It reduces reference mismatch caused by time disconnection, lowers the dispersion and error of measurement results, improves the stability and reliability of spectral measurements, avoids the influence of abnormal references, and ensures the continuity and accuracy of measurements.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122487265A_ABST
    Figure CN122487265A_ABST
Patent Text Reader

Abstract

This invention discloses a dynamic reference calibration method for spectral measurement based on optical path switching. Applied to spectral measurement systems with switchable reference optical paths, the method achieves switching between the reference optical path and the sample measurement optical path via an optical path switching bridge. It employs a reference update mechanism combining dark current dynamic updates, periodicity, and triggering. Valid references are screened through a triple-judgment process based on intensity deviation, spectral shape correlation, and sampling stability. Dynamic calibration is completed by combining weighted reference construction, adaptive reference period adjustment, drift compensation, and timing interlock control. This invention significantly improves the timeliness and anti-interference capability of the reference standard, effectively suppresses long-term system drift, and ensures the measurement accuracy and operational stability of industrial online spectral detection.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to a dynamic reference calibration method for spectral measurement based on optical path switching. Background Technology

[0002] In a spectroscopic measurement system, to obtain the true absorption information of the sample, it is typically necessary to acquire dark current, reference spectrum, and sample spectrum. Dark current characterizes the detector's background response under conditions of no effective incident light; reference spectrum characterizes the system's optical response without the influence of sample absorption; and sample spectrum characterizes the sample's absorption properties to incident light. By processing the dark current, reference spectrum, and sample spectrum, spectral characteristic data for quantitative analysis can be obtained.

[0003] For industrial online detection systems, the operation of the equipment is affected by factors such as light source aging, short-term fluctuations in light source intensity, changes in ambient temperature, optical surface contamination, detector zero drift, minute mechanical displacements, and changes in stray light within the system. These factors can cause the system's optical reference to change over time, thereby rendering the reference reference ineffective, leading to the accumulation of absorbance calculation errors and drift in concentration results.

[0004] In existing technologies, spectral measurement methods mainly suffer from the following problems:

[0005] The system typically uses a fixed period to update the reference, which cannot flexibly adjust the timing of the reference update according to the actual drift speed of the system, the degree of environmental fluctuation, and abnormal measurement results, resulting in a mismatch between the reference data and the actual state of the system.

[0006] When the interval between the reference measurement and the sample measurement is long, the light source intensity, detector response, and optical path state may have changed, causing the reference used to not truly represent the system baseline state at the time of sample measurement.

[0007] During long-term operation, the system may exhibit slow drift and short-term fluctuations. Without a dynamic compensation strategy, this can easily lead to absorbance baseline shift and concentration calculation errors.

[0008] Single reference or single sample sampling is easily affected by random noise, transient disturbances and electrical noise, which leads to increased data dispersion and is not conducive to stable calculation.

[0009] In existing technologies, once the reference is acquired, it is directly used for subsequent calculations. If, during the acquisition process, the optical path switching bridge is not in place, the light source is unstable, the spectrum is abnormal, or the signal changes abruptly, the abnormal reference will be carried over into the calculation of a large number of samples, affecting the reliability of the results. In addition, when there is a lack of strict timing interlock between mechanical position, light source status, and spectral acquisition, problems such as starting acquisition before the optical path switching bridge is in place, acquiring the reference before the light source is stable, and performing sample calculations before the reference has been updated are prone to occur. Summary of the Invention

[0010] The present invention provides a dynamic reference calibration method for spectral measurement based on optical path switching in order to solve the problems existing in the prior art.

[0011] The technical solutions adopted in this invention are as follows:

[0012] A dynamic reference calibration method for spectral measurement based on optical path switching is applied to a spectral measurement system with a switchable reference optical path. The spectral measurement system has a sample measurement optical path and a reference optical path. The sample measurement optical path is the optical path through which the light beam enters the spectrometer after passing through a flow cell, while the reference optical path is the optical path through which the light beam directly enters the spectrometer without passing through a flow cell. The method includes the following steps:

[0013] S1: Establish the origin of the optical path switching bridge in the spectral measurement system. The optical path switching bridge is used for switching between the reference optical path and the sample measurement optical path.

[0014] S2: Turn off the light source module, collect the dark current spectrum under the condition of no effective incident light, sample the dark current spectrum multiple times and judge its stability, and generate the dark current baseline of the current operating cycle when the stability requirements are met.

[0015] S3: Control the optical path switching bridge to enter the reference position. After receiving the optical path switching bridge arrival signal and the light source module is in a stable output state, collect the reference spectrum, sample the reference spectrum multiple times, and average the sampling results to generate a candidate reference spectrum.

[0016] S4: Perform intensity deviation determination, spectral shape correlation determination, and sampling stability determination on the candidate reference spectrum. Only when the candidate reference spectrum simultaneously meets all the requirements of intensity deviation determination, spectral shape correlation determination, and sampling stability determination, the candidate reference spectrum is updated to the current effective reference spectrum; otherwise, the previous effective reference spectrum is retained.

[0017] S5: Construct a weighted reference spectrum based on the current effective reference spectrum and the historical effective reference spectra;

[0018] S6: Control the optical path switching bridge to exit the reference position and enter the sample measurement position, collect the sample spectrum, use the dark current baseline to perform dark current subtraction on the sample spectrum, and use the current effective reference spectrum or the weighted reference spectrum to normalize the dark current subtracted sample spectrum, calculate the absorbance result, and calculate the concentration result based on the absorbance result;

[0019] S7: Dynamically adjust the reference update cycle based on drift evaluation indicators, or trigger new reference acquisition based on trigger conditions;

[0020] S8: When an anomaly is detected, perform the following actions: reacquire dark current spectrum or reference spectrum, revert to the previous valid reference spectrum, degrade operation, or alarm shutdown.

[0021] Furthermore, S2 also includes a dark current dynamic update strategy, which includes start-up update, periodic update, and triggered update, wherein:

[0022] The startup update refers to dark current spectrum acquisition performed after system initialization;

[0023] The periodic update is to re-acquire the dark current spectrum at a set time interval;

[0024] The trigger update is to immediately trigger dark current spectral resampling when a temperature change exceeds a threshold, the standard deviation of the background noise exceeds a threshold, or an abnormal baseline rise is detected.

[0025] Furthermore, in S2, the stability judgment includes: calculating the standard deviation σ of multiple consecutive dark current spectral sampling results. D (λ), if σ D (λ)<ε D If the dark current spectrum is stable and valid, then the dark current spectrum is determined to be valid; where σ D (λ) is the standard deviation of the dark current spectrum at wavelength λ, ε D This is the threshold for dark current stability.

[0026] Furthermore, in S3, the acquisition of the reference spectrum is achieved through periodic reference updates or triggered reference updates;

[0027] The periodic reference update is to automatically update the reference spectrum according to a set time period;

[0028] The triggered reference update is to immediately trigger reference spectrum acquisition when a change in light intensity exceeds a threshold, a change in temperature exceeds a threshold, a fluctuation in concentration results exceeds a threshold, or an abnormal event occurs.

[0029] Furthermore, in S3, the multiple sampling averaging process includes: for N reference spectra collected under the same measurement conditions, after removing the maximum and minimum values, calculating the mean value to obtain the average reference spectrum, and using the average reference spectrum as the candidate reference spectrum.

[0030] Further, in S4, the intensity deviation determination includes: calculating the intensity deviation E1 between the candidate reference spectrum and the previous effective reference spectrum; if E1 < θ1, then the intensity deviation determination passes; where E1 is the intensity deviation and θ1 is the intensity deviation threshold.

[0031] Spectral correlation determination includes: calculating the correlation coefficient ρ between the candidate reference spectrum and the previous effective reference spectrum; if ρ > θρ If the spectral correlation is positive, then the spectral correlation determination is passed; where ρ is the spectral correlation coefficient, and θ... ρ The threshold for spectral correlation;

[0032] The sampling stability assessment includes: calculating the standard deviation σ of multiple sampling results from the current reference spectrum acquisition. R If σ R <θ σ If the sampling stability is determined, then the sampling stability test is passed; where σ R θ represents the standard deviation of the reference spectrum sampling. σ This is the sampling stability threshold.

[0033] Furthermore, in S5, the weighted reference spectrum is constructed based on the most recent m effective reference spectra, which are as follows:

[0034] ;

[0035] The weighted reference spectrum is:

[0036] ,

[0037] in, These are the weighting coefficients. For the first The second most effective reference spectrum, and the weighting coefficients satisfy:

[0038] ,

[0039] When the spectral measurement system is operating stably, a weighted reference spectrum is used. The sample calculation is participated in; when the drift evaluation index exceeds a preset threshold, the current effective reference spectrum is used. The primary mode.

[0040] Furthermore, S6 also includes drift compensation, which includes:

[0041] The current concentration result is corrected based on the average intensity variation trend of the most recent effective reference spectra in the reference band; or the baseline offset is calculated by selecting a non-characteristic absorption band and the absorbance result is baseline corrected.

[0042] Furthermore, in S7, the drift evaluation index is calculated by weighting the change in light intensity of the reference band, the change in temperature, and the fluctuation of recent concentration results;

[0043] The reference update cycle is negatively correlated with the drift evaluation index. When the spectral measurement system is stable, the reference update cycle is extended; when the drift of the spectral measurement system intensifies, the reference update cycle is shortened.

[0044] Furthermore, the method also includes timing interlock control, which is used to constrain the execution conditions of S2, S3, and S6; the timing interlock control includes:

[0045] In S2, dark current spectral acquisition is constrained to be performed under conditions of no effective incident light;

[0046] In S3, the constrained reference spectrum acquisition is performed after the optical path switching bridge enters the reference position and the light source module is in a stable output state.

[0047] In S6, constrained sample spectral acquisition is performed after the optical path switching bridge enters the sample measurement position;

[0048] When there is no effective reference spectrum in the current period, the constraint spectral measurement system will not enter the formal sample calculation process or will enter a degraded operation mode and mark the result status.

[0049] Furthermore, the degraded operation in S8 includes: when the spectral measurement system cannot obtain a new effective reference spectrum within a limited time, it continues to operate using the previous effective reference spectrum or weighted reference spectrum, and marks the measurement results as abnormal, while limiting the duration of the degraded operation.

[0050] Furthermore, the spectral measurement system includes a light source module, a flow cell, a spectrometer, and an optical path switching bridge;

[0051] The optical path switching bridge is located between the light source module and the flow cell, and can move between the reference position and the sample measurement position;

[0052] When in the reference position, the light beam emitted by the light source module is deflected by the reflector on the optical path switching bridge and then directly enters the spectrometer;

[0053] When in the sample measurement position, the light beam emitted by the light source module passes through the flow cell and enters the spectrometer.

[0054] The present invention has the following beneficial effects:

[0055] (1) Through the reference update mechanism that combines periodic updates and triggered updates, the timing of reference spectrum acquisition can be dynamically adjusted according to changes in light intensity, temperature and concentration results, so that the reference spectrum is closer to the system optical state at the time of sample measurement, and the reference mismatch caused by time disconnection is reduced.

[0056] (2) The candidate reference spectrum is effectively screened by intensity deviation judgment, spectral correlation judgment and sampling stability judgment. It is only updated when the candidate reference spectrum meets all three judgment requirements at the same time, so as to avoid abnormal references caused by inadequate bridge, unstable light source or signal change directly entering the sample calculation stage.

[0057] (3) By sampling the dark current spectrum, reference spectrum and sample spectrum multiple times and removing extreme values ​​before averaging, random noise and transient disturbances are weakened during the averaging process, and the influence of a single abnormal pulse on the final absorbance and concentration results is reduced.

[0058] (4) The most recent effective reference spectra are weighted and fused by the weighted reference spectra. Occasional reference fluctuations are smoothed by adjacent effective reference spectra, and the dispersion of the measurement results is reduced when the system is running smoothly.

[0059] (5) The reference update cycle is dynamically adjusted by the drift evaluation index. When the system is stable, the update cycle is extended to reduce measurement interruptions caused by frequent switching. When the system drift intensifies, the update cycle is shortened to track changes in the optical reference, thus achieving a balance between measurement continuity and reference timeliness.

[0060] (6) By using reference trend compensation and baseline correction, the intensity trend changes and absorbance baseline shifts accumulated during long-term operation are corrected, thus mitigating long-term measurement deviations caused by light source aging, temperature drift and optical contamination.

[0061] (7) By using time-series interlock control, the optical path switching bridge position confirmation, light source stability confirmation and spectrum acquisition are performed in a fixed order, reducing invalid or erroneous data caused by asynchrony.

[0062] (8) When a new effective reference spectrum cannot be obtained in time, the system can still output the measurement results with status indicators within a limited time by reverting to the previous effective reference spectrum or weighted reference spectrum and marking the abnormal state, thus avoiding the complete interruption of the measurement process due to a single abnormality. Attached Figure Description

[0063] Figure 1 This is a schematic diagram of the spectral measurement system.

[0064] Figure 2 This is a schematic diagram of a drive module using an electric screw drive to drive an optical path switching bridge.

[0065] Figure 3 This is a timing diagram of the overall measurement process.

[0066] Figure 4 This is a schematic diagram of the continuous measurement cycle operation process.

[0067] Figure 5 A schematic diagram of the reference update triggering and validity determination process;

[0068] Figure 6 This is a schematic diagram of the anomaly detection and handling process. Detailed Implementation

[0069] The invention will now be further described with reference to the accompanying drawings.

[0070] like Figure 1 As shown, this invention discloses a dynamic reference calibration method for spectral measurement based on optical path switching, applied to a spectral measurement system with a switchable reference optical path. The spectral measurement system includes a light source module 1, an optical path switching bridge 4, a drive module, four sets of mirror assemblies, a flow cell 2, a spectrometer 3, a control unit, a position detection unit, a temperature detection unit, and a data processing unit, as follows: Figure 1 (For ease of drawing, Figure 1 and Figure 2 This corresponds to the core components of the display, namely the light source module 1, the flow cell 2, the spectrometer 3, and the optical path switching bridge 4.

[0071] The light source module 1, the flow cell 2, and the spectrometer 3 are arranged coaxially along the preset main optical axis. The light beam emitted from the light source module 1 can propagate in a straight line along the main optical axis, pass through the test fluid area inside the flow cell 2, and then enter the detection incident end face of the spectrometer 3 to form the sample measurement optical path. That is, the sample measurement optical path is the optical path of the light beam entering the spectrometer after passing through the flow cell.

[0072] The optical path switching bridge 4 is set in the optical path gap between the light source module and the flow cell. The optical path switching bridge 4 in this invention is a U-shaped frame. Four sets of mirror assemblies are fixedly installed on the mounting surface of the optical path switching bridge through two-dimensional adjustable mirror mounts (the adjustable mirror mounts are conventional optical accessories, and their specific structure and adjustment mechanism will not be described in detail in this invention). The four sets of mirrors are arranged according to a preset spatial pose, and form a reference optical path that matches the sample measurement optical path through continuous reflection and refracting. The reference optical path is the optical path in which the light beam enters the spectrometer directly without passing through the flow cell. After being refracted by the reference optical path, the light beam can bypass the flow cell and directly enter the detection incident end face of the spectrometer 3.

[0073] like Figure 2 The drive module adopts an electric screw drive structure. The output end of the drive module is fixedly connected to the optical path switching bridge, which can drive the optical path switching bridge to move linearly back and forth in a direction perpendicular to the main optical axis.

[0074] The position detection unit includes an origin sensor and a limit sensor located at both ends of the optical path switching cable tray's moving path, as well as a position confirmation sensor for detecting the cable tray's reference position and the sample's position status.

[0075] The output of the position detection unit is electrically connected to the control unit, which can provide real-time feedback on the position status of the optical path switching cable tray.

[0076] Temperature detection units are located inside the light source module, the spectrometer detector, and the optical cavity, respectively, and can collect temperature data of key parts of the system in real time and transmit it to the control unit.

[0077] The control unit is electrically connected to the light source module, drive module, spectrometer, position detection unit, and temperature detection unit, and can perform optical path switching control, light source status adjustment, spectral acquisition timing control, dynamic calibration process management, and abnormal detection and handling operations.

[0078] The data processing unit is electrically connected to the control unit and the spectrometer, and can perform operations such as filtering, averaging, validity determination, dark current subtraction, normalization calculation, absorbance and concentration calculation, drift compensation, and weighted reference construction of spectral data.

[0079] When the drive module moves the optical path switching bridge into the area where the main optical axis is located, the four sets of reflector assemblies are completely inserted into the transmission path of the main optical axis, and all the beams emitted by the light source module enter the reference optical path, and the system switches to the reference measurement mode.

[0080] When the drive module moves the optical path switching bridge outward and exits the main optical axis area, the reference optical path is completely separated from the main optical axis, and the beam emitted by the light source module resumes its transmission path along the main optical axis through the flow cell. The system switches to the sample measurement mode. The above-mentioned translation switching method realizes the interference-free switching between the two measurement modes.

[0081] Combination Figures 3 to 6 The method of the present invention will be described in detail below.

[0082] After the system is powered on, the initialization operation is performed first.

[0083] The control unit drives the optical path switching bridge to move to the location of the origin sensor, establishing the position origin of the optical path switching bridge in the spectral measurement system, and providing a unified reference position for subsequent optical path switching operations.

[0084] After initialization, the system executes each step of the operation in sequence according to the preset state machine process. The state machine state switching path is as follows: standby state, initialization back to zero state, dark current acquisition state, reference switching state, reference acquisition state, sample switching state, sample acquisition state, data processing state, and then returns to standby state. If an abnormality is detected in any state, it will directly jump to the abnormality handling state.

[0085] After initialization, the system enters dark current acquisition mode. The control unit shuts down the light source module and cuts off the incident light path through the light-blocking mechanism. Under the condition that there is no effective incident light in the optical path, the dark current spectrum D(λ) is acquired by the spectrometer, where λ is the wavelength. To ensure the reliability of the dark current spectrum and eliminate the influence of random noise on the dark current baseline, the dark current spectrum is sampled continuously ND times. The stability of the continuous ND dark current spectrum sampling results is assessed, and the standard deviation σ of the dark current at each wavelength is calculated. D (λ), if σ D(λ)<ε D Then, the dark current spectrum is determined to be stable and effective, where σ D (λ) is the standard deviation of the dark current at wavelength λ, ε D This is the dark current stability threshold. After the stability requirements are met, the effective dark current spectrum is averaged to generate the dark current baseline for the current operating cycle.

[0086] To ensure that the dark current baseline always matches the current system background response state, the system sets a dynamic dark current update strategy, including three methods: initiation update, periodic update, and triggered update.

[0087] The initial update is the first dark current spectrum acquisition operation performed after system initialization to generate the initial dark current baseline.

[0088] The periodic update is a system that re-acquires the dark current spectrum and updates the dark current baseline at a preset time interval TD. The value of TD ranges from 1 min to 120 min and can be adjusted according to the system's operational stability.

[0089] The system will immediately trigger dark current spectral resampling and baseline update when it detects any of the following conditions: detector temperature change exceeds a preset threshold ΔTD, the standard deviation of spectral background noise exceeds a preset threshold, the system has been running continuously for a preset cumulative duration, or an abnormal baseline rise is detected during reference or sample measurement.

[0090] After the dark current baseline is updated, dark current subtraction is performed on the subsequently acquired reference and sample spectra. The dark current subtracted reference spectrum R... C (λ)=R(λ)-D(λ), where R(λ) is the original reference spectrum; the sample spectrum after dark current subtraction is S. C (λ)=S(λ)-D(λ), where S(λ) is the original sample spectrum.

[0091] After establishing the dark current baseline, the system enters the reference switching state. The control unit controls the optical path switching bridge to enter the reference position through the drive module. After receiving the optical path switching bridge positioning signal from the position detection unit and confirming that the light source module is in a stable output state, it waits for the preset light source stabilization time t. s Then, enter the reference measurement state and perform the reference spectrum acquisition operation. The specific steps are as follows:

[0092] Control the cable tray to enter the reference position, receive the cable tray arrival signal, turn on the light source or confirm that the light source is in a stable output state, and wait for the light source to stabilize for time t. s The reference spectra of N times are collected, and the sampling results are averaged or weighted to generate the current candidate reference. Let R be the i-th reference sampling. iIf (λ), then the formula for calculating the average reference is:

[0093] ,

[0094] If dark current removal is used, the formula for calculating the average reference is:

[0095] ,

[0096] To reduce the impact of random noise, transient jitter, and electronic noise, the system employs a multiple sampling mechanism for dark current, reference, and sample measurements. When outliers are present, a post-removal averaging or median filtering strategy can be used, such as calculating the mean after removing the maximum and minimum values. Let N spectra be acquired under the same measurement conditions, respectively... Then the average result after removing the extreme values ​​is:

[0097] ,

[0098] in, This represents the spectral sequence sorted according to a certain evaluation index. This method can improve measurement robustness, reduce the impact of abnormal impulse noise on single measurement results, and finally use the processed average reference spectrum as the candidate reference spectrum.

[0099] The acquisition of the reference spectrum is achieved through two methods: periodic reference updates and triggered reference updates.

[0100] Periodic reference updates are performed by the system according to a preset time period T. R Automatically perform reference acquisition and reference spectrum update. Let the time for the k-th reference update be t. k Then the periodic update satisfies t k +1-t k =T R T R The value ranges from 30 seconds to 30 minutes and can be dynamically adjusted according to the system's operating status.

[0101] Triggered reference updates involve the system immediately triggering reference spectrum acquisition when a preset trigger condition is detected. Trigger conditions include light intensity change triggering, temperature change triggering, result fluctuation triggering, and abnormal event triggering. The criterion for light intensity change triggering is: assuming the total system intensity in a certain reference band is... When the following conditions are met:

[0102] ,

[0103] This triggers a new reference acquisition, in which The threshold for intensity change is preferably set to 0.5% to 5%.

[0104] The criterion for triggering a temperature change is as follows: Let the temperature of the critical part of the system be T(t). If the following conditions are met:

[0105] ,

[0106] This triggers a reference update, where This is the temperature change threshold. The criterion for triggering result fluctuation is: if the standard deviation of the results of M consecutive samples satisfies:

[0107] ,

[0108] This indicates that the system may have drift or reference mismatch, triggering a reference update. This is the concentration fluctuation threshold.

[0109] Abnormal events triggering the system include light source restart, cable tray malfunction recovery, re-entry into measurement after prolonged standby, and recovery after spectral acquisition failure. Reference acquisition is immediately triggered in any of these situations. The system employs strict timing interlock controls to constrain the execution conditions of reference acquisition. Reference spectral acquisition is only permitted when the optical path switching cable tray enters the reference position, the position confirmation signal is valid, and the light source module reaches a stable output state, thus preventing the acquisition of invalid or erroneous reference data.

[0110] After generating candidate reference spectra, to prevent abnormal references from entering subsequent calculations, the system performs validity checks on the candidate reference spectra, sequentially checking intensity deviation, spectral shape correlation, and sampling stability. Only when a candidate reference spectrum simultaneously meets all three requirements is it updated to the current valid reference spectrum; otherwise, the previous valid reference spectrum is retained, and a resampling or alarm procedure is executed. Let the current candidate reference be... The previous effective reference was The effectiveness of the reference is then determined using the following indicators:

[0111] (1) Strength deviation determination, the calculation formula is:

[0112] ,

[0113] If E1 < θ1, then the overall strength change is considered acceptable and the strength deviation judgment is passed, where θ1 is the strength deviation threshold;

[0114] (2) Spectral correlation determination, the calculation formula is:

[0115] ,

[0116] If ρ>θ ρ If the spectral consistency is satisfactory, the spectral correlation determination is passed, where θ ρ The threshold for spectral correlation;

[0117] (3) Sampling stability determination: The standard deviation of the NR samples collected for this reference is calculated using the following formula:

[0118] ,

[0119] like: This indicates that the reference measurement was stable and the sampling stability assessment was passed, where θ σ This is the sampling stability threshold.

[0120] The effective reference is updated only when the candidate reference simultaneously meets the requirements of intensity deviation, spectral shape correlation, and sampling stability. The update formula is as follows:

[0121] ,

[0122] Otherwise, retain the previous valid reference and execute the re-sampling or alarm procedure.

[0123] After updating the effective reference spectrum, to improve the smoothness and resistance to transient disturbances of the reference standard, the system constructs a weighted reference spectrum based on the current effective reference spectrum and historical effective reference spectra. Let the most recent m effective references be:

[0124] ,

[0125] The constructed weighted reference spectrum is:

[0126] ,

[0127] The weighting coefficients satisfy the following constraints:

[0128] ,

[0129] To ensure that the weighted reference spectrum balances smoothness and the ability to track the system state, it is preferable to set an exponentially decaying weight with a higher recent reference weight. The specific expression for this weight is as follows:

[0130] ,

[0131] In the formula, α is the attenuation coefficient. By using the exponential attenuation weighting method, the effective reference spectrum with more recent acquisition time occupies a higher weight in the weighted reference spectrum. At the same time, by fusing historical effective reference spectra, occasional reference fluctuations are smoothed out.

[0132] When the system is running smoothly, a weighted reference spectrum R can be used. ω (λ) replaces the single reference in sample calculations to reduce errors caused by occasional reference fluctuations; when the system detects rapid drift or abnormally triggered reference updates, it can switch to using the latest effective reference spectrum. The primary mode is to enhance the ability to track system changes.

[0133] During system operation, a reference update adaptive algorithm is also set to automatically adjust the reference update cycle according to the system drift speed. The system drift evaluation index is set as follows:

[0134]

[0135] in: This indicates the change in light intensity at the reference wavelength. Indicates the amount of temperature change. This indicates recent concentration fluctuations, where a, b, and c are weighting coefficients.

[0136] The reference update cycle is dynamically adjusted based on Γ(t), and the adjustment formula is as follows:

[0137] ,

[0138] in Based on the reference period, This is the sensitivity coefficient; when the system is stable, The smaller the reference period, the longer the reference period; when the system drift intensifies, The larger the reference period, the shorter the dynamic tracking capability becomes.

[0139] To avoid efficiency degradation due to excessively frequent parameter switching, upper and lower limits are set for the parameter update cycle:

[0140] ,

[0141] in For the minimum reference period, This is the maximum reference period.

[0142] After completing the calibration of the reference spectrum, the system enters the sample switching state. The control unit, through the drive module, controls the optical path switching bridge to exit the reference position and enter the sample measurement position. After receiving the sample position arrival signal from the position detection unit, it enters the sample measurement state and acquires the sample spectrum through the spectrometer. The system uses timing interlock control to constrain the execution conditions of sample spectral acquisition. Sample spectral acquisition is only permitted when the optical path switching bridge completely exits the main optical axis region, enters the sample measurement position, and the arrival signal is valid. This prevents abnormal sample data caused by optical path obstruction. During the sample measurement phase, after dark current subtraction of the sample spectrum, the following is obtained:

[0143] ,

[0144] If the current effective reference is used After normalization, the transmittance is:

[0145] ,

[0146] The absorbance is:

[0147] ,

[0148] Right now:

[0149] ,

[0150] in, The latest valid reference can be obtained. Weighted reference can also be used. For concentration calculations, the concentration value can be further obtained based on characteristic wavelengths, characteristic band integrals, or regression models, for example:

[0151] ,

[0152] or:

[0153] ,

[0154] Where A is a vector composed of selected wavelength points or band characteristics, and b is a regression coefficient. This is a constant term.

[0155] To suppress slow drift during long-term operation, the system is equipped with a drift compensation mechanism, including three methods: reference trend compensation, baseline compensation, and sliding window compensation.

[0156] (1) Reference trend compensation: Let IR,k be the average intensity of the most recent m effective references in the reference band. Then the reference drift trend can be expressed as:

[0157] ,

[0158] Based on trend changes, the current sample results can be corrected, or the reference update can be triggered in advance.

[0159] (2) Baseline compensation: For baseline drift of the absorbance curve, the characteristic absorption band Ωb can be selected, and the baseline offset can be defined as follows:

[0160] ,

[0161] Then perform baseline correction on the absorbance:

[0162] .

[0163] (3) Sliding window compensation: A sliding window average is constructed for the most recent M sample results or reference results to suppress random fluctuations.

[0164] ,

[0165] If necessary, a weighted moving average can be used to increase the influence weight of recent data.

[0166] Throughout the entire system operation process, the operating status of each link is monitored in real time. After entering the measurement process, the current step is executed, and any abnormalities are detected in real time. If an abnormality occurs, the abnormality type is determined, and the corresponding recovery operation is performed according to the abnormality type. If the recovery is successful, the normal process is returned; if the recovery fails, an alarm and shutdown operation are executed.

[0167] The system can detect and handle anomalies including cable tray misalignment timeout, origin or limit sensor malfunction, light source failure or instability, spectral acquisition failure, candidate reference validity determination failure, abnormal dark current increase, and sample spectral intensity below the safety threshold. Corresponding handling strategies include resampling, rollback, degraded operation, and alarm and shutdown strategies.

[0168] The resampling strategy is to perform one or more resampling operations for recoverable anomalies.

[0169] The rollback strategy is to roll back to the previous valid reference if the current candidate reference is invalid, and the reference spectrum is updated as follows:

[0170] ,

[0171] The degradation operation strategy is to allow the system to continue running for a short period of time using the previous valid reference or weighted reference when it cannot obtain a new reference within a limited time. However, the results are marked as abnormal and the duration is limited.

[0172] The alarm and shutdown strategy is to output an alarm and stop the measurement process when an abnormality persists or affects measurement safety.

[0173] The system's timing interlock control is implemented throughout the entire process. This includes ensuring no effective incident light during dark current acquisition, prohibiting reference acquisition until the optical path switching bridge is in the reference position, prohibiting sample acquisition until the optical path switching bridge is out of the reference position, prohibiting entry into the reference acquisition state until the light source module reaches a stable output state, and constraining the system from entering the formal sample calculation process or entering a degraded operation mode and clearly marking the status of the output results when there is no effective reference spectrum in the current period. Through the above interlock mechanism, erroneous data caused by mechanical, optical, and acquisition asynchrony are avoided.

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

Claims

1. A dynamic reference calibration method for spectral measurement based on optical path switching, applied to a spectral measurement system with a switchable reference optical path, wherein the spectral measurement system has a sample measurement optical path and a reference optical path, the sample measurement optical path being the optical path through which the light beam enters the spectrometer after passing through a flow cell, and the reference optical path being the optical path through which the light beam directly enters the spectrometer without passing through a flow cell, characterized in that: Includes the following steps: S1: Establish the origin of the optical path switching bridge in the spectral measurement system. The optical path switching bridge is used for switching between the reference optical path and the sample measurement optical path. S2: Turn off the light source module, collect the dark current spectrum under the condition of no effective incident light, sample the dark current spectrum multiple times and judge its stability, and generate the dark current baseline of the current operating cycle when the stability requirements are met. S3: Control the optical path switching bridge to enter the reference position. After receiving the optical path switching bridge arrival signal and the light source module is in a stable output state, collect the reference spectrum, sample the reference spectrum multiple times, and average the sampling results to generate a candidate reference spectrum. S4: Perform intensity deviation determination, spectral shape correlation determination, and sampling stability determination on the candidate reference spectrum. Only when the candidate reference spectrum simultaneously meets all the requirements of intensity deviation determination, spectral shape correlation determination, and sampling stability determination, the candidate reference spectrum is updated to the current effective reference spectrum; otherwise, the previous effective reference spectrum is retained. S5: Construct a weighted reference spectrum based on the current effective reference spectrum and the historical effective reference spectra; S6: Control the optical path switching bridge to exit the reference position and enter the sample measurement position, collect the sample spectrum, use the dark current baseline to perform dark current subtraction on the sample spectrum, and use the current effective reference spectrum or the weighted reference spectrum to normalize the dark current subtracted sample spectrum, calculate the absorbance result, and calculate the concentration result based on the absorbance result; S7: Dynamically adjust the reference update cycle based on drift evaluation indicators, or trigger new reference acquisition based on trigger conditions; S8: When an anomaly is detected, perform the following actions: reacquire dark current spectrum or reference spectrum, revert to the previous valid reference spectrum, degrade operation, or alarm shutdown.

2. The dynamic reference calibration method for spectral measurement based on optical path switching as described in claim 1, characterized in that: S2 also includes a dark current dynamic update strategy, which includes start-up update, periodic update, and triggered update, wherein: The startup update refers to dark current spectrum acquisition performed after system initialization; The periodic update is to re-acquire the dark current spectrum at a set time interval; The trigger update is to immediately trigger dark current spectral resampling when a temperature change exceeds a threshold, the standard deviation of the background noise exceeds a threshold, or an abnormal baseline rise is detected.

3. The dynamic reference calibration method for spectral measurement based on optical path switching as described in claim 1, characterized in that: In S2, the stability judgment comprises: calculating standard deviation σ D (λ) of the continuous multiple dark current spectrum sampling results D (λ) < ε D , judging that the dark current spectrum is stable and valid; wherein σ D (λ) is the standard deviation of the dark current spectrum at wavelength λ, and ε D is the dark current stability threshold.

4. The dynamic reference calibration method for spectral measurement based on optical path switching as described in claim 1, characterized in that: In S3, the acquisition of the reference spectrum is achieved through periodic reference updates or triggered reference updates; The periodic reference update is to automatically update the reference spectrum according to a set time period; The triggered reference update is to immediately trigger reference spectrum acquisition when a change in light intensity exceeds a threshold, a change in temperature exceeds a threshold, a fluctuation in concentration results exceeds a threshold, or an abnormal event occurs.

5. The dynamic reference calibration method for spectral measurement based on optical path switching as described in claim 1, characterized in that: In S3, the multiple sampling averaging process includes: for N reference spectra collected under the same measurement conditions, after removing the maximum and minimum values, calculating the mean value to obtain the average reference spectrum, and using the average reference spectrum as the candidate reference spectrum.

6. The dynamic reference calibration method for spectral measurement based on optical path switching as described in claim 1, characterized in that: In S4, the intensity deviation determination includes: calculating the intensity deviation E1 between the candidate reference spectrum and the previous effective reference spectrum; if E1 < θ1, the intensity deviation determination passes; where E1 is the intensity deviation and θ1 is the intensity deviation threshold. Spectral correlation determination includes: calculating the correlation coefficient ρ between the candidate reference spectrum and the previous effective reference spectrum; if ρ > θ ρ If the spectral correlation is positive, then the spectral correlation determination is passed; where ρ is the spectral correlation coefficient, and θ... ρ The threshold for spectral correlation; The sampling stability assessment includes: calculating the standard deviation σ of multiple sampling results from the current reference spectrum acquisition. R If σ R <θ σ If the sampling stability is determined, then the sampling stability test is passed; where σ R θ represents the standard deviation of the reference spectrum sampling. σ This is the sampling stability threshold.

7. The dynamic reference calibration method for spectral measurement based on optical path switching as described in claim 1, characterized in that: In S5, the weighted reference spectrum is constructed based on the most recent m effective reference spectra, which are as follows: ; The weighted reference spectrum is: , in, These are the weighting coefficients. For the first The second most effective reference spectrum, and the weighting coefficients satisfy: , When the spectral measurement system is operating stably, a weighted reference spectrum is used. The sample calculation is participated in; when the drift evaluation index exceeds a preset threshold, the current effective reference spectrum is used. The primary mode.

8. The dynamic reference calibration method for spectral measurement based on optical path switching as described in claim 1, characterized in that: S6 also includes drift compensation, which includes: The current concentration result is corrected based on the average intensity variation trend of the most recent effective reference spectra in the reference band; or the baseline offset is calculated by selecting a non-characteristic absorption band and the absorbance result is baseline corrected.

9. The dynamic reference calibration method for spectral measurement based on optical path switching as described in claim 1, characterized in that: In S7, the drift evaluation index is calculated by weighting the change in light intensity of the reference band, the change in temperature, and the fluctuation of recent concentration results. The reference update cycle is negatively correlated with the drift evaluation index. When the spectral measurement system is stable, the reference update cycle is extended; when the drift of the spectral measurement system intensifies, the reference update cycle is shortened.

10. The dynamic reference calibration method for spectral measurement based on optical path switching as described in claim 1, characterized in that: The method further includes timing interlock control, which is used to constrain the execution conditions of S2, S3 and S6; The timing interlock control includes: In S2, dark current spectral acquisition is constrained to be performed under conditions of no effective incident light; In S3, the constrained reference spectrum acquisition is performed after the optical path switching bridge enters the reference position and the light source module is in a stable output state. In S6, constrained sample spectral acquisition is performed after the optical path switching bridge enters the sample measurement position; When there is no effective reference spectrum in the current period, the constraint spectral measurement system will not enter the formal sample calculation process or will enter a degraded operation mode and mark the result status.

11. The dynamic reference calibration method for spectral measurement based on optical path switching as described in claim 1, characterized in that: S8's degraded operation includes: when the spectral measurement system cannot obtain a new effective reference spectrum within a limited time, it continues to operate using the previous effective reference spectrum or weighted reference spectrum, and marks the measurement results as abnormal, while limiting the duration of the degraded operation.

12. The dynamic reference calibration method for spectral measurement based on optical path switching as described in claim 1, characterized in that: The spectral measurement system includes a light source module, a flow cell, a spectrometer, and an optical path switching bridge. The optical path switching bridge is located between the light source module and the flow cell, and can move between the reference position and the sample measurement position; When in the reference position, the light beam emitted by the light source module is deflected by the reflector on the optical path switching bridge and then directly enters the spectrometer; When in the sample measurement position, the light beam emitted by the light source module passes through the flow cell and enters the spectrometer.