Pipeline detector speed control method, electronic device and readable storage medium

By constructing a fluid model and combining an improved particle swarm optimization algorithm with fuzzy control, the bypass valve opening was optimized, solving the problem of unstable speed regulation of the pipeline detector. This resulted in fast and stable speed control, reduced vibration, and improved detection accuracy.

CN115857574BActive Publication Date: 2026-05-12HEFEI UNIV OF TECH
View PDF 1 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
HEFEI UNIV OF TECH
Filing Date
2022-11-25
Publication Date
2026-05-12

AI Technical Summary

Technical Problem

In existing technologies, the speed adjustment of pipeline detectors relies on manual experience, which makes it difficult to quickly reach the set value, and vibration is easy to occur during the adjustment process, affecting the detection effect.

Method used

By constructing a fluid model under the bypass valve opening, and using a combination of an improved particle swarm optimization algorithm and fuzzy control, the parameters k and c are optimized to quickly adjust the bypass valve opening to control the detector speed and achieve stable regulation.

Benefits of technology

Within 0.1 seconds, the detector speed reaches near the set value with small vibration amplitude, achieving rapid and stable speed control and avoiding getting trapped in local optima.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115857574B_ABST
    Figure CN115857574B_ABST
Patent Text Reader

Abstract

The present application relates to natural gas pipeline detection field, specifically a kind of pipeline detector speed control method, electronic equipment and readable storage medium, comprising the following steps: S1, construct the fluid model of pipeline detector under different opening degree of bypass valve;S2, collect the pressure difference data before and after pipeline detector under different bypass valve opening degree;S3, establish bypass valve opening degree change formula for the collected data;S4, the parameter k and c in step S3 are optimized, so as to reach optimal solution.The present application adjusts bypass valve opening degree by bypass valve opening degree change formula, can make the speed of detector reach the vicinity of set value in about 0.1s, and the vibration amplitude is small in the whole process, realizes the quick, stable regulation of speed control.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of natural gas pipeline inspection, specifically a pipeline detector speed control method, electronic equipment, and readable storage medium. Background Technology

[0002] Natural gas pipeline robots, also known as pipeline detectors or pipeline pigs, are used for natural gas pipeline inspection. After being installed inside the natural gas pipeline, the pipeline detector seals with the pipeline body, dividing the pipeline into two sections with a pressure difference. The two sections are connected by a bypass valve on the pipeline detector, allowing the detector to move along the pipeline based on the pressure difference. The operating speed of the detector can be adjusted by controlling the opening of the bypass valve, keeping the speed near a set value to ensure the validity of the inspection results.

[0003] Currently, the most widely used technology for pipeline inspection is magnetic flux leakage (MFL) testing. MFL sensors are typically installed on pipeline detectors to detect defects and corrosion on the inner walls of natural gas pipelines. However, MFL testing has specific speed requirements for the detector; it needs to be maintained at a predetermined speed to obtain accurate data. Currently, valve opening adjustments rely heavily on the experience of the inspectors, making it difficult to quickly adjust the pipeline detector speed to near the set value. During the process of repeated speed adjustments until the set value is reached, the detector is susceptible to vibration due to these repeated speed adjustments, thus requiring a solution. Summary of the Invention

[0004] To avoid and overcome the technical problems existing in the prior art, this invention provides a speed control method for a pipeline detector, which enables the speed of the pipeline detector to quickly reach near the set value with small vibration amplitude and stable adjustment process. This invention also provides an electronic device and a readable storage medium.

[0005] To achieve the above objectives, the present invention provides the following technical solution:

[0006] A method for controlling the speed of a pipeline detector includes the following steps:

[0007] S1. Construct a fluid model of the pipeline detector under different opening degrees of the bypass valve;

[0008] S2. Collect differential pressure data before and after the pipeline detector under different bypass valve openings;

[0009] S3. Establish a formula for the change in bypass valve opening based on the collected data:

[0010]

[0011] in, This represents the opening degree of the bypass valve at time t;

[0012] This indicates the opening degree of the bypass valve at time t+1;

[0013] The value of n is determined by the difference between the detector's set speed and the real-time speed. When the set speed is lower than the actual speed, n is 2, and when the set speed is higher than the actual speed, n is 1.

[0014] k and c are parameters;

[0015] S4. Optimize the parameters k and c in step S3 to achieve the optimal solution.

[0016] As a further aspect of the present invention: S41, an improved particle swarm optimization algorithm is used to optimize and obtain parameters k and c, defined as follows:

