Method for eliminating measurement error caused by transient fluctuation of light source signal

By using a benchmark-grouping method to screen signal values ​​of optical detection equipment, the problem of measurement error caused by light source signal fluctuations is solved, achieving low-cost, high-efficiency signal stability and repeatability.

CN121456321APending Publication Date: 2026-02-03HENAN SNOW CITY SOFT CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511711299.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-11-20
Publication Date
2026-02-03

AI Technical Summary

Technical Problem

Existing optical inspection equipment suffers measurement errors when the light source signal fluctuates briefly. Existing methods are costly or complex to debug, making it difficult to effectively eliminate measurement errors caused by light source signal fluctuations.

Method used

By comparing the signal values ​​before and after, and performing filtering and combination calculations, the optimal signal value is selected using the benchmark judgment-group combination method, thereby reducing hardware costs and computation speed.

Benefits of technology

It enables the rapid and low-cost elimination of measurement errors caused by fluctuations in the light source signal, thereby improving the repeatability and stability of the analyzer.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121456321A_ABST
    Figure CN121456321A_ABST
Patent Text Reader

Abstract

The invention provides a method for eliminating a measurement error caused by transient fluctuation of a light source signal, which comprises the following steps of: calculating N times of measured signal values before current acquisition to obtain a reference value; sequentially collecting a plurality of signal values, sorting the signal values in sequence, and rejecting head and tail signal values; sequentially calculating the difference values between the residual signal values at the head and the tail and the reference value, if the absolute value is greater than a preset threshold value, rejecting the group of signal values and returning, otherwise sequentially calculating the relationship between the absolute value of the difference values between the residual signal values and the reference value and the preset threshold value, and if the absolute value is smaller than the preset threshold value, sequentially assigning the signal values to the array Ey; if the signal values are greater than the preset threshold value U, assigning the signal values to the array Dz in sequence; when y is equal to 1, taking a first element as a final signal value; and when y is greater than or equal to 2, combining the related elements in the array Ey and the array Dz according to a certain method, calculating the absolute value of the difference between the average value of the combination and the reference value, and selecting the object with the minimum value in all the absolute values as a final signal value. The method is simple, rapid, low in cost and remarkable in effect.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the technical field of optical absorption detection, and in particular to a method for eliminating measurement errors caused by transient fluctuations in light source signals. Background Technology

[0002] Most quantitative analysis equipment on the market, including industrial online analysis equipment and laboratory analysis instruments, calculate the concentration of samples based on existing standard curves and the collected relevant signal values ​​of the samples when testing them.

[0003] Analytical methods based on optical detection technology rely on the Beer-Lambert law, which describes the relationship between the intensity of light absorption at a specific wavelength and the concentration of the absorbing substance and the thickness of the liquid layer. In practice, the signal value measured during each analysis is primarily obtained by acquiring the light emitted from the light source using a photodetector. This results in two signal values: a reference signal and a measured signal. These two signal values ​​are then analyzed using the formula... The final signal value can be obtained, and the concentration of the analyte in the sample can be determined based on the existing standard curve. Here, A represents absorbance. I 0 Let be the intensity of the incident monochromatic light. I t For the intensity of transmitted light, T Transmittance or light transmittance. c The concentration of the light-absorbing substance. K This is the absorption coefficient or molar absorption coefficient of the absorbent substance.

[0004] In the measurement, the reference signal value is the intensity of the incident monochromatic light. I 0 The measured signal value is the intensity of transmitted light. I t However, given the current development and technological updates in analytical equipment, such as quasi-dual-path and dual-path analysis technologies, the reference signal value can be the light intensity emitted by the light source after being absorbed by pure water, other phases, or the sample. This can effectively eliminate unrelated absorption interference from the analytical sample. In terms of products, the acquisition of reference and measurement signal values ​​can be performed simultaneously in the time domain, or sequentially, with the latter being more common in online analytical devices.

[0005] However, in the practical application of relevant analytical equipment, it is found that the light intensity emitted by the light source system does not always remain stable. Especially after long-term testing, there will be some aging issues. In this case, when collecting reference signals or measurement signals, the fluctuations in the light intensity emitted by the light source may be collected, which will be reflected as sudden changes in the signal value or the final calculated concentration.

