Patent Description:
During the design phase for exploring new oil fields or developing new wells in an existing oil field there are two major aspects that must be addressed. At first, a realistic estimate of the expected mechanical behavior of the rocks and its potential response as a result of drilling needs to be developed, considering the geomechanical parameters of the rocks. Then an economic and safe well and support method for the determined rocks behavior needs to be designed. Geomechanics is the study of how rocks deform and fail in response to changes of stress, pressure, temperature, and other mechanical parameters imposed during a field development. It plays a critical role from quantifying drilling risks of exploration wells to maximizing production and recovery of difficult hydrocarbon resources and mature reservoirs.

The geomechanical parameters of a well are usually interpreted manually, depending on the experience of the person carrying out the interpretation. The results are usually impacted by inconsistencies due to biased or unexperienced interpreters.

International patent application <CIT> describes a geomechanical method for calculating parameters such as overburden stress along a well trajectory to create log data. The log data contain plural curves, wherein a curve is a set of measurements or calculated property values due depth values. The method comprises the calibration of the curves which show anomalies using a machine learning algorithm. The machine learning algorithm is trained using parameter curves without anomalies from the concerning well or a comparable well. The machine learning algorithm creates a synthetic curve based on the curve containing the anomalies.

US patent application <CIT> describes a method for predicting mineralogical, textural, petrophysical and/or elastic target parameters at locations without rock samples based on well logs data. Elastic target parameters may be parameters such as P-wave velocity, S-wave velocity, or density. In addition to the well logs data, rock samples derived from rock sample locations are analyzed to obtain target parameter data measured from the rock samples. A machine learning algorithm is trained based on the well logs data and the target parameters measured from the rock samples. The machine learning algorithm is used to predict the target property at locations without rock samples for calibrating the created logs. <CIT> discloses a method and system for modeling a subsurface region include applying a trained machine learning network to an initial petrophysical parameter estimate to predict a geologic prior model; and performing a petrophysical inversion with the geologic prior model, geophysical data, and geophysical parameters to generate a rock type probability model and an updated petrophysical parameter estimate. <CIT> discloses a method for designing and optimizing drilling and completion operations in hydrocarbon reservoirs.

The prior art describes solutions for determining mechanical parameters using machine learning algorithms. The prior art, however, describe a system or method for determining geomechanical parameters of a well using machine learning algorithms while also considering porosity-based calculations.

The present invention describes a system and computer-implemented method for determining elastic/mechanical parameters of a well. The accuracy of the determined parameters is increased by using a combination of geoscience-based models and machine learning algorithms.

According to a first aspect of the invention, the computer-implemented method for determining first final values of a first elastic (mechanical) parameter of a first well in a first rock structure comprises obtaining first input data from a database. The first input data is generated, at the first well, by at least one first tool module and comprises first well parameters of the first well. First intermediate values of the first geomechanical parameter of the first well are calculated using a first geoscience-based model and the first input data. First final values of the first geomechanical parameter of the first well are determined from the first intermediate values and the first input data using a first prediction model.

According to another aspect of the invention, the first prediction model is built using first machine learning algorithms and fourth input data. The fourth input data comprises geological and/or petrophysical parameters.

Obtaining the first input data comprises, according to the claimed invention, obtaining first intermediate input data
from the database, wherein the first intermediate input data is generated, at the first well, by the at least one first tool module. The first intermediate input data comprise first intermediate well parameters of the first well. Missing data which is missing in the first intermediate input data, and which is necessary for calculating the first intermediate values and/or determining the first final values is identified. At least one second well is chosen from a plurality of wells stored in the database. Second input data for the second well is obtained from the database. The second input data is generated, at the at least one second well, by at least one tool module logs set and comprises second well parameters of the at least one second well. The first intermediate input data is merged with parts of the second input data that correspond to the missing data to gain the first input data with the first well parameters. The second well can be located in the first rock structure or in a second rock structure.

Choosing the at least one second well can consider at least one of the distances between the first well and the at least one second well, geological parameters of the first rock structure and of the second rock structure, the first well properties of the first well and the second well properties of the at least one second well.

According to another aspect of the invention, the method further comprises obtaining third input data from the database, wherein the third input data is generated, at the first well, by at least one third tool module. The third input data comprises third well parameters of the first well. First corrected final values of the first geomechanical parameter of the first well are determined from the first final values and the third input data.

According to another aspect of the invention, the method further calculates second intermediate values of a second geomechanical parameter of the first well using a second porosity-based model, the first input data and the first final values or the first corrected final values. Second final values of the second geomechanical parameter of the first well are determined from the second intermediate values and the first input data using a second prediction model.

The second prediction model can be built using second machine learning algorithms and fifth input data, the fifth input data comprising geological and/or petrophysical parameters.

The first well properties and the second well properties can be at least one of vertical depth, dog-legged severity, azimuth and below mudline depth along the well trajectory.

The first well parameters and the second well parameters are at least one of bulk density, caliper, resistivity, neutron porosity, compression slowness, shear slowness, young's modulus, compressive strength, Poisson ratio, fracture breakdown pressure and fracture closure pressure.

The first geomechanical parameter and the second geomechanical parameter of the first well can be one of overburden stress, pore pressure, fracture gradient, elastic properties, strength, and horizontal stresses.

The first input data and the second input data can be derived from one of well logs data generated during drilling and analysis of borehole cores.

The first machine learning algorithms and the second machine learning algorithms comprise regression algorithms.

Determining first corrected final values can comprise at least one of least square method as well as linear and nonlinear convex optimization.

