A fluorescence detection condition control system and method
By combining the strategy algorithm model trained by XGBoost with a multi-band LED array and temperature compensation, the problem of poor sensitivity and repeatability of fluorescence detection in different water quality environments is solved. This enables high-precision adaptive detection of low-concentration Cu2+, reduces false positives and false negatives, and is suitable for detection of complex water samples.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-14
- Publication Date
- 2026-03-27
AI Technical Summary
Existing fluorescence detection methods have poor sensitivity and repeatability in different water quality environments, are easily affected by matrix interference, and lead to false positive/false negative results, especially when detecting low concentrations of Cu2+, the signal is weak and easily affected by background fluorescence.
The strategy algorithm model trained with XGBoost, combined with a multi-band LED array and temperature compensation, dynamically adjusts the excitation conditions through an adaptive detection module, optimizes the excitation light intensity and band combination, and achieves adaptive matching for different water qualities. Furthermore, the detection accuracy and stability are improved through closed-loop deviation judgment and temperature compensation correction.
It significantly improves the sensitivity and stability of fluorescence detection, reduces false positive and false negative results, and is suitable for high-precision Cu2+ detection in complex water samples, especially performing excellently at low concentrations in the ppb range.
Smart Images

Figure CN120870072B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of water quality testing technology, and more specifically, to a fluorescence detection condition control system and method. Background Technology
[0002] Current traditional fluorescence detection methods typically employ a single fixed wavelength (e.g., 365nm) or rely on a fixed excitation wavelength (e.g., 254nm, 302nm, or 365nm), making it difficult to detect Cu with varying concentrations and water quality backgrounds. 2+ To achieve high sensitivity and consistent detection, especially at low concentrations (ppb level), the signal response is weak, easily affected by matrix interference, and the sensitivity and repeatability are poor.
[0003] Furthermore, the influence of water quality matrix effects on optical sensors cannot be ignored, especially in samples from complex environments. [1] Different types of water (such as surface water, industrial wastewater, and drinking water) contain significantly different compositions of organic matter, inorganic salts, and suspended particles, which may affect the fluorescence behavior of CDs and the recognition ability of MIIPs. This can lead to instability in the performance of the same detection system in different environments, and the influence of various metal ions on Cu 2+ Probe interference has been widely reported, especially in real water samples, where it can lead to detection failure. [2] Specifically, Cu 2+ Cu is a transition metal ion whose electronic transitions are dd transitions, which are confined by the crystal field, have a low transition probability, and typically exhibit no significant fluorescence emission. 2+ Fluorescence detection relies on specific fluorescent probes (such as ligands, chelating agents, nanomaterials, organic dyes, etc.), which interact with Cu. 2+ After complexation, configuration or charge transfer occurs, thereby triggering fluorescence enhancement or quenching.
[0004] At ppb concentrations (i.e., a few micrograms or even nanograms of Cu per liter of water), 2+ ), probe and Cu 2+ The amount of binding is extremely small, resulting in a very weak fluorescence signal. Furthermore, background fluorescence (such as dissolved organic matter, humic acid, algal metabolites, etc.) can cover or interfere with the target signal, causing a decrease in the signal-to-noise ratio.
[0005] The interference of natural organic matter (NOM) on heavy metal fluorescence sensing is mainly manifested in its interaction with heavy metal ions. [3] Mechanisms include exchange, complexation, and electrostatic adsorption. These interactions can lead to a decrease or increase in the fluorescence intensity of the fluorescent probe, thus affecting the accuracy of detection. In complex water samples (such as surface water and industrial wastewater), even with the addition of the same concentration of Cu, the fluorescence intensity may be affected. 2+The fluorescence intensity difference between different samples can be several times, and the error increases significantly when using the standard curve method for quantification, especially in the low concentration region.
[0006] In summary, in different water qualities such as surface water, groundwater, sewage, and seawater, organic matter, dissolved salts, and turbidity can quench or enhance background fluorescence, causing false positives / false negatives. Furthermore, most existing systems use static parameter settings and lack the ability to dynamically adjust based on sample feedback, limiting their practicality in complex scenarios.
[0007] Therefore, it is necessary to design a fluorescence detection condition control system and method to solve the technical problem in the existing technology that organic matter, dissolved salts, turbidity and other factors in different water qualities such as surface water, groundwater, sewage and seawater can quench or enhance background fluorescence, causing false positives / false negatives.
[0008] The cited references in this background section are:
[0009] [1]Li,J.,et al.(2021).Matrix effects in optical sensing of tracemetalions:A critical review.TrAC Trends in Analytical Chemistry,143,116387.
[0010] [2]Gupta, VK, et al. (2018). Metal ion interference in fluorescentprobe-based detection systems: A systematic review. Journal of Hazardous Materials, 359, 1–14.
[0011] [3]Zhao,R.,et al.(2022).Interference from natural organic matter onfluorescent sensing of heavy metals:Mechanisms and mitigation strategies.Environmental Science:Processes&Impacts,24(2),203–215. Summary of the Invention
[0012] In view of this, the present invention proposes a fluorescence detection condition control system and method, which aims to solve the technical problem in the prior art that organic matter, dissolved salts, turbidity and other factors in different water qualities such as surface water, groundwater, sewage and seawater can quench or enhance background fluorescence, causing false positives / false negatives.
[0013] In one aspect, the present invention provides a fluorescence detection condition control system, comprising:
[0014] The strategy library uses XGBoost to train strategy algorithm models for different water sample qualities and initial bands. Input parameters include water quality type, pre-excitation fluorescence intensity, and current temperature.
[0015] The initialization module loads the water quality type from the strategy library based on the detection environment and sets the initial state water sample conditions for matching.
[0016] The pre-excitation module includes a high-brightness narrowband LED array in the range of 340–440nm with a step of 10nm. One or more LEDs are integrated in a controllable array. The LED array is pulse-width modulated and current controlled by an FPGA. Single-band or multi-band combination excitation is performed. A focusing lens group is configured to achieve coaxial output of optical paths for each band. Single-band LEDs are lit one by one to obtain the initial fluorescence response value.
[0017] The adaptive detection module calls the strategy algorithm model to generate band combinations and excitation intensity configurations based on the initial fluorescence response value.
[0018] The temperature compensation module monitors key temperatures in real time using a temperature sensor and compensates for and corrects fluorescence errors caused by temperature drift.
[0019] The analysis report module outputs Cu 2+ Concentration test results.
[0020] Preferably, the strategy library uses XGBoost to train strategy algorithm models for different water sample qualities and initial wavebands, including:
[0021] By using a weighted superposition method, when multiple LEDs of different wavelengths are used for simultaneous excitation, the overall equivalent excitation intensity on the sample is calculated. The total excitation intensity is formed by the weighted superposition of the excitation intensities of LEDs in different wavelength bands, automatically achieving energy allocation to the wavelength band with optimal sensitivity. This is achieved through the following formula:
[0022]
[0023] in, λ represents the total excitation intensity; i This indicates that the i-th band includes 365nm, 380nm, and 410nm; This refers to the actual output intensity of the LED in that frequency band, which is adjusted by controlling the drive current or duty cycle; k i It is the optimal weighting coefficient calculated by AI based on real-time water quality, initial fluorescence, etc., representing the contribution of this band to the target fluorescence response.
[0024] Preferably, the strategy library uses XGBoost to train strategy algorithm models for different water sample qualities and initial wavebands, including:
[0025] Input the current environmental information, including water quality type, pre-excitation fluorescence intensity, and current temperature. Output the optimal excitation scheme. Input the initial fluorescence value, temperature, and water quality label. Output the optimal band combination and weights to achieve adaptive matching.
[0026]
[0027] X = [F init [,T,WQ];
[0028] Among them, F init First, a single band is used for detection to obtain the initial response; T is the current temperature; WQ is the water quality type label, including surface water, industrial wastewater, and drinking water; λ1 and λ2 are recommended band combinations, based on... The allocation is obtained; k1 and k2 are the weights of each band.
[0029] Preferably, the strategy library uses XGBoost to train strategy algorithm models for different water sample qualities and initial wavebands, including:
[0030] The error of the optimal band of the sample is minimized by combining the output bands. After the model is trained, it can be used for inference in real time on embedded devices, providing the combined bands and weights, where:
[0031]
[0032] L(θ) is the loss function; Ω(f) is the regularization term used to prevent overfitting; X i =[F init ,T,WQ],Y i =λ1,λ2,k1,k2].
[0033] Preferably, the adaptive detection module includes:
[0034] The measured fluorescence intensity was compared with Cu 2+ Corresponding to the actual concentration, parameters a, b, and c were selected through experimental calibration, where:
[0035]
[0036] Where F is the digital value of the detected fluorescence intensity output by the PMT or CMOS;
[0037] C cu It refers to the concentration of copper ions in the water sample;
[0038] Parameters a, b, and c are parameters fitted from the calibration sample in the experiment, where b ≠ 1.
[0039] Preferably, the adaptive detection module further includes:
[0040] Closed-loop deviation determination, if F measured and F expected Measurements taken under different light intensities may cause distortion of the absolute difference, in F expected When the relative error is greater than 1, the deviation is judged by relative error. If the difference between the measured fluorescence and the expected value exceeds the relative error threshold ∈, the excitation combination is automatically re-optimized or temperature compensation is performed. The relative error threshold ∈ is calculated by the following formula:
[0041]
[0042] F measured It is based on the actual detected fluorescence value;
[0043] F expected It is the theoretical fluorescence value obtained by combining the strategy algorithm model with the known concentration range.
[0044] Preferably, the adaptive detection module further includes:
[0045] Closed-loop deviation determination, if F measured and F expected Measurements taken under different light intensities may distort the absolute difference, especially in low concentration ranges (ppb level). expected If the value is less than 1, the system switches to absolute error judgment to prevent small values from amplifying errors. Absolute error is used for deviation judgment. If the difference between the measured fluorescence and the expected value exceeds the absolute error threshold δ, the excitation combination is automatically re-optimized or temperature compensation is performed. The absolute error threshold δ is calculated using the following formula:
[0046] |F measured -F expected |>δ;
[0047] F measured It is based on the actual detected fluorescence value;
[0048] F expected It is the theoretical fluorescence value obtained by combining the strategy algorithm model with the known concentration range.
[0049] Preferably, the temperature compensation module compensates for fluorescence errors caused by temperature drift, including:
[0050] I LED =I ref ·[1+α(T set -T LED )];
[0051] Among them, I LED It is the LED current; I ref It is the target reference current; T LED This is the current temperature of the LED; T set α is the system calibration temperature; α is the temperature compensation coefficient.
[0052] On the other hand, the present invention also provides a method for controlling fluorescence detection conditions, including:
[0053] Step S1: Use XGBoost to train strategy algorithm models for different water sample qualities and initial bands. Input parameters include water quality type, pre-excitation fluorescence intensity, and current temperature.
[0054] Step S2: Load the water quality type from the strategy library according to the detection environment and set the initial state water sample conditions for matching;
[0055] Step S3: Light up the single-band LEDs one by one and obtain the initial fluorescence response value;
[0056] Step S4: Call the strategy algorithm model to generate band combinations and excitation intensity configurations based on the initial fluorescence response values;
[0057] Step S5: Monitor the key temperature in real time using a temperature sensor and compensate for and correct the fluorescence error caused by temperature drift.
[0058] Step S6: Output Cu 2+ Concentration test results.
[0059] Compared with the prior art, the beneficial effects of the present invention are that the fluorescence detection condition control system of the present invention effectively overcomes background fluorescence interference through intelligent strategy model, multi-band adjustment, temperature compensation and closed-loop deviation correction, improves the accuracy, sensitivity and stability of detection, significantly enhances the intelligence level of water quality fluorescence detection, and provides strong technical support for rapid and accurate monitoring in the field.
[0060] Furthermore, by employing an XGBoost-based intelligent strategy model, the excitation conditions are dynamically adjusted based on water quality, water temperature, and pre-excitation fluorescence intensity. This enables precise control over the quenching or enhancement of background fluorescence caused by background factors such as organic matter, dissolved salts, and turbidity in different water samples, significantly reducing false positives and false negatives and improving detection reliability. Utilizing a multi-band LED array and dynamic energy distribution strategy, the excitation light intensity and band combination are effectively adjusted to maximize the excitation efficiency of the target fluorescence signal. Through adaptive adjustment and real-time optimization, the detection sensitivity and stability under different water quality conditions are improved, ensuring the compatibility between the detection environment and excitation conditions. Introducing an XGBoost-based strategy library, combined with environmental information, initial fluorescence response, and temperature conditions, the optimal excitation scheme can be automatically generated, achieving adaptive matching under diverse water quality conditions, reducing the burden of manual adjustment, improving detection efficiency, and facilitating the deployment of embedded devices. Calibration parameters are used to adjust from fluorescence intensity to Cu... 2+ High-precision concentration mapping, combined with closed-loop deviation judgment and temperature compensation mechanisms, effectively suppresses the effects of measurement errors and temperature drift, improving the accuracy and repeatability of quantitative detection. The introduction of deviation detection and dynamic adjustment logic with relative and absolute error thresholds ensures robustness of measurements across different concentration ranges and illumination conditions, performing particularly well in low-concentration ppb-level detection, thus ensuring the system's reliability in complex field environments. Attached Figure Description
[0061] Various other advantages and benefits will become apparent to those skilled in the art upon reading the following detailed description of preferred embodiments. The accompanying drawings are for illustrative purposes only and are not intended to limit the invention. Furthermore, the same reference numerals denote the same parts throughout the drawings. In the drawings:
[0062] Figure 1 This is a functional block diagram of the fluorescence detection condition control system provided in an embodiment of the present invention;
[0063] Figure 2 This is a schematic diagram of the control logic of the fluorescence detection condition control system provided in an embodiment of the present invention;
[0064] Figure 3 This is the relevant training dataset for the fluorescence detection condition control system provided in the embodiments of the present invention;
[0065] Figure 4 A flowchart of a fluorescence detection condition control method provided in an embodiment of the present invention. Detailed Implementation
[0066] Exemplary embodiments of the present disclosure will now be described in more detail with reference to the accompanying drawings. While exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be implemented in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided to enable a more thorough understanding of the present disclosure and to fully convey the scope of the disclosure to those skilled in the art. It should be noted that, unless otherwise specified, the embodiments and features described herein can be combined with each other. The present invention will now be described in detail with reference to the accompanying drawings and embodiments.
[0067] See Figure 1-2 As shown, this embodiment provides a fluorescence detection condition control system, including:
[0068] The strategy library uses XGBoost to train strategy algorithm models for different water sample qualities and initial bands. Input parameters include water quality type, pre-excitation fluorescence intensity, and current temperature.
[0069] The initialization module loads the water quality type from the strategy library based on the detection environment and sets the initial state water sample conditions for matching.
[0070] The pre-excitation module includes a high-brightness narrowband LED array in the range of 340–440nm with a step of 10nm. One or more LEDs are integrated in a controllable array. The LED array is pulse-width modulated and current controlled by an FPGA. Single-band or multi-band combination excitation is performed. A focusing lens group is configured to achieve coaxial output of optical paths for each band. Single-band LEDs are lit one by one to obtain the initial fluorescence response value.
[0071] The adaptive detection module calls the strategy algorithm model to generate band combinations and excitation intensity configurations based on the initial fluorescence response value.
[0072] The temperature compensation module monitors key temperatures in real time using a temperature sensor and compensates for and corrects fluorescence errors caused by temperature drift.
[0073] The analysis report module outputs Cu 2+ Concentration test results.
[0074] Specifically, in this embodiment, the fluorescence detection condition control system adopts a combined architecture of an embedded processor and an FPGA (Field-Programmable Gate Array). By pre-installing XGBoost (Extreme Gradient Boosting) or LightGBM strategy libraries, it supports adaptive optimization and real-time inference for different water sample qualities, initial excitation bands, and temperature parameters. The core processing unit can be an STMicroelectronics STM32H7 series processor (such as the STM32H743II) or an NXP i.MX RT series processor, combined with an Intel / Altera Cyclone VE series or a Xilinx Artix-7 FPGA, for high-speed pulse-width modulation (PWM) control and data preprocessing of the multi-channel LED array, ensuring rapid switching and precise power adjustment for different excitation bands.
[0075] The light source uses high-power narrowband LEDs, such as the Luminus SST-10 series (365nm / 385nm / 410nm) or Nichia NCSU276A (365nm), covering the 340–440nm range. These LEDs can be lit individually or in combination via a programmable array, and, in conjunction with a focusing lens (such as the Thorlabs ACL2520U-A), multi-band coaxial optical output can be achieved. The temperature compensation module uses thermoelectric coolers (TECs), such as the Laird Thermal Systems UltraTEC. TM The UTX series, when paired with a high-precision temperature sensor (such as the Texas Instruments TMP117 or Maxim Integrated MAX31820), enables real-time closed-loop correction of LED thermal drift and changes in ambient temperature, compensating for temperature-induced fluorescence signal drift.
[0076] The software layer is based on embedded Linux (such as OpenWRT, Yocto) or lightweight Debian platforms, combined with Python / C++ and machine learning libraries such as scikit-learn, XGBoost, and LightGBM, for data acquisition, wavelength tuning, model training, and online inference. It also supports remote communication, OTA upgrades, and operation and maintenance management via RS485, Ethernet (optional WIZnet W5500), 4G (such as Quectel EC200U), or WIFI (such as Espressif ESP32-WROOM-32) modules.
[0077] It is understandable that this embodiment employs a hybrid architecture that combines an embedded processor and an FPGA, fully leveraging the advantages of embedded MCUs (low power consumption, high cost-effectiveness, and easy integration) and FPGAs (superior performance in multi-channel parallel high-speed control and real-time pulse width modulation (PWM) signal generation). This allows for the switching of LED array bands and adjustment of excitation intensity within milliseconds, ensuring the response speed and synchronization of fluorescence detection in multi-band combinations and rapid adaptive adjustments. This is particularly suitable for scenarios requiring rapid dynamic adjustment, such as on-site detection and continuous online monitoring.
[0078] Industrial-grade main controllers such as STM32H7 and NXP i.MX RT series are selected, which take into account high main frequency processing capabilities and rich peripheral interface resources, and can flexibly expand various sensors and communication modules, which facilitates later integration and maintenance; FPGAs such as Cyclone VE or Artix-7 have mature development toolchains, which can easily realize hardware acceleration for light source array control and sampling data preprocessing, reduce the computing power burden of MCU, and improve the operating efficiency of the entire system under low power consumption.
[0079] At the light source end, high-power narrowband LEDs with mature industry standards such as Nichia and Luminus are used, which have high spectral purity and good stability, and can accurately cover the required working range of 340–440nm. At the same time, the matching lens (such as Thorlabs ACL2520U-A) ensures coaxial output of multi-band optical paths, improves excitation light utilization, reduces optical noise, and improves detection sensitivity and repeatability.
[0080] Temperature control compensation uses TEC (thermoelectric cooler) and high-precision digital temperature sensor (such as TMP117). Through closed-loop temperature control algorithm and PWM regulation, it corrects the excitation intensity drift caused by ambient temperature or self-heating of light source in real time, ensuring long-term consistency of fluorescence signal. It is suitable for scenarios with high stability requirements, such as outdoor flowing water samples or continuous monitoring over multiple time periods.
[0081] The software layer utilizes lightweight Linux (OpenWRT, Yocto, or Debian) as the system support, enabling rapid integration of mainstream machine learning libraries such as Python / C++, scikit-learn, XGBoost, and LightGBM. This facilitates local offline training and embedded online inference of the policy library, ensuring the flexibility and scalability of the detection logic. Simultaneously, multiple communication methods are reserved, including RS485, Ethernet, 4G, and Wi-Fi, allowing the device to adapt to various industrial and field environments. This meets diverse usage needs such as centralized LAN management, remote OTA upgrades, and cloud-based maintenance, reducing future maintenance and expansion costs.
[0082] The technical solution of this embodiment achieves a detection limit of ≤5 ppb, significantly improving detection sensitivity. It can detect target substances at lower concentrations (such as heavy metal ions), making it suitable for scenarios with higher requirements for trace pollutant detection, such as drinking water safety monitoring or environmental trace pollution analysis; the response time is ≤5 seconds, greatly shortening the detection time; and the fluctuation coefficient is <±1%, significantly improving the stability and repeatability of the detection results.
[0083] In some embodiments of this application, the strategy library uses XGBoost to train strategy algorithm models for different water sample qualities and initial bands, including:
[0084] By using a weighted superposition method, when multiple LEDs of different wavelengths are used for simultaneous excitation, the overall equivalent excitation intensity on the sample is calculated. The total excitation intensity is formed by the weighted superposition of the excitation intensities of LEDs in different wavelength bands, automatically achieving energy allocation to the wavelength band with optimal sensitivity. This is achieved through the following formula:
[0085]
[0086] in, λ represents the total excitation intensity; i This indicates that the i-th band includes 365nm, 380nm, and 410nm; This refers to the actual output intensity of the LED in that frequency band, which is adjusted by controlling the drive current or duty cycle; k i It is the optimal weighting coefficient calculated by AI based on real-time water quality, initial fluorescence, etc., representing the contribution of this band to the target fluorescence response.
[0087] Specifically, PWM (Pulse Width Modulation) or DAC (Digital-to-Analog Converter) is used to control the current / voltage of each LED, thereby adjusting its output intensity. Multi-channel independent control is supported, ensuring that each band can be controlled k-bit. i Precise weight assignment. The main control chip (such as STM32, ESP32, Raspberry Pi, etc.) is connected to the LED driver module using I2C, SPI, or UART interfaces. The main control chip receives the band and weight configuration output by the AI model and sends it to the LED controller.
[0088] Understandably, this application, by introducing a weighted superposition excitation intensity formula, can automatically achieve the optimal band combination and energy allocation based on the differences in the contribution of different bands to the sample fluorescence signal during multi-band excitation. This solves the problem of poor adaptability of a single fixed wavelength: through multi-band combination superposition, the system can dynamically adapt to the excitation requirements under different water qualities and concentration ranges, improving detection sensitivity and anti-interference capability. Furthermore, by independently and precisely adjusting the current / voltage of each LED through PWM (Pulse Width Modulation) or DAC (Digital-to-Analog Conversion), and combining standard interfaces such as I2C, SPI, and UART, it can flexibly accommodate main control chips such as STM32, ESP32, and Raspberry Pi, ensuring the modularity and scalability of the hardware architecture, facilitating later maintenance or scene replacement.
[0089] In some embodiments of this application, the strategy library uses XGBoost to train strategy algorithm models for different water sample qualities and initial bands, including:
[0090] Input the current environmental information, including water quality type, pre-excitation fluorescence intensity, and current temperature. Output the optimal excitation scheme. Input the initial fluorescence value, temperature, and water quality label. Output the optimal band combination and weights to achieve adaptive matching.
[0091]
[0092] X = [F init [,T,WQ];
[0093] Among them, F init First, a single band is used for detection to obtain the initial response; T is the current temperature; WQ is the water quality type label, including surface water, industrial wastewater, and drinking water; λ1 and λ2 are recommended band combinations, based on... The allocation is obtained; k1 and k2 are the weights of each band.
[0094] Specifically, the algorithm implementation includes:
[0095] #Step 1: Load the trained XGBoost model
[0096] import joblib
[0097] import numpy as np
[0098] import xgboost as xgb
[0099] #Load Model
[0100] model=joblib.load("xgb_cu2_wavelength_model.pkl")
[0101] #Step 2: Input current environment information in real time
[0102] F_init = 2.3# Initial fluorescence response for single-band detection
[0103] T = 25.0 # Current temperature
[0104] WQ = 1# Water Quality Label, 0 = Surface Water, 1 = Industrial Wastewater, 2 = Drinking Water
[0105] #Step 3: Assemble the input vector
[0106] X_input=np.array([[F_init,T,WQ]])
[0107] #Step 4: Call the model for inference
[0108] Y_pred=model.predict(xgb.DMatrix(X_input))
[0109] #Step 5: Extract the combined bands and weights from the output
[0110] lambda1,lambda2,k1,k2=Y_pred[0]
[0111] print(f"Recommended bands: {lambda1:.1f}nm, {lambda2:.1f}nm")
[0112] print(f"Corresponding weights: k1={k1:.2f}, k2={k2:.2f}")
[0113] #Step 6: Send the band and weight to the LED controller
[0114] The controller turns on the LEDs corresponding to lambda1 / lambda2, and sets the PWM to a ratio of k1 to k2.
[0115] Understandably, by conducting a single-band pre-detection and combining it with real-time temperature and water quality labels, the system can automatically provide the optimal band combination and its excitation intensity allocation, which is far superior to the traditional fixed wavelength mode. It only requires a one-time setting and does not require frequent manual parameter adjustment.
[0116] See Figure 3 As shown, only 15 pieces of relevant training data from the first combination band, the second combination band, and the third combination band are randomly selected and displayed in this embodiment.
[0117] It is understood that the embodiments of this application also include a preset k with different correction or compensation factors determined for each type of environmental water quality. i The values, as an example, include a hardness correction factor for low turbidity groundwater and a co-quenching weight compensation for high organic matter content in urban sewage.
[0118] This implementation provides specific implementation examples:
[0119] Detection of Cu in groundwater 2+ The current water quality contains a certain amount of humic acid (NOM), the pH value is slightly acidic, and the temperature is 25℃.
[0120] System-loaded water quality type: Groundwater + NOM;
[0121] The pre-excitation module was lit up one by one in the 340-440nm band, and the initial fluorescence response curves were recorded.
[0122] After analysis by the AI model, it is recommended to use the 370nm and 410nm bands, with weights of k1 = 0.6 and k2 = 0.4 respectively.
[0123] but
[0124] The controller issues commands to set the 370nm LED output to 60% intensity and the 410nm LED output to 40% intensity respectively; after the sample is excited, the fluorescence signal is collected and compared; when the measured fluorescence signal is determined to be lower than expected, the model corrects the weight value; the new scheme is adopted in the next measurement to continuously approach the optimal state.
[0125] Understandably, by pre-exciting at each wavelength within this range, the influence of different wavelengths on the fluorescence response can be fully understood. This meticulous scanning can capture the optimal excitation wavelength for various organic compounds in the water sample. Furthermore, by calculating the total excitation intensity through weighted summation, the contribution of different wavelengths is ensured to be reasonably quantified, avoiding the bias that may be caused by a single wavelength.
[0126] In some embodiments of this application, the strategy library uses XGBoost to train strategy algorithm models for different water sample qualities and initial bands, including:
[0127] The error of the optimal band of the sample is minimized by combining the output bands. After the model is trained, it can be used for inference in real time on embedded devices, providing the combined bands and weights, where:
[0128]
[0129] L(θ) is the loss function; Ω(f) is the regularization term used to prevent overfitting; X i=[F init ,T,WQ],Y i =λ1,λ2,k1,k2].
[0130] Understandably, the introduction of the regularization term Ω(f) helps control model complexity, prevents the model from overfitting the training data, and thus improves the model's generalization ability on new data. This ensures that the model's predicted combination of bands and weights is as close as possible to the true optimal values. This enables the model to accurately recommend the excitation bands best suited to the current water quality conditions.
[0131] In some embodiments of this application, the adaptive detection module includes:
[0132] The measured fluorescence intensity was compared with Cu 2+ Corresponding to the actual concentration, parameters a, b, and c were selected through experimental calibration, where:
[0133]
[0134] Where F is the digital value of the detected fluorescence intensity output by the PMT or CMOS;
[0135] C cu It refers to the concentration of copper ions in the water sample;
[0136] Parameters a, b, and c are parameters fitted from the calibration sample in the experiment, where b ≠ 1.
[0137] Specifically, this is due to the relationship between the fluorescence signal intensity F and the copper ion concentration C. cu The relationship between them is nonlinear, b≠1. This nonlinear relationship is caused by a variety of factors, such as: static quenching or dynamic quenching; certain substances (such as organic molecules) may affect the fluorescence signal through energy transfer or other mechanisms, resulting in a nonlinear response; in multi-component systems, energy can be transferred from one molecule to another, thereby changing the intensity of the fluorescence signal; in addition, phenomena such as self-quenching and aggregation-induced emission may also lead to a nonlinear response.
[0138] Specifically, the implementation methods include:
[0139] Collect a series of known copper ion concentrations C cu The data pairs of the corresponding fluorescence signal intensity F (C) cu ,i,F), where (i=1,2,...,n).
[0140] Initialize the parameters a, b, and c using some reasonable guesses or random values as the starting point.
[0141] The parameters a, b, and c are fitted using a nonlinear least squares method (Levenberg-Marquardt algorithm). The goal is to minimize the sum of squared errors between the predicted and actual values.
[0142] Specifically, its implementation algorithm includes:
[0143]
[0144]
[0145] Furthermore, based on the fitted parameters a, b, c, and the real-time measured fluorescence signal intensity F, the following is calculated:
[0146] Calculate the corresponding copper ion concentration C. cu Because of the formula It is nonlinear, and a numerical method is used to solve it.
[0147] Specifically, its implementation algorithm includes:
[0148]
[0149] In some embodiments of this application, the adaptive detection module further includes:
[0150] Closed-loop deviation determination, if F measured and F expected Measurements taken under different light intensities may cause distortion of the absolute difference, in F expected When the relative error is greater than 1, the deviation is judged by relative error. If the difference between the measured fluorescence and the expected value exceeds the relative error threshold ∈, the excitation combination is automatically re-optimized or temperature compensation is performed. The relative error threshold ∈ is calculated by the following formula:
[0151]
[0152] F measured It is based on the actual detected fluorescence value;
[0153] F expected It is the theoretical fluorescence value obtained by combining the strategy algorithm model with the known concentration range.
[0154] In some embodiments of this application, the adaptive detection module further includes:
[0155] Closed-loop deviation determination, if F measured and F expected Measurements taken under different light intensities may distort the absolute difference, especially in low concentration ranges (ppb level). expectedIf the value is less than 1, the system switches to absolute error judgment to prevent small values from amplifying errors. Absolute error is used for deviation judgment. If the difference between the measured fluorescence and the expected value exceeds the absolute error threshold δ, the excitation combination is automatically re-optimized or temperature compensation is performed. The absolute error threshold δ is calculated using the following formula:
[0156] |F measured -F expected |>δ;
[0157] F measured It is based on the actual detected fluorescence value;
[0158] F expected It is the theoretical fluorescence value obtained by combining the strategy algorithm model with the known concentration range.
[0159] Specifically, its implementation algorithm includes:
[0160]
[0161] Understandably, this closed-loop feedback mechanism enhances the system's robustness and reliability, enabling timely adjustments in the event of anomalies. Furthermore, this flexible error calculation method effectively avoids the problem of small values amplifying errors, ensuring measurement accuracy across different concentration ranges.
[0162] In some embodiments of this application, the temperature compensation module compensates for fluorescence errors caused by temperature drift, including:
[0163] I LED =I ref ·[1+α(T set -T LED )];
[0164] Among them, I LED It is the LED current; I ref It is the target reference current; T LED This is the current temperature of the LED; T set α is the system calibration temperature; α is the temperature compensation coefficient.
[0165] See Figure 4 As shown, this embodiment also provides a method for controlling fluorescence detection conditions, including:
[0166] Step S1: Use XGBoost to train strategy algorithm models for different water sample qualities and initial bands. Input parameters include water quality type, pre-excitation fluorescence intensity, and current temperature.
[0167] Step S2: Load the water quality type from the strategy library according to the detection environment and set the initial state water sample conditions for matching;
[0168] Step S3: Light up the single-band LEDs one by one and obtain the initial fluorescence response value;
[0169] Step S4: Call the strategy algorithm model to generate band combinations and excitation intensity configurations based on the initial fluorescence response values;
[0170] Step S5: Monitor the key temperature in real time using a temperature sensor and compensate for and correct the fluorescence error caused by temperature drift.
[0171] Step S6: Output Cu 2+ Concentration test results.
[0172] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0173] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0174] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0175] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0176] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and not to limit it. Although the present invention has been described in detail with reference to the above embodiments, those skilled in the art should understand that modifications or equivalent substitutions can still be made to the specific implementation of the present invention. Any modifications or equivalent substitutions that do not depart from the spirit and scope of the present invention should be covered within the scope of protection of the claims of the present invention.
Claims
1. A fluorescent detection condition control system characterized by, Comprise: The strategy library uses XGBoost to train the strategy algorithm model of different water sample water quality and initial wave band, and the input parameters include water quality type, pre-excitation fluorescence intensity and current temperature; The initialization module loads the water quality type according to the detection environment, and sets the initial state water sample condition matching; The pre-excitation module includes a high-brightness narrow-band LED array in the range of 340-440 nm with a step of 10 nm, and single or multiple LEDs are integrated in a controllable array. The LED array is pulse width modulated and current controlled by FPGA, single wave band or multi-wave band combination excitation, and a condenser lens group is configured to realize coaxial output of each wave band light path. Each single wave band LED is lit to obtain the initial fluorescence response value; The adaptive detection module calls the strategy algorithm model to generate wave band combination and excitation intensity configuration according to the initial fluorescence response value; The temperature compensation module monitors the key temperature in real time through the temperature sensor, and compensates and corrects the fluorescence error caused by temperature drift; The analysis report module outputs the Cu²⁺ concentration detection result; The strategy library uses XGBoost to train the strategy algorithm model of different water sample water quality and initial wave band, comprising: When multiple LEDs of different wavelengths are used for simultaneous excitation, the equivalent excitation intensity of the whole to the sample is calculated by the method of weighted superposition. The total excitation intensity is formed by the weighted superposition of the excitation intensity of different wave bands. The energy distribution of the optimal sensitivity wave band is automatically realized. The calculation is realized by the following formula: wherein, represents the total excitation intensity; represents the ith waveband includes 365nm, 380nm, 410nm; is the actual output intensity of the waveband LED, which is adjusted by controlling the driving current or duty cycle; is the optimal weight coefficient calculated by AI according to real-time water quality, initial fluorescence, etc., indicating the contribution of the waveband to the target fluorescence response; The adaptive detection module comprises: The measured fluorescence intensity is corresponding to the actual concentration of Cu²⁺, and the parameters a, b and c are selected by experiment calibration. Among them: ; Wherein, F is the digital value output by PMT or CMOS; Ccu is the concentration of copper ions in the water sample; Parameters a, b and c are parameters fitted by calibration samples in the experiment, and b≠1.
2. The fluorescence detection condition control system according to claim 1, characterized by, The strategy library uses XGBoost to train the strategy algorithm model of different water sample water quality and initial wave band, comprising: Input current environmental information water quality type, pre-excitation fluorescence intensity and current temperature, output optimal excitation scheme, input initial fluorescence value, temperature and water quality label, output optimal wave band combination and weight, realize adaptive matching: ; ; wherein, is the initial response obtained by a single waveband detection; T is the current temperature; WQ is the water quality type label, including surface water, industrial wastewater, drinking water; is the recommended combination waveband, according to is allocated; is the weight of each waveband.
3. The fluorescence detection condition control system according to claim 2, characterized by, The strategy library uses XGBoost to train the strategy algorithm model of different water sample water quality and initial wave band, comprising: The error of the optimal wave band of the labeled sample is minimized, and the model is trained well and can be inferences in real time on the embedded device. The combined wave band and weight are given, wherein: ; is a loss function; Ω(f) is a regularizer term to prevent overfitting; .
4. The fluorescence detection condition control system according to claim 3, characterized by The adaptive detection module further comprises: Closed loop deviation determination, if F measured and F expected from measurements under different light intensities can cause absolute difference distortion, in the case of F expected > 1, the relative error is used for deviation determination, if the measured fluorescence and the expected value difference exceeds the relative error threshold ε, the excitation combination is automatically re-optimized or temperature compensation is performed, the relative error threshold ε is obtained by the following formula: ; F measured is the actually detected fluorescence value according to F expected is the theoretical fluorescence value obtained by the strategy algorithm model combined with the known concentration interval.
5. The fluorescence detection condition control system according to claim 4, characterized by The adaptive detection module further comprises: Closed loop deviation determination, if F measured and F expected From the measurement under different light intensity, may cause the absolute difference distortion, when belongs to the low concentration area ppb level, F expected Less than 1 switch to absolute error judgment, to prevent small value amplification error; deviation determination is carried out by using absolute error, if the measured fluorescence and the expected value difference exceeds the absolute error threshold δ, then automatically reoptimize the excitation combination or temperature compensation, the absolute error threshold δ, is obtained by the following formula calculation: ; F measured is the actually detected fluorescence value according to F expected is the theoretical fluorescence value obtained by the strategy algorithm model combined with the known concentration interval.
6. The fluorescence detection condition control system according to claim 5, characterized by The temperature compensation module compensates and corrects the fluorescence error caused by temperature drift, comprising: ; wherein, is the LED current; is the target reference current; is the current temperature of the LED; is the system calibration temperature; is the temperature compensation coefficient.
7. The method of controlling the conditions of fluorescence detection, which is applied to the system of controlling the conditions of fluorescence detection according to any one of claims 1 to 6, characterized in that, Comprise: Step S1: using XGBoost to train the strategy algorithm model of different water sample water quality and initial wave band, and the input parameters include water quality type, pre-excitation fluorescence intensity and current temperature; Step S2: according to the detection environment, the strategy library loads the water quality type, and sets the initial state water sample condition matching; Step S3: light up single wave band LED, get initial fluorescence response value; Step S4: Call the strategy algorithm model to generate the wave band combination and excitation intensity configuration according to the initial fluorescence response value; Step S5: Real-time monitoring of the key temperature through the temperature sensor, and compensation correction according to the fluorescence error caused by temperature drift; Step S6: Output the Cu²⁺ concentration detection result.
Citation Information
Patent Citations
Water quality detection system
CN115372321A
Dual wavelength context imaging raman and fluorescence spectrometer
US20180328786A1