Cross interference calibration method and device for online monitoring of ion concentration of drilling fluid
By combining a multi-ion sensor array with a Bayesian deep learning model, the problems of cross-interference and matrix effect in multi-ion concentration monitoring in drilling fluid are solved, enabling high-precision online monitoring and reliability assessment, supporting real-time decision-making in drilling projects and predictive maintenance of sensors.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- SILKWORM COCOON RES GROUP CHINESE INST OF TEST TECH
- Filing Date
- 2026-03-13
- Publication Date
- 2026-06-12
Smart Images

Figure CN122193357A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of drilling measurement and control technology, specifically to a cross-interference calibration method and device for online monitoring of drilling fluid ion concentration. Background Technology
[0002] During drilling operations, the concentration of ions in the drilling fluid (such as calcium ions) magnesium ions chloride ions bromide ions iodide ions sulfide ions These are crucial engineering parameters. Real-time and accurate monitoring of these parameters is decisive for determining formation fluid invasion, optimizing drilling fluid chemical treatment agent injection, and preventing wellbore instability and complex downhole accidents. Currently, field data acquisition mainly relies on offline laboratory testing (such as chemical titration and spectrophotometry), which suffers from significant time lag and cannot meet real-time decision-making needs. Although ion-selective electrodes are considered an ideal solution for online monitoring due to their speed and portability, they face fundamental challenges in the specific application of drilling fluid performance measurement: (1) Severe cross-interference: The drilling fluid has a complex ionic composition and contains ions with similar structures (such as...). and , , , and Strong selective interference occurs between electrodes, resulting in distorted electrode responses, and single electrode readings cannot reflect the true concentration.
[0003] (2) Extremely complex matrix effects: Drilling fluid is a multiphase suspension / emulsion system containing various components such as bentonite, barite, polymers, drill cuttings, and hydrocarbons. These substances can contaminate, clog, or poison the electrode sensitive membrane, causing drastic drift of the signal baseline and unpredictable response decay.
[0004] (3) Unreliability of measurement results: Traditional calibration methods (such as the standard curve method) and simple linear correction models cannot cope with the above-mentioned complex nonlinear and time-varying interferences. The single concentration value output lacks reliability assessment, and engineers cannot determine the extent to which the data is reliable, which leads to the online monitoring system often being abandoned or only used as a trend reference.
[0005] While existing technologies employ sensor arrays in conjunction with chemometric algorithms (such as principal component regression and partial least squares) for multi-component analysis, these methods are deterministic models that only provide point estimates and cannot quantify the uncertainty of predictions. In scenarios like drilling fluids, where data noise is high and interference patterns are varied, point estimates lacking uncertainty measurement pose a risk of misleading results and cannot meet the needs of high-risk engineering decision-making.
[0006] Therefore, the industry urgently needs an intelligent online monitoring technology and system that can work in the harsh environment of drilling fluids, not only to calculate the concentration of multiple ions with high accuracy, but also to simultaneously output an assessment of the reliability of the measurement. Summary of the Invention
[0007] The purpose of this invention is to overcome the shortcomings of the prior art and provide a cross-interference calibration method and device for online monitoring of drilling fluid ion concentration, so as to achieve high-precision synchronous online measurement of multiple ions in drilling fluid and enhance the robustness against drilling fluid matrix contamination and unknown interference.
[0008] The objective of this invention is achieved through the following technical solution: First aspect: A cross-interference calibration method for online monitoring of drilling fluid ion concentration, including the following steps: S1: Obtain drilling fluid samples in real time from the drilling fluid circulation system, wherein the drilling fluid samples contain at least calcium ions, magnesium ions and chloride ions; S2: The drilling fluid sample is subjected to ion concentration detection using a multi-ion detection unit to obtain a response signal of the ion concentration of the drilling fluid sample; the multi-ion detection unit includes a multi-ion sensor array, which is an ion-selective electrode that is sensitive to at least calcium ions, magnesium ions and chloride ions; S3: Train a drilling fluid-specific calibration model for calibrating drilling fluid ion concentration. The model is a Bayesian deep learning model based on variational inference. S4: The response signal obtained from the multi-ion detection unit is input into the trained drilling fluid-specific calibration model. The drilling fluid-specific calibration model outputs the calibrated concentration estimate of each ion in the drilling fluid sample and simultaneously outputs the prediction uncertainty characterizing the reliability of the estimate. The prediction uncertainty is expressed in the form of confidence interval or variance.
[0009] Furthermore, step S3 specifically includes: S31: Using a base slurry that matches the field drilling fluid system, prepare a simulated drilling fluid sample library containing different concentration combinations of target ions and known interfering components; S32: Obtain the response signals of the multi-ion detection unit to the ion concentrations of all samples in the simulated drilling fluid sample library, and form a training dataset; S33: Using the response signal of the sample ion concentration as input and the corresponding true ion concentration as the output target, train the Bayesian deep learning model; wherein, the training process is achieved by minimizing the variational lower bound loss function, the loss function being: ; in, In response to the signal, This refers to the ion concentration. For model weights, Let be the conditional likelihood function. Let the variational posterior distribution of the weights be... Let the weights be the prior distribution. To measure the difference between two distributions.
[0010] Furthermore, the known interfering components include inherent or common interfering substances in drilling fluids, and the interfering substances are selected from at least one of the following: barite, bentonite, drill cuttings solid particles, hydrocarbon liquids, polymer treatment agents, hydrogen sulfide, and carbonate ions; the simulated drilling fluid sample library is used to simulate the baseline drift or suppression effect of the selected interfering substances on the response of the multi-ion detection unit at different concentrations.
[0011] Furthermore, the multi-ion detection unit also includes an auxiliary sensor, which is used to acquire response signal values of drilling fluid auxiliary data, wherein the drilling fluid auxiliary data is selected from at least one of the following: pH value, temperature, conductivity, density, and flow rate.
[0012] Furthermore, the method also includes: Step S5: Based on the prediction uncertainty output by the drilling fluid-specific calibration model, conduct risk assessment and early warning for drilling engineering decisions, specifically including: When the calibrated concentration estimate of any ion exceeds the preset engineering safety threshold, and the lower bound of its confidence interval is also higher than the threshold, a Level 1 confirmation warning is triggered. When the calibrated concentration estimate of any ion exceeds the preset engineering safety threshold, but its confidence interval crosses the threshold, a level 2 uncertainty warning is triggered, indicating that there is significant uncertainty in the data and suggesting manual review or sensor maintenance.
[0013] Furthermore, the method also includes a periodic self-calibration step, specifically including: Between two consecutive measurements of drilling fluid samples, cleaning fluid and calibration standard solution are automatically injected and flow through the multi-ion detection unit in sequence; The response signal of the multi-ion detection unit to the calibration standard solution is acquired and compared with the expected value to calculate the sensor drift. The drift amount is used as a dynamic bias parameter and fed back to the drilling fluid-specific calibration model to perform online compensation for the real-time measurement results.
[0014] Furthermore, the multi-ion sensor array also includes ion-selective electrodes sensitive to bromide and / or iodide ions for monitoring the type and extent of formation brine intrusion.
[0015] Furthermore, the multi-ion sensor array also includes an ion-selective electrode sensitive to sulfur ions, used to monitor and determine whether the drilling fluid has penetrated into a sulfur-containing formation.
[0016] Second aspect: A drilling fluid ion concentration online monitoring and calibration device based on the method described in the first aspect, comprising: The sample pretreatment module includes a pressure-reducing sampling valve, a cyclone desander, and a multi-stage filter connected in sequence, used to automatically sample from the drilling fluid circulation pipeline and perform primary filtration on the drilling fluid sample; The multi-parameter measurement flow cell, which incorporates the multi-ion sensor array, auxiliary sensor, reference electrode, and fluid path switching valve, is used to detect the ion concentration of drilling fluid samples and obtain the response signal of the ion concentration of the drilling fluid samples. An automatic cleaning and calibration module is connected to the multi-parameter measurement flow cell, stores online cleaning solution, calibration standard solution and pretreatment reagents, and executes the cleaning and calibration process in a controlled manner; The signal processing and computing unit includes a data acquisition card and an embedded processor, wherein the processor stores and runs the drilling fluid-specific calibration model. The engineering interface and early warning unit are used to display the concentration curves of each ion and the corresponding confidence intervals in real time, and to issue early warning information.
[0017] Furthermore, the sample pretreatment module, the multi-parameter measurement flow cell, and the automatic cleaning and calibration module are skid-mounted or modular structures, and are sequentially flanged to the drilling fluid outlet manifold or installed on the drilling fluid circulation pipeline.
[0018] The beneficial effects of this invention are: This invention leverages the powerful nonlinear fitting capabilities of Bayesian deep learning models to accurately model and eliminate complex cross-interference and matrix effects, achieving calibration results far exceeding those of traditional linear or shallow models. For the first time, it achieves a dual output of "concentration value + uncertainty (confidence interval)" in online drilling fluid ion monitoring, enabling engineers to assess data reliability and confidently use it for critical decisions. The uncertainty (confidence interval width) output by the model serves as a "barometer" of the method's own state and the quality of measurement conditions. An abnormally widened interval can provide early warning of sensor contamination, failure, or the emergence of new interferences, enabling predictive maintenance or electrode replacement. Attached Figure Description
[0019] Figure 1 This is a flowchart illustrating the workflow of the method of the present invention; Figure 2 A flowchart illustrating the decision-making and early warning logic for drilling projects; Figure 3 This is the overall architecture of the device of the present invention; Figure 4 This is a schematic diagram showing a precise comparison of measurements before and after calibration. Detailed Implementation
[0020] The technical solution of the present invention will be clearly and completely described below with reference to the embodiments. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0021] See Figures 1-4 The present invention provides a technical solution: Example 1: A cross-interference calibration method for online monitoring of drilling fluid ion concentration, such as... Figure 1 As shown, it includes the following steps: S1: Obtain drilling fluid samples in real time from the drilling fluid circulation system, wherein the drilling fluid samples contain at least calcium ions, magnesium ions and chloride ions; S2: The drilling fluid sample is subjected to ion concentration detection using a multi-ion detection unit to obtain a response signal of the drilling fluid sample ion concentration; the multi-ion detection unit includes a multi-ion sensor array, which is an ion-selective electrode that is sensitive to at least calcium ions, magnesium ions and chloride ions.
[0022] In this embodiment, the multi-ion sensor array may optionally include an ion-selective electrode sensitive to bromide and / or iodide ions for monitoring the type and extent of formation brine intrusion. The multi-ion sensor array may also optionally include an ion-selective electrode sensitive to sulfur ions for monitoring and determining whether drilling fluid has penetrated sulfur-containing formations.
[0023] Furthermore, the multi-ion detection unit also includes an auxiliary sensor, which acquires response signal values of drilling fluid auxiliary data selected from at least one of the following: pH value, temperature, conductivity, density, and flow rate. The response signal values from the auxiliary sensor are also input as input features to a dedicated drilling fluid calibration model for model training.
[0024] S3: Train a drilling fluid-specific calibration model for calibrating drilling fluid ion concentration. The model is a Bayesian deep learning model based on variational inference.
[0025] Furthermore, step S3 specifically includes: S31: Using a base slurry that matches the field drilling fluid system, prepare a simulated drilling fluid sample library containing different concentration combinations of target ions and known interfering components.
[0026] The known interfering components include inherent or common interfering substances in drilling fluids, and the interfering substances are selected from at least one of the following: barite, bentonite, drill cuttings solid particles, hydrocarbon liquids, polymer treatment agents, hydrogen sulfide, and carbonate ions; the simulated drilling fluid sample library is used to simulate the baseline drift or suppression effect of the selected interfering substances on the response of the multi-ion detection unit at different concentrations.
[0027] S32: Obtain the response signals of the multi-ion detection unit to the ion concentrations of all samples in the simulated drilling fluid sample library, and form a training dataset; S33: Using the response signal of the sample ion concentration as input and the corresponding true ion concentration as the output target, train the Bayesian deep learning model; such as Figure 4 As shown, model training includes four stages: data preparation, network construction, variational inference optimization, and model deployment. A deep neural network is constructed, and its weight parameters W are treated as random variables, assigned a variational posterior distribution. .
[0028] The training process is achieved by minimizing a variational lower bound loss function, which is:
[0029] in, In response to the signal, This refers to the ion concentration. For model weights, Let be the conditional likelihood function. Let the variational posterior distribution of the weights be... Let the weights be the prior distribution. To measure the difference between the two distributions, the training process enables the model to learn to separate the target ion contribution from the mixed signal and quantify cognitive uncertainty.
[0030] S4: The response signal obtained from the multi-ion detection unit is input into the trained drilling fluid-specific calibration model. The drilling fluid-specific calibration model outputs the calibrated concentration estimate of each ion in the drilling fluid sample and simultaneously outputs the prediction uncertainty characterizing the reliability of the estimate. The prediction uncertainty is expressed in the form of confidence interval or variance.
[0031] Furthermore, the method also includes step S5: based on the prediction uncertainty output by the drilling fluid-specific calibration model, performing risk assessment and early warning for drilling engineering decisions, such as... Figure 2As shown, it specifically includes: When the calibrated concentration estimate of any ion exceeds the preset engineering safety threshold, and the lower bound of its confidence interval is also higher than the threshold, a Level 1 confirmation warning is triggered. When the calibrated concentration estimate of any ion exceeds the preset engineering safety threshold, but its confidence interval crosses the threshold, a level 2 uncertainty warning is triggered, indicating that there is significant uncertainty in the data and suggesting manual review or sensor maintenance.
[0032] Furthermore, the method also includes a periodic self-calibration step, specifically including: Between two consecutive measurements of drilling fluid samples, cleaning fluid and calibration standard solution are automatically injected and flow through the multi-ion detection unit in sequence; The response signal of the multi-ion detection unit to the calibration standard solution is acquired and compared with the expected value to calculate the sensor drift. The drift amount is used as a dynamic bias parameter and fed back to the drilling fluid-specific calibration model to perform online compensation for the real-time measurement results.
[0033] To verify the calibration effect of the method of the present invention, a continuous 12-hour online monitoring test of simulated drilling fluid was conducted, taking the measurement of calcium ion concentration as an example. The comparison results of calcium ion concentration before and after calibration are as follows: Figure 4 As shown, the experiment simulated typical operating conditions such as normal drilling, formation brine intrusion, and chemical treatment agent injection. The output of traditional monitoring methods (before calibration) exhibited significant systematic positive bias (average +28.5%) and random errors, especially amplified by sudden concentration changes. After calibration using the Bayesian deep learning model of this invention, the measured values highly matched the actual values from offline laboratory testing, with the average relative error reduced to 3.2%, and measurement accuracy improved by approximately 89%. Simultaneously, the 95% confidence interval (the swastika area in the figure) output by the model remained consistently narrow, quantifying the high reliability of the measurement results. This result directly demonstrates that the method of this invention can achieve accurate, reliable, and interpretable online monitoring of ion concentrations in dynamically changing and complex drilling fluid environments.
[0034] This invention leverages the powerful nonlinear fitting capabilities of Bayesian deep learning models to accurately model and eliminate complex cross-interference and matrix effects, achieving calibration results far exceeding those of traditional linear or shallow models. For the first time, it achieves a dual output of "concentration value + uncertainty (confidence interval)" in online drilling fluid ion monitoring, enabling engineers to assess data reliability and confidently use it for critical decisions. The uncertainty (confidence interval width) output by the model serves as a "barometer" of the method's own state and the quality of measurement conditions. An abnormally widened interval can provide early warning of sensor contamination, failure, or the emergence of new interferences, enabling predictive maintenance or electrode replacement.
[0035] Example 2: An online monitoring and calibration device for drilling fluid ion concentration based on the method described in Example 1, such as... Figure 3 As shown, it includes: The sample pretreatment module includes a pressure-reducing sampling valve, a cyclone desander, and a multi-stage filter connected in sequence, used to automatically sample from the drilling fluid circulation pipeline and perform primary filtration on the drilling fluid sample; The multi-parameter measurement flow cell, which incorporates the multi-ion sensor array, auxiliary sensor, reference electrode, and fluid path switching valve, is used to detect the ion concentration of drilling fluid samples and obtain the response signal of the ion concentration of the drilling fluid samples. An automatic cleaning and calibration module is connected to the multi-parameter measurement flow cell, stores online cleaning solution, calibration standard solution and pretreatment reagents, and executes the cleaning and calibration process in a controlled manner; The signal processing and computing unit includes a data acquisition card and an embedded processor, wherein the processor stores and runs the drilling fluid-specific calibration model. The engineering interface and early warning unit are used to display the concentration curves of each ion and the corresponding confidence intervals in real time, and to issue early warning information.
[0036] The sample pretreatment module, multi-parameter measurement flow cell, and automatic cleaning and calibration module are skid-mounted or modular structures, and are connected in sequence to the drilling fluid outlet manifold or installed on the drilling fluid circulation pipeline via flanges.
[0037] The above description is merely a preferred embodiment of the present invention. It should be understood that the present invention is not limited to the forms disclosed herein and should not be construed as excluding other embodiments. It can be used in various other combinations, modifications, and environments, and can be altered within the scope of the concept described herein through the above teachings or related technologies or knowledge. Modifications and variations made by those skilled in the art that do not depart from the spirit and scope of the present invention should be within the protection scope of the appended claims.
Claims
1. A cross-interference calibration method for online monitoring of drilling fluid ion concentration, characterized in that: Includes the following steps: S1: Obtain drilling fluid samples in real time from the drilling fluid circulation system, wherein the drilling fluid samples contain at least calcium ions, magnesium ions and chloride ions; S2: The drilling fluid sample is subjected to ion concentration detection using a multi-ion detection unit to obtain a response signal of the ion concentration of the drilling fluid sample; the multi-ion detection unit includes a multi-ion sensor array, which is an ion-selective electrode that is sensitive to at least calcium ions, magnesium ions and chloride ions; S3: Train a drilling fluid-specific calibration model for calibrating drilling fluid ion concentration. The model is a Bayesian deep learning model based on variational inference. S4: The response signal obtained from the multi-ion detection unit is input into the trained drilling fluid-specific calibration model. The drilling fluid-specific calibration model outputs the calibrated concentration estimate of each ion in the drilling fluid sample and simultaneously outputs the prediction uncertainty characterizing the reliability of the estimate. The prediction uncertainty is expressed in the form of confidence interval or variance.
2. The cross-interference calibration method for online monitoring of drilling fluid ion concentration according to claim 1, characterized in that: Step S3 specifically includes: S31: Using a base slurry that matches the field drilling fluid system, prepare a simulated drilling fluid sample library containing different concentration combinations of target ions and known interfering components; S32: Obtain the response signals of the multi-ion detection unit to the ion concentrations of all samples in the simulated drilling fluid sample library, and form a training dataset; S33: Using the response signal of the sample ion concentration as input and the corresponding true ion concentration as the output target, train the Bayesian deep learning model; wherein, the training process is achieved by minimizing the variational lower bound loss function, the loss function being: ; in, In response to the signal, This refers to the ion concentration. For model weights, Let be the conditional likelihood function. Let the variational posterior distribution of the weights be... Let the weights be the prior distribution. To measure the difference between two distributions.
3. The cross-interference calibration method for online monitoring of drilling fluid ion concentration according to claim 2, characterized in that: The known interfering components include inherent or common interfering substances in drilling fluids, and the interfering substances are selected from at least one of the following: barite, bentonite, drill cuttings solid particles, hydrocarbon liquids, polymer treatment agents, hydrogen sulfide, and carbonate ions; the simulated drilling fluid sample library is used to simulate the baseline drift or suppression effect of the selected interfering substances on the response of the multi-ion detection unit at different concentrations.
4. The cross-interference calibration method for online monitoring of drilling fluid ion concentration according to claim 1, characterized in that: The multi-ion detection unit also includes an auxiliary sensor, which is used to acquire response signal values of drilling fluid auxiliary data. The drilling fluid auxiliary data is selected from at least one of the following: pH value, temperature, conductivity, density, and flow rate.
5. The cross-interference calibration method for online monitoring of drilling fluid ion concentration according to claim 1, characterized in that, The method further includes: Step S5: Based on the prediction uncertainty output by the drilling fluid-specific calibration model, conduct risk assessment and early warning for drilling engineering decisions, specifically including: When the calibrated concentration estimate of any ion exceeds the preset engineering safety threshold, and the lower bound of its confidence interval is also higher than the threshold, a Level 1 confirmation warning is triggered. When the calibrated concentration estimate of any ion exceeds the preset engineering safety threshold, but its confidence interval crosses the threshold, a level 2 uncertainty warning is triggered, indicating that there is significant uncertainty in the data and suggesting manual review or sensor maintenance.
6. The cross-interference calibration method for online monitoring of drilling fluid ion concentration according to claim 5, characterized in that: The method further includes a periodic self-calibration step, specifically comprising: Between two consecutive measurements of drilling fluid samples, cleaning fluid and calibration standard solution are automatically injected and flow through the multi-ion detection unit in sequence; The response signal of the multi-ion detection unit to the calibration standard solution is acquired and compared with the expected value to calculate the sensor drift. The drift amount is used as a dynamic bias parameter and fed back to the drilling fluid-specific calibration model to perform online compensation for the real-time measurement results.
7. The cross-interference calibration method for online monitoring of drilling fluid ion concentration according to claim 1, characterized in that: The multi-ion sensor array also includes ion-selective electrodes sensitive to bromide and / or iodide ions for monitoring the type and extent of formation brine intrusion.
8. The cross-interference calibration method for online monitoring of drilling fluid ion concentration according to claim 1, characterized in that: The multi-ion sensor array also includes ion-selective electrodes sensitive to sulfur ions, used to monitor and determine whether drilling fluid has penetrated sulfur-containing formations.
9. A drilling fluid ion concentration online monitoring and calibration device based on the method of claim 6, characterized in that, include: The sample pretreatment module includes a pressure-reducing sampling valve, a cyclone desander, and a multi-stage filter connected in sequence, used to automatically sample from the drilling fluid circulation pipeline and perform primary filtration on the drilling fluid sample; The multi-parameter measurement flow cell, which incorporates the multi-ion sensor array, auxiliary sensor, reference electrode, and fluid path switching valve, is used to detect the ion concentration of drilling fluid samples and obtain the response signal of the ion concentration of the drilling fluid samples. An automatic cleaning and calibration module is connected to the multi-parameter measurement flow cell, stores online cleaning solution, calibration standard solution and pretreatment reagents, and executes the cleaning and calibration process in a controlled manner; The signal processing and computing unit includes a data acquisition card and an embedded processor, wherein the processor stores and runs the drilling fluid-specific calibration model. The engineering interface and early warning unit are used to display the concentration curves of each ion and the corresponding confidence intervals in real time, and to issue early warning information.
10. The online monitoring and calibration device for drilling fluid ion concentration according to claim 9, characterized in that: The sample pretreatment module, multi-parameter measurement flow cell, and automatic cleaning and calibration module are skid-mounted or modular structures, connected in sequence by flanges to the drilling fluid outlet manifold or installed on the drilling fluid circulation pipeline.