Lithium ion concentration prediction method and lithium ion online detection device
Through the GBDT algorithm and improved reagent formula, the accuracy and stability of lithium ion online detection are solved, and high-precision and rapid lithium ion concentration prediction and online detection are achieved.
Patent Information
- Application Number
- CN202510815014.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-18
- Publication Date
- 2025-07-18
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The existing lithium ion detection technology has low accuracy in high salinity multi-component water samples, narrow linear range, high maintenance cost for testing equipment, and cannot meet the high concentration brine detection. There is a gap in existing online detection equipment, and the thorium reagent cannot operate stably for a long period of time under complex environments.
The prediction function is constructed using the gradient-enhanced decision tree GBDT algorithm, and by fitting the decision tree to the pseudo-residue generation area and weights, combined with improved reagent formula and detection device, high-precision online detection of lithium ion multi-components is achieved.
It realizes high-precision online detection of lithium ion multi-components, reduces detection errors, improves the stability and safety of the equipment, shortens the detection time, and enhances the detection capability in complex environments.
Smart Images

Figure CN120340668A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of lithium ion detection, and particularly to a method for predicting lithium ion concentration and an on-line lithium ion detection device. Background Art
[0002] In the technical field of on-line lithium ion detection for extracting lithium from salt lakes, ores, brines, and seawater, lithium ion detection has become a key technical problem. The main technical problems include: (1) The water sample has high salinity and multiple components. During the lithium extraction process, the components of lithium and its associated boron, silicon, calcium, magnesium, etc. are complex, and the contents of lithium, calcium, magnesium, boron, silicon, etc. all exceed 10,000 mg / L. The ionic interference between impurities is serious, resulting in low accuracy of lithium ion detection. Accurately predicting the lithium ion concentration in high-salinity multi-component water samples has become a key technical issue; (2) In the prior art, for the determination of the contents of potassium, sodium, calcium, magnesium, boron, and lithium in brines, inductively coupled plasma emission spectrometry is used. Currently, lithium ion detection still adopts laboratory detection. Flame atomic absorption spectrometry (AAS) and inductively coupled plasma (ICP) methods are used for lithium ion detection. Due to the small linear range and narrow detection range, it is necessary to dilute by more than 1000 times, resulting in large measurement errors. At the same time, ICP and AAS equipment require high-purity argon gas, and the maintenance cost is high; Currently, a lithium ion electrode analyzer has been developed, but this electrode is easily interfered by sodium, potassium and other ions, and it needs to be activated for more than one hour before each use, which cannot meet the detection of high-concentration brines. There is currently a blank in the current on-line lithium ion detection equipment; (3) During the synthesis of pharmaceuticals, there are relevant studies on the detection of thorium reagent lithium ions in pharmaceuticals, but no attempt has been made for on-line detection. Moreover, in the prior art, the detection of thorium reagent lithium ions requires pure acetone to participate in the sensitization effect. Pure acetone is easy to volatilize and explode in the high-temperature environment of the on-site continuous workshop. This reagent system cannot operate stably for a long period in a complex environment; During the on-line detection process, the combination of the concentration of thorium reagent and lithium ion concentration needs to be proportioned. Due to the relatively dark colors of thorium reagent and lithium ions in an alkaline medium, and due to the optical path, the absorbance detection is prone to saturation, making on-line detection impossible. Summary of the Invention
[0003] Based on the above technical problems, the present invention provides a method for predicting lithium ion concentration and an on-line lithium ion detection device to achieve high-precision on-line detection of multiple components of lithium ions.
[0004] In the first aspect, the present invention provides a method for predicting lithium ion concentration, and the method includes: Step 1: Obtain the true value of the lithium ion concentration and construct a data set; Step 2: Based on Step 1, construct a prediction function based on the gradient boosting decision tree GBDT; Step 3: Use Step 2 to update the prediction function, obtain the prediction function after the first update, and calculate the pseudo-residuals; Step 4: Through Step 3, fit the decision tree to the pseudo-residuals to generate regions and weights; update the prediction function again to obtain the prediction result.
[0005] Optionally, Step 1 includes: Assume that the sample to be measured contains m feature vectors, including the parameters of sodium, potassium, magnesium, calcium, boron, silicon ion concentrations, conductivity, and temperature, which are denoted as: ; The output target is the true value of the lithium ion concentration ; The training set contains n samples, forming a data set .
[0006] Optionally, Step 2 includes: Construct a prediction function F(x) through the GBDT algorithm to obtain the predicted value of the lithium ion concentration , and minimize its loss function L(F) with the true value y i of the lithium ion concentration. The expression is: ; where is the mean square error loss function; is the regularization term of the k-th decision tree.
[0007] Optionally, build a GBDT additive model. The GBDT algorithm uses an additive model and regards the prediction function F(x) as the weighted sum of K decision trees. Its expression is: ; where is the initial predicted value; is the learning rate; is the prediction output of the k-th decision tree.
[0008] Optionally, Step 3 includes: Gradually optimize the residuals through the gradient descent method. At the t-th iteration, the prediction function is updated as: ; where is the function at the (t - 1)-th iteration; is the function at the t-th iteration; is the prediction output of the t-th decision tree; Calculate the pseudo-residuals. For the mean square error loss , its negative gradient, i.e., the pseudo-residuals, is: ; wherein, is the true value of the lithium ion concentration.
[0009] Optionally, step 4 includes: fitting the predicted output of the t-th decision tree to the pseudo-residuals to generate regions and weights , and its expression is: ; where I is the impulse function, and the output value is determined according to the classification rule; the leaf node weight is calculated , and this weight minimizes the loss function of the current tree, and its expression is: ; wherein, is the pseudo-residual; is the number or depth of the trees that meet the region conditions and splitting rules; λ is the regularization coefficient; update the prediction function again, non-linearly superimpose the interference results of other ions, and obtain the prediction result, and its expression is: .
[0010] In a second aspect, the present invention provides a lithium ion on-line detection device, and the device is used to implement the lithium ion concentration prediction method according to the first aspect or any one of the first aspects; the device includes: a water sample pretreatment unit, a reagent storage unit, a metering unit, an analysis unit, a control unit, a human-machine interaction unit, and an alarm unit; The water sample pretreatment unit is composed of two-stage filtering devices, namely a first filter and a second filter; the filtering device is used to adsorb and filter large particulate matter and organic substances in the water sample; The reagent storage unit is used to store water samples, pure water, a first reagent, a second reagent, a third reagent, an air pipeline, a first standard solution, a second standard solution, a third standard solution, and a fourth standard solution; wherein the water sample is connected to the on-site pipeline to realize real-time in-situ detection; pure water is used to provide dilution, detection blank, and pipeline cleaning; the first reagent is used to provide color development and chelation; the second reagent is used to provide a color development medium, the third reagent is used to enhance detection sensitivity, and the air pipeline is used for air stirring to make the color development mixture more uniform; the first standard solution, the second standard solution, the third standard solution, and the fourth standard solution are used to provide standard solutions for automatic calibration; wherein, the first reagent is an aqueous thorium reagent solution with a mass concentration of 0.06% - 0.12%; the second reagent is an aqueous potassium hydroxide solution with a mass concentration of 12% - 15%; the third reagent is an aqueous acetone solution with a volume ratio of acetone to water of 2:1; The metering unit consists of a multi-channel selection valve, a metering pump, a three-way valve, and a waste pump; the multi-channel selection valve is used to sequentially switch the water sample, reagent, and standard solution in the reagent storage unit and mix them through an air pipeline; the metering pump is used to provide power for the entry of the reagent and water sample; the three-way valve is used to switch between detection and waste discharge; the waste pump is used to discharge the reaction solution after detection in the colorimetric cell into the waste liquid bucket; The analysis unit consists of an optical detection device, a temperature detection device, and a heating control device; the optical detection device uses a colorimetric tube with an optical path of 30 mm, and the light source is an LED cold light source with a wavelength of 465 nm - 490 nm. A reference photodetector and a transmission photodetector are used at the back end for dual-path detection; the temperature detection device is a PT100 temperature sensor, which is embedded at the bottom to achieve real-time temperature detection; the heating control device is a heating wire wound around the colorimetric tube to accelerate the color development in the colorimetric tube; The control unit is a PLC or an embedded single-chip microcomputer, which is used to control the pumps and valves and the entire detection process; the human-machine interaction unit is used for operation and observation through a touch screen; the alarm unit is used for early warning through an alarm light.
[0011] Optionally, the online detection process is as follows: through the water sample pretreatment unit, the water sample is filtered by a filter, and the filtered water sample enters the water sample pipeline; the blank absorbance calibration is that the pure water in the pure water tank enters the reaction cell through the metering pump, the LED light source emits blue-violet light, the reference photodetector receives part of the scattered light, and the transmission photodetector receives the other part of the scattered light through the reaction cell; The blank absorbance measurement is that the transmission photodetector and the reference photodetector respectively detect the energy values of the transmitted light and the reference light, and calculate the current blank absorbance y1; the transmission absorbance measurement is that the first standard solution is metered into the reaction cell by the metering pump for rinsing, repeated multiple times, and then the first standard solution enters the reaction cell through the metering pump, and the first reagent, the second reagent, the third reagent, and pure water are sequentially added for pretreatment in turn. Then, air enters the reaction cell through the metering pump, and the solution in the reaction cell is stirred by the air. At the same time, the heating wire is heated to maintain a constant temperature for color development for 5 minutes; after the color development is completed, the transmission photodetector and the reference photodetector respectively detect the current transmitted light and reference light energy values, and calculate the current transmission absorbance y2; similarly, for the second standard solution, the third standard solution, and the fourth standard solution, the same process as the first standard solution is followed; The standard curve is plotted as the difference between the transmitted absorbance and the blank absorbance, that is, the solution absorbance y = y2 - y1; repeat the above steps with standard solutions of different concentrations, record the data of the solution absorbance y of four groups and the corresponding lithium ion concentration x, and plot the standard curve y = Kx + B; for the determination of the water sample concentration, pure water enters the reaction cell through a metering pump, and the current blank absorbance A1 is calculated; calculate the current transmitted absorbance A2 of the water sample, and the solution absorbance of the water sample is A = A2 - A1; according to the four-point standard curve y = Kx + B plotted, the lithium ion concentration x in the water sample is calculated from the solution absorbance y.
[0012] In the technical solution provided by the present invention, the method includes obtaining the true value of the lithium ion concentration and constructing a data set; constructing a prediction function based on the gradient boosting decision tree GBDT; updating the prediction function to obtain the prediction function after the first update and calculating the pseudo-residuals; fitting the decision tree to the pseudo-residuals to generate regions and weights; updating the prediction function again to obtain the prediction result, and this method realizes the high-precision online detection of multiple components of lithium ions. Brief Description of the Drawings
[0013] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following will briefly introduce the drawings required for use in the embodiments. Obviously, the drawings in the following description are only some embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other drawings can be obtained based on these drawings.
[0014] Figure 1 It is a flowchart of the lithium ion concentration prediction method provided by the embodiment of the present invention; Figure 2 It is a schematic diagram of the lithium ion online detection device provided by the embodiment of the present invention. Detailed Embodiments
[0015] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the following will clearly and completely describe the technical solutions in the embodiments of the present invention with reference to the drawings in the embodiments of the present invention. Obviously, the described embodiments are some, but not all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts fall within the scope of protection of the present invention.
[0016] It should be clear that the described embodiments are only some, but not all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts fall within the scope of protection of the present invention.
[0017] The terms used in the embodiments of the present invention are for the purpose of describing specific embodiments only and are not intended to limit the present invention. The singular forms "a", "the" and "said" used in the embodiments of the present invention are also intended to include the plural forms unless the context clearly indicates otherwise.
[0018] It should be understood that the term "and / or" used herein is only a description of the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B may represent: A exists alone, A and B exist simultaneously, and B exists alone. In addition, the character " / " herein generally represents an "or" relationship between the associated objects before and after.
[0019] Depending on the context, the word "if" as used herein may be interpreted as "when" or "while" or "in response to determining" or "in response to detecting". Similarly, depending on the context, the phrase "if determined" or "if detected (stated condition or event)" may be interpreted as "when determined" or "in response to determining" or "when detecting (stated condition or event)" or "in response to detecting (stated condition or event)".
[0020] The present invention mainly aims at the current actual application scenarios. In addition to lithium ions, there are also metal cation interferences such as calcium ions, magnesium ions, potassium ions, and sodium ions, so as to improve the detection stability and accuracy of lithium ions in a multi-component environment.
[0021] Figure 1 It is a flowchart of the lithium ion concentration prediction method provided for the embodiments of the present invention, as Figure 1 shown, the method includes: Step 1: Obtain the true value of the lithium ion concentration and construct a data set; In the embodiments of the present invention, Step 1 includes: Suppose the sample to be measured contains m feature vectors, including the parameters of sodium, potassium, magnesium, calcium, boron, silicon ion concentrations, conductivity, and temperature, which are denoted as: ; The output target is the true value of the lithium ion concentration ; The training set contains n samples, constituting the data set .
[0022] Step 2: According to Step 1, based on the gradient boosting decision tree GBDT, construct a prediction function; In the embodiments of the present invention, Step 2 includes: Construct a prediction function F(x) through the GBDT algorithm to obtain the predicted value of the lithium ion concentration , and minimize the difference between it and the true value y of the lithium ion concentration iThe loss function \(L(F)\) has the following expression: ; where, is the mean squared error loss function; is the regularization term of the \(k\)-th decision tree.
[0023] In the embodiments of the present invention, a GBDT additive model is constructed. The GBDT algorithm adopts an additive model and regards the prediction function \(F(x)\) as the weighted sum of \(K\) decision trees, and its expression is: ; where, is the initial prediction value; is the learning rate; is the prediction output of the \(k\)-th decision tree.
[0024] Step 3: Use Step 2 to update the prediction function, obtain the prediction function after the first update, and calculate the pseudo-residual; In the embodiments of the present invention, Step 3 includes: Gradually optimize the residual by the gradient descent method. At the \(t\)-th iteration, the prediction function is updated to: ; where, is the function at the \((t - 1)\)-th iteration; is the function at the \(t\)-th iteration; is the prediction output of the \(t\)-th decision tree; Calculate the pseudo-residual. For the mean squared error loss , its negative gradient, i.e., the pseudo-residual, is: ; where, is the true value of the lithium ion concentration.
[0025] Step 4: Through Step 3, fit the decision tree to the pseudo-residual to generate regions and weights; update the prediction function again to obtain the prediction result.
[0026] In the embodiments of the present invention, Step 4 includes: Fit the prediction output of the \(t\)-th decision tree to the pseudo-residual to generate regions and weights , and its expression is: ; where \(I\) is the impulse function, and the output value is determined according to the classification rule; calculate the leaf node weight , and this weight minimizes the loss function of the current tree, and its expression is: ; where, is the pseudo-residual; is the number or depth of the trees that meet the region conditions and splitting rules; λ is the regularization coefficient; Update the prediction function again, non-linearly superimpose the interference results of other ions, and obtain the prediction result. Its expression is: .
[0027] The present invention uses an aqueous acetone solution instead of pure acetone, which improves the stability and safety of the reagent while not weakening the sensitivity of lithium ions; by improving the concentrations of thorium reagent, lithium ions, and alkaline medium, the color gamut range of the color development interval under a certain optical path is increased, the measurable range of lithium ions is increased, and the long-term stability of the lithium ion color development system is achieved.
[0028] In the prior art, when measuring lithium by the thorium reagent method, under alkaline conditions, acetone undergoes a ketone condensation reaction to form a bridging link, enhancing the chelation of thorium and lithium. In the lithium ion color development system of the present invention, an aqueous thorium reagent solution with a mass concentration of 0.06% - 0.12%; an aqueous potassium hydroxide solution with a mass concentration of 12% - 15%; the volume ratio of acetone to water in the aqueous acetone solution is 2:1, realizing the linear detection of lithium ions at 0.1 mg / L - 20 mg / L. When detecting in the present invention, the addition order of each component is: add the aqueous thorium reagent solution to the water sample, then add the aqueous potassium hydroxide solution, and then add the aqueous acetone solution.
[0029] When the concentration of the thorium reagent in the reaction system is too low, the binding degree of lithium ions is insufficient; when the concentration is too high, the color development degree deepens, resulting in saturation of the color development interval; when the concentration of potassium hydroxide is too low, the color development rate is slow; when the concentration is too high, the color of the color development is too deep, and the color development interval range becomes smaller. In addition, in a pure water medium, the sensitivity of lithium ions and the thorium reagent is very low; in a pure acetone medium, the reagent is not easy to store under the on-line detection state, and the separate mixing of acetone and water will result in non-linearity during detection. The selection of each component, the limitation of the formulation concentration, and the addition order in the present invention ensure the storability of the on-line detection reagent and at the same time achieve the long-term stability of the lithium ion color development system.
[0030] In the embodiment of the present invention, the aqueous thorium reagent solution in the reagent formulation is used as the first reagent; the aqueous potassium hydroxide solution in the reagent formulation is used as the second reagent; the aqueous acetone solution in the reagent formulation is used as the third reagent; wherein, the aqueous thorium reagent solution with a mass concentration of 0.06% - 0.12%, the aqueous potassium hydroxide solution with a mass concentration of 12% - 15%, and the volume ratio of acetone to water in the aqueous acetone solution is 2:1.
[0031] Figure 2 is a schematic diagram of the lithium ion on-line detection device provided by the embodiment of the present invention, as Figure 2As shown in the figure, the device includes: a water sample pretreatment unit, a reagent storage unit, a metering unit, an analysis unit, a control unit, a human-machine interaction unit, and an alarm unit; The water sample pretreatment unit consists of two-stage filtering devices, namely a first filter and a second filter; the filtering devices are used to adsorb and filter large particulate matters and organic substances in the water sample; The reagent storage unit is used to store water samples, pure water, a first reagent, a second reagent, a third reagent, an air pipeline, a first standard solution, a second standard solution, a third standard solution, and a fourth standard solution; among them, the water sample is connected to the on-site pipeline to achieve real-time in-situ detection; the pure water is used to provide dilution, detection blank, and pipeline cleaning; the first reagent is used to provide color development and chelation effects; the second reagent is used to provide a color development medium, the third reagent is used to enhance the detection sensitivity, and the air pipeline is used for air stirring to make the color development mixture more uniform; the first standard solution, the second standard solution, the third standard solution, and the fourth standard solution are used to provide standard solutions for automatic calibration; among them, the first reagent is an aqueous thorium reagent solution with a mass concentration of 0.06% - 0.12%; the second reagent is an aqueous potassium hydroxide solution with a mass concentration of 12% - 15%; the third reagent is an aqueous acetone solution with a volume ratio of acetone to water of 2:1; The metering unit consists of a multi-channel selection valve, a metering pump, a three-way valve, and a waste discharge pump; the multi-channel selection valve is used to sequentially switch the water sample, reagent, and standard solution in the reagent storage unit and mix them through the air pipeline; the metering pump is used to provide power for the entry of the reagent and water sample; the three-way valve is used to switch between detection and waste discharge; the waste discharge pump is used to discharge the reacted liquid after detection in the colorimetric cell into the waste liquid bucket; The analysis unit consists of an optical detection device, a temperature detection device, and a heating control device; the optical detection device uses a colorimetric tube with an optical path of 30 mm, and the light source is an LED cold light source with a wavelength of 465 nm - 490 nm. A reference photodetector and a transmission photodetector are used at the rear end for dual-light-path detection; the temperature detection device is a PT100 temperature sensor, which is embedded at the bottom to achieve real-time temperature detection; the heating control device is a heating wire wound around the colorimetric tube to accelerate the color development in the colorimetric tube; The control unit is a PLC or an embedded single-chip microcomputer, which is used to control the pumps and valves and the entire detection process; the human-machine interaction unit is used for operation and observation through a touch screen; the alarm unit is used for early warning through an alarm light.
[0032] In the embodiment of the present invention, the online detection process is as follows: through the water sample pretreatment unit, the water sample is filtered by the filter, and the filtered water sample enters the water sample pipeline; the blank absorbance calibration is that the pure water in the pure water tank enters the reaction pool through the metering pump, the LED light source emits blue-violet light, the reference photodetector receives part of the scattered light, and the transmission photodetector receives the other part of the scattered light through the reaction pool; The blank absorbance measurement is to detect the energy values of the transmitted light and the reference light by the transmitted photodetector and the reference photodetector respectively, and calculate the current blank absorbance y1; the transmitted absorbance measurement is that the first standard solution is metered into the reaction cell for rinsing by the metering pump, repeated multiple times, and then the first standard solution enters the reaction cell through the metering pump, and the first reagent, the second reagent, the third reagent, and pure water are sequentially added for pretreatment in turn. Then, air enters the reaction cell through the metering pump, and the solution in the reaction cell is stirred by the air, and at the same time, the heating wire is heated, and the color is developed at a constant temperature for 5 min; after the color development is completed, the transmitted photodetector and the reference photodetector detect the current transmitted light and reference light energy values respectively, and calculate the current transmitted absorbance y2; similarly for the second standard solution, the third standard solution, and the fourth standard solution, following the same process as the first standard solution; The standard curve is plotted as the difference between the transmitted absorbance and the blank absorbance, that is, the solution absorbance y = y2 - y1; repeat the above steps with standard solutions of different concentrations, record the data of four groups of solution absorbances y and the corresponding lithium ion concentrations x, and plot the standard curve y = Kx + B; for the water sample concentration measurement, pure water enters the reaction cell through the metering pump, and the current blank absorbance A1 is calculated; calculate the current transmitted absorbance A2 of the water sample, and the solution absorbance of the water sample is A = A2 - A1; according to the plotted four-point standard curve y = Kx + B, the lithium ion concentration x in the water sample is calculated from the solution absorbance y.
[0033] In the embodiment of the present invention, the example derivation is demonstrated with some actual detection data as an example, and the concentration unit is mg / L, as shown in Table 1.
[0034] Table 1 Detection data ; The splitting rule is: for potassium ions greater than or equal to 50 mg / L, the right subtree; for potassium ions less than 50 mg / L, the left subtree; for magnesium ions greater than or equal to 50 mg / L, the right subtree; for magnesium ions less than 50 mg / L, the left subtree; for calcium ions greater than or equal to 20 mg / L, the right subtree; for calcium ions less than 20 mg / L, the left subtree; for sodium ions greater than or equal to 200 mg / L, the right subtree; for sodium ions less than 200 mg / L, the left subtree.
[0035] In the embodiment of the present invention, different from the traditional GBDT algorithm, the measured value of lithium ions is added in the present invention, and the measured value is corrected by the GBDT algorithm. The model derivation is carried out by substituting the data set to calculate the correlation coefficient, so as to realize the correction of the measured value. This algorithm is a superposition calculation by calculating the interference degree of each factor on the lithium ion detection.
[0036] In the embodiment of the present invention, the derivation process is as follows:
[0037] Superimposed data set:
[0038] Among them, |D L | represents the number of data falling into the left subtree; |D R | represents the number of data falling into the right subtree; After calculation, substituting the data of the data set, we get:
[0039] The first group: ; The second group: ; ; ; ; ; Through correction, the indication error of the first group of data is reduced from 3.7% to 0.7% after correction, and the indication error of the second group of data is reduced from 4.0% to 0.8% after correction. By constructing a prediction function through the GBDT algorithm for lithium ion concentration prediction, the accuracy and anti-interference ability of lithium ion detection are effectively improved, thus ensuring the accurate and real-time detection of lithium ions.
[0040] The present invention provides a lithium ion on-line detection device integrating automatic sampling, automatic dilution, automatic detection, automatic concentration prediction, and automatic cleaning, elaborates the working process of the on-line detection device, and through the adoption of the time relative value data analysis method, the color development time is optimized from the original 50 minutes to 5 minutes, greatly reducing the detection and analysis time, providing an equipment basis for the real-time acquisition of lithium ion data.
[0041] The present invention proposes a lithium ion concentration prediction method. By constructing a prediction function through the GBDT algorithm for lithium ion concentration prediction, the detection accuracy of lithium ions in a complex environment is rapidly improved, the cross-interference analysis ability of the on-line detection equipment is improved, and the high-strength and high-stability on-line detection of lithium ions in various complex environments is ensured.
[0042] In the technical solution provided by the present invention, the method includes obtaining the true value of the lithium ion concentration and constructing a data set; constructing a prediction function based on the gradient boosting decision tree GBDT; updating the prediction function to obtain the prediction function after the first update and calculating the pseudo-residuals; fitting the decision tree to the pseudo-residuals to generate regions and weights; and updating the prediction function again to obtain the prediction result. This method realizes the high-precision on-line detection of multiple components of lithium ions.
[0043] Those skilled in the art can clearly understand that for the convenience and brevity of description, the specific working processes of the systems, devices, and units described above can refer to the corresponding processes in the foregoing method embodiments, and will not be elaborated herein.
[0044] The foregoing is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principle of the present invention shall be included within the scope of protection of the present invention.
Claims
1. A method for predicting lithium ion concentration, characterized in that, The method includes: Step 1: Obtain the true value of the lithium ion concentration and construct a data set; Step 2: According to Step 1, construct a prediction function based on the Gradient Boosting Decision Tree (GBDT); Step 3: Use Step 2 to update the prediction function, obtain the prediction function after the first update, and calculate the pseudo-residuals; Step 4: Through Step 3, fit the decision tree to the pseudo-residuals to generate regions and weights; update the prediction function again to obtain the prediction result.
2. The method according to claim 1, characterized in that, Step 1 includes: Assume that the sample to be measured contains m feature vectors, including the parameters of sodium, potassium, magnesium, calcium, boron, silicon ion concentrations, conductivity, and temperature, which are denoted as: ; The output target is the true value of the lithium ion concentration ; The training set contains n samples, constituting the data set .
3. The method according to claim 1, wherein Step 2 includes: Construct a prediction function F(x) through the GBDT algorithm to obtain the predicted value of the lithium ion concentration , and minimize its loss function L(F) with the true value y of the lithium ion concentration i . The expression is as follows: ; Among them, is the mean squared error loss function; is the regularization term of the k-th decision tree.
4. The method according to claim 3, characterized in that, Build a GBDT additive model. The GBDT algorithm uses an additive model and regards the prediction function F(x) as the weighted sum of K decision trees, and its expression is: ; Among them, is the initial prediction value; is the learning rate; is the prediction output of the k-th decision tree.
5. The method according to claim 1, characterized in that, Step 3 includes: Gradually optimize the residuals through the gradient descent method. At the t-th iteration, the prediction function is updated as: ; Among them, is the function of the (t - 1)-th iteration; is the function of the t-th iteration; is the predicted output of the t-th decision tree; Calculate the pseudo-residuals. For the mean squared error loss , its negative gradient, which is the pseudo-residual, is ; Among them, is the true value of the lithium ion concentration.
6. The method according to claim 1, wherein Step 4 includes: The predicted output of fitting the t-th decision tree to the pseudo-residuals, generating regions and weights , and its expression is: ; Among them, I is an impulse function, and the output value is determined according to the classification rule; calculation of the leaf node weight , this weight minimizes the loss function of the current tree, and its expression is: ; Among them, is the pseudo-residual; is the number or depth of the trees that meet the regional conditions and splitting rules; λ is the regularization coefficient; Update the prediction function again, and perform non-linear superposition on the interference results of other ions to obtain the prediction result, and its expression is: 。 7. An on-line lithium ion detection device, characterized in that, The device is used to implement the lithium ion concentration prediction method according to any one of claims 1-5; the device includes: a water sample pretreatment unit, a reagent storage unit, a metering unit, an analysis unit, a control unit, a human-computer interaction unit, and an alarm unit; The water sample pretreatment unit consists of two-stage filtering devices, namely a first filter and a second filter; the filtering device is used to adsorb and filter large particulate matters and organic substances in the water sample; The reagent storage unit is used to store water samples, pure water, a first reagent, a second reagent, a third reagent, an air pipeline, a first standard solution, a second standard solution, a third standard solution, and a fourth standard solution; among them, the water sample is connected to the on-site pipeline to realize real-time in-situ detection; pure water is used to provide dilution, detection blank, and pipeline cleaning; the first reagent is used to provide color development and chelation effects; the second reagent is used to provide a color development medium, the third reagent is used to enhance the detection sensitivity, and the air pipeline is used for air stirring to make the color development mixture more uniform; the first standard solution, the second standard solution, the third standard solution, and the fourth standard solution are used to provide standard solutions for automatic calibration; among them, the first reagent is an aqueous thorium reagent solution with a mass concentration of 0.06% - 0.12%; the second reagent is an aqueous potassium hydroxide solution with a mass concentration of 12% - 15%; the third reagent is an aqueous acetone solution with a volume ratio of acetone to water of 2:1; The metering unit consists of a multi-channel selection valve, a metering pump, a three-way valve, and a waste discharge pump; the multi-channel selection valve is used to sequentially switch the water sample, reagent, and standard solution in the reagent storage unit and mix them through the air pipeline; the metering pump is used to provide power for the entry of the reagent and water sample; the three-way valve is used to switch between detection and waste discharge; the waste discharge pump is used to discharge the reaction solution after detection in the colorimetric cell into the waste liquid bucket; The analysis unit consists of an optical detection device, a temperature detection device, and a heating control device. The optical detection device uses a colorimetric tube with an optical path of 30 mm, and the light source is an LED cold light source with a wavelength of 465 nm - 490 nm. At the rear end, a reference photodetector and a transmission photodetector are used for dual-path detection. The temperature detection device is a PT100 temperature sensor, which is embedded at the bottom to achieve real-time temperature detection. The heating control device is a heating wire wound around the colorimetric tube to accelerate the color development in the colorimetric tube. The control unit is a PLC or an embedded single-chip microcomputer, which is used to control the pump valve and the entire detection process. The human-computer interaction unit is used for operation and observation through a touch screen. The alarm unit is used for early warning through an alarm light.
8. The device according to claim 7, wherein The online detection process is as follows: through the water sample pretreatment unit, the water sample is filtered by a filter, and the filtered water sample enters the water sample pipeline. The blank absorbance calibration is that pure water in the pure water tank enters the reaction pool through a metering pump. The LED light source emits blue-violet light. The reference photodetector receives part of the scattered light, and the transmission photodetector receives the other part of the scattered light through the reaction pool. The blank absorbance measurement is that the transmission photodetector and the reference photodetector respectively detect the energy values of the transmitted light and the reference light, and calculate the current blank absorbance y1. The transmission absorbance measurement is that the first standard solution is metered into the reaction pool by a metering pump for rinsing, repeated multiple times. Then the first standard solution enters the reaction pool through a metering pump, and the first reagent, the second reagent, the third reagent, and pure water are sequentially added for pretreatment. Then air enters the reaction pool through a metering pump to stir the solution in the reaction pool, and at the same time, the heating wire is heated to maintain a constant temperature for color development for 5 minutes. After the color development is completed, the transmission photodetector and the reference photodetector respectively detect the current transmitted light and reference light energy values, and calculate the current transmission absorbance y2. Similarly, for the second standard solution, the third standard solution, and the fourth standard solution, the same process as the first standard solution is followed. The standard curve is drawn as the difference between the transmission absorbance and the blank absorbance, that is, the solution absorbance y = y2 - y1. Repeat the above steps with standard solutions of different concentrations, record the data of the solution absorbance y and the corresponding lithium ion concentration x in four groups, and draw the standard curve y = Kx + B. The water sample concentration measurement is that pure water enters the reaction pool through a metering pump, and the current blank absorbance A1 is calculated. Calculate the current transmission absorbance A2 of the water sample, and the solution absorbance of the water sample is A = A2 - A1. According to the four-point standard curve y = Kx + B drawn, the lithium ion concentration x in the water sample is calculated from the solution absorbance y.
Citation Information
Patent Citations
Road surface IRI prediction method fusing GBDT and XGBoost
CN114881359A
Sensitive parameter analysis-based high-quality lithium-potassium-rich brine reservoir identification method
CN116931062A