CN113406038A - Optical detection method and device for pH value of water - Google Patents

Optical detection method and device for pH value of water Download PDF

Info

Publication number
CN113406038A
CN113406038A CN202110673094.9A CN202110673094A CN113406038A CN 113406038 A CN113406038 A CN 113406038A CN 202110673094 A CN202110673094 A CN 202110673094A CN 113406038 A CN113406038 A CN 113406038A
Authority
CN
China
Prior art keywords
value
water
spectral data
sample
cuvette
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202110673094.9A
Other languages
Chinese (zh)
Inventor
李丽娜
李登珊
张认成
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Huaqiao University
Original Assignee
Huaqiao University
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Huaqiao University filed Critical Huaqiao University
Priority to CN202110673094.9A priority Critical patent/CN113406038A/en
Publication of CN113406038A publication Critical patent/CN113406038A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G01MEASURING; TESTING
    • G01NINVESTIGATING OR ANALYSING MATERIALS BY DETERMINING THEIR CHEMICAL OR PHYSICAL PROPERTIES
    • G01N21/00Investigating or analysing materials by the use of optical means, i.e. using sub-millimetre waves, infrared, visible or ultraviolet light
    • G01N21/17Systems in which incident light is modified in accordance with the properties of the material investigated
    • G01N21/25Colour; Spectral properties, i.e. comparison of effect of material on the light at two or more different wavelengths or wavelength bands
    • G01N21/31Investigating relative effect of material at wavelengths characteristic of specific elements or molecules, e.g. atomic absorption spectrometry
    • G01N21/35Investigating relative effect of material at wavelengths characteristic of specific elements or molecules, e.g. atomic absorption spectrometry using infrared light
    • G01N21/3577Investigating relative effect of material at wavelengths characteristic of specific elements or molecules, e.g. atomic absorption spectrometry using infrared light for analysing liquids, e.g. polluted water
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01NINVESTIGATING OR ANALYSING MATERIALS BY DETERMINING THEIR CHEMICAL OR PHYSICAL PROPERTIES
    • G01N21/00Investigating or analysing materials by the use of optical means, i.e. using sub-millimetre waves, infrared, visible or ultraviolet light
    • G01N21/17Systems in which incident light is modified in accordance with the properties of the material investigated
    • G01N21/25Colour; Spectral properties, i.e. comparison of effect of material on the light at two or more different wavelengths or wavelength bands
    • G01N21/31Investigating relative effect of material at wavelengths characteristic of specific elements or molecules, e.g. atomic absorption spectrometry
    • G01N21/35Investigating relative effect of material at wavelengths characteristic of specific elements or molecules, e.g. atomic absorption spectrometry using infrared light
    • G01N21/359Investigating relative effect of material at wavelengths characteristic of specific elements or molecules, e.g. atomic absorption spectrometry using infrared light using near infrared light
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01NINVESTIGATING OR ANALYSING MATERIALS BY DETERMINING THEIR CHEMICAL OR PHYSICAL PROPERTIES
    • G01N2201/00Features of devices classified in G01N21/00
    • G01N2201/12Circuits of general importance; Signal processing
    • G01N2201/127Calibration; base line adjustment; drift compensation