[0017] v i (t+1)=(ω+Δω)v i (t)+(c1+Δc1)r1(p i (t)-x i (t))+(c2+Δc2)r2(p g (t)-x i (t));

[0018] x i (t+1)=x i (t)+v i (t+1)

[0019] Among them, v i (t+1) represents the velocity of the i-th particle at time t+1;

[0020] v i (t) represents the velocity of the i-th particle at time t;

[0021] x i (t+1) represents the displacement of the i-th particle at time t+1;

[0022] x i (t) represents the displacement of the i-th particle at time t;

[0023] c1 and c2 represent acceleration factors;

[0024] Δc1 and Δc2 represent the changes in the acceleration factor;

[0025] r1 and r2 are random numbers in the range [0,1].

[0026] P i (t) represents the optimal position of the i-th particle after t iterations;

[0027] Pg (t) represents the position of the optimal particle after t iterations;

[0028] Δω represents the change in the inertia weighting coefficient;

[0029] ω represents the inertia weighting coefficient;

[0030] ω=[(ω max -ω min ) / 2]cos(πQ / Q max )+(ω max +ω min ) / 2

[0031] ω max This represents the maximum value of the inertia weighting coefficient;

[0032] ω min This represents the maximum value of the inertia weighting coefficient;

[0033] Q represents the current iteration number;

[0034] Q max Indicates the maximum number of iterations;

[0035] S42. Update the value of ω. For Δω, Δc1, and Δc2, derive them through fuzzy calculation. Calculate the overall standard deviation μ of the particle swarm using the derived particle information.

[0036]

[0037] Where μ represents the overall standard deviation of the particle swarm;

[0038] x i This represents the position of the i-th particle at the Q-th iteration;

[0039] N represents the number of particles;

[0040] This represents the average position of all particles;

[0041] S43. Calculate the fitness value of the next generation of iterative particles according to the formula in step S41, compare it with the fitness value of the current generation of iterative particles, and take the higher one as P. i (t), when the P of any particle i (t) value is higher than P g When (t), then the P of the particle i The value of (t) is updated to P. g (t) value;

[0042] S44. Continue iterating until the current iteration number Q reaches the maximum iteration number, then stop iterating and output the optimal solution P. g (t), Pg The position of (t) is the optimal solution for parameters k and c.

[0043] As a further aspect of the present invention: in step S42, the inputs to the fuzzy control are the overall standard deviation μ and the number of iterations Q, and the outputs are the inertia weight coefficient ω and the change values ​​of the acceleration factor Δc1 and Δc2.

[0044] As a further solution of the present invention: a speed control model is constructed using Simulink, parameters k and c are substituted into the speed control model, and the value of parameter n is determined based on the speed error.

[0045] An electronic device includes a processor, an input device, an output device, and a memory, wherein the processor, the input device, the output device, and the memory are connected in sequence, the memory is used to store a computer program, the computer program includes program instructions, and the processor is configured to call the program instructions to execute a pipeline detector speed control method.

[0046] A readable storage medium storing a computer program, the computer program including program instructions that, when executed by a processor, cause the processor to perform a pipeline detector speed control method.

[0047] Compared with the prior art, the beneficial effects of the present invention are:

[0048] 1. This invention adjusts the bypass valve opening by using a bypass valve opening change formula. The detector speed can reach near the set value in about 0.1s, and the vibration amplitude is small throughout the process, thus achieving rapid and stable speed control.

[0049] 2. This invention improves the particle swarm algorithm by adding artificial interference to c1, c2, and ω to avoid getting trapped in local optima. By combining fuzzy control with the particle swarm algorithm, the three parameters not only change with time but also change based on whether the particle is trapped in a local optimum.

[0050] 3. The improved particle swarm algorithm of this invention is updated and changed continuously based on the number of iterations, and the other part is determined by fuzzy control to see if the particle swarm is trapped in a local optimum, thereby escaping the local range. Through this dual guarantee, the particle swarm can avoid premature convergence and accelerate the convergence speed. Attached Figure Description

[0051] Figure 1 This is a speed control curve diagram of the present invention.

[0052] Figure 2 This is a simplified structural diagram of the pipeline detector in this invention.

[0053] Figure 3 This is the fitted curve of the bypass valve opening degree and pressure difference in this invention.

[0054] In the diagram: 1. Pipeline detector; 11. Bypass valve; 12. Mileage wheel; 2. Pipeline. Detailed Implementation

[0055] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0056] Please see Figures 1-3 In this embodiment of the invention, a pipeline detector speed control method includes the following steps: S1, constructing a fluid model of the pipeline detector under different opening degrees of the bypass valve;

