A marine ammonia gas analysis detection method, system, storage medium and program product

By controlling the infrared light source to alternately emit two beams of infrared light, spectral data is obtained to determine temperature and concentration, solving the accuracy and reliability problems of traditional marine ammonia detection methods and realizing high-precision ammonia analysis.

CN119959176BActive Publication Date: 2025-12-26SIGAS MEASUREMENT ENG CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411961158.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-12-30
Publication Date
2025-12-26
Estimated Expiration
2044-12-30

AI Technical Summary

Technical Problem

Traditional marine ammonia detection methods suffer from low detection accuracy, susceptibility to interference, and short service life. Furthermore, quantum cascade lasers are sensitive to temperature changes, leading to a decrease in the reliability and accuracy of the detection system.

Method used

By controlling the infrared light source to alternately emit two infrared beams located at the characteristic absorption peak of the gas to be measured and the reference range, the spectral data of the transmitted beam is obtained. The actual temperature value is determined by utilizing the characteristic that the reference range is not affected by the gas concentration. Matching target reference spectral data is selected, and the beam wavelength is adjusted by the position offset of the spectral data to improve the detection accuracy.

Benefits of technology

It reduces measurement errors caused by temperature changes, improves the reliability of the detection system and the accuracy of ammonia analysis, and enhances the robustness of temperature measurement and the rapid response capability of wavelength adjustment.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119959176B_ABST
    Figure CN119959176B_ABST
Patent Text Reader

Abstract

The application provides a marine ammonia gas analysis and detection method, system, storage medium and program product. An infrared light source is controlled to alternately emit a first infrared light beam and a second infrared light beam within a preset time period; spectral data of a first transmitted light beam and a second transmitted light beam are collected; an actual temperature value of a to-be-detected gas is determined based on the spectral data of the second transmitted light beam; target reference spectral data are selected; a position offset is calculated; the wavelength of the first infrared light beam emitted by the infrared light source is adjusted based on the position offset, so that the wavelength of the first infrared light beam is matched with the characteristic absorption peak wavelength of the target reference spectral data; spectral data of a third transmitted light beam formed by the adjusted first infrared light beam passing through the to-be-detected gas are collected; and the spectral data of the third transmitted light beam are compared with the target reference spectral data to obtain a concentration value of the to-be-detected gas. In the method, the reliability of the detection system is improved, and the accuracy of ammonia gas analysis and detection is improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The application belongs to the field of gas analysis, and particularly relates to a marine ammonia analysis and detection method and system, a storage medium and a program product. BACKGROUND

[0002] With the rapid development of the shipping industry, the safe operation of liquid ammonia transport ships has become a focus of attention. The leakage of marine ammonia not only threatens the safety of the crew's life, but also may cause environmental pollution problems. At present, the traditional marine ammonia detection method mainly relies on electrochemical sensors, which has the problems of low detection precision, easy interference, short service life and the like, and is difficult to meet the actual needs of the safe operation of ships.

[0003] In the related art, the mid-infrared light generated by the quantum cascade laser can be used to selectively absorb the ammonia molecules, and the accurate detection of the ammonia concentration can be realized by measuring the absorption spectrum. The system has the advantages of high detection sensitivity, good selectivity, fast response speed and the like, and effectively reduces the limitations of the traditional detection method.

[0004] However, the quantum cascade laser is very sensitive to temperature changes. In the complex and changeable environment of the ship, the working wavelength of the laser is easy to drift, and a complex temperature control system is needed to maintain stability, which increases the power consumption of the system, reduces the reliability of the detection system, and further reduces the accuracy of ammonia analysis and detection. SUMMARY

[0005] The application provides a marine ammonia analysis and detection method, system, storage medium and program product, which is used to improve the reliability of the detection system and further improve the accuracy of ammonia analysis and detection.

[0006] In a first aspect, the application provides a marine ammonia analysis and detection method, which controls an infrared light source to alternately emit a first infrared light beam and a second infrared light beam within a preset time period, the wavelength of the first infrared light beam is located in the characteristic absorption peak wavelength range of the absorption spectrum of the to-be-detected gas, and the wavelength of the second infrared light beam is located in the reference interval wavelength range of the absorption spectrum of the to-be-detected gas;

[0007] Spectrum data of a first transmitted light beam and a second transmitted light beam formed after the first infrared light beam and the second infrared light beam pass through the to-be-detected gas are collected;

[0008] Based on the spectrum data of the second transmitted light beam, an actual temperature value of the to-be-detected gas is determined, and the spectrum data in the reference interval wavelength range is not affected by the concentration of the to-be-detected gas;

[0009] According to the actual temperature value, target reference spectrum data matched with the actual temperature value is selected from a plurality of groups of preset reference spectrum data, and each group of reference spectrum data corresponds to different temperature conditions;

[0010] calculating a position offset of the spectral data of the first transmitted light beam relative to the target reference spectral data;

[0011] based on the position offset, adjusting a wavelength of the first infrared light beam emitted by the infrared light source so that the wavelength of the first infrared light beam matches a characteristic absorption peak wavelength of the target reference spectral data;

[0012] acquiring spectral data of a third transmitted light beam formed by the adjusted first infrared light beam passing through the gas to be measured;

[0013] comparing the spectral data of the third transmitted light beam with the target reference spectral data to obtain a concentration value of the gas to be measured.

[0014] By using the above technical solution, by controlling the infrared light source to alternately emit two infrared light beams located in the wavelength range of the characteristic absorption peak of the gas to be measured and the reference interval, the spectral data of the transmitted light beam is obtained, the actual temperature value is determined by using the characteristic that the reference interval is not affected by the concentration of the gas, and then the matching target reference spectral data is selected. The position offset of the spectral data relative to the target reference spectrum is calculated and the wavelength of the light beam is adjusted accordingly to match the wavelength of the characteristic absorption peak, and finally the accurate concentration value is obtained by comparison. This scheme reduces the measurement error caused by temperature change by selecting the reference spectrum after determining the temperature by the reference interval spectrum, improves the reliability of the detection system, and further improves the accuracy of ammonia gas analysis and detection.

[0015] In combination with some embodiments of the first aspect, in some embodiments, based on the spectral data of the second transmitted light beam, the actual temperature value of the gas to be measured is determined, specifically including:

[0016] wavelet-decomposing the spectral data of the second transmitted light beam to obtain temperature characteristic coefficients of different frequency components;

[0017] constructing a temperature characteristic vector based on the temperature characteristic coefficients, the temperature characteristic vector including amplitude ratios and phase differences of the frequency components;

[0018] matching the temperature characteristic vector with a preset temperature calibration curve to obtain the actual temperature value of the gas to be measured, the temperature calibration curve representing the corresponding relationship between the temperature characteristic vector and the actual temperature.