Landscapes

  • Physics & Mathematics (AREA)
  • Spectroscopy & Molecular Physics (AREA)
  • Health & Medical Sciences (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Chemical & Material Sciences (AREA)
  • Analytical Chemistry (AREA)
  • Biochemistry (AREA)
  • General Health & Medical Sciences (AREA)
  • General Physics & Mathematics (AREA)
  • Immunology (AREA)
  • Pathology (AREA)
  • Investigating Or Analysing Materials By Optical Means (AREA)

Abstract

The invention discloses a method and a device for optically detecting the pH value of water. Establishing a multivariate calibration model after mean centering is carried out on new spectral data obtained by a background interference and noise removal unit, wherein the multivariate calibration model is a partial least square regression model or a kernel partial least square regression model and is used for predicting the pH value of an unknown sample; the method can eliminate background interference and random noise in the spectral data during the water pH value spectral analysis, and is beneficial to improving the calibration experiment efficiency and improving the prediction precision of the water pH value spectral analysis model.

Description

Optical detection method and device for pH value of water
Technical Field
The invention relates to a spectral analysis technology, in particular to a method and a device for optically detecting the pH value of water.
Background
The pH value is an important evaluation index of the water quality, and the stable water pH value is an important factor for maintaining ecological balance. If the water body is polluted, the pH value of the water body is changed drastically, which leads to massive death of fish, shrimps, crabs, aquatic plants and microorganisms in the water. The conventional water quality pH value measuring methods mainly comprise a nuclear magnetic resonance method, a potentiometric titration method, a pH indicator method and a fluorescence spectroscopy method, most of the methods need to use chemical reagents when being applied, and the analysis time is long. The near-infrared optical detection method for the pH value of the water quality has the advantages of no need of chemical reagents, high detection and analysis speed, real-time online monitoring and the like, and has important significance for the real-time monitoring of the water quality, the protection of ecological systems of rivers and oceans and the like.
The near infrared spectrum detection of the pH value of water needs to establish a multivariate calibration model, and in the establishment process of the multivariate calibration model, a mathematical model needs to be established between the near infrared spectrum data of a sample with a known pH value and the pH value. For a water sample with unknown pH value, the pH value of the unknown sample can be obtained by applying the established multivariate calibration model only after the near infrared spectrum data of the water sample with unknown pH value is measured. Therefore, the near infrared spectrum is used for detecting the pH value of the water quality, on one hand, near infrared spectrum data of a water body sample with wide pH value range, uniform distribution and reliability needs to be acquired, and on the other hand, a multivariate calibration model with high precision on the pH value of the water quality and the near infrared spectrum of the water body needs to be established.
In the process of near infrared spectrum collection, spectral data of a sample at 780-2526 nm are generally measured. The full spectrum can cover more sample spectrum information, but the near infrared band spectrum information is overlapped and complicated. When a multivariate calibration model is established, due to the introduction of some spectral information irrelevant to the components to be measured, the prediction accuracy of the established model is lower, and the complexity and cost of modeling are increased. In addition, in the process of spectrum collection of a sample, noise is caused by problems of background interference caused by differences of different cuvettes, misoperation, change of external environment, stability of an instrument and the like. Background interference and noise present in the spectral data also affect the prediction accuracy of the correction model for weak signal extraction. For background interference and noise removal, preprocessing methods such as smoothing filtering, derivative processing, Multivariate Scatter Correction (MSC) and standard orthogonal transformation (SNV) are usually used. These preprocessing methods have a certain effect on the noise elimination of the spectral data, but do not take into account the background interference problem of different cuvettes.
Disclosure of Invention
In view of this, the main object of the present invention is to provide a rapid and high-precision optical detection method and device for pH value of water quality based on short-wave near-infrared technology, which can remove background interference of different cuvettes.
The invention is based on the measuring wave band of the short-wave near infrared spectrum, and compared with the near infrared full-spectrum measurement, the measuring speed can be improved, and the cost can be reduced.
The invention is based on an orthogonal signal correction method, and can simultaneously eliminate background interference and noise of different cuvettes. On one hand, different cuvettes are adopted to collect a large number of sample spectrums, so that the calibration experiment process can be simplified, the experiment time can be shortened, and the experiment efficiency can be improved; on the other hand, for the sample spectra collected by different cuvettes, the spectrum background interference is removed by an orthogonal signal correction method, the spectrum quality can be improved, the extraction difficulty of weak signals is reduced, and the establishment of a high-precision measurement model for water pH value spectrum analysis is facilitated.
In order to achieve the purpose, the technical scheme of the invention is realized as follows:
the technical scheme is as follows:
a short wave near infrared-based water pH value optical detection method comprises the following steps:
A. the short-wave near-infrared spectrometer (the wave band contains 700 ~ 1050nm), transmission optical fiber, light source, cell support, 2 at least cells are utilized to build the quality of water pH value optical detection device based on short-wave near-infrared.
B. Preparing water samples with different pH values, and obtaining the pH value reference value of each water sample by adopting a standard analysis method.
C. Sampling by a No. 1 cuvette, and measuring the spectral data of each water sample by adopting a short-wave near-infrared-based water quality pH value optical detection device.
D. Sampling by a No. 2 cuvette, and measuring the spectral data of each water sample by adopting a short-wave near-infrared-based water quality pH value optical detection device.
E. Based on an orthogonal signal correction method, the acquired spectral data is preprocessed to eliminate useless information such as spectral background interference, noise and the like of the No. 1 cuvette and the No. 2 cuvette.
F. And (3) performing mean value centralization on the spectrum data preprocessed by the orthogonal signal correction method, and establishing a multivariate correction model (such as a partial least square regression model, a nuclear partial least square regression model and other multivariate correction models) for the optical detection of the pH value of the water quality.
G. And (4) detecting the pH value of the unknown water sample optically.
The short wave near infrared spectrometer in the step A is a near infrared spectrometer with the collection waveband range including 700-1050 nm.
Wherein, the calculation formula of the different cuvette background interference elimination method based on Orthogonal Signal Correction (OSC) in step E is:
X=T*×P*T+E, (1)
XOSC=E, (2)
wherein T is*For principal components, P, orthogonal to the concentration matrix Y, extracted from the spectral matrix X*TE is the residual matrix for the corresponding payload vector. And replacing the original spectrum matrix X with the residual error matrix E as a new independent variable matrix, and then performing multivariate calibration model modeling, so that the principal component T contains a large amount of useful information during modeling, and noise irrelevant to the pH value of water and the background interference of the cuvette are eliminated. The specific algorithm process of Orthogonal Signal Correction (OSC) in the water pH value detection process is as follows:
e1, initializing the number of the main components, and respectively standardizing the water sample spectrum data X and the pH value reference value Y;
e2, calculating a main component t of the water sample spectrum data X; (principal component is a term of art in spectral analysis, and when Principal Component Analysis (PCA) is performed on spectral data, a few minor variables are resolved to represent most of the information of the original spectrum, and these variables are called principal components or latent variables);
e3, subjecting t and pH reference value Y to orthogonal treatment to obtain tnew=(1-Y(YTY)-1YT)t;
E4, calculating the weight omega of the partial least square model;
e5, calculating t ═ X ω;
e6, checking convergence, if | | t-told||/||t||<10-6Then go to the next step, otherwise return to step E3 to circulate;
e7 calculating the load vector pT=tTX/(tTt);
E8, removing signals orthogonal to the pH reference value Y from the water sample spectrum data X, wherein X is X-tpT
E9, returning to the E2 step of circulation until the specified number of principal components is reached, and calculating XOSC=X-TPT
E10, obtaining XOSCThen, go to the step F.
The multivariate calibration model (modeling method may include partial least squares regression, kernel partial least squares regression, etc.) established in step F mainly includes the step of utilizing X obtained in step EOSCObtaining X after mean centering of the matrixnewMatrix, XnewAnd the pH reference value Y is respectively used as input data of the multivariate correction model, the optimal principal component number is obtained by utilizing an interactive verification method and taking the lowest interactive verification Root Mean Square Error (RMSECV) as an evaluation index, and finally the multivariate correction model is established. The finally established multivariate calibration model is described as
Figure BDA0003120086250000031
Wherein b is XnewE is a residual matrix.
G, the optical detection process of the pH value of the unknown water sample mainly comprises the following steps:
g1, application step A by shortwave near-infrared spectrometer (the wave band contains 700 ~ 1050nm), transmission optical fiber, light source, cell support, 2 and above cells, the quality of water pH value optical detection device based on shortwave near-infrared who sets up adopts No. 1 cell or No. 2 cell to gather unknown sample, measures the shortwave near-infrared spectrum of sample, obtains the spectral data Xtest of unknown sample.
G2, preprocessing the short wave near infrared spectrum data of the unknown sample by adopting an orthogonal signal correction method, removing useless information such as background interference, noise and the like of the cuvette, and obtaining the preprocessed spectrum data XOSCtest
G3 spectrum data X of the pretreated unknown sampleOSCtestCarrying out mean value centralization processing to obtain data XnewtestSubstituting the data into the multivariate calibration model established in step F, by
Figure BDA0003120086250000032
Calculating to obtain the predicted value of the optical detection of the pH value of the unknown sample water quality,
Figure BDA0003120086250000033
the invention finally obtains the detection result of the pH value of the water quality by the short-wave near infrared optical detection method.
The other technical scheme of the invention is as follows:
a portable water quality pH value detection device based on the method. The device includes: the device comprises a short wave near infrared light signal acquisition unit, a background interference and noise removal unit, a correction model establishment unit, an unknown sample pH value detection unit and a display unit.
The short-wave near-infrared light signal acquisition unit comprises a continuous wavelength light source (comprising a light source with a wave band of 700-1050 nm), a cuvette support, a transmission optical fiber, a short-wave near-infrared spectrometer and at least two cuvettes. The light source may be a halogen lamp or a tungsten lamp; the cuvette support is used for fixing the cuvette and the transmission optical fiber; the short wave near infrared spectrometer is used for collecting spectral data.
The background interference and noise removal unit specifically comprises a correction set spectral data acquisition subunit and an Orthogonal Signal Correction (OSC) processing subunit. The calibration set spectral data acquisition subunit acquires the short-wave near infrared spectral data of the calibration set sample by using the transmission optical fiber, and then preprocesses the original spectral data by an Orthogonal Signal Correction (OSC) processing subunit to eliminate useless information such as cuvette background interference, noise and the like in the original spectral data.
The correction model establishing unit establishes a multivariate correction model (partial least squares regression model or kernel partial least squares regression model) after mean centering is carried out on the new spectral data obtained by the background interference and noise removing unit, and the multivariate correction model is used for providing a prediction model for the pH value detection of the unknown sample.
The unknown sample pH value detection unit comprises an unknown sample spectral data acquisition subunit, an unknown sample spectral data preprocessing subunit and a pH predictive value operator unit. The unknown sample spectrum data acquisition subunit acquires short wave near infrared spectrum data of an unknown sample through a transmission optical fiber; the unknown sample spectral data preprocessing subunit firstly applies Orthogonal Signal Correction (OSC) to preprocess the unknown sample spectral data, and then carries out mean centering processing on the preprocessed spectral data to obtain input spectral data of a multivariate correction model; and the pH predictive value operator unit substitutes the input spectral data obtained by the unknown sample spectral data preprocessing subunit into the pH predictive model obtained by the correction model establishing unit, and calculates to obtain the predictive value of the pH value of the unknown sample.
The display unit is a touch display screen for man-machine interaction and guiding an operator to use the detection device to perform water quality pH optical detection, function selection and display a pH predicted value. As shown in fig. 5, after the portable water quality pH value detection device of the present invention is turned on, the display screen first displays a welcome phrase: the method comprises the following steps of 'welcome use', prompting to correct wavelength and background, and entering a main menu after a user finishes the wavelength and background correction, wherein the main menu mainly comprises the following steps:
(a) collecting the spectrum data of the correction set, namely selecting the submenu, entering a correction set spectrum data collection mode by the portable water quality pH value detection device, loading the water samples by different cuvettes, placing the water samples on a cuvette bracket, and automatically collecting and storing the spectrum data by the device. And when the collection of the spectral data of the correction set is finished, pressing a return key to return to the main menu page.
(b) And (3) OSC treatment: after selecting the submenu, the collected school will be checkedCarrying out OSC treatment on the positive set of spectral data to obtain the weight omega and the load vector p of the OSC treatmentTAnd preprocessed spectral data XOSCAnd stored. And when the OSC processing is finished, pressing a return key to return to the main menu page.
(c) Establishing a multivariate calibration model: after selecting the submenu, the preprocessed spectral data X will be processedOSCAnd carrying out mean value centralization and establishing a multivariate correction model. And after the multivariate calibration model is established, pressing a return key to return to the main menu page.
(d) Collecting unknown water sample spectrum data: after the submenu is selected, the portable water quality pH value detection device enters an unknown water sample spectral data acquisition mode, different cuvettes are used for loading unknown water samples, the device is placed on a cuvette support, and the device automatically acquires and stores spectral data. And when the unknown water sample spectral data is acquired, the main menu page can be returned by pressing a return key.
(e) Displaying the pH value of an unknown water sample: after selecting the submenu, the display unit will display the pH of the unknown water sample.
The short-wave near infrared-based water pH value optical detection method and device provided by the invention have the following advantages:
1. according to the invention, the short-wave near-infrared band of 700-1050nm is used, and the optical detection of the pH value of water can be completed only by acquiring the spectral data of the 350nm band length. The time for collecting the near infrared spectrum can be greatly reduced by using few wave bands, the miniaturization of the detection device is facilitated, and the cost of the optical detection device is reduced. When the multivariate calibration model is established, spectral data of fewer wave bands are used for modeling, so that the calculated amount can be reduced, the complexity of a prediction model is reduced, the calculation speed of the model is improved, the requirements on a microprocessor and a memory are reduced, the modeling and prediction efficiencies can be improved, and the multivariate calibration model can be used for realizing rapid and online detection.
2. The invention uses a preprocessing method of Orthogonal Signal Correction (OSC) to preprocess the original spectral data, the orthogonal signal correction method enables the spectral data X of the water sample to be orthogonal to the pH reference value Y, and then the orthogonal data is subjected to principal component analysis, so that the orthogonal components irrelevant to concentration information in the spectral data can be effectively filtered, background interference (such as cuvette background interference) and noise irrelevant in the data are filtered, the spectral quality can be improved, and the precision of the pH value spectral analysis multivariate correction model is improved.
3. The method can eliminate the background interference of the cuvette by applying the background interference and noise removal method based on Orthogonal Signal Correction (OSC), has robustness to the background interference of the cuvette, and reduces the influence of the cuvette on the measurement model. In addition, when the calibration experiment is carried out, the same cuvette is not required to be used for sampling, the disposable cuvette or a plurality of cuvettes can be adopted for sampling simultaneously, the cleaning time of the cuvette during the replacement of the sample is reduced, the time of the calibration experiment is shortened, and the experiment efficiency is improved.
4. The device has small volume, is easy to carry, has lower requirement on the measurement environment, and is convenient for operators to carry out rapid sampling detection on the acquisition site.
Drawings
The invention is further illustrated by the following figures and examples.
FIG. 1 is a flow chart of the method for optically detecting pH of water in example 1.
FIG. 2 is a spectrum of a calibration set sample in example 1 of the present invention: (a) sampling by a No. 1 cuvette; (b) sample No. 2 cuvette.
Fig. 3 is a graph showing a comparison of absorbance difference values obtained by sampling the cuvette 1 and the cuvette 2 before and after the correction of the orthogonal signal in example 1 of the present invention.
FIG. 4 is a schematic view of the structure of the device of the present invention.
FIG. 5 is a flow chart of the apparatus of the present invention.
Detailed Description
Example 1
As shown in fig. 1: (1) a water quality pH value optical detection device based on short wave near infrared is built by using a short wave near infrared spectrometer (FLAME-T-XR1-RS) of American ocean optics company, a long-life halogen light source (HL-2000-LL), a transmission optical fiber, a cuvette support and two cuvettes with the side length of 1 cm. The spectrum data acquisition range is 700-1050nm, and 1628 band points are included.
(2) 0.1mol/L dilute hydrochloric acid or 0.1mol/L sodium hydroxide solution with different volumes is randomly added into distilled water to obtain 32 water samples with different pH values, and a pH meter (Shanghai dynasty instrument) is used for obtaining the pH value reference value of each water sample, wherein the pH value range is 1.64-9.31. According to the pH value reference value of the water sample, the water sample is divided into 24 correction sets and 8 verification sets by using a gradient method.
(3) Sampling by a No. 1 cuvette, measuring the spectral data of each water sample in a correction set by a short-wave near-infrared-based water quality pH value optical detection device, and obtaining a spectral image as shown in figure 2 (a).
(4) Sampling with No. 2 cuvette, measuring the spectrum data of each water sample in the correction set with short wave near infrared-based optical detection device for pH value of water quality, and the measured spectrum image is shown in FIG. 2 (b).
(5) Based on the orthogonal signal correction method, the acquired spectral data of the correction set is preprocessed to obtain the weight omega of OSC processing1、ω2Load vector p1 T、p2 TAnd preprocessed spectral data X1 OSC、X2 OSCAnd the method is used for eliminating useless information such as spectrum background interference, noise and the like of the No. 1 cuvette and the No. 2 cuvette. Wherein, ω is1、ω2Respectively representing the weights of cuvette No. 1 and cuvette No. 2 (calculation of weight ω, see summary of the invention section), p1 T、p2 TLoad vectors (load vector p) representing cuvette No. 1 and cuvette No. 2, respectivelyTSee summary of the invention section), X1 OSC、X2 OSCRepresent the pretreated spectral data of cuvette No. 1 and cuvette No. 2, respectively.
(6) And (3) performing mean value centralization on the spectrum data preprocessed by the orthogonal signal correction method, and establishing a multivariate correction model for optical detection of the pH value of the water quality. Respectively recording the spectral data of the No. 1 cuvette and the No. 2 cuvette which are subjected to mean value centralization as X1 new、X2 newThe final multivariate calibration model can be described as
Figure BDA0003120086250000061
Wherein b isiIs Xi newCoefficient vector of (E)iIs a residual matrix.
(7) And verifying the pH value optical detection of the collected water sample. The method specifically comprises the following steps:
(a) sampling by a No. 1 cuvette, and measuring and verifying spectral data of each water sample by a short-wave near-infrared-based water quality pH value optical detection device.
(b) Sampling by a No. 2 cuvette, and measuring and verifying spectral data of each water sample by a short-wave near-infrared-based water quality pH value optical detection device.
(c) Using the weight ω and the load vector p obtained by the OSC process in step (5)TAccording to Xnew=Xnew-Xnew×ω×pTObtaining the spectral data X of the verified water-collecting sample data after orthogonal signal correction1 OSCtest、X2 OSCtest
(d) To X1 OSCtest、X2 OSCtestMean value centering is carried out to obtain X1 newtest、X2 newtest
(e) Mixing X1 newtest、X2 newtestObtaining the predicted value of the pH value of the verification water collection sample as the input spectrum data of the multivariate calibration model in the step (6)
Figure BDA0003120086250000071
Figure BDA0003120086250000072
The invention finally obtains the detection result of the pH value of the water quality by the near infrared optical detection method.
In this example, the difference between the spectral data measured in the cuvette 1 and the spectral data measured in the cuvette 2 before and after OSC treatment is shown in fig. 3. It can be seen that the difference in spectral data between the cuvettes No. 1 and No. 2 was significantly reduced after OSC treatment. Spectral data of 8 concentrated water samples are measured and verified by using a No. 1 cuvette and a No. 2 cuvette, and after OSC treatment and mean value centralization, the root mean square error of the finally obtained prediction model is respectively 0.964 and 0.759, and the correlation coefficients are respectively 0.924 and 0.931. The results show that the spectral data obtained by sampling two different cuvettes are processed by the OSC, and the accuracy difference of the established multivariate calibration model is not obvious.
Example 2
A portable water pH detection device, as shown in fig. 4, comprising: the short-wave near-infrared light signal acquisition unit 100, the background interference and noise removal unit 200, the calibration model establishment unit 300, the unknown sample pH value detection unit 400 and the display unit 500.
The short wave near infrared light signal acquisition unit 100 is composed of a continuous wavelength light source 110, a cuvette support 120, a transmission optical fiber 130 and a short wave near infrared spectrometer 140. The continuous wavelength light source 110 may be a halogen lamp or a tungsten lamp; the cuvette holder 120 is used to hold a cuvette and a transmission fiber 130; the short wave near infrared spectrometer 140 is used for collecting spectral data. Preferably also two cuvettes.
The background interference and noise removal unit 200 specifically comprises a correction set spectral data acquisition subunit 210 and an Orthogonal Signal Correction (OSC) processing subunit 220. The calibration set spectral data acquiring subunit 210 acquires the water sample spectral data of the calibration set by using the transmission optical fiber, and performs preprocessing on the raw spectral data by using the Orthogonal Signal Correction (OSC) processing subunit 220 to eliminate useless information such as cuvette background interference and noise existing in the raw spectral data.
The correction model establishing unit 300 establishes a multivariate correction model (partial least squares regression model or kernel partial least squares regression model) by performing mean centering on the new spectral data obtained by the background interference and noise removing unit 200, so as to provide a prediction model for pH detection of an unknown sample.
The unknown sample pH value detection unit 400 includes an unknown water sample spectral data acquisition subunit 410, an unknown sample spectral data preprocessing subunit 420, and a pH predictor operator unit 430. The unknown sample spectral data acquisition subunit 410 acquires short-wave near infrared spectral data of an unknown sample through a transmission optical fiber; the unknown sample spectral data preprocessing subunit 420 uses Orthogonal Signal Correction (OSC) to preprocess the spectral data of the unknown sample, and then performs mean-value centering processing on the preprocessed spectral data to obtain the input spectral data of the multivariate calibration model; the pH predictive value operator unit 430 substitutes the input spectral data obtained by the unknown sample spectral data preprocessing subunit into the pH predictive model obtained by the correction model establishing unit 300, and calculates to obtain the predictive value of the pH value of the unknown sample.
The display unit 500 is a touch display screen for man-machine interaction and instructing an operator to use the detection device for water quality pH optical detection and pH prediction value. The display flow is shown in fig. 5. After the portable water quality pH value detection device is started, the display screen firstly displays welcome words: the method comprises the following steps of 'welcome use', prompting to correct wavelength and background, and entering a main menu after the wavelength and background are corrected, wherein the main menu mainly comprises the following steps:
(a) collecting spectral data of a correction set: after the submenu is selected, the portable water quality pH value detection device enters a calibration set spectral data acquisition mode, different cuvettes are used for sampling water samples, the water samples are placed on the cuvette support 120, and the device automatically acquires and stores spectral data. And when the collection of the spectral data of the correction set is finished, pressing a return key to return to the main menu page.
(b) And (3) OSC treatment: after the submenu is selected, OSC processing is carried out on the collected spectral data of the correction set to obtain the weight omega and the load vector p of the OSC processingTAnd preprocessed spectral data XOSCAnd stored. And when the OSC processing is finished, pressing a return key to return to the main menu page.
(c) Establishing a multivariate calibration model: after selecting the submenu, the preprocessed spectral data X will be processedOSCAnd carrying out mean value centralization and establishing a multivariate correction model. And after the multivariate calibration model is established, pressing a return key to return to the main menu page.
(d) Collecting unknown water sample spectrum data: after the submenu is selected, the portable water quality pH value detection device enters an unknown water sample spectral data acquisition mode, a user uses different cuvettes to sample an unknown water sample and then places the unknown water sample on the cuvette support 120, and the device can automatically acquire and store spectral data. And when the unknown water sample spectral data is acquired, the main menu page can be returned by pressing a return key.
(e) Displaying the pH value of an unknown water sample: after selecting this sub-menu, the display unit 500 will display the pH of the unknown water sample.
The above description is only a preferred embodiment of the present invention, and therefore should not be taken as limiting the scope of the invention, which is defined by the appended claims and their equivalents.

