Real-time monitoring system for multiple parameters of environmental water quality based on spectral analysis

By using a coaxial coupling optical path and time-division multiplexing acquisition technology of ultraviolet-visible spectroscopy and Raman spectroscopy, combined with the characteristic peak intensity of Raman spectroscopy as a priori constraint, and utilizing Beer-Lambert law and Mie scattering fitting function, the problem of spectral inversion distortion was solved, and stable monitoring of multiple parameters in complex water bodies was achieved.

CN122361328APending Publication Date: 2026-07-10YANCHENG TIAN ZHOU ENVIRONMENTAL PROTECTION EQUIP CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
YANCHENG TIAN ZHOU ENVIRONMENTAL PROTECTION EQUIP CO LTD
Filing Date
2026-06-03
Publication Date
2026-07-10

AI Technical Summary

Technical Problem

When dealing with complex natural water bodies, existing spectral water quality monitoring systems cannot establish a stable physical mapping relationship between light scattering loss and wavelength using purely data-driven spectral preprocessing methods. This results in the inability to completely separate suspended matter scattering interference from chromophore absorption, causing the inversion model to get stuck in local optima when solving for multiple overlapping bands, leading to spectral inversion distortion.

Method used

A coaxially coupled optical path for collecting ultraviolet-visible spectroscopy and Raman spectroscopy is adopted. Time-division multiplexing acquisition is constructed using a dichroic mirror and an optical fiber combiner to form the same spatial coordinates. The characteristic peak intensity of the Raman spectrum is used as a priori constraint. Nonlinear scattering correction is performed using the Beer-Lambert law. The scattering and absorption characteristics of suspended matter are separated by a partial least squares inversion model. A Mie scattering fitting function is constructed for nonlinear fitting to generate a suspended matter scattering fitting curve and lock the solution space boundary of the overlapping bands in the ultraviolet-visible spectrum.

Benefits of technology

It effectively eliminates the spectral inversion distortion problem caused by the lack of intrinsic physical characteristics of substances under high turbidity background, realizes stable inversion of chemical oxygen demand, total organic carbon and ammonia nitrogen parameters, reduces spectral cross-sensitivity and random noise interference, and improves the accuracy of spectral inversion.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122361328A_ABST
    Figure CN122361328A_ABST
Patent Text Reader

Abstract

This invention relates to the technical field of testing or analyzing materials by measuring their physicochemical properties, specifically to a real-time monitoring system for multiple parameters of environmental water quality based on spectral analysis. The system includes optical paths for acquiring ultraviolet-visible (UV-Vis) and Raman spectra. These two optical paths are coaxially coupled via a dichroic mirror and an optical fiber combiner and connected to the same water flow cell. A timing control module enables time-division multiplexing acquisition of the same spatial coordinates. An edge computing module receives the combined spectral data, performs nonlinear scattering correction based on the Beer-Lambert law, separates the baseline drift component representing suspended matter scattering and the transmission component representing absorption characteristics, and inputs the characteristic peak intensity of the Raman spectrum as a priori constraint into the partial least squares inversion model. By qualitatively identifying specific organic compounds through Raman characteristic peaks, the solution space boundary of the corresponding overlapping bands in the UV-Vis spectrum is locked, and the inversion results for chemical oxygen demand (COD), total organic carbon (TOC), and ammonia nitrogen are output.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the technical field of testing or analyzing materials by measuring their physicochemical properties, and specifically to a real-time monitoring system for multiple parameters of environmental water quality based on spectral analysis. Background Technology

[0002] Existing spectral water quality monitoring systems typically employ a single light source emitting a beam through a water flow tank, with a spectrometer receiving the transmitted or scattered light to obtain the ultraviolet-visible absorption spectrum. For multiple parameters in the water body, such as chemical oxygen demand (COD), total organic carbon (TOC), and ammonia nitrogen, partial least squares chemometric inversion models are usually established in peripheral equipment. To address light scattering interference from suspended solids and sediment commonly found in natural water bodies, current technologies generally employ purely data-driven spectral preprocessing methods such as derivative spectroscopy or standard normal transformation. After receiving the spectral data, mathematical transformations are used to remove the scattering background, and absorption characteristics are extracted before being input into the inversion model to calculate the concentrations of each parameter.

[0003] The aforementioned existing technologies suffer from a core deficiency when dealing with complex natural water bodies: purely data-driven spectral preprocessing methods cannot establish a stable physical mapping relationship between light scattering loss and wavelength. The particle size distribution and concentration of suspended matter in natural water bodies are dynamically changing, resulting in nonlinear fluctuations in the scattering background. Relying solely on data transformations within the UV-Vis absorption spectrum lacks a reference standard based on the intrinsic physical characteristics of the matter. In scenarios with multiple components and high turbidity, purely mathematical transformations cannot completely separate suspended matter scattering interference from chromophore absorption, causing the inversion model to get stuck in local optima when solving for overlapping multi-parameter bands, resulting in spectral inversion distortion. Summary of the Invention

[0004] The purpose of this invention is to provide a real-time monitoring system for multiple parameters of environmental water quality based on spectral analysis, which can solve the problems mentioned in the background art.

[0005] To achieve the above objectives, the technical solution adopted by the present invention is as follows:

[0006] A real-time monitoring system for multiple parameters of environmental water quality based on spectral analysis includes an ultraviolet-visible (UV-Vis) spectral acquisition optical path, a Raman spectral acquisition optical path, and an edge computing module. The UV-Vis and Raman spectral acquisition optical paths are coaxially coupled via a dichroic mirror and an optical fiber combiner, and the coaxial coupling optical path is connected to the same water flow pool. The UV-Vis spectral acquisition optical path includes a broadband halogen light source, and the Raman spectral acquisition optical path includes a narrow-linewidth laser. A timing control module connects the broadband halogen light source and the narrow-linewidth laser to achieve time-division multiplexing acquisition of UV-Vis and Raman spectra in the same spatial coordinates. The edge computing module receives the combined spectral data output from the coaxial coupled optical path, performs nonlinear scattering correction based on the Beer-Lambert law to separate the baseline drift component representing suspended matter scattering and the transmission component representing absorption characteristics, and inputs the characteristic peak intensity of the Raman spectrum as a priori constraint into the partial least squares inversion model of the ultraviolet-visible spectrum. By qualitatively identifying specific organic compounds through the Raman characteristic peaks, the solution space boundary of the corresponding overlapping band in the ultraviolet-visible spectrum is locked, and the inversion results of chemical oxygen demand, total organic carbon and ammonia nitrogen are output, thus constituting the real-time monitoring system for multiple parameters of environmental water quality based on spectral analysis.

[0007] Preferably, the dichroic mirror is positioned at the intersection of the beam emitted from the broadband halogen light source and the beam emitted from the narrow-linewidth laser. The beam emitted from the broadband halogen light source passes through the dichroic mirror, and the beam emitted from the narrow-linewidth laser coincides with the beam emitted from the broadband halogen light source after being reflected by the dichroic mirror. The incident end face of the fiber combiner is positioned on the optical path of the coinciding beams, and the exit end face of the fiber combiner is connected to an incident fiber. The end of the incident fiber is fixed to the outside of the light-transmitting window of the water flow pool. A reflector is positioned inside the water flow pool on the other side opposite to the light-transmitting window. The reflector reflects the light signal transmitted through the water sample back to the incident fiber along the original path. The cladding of the incident fiber is wrapped with a light-shielding coating, which has a light-transmitting aperture only at the end face of the incident fiber.