[0006] Currently, the mainstream methods on the market for eliminating measurement errors caused by signal fluctuations due to transient fluctuations in the light source signal are mainly as follows: One approach involves using physical compensation or monitoring measures, such as feedback control technology, to control the current flowing through the luminescent fluid and automatically adjust the light intensity within a predetermined range, outputting a constant light intensity. This adds an extra feedback control system, which can automatically adjust the current passing through the light source based on the collected feedback signal to achieve constant light intensity. However, this method also increases cost and has a certain time delay, making it less suitable for the problem this invention aims to solve.

[0007] Another approach utilizes quasi-dual-path or dual-path optical analysis techniques. This involves using the difference between the reference signal and the measurement signal acquired by the quasi-dual-path or dual-path system as the effective signal to eliminate interference caused by light source fluctuations. This method adds an additional reference path to the measurement path in terms of hardware, utilizing the homogeneity of the two paths to eliminate light source signal fluctuations. While effective, this method requires precise setting of the light intensity signal ratio between the reference path and the measurement path, making debugging complex and difficult. It also makes it challenging to achieve homogeneous and equal-amplitude fluctuations in both paths, and is costly.

[0008] Other methods, such as normalization, still require a beam splitter and divide the light into two paths, adding hardware and making them relatively more complicated. Summary of the Invention

[0009] To address the technical problem that fluctuations in the acquired signal value caused by the transient instability of the optical system during signal acquisition, leading to abrupt changes in the concentration of the measured sample and affecting the performance of the analytical equipment, this invention proposes a method to eliminate measurement errors caused by transient fluctuations in the light source signal. Based on existing optical path systems, whether single-path, quasi-dual-path, or dual-path systems, the method can reasonably filter and combine the previously measured signals and the acquired signals to obtain the optimal signal value. This method is simple, fast, low-cost, and highly effective.

[0010] To achieve the above objectives, the technical solution of the present invention is implemented as follows: a method for eliminating measurement errors caused by transient fluctuations in light source signals, comprising the following steps: Step S1: Light source signal acquisition begins; Step S2: Analyze the N measured signal values ​​A1, A2...A1 prior to this acquisition. N Calculations were performed to obtain the reference value A0; Step S3: Collect n signal values ​​sequentially and sort them into signal values ​​B1, B2...B n Then discard the signal value B. n and B1; Step S4: Calculate signal values ​​B2 and B sequentially. n-1 The difference between each value and the reference value A0, if B2-A0>U or if B n-1 If -A0 < -U, then discard the signal value and return to step S3; otherwise, proceed to step S5; where U is a preset threshold. Step S5: Calculate the signal value B sequentially. x The relationship between the absolute value of the difference from the reference value A0 and the preset threshold U, if the signal value B x If the absolute value of the difference between the signal value B and the reference value A0 is less than the preset threshold U, then the signal value B will be... x Assign values ​​to array E in sequence y If signal value B x If the absolute value of the difference between the signal value B and the reference value A0 is greater than the preset threshold U, then the signal value B will be... x Assign values ​​to array D in sequence z ;in, x The range of values ​​for is 2...n-1. y The range of values ​​for is 1...n-2. z The range of values ​​for is 1…(n-2-y); Step S6: When y=1, take the first element of the array as the final signal value; if y≥2, compare the array E sequentially. y and array D z The absolute value of the difference between the average of all combinations of elements and the reference value A0 is used to select the object with the smallest absolute value as the final signal value. Step S7: Assign the final signal value to signal value A N The original signal value A N ...A2 is shifted one position to the right, and the initial signal value A1 is discarded; this signal acquisition ends.

[0011] Preferably, the light source signal is the transmitted light intensity signal of the light source system emitted by the light transmission detection cell, which is collected by a spectrometer, photodiode, or photomultiplier tube. The light source signal is emitted by a xenon lamp controlled by pulse PWM, and the light source signal is pulsed; The light source system that emits the light source signal is a pulsed light source system in PWM or PTO mode, or a constantly lit light source system; The value of N ranges from 5 to 20.