Claims (10)

1. An optical detection device for pH value of water quality is characterized by comprising:
short wave near infrared spectrum signal acquisition unit: comprises a continuous wavelength light source (110), a cuvette support (120), a transmission optical fiber (130), a short-wave near-infrared spectrometer (140) with the collection range of 700-;
background interference and noise removal unit: comprises a correction set spectral data acquisition subunit (210) and a quadrature signal correction OSC processing subunit (220); the calibration set spectral data acquisition subunit (210) acquires water sample spectral data of a calibration set by using a transmission optical fiber, and preprocesses the original spectral data by the orthogonal signal correction OSC processing subunit (220) so as to eliminate useless information including cuvette background interference and noise in the original spectral data;
a correction model establishing unit: the method comprises the steps of establishing a multivariate calibration model after mean centering is carried out on new spectral data obtained by a background interference and noise removal unit, wherein the multivariate calibration model is a partial least square regression model or a nuclear partial least square regression model and is used for providing a prediction model for pH value detection of an unknown sample;
unknown sample pH value detection unit: the pH value prediction method comprises an unknown sample spectral data acquisition subunit (410), an unknown sample spectral data preprocessing subunit (420) and a pH value prediction value operator unit (430); the unknown sample spectral data acquisition subunit (410) acquires short-wave near infrared spectral data of an unknown sample through a transmission optical fiber; the unknown sample spectral data preprocessing subunit (420) uses the orthogonal signal correction OSC to preprocess the spectral data of the unknown sample, and then carries out mean centering processing on the preprocessed spectral data to obtain the input spectral data of the multivariate correction model; the pH predictive value operator unit (430) substitutes the input spectral data obtained by the unknown sample spectral data preprocessing subunit (420) into the pH predictive model obtained by the correction model establishing unit to calculate and obtain the predictive value of the pH value of the unknown sample; and
a display unit: used for displaying information including the pH value of the water sample.
2. The optical detection device for the pH value of water according to claim 1, wherein: in the background interference and noise removal unit, the calculation formula for removing useless information including the cuvette background interference and noise existing in the original spectrum data is as follows:
X=T*×P*T+E, (1)
XOSC=E, (2)
wherein T is*For principal components, P, orthogonal to the concentration matrix Y, extracted from the spectral matrix X*TE is the residual matrix for the corresponding payload vector.
3. An optical detector for water quality pH value according to claim 2, characterized in that: the specific algorithm process of the orthogonal signal correction OSC in the water quality pH value detection process comprises the following step E:
e1, initializing the number of the main components, and respectively standardizing the water sample spectrum data X and the pH value reference value Y;
e2, calculating a main component t of the water sample spectrum data X;
e3, subjecting t and pH reference value Y to orthogonal treatment to obtain tnew=(1-Y(YTY)-1YT)t;
E4, calculating the weight omega of the partial least square model;
e5, calculating t ═ X ω;
e6, checking convergence, if | | t-told||/||t||<10-6Then go to the next step, otherwise return to step E3 to circulate;
e7 calculating the load vector pT=tTX/(tTt);
E8, removing signals orthogonal to the pH reference value Y from the water sample spectrum data X, wherein X is X-tpT
E9, returning to the E2 step of circulation until the specified number of principal components is reached, and calculating XOSC=X-TPT
E10, obtaining XOSCThen, go to the next step F.
4. An optical detector for water quality pH value according to claim 3, characterized in that: a correction model establishing unit: the modeling method, namely step F, comprises partial least square regression and nuclear partial least square regression, and mainly comprises the step of utilizing the X obtained in the step EOSCObtaining X after mean centering of the matrixnewMatrix, XnewAnd the pH reference value Y are respectively used as input data of the multivariate calibration model, an interactive verification method is utilized, the lowest interactive verification root mean square error RMSECV is used as an evaluation index, the optimal principal component number is obtained, and finally the multivariate calibration model is established; the finally established multivariate calibration model is described as
Figure FDA0003120086240000021
Wherein b is XnewE is a residual matrix.
5. The optical detection device for the pH value of water according to claim 1, wherein: in the unknown sample pH value detection unit, the unknown water sample pH value optical detection process mainly comprises the following steps:
g1, using short wave near infrared light signal acquisition unit, adopting No. 1 cuvette or No. 2 cuvette to collect unknown sample, measuring sampleObtaining the spectral data X of the unknown sample by the short-wave near infrared spectrumtest
G2, preprocessing the short wave near infrared spectrum data of the unknown sample by adopting an orthogonal signal correction method, removing useless information including background interference and noise of the cuvette, and obtaining preprocessed spectrum data XOSCtest
G3 spectrum data X of the pretreated unknown sampleOSCtesCarrying out mean value centralization processing to obtain data XnewtestSubstituting the data into the multivariate calibration model established in step F, by
Figure FDA0003120086240000022
Calculating to obtain the predicted value of the optical detection of the pH value of the unknown sample water quality,
Figure FDA0003120086240000023
the invention finally obtains the detection result of the pH value of the water quality by the short-wave near infrared optical detection method.
6. An optical detection method for pH value of water comprises the following steps:
A. configuring a short-wave near infrared spectrometer with a wave band of 700-1050nm and at least 2 cuvettes;
B. preparing water samples with different pH values, and obtaining the pH value reference value of each water sample by adopting a standard analysis method;
C. sampling by using a No. 1 cuvette, and measuring the spectral data of each water sample by using a short-wave near-infrared-based water quality pH value optical detection device;
D. sampling by using a No. 2 cuvette, and measuring the spectral data of each water sample by using a short-wave near-infrared-based water quality pH value optical detection device;
E. preprocessing the acquired spectral data based on an orthogonal signal correction method to eliminate useless information including spectral background interference and noise of a No. 1 cuvette and a No. 2 cuvette;
F. carrying out mean value centralization on the spectrum data preprocessed by the orthogonal signal correction method, and establishing a multivariate correction model for optical detection of the pH value of the water quality;
G. f, according to the multivariate calibration model obtained in the step F, carrying out pH value optical detection on the unknown water sample to obtain the pH value of the unknown water sample;
wherein, the calculation formula of the method for eliminating background interference of different cuvettes based on orthogonal signal correction OSC in the step E is as follows:
X=T*×P*T+E, (1)
XOSC=E, (2)
wherein T is*For principal components, P, orthogonal to the concentration matrix Y, extracted from the spectral matrix X*TE is the residual matrix for the corresponding payload vector.
7. The optical detection method for the pH value of water according to claim 6, which is characterized in that: the step E specifically comprises the following steps:
e1, initializing the number of the main components, and respectively standardizing the water sample spectrum data X and the pH value reference value Y;
e2, calculating a main component t of the water sample spectrum data X;
e3, subjecting t and pH reference value Y to orthogonal treatment to obtain tnew=(1-Y(YTY)-1YT)t;
E4, calculating the weight omega of the partial least square model;
e5, calculating t ═ X ω;
e6, checking convergence, if | | t-told||/||t||<10-6Then go to the next step, otherwise return to step E3 to circulate;
e7 calculating the load vector pT=tTX/(tTt);
E8, removing signals orthogonal to the pH reference value Y from the water sample spectrum data X, wherein X is X-tpT
E9, returning to the E2 step of circulation until the specified number of principal components is reached, and calculating XOSC=X-TPT
E10, obtaining XOSCAfter that, the air conditioner is started to work,go to the next step F.
8. The optical detection method for the pH value of water according to claim 6, which is characterized in that: step F includes partial least squares regression or kernel partial least squares regression.
9. The optical detection method for the pH value of water according to claim 8, wherein: mainly comprises the utilization of X obtained in the step EOSCObtaining X after mean centering of the matrixnewMatrix, XnewAnd the pH reference value Y are respectively used as input data of the multivariate calibration model, an interactive verification method is utilized, the lowest interactive verification root mean square error RMSECV is used as an evaluation index, the optimal principal component number is obtained, and finally the multivariate calibration model is established; the finally established multivariate calibration model is described as
Figure FDA0003120086240000041
Wherein b is XnewE is a residual matrix.
10. The optical detection method for the pH value of water according to claim 8, wherein: the step G comprises the following steps:
g1, use shortwave near infrared light signal acquisition unit and 2 and above cuvettes, adopt No. 1 cuvette or No. 2 cuvette to gather unknown sample, measure the shortwave near infrared spectrum of sample, obtain the spectral data X of unknown sampletest
G2, preprocessing the short wave near infrared spectrum data of the unknown sample by adopting an orthogonal signal correction method, removing useless information including background interference and noise of the cuvette, and obtaining preprocessed spectrum data XOSCtest
G3 spectrum data X of the pretreated unknown sampleOSCtestCarrying out mean value centralization processing to obtain data XnewtestSubstituting the data into the multivariate calibration model established in step F, by
Figure FDA0003120086240000042
Calculating to obtain the predicted value of the optical detection of the pH value of the unknown sample water quality,
Figure FDA0003120086240000043
the invention finally obtains the detection result of the pH value of the water quality by the short-wave near infrared optical detection method.
CN202110673094.9A 2021-06-17 2021-06-17 Optical detection method and device for pH value of water Pending CN113406038A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110673094.9A CN113406038A (en) 2021-06-17 2021-06-17 Optical detection method and device for pH value of water

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110673094.9A CN113406038A (en) 2021-06-17 2021-06-17 Optical detection method and device for pH value of water