[0019] By adopting the technical scheme, the wavelet decomposition method is adopted to process the reference interval spectrum data, the temperature characteristic coefficients of different frequency components are extracted, the temperature characteristic vector containing the amplitude ratio and the phase difference is constructed, and the actual temperature value is obtained by matching with the temperature calibration curve. The temperature measurement scheme based on multi-scale analysis can separate the feature information related to the temperature in the spectrum data, and reduce the interference of other environmental factors. The temperature characteristic vector is constructed by two dimensions of the amplitude ratio and the phase difference, the expression ability of the temperature characteristic is enhanced, and the robustness of the temperature measurement is improved. The temperature calibration curve reflects the corresponding relationship between the characteristic vector and the actual temperature, so that the temperature measurement process has traceability and repeatability.

[0020] In some embodiments in combination with the first aspect, specifically adjusting the wavelength of the first infrared light beam emitted by the infrared light source comprises:

[0021] calculating the offset components of the position offset in different wavelength intervals;

[0022] performing weighted calculation on the offset components to obtain the wavelength compensation value, and the weight coefficient of the weighted calculation is inversely proportional to the temperature sensitivity of each wavelength interval;

[0023] adjusting the driving current of the infrared light source based on the wavelength compensation value, so that the wavelength of the first infrared light beam matches the characteristic absorption peak wavelength of the target reference spectrum data.

[0024] By adopting the technical scheme, the offset components of different wavelength intervals are calculated, and the weight coefficient is determined according to the inverse relationship of the temperature sensitivity to perform weighted calculation to obtain the wavelength compensation value, and the driving current of the infrared light source is adjusted accordingly to realize wavelength correction, thereby reducing the influence of temperature fluctuation on wavelength adjustment. The wavelength compensation is realized by adjusting the driving current, which reduces the hysteresis and instability of the mechanical adjustment mode, so that the wavelength adjustment has fast response capability, can accurately adjust the wavelength of the emitted light beam to the position matched with the characteristic absorption peak, and improves the accuracy of concentration measurement.

[0025] In some embodiments in combination with the first aspect, after comparing the spectrum data of the third transmitted light beam with the target reference spectrum data to obtain the concentration value of the to-be-measured gas, the method further comprises:

[0026] taking the first preset time length as a reference period, and alternately executing the short-period detection sequence and the long-period detection sequence in each reference period;

[0027] performing differential operation on the concentration values obtained by the short-period detection sequence and the long-period detection sequence to extract the concentration mutation feature;

[0028] when the concentration mutation feature is detected, the sampling period of the short-period detection sequence is sequentially halved according to a preset rule until a preset response limit is reached.

[0029] suspending the long-period detection sequence.

[0030] By adopting the technical solutions, the short-period and long-period detection sequences are alternately performed in the reference period, the concentration mutation feature is extracted through differential operation, the sampling strategy is dynamically adjusted when the mutation is detected. After the mutation feature is detected, the sampling period of the short-period detection sequence is gradually halved and the long-period detection is suspended, so that the detection resources are reasonably allocated. When the gas concentration is stable, the normal detection rhythm is maintained, and when the mutation occurs, the sampling frequency is quickly increased, the rapid response capability to the mutation signal is improved, and the waste of computing resources is reduced. Through the dynamic adjustment of the detection sequence, the system resource utilization efficiency is optimized while the detection sensitivity is ensured, so that the detection process is more intelligent and efficient.

[0031] In combination with some embodiments of the first aspect, in some embodiments, the concentration values obtained by the short-period and long-period detection sequences are subjected to differential operation to extract the concentration mutation feature, specifically comprising:

[0032] first-order differential values and second-order differential values of the short-period and long-period detection sequences are respectively calculated;

[0033] in the short-period detection sequence, when the absolute value of the first-order differential value is greater than a first threshold value and the sign of the second-order differential value changes, a rapid mutation feature is determined;

[0034] in the long-period detection sequence, when the first-order differential values of consecutive multiple detection periods have the same sign and the amplitude gradually increases, a gradual change feature is determined.

[0035] By adopting the technical solutions, the first-order differential values and second-order differential values of the short-period and long-period detection sequences are respectively calculated, a double determination mechanism is established to identify the change feature of the gas concentration. In the short-period detection sequence, the joint determination condition of the first-order differential absolute value and the second-order differential sign change is introduced, so that the rapid mutation process of the gas concentration can be accurately captured, and the misjudgment caused by a single criterion can be reduced. In the long-period detection sequence, the sign and amplitude change trend of the first-order differential value of consecutive multiple periods are analyzed, so that the gradual change process of the gas concentration can be reliably identified. The determination mode of the double sequences in cooperation ensures timely response to the rapid mutation and accurately tracks the gradual change process, so that the accuracy and reliability of the extraction of the gas concentration mutation feature are improved. The multi-dimensional analysis method based on the differential feature reduces the interference of environmental noise and measurement fluctuation on the determination result, so that the system has stronger anti-interference ability and higher detection stability.

[0036] In combination with some embodiments of the first aspect, in some embodiments, after the long-period detection sequence is suspended, the method further comprises:

[0037] compensate the wavelength of the short-period detection sequence based on the detection data at the end of the suspended long-period detection sequence;

[0038] insert a reverse scanning sequence once after each preset number of short-period detections, the wavelength of the reverse scanning sequence changing in a direction opposite to that of the short-period detection sequence;

[0039] compare the detection results of the reverse scanning sequence with the short-period detection sequence to eliminate the cumulative effect of wavelength drift.

[0040] By using the above technical solutions, the wavelength of the short-period detection sequence is compensated based on the data at the end of the suspended long-period detection sequence, reducing the wavelength shift of the detection system caused by changes in the external environment. The reverse scanning sequence is inserted in the short-period detection process, and complementary detection data is obtained through reverse wavelength changes, so that the detection system can maintain high-frequency sampling while making real-time corrections to wavelength drift. The alternative execution of the reverse scanning sequence and the short-period detection sequence forms a closed-loop calibration mechanism, suppressing the cumulative effect of wavelength drift. Through dynamic compensation of wavelength drift, the wavelength accuracy of the short-period high-frequency detection process is improved, ensuring the measurement accuracy under high-frequency sampling conditions. The combination of wavelength compensation and reverse scanning enhances the self-calibration capability of the detection system, enabling the system to maintain stable detection performance during long-term operation.

[0041] In some embodiments of the first aspect, the detection results of the reverse scanning sequence are compared with the short-period detection sequence to eliminate the cumulative effect of wavelength drift, specifically including:

[0042] extracting the detection results of the reverse scanning sequence and the short-period detection sequence in the time overlap interval;

[0043] performing Fourier transform on the detection results in time sequence and reverse sequence respectively to obtain sequence transform results and reverse sequence transform results;

[0044] calculating the phase difference between the sequence transform results and the reverse sequence transform results, and taking the phase difference as the wavelength drift amount;