[0008] Preferably, the timing control module includes a field-programmable gate array (FPGA) and two field-effect transistor (FET) driver circuits. The FPGA generates two pulse width modulation (PWM) signals that are inversely related to each other. The two PWM signals are respectively connected to the input terminals of the two FET driver circuits, and the output terminals of the two FET driver circuits are respectively connected to the power supply circuit of the broadband halogen light source and the power supply circuit of the narrow linewidth laser. The FPGA is internally equipped with a dead-time register. The dead-time register inserts a low-level state of a preset time length during the high-low level switching of the two PWM signals. The value of the preset time length is set according to the maximum value of the extinction decay time constant of the broadband halogen light source and the ignition time constant of the narrow linewidth laser.

[0009] Preferably, the process of the edge computing module performing the nonlinear scattering correction based on Beer-Lambert's law includes: extracting ultraviolet-visible spectral data from the combined spectral data; dividing the ultraviolet-visible spectral data into multiple wavelength intervals at equal intervals; constructing a Mie scattering fitting function with suspended particle size as the independent variable and light scattering cross-sectional area as the dependent variable for each wavelength interval; performing nonlinear least squares fitting on the envelope of the ultraviolet-visible spectral data using the Mie scattering fitting function to generate a suspended particle scattering fitting curve; subtracting the suspended particle scattering fitting curve from the ultraviolet-visible spectral data to output the transmission component representing the absorption characteristics; and storing the suspended particle scattering fitting curve as the baseline drift component representing suspended particle scattering in a register.

[0010] Preferably, the step of inputting the characteristic peak intensity of the Raman spectrum as a priori constraint into the partial least squares inversion model of the UV-Vis spectrum includes: extracting the peak area integral value of the characteristic wavenumber position corresponding to the molecular bond of a specific organic compound in the Raman spectrum, converting the peak area integral value into a diagonal matrix, performing a Hadamard product operation between the diagonal matrix and the principal component loading matrix in the partial least squares inversion model to generate a constraint loading matrix; during the iterative solution of the partial least squares inversion model, replacing the original principal component loading matrix with the constraint loading matrix, projecting the transmission component representing the absorption characteristics into the orthogonal space formed by the constraint loading matrix, and solving for the regression coefficient vector corresponding to the projected coordinates.

[0011] Preferably, the steps for outputting the inversion results of chemical oxygen demand (COD), total organic carbon (TOC), and ammonia nitrogen (MN) include: inputting the regression coefficient vector into a multivariate linear equation system, wherein the independent variables of the multivariate linear equation system are each element in the regression coefficient vector, and the dependent variables of the multivariate linear equation system are the concentration values ​​of COD, TOC, and MN; the edge computing module is connected to an external storage medium, which pre-stores historical water quality ledger data; the edge computing module performs a difference operation on the dependent variable calculated at the current time and the dependent variable stored in the external storage medium at the previous time, compares the difference result with a preset fluctuation threshold, and generates a corresponding data supplementation instruction or alarm trigger instruction based on the comparison result and sends it to the remote monitoring server.

[0012] Preferably, the light-transmitting window includes a sapphire substrate and a hydrophobic coating deposited on the outer surface of the sapphire substrate. The inner surface of the sapphire substrate is attached to the through-hole in the side wall of the water circulation pool. A self-focusing lens is disposed between the end face of the incident optical fiber and the outer surface of the sapphire substrate, and the focal plane of the self-focusing lens coincides with the outer surface of the sapphire substrate. A sleeve is fixedly connected to the side wall of the self-focusing lens. The inner wall of the sleeve is provided with an internal thread, and the outer surface of the incident optical fiber is provided with an external thread that mates with the internal thread. The sleeve achieves displacement adjustment of the self-focusing lens along the optical axis by screwing the internal thread and the external thread together. A locking screw is provided through the outer side wall of the sleeve, and the end of the locking screw abuts against the outer wall of the incident optical fiber.

[0013] Preferably, the field-programmable gate array (FPGA) is further connected to a temperature sensor and a digital-to-analog converter (DAC). The temperature sensor is attached to the surface of the narrow-linewidth laser's housing and inputs the collected temperature voltage signal to the FPGA's DAC pin. The FPGA internally contains a lookup table storing a mapping between temperature values ​​and pulse frequencies. The FPGA queries the lookup table based on the temperature voltage signal input to the DAC pin and outputs a clock signal of the corresponding frequency. This clock signal serves as the reference clock source for the pulse width modulation signal and is input to the FPGA's clock input pin. The DAC's input is connected to the FPGA's general-purpose input / output pins, and its output is connected to the narrow-linewidth laser's current adjustment terminal.

[0014] Preferably, the process of constructing a Mie scattering fitting function with suspended particle size as the independent variable and light scattering cross-sectional area as the dependent variable includes: acquiring standard spectral data of a preset number of standard water samples with known suspended particle concentrations in the ultraviolet-visible spectral band; inputting the standard spectral data into a support vector regression machine, using the suspended particle size and the light scattering cross-sectional area as input feature vectors, and the absorbance value of the standard spectral data as the output label; training the kernel function parameters and penalty factor of the support vector regression machine; using the decision function of the trained support vector regression machine as the Mie scattering fitting function; and when performing nonlinear least squares fitting on actual water samples, setting the initial guess value of the suspended particle size as the predicted value output by the support vector regression machine, and setting the initial guess value of the light scattering cross-sectional area as a constant term.

[0015] Preferably, before performing the Hadamard product operation on the diagonal matrix and the principal component loading matrix in the partial least squares inversion model, the method further includes a smoothing filter step on the diagonal matrix: constructing a sliding window whose width covers three wavenumber points adjacent to the characteristic wavenumber position; moving the sliding window point by point on the abscissa of the Raman spectrum; calculating the arithmetic mean of the Raman intensity corresponding to each wavenumber point within the sliding window; replacing the original Raman intensity at the center point of the sliding window with the arithmetic mean of the Raman intensity; recalculating the peak area integral value based on the replaced Raman spectrum; updating the diagonal elements of the diagonal matrix; setting the elements in the updated diagonal matrix whose values ​​are lower than a preset noise baseline to zero; generating a sparse diagonal matrix; and performing the Hadamard product operation using the sparse diagonal matrix.

[0016] Compared with the prior art, the beneficial effects of the present invention are as follows: 1. A coaxial coupling optical path is constructed using a dichroic mirror and an optical fiber combiner to achieve time-division multiplexing acquisition of the UV-Vis and Raman spectra in the same spatial coordinates. The intensity of characteristic peaks corresponding to specific organic molecular bonds in the Raman spectrum is used as a priori constraints and input into the partial least squares inversion model. During the iterative solution of the model, a Hadamard product operation is performed using the diagonal matrix containing the prior constraints and the principal component loading matrix to generate a constraint loading matrix. The transmission component is projected onto the orthogonal space formed by the constraint loading matrix to solve for the regression coefficient vector. This mechanism transforms the spectral separation of pure data dimension into a decoupling process with physical boundary constraints. By qualitatively identifying specific organic compounds through Raman characteristic peaks, the solution space boundary of corresponding overlapping bands in the UV-Vis spectrum is locked, eliminating spectral cross-sensitivity when multiple components coexist, and solving the problem of spectral inversion distortion caused by the lack of intrinsic physical characteristic references of substances in high turbidity backgrounds.