[0012] Preferably, the reference value A0 is the result of N previously measured signal values ​​A1, A2...A1. N Find the mean, median, or the mean of the two nearest neighbors above and below the mean of all numbers. The number of signal values ​​n ranges from 6 to 15; The signal values ​​B1, B2...B n Sort in ascending order.

[0013] Preferably, the preset threshold U ranges from 0 to 30 mV.

[0014] Preferably, the signal value B x Assign values ​​to array E in sequence y or array D z The values ​​are assigned in ascending order.

[0015] Preferably, the array E y and array D z The average of all combinations of elements in array E is y The average of all combinations of elements in array E and array E y and array D z The average of all combinations of elements.

[0016] Preferably, the array E y and array D z The average of all combinations of elements in array E is y The average of all combinations of elements in array E and array E y and array D z The average of any y elements.

[0017] Preferably, the array E y The average of all combinations of elements in is Where e takes values ​​ranging from 2 to n-2; i1 , i2 ... ie The values ​​of are 1...(n-2).

[0018] Preferably, the array E y and array D z The average of all combinations of elements in is ;in, f+k The range of values ​​for is 2...n-2; f The range of values ​​for is 2... e , k = ( e - f ) represents the array D z The number of elements in the summation; i1 , i2 ... if The range of values ​​for is 1...(n-2). j1 , j2 ... jk The range of values ​​for is 0…(n-2-y).

[0019] Preferably, the object with the minimum absolute value among all absolute values ​​is the average of the combinations with the smallest absolute value of the difference from the reference value A0; When y=1, array E y There is one element E1 in array D. z There are n-3 elements in the array, and only element E1 can be taken as the final signal value; when y=2, the array E y There are two elements, E1 and E2, in array D. z Given n-4 elements, find the average of the following 5 combinations: element E1, element E2, the average of elements E1 and E2, and the average of element E1 and array D. z The average of any n-4 elements, element E2 and array D z The average of any n-4 elements is used to calculate the absolute value of the difference between the average of the five combinations and the reference value A0. The average of the combinations with the smallest absolute difference is selected as the final signal value. When y=3, the array Ey has three elements E1, E2, and E3, and the array D... z Given n-5 elements, find the average of the following 13 combinations: element E1, element E2, element E3, the average of elements E1 and E2, the average of elements E1 and E3, the average of elements E2 and E3, the average of elements E1, E2, and E3, and the average of element E1 combined with array D. z The average of any two elements within a set of n-5 elements, and the relationship between elements E2 and D. z The average of any two elements within a set of n-5 elements, element E3 and array D z The average of any two elements within a set of n-5 elements, elements E1 and E2, and the array D z The average value of any 1 element within n-5 elements, elements E1 and E3, and the array D z The average of any 1 element within n-5 elements, elements E2 and E3, and the array D z The average value of any 1 element within the n-5 elements is calculated; the absolute value of the difference between the average value of these 13 combinations and the reference value A0 is calculated, and the average value of the combination with the smallest value is selected as the final signal value; the final signal value is calculated in the same way. After selecting a combination, calculate the average value and the absolute value of the difference between the average value and the reference value A0. Then select the next combination, calculate the average value and the absolute value of the difference between the average value and the reference value A0. When the absolute value of the difference is found to be 0, terminate the subsequent calculation and directly use the reference value A0 as the final signal value of this acquisition.

[0020] Compared with existing methods for eliminating measurement result fluctuations caused by light source fluctuations, the present invention has the following advantages: (1) Saves hardware costs and is fast: This invention uses a benchmark judgment-group combination calculation method to optimize and eliminate signal fluctuations caused by light source fluctuations. Compared with the current method of using a quasi-dual-path or dual-path analysis system and a light source feedback control system, it is lower in cost and faster.

[0021] (2) Better repeatability and stability: The present invention will take the average of the N signal values ​​measured previously as a benchmark. Then, based on all the signals collected in this measurement, the calculation of the relevant algorithm is based on this benchmark, which will ultimately make the analyzer more repeatable and stable. Attached Figure Description

[0022] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0023] Figure 1 This is a flowchart of the present invention.

[0024] Figure 2 This is a schematic diagram of the standard curve for photoacoustic spectroscopy measurement in this invention. Detailed Implementation

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

