Single ultrasonic mud liquid level measuring system and method based on machine learning

Through a single ultrasonic mud level measurement system based on machine learning, the problem that mud level signals are susceptible to foam interference in traditional methods is solved, and higher measurement accuracy and system robustness are achieved, ensuring the safety of drilling operations and efficiency.

CN119442891APending Publication Date: 2025-02-14SICHUAN HONGHUA ELECTRIC
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202411552221.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-01
Publication Date
2025-02-14

AI Technical Summary

Technical Problem

The traditional mud volume calculation method has the inaccurate liquid level signal due to the return of mud in the mud tank accompanied by foam, which affects the accurate calculation of mud volume.

Method used

Using a single ultrasonic mud level measurement system based on machine learning, including ultrasonic level sensor, signal processing unit, machine learning module, physical model constraint module, computing unit, display unit and continuous learning and online update module, through data preprocessing, Feature extraction and model integration technology improves the accuracy of liquid level measurement.

Benefits of technology

It improves the accuracy of slurry level measurement and the robustness of the system, reduces the disadvantages of the susceptibility of traditional methods, and ensures the safety and effectiveness of drilling operations.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119442891A_ABST
    Figure CN119442891A_ABST
Patent Text Reader

Abstract

The invention discloses a single ultrasonic mud liquid level measuring system and method based on machine learning. The system comprises an ultrasonic liquid level sensor, a signal processing unit, a machine learning module, a physical model constraint module, a calculation unit, a display unit and a continuous learning and online updating module. According to the method, the accuracy of mud liquid level measurement in petroleum drilling and the robustness of the system are improved, more accurate and stable liquid level data can be provided in a complex drilling environment by integrating multiple machine learning models and applying a model integration technology, the defects that a traditional single model is large in dependence and prone to being disturbed are overcome, and the method is suitable for popularization and application. The reliability of prediction data is improved, and the safety and effectiveness of drilling operation are ensured.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of oil drilling, and in particular to a single ultrasonic mud level measurement system and method based on machine learning. Background Art

[0002] In the current oil drilling industry, electronic instrumentation systems are an indispensable part of drilling activities. They are responsible for monitoring and controlling various key parameters in the drilling process. Among these parameters, the mud volume in the mud tank is particularly critical because it is directly related to the balance of downhole pressure and the prevention of possible blowout accidents. Therefore, accurate measurement and calculation of mud volume is essential to ensure the safety and efficiency of drilling operations.

[0003] The traditional method of calculating mud volume is to multiply the liquid level by the bottom area. The liquid level is obtained by collecting the height of the liquid surface through the liquid level sensor. However, this method has certain limitations: the reflux of mud in the mud tank is often accompanied by the generation of foam, which will seriously interfere with the accuracy of the liquid level signal. This interference will lead to inaccurate liquid level data, thus affecting the accurate calculation of the entire mud volume.

[0004] Based on this, a single ultrasonic mud level measurement system and method based on machine learning is needed. Summary of the invention

[0005] To achieve the above-mentioned object, the present invention provides the following scheme: a single ultrasonic mud level measurement system based on machine learning, comprising: an ultrasonic level sensor, a signal processing unit, a machine learning module, a physical model constraint module, a calculation unit, a display unit and a continuous learning and online update module;

[0006] The ultrasonic liquid level sensor is arranged at the center of the top of the mud tank and is used to collect the liquid level signal in the mud tank in real time. The ultrasonic liquid level sensor has a measurement range of 0-10 meters and an accuracy of ±0.5% FS;

[0007] The signal processing unit includes a data preprocessing and feature extraction module; the data preprocessing mainly uses a low-pass filter to remove high-frequency noise in the signal and maintain the main trend of the liquid level signal;

[0008] The feature extraction module is responsible for extracting time domain and frequency domain features from the preprocessed signal, including mean, variance, standard deviation, and peak value, to provide necessary input features for the machine learning module;

[0009] The machine learning module includes multiple regression models, including a random forest regression model and a gradient boosting machine (GBM), which improves the stability and accuracy of prediction by using an integrated learning method, and improves the stability and accuracy of prediction by using a weighted average method through a model integration strategy;

