CN-115857574-B - Pipeline detector speed control method, electronic equipment and readable storage medium
Abstract
The invention relates to the field of natural gas pipeline detection, in particular to a pipeline detector speed control method, electronic equipment and a readable storage medium, which comprises the following steps of S1, constructing fluid models of a pipeline detector under different openings of a bypass valve; S2, collecting pressure difference data before and after the pipeline detector under different bypass valve opening degrees, S3, establishing a bypass valve opening degree change formula aiming at the collected data, and S4, carrying out optimization treatment on parameters k and c in the step S3 to enable the parameters k and c to reach an optimal solution. The invention adjusts the opening of the bypass valve through the opening change formula of the bypass valve, can lead the speed of the detector to reach the vicinity of the set value within about 0.1s, has small vibration amplitude in the whole process, and realizes the rapid and stable adjustment of the speed control.
Inventors
- PAN JIANHUA
- ZHAO DONGJUN
- GAO LUN
- WANG HUI
Assignees
- 合肥工业大学
Dates
- Publication Date
- 20260512
- Application Date
- 20221125
Claims (5)
- 1. A method of controlling the speed of a pipeline detector, comprising the steps of: s1, constructing a fluid model of the pipeline detector under different opening degrees of the bypass valve; s2, collecting front-rear pressure difference data of the pipeline detector under different opening degrees of the bypass valve; s3, establishing a bypass valve opening change formula aiming at the collected data: Wherein, the Indicating the opening of the bypass valve at time t; The bypass valve opening at time t+1; 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, the value of n is 2, and when the set speed is higher than the actual speed, the value of n is 1; k and c are parameters; s4, optimizing the parameters k and c in the step S3 to achieve an optimal solution; S41, optimizing by adopting an improved particle swarm algorithm to obtain parameters k and c, and defining: ; wherein v i (t+1) represents the speed of the ith particle at time t+1; v i (t) represents the speed of the ith particle at time t; x i (t+1) represents the displacement of the ith particle at time t+1; x i (t) represents the displacement of the ith particle at time t; c 1 and c 2 represent acceleration factors; Δc 1 and Δc 2 represent the change values of the acceleration factors; r 1 and r 2 are random numbers in the range of [0,1 ]; p i (t) represents the optimal position of the ith particle after t iterations; P g (t) represents the position of the optimal particle after t iterations; Δω represents a variation value of the inertia weight coefficient; ω represents an inertial weight coefficient; Omega max represents the maximum value of the inertial weight coefficient; Omega min represents the maximum value of the inertial weight coefficient; Q represents the current iteration number; Q max represents the maximum number of iterations; S42, updating the value of ω, calculating the total standard deviation μ of the particle swarm from the obtained particle information by fuzzy calculation for Δω, Δc 1 , and Δc 2 : wherein μ represents the overall standard deviation of the population of particles; x i represents the position where the ith particle was located at the Q-th iteration; N represents the number of particles; Representing the average position of all particles; S43, calculating the fitness value of the next generation of iterative particles according to the formula in the step S41, comparing the fitness value with the fitness value of the current generation of iterative particles, taking the fitness value as P i (t), and updating the P i (t) value of any particle to be the P g (t) value when the P i (t) value of the particle is higher than the P g (t); S44, continuing iteration until the current iteration number Q reaches the maximum iteration number, stopping iteration and outputting the position of the optimal solution P g (t),P g (t), namely the optimal solution of the parameters k and c.
- 2. The method according to claim 1, wherein in step S42, the inputs of the fuzzy control are the total standard deviation μ and the number of iterations Q, and the outputs are the inertia weight coefficient ω and the variation values Δc 1 and Δc 2 of the acceleration factor.
- 3. A method according to claim 1 or 2, characterized in that the parameters k and c are brought into the speed control model by building the speed control model by simulink, and the value of the parameter n is determined based on the speed error.
- 4. An electronic device comprising a processor, an input device, an output device and a memory, the processor, the input device, the output device and the memory being connected in sequence, the memory being for storing a computer program, the computer program comprising program instructions, the processor being configured to invoke the program instructions to perform a pipeline detector speed control method as claimed in claim 1 or 2.
- 5. A readable storage medium, characterized in that the storage medium stores a computer program comprising program instructions which, when executed by a processor, cause the processor to perform a pipe detector speed control method according to claim 1 or 2.
Description
Pipeline detector speed control method, electronic equipment and readable storage medium Technical Field The invention relates to the field of natural gas pipeline detection, in particular to a pipeline detector speed control method, electronic equipment and a readable storage medium. Background The natural gas pipeline robot, also called pipeline detector or pipeline pig, can be used for natural gas pipeline detection. The pipeline detector is arranged in the natural gas pipeline and is in sealing fit with the pipeline body, the pipeline is divided into a front section and a rear section, the front section and the rear section of the pipeline have pressure difference, and the front section and the rear section of the pipeline are communicated through a bypass valve on the pipeline detector, so that the pipeline detector can be driven to move along the pipeline through the pressure difference, the running speed of the detector can be regulated by controlling the valve opening of the bypass valve, the speed is kept near a set value, and the effectiveness of a detection result is ensured; The best technical application of the current pipeline detection is a magnetic leakage detection method, and a magnetic leakage sensor is usually arranged on a pipeline detector and is used for detecting defects, corrosion and other problems existing in the inner wall of a natural gas pipeline. However, the magnetic flux leakage detection has a certain requirement on the speed of the detector, and the speed of the detector needs to be kept at a specified speed value to obtain accurate detection data. At present, the adjustment of the opening of the valve is basically determined by experience of a detector, the speed of the pipeline detector cannot be rapidly adjusted to be close to a set value, and the detector is easily vibrated due to the influence of repeated speed adjustment in the process that the detector repeatedly adjusts the speed until the speed reaches the set value, so that the problem needs to be solved. Disclosure of Invention In order to avoid and overcome the technical problems in the prior art, the invention provides a speed control method of a pipeline detector, which can enable the speed of the pipeline detector to reach the vicinity of a set value rapidly, has small vibration amplitude and is stable in adjustment process. The invention also provides electronic equipment and a readable storage medium. In order to achieve the above purpose, the present invention provides the following technical solutions: a method of controlling the speed of a pipeline detector, comprising the steps of: s1, constructing a fluid model of the pipeline detector under different opening degrees of the bypass valve; s2, collecting front-rear pressure difference data of the pipeline detector under different opening degrees of the bypass valve; s3, establishing a bypass valve opening change formula aiming at the collected data: Wherein, the Indicating the opening of the bypass valve at time t; The bypass valve opening at time t+1; 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, the value of n is 2, and when the set speed is higher than the actual speed, the value of n is 1; k and c are parameters; and S4, optimizing the parameters k and c in the step S3 to achieve an optimal solution. The invention further provides a scheme that S41, an improved particle swarm algorithm is adopted to optimize and process to obtain parameters k and c, and definition is given: vi(t+1)=(ω+Δω)vi(t)+(c1+Δc1)r1(pi(t)-xi(t))+(c2+Δc2)r2(pg(t)-xi(t)); xi(t+1)=xi(t)+vi(t+1) wherein v i (t+1) represents the speed of the ith particle at time t+1; v i (t) represents the speed of the ith particle at time t; x i (t+1) represents the displacement of the ith particle at time t+1; x i (t) represents the displacement of the ith particle at time t; c 1 and c 2 represent acceleration factors; Δc 1 and Δc 2 represent the change values of the acceleration factors; r 1 and r 2 are random numbers in the range of [0,1 ]; p i (t) represents the optimal position of the ith particle after t iterations; P g (t) represents the position of the optimal particle after t iterations; Δω represents a variation value of the inertia weight coefficient; ω represents an inertial weight coefficient; ω=[(ωmax-ωmin)/2]cos(πQ/Qmax)+(ωmax+ωmin)/2 Omega max represents the maximum value of the inertial weight coefficient; Omega min represents the maximum value of the inertial weight coefficient; Q represents the current iteration number; Q max represents the maximum number of iterations; S42, updating the value of ω, calculating the total standard deviation μ of the particle swarm from the obtained particle information by fuzzy calculation for Δω, Δc 1, and Δc 2: wherein μ represents the overall standard deviation of the population of particles; x i represents the position where the