[0017] 2. A field-programmable gate array (FPGA) generates inverse pulse width modulation (PWM) signals and inserts dead time during high-low level switching. The pulse frequency is adjusted by consulting an internal lookup table based on feedback from a temperature sensor attached to the surface of the narrow-linewidth laser housing. Combined with closed-loop control of the laser current adjustment terminals via a digital-to-analog converter (DAC), the stability of the narrow-linewidth laser's output wavelength is maintained under different ambient temperatures. Before spectral inversion, a Mie scattering fitting function is used to perform nonlinear least-squares fitting on the envelope of the UV-Vis spectral data to generate a suspended object scattering fitting curve. The transmission component is obtained by subtracting the suspended object scattering fitting curve from the UV-Vis spectral data. For the construction of Raman spectral prior constraints, a sliding window is used to move point by point on the Raman spectrum abscissa to calculate the arithmetic mean for smoothing filtering. Elements below the preset noise baseline are set to zero to generate a sparse diagonal matrix, reducing random noise interference during Raman feature extraction and ensuring the accuracy of the prior constraint boundary conditions input into the inversion model. Attached Figure Description

[0018] Figure 1 This is a flowchart illustrating the coaxial coupling optical path construction and spectral acquisition process of the present invention. Figure 2 This is a flowchart of the timing control module for driving the light source in this invention. Figure 3 This is a flowchart of the nonlinear scattering correction process based on the Beer-Lambert law of the present invention. Figure 4 This is a flowchart of the Raman spectroscopy prior constraint construction and load matrix constraint of the present invention; Figure 5 This is a flowchart of the water quality multi-parameter partial least squares inversion solution of the present invention; Figure 6 This is a flowchart of the differential monitoring of water quality data and remote command generation of the present invention. Detailed Implementation

[0019] In one embodiment, a real-time monitoring system for multiple parameters of environmental water quality based on spectral analysis includes an ultraviolet-visible (UV-Vis) spectral acquisition optical path, a Raman spectral acquisition optical path, and an edge computing module. The UV-Vis and Raman spectral acquisition optical paths are coaxially coupled via a dichroic mirror and an optical fiber combiner, and this coaxial coupling optical path is connected to the same water flow tank. The UV-Vis spectral acquisition optical path includes a broadband halogen light source, and the Raman spectral acquisition optical path includes a narrow-linewidth laser. A timing control module connects the broadband halogen light source and the narrow-linewidth laser, enabling time-division multiplexing acquisition of UV-Vis and Raman spectra in the same spatial coordinates. The edge computing module receives the combined spectral data output from the coaxial coupled optical path, performs nonlinear scattering correction based on the Beer-Lambert law to separate the baseline drift component representing the scattering of suspended matter and the transmission component representing the absorption characteristics, and inputs the characteristic peak intensity of the Raman spectrum as a priori constraint into the partial least squares inversion model of the ultraviolet-visible spectrum. By qualitatively identifying specific organic compounds through the Raman characteristic peaks, the solution space boundary of the corresponding overlapping band in the ultraviolet-visible spectrum is locked, and the inversion results of chemical oxygen demand, total organic carbon and ammonia nitrogen are output.

[0020] refer to Figure 1 Specifically, the coaxial coupling optical path uses a dichroic mirror to spatially combine the beam emitted from the broadband halogen source and the beam emitted from the narrow-linewidth laser. The combined beam is then coupled into the same transmission optical path via an optical fiber combiner, and finally incident on the water sample in the same flow cell. This structure ensures that the UV-Vis and Raman spectral acquisition beams have completely consistent transmission paths and spatial coordinates in the water sample, eliminating the representativeness error of the water sample caused by the spatial position difference between different acquisition optical paths. The timing control module controls the power supply circuits of the broadband halogen source and the narrow-linewidth laser, enabling the two sources to conduct and emit light in different time windows. Correspondingly, the edge computing module acquires UV-Vis spectral data and Raman spectral data in the corresponding light source's conduction time window, realizing time-division multiplexing acquisition of the two spectra and avoiding crosstalk between the optical signals from different sources.

[0021] refer to Figure 3 After receiving the combined spectral data, the edge computing module first performs band splitting on the combined spectral data, extracting the data corresponding to the ultraviolet-visible spectral acquisition band and the data corresponding to the Raman spectral acquisition band. For the ultraviolet-visible spectral band data, the edge computing module performs nonlinear scattering correction based on the Beer-Lambert law. Its underlying logic is based on the modified Beer-Lambert law, as shown in formula (1): (1), In formula (1), wavelength The intensity of transmitted light at that location. wavelength The intensity of incident light at that location, For the analyte at wavelength The molar absorption coefficient at that location The molar concentration of the analyte is denoted as . For suspended matter at wavelength The scattering coefficient at that location, The equivalent particle size of the suspended matter. This represents the optical path length of light in the water sample.

[0022] The It is the intrinsic optical constant of the substance, which depends only on the molecular structure of the substance, the wavelength of the incident light, and the temperature of the system, and is independent of the substance concentration and optical path length. In this system The temperature correction model was used to obtain the standard solution calibration method, and its derivation and calibration process is as follows: Theoretical derivation of the molar absorption coefficient in a pure absorption system: In a pure absorption standard solution system without interference from suspended matter scattering, equation (1) can be simplified to the classical form of the Beer-Lambert law: ; Taking the natural logarithm of both sides of the equation and rearranging, we obtain the theoretical formula for calculating the molar absorption coefficient: ;in, ; Single-component standard solution calibration procedure: This system calibrates three parameters—chemical oxygen demand (COD), total organic carbon (TOC), and ammonia nitrogen (NH3-N)—using corresponding national standard reference materials to prepare single-component standard solutions. The specific steps are as follows: Prepare more than 5 single-component standard solutions with different concentration gradients, covering the possible value range of this parameter in actual monitoring scenarios; The standard solutions were injected into a bubble-free water flow cell, and the system temperature was controlled at 25℃ (standard temperature). The transmitted light intensity of each standard solution in the 200nm~800nm ​​ultraviolet-visible spectral band was collected. Simultaneous collection ; For each concentration gradient, the standard solution was measured in three parallel steps, and the average value was taken to reduce random error. Based on the above theoretical calculation formula, calculate each wavelength. corresponding concentration molar absorption coefficient ; (5) Results obtained under different concentration gradients The arithmetic mean was taken to obtain the molar absorbance coefficient of the analyte at the standard temperature. .

[0023] Temperature Correction Model: Due to the slight shift in the molar absorption coefficient with temperature, a linear temperature correction model is established for this system. Real-time correction is performed using the following formula: ,in, Actual temperature The molar absorption coefficient at that point The temperature coefficient of the molar absorptivity is obtained by temperature-dependent calibration of a standard solution within a temperature range of 10℃ to 40℃. Initial temperature.

[0024] The additive absorption properties of multi-component systems: In real-world water systems with multiple components coexisting, the overall absorption coefficient satisfies the principle of linear superposition, i.e.: Where n is the number of coexisting analytes. For the first Components at wavelength The molar absorption coefficient at that location For the first The molar concentrations of the components. This superposition property is the core theoretical basis for establishing the subsequent partial least squares inversion model.