[0010] The physical model constraint module embeds the physical constraints of the maximum liquid level height, the minimum liquid level height, and the liquid level change rate into the model prediction process;

[0011] The calculation unit calculates the mud volume according to the predicted liquid level height. The mud tank is a standard cylindrical shape, and the bottom area is calculated according to the actual size of the mud tank.

[0012] The display unit is used to display the calculation results in real time, including the liquid level height and the mud volume;

[0013] The continuous learning and online updating module includes incremental learning and adaptive model mechanisms, continuously collects new data and updates the model online.

[0014] The method of a single ultrasonic mud level measurement system based on machine learning comprises the following steps:

[0015] S1. Data collection: Under normal working conditions without foam interference, the ultrasonic level sensor located at the center of the top of the mud tank is used to collect the liquid level signal. The ultrasonic level sensor has a measurement range of 0-10 meters and an accuracy of ±0.5% FS. Under working conditions with foam interference, the liquid level signal is also collected and the corresponding actual liquid level height is recorded;

[0016] S2. Data preprocessing: Apply a low-pass filter to remove high-frequency noise in the original liquid level signal, maintain the main trend of the liquid level signal, and standardize the filtered data to eliminate the impact of different feature scales on model training;

[0017] S3, feature extraction: extract the mean, variance, standard deviation, peak characteristics in the time domain and the frequency domain mean, frequency domain standard deviation, frequency domain peak characteristics in the frequency domain from the preprocessed signal, and calculate the dynamic characteristics of the liquid level change rate and liquid level change acceleration;

[0018] S4, model training and prediction: Use random forest and gradient boosting machine GBM regression models to train the liquid level prediction model; through the model integration strategy, the weighted average method is used to improve the stability and accuracy of the model prediction, and the extracted feature vector is input into the trained model to directly predict the actual mud level height;

[0019] S5. Physical model constraints: Physical constraints of maximum liquid level height, minimum liquid level height, and liquid level change rate are applied during the model prediction process to ensure that the prediction results are within a reasonable range;

[0020] S6. Liquid level calculation: Calculate the mud volume based on the predicted liquid level and the geometric parameters of the mud tank;

[0021] S7. Result display and update: The calculated liquid level and mud volume are displayed in real time on the display unit. The continuous learning and online update module is used for incremental learning and adaptive model mechanism. New data is continuously collected and the model is updated online to adapt to the latest interference conditions and signal feature changes.

[0022] Further preferably, a low-pass Savitzky-Golay filter is used in the data preprocessing of S2 to remove high-frequency noise in the original liquid level signal, which is mathematically expressed as:

[0023]

[0024] Where: y[n] is the filtered signal, x[n] is the original signal, h[k] is the impulse response of the low-pass filter, N is the length of the filter, and the filtered data is normalized to the same scale. The mathematical formula is:

[0025]

[0026] Among them, x is the filtered data, μ is the mean of the data, σ is the standard deviation of the data, and z is the standardized data; calculate the mean μ and standard deviation σ of the filtered data, standardize the data through the formula, and obtain the standardized data z.

[0027] Further preferably, time domain features are extracted from the signal after S3 preprocessing, including mean, variance, standard deviation, and peak value. The variance is Standard Deviation The peak value is peak=max(z i );

[0028] The time domain signal is converted into a frequency domain signal through Fourier transform FFT, and the frequency domain mean FFT Mean, frequency domain standard deviation FFT Standard Deviation and frequency domain peak FFT Peak are extracted using the formula

[0029]

[0030] Among them, the frequency domain mean is extracted The standard deviation in the frequency domain is The frequency domain peak value is fft_peak=max(|X(k)|).

[0031] It is further preferred that, in data labeling, the extracted features are labeled to mark which signals are normal mud signals, whose normal signal label is 0, and which are foamy mud signals, whose foam interference signal label is 1. By adopting manual labeling, manually assigning labels to each signal according to actual working conditions and other reference data, and semi-automatic labeling methods, preliminary labeling is performed through a preliminary classification model, and then manual correction is performed.

