A pump temperature diagnosis method and system based on an improved sparrow algorithm
By improving the sparrow algorithm and combining it with firefly perturbation, the problems of sample imbalance and slow algorithm convergence speed in the temperature assessment of pump station units were solved, realizing the safe operation and efficient diagnosis of pump station units and reducing operating costs.
Patent Information
- Application Number
- CN202210688974.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-06-16
- Publication Date
- 2026-02-03
- Estimated Expiration
- 2042-06-16
AI Technical Summary
Existing technologies suffer from small sample sizes and imbalance in temperature assessment of pump station units. Traditional methods are difficult to meet the temperature assessment needs of complex pump station units. Furthermore, the sparrow search algorithm's searchability decreases in the later stages of iteration, reducing population diversity and resulting in slow convergence speed, low solution accuracy, and a tendency to get trapped in local optima.
By employing an improved sparrow algorithm combined with firefly perturbation, and through infrared image preprocessing, temperature value segmentation, and CNN recognition, the sparrow search algorithm is optimized using the firefly algorithm to achieve real-time diagnosis and automatic adjustment of pump station unit temperature.
It enables accurate identification and real-time diagnosis of pump station unit temperature, improves diagnostic efficiency, avoids excessively high overall pump station temperature, saves 10% to 20% of operating costs, and enhances equipment safety and reliability.
Smart Images

