An automatic optimization system for pumping unit balance based on digital twin technology

By using digital twin technology to build a pumping unit model and improve the genetic algorithm, automatic optimization of the pumping unit's balance is achieved, which solves the problems of low accuracy of traditional manual adjustment and insufficient real-time monitoring, and improves the operating efficiency and safety of the pumping unit.

CN120524613BActive Publication Date: 2025-10-03YANTAI JIERUI NETWORK TRADING
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511020660.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-07-24
Publication Date
2025-10-03
Estimated Expiration
2045-07-24

AI Technical Summary

Technical Problem

Traditional oil pumping unit balance adjustment relies on manual experience, has low accuracy, cannot monitor the operating status in real time, and has large differences among operators, making it difficult to achieve precise balance.

Method used

The digital twin technology is used to build a pumping unit model. Combined with real-time data acquisition from sensors and distributed database management, the position of the balancing block is automatically adjusted through an improved genetic algorithm optimization algorithm to achieve real-time monitoring and balance optimization of the pumping unit.

Benefits of technology

It improves the operating efficiency of pumping units, reduces failure rates and operator labor intensity, promotes the digital transformation of oil fields, and ensures equipment safety and reliability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120524613B_ABST
    Figure CN120524613B_ABST
Patent Text Reader

Abstract

The present invention relates to the field of oilfield mining technology, and in particular discloses an automatic optimization system for pumping unit balance based on digital twin technology. The system comprises a pumping unit digital twin model construction module for geometric modeling, physical modeling, behavioral modeling, and rule modeling; a sensing access and data acquisition module for deploying multiple types of sensors to collect pumping unit operating data in real time; a data management and transmission module for storing and managing the collected data and transmitting the real-time data to the digital twin model; an automatic balance optimization algorithm module for calculating pumping unit balance indicators, establishing an optimization objective function, and using an optimization algorithm to search for the optimal balancing block position; and an intelligent application service module comprising a real-time monitoring submodule, a data analysis submodule, and an optimization and adjustment submodule. The present invention improves pumping unit operating efficiency, reduces pumping unit failure rates, enhances the safety and reliability of oilfield production, reduces operator labor intensity, and promotes the digital transformation of oilfields.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of oilfield exploitation, and in particular to an automatic optimization system for the balance of an oil pumping unit based on digital twin technology. Background Art

[0002] Pumping units are commonly used in oilfield production, and their balance has a significant impact on their operating efficiency and service life. Traditionally, pumping unit balance adjustment relies primarily on manual experience, observing parameters such as motor current and power to determine whether the balance weight position needs to be adjusted. However, this method has the following drawbacks: manual adjustment accuracy is low, making precise balancing difficult; the pumping unit's operating status cannot be monitored in real time, making it difficult to detect balance issues promptly; and the operator's experience requirements are high, resulting in significant variability in adjustment results between different operators.

[0003] In recent years, digital twin technology has been widely applied in various fields. By constructing virtual digital models of physical entities and integrating them with real-time data, digital twin technology enables real-time monitoring, prediction, and optimization of physical entities. In the oilfield sector, digital twin technology has been used for drilling optimization and equipment failure prediction. However, its application in optimizing pumping unit balance is currently limited. Therefore, an automatic pumping unit balance optimization system based on digital twin technology is urgently needed to address this problem. Summary of the Invention

[0004] The purpose of the present invention is to solve the shortcomings existing in the prior art, and to propose an automatic optimization system for the balance of oil pumping units based on digital twin technology. By constructing a digital twin model of the oil pumping unit, the operating status of the oil pumping unit is monitored in real time, and the position of the balancing block is automatically adjusted according to the real-time data, thereby realizing automatic optimization of the balance of the oil pumping unit.

[0005] In order to achieve the above object, the present invention adopts the following technical solutions:

[0006] An automatic optimization system for pumping unit balance based on digital twin technology includes the following modules:

[0007] Pumping unit digital twin model building module: used for geometric modeling, physical modeling, behavioral modeling, and rule modeling;

[0008] Sensing access and data acquisition module: This module deploys various types of sensors at key locations on the pumping unit, including displacement sensors, speed sensors, torque sensors, current sensors, and power sensors. This module collects real-time operating data on the pumping unit, such as crank displacement and speed, motor current and power, and balance block position. The sensor-collected data is then transmitted to the data processing center in real time.

[0009] Data management and transmission module: A distributed database management system is used to store and manage large amounts of collected real-time data. The database management system supports high-concurrency access and efficient data query, meeting the needs of real-time data processing. Through communication protocols such as OPCUA, real-time data of physical entities is transmitted to the digital twin model, ensuring the integrity and security of the data during transmission.

[0010] Automatic balance optimization algorithm module: Based on collected real-time data and combined with the physical and behavioral models in the digital twin model, the module calculates the pumping unit's balance indicators, including motor current fluctuation, power fluctuation, and torque fluctuation. An optimization objective function is established to minimize these balance indicators, while considering constraints such as the balance block's position adjustment range and adjustment speed. The module uses optimization algorithms such as the improved genetic algorithm (IGA) to solve the optimization problem. The algorithm searches for the optimal balance block position by simulating the processes of natural selection and genetic variation.

[0011] Intelligent application service module: includes real-time monitoring sub-module, data analysis sub-module and optimization and adjustment sub-module.

[0012] As a further technical solution of the present invention, the specific workflow of the pumping unit digital twin model construction module includes:

[0013] S11: Geometric Modeling: Use 3D modeling software to construct a geometric model of the pumping unit based on the actual structural drawings of the pumping unit. Accurately model each component, including the precise geometric shape and size of the crank, connecting rod, walking beam, donkey head, sucker rod, balance block, etc., to ensure that the size and shape of the geometric model are consistent with the actual pumping unit.