[0045] adjusting the reference wavelength of the short-period detection sequence according to the wavelength drift amount.

[0046] By adopting the technical scheme, the detection results of the reverse scanning sequence and the short period detection sequence in the time overlapping interval are extracted, and the detection results are subjected to Fourier transform in sequence and reverse sequence, so that phase difference information reflecting wavelength shift characteristics is obtained. The phase difference analysis method converts wavelength shift in time domain into frequency domain characteristics, and provides more accurate calculation basis for wavelength shift amount. The compensation mechanism realizes accurate correction of wavelength shift by adjusting the reference wavelength of the short period detection sequence. The Fourier transform cooperates with the data processing method of phase difference analysis, improves the calculation accuracy of the wavelength shift amount, and makes the wavelength calibration process have better anti-interference performance and reliability.

[0047] In a second aspect, the embodiments of the present application provide a marine ammonia gas analysis and detection system, which comprises one or more processors and a memory; the memory is coupled with the one or more processors, and is used to store computer program codes, the computer program codes comprising computer instructions, and the one or more processors invoke the computer instructions to enable the system to perform the method described in the first aspect and any possible implementation manner of the first aspect.

[0048] In a third aspect, the embodiments of the present application provide a computer readable storage medium comprising instructions, which, when executed on a system, cause the system to perform the method described in the first aspect and any possible implementation manner of the first aspect.

[0049] In a fourth aspect, the embodiments of the present application provide a computer program product, characterized in that when the computer program product is executed on a system, the system performs the method described in any possible implementation manner of the first aspect.

[0050] The one or more technical solutions provided in the embodiments of the present application have at least the following technical effects or advantages:

[0051] 1. The present application provides a marine ammonia gas analysis and detection method, which, by adopting the technical scheme, controls the infrared light source to alternately emit two infrared lights located in the wavelength range of the characteristic absorption peak of the gas to be measured and the wavelength range of the reference interval, acquires the spectral data of the transmitted light beam, determines the actual temperature value by using the characteristic that the reference interval is not affected by the gas concentration, and then selects the matching target reference spectral data. The position offset of the spectral data relative to the target reference spectrum is calculated, and the wavelength of the light beam is adjusted accordingly to match the wavelength of the characteristic absorption peak, and finally the accurate concentration value is obtained by comparison. This scheme reduces the measurement error caused by temperature change by determining the temperature through the reference interval spectrum and then selecting the reference spectrum, improves the reliability of the detection system, and further improves the accuracy of ammonia gas analysis and detection.

[0052] 2. The application provides a marine ammonia gas analysis method, which alternately performs short cycle and long cycle detection sequences in a reference cycle, extracts concentration mutation characteristics through differential operation, dynamically adjusts the sampling strategy when mutation is detected. After detecting the mutation characteristics, the sampling period of the short cycle detection sequence is gradually halved and the long cycle detection is suspended, realizing the reasonable allocation of detection resources. When the gas concentration is stable, the normal detection rhythm is maintained, and when the mutation occurs, the sampling frequency is quickly increased, improving the rapid response ability to the mutation signal and reducing the waste of computing resources. Through the dynamic adjustment of the detection sequence, the system resource utilization efficiency is optimized while ensuring the detection sensitivity, making the detection process more intelligent and efficient.

[0053] 3. The application provides a marine ammonia gas analysis method, which uses the data at the end of the suspended long cycle detection sequence to compensate for the wavelength of the short cycle detection sequence, reducing the wavelength shift of the detection system caused by external environmental changes. The reverse scanning sequence is inserted in the short cycle detection process, and complementary detection data is obtained through reverse wavelength change, so that the detection system can correct the wavelength drift in real time while maintaining high frequency sampling. The alternative execution of the reverse scanning sequence and the short cycle detection sequence forms a closed-loop calibration mechanism, which suppresses the cumulative effect of wavelength drift. Through dynamic compensation of wavelength drift, the wavelength accuracy of the short cycle high frequency detection process is improved, ensuring the measurement accuracy under high frequency sampling conditions. The combination of wavelength compensation and reverse scanning enhances the self-calibration ability of the detection system, so that the system maintains stable detection performance during long-term operation. BRIEF DESCRIPTION OF DRAWINGS

[0054] Figure 1 is a flowchart of a marine ammonia gas analysis method in an embodiment of the application.

[0055] Figure 2 is a flowchart of an improved method based on double cycle detection in an embodiment of the application.

[0056] Figure 3 is a schematic diagram of the physical device structure of a marine ammonia gas analysis system provided in an embodiment of the application. DETAILED DESCRIPTION

[0057] The terms used in the following embodiments of the application are only for the purpose of describing the specific embodiments and are not intended to be limiting to the application. As used in the specification and the appended claims of the application, the singular forms "a," "an," and "the" are intended to include both singular and plural forms, unless the context clearly indicates otherwise. It will be further understood that the terms "and / or" used in the application means any or all possible combinations of one or more of the listed items.

[0058] Hereinafter, the terms "first", "second", "third", "fourth", "fifth", "sixth", "seventh" and "eighth" are only used for descriptive purposes and cannot be understood as indicating or implying relative importance or implicitly indicating the number of the technical features indicated. Therefore, the features defined with "first", "second", "third", "fourth", "fifth", "sixth", "seventh" and "eighth" can explicitly or implicitly include one or more of the features, and in the description of the embodiments of the present application, the meaning of "a plurality of" is two or more, unless otherwise specified.

[0059] Hereinafter, an embodiment will be described by combining Figure 1 A ship ammonia analysis and detection method in the embodiments of the present application is described.

[0060] Please refer to Figure 1 A flowchart of a ship ammonia analysis and detection method in the embodiments of the present application is shown.

[0061] S101, control the infrared light source to alternately emit a first infrared light beam and a second infrared light beam within a preset time period;

[0062] The system controls the infrared light source to alternately emit a first infrared light beam and a second infrared light beam within a preset time period, the wavelength of the first infrared light beam is located in the characteristic absorption peak wavelength range of the absorption spectrum of the gas to be measured, and the wavelength of the second infrared light beam is located in the reference interval wavelength range of the absorption spectrum of the gas to be measured.

[0063] In this step, the system controls the infrared light source to alternately emit two infrared light beams with different wavelengths within a preset time period, wherein the wavelength of the first infrared light beam is located in the characteristic absorption peak wavelength range of the absorption spectrum of the gas to be measured, which is used to detect the concentration information of the gas to be measured; the wavelength of the second infrared light beam is located in the reference interval wavelength range of the absorption spectrum of the gas to be measured, which is not affected by the concentration of the gas to be measured, and is used to obtain the temperature information of the gas to be measured. By alternately emitting two infrared light beams, the concentration and temperature information of the gas can be obtained at the same time within the same time period, improving the detection efficiency.

