Computer-implemented method for detecting and diagnosing failures in fluid properties in drilling systems and computer-readable storage media
Patent Information
- Application Number
- BR102025002803
- Authority / Receiving Office
- BR · BR
- Patent Type
- Applications
- Publication Date
- 2026-08-25
Smart Images

Figure 00000000_0000_ABST
Description
1 / 21 COMPUTER-IMPLEMENTED METHOD FOR DETECTING AND DIAGNOSING FAILURES IN FLUID PROPERTIES IN DRILLING SYSTEMS AND COMPUTER-READABLE STORAGE MEDIA Field of invention
[001] The present invention is situated in the technical field of well drilling and completion. More specifically, the present invention defines a computer-implemented method for detecting and diagnosing faults in fluid properties in a drilling system and a computer-readable storage medium. Fundamentals of the invention
[002] The process of drilling oil wells requires the use of fluids for certain applications, such as: loading well cuttings to the surface; cooling and lubricating the drill bit; maintaining stability in the uncased sections of the well; maintaining hydrostatic pressure in the well annulus, among others. Consequently, it is necessary that the properties of the fluid be constantly monitored so that any anomaly present is reported and control and corrective actions are triggered.
[003] In the current context, with an increase in the amount of data collected on the properties of drilling fluid, the evaluation of data by a human operator makes process monitoring vulnerable to human error.
[004] In this sense, the need for a method to assist the operator in making decisions to correct the properties of drilling fluids is evident, being able to record operating data, process and evaluate the current state of the drilling fluid through fault detection and diagnostic techniques. Thus, it is necessary to provide an answer to the operator indicating whether or not an anomaly has occurred in one or more monitored variables.
[005] Currently, it is necessary to collect samples from Petition 870250011550, dated 12 / 02 / 2025, page 45 / 79 2 / 21 fluids and subsequent shipment to the analysis laboratory, where tests are performed and the results are sent to the rig operator. Monitoring is carried out by tracking bench analyses, in which operators analyze the results of a set of variables simultaneously over long periods. Therefore, both the measurement process and the analysis of the results are time-consuming tasks, causing delays in the flow of information within the rig. As a consequence, the process causes difficulties in the system evaluation, leading to risks for the entire operation. State of the art
[006] The document Anomaly detection in oil-producing wells: a comparative study of one-class classifiers in a multivariate time series dataset (Journal of Petroleum Exploration and Production Technology 14: 343-363, 2024) discloses a method for detecting anomalies in oil-producing wells using machine learning techniques and a publicly available 3W dataset comprising multivariate time series data. It presents a comparison of different anomaly detection methods, specifically one-class classifiers, including Isolation Forest, Oneclass Support Vector Machine (OCSVM), Local Outlier Factor (LOF), Elliptical Envelope, among others. However, this article does not provide details on the application of LOF to an anomaly detection method.
[007] Furthermore, document BR 102024003349-3 also deals with a system for diagnosing anomalies in the properties of drilling fluids. However, the techniques used in this document are statistical models for monitoring the process, namely, Principal Component Analysis (PCA) and Dynamic Principal Component Analysis (DPCA). After training the model, the algorithm calculates process health statistics in order to quantify fluid quality, identifying the Petition 870250011550, dated 12 / 02 / 2025, page 46 / 79 3 / 21 operational status.
[008] The present invention differs from document BR 102024003349-3 in two main points, (i) type of technique used and (ii) adaptability to new operational levels.
[009] The type of technique used in the present invention, Local Outlier Factor (LOF), aims to detect outliers by monitoring the local density of a point relative to its nearest k-neighbors. Therefore, points that exhibit a substantially lower local density than their k-neighbors are classified as outlier candidates, and for this system, outliers are considered anomalies.
[010] Principal Component Analysis (PCA), as used by document BR 102024003349-3, on the other hand, monitors the process based on system variability. The process health statistics are trained under normal conditions and, during monitoring, if the system variability exceeds this detection limit, the process is considered to be in failure. Furthermore, through the contribution of each variable to the statistics, it is possible to infer in which component the failure originates.
[011] In summary, LOF focuses on anomaly detection through local density, whereas PCA reduces the dimensionality of the system and monitors the process through detection limits.
[012] Another point that differentiates the present invention from document BR 102024003349-3 is the number of training sessions performed. Once the algorithm in BR 102024003349-3 trains the techniques and the detection limits are defined, the process is then monitored. If the process fails, the system will maintain the failure status until one of the previously defined steady states is reached. In this way, all possible steady states that the fluid may pass through during operation must be included in the training, which is sometimes a Petition 870250011550, dated 12 / 02 / 2025, p. 47 / 79 4 / 21 Monitoring limitations arise because operating conditions change depending on the region and type of rock being drilled. If an operational state different from that achieved in training is identified, the monitoring system will indicate that the fluid is failing, even if this is a new desired operational level.
[013] In turn, the present invention is able to adapt the normal operating state based on monitoring the derivative window and identify a new steady state. In this way, new operational levels can be introduced during process monitoring, provided there is consent from the human operator, since any operational changes in the fluid properties conditions must be made by the person responsible for the operation. Brief description of the invention
[014] One objective of the computer-implemented method for detecting and diagnosing fluid property faults in a drilling system of the present invention is the monitoring, diagnosis of anomalies, and recovery of the process to normal or standard conditions. Specifically, detection and identification of anomalies, more specifically, faults in drilling fluid properties such as density, apparent viscosity, electrical conductivity, water content in oil, among others. In this sense, the result of the process health assists the operator in acting on the control system and restructuring the system to normal conditions.
[015] Drilling oil wells, especially in marine environments, is a very expensive operation where minimizing drilling time and damage to the producing reservoir is fundamental. Drilling normally occurs through the application of weight and rotation to the drill string, the end of which is attached to a cutting bit. Simultaneously, drilling fluid is circulated inside the well, according to the Petition 870250011550, dated 12 / 02 / 2025, page 48 / 79 5 / 21 following path: the fluid is injected from inside the drill string, passes through holes in the drill bit, and returns through the annular space formed by the wellbore walls and the drill string. Figure 1 illustrates the fluid circulation system, typical in oil and natural gas drilling activities.
[016] Drilling fluids must be specified in order to ensure fast and safe drilling. Thus, it is desirable that the fluid has the following characteristics: be chemically stable, not cause damage to the producing formations, withstand chemical and physical treatment, prevent corrosion of the drill string and other equipment in the circulation system, be pumpable, have a cost compatible with the operation, stabilize the well walls mechanically and chemically, keep solids in suspension when at rest, facilitate the separation of solids generated by the drill bit (gravel) at the surface and facilitate geological interpretations of the material removed from the well.
[017] Drilling fluids, in addition to having the characteristics described above, must also have some basic functions, which are highlighted below: • To exert hydrostatic pressure on the formations in order to prevent the influx of undesirable fluids, which can cause serious safety problems for the entire surface team; • Maintain the physical integrity of the well, preventing a possible collapse of the formation, especially the more friable ones; • Clean the bottom of the well, bringing back to the surface the solids generated by the drill bit (gravel); • To cool and lubricate the drill string and drill bit.
[018] During a drilling operation, the fluid properties must be constantly monitored to ensure it performs its functions. The most important and frequently measured physical properties in drilling rigs Petition 870250011550, dated 12 / 02 / 2025, page 49 / 79 6 / 21 are density, rheological parameters, filtration parameters, and solids content. In this sense, by quickly identifying anomalies, operators can take corrective actions before small faults turn into breakdowns, minimizing risks and improving the safety of operations, thus reducing the frequency and severity of the corrective actions required. As a consequence, the method of the present invention allows the removal of personnel exposed to unhealthy and highly hazardous environments.
[019] Furthermore, automatic monitoring of properties significantly reduces response time regarding fluid status, which improves correction and control capabilities in well drilling operations. This results in a more agile and effective response capacity, allowing operators to make immediate adjustments to drilling operations. As a consequence, longer periods of stability can be achieved, avoiding interruptions and optimizing workflow. Additionally, the invention has a direct impact on reducing the cost of inputs for correcting the properties of drilling fluids.
[020] In addition, the invention makes it possible to reduce operating costs associated with man-hours dedicated to data analysis and, by freeing operators from repetitive tasks, the invention allows them to focus on more strategic activities, increasing productivity.
[021] In summary, the invention of an automatic fault monitoring system based on the LOF technique effectively addresses the difficulties faced in well drilling. By ensuring early detection of anomalies, improving safety, optimizing costs and promoting sustainable practices, this technology transforms the way operations are conducted, resulting in significant benefits for both operators and the environment. Petition 870250011550, dated 12 / 02 / 2025, page 50 / 79 7 / 21
[022] The present invention, in a preferred embodiment thereof, defines a computer-implemented method for detecting and diagnosing faults in the fluid properties of a drilling system, comprising the following steps: - Perform training using an initial training dataset; Send the data to define the training values to the database; local density limit, coefficient of variation, limits of the derivative window used to establish steady state; - Receive data from the drilling system at the point to be analyzed; To calculate the local outlier factor, use the following equation: Σ IrdMinPts(°) ZioeNMinPtpOp) [pd,,·((r))[Π[ [pd— _____________['dMinPts(p)LUtMinPts(p)= ΤΓ 7-Tj \^MinPts(p)\ equation where: Nk-distçP)(p) ={qE D{p}\d(p,q) <k — dist(p)} equação reach — distk(p, °) = max{k — distance(°), d(p, °)} equação j ^ s\0^oeNpinpt:s(p) Rk(p’°y\ kpdMinPts(p)= -----|Τ;------τ-Γ|---\ \^MinPts(p)\ ) equação e em que: peq are objects belonging to the dataset D; d(p,q) is the minimum distance between the objects q in D; k-dist(p) is the distance between p and an object o belonging to D such that for at least k objects °' ED\{p} it holds that Petition 870250011550, dated 12 / 02 / 2025, p. 51 / 79 8 / 21 d(p, o') < d(p, o) and for at most k-1 objects the DE \{p} is valid that d(p, o') < d(p, o); ek is a positive real value; - Compare the local outlier factor with the outlier factor of the training set; - Calculate the numerical derivative of the point to be analyzed, using the finite difference technique, and analyze whether this point is contained within the interval defined by the equation below: Ofí Ptrainamento ±X· ^trainamento equation 5, where: ptrein represents the average of the training series; x represents the number of standard deviations used; and &training represents the standard deviation of the training series; - Compare the number of failure points and the number of steady-state points with the tolerance for failure points and the tolerance for steady-state points; if the comparisons exceed the established limits, identify a possible new steady state and collect a new set of training data; - Calculate the dispersion coefficient of the new training dataset using the equation below: s cv = — X equation 6, where: s represents the sample standard deviation; X is the arithmetic mean of the sample; where, if the dispersion coefficient of the new training dataset is equal to or less than the first training dataset, the drilling system is established in a new steady-state regime and a decision window is opened; Petition 870250011550, dated 12 / 02 / 2025, page 52 / 79 9 / 21 - Isolate the fault and label the variable that most contributes to the occurrence of a fault in the drilling system using the local outlier factor, based on the equations below: ContrFOF=ηρ ^ [fj(xp- x0)]2oe^MinPts^P') equation 7 ^P l^MinPts(p')12^ IrdMinPts^o) oeNMinPtsQp) equation 8 is the vector in the j-th column of the identity matrix; analyzed at each point; - Issue an output message including at least one of: the variable identified with the label that most contributes to the occurrence of failure in the drilling system; the health of the operation, whether in training, normal, or anomaly; and the system components that are failing, if the operation is anomaly.
[023] Furthermore, according to another embodiment of the invention, the first set of training data includes at least one variable, wherein the at least one variable includes at least one of: rheological properties of fluids, fluid density, electrical conductivity, percentage of water in synthetic fluids and apparent viscosity.
[024] Furthermore, if the local outlier factor is greater than the outlier factor of the training set, the density of this point relative to its k-neighbors is lower compared to the training set, and the point is classified as a failure; and if the number of points classified as failures is greater than a predefined value, the number of points classified as failures is continuously summed; where a normal point zeroes the number Petition 870250011550, dated 12 / 02 / 2025, page 53 / 79 10 / 21 points in failure.
[025] Additionally, if the derivative of the point is contained in the interval and the number of points in stationary state is greater than a predefined value, then the number of points in stationary state is summed; and wherein, if a point whose derivative is not contained in this interval, the number of points in stationary state is zeroed.
[026] Additionally, if the dispersion coefficient of the new training dataset is equal to or less than the first training dataset, the drilling system is established in a new steady state and a decision window is opened; in which the operator decides whether to perform training in this new steady state or not; if the operator decides to perform training in this new steady state, the operator confirms that this new steady state is a desired state and training is performed.
[027] In addition, the output message can be sent in an application to an operator.
[028] Furthermore, according to another preferred embodiment of the present invention, a computer-readable storage medium is defined comprising, stored therein, a set of computer-readable instructions, which when executed by a computer, executes the computer-implemented method for detecting and diagnosing faults in the fluid properties in a drilling system, as described above. Brief description of the figures
[029] In order to complement the present description and to obtain a better understanding of the characteristics of the present invention, and in accordance with a preferred embodiment thereof, a set of figures is presented in the appendix, where, in an exemplary, though not limiting, manner, its preferred embodiment is represented. Petition 870250011550, dated 12 / 02 / 2025, page 54 / 79 11 / 21
[030] Figure 1 illustrates the fluid circulation system, according to the state of the art.
[031] Figure 2 illustrates the flow of the computer-implemented method for detecting and diagnosing faults in fluid properties in a drilling system of the present invention.
[032] Figure 3 presents an example of a diagnostic result, showing graphs of the LOP factor x time (s) and process health x time (s).
[033] Figure 4 represents an example of an output screen with a sampling graph with various fluid parameters (conductivity, flow rate, specific mass, temperature, apparent viscosity and ambient temperature).
[034] Figure 5 illustrates an example of the result for statistical monitoring of the health of the system.
[035] Figure 6 shows an example of the drilling system operating in anomaly.
[036] Figure 7 highlights an example of the drilling system operating without anomaly.
[037] Figure 8 shows an example of a screen from the real-time data reception system.
[038] Figure 9 presents an example of an anomaly reported in the rheology of drilling fluid. Detailed description of the invention
[039] The computer-implemented method for detecting and diagnosing fluid property faults in a drilling system, as illustrated in the flow in Figure 2, comprises the following steps: - perform training (1) using a first training dataset, wherein the first training dataset includes at least one variable, wherein the at least one variable includes at least one of: rheological properties of fluids, fluid density, electrical conductivity, Petition 870250011550, dated 12 / 02 / 2025, page 55 / 79 12 / 21 percent water content in synthetic fluids and apparent viscosity; - send the training data to the database (2); - Define the local density limit values, coefficient of variation, and derivative window limits used to establish steady state; - Receive data from the drilling system at the point to be analyzed; - perform the calculation of the local outlier factor (3), using the equation: LOFUinpts(p) Σ ^rdMÍpPts(o) ZjoeNMínPts)P') [rH,.,.((ü)rMlPmPtsprJ \^MlpPts(p)I equation 1, where: Nk-dist(p)(P)={q ED{p}\d(p,q) <k — dist(p)} equação 2, reach — distk(p, o) = max{k — distance(o), d(p, o)} equação 3, , j z x0^oeNpinpt:s(p) ^kpP’0 / \ IrdMippts(P)= -----|T;------τ-Γ|---\ \^MlpPts(p)\ ) equation 4, and where: peq are objects belonging to the dataset D; d(p,q) is the minimum distance between the objects p and q in D; k-dist(p) is the distance between p and an object o belonging to D such that for at least k objects 0 ED\{p} it is valid that d(p, o') < d(p, o') and for at most k-1 objects o ED\{p} it is valid that d(p, o') < d(p, o'); ek is a real and positive value; - compare the local outlier factor with the outlier factor of the training set (4); in which case the local outlier factor is greater than the outlier factor of the training set, Petition 870250011550, dated 12 / 02 / 2025, p. 56 / 79 13 / 21 means that the density of this point compared to its neighbors is substantially lower compared to the training set and the point is classified as a failure (4.1); - if the number of points classified as failure is greater than a predefined value (5), the number of points classified as failure is added continuously (5.1); where a normal point resets the number of points in failure to zero; - Calculate the numerical derivative of the point to be analyzed (6), using the finite difference technique and analyze whether this point is contained in the interval defined by the equation below: OR Rtraining ±x' ^training equation 5 where: Rtraining represents the average of the training series; x represents the number of standard deviations used; and atreino represents the standard deviation of the training series; wherein, if the derivative of the point is contained in the interval (7.1) and the number of points in stationary state is greater than a predefined value (8), then the number of points in stationary state is summed (8.1); and wherein, if a point whose derivative is not contained in this interval, the number of points in stationary state is zeroed; - compare the number of points in failure and the number of points in steady state with the tolerance of points in failure and the tolerance of points in steady state; in which case the comparisons exceed the established limits, identify a possible new steady state and collect a new set of training data (9); - Calculate the dispersion coefficient of the new training dataset using the equation below: cv = — x Petition 870250011550, dated 12 / 02 / 2025, pp. 57 / 79 14 / 21 equation 6, where: s represents the sample standard deviation; x is the arithmetic mean of the sample; wherein, if the dispersion coefficient of the new training dataset is equal to or less than the first training dataset (10), the drilling system is established in a new steady state and a decision window is opened; wherein the operator decides whether to perform training in this new steady state or not; if the operator decides to perform training in this new steady state, the operator confirms that this new steady state is a desired state and training is performed; - Isolate the fault and label the variable that most contributes to the occurrence of a fault in the drilling system using the local outlier factor, based on the equations below: ContrfOF= ηρ ^ [ξT(xp- x0)]2oeNMinPtsrp>) equation 7P\^MinPts(p')\2^ ' ^^^MinPts^^') oeNMinPtsQp) equation 8 where ξ1· is the vector in the j-th column of the identity matrix; number of variables being analyzed at each point; - Issue an output message including at least one of: the variable identified with the label that most contributes to the occurrence of a failure in the drilling system; the health of the operation, whether in training, normal, or anomaly; and the system components that are failing, if the operation is anomaly; where the output message can be issued in a Petition 870250011550, dated 12 / 02 / 2025, pp. 58 / 79 15 / 21 application for an operator. Techniques applied in the present invention • Local Outlier Factor (LOF)
[040] The Local Outlier Factor (LOF) technique is an unsupervised anomaly detection method that calculates the deviation of the local density of a given point relative to its neighbors in a dataset. Unlike traditional techniques, where the outlier is considered in a Boolean way, in LOF each point is assigned a factor that measures the distance of the point from its neighbors. In the LOF technique, two plateaus are produced from the training data: the first plateau, called the anomaly-free state; and the second, called the anomaly-containing state. It is necessary that the selected training data satisfactorily describe the steady state of the drilling fluid, so that the classifier is able to generate the anomaly-free region. Once trained, the classifier will compare the new monitored samples and label the points as being in an anomalous state or an anomaly-free state. • Monitoring of signal variability and confidence window
[041] The signal variability monitoring technique consists of identifying the level of variability of the drilling fluid properties. To define the variability of the drilling fluid, the derivatives of the monitored signals are calculated from the training data. Specifically, a statistical confidence region is plotted by summing the mean of the absolute value of the derivatives with the standard deviation of the training data. It is then defined that any monitored variation within this confidence region is a normal variability of a steady state, and any variation outside the confidence region is a variation belonging to a transient state of the fluid properties. Petition 870250011550, dated 12 / 02 / 2025, pp. 59 / 79 16 / 21 drilling, that is, it indicates that the properties of the drilling fluid are changing, and it is necessary to wait for stabilization before a new training session can be carried out. • Operator support application
[042] The results of the method of the present invention can be presented in an interface, to present the data to the human operator in understandable formats, so as to enable them to analyze the data and make informed decisions.
[043] Furthermore, the method of the present invention can also output the information in the form of monitoring graphs, which represent the temporal evolution of the outlier factor over time, making it possible to observe the moment when the failure occurs. In addition, the process label and the faulty variable are presented to the operator through the diagnostic message.
[044] Additionally, the present invention relates to a computer-readable storage medium comprising, stored therein, a set of computer-readable instructions, wherein when the set of computer-readable instructions is executed by one or more processors, the one or more processors implement the method of the present invention as described above.
[045] In particular, computer-readable storage media can be memory, which can be non-volatile, such as a hard disk drive (HDD) or a solid-state drive (SSD), or volatile, such as random-access memory (RAM). Furthermore, readable storage media can be any other medium or medium that can carry, store, or record the expected program code in the form of an instruction, a data structure, or a set of instructions and can be accessed by one or more computers or one or more processors, but is not limited to them. Readable storage media can be, Petition 870250011550, dated 12 / 02 / 2025, pp. 60 / 79 17 / 21 Alternatively, a circuit or any other device or means that can implement a storage, transport or recording function, such as a signal or carrier.
[046] Specifically, the computer-readable instruction set represents the algorithm or computer program code or data structure that performs the method of the present invention described above.
[047] The processor can be a general-purpose processor, which can be a microprocessor or any conventional processor or similar. Examples and results of the invention
[048] Validation of the method of the present invention required a high volume of data relating to the properties of drilling fluids, varying set point values and generating noise in some cases. Such data were obtained by means of a pilot plant for the automated preparation of drilling fluids. The data were collected in closed-loop circulation operation equipped with sensors to measure apparent viscosity (rotational viscometer - TT-100), density (process densimeter, RHM 20), water-in-oil ratio (for oil-based fluids) and electrical conductivity (process conductivity meter - Strato PRO).
[049] The method of the present invention records, monitors, detects, identifies faults, and saves fluid property data in real time. System noise is smoothed using normalization based on training datasets. The possibility of setpoint changes was addressed by monitoring the trend of the variables. If the fault points exceed a certain tolerance and are contained within a confidence region, the algorithm performing the method of the invention retrains the algorithm. With the method of the present invention, it was possible to identify different Petition 870250011550, dated 12 / 02 / 2025, pp. 61 / 79 18 / 21 types of disturbance in the characteristics of the drilling fluid. The algorithm was tested through numerical simulations and validated in the pilot unit.
[050] Specifically, the validation test involved disturbing the properties of industrial water by adding a viscosifier, in this case carboxymethylcellulose (CMC), and a thickener, such as barite. The test began with the circulation of the industrial water through the system, which contains approximately 100 liters, for about 15 minutes to ensure that the fluid properties were in a steady state. After establishing a steady state for all monitored variables, the disturbance test was initiated by gradually adding carboxymethylcellulose (CMC) in sufficient quantities, ranging from 1 lb / bbl to 2 lb / bbl, so that the apparent viscosity of the fluid, measured at 511 s-1, reached a value of 2.20 cP. A period of 30 minutes was allowed for the swelling process of the CMC particles to be completed.Next, a second disturbance was made to the fluid by adding barite in sufficient quantities, ranging from 30% w / w to 50% w / w, so that the fluid density reached 1.04 g / cm³. In addition to the disturbed properties, the diagnostic system observed the behavior of other properties monitored in the plant, such as conductivity, water content, and flow rate.
[051] The addition of viscosifier caused a continuous increase in the apparent viscosity of the fluid and, as this property was not being controlled, the system stabilized at a new level after all the viscosifier was absorbed. The sudden addition of thickener caused a similar disturbance in the density and apparent viscosity properties, stabilized at another steady-state level after the fluid circulated in a closed loop through the system.
[052] The diagnostic system received, processed and reported Petition 870250011550, dated 12 / 02 / 2025, pp. 62 / 79 19 / 21 in real time the integrity of the operation to the human operator. At the end of the test, the algorithm provided a text file containing all monitored variables and the process label. The process monitoring system was able to satisfactorily detect and identify the moment and indicate in which property the failure occurred. After initial training, the algorithm maintained the information that the operation was within the expected normality until the disturbance in apparent viscosity was sensed by the system. As soon as this property left the training interval, the process monitoring system identified the disturbance almost instantaneously, changing the process label to failure. Figure 3 describes the entire process explained above.Due to the slow dilution of CMC, the diagnostic system attempts to perform training in the middle of the apparent viscosity increase curve; however, this region exhibits greater dispersion compared to the original training, so this set is excluded. When the apparent viscosity reaches 7.8 cP and the other properties remain constant, the system opens a window on the work screen so that the operator can indicate whether they wish to perform a new training in this new steady state or maintain the previous training. With the operator's consent, the label is changed to normal and remains so until a new disturbance is observed by the system.
[053] Next, the thickening agent was added to the system and, as soon as it was incorporated, the process monitoring changed the label from normal to failure and remained in this status until a new steady state is identified and the algorithm performs a new training and the label remains normal until the end of the test.
[054] In addition to detecting the occurrence of the failure, the developed monitoring system identifies the cause of the failures. The algorithm identifies the predominance of viscosity. Petition 870250011550, dated 12 / 02 / 2025, pp. 63 / 79 20 / 21 appears to be the root cause of the first failure identified by the algorithm, while for the second failure the main cause is shown to be a variation in fluid density followed to a lesser degree by apparent viscosity, since these two properties exhibit a certain synergy. These diagnoses corroborate the test performed, demonstrating the algorithm's ability to efficiently detect and diagnose disturbances in the properties of drilling fluids.
[055] Figures 4, 5, 6, and 7 illustrate the interface of an operator support application that receives the results of the method of the present invention. Figure 4 shows an output screen with the result of a contribution of the monitored variables in relation to the disturbance of the system as a whole. In Figure 5, the screen with the results of the computer-implemented method can be understood in 3 parts: a field for statistical monitoring of the system's health; the upper right part displays the communication status of the system with the test or analysis plant; and the lower right part shows a field for detecting faults / anomalies and the process state (green indicates normality and red indicates any anomaly detected). Figure 6 shows the system operating under anomaly conditions.Once a fault is detected and alarmed, a secondary interface presents the operator with the result of the interpretation of the contribution maps of the process health statistics for the diagnosis of the detected fault. Figure 7 illustrates an interface of the computer-implemented method in which the system is operating without anomalies.
[056] The method of the present invention can be applied by receiving data from monitoring systems of drilling fluid properties. The reports issued by the method of the present invention, integrated into supervisory systems, can expedite the operator's response to process disturbances. This integration requires the upload of Petition 870250011550, dated 12 / 02 / 2025, pp. 64 / 79 21 / 21 scripts and algorithms for diagnostics, healthy fluid state training, and output generation. Once loaded into the code repository, the outputs of this method should be reconciled with the other results from the supervisory systems.
[057] As a way to validate these methodologies with field data, the algorithm was set to monitor the drilling of wells A and B operated by PETROBRAS through the RTO live real-time data reception platform. During the drilling of well A, no anomalies were identified by the algorithm, as was indeed the case throughout the entire operation. Figure 8 shows a screen of the real-time data reception system and, in the last track on the right of the figure, in the ANNOTATIONS field, the algorithm's response after analyzing the fluid properties data. However, the analyses performed by the algorithm for Well B show an anomaly reported in the fluid rheology, as can be identified in Figure 9. In this case, it was a transmission failure at the root of the data, which was replicating the value of the rheological reading Θ300 in the value of the rheological reading Θ3. The operational team was contacted and the problem was resolved.
[058] The rules implemented in the algorithm were able to identify this anomaly, showing that if any significant change or change outside the expected range occurs for the properties of drilling fluids, alerts will be triggered so that the operational team can take corrective actions.
[059] Those skilled in the art will appreciate the knowledge presented here and will be able to reproduce the invention in the embodiments presented and in other variants, covered within the scope of the appended claims. Petition 870250011550, dated 12 / 02 / 2025, pp. 65 / 79
Claims
1 / 4 CLAIMS 1. Computer-implemented method for detecting and diagnosing fluid property faults in a drilling system, characterized by comprising the steps of: - performing training (1) using a first set of training data, - sending the training data to the database (2); - defining the values of local density limit, coefficient of variation, limits of the derivative window used to establish the steady state; - receiving data from the drilling system with the point to be analyzed; - performing the calculation of the local outlier factor (3), through the equation: LOFUinpts (p) Σ ^rdMlpPts(o) ZjoeNMínPts)P') [rH,.,. ( (u) r M^lip,[>tsp)J \^MlpPts(p) I equation 1, where: Nk-dist(p)(P) = {qe D{p}\d(p,q) <k — dist(p)} equação 2, reach — distk(p, o) = max{k — distance(o), d(p, o)} equação 3, , j z \ 0^oeNpinpt:s(p) Rk(.p 0)\ IrdMippts(P) = -----|Τ;------τ-Γ|---\ \^MlpPts(p)\ ) equation 4, and where: peq are objects belonging to the dataset D; d(p,q) is the minimum distance between the pe and the object q in D; k-dist(p) is the distance between pe and an object o belonging to D such that for at least k objects o' ED\{p} it is valid that Petition 870250011550, of 12 / 02 / 2025, page 66 / 79 2 / 4 d(p, o') < d(p, o) and for at most k-1 objects o ED\{p} it is valid that d(p, o') < d(p, o); ek is a real and positive value; - compare the local outlier factor with the outlier factor of the training set (4); - Calculate the numerical derivative of the point to be analyzed (6), using the finite difference technique and analyze whether this point is contained in the interval defined by the equation below: OR Rtraining ± x ' ^training equation 5, where: Rtraining represents the average of the training series; x represents the number of standard deviations used; and &training represents the standard deviation of the training series;- Compare the number of failure points and the number of steady-state points with the tolerance for failure points and the tolerance for steady-state points; where, if the comparisons exceed the established limits, identify a possible new steady state and collect a new set of training data (9); - Calculate the dispersion coefficient of the new training data set using the equation below: s cv = — x equation 6, where: s represents the sample standard deviation; x is the sample mean; where, if the dispersion coefficient of the new training data set is equal to or less than the first training data set (10), the drilling system is established in a new steady state and a decision window is opened;Isolate the fault and label the variable that most contributes to the occurrence of a failure in the drilling system using the local outlier factor, using the equations below: Contr''OF =ηρ ^ [fj(xp - x0)]2oe^MinPtsÍP'} equation 7 ^P l^MinPts(p')12 ^ IrdMinPtsto) oeNMinPtsQp) equation 8 is the vector in the j-th column of the identity matrix; number of variables being analyzed at each point; - output a message including at least one of: the variable identified with the label that most contributes to the occurrence of a failure in the drilling system; the health of the operation, whether in training, normal or anomaly; and the system components that are failing, if the operation is anomaly.
2. Method, according to claim 1, characterized in that the first training dataset includes at least one variable, wherein the at least one variable includes at least one of: rheological properties of fluids, fluid density, electrical conductivity, percentage of water in synthetic fluids, and apparent viscosity.
3. Method, according to claim 1, characterized in that if the local outlier factor is greater than the outlier factor of the training set, the density of this point relative to its k-neighbors is lower compared to the training set and the point is classified as a failure (4.1); if the number of points classified as failures is greater than a predefined value (5), the number of points classified as failures is summed continuously (5.1); where a normal point zeroes the number of points in failure.
4. Method, according to claim 1, characterized in that if the derivative of the point is contained in the interval (7.1) and the number of points in stationary state is greater than a predefined value (8), then the number of points in stationary state is summed (8.1); and in that, if a point whose derivative is not contained in this interval, the number of points in stationary state is zeroed.
5. Method, according to claim 1, characterized in that if the dispersion coefficient of the new training data set is equal to or less than the first training data set (10), the drilling system is established in a new steady state and a decision window is opened; in which the operator decides whether to perform training in this new steady state or not; if the operator decides to perform training in this new steady state, the operator confirms that this new steady state is a desired state and training is performed.
6. Method, according to claim 1, characterized in that the output message can be sent in an application to an operator.
7. Computer-readable storage media, characterized by comprising, stored therein, a set of computer-readable instructions, which when executed by a computer, executes the method as defined in any one of claims 1 to 6. Petition 870250011550, dated 12 / 02 / 2025, pp. 69 / 79