[0032] Further optimization, in model training, the labeled data and extracted features are used to train the random forest regression model and the gradient boosting machine GBM. By integrating multiple regression models of random forest and GBM, the weighted average method is used to improve the stability and accuracy of the prediction;

[0033] The random forest regression model is selected because it performs well in processing high-dimensional features and noise resistance. Mathematical expression:

[0034] Among them, G rf (x) is the prediction result of random forest, K is the number of decision trees, G(x,Θ k ) is the prediction result of the Kth decision tree, Θ k is the parameter of the K-th decision tree;

[0035] Gradient boosting machine, GBM is selected as one of the integrated models because of its high performance in dealing with regression problems. Its mathematical expression is: Among them, G gbm (x) is the prediction result of GBM, G0(X) is the initial prediction, α m is the learning rate of the mth round, G m (x) is the weak learner in the mth round.

[0036] Further preferably, in the liquid level prediction of S4, real-time signal processing: including data acquisition, data preprocessing, feature extraction, the extracted feature vector is input into the trained integrated model to directly predict the actual mud liquid level height;

[0037] In order to further improve the prediction ability of the model, dynamic features and frequency domain enhancement features are added. The dynamic features include the liquid level change rate and liquid level change acceleration.

[0038] The liquid level change rate: Where Δt is the time interval;

[0039] The liquid level change acceleration:

[0040] Frequency domain enhancement includes energy distribution:

[0041] By calculating the energy distribution of each frequency band, it is used to capture the characteristics of foam and liquid signals at different frequencies, energy(k)=|X(k)| 2 .

[0042] Further preferably, the method includes the following steps of liquid level prediction and physical model constraint:

[0043] Real-time signal processing:

[0044] The liquid level signal of the ultrasonic sensor is collected in real time, and the liquid level signal is denoised to obtain the standardized data z. The time domain features, frequency domain features and dynamic enhancement features are extracted from the standardized data z to form a feature vector.

[0045] Liquid level prediction: The feature vector is input into the trained integrated model, which includes the random forest regression model and the gradient boosting machine GBM, and the actual mud level height is directly predicted by the following integrated prediction formula:

[0046] G(x)=w rf ·G rf (x)+w gbm ·G gbm (x)

[0047] Among them, w rf and w gbm is the weight coefficient of random forest and GBM, G rf (x) and G gbm (x) are the prediction results of random forest and GBM respectively;

[0048] Physical model constraints: Based on the liquid level prediction results, the physical constraints of the liquid level are applied, including:

[0049] Maximum liquid level height: The predicted result shall not exceed the physical maximum liquid level height of the mud tank;

[0050] Minimum liquid level height: The predicted result shall not be lower than the physical minimum liquid level height of the mud tank;

[0051] Liquid level change rate: If the liquid level change rate between two consecutive predictions If the preset threshold is exceeded, an alarm is triggered and correction is performed according to the following formula: L corr =L prev +Δ Lmax

[0052] Among them, L corr is the corrected liquid level height, L prev is the liquid level at the previous time point, ΔLmax It is the liquid level change at the preset maximum allowable change rate.

[0053] According to the specific embodiments provided by the present invention, the present invention discloses the following technical effects:

[0054] The present invention improves the accuracy of mud level measurement in oil drilling and the robustness of the system. By integrating multiple machine learning models and applying model integration technology, it can provide more accurate and stable level data in complex drilling environments. This method reduces the shortcomings of traditional single models, such as high dependence and susceptibility to interference, improves the reliability of predicted data, and ensures the safety and effectiveness of drilling operations. BRIEF DESCRIPTION OF THE DRAWINGS

[0055] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0056] Figure 1 It is a flow chart of the steps of the system of the present invention. DETAILED DESCRIPTION

[0057] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0058] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the present invention is further described in detail below with reference to the accompanying drawings and specific embodiments.

[0059] Example

[0060] like Figure 1 As shown, the single ultrasonic mud level measurement system based on machine learning in this embodiment includes: an ultrasonic level sensor, a signal processing unit, a machine learning module, a physical model constraint module, a calculation unit, a display unit and a continuous learning and online update module;