[0026] Example 1 like Figure 1 As shown, a method for eliminating measurement errors caused by transient fluctuations in the light source signal is described. The steps for eliminating measurement errors caused by transient fluctuations in the light source signal are as follows: Step S1: Signal acquisition begins; The transmitted light intensity signal emitted by the light source system in the transmittance detection cell is collected using detectors such as spectrometers, photodiodes, or photomultiplier tubes.

[0027] Step S2: Based on the N measured signal values ​​A1, A2...A prior to this acquisition... N The calculation yields the reference value A0.

[0028] Currently, water quality analyzers typically use six numbers to calculate repeatability. This invention allows for a range of values ​​from 5 to 20. The optimal number of times N is calculated is 5.

[0029] Reference value A0 is the result of N previous measurement signal values ​​A1, A2...A N The mean is obtained, and subsequent calculations can also be based on other rules, such as the median, the mean of the two nearest neighbors to the mean of all numbers, etc. Using the mean, median, etc. of the N signal values ​​collected in the previous N measurements as a benchmark for subsequent algorithm processing, we can obtain the final signal value collected in this measurement. This will improve the repeatability of the final data calculation.

[0030] Step S3: Turn on the light source system, sequentially collect n signal values, and sort them in order as signal values ​​B1, B2...B n Then turn off the light source system and discard the signal value B. n And B1.

[0031] The light source system of the present invention can be a pulsed light source system in PWM or PTO mode, or a constantly lit light source system, such as a light-emitting LED or a near-mid-infrared light source system, or a signal system that can be acquired by other types of acquisition sensors, without limitation.

[0032] In a preferred embodiment, the light source is a xenon lamp controlled by pulsed PWM. The light signal emitted by the PWM light source is pulsed, unlike the continuous light emitted by conventional LED light sources, making the light source system complex.

[0033] This type of light source is a continuous light source with a lifespan of 10 flashes. 9 Each measurement requires 3 signal acquisitions, and each signal acquisition requires the xenon lamp to flash 8 times, for a total of 24 flashes. Too many flashes will shorten the lifespan of the light source; the range is 6 to 15 flashes. Preferably, the value of n for the acquired signal values ​​is 8.

[0034] The signal values ​​are ordered sequentially as B1, B2...B n It is sorted from smallest to largest, where the signal value B n The maximum value is B1, and the minimum value is B2. Discard the signal value B1. n B1 can easily eliminate subsequent calculation interference caused by a single abnormal signal value with large mutation, which is a routine step.

[0035] Step S4: Calculate signal values ​​B2 and B sequentially. n-1 The difference between each value and the reference value A0, if B2-A0>U or if B n-1 If -A0 < -U, then discard the signal value and return to step S3; otherwise, proceed to step S5.

[0036] The first step of signal judgment is performed on the signal after the preliminary processing in step S3 before the signal grouping in step S5, because the signal grouping in step S5 is based on the signal values ​​B2, ..., B in step S4. n-1 (Sorted from smallest to largest, B2 is the smallest, B) n-1 (Maximum), among this series of signal values, there must be a signal value that satisfies |B m -A0|<U (m ranges from 2 to n-1), otherwise B2-A0>U or if B n-1 The signal values ​​B2, ..., B in the two cases where -A0 < -U are both present. n-1 All signal values ​​deviated from the reference value A0 by more than U, ultimately resulting in poor performance in improving signal stability.

[0037] The range of the preset threshold U should be selected according to the system requirements. As a preferred implementation, the preset threshold U is 0–30 mV. This range is based on the light intensity level emitted by the PWM pulse xenon lamp of the current total nitrogen analyzer (e.g., the reference level is around 3200 mV, and the measurement signal is around 1200 mV), and the repeatability requirements (2%) of the existing online analytical instrument standards. When the signal threshold is 30 mV, the resulting concentration fluctuation may be greater than 0.2 mg / L, and the final repeatability will be close to 2%. Therefore, a value smaller than this range is beneficial to improving repeatability.