[0064] To achieve this step, the system can use a dual-wavelength infrared light source, such as a dual-wavelength quantum cascade laser, to control the laser to alternately emit two infrared light beams with different wavelengths by modulating the driving current of the laser. In addition, the system can also use two independent single-wavelength infrared light sources to emit the first infrared light beam and the second infrared light beam respectively, and realize the alternately emission by synchronously controlling the switches of the two light sources.

[0065] S102, collect spectral data of a first transmitted light beam and a second transmitted light beam formed after the first infrared light beam and the second infrared light beam pass through the gas to be measured;

[0066] In this step, the system uses the photoelectric detector to collect the spectral data of the first transmitted light beam and the second transmitted light beam, and obtains the absorption information of the to-be-measured gas to the two infrared light beams. The first transmitted light beam carries the concentration information of the to-be-measured gas, and the second transmitted light beam carries the temperature information of the to-be-measured gas.

[0067] S103, determining an actual temperature value of the to-be-measured gas based on the spectral data of the second transmitted light beam;

[0068] The system determines the actual temperature value of the to-be-measured gas based on the spectral data of the second transmitted light beam. The spectral data in the reference interval wavelength range is not affected by the concentration of the to-be-measured gas. Specifically, the spectral data of the second transmitted light beam is wavelet decomposed to obtain temperature feature coefficients of different frequency components.

[0069] A temperature feature vector is constructed based on the temperature feature coefficients, and the temperature feature vector includes amplitude ratios and phase differences of the frequency components.

[0070] The temperature feature vector is matched with a preset temperature calibration curve to obtain the actual temperature value of the to-be-measured gas, and the temperature calibration curve represents the correspondence between the temperature feature vector and the actual temperature.

[0071] In this step, the system determines the actual temperature value of the to-be-measured gas based on the spectral data of the second transmitted light beam. Since the wavelength of the second infrared light beam is in the reference interval, its spectral data is mainly affected by temperature and not by concentration. The system wavelet decomposes the spectral data of the second transmitted light beam to obtain temperature feature coefficients of different frequency components, then constructs a temperature feature vector based on the temperature feature coefficients, including amplitude ratios and phase differences of the frequency components. Finally, the temperature feature vector is matched with a preset temperature calibration curve to obtain the actual temperature value of the to-be-measured gas.

[0072] To improve the temperature measurement accuracy, the system can use a high-resolution spectrometer to obtain more abundant spectral information. At the same time, when constructing the temperature feature vector, the selection of the wavelet basis function can be optimized to extract the characteristic frequency components that best reflect the temperature change. In addition, the system can also introduce a temperature correction model to correct the temperature measurement result according to the composition, pressure and other parameters of the to-be-measured gas, further improving the accuracy of temperature measurement.

[0073] In actual application, the temperature of the ship environment changes greatly, which may exceed the applicable range of the conventional temperature calibration curve. To solve this problem, the system can pre-acquire the spectral data of the second transmitted light beam under different temperature conditions to establish multiple temperature calibration curves, covering a wider temperature measurement range. When determining the actual temperature value, the system can adaptively select the most matched temperature calibration curve to ensure the continuity and reliability of temperature measurement.

[0074] S104, selecting target reference spectrum data matching the actual temperature value from the preset multiple sets of reference spectrum data according to the actual temperature value;

[0075] The system selects target reference spectrum data matching the actual temperature value from the preset multiple sets of reference spectrum data according to the actual temperature value, and each set of reference spectrum data corresponds to a different temperature condition.

[0076] In this step, the system selects the most matching target reference spectrum data from the pre-set multiple sets of reference spectrum data according to the measured actual temperature value. The absorption spectrum of the gas to be measured changes under different temperature conditions, so it is necessary to select the reference spectrum data corresponding to the actual temperature value for subsequent analysis.

[0077] To realize temperature matching, the system can use a lookup table to pre-establish a mapping relationship between different temperature values and corresponding reference spectrum data and store it as a lookup table. When the actual temperature value is determined, the system can directly read the matching target reference spectrum data from the lookup table, avoiding the calculation overhead of real-time search matching and improving the data processing efficiency.

[0078] In practical applications, due to the wide range of ship environmental temperature changes, it may not be possible to preset corresponding reference spectrum data for each temperature value. To solve this problem, the system can use an interpolation method to perform interpolation calculation on the existing reference spectrum data to obtain target reference spectrum data at any temperature value. Common interpolation methods include linear interpolation, spline interpolation, etc. The system can select a suitable interpolation algorithm according to actual needs, while ensuring the continuity of the spectrum data, reducing data storage and calculation overhead.

[0079] S105, calculating the position offset of the spectrum data of the first transmitted light beam relative to the target reference spectrum data;

[0080] In this step, the system calculates the position offset between the spectrum data of the first transmitted light beam and the target reference spectrum data by comparing them. The temperature and pressure changes of the gas to be measured will cause the drift of the absorption spectrum, resulting in the shift of the characteristic absorption peak position of the first transmitted light beam, affecting the accuracy of the concentration measurement. Therefore, it is necessary to calculate the position offset to quantify the degree of drift of the absorption spectrum and provide a basis for subsequent wavelength compensation.

[0081] S106, based on the position offset, adjusting the wavelength of the first infrared light beam emitted by the infrared light source to match the wavelength of the characteristic absorption peak of the target reference spectrum data;

[0082] The system adjusts the wavelength of the first infrared light beam emitted by the infrared light source based on the position offset, so that the wavelength of the first infrared light beam matches the characteristic absorption peak wavelength of the target reference spectrum data, specifically: calculating the offset component of the position offset in different wavelength intervals;

[0083] The offset component is weighted to obtain a wavelength compensation value, and the weight coefficient of the weighting is inversely proportional to the temperature sensitivity of each wavelength interval;

[0084] Based on the wavelength compensation value, the driving current of the infrared light source is adjusted so that the wavelength of the first infrared light beam matches the characteristic absorption peak wavelength of the target reference spectrum data.

[0085] In this step, the system adjusts the wavelength of the first infrared light beam based on the calculated position offset, so that it matches the characteristic absorption peak wavelength of the target reference spectrum data, thereby offsetting the influence of the absorption spectrum drift and improving the accuracy of the concentration measurement. Specifically, the system first calculates the offset component of the position offset in different wavelength intervals, and then performs weighted calculation on the offset component to obtain the final wavelength compensation value. In the weighted calculation, the weight coefficient of each wavelength interval is inversely proportional to its temperature sensitivity, that is, the higher the temperature sensitivity of an interval, the smaller its weight coefficient, to avoid excessive compensation leading to measurement error. Finally, the system adjusts the driving current of the infrared light source according to the wavelength compensation value to control the emission wavelength of the first infrared light beam, so that it matches the characteristic absorption peak wavelength of the target reference spectrum data.