[0025] Based on formula (1), the edge computing module calculates the total absorbance at each wavelength point within the ultraviolet-visible spectral band, as shown in formula (2): (2), In formula (2), wavelength Total absorbance at that location wavelength The absorbance of the analyte is measured by its absorbance component. wavelength The absorbance of the scattered component of suspended matter. The core objective of nonlinear scattering correction is to separate the representative absorption characteristic from the total absorbance. With the baseline drift component representing the scattering of suspended matter .

[0026] The edge computing module divides the ultraviolet-visible spectral data into multiple wavelength intervals at equal intervals. For each wavelength interval, a Mie scattering fitting function is constructed with the suspended particle size as the independent variable and the light scattering cross-sectional area as the dependent variable. The envelope of the ultraviolet-visible spectral data is fitted nonlinearly using the Mie scattering fitting function. The fitting process is achieved by minimizing the sum of squared residuals, as shown in formula (3). (3), In formula (3), To fit the sum of squared residuals, N is the total number of wavelength sampling points in the ultraviolet-visible spectral band. For the i-th sampling wavelength point, For parameter vectors The Mie scattering fitting function with respect to the independent variable is in The output value at that location, This is a fitting parameter vector that includes the equivalent particle size of suspended matter and the scattering coefficient.

[0027] After the fitting is completed, the edge computing module generates a full-band suspended object scattering fitting curve, subtracts the suspended object scattering fitting curve from the ultraviolet-visible spectral data, outputs the transmission component representing the absorption characteristics, and stores the suspended object scattering fitting curve as the baseline drift component representing the suspended object scattering in the register.

[0028] refer to Figure 4 After this, the edge computing module extracts characteristic peaks from the split Raman spectral band data, extracts the peak area integral value of the characteristic wavenumber position corresponding to the molecular bond of a specific organic compound in the Raman spectrum, and converts the peak area integral value into a diagonal matrix. This diagonal matrix is ​​the prior constraint condition provided by the Raman spectrum. The edge computing module inputs this diagonal matrix into the partial least squares inversion model of the ultraviolet-visible spectrum. First, it performs principal component decomposition on the absorption component spectral matrix of the ultraviolet-visible spectrum and the water quality parameter concentration matrix, as shown in formulas (4) and (5): (4), (5), In formulas (4) and (5), This is the preprocessed absorption component spectral matrix, with each row corresponding to a water sample and each column corresponding to a wavelength sampling point; This is a water quality parameter concentration matrix, where each row corresponds to a water sample and each column corresponds to a water quality parameter. for Principal component score matrix, for Principal component loading matrix, for The fitted residual matrix; for Principal component score matrix, for Principal component loading matrix, for The fitted residual matrix.

[0029] The edge computing module performs a Hadamard product operation on the diagonal matrix constructed from the Raman characteristic peaks and the principal component load matrix in the partial least squares inversion model to generate the constraint load matrix, as shown in formula (6): (6), In formula (6), Let be the constrained principal component loading matrix, and ⊙ be the Hadamard product operator, which multiplies corresponding elements of the two matrices. This is the original principal component loading matrix. The diagonal constraint matrix constructed for the Raman characteristic peak intensity.

[0030] In the iterative solution of the partial least squares inversion model, the edge computing module replaces the original principal component load matrix with the constraint load matrix, projects the transmission component representing the absorption characteristics into the orthogonal space formed by the constraint load matrix, and solves the regression coefficient vector corresponding to the projected coordinates, as shown in formula (7): (7), In formula (7), This is the regression coefficient vector for water quality parameter inversion; the other parameters are defined in the aforementioned formula.

[0031] refer to Figure 5 After the regression coefficient vector is solved, the edge computing module inputs the regression coefficient vector into the multivariate linear equation system to solve for the concentration values ​​of chemical oxygen demand, total organic carbon and ammonia nitrogen, as shown in formula (8): (8), In formula (8), This is a concentration vector of water quality parameters for the water sample to be tested, including the concentration values ​​of chemical oxygen demand, total organic carbon, and ammonia nitrogen. This represents the row vector of the absorption spectrum of the pretreated water sample. This is the vector of regression coefficients.

[0032] In this embodiment, the time-division multiplexing acquisition sequence of ultraviolet-visible spectroscopy and Raman spectroscopy is configured through a timing control module, and its core timing parameters are shown in the table below: Table 1. Configuration of Time Sequence Parameters for Time-Division Multiplexing Acquisition of UV-Vis and Raman Spectroscopy

[0033] Table 1 is used to standardize the timing coordination of the two spectral acquisitions in this embodiment, ensuring that the acquisition processes of ultraviolet-visible spectroscopy and Raman spectroscopy are completely isolated in the time dimension, while maintaining completely consistent action coordinates in the spatial dimension, thus avoiding spectral crosstalk and spatial errors.

[0034] This embodiment achieves co-spatial coordinate transmission of ultraviolet-visible and Raman spectra through a coaxial coupling optical path, realizes time-division multiplexing acquisition of the two spectra through a timing control module, separates the suspended matter scattering component from the absorbance component of the analyte through nonlinear scattering correction based on the Beer-Lambert law, and constrains the principal component loading matrix of the partial least squares inversion model through prior constraints constructed by Raman spectral characteristic peaks, thereby locking the solution space boundary of the multi-component overlapping bands in the ultraviolet-visible spectrum and realizing the stable inversion of water chemical oxygen demand, total organic carbon, and ammonia nitrogen parameters.

[0035] In a preferred embodiment, a dichroic mirror is positioned at the intersection of the beam emitted from a broadband halogen light source and the beam emitted from a narrow-linewidth laser. The beam emitted from the broadband halogen light source passes through the dichroic mirror, and the beam emitted from the narrow-linewidth laser, after being reflected by the dichroic mirror, coincides with the beam emitted from the broadband halogen light source. The incident end face of an optical fiber combiner is positioned on the optical path of the coinciding beams, and the exit end face of the optical fiber combiner is connected to an incident optical fiber. The end of the incident optical fiber is fixed to the outside of the light-transmitting window of the water flow pool. A reflector is positioned inside the water flow pool on the opposite side of the light-transmitting window. The reflector reflects the light signal transmitted through the water sample back to the incident optical fiber along the original path. The cladding of the incident optical fiber is wrapped with a light-shielding coating, which only leaves a light-transmitting aperture at the end face of the incident optical fiber.

[0036] Furthermore, the light-transmitting window includes a sapphire substrate and a hydrophobic coating deposited on the outer surface of the sapphire substrate. The inner surface of the sapphire substrate is fitted to the through-hole in the side wall of the water circulation pool. A self-focusing lens is disposed between the end face of the incident optical fiber and the outer surface of the sapphire substrate, with the focal plane of the self-focusing lens coinciding with the outer surface of the sapphire substrate. A sleeve is fixedly connected to the side wall of the self-focusing lens. The inner wall of the sleeve is provided with an internal thread, and the outer surface of the incident optical fiber is provided with an external thread that mates with the internal thread. The sleeve achieves displacement adjustment of the self-focusing lens along the optical axis through the engagement of the internal and external threads. A locking screw is inserted through the outer side wall of the sleeve, with the end of the locking screw abutting against the outer wall of the incident optical fiber.