[0038] Step S5: If the two judgment conditions in step S4 are not met, then calculate the signal value B sequentially. x The relationship between the absolute value of the difference from A0 and the preset threshold U, where x takes values ​​from 2 to n-1, if signal value B x If the absolute value of the difference between A0 and B0 is less than the preset threshold U, then the corresponding signal value B will be... x Assign values ​​to array E in sequence y Where the value of y ranges from 1 to n-2, if the signal value B x If the absolute value of the difference between A0 and B0 is greater than the preset threshold U, then the corresponding signal value B will be... x Assign values ​​to array D in sequence z , where z takes values ​​from 1 to (n-2-y).

[0039] Signal value B x Assign values ​​to array E in sequence y or array D z The values ​​are assigned in ascending order. This sorting reduces the number of calculations required by the system to find the average of different combinations of elements for the final signal value.

[0040] Step S6: When y=1 in step S5, take E1 as the final signal value; if y≥2, compare the array E sequentially.y The average of all combinations of elements in array E and array E y and array D z The absolute value of the difference between the average of any y elements and the reference value A0 is selected as the final signal value.

[0041] Array E y The average of all elements is Array E y and array D z The average of all elements is Where e takes values ​​from 2 to n-2, representing the total number of sums; i1 , i2 ... ie The values ​​of are 1 to n-2, but none of them are equal; f+k The value range of is 2...n-2, representing two arrays E. y and D z The total number of sums; f The value range of is 2...e, indicating that for array E y The number of elements to be summed. k = ( e - f ) represents the array D z The number of elements to be summed; the values ​​of i1, i2, ... if range from 1 to (n-2), but are all unequal; the values ​​of j1, j2, ... jk range from 0 to (n-2-y), but are all unequal. This grouping and averaging algorithm is more efficient than the traditional moving average filtering algorithm and can obtain a signal value combination that is closer to A0, while traditional moving average methods are prone to missing the final signal value after this optimal element combination.

[0042] When y=1, array E y There is one element E1 in the array, and the array Dz has n-3 elements. In this case, only element E1 can be taken as the final signal value; when y=2, the array E y There are two elements, E1 and E2, in array D. z The array then contains n-4 elements. We need to calculate the average of the following five combinations: combination E1, combination E2, the average of combinations E1 and E2, and the sum of the values ​​of combination E1 and array D. z The average of any n-4 elements, combined with array D. z The average of any n-4 elements is calculated, and then the absolute value of the difference between the average of these five combinations and the reference value A0 is calculated. The average of the combinations with the smallest absolute difference is selected as the final signal value. When y=3, the array E... yThere are 3 elements E1, E2, and E3 in array D. z There are n-5 elements in the array. We need to calculate the average of the following 13 combinations: combination E1, combination E2, combination E3, the average of combinations E1 and E2, the average of combinations E1 and E3, the average of combinations E2 and E3, the average of combinations E1, E2, and E3, and the average of combination E1 and array D. z The average value of any two elements within a set of n-5 elements, and the combination E2 and D. z The average of any two elements within a set of n-5 elements, combination E3, and array D z The average of any two elements within a set of n-5 elements, combinations E1 and E2, and array D. z The average of any 1 element within a set of n-5 elements, combinations E1 and E3, and array D. z The average value of any 1 element within a set of n-5 elements, combinations E2 and E3, and array D. z The average value of any 1 element within the n-5 elements is calculated. Then, the absolute value of the difference between the average value of these 13 combinations and the reference value A0 is calculated. The average value of the combination with the smallest value is selected as the final signal value. The final signal value is calculated in the same way for different values ​​of y.

[0043] The order of calculation for the absolute value of the difference between the mean of all combination values ​​and the reference value A0 is as follows: first, calculate the mean of all combinations; then calculate and judge the absolute value of the difference between these means and the reference value A0; finally, select the minimum value. The minimum absolute value refers to the average of the combinations with the smallest absolute difference from the reference value A0.

[0044] Alternatively, as another implementation, one can select a combination, calculate its average value and the absolute value of the difference between this average and the reference value A0, and then select the next combination, calculating the same average and the absolute value of the difference between this average and the reference value A0. During this latter selection process, if the absolute value of the difference is found to be 0, the subsequent calculation can be terminated, and the reference value A0 can be directly used as the final signal value for this acquisition. First, calculate the average value of all combinations, and then calculate the absolute value of the difference between each combination's average value and the reference value A0. Here, the process is repeated: first, calculate the average value of one combination, then calculate the absolute value of the difference between that average and the reference value A0, then calculate the average value of the next combination, and so on.