[0057] Pipeline detector 1 is placed inside the natural gas pipeline. By opening the bypass valve 11 of pipeline detector 1, the pipeline detector 1 is driven to move along pipeline 2 by the pressure difference. The odometer wheel 12 on pipeline detector 1 can measure and provide feedback on real-time speed. Fluid models are constructed with bypass valve opening degrees of 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, and fully open.

[0058] S2. Collect differential pressure data before and after the pipeline detector under different bypass valve opening degrees.

[0059] The fluid model was meshed using Fluent software in ANSYS. The parameters for fluid simulation were designed based on actual working conditions. The pressure values ​​before and after the detector were recorded under different bypass valve openings, resulting in a data table of pressure difference under different bypass valve openings, as shown below:

[0060]

[0061] The data is fitted, and the fitted curve is as follows: Figure 3 As shown in the figure, the fitting curve reveals a non-linear relationship between the bypass valve opening and the differential pressure; the differential pressure gradually decreases as the bypass valve opening increases. Observation of the curve shows that the differential pressure changes significantly in the first half of the bypass valve opening variation; however, the differential pressure changes less noticeably in the second half. Therefore, to achieve more reasonable speed control, the detector's opening should exhibit a slower rate of change when at lower values ​​and an increased rate of change when at higher values.

[0062] S3. Establish a formula for the change in bypass valve opening based on the collected data:

[0063]

[0064] in, This represents the opening degree of the bypass valve at time t;

[0065] This indicates the opening degree of the bypass valve at time t+1;

[0066] The value of n is determined by the difference between the set speed and the real-time speed of the detector. When the set speed is lower than the actual speed, n is 2, and the opening of the bypass valve increases. When the set speed is higher than the actual speed, n is 1, and the opening of the bypass valve decreases.

[0067] k and c are parameters that determine the speed control performance, and the optimal solution is obtained after subsequent optimization.

[0068] S4. Optimize the parameters k and c in step S3 to achieve the optimal solution.

[0069] S41. An improved particle swarm optimization algorithm is used to optimize the process and obtain parameters k and c, defined as follows:

[0070] v i (t+1)=(ω+Δω)v i (t)+(c1+Δc1)r1(p i (t)-x i (t))+(c2+Δc2)r2(p g (t)-x i (t));

[0071] x i (t+1)=x i (t)+v i (t+1)

[0072] Among them, v i (t+1) represents the velocity of the i-th particle at time t+1;

[0073] v i (t) represents the velocity of the i-th particle at time t;

[0074] x i (t+1) represents the displacement of the i-th particle at time t+1;

[0075] x i (t) represents the displacement of the i-th particle at time t;

[0076] c1 and c2 represent acceleration factors;

[0077] Δc1 and Δc2 represent the changes in the acceleration factor;

[0078] r1 and r2 are random numbers in the range [0,1].

[0079] P i (t) represents the optimal position of the i-th particle after t iterations;

[0080] P g (t) represents the position of the optimal particle after t iterations;

[0081] Δω represents the change in the inertia weighting coefficient;

[0082] ω represents the inertia weighting coefficient;

[0083] ω=[(ω max -ω min ) / 2]cos(πQ / Q max )+(ω max +ω min ) / 2

[0084] ω max This represents the maximum value of the inertia weighting coefficient;

[0085] ω min This represents the maximum value of the inertia weighting coefficient;

[0086] Q represents the current iteration number;

[0087] Q max Indicates the maximum number of iterations;

[0088] The larger the values ​​of ω and c1 are, the smaller the value of c2 is. In this case, the particle swarm is less likely to get trapped in a local optimum. When the particle swarm gets trapped in a local optimum, ω and c1 should be increased and c2 should be decreased.

[0089] The initial search point's position x0(t) and velocity v0(t) are generated within an allowable range, where the particle's position range is the range of parameters k and c. Each particle's Pi(t) coordinate is set to its current position. The program calculates the fitness values ​​of all current particles, and sets the particle with the highest fitness value as P. g The position of (t).

[0090] S42. Update the value of ω. For Δω, Δc1 and Δc2, the values ​​are obtained through fuzzy calculation. The inputs of fuzzy control are the overall standard deviation μ and the number of iterations Q. The outputs are the inertia weight coefficient ω and the changes in the acceleration factor Δc1 and Δc2.

[0091] The acceleration factor c1 changes from large to small, while the acceleration factor c2 changes from small to large.

[0092] The overall standard deviation μ of the particle swarm was calculated using the obtained particle information:

[0093]

[0094] Where μ represents the overall standard deviation of the particle swarm;