[0061] The ultrasonic level sensor is located at the center of the top of the mud tank to collect the liquid level signal in the mud tank in real time. The ultrasonic level sensor has a measurement range of 0-10 meters and an accuracy of ±0.5% FS.

[0062] The signal processing unit includes data preprocessing and feature extraction modules; data preprocessing mainly uses a low-pass filter to remove high-frequency noise in the signal and maintain the main trend of the liquid level signal;

[0063] The feature extraction module is responsible for extracting time domain and frequency domain features from the preprocessed signal, including mean, variance, standard deviation, and peak value, to provide necessary input features for the machine learning module;

[0064] The machine learning module includes multiple regression models, including random forest regression model and gradient boosting machine GBM, which improves the stability and accuracy of prediction by using ensemble learning method and weighted average method through model integration strategy;

[0065] The physical model constraint module embeds the physical constraints of the maximum liquid level height, the minimum liquid level height, and the liquid level change rate into the model prediction process;

[0066] The calculation unit calculates the mud volume according to the predicted liquid level height. The mud tank is a standard cylindrical shape, and the bottom area is calculated according to the actual size of the mud tank;

[0067] The display unit is used to display the calculation results in real time, including the liquid level height and mud volume;

[0068] The continuous learning and online update module includes incremental learning and adaptive model mechanisms, continuously collects new data and updates the model online.

[0069] The method of a single ultrasonic mud level measurement system based on machine learning comprises the following steps:

[0070] S1. Data collection: Under normal working conditions without foam interference, the ultrasonic level sensor located at the center of the top of the mud tank is used to collect the liquid level signal. The ultrasonic level sensor has a measurement range of 0-10 meters and an accuracy of ±0.5% FS. Under working conditions with foam interference, the liquid level signal is also collected and the corresponding actual liquid level height is recorded;

[0071] S2. Data preprocessing: Apply a low-pass filter to remove high-frequency noise in the original liquid level signal, maintain the main trend of the liquid level signal, and standardize the filtered data to eliminate the impact of different feature scales on model training;

[0072] S3, feature extraction: extract the mean, variance, standard deviation, peak characteristics in the time domain and the frequency domain mean, frequency domain standard deviation, frequency domain peak characteristics in the frequency domain from the preprocessed signal, and calculate the dynamic characteristics of the liquid level change rate and liquid level change acceleration;

[0073] S4, model training and prediction: Use random forest and gradient boosting machine GBM regression models to train the liquid level prediction model; through the model integration strategy, the weighted average method is used to improve the stability and accuracy of the model prediction, and the extracted feature vector is input into the trained model to directly predict the actual mud level height;

[0074] S5. Physical model constraints: Physical constraints of maximum liquid level height, minimum liquid level height, and liquid level change rate are applied during the model prediction process to ensure that the prediction results are within a reasonable range;

[0075] S6. Liquid level calculation: Calculate the mud volume based on the predicted liquid level and the geometric parameters of the mud tank;

[0076] S7. Result display and update: The calculated liquid level and mud volume are displayed in real time on the display unit. The continuous learning and online update module is used for incremental learning and adaptive model mechanism. New data is continuously collected and the model is updated online to adapt to the latest interference conditions and signal feature changes.

[0077] Specific implementation steps

[0078] This embodiment describes the detailed steps of installing and operating an electronic drilling instrumentation system based on ultrasonic level sensors at a land drilling site to improve the measurement accuracy of mud level, especially under complex working conditions;

[0079] 1. System setup: A high-precision electronic instrumentation system consisting of the following components was deployed at the selected land drilling site:

[0080] Ultrasonic level sensor: Several ABC-123 ultrasonic level sensors are installed at the top center of the mud tank. These sensors have a measurement range of 0-10 meters and an accuracy of ±0.5% FS, which can provide reliable data under various mud flow conditions;

[0081] Industrial computer: The configuration model is DEF-456, equipped with Intel Core i7 processor, 16 GB memory and 512 GB solid state drive, running Windows 10 operating system, mainly used for data processing and model calculation;

[0082] Display screen: A 24-inch LED display screen is installed to display mud level data and various alarm information in real time;