[0045] Calculate the absolute value of the difference between all combined values ​​and the reference value A0. Alternatively, you can calculate the absolute value of the difference between the value obtained from the median of all combined values ​​and the reference value A0.

[0046] Step S7: Assign the final signal value to variable A N The original variable A NUpdate to variable A N-1 Similarly, the initial signal value A1 from this acquisition is discarded; signal acquisition ends.

[0047] In this invention, the number of N and n is not limited.

[0048] The sorting rules involved in this invention are not limited to any particular type, but can be used as needed. The control and calculation system of this invention can be a PLC system, a microcontroller, or other systems; this invention makes no limitations on these types of systems.

[0049] Example 2 like Figure 1 As shown, a method for eliminating measurement errors caused by transient fluctuations in light source signals, applied in the measurement of total nitrogen in water, employs an optical detection device consisting of a xenon lamp, a flow-through cuvette, structural components, and a spectrometer. The flow-through cuvette has a xenon lamp and a collimating lens at each end, with the other end of the collimating lens connected to the spectrometer via an anti-attenuation optical fiber. The main steps involved in acquiring the light source signal in this embodiment are as follows: (A1) Signal acquisition begins; (A2) The controller first stores the signal values ​​measured in the previous 5 times in chronological order into an integer array I with 5 array elements, and calculates the average value of the 5 signal values; (A3) The controller turns on the xenon lamp and uses a spectrometer to continuously collect the signal values ​​of the light emitted by the xenon lamp passing through the cuvette 8 times. The values ​​are then sorted in ascending order, while the minimum and maximum values ​​are discarded and the middle 6 signal values ​​are retained. (A4) First, determine whether the absolute value of the difference between the maximum and minimum values ​​of the 6 signal values ​​in step (A3) and the average value in step (A2) is greater than 30mV. If it is greater, discard the group of signal values ​​and repeat steps (A3) and (A4). If it is less than 30mV, determine whether the absolute value of the difference between the 6 signal values ​​and the average value in step (A2) is greater than 30mV. Store the values ​​less than 30mV in array II, and store the values ​​greater than or equal to 30mV in array III. (A5) First, calculate the absolute value of the difference between the average value of different combinations of the number of elements in array II and the average value in step (A2). Then, calculate the absolute value of the difference between the average values ​​of different combinations of the number of elements in array II and array III in a certain way. Select the average value corresponding to the minimum value as the final signal value. (A6) Discard the first element in array I from step (A2), shift the next 4 elements one position forward in turn, and then update the last position in array I with the final signal value collected in step (A5). (A7) The signal acquisition is complete.

[0050] Table 1 below shows the measurement results of total nitrogen water quality using an online device based on this method.

[0051] Table 1 Signal Acquisition Calculation Results Table 2 below shows the measurement results of total nitrogen in water quality using online equipment without employing this method: Table 2 Measurement results before optimization A comparison of Tables 1 and 2 shows that the optimized acquisition signal is more stable than the unoptimized signal. For example, when comparing the voltage value at the reference 220nm, an abnormal value of 343mV appeared before optimization, while the signal value did not fluctuate abnormally after optimization, and the overall signal repeatability was improved.

[0052] Example 3 like Figure 1 As shown, a method for eliminating measurement errors caused by transient fluctuations in light source signals is applied in photoacoustic spectroscopy measurement. In this application example, an optical detection device consisting of a butterfly-shaped narrowband single-mode fiber laser, a collimating lens, a photoacoustic cell, and a condenser microphone is used. The narrowband single-mode fiber laser is connected to another narrowband single-mode fiber laser. The laser emitted by the narrowband single-mode fiber laser passes through the collimating lens into the photoacoustic cell. A microphone is installed in the photoacoustic cell. The photoacoustic signal output by the microphone is connected to the acquisition device through a lock-in amplifier.