The system for determining first final values of a first geomechanical parameter of a first well in a first rock structure comprises at least one first tool module and at least one second tool module. A database is configured to store first input data which is received from the at least one first tool module. The first input data comprises first well parameters of the first well. A data acquisition unit is configured to receive data from the database and to obtain the first input data from the database. A calculation unit is configured to receive data from the data acquisition unit and to calculate first intermediate values of the first geomechanical parameter of the first well using a first geoscience-based model and the first input data. An optimizer unit is configured to receive data from the data acquisition unit and from the calculation unit. The optimizer unit is further configured to build a first prediction model using first machine learning algorithms and fourth input data, wherein the fourth input data comprise geological and/or petrophysical parameters. The optimizer unit determines the first final values of the first geomechanical parameter of the first well from the first intermediate values and the first input data using the first prediction model.

The invention will now be described based on the figures. It will be understood that the embodiments and aspects of the invention described herein are only examples and do not limit the protective scope of the claims in any way. The invention is defined by the claims and their equivalents. It will be understood that features of one aspect or embodiment of the invention can be combined with a feature of a different aspect or aspects and/or embodiments of the invention.

<FIG> shows a view of a first aspect of a system for determining a first geomechanical parameter <NUM> of a first well <NUM> in a first rock structure <NUM>. A first tool module <NUM> can measure first well parameters <NUM> at the first well <NUM> and provide first input data <NUM> about the first well parameter <NUM> in conformity with the website information transfer standard markup language (WITSML). WITSML is an XML-based mark-up language and is described at https://www. energistics. org/portfolio/witsml-data-standards/. The WITSML standard is commonly known in the petroleum industry.

The first tool module <NUM> comprises a first measurement system <NUM> and a first WITSML server <NUM>. The first measurement system <NUM> can for example be drilling instrumentation tools, such as, but not limited to composition of drill pipes with well logging devices, used during logging while drilling or measurement while drilling of the first well <NUM>. The data generated by the first measurement system <NUM> are the first input data <NUM> and can be but are not limited to bulk density logs and a sonic logs. The bulk density log of the first well <NUM> is a record of the bulk density of the first rock structure <NUM> along the well trajectory due depth of the first well <NUM>. The sonic logs include sonic compression and sonic shear along the well trajectory due depth of the first well <NUM>. The data generated by the first measurement system <NUM> is sent to the first WITSML server <NUM> to perform depth time synchronization. Depth time synchronization comprises assigning a corresponding time to the recorded data points of the respective data to associate data from a certain point of depth with the time when the measurement of the data was performed.

The first tool module <NUM> provides the first input data <NUM>, e.g., the bulk density logs and sonic logs to a database <NUM> or a data and quality control center <NUM>. The first tool module <NUM> can alternatively or additionally measure further first well parameters <NUM> of the first well <NUM> such as, but not limited to, caliper, resistivity, neutron porosity, compression slowness, shear slowness, young's modulus, compressive strength, poisson ratio, fracture breakdown pressure and fracture closure pressure. The first tool module <NUM> can be a single tool module capable of measuring one type of the first well parameters <NUM> or measuring more than one type of the first well parameters <NUM>. The first tool module <NUM> can alternatively be separate tool modules or a combination thereof, wherein the separate tool modules are able to measure different ones of the first well parameters <NUM>.

A second tool module <NUM> can measure second well parameters <NUM> at a second well <NUM> in a second rock structure <NUM> and provide second input data <NUM> about the second well parameters <NUM> in conformity with the WITSML standard. The first well <NUM> and the second well <NUM> can alternatively be located in the same rock structure <NUM>, <NUM>. The second tool module-<NUM> comprises a second measurement system <NUM> and a second WITSML server <NUM>. The second measurement system <NUM> can for example be drilling instrumentation tools used during logging while drilling or measurement while drilling of the second well <NUM>. The data generated by the second measurement system <NUM> are the second input data <NUM> and can be but are not limited to bulk density logs and a sonic logs. The bulk density log of the second well <NUM> is a record of the bulk density of the second rock structure <NUM> along the well trajectory due depth of the second well <NUM>. The sonic logs include sonic compression and sonic shear along the depth of the second well <NUM>. The data generated by the second measurement system <NUM> is sent to the second WITSML server <NUM> to perform depth time synchronization.

The second tool module <NUM> provides second the input data <NUM>, e.g., the bulk density and sonic logs to the database <NUM> or the data and quality control center <NUM>. The second tool module <NUM> can alternatively or additionally measure further second well parameters <NUM> of the second well <NUM> such as, but not limited to caliper, resistivity, neutron porosity, compression slowness, shear slowness, young's modulus, compressive strength, poisson ratio, fracture breakdown pressure and fracture closure pressure. The second tool module <NUM> can be a single tool module capable of measuring one type of second well parameters <NUM> or measuring more than one type of the second well parameters <NUM>. The second tool module <NUM> can alternatively be separate tool modules or a combination thereof, wherein the separate tool modules are able to measure different ones of the second well parameters <NUM>.

A third tool module <NUM> can measure third well parameters <NUM> at the first well <NUM> and provide third input data <NUM> about the third well parameters <NUM> in conformity with the WITSML standard. The third tool module <NUM> comprises a third measurement system <NUM> and a third WITSML server <NUM>. The third measurement system <NUM> can for example be drilling instrumentation tools used during logging while drilling or measurement while drilling of the first well <NUM>. The data generated by the third measurement system <NUM> are the third input data <NUM> and can be but are not limited to overburden pressure logs containing the overburden pressure along the well trajectory due depth of the first well <NUM>. The data generated by the third measurement system <NUM> is sent to the third WITSML server <NUM> to perform depth time synchronization.

The third tool module <NUM> provides third input data <NUM>, e.g., downhole test logs from downhole tests at specific depths in conformity with the WITSML standard to the database <NUM> or the data and quality control center <NUM>. The third tool module <NUM> can alternatively or additionally measure further third well parameters <NUM> of the first well <NUM> such as, but not limited to pore pressure, fracture gradient, elastic properties, strength, and horizontal stresses.

The first tool module <NUM>, the second tool module <NUM> and the third tool module <NUM> are collectively called "tool modules". Similarly, the first input data <NUM>, the second input data <NUM> and the third input data <NUM> are collectively called "input data" and the first measurement system <NUM>, the second measurement system <NUM> and the third measurement system <NUM> are collectively called "measurement systems". It will be appreciated that there may be more than three individual tool modules producing more than three sets of input data. It will be further more appreciated that the input data can be in other data formats such as but not limited to Las files, Dlis files, CSV files, txt files and Xlsx files.

The first tool module <NUM> can include a first data delivery system <NUM>, the second tool module <NUM> can include a second data delivery system <NUM> and the third tool module <NUM> can include a third data delivery system <NUM> for providing the first input data <NUM>, the second input data <NUM> and the third input data <NUM> to the database <NUM> for storing the input data or to the data and quality control center <NUM> for further processing of the input data. The first data delivery system <NUM>, the second data delivery system <NUM> and the third data delivery system <NUM> perform buffering and redundancy checks with regards to the first input data <NUM>, the second input data <NUM> and the third input data <NUM>.

The data and quality control center <NUM> can process the input data received from the first tool module <NUM>, the second tool module <NUM> and the third tool module 104tool modules before the input data is provided by the data and quality control center <NUM> to the database <NUM> for storing the input data. The input data can be transmitted from the first tool module <NUM>, the second tool module <NUM> and the third tool module 104tool modules to the database <NUM> and/or the data and quality control center <NUM> using wireless communication such as, but not limited to, satellite communication or wired communication. The data and quality control center <NUM> can comprise a data parsing module <NUM>, a data standardization module <NUM> and a data retrieval module <NUM>.

The data parsing module <NUM> identifies the data format of the input data provided by the tool modules and parses the input data accordingly to retrieve the data in the format required for further processing. The data parsing module <NUM> includes separate modules for each data format.

The data standardization module <NUM> addresses data quality issues using rule-based, machine learning or statistic-based algorithms. The data standardization module <NUM> performs standardization with respect to channel labels, units, timestamps, error values, outliers, offsets and denoising.

The input data can comprise more than one data channel. A channel label is assigned to the data channels. The data standardization module <NUM> performs standardization of the channel labels. WITSML files may contain multiple redundant channels for the same measurement, wherein each of the channels is provided each with a different, human-readable, mnemonic as the channel label. A dictionary is created which defines the human readable channel labels (for instance "Compression_Slowness"), wherein lists of the mnemonics are associated to the channel labels (for instance [DTC, DTCS, DT]). The lists of the mnemonics define the order of importance according to which the mnemonics are selected. For example, if both DTC and DTCS are present in the dataset, the algorithm always associates DTC to Compression Slowness independently from the order in which the mnemonics appear during parsing. Once the one-to-one correspondence between the channels labels and the mnemonics is established, the selected channels are extracted and renamed accordingly.

The data standardization module <NUM> performs standardization of units. The units may be manually defined during the data generation. It is therefore common to find different ones of the units, or unit labels across different sets of the input data. The units for the compression slowness, for example, may be seconds, milliseconds, or microseconds, while the standard visualization and manipulation unit is microseconds. A dictionary is defined that associates a conversion factor for the units. After the appropriated correction factor is selected, value conversion is applied to the data in the channels to unify the units of the data in the channels.

The data standardization module <NUM> further performs standardization of timestamps. Timestamps are stored as strings which can appear in multiple formats, for example <NUM>/<NUM>/<NUM><NUM>:<NUM>:<NUM> or <NUM>-Oct-<NUM><NUM>:<NUM>:<NUM>. It is possible to remove the values with seconds and Seconds sometimes cut these off from the timestamp, for example <NUM>/<NUM>/<NUM><NUM>:<NUM>. The timestamps are standardized by defining a list of allowed timestamp formats and of discarded formats. The timestamp is assigned to a unique index for the set of input data, if the timestamp belongs to one of the allowed formats.

The data standardization module <NUM> further performs standardization of error values. The measurement systems assign predefined error values in case reading and storage of measurements fails. Typical error values can be one of [-<NUM>, -<NUM>, -<NUM>]. Erratic measurements which are not physically meaningful may also be recorded. The erratic measurements can either be negative or too large to be real values. A dictionary of minimum possible values and maximum possible values for each channel is defined to identify error values. The error values are replaced by a Null flag if they are detected.

The data standardization module <NUM> further performs standardization with respect to outliers. The outliers are identified based on the distribution of values for the channel. Sets of the input data can cover several months, given the long timespan of the drilling operations. The sets of the input data are therefore typically non-stationary. The statistics of the channel values therefore needs to be evaluated on a moving window of tunable length which can be between one day to one month depending on the features of the data. The detection of outliers is based on the Z-score method (as described in <NPL>), which eliminates those values that are further away than <NUM> standard deviations from the average value, if the values are normally distributed, or based on <NUM>th and <NUM>th percentile in case of significant deviation from normal distribution. The length of the moving window is defined by the rate of change of the trend of the set of input data. A window size of, for example, <NUM> hours is effective in removing outliers without affecting genuine measurements. The outliers are replaced by a Null flag if the outliers are detected.

The data standardization module <NUM> further performs standardization with respect to offsets. The offsets in data measurements refer to resets or drift in calibrations of the measurement devices. The offsets are more difficult to detect than the outliers since the expectable range of the values is not known a priori, neither is the expectable range of values constant in time. The piecewise median is computed on a moving window across a set of the input data without offsets to learn the normal median distribution in a first step. The piecewise median is computed on the input data and subsets of the input data are flagged by Null values if their piecewise median is outside the expectable range statistics in a second step.

The data standardization module <NUM> further performs standardization with respect to denoising. All the data from the measurement systems such as sensors comes with ambient white noise. The input data is parsed through denoising filters derived from signal processing such as median filters, low pass filters or band pass filters by learning the cutoff frequencies for each set of input data to retrieve useful information from the dataset.

The data retrieval module <NUM> of the data and quality control center <NUM> identifies and fills gaps in the input data to enable further processing of the data. Time sampling in WITSML data can be irregular although nominal sampling frequency of drilling data is constant and typically <NUM> or <NUM> seconds. It will be appreciated that significant portions of the input data can deviate from the nominal sampling frequency. The data must be resampled as most of machine learning algorithms used for further processing of the input data rely on uniform sampling frequency. The input data obtained from the data standardization module <NUM> cannot be readily resampled as the input data may contain (i) missing values from the data generation process, (ii) the null values introduced by the standardization module <NUM>, and (iii) time gaps due to interruptions between the drilling operations. Those gaps with a length larger than a user defined parameter MAX_TIME_GAP are identified to address these issues. MAX_TIME_GAP is set to <NUM> seconds to prevent interpolation of long sequences of data and to reduce bias. The sets of the input data are split into subsets according to the selected gaps. The subsets are kept if the fraction of null values is lower than a parameter NULL_RATIO which can be defined depending on the quality of the data. NULL_RATIO can have values such as, but not limited to, <NUM>, <NUM> or <NUM>. The subsets are otherwise discarded if the fraction of null values is higher than NULL_RATIO. The subsets are resampled into a constant RESAMPLING_RATE and null values are linearly interpolated. RESAMPLING_RATE can have values such as, but not limited to, <NUM> or <NUM>. The data retrieval module <NUM> thus provides sets of the input data with constant time frequency and without null values. These sets of the input data are suitable to be used for further data processing.

The tool modules and/or the data and quality control center <NUM> can be permanently connected to the database <NUM> to transmit the input data. The tool modules and/or the data and quality control center <NUM> can alternatively or additionally be connected once or sporadically to the database <NUM> for transmitting data that is stored on the tool modules or within the data and quality control center <NUM> to the database <NUM>. The connections between the tool modules and/or the data and quality control center <NUM> and the database <NUM> can be wireless connections and/or connections using cables. The tool modules and/or the data and quality control center <NUM> can be directly or indirectly connected to the database <NUM>.

Fourth input data <NUM> and fifth input data <NUM> comprising geological and/or petrophysical parameters of the first rock structure <NUM> can also be processed in the data and quality control center <NUM> and/or be stored in the database <NUM>. The fourth input data <NUM> can comprise parameters such as, but not limited to, predicted bulk density, sonic compression and sonic shear, neutron porosity and true vertical depth. The fifth input data <NUM> can comprise parameters such as but not limited to offset well pore pressure, predicted overburden stress, sonic compression and sonic shear, neutron porosity and true vertical depth.

The database <NUM> is further connected to a data acquisition unit <NUM>. The data acquisition unit <NUM> can communicate with the database <NUM> and can obtain the first input data <NUM>, the second input data <NUM>, the third input data <NUM>, the fourth input data <NUM> and the fifth input data <NUM> from the database <NUM>.

The input data can miss parts of the data. For example, the first input data <NUM>, the second input data <NUM> and/or the third input data <NUM> can be missing in parts or as a whole. Input data with missing parts is not suitable for use in the subsequent calculations. The data acquisition unit <NUM> can conduct data auditing and quality control to address this issue. The first input data <NUM> is referred to as first intermediate input data <NUM> if parts of the first input data <NUM> are missing or parts of the first input data <NUM> are not usable due to noise The first well parameters <NUM> are referred to as first intermediate well parameters <NUM> in this case. The data acquisition unit <NUM> identifies missing data <NUM> in the first intermediate input data <NUM>. Data which is needed for subsequent data processing steps, and which is not included in the first intermediate input data <NUM> is classified as missing data <NUM>. The data acquisition unit <NUM> chooses the second well <NUM> that is the most similar to the first well <NUM> and merges the parts of the second input data <NUM> from the second well <NUM> which are missing in the first intermediate input data <NUM> with the first intermediate input data <NUM>. The merged data set is a complete set of the first input data <NUM>.

The data acquisition unit <NUM> is further connected to a calculation unit <NUM>. The calculation unit <NUM> can communicate with the data acquisition unit <NUM> and can receive the first input data <NUM> from the data acquisition unit <NUM>.

The calculation unit <NUM> comprises a first porosity-based model <NUM>, which models the relation between the first geomechanical parameter <NUM> and the first well parameters <NUM> for the first rock structure <NUM>. The first porosity-based model <NUM> can, for example, be used to calculate the overburden stress along the well trajectory due depth of the first well <NUM> depending on the bulk density along the well trajectory due depth of the first well <NUM>. The first porosity-based model <NUM> calculates the overburden stress for a certain depth by integrating the bulk density of the first rock structure <NUM> overlying the depth of interest. The first porosity-based model <NUM> depends on characteristics of the first rock structure <NUM> such as but not limited to the type of rock, depending on the first geomechanical parameter <NUM> that is to be modeled by the first porosity-based model <NUM>.

The calculation unit <NUM> calculates first intermediate values <NUM> of the first geomechanical parameter <NUM> of the first well <NUM> using the first porosity-based model <NUM> and the first input data <NUM>.

The calculation unit <NUM> further comprises a second porosity-based model <NUM>, which models the relation between a second geomechanical parameter <NUM>, the first geomechanical parameter <NUM> and the first well parameters <NUM> for the first rock structure <NUM>. The second porosity-based model <NUM> can, for example, be used to calculate the pore pressure along the well trajectory due depth of the first well <NUM> depending on the overburden stress, the bulk density and sonic compression and sonic shear along the well trajectory due depth of the first well <NUM>. The second porosity-based model <NUM> calculates the pore pressure for a certain depth using methods such as, but not limited to Equivalent depth Method, Ratio method, Eaton's Method, Eaton's Method, Effective Stress Method (Bowers Method). The second porosity-based model <NUM> depends on characteristics of the first rock structure <NUM> such as but not limited to the type of rock, depending on the first geomechanical parameter <NUM> that is to be modeled by the second porosity-based model <NUM>.

An optimizer unit <NUM> is connected to the calculation unit <NUM> and to the data acquisition unit <NUM>. The optimizer unit <NUM> can communicate with and exchange data with the calculation unit <NUM> and the data acquisition unit <NUM>. The optimizer unit <NUM> can obtain the first intermediate values <NUM> from the calculation unit <NUM> and the first input data <NUM>, the fourth input data <NUM> and the fifth input data <NUM> from the data acquisition unit <NUM>.