Publications (1)

Publication Number Publication Date
CN113406038A true CN113406038A (en) 2021-09-17

Family

ID=77684829

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110673094.9A Pending CN113406038A (en) 2021-06-17 2021-06-17 Optical detection method and device for pH value of water

Country Status (1)

Country Link
CN (1) CN113406038A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117388209A (en) * 2023-11-23 2024-01-12 蓝星智云(山东)智能科技有限公司 On-line near infrared spectrometer measuring method based on instant reference feedback

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5730938A (en) * 1995-08-09 1998-03-24 Bio-Chem Laboratory Systems, Inc. Chemistry analyzer
EP2128599A1 (en) * 2008-05-28 2009-12-02 Université de Liège Analysing spectral data for the selection of a calibration model
CN104048939A (en) * 2014-06-05 2014-09-17 中国肉类食品综合研究中心 Near infrared rapid detection method for blood sugar content in live pig blood
CN106525755A (en) * 2016-11-07 2017-03-22 江南大学 Oil-sand pH value testing method based on near infrared spectroscopy technology
CN110567894A (en) * 2019-09-04 2019-12-13 华侨大学 method and device for rapidly detecting pH value of aqueous solution
CN111024644A (en) * 2019-12-13 2020-04-17 华侨大学 Single-wavelength-based rapid optical detection method and device for pH value of water
WO2020133944A1 (en) * 2018-12-29 2020-07-02 四川碧朗科技有限公司 Method for constructing water quality index prediction model, and method for monitoring water quality index

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5730938A (en) * 1995-08-09 1998-03-24 Bio-Chem Laboratory Systems, Inc. Chemistry analyzer
EP2128599A1 (en) * 2008-05-28 2009-12-02 Université de Liège Analysing spectral data for the selection of a calibration model
CN104048939A (en) * 2014-06-05 2014-09-17 中国肉类食品综合研究中心 Near infrared rapid detection method for blood sugar content in live pig blood
CN106525755A (en) * 2016-11-07 2017-03-22 江南大学 Oil-sand pH value testing method based on near infrared spectroscopy technology
WO2020133944A1 (en) * 2018-12-29 2020-07-02 四川碧朗科技有限公司 Method for constructing water quality index prediction model, and method for monitoring water quality index
CN110567894A (en) * 2019-09-04 2019-12-13 华侨大学 method and device for rapidly detecting pH value of aqueous solution
CN111024644A (en) * 2019-12-13 2020-04-17 华侨大学 Single-wavelength-based rapid optical detection method and device for pH value of water

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
杭州大学化学系分析化学教研室: "《分析化学手册 第3分册 电化学分析与光学分析》", vol. 1, 北京:化学北京:化学工业出版社工业出版社, pages: 392 - 393 *
鲍曼盈;: "低浓度水质化学需氧量紫外吸光检测中浊度与pH影响分析", vol. 1, no. 01, pages 178 - 180 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117388209A (en) * 2023-11-23 2024-01-12 蓝星智云(山东)智能科技有限公司 On-line near infrared spectrometer measuring method based on instant reference feedback
CN117388209B (en) * 2023-11-23 2024-03-15 蓝星智云(山东)智能科技有限公司 On-line near infrared spectrometer measuring method based on instant reference feedback