[0095] x i This represents the position of the i-th particle at the Q-th iteration;

[0096] N represents the number of particles;

[0097] This represents the average position of all particles;

[0098] S43. Calculate the fitness value of the next generation of iterative particles according to the formula in step S41, compare it with the fitness value of the current generation of iterative particles, and take the higher one as P. i (t), when the P of any particle i (t) value is higher than P g When (t), then the P of the particle i The value of (t) is updated to P. g (t) value;

[0099] S44. Continue iterating until the current iteration number Q reaches the maximum iteration number, then stop iterating and output the optimal solution P. g (t), P g The position of (t) is the optimal solution for parameters k and c.

[0100] A speed control model is built using Simulink. Parameters k and c are then input into the speed control model, and the value of parameter n is determined based on the speed error.

[0101] The improved particle swarm optimization (PSO) algorithm generates particles that are then fed into Simulink simulation to obtain fitness values. These fitness values ​​are then returned to the PSO algorithm for further calculation. The PSO fitness values ​​utilize the ITAE index, and the parameters are incorporated into the simulation model using the SIM function.

[0102] like Figure 1 As shown, by adopting the speed control method of the present invention, the speed of the detector can reach near the set value in about 0.1s, and the vibration amplitude is small throughout the process, thus realizing fast and stable speed control.

[0103] Another embodiment of this application is an electronic device.

[0104] The electronic device can be the mobile device itself, or a standalone device that can communicate with the mobile device to receive the collected input signals from it and send the selected target decision behavior to it.

[0105] Electronic devices include one or more processors and memory.

[0106] A processor can be a central processing unit (CPU) or other form of processing unit with data processing and / or instruction execution capabilities, and can control other components in an electronic device to perform desired functions.

[0107] The memory may include one or more computer program products, which may include various forms of computer-readable storage media, such as volatile memory and / or non-volatile memory. The volatile memory may include, for example, random access memory (RAM) and / or cache memory. The non-volatile memory may include, for example, read-only memory (ROM), hard disk, flash memory, etc. One or more computer program instructions may be stored on the computer-readable storage medium, and the processor may execute the program instructions to implement the speed control methods of the various embodiments of this application described above.

[0108] In one example, the electronic device may also include input and output devices, which are interconnected via a bus system and / or other forms of connection. For example, the input device may include various devices such as on-board diagnostics (OBD), cameras, industrial cameras, etc. The input device may also include, for example, a keyboard, a mouse, etc. The output device may include, for example, a monitor, speakers, a printer, and communication networks and their connected remote output devices, etc.

[0109] In addition, depending on the specific application, electronic devices may include any other suitable components.

[0110] Another embodiment of this application may be a computer program product, which includes computer program instructions that, when executed by a processor, cause the processor to perform the speed control steps according to various embodiments of this application as described in the speed control method section above.

[0111] The computer program product can be written in any combination of one or more programming languages ​​to perform the operations of the embodiments of this application. The programming languages ​​include object-oriented programming languages ​​such as Java and C++, as well as conventional procedural programming languages ​​such as C or similar languages. The program code can be executed entirely on the user's computing device, partially on the user's computing device, as a standalone software package, partially on the user's computing device and partially on a remote computing device, or entirely on a remote computing device or server.

[0112] Furthermore, embodiments of this application may also be computer-readable storage media storing computer program instructions thereon, which, when executed by a processor, cause the processor to perform the speed control method described in this specification.

[0113] The computer-readable storage medium may be any combination of one or more readable media. A readable medium may be a readable signal medium or a readable storage medium. A readable storage medium may, for example, include, but is not limited to, electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatuses, or devices, or any combination thereof. More specific examples of readable storage media (a non-exhaustive list) include: electrical connections having one or more wires, portable disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof.

[0114] The basic principles of this application have been described above with reference to specific embodiments. However, it should be noted that the advantages, benefits, and effects mentioned in this application are merely examples and not limitations, and should not be considered as essential features of each embodiment of this application. Furthermore, the specific details disclosed above are for illustrative and facilitative purposes only, and are not limitations. These details do not limit the application to the necessity of employing the aforementioned specific details for implementation.

[0115] The block diagrams of devices, apparatuses, devices, and systems involved in this application are merely illustrative examples and are not intended to require or imply that they must be connected, arranged, or configured in the manner shown in the block diagrams. As those skilled in the art will recognize, these devices, apparatuses, devices, and systems can be connected, arranged, and configured in any manner. Words such as “comprising,” “including,” “having,” etc., are open-ended terms meaning “including but not limited to,” and are used interchangeably with them. The terms “or” and “and” as used herein refer to the terms “and / or,” and are used interchangeably with them unless the context clearly indicates otherwise. The term “such as” as used herein refers to the phrase “such as but not limited to,” and is used interchangeably with it.