[0037] Specifically, the dichroic mirror's beam splitting characteristics match the emission wavelengths of the two light sources, allowing the beam emitted by the broadband halogen source to pass through the dichroic mirror with high transmittance, while simultaneously allowing the beam emitted by the narrow-linewidth laser to be reflected by the dichroic mirror with high reflectivity. After passing through the dichroic mirror, the two beams achieve complete optical axis coincidence, forming a coaxial beam. The incident end face of the fiber combiner is aligned with the optical axis of the coaxial beam, enabling the coaxial beam to enter the fiber combiner with the highest coupling efficiency. The exit end face of the fiber combiner is precisely aligned with the core end face of the incident fiber, ensuring that the combined optical signal is completely coupled into the core of the incident fiber for transmission.

[0038] The end of the incident optical fiber is fixed to the outside of the light-transmitting window of the water flow cell, allowing the optical signal transmitted through the fiber to pass through the window and enter the water sample inside the cell. A reflector located on the opposite side of the light-transmitting window inside the cell reflects the transmitted light signal back along its original path, allowing it to pass through the sample again and re-couple into the fiber core through the light-transmitting window. This structure doubles the optical path length of the light signal in the water sample, increasing the interaction length between the light and the analyte and enhancing the characteristic response intensity of the analyte in the spectral signal.

[0039] The light-shielding coating wrapped around the cladding of the incident fiber can block ambient light from entering the fiber core through the cladding, thus preventing ambient light from interfering with the collected spectral signals. The light-shielding coating only leaves a light-passing aperture at the end face of the incident fiber. This light-passing aperture matches the size of the fiber core end face, allowing only the optical signal to enter and exit through the fiber core end face, further shielding the interference of stray light.

[0040] The sapphire substrate for the light-transmitting window boasts high light transmittance, high hardness, and strong corrosion resistance, maintaining stable optical performance during long-term contact with water and preventing damage from corrosive substances in the water. The hydrophobic coating on the outer surface of the sapphire substrate reduces the probability of suspended solids and microorganisms in the water sample adhering to the surface of the light-transmitting window, preventing light signal attenuation and spectral distortion caused by adhering contaminants.

[0041] A self-focusing lens positioned between the end face of the incident optical fiber and the outer surface of the sapphire substrate collimates the diverging beam emitted from the incident fiber, ensuring that the collimated parallel beam is perpendicularly incident on both the sapphire substrate and the water sample. This reduces optical path error and intensity loss caused by beam divergence. The focal plane of the self-focusing lens coincides with the outer surface of the sapphire substrate, allowing the beam to form a minimal spot on the substrate surface, thus improving the coupling efficiency of the optical signal.

[0042] The sleeve, fixed to the side wall of the self-focusing lens, engages with the external thread of the incident optical fiber via its internal thread. As the sleeve rotates around the optical axis, it causes the self-focusing lens to linearly shift along the optical axis, thus precisely adjusting the distance between the self-focusing lens and the end face of the incident optical fiber. This ensures that the focal plane of the self-focusing lens accurately matches the outer surface of the sapphire substrate. After adjustment, tighten the locking screw on the side wall of the sleeve, ensuring the end of the screw firmly abuts against the outer wall of the incident optical fiber. This fixes the relative position between the sleeve and the incident optical fiber, preventing vibrations during equipment operation from causing displacement of the self-focusing lens and ensuring the long-term stability of the optical path.

[0043] In this embodiment, the parameter matching relationship of each optical element in the coaxial coupling optical path is shown in the following table: Table 2. Matching Table of Parameters for Core Optical Components in Coaxial Coupled Optical Path

[0044] Table 2 is used to standardize the parameter matching relationship of each optical element in this embodiment, ensure the coaxiality and coupling efficiency of the combined beam during transmission, reduce optical signal loss and stray light interference, and ensure the spatial consistency and signal stability of the two-channel spectral acquisition.

[0045] This embodiment achieves efficient beam combining and stable transmission of ultraviolet-visible and Raman beams by refining the optical element structure and matching relationship of the coaxial coupling optical path. The original path reflection structure of the mirror improves the response intensity of the spectral signal. The light-shielding coating and hydrophobic coating reduce the interference of stray light and contaminant adhesion on the spectral signal. The threaded adjustment sleeve structure enables precise adjustment and fixation of the self-focusing lens position, ensuring the long-term stable operation of the optical path.

[0046] In a preferred embodiment, the timing control module includes a field-programmable gate array (FPGA) and two field-effect transistor (FET) driver circuits. The FPGA generates two inverse pulse width modulation (PWM) signals, which are respectively connected to the inputs of the two FET driver circuits. The outputs of the two FET driver circuits are respectively connected to the power supply circuits of the broadband halogen light source and the narrow-linewidth laser. The FPGA internally includes a dead-time register, which inserts a low-level state of a preset duration during the high-low level switching of the two PWM signals. The preset duration is set based on the maximum value of the extinction decay time constant of the broadband halogen light source and the ignition time constant of the narrow-linewidth laser.

[0047] Furthermore, the field-programmable gate array (FPGA) is also connected to a temperature sensor and a digital-to-analog converter (DAC). The temperature sensor is attached to the surface of the narrow-linewidth laser's housing, and it inputs the collected temperature voltage signal to the FPGA's DAC pin. The FPGA internally contains a lookup table that stores the mapping relationship between temperature values ​​and pulse frequencies. The FPGA queries the lookup table based on the temperature voltage signal input to the DAC pin and outputs a clock signal of the corresponding frequency. This clock signal serves as the reference clock source for the pulse width modulation (PWM) signal and is input to the FPGA's clock input pin. The DAC's input is connected to the FPGA's general-purpose input / output pins, and its output is connected to the narrow-linewidth laser's current adjustment terminal.

[0048] refer to Figure 2Specifically, the field-programmable gate array (FPGA) integrates a pulse width modulation (PWM) signal generation module. This module generates two inverse PWM signals based on a reference clock source; that is, when the first PWM signal is high, the second PWM signal is low, and vice versa. The two PWM signals are input to two independent field-effect transistor (FET) driver circuits. These FET driver circuits amplify the PWM signals and drive the power switching devices in the power supply circuits of the corresponding light sources, achieving precise control over the power supply to the broadband halogen light source and the narrow-linewidth laser.

[0049] The dead-time register inside the field-programmable gate array (FPGA) is used to configure the dead-time length during the switching of two pulse-width modulation (PWM) signals. During the dead-time, both PWM signals remain at a low level, keeping both the broadband halogen light source and the narrow-linewidth laser in a turned-off state. The dead-time setting logic is shown in formula (9): (9), In formula (9), This is the length of the dead time inserted during the switching between the two pulse width modulation signals. Let be the extinction decay time constant of the broadband halogen light source. This represents the start-up time constant for a narrow-linewidth laser. This is a preset time margin. This setting logic ensures that the light source in the next conduction cycle only starts conducting after the light source in the previous conduction cycle has completely turned off, completely avoiding the overlap of the emission time of the two light sources and eliminating the risk of spectral crosstalk.