The optimizer unit <NUM> builds a first prediction model <NUM> using the fourth input data <NUM> and first machine learning algorithms <NUM> such as, but not limited to regression algorithms. Commonly known python libraries such as, but not limited to scikit-learn (see https://scikit-learn. org/stable/) are used for implementing the regression algorithms. The regression algorithms are based on ensembled modeling technique, predominantly random forest regression models as well as gradient boosting model for the modeling procedure. This allows the handling of high variance in the input data as well as to model non-linear relationships between the first geomechanical parameter <NUM> and the first well parameters <NUM>. Individual trees of random forest model are CART (Classification and Regression Trees) based using sum of squared losses as a splitting criterion and cost complexity pruning as a stopping criterion. The random forest models are fed with the fourth input data <NUM> along with calculated engineering features such as moving averages, standard deviations, and lag variables of the first input data <NUM>. <NUM>% of the fourth input data <NUM> were used for training of the first prediction model <NUM>, <NUM>% were used for evaluation and <NUM>% were used for testing purposes. Parameters of the first prediction model <NUM> such as but not limited to the number of trees and the minimum points in leaf nodes were iteratively adapted by using extensive grid search algorithms and by looping over the evaluation part of the fourth input data <NUM>. Regularization algorithms were performed and the parameters of the first prediction model <NUM> were finetuned to overcome overfitting of the models on the training part of the fourth input data <NUM> to balance the bias variance tradeoffs. Commonly known python libraries such as, but not limited to scikit-learn (see https://scikit-learn. org/stable/) are used for implementing the extensive grid search algorithms and regularization algorithms.

The optimizer unit <NUM> can determine first final values <NUM> of the first geomechanical parameter <NUM> of the first well <NUM> from the first intermediate values <NUM> and the first input data <NUM> using the first prediction model <NUM>.

A correction unit <NUM> is connected to the optimizer unit <NUM> and to the data acquisition unit <NUM>. The correction unit <NUM> can communicate with and exchange data with the optimizer unit <NUM> and the data acquisition unit <NUM>. The correction unit <NUM> can obtain the first final values <NUM> from the optimizer unit <NUM> and the third input data <NUM> from the data acquisition unit <NUM>.

The data correction unit <NUM> can determine first corrected final values <NUM> of the first geomechanical parameter <NUM> of the first well <NUM> from the first final values <NUM> and the third input data <NUM> using algorithms such as, but not limited to least square method as well as linear and nonlinear convex optimization algorithms. Commonly known python libraries such as, but not limited to scipy (see https://scipy. org/) are used for implementing the least square method as well as linear and nonlinear convex optimization algorithms.

The calculation unit <NUM> can further calculate second intermediate values <NUM> of the second geomechanical parameter <NUM> of the first well <NUM> using the second porosity-based model <NUM>, the first corrected final values <NUM> and the first input data <NUM>.

A second prediction model <NUM> is built by the optimizer unit <NUM> using the fifth input data <NUM> and second machine learning algorithms <NUM> such as, but not limited to regression algorithms. The regression algorithms are based on ensembled modeling technique, predominantly random forest regression models as well as gradient boosting model for the modeling procedure. This allows the handling of high variance in the input data as well as to model non-linear relationships between the second geomechanical parameter <NUM>, the first well parameters <NUM> and the first geomechanical parameter <NUM>. Individual trees of random forest model are CART (Classification and Regression Trees) based using sum of squared losses as a splitting criterion and cost complexity pruning as a stopping criterion. The random forest models are fed with the fifth input data <NUM> along with calculated engineering features such as moving averages, standard deviations, and lag variables of the second input data <NUM>. <NUM>% of the fifth input data <NUM> were used for training of the second prediction model <NUM>, <NUM>% were used for evaluation and <NUM>% were used for testing purposes. Parameters of the second prediction model <NUM> such as but not limited to the number of trees and the minimum points in leaf nodes were iteratively adapted by using extensive grid search algorithms and by looping over the evaluation part of the fifth input data <NUM>. Regularization algorithms were performed and the parameters of the second prediction model <NUM> were finetuned to overcome overfitting of the models on the training part of the fifth input data <NUM> to balance the bias variance tradeoffs.

The optimizer unit <NUM> can determine second final values <NUM> of the second geomechanical parameter <NUM> of the first well <NUM> from the second intermediate values <NUM> and the first input data <NUM> using the second prediction model <NUM>.

<FIG> shows a flow chart describing a first aspect of a method for determining geomechanical parameters of a well. The same reference signs are used for similar features shown in <FIG> as those in <FIG>. The first input data <NUM> is obtained from the database <NUM> via the data acquisition unit <NUM> in step S100. If parts of the first input data <NUM> are missing or are not usable due to noise, this incomplete first input data <NUM> is obtained as the first intermediate input data <NUM> in step S101. Data which is necessary for subsequent calculation S110 of the first intermediate values <NUM> and/or determination S120 of the first final values <NUM> and which is missing or not usable in the first intermediate input data <NUM> is identified in step S102. The missing data <NUM> shall now be replaced with data from a suitable substitute well.

The second well <NUM> is chosen from a plurality of wells, of which data is stored in the database <NUM> in step S103. For choosing the suitable second well <NUM>, similarity measures (cosine similarity) are used. The similarity measures are run to parameters such as, but not limited to the distance between the first well <NUM> and the second well <NUM>, geological and petrophysical parameters of the first rock structure <NUM> and the second rock structure <NUM> and the first well properties <NUM> of the first well <NUM> and second well properties <NUM> of the second well <NUM>. A high dot product indicates more common features, thus a higher similarity. More than one suitable second wells <NUM> can be chosen or proposed to a user of the system instead of choosing only one second well <NUM>.

The missing data <NUM> can alternatively be predicted using machine learning algorithms such as but not limited to generalized linear models, ensembled learning algorithms and deep learning model with recurrent frameworks. Commonly known python libraries such as, but not limited to scikit-learn (see https://scikit-learn. org/stable/) are used for implementing the generalized linear models, ensembled learning algorithms and deep learning model with recurrent frameworks.

The second input data <NUM> is obtained for the chosen second well <NUM> in step S104. The first intermediate input data <NUM> is merged with selected parts of the second input data <NUM> to replace the missing data <NUM>. The merged dataset includes now all the data which is necessary for the subsequent calculation S110 of the first intermediate values <NUM> and/or the determination S120 of the first final values <NUM>. The merged dataset is hereinafter referred to as the first input data <NUM>.

The first intermediate values <NUM> of the first geomechanical parameter <NUM> of the first well <NUM> are calculated in step S110 from the first input data <NUM> using the first porosity-based model <NUM>. According to this aspect of the invention, the first intermediate values <NUM> of overburden stress of the first well <NUM> are calculated from the bulk density data using the first porosity-based model <NUM> which models the relation between the overburden stress and the bulk density.

Missing bulk density data can be calculated from the sonic logs (containing sonic compression and sonic shear), porosity logs (containing neutron porosity) using a physics-based model before using the bulk density data to calculate overburden stress. Regression / Time Series based machine learning algorithms can alternatively be used for calculating missing bulk density data. Regression algorithms can find dependencies between two sets of continuous values. A trained regression model can act as a function to transfer one distribution of continuous values into another distribution of continuous values. If there is a set of data points with measured density and porosity, for example, a model that transfers density into porosity can be trained. The model can be applied to other density samples to estimate their porosity, if the model is trained sufficiently. The first input data <NUM> is initially passed through particle filters to remove ambient noise for the machine learning algorithms for the prediction of bulk density data. Further engineered features are developed to pose the depth index data in the regression framework. Some of the engineered features include moving average, standard deviations, exponential smoothing averages trend level at various window level. Further other input information such as reservoir type (carbonate), well type (oil, gas), formation information, geological and petrophysical parameters are also included. Lithology, sedimentological facies, or resistivity are non-limiting examples for this other input information.

The first final values <NUM> of the first geomechanical parameter <NUM> of the first well <NUM> are determined from the first intermediate values <NUM> and the first input data <NUM> using the first prediction model <NUM> in step S120. The calculated first intermediate values <NUM> of overburden stress of the first well <NUM> are used as a feature in the machine-learning based first prediction model <NUM> to determine the first final values <NUM> of overburden stress for the first well <NUM> according to this aspect of the invention. The first final values <NUM> could already be used for further calculations. Further enhancement of the accuracy of the first final values <NUM> is described in the following, in case more accurate determination of the first geomechanical parameter <NUM> is required.

The third input data <NUM> is obtained and is used in step S140 to determine the first corrected final values <NUM> of the first geomechanical parameter <NUM> of the first well from the first final values <NUM> and the third input data <NUM> in step S130. The first input data <NUM> containing overburden stress data measured at specific depths of the first well <NUM> are used for automated calibration of the determined first final values <NUM> of overburden stress of the first well <NUM> using least square method as well as linear and nonlinear convex optimization algorithms for precise curve fitting. Commonly known python libraries such as, but not limited to scikit-learn (see https://scikit-learn. org/stable/) or scipy (see https://scipy. org/) are used for implementing the least square method as well as linear and nonlinear convex optimization algorithms for precise curve fitting. The determined first corrected final values <NUM> are more accurate than the first final values <NUM>.

The calculated overburden stress of the first well <NUM> can be used to calculate the pore pressure as the second geomechanical parameter <NUM>. The second intermediate values <NUM> of the second geomechanical parameter <NUM> of the first well <NUM> are calculated using the second porosity-based model <NUM>, the first input data <NUM> and the first corrected final values <NUM> in step S150. If no correction of the first final values <NUM> was conducted in steps S130 and S140, the first final values <NUM> instead of the first corrected final values <NUM> can be used to calculate the second intermediate values <NUM> of the second geomechanical parameter <NUM> of the first well <NUM>. The pore pressure along the well trajectory due depth of the first well <NUM> is calculated from the calculated and corrected overburden stress, the bulk density and the sonic compression and sonic shear along the well trajectory due depth of the first well <NUM> using the second porosity-based model <NUM>. The bulk density, the sonic compression and the sonic shear are part of the first input data <NUM>.

The second final values <NUM> of the second geomechanical parameter <NUM> of the first well <NUM> are determined from the second intermediate values <NUM> and the first input data <NUM> using the second prediction model <NUM> in step S160. The calculated second intermediate values <NUM> of pore pressure along the well trajectory due depth of the first well <NUM> are used as a feature in the machine-learning based second prediction model <NUM> to determine the second final values <NUM> of pore pressure for the first well <NUM> according to this aspect of the invention.

The fracture gradient of the first well <NUM> is another geomechanical parameter of interest. The fracture gradient of the first well <NUM> can be calculated using the first corrected final values <NUM> of overburden stress and the second final values <NUM> of pore pressure that have been determined in steps S140 and S160 as input data. Existing physics-based models for the fracture gradient are first estimated for data-driven estimation of fracture gradient. The physics-based model calculates the fracture gradient for a certain depth using methods such as, but not limited to Eaton's Method, Diane's Method, Zamora Method, Matthews, and Kelly method. These values are further used as engineered features alongside other input features to estimate the fracture gradient in a machine learning regression framework. Additional geological (lithology, facies, depositional environment) or petrophysical (permeability, resistivity, saturation) features are non-limiting examples for these other input features. The combination of physics-based models and machine learning algorithms leads to more precise values for fracture gradient. Downhole test data like leakoff test, extended leakoff tests or other logging tests conducted at specific depth are used for automated calibration of the calculated/predicted values of fracture gradient. Linear and nonlinear least square optimization algorithms are invoked for precise curve fitting for this calibration.

The dynamic and static elastic properties of the first rock structure <NUM> at the first well <NUM> can further be determined. Dynamic Youngs modulus, shear modulus, bulk modulus and Poisson's ratio are calculated from the well logs using physics-based models. Parameters such as, but not limiting to, bulk density logs, compressional wave transit time (DTC) or shear wave transit time (DTS) can be used from the well logs. The physics-based models for calculating dynamic Youngs modulus, shear modulus, bulk modulus and Poisson's ratio can be based on the following formulas: <MAT> <MAT> <MAT> <MAT>.

The raw data logs are passed through particle filters such as, but not limited to, standard deviation filtering or mean rolling window smoothing to remove ambient noise condition. The values for Dynamic Youngs modulus, shear modulus, bulk modulus and Poisson ratio that have been determined using the physics-based models are used as features in a machine learning regression framework. Other statistical features are further developed to pose the depth index data in the regression framework. Some of the statistical features include moving average standard deviations, exponential smoothing averages trend level at various window level. Further other input information such as reservoir type (carbonate), well type (oil, gas), formation information's, geological and petrophysical features are also included. Existing physics-based models for static elastic properties such as static Young's modulus and Poisson's ration are further estimated. These values are used as engineered features alongside other features such as, but not limited to, moving average standard deviations, exponential smoothing averages trend level at various window level to estimate elastic properties stress in machine learning regression algorithms. The algorithms such as, but not limited to, generalized linear models, ensembled learning algorithms and deep learning model with recurrent frameworks are used. In this way more precise values for static elastic properties can be determined by accommodating not only the physics-based model, but also incorporating finer features from the geological and petrophysical domain. If there are core test data for dynamic and static elastic parameters available from the core samples testing in lab facilities at respective depths or any other pre-recorded results of the same for the first rock structure <NUM>, such values are used for automated calibration of the calculated/ predicted values of the static elastic properties using linear and nonlinear least square optimization algorithms for precise curve fitting.

The determined values for the static elastic properties of the first well <NUM> in the first rock structure <NUM> can be further used to determine rock strength parameters, such as the angle of internal friction, unconfined compressive strength, and tensile strength. The raw data such as, but not limited to, Young Modulus static, poisson modulus static, compressional slowness, bulk density, neutron porosity or core calibration points is initially passed through particle filters to remove ambient noise condition for inputting to machine learning algorithms for estimation of rock strength, namely unconfined compressive strength (UCS), tensile strength and angle of internal friction. The rock strength parameters are at first estimated using existing physics-based models. Models such as, but not limited to, as described in <NPL> can be used for estimating the unconfined compressive strength in sandstone rock formations. Models such as, but not limited to, as described in <NPL> or <NPL> can be used for estimating the unconfined compressive strength in shale rock formations. Models such as, but not limited to, as described in <NPL> can be used for estimating the angle of internal friction. The estimated values are further used as engineered features alongside other input features to estimate the rock strength parameters using machine learning regression algorithms. Some of the machine learning algorithms used are generalized linear models, ensembled learning algorithms and deep learning model with recurrent frameworks. Accommodating not only the physics-based model, but also incorporating finer engineered features from the geological and petrophysical domain allows the determination of more precise values for the rock strength parameters. Further engineered features are developed to pose the depth index data in the regression framework. Some of the engineered features include moving average, standard deviations, exponential smoothing averages trend level at various window level. Further other input information such as reservoir type (carbonate), well type (oil, gas), formation information's, geological and petrophysical features are also included. Additional geological (lithology, facies, depositional environment) or petrophysical (permeability, resistivity, saturation) features are non-limiting examples of the geological and petrophysical features used as other input information. Values for unconfined compressive strength, tensile strength and angle of internal friction from core samples at respective depths or any other pre-recorded results of the same for the first rock structure <NUM> are used for automated calibration of the determined values of unconfined compressive strength, tensile strength and angle of internal friction using linear and nonlinear least square optimization algorithms for precise curve fitting.

The determined values for pore pressure, overburden stress, static elastic parameters and rock strength parameters can further be used to determine the minimum horizontal stresses that occur in the first well <NUM>. The raw data, such as, but not limited to overburden stress, pore pressure, poisson's ratio, tensile strength, unconfined compressive strength, dry bulk modulus, fracture closure pressure, fracture breakdown pressure, angle of internal friction, delta temperature, poisson ratio fast, poisson ratio slow or breakout width is initially passed through particle filters to remove ambient noise condition for inputting to machine learning algorithms for determination of minimum horizontal stresses. The minimum horizontal stresses are at first determined using physics-based models for minimum horizontal stresses such as, but not limited to, Mohr-Coulomb Stress model and Poro-Elastic Model. The estimated values are further used as engineered features alongside other input features to estimate minimum horizontal stresses using machine learning regression algorithms such as but not limited to generalized linear models, ensembled learning algorithms and deep learning model with recurrent frameworks. Accommodating not only the physics-based model, but also incorporating finer engineered features from the geological and petrophysical domain enables the determination of more precise values for minimum horizontal stresses. Further engineered features are developed to pose the depth index data in the regression framework. Some of the engineered features include moving average, standard deviations, exponential smoothing averages, trend level at various window level etc. Further input information such as reservoir type (carbonate), well type (oil, gas), formation information, geological and petrophysical features are also included. If there are downhole test data available, like fracture breakdown pressure, fracture closure pressures from extended leakoff tests or other logging tests conducted at specific depth of the first well <NUM>, such values are used for automated calibration of the determined values of minimum horizontal stresses using linear and nonlinear least square optimization algorithms for precise curve fitting.

The determined values for minimum horizontal stresses alongside the determined values for the pore pressure, the overburden stress, the static elastic parameters, and the rock strength parameters can further be used to determine the maximum horizontal stresses that occur in the first well <NUM>. Principal stress orientations are further necessary for the determination of maximum horizontal stresses. Principal stress orientations are calculated from breakout features derived from borehole images such as dynamic and static borehole images that have been taken by methods such as, but not limited to, micro-resistivity and acoustic imaging. Breakout features are automatically picked from the borehole images using image-based deep learning semantic segmentation for characterizing their width, dip, and azimuth and thus the stress orientation. The result of such an analysis will be made available automatically for estimation of maximum horizontal stress. The raw data is initially passed through particle filters to remove ambient noise condition for inputting to machine learning algorithms for determination of maximum horizontal stresses. The maximum horizontal stresses are at first determined using physics-based models for maximum horizontal stresses such as but not limited to Mohr-Coulomb Stress model and Poro-Elastic Model.

Claim 1:
A computer-implemented method for determining first final values (<NUM>) of a first geomechanical parameter (<NUM>) of a first well (<NUM>) in a first rock structure (<NUM>), the method comprising the steps of:
obtaining (S100) first input data (<NUM>) from a database (<NUM>), the first input data (<NUM>) generated, at the first well (<NUM>), by at least one first tool module (<NUM>), the first input data (<NUM>) comprising first well parameters (<NUM>) of the first well (<NUM>);
calculating (S110) first intermediate values (<NUM>) of the first geomechanical parameter (<NUM>) of the first well (<NUM>) using a first porosity-based model (<NUM>) and the first input data (<NUM>); and
determining (S120) the first final values (<NUM>) of the first geomechanical parameter (<NUM>) of the first well (<NUM>) from the first intermediate values (<NUM>) and the first input data (<NUM>) using a first prediction model (<NUM>);
characterized in that obtaining (S100) the first input data (<NUM>) comprises the steps of:
obtaining (S101) first intermediate input data (<NUM>) from the database (<NUM>), the first intermediate input data (<NUM>) generated, at the first well (<NUM>), by at least one first tool module (<NUM>), the first intermediate input data (<NUM>) comprising first intermediate well parameters (<NUM>) of the first well (<NUM>);
identifying (S102) missing data (<NUM>) which is missing in the first intermediate input data (<NUM>), and which is necessary for calculating (S110) the first intermediate values (<NUM>) and/or determining (S120) the first final values (<NUM>);
choosing (S103) at least one second well (<NUM>) from a plurality of wells stored in the database (<NUM>);
obtaining (S104) second input data (<NUM>) from the database (<NUM>), the second input data (<NUM>) generated, at the at least one second well (<NUM>), by at least one second tool module (<NUM>), the second input data (<NUM>) comprising second well parameters (<NUM>) of the at least one second well (<NUM>); and
merging (S105) the first intermediate input data (<NUM>) with parts of the second input data (<NUM>) that correspond to the missing data (<NUM>) to gain the first input data (<NUM>) with the first well parameters (<NUM>).