[0014] S12: Physical Modeling: Based on the material properties and kinematic parameters of the pumping unit, a physical model is established using finite element analysis software. The stress, strain, and motion characteristics of the pumping unit under different operating conditions are simulated using finite element analysis and other methods. The accuracy and reliability of the physical model are verified.

[0015] S13: Behavioral Modeling: Based on the operating rules of the pumping unit, a behavioral model is established, including the pumping unit's motion equations, power equations, torque equations, etc., to describe the pumping unit's dynamic behavior; the correctness of the behavioral model is verified through simulation;

[0016] S14: Rule modeling: Based on the operating experience and operating specifications of the pumping unit, a rule model is established, including balance judgment rules, fault diagnosis rules, optimization and adjustment rules, etc.; the rule model is embedded in the digital twin model.

[0017] As a further technical solution of the present invention, the specific workflow of the sensing access and data acquisition module includes:

[0018] S21: Sensor deployment: Install sensors at key locations on the pumping unit, ensuring the correct installation position and angle.

[0019] S22: Data acquisition: Select high-precision, high-reliability analog-to-digital converters and high-speed communication interfaces to ensure data accuracy and real-time performance; connect the sensor to the data acquisition module, perform signal conditioning and conversion, and convert the analog signal into a digital signal; set the frequency and sampling time interval for data acquisition, and reasonably determine the acquisition frequency based on the operating characteristics and balance adjustment requirements of the pumping unit to ensure real-time performance and integrity of the data; debug and calibrate the data acquisition module to ensure that the collected data is consistent with the actual operating status.

[0020] As a further technical solution of the present invention, the specific workflow of the data management and transmission module includes:

[0021] S31: Distributed Database Management: Select a distributed database management system suitable for industrial real-time data management; design a reasonable database table structure based on the characteristics of the pumping unit data, including data table fields, data types, indexes, etc.; store the collected real-time data in a distributed database to support high-concurrency access and efficient data query; regularly back up and maintain the database to ensure data security and reliability;

[0022] S32: Data transmission protocol: Select industrial standard communication protocols such as OPCUA to ensure the compatibility and security of data during transmission; configure data transmission parameters, including communication port, transmission rate, data format, etc.; set up communication interfaces at the data acquisition end and the digital twin model end to achieve seamless data transmission; monitor and log the data transmission process to promptly detect and handle transmission anomalies.

[0023] As a further technical solution of the present invention, the specific workflow of the balance automatic optimization algorithm module includes:

[0024] S41: Balance assessment: Based on the collected real-time data, combined with the physical model and behavior model in the digital twin model, the balance index of the pumping unit is calculated;

[0025] S42: Optimization objective function: The optimization objective function is the core of balance optimization, which aims to minimize the balance index while considering constraints such as the position adjustment range and adjustment speed of the balance block. The specific conditions are as follows:

[0026] S421: The optimization objective function is: ,in: represents the position variable of the balancing block, α, β, and γ are weight coefficients used to balance the contributions of different indicators;

[0027] S422: The position adjustment of the balancing weight must meet the following constraints:

[0028] Position range constraints: ,in and are the minimum and maximum values ​​of the balance block position respectively;

[0029] Adjust the speed constraint: ,in: and are the current and last adjusted balance block positions respectively, is the maximum adjustment speed of the balancing block;

[0030] S43: Optimization algorithm: Use an improved genetic algorithm (IGA) or other optimization algorithms to solve the optimization problem, initialize the population, and randomly generate the initial population based on the balance block position range of the pumping unit; evaluate the fitness of the population and calculate the fitness value of each individual according to the optimization objective function; perform selection, crossover, and mutation operations to generate a new population; repeat the fitness evaluation and genetic operations until the termination conditions of the optimization algorithm are met, such as reaching the maximum number of iterations or the fitness value converges; output the optimized balance block position as the basis for balance adjustment.

[0031] As a further technical solution of the present invention, the S41 specifically includes:

[0032] S411: Balance assessment: Balance indicators include motor current fluctuation, power fluctuation, torque fluctuation, etc. The balance indicators are used to evaluate the balance of the pumping unit. : ,

[0033] in: For the The motor current value at each sampling point, is the average value of the motor current, is the total number of sampling points; power fluctuation : ,

[0034] in: For the The power value of the sampling point, is the average value of power; torque fluctuation : ,

[0035] in: For the The torque value of each sampling point, is the average value of the torque; the balance index calculated by the above formula can be used to quantitatively evaluate the balance state of the pumping unit;

[0036] S412: Balance judgment: Set the threshold of the balance index. When the index exceeds the threshold, it is judged that there is a problem with the balance of the pumping unit and optimization adjustment is required; motor current fluctuation threshold , power fluctuation threshold , torque fluctuation threshold Optimization adjustment is triggered when the following conditions are met: or or .

[0037] As a further technical solution of the present invention, the S43 specifically includes:

[0038] S431: Initializing the population: In genetic algorithms, the initial state of the population has an important impact on the convergence speed and global search capability of the algorithm;

[0039] Population size: Assume the population size is , each individual represents a possible balance block position ;

[0040] Randomly generate the initial population: each individual The initial position of is randomly generated within the position range of the balancing block:

[0041] ,

[0042] in Indicates generating a uniformly distributed random number in the interval [0, 1]; the initial population is: ;

[0043] S432: Fitness evaluation: used to evaluate the quality of each individual. The higher the fitness, the closer the individual is to the optimal solution. The fitness function is defined as the negative value of the optimization objective function to maximize the fitness value.

[0044] Fitness function: ,in Is the optimization objective function, which represents the comprehensive value of the balance index: ;

[0045] Calculate the fitness value: For each individual , calculate its fitness value:

[0046] ,

[0047] in 、 and They are The motor current fluctuation, power fluctuation and torque fluctuation corresponding to each individual;

