A method for designing a petroleum equipment control system
By designing the basic architecture and encapsulated functional modules of Eapp, the problems of self-contained code and poor interchangeability in petroleum machinery control systems have been solved, achieving modular design, reducing maintenance costs and improving system reliability.
Patent Information
- Application Number
- CN202110915215.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-08-10
- Publication Date
- 2025-12-30
- Estimated Expiration
- 2041-08-10
AI Technical Summary
Existing petroleum machinery control system software development suffers from problems such as self-contained code, difficulty in standardizing programming, poor interchangeability, high maintenance costs, cumbersome operation, reliance on buses for information exchange between various equipment control systems, inability to interconnect software, reliance on third parties for auxiliary functions, and vague process flow definitions.
The basic Eapp architecture is adopted, dividing the interface layer and data layer, establishing encapsulated functional modules, including system Eapp library and application Eapp library, reserving interface pins, calling or creating functional modules, setting pin parameters, and realizing modular design.
The modular design of the oil equipment control system was realized, which reduced maintenance costs, improved code readability and interchangeability, simplified program segment jumps, ensured that each functional module was independently encapsulated, and reduced the risk of code omissions.
Smart Images

Figure CN115904355B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of petroleum equipment automation control technology, and relates to a design method for a petroleum equipment control system. Background Technology
[0002] In the traditional design model of petroleum machinery control systems, software development suffers from several problems: programming code is often isolated based on the programmer's individual style, making integration difficult and hindering the implementation of standardized programming; many code segments are not categorized and encapsulated, resulting in low readability and poor interchangeability; software maintenance costs are high, operations are cumbersome, and program segment jumps are complex and intertwined; interconnection between various software platforms is difficult, and the integration of software from major manufacturers is low; software cannot be interconnected, and information exchange between different equipment control systems relies on buses, meaning development platforms are not truly interconnected; it is difficult to focus on code quality; auxiliary functions rely on third parties; the definition of the process flow is vague, and the implementation code for the process flow is relatively fragmented, emphasizing procedural aspects, making this part of the code easy to omit in program blocks. Summary of the Invention
[0003] The purpose of this invention is to provide a design method for a petroleum equipment control system, which solves the problems of high maintenance costs, cumbersome operation, and complex program segment jumps in existing software.
[0004] The technical solution adopted in this invention is a design method for a control system of petroleum equipment, which is implemented according to the following steps:
[0005] Step 1: Establish the basic architecture of Eapp, including the interface layer and the data layer;
[0006] Step 2: Divide the data layer from Step 1 into a system Eapp library and an application Eapp library according to the requirements;
[0007] Step 3: Based on the system Eapp library and application Eapp library divided in Step 2, respectively, encapsulate functional modules, and reserve interface pins for each functional module;
[0008] Step 4: Call the functional module in Step 3 or create a new functional module, and reserve interface pins;
[0009] Step 5: Set the pin parameters of the functional modules called or created in Step 4, so that each actual or formal parameter is connected to the pin of the specified variable or other functional modules, thus combining all functional modules.
[0010] The invention is further characterized in that,
[0011] In step 1, the interface layer is connected to the oil machinery controller and the data layer respectively, and is used to receive data from the oil machinery controller and receive data processed by the data layer and returned to the oil machinery controller.
[0012] The data layer is used to determine whether the oil machinery controller data received by the interface layer has entered the buffer area and is cached. The buffer area returns the data to the interface layer. If so, a pointer is passed to the buffer area and the cached data is returned to the interface layer. If not, the API function is passed to perform the calculation, the calculation result is passed to the buffer area, and the cached data is returned to the interface layer.
[0013] In step 3, the functional modules for creating the package in the system Eapp library include system settings, process type, display settings, and hardware configuration;
[0014] System settings are used to configure system data, set hierarchical permissions, and specify priorities;
[0015] The process type is used to select the type of equipment operation process;
[0016] Display settings are used to process various visual information on touchscreens or control panels;
[0017] Hardware configuration is used to specify hardware parameters and configure the hardware network.
[0018] The system settings are used to select equipment types according to operational needs, lock specific oil machinery, configure the main function, extract the characteristic content of specific oil machinery, and classify specific oil machinery into three levels: high, medium, and low, according to the scale and control difficulty of the specific oil machinery control object.
[0019] Display settings are used to select the display format, specify the communication method with the oil machinery controller, and configure controls and variables.
[0020] In step 3, the encapsulated functional modules built using the Eapp library include instrumentation, remote services, online programming, history and trends, alarms and archiving, transmission settings, and auxiliary functions.
[0021] Instruments and meters are used to process various instruments and sensor signals from equipment;
[0022] Remote services are used to communicate with other integrated platforms or the cloud;
[0023] Online programming is used to configure random codes;
[0024] Historical data and trends are used to record data needed during the operation of packaging equipment, and to make predictions or calculations.
[0025] Alarms and archiving are used to process device alarms and store data encapsulated in history and trends;
[0026] The transmission settings are used to encapsulate the conventional and optimized algorithms for transmission composite control for later use;
[0027] The auxiliary functions are used to write auxiliary programs, forming auxiliary blocks, which can be selected and called.
[0028] Instrumentation is used to select the type of instrument or sensor, configure the signal transmission format and direction, and transmit the signal to the specified instrument or sensor address interface.
[0029] Remote services are used to select the type of remote service, configure the transmission protocol and transmission method, and transmit data packets to the specified interface to communicate with other integrated platforms or the cloud.
[0030] The transmission settings are used to select the transmission control mode of electro-hydraulic hybrid or frequency conversion transmission. If other transmission control modes exist, they can be obtained through online programming.
[0031] Step 4 is as follows:
[0032] If the required functional module already exists in the system Eapp library and the application Eapp library, it can be called directly;
[0033] If the required functional module does not exist in the system Eapp library or the application Eapp library, then the required functional module should be encapsulated and the interface pins should be reserved as needed.
[0034] The beneficial effects of this invention are:
[0035] (1) The design method of the oil equipment control system of the present invention can handle complex and repetitive programming tasks by establishing encapsulated functional modules, with low maintenance costs, simple operation, convenient and smooth program segment jump, and the code is encapsulated and not easy to miss.
[0036] (2) The oil equipment control system designed by the oil equipment control system design method of the present invention has high reliability, and each functional module exists independently of the hardware and is classified and packaged, with high readability and interchangeability, reducing the maintenance cost of the system. Attached Figure Description
[0037] Figure 1 This is a diagram showing the composition of functional modules in a design method for a petroleum equipment control system according to the present invention.
[0038] Figure 2 This is a basic architecture diagram of Eapp in a design method for a petroleum equipment control system according to the present invention;
[0039] Figure 3 This is a diagram showing the system setup in a design method for a petroleum equipment control system according to the present invention.
[0040] Figure 4 This is a composition diagram of process types in a design method for a petroleum equipment control system according to the present invention;
[0041] Figure 5This is a diagram showing the composition of instruments and meters in a design method for a petroleum equipment control system according to the present invention;
[0042] Figure 6 This is a diagram illustrating the composition of remote services in a design method for a petroleum equipment control system according to the present invention.
[0043] Figure 7 This is a diagram showing the components of online programming in a design method for a petroleum equipment control system according to the present invention.
[0044] Figure 8 This is a diagram showing the components of a design method for a petroleum equipment control system according to the present invention;
[0045] Figure 9 This is a hardware configuration diagram of a design method for a petroleum equipment control system according to the present invention.
[0046] Figure 10 This is a diagram showing the historical and trend components of a design method for a petroleum equipment control system according to the present invention.
[0047] Figure 11 This is a diagram showing the composition of alarm and archiving in a design method for a petroleum equipment control system according to the present invention;
[0048] Figure 12 This is a diagram showing the transmission setup in a design method for a petroleum equipment control system according to the present invention.
[0049] Figure 13 This is a diagram showing the composition of auxiliary functions in a design method for a petroleum equipment control system according to the present invention.
[0050] In the diagram, 1. System Settings; 2. Process Type; 3. Instrumentation; 4. Remote Service; 5. Online Programming; 6. Display Settings; 7. Hardware Configuration; 8. History and Trends; 9. Alarms and Archives; 10. Transmission Settings; 11. Auxiliary Functions. Detailed Implementation
[0051] The present invention will now be described in detail with reference to the accompanying drawings and specific embodiments.
[0052] This invention provides a design method for a control system of petroleum equipment, which is implemented according to the following steps:
[0053] Step 1: Establish the basic architecture of Eapp (Electric app);
[0054] like Figure 2 As shown, the basic architecture of Eapp includes an interface layer and a data layer;
[0055] The interface layer is connected to the oil machinery controller and the data layer respectively, and is used to receive data from the oil machinery controller and receive data processed by the data layer and returned to the oil machinery controller.
[0056] The data layer is used to determine whether the oil machinery controller data received by the interface layer has entered the buffer area and is cached (temporarily stored). The data is then returned to the interface layer from the buffer area. If so, a pointer is passed to the buffer area and the cached data is returned to the interface layer. If not, the data is passed to an API function for calculation, the calculation result is passed to the buffer area, and the cached data is returned to the interface layer.
[0057] The decision to enter the buffer is based on the amount of data output from the data layer. If the amount of output data exceeds the size of the data transmission instruction packet, the pointer is passed to the buffer; otherwise, it is passed to the API function for calculation.
[0058] Step 2: Divide the data layer from Step 1 into a system Eapp library and an application Eapp library according to the requirements;
[0059] Step 3: Based on the system Eapp library and application Eapp library divided in Step 2, respectively, encapsulate functional modules, and reserve interface pins for each functional module;
[0060] like Figure 1 As shown, (1) the functional modules for creating the encapsulation in the system Eapp library include system settings 1, process type 2, display settings 6, and hardware configuration 7;
[0061] like Figure 3 As shown, System Setting 1 is used to configure system data, that is, to set hierarchical permissions and specify priorities; specifically, it is used to select equipment types according to operational needs, lock specific oil machinery, configure the main function (select functions from existing technologies according to program requirements to meet program requirements), extract the control objects, parameters, and other content describing the characteristics of specific oil machinery, and classify specific oil machinery into three levels: high, medium, and low according to the scale and control difficulty of the specific oil machinery control objects. That is, high level is when the scale and control difficulty of the specific oil machinery control objects are large, medium level is when the scale and control difficulty of the specific oil machinery control objects are large or small, and low level is when the scale and control difficulty of the specific oil machinery control objects are small.
[0062] like Figure 4 As shown, process type 2 is used to select the type of equipment operation process. The process type is determined according to the operation process of the petroleum machinery. If a process not included in the process type is required, it is connected to online programming 5 through the interface layer. Online programming 5 performs online programming and sets a pointer to import the program into process type 2.
[0063] like Figure 7As shown, display setting 6 is used to process various visual information on the touch screen or operation panel; specifically, it is used to select the display format, which includes one of charts, data text or symbols, specify the communication format with the oil machinery controller, and configure controls and variables.
[0064] like Figure 8 As shown, hardware configuration 7 is used to specify hardware parameters and configure the hardware network; specifically, it is used to select the oil machinery controller, specify the network communication method, and configure interface control variables.
[0065] (2) The encapsulated functional modules built in the Eapp library include Instrumentation 3, Remote Service 4, Online Programming 5, History and Trends 8, Alarm and Archiving 9, Transmission Settings 10, and Auxiliary Functions 11.
[0066] like Figure 5 As shown, instrument 3 is used to process various instrument and sensor signals of the equipment; specifically, it is used to select the instrument or sensor type, configure the signal transmission form and transmission direction, and transmit the signal to the specified instrument or sensor address interface.
[0067] like Figure 6 As shown, remote service 4 is used to communicate with other integration platforms or clouds (various private or public cloud servers in the prior art); specifically, it is used to select the type of remote service, configure the transmission protocol and transmission method, and transmit data packets to the specified interface to communicate with other integration platforms or clouds.
[0068] like Figure 12 As shown, Online Programming 5 is used to configure random codes.
[0069] like Figure 9 As shown, History and Trend 8 is used to encapsulate the data that needs to be recorded during device operation and to make predictions or calculations; specifically, it is used to select the storage method, storage area, and configure the recording format, thereby encapsulating the data that needs to be recorded during device operation and making predictions or calculations based on the encapsulated data.
[0070] like Figure 10 As shown, Alarm and Archive 9 is used to process device alarms and store the data encapsulated in History and Trend 8; specifically, Alarm and Archive 9 has alarm variables set, which are called bit by bit to process the alarm code segment, then the record format is configured and archived.
[0071] like Figure 11As shown, transmission setting 10 is used to encapsulate conventional and optimized algorithms for transmission composite control for use, such as conventional PID algorithms, optimized expert systems, or fuzzy PID algorithms. Specifically, it is used to select the transmission control mode of electro-hydraulic composite or frequency conversion transmission, call the code segment of the corresponding transmission control mode, and if there is a transmission control mode not included in transmission setting 10, it connects to online programming 5 through the interface layer, performs online programming in online programming 5, and sets a pointer to import the program into transmission setting 10.
[0072] like Figure 13 As shown, auxiliary function 11 is used to write auxiliary programs to form auxiliary blocks for selection and calling.
[0073] Step 4: Call the functional module from Step 3 or create a new functional module;
[0074] If the required functional module already exists in the system Eapp library and the application Eapp library, it can be called directly, that is, the required functional module is dragged into the main function of the programming platform (select the function in the existing technology according to the program requirements and configure it to meet the program requirements);
[0075] If the required functional module does not exist in the system Eapp library or the application Eapp library, then the required functional module should be encapsulated and the interface pins should be reserved as needed.
[0076] Step 5: Set the pin parameters of the functional modules called or created in Step 4, so that each actual parameter or formal parameter is connected to the pin of the specified variable or other functional modules, so that all functional modules are combined.
[0077] Step 6: Check the timeliness and completeness of the Eapp library, encapsulate the scattered code into the functional module with the highest similarity, and assign the functional module to the corresponding Eapp library, that is, the system Eapp library or the application Eapp library, to obtain a new Eapp library.
[0078] This invention provides a design method for a control system for petroleum equipment, enabling online maintenance of each functional module and improving work efficiency. By modularizing each program segment, software standardization is made easier, the development cycle is shorter, and software maintenance costs are reduced.
Claims
1. A method of designing a petroleum equipment control system, characterized by, Specifically, the following steps are implemented: Step 1, establishing an Eapp basic framework, including an interface layer and a data layer; In step 1, the interface layer is connected with the oil machinery controller and the data layer respectively, for receiving data of the oil machinery controller and receiving data processed by the data layer and returning the data to the oil machinery controller; The data layer is used to judge whether the data of the oil machinery controller received by the interface layer enters the cache area to cache the data, and return the cached data to the interface layer, if yes, perform pointer passing to the cache area, return the cached data to the interface layer; if not, pass into the API function for operation, pass the operation result to the cache area, and return the cached data to the interface layer; Step 2, according to the demand, the data layer in step 1 is divided into system Eapp library and application Eapp library; Step 3, according to the system Eapp library and application Eapp library divided in step 2, encapsulated function modules are respectively established, and the function modules all reserve interface pins; In step 3, the encapsulated function modules established in the system Eapp library include system setting (1), process type (2), display setting (6), hardware configuration (7); The system setting (1) is used for configuring system data, setting hierarchical authority, and specifying priority; The process type (2) is used for selecting device operation process type; The display setting (6) is used for processing various visual information on the touch screen or operation panel; The hardware configuration (7) is used for specifying hardware parameters and configuring hardware network; In step 3, the encapsulated function modules established in the application Eapp library include instrument and meter (3), remote service (4), online programming (5), history and trend (8), alarm and archiving (9), transmission setting (10), and auxiliary function (11); The instrument and meter (3) is used for processing various instrument and sensing signals of the device; The remote service (4) is used for communicating with other integrated platforms or cloud; The online programming (5) is used for configuring random code; The history and trend (8) is used for encapsulating data required to be recorded during device operation, and making prediction or calculation; The alarm and archiving (9) is used for processing device alarm and storing the encapsulated data in the history and trend (8); The transmission setting (10) is used for encapsulating conventional algorithm and optimization algorithm of transmission compound control for calling; The auxiliary function (11) is used for writing auxiliary program to form auxiliary block for selection and calling; Step 4, calling the function modules in step 3 or creating new function modules, and reserving interface pins; Step 5, setting pin parameters of the function modules called or created in step 4, so that each actual argument or formal argument is connected to a specified variable or pin of other function module, and all function modules are combined.
2. The method of designing a petroleum equipment control system of claim 1, wherein, The system setting (1) is used for selecting device type according to job demand, locking specific oil machinery, configuring main function, extracting feature content of specific oil machinery, and dividing the specific oil machinery into high, medium and low three levels according to the scale and control difficulty of the control object of the specific oil machinery.
3. The method of designing a petroleum equipment control system of claim 1, wherein, The display setting (6) is used for selecting display form, specifying communication form with the oil machinery controller, and configuring control and variable.
4. The method of designing a petroleum equipment control system of claim 1, wherein, The instrument (3) is used for selecting an instrument or sensor type, configuring a signal transmission form and a transmission direction, and transmitting a signal to a designated instrument or sensor address interface.
5. The method of designing a petroleum equipment control system of claim 1, wherein, The remote service (4) is used for selecting a remote service type, configuring a transmission protocol and a transmission method, and transmitting a data packet to a designated interface to communicate with other integrated platforms or clouds.
6. The method of designing a petroleum equipment control system of claim 1, wherein, The transmission setting (10) is used for selecting an electro-hydraulic composite or variable frequency transmission control mode, and if there is another transmission control mode, the transmission control mode is programmed through the online programming (5).
7. The method of designing a petroleum equipment control system of claim 1, wherein, The step 4 is specifically: If the required function module exists in the system Eapp library and the application Eapp library, the function module is directly called; If the required function module does not exist in the system Eapp library and the application Eapp library, the function module is encapsulated according to the requirement and an interface pin is reserved.
Citation Information
Patent Citations
Cloud computation based oil-gas field development engineering application system
CN104281456A
Equipment deployment method and device, equipment operation method and electronic equipment
CN110275716A