[0086] To achieve accurate wavelength compensation, the system can use high-precision wavelength modulation techniques such as current modulation, temperature modulation, etc., to continuously adjust the emission wavelength by changing the working parameters of the infrared light source, achieving accurate matching with the target reference spectrum. At the same time, the system can also introduce a wavelength feedback control mechanism to monitor the spectrum data of the first transmitted light beam in real time, dynamically optimize the wavelength compensation value according to the matching degree with the target reference spectrum, and realize closed-loop control, further improving the accuracy and stability of wavelength compensation.

[0087] S107, collecting the spectrum data of the third transmitted light beam formed by the adjusted first infrared light beam passing through the gas to be measured;

[0088] After completing the wavelength compensation, the system re-collects the transmitted light beam formed by the first infrared light beam passing through the gas to be measured to obtain the spectrum data of the third transmitted light beam. Since the wavelength of the first infrared light beam has been adjusted to match the characteristic absorption peak of the target reference spectrum, the spectrum data of the third transmitted light beam can accurately reflect the absorption characteristics of the gas to be measured, providing a reliable data basis for subsequent concentration calculation.

[0089] S108, comparing the spectrum data of the third transmitted light beam with the target reference spectrum data to obtain the concentration value of the gas to be measured.

[0090] In this step, the system compares the spectral data of the third transmitted light beam with the target reference spectral data, calculates the absorbance difference between the two, and calculates the concentration value of the gas to be measured according to the Beer-Lambert law. Since the wavelength of the third transmitted light beam has been matched with the characteristic absorption peak of the target reference spectrum, the absorbance difference obtained by comparison can truly reflect the absorption degree of the gas to be measured, avoiding measurement errors caused by temperature and pressure changes, and improving the accuracy of concentration measurement.

[0091] To further improve the reliability of concentration measurement, the system can introduce multi-wavelength differential absorption spectroscopy technology, add other wavelength detection light beams based on the first infrared light beam, eliminate environmental interference through differential absorption information of multiple wavelengths, improve the signal-to-noise ratio, and obtain more stable and accurate concentration measurement results. At the same time, the system can also use advanced spectral data processing algorithms such as partial least squares method, principal component analysis method, etc., to extract the most relevant concentration information from complex spectral data, suppress noise and interference, and further optimize the performance of concentration measurement.

[0092] In practical applications, there may be multiple interfering gases in the ship environment, whose absorption spectra overlap with the gas to be measured, affecting the selectivity of concentration measurement. To solve this problem, the system can use spectral deconvolution technology, use multi-wavelength detection data, separate the absorption spectra of the target gas and the interfering gas through mathematical modeling and calculation, and realize selective detection. At the same time, the system can also establish a gas spectrum database covering the absorption spectra of common interfering gases, and through spectral matching and subtraction, further improve the accuracy and reliability of target gas concentration measurement.

[0093] In the above embodiment, by using the above technical solution, two infrared light beams located in the wavelength range of the characteristic absorption peak of the gas to be measured and the reference interval are alternately emitted by controlling the infrared light source, the spectral data of the transmitted light beam is obtained, the actual temperature value is determined by using the characteristic that the reference interval is not affected by the gas concentration, and then the matching target reference spectral data is selected. The position offset of the spectral data relative to the target reference spectrum is calculated and adjusted according to the wavelength of the light beam, so that it is matched with the wavelength of the characteristic absorption peak, and finally the accurate concentration value is obtained by comparison. This scheme reduces the measurement error caused by temperature change by determining the temperature through the reference interval spectrum and then selecting the reference spectrum, improves the reliability of the detection system, and further improves the accuracy of ammonia gas analysis and detection.

[0094] To further improve the accuracy and real-time performance of the detection, the application also provides an improved method based on double-period detection. This method realizes rapid response and accurate tracking of gas concentration changes through the cooperative mechanism of short-period detection sequence and long-period detection sequence. When a concentration mutation is detected, the system dynamically adjusts the sampling period and wavelength compensation strategy to ensure that the measurement accuracy is maintained while the response speed is improved. Through the setting of the reverse scanning sequence and the phase difference analysis method, the wavelength drift problem in the high-frequency sampling process is effectively solved. The following describes an improved method based on double-period detection in the embodiments of the application: Figure 2 An improved method based on double-period detection in the embodiments of the application is described as follows:

[0095] Please refer to Figure 2 for a flowchart of an improved method based on double-period detection in the embodiments of the application.

[0096] S201. Alternately execute a short-period detection sequence and a long-period detection sequence in each reference period based on a first preset time length as a reference period;

[0097] In this step, the system introduces a double-period detection mechanism, which realizes rapid response and accurate tracking of gas concentration changes by alternately executing a short-period detection sequence and a long-period detection sequence. The first preset time length is the reference period, which represents a complete detection cycle. In each reference period, the system first executes the short-period detection sequence to obtain gas concentration data at a high sampling frequency to capture rapid changes in concentration, and then switches to the long-period detection sequence to obtain gas concentration data at a low sampling frequency to capture slow changes in concentration trends. Through the alternation of short-period and long-period, the system can comprehensively monitor the dynamic changes of gas concentration, and balance the timeliness and accuracy of detection.

[0098] To realize double-period detection, the system can use multi-channel parallel sampling technology to set independent short-period sampling channels and long-period sampling channels, connect different photodetectors and signal processing circuits respectively, and realize the synchronous execution and data separation of the two detection sequences. At the same time, the system can also accurately coordinate the switching time of short-period and long-period through clock synchronization and trigger control mechanism, ensure that the execution time of the two detection sequences is allocated according to the preset time proportion in each reference period, and avoid mutual interference.

[0099] In practical applications, the gas concentration can appear both rapid mutation and slow change, and a single detection period is difficult to meet the requirements of response speed and measurement accuracy. To solve this problem, the system can dynamically adjust the time proportion of short and long periods according to the characteristics of gas concentration change. When detecting concentration mutation, the system can increase the execution time of the short period detection sequence, improve the sampling frequency, and capture the rapid change of concentration in time; when detecting stable concentration, the system can increase the execution time of the long period detection sequence, reduce the sampling frequency, and reduce power consumption and data volume. By dynamically adjusting the proportion of double-period detection, the system can adaptively optimize the detection performance, ensuring measurement accuracy while improving energy efficiency and data transmission efficiency.

[0100] S202, differential operation is performed on the concentration values obtained by the short period detection sequence and the long period detection sequence to extract concentration mutation features;

[0101] The system performs differential operation on the concentration values obtained by the short period detection sequence and the long period detection sequence to extract concentration mutation features, specifically: first-order differential values and second-order differential values of the short period detection sequence and the long period detection sequence are calculated respectively;

[0102] In the short period detection sequence, when the absolute value of the first-order differential value is greater than the first threshold and the sign of the second-order differential value changes, it is determined as a rapid mutation feature;