[0048] S433: Selection operation: used to select excellent individuals from the current population to generate a new generation of population, using the roulette wheel selection method;

[0049] Selection probability: Calculate the selection probability of each individual: ;

[0050] Roulette wheel selection: based on selection probability , select individuals by roulette method and calculate the cumulative probability : , generates a random number in the interval [0, 1] , choose to meet Individual , repeat the above steps until you select Individuals generate a new generation of population;

[0051] S434: Crossover operation: used to simulate the reproduction process of organisms, generating new individuals by exchanging some genes of two individuals, using the single-point crossover method;

[0052] Crossover probability: Let the crossover probability be ;

[0053] Single-point crossover: Randomly select two parent individuals and , and randomly select an intersection point , generating two offspring individuals and :

[0054] ,

[0055] ,

[0056] in: is the gene length of an individual, Indicates the The individual's genes;

[0057] S435: Mutation operation: used to introduce new genes, increase the diversity of the population, and avoid the algorithm falling into local optimality, using uniform mutation method;

[0058] Mutation probability: Let the mutation probability be ;

[0059] Uniform variation: For each individual , with probability Randomly select a gene , and replace its value with a new value randomly generated within the range of balancing block positions: ;

[0060] S436: Iterative optimization: Repeat fitness evaluation, selection, crossover and mutation operations until the termination condition is met. The termination condition is that the maximum number of iterations is reached. Or the fitness value converges;

[0061] Maximum number of iterations: Set the maximum number of iterations to ;

[0062] Convergence condition: Set the convergence threshold to , the algorithm converges when the following conditions are met: ,in For the The best individual of the generation;

[0063] S437: Output the optimal solution: After multiple generations of iteration, output the optimal individual and its corresponding balance block positions as the result of balance optimization.

[0064] Key technical description:

[0065] Improved genetic algorithm (IGA): By introducing roulette wheel selection, single-point crossover, and uniform mutation operations, IGA can effectively balance global and local search capabilities, improving the algorithm's convergence speed and optimization accuracy.

[0066] Fitness function design: By taking the negative value of the optimization objective function as the fitness function, the minimization problem is transformed into a maximization problem, which facilitates the implementation of the genetic algorithm.

[0067] Constraint processing: After the crossover and mutation operations, check whether the generated new individuals meet the constraints. If not, adjust them to be within the constraints to ensure the feasibility of the algorithm.

[0068] Real-time feedback and adjustment: The results of the optimization algorithm are fed back to the balance block drive device of the pumping unit in real time through the intelligent application service module, realizing automatic adjustment of the balance block position and forming a closed-loop optimization system.

[0069] As a further technical solution of the present invention, the specific workflow of the real-time monitoring submodule includes:

[0070] S511: Based on the digital twin model, a real-time monitoring submodule is developed to display the operating status and balance indicators of the pumping unit in real time;

[0071] S512: The real-time monitoring submodule supports multiple visualization methods, including dynamic 3D model animations driven by digital twin technology, real-time data curves, and alarm information. The dynamic 3D model animations driven by digital twin technology intuitively demonstrate the operation of the pumping unit and the position changes of the balancing block. Real-time display of data curves such as motor current, power, and torque allows operators to understand the operating status of the pumping unit in real time.

[0072] S513: When the balance index exceeds the threshold, an alarm message is issued to remind the operator to handle it in time.

[0073] As a further technical solution of the present invention, the specific workflow of the data analysis submodule includes:

[0074] S521: Using the data analysis submodule, the collected historical data is mined and analyzed. The analysis content includes the change trend of balance indicators, fault pattern identification, optimization effect evaluation, etc.

[0075] S522: Analyze the changing trends of balance indicators over time through data mining algorithms and predict possible balance issues.

[0076] S523: Analyze historical fault data, identify fault modes, and provide a basis for fault diagnosis and prevention;

[0077] S524: Evaluate the balance effect after optimization and adjustment, compare the data before and after optimization, and verify the effectiveness of the optimization algorithm.

[0078] As a further technical solution of the present invention, the specific workflow of the optimization and adjustment submodule includes:

[0079] S531: Automatically adjust the position of the balancing weight according to the result of the optimization algorithm. The optimization adjustment submodule controls the driving device of the balancing weight to achieve precise movement of the balancing weight.

[0080] S532: Setting the adjustment speed and accuracy of the balancing weight to ensure the stability and accuracy of the adjustment process;

[0081] S533: During the adjustment process, the operating status of the pumping unit is monitored in real time to ensure the safety of the adjustment process;

[0082] S534: After the adjustment is completed, re-evaluate the balance indicators to confirm the balance optimization effect.

[0083] The beneficial effects of the present invention are:

[0084] 1. Improve the operating efficiency of the pumping unit: By automatically optimizing the balance of the pumping unit, the motor current fluctuation, power fluctuation and torque fluctuation are reduced, the motor energy consumption is reduced, and the operating efficiency of the pumping unit is improved. This can not only reduce the production cost of the oil field, but also improve the production efficiency of the oil field.

[0085] 2. Reduce the failure rate of oil pumping units: Through the automated adjustment of balance, the failure rate of oil pumping units caused by imbalanced movement, wear of parts and other problems can be significantly reduced.

[0086] 3. Improve the safety and reliability of oilfield production: Real-time monitoring of the operating status and balance indicators of the pumping unit can promptly detect abnormal conditions in equipment operation, take measures in advance to deal with them, avoid equipment failures, and improve the safety and reliability of oilfield production.

[0087] 4. Reduce the labor intensity of operators: Operators do not need to rely on their experience to make manual adjustments at the oil production site, and remote automatic optimization and adjustment of the pumping unit balance is achieved, which reduces the labor intensity of operators and improves the adjustment accuracy.