[0050] A temperature sensor, attached to the surface of the narrow-linewidth laser housing, can acquire the laser's operating temperature in real time and convert the temperature value into a corresponding voltage signal, which is then input to the analog-to-digital converter (ADC) pin of the field-programmable gate array (FPGA). The FPGA performs ADC conversion on the input voltage signal to obtain the laser's real-time operating temperature. The output wavelength of the narrow-linewidth laser shifts with changes in operating temperature and drive current, as shown in formula (10). (10), In formula (10), For narrow linewidth lasers, the case temperature T and drive current are... The output wavelength is below. Rated operating temperature Rated drive current The nominal output wavelength is below. The wavelength temperature coefficient of the laser. is the wavelength current coefficient of the laser.

[0051] The field-programmable gate array (FPGA) has an internal lookup table that stores the mapping relationship between the temperature value and the reference clock frequency and drive current setting value, which is pre-generated based on formula (10). The FPGA queries the lookup table based on the collected real-time temperature value and outputs a clock signal of the corresponding frequency as the reference clock source for the pulse width modulation signal. It dynamically adjusts the frequency and duty cycle of the pulse width modulation signal to match the integration time requirements of the laser at different temperatures. At the same time, the FPGA outputs the corresponding digital signal to the digital-to-analog converter (DAC) through the general-purpose input / output pins. The DAC converts the digital signal into an analog current signal and inputs it to the current adjustment terminal of the narrow-linewidth laser to adjust the laser's drive current, compensate for the wavelength shift caused by temperature changes, and keep the laser's output wavelength near the nominal wavelength to ensure the stability of the Raman spectrum characteristic peak position.

[0052] In this embodiment, the mapping relationship between the narrow linewidth laser temperature and control parameters is shown in the table below: Table 3. Temperature-Reference Clock Frequency-Drive Current Mapping Table for Narrow Linewidth Lasers

[0053] Table 3 shows the core storage contents of the internal lookup table of the field-programmable gate array (FPGA), which is used to standardize the control parameter configuration logic of the laser at different operating temperatures, realize closed-loop control of the laser output wavelength, and ensure the stability of Raman spectroscopy acquisition.

[0054] This embodiment achieves temporal isolation between two light sources by using pulse width modulation signals that are inversely phase and dead time control, thus completely avoiding spectral crosstalk. Through real-time feedback from the temperature sensor and dynamic configuration of the lookup table, combined with closed-loop adjustment of the drive current by the digital-to-analog converter, stable control of the output wavelength of the narrow-linewidth laser is achieved, ensuring the accuracy of the Raman spectrum characteristic peak position and providing a stable signal foundation for the subsequent construction of a priori constraints.

[0055] In a preferred embodiment, the edge computing module performs a nonlinear scattering correction process based on Beer-Lambert's law, which includes: extracting ultraviolet-visible spectral data from the combined spectral data; dividing the ultraviolet-visible spectral data into multiple wavelength intervals at equal intervals; constructing a Mie scattering fitting function for each wavelength interval with suspended particle size as the independent variable and light scattering cross-sectional area as the dependent variable; performing nonlinear least squares fitting on the envelope of the ultraviolet-visible spectral data using the Mie scattering fitting function to generate a suspended particle scattering fitting curve; subtracting the suspended particle scattering fitting curve from the ultraviolet-visible spectral data to output the transmission component representing the absorption characteristics; and storing the suspended particle scattering fitting curve as a baseline drift component representing suspended particle scattering in a register.

[0056] Furthermore, the process of constructing a Mie scattering fitting function with suspended solids particle size as the independent variable and light scattering cross-sectional area as the dependent variable includes: obtaining standard spectral data of a predetermined number of standard water samples with known suspended solids concentrations in the ultraviolet-visible spectral band; inputting the standard spectral data into a support vector regression machine, using suspended solids particle size and light scattering cross-sectional area as input feature vectors, and using the absorbance value of the standard spectral data as the output label; training the kernel function parameters and penalty factor of the support vector regression machine; using the decision function of the trained support vector regression machine as the Mie scattering fitting function; when performing nonlinear least squares fitting on actual water samples, setting the initial guess value of suspended solids particle size as the predicted value output by the support vector regression machine, and setting the initial guess value of light scattering cross-sectional area as a constant term.

[0057] Furthermore, the steps of inputting the characteristic peak intensity of the Raman spectrum as a priori constraint into the partial least squares inversion model of the UV-Vis spectrum include: extracting the peak area integral value of the characteristic wavenumber position corresponding to the molecular bond of a specific organic compound in the Raman spectrum, converting the peak area integral value into a diagonal matrix, performing a Hadamard product operation between the diagonal matrix and the principal component loading matrix in the partial least squares inversion model to generate a constraint loading matrix; in the iterative solution process of the partial least squares inversion model, replacing the original principal component loading matrix with the constraint loading matrix, projecting the transmission component representing the absorption characteristics into the orthogonal space formed by the constraint loading matrix, and solving for the regression coefficient vector corresponding to the projected coordinates.

[0058] Furthermore, before performing the Hadamard product operation on the diagonal matrix and the principal component loading matrix in the partial least squares inversion model, a smoothing filter step is also included for the diagonal matrix: a sliding window is constructed, the width of which covers three wavenumber points adjacent to the characteristic wavenumber position; the sliding window is moved point by point on the abscissa of the Raman spectrum; the arithmetic mean of the Raman intensity corresponding to each wavenumber point within the sliding window is calculated; the original Raman intensity at the center point of the sliding window is replaced with the arithmetic mean of the Raman intensity; the peak area integral value is recalculated based on the replaced Raman spectrum; the diagonal elements of the diagonal matrix are updated; the elements in the updated diagonal matrix whose values ​​are lower than the preset noise baseline are set to zero, generating a sparse diagonal matrix; and the Hadamard product operation is performed using the sparse diagonal matrix.

[0059] Furthermore, the steps for outputting the inversion results of chemical oxygen demand (COD), total organic carbon (TOC), and ammonia nitrogen (MN) include: inputting the regression coefficient vector into a multivariate linear equation system, where the independent variables of the multivariate linear equation system are the elements in the regression coefficient vector, and the dependent variables are the concentration values ​​of COD, TOC, and MN; the edge computing module is connected to an external storage medium, which pre-stores historical water quality ledger data; the edge computing module performs a difference operation between the dependent variable calculated at the current moment and the dependent variable stored in the external storage medium at the previous moment, compares the difference result with a preset fluctuation threshold, and generates a corresponding data supplementation command or alarm trigger command based on the comparison result and sends it to the remote monitoring server.

[0060] Specifically, when constructing the Mie scattering fitting function, the edge computing module first obtains the standard spectral data of a preset number of standard water samples with known suspended solids concentrations. This set of standard water samples includes samples with different suspended solids concentration gradients, covering the turbidity range that may occur in actual monitoring scenarios. The standard spectral data, along with the corresponding suspended solids particle size and light scattering cross-sectional area parameters, are input into a support vector regression machine for training. The decision function of the trained support vector regression machine is used as the Mie scattering fitting function, and its expression is shown in formula (11): (11), In formula (11), This represents the output value of the Mie scattering fitting function, i.e., the absorbance of the scattered component at the corresponding wavelength. The input feature vector contains the equivalent particle size of the suspended matter and the light scattering cross-section. The total number of support vectors, and For Lagrange multipliers, For kernel function, This is the bias term of the decision function.

[0061] In this embodiment, the kernel function is the radial basis kernel function, and its expression is shown in formula (12): (12), In formula (12), The width parameter of the radial basis kernel function. This is the Euclidean distance between the input feature vector and the support vector.

