# US 12,217,140 B2 · Apparatus and method for predicting downhole conditions

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 12,217,140 B2
- Document ID: US12217140B2
- Status: Granted
- Kind: B2
- Application number: 17/968,077
- Filed: 2022-10-18
- Published: 2024-04-18
- Granted: 2025-02-04
- Earliest claimed: 2022-10-18
- Applicants: David Cook
- Inventors: David Cook
- Web page: https://patentgrep.com/patent/US12217140B2

## CPC

- G06N 20/00: Machine learning
- E21B 41/00: Equipment or details not covered by groups E21B15/00 - E21B40/00
- E21B 2200/22: Fuzzy logic, artificial intelligence, neural networks or the like
- G06N 3/0464: Convolutional networks [CNN, ConvNet]
- G06N 3/084: Backpropagation, e.g. using gradient descent
- G06N 3/088: Non-supervised learning, e.g. competitive learning
- G06N 3/09: Supervised learning
- G06N 5/048: Fuzzy inferencing
- G06N 7/01: Probabilistic graphical models, e.g. probabilistic networks
- G06N: COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- E21B: EARTH OR ROCK DRILLING; OBTAINING OIL, GAS, WATER, SOLUBLE OR MELTABLE MATERIALS OR A SLURRY OF MINERALS FROM WELLS

## Abstract

In an aspect, an apparatus for predicting downhole conditions is disclosed. The apparatus comprises at least a processor and a memory communicatively connected to the at least a processor. The memory containing instructions configuring the at least a processor to receive a condition datum. The memory additionally contains instructions configuring the at least a processor to produce a measured downhole condition using at least a sensor. The memory instructs the processor to convert the condition datum and the measured downhole conditions into a cleansed data format using a data conversion module. The processor is instructed by the memory to identify a flagged data as a function of the cleansed condition datum and the cleansed measured downhole conditions using a downhole machine learning model. The memory instructs the processor to generate a predicted downhole condition as a function of the flagged data.

## Claims

### Claim 1

An apparatus for predicting downhole conditions, wherein the apparatus comprises:
at least a processor; and
a memory communicatively connected to the at least a processor, the memory containing instructions configuring the at least a processor to:
receive a condition datum, wherein the condition datum comprises one or more surface conditions near a well;
produce a measured downhole condition using at least a sensor, wherein the downhole condition comprises one or more downhole conditions within the well;
convert the condition datum and the measured downhole conditions into a cleansed data format using a data conversion module, wherein the cleansed data format comprises a cleansed condition datum and a cleansed measured downhole condition;
identify flagged data as a function of the cleansed condition datum and the cleansed measured downhole condition, wherein identifying the flagged data comprises:
identifying similarly situated wells, wherein identifying the similarly situated wells comprises correlating the measured downhole condition to a plurality of wells as a function of a database;
generating downhole training data, wherein the downhole training data comprises a plurality of data entries including historical flagged data and downhole conditions correlated to flagged data, wherein generating the downhole training data comprises recording the historical flagged data by measuring previous downhole conditions of the similarly situated wells over a predetermined period of time, and selecting the downhole training data using a training data classifier;
training a downhole machine learning model as a function of the downhole training data, wherein training the downhole machine leaning model comprises:
inputting training data to an input layer of nodes, wherein the training data comprises at least the cleansed condition datum and cleansed measured downhole condition inputs, and wherein the downhole machine learning model further comprises one or more intermediate layers of nodes and an output layer of nodes comprising a plurality of flagged data outputs;
adjusting one or more connections and one or more weights between nodes in adjacent layers of the downhole machine learning model;
generating an accuracy score as a function of a predicted downhole condition;
comparing the accuracy score to a threshold;
updating the downhole training data as a function of the comparison; and
iteratively retraining the downhole machine learning model using the updated downhole training data;
generating the flagged data as a function of the downhole machine learning model, wherein the downhole machine learning model is configured to receive the cleansed condition datum and the cleansed measured downhole condition as inputs and output the flagged data;
generate the predicted downhole condition of the well as a function of the flagged data;
control equipment of the apparatus as a function of the predicted downhole condition; and
generate a predicted reservoir condition as a function of the flagged data by:
generating reservoir training data correlating historical and present flagged data and a predicted downhole condition to predicted reservoir conditions using an array indexing operation configured to optimize a runtime computation of the at least a processor;
training a reservoir machine learning model using the reservoir training data; and
outputting, using the reservoir machine learning model, the predicted reservoir condition.