[0103] In the long period detection sequence, when the first-order differential values of consecutive multiple detection periods have the same sign and the amplitude gradually increases, it is determined as a gradual change feature.

[0104] In this step, the system performs differential operation on the concentration data obtained by the double-period detection sequence, and extracts concentration mutation features through the results of first-order differential and second-order differential. Differential operation can sensitively reflect the rate and acceleration of concentration change, providing quantitative indicators for judging concentration mutation. Specifically, the system calculates the first-order differential values and the second-order differential values of the short period detection sequence and the long period detection sequence respectively. In the short period detection sequence, when the absolute value of the first-order differential value exceeds the preset first threshold, and the sign of the second-order differential value changes, it indicates that the concentration has a rapid mutation, which needs to be responded in time. In the long period detection sequence, when the first-order differential values of consecutive multiple detection periods have the same sign and the amplitude gradually increases, it indicates that the concentration has a slow change trend, which needs to be tracked continuously.

[0105] To realize the differential operation, the system can adopt a digital differentiator circuit to process the collected concentration data in real time. By setting appropriate sampling interval and quantization precision, the system can obtain stable and accurate differential results, avoiding the influence of noise and interference. At the same time, the system can also introduce an adaptive threshold adjustment mechanism, dynamically optimizing the value of the first threshold according to environmental conditions and measurement requirements, balancing the sensitivity and reliability of mutation detection.

[0106] In practical applications, the mutation characteristics of gas concentration may be mixed with normal fluctuations, and the differential operation result is prone to misjudgment. To solve this problem, the system can introduce a pattern recognition algorithm to analyze the time series characteristics of the differential operation result and extract the typical pattern of concentration mutation. By matching with the preset mutation pattern library, the system can accurately identify the real concentration mutation event and exclude the interference of normal fluctuations. At the same time, the system can also combine statistical learning methods to train a large number of historical data and establish a discrimination model for concentration mutation, further improving the accuracy and intelligence level of mutation detection.

[0107] S203、When detecting the concentration mutation characteristics, the sampling period of the short-period detection sequence is halved according to the preset rule to reach the preset response limit;

[0108] In this step, when the system detects that the gas concentration has mutation characteristics, in order to quickly respond and accurately capture the process of concentration change, the system will halve the sampling period of the short-period detection sequence according to the preset rule, until the preset response limit is reached. Halving the sampling period means doubling the sampling frequency, which can significantly improve the time resolution of the system to concentration change. By iteratively shortening the sampling period, the system can obtain high-density data points at the critical moment of concentration mutation, accurately restoring the dynamic curve of concentration change. At the same time, the setting of the preset response limit avoids the data redundancy and system burden caused by excessive shortening of the sampling period.

[0109] To realize adaptive adjustment of the sampling period, the system can preset multiple sampling periods, such as 1 second, 0.5 seconds, 0.25 seconds, etc., forming a frequency doubling sequence. When detecting concentration mutation, the system switches to the next level of sampling period according to the preset rule, realizing the doubling of the sampling frequency. At the same time, the system can also set the adjustment step and interval of the sampling period to avoid frequent sampling period switching, reducing the response time and stabilization time of the system.

[0110] S204, pause the long-period detection sequence;

[0111] During the sampling frequency multiplication of the short-period detection sequence, the system suspends the execution of the long-period detection sequence. This is to avoid mutual interference between the two detection sequences, ensure that the short-period detection can monopolize system resources and respond to concentration mutation events with full strength. At the same time, suspending the long-period detection sequence also helps to reduce unnecessary energy consumption and data processing pressure, and improve system efficiency.

[0112] S205, compensating the wavelength of the short-period detection sequence based on the detection data at the end of the suspended long-period detection sequence;

[0113] In this step, the system compensates the wavelength of the short-period detection sequence based on the detection data at the end of the suspended long-period detection sequence. Since during high-frequency sampling, factors such as environmental temperature and pressure may cause the absorption spectrum to drift, affecting the measurement accuracy. By using the reference data provided by the long-period detection sequence, the system can track the spectral drift in real time and dynamically compensate the wavelength of the short-period detection sequence, ensuring the accuracy of the measurement results.

[0114] To achieve wavelength compensation, the system can use a spectral matching algorithm to compare the spectral data of the short-period detection sequence with the reference spectrum of the long-period detection sequence and calculate the wavelength drift. Common spectral matching algorithms include least squares method, correlation coefficient method, etc. According to the calculated wavelength drift, the system can compensate the wavelength of the short-period detection sequence by adjusting the light source driving current or spectral calibration coefficient, etc., so that it coincides with the reference spectrum. At the same time, to improve the compensation accuracy, the system can use a multi-point compensation strategy to perform multiple matching and compensation at different wavelength positions, reducing the influence of local wavelength drift.

[0115] In practical applications, due to the limitation of the sampling frequency of the long-period detection sequence, there may be a certain time lag effect in wavelength compensation. To shorten the compensation time lag, the system can introduce a predictive compensation mechanism to analyze the historical data of the long-period detection sequence, establish a prediction model of wavelength drift, and estimate the wavelength drift trend of the short-period detection sequence in advance to achieve advance compensation. At the same time, the system can also use an interpolation algorithm to estimate the wavelength drift between the sampling points of the long-period detection sequence, improve the compensation time resolution, and reduce the time lag effect.

[0116] S206, inserting a reverse scanning sequence after executing the short-period detection for a preset number of times;

[0117] The system inserts a reverse scanning sequence after executing the short-period detection for a preset number of times, and the wavelength change direction of the reverse scanning sequence is opposite to that of the short-period detection sequence.

[0118] In this step, the system inserts a reverse scanning sequence after performing a preset number of short-period detection. The wavelength variation direction of the reverse scanning sequence is opposite to that of the short-period detection sequence, which is used to detect and eliminate the cumulative effect of wavelength drift caused by fast sampling. Through reverse scanning, the system can obtain spectral data in the opposite direction of the short-period detection sequence. By comparing the forward and reverse data, the system can identify the measurement error caused by wavelength drift and eliminate it.

[0119] To generate the reverse scanning sequence, the system can reverse the wavelength scanning direction based on the short-period detection sequence to generate the corresponding reverse sequence. At the same time, to ensure the time efficiency of reverse scanning, the system can optimize the insertion frequency and duration of the reverse sequence to minimize the impact on the normal detection process while meeting the drift detection requirements. In addition, the system can dynamically adjust the execution time of reverse scanning by setting reasonable reverse scanning trigger conditions, such as accumulated drift exceeding a threshold, and dramatic changes in environmental temperature, to improve the relevance of drift detection.

[0120] S207, comparing the detection results of the reverse scanning sequence with the short-period detection sequence to eliminate the cumulative effect of wavelength drift.

[0121] The system compares the detection results of the reverse scanning sequence with the short-period detection sequence to eliminate the cumulative effect of wavelength drift. Specifically, the system extracts the detection results of the reverse scanning sequence and the short-period detection sequence in the time overlap interval.