[0062] When performing nonlinear least squares fitting on actual water samples, the edge computing module inputs the ultraviolet-visible spectral data of the actual water samples into the trained support vector regression machine and outputs the predicted value of the suspended particle size. This predicted value is used as the initial guess value for nonlinear least squares fitting, and the initial guess value of the light scattering cross-section is set as a constant term. Based on this, iterative fitting is performed, which can significantly improve the convergence speed and accuracy of fitting and avoid the fitting process from getting trapped in local optima.

[0063] For the preprocessing of Raman spectra, the edge computing module first uses a sliding window to smooth the original Raman spectrum, eliminating the interference of random noise on the extraction of characteristic peaks. The calculation process of smoothing filtering is shown in formula (13): (13), In formula (13), wave number The Raman spectrum intensity after smoothing In this embodiment, the width is half the width of the sliding window. =1, meaning the total width of the sliding window covers three adjacent wavenumber points. wave number The original Raman spectral intensity at that location.

[0064] After smoothing filtering, the edge calculation module extracts the characteristic wavenumber range of the corresponding organic molecular bonds in the Raman spectrum and calculates the peak area integral value of each characteristic peak, as shown in formula (14): (14), In formula (14), Let be the peak area integral value of the m-th Raman characteristic peak. The initial wavenumber of this characteristic peak. The termination wavenumber of this characteristic peak. The intensity of the smoothed Raman spectrum.

[0065] The edge computing module uses the calculated peak area integral value as the diagonal element of the diagonal matrix to generate an initial diagonal constraint matrix. Then, the initial diagonal constraint matrix is ​​sparsified by setting the elements in the matrix whose values ​​are lower than the preset noise baseline to zero, thus generating a sparse diagonal constraint matrix, as shown in formula (15). (15),

[0066] In formula (15), Sparse diagonal constraint matrix The m-th diagonal element, Let be the peak area integral value of the m-th Raman characteristic peak. This is the preset Raman spectral noise baseline threshold.

[0067] The sparsed diagonal constraint matrix eliminates the interference of low-amplitude noise signals on prior constraints, retaining only the constraint terms corresponding to Raman peaks with significant characteristic responses, thus improving the accuracy of prior constraints. The edge computing module performs Hadamard product operations on the sparse diagonal constraint matrix and the principal component loading matrix of the partial least squares inversion model to generate a constraint loading matrix. During the iterative solution process, this matrix replaces the original principal component loading matrix, projects the absorption component spectrum onto the constrained orthogonal space to solve for the regression coefficient vector, and uses the qualitative representation of Raman characteristic peaks to lock the solution space boundary of the corresponding overlapping bands in the UV-Vis spectrum, avoiding inversion distortion caused by multi-component cross-interference.

[0068] refer to Figure 6 After the regression coefficient vector is solved, the edge computing module inputs the regression coefficient vector into the multivariate linear equation system to solve for the concentration values ​​of chemical oxygen demand, total organic carbon, and ammonia nitrogen. Simultaneously, the calculated concentration values ​​are stored in an external storage medium to update the historical water quality ledger data. The edge computing module performs a difference operation between the concentration value calculated at the current moment and the concentration value stored at the previous moment, as shown in formula (16). (16), In formula (16), Let be the concentration difference of the k-th water quality parameter at time t and time t-1. Let be the concentration value of the k-th water quality parameter calculated at time t. The concentration value of the kth water quality parameter stored at time t-1.

[0069] The edge computing module compares the calculated difference result with the preset fluctuation threshold. If the absolute value of the difference result is less than the fluctuation threshold, the concentration value at the current moment is added to the historical water quality ledger, and a data addition instruction is generated and sent to the remote monitoring server. If the absolute value of the difference result is greater than or equal to the fluctuation threshold, it is determined that the water quality parameter has undergone an abnormal change, an alarm trigger instruction is generated and sent to the remote monitoring server, and the corresponding alarm process is triggered.

[0070] In this embodiment, the fitting results of the Mie scattering fitting function under different suspended matter concentration gradients are shown in the table below: Table 4. Fitting results of Mie scattering function parameters under different suspended matter concentration gradients.

[0071] Table 4 characterizes the fitting performance of the Mie scattering fitting function based on support vector regression in this embodiment under different turbidity scenarios, verifying the fitting accuracy and adaptability of the fitting function over a wide concentration range.

[0072] This embodiment achieves accurate fitting and separation of suspended matter scattering baselines in water samples with different turbidity levels by using a Mie scattering fitting function based on support vector regression, thereby improving the purity of the absorption feature components. By using sliding window smoothing filtering and constructing a sparse diagonal matrix, the interference of random noise on Raman prior constraints is eliminated, improving the accuracy of understanding spatial boundary locking. By performing differential operations on water quality parameters at adjacent time points and comparing thresholds, real-time identification and reporting of abnormal water quality changes are achieved, ensuring the operational reliability of the monitoring system.

Claims

1. A real-time monitoring system for multiple parameters of environmental water quality based on spectral analysis, characterized in that, It includes an ultraviolet-visible spectral acquisition optical path, a Raman spectral acquisition optical path, and an edge computing module. The ultraviolet-visible spectral acquisition optical path and the Raman spectral acquisition optical path are connected to a coaxial coupling optical path through a dichroic mirror and an optical fiber combiner. The coaxial coupling optical path is connected to the same water flow pool. The ultraviolet-visible spectral acquisition optical path includes a broadband halogen light source, and the Raman spectral acquisition optical path includes a narrow linewidth laser. The timing control module connects the broadband halogen light source and the narrow linewidth laser to achieve time-division multiplexing acquisition of ultraviolet-visible and Raman spectra in the same spatial coordinates. The edge computing module receives the combined spectral data output from the coaxial coupled optical path, performs nonlinear scattering correction based on the Beer-Lambert law to separate the baseline drift component representing suspended matter scattering and the transmission component representing absorption characteristics, and inputs the characteristic peak intensity of the Raman spectrum as a priori constraint into the partial least squares inversion model of the ultraviolet-visible spectrum. By qualitatively identifying specific organic compounds through the Raman characteristic peaks, the solution space boundary of the corresponding overlapping band in the ultraviolet-visible spectrum is locked, and the inversion results of chemical oxygen demand, total organic carbon and ammonia nitrogen are output, thus constituting the real-time monitoring system for multiple parameters of environmental water quality based on spectral analysis.

2. The real-time monitoring system for multiple parameters of environmental water quality based on spectral analysis according to claim 1, characterized in that, The dichroic mirror is positioned at the intersection of the beam emitted from the broadband halogen light source and the beam emitted from the narrow linewidth laser. The beam emitted from the broadband halogen light source passes through the dichroic mirror, and the beam emitted from the narrow linewidth laser coincides with the beam emitted from the broadband halogen light source after being reflected by the dichroic mirror. The incident end face of the fiber optic combiner is disposed on the optical path of the overlapping beam, the exit end face of the fiber optic combiner is connected to the incident fiber, and the end of the incident fiber is fixed to the outside of the light-transmitting window of the water flow pool. Inside the water circulation pool, a reflector is provided on the other side of the light-transmitting window. The reflector reflects the light signal transmitted through the water sample back to the incident optical fiber along the original path. The incident optical fiber is wrapped with a light-shielding coating, and the light-shielding coating only leaves a light-transmitting aperture at the end face of the incident optical fiber.