Similar Documents

Publication Publication Date Title
CN101620180B (en) Method for rapidly detecting tea quality through near infrared technology
CN106770058A (en) The quick special purpose device and its application method of the soil nitrate-N based on infrared spectrum
CN111487213A (en) Multispectral fusion chemical oxygen demand testing method and device
CN104977258A (en) Tea/cosmetics quality detecting method based on two-dimensional correlation spectra
CN110567894A (en) method and device for rapidly detecting pH value of aqueous solution
CN106770003A (en) Wood Identification Method and system based on near-infrared spectrum technique
CN115236045A (en) Method and device for determining chemical oxygen demand in water by using fluorescence spectrometry and storage medium
US20130262008A1 (en) Measurement of light-absorption qualities in the visible spectrum using a camera
CN113406038A (en) Optical detection method and device for pH value of water
CN109001182B (en) Raman spectrum nondestructive testing method for alcohol content in closed container
CN109100315B (en) Wavelength selection method based on noise-signal ratio
CN107247033B (en) Identify the method for Huanghua Pear maturity based on rapid decay formula life cycle algorithm and PLSDA
CN113109318B (en) Raman spectrum quantitative analysis method and system based on spectral peak height direct extraction
WO2015123615A1 (en) Analytical system with iterative method of analyzing data in web-based data processor with results display designed for non-experts
CN103760130A (en) Method for measuring tween-80 content in compound musk injection by using near-infrared spectrum
CN111289459B (en) Method, device, equipment and storage medium for detecting concentration of mixed substance components
JP2007285922A (en) Clinical blood examination method using near infrared ray
CN103115884A (en) Method for measuring p-hydroxybenzoate in cosmetics
CN113208586A (en) Noninvasive blood glucose rapid diagnosis differential Raman spectroscopy system
CN111521580A (en) Fillet freshness detection method based on portable near-infrared spectrometer
CN116953184A (en) Construction method of residual chlorine online detection model and residual chlorine concentration online detection method
CN103267740A (en) Straw fermentation process characteristic wave number soft instrument apparatus and construction method thereof
CN116399836A (en) Cross-talk fluorescence spectrum decomposition method based on alternating gradient descent algorithm
CN107024449B (en) The other near-infrared spectral analytical method of mammalian is differentiated based on urine
CN111024644B (en) Single-wavelength-based rapid optical detection method and device for pH value of water

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination