An electric situation awareness algorithm and electronic equipment for oil and gas exploration and development

By using electrical situation awareness algorithms in oil and gas exploration and development, real-time detection of the working status of drilling and pressing equipment is solved, and the problem of untimely monitoring of equipment failures in the existing technology is improved, and production efficiency and safety are improved.

CN118710088BActive Publication Date: 2024-11-26SICHUAN JOINT CHINA-UK INST OF INNOVATIVE QUALITY ENG & SMART TECH +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411187345.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-08-28
Publication Date
2024-11-26
Estimated Expiration
2044-08-28

AI Technical Summary

Technical Problem

The existing technology is difficult to detect the working status of drilling and pressing equipment in real time in harsh environments and special scenarios, resulting in untimely monitoring of equipment failures during oil and gas exploration and production, affecting production continuity and safety.

Method used

The power situation awareness algorithm for oil and gas exploration and development is adopted to clean and pre-process the historical data of drilling loads and convert them into signal energy sequences. The hidden Markov model is used to establish an energy sequence model, combining timing characteristic parameters and curve type analysis , real-time detection of the working status of the equipment.

Benefits of technology

It realizes high accuracy and real-time detection of the working status of drilling and pressing equipment, reduces the occurrence of equipment failures, improves production efficiency and equipment availability, and ensures production continuity and safety.

✦ Generated by Eureka AI based on patent content.
Patent Text Reader

Abstract

The present invention relates to an electric situation awareness algorithm and electronic equipment for oil and gas exploration and development, the algorithm comprising: cleaning and preprocessing the historical data of drilling load, converting the input load sequence into a signal energy sequence; inputting the signal energy sequence into a hidden Markov model for training and establishing an energy sequence model, classifying the hidden states in the energy sequence model to correspond to different load levels; calculating and determining the threshold of the time series characteristic parameters related to curve type detection; inputting the drilling load sequence to be detected and detecting the working state of the equipment. In view of the defect in the prior art that the working state of the working equipment cannot be determined in real time, the present invention uses the hidden Markov model to model the load sequence, and detects the working state of the drilling pressure equipment with high detection accuracy, high computing performance and high real-time performance.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of equipment status monitoring, and in particular to an electricity situation awareness algorithm and electronic equipment for oil and gas exploration and development. Background Art

[0002] During oil and gas exploration and development, equipment failure may have serious impacts on economy, production and safety. For example, production stoppage caused by failure will reduce output, and due to the particularity of oil and gas production, the increase in downtime may have a serious negative impact on the entire production process. In addition, equipment failure may also bring safety risks such as leakage, fire or other dangerous situations, which pose a potential threat to the health of workers and the production environment.

[0003] In order to prevent and reduce equipment failures, and to respond quickly when failures occur, it is crucial to monitor the real-time operating status of the equipment. This can not only ensure the reliability, efficiency and safety of production operations, but also identify and solve potential problems in advance through predictive maintenance strategies, thereby reducing sudden failures and downtime, and improving equipment availability, production efficiency and production continuity.

[0004] In actual operation, manually checking the status of equipment and recording it is the simplest way to monitor the operating status of equipment. However, this method has problems such as omissions and neglect, recording errors, reliance on experience, and difficulty in dealing with large amounts of data. It is also insufficient in terms of real-time and data analysis, and it is difficult to meet the requirements of modern production. Therefore, some production teams have introduced automated and digital equipment monitoring systems that can collect and analyze equipment status data in real time, reduce subjectivity, improve accuracy, and support more timely decision-making. However, in harsh environments and special scenarios, it may be difficult to deploy sensors and other equipment required for these automated equipment monitoring systems.

[0005] For example, the patent document with publication number CN116523677A discloses a non-intrusive load decomposition method based on improved particle swarm optimization FHMM, the steps of which include: determining the number of power load states of each load to be monitored; establishing a single load hidden Markov model based on the power load state of each load; forming a total load hidden Markov model based on each single load hidden Markov model, and training and optimizing the parameters of the total load hidden Markov model through a linearly decreasing weighted particle swarm algorithm and a Baum-Welch algorithm to obtain the optimal total load hidden Markov model; based on the optimal total load hidden Markov model and the observation sequence of the power load, solving the optimal state sequence of each load and the active power of the corresponding load. This patent mainly optimizes the Baum-Welch training algorithm of the hidden Markov model, improves the computational complexity and decomposition accuracy when using the hidden Markov model for load decomposition, and mainly involves training algorithm optimization and load decomposition scenarios, but does not involve application scenarios other than load decomposition, and does not analyze the relationship between the load decomposition results and the working status of the equipment.

[0006] For another example, the patent document with publication number CN117856248A discloses a method for power load forecasting based on frequency decomposition and clustering correction, including the following steps: deconstructing the preprocessed power load data sequence into two parts by a load deconstruction method based on frequency reduction and frequency increase; forecasting the cumulative load sequence during the day with multiple cycles by combining FFT and SARIMA models; firstly, performing pattern clustering and state transition prediction by using a GMM-HMM model based on DTW for the standard load curve within the day; and then correcting the pattern matching results by using a GRU model based on similar days. After predicting the low-frequency and high-frequency parts separately, the two parts are fused and frequency-upgraded to restore the load standard curve and obtain the total power load forecast value. This invention mainly realizes the accurate prediction of power load, but cannot accurately determine the working status of the equipment on the load line.

[0007] Therefore, how to detect the working status of the drilling pressure equipment in real time under some harsh environments and special scenarios, and realize continuous monitoring and real-time feedback of the working status of the drilling pressure equipment during oil and gas exploration and production, is a technical problem that has not yet been solved.

[0008] In addition, on the one hand, there are differences in understanding among those skilled in the art; on the other hand, the applicant studied a large number of documents and patents when making the present invention, but due to space limitations, not all details and contents are listed in detail. However, this does not mean that the present invention does not have the characteristics of these prior arts. On the contrary, the present invention already has all the characteristics of the prior art, and the applicant reserves the right to add relevant prior art to the background technology. Summary of the invention

[0009] At present, driven by the construction of smart grids and the popularization of smart meters, the field of power load analysis has developed rapidly. Power load analysis is a quantitative and qualitative study and evaluation of the characteristics and changes of electric energy load in the power system. The power load consumption of the equipment will change dynamically with the operating status of the equipment. The load curve of the equipment reflects the operating status of the equipment to a certain extent. The real-time operating status of the equipment can be judged by analyzing the power load of the equipment to realize the monitoring of the equipment status.

[0010] The prior art has already presented a technical solution for decomposing power load data to achieve power load forecasting through model analysis. For example, a patent document with publication number CN117856248A discloses a method for forecasting electric load based on frequency decomposition and clustering correction. The method obtains the original electric load history data to be forecasted, pre-processes the original electric load history data, obtains the pre-processed electric load data sequence, and uses the load deconstruction method based on frequency reduction-frequency increase to deconstruct the pre-processed electric load data sequence into a daily cumulative load sequence and a daily intraday standard load curve; based on the dynamic time normalization distance, the daily intraday standard load curve is mean clustered, and the model parameters of the mixed Gaussian-hidden Markov model are initialized using the mean clustering results, and the initialized mixed Gaussian-hidden Markov model parameters are continuously updated by the expectation maximization method until the mixed Gaussian-hidden Markov model converges to obtain a fitted mixed Gaussian-hidden Markov model; each intraday standard load curve is input into the fitted mixed Gaussian-hidden Markov model for pattern clustering and state transition prediction to obtain a hidden state transition probability prediction value and an initial intraday standard load curve prediction value. However, on the one hand, the technical solution only focuses on the power load state of the entire power grid, and predicts the power load changes of the entire power grid by analyzing these data. Although this method can provide a certain reference for the macro-management of the power grid, it ignores the real-time detection and analysis of the working state of specific power equipment, and thus cannot accurately reflect the actual operation of individual equipment, thereby affecting the refined management of the power grid and the timeliness of equipment maintenance, especially in the field of oil and gas exploration and development, which has extremely high requirements for the working state of equipment. On the other hand, when processing power load data, the technical solution directly uses the power load data sequence as the object of multiple periodic analysis and model analysis. When facing the situation where the power load of drilling equipment and other equipment fluctuates greatly, due to the large fluctuation of the power load curve of these equipment, directly using the original load data for analysis will cause the input data of the model to be unable to accurately reflect the real load level of the equipment. If these distorted data are input into the analysis model, the output result of the model will inevitably have serious deviations, which will affect the accuracy and reliability of the prediction. On the contrary, the present invention can more stably reflect the load level of the equipment by referring to the load data of the equipment in the previous window time. At the same time, the present invention also introduces the energy characteristics of the timing signal. By analyzing these energy characteristics, the adverse effects of equipment with large power load fluctuations such as drilling equipment can be avoided, so as to more accurately capture the periodicity and trend changes in the power load of related equipment.

[0011] The present invention aims to provide an algorithm and device for sensing electricity situation in oil and gas exploration and development, which are used to determine the working status of equipment on the corresponding load line, thereby achieving real-time detection of the operating status of drilling pressure equipment in oil exploration.

[0012] In view of the shortcomings of the prior art, the present invention provides, from a first aspect, an algorithm for electricity situation awareness in oil and gas exploration and development, the algorithm comprising: cleaning and preprocessing historical data of drilling load, converting the input load sequence into a signal energy sequence; inputting the signal energy sequence into a hidden Markov model for training and establishing an energy sequence model, wherein the hidden states in the energy sequence model are classified to correspond to different load levels; calculating and determining the thresholds of the timing characteristic parameters related to curve type detection; inputting the drilling load sequence to be detected and detecting the working status of the equipment.

[0013] Unlike the prior art, the present invention can convert the input load sequence into a signal energy sequence and use it as the input of the hidden Markov model to establish a corresponding energy sequence model, and determine the working state of the equipment by jointly analyzing the energy sequence model and the curve type. Based on the above-mentioned distinguishing technical features, the problems to be solved by the present invention may include: how to achieve real-time monitoring and rapid feedback of the working state of the drilling equipment while ensuring high detection accuracy. Specifically, the present invention converts the pre-processed load sequence into a signal energy sequence, which helps to extract key information from the load data and provide more meaningful features for subsequent model training. In the process of oil exploration and development, such as fracturing operations, the increase or decrease of its workload directly affects the changing trend of the power load. When the load of the fracturing operation increases, the power load increases accordingly; when the load decreases, the load decreases accordingly. In addition, during the equipment standby period, due to its long duration and relatively low load, the power load data will fluctuate greatly. In this case, the power load data of a single point may not truly reflect the actual load level of the equipment. The present invention constructs an energy sequence model by analyzing the energy characteristics of the time series signal and using it as training data, thereby significantly reducing the error of the model output result. Furthermore, since there is a corresponding relationship between the transfer state of the load and the working state of the equipment, the present invention can accurately infer the working state of the equipment by monitoring the direction of change of the hidden state of the load. Specifically, the changing trend of the load state can reflect whether the equipment is increasing or decreasing its workload, or is in standby mode. In this way, the present invention not only improves the analysis accuracy of the power load data, but also realizes real-time and accurate monitoring of the working state of the equipment. In view of the defect in the prior art that the working state of the working equipment cannot be determined in real time, the electricity situation awareness algorithm for oil and gas exploration and development of the present invention uses a hidden Markov model to model the load sequence, learn the hidden state of the load sequence and obtain the internal change law of the load; analyze the fluctuation type of the load curve, and jointly analyze the hidden state and the curve type. The algorithm can detect the working status of the drilling pressure equipment with high detection accuracy, high computing performance and high real-time performance, and realize continuous monitoring and real-time feedback of the working status of the drilling pressure equipment during oil and gas exploration and production, thereby providing timely and accurate production status feedback to on-site operators and central control personnel, and providing strong data support for production decisions; in addition, the algorithm can assist production personnel in monitoring and judging equipment failures, timely discover potential problems of equipment and take measures to avoid failures, reduce production delays and waste of resources, and ensure the smooth progress of production.

[0014] According to a preferred embodiment, the method of inputting a drilling load sequence to be detected and detecting the working status of the equipment includes: decoding the input load sequence to obtain a hidden state sequence that can derive the input load sequence with maximum probability; classifying the hidden states in the hidden state sequence to obtain the load level corresponding to each point in the load sequence; calculating the time series characteristic parameters of the load sequence, comparing them with the threshold of the time series characteristic parameters, and determining the curve type of the load sequence; and judging the working status of the equipment based on a combination of the load level and the curve type of the load sequence.

[0015] Unlike the prior art, the present invention can classify the hidden states in the hidden state sequence to obtain the load level corresponding to each point in the load sequence, and at the same time, the curve type combination obtained by analyzing the time series characteristic parameters can be combined to judge the working state of the equipment. Based on the above-mentioned distinguishing technical features, the problems to be solved by the present invention may include: how to achieve accurate identification of the working state of the equipment. Specifically, the present invention uses a hidden Markov model to derive the most likely hidden state, which can reflect the inherent law of the load sequence. The present invention calculates the time series characteristic parameters of the load sequence and compares them with the preset threshold value, which helps to identify the fluctuation mode of the load curve and distinguish different working states. In the present invention, the identification of the working state of the drilling load sequence is carried out from three aspects. First, the hidden Markov model is trained and used to determine the load size. Second, the time series characteristics of the load sequence are calculated, and the type of the load curve is determined by using the preset threshold method for multiple time series characteristics. Third, the working state of the equipment is comprehensively judged according to the combination of load size and curve type. The real-time working state of the working equipment determined in this way has high accuracy.

[0016] According to a preferred embodiment, the method for cleaning and preprocessing the historical data of drilling load includes: deleting abnormal values; removing zero values ​​in the historical data; and adjusting the data type so that the processed data meets the requirements of the energy series model for input data.

[0017] By cleaning and preprocessing historical data and deleting unreliable data, the accuracy of subsequent judgments on working status can be improved.

[0018] According to a preferred embodiment, the method for converting the input load sequence into a signal energy sequence includes: calculating the energy value and average energy of historical data; judging the load level based on the average energy in the time window. Different from the prior art, the present invention judges the load level by calculating the energy value and average energy of historical data and based on the average energy in the time window. Based on the above-mentioned distinguishing technical features, the problems to be solved by the present invention may include: how to improve the recognition accuracy and stability of the load level when the load fluctuates greatly. Specifically, the present invention can convert the volatility of load data into energy characteristics, providing a more robust basis for subsequent analysis. The method of judging the load level based on the average energy in the time window not only considers the current load state, but also considers the changing trend of the historical load, thereby improving the accuracy of the load level judgment. In view of the large fluctuation of the drilling curve, the load value of the sample point itself cannot accurately represent its load level, and it is necessary to refer to the load of the previous window time as the calculation basis of the load level. Therefore, the present invention introduces the energy characteristics of the time series signal. This method integrates the energy characteristics of the historical load data, rather than relying solely on the instantaneous load value, so that the output result of the energy sequence model formed with the signal energy sequence as the training data has a smaller error. According to a preferred embodiment, the time window corresponds to ten sample points, and the sample point is the unit data corresponding to each timestamp in the time series data. Different from the prior art, the present invention can optimize the setting method of the time window by corresponding the time window to the sample points. Based on the above-mentioned distinguishing technical features, the problems to be solved by the present invention may include: how to improve the accuracy of the average energy calculation results. Specifically, the present invention balances the recognition accuracy of the load level and the real-time performance of the model by precisely controlling the size of the time window. A time window that is too small will cause the average energy to degenerate into a single sample point load value, and a time window that is too large will cause the calculated energy value to have a time lag, affecting the real-time performance of the model. The window setting of the present invention is appropriate, and the calculated average energy is more accurate.

[0019] According to a preferred embodiment, the method of inputting a signal energy sequence into a hidden Markov model for training includes: expressing the signal energy sequence as an observation probability with a probability mass function of a Poisson distribution; setting initial parameters; calculating the maximum likelihood estimation function of the observation probability; maximizing the maximum likelihood estimation function to obtain the model parameters for the next iteration, and iterating until the model parameters converge or a preset number of iterations is reached. Different from the prior art, the present invention optimizes the model parameters by expressing the signal energy sequence as an observation probability with a probability mass function of a Poisson distribution and combining the maximum likelihood estimation. Based on the above-mentioned distinguishing technical features, the problems to be solved by the present invention may include: how to achieve accurate estimation and rapid convergence of the parameters of the hidden Markov model in the uncertainty and variability of the signal energy sequence. Specifically, during the training process, the hidden Markov model will adjust the value of the mean of the Poisson distribution according to the observed data by methods such as maximum likelihood estimation, so that the hidden Markov model can better fit the observed data. The present invention accelerates the convergence speed of model parameters through iterative optimization, so that the model can adapt to new data more quickly, and improves the real-time and adaptability of the model, which is particularly important for equipment status monitoring during oil and gas exploration and development. It can provide more accurate and timely feedback on equipment working status, thereby improving production efficiency and equipment operation reliability.

[0020] According to a preferred embodiment, the method of classifying hidden states in the energy sequence model to correspond to different load levels includes: merging similar hidden states; calculating the distribution probability and transfer direction of each hidden state; and classifying the hidden states into different fracturing states according to the distribution probability and transfer direction of the hidden state. Unlike the prior art, the present invention can accurately identify different load levels by deeply analyzing the distribution probability and transfer direction of the hidden state. Based on the above-mentioned distinguishing technical features, the problems to be solved by the present invention may include: how to accurately judge the working state of the equipment under the condition of variable load levels. Specifically, the present invention merges similar hidden states to reduce the complexity of the model and improve the accuracy of classification. By calculating the distribution probability and transfer direction of each hidden state, it is helpful to understand the relationship between the hidden states and their evolution in the time series, so that it is convenient to accurately judge the working state of the equipment, including normal working, standby or abnormal state, by judging the transfer direction of the load hidden state.

[0021] According to a preferred embodiment, the threshold of the time series characteristic parameter includes a coefficient of variation, a standard deviation and a zero-crossing rate; the coefficient of variation is the ratio of the standard deviation to the mean, which is used to compare the variability of time series of different scales or amplitudes. Different from the prior art, the present invention determines the threshold by comprehensively considering multiple time series characteristic parameters, including considering the volatility, stability and periodicity characteristics of the time series. Based on the above-mentioned distinguishing technical features, the problems to be solved by the present invention may include: how to accurately evaluate and compare the variability in time series of different scales or amplitudes, and judge the working state of the device accordingly. Specifically, the coefficient of variation of the present invention is used as the ratio of the standard deviation to the mean to evaluate the variability of the time series relative to its mean. The larger the value of the coefficient of variation, the greater the variability of the time series relative to the mean. In the present invention, the size of the coefficient of variation is used to test the fluctuation of the time series. By comprehensively considering the coefficient of variation, the standard deviation and the zero-crossing rate, the present invention can determine the threshold of each characteristic parameter, thereby helping to distinguish different working states, such as normal working, standby or abnormal state. Using these thresholds, the present invention can more accurately judge the working state of the device. For example, a high coefficient of variation may indicate that the device is in an unstable working state or has a potential risk of failure.

[0022] According to a preferred embodiment, when calculating the zero-crossing rate, the input load sequence is smoothed using a Gaussian filter to remove noise fluctuations in the load sequence; the input load sequence is divided into multiple small sequences, and different weights are assigned to each small sequence according to the time distance, and when the number of symbol changes is calculated within each small sequence, the number is accumulated according to the weight. Different from the prior art, the present invention calculates the zero-crossing rate by combining Gaussian filtering and weighted accumulation. Based on the above-mentioned distinguishing technical features, the problems to be solved by the present invention may include: how to effectively distinguish high-frequency vibrations and noise in load sequence analysis, and how to more accurately evaluate the local volatility of the sequence. Specifically, through the weighted accumulation of zero-crossing rate calculation, the present invention can more accurately detect high-frequency vibrations in the sequence, thereby providing strong data support for real-time monitoring of equipment status and fault diagnosis.

[0023] The present invention also provides an electronic device from a second aspect, in which a processor executes an electricity situation awareness algorithm for oil and gas exploration and development, and the processor is configured to: decode an input load sequence to obtain a hidden state sequence that can derive the input load sequence with maximum probability; classify the hidden states in the hidden state sequence to obtain the load level corresponding to each point in the load sequence; calculate the timing characteristic parameters of the load sequence, compare them with the threshold of the timing characteristic parameters, and determine the curve type of the load sequence; and judge the working state of the equipment based on a combination of the load level and the curve type of the load sequence.

[0024] The electronic device of the present invention has the following advantages: First, it selects a hidden Markov model and timing characteristics that can accurately and efficiently detect the operating rules of the drilling pressure load sequence, and dynamically determines the model parameters and timing characteristic thresholds of different lines. Compared with the traditional statistical analysis method based on single threshold comparison, it has higher accuracy and is more applicable to the detection of multiple lines. Second, it has strong real-time performance and short detection time. Only a small sample window is required for detection to achieve high accuracy, and the fast Viterbi algorithm is used to accelerate the decoding process of the hidden Markov model. The curve detection calculates the eigenvalue of the small window and compares it with the threshold. The detection process has low computational complexity and fast speed. After testing, it can achieve concurrent detection of three hundred line devices within 1 second. Third, only load timing data is required to establish a detection model, which has low data requirements compared to other multi-eigenvalue detection algorithms, and the timing data is low-frequency data once a minute, so the acquisition cost is low. DETAILED DESCRIPTION

[0025] Currently, there are many methods and devices for predicting the power load of working equipment based on data. Generally speaking, the prediction method can meet the production requirements. However, in some harsh environments and special scenarios, it is difficult to deploy sensors and other equipment that the automated equipment monitoring system relies on, so there is a lack of methods and equipment for accurately judging the real-time working status of working equipment.

[0026] For example, during oil and gas exploration and development, equipment failures lead to shutdowns of production equipment, which will result in a decrease in production. Due to the particularity of oil and gas production, the increase in downtime may have a serious adverse impact on the entire production process. In addition, equipment failures may also lead to safety risks, such as leaks, fires or other dangerous situations, posing a potential threat to the health of workers and the production environment. In order to prevent and reduce the occurrence of equipment failures and to respond quickly when equipment failures occur, workers should determine the working status of working equipment in real time.

[0027] The present invention hopes to provide an electric situation awareness algorithm and electronic equipment for oil and gas exploration and development, so that the working status of the equipment in special scenarios can be accurately judged in real time. The present invention can also provide a real-time monitoring device and system for the working status of working equipment based on electric load. The present invention can also provide a working equipment fault warning system and device based on electric load. The present invention can also provide a working status diagnosis model of working equipment based on electric load and a construction method thereof. The present invention can also provide a terminal that can execute and display the electric situation awareness algorithm of the present invention and diagnose the working status of working equipment.

[0028] The principle of the present invention is:

[0029] Since the load sequence of the fracturing state has the properties and characteristics of the state sequence, including the discreteness of power values, the limited number of values, and the value transfer is mainly concentrated in the neighborhood, showing statistical regularity, it is appropriate to use the sequence modeling method based on state transfer to model and analyze the fracturing load sequence.

[0030] Hidden Markov Model (HMM) is a probabilistic graphical model used to describe the evolution of hidden states behind an observation sequence. Its characteristic is that the system state is represented as an invisible sequence of states, and the probability of each state generating an observation is determined by the state-specific observation probability distribution. The model is based on the Markov assumption that the probability distribution of the current state depends only on the previous state, which simplifies the modeling process. HMM is defined by the initial state probability, state transition probability, and observation probability, and these parameters are learned through training data. The principle of HMM is based on three basic problems: evaluation problem, decoding problem, and learning problem. The evaluation problem involves calculating the probability of an observation sequence for a given model; the decoding problem focuses on finding the most likely hidden state sequence; and the learning problem is to optimize the model parameters through the observation sequence.

[0031] In the present invention, first, a hidden Markov model is used to model the fracturing load sequence. HMM learns the implicit state of the load sequence and the transition probability of the state based on the input training load sequence data, thereby obtaining the internal change law of the load. The load sequence to be analyzed is converted into a hidden state sequence of the load through the Viterbi decoding algorithm, and the load change is simulated by the hidden state transition, and the analysis of the load sequence is converted into the analysis of the hidden state sequence. Then, according to the properties of the hidden state itself, each hidden state is classified and corresponds to the working state of the equipment. The whole process can be described as a conversion from load to corresponding hidden state and then to the working state of the equipment.

[0032] Second, for the drilling load sequence, due to its strong volatility, the numerical transfer is more random, and the load value is not strongly related to the working state, it is difficult to use the hidden state to directly judge the working state. However, the hidden state contains the load value distribution information and can reflect the load level. In addition, the drilling load curve generally contains three basic modes, which can be seen as a combination of various sub-modes based on the changes in frequency and amplitude. The alternation, superposition or connection between sub-modes determines the evolution of the overall curve. Different sub-modes reflect the differences in the working conditions of drilling equipment to a certain extent.

[0033] Therefore, the present invention identifies the working status of the drilling load sequence from three aspects: first, training and using the hidden Markov model to determine the load size; second, calculating the timing characteristics of the load sequence, and using a preset threshold method to determine the type of load curve for multiple timing characteristics; third, comprehensively determining the working status of the equipment based on a combination of load size and curve type.

[0034] The electricity situation awareness algorithm for oil and gas exploration and development of the present invention includes:

[0035] S1: Clean and preprocess the historical data of drilling loads, and convert the input load sequence into a signal energy sequence. This step cleans and preprocesses the existing historical fracturing load data as training data for the hidden Markov model.

[0036] S2: Input the signal energy sequence into the hidden Markov model for training and establish the energy sequence model, wherein the hidden states in the energy sequence model are classified to correspond to different load levels. This step trains the hidden Markov model to model the fracturing load sequence. The hidden Markov model is trained using multiple sets of hyperparameters to select the energy sequence model with the best effect.

[0037] S3: Calculate and determine the threshold of the time series feature parameters related to curve type detection. In this step, the energy sequence model classifies each learned hidden state, and each category corresponds to the working state of the fracturing equipment, including shutdown, standby, preparation, and working, that is, each hidden state corresponds to the working state of the fracturing equipment. This step mainly includes three aspects of work: merging similar hidden states, determining the direction of hidden state transfer and calculating the transfer probability, and comprehensive analysis to determine the classification.

[0038] S4: Input the drilling load sequence to be detected and detect the working state of the equipment. The main method of this step is, first, use the Viterbi algorithm to decode the input sequence to obtain the hidden state sequence that can derive the input load sequence with the maximum probability; second, classify the hidden states in the hidden state sequence according to the classification standard, that is, obtain the working state corresponding to each point in the input sequence.

[0039] In view of the defect that the working status of working equipment cannot be determined in real time in the prior art, the electricity situation awareness algorithm for oil and gas exploration and development of the present invention uses the hidden Markov model to model the load sequence, learn the hidden state of the load sequence and obtain the internal change law of the load; analyze the fluctuation type of the load curve, and jointly analyze the hidden state and the curve type. The algorithm can detect the working status of the drilling pressure equipment with high detection accuracy, high computing performance and high real-time performance, and realize continuous monitoring and real-time feedback of the working status of the drilling pressure equipment during oil and gas exploration and production, thereby providing timely and accurate production feedback to on-site operators and general control personnel, and providing strong data support for production decisions; in addition, the algorithm can assist production personnel in monitoring and judging equipment failures, timely discover potential problems of equipment and take measures to avoid failures, reduce production delays and resource waste, and ensure the smooth progress of production.

[0040] The present invention describes the details of each step as follows.

[0041] S1: Clean and preprocess the historical data of drilling loads, and convert the input load sequence into a signal energy sequence.

[0042] S11: Clean and preprocess the historical data of drilling load.

[0043] Data cleaning and preprocessing mainly include:

[0044] (1) Delete outliers. Due to uncontrollable factors such as collection anomalies and transmission errors, outliers such as NaN, Inf, and null may exist in the data and need to be deleted.

[0045] (2) Removing zero values ​​from historical data. The presence of a large number of zero values ​​in the drilling and fracturing load series will make the distribution of the observed data very sparse, which may lead to inaccurate estimates of the state transition probability and observation probability during the training of the hidden Markov model, thus affecting the performance of the model. Therefore, it is necessary to remove the zero values ​​in the data.

[0046] (3) Adjust the data type so that the processed data meets the requirements of the energy series model for input data. By cleaning and preprocessing historical data and deleting unreliable data, the accuracy of subsequent judgments on the working status can be improved.

[0047] S12: Convert the input load sequence into a signal energy sequence.

[0048] S121: Calculate the energy value and average energy of historical data.

[0049] For drilling sequences, since the trained HMM needs to model the load level, the training data needs to reflect the load level of the sample points. However, the drilling curve fluctuates greatly, and the load value of the sample point itself cannot accurately represent its load level. It is necessary to refer to the load of the previous window time as the basis for calculating the load level. Therefore, the energy characteristics of time series signals are introduced. The energy characteristics of time series signals are a set of characteristics that describe the energy distribution of signals in the time domain, and are often used to analyze the intensity, spectral components, and overall energy of signals.

[0050] The calculation formula for the average energy of discrete time series signal is:

[0051] .

[0052] Where N represents the length of the time series signal (the number of data points), and x[n] represents the value of the time series signal at the nth time point. |x[n]| 2Represents the square of its absolute value. The calculation formula for the average energy of a discrete time series signal is to add the square of the amplitude of the time series signal at each time point, and then divide it by the length of the time series signal to obtain the average energy of the time series signal.

[0053] S122: Determine the load level based on the average energy in the time window.

[0054] Use the average energy E in the time window avg Describe the load level. By calculating the average energy value in each sample window, the input load sequence is converted into a signal energy sequence, and used as the training data of the hidden Markov model, so that the hidden Markov model can learn the distribution of the load level in the sequence and the transition probability.

[0055] According to a preferred embodiment, the time window corresponds to ten sample points. The sample point is the unit data corresponding to each timestamp in the time series data. A time window that is too small will cause the average energy to degenerate into a single sample point load value, and a time window that is too large will cause the calculated energy value to have a time lag, affecting the real-time performance of the hidden Markov model. The time window of the present invention is properly set, and the average energy calculated is more accurate.

[0056] S2: Input the signal energy sequence into the hidden Markov model for training and establish the energy sequence model.

[0057] The hidden Markov model contains a set of parameters used to describe the state transition and observation generation process in the model, including the initial state probability vector π, the state transition probability matrix A, and the observation probability matrix B. In general, a hidden Markov model can be represented by a triple:

[0058] HMM=(π, A, B).

[0059] π represents the initial state probability vector. π=[π1,π2,…,π N ] represents the initial probability distribution of N hidden states in the hidden Markov model. i =P(q1=S i ), indicating that it is in state S at time step t=1 i probability.

[0060] A represents the state transition probability matrix, A=[a ij ] represents the probability matrix of transition from one hidden state to another. a ij =P(q t+1 =S j ∣q t =S i ) indicates that at time step t, the i In the case of transfer to state Sj probability.

[0061] B is the observation probability matrix, B=[b i (ok)] represents the probability distribution of the observed value in each hidden state. For discrete observation ok, b i (ok)=P(ok|q t =S i ) means that at time step t, in state S i The probability of observing ok under the condition .

[0062] S21: The signal energy sequence is expressed as the observation probability using the probability mass function of the Poisson distribution.

[0063] The load sequence or signal energy sequence is the observation sequence of the hidden Markov model. Since the observation sequence is a discrete count time series, the distribution of the observation data is assumed to be a Poisson distribution. At this time, the observation probability can be expressed by the probability mass function of the Poisson distribution:

[0064] .

[0065] Among them, b i (o t ) indicates that it is in state S at time step t i In the case of t The probability of λ i represents the mean of the Poisson distribution, also known as the average incidence rate. For each hidden state S i , there is a corresponding λ i The value represents the average number of occurrences of events (count data) observed in this state. i It is estimated by the hidden Markov model during the parameter learning process. During the training process, the hidden Markov model will adjust λ based on the observed data through methods such as maximum likelihood estimation. i The value of λ is used to make the hidden Markov model better fit the observed data. i The different values ​​of reflect the average occurrence intensity of events under different hidden states.

[0066] There are two main methods for training HMM. One is a supervised learning method based on maximum likelihood estimation, that is, when the state sequence is known, the maximum likelihood estimation is used to estimate the parameters of the hidden Markov model; the other is an unsupervised learning algorithm (Baum-Welch iterative estimation algorithm). Since the state sequence of the input sequence is unknown, the present invention uses the Baum-Welch iterative estimation algorithm to learn the parameters of the HMM. The Baum-Welch iterative estimation algorithm maximizes the likelihood of the hidden Markov model for the observed data by iteratively optimizing the model parameters.

[0067] S22: Set initial parameters.

[0068] Initialize state probability π0, state transition probability A0 and observation probability B0.

[0069] S23: Calculate the maximum likelihood estimation function of the observation probability.

[0070] The forward-backward algorithm is used to calculate the maximum likelihood estimate function Q of the observed data.

[0071] S24: Maximize the maximum likelihood estimation function to obtain the hidden Markov model parameters for the next iteration.

[0072] Using the expectation maximization algorithm, the maximum likelihood estimation function Q is maximized to obtain the parameters of the next iteration: the initial state probability vector π, the state transition probability matrix A, and the observation probability matrix B.

[0073] S25: Iterate until the hidden Markov model parameters converge or a preset number of iterations is reached.

[0074] Repeat steps S23 and S24 until the parameters converge or the preset number of iterations is reached. The hyperparameters during training include the number of hidden states n, π0, A0, B0 and the maximum number of iterations I of the hidden Markov model.

[0075] In the actual training of the present invention, in order to determine the optimal number of hidden states, multiple numbers of hidden states are pre-set and the hidden Markov model is trained, and the hidden Markov model with the best effect is selected. In each training process, a random initialization method is used for π0, A0 and B0, and ten groups of random initial values ​​are selected to ensure that the parameters have sufficient randomness so that the hidden Markov model will not fall into a local optimal solution; at the same time, the maximum number of iterations is limited to 20 times, saving computing resources while preventing the hidden Markov model from overfitting. After the training is completed, the hidden Markov model is scored using the likelihood evaluation method, and the highest score model is selected.

[0076] After the Hidden Markov Model (HMM) training is completed, the learned observation probability matrix B is actually a vector containing a set of λ. Each λ i Represents the corresponding hidden state S i The mean of the Poisson distribution obeyed by the observed value is the mean of the sample points belonging to the hidden state. For the fracturing model, the hidden state needs to be classified into the working state according to the λ and transition probability of the hidden state.

[0077] S26: Merge similar hidden states.

[0078] Since the observed data may have similar statistical characteristics under different hidden states, resulting in the Poisson distribution parameters corresponding to different hidden states being close, similar hidden states need to be merged.

[0079] Specifically, the λ values ​​of different hidden states are sorted by numerical value, and the values ​​are judged from small to large. If it is true, it means that the two hidden states are not similar, and a new hidden state set is created; if it is false, it means that the two hidden states are similar, and the latter hidden state is added to the previous similar hidden state set. Finally, each similar hidden state set is used as a new hidden state for subsequent judgment.

[0080] S27: Calculate the distribution probability and transfer direction of each hidden state.

[0081] The training sequence is decoded using the trained hidden Markov model based on the Viterbi algorithm to obtain the hidden state corresponding to each sample point. The hidden state represents the potential attribute or feature of the sample point, and in this embodiment is the Poisson distribution that can maximize the probability of obtaining the sample point value in the training sequence.

[0082] The distribution of hidden states of each sample point in the training sequence is counted, that is, the distribution ratio of hidden states in the training sequence. Hidden states with a large distribution ratio indicate that they are relatively stable in the sequence and are marked as stable states; hidden states with a small distribution ratio indicate that they are transitional states in the sequence and will transfer to other states with a high probability, and are marked as transitional states. The probability of a transitional state transferring to a higher or lower state is calculated through the transfer matrix to determine its transfer direction.

[0083] S28: Classify the hidden state into different fracturing states according to the distribution probability of the hidden state and the direction of the transfer. This makes it easier to accurately determine the working state of the equipment by determining the direction of the load hidden state transfer.

[0084] Since the loads in the preparation stage and the fracturing working stage are relatively stable in the working state of the fracturing equipment, which is consistent with the stable state characteristics divided by the present invention, and the load values ​​in the preparation stage and the working stage differ greatly, they can be divided by numerical comparison. Therefore, the stable state is directly corresponded to the fracturing preparation and fracturing working states, and the hidden state in the stable state is specifically divided into two fracturing states by taking the lambda mean and directly comparing them.

[0085] In the transition state, the hidden state with the load increase direction is classified as the fracturing equipment (load increase) state, and the hidden state with the load decrease direction is classified as the fracturing equipment (load decrease) state. The hidden state with the largest distribution ratio and the smallest λ value is classified as the standby state.

[0086] This classification method reflects the relationship between the equipment working state and the load, that is, during the load increase stage of fracturing, the load will show an upward trend; during the load reduction stage of fracturing, the load will show a downward trend; the duration of the standby stage is high and the load level is small. Since the load transfer state and the equipment working state show the above corresponding relationship, the equipment working state can be accurately judged by judging the direction of the load hidden state transfer.

[0087] For example, for the drilling model, λ represents the Poisson distribution mean of the energy sequence sample value corresponding to the hidden state, which reflects the load level corresponding to the hidden state. Therefore, λ is used as the classification basis for the hidden state, and the hidden state is classified into three types of low, medium and high load levels. The classification method is to directly classify the hidden state according to λ max Judgement. Hidden state If If the hidden state This is a high load level.

[0088] S3: Calculate and determine the threshold of the time series characteristic parameter related to the curve type detection.

[0089] S31: Calculate the time series feature threshold.

[0090] Calculating the time series feature threshold is to provide a basis for the detection of drilling load curve types. When judging the type of drilling load curve, it is necessary to calculate the time series features of the sequence to be detected and make a judgment by comparing them with the corresponding threshold. Since the selected time series features can reflect the sequence features from both statistical and time domain aspects, and have a distinguishing degree for the target curve type to be detected, the threshold judgment method can simply and efficiently realize the detection of drilling load curve types.

[0091] According to a preferred embodiment, the thresholds of the time series characteristic parameters include coefficient of variation, standard deviation and zero-crossing rate.

[0092] The coefficient of variation of a time series is a statistic used to describe the variability of a series. The coefficient of variation is the ratio of the standard deviation to the mean and is used to compare the variability of time series of different scales or amplitudes.

[0093] For a time series X, its mean is represented by μ and its standard deviation is represented by σ, then the coefficient of variation CV of the time series is X The calculation formula is as follows:

[0094] CV X =(σ / μ)×100%.

[0095] The larger the value of the coefficient of variation, the greater the variability of the time series relative to the mean. In the present invention, the coefficient of variation is used to test the fluctuation of the time series.

[0096] The coefficient of variation threshold is calculated as follows: for each sample point in the drilling load sequence used for training, a subsequence of a time window is taken from the sample point, and the coefficient of variation is calculated for the subsequence to obtain a coefficient of variation sequence. The coefficient of variation sequence is averaged to obtain the coefficient of variation threshold CV thresh .

[0097] S32: Calculate the series standard deviation to assess the magnitude of series fluctuations.

[0098] The standard deviation threshold is calculated as follows: for each sample point in the drilling load sequence used for training, a subsequence of a time window is taken from the sample point, and the standard deviation of the subsequence is calculated to obtain the standard deviation sequence. The standard deviation sequence is averaged to obtain the standard deviation threshold STD thresh .

[0099] S33: Calculate the zero-crossing rate.

[0100] Zero Crossing Rate is a characteristic used to describe the frequency of signal waveform changes. In time series signals, the zero crossing rate indicates the number of times the signal crosses the zero axis, that is, the number of times the signal changes from positive to negative or from negative to positive. For a discrete time series (x1, x2, …, x n ), its zero crossing rate ZCR can be calculated as follows:

[0101] .

[0102] Where I(·) represents the indicator function, which is 1 when the condition in the brackets is met, otherwise it is 0. ZCR represents the number of positive and negative changes in the signal between adjacent samples. n represents the time sequence.

[0103] In this embodiment, the zero crossing rate ZCR is used to detect whether the drilling load sequence contains high-frequency vibrations, so as to detect the curve with an oscillating waveform. However, there are two problems in directly calculating the ZCR for the drilling load sequence using the basic calculation method. First, there are noise fluctuations in the sequence, that is, vibrations with very small amplitude and high frequency, which will interfere with the detection; second, since the load vibration cycle is long and multiple vibration cycles are required in the time window, the zero crossing rate ZCR detection time window is large, but a large time window will reduce the real-time performance of the detection and cause detection lag.

[0104] In order to solve these two problems when calculating the zero crossing rate ZCR, two improvements are made to the zero crossing rate ZCR calculation. First, the input load sequence is smoothed using Gaussian filtering to remove noise fluctuations in the load sequence; second, the input load sequence is divided into multiple small sequences, and different weights are assigned to each small sequence according to the time distance. When calculating the number of symbol changes within each small sequence, the number is accumulated according to the weight, so that high-frequency vibrations in small sequences can be detected more accurately.

[0105] The calculation method of the zero-crossing rate threshold is as follows:

[0106] For each sample point in the drilling load sequence used for training, a subsequence of a time window is taken from the sample point, and the zero crossing rate ZCR of the subsequence is calculated using the improved method to obtain the zero crossing rate sequence. The zero crossing rate sequence is averaged to obtain the zero crossing rate threshold ZCR. thresh .

[0107] S4: Input the drilling load sequence to be tested and detect the working status of the equipment.

[0108] Since the working status of the equipment needs to be detected in real time, the working status of a certain sample point can only be judged by analyzing the known samples at that time step, and the subsequent sample point data cannot be used. Therefore, for each sample point in the drilling load sequence, the subsequence of the sample point and the previous time window is analyzed, and the time window of the first point in the subsequence is filled with its own value.

[0109] S41: Decode the input load sequence to obtain a hidden state sequence that can derive the input load sequence with maximum probability.

[0110] For each sample point to be detected, if the sample point value is zero, the working state is directly determined to be the shutdown state. If it is not zero, the subsequence of its time window is obtained. Based on the parameters learned by the hidden Markov model, the subsequence is decoded using the Viterbi Algorithm to obtain the hidden state sequence corresponding to the subsequence. The hidden state corresponding to the sample point to be detected is the end value of the subsequence.

[0111] S42: Classify the hidden states in the hidden state sequence to obtain the load level corresponding to each point in the load sequence.

[0112] The load level of the sample point needs to be evaluated. The average energy formula is used for calculation, the load subsequence is converted into an average energy subsequence, and the Viterbi algorithm is used for decoding to obtain the hidden state of the energy value of the sample point. The load level of the sample point is defined according to the previously obtained hidden state classification criteria.

[0113] S43: Calculate the time series characteristic parameters of the load sequence, compare them with the threshold values ​​of the time series characteristic parameters, and determine the curve type of the load sequence.

[0114] Perform load curve type detection on the subsequence. Calculate the standard deviation STD and coefficient of variation CV of the subsequence respectively. X And the zero crossing rate ZCR. The coefficient of variation CV X The coefficient of variation threshold CV thresh For comparison, if CV X <CV thresh , it indicates that the load curve does not fluctuate much and is a stable load. X >CV thresh , indicating that the load curve has large fluctuations, and further judgment is needed to determine whether it is an oscillation curve. thresh This indicates that the curve has high-frequency vibration and is an oscillating curve. thresh This indicates that the curve has a large fluctuation amplitude and is a load rise and fall curve. Based on the above judgment, the load curve type is obtained.

[0115] S44: Determine the equipment working status according to the combination of the load level and the curve type of the load sequence.

[0116] The present invention also provides an electronic device, in which a processor executes an electricity situation awareness algorithm for oil and gas exploration and development, and the processor is configured to: decode an input load sequence to obtain a hidden state sequence that can derive the input load sequence with maximum probability; classify the hidden states in the hidden state sequence to obtain the load level corresponding to each point in the load sequence; calculate the time series characteristic parameters of the load sequence, compare them with the threshold of the time series characteristic parameters, and determine the curve type of the load sequence; and judge the working state of the equipment according to the combination of the load level and the curve type of the load sequence.

[0117] The advantages of the electric situation awareness algorithm run by the electronic device of the present invention include: first, a hidden Markov model and timing characteristics that can accurately and efficiently detect the operating rules of the drilling pressure load sequence are selected, and the model parameters and timing characteristic thresholds of different lines are dynamically determined. Compared with the traditional statistical analysis method based on single threshold comparison, the accuracy of the present invention is higher and the detection applicability for multiple lines is stronger. Second, it has strong real-time performance and short detection time. Only a small sample window is required for detection to achieve high accuracy, and the fast Viterbi algorithm is used to accelerate the decoding process of the hidden Markov model. The curve detection calculates the characteristic value of the small window and compares it with the threshold. The detection process has low computational complexity and fast speed. After testing, it can achieve concurrent detection of three hundred line devices within 1 second. Third, only load timing data is required to establish a detection model, which has low data requirements compared to other multi-characteristic detection algorithms, and the timing data is low-frequency data once a minute, and the acquisition cost is low.

[0118] The electrical situation awareness algorithm of the present invention can be set in a storage module or a processor in the form of computer code, and the processor runs and executes the diagnosis of the working status of the working equipment. For example, a coding program of the electrical situation awareness algorithm for oil and gas exploration and development is set in the processor. The processor can be set separately or installed in a hardware system such as a computer, a server, a cloud server, etc. The processor can also provide equipment working status analysis services for oil and gas exploration in the form of remote information services. The hardware of the processor can be one or a combination of several of a dedicated integrated chip, a server, a CPU, and a GPU. When an early warning function is provided or the processor is connected to an early warning device, the processor can generate an early warning instruction to control the early warning device to issue an early warning.

[0119] It should be noted that the above-mentioned specific embodiments are exemplary, and those skilled in the art can come up with various solutions inspired by the disclosure of the present invention, and these solutions also belong to the disclosure scope of the present invention and fall within the protection scope of the present invention. Those skilled in the art should understand that the description of the present invention is illustrative and does not constitute a limitation on the claims. The scope of protection of the present invention is defined by the claims and their equivalents. The description of the present invention contains multiple inventive concepts, such as "according to a preferred embodiment" means that the corresponding paragraph discloses an independent concept, and the applicant reserves the right to file a divisional application based on each inventive concept.

Claims

1. An algorithm for electricity situation awareness in oil and gas exploration and development, characterized in that: The algorithm includes: Clean and preprocess the historical data of drilling load, convert the input load sequence into a signal energy sequence, calculate the energy value and average energy of the historical data, and determine the load level based on the average energy within a time window; Input the signal energy sequence into a hidden Markov model for training and establish an energy sequence model, and express the signal energy sequence as an observation probability using a probability mass function of a Poisson distribution; set initial parameters; calculate a maximum likelihood estimation function of the observation probability; maximize the maximum likelihood estimation function to obtain model parameters for the next iteration; iterate until the model parameters converge or a preset number of iterations is reached; The hidden states in the energy sequence model are classified to correspond to different load levels, and similar hidden states are merged; the distribution probability and transfer direction of each hidden state are calculated; and the hidden states are classified into different fracturing states according to the distribution probability and transfer direction of the hidden states; Calculate and determine the threshold of the time series characteristic parameter related to the curve type detection, the threshold of the time series characteristic parameter includes the coefficient of variation, the standard deviation and the zero crossing rate; the coefficient of variation is the ratio of the standard deviation to the mean, which is used to compare the variability of time series of different scales or amplitudes; Input the drilling load sequence to be detected and detect the working status of the equipment, decode the input load sequence, and obtain a hidden state sequence that can deduce the input load sequence with maximum probability; classify the hidden states in the hidden state sequence to obtain the load level corresponding to each point in the load sequence; calculate the time series characteristic parameters of the load sequence, compare them with the threshold of the time series characteristic parameters, and determine the curve type of the load sequence; judge the working status of the equipment according to the combination of the load level of the load sequence and the curve type.

2. The electricity situation awareness algorithm for oil and gas exploration and development according to claim 1 is characterized in that: Methods for cleaning and preprocessing historical drilling load data include: Remove outliers; removing zero values ​​in the historical data; The data type is adjusted so that the processed data meets the requirements of the energy series model for input data.

3. The electricity situation awareness algorithm for oil and gas exploration and development according to claim 2 is characterized in that: The time window corresponds to ten sample points. The sample point is the unit data corresponding to each time stamp in the time series data.

4. The electricity situation awareness algorithm for oil and gas exploration and development according to claim 1 is characterized in that: When calculating the zero-crossing rate, the input load sequence is smoothed using Gaussian filtering to remove noise fluctuations in the load sequence; The input load sequence is divided into multiple small sequences, and different weights are assigned to each small sequence according to the time distance. When calculating the number of sign changes within each small sequence, the number is accumulated according to the weight.

5. An electronic device, characterized in that: The processor in the electronic device executes the electricity situation awareness algorithm for oil and gas exploration and development according to any one of claims 1 to 4, and the processor is configured to: Decode the input load sequence to obtain a hidden state sequence that can derive the input load sequence with maximum probability; Classifying the hidden states in the hidden state sequence to obtain the load level corresponding to each point in the load sequence; Calculating a time series characteristic parameter of the load sequence, comparing it with a threshold value of the time series characteristic parameter, and determining a curve type of the load sequence; The working state of the equipment is determined according to a combination of the load level of the load sequence and the curve type.