[0053] The main steps involved in acquiring the light source signal in this implementation example are as follows: (A1) Signal acquisition begins; (A2) The controller first stores the signal values ​​measured in the previous 5 times in chronological order into an integer array I with 5 array elements, and calculates the average value of the 5 signal values; (A3) The controller turns on the laser driver and uses the microphone to continuously collect the signal values ​​of the light emitted by the narrowband single-mode fiber laser through the photoacoustic cell 50 times. The signals are sorted in ascending order, while the minimum and maximum values ​​are discarded and the middle 48 signal values ​​are retained. (A4) First, determine whether the absolute value of the difference between the maximum and minimum values ​​of the 48 signal values ​​in step (A3) and the average value in step (A2) is greater than 50mV. If it is greater, discard the signal values ​​and repeat steps (A3) and (A4). If it is less than 50mV, determine whether the absolute value of the difference between the 6 signal values ​​and the average value in step (A2) is greater than 50mV. Store the values ​​less than 50mV in array II, and store the values ​​greater than or equal to 50mV in array III. (A5) First, calculate the absolute value of the difference between the average value of different combinations of the number of elements in array II and the average value in step (A2). Then, calculate the absolute value of the difference between the average values ​​of different combinations of the number of elements in array II and array III in a certain way. Select the average value corresponding to the minimum value as the final signal value. (A6) Discard the first element in array I from step (A2), shift the next 4 elements one position forward in turn, and then update the last position in array I with the final signal value collected in step (A5). (A7) The signal acquisition is complete.

[0054] Table 3 below shows the measurement results of the photoacoustic spectroscopy module based on this method.

[0055] Table 3. Results of photoacoustic spectroscopy measurements As can be seen from Table 3, the accuracy of the results measured with different concentrations of standard gas (excluding zero point) using this signal processing method meets the indication error requirement of ±10%. Figure 2 The standard curve for photoacoustic spectroscopy determination is obtained by... Figure 2 It can be seen that the measurement results of the equipment after processing by the present invention have good linearity and better stability.

[0056] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.

Claims

1. A method for eliminating measurement errors caused by transient fluctuations in light source signals, characterized in that the steps include... include: Step S1: Light source signal acquisition begins; Step S2: Analyze the N measured signal values ​​A1, A2...A1 prior to this acquisition. N Calculations were performed to obtain the reference value A0; Step S3: Collect n signal values ​​sequentially and sort them into signal values ​​B1, B2...B n Then discard the signal value B. n and B1; Step S4: Calculate signal values ​​B2 and B sequentially. n-1 The difference between each value and the reference value A0, if B2-A0>U or if B n-1 If -A0 < -U, then discard the signal value and return to step S3; otherwise, proceed to step S5; where U is a preset threshold. Step S5: Calculate the signal value B sequentially. x The relationship between the absolute value of the difference from the reference value A0 and the preset threshold U, if the signal value B x If the absolute value of the difference between the signal value B and the reference value A0 is less than the preset threshold U, then the signal value B will be... x Assign values ​​to array E in sequence y If signal value B x If the absolute value of the difference between the signal value B and the reference value A0 is greater than the preset threshold U, then the signal value B will be... x Assign values ​​to array D in sequence z ;in, x The range of values ​​for is 2...n-1. y The range of values ​​for is 1...n-2. z The range of values ​​for is 1…(n-2-y); Step S6: When y=1, take the first element of the array as the final signal value; if y≥2, compare the array E sequentially. y and array D z The absolute value of the difference between the average of all combinations of elements and the reference value A0 is used to select the object with the smallest absolute value as the final signal value. Step S7: Assign the final signal value to signal value A N The original signal value A N ...A2 is shifted one position to the right, and the initial signal value A1 is discarded; this signal acquisition ends.

2. The method for eliminating measurement errors caused by transient fluctuations in the light source signal according to claim 1, characterized in that, The light source signal is the transmitted light intensity signal emitted by the light source system through the transmittance detection cell, which is collected using a spectrometer, photodiode, or photomultiplier tube. The light source signal is emitted by a xenon lamp controlled by pulse PWM, and the light source signal is pulsed; The light source system that emits the light source signal is a pulsed light source system in PWM or PTO mode, or a constantly lit light source system; The value of N ranges from 5 to 20.