[0088] 5. Promote the digital transformation of oil fields: The application of digital twin technology in the field of pumping unit balance optimization provides a successful case for the digital transformation of oil fields. Through the application of digital twin technology, the intelligent management and optimization of oilfield equipment are realized, which promotes the technological progress and digital development of the oilfield industry. BRIEF DESCRIPTION OF THE DRAWINGS

[0089] Figure 1 This is a system diagram of the automatic optimization system for pumping unit balance based on digital twin technology proposed in this invention. DETAILED DESCRIPTION

[0090] In order to make the technical means, creative features, objectives and effects achieved by the present invention easier to understand, the present invention is further described below in conjunction with specific implementation methods.

[0091] Please see the attached Figure 1 , an automatic optimization system for pumping unit balance based on digital twin technology, including the following modules:

[0092] Pumping unit digital twin model building module: used for geometric modeling, physical modeling, behavioral modeling, and rule modeling;

[0093] The specific workflow of the pumping unit digital twin model construction module includes:

[0094] S11: Geometric Modeling: Use 3D modeling software to construct a geometric model of the pumping unit based on the actual structural drawings of the pumping unit. Accurately model each component, including the precise geometric shape and size of the crank, connecting rod, walking beam, donkey head, sucker rod, balance block, etc., to ensure that the size and shape of the geometric model are consistent with the actual pumping unit.

[0095] S12: Physical Modeling: Based on the material properties and kinematic parameters of the pumping unit, a physical model is established using finite element analysis software. The stress, strain, and motion characteristics of the pumping unit under different operating conditions are simulated using finite element analysis and other methods. The accuracy and reliability of the physical model are verified.

[0096] S13: Behavioral Modeling: Based on the operating rules of the pumping unit, a behavioral model is established, including the pumping unit's motion equations, power equations, torque equations, etc., to describe the pumping unit's dynamic behavior; the correctness of the behavioral model is verified through simulation;

[0097] S14: Rule modeling: Based on the operating experience and operating specifications of the pumping unit, a rule model is established, including balance judgment rules, fault diagnosis rules, optimization and adjustment rules, etc.; the rule model is embedded in the digital twin model.

[0098] Sensing access and data acquisition module: This module deploys various types of sensors at key locations on the pumping unit, including displacement sensors, speed sensors, torque sensors, current sensors, and power sensors. This module collects real-time operating data on the pumping unit, such as crank displacement and speed, motor current and power, and balance block position. The sensor-collected data is then transmitted to the data processing center in real time.

[0099] The specific workflow of the perception access and data collection module includes:

[0100] S21: Sensor deployment: Install sensors at key locations on the pumping unit, ensuring the correct installation position and angle.

[0101] S22: Data acquisition: Select high-precision, high-reliability analog-to-digital converters and high-speed communication interfaces to ensure data accuracy and real-time performance; connect the sensor to the data acquisition module, perform signal conditioning and conversion, and convert the analog signal into a digital signal; set the frequency and sampling time interval for data acquisition, and reasonably determine the acquisition frequency based on the operating characteristics and balance adjustment requirements of the pumping unit to ensure real-time performance and integrity of the data; debug and calibrate the data acquisition module to ensure that the collected data is consistent with the actual operating status.

[0102] Data management and transmission module: A distributed database management system is used to store and manage large amounts of collected real-time data. The database management system supports high-concurrency access and efficient data query, meeting the needs of real-time data processing. Through communication protocols such as OPCUA, real-time data of physical entities is transmitted to the digital twin model, ensuring the integrity and security of the data during transmission.

[0103] The specific workflow of the data management and transmission module includes:

[0104] S31: Distributed Database Management: Select a distributed database management system suitable for industrial real-time data management; design a reasonable database table structure based on the characteristics of the pumping unit data, including data table fields, data types, indexes, etc.; store the collected real-time data in a distributed database to support high-concurrency access and efficient data query; regularly back up and maintain the database to ensure data security and reliability;

[0105] S32: Data transmission protocol: Select industrial standard communication protocols such as OPCUA to ensure the compatibility and security of data during transmission; configure data transmission parameters, including communication port, transmission rate, data format, etc.; set up communication interfaces at the data acquisition end and the digital twin model end to achieve seamless data transmission; monitor and log the data transmission process to promptly detect and handle transmission anomalies.

[0106] Automatic balance optimization algorithm module: Based on collected real-time data and combined with the physical and behavioral models in the digital twin model, the module calculates the pumping unit's balance indicators, including motor current fluctuation, power fluctuation, and torque fluctuation. An optimization objective function is established to minimize these balance indicators, while considering constraints such as the balance block's position adjustment range and adjustment speed. The module uses optimization algorithms such as the improved genetic algorithm (IGA) to solve the optimization problem. The algorithm searches for the optimal balance block position by simulating the processes of natural selection and genetic variation.

[0107] The specific workflow of the balance automatic optimization algorithm module includes:

[0108] S41: Balance assessment: Based on the collected real-time data, combined with the physical model and behavior model in the digital twin model, the balance index of the pumping unit is calculated;

[0109] S411: Balance assessment: Balance indicators include motor current fluctuation, power fluctuation, torque fluctuation, etc. The balance indicators are used to evaluate the balance of the pumping unit. :

[0110] ,

[0111] in: For the The motor current value at each sampling point, is the average value of the motor current, is the total number of sampling points; power fluctuation :

[0112] ,

[0113] in: For the The power value of the sampling point, is the average value of power; torque fluctuation :

[0114] ,

[0115] in: For the The torque value of each sampling point, is the average value of the torque; the balance index calculated by the above formula can be used to quantitatively evaluate the balance state of the pumping unit;

[0116] S412: Balance judgment: Set the threshold of the balance index. When the index exceeds the threshold, it is judged that there is a problem with the balance of the pumping unit and optimization adjustment is required; motor current fluctuation threshold , power fluctuation threshold , torque fluctuation threshold Optimization adjustment is triggered when the following conditions are met: or or ;

[0117] S42: Optimization objective function: The optimization objective function is the core of balance optimization, which aims to minimize the balance index while considering constraints such as the position adjustment range and adjustment speed of the balance block. The specific conditions are as follows:

[0118] S421: The optimization objective function is: ,

[0119] in: represents the position variable of the balancing block, α, β, and γ are weight coefficients used to balance the contributions of different indicators;

[0120] S422: The position adjustment of the balancing weight must meet the following constraints:

[0121] Position range constraints: ,

[0122] in and are the minimum and maximum values ​​of the balance block position respectively;

[0123] Adjust the speed constraint: ,

[0124] in: and are the current and last adjusted balance block positions respectively, is the maximum adjustment speed of the balancing block;

[0125] S43: Optimization algorithm: Use an improved genetic algorithm (IGA) or other optimization algorithm to solve the optimization problem, initialize the population, and randomly generate the initial population based on the balance block position range of the pumping unit; evaluate the fitness of the population and calculate the fitness value of each individual according to the optimization objective function; perform selection, crossover, and mutation operations to generate a new population; repeat the fitness evaluation and genetic operations until the termination condition of the optimization algorithm is met, such as reaching the maximum number of iterations or the fitness value converges; output the optimized balance block position as the basis for balance adjustment;

[0126] S431: Initializing the population: In genetic algorithms, the initial state of the population has an important impact on the convergence speed and global search capability of the algorithm;

[0127] Population size: Assume the population size is , each individual represents a possible balance block position ;

[0128] Randomly generate the initial population: each individual The initial position of is randomly generated within the position range of the balancing block:

[0129] ,

[0130] in Indicates generating a uniformly distributed random number in the interval [0, 1]; the initial population is: ;

[0131] S432: Fitness evaluation: used to evaluate the quality of each individual. The higher the fitness, the closer the individual is to the optimal solution. The fitness function is defined as the negative value of the optimization objective function to maximize the fitness value.

[0132] Fitness function:

[0133] ,

[0134] in Is the optimization objective function, which represents the comprehensive value of the balance index: ;

[0135] Calculate the fitness value: For each individual , calculate its fitness value:

[0136] ,

[0137] in 、 and They are The motor current fluctuation, power fluctuation and torque fluctuation corresponding to each individual;

[0138] S433: Selection operation: used to select excellent individuals from the current population to generate a new generation of population, using the roulette wheel selection method;

[0139] Selection probability: Calculate the selection probability of each individual: ;

[0140] Roulette wheel selection: based on selection probability , select individuals by roulette method and calculate the cumulative probability : , generates a random number in the interval [0, 1] , choose to meet Individual , repeat the above steps until you select Individuals generate a new generation of population;

[0141] S434: Crossover operation: used to simulate the reproduction process of organisms, generating new individuals by exchanging some genes of two individuals, using the single-point crossover method;

[0142] Crossover probability: Let the crossover probability be ;

[0143] Single-point crossover: Randomly select two parent individuals and , and randomly select an intersection point , generating two offspring individuals and :

[0144] ,

[0145] ,

[0146] in: is the gene length of an individual, Indicates the The individual's genes;

[0147] S435: Mutation operation: used to introduce new genes, increase the diversity of the population, and avoid the algorithm falling into local optimality, using uniform mutation method;

[0148] Mutation probability: Let the mutation probability be ;

[0149] Uniform variation: For each individual , with probability Randomly select a gene , and replace its value with a new value randomly generated within the range of balancing block positions:

[0150] ;

[0151] S436: Iterative optimization: Repeat fitness evaluation, selection, crossover and mutation operations until the termination condition is met. The termination condition is that the maximum number of iterations is reached. Or the fitness value converges;

[0152] Maximum number of iterations: Set the maximum number of iterations to ;

[0153] Convergence condition: Set the convergence threshold to , the algorithm converges when the following conditions are met:

[0154] ,

[0155] in For the The best individual of the generation;

[0156] S437: Output the optimal solution: After multiple generations of iteration, output the optimal individual and its corresponding balance block positions as the result of balance optimization.

[0157] Key technical description:

[0158] Improved genetic algorithm (IGA): By introducing roulette wheel selection, single-point crossover, and uniform mutation operations, IGA can effectively balance global and local search capabilities, improving the algorithm's convergence speed and optimization accuracy.

[0159] Fitness function design: By taking the negative value of the optimization objective function as the fitness function, the minimization problem is transformed into a maximization problem, which facilitates the implementation of the genetic algorithm.

[0160] Constraint processing: After the crossover and mutation operations, check whether the generated new individuals meet the constraints. If not, adjust them to be within the constraints to ensure the feasibility of the algorithm.

[0161] Real-time feedback and adjustment: The results of the optimization algorithm are fed back to the balance block drive device of the pumping unit in real time through the intelligent application service module, realizing automatic adjustment of the balance block position and forming a closed-loop optimization system.

[0162] Intelligent application service module: including real-time monitoring submodule, data analysis submodule and optimization and adjustment submodule;

[0163] The specific workflow of the real-time monitoring submodule includes:

[0164] S511: Based on the digital twin model, a real-time monitoring submodule is developed to display the operating status and balance indicators of the pumping unit in real time;

[0165] S512: The real-time monitoring submodule supports multiple visualization methods, including dynamic 3D model animations driven by digital twin technology, real-time data curves, and alarm information. The dynamic 3D model animations driven by digital twin technology intuitively demonstrate the operation of the pumping unit and the position changes of the balancing block. Real-time display of data curves such as motor current, power, and torque allows operators to understand the operating status of the pumping unit in real time.

[0166] For dynamic 3D model animations driven by digital twin technology, a precise 3D model of the pumping unit is constructed using 3D modeling software (such as 3ds Max or Maya). This model is then combined with actual operating data using a real-time rendering engine (such as Unity or Unreal Engine), enabling dynamic animation based on the actual data. For example, when the pumping unit is actually operating, the position changes of the balancing weight are reflected in real time in the dynamic 3D model animation driven by digital twin technology. An interpolation algorithm is used to smoothly display the process of the balancing weight moving from one position to another. The interpolation formula can be expressed as:

[0167] ,

[0168] in: is the initial position of the balancing block, is the target position of the balancing weight, is a time parameter, between 0 and 1.

[0169] For real-time data curves, the collected motor current, power, torque and other data are plotted in time series. Taking the motor current curve as an example, a line graph can be used to represent it, with the horizontal axis being time and the vertical axis being current value. A sliding window averaging algorithm can be used to smooth the curve and reduce noise interference. The sliding window averaging formula is:

[0170] ,

[0171] in: It is The smoothed current value at each time point is It is The actual current sampling value at a time point, is the size of the sliding window.

[0172] S513: When the balance index exceeds the threshold, an alarm message is issued to remind the operator to deal with it in time;

[0173] When the balance index (such as balance rate) exceeds the threshold, an alarm message is issued. The balance rate calculation formula is:

[0174] ,

[0175] in: is the upstroke motor power, is the motor power during the downstroke; set the threshold value of the balance rate (such as ), when the calculated balance rate When an alarm is triggered, the operator can be reminded by sound alarm (such as a buzzer emitting an alarm sound of 80dB or above) and visual alarm (such as a red flashing alarm prompt box popping up on the monitoring interface).

[0176] The specific workflow of the data analysis submodule includes:

[0177] S521: Using the data analysis submodule, the collected historical data is mined and analyzed. The analysis content includes the change trend of balance indicators, fault pattern identification, optimization effect evaluation, etc.

[0178] S522: Analyze the changing trends of balance indicators over time through data mining algorithms and predict possible balance issues.

[0179] For the analysis of the changing trend of the balance index, a time series analysis algorithm can be used. For example, the moving average method is used to analyze the changing trend of the balance rate over time. The moving average formula is:

[0180] ,

[0181] in: It is The trend estimate at each time point, It is The actual balance rate value at a time point, is the window size of the moving average.

[0182] S523: Analyze historical fault data, identify fault modes, and provide a basis for fault diagnosis and prevention;

[0183] For fault pattern recognition, clustering algorithms (such as Mean clustering) is used to analyze historical fault data. Taking motor current anomalies as an example, the collected motor current fault data (including current peak value, duration, and other characteristics) is used as samples. Different fault modes are divided by calculating the distance between samples (such as Euclidean distance). In the clustering process, the distance formula between samples is:

[0184] ,

[0185] in: It is a sample and samples The distance between and The samples are and samples In the The value of a feature dimension.

[0186] S524: Evaluate the balance effect after optimization and adjustment, compare the data before and after optimization, and verify the effectiveness of the optimization algorithm;

[0187] The optimization effect can be evaluated by comparing the balance indicators before and after optimization. For example, the balance rate difference before and after optimization can be calculated. The balance rate difference formula before and after optimization is: ,in: is the optimized balance rate, is the balance rate before optimization; at the same time, the system efficiency improvement after optimization can also be calculated. The system efficiency formula is:

[0188] ,

[0189] in: is the effective output power of the pumping unit, is the total power input to the pumping system; by comparing the system efficiency before and after optimization, the effectiveness of the optimization algorithm is verified.

[0190] The specific workflow of optimizing and adjusting the sub-module includes:

[0191] S531: Automatically adjust the position of the balancing weight according to the result of the optimization algorithm. The optimization adjustment submodule controls the driving device of the balancing weight to achieve precise movement of the balancing weight.

[0192] S532: Setting the adjustment speed and accuracy of the balancing weight to ensure the stability and accuracy of the adjustment process;

[0193] The adjustment speed can be set according to the performance of the motor drive device. Assuming that the maximum speed of the motor drive device is (Unit: rpm), through the gear ratio To calculate the linear velocity of the balance block ,in is the diameter of the driving wheel;

[0194] Adjustment accuracy can be ensured through closed-loop control. A position sensor (such as an encoder) is used to feedback the actual position of the balancing weight, which is compared with the target position. The PID control algorithm is used to adjust the motor drive signal to move the balancing weight to the accurate position. The PID control formula is:

[0195] ,

[0196] in: is the output signal of the controller, 、 、 are proportional, integral and differential control parameters respectively, is the deviation between the target position and the actual position.

[0197] S533: During the adjustment process, the operating status of the pumping unit is monitored in real time to ensure the safety of the adjustment process;

[0198] The sensor data such as motor current, power, torque, etc. can be used to determine whether the adjustment process is safe by setting a safety threshold. For example, the safety threshold of motor power is set to , when the monitored motor power When the balance block is adjusted, the adjustment will be stopped immediately and an alarm signal will be issued.

[0199] S534: After the adjustment is completed, re-evaluate the balance indicators to confirm the balance optimization effect.

[0200] Balance rate can be recalculated and compare it with the balance rate before optimization to confirm whether the balance is optimized; at the same time, the mechanical properties of the pumping unit can be re-evaluated through simulation analysis software (such as ANSYS), and the stress distribution and deformation of the pumping unit beam can be calculated to ensure the structural safety after the balance adjustment.

[0201] The stress calculation formula in finite element analysis can usually be expressed as: (simplified uniform stress case), where: is stress, is the force, is the force-bearing area.

[0202] From the above description, it can be seen that the above-mentioned embodiments of the present invention achieve the following technical effects: deep integration of digital twins and pumping unit balance optimization: applying digital twin technology to the field of pumping unit balance optimization, and constructing a digital twin model of the pumping unit, real-time monitoring of the pumping unit's operating status and accurate assessment of its balance are achieved; this deep integration provides a new technical means for pumping unit balance optimization, breaking through the limitations of traditional manual adjustment.

[0203] Real-time data-driven automatic optimization and adjustment: Utilizing real-time collected pumping unit operating data, combined with the physical and behavioral models within the digital twin model, the balance of the pumping unit is assessed in real time, and the position of the balancing block is automatically adjusted through an optimization algorithm. This real-time data-driven automatic optimization and adjustment method can quickly respond to changes in the pumping unit's operating status, achieve dynamic optimization of balance, and improve the pump's operating efficiency and service life.

[0204] Application of an improved genetic algorithm in pumping unit balance optimization: An improved genetic algorithm (IGA) is used to solve the pumping unit balance optimization problem. By introducing new selection, crossover, and mutation operations, the improved genetic algorithm improves the algorithm's convergence speed and optimization accuracy, and can more effectively search for the optimal balancing block position, providing reliable algorithm support for pumping unit balance optimization.

[0205] Comprehensive support for intelligent application services: This system provides intelligent application services such as real-time monitoring, data analysis, and optimization and adjustment, forming a complete pumping unit balance optimization solution. The real-time monitoring module intuitively displays the pumping unit's operating status and balance indicators, allowing operators to understand the equipment's operating status in real time. The data analysis module mines and analyzes historical data to provide a basis for fault diagnosis and optimization effect evaluation. The optimization and adjustment module automatically adjusts the position of the balancing block based on the results of the optimization algorithm, achieving automatic balance optimization. The comprehensive support of these intelligent application services enhances the automation and intelligence level of pumping unit balance optimization.

[0206] Those skilled in the art should understand that the discussion of any of the above embodiments is merely illustrative and is not intended to imply that the scope of the present invention is limited to these examples. Within the scope of the present invention, the technical features in the above embodiments or different embodiments may be combined, the steps may be implemented in any order, and there are many other variations of the different aspects of the present invention as described above, which are not provided in detail for the sake of simplicity.

[0207] The present invention is intended to cover all such substitutions, modifications and variations that fall within the broad scope of the specification. Therefore, any omissions, modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the scope of protection of the present invention.

Claims

1. An automatic optimization system for pumping unit balance based on digital twin technology, characterized in that: Includes the following modules: Pumping unit digital twin model building module: used for geometric modeling, physical modeling, behavioral modeling, and rule modeling; S11: Geometric modeling: Use 3D modeling software to construct a geometric model of the pumping unit based on the actual structural drawings of the pumping unit. Accurately model each component to ensure that the size and shape of the geometric model are consistent with the actual pumping unit. S12: Physical Modeling: Based on the material properties and kinematic parameters of the pumping unit, use finite element analysis software to establish a physical model; simulate the stress, strain, and motion characteristics of the pumping unit under different operating conditions; and verify the accuracy and reliability of the physical model; S13: Behavioral modeling: Based on the operating rules of the pumping unit, a behavioral model is established to describe the dynamic behavior of the pumping unit; the correctness of the behavioral model is verified through simulation; S14: Rule modeling: Based on the operating experience and operating specifications of the pumping unit, a rule model is established; the rule model is embedded into the digital twin model; Sensing access and data acquisition module: This module is used to deploy various types of sensors at key locations on the pumping units to collect real-time operating data from the units and transmit the data collected by the sensors to the data processing center in real time. Data management and transmission module: uses a distributed database management system to store and manage large amounts of collected real-time data; transmits real-time data of physical entities to the digital twin model through communication protocols; Automatic balance optimization algorithm module: Based on the collected real-time data, combined with the physical model and behavioral model in the digital twin model, the balance index of the pumping unit is calculated; an optimization objective function is established to minimize the balance index; and an optimization algorithm is used to solve the optimization problem. The optimization algorithm searches for the optimal balance block position by simulating the process of natural selection and genetic variation. S41: Balance assessment: Based on the collected real-time data, combined with the physical model and behavior model in the digital twin model, the balance index of the pumping unit is calculated; S411: Balance assessment: Evaluate the balance of the pumping unit through balance indicators, motor current fluctuations : ,in: For the The motor current value at each sampling point, is the average value of the motor current, is the total number of sampling points; power fluctuation : ,in: For the The power value of the sampling point, is the average value of power; torque fluctuation : ,in: For the The torque value of each sampling point, is the average value of the torque; S412: Balance judgment: Set the threshold of the balance index. When the index exceeds the threshold, it is judged that there is a problem with the balance of the pumping unit and optimization adjustment is required; motor current fluctuation threshold , power fluctuation threshold , torque fluctuation threshold Optimization adjustment is triggered when the following conditions are met: or or ; S42: Optimization objective function: aims to minimize the balance index, as follows: S421: The optimization objective function is: ,in: represents the position variable of the balancing block, 、 、 is the weight coefficient; S422: The position adjustment of the balancing weight must meet the following constraints: Position range constraints: ,in and are the minimum and maximum values ​​of the balance block position respectively; Adjust the speed constraint: ,in: and are the current and last adjusted balance block positions respectively, is the maximum adjustment speed of the balancing block; S43: Optimization algorithm: Select an optimization algorithm to solve the optimization problem, initialize the population, and randomly generate the initial population according to the balance block position range of the pumping unit; evaluate the fitness of the population and calculate the fitness value of each individual according to the optimization objective function; perform selection, crossover and mutation operations to generate a new population; repeat the fitness evaluation and genetic operation until the termination condition of the optimization algorithm is met; output the optimized balance block position as the basis for balance adjustment. Intelligent application service module: includes real-time monitoring sub-module, data analysis sub-module and optimization and adjustment sub-module.