### Claim 2 (depends on 1)

The apparatus of claim 1, wherein the predicted downhole condition is generated using a prediction machine learning model.

### Claim 3 (depends on 1)

The apparatus of claim 1, wherein the predicted downhole condition comprises a bottomhole pressure.

### Claim 4 (depends on 1)

The apparatus of claim 1, wherein the predicted downhole condition comprises a bottomhole frac gradient.

### Claim 5 (depends on 1)

The apparatus of claim 1, wherein the accuracy score comprises a comparison of the measured downhole conditions to the predicted downhole condition.

### Claim 6 (depends on 1)

The apparatus of claim 1, wherein the condition datum comprises system geometry.

### Claim 7 (depends on 1)

The apparatus of claim 1, wherein the condition datum comprises a geographical datum.

### Claim 8

A method for predicting downhole conditions, wherein the method comprises:
receiving, using at least a processor, a condition datum, wherein the condition datum comprises one or more surface conditions near a well;
producing, using the at least a processor, a measured downhole condition using at least a sensor, wherein the downhole condition comprises one or more downhole conditions within the well;
converting, using the at least a processor, the condition datum and the measured downhole conditions into a cleansed data format using a data conversion module, wherein the cleansed data format comprises a cleansed condition datum and a cleansed measured downhole condition;
identifying, using the at least a processor, a flagged data as a function of the cleansed condition datum and the cleansed measured downhole condition, wherein identifying flagged data comprises:
identifying similar situated wells, wherein identifying similarly situated wells comprises correlating the measured downhole condition to a plurality of wells as a function of a database;
generating downhole training data, wherein downhole training data comprises a plurality of data entries including historical flagged data and downhole conditions correlated to flagged data, wherein generating the downhole training data comprises recording the historical flagged data by measuring previous downhole conditions of the similarly situated wells over a predetermined period of time, and selecting the downhole training data using a training data classifier;
training a downhole machine learning model as a function of the downhole training data, wherein training the downhole machine leaning model comprises:
inputting training data to an input layer of nodes, wherein the training data comprises at least the cleansed condition datum and cleansed measured downhole condition inputs, and wherein the downhole machine learning model further comprises one or more intermediate layers of nodes and an output layer of nodes comprising a plurality of flagged data outputs;
adjusting one or more connections and one or more weights between nodes in adjacent layers of the downhole machine learning model;
generating an accuracy score as a function of a predicted downhole condition;
comparing the accuracy score to a threshold;
updating the downhole training data as a function of the comparison; and
iteratively retraining the downhole machine learning model using updated downhole training data;
generating the flagged data as a function of the downhole machine learning model, wherein the downhole machine learning model is configured to receive the condition datum and the measured downhole condition as inputs and outputs the flagged data;
generating, using the at least a processor, the predicted downhole condition of the well as a function of the flagged data;
controlling equipment of the apparatus as a function of the predicted downhole condition; and
generating, using the at least a processor, a predicted reservoir condition as a function of the flagged data by:
generating reservoir training data correlating historical and present flagged data and a predicted downhole condition to predicted reservoir conditions using an array indexing operation configured to optimize a runtime computation of the at least a processor;
training a reservoir machine learning model using the reservoir training data; and
outputting, using the reservoir machine learning model, the predicted reservoir condition.

### Claim 9 (depends on 8)

The method of claim 8, wherein the predicted downhole condition is generated using a prediction machine learning model.

### Claim 10 (depends on 8)

The method of claim 8, wherein the predicted downhole condition comprises a bottomhole pressure.

### Claim 11 (depends on 8)

The method of claim 8, wherein the predicted downhole condition comprises a bottomhole frac gradient.

### Claim 12 (depends on 8)

The method of claim 8, wherein the accuracy score comprises a comparison of the measured downhole conditions to the predicted downhole condition.

### Claim 13 (depends on 8)

The method of claim 8, wherein the condition datum comprises system geometry.

### Claim 14 (depends on 8)

The method of claim 8, wherein the condition datum comprises a geographical datum.