3. The method for eliminating measurement errors caused by transient fluctuations in the light source signal according to claim 2, characterized in that, The reference value A0 is the result of N previous measurement signal values ​​A1, A2...A N Find the mean, median, or the mean of the two nearest neighbors above and below the mean of all numbers. The number of signal values ​​n ranges from 6 to 15; The signal values ​​B1, B2...B n Sort in ascending order.

4. The method for eliminating measurement errors caused by transient fluctuations in the light source signal according to any one of claims 1-3, characterized in that, The preset threshold U ranges from 0 to 30mV.

5. The method for eliminating measurement errors caused by transient fluctuations in the light source signal according to claim 4, characterized in that, The signal value B x Assign values ​​to array E in sequence y or array D z The values ​​are assigned in ascending order.

6. The method for eliminating measurement errors caused by transient fluctuations in the light source signal according to any one of claims 1-3 and 5, characterized in that, The array E y and array D z The average of all combinations of elements in array E is y The average of all combinations of elements in array E and array E y and array D z The average of all combinations of elements.

7. The method for eliminating measurement errors caused by transient fluctuations in the light source signal according to claim 6, characterized in that, The array E y and array D z The average of all combinations of elements in array E is y The average of different combinations of numbers of elements and array E y and array D z The average of any y elements in the set.

8. The method for eliminating measurement errors caused by transient fluctuations in the light source signal according to claim 7, characterized in that, The array E y The average of all combinations of elements in is Where e takes values ​​ranging from 2 to n-2; i1 , i2 ... ie The values ​​of are 1...(n-2).

9. The method for eliminating measurement errors caused by transient fluctuations in the light source signal according to claim 8, characterized in that, The array E y and array D z The average of all combinations of elements in is ;in, f+k The range of values ​​for is 2...n-2; f The range of values ​​for is 2... e , k = ( e - f ) represents the array D z The number of elements in the summation; i1 , i2 ... if The range of values ​​for is 1...(n-2). j1 , j2 ... jk The range of values ​​for is 0…(n-2-y).

10. The method for eliminating measurement errors caused by transient fluctuations in the light source signal according to claim 9, characterized in that, The object with the minimum absolute value among all absolute values ​​is the average of the combinations with the smallest absolute difference from the reference value A0; When y=1, array E y There is one element E1 in array D. z There are n-3 elements in the array, and only element E1 can be taken as the final signal value; when y=2, the array E y There are two elements, E1 and E2, in array D. z Given n-4 elements, find the average of the following 5 combinations: element E1, element E2, the average of elements E1 and E2, and the average of element E1 and array D. z The average of any n-4 elements, element E2 and array D z The average of any n-4 elements is used to calculate the absolute value of the difference between the average of the five combinations and the reference value A0. The average of the combinations with the smallest absolute difference is selected as the final signal value. When y=3, the array Ey has three elements E1, E2, and E3, and the array D... z Given n-5 elements, find the average of the following 13 combinations: element E1, element E2, element E3, the average of elements E1 and E2, the average of elements E1 and E3, the average of elements E2 and E3, the average of elements E1, E2, and E3, and the average of element E1 combined with array D. z The average of any two elements within a set of n-5 elements, and the relationship between elements E2 and D. z The average of any two elements within a set of n-5 elements, element E3 and array D z The average of any two elements within a set of n-5 elements, elements E1 and E2, and the array D z The average value of any 1 element within n-5 elements, elements E1 and E3, and the array D z The average of any 1 element within n-5 elements, elements E2 and E3, and the array D z The average value of any 1 element within the n-5 elements is calculated; the absolute value of the difference between the average value of these 13 combinations and the reference value A0 is calculated, and the average value of the combination with the smallest value is selected as the final signal value; the final signal value is calculated in the same way. After selecting a combination, calculate the average value and the absolute value of the difference between the average value and the reference value A0. Then select the next combination, calculate the average value and the absolute value of the difference between the average value and the reference value A0. When the absolute value of the difference is found to be 0, terminate the subsequent calculation and directly use the reference value A0 as the final signal value of this acquisition.