[0083] Self-developed software: The system runs a self-developed set of electronic drilling instrument software, including data acquisition, signal processing, machine learning and physical modeling functional modules to optimize data processing and prediction accuracy;

[0084] 2. Data collection: The system collects mud level data in real time at a frequency of 1 Hz through an ultrasonic level sensor; data collection is divided into two main stages:

[0085] Under normal working conditions without foam interference, data was collected continuously for 72 hours, totaling 259,200 data points, which served as the benchmark data for model training;

[0086] Under artificially created foam interference, the data were collected for 72 hours to obtain the same number of interference data points to simulate the complex conditions that may be encountered in actual drilling;

[0087] 3. Data preprocessing: All collected raw liquid level data are preprocessed to improve data quality, including:

[0088] Denoising: The original data was processed using a Savitzky-Golay filter with a window length of 51 and an order of 3 to effectively remove high-frequency noise and retain key trends;

[0089] Data standardization: Calculate the mean and standard deviation of the filtered data and standardize the data to the interval [0,1] to unify the feature scale;

[0090] 4. Feature extraction: Extract key features from preprocessed data to support accurate machine learning modeling:

[0091] Time domain features: calculate the mean, variance, standard deviation and peak value of each data window;

[0092] Frequency domain features: Perform a fast Fourier transform (FFT) to extract the mean, standard deviation, and peak value from the frequency domain data;

[0093] Dynamic features and frequency domain enhancement: Calculate the rate of change and acceleration of the liquid level, as well as the energy distribution in different frequency bands, to form a comprehensive feature vector of 15 features;

[0094] 5. Data labeling: Label the collected data to distinguish between normal and foam-interfered liquid level signals:

[0095] The data points under normal conditions are marked as 0, and the data points under foam interference conditions are marked as 1;

[0096] Manually check 5% of the data to ensure the accuracy and consistency of the annotations;

[0097] 6. Model training: Use the labeled feature data to train the liquid level prediction model to ensure that the model can accurately reflect the liquid level changes:

[0098] Dataset division: All data points are divided into training set, validation set and test set in a ratio of 7:1:2;

[0099] Random Forest Model: Build and optimize a random forest regression model with 100 decision trees;

[0100] Gradient boosting machine model: build a GBM regression model with 50 weak learners and optimize its parameters;

[0101] Ensemble learning: weighted average the prediction results of random forest and GBM models to improve the stability and accuracy of the overall prediction;

[0102] 7. Liquid level prediction and physical constraints: Deploy the trained model on the industrial computer to perform real-time liquid level prediction and apply physical model constraints:

[0103] Real-time data processing: Ultrasonic sensors continuously collect data, which is then input into the model after preprocessing and feature extraction;

[0104] Physical constraints: Set upper and lower limits for the liquid level height and make necessary corrections if the predicted value exceeds these limits;

[0105] Alarm system: Set the liquid level change rate threshold, and trigger an alarm when it exceeds the threshold, reminding the operator to respond in time;

[0106] 8. Mud volume calculation: Calculate the mud volume based on the liquid level predicted by the model, using the formula V = πr 2 L, where r is the radius of the tank bottom;

[0107] 9. Result display and application: Real-time display of current liquid level height and calculated mud volume on the LED display; setting and monitoring three-level alarm thresholds, and issuing early warnings to operators in real time; saving historical liquid level data and alarm records to the database for subsequent analysis and system optimization;

[0108] The present invention provides an optimized oil drilling mud level height calculation method based on a single ultrasonic sensor, which improves the accuracy of liquid level measurement and the robustness of the system by combining machine learning algorithms, physical model constraints, model integration and diversity.

[0109] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0110] The principles and implementation methods of the present invention are described in this article using specific examples. The description of the above embodiments is only used to help understand the method and core idea of ​​the present invention. At the same time, for those skilled in the art, according to the idea of ​​the present invention, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as limiting the present invention.

Claims