2. The automatic optimization system for pumping unit balance based on digital twin technology according to claim 1 is characterized in that: The specific workflow of the sensing access and data acquisition module includes: S21: Sensor deployment: Install sensors at key locations on the pumping unit, ensuring the correct installation position and angle. S22: Data acquisition: Select high-precision, high-reliability analog-to-digital converters and high-speed communication interfaces; connect the sensor to the data acquisition module, perform signal conditioning and conversion, and convert the analog signal into a digital signal; set the frequency and sampling time interval for data acquisition, and reasonably determine the acquisition frequency based on the operating characteristics and balance adjustment requirements of the pumping unit; debug and calibrate the data acquisition module to ensure that the collected data is consistent with the actual operating status.

3. The automatic optimization system for pumping unit balance based on digital twin technology according to claim 1 is characterized in that: The specific workflow of the data management and transmission module includes: S31: Distributed Database Management: Select a distributed database management system suitable for industrial real-time data management; design a reasonable database table structure based on the characteristics of pumping unit data; store collected real-time data in a distributed database to support high-concurrency access and efficient data query; and regularly back up and maintain the database. S32: Data transmission protocol: Select industrial standard communication protocols, configure data transmission parameters, set up communication interfaces at the data acquisition end and the digital twin model end respectively to achieve seamless data transmission; monitor and log the data transmission process to promptly detect and handle transmission anomalies.

4. The automatic optimization system for pumping unit balance based on digital twin technology according to claim 1 is characterized in that: The S43 specifically includes: S431: Initializing the population: In genetic algorithms, the initial state of the population has an important impact on the convergence speed and global search capability of the algorithm; Population size: Assume the population size is , each individual represents a possible balance block position ; Randomly generate the initial population: each individual The initial position of is randomly generated within the position range of the balancing block: ,in Indicates generating a uniformly distributed random number in the interval [0, 1]; the initial population is: ; S432: Fitness evaluation: used to evaluate the quality of each individual. The higher the fitness, the closer the individual is to the optimal solution. The fitness function is defined as the negative value of the optimization objective function to maximize the fitness value. Fitness function: ,in Is the optimization objective function, which represents the comprehensive value of the balance index: ; Calculate the fitness value: For each individual , calculate its fitness value: ,in 、 and They are The motor current fluctuation, power fluctuation and torque fluctuation corresponding to each individual; S433: Selection operation: used to select excellent individuals from the current population to generate a new generation of population, using the roulette wheel selection method; Selection probability: Calculate the selection probability of each individual: ; Roulette wheel selection: based on selection probability , select individuals by roulette method and calculate the cumulative probability : , generates a random number in the interval [0, 1] , choose to meet Individual , repeat the above steps until you select Individuals generate a new generation of population; S434: Crossover operation: used to simulate the reproduction process of organisms, generating new individuals by exchanging some genes of two individuals, using the single-point crossover method; Crossover probability: Let the crossover probability be ; Single-point crossover: Randomly select two parent individuals and , and randomly select an intersection point , generating two offspring individuals and : , , in: is the gene length of an individual, Indicates the The individual's genes; S435: Mutation operation: used to introduce new genes, increase the diversity of the population, and avoid the algorithm falling into local optimality, using uniform mutation method; Mutation probability: Let the mutation probability be ; Uniform variation: For each individual , with probability Randomly select a gene , and replace its value with a new value randomly generated within the range of balancing block positions: ; S436: Iterative optimization: Repeat fitness evaluation, selection, crossover and mutation operations until the termination condition is met. The termination condition is that the maximum number of iterations is reached. Or the fitness value converges; Maximum number of iterations: Set the maximum number of iterations to ; Convergence condition: Set the convergence threshold to , the algorithm converges when the following conditions are met: ,in For the The best individual of the generation; S437: Output the optimal solution: After multiple generations of iteration, output the optimal individual and its corresponding balance block positions as the result of balance optimization.

5. The automatic optimization system for pumping unit balance based on digital twin technology according to claim 1 is characterized in that: The specific workflow of the real-time monitoring submodule includes: S511: Based on the digital twin model, a real-time monitoring submodule is developed to display the operating status and balance indicators of the pumping unit in real time; S512: The real-time monitoring submodule supports multiple visualization methods to intuitively display the operation process of the pumping unit and the position changes of the balance block. It also displays data curves in real time, making it easy for operators to understand the operating status of the pumping unit in real time. S513: When the balance index exceeds the threshold, an alarm message is issued to remind the operator to handle it in time.

6. The automatic optimization system for pumping unit balance based on digital twin technology according to claim 5 is characterized in that: The specific workflow of the data analysis submodule includes: S521: Using the data analysis submodule, mining and analyzing the collected historical data; S522: Analyze the changing trends of balance indicators over time through data mining algorithms and predict possible balance issues. S523: Analyze historical fault data, identify fault modes, and provide a basis for fault diagnosis and prevention; S524: Evaluate the balance effect after optimization and adjustment, compare the data before and after optimization, and verify the effectiveness of the optimization algorithm.

7. The automatic optimization system for pumping unit balance based on digital twin technology according to claim 6 is characterized in that: The specific workflow of the optimization and adjustment submodule includes: S531: Automatically adjust the position of the balancing weight according to the result of the optimization algorithm. The optimization adjustment submodule controls the driving device of the balancing weight to achieve precise movement of the balancing weight. S532: Setting the adjustment speed and accuracy of the balancing weight to ensure the stability and accuracy of the adjustment process; S533: During the adjustment process, the operating status of the pumping unit is monitored in real time to ensure the safety of the adjustment process; S534: After the adjustment is completed, re-evaluate the balance indicators to confirm the balance optimization effect.

Citation Information

Patent Citations

  • Petroleum pumping unit digital twin system construction method

    CN115145229A

  • Three-dimensional modeling method and system for oil field equipment facilities based on digital twinning

    CN119203790A