[0116] It should also be noted that in the apparatus, equipment, and methods of this application, the components or steps can be disassembled and / or recombined. These disassemblies and / or recombinations should be considered as equivalent solutions of this application.

[0117] The above description of the disclosed aspects is provided to enable any person skilled in the art to make or use this application. Various modifications to these aspects will be readily apparent to those skilled in the art, and the general principles defined herein can be applied to other aspects without departing from the scope of this application. Therefore, this application is not intended to be limited to the aspects shown herein, but rather to be accorded the widest scope consistent with the principles and novel features disclosed herein.

[0118] The above description has been given for purposes of illustration and description. Furthermore, this description is not intended to limit the embodiments of this application to the forms disclosed herein. Although numerous exemplary aspects and embodiments have been discussed above, those skilled in the art will recognize certain variations, modifications, alterations, additions, and sub-combinations thereof.

Claims

1. A pipeline detector speed control method, characterized by, Includes the following steps: S1. Construct a fluid model of the pipeline detector under different opening degrees of the bypass valve; S2. Collect differential pressure data before and after the pipeline detector under different bypass valve openings; S3. Establish a formula for the change in bypass valve opening based on the collected data: wherein represents the bypass valve opening degree at the time t moment denotes t bypass valve opening degree at time +1 n the value is determined by the difference between the set speed and the real-time speed of the detector, when the set speed is lower than the real-time speed, n the value is 2, when the set speed is higher than the real-time speed, n the value is 1; k and c are parameters; S4. optimizing the parameters in step S3 k and c to reach an optimal solution. S41, the improved particle swarm algorithm is used to optimize the parameters k and c , definition: ; in, v i ( t+ 1) indicates t+ 1st moment i The velocity of each particle; v i ( t ) represents t the velocity of the particle at time i th x i ( t+ 1) represents t+ 1 the displacement of the particle at time i t x i ( t ) represents t the displacement of the particle at time t i the displacement of the particle at time t c 1 and c 2 Indicates the acceleration factor; Δ c 1 and Δ c 2 This represents the change in the acceleration factor; r 1 and r 2 A random number in the range [0,1]; P i ( t ) indicates after t The second iteration i The optimal position of each particle; P g ( t ) indicates after t The position of the optimal particle in the next iteration; Δ ω This represents the change in the inertia weighting coefficient; ω Indicates the inertia weighting coefficient; ω max This represents the maximum value of the inertia weighting coefficient; ω min This represents the maximum value of the inertia weighting coefficient; Q Indicates the current iteration number; Q max Indicates the maximum number of iterations; S42, Update ω The value of Δ ω、 Δ c 1 and Δ c 2 The overall standard deviation of the particle swarm is calculated using fuzzy computation and the resulting particle information. μ : in, μ Indicates the overall standard deviation of the particle swarm; x i Indicates the first i The particle in the first Q The position at the next iteration; N Indicates the number of particles; This represents the average position of all particles; S43. Calculate the fitness value of the next generation of iterative particles according to the formula in step S41, compare it with the fitness value of the current generation of iterative particles, and take the higher one. P i ( t ), when any particle P i ( t The value is higher than P g ( t When ), then the particle's P i ( t The value is updated to P g ( t )value; S44. Continue iterating until the current iteration number. Q Once the maximum number of iterations is reached, stop iterating and output the optimal solution. P g ( t ), P g ( t The position of ) is the parameter. k and c The optimal solution.

2. The pipeline detector speed control method according to claim 1, characterized in that, In step S42, the input to fuzzy control is the overall standard deviation. μ and number of iterations Q The output is the inertia weight coefficient. ω and the change in the acceleration factor Δ c 1 and Δ c 2 .

3. A pipeline detector speed control method according to claim 1 or 2, characterized in that, pass Simulink Construct a speed control model and incorporate parameters k and c Substitute these parameters into the speed control model and determine the parameters based on the speed error. n The value of .

4. An electronic device, characterized in that, The device includes a processor, an input device, an output device, and a memory, which are connected in sequence. The memory is used to store a computer program, which includes program instructions. The processor is configured to call the program instructions to execute a pipeline detector speed control method as described in claim 1 or 2.

5. A readable storage medium, characterized in that, The storage medium stores a computer program, which includes program instructions that, when executed by a processor, cause the processor to perform a pipeline detector speed control method as described in claim 1 or 2.