[0122] The detection results are respectively Fourier transformed according to the time order and the reverse order to obtain the sequential transformation results and the reverse transformation results.

[0123] The phase difference between the sequential transformation results and the reverse transformation results is calculated, and the phase difference is taken as the wavelength drift.

[0124] The reference wavelength of the short-period detection sequence is adjusted according to the wavelength drift.

[0125] In this step, the system compares the detection results of the reverse scanning sequence with the short-period detection sequence to eliminate the cumulative effect of wavelength drift. Specifically, the system first extracts the detection results of the reverse scanning sequence and the short-period detection sequence in the time overlap interval, and then respectively Fourier transforms the detection results according to the time order and the reverse order to obtain the sequential transformation results and the reverse transformation results. By calculating the phase difference between the two transformation results, the system can obtain the wavelength drift in the overlap interval. Finally, the system adjusts the subsequent detection results of the short-period detection sequence according to the wavelength drift to dynamically adjust its reference wavelength, achieving adaptive elimination of the cumulative effect of wavelength drift.

[0126] To improve the accuracy of wavelength shift identification, the system can use high-resolution Fourier transform algorithms such as Chirp-Z transform, Zoom-FFT, etc., to improve the spectral resolution and more accurately calculate the phase difference, thereby improving the estimation accuracy of the wavelength shift amount. At the same time, to suppress the spectral leakage effect in the Fourier transform process, the system can introduce a window function to smooth the time domain signal and reduce the impact of energy leakage on phase difference calculation. In addition, the system can also filter out random phase differences introduced by noise and interference by setting a reasonable phase difference threshold, thereby improving the reliability of wavelength shift determination.

[0127] In practical applications, due to the dramatic changes in environmental temperature and pressure, the wavelength shift may exhibit nonlinear and time-varying characteristics, and a single linear compensation model is difficult to completely eliminate the drift effect. To solve this problem, the system can introduce an adaptive compensation algorithm to establish a dynamic model of wavelength shift, track the trend of the drift amount in real time, and update and optimize the compensation model online. Common adaptive compensation algorithms include Kalman filtering, adaptive neural networks, etc. Through adaptive compensation, the system can dynamically adapt to changes in wavelength shift characteristics, achieve more accurate and stable cumulative effect elimination, and ensure the long-term consistency of the detection results.

[0128] In the above embodiments, the short period and long period detection sequences are alternately executed in the reference period, the concentration mutation feature is extracted through differential operation, and the sampling strategy is dynamically adjusted when the mutation is detected. After detecting the mutation feature, the sampling period of the short period detection sequence is gradually halved and the long period detection is suspended, thereby realizing reasonable allocation of detection resources. When the gas concentration is stable, the normal detection rhythm is maintained, and when the mutation occurs, the sampling frequency is quickly increased, thereby improving the rapid response capability to the mutation signal and reducing the waste of computing resources. Through dynamic adjustment of the detection sequence, the system resource utilization efficiency is optimized while ensuring the detection sensitivity, so that the detection process is more intelligent and efficient.

[0129] The system in the embodiments of the present application will be described from the perspective of hardware processing. Please refer to Figure 3 An entity device structure diagram of a marine ammonia gas analysis and detection system provided by the embodiments of the present application.

[0130] It should be noted that, Figure 3 The structure of the system shown is only an example and should not limit the functions and use range of the embodiments of the present application.

[0131] As Figure 3As shown, the system includes a Central Processing Unit (CPU) 301 which can perform various appropriate actions and processes, such as executing the methods in the above embodiments, according to programs stored in a Read-Only Memory (ROM) 302 or loaded from a storage section 308 into a Random Access Memory (RAM) 303. In the RAM 303, various programs and data required for operation of the system are also stored. The CPU 301, the ROM 302, and the RAM 303 are connected to each other through a bus 304. An Input / Output (I / O) interface 305 is also connected to the bus 304.

[0132] Connected to the I / O interface 305 are an input section 306 including a camera, an infrared sensor, and the like; an output section 307 including a Liquid Crystal Display (LCD), a speaker, and the like; the storage section 308 including a hard disk, and the like; and a communication section 309 including a network interface card such as a LAN (Local Area Network) card, a modem, and the like. The communication section 309 performs communication processing via a network such as the Internet. A drive 310 is also connected to the I / O interface 305 as necessary. A removable media 311 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, and the like is attached to the drive 310 as necessary, so that a computer program read therefrom is installed into the storage section 308 as necessary.

[0133] In particular, according to embodiments of the present application, the processes described above with reference to the flowcharts can be implemented as a computer software program. For example, embodiments of the present application include a computer program product comprising a computer program carried on a computer readable medium, the computer program containing a computer program for executing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network by the communication section 309, and / or installed from the removable media 311. When the computer program is executed by the Central Processing Unit (CPU) 301, various functions defined in the present application are performed.