1. A single ultrasonic mud level measurement system based on machine learning, characterized in that: include: Ultrasonic liquid level sensor, signal processing unit, machine learning module, physical model constraint module, calculation unit, display unit and continuous learning and online update module; The ultrasonic liquid level sensor is arranged at the center of the top of the mud tank and is used to collect the liquid level signal in the mud tank in real time. The ultrasonic liquid level sensor has a measurement range of 0-10 meters and an accuracy of ±0.5% FS; The signal processing unit includes a data preprocessing and feature extraction module; the data preprocessing mainly uses a low-pass filter to remove high-frequency noise in the signal and maintain the main trend of the liquid level signal; The feature extraction module is responsible for extracting time domain and frequency domain features from the preprocessed signal, including mean, variance, standard deviation, and peak value, to provide necessary input features for the machine learning module; The machine learning module includes multiple regression models, including a random forest regression model and a gradient boosting machine (GBM), which improves the stability and accuracy of prediction by using an integrated learning method, and improves the stability and accuracy of prediction by using a weighted average method through a model integration strategy; The physical model constraint module embeds the physical constraints of the maximum liquid level height, the minimum liquid level height, and the liquid level change rate into the model prediction process; The calculation unit calculates the mud volume according to the predicted liquid level height. The mud tank is a standard cylindrical shape, and the bottom area is calculated according to the actual size of the mud tank. The display unit is used to display the calculation results in real time, including the liquid level height and the mud volume; The continuous learning and online updating module includes incremental learning and adaptive model mechanisms, continuously collects new data and updates the model online.

2. The method of a single ultrasonic mud level measurement system based on machine learning according to claim 1, characterized in that: The following steps are involved: S1. Data collection: Under normal working conditions without foam interference, the ultrasonic level sensor located at the center of the top of the mud tank is used to collect the liquid level signal. The ultrasonic level sensor has a measurement range of 0-10 meters and an accuracy of ±0.5% FS. Under working conditions with foam interference, the liquid level signal is also collected and the corresponding actual liquid level height is recorded; S2. Data preprocessing: Apply a low-pass filter to remove high-frequency noise in the original liquid level signal, maintain the main trend of the liquid level signal, and standardize the filtered data to eliminate the impact of different feature scales on model training; S3, feature extraction: extract the mean, variance, standard deviation, peak characteristics in the time domain and the frequency domain mean, frequency domain standard deviation, frequency domain peak characteristics in the frequency domain from the preprocessed signal, and calculate the dynamic characteristics of the liquid level change rate and liquid level change acceleration; S4, model training and prediction: Use random forest and gradient boosting machine GBM regression models to train the liquid level prediction model; through the model integration strategy, the weighted average method is used to improve the stability and accuracy of the model prediction, and the extracted feature vector is input into the trained model to directly predict the actual mud level height; S5. Physical model constraints: Physical constraints of maximum liquid level height, minimum liquid level height, and liquid level change rate are applied during the model prediction process to ensure that the prediction results are within a reasonable range; S6. Liquid level calculation: Calculate the mud volume based on the predicted liquid level and the geometric parameters of the mud tank; S7. Result display and update: The calculated liquid level and mud volume are displayed in real time on the display unit. The continuous learning and online update module is used for incremental learning and adaptive model mechanism. New data is continuously collected and the model is updated online to adapt to the latest interference conditions and signal feature changes.

3. The method of a single ultrasonic mud level measurement system based on machine learning according to claim 1, characterized in that: In the data preprocessing of S2, a low-pass Savitzky-Golay filter is used to remove the high-frequency noise in the original liquid level signal. The mathematical expression is: Where: y[n] is the filtered signal, x[n] is the original signal, h[k] is the impulse response of the low-pass filter, N is the length of the filter, and the filtered data is normalized to the same scale. The mathematical formula is: Among them, x is the filtered data, μ is the mean of the data, σ is the standard deviation of the data, and z is the standardized data; calculate the mean μ and standard deviation σ of the filtered data, standardize the data through the formula, and obtain the standardized data z.