Figure CN114937209B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of water conservancy engineering technology, and in particular to a method and system for diagnosing water pump temperature based on an improved sparrow algorithm. Background Technology
[0002] Pumping station units are an essential component of pumping stations and hydropower stations. The safe operation of these units is crucial to the stability of the entire pumping station system and directly impacts the operating costs and profitability of the hydropower station. Condition monitoring and fault diagnosis are the most effective ways to maintain stable operation of pumping station units and reduce their maintenance and operating costs.
[0003] Infrared diagnostic technology is one of the important methods for determining whether equipment is faulty. Currently, to improve the detection efficiency of maintenance personnel, infrared thermography equipment on the market generates a temperature spectrum on the right side of the infrared detection image to mark the maximum and minimum temperature values, facilitating temperature matching, grouping and organizing fault images, and statistical recording. However, during the process of acquiring infrared images, due to limitations in acquisition conditions, there are problems such as small sample size and imbalance when extracting temperature values from infrared images.
[0004] Currently, common methods for temperature assessment of pump station units include BP neural network diagnostics, fuzzy algorithms, and manual trajectory recognition. However, these traditional methods are no longer sufficient for temperature assessment of complex pump station units. Therefore, the current research focus on vibration assessment is mainly on intelligent diagnostic methods that integrate or improve upon the aforementioned methods.
[0005] Sparrow Search Algorithm (SSA), as a novel swarm intelligence optimization algorithm, has been proven to have good optimization performance. However, due to the reduced search activity and decreased population diversity in the later stages of iteration in some cases, the algorithm suffers from drawbacks such as slow convergence speed, low solution accuracy, and susceptibility to getting trapped in local optima.
[0006] Therefore, in summary, designing a temperature diagnosis method for large-scale pumping station units, improving the SSA algorithm, and applying the temperature values obtained from improved infrared diagnostic technology to the temperature diagnosis of pumping station units, thereby forming a temperature diagnosis system, has become an urgent direction to be addressed. Summary of the Invention
[0007] This invention proposes a water pump temperature diagnosis method and system based on an improved sparrow algorithm to solve the problems in the background technology, so as to perform real-time diagnosis of the temperature of pump station units, realize the safe operation of pumps in the pump station, realize online diagnosis of temperature status, and avoid the phenomenon of excessively high overall temperature of the pump station.
[0008] The technical solution of this invention is implemented as follows:
[0009] A water pump temperature diagnosis method based on an improved sparrow algorithm includes the following steps:
[0010] S1. Collect the infrared image temperature of the pump station unit and automatically identify the infrared image temperature of the pump station unit through a temperature value recognition algorithm;
[0011] S2. Based on the improved sparrow algorithm with added firefly perturbation, the temperature of the pump station unit identified in step S1 is diagnosed in real time, and the optimal diagnosis result is output.
[0012] S3. Determine whether the temperature diagnosis result of the pump station unit output in step S2 exceeds the safety threshold, and automatically adjust the operation plan of the pump station unit.
[0013] To further optimize the technical solution, the step S1, which involves automatically identifying the temperature of the pump station unit's infrared image using a temperature value recognition algorithm, is as follows:
[0014] S11. Infrared image preprocessing based on improved adaptive threshold;
[0015] S12. Segment the temperature value based on the contour information;
[0016] S13. Temperature value recognition based on CNN.
[0017] To further optimize the technical solution, step S11 includes the following steps:
[0018] S111: Read the infrared image to be identified, and perform grayscale transformation and Gamma correction;
[0019] S112. Draw the histogram of the infrared image to be identified, and adaptively obtain the threshold on the right side of the valley of the histogram.
[0020] S113. Use an adaptive threshold to binarize the image.
[0021] To further optimize the technical solution, step S12 includes the following steps:
[0022] S121. Use the pixel accumulation method to locate the rectangular box on the binarized image;
[0023] S122. Determine the ROI region based on the location information;
[0024] S123. Use the vertical projection method to segment the ROI region into characters and establish a temperature value dataset.
[0025] To further optimize the technical solution, step S13 includes the following steps:
[0026] S131. Build a CNN network, determine the network parameters, and divide the temperature value training set and test set;
[0027] S132. Train and test the CNN network, and analyze the character recognition results;
[0028] S133, Output temperature value.
[0029] To further optimize the technical solution, the improved sparrow algorithm with added firefly perturbation includes the following steps:
[0030] S21. The temperature values identified by the temperature value recognition algorithm are used as a set of sparrows;
[0031] S22. Introduce the firefly algorithm to improve the sparrow search algorithm.
[0032] To further optimize the technical solution, step S22 specifically includes the following steps:
[0033] S221. Initialize the population, setting the population size N, maximum number of iterations, proportion of discoverers, proportion of sparrows aware of danger, and safety threshold parameters;
[0034] S222. Calculate and sort the fitness values of individuals in the current sparrow population, and find the current best and worst values.
[0035] S223. Select sparrows with better fitness values as discoverers according to a ratio, and update the discoverer positions.
[0036] S224. The remaining members in the population become new members, and the positions of the new members are updated.
[0037] S225. Randomly select a portion of individuals in the population as sparrows aware of danger, update the positions of the sparrows aware of danger, and calculate the new fitness value; if the calculated new fitness value is better than the current optimal value, then perform the update operation;
[0038] S226. Introduce the firefly algorithm, where the search particles in the population are equivalent to individual fireflies. Based on the position after iteration in step S225, calculate the fitness function value as the maximum fluorescence brightness of each firefly, calculate the fluorescence brightness and attractiveness of the fireflies, and determine the search direction of the population.
[0039] S227. Use the firefly perturbation formula to update the population position and randomly perturb the fireflies in the optimal position.
[0040] S228. Calculate the fitness value and retain the optimal individual position;
[0041] S229. Check if the stopping condition is met. If it is met, the algorithm ends and the optimal result is output. Otherwise, proceed to step S221.
[0042] To further optimize the technical solution, in step S226, the formula for calculating the relative fluorescence intensity I of the firefly is:
[0043] I=I0·exp(-γr ij )
[0044] In the formula: I0 is the maximum fluorescence intensity, which is the fluorescence intensity at a distance of zero, and the higher the fitness value of an individual, the larger the I0 value; γ is the light intensity absorption coefficient; r ij The spatial distance between each firefly;
[0045] The attraction β of fireflies is:
[0046] β=β0·exp(-γr ij )
[0047] In the formula: β0 is the maximum attraction.
[0048] To further optimize the technical solution, in step S227, the formula for updating the firefly perturbation position is:
[0049] x i =x i +β0·(x j -x i )+α·[rand(*)-1 / 2]
[0050] In the formula: x i Let x be the spatial position of sparrow i; j Let be the spatial position of sparrow j; α be the step size control parameter; rand(*) be a random factor that follows a uniform distribution.
[0051] A water pump temperature diagnostic system based on an improved sparrow algorithm includes:
[0052] The temperature data acquisition unit collects the temperature of the pump station unit's infrared image and automatically identifies the temperature of the pump station unit's infrared image through a temperature value recognition algorithm.
[0053] The temperature data diagnostic unit, based on the improved sparrow algorithm with added firefly perturbation, performs real-time diagnosis of the temperature of the pump station unit identified in the temperature data acquisition unit and outputs the optimal diagnostic result.
[0054] The automatic adjustment unit determines whether the temperature diagnosis result of the pump station unit output by the temperature data diagnosis unit exceeds the safety threshold, and automatically adjusts the operation plan of the pump station unit.
[0055] By adopting the above technical solution, the beneficial effects of the present invention are as follows:
[0056] The temperature evaluation system proposed in this invention for pump station units can not only optimize pump station operation and ensure cost savings, but also guarantee the safety and reliability of the pump structure. This invention can be applied to the optimized temperature evaluation and operation scheme determination of large-scale fully adjustable pump stations. It achieves temperature diagnosis while ensuring pump reliability and durability, which is of great significance in condition monitoring and temperature diagnosis. It is expected to save 10% to 20% or more in operating costs, bringing significant socio-economic benefits.
[0057] Unlike traditional temperature measurement, the temperature value recognition algorithm proposed in this invention achieves a temperature value recognition accuracy of 98.6%, which is higher than that of traditional character recognition algorithms. It can record the device status in a timely manner and improve diagnostic efficiency.
[0058] The pump station unit temperature diagnosis system based on the improved sparrow algorithm adopted in this invention has stronger adaptability when dealing with complex problems. It uses the firefly perturbation strategy to update the position of all individuals in the population, so that the algorithm can search the solution space more thoroughly, effectively avoid the problem of getting trapped in local optima, and thus improve the convergence speed and convergence accuracy of the algorithm. Attached Figure Description
[0059] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0060] Figure 1 This is a flowchart of a water pump temperature diagnosis method based on an improved sparrow algorithm according to the present invention;
[0061] Figure 2 This is a structural block diagram of a water pump temperature diagnosis system based on an improved sparrow algorithm according to the present invention.
[0062] Figure 3 A flowchart illustrating a temperature value identification algorithm in a water pump temperature diagnosis method based on an improved sparrow algorithm;
[0063] Figure 4 The flowchart illustrates the improved sparrow algorithm, which incorporates firefly perturbation, in a water pump temperature diagnosis method based on the improved sparrow algorithm. Detailed Implementation
[0064] 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.
[0065] In this application, the terms "comprising," "including," or any other variations thereof are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0066] A water pump temperature diagnosis method based on an improved sparrow algorithm includes the following steps:
[0067] S1. Collect infrared image temperatures of the pump station units and automatically identify the temperatures in the infrared images using a temperature value recognition algorithm. The specific steps are as follows:
[0068] S11. Infrared image preprocessing based on improved adaptive threshold.
[0069] S12. Segment the temperature value based on the contour information.
[0070] S13. Temperature value recognition based on CNN.
[0071] Step S11 in the above steps includes the following steps:
[0072] S111. Read the infrared image to be identified, and perform grayscale transformation and Gamma correction. The formula for Gamma correction is:
[0073] L G (x,y)=C×L(x,y) γ
[0074] In the formula: L(x,y) is the original image; L G (x,y) represents the corrected image; γ is the correction parameter, typically taken as 0.43; C is a constant, typically taken as 0.74.
[0075] S112. Draw the histogram of the infrared image to be identified, and adaptively obtain the threshold on the right side of the valley of the histogram.
[0076] S113. Use an adaptive threshold to binarize the image.
[0077] Step S12 in the above steps includes the following steps:
[0078] S121. Use the pixel accumulation method to locate the rectangular box on the binarized image;
[0079] S122. Determine the ROI region based on the location information;
[0080] S123. Use the vertical projection method to segment the ROI region into characters and establish a temperature value dataset.
[0081] Step S13 in the above steps includes the following steps:
[0082] S131. Construct a CNN network with a depth of 9, determine the network parameters, and divide the temperature values into training and testing sets in a 7:3 ratio;
[0083] S132. Train and test the CNN network, and analyze the character recognition results;
[0084] S133, Output temperature value.
[0085] The CNN structure includes an input image layer, C1 layer, C2 layer, P1 layer, P2 layer, FC layer, and an output layer. C1 and C2 are convolutional layers, P1 and P2 are pooling layers, and FC is a fully connected layer. The input image layer is a 16×16 temperature value image. Pooling layer P1 uses max pooling with a 1×1 kernel and a stride of 1. Pooling layer P2 uses a 2×2 convolutional kernel to further extract image features with a stride of 2, resulting in a 4×4×12 feature map. Finally, the image is input to the fully connected layer with a dropout value of 0.3. A Softmax classifier is used to predict the results, classifying them into 11 categories, including the symbol "-" and the digits "0-9".
[0086] The loss function of a CNN is represented by the deviation between the predicted and the true values, as shown in the following formula:
[0087]
[0088] In the formula: y i y is the predicted value of the i-th sample; i is the true value of the i-th sample; n is the number of samples.
[0089] Furthermore, the loss function of CNN is represented by the deviation between the predicted value and the true value, and is updated using the gradient descent method.
[0090] S2. Based on computer big data technology and an improved sparrow algorithm incorporating firefly perturbation, the temperature of the pump station unit identified in step S1 is diagnosed in real time, and the optimal diagnosis result is output.
[0091] The improved sparrow algorithm with firefly perturbation includes the following steps:
[0092] S21. Use the temperature values identified by the temperature value recognition algorithm as a set of sparrows.
[0093] S22. Based on the problem that the sparrow search algorithm is prone to getting stuck in local optima and insufficient population diversity in actual operation, the firefly algorithm is introduced to improve the sparrow search algorithm.
[0094] Specifically, step S22 includes the following steps:
[0095] S221. Initialize the population, setting parameters such as population size N, maximum number of iterations, proportion of discoverers, proportion of sparrows aware of danger, and safety threshold.
[0096] S222. Calculate and sort the fitness values of the current sparrow population, identifying the best and worst values. The sparrow set is shown below:
[0097]
[0098] In the formula: n represents the size of the sparrows, and d represents the dimension of the variable.
[0099] The fitness values for sparrows are shown below:
[0100]
[0101] In the formula: f([x i,d ]) represents the individual fitness value.
[0102] S223. Select sparrows with better fitness values as discoverers proportionally, and update the discoverer positions. The formula for updating the discoverer positions is:
[0103]
[0104] In the formula: t is the current iteration number, iter max Let be the maximum number of iterations, α be a random number uniformly distributed between (0, 1], R2∈[0, 1] represent the warning value, and ST∈[0.5, 1] represent the safety value. Q is a random number following a normal distribution, and L is a 1×d matrix where each internal element is 1.
[0105] When R2 < ST, there are no dangers or predators around the sparrow population, and the finder can search extensively for food, thereby guiding other individuals to obtain higher fitness values.
[0106] When R2≥ST, the alerter detects danger approaching and immediately releases a danger signal. The sparrow population will then engage in anti-predation behavior, adjust its search strategy, and fly to a safe area.
[0107] S224. The remaining members of the population become new members, and their positions are updated. The formula for updating the new member positions is:
[0108]
[0109] In the formula: Let $\frac{ ... Let A be the local optimal position of a sparrow in the population during the (t+1)th iteration. Let A be a multidimensional matrix whose internal elements are either 1 or -1, and A... + =A T (AA T ) -1 .
[0110] When i > n / 2, it indicates that the i-th sparrow is in the worst position. According to the algorithm's rules, it needs to fly to other places to forage and obtain more energy. Other cases mean that the i-th sparrow is in the worst position. They forage randomly around the location.
[0111] S225. Randomly select a portion of individuals in the population as sparrows aware of danger, update the positions of the sparrows aware of danger, and calculate the new fitness value; if the calculated new fitness value is better than the current optimal value, then perform the update operation.
[0112] The formula for updating the position of a sparrow that is aware of danger is:
[0113]
[0114] In the formula: β represents the global optimal position of the current sparrow population; β is a step size control parameter, a random number following a normal distribution with a mean of 0 and a variance of 1; ε is a very small constant used to avoid zero in the denominator. K∈[-1, 1] is used to control the sparrow's movement direction. i f is the fitness value of the current individual i. g f represents the optimal fitness value for the current sparrow population. w This represents the worst-case humidity value for the current sparrow population.
[0115] When f i >f g This indicates that the sparrow is on the periphery of the population and is extremely vulnerable to predators.
[0116] When f i =f gThis indicates that the sparrow is in the middle of the population and is aware of the danger. The sparrow moves closer to other individuals to protect itself from predators.
[0117] S226. Introduce the firefly algorithm, where the search particles in the population are equivalent to individual fireflies. Based on the position after the previous iteration, calculate the fitness function value as the maximum fluorescence intensity of each firefly. Calculate the fluorescence intensity and attractiveness of the fireflies to determine the search direction of the population.
[0118] The formula for calculating the relative fluorescence intensity I of fireflies is:
[0119] I=I0·exp(-γr ij )
[0120] In the formula: I0 is the maximum fluorescence brightness, which is the fluorescence brightness of the firefly at zero distance, and the higher the fitness value of the individual, the larger the I0 value; γ is the light intensity absorption coefficient, which reflects the weakening effect of fluorescence of the firefly individual as the distance increases and the absorption of the dispersing medium increases; r ij This represents the spatial distance between the fireflies.
[0121] The attraction β of fireflies is:
[0122] β=β0·exp(-γr ij )
[0123] In the formula: β0 is the maximum attraction, that is, the attraction at the individual light source.
[0124] S227. Use the firefly perturbation formula to update the population position and randomly perturb the fireflies in the optimal position.
[0125] In step S227, the formula for updating the firefly perturbation position is:
[0126] x i =x i +β0·(x j -x i )+α·[rand(*)-1 / 2]
[0127] In the formula: x i Let x be the spatial position of sparrow i; j Let be the spatial position of sparrow j; α be the step size control parameter; rand(*)∈[0,1] be a random factor that follows a uniform distribution.
[0128] S228. Calculate the fitness value and retain the optimal individual position. The formula for the sparrow's fitness value is as follows:
[0129]
[0130] In the formula: f([x i,d ]) represents the individual fitness value.
[0131] S229. Check if the stopping condition is met. If it is, the algorithm ends and the optimal result is output. Otherwise, proceed to step S221.
[0132] The stopping condition in step S229 is: output temperature value X i Whether it is the maximum in the sample set, the optimal output result is the output temperature value X. i The maximum value after comparison with the safety value Y
[0133] MAX{X i The safety value Y is generally taken as 60℃.
[0134] S3. Determine whether the temperature diagnosis result of the pump station unit output in step S2 exceeds the safety threshold. Compare the optimal solution obtained by the improved sparrow search algorithm with the temperature safety threshold, and automatically adjust the operation plan of the pump station unit to facilitate subsequent adaptive adjustments to the operation plan of the pump station unit.
[0135] After detecting that the temperature of the pump station unit has reached the safe threshold, the pump station unit operation plan is automatically adjusted to achieve a rapid drop in the overall temperature of the pump station.
[0136] Corresponding to the water pump temperature diagnosis method based on the improved sparrow algorithm provided in the above embodiments of the present invention, the present invention also provides a water pump temperature diagnosis system based on the improved sparrow algorithm. This system includes a temperature data acquisition unit, a temperature data diagnosis unit, and an automatic adjustment unit. The process of the present invention involves the temperature data acquired by the temperature data acquisition unit being diagnosed by the temperature data diagnosis unit, and then processed by the automatic adjustment unit.
[0137] The temperature data acquisition unit collects the infrared image temperature of the pump station unit and automatically identifies the temperature of the pump station unit in the infrared image through a temperature value recognition algorithm. This solves the problem of wasting manpower in the existing technology of pump station maintenance personnel observing and recording the temperature status of the pump station unit, effectively reducing the labor intensity of pump station maintenance personnel and improving work efficiency.
[0138] The temperature data acquisition unit specifically includes an acquisition unit, a preprocessing unit, a temperature value segmentation unit, and a temperature value recognition unit.
[0139] The data acquisition unit is used to acquire infrared image temperature data of the pump station unit.
[0140] A preprocessing unit for infrared image preprocessing based on an improved adaptive threshold.
[0141] Temperature value segmentation unit, used to segment temperature values based on contour information.
[0142] Temperature value recognition unit, used for temperature value recognition based on CNN.
[0143] The temperature data diagnostic unit has an improved sparrow algorithm with firefly perturbation. Based on computer big data technology and the improved sparrow algorithm with firefly perturbation, it performs real-time diagnosis of the temperature of the pump station unit identified in the temperature data acquisition unit, outputs the optimal diagnostic result, realizes the safe operation of the pump station unit, and realizes online diagnosis of the temperature status of the pump station unit.
[0144] The automatic adjustment unit determines whether the temperature diagnosis result of the pump station unit output by the temperature data diagnosis unit exceeds the safety threshold, and automatically adjusts the operation plan of the pump station unit.
[0145] After receiving the optimal result from the temperature data diagnostic unit, the system determines whether the optimal solution exceeds the temperature threshold Z. If so, the system immediately shuts down and activates the standby unit. If the optimal solution does not exceed the temperature threshold Z, the system will not shut down and activate the standby unit.
[0146] It should be noted that the temperature threshold Z is generally taken as 70℃, but is not limited to this temperature value.
[0147] After the temperature data diagnostic unit detects that the pump station unit temperature has reached the safe threshold, it automatically adjusts the pump station unit operation plan to achieve a rapid drop in the overall temperature of the pump station. This avoids problems such as excessively high overall temperature of the pump station and major equipment failures, improves the unit's service life and efficiency, and prevents economic losses.
[0148] The various embodiments in this specification are described in a progressive manner. Similar or identical parts between embodiments can be referred to mutually. Each embodiment focuses on describing the differences from other embodiments. In particular, for system or system embodiments, since they are basically similar to method embodiments, the description is relatively simple, and relevant parts can be referred to the descriptions in the method embodiments. The systems and system embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without creative effort.
[0149] Those skilled in the art will further recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementations should not be considered beyond the scope of this invention.
[0150] The above description of the disclosed embodiments enables those skilled in the art to make or use the invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the invention. Therefore, the invention is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A method for diagnosing water pump temperature based on an improved sparrow algorithm, characterized in that, Includes the following steps: S1. Acquire the infrared image temperature of the pump station unit and automatically identify the temperature of the pump station unit's infrared image using a temperature value recognition algorithm; the steps in S1 for automatically identifying the temperature of the pump station unit's infrared image using the temperature value recognition algorithm are as follows: S11. Infrared image preprocessing based on improved adaptive threshold; S12. Segment the temperature value based on the contour information; S13. Temperature value recognition based on CNN; S2. Based on the improved sparrow algorithm with added firefly perturbation, the temperature of the pump station unit identified in step S1 is diagnosed in real time, and the optimal diagnosis result is output; the improved sparrow algorithm with added firefly perturbation includes the following steps: S21. The temperature values identified by the temperature value recognition algorithm are used as a set of sparrows; S22. Introduce the firefly algorithm to improve the sparrow search algorithm; Step S22 specifically includes the following steps: S221. Initialize the population, setting the population size N, maximum number of iterations, proportion of discoverers, proportion of sparrows aware of danger, and safety threshold parameters; S222. Calculate and sort the fitness values of individuals in the current sparrow population, and find the current best and worst values. S223. Select sparrows with better fitness values as discoverers according to a ratio, and update the discoverer positions. S224. The remaining members in the population become new members, and the positions of the new members are updated. S225. Randomly select a portion of individuals in the population as sparrows aware of danger, update the positions of the sparrows aware of danger, and calculate the new fitness value; if the calculated new fitness value is better than the current optimal value, then perform the update operation; S226. Introduce the firefly algorithm, where the search particles in the population are equivalent to individual fireflies. Based on the position after iteration in step S225, calculate the fitness function value as the maximum fluorescence brightness of each firefly, calculate the fluorescence brightness and attractiveness of the fireflies, and determine the search direction of the population. S227. Use the firefly perturbation formula to update the population position and randomly perturb the fireflies in the optimal position. S228. Calculate the fitness value and retain the optimal individual position; S229. Check if the stopping condition is met. If it is met, the algorithm ends and the optimal result is output. Otherwise, proceed to step S221. S3. Determine whether the temperature diagnosis result of the pump station unit output in step S2 exceeds the safety threshold, and automatically adjust the operation plan of the pump station unit.
2. The water pump temperature diagnosis method based on the improved sparrow algorithm according to claim 1, characterized in that, Step S11 includes the following steps: S111: Read the infrared image to be identified, and perform grayscale transformation and Gamma correction; S112. Draw the histogram of the infrared image to be identified, and adaptively obtain the threshold on the right side of the valley of the histogram. S113. Use an adaptive threshold to binarize the image.
3. The water pump temperature diagnosis method based on the improved sparrow algorithm according to claim 1, characterized in that, Step S12 includes the following steps: S121. Use the pixel accumulation method to locate the rectangular box on the binarized image; S122. Determine the ROI region based on the location information; S123. Use the vertical projection method to segment the ROI region into characters and establish a temperature value dataset.
4. The water pump temperature diagnosis method based on the improved sparrow algorithm according to claim 1, characterized in that, Step S13 includes the following steps: S131. Build a CNN network, determine the network parameters, and divide the temperature value training set and test set; S132. Train and test the CNN network, and analyze the character recognition results; S133, Output temperature value.
5. A water pump temperature diagnosis method based on an improved sparrow algorithm according to claim 1, characterized in that, In step S226, the formula for calculating the relative fluorescence intensity I of the firefly is: I = I0·exp(-γrij) In the formula: I0 is the maximum fluorescence brightness, which is the fluorescence brightness of the individual at a distance of zero, and the better the fitness value of the individual, the larger the I0 value; γ is the light intensity absorption coefficient; rij is the spatial distance between each firefly; The attraction β of fireflies is: β=β0·exp(-γrij) In the formula: β0 is the maximum attraction.
6. The water pump temperature diagnosis method based on the improved sparrow algorithm according to claim 1, characterized in that, In step S227, the formula for updating the firefly perturbation position is: xi=xi+β0·(xj-xi)+α·[rand(*)-1 / 2] In the formula: xi is the spatial position of sparrow i; xj is the spatial position of sparrow j; α is the step size control parameter; rand(*) is a random factor that follows a uniform distribution.
7. A water pump temperature diagnostic system based on an improved sparrow algorithm, characterized in that, Implementing the method according to any one of claims 1 to 6 includes: The temperature data acquisition unit collects the temperature of the pump station unit's infrared image and automatically identifies the temperature of the pump station unit's infrared image through a temperature value recognition algorithm; The temperature data diagnostic unit, based on the improved sparrow algorithm with added firefly perturbation, performs real-time diagnosis on the temperature of the pump station unit identified in the temperature data acquisition unit and outputs the optimal diagnostic result. The automatic adjustment unit determines whether the temperature diagnosis result of the pump station unit output by the temperature data diagnosis unit exceeds the safety threshold, and automatically adjusts the operation plan of the pump station unit.
Citation Information
Patent Citations
Electric equipment thermal fault diagnosis method and system and electronic device
CN107607207A
Petroleum oil type identification method and system
CN114298205A