Remote intelligent control method for gas pipeline multi-branch safety valve based on AI model
By combining AI models with an intelligent correction mechanism based on image and flow data, the problem of flow measurement error in gas pipelines has been solved, enabling precise control of gas delivery and ensuring the safety and stability of the gas pipeline system.
Patent Information
- Application Number
- CN202511769849.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-28
- Publication Date
- 2025-12-26
- Estimated Expiration
- 2045-11-28
AI Technical Summary
The existing gas pipeline flow sensor suffers from flow field disturbances caused by corrosion on the inner wall of the pipeline, leading to flow measurement errors, which in turn causes the safety valve to malfunction and makes it impossible to accurately control the gas supply.
A remote intelligent control method for multi-branch safety valves in gas pipelines based on an AI model is adopted. By acquiring images of the inner wall of the pipeline and flow data, the flow data is corrected using an image feature extraction network and a flow correction calculation network, and control commands are sent to the safety valve actuator through a communication network.
It effectively corrects flow field turbulence, ensures precise control of gas delivery, avoids valve malfunctions caused by flow misjudgment, and guarantees the safety and gas supply stability of the gas pipeline system.
Smart Images

Figure CN121209293A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of machine learning, in particular to a remote intelligent control method for gas pipeline multi-branch safety valves based on an AI model. BACKGROUND
[0002] Gas pipeline leakage is a core safety hazard in the urban energy transmission and distribution system, directly related to urban operation safety and public interest. After the leakage of gas and air forms an explosive limit mixture, it is easy to cause explosion and fire when encountering a fire source, causing casualties and property losses; unburned gas diffusion can pollute the environment, and continuous leakage can also lead to imbalance of pipe network pressure, triggering regional supply stop, affecting people's livelihood and industrial operation.
[0003] In the gas pipeline designed based on the assumption of uniform flow field, the flow sensor calculates the flow rate by measuring the fluid kinetic energy or pressure difference. When the inner wall of the pipeline is corroded due to long-term use, the smooth streamline flow is destroyed, and the gas flow through these irregular surfaces will cause flow separation, forming a local vortex that rotates continuously. These vortexes change the velocity distribution of the flow field, causing part of the fluid kinetic energy to be converted into ineffective radial rotational motion from the axial main flow. However, the sensor still calculates according to the uniform flow field model, attributing the total kinetic energy containing rotational kinetic energy to the axial flow rate, resulting in a systematic higher detection value than the actual axial volume flow. The control system misjudges that the gas load has surged based on this higher flow data, and issues an instruction to close the valve, ultimately causing the actual gas supply of downstream gas equipment to be insufficient. SUMMARY
[0004] The purpose of the present application is to provide a remote intelligent control method for gas pipeline multi-branch safety valves based on an AI model, which solves the above technical problems.
[0005] The purpose of the present application can be achieved by the following technical solutions: The remote intelligent control method for gas pipeline multi-branch safety valves based on an AI model comprises the following steps: Obtain the original flow data and pipeline inner wall image data of multiple branches of the gas pipeline; Input the original flow data and pipeline inner wall image data into a pre-trained flow correction model to obtain corrected flow data for each branch; Based on the corrected flow data, calculate the control instructions for each branch safety valve through a control algorithm, wherein the control instructions include the specific adjustment amount of the safety valve opening degree; Send the control instructions to the safety valve execution device of the corresponding branch through a communication network.
[0006] As a further scheme of the present application, obtaining the corrected flow data comprises: The flow correction model comprises an image feature extraction network and a flow correction calculation network; The image feature extraction network processes the pipe inner wall image data, and the processing process comprises: A plurality of convolution kernels are used to perform convolution operation on the pipe inner wall image to generate a basic feature map, The basic feature map is input into a feature pyramid network to generate feature maps containing different scale information through a top-down path and a horizontal connection, and each scale feature map is subjected to global average pooling to convert each feature map into a fixed length value, which is denoted as a feature value; All scale feature values are sequentially connected to form an erosion feature vector; The flow correction calculation network splices the erosion feature vector and the original flow data according to the feature dimension to form a fusion feature vector, inputs the fusion feature vector into a first fully connected layer, compresses the feature dimension to half of the input dimension through weight matrix multiplication and bias addition, The compressed fusion feature vector is input into a second fully connected layer, the feature dimension is kept unchanged through weight matrix multiplication and bias addition, and the kept fusion feature vector is input into a third fully connected layer, and a single numerical value is output as a correction coefficient through weight matrix multiplication and bias addition; The correction coefficient is multiplied by the original flow data to obtain corrected flow data.
[0007] As a further scheme of the present application, the training process of the flow correction model comprises: An initial flow correction model is constructed, and the initial flow correction model comprises an image feature extraction network and a flow correction calculation network with randomly initialized parameters; A training sample set is collected, and the training sample set comprises a plurality of groups of original flow data, pipe inner wall image data collected in pipe sections with different corrosion degrees, and corresponding real flow data; The pipe inner wall image data in the training sample set is subjected to size standardization processing, and images with different resolutions are adjusted to pixel arrays with a preset width and a preset height, and the size-standardized pipe inner wall image data is subjected to color space conversion to convert the original image data from an RGB color space to a gray color space; The original flow data in the training sample set is subjected to normalization processing, and the normalization processing process is to subtract the average value of all original flow data in the training sample set from each original flow data and then divide by the standard deviation of all original flow data in the training sample set; The preprocessed original flow data and pipe inner wall image data are used as training inputs, and the corresponding real flow data is used as a training target, and the initial flow correction model is trained in a supervised training manner; In the training process, for each training sample, the mean square error between the corrected flow data output by the flow correction model and the true flow data is calculated as a loss value, and the parameters of the flow correction model are updated by a gradient descent algorithm, and the updating process is to calculate the partial derivative of the loss value with respect to each parameter of the flow correction model, and then the value of each parameter of the flow correction model is updated in the opposite direction of the partial derivative; The training process is repeated until the change amount of the loss value is less than a predetermined threshold, and the parameters of the flow correction model at this time are saved as a pre-trained flow correction model.
[0008] As a further scheme of the application: the calculation of the control instruction of each branch safety valve includes: The preset flow value of each branch is read from the pipeline control system, and the preset flow value is set according to the pipeline design parameters and operation requirements; The difference between the corrected flow data of each branch and the corresponding preset flow value is calculated, and the difference is calculated by subtracting the preset flow value from the corrected flow data; According to the absolute value of the difference, the control mode is selected, when the absolute value of the difference is less than the first threshold, the maintenance mode is selected, and the control instruction corresponding to the maintenance mode is to keep the current opening degree of the safety valve unchanged; When the absolute value of the difference is greater than or equal to the first threshold and less than the second threshold, the adjustment mode is selected, and the control instruction corresponding to the adjustment mode includes the calculated safety valve opening adjustment amount K; When the absolute value of the difference is greater than or equal to the second threshold, the protection mode is selected, and the control instruction corresponding to the protection mode is to completely close the safety valve; The control mode and the corresponding safety valve opening adjustment amount are combined to form a complete control instruction, and the control instruction includes a branch identifier, a control mode code and an opening adjustment amount.
[0009] As a further scheme of the application: the calculation process of the safety valve opening adjustment amount K includes: The difference is multiplied by a preset proportion coefficient to obtain a basic adjustment amount; The preset minimum adjustment amount and the preset maximum adjustment amount are read, and the minimum adjustment amount limit and the maximum adjustment amount limit are set according to the mechanical characteristics of the safety valve; If the basic adjustment amount is less than the minimum adjustment amount, the basic adjustment amount is set to the minimum adjustment amount, and the minimum adjustment amount is the safety valve opening adjustment amount K at this time; If the basic adjustment amount is greater than the maximum adjustment amount, the basic adjustment amount is set to the maximum adjustment amount, and the maximum adjustment amount is the safety valve opening adjustment amount K at this time; If the minimum adjustment amount is less than or equal to the basic adjustment amount and the maximum adjustment amount, the basic adjustment amount is the safety valve opening adjustment amount K at this time.
[0010] As a further scheme of the present application: the control instruction is sent to the safety valve execution device of the corresponding branch through a communication network, and the sending method comprises: The control instruction is serialized into a binary data stream, and the serialization process comprises converting the branch identifier into a binary address code, converting the control mode code into an operation code, and converting the opening degree adjustment amount into a fixed-point number representation; A frame start flag is added in front of the binary data stream, and a frame end flag is added after the binary data stream to form a complete data frame; The data frame is subjected to error control coding, and the error control coding adopts a cyclic redundancy check algorithm to calculate a check code of the data frame and attach the check code before the frame end flag; The coded data frame is sent to the controller of the corresponding branch through an industrial Ethernet protocol, and the sending process comprises establishing a TCP connection, segmenting the data for transmission, and confirming the reception; After the controller receives the data frame, the frame start flag and the frame end flag are first detected, and then the check code is recalculated and compared with the received check code; If the check codes are consistent, the branch identifier, the control mode code, and the opening degree adjustment amount are extracted from the data frame, and the safety valve execution device is driven to complete the corresponding opening degree adjustment operation.
[0011] As a further scheme of the present application: the safety valve execution device is driven to complete the corresponding opening degree adjustment operation, and the driving method comprises: The controller confirms the target safety valve according to the extracted branch identifier, and the branch identifier corresponds to the physical address of the safety valve; The control mode code is analyzed, and if the control mode code represents a maintenance mode, the current state of the safety valve is kept unchanged; If the control mode code represents an adjustment mode, the safety valve opening degree adjustment amount K is read, and the target opening degree value is calculated, and the calculation process is to add the safety valve opening degree adjustment amount K to the current opening degree value of the safety valve; If the control mode code represents a protection mode, the target opening degree value is set to zero, and the safety valve is completely closed; The target opening degree value is converted into a pulse signal, and the pulse number of the pulse signal is proportional to the opening degree adjustment amount; The pulse signal is sent to the stepping motor through a driving circuit, the stepping motor rotates by a corresponding angle according to the pulse signal, and the safety valve spool is driven to move to the target opening degree position; After the adjustment is completed, the actual opening degree value of the safety valve is read, and the actual opening degree value is fed back to the control system through the communication network.
[0012] The present application has the following beneficial effects: The application realizes effective correction of measurement errors caused by flow field disorder caused by pipeline inner wall corrosion by introducing an intelligent correction mechanism based on fusion of visual information and flow data in the flow measurement and control process. The application can automatically identify and compensate for the problem of high sensor reading caused by the deviation of fluid kinetic energy distribution in the presence of local vortex and abnormal velocity distribution, so as to obtain flow data closer to the actual working condition. The control system adjusts the safety valve based on the corrected flow result, so that the valve opening and the actual flow demand are consistent, and the valve misoperation caused by flow misjudgment is avoided.
[0013] The application effectively eliminates the negative impact of corrosion morphology on the stability of the flow field, realizes accurate control of gas delivery in a non-uniform flow field, and ensures the safety and stability of the gas pipeline system. BRIEF DESCRIPTION OF DRAWINGS
[0014] The application will be further described below with reference to the accompanying drawings.
[0015] Figure 1 is a flow diagram of the remote intelligent control method of the gas pipeline multi-branch safety valve based on the AI model of the application. DETAILED DESCRIPTION
[0016] The technical solutions in the embodiments of the application will be described clearly and completely below with reference to the accompanying drawings in the embodiments of the application. Obviously, the described embodiments are only part of the embodiments of the application, not all. Based on the embodiments in the application, all other embodiments obtained by those skilled in the art without creative labor are within the scope of protection of the application.
[0017] Please refer to Figure 1 The application is a remote intelligent control method of a gas pipeline multi-branch safety valve based on an AI model, which comprises the following steps: Obtain the original flow data of the multiple branches of the gas pipeline and the pipeline inner wall image data; Input the original flow data and the pipeline inner wall image data into a pre-trained flow correction model to obtain the corrected flow data of each branch; In a preferred embodiment of the application, obtaining the corrected flow data comprises: The flow correction model comprises an image feature extraction network and a flow correction calculation network; The image feature extraction network processes the pipeline inner wall image data, and the processing process comprises: A plurality of convolution kernels are used to perform convolution operation on the pipeline inner wall image to generate a basic feature map, The base feature map is input into a feature pyramid network, and a feature map containing different scale information is generated through a top-down path and a horizontal connection. Global average pooling is performed on the feature map of each scale, and each feature map is converted into a fixed length value, denoted as a feature value; The feature values of all scales are sequentially connected to form a corrosion feature vector; The flow correction calculation network splices the corrosion feature vector and the original flow data by feature dimension to form a fusion feature vector. The fusion feature vector is input into a first fully connected layer, and the feature dimension is compressed to half of the input dimension through weight matrix multiplication and bias addition; The compressed fusion feature vector is input into a second fully connected layer, and the feature dimension is kept unchanged through weight matrix multiplication and bias addition. The kept fusion feature vector is input into a third fully connected layer, and a single numerical value is output as a correction coefficient through weight matrix multiplication and bias addition; The correction coefficient is multiplied by the original flow data to obtain corrected flow data.
[0018] It should be noted that by inputting the pipe inner wall image and the flow data into the model together, and using the convolution network to extract multi-scale corrosion features and then fuse them with the flow information, the model can simultaneously perceive the correlation between the pipe structure state and the fluid dynamic characteristics during the learning process. The corrosion morphology directly affects the flow field distribution, while the flow field disorder determines the deviation law of the sensor readings. The model establishes this implicit nonlinear correspondence through feature extraction and fully connected mapping, so that the output correction coefficient can reflect the deviation degree of the current pipe actual flow state from the ideal flow state. The flow data obtained through the correction process is more consistent with the real axial flow, which fundamentally eliminates the measurement distortion caused by corrosion, provides accurate flow data for the subsequent control system, and ensures that the safety valve action matches the actual gas demand, thereby realizing stable and reliable gas delivery control.
[0019] The weight matrix operation and the bias addition are the basic calculation methods for realizing feature mapping and nonlinear transformation in the full connection layer. After receiving the input features, each layer of the full connection structure will multiply each value in the input vector with the corresponding weight parameter one by one, then sum all the products to form a new feature combination result, and then add a bias parameter to adjust the balance position of the overall output, so that the model has stronger expression flexibility when facing different input distributions. The dimension of the weight matrix is determined by the feature dimensions of the input and output, and the size of the weight matrix is generally different between different layers, but the calculation principle is consistent. The three full connection layers all perform the operation of "input multiplied by weight and then added by bias", but each layer has different functions. The first layer realizes the compression of the feature dimension through operation, condenses the original fused features into a more compact expression, the second layer reconstructs the features while keeping the dimension unchanged, so that the compressed information is further refined and stabilized, and the third layer maps the processed features to a single output value for representing the correction coefficient. These weight and bias parameters are automatically learned through a large number of sample data in the model training stage. After calculating the loss function each time, the model uses the gradient descent method to continuously adjust the parameters, so that the prediction output is closer to the true flow value, until the training converges.
[0020] In one preferred case of the embodiment, the training process of the flow correction model includes: An initial flow correction model is constructed, which includes an image feature extraction network and a flow correction calculation network with randomly initialized parameters; A training sample set is collected, which includes multiple groups of original flow data, pipe inner wall image data collected in pipe sections with different corrosion degrees, and corresponding true flow data; The pipe inner wall image data in the training sample set is subjected to size standardization processing, and images with different resolutions are adjusted to pixel arrays with a preset width and a preset height. The pipe inner wall image data after size standardization is subjected to color space conversion, and the original image data is converted from the RGB color space to the gray color space; The original flow data in the training sample set is subjected to normalization processing, which is to subtract the average value of all original flow data in the training sample set from each original flow data, and then divide by the standard deviation of all original flow data in the training sample set; The preprocessed original flow data and pipe inner wall image data are used as training inputs, and the corresponding true flow data is used as training targets. The initial flow correction model is trained in a supervised training manner; In the training process, for each training sample, the mean square error between the corrected flow data output by the flow correction model and the true flow data is calculated as a loss value, and the parameters of the flow correction model are updated by a gradient descent algorithm, and the update process is to calculate the partial derivative of the loss value with respect to each parameter of the flow correction model, and then the value of each parameter of the flow correction model is updated in the opposite direction of the partial derivative; The training process is repeated until the change amount of the loss value is less than a predetermined threshold, and the parameters of the flow correction model at this time are saved as a pre-trained flow correction model.
[0021] It can be understood that the model is supervised trained by a large amount of sample data collected under different corrosion degrees and flow field states, so that the model learns the internal mapping relationship between the corrosion morphology, the flow reading and the true flow in continuous iteration. Image preprocessing and data normalization make the input features have uniform scale and stable distribution, which helps the model to more accurately capture the statistical rules of visual features and flow deviation. The loss function measures the error between the model output and the true flow, guides the parameters to converge in the optimal direction, so that the model has the ability to adaptively correct the sensor reading according to the image features. After the training is completed, the model obtained can judge the disturbance degree of the flow field according to the real-time image in the running stage and output the corresponding correction coefficient, realize the automatic compensation of the measurement deviation under different corrosion conditions, provide a long-term stable and reliable flow data basis for the control system, and ensure the accuracy of subsequent valve regulation and the reliability of gas transmission.
[0022] Based on the corrected flow data, control instructions of each branch safety valve are calculated by a control algorithm, wherein the control instructions include a specific adjustment amount of the safety valve opening degree; In another preferred embodiment of the present application, calculating the control instructions of each branch safety valve includes: reading a preset flow value of each branch from a pipeline control system, wherein the preset flow value is set according to pipeline design parameters and operation requirements; calculating the difference between the corrected flow data of each branch and the corresponding preset flow value, wherein the difference is obtained by subtracting the preset flow value from the corrected flow data; selecting a control mode according to the absolute value of the difference, wherein when the absolute value of the difference is less than a first threshold, a maintenance mode is selected, and the control instruction corresponding to the maintenance mode is to keep the current opening degree of the safety valve unchanged; when the absolute value of the difference is greater than or equal to the first threshold and less than a second threshold, an adjustment mode is selected, and the control instruction corresponding to the adjustment mode includes the calculated safety valve opening adjustment amount K; when the absolute value of the difference is greater than or equal to the second threshold, a protection mode is selected, and the control instruction corresponding to the protection mode is to completely close the safety valve; The control mode is combined with the corresponding safety valve opening adjustment amount to form a complete control instruction, which contains a branch identifier, a control mode code and an opening adjustment amount.
[0023] In one preferred embodiment, the calculation process of the safety valve opening adjustment amount K includes: The difference is multiplied by a preset proportional coefficient to obtain a basic adjustment amount; The preset minimum adjustment amount and maximum adjustment amount are read, and the minimum adjustment amount limit and the maximum adjustment amount limit are set according to the mechanical characteristics of the safety valve; If the basic adjustment amount is less than the minimum adjustment amount, the basic adjustment amount is set as the minimum adjustment amount, and the minimum adjustment amount is the safety valve opening adjustment amount K at this time; If the basic adjustment amount is greater than the maximum adjustment amount, the basic adjustment amount is set as the maximum adjustment amount, and the maximum adjustment amount is the safety valve opening adjustment amount K at this time; If the minimum adjustment amount is less than or equal to the basic adjustment amount and the maximum adjustment amount is less than or equal to the basic adjustment amount, the basic adjustment amount is the safety valve opening adjustment amount K at this time.
[0024] It is worth noting that by comparing the corrected flow data with the preset flow value and dividing different control modes according to the deviation, the system can dynamically adjust the safety valve opening according to the running state to realize the hierarchical response of the gas delivery process. When the deviation is small, the valve is kept stable to avoid mechanical wear and system fluctuation caused by frequent action; when the deviation is within the adjustable range, the opening adjustment amount calculated according to the proportional coefficient makes the flow gradually return to the target value, ensuring the continuity and accuracy of the adjustment; when the deviation is too large, the valve is immediately closed to provide safety protection from the system level; by setting the upper and lower limits of the adjustment amount, the control amount is always within the range that the valve can withstand, preventing mechanical instability or response overshoot caused by excessive adjustment. This design enables the control instruction to balance accurate adjustment and safety redundancy under different working conditions, realizes the orderly transition from error perception to action, and makes the corrected flow data truly transform into stable and reliable execution control behavior, ensuring the safety and gas supply balance of the pipeline network.
[0025] The control instruction is sent to the safety valve execution device of the corresponding branch through a communication network.
[0026] In another preferred embodiment of the present application, sending the control instruction to the safety valve execution device of the corresponding branch through a communication network includes: The control instruction is serialized into a binary data stream, and the serialization process includes converting the branch identifier into a binary address code, converting the control mode code into an operation code, and converting the opening adjustment amount into a fixed-point number representation; A frame start flag is added in front of the binary data stream, and a frame end flag is added after the binary data stream to form a complete data frame; The data frame is error control coded, the error control coding adopts a cyclic redundancy check algorithm, a check code of the data frame is calculated and the check code is attached before a frame end mark; The coded data frame is sent to the corresponding branch controller through an industrial Ethernet protocol, the sending process including establishing a TCP connection, segmenting the data for transmission and confirming the reception; After the controller receives the data frame, the frame start mark and the frame end mark are first detected, then the check code is recalculated and compared with the received check code; If the check codes are consistent, the branch identifier, the control mode code and the opening degree adjustment amount are extracted from the data frame, and the safety valve execution device is driven to complete the corresponding opening degree adjustment operation.
[0027] It should be noted that by converting the control instruction into a structured data frame and adding a flag bit and a check mechanism during transmission, the communication process has clear boundary recognition and error detection capability, thereby ensuring that the instruction can be accurately recognized and completely received in a complex industrial network environment. Data serialization converts logical control information into binary format, which not only improves transmission efficiency, but also facilitates unified analysis between different devices. The cyclic redundancy check forms a double data integrity protection between the physical layer and the transmission layer, avoiding misoperation caused by noise interference or signal loss. The controller performs flag detection and check comparison on the received data before performing analysis, ensuring that only verified instructions can trigger valve action, so that the control process can still maintain determinism and safety under remote communication conditions. The overall design realizes reliable information closed-loop transmission from the upper system to the execution device, synchronizes the safety valve adjustment action with the control algorithm output, ensures the correct execution of the flow control instruction in the network transmission environment, and supports the stability and safety of the system from the communication level.
[0028] In a preferred case of the embodiment, driving the safety valve execution device to complete the corresponding opening degree adjustment operation includes: The controller confirms the target safety valve according to the extracted branch identifier, the branch identifier corresponding to the physical address of the safety valve; If the control mode code represents the maintenance mode, the current state of the safety valve is kept unchanged; If the control mode code represents the adjustment mode, the safety valve opening degree adjustment amount K is read, and the target opening degree value is calculated, the calculation process being adding the safety valve opening degree adjustment amount K to the current opening degree value of the safety valve; If the control mode code represents the protection mode, the target opening degree value is set to zero, corresponding to the complete closing of the safety valve; The target opening degree value is converted into a pulse signal, the pulse number of the pulse signal being proportional to the opening degree adjustment amount; The pulse signal is sent to the stepping motor through the driving circuit, and the stepping motor rotates by a corresponding angle according to the pulse signal, and drives the safety valve core to move to the target opening position. After the adjustment is completed, the actual opening value of the safety valve is read, and the actual opening value is fed back to the control system through the communication network.
[0029] It should be noted that the branch identifier and the control mode code are analyzed by the controller, and the stepping motor is driven to execute valve adjustment according to the analysis, so that the system can realize accurate positioning and staged action of the multi-branch safety valve under a unified logical framework. The stepping motor is driven by a pulse signal, and the number of pulses and the opening adjustment amount are linearly corresponding, so as to ensure the consistency between the valve core moving angle and the control command, and avoid the opening error caused by mechanical deviation. Different control modes correspond to different execution logics, so that the device can smoothly switch between the maintenance, adjustment and protection states, which not only maintains the continuity of system operation, but also has emergency protection capability. The return of the opening feedback signal constitutes a closed-loop control mechanism, so that the control system can check the execution result in real time and correct the subsequent command, to prevent deviation accumulation caused by mechanical lag or environmental interference. The process closely couples the digital control logic and the physical execution action, realizes accurate mapping of the flow correction result to the actual valve adjustment, and ensures that the gas delivery system can still maintain a stable, safe and high-responsive operation state under complex working conditions.
[0030] The above describes one embodiment of the present application in detail, but the content described is only the preferred embodiment of the present application, and cannot be considered as limiting the scope of the present application. Any equivalent changes and improvements made according to the scope of the present application should still belong to the scope of the present application.
Claims
1. A remote intelligent control method for multi-branch safety valves in gas pipelines based on an AI model, characterized in that, Includes the following steps: Obtain raw flow data and pipeline inner wall image data for multiple branches of the gas pipeline; The original flow data and the pipeline inner wall image data are input into a pre-trained flow correction model to obtain the corrected flow data for each branch. Based on the corrected flow data, the control command for each branch safety valve is calculated by the control algorithm, wherein the control command includes the specific adjustment amount of the safety valve opening. The control command is sent to the safety valve actuator of the corresponding branch via a communication network.
2. The remote intelligent control method for multi-branch safety valves in gas pipelines based on an AI model according to claim 1, characterized in that, Obtaining the corrected traffic data includes: The flow correction model includes an image feature extraction network and a flow correction calculation network; The image feature extraction network processes the image data of the inner wall of the pipe, and the processing includes: Multiple convolution kernels are used to perform convolution operations on the image of the pipe's inner wall to generate a basic feature map. The basic feature map is input into the feature pyramid network, and feature maps containing information at different scales are generated through top-down paths and lateral connections. Global average pooling is performed on each feature map at each scale, and each feature map is converted into a fixed-length numerical value, which is denoted as a feature value. The eigenvalues of all scales are concatenated sequentially to form the erosion feature vector; The flow correction calculation network concatenates the erosion feature vector with the original flow data according to the feature dimension to form a fused feature vector. The fused feature vector is then input into the first fully connected layer, and the feature dimension is compressed to half of the input dimension through weight matrix multiplication and bias addition. The compressed fused feature vector is input into the second fully connected layer. The feature dimension is kept unchanged by multiplying the weight matrix and adding the bias. The combined feature vector is then input into the third fully connected layer. The single value is output as the correction coefficient by multiplying the weight matrix and adding the bias. The correction coefficient is multiplied by the original flow data to obtain the corrected flow data.
3. The remote intelligent control method for multi-branch safety valves in gas pipelines based on an AI model according to claim 1, characterized in that, The training process for the flow correction model includes: A flow correction model is constructed, which includes an image feature extraction network with randomly initialized parameters and a flow correction calculation network. A training sample set was collected, which included multiple sets of raw flow data, pipe inner wall image data, and corresponding real flow data collected from pipe sections with different corrosion levels. The pipe inner wall image data in the training sample set is size-normalized to adjust the images of different resolutions into pixel arrays with preset width and preset height. The size-normalized pipe inner wall image data is then color-space-converted to convert the original image data from RGB color space to grayscale color space. The raw traffic data in the training sample set is normalized. The normalization process is to subtract the average value of all raw traffic data in the training sample set from each raw traffic data, and then divide by the standard deviation of all raw traffic data in the training sample set. The preprocessed raw flow data and pipeline inner wall image data are used as training inputs, and the corresponding real flow data is used as the training target. The flow correction model is trained using a supervised training method. During training, for each training sample, the mean square error between the corrected flow data output by the flow correction model and the real flow data is calculated as the loss value. The parameters of the flow correction model are updated by the gradient descent algorithm. The update process is to calculate the partial derivative of the loss value with respect to each parameter of the flow correction model, and then calculate the value of each parameter of the flow correction model in the opposite direction of the partial derivative. Repeat the training process until the change in the loss value is less than a predetermined threshold, and save the parameters of the flow correction model at this time as a pre-trained flow correction model.
4. The remote intelligent control method for multi-branch safety valves in gas pipelines based on an AI model according to claim 1, characterized in that, The control commands for each branch safety valve include: The preset flow rate value of each branch is read from the pipeline control system. The preset flow rate value is set according to the pipeline design parameters and operating requirements. Calculate the difference between the corrected flow data and the corresponding preset flow value for each branch. The difference is calculated by subtracting the preset flow value from the corrected flow data. The control mode is selected based on the absolute value of the difference. When the absolute value of the difference is less than the first threshold, the maintenance mode is selected. The control command corresponding to the maintenance mode is to keep the current opening degree of the safety valve unchanged. When the absolute value of the difference is greater than or equal to the first threshold and less than the second threshold, the adjustment mode is selected. The control command corresponding to the adjustment mode contains the calculated safety valve opening adjustment amount K. When the absolute value of the difference is greater than or equal to the second threshold, the protection mode is selected. The control command corresponding to the protection mode is to completely close the safety valve. The control mode is combined with the corresponding safety valve opening adjustment amount to form a complete control command. The control command includes the branch identifier, control mode code and opening adjustment amount.
5. The remote intelligent control method for multi-branch safety valves in gas pipelines based on an AI model according to claim 4, characterized in that, The calculation process for the safety valve opening adjustment amount K includes: The base adjustment amount is obtained by multiplying the difference by the preset scaling factor; Read the preset minimum and maximum adjustment values, which are set according to the mechanical characteristics of the safety valve. If the basic adjustment amount is less than the minimum adjustment amount, then the basic adjustment amount is set to the minimum adjustment amount, and at this time the minimum adjustment amount is the safety valve opening adjustment amount K; If the basic adjustment amount is greater than the maximum adjustment amount, then the basic adjustment amount is set to the maximum adjustment amount, and at this time the maximum adjustment amount is the safety valve opening adjustment amount K; If the minimum adjustment amount ≤ the basic adjustment amount ≤ the maximum adjustment amount, then the basic adjustment amount is the safety valve opening adjustment amount K at this time.
6. The remote intelligent control method for multi-branch safety valves in gas pipelines based on an AI model according to claim 5, characterized in that, The safety valve actuator that transmits control commands to the corresponding branch via a communication network includes: The control commands are serialized into a binary data stream. The serialization process includes converting branch identifiers into binary address codes, control mode codes into op codes, and opening adjustment amounts into fixed-point representations. A frame start marker is added before the binary data stream, and a frame end marker is added after the binary data stream to form a complete data frame; Error control coding is performed on the data frame. The error control coding uses the cyclic redundancy check algorithm to calculate the check code of the data frame and append the check code before the end of frame marker. The encoded data frames are sent to the controller of the corresponding branch via the Industrial Ethernet protocol. The sending process includes establishing a TCP connection, transmitting data in segments, and acknowledging receipt. After receiving a data frame, the controller first detects the start-of-frame and end-of-frame flags, then recalculates the checksum and compares it with the received checksum. If the checksums match, the branch identifier, control mode code, and opening adjustment amount are extracted from the data frame, and the safety valve actuator is driven to complete the corresponding opening adjustment operation.
7. The remote intelligent control method for multi-branch safety valves in gas pipelines based on an AI model according to claim 6, characterized in that, The actuator that drives the safety valve to complete the corresponding opening adjustment operation includes: The controller identifies the target safety valve based on the extracted branch identifier, which corresponds to the physical address of the safety valve. Parse the control mode code; if the control mode code indicates a sustain mode, then keep the current state of the safety valve unchanged. If the control mode code indicates the adjustment mode, then read the safety valve opening adjustment amount K, calculate the target opening value, and the calculation process is to add the safety valve opening adjustment amount K to the current safety valve opening value. If the control mode code indicates protection mode, then the target opening value is set to zero, and the corresponding safety valve is completely closed; The target opening value is converted into a pulse signal, and the number of pulses in the pulse signal is proportional to the opening adjustment amount. The pulse signal is sent to the stepper motor through the drive circuit. The stepper motor rotates at the corresponding angle according to the pulse signal, which drives the valve core of the safety valve to move to the target opening position. After adjustment, the actual opening value of the safety valve is read and fed back to the control system via the communication network.
Citation Information
Patent Citations
Method for measuring pipeline flow with positron annihilation technology
CN108267186A
Crushed thick and large ore body combined mining method based on medium-length hole blasting and drift type cooperation
CN120211769A
Micro-flow field measurement method of mechanical biological net port flowmeter
CN120274999A
IMP-based intelligent beam adjustment method, apparatus and device, and storage medium
CN120610527A
Digital twin drive multi-source heterogeneous data fusion and intelligent analysis method for oil and gas pipeline construction
CN120688014A
Cited By
Pipeline gas safety valve control method and system
CN121704212A