4. The method of a single ultrasonic mud level measurement system based on machine learning according to claim 1, characterized in that: Extract time domain features from the signal after S3 preprocessing, including mean, variance, standard deviation, and peak. The variance is Standard Deviation The peak value is peak=max(z i ); The time domain signal is converted into a frequency domain signal through Fourier transform FFT, and the frequency domain mean FFT Mean, frequency domain standard deviation FFT Standard Deviation and frequency domain peak FFT Peak are extracted using the formula Among them, the frequency domain mean is extracted The standard deviation in the frequency domain is The frequency domain peak value is fft_peak=max(|X(k)|).

5. The method of a single ultrasonic mud level measurement system based on machine learning according to claim 1, characterized in that: In data labeling, the extracted features are labeled to mark which signals are normal mud signals, whose normal signal label is 0, and which are foamy mud signals, whose foam interference signal label is 1. Through manual labeling, labels are manually assigned to each signal according to actual working conditions and other reference data, and semi-automatic labeling methods are used. Preliminary labeling is performed through a preliminary classification model, and then manual correction is performed.

6. The method of a single ultrasonic mud level measurement system based on machine learning according to claim 1, characterized in that: In model training, the labeled data and extracted features are used to train the random forest regression model and the gradient boosting machine (GBM). By integrating multiple regression models of random forest and GBM, the weighted average method is used to improve the stability and accuracy of the prediction. The random forest regression model is selected because it performs well in processing high-dimensional features and noise resistance. Mathematical expression: Among them, G rf (x) is the prediction result of random forest, K is the number of decision trees, G(x,Θ k ) is the prediction result of the Kth decision tree, Θ k is the parameter of the K-th decision tree; Gradient boosting machine, GBM is selected as one of the integrated models because of its high performance in dealing with regression problems. Its mathematical expression is: Among them, G gbm (x) is the prediction result of GBM, G0(X) is the initial prediction, α m is the learning rate of the mth round, G m (x) is the weak learner in the mth round.

7. The method of a single ultrasonic mud level measurement system based on machine learning according to claim 1, characterized in that: In the liquid level prediction of S4, real-time signal processing: including data acquisition, data preprocessing, feature extraction, the extracted feature vector is input into the trained integrated model to directly predict the actual mud liquid level height; In order to further improve the prediction ability of the model, dynamic features and frequency domain enhancement features are added. The dynamic features include the liquid level change rate and liquid level change acceleration. The liquid level change rate: Where Δt is the time interval; The liquid level change acceleration: Frequency domain enhancement includes energy distribution: By calculating the energy distribution of each frequency band, it is used to capture the characteristics of foam and liquid signals at different frequencies, energy(k)=|X(k)| 2 .

8. The method of a single ultrasonic mud level measurement system based on machine learning according to claim 1, characterized in that: The following steps are included in the liquid level prediction and physical model constraints: Real-time signal processing: The liquid level signal of the ultrasonic sensor is collected in real time, and the liquid level signal is denoised to obtain the standardized data z. The time domain features, frequency domain features and dynamic enhancement features are extracted from the standardized data z to form a feature vector. Liquid level prediction: The feature vector is input into the trained integrated model, which includes the random forest regression model and the gradient boosting machine GBM, and the actual mud level height is directly predicted by the following integrated prediction formula: G(x)=w rf ·G rf (x)+w gbm ·G gbm (x) Among them, w rf and w gbm is the weight coefficient of random forest and GBM, G rf (x) and G gbm (x) are the prediction results of random forest and GBM respectively; Physical model constraints: Based on the liquid level prediction results, the physical constraints of the liquid level are applied, including: Maximum liquid level height: The predicted result shall not exceed the physical maximum liquid level height of the mud tank; Minimum liquid level height: The predicted result shall not be lower than the physical minimum liquid level height of the mud tank; Liquid level change rate: If the liquid level change rate between two consecutive predictions If the preset threshold is exceeded, an alarm is triggered and correction is performed according to the following formula: L corr =L prev +Δ Lmax ; Among them, L corr is the corrected liquid level height, L prev is the liquid level at the previous time point, Δ Lmax It is the liquid level change at the preset maximum allowable change rate.

Citation Information

Cited By

  • Machine learning assisted in-situ monitoring method and device for working fluid system

    CN121027340A

  • Drilling mud liquid level anomaly detection method, system and equipment based on sensor data fusion and medium

    CN121093164A