[0134] It should be noted that the computer-readable medium in the embodiments of the present application can be a computer-readable signal medium or a computer-readable storage medium or any combination of the two. The computer-readable storage medium may, for example, but is not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or apparatus, or any combination of the above. More specific examples of the computer-readable storage medium can include, but are not limited to, an electrical connection having one or more wires, a portable computer diskette, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM), a flash memory, an optical fiber, a portable compact disk read-only memory (Compact Disc Read-Only Memory, CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present application, the computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, device or apparatus. In the present application, the computer-readable signal medium can include a data signal carried in a baseband or as a part of a carrier wave, which carries computer-readable computer programs. Such a propagated data signal can take many forms, including but not limited to an electromagnetic signal, an optical signal, or any suitable combination of the above.

[0135] The flowcharts and block diagrams in the drawings illustrate the possible implementation architectures, functions and operations of the systems, methods and computer program products according to various embodiments of the present application. Each block in the flowcharts or block diagrams can represent a module, a program segment, or a part of code containing one or more executable instructions for implementing the specified logical functions. It should also be noted that in some alternative implementations, the functions noted in the blocks can occur in different orders than that shown in the drawings. For example, two blocks that are shown in succession can actually be executed substantially in parallel, and sometimes in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams or flowcharts, and the combination of blocks in the block diagrams or flowcharts, can be implemented by a dedicated hardware-based system that performs the specified functions or operations, or can be implemented by a combination of dedicated hardware and computer instructions.

[0136] As another aspect, the present application also provides a computer readable storage medium, which can be included in the system described in the above embodiments, or can exist independently without being assembled into the system. The above storage medium carries one or more computer programs, which, when executed by a processor of a system, enable the system to implement the method provided in the above embodiments.

[0137] The above embodiments are only used to illustrate the technical solutions of the present application, but not limit the present application; although the present application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that they can still make modifications to the technical solutions recorded in the foregoing embodiments, or make equivalent replacements to some of the technical features; and these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present application.

[0138] In the above embodiments, according to the context, the term "when" can be interpreted as meaning "if" or "after" or "in response to determining" or "in response to detecting". Similarly, according to the context, the phrase "upon determining" or "if detecting (the stated condition or event)" can be interpreted as meaning "if determining" or "in response to determining" or "upon detecting (the stated condition or event)" or "in response to detecting (the stated condition or event)".

[0139] In the above embodiments, all or some of the steps can be implemented by using software, hardware, firmware or any combination thereof. When implemented by using software, all or some of the steps can be implemented in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded into and executed by a computer, all or some of the steps as described in the embodiments of the present application are performed. The computer can be a general purpose computer, a special purpose computer, a computer network, or other programmable apparatuses. The computer instructions can be stored in a computer readable storage medium or transmitted from one computer readable storage medium to another computer readable storage medium, for example, the computer instructions can be transmitted from one website, computer, server or data center to another website, computer, server or data center through wired (for example, coaxial cable, optical fiber, digital subscriber line) or wireless (for example, infrared, wireless, microwave, etc.) manner. The computer readable storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server, data center, etc. integrated with one or more available media. The available medium can be a magnetic medium (for example, floppy disk, hard disk, magnetic tape), an optical medium (for example, DVD), or a semiconductor medium (for example, solid state disk), etc.

[0140] Those skilled in the art can understand that all or part of the processes in the above-mentioned method embodiments can be implemented by a computer program instructing relevant hardware to complete, the program can be stored in a computer readable storage medium, and the program can include the processes of the above-mentioned method embodiments when executed. The aforementioned storage medium includes ROM or random storage memory RAM, magnetic disc or optical disc and various storage code medium.

Claims

1. A method for the detection of ammonia gas in a marine environment, characterized in that, The method comprises the following steps: controlling an infrared light source to alternately emit a first infrared light beam and a second infrared light beam within a preset time period, the wavelength of the first infrared light beam being within a characteristic absorption peak wavelength range of an absorption spectrum of a to-be-detected gas, and the wavelength of the second infrared light beam being within a reference interval wavelength range of the absorption spectrum of the to-be-detected gas; collecting spectral data of a first transmitted light beam and a second transmitted light beam formed after the first infrared light beam and the second infrared light beam pass through the to-be-detected gas; determining an actual temperature value of the to-be-detected gas based on the spectral data of the second transmitted light beam, wherein the spectral data within the reference interval wavelength range is not affected by the concentration of the to-be-detected gas; selecting target reference spectral data matching the actual temperature value from a plurality of groups of preset reference spectral data according to the actual temperature value, wherein each group of reference spectral data corresponds to a different temperature condition; calculating a position offset of the spectral data of the first transmitted light beam relative to the target reference spectral data; adjusting the wavelength of the first infrared light beam emitted by the infrared light source based on the position offset, so that the wavelength of the first infrared light beam matches the characteristic absorption peak wavelength of the target reference spectral data; collecting spectral data of a third transmitted light beam formed after the adjusted first infrared light beam passes through the to-be-detected gas; comparing the spectral data of the third transmitted light beam with the target reference spectral data to obtain a concentration value of the to-be-detected gas; taking a first preset time length as a reference period, and alternately executing a short-period detection sequence and a long-period detection sequence in each reference period; performing differential operation on the concentration values obtained by the short-period detection sequence and the long-period detection sequence to extract a concentration mutation feature; when the concentration mutation feature is detected, sequentially halving the sampling period of the short-period detection sequence according to a preset rule until a preset response limit is reached; suspending the long-period detection sequence; compensating for the wavelength of the short-period detection sequence based on the detection data at the end of the suspended long-period detection sequence; after executing the short-period detection a preset number of times, inserting a reverse scanning sequence, wherein the wavelength variation direction of the reverse scanning sequence is opposite to that of the short-period detection sequence; comparing the detection results of the reverse scanning sequence with the short-period detection sequence to eliminate the cumulative effect of wavelength drift, specifically including: extracting the detection results of the reverse scanning sequence and the short-period detection sequence in a time overlap interval; performing Fourier transform on the detection results in time sequence and reverse sequence respectively to obtain sequence transform results and reverse sequence transform results; calculating the phase difference between the sequence transform results and the reverse sequence transform results, and taking the phase difference as a wavelength drift amount; adjusting the reference wavelength of the short-period detection sequence according to the wavelength drift amount.

2. The method of claim 1, wherein, The method further comprises the following steps: performing wavelet decomposition on the spectral data of the second transmitted light beam to obtain temperature feature coefficients of different frequency components; Construct a temperature feature vector based on the temperature characteristic coefficients, the temperature feature vector including amplitude ratios and phase differences of each frequency component; Match the temperature feature vector with a preset temperature calibration curve to obtain an actual temperature value of the gas to be measured, the temperature calibration curve representing a corresponding relationship between a temperature feature vector and an actual temperature.

3. The method of claim 1, wherein, The wavelength of the first infrared light beam emitted by the infrared light source is adjusted based on the position offset, specifically including: Calculating offset components of the position offset in different wavelength intervals; Performing weighted calculation on the offset components to obtain a wavelength compensation value, the weight coefficient of the weighted calculation being inversely proportional to the temperature sensitivity of each wavelength interval; Adjusting the driving current of the infrared light source based on the wavelength compensation value to make the wavelength of the first infrared light beam match the characteristic absorption peak wavelength of the target reference spectrum data.

4. The method of claim 1, wherein, The concentration values obtained by the short-period detection sequence and the long-period detection sequence are subjected to differential operation to extract concentration mutation features, specifically including: First-order differential values and second-order differential values of the short-period detection sequence and the long-period detection sequence are calculated respectively; In the short-period detection sequence, when the absolute value of the first-order differential value is greater than a first threshold value and the sign of the second-order differential value changes, it is determined as a rapid mutation feature; In the long-period detection sequence, when the first-order differential values of consecutive multiple detection periods have the same sign and gradually increase in amplitude, it is determined as a gradual change feature. The system includes:

5. A marine ammonia gas detection system, characterized by, One or more processors and a memory; the memory is coupled with the one or more processors, the memory is used to store computer program code, the computer program code includes computer instructions, and the one or more processors invoke the computer instructions to make the system execute the method in any one of claims 1-4. When the instructions run on the system, the system executes the method in any one of claims 1-4.

6. A computer-readable storage medium comprising instructions, characterized in that, When the computer program product runs on the system, the system executes the method in any one of claims 1-4.

7. A computer program product, characterised in that, ​

Citation Information

Patent Citations

  • Low-power-consumption temperature control method for matching different absorption peaks by adjusting wavelength of QCL laser

    CN114199821A

  • Temperature and gas concentration measuring method and system based on absorption spectrum amplitude modulation

    CN114993987A