3. The real-time monitoring system for multiple parameters of environmental water quality based on spectral analysis according to claim 1, characterized in that, The timing control module includes a field-programmable gate array (FPGA) and two field-effect transistor (FET) driver circuits. The FPGA generates two pulse width modulation (PWM) signals that are inversely related to each other. The two PWM signals are respectively connected to the input terminals of the two FET driver circuits. The output terminals of the two FET driver circuits are respectively connected to the power supply circuit of the broadband halogen light source and the power supply circuit of the narrow linewidth laser. The field-programmable gate array is equipped with a dead-time register. The dead-time register inserts a low-level state of a preset time length during the high-low level switching of the two pulse width modulation signals. The value of the preset time length is set according to the maximum value of the extinguishing decay time constant of the broadband halogen light source and the ignition time constant of the narrow linewidth laser.

4. The real-time monitoring system for multiple parameters of environmental water quality based on spectral analysis according to claim 1, characterized in that, The edge computing module performs the nonlinear scattering correction based on Beer-Lambert's law, which includes: extracting ultraviolet-visible spectral data from the combined spectral data; dividing the ultraviolet-visible spectral data into multiple wavelength intervals at equal intervals; constructing a Mie scattering fitting function with suspended particle size as the independent variable and light scattering cross-sectional area as the dependent variable for each wavelength interval; performing nonlinear least squares fitting on the envelope of the ultraviolet-visible spectral data using the Mie scattering fitting function to generate a suspended particle scattering fitting curve; subtracting the suspended particle scattering fitting curve from the ultraviolet-visible spectral data to output the transmission component representing the absorption characteristics; and storing the suspended particle scattering fitting curve as the baseline drift component representing suspended particle scattering in a register.

5. The real-time monitoring system for multiple parameters of environmental water quality based on spectral analysis according to claim 1, characterized in that, The steps of inputting the characteristic peak intensity of the Raman spectrum as a priori constraint into the partial least squares inversion model of the UV-Vis spectrum include: extracting the peak area integral value of the characteristic wavenumber position corresponding to the molecular bond of a specific organic compound in the Raman spectrum, converting the peak area integral value into a diagonal matrix, and performing a Hadamard product operation between the diagonal matrix and the principal component loading matrix in the partial least squares inversion model to generate a constraint loading matrix. In the iterative solution process of the partial least squares inversion model, the original principal component load matrix is ​​replaced by the constraint load matrix, and the transmission component representing the absorption characteristics is projected into the orthogonal space formed by the constraint load matrix to solve for the regression coefficient vector corresponding to the projected coordinates.

6. The real-time monitoring system for multiple parameters of environmental water quality based on spectral analysis according to claim 5, characterized in that, The steps for outputting the inversion results of chemical oxygen demand, total organic carbon and ammonia nitrogen include: inputting the regression coefficient vector into a multivariate linear equation system, wherein the independent variables of the multivariate linear equation system are each element in the regression coefficient vector, and the dependent variables of the multivariate linear equation system are the concentration values ​​of chemical oxygen demand, total organic carbon and ammonia nitrogen; The edge computing module is connected to an external storage medium, which pre-stores historical water quality ledger data. The edge computing module performs a difference operation on the dependent variable calculated at the current moment and the dependent variable stored in the external storage medium at the previous moment. The difference result is compared with a preset fluctuation threshold. Based on the comparison result, a corresponding data supplementation instruction or alarm trigger instruction is generated and sent to the remote monitoring server.

7. The real-time monitoring system for multiple parameters of environmental water quality based on spectral analysis according to claim 2, characterized in that, The light-transmitting window includes a sapphire substrate and a hydrophobic coating deposited on the outer surface of the sapphire substrate, and the inner surface of the sapphire substrate is attached to the through hole in the side wall of the water circulation pool. A self-focusing lens is disposed between the end face of the incident optical fiber and the outer surface of the sapphire substrate, and the focal plane of the self-focusing lens coincides with the outer surface of the sapphire substrate. A sleeve is fixedly connected to the side wall of the self-focusing lens. The inner wall of the sleeve is provided with an internal thread, and the outer side of the incident optical fiber is provided with an external thread that mates with the internal thread. The sleeve achieves displacement adjustment of the self-focusing lens along the optical axis by screwing the internal thread and the external thread together. A locking screw is provided through the outer side wall of the sleeve, and the end of the locking screw abuts against the outer wall of the incident optical fiber.

8. The real-time monitoring system for multiple parameters of environmental water quality based on spectral analysis according to claim 3, characterized in that, The field-programmable gate array is also connected to a temperature sensor and a digital-to-analog converter. The temperature sensor is attached to the surface of the housing of the narrow linewidth laser, and the temperature sensor inputs the collected temperature voltage signal to the analog-to-digital converter pin of the field-programmable gate array. The field-programmable gate array (FPGA) is internally configured with a lookup table that stores the mapping relationship between temperature values ​​and pulse frequencies. The FPGA queries the lookup table based on the temperature voltage signal input to the analog-to-digital converter (ADC) pin and outputs a clock signal of the corresponding frequency. This clock signal serves as the reference clock source for the pulse width modulation (PWM) signal and is input to the clock input pin of the FPGA. The input terminal of the digital-to-analog converter (DAC) is connected to the general-purpose input / output pin of the FPGA, and the output terminal of the DAC is connected to the current adjustment terminal of the narrow-linewidth laser.

9. The real-time monitoring system for multiple parameters of environmental water quality based on spectral analysis according to claim 4, characterized in that, The process of constructing a Mie scattering fitting function with suspended solids particle size as the independent variable and light scattering cross-sectional area as the dependent variable includes: obtaining standard spectral data of a preset number of standard water samples with known suspended solids concentrations in the ultraviolet-visible spectral band; inputting the standard spectral data into a support vector regression machine; using the suspended solids particle size and the light scattering cross-sectional area as input feature vectors; using the absorbance value of the standard spectral data as the output label; and training the kernel function parameters and penalty factor of the support vector regression machine. The decision function of the trained support vector regression machine is used as the Mie scattering fitting function. When performing nonlinear least squares fitting on actual water samples, the initial guess value of the suspended particle size is set as the predicted value output by the support vector regression machine, and the initial guess value of the light scattering cross-section is set as a constant term.

10. The real-time monitoring system for multiple parameters of environmental water quality based on spectral analysis according to claim 5, characterized in that, Before performing the Hadamard product operation between the diagonal matrix and the principal component loading matrix in the partial least squares inversion model, the method further includes a smoothing filter step on the diagonal matrix: constructing a sliding window whose width covers three wavenumber points adjacent to the characteristic wavenumber position, moving the sliding window point by point on the Raman spectrum abscissa, calculating the arithmetic mean of the Raman intensity corresponding to each wavenumber point within the sliding window, and replacing the original Raman intensity at the center point of the sliding window with the arithmetic mean of the Raman intensity; The peak area integral value is recalculated based on the replaced Raman spectrum, the diagonal elements of the diagonal matrix are updated, and the elements in the updated diagonal matrix whose values ​​are lower than the preset noise baseline are set to zero to generate a sparse diagonal matrix. The Hadamard product operation is then performed using the sparse diagonal matrix.