A method for automatic meter reading and identification of a substation inspection robot vehicle
Patent Information
- Application Number
- CN202510922780.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-04
- Publication Date
- 2026-08-28
- Estimated Expiration
- 2045-07-04
AI Technical Summary
然而,现有的巡检机器人系统仍然存在一些问题,限制了其应用范围和效果
[0208]有益效果:与现有技术相比,本发明显著的进步为提高巡检效率和识别精度,同时增强系统的安全性。
Smart Images

Figure CN120823588B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of inspection, and in particular to an automatic meter reading and identification method for a substation inspection vehicle. Background Technology
[0002] With the transformation of the global energy structure and the continuous advancement of smart grid construction, substations, as crucial hubs of the power system, are constantly increasing in size and complexity. This undoubtedly places higher demands on the operation and maintenance of substations, especially on inspection work. Traditional inspection methods mainly rely on manual labor, which suffers from low efficiency, high labor intensity, and numerous safety hazards.
[0003] To address the shortcomings of traditional inspection methods, inspection robot technology has emerged and demonstrated great potential in substation inspections. Inspection robots can replace manual labor in repetitive and hazardous inspection tasks, improving inspection efficiency and safety while reducing maintenance costs. However, existing inspection robot systems still have some limitations that restrict their application scope and effectiveness.
[0004] Some inspection robots employ rule-based path planning methods, which struggle to adapt to the complexity and dynamic changes of substation environments. This results in low pathfinding efficiency and a tendency to get trapped in local optima, failing to find the globally optimal path. Furthermore, these methods do not adequately consider safety factors such as distance from obstacles, travel speed, and turning angle, increasing the risk of collisions and compromising the safety of inspection work. This could even lead to equipment damage and personnel injuries.
[0005] Meanwhile, existing digital image recognition algorithms for meters are quite sensitive to factors such as changes in lighting, obstructions, and background interference, resulting in insufficient recognition accuracy. This can easily lead to misidentification or failure to recognize numbers, thus affecting the accuracy of meter reading results and potentially causing misjudgments and accidents. Summary of the Invention
[0006] Purpose of the invention: This invention proposes an efficient, safe, and accurate method for automatic meter reading and identification using substation inspection vehicles.
[0007] Technical solution: The automatic meter reading and identification method for substation inspection vehicles disclosed in this invention includes the following steps:
[0008] S1. Construct a 3D raster map of the substation environment;
[0009] S2. Establish a multi-objective function for the global path planning of the inspection robot vehicle;
[0010] S3. Use the improved DOA optimization algorithm and the improved DDPG reinforcement learning algorithm to perform global and local path planning and find the optimal path for the inspection robot.
[0011] The S4 and DDPG algorithms introduce an improved GOA algorithm into the reward and penalty function to optimize the path of the safe time-distance model.
[0012] S5. Combining visual and textual features, the NLM model is used for image denoising, and the SegVG model is used for image feature extraction.
[0013] S6. An improved MHAFF model is used to perform multi-level feature extraction and adaptive fusion on the located dial digits to achieve accurate digit recognition.
[0014] In S2, a multi-objective function F is established for the global path planning of the inspection robot. total for:
[0015] F total =w1·F length +w2·F collision +w3·F smooth
[0016] Among them, F length F represents the total path length; collision F represents the minimum distance between the path and the obstacle. smooth Indicates the turning angle of adjacent path segments;
[0017]
[0018] Where, p i+1 p i Represents the three-dimensional coordinates of two different nodes; Nr represents the total number of nodes;
[0019]
[0020] Where, d obs,i k represents the distance from the path to the obstacle. collision Indicates the attenuation coefficient;
[0021]
[0022] Where, Δθ i Indicates the horizontal steering angle; Δφ i Indicates the vertical ascent angle.
[0023] Furthermore, S3 employs an improved DOA algorithm to solve for the globally optimal path for multi-objective functions, specifically including:
[0024] Within the search space, ND individuals are randomly generated, each representing a candidate solution for a feasible path.
[0025] X i =X l +rand×(X u*X l ), i = 1, 2, ..., ND
[0026] Among them, X i Let represent the i-th feasible path candidate solution in the population; ND represents the population size, i.e., the number of feasible path candidate solutions; rand represents a random number between [0,1]; X u X l These represent the upper and lower bounds of the search space, respectively, which represent the feasible range of candidate solutions;
[0027] An improvement to the DOA algorithm is achieved by introducing the Tent chaotic map to generate a uniform initial population.
[0028]
[0029] Among them, α DOA Represents a random number between [0, 1];
[0030] The initial population matrix is represented by X as follows:
[0031]
[0032] Where, x i,j This represents the i-th feasible path candidate solution in the j-th dimension; Dim represents the dimension of the problem, i.e., the number of decision variables in the optimization problem;
[0033] The DOA optimization algorithm has entered the exploration phase, using a global search to find potential optimal feasible path solutions;
[0034] Set the maximum number of iterations during the exploration phase. The current iteration number t is less than At that time, the algorithm focuses on the exploration phase of the global search;
[0035] At the start of each iteration, each inspection robot remembers the best path found in the previous iteration within its group, and resets its position information to the position information of the best path in that group at the start of each iteration, as shown in the following formula:
[0036]
[0037] in, This represents a feasible path candidate solution at the (t+1)th iteration; This represents the current best path solution for group q in the t-th iteration;
[0038] In each iteration, each inspection robot forgets some of the previously explored path information and reorganizes a new path based on the best path information in the current iteration, as shown in the following formula:
[0039]
[0040] in, This represents the i-th feasible path candidate solution in the j-th dimension during the (t+1)-th iteration; x represents the best feasible path solution in the j-th dimension of the q-th group at the t-th iteration; l,j x u,j Let these represent the upper and lower bounds of the search space in the j-th dimension, respectively; Indicates the maximum number of iterations; This indicates the maximum number of iterations during the exploration phase; This indicates an exploration of the dimension of forgetting;
[0041] In each iteration, each inspection robot randomly obtains a portion of the forgotten dimension's location information from other inspection robots to help it explore new areas and find potentially overlooked feasible paths. The specific formula is as follows:
[0042]
[0043] in, Let represent the m-th feasible path candidate solution in the j-th dimension in the (t+1)-th and t-th iterations, respectively; m represents the randomly selected individual number, m∈[1,N];
[0044] During the development phase, the current iteration count range is: Next, before each iteration, the best candidate path in the previous iteration of the entire population is updated to the latest feasible path candidate solution;
[0045]
[0046] in, This represents the i-th feasible path candidate solution in the (t+1)-th iteration; This represents the candidate solution for the best feasible path for the entire population at the t-th iteration.
[0047] Continue updating each feasible path candidate solution on the forgetting dimension.
[0048]
[0049] in, This represents the i-th feasible path candidate solution in the j-th dimension during the (t+1)-th iteration; x represents the best feasible path solution in the j-th dimension at the t-th iteration; l,j x u,j Let these represent the upper and lower bounds of the search space in the j-th dimension, respectively; Indicates the maximum number of iterations; This indicates the dimension forgotten during the development phase;
[0050] An improved algorithm is introduced by a positive greedy selection mechanism. The optimal individual position, i.e., the best feasible path for the inspection robot, is selected based on the fitness value of the candidate solutions. The specific formula is as follows:
[0051]
[0052] Wherein, F(X) i ) represents the fitness value of the i-th feasible path solution in the population; This represents the fitness value of the feasible path solution in the j-th dimension at iteration t. That is, based on the fitness value, if the fitness value of the i-th feasible path solution selected in the population is smaller than the fitness value of the feasible path solution in the j-th dimension at iteration t, then the feasible path solution in the j-th dimension is replaced as the current better path solution.
[0053]
[0054] Wherein, F(X) best ) represents the fitness value of the optimal path solution for the inspection robot vehicle; This represents the fitness value of the optimal path solution for the inspection robot in the t-th iteration;
[0055] A forward greedy selection mechanism is used to determine the optimal solution, selecting the feasible path with the minimum objective function value as the global optimal solution for the inspection robot. Simultaneously, it is determined whether the iterative optimization satisfies the maximum iteration condition. If the condition is met, the iteration stops; otherwise, the loop continues until the optimal solution, i.e., the optimal path solution for the inspection robot, is obtained.
[0056] Furthermore, S3 employs an improved DDPG reinforcement learning algorithm for local path planning, specifically including:
[0057] Randomly initialize the policy network and value network and their corresponding target networks, and initialize the experience replay buffer;
[0058] Perform state-space design:
[0059]
[0060] in, This indicates the coordinate difference between the current position of the inspection robot and the obstacle; This indicates the coordinate difference between the current position of the inspection vehicle and the target point; v current This indicates the linear velocity of the inspection vehicle. This indicates the energy consumption of the inspection vehicle during its current operation;
[0061]
[0062] Among them, C obs_i (x obs_i ,y obs_i ) represents the current position of the i-th obstacle; C goal (x goal ,y goal ) represents the coordinates of the target point; C agent (x agent ,y agent () indicates the current coordinates of the inspection vehicle;
[0063] Perform motion space design:
[0064]
[0065] in, This represents the output of the Actor network, i.e., the distance the inspection robot has moved in the x and y directions;
[0066] Inspection robot performs action a t Move to a new location in the environment and observe the reward r and the next state S. t+1 And whether it is a terminated state, and at the same time, the experience (S) generated by this interaction. t ,a t ,r,S t+1 Stored in the experience replay buffer R;
[0067] Design the reward function: based on the collision penalty factor r collision Target attraction reward / punishment factor, destination reward factor r destination Energy consumption penalty r energy Speed reward factor r velocity The reward for the safe time-distance model is composed of the following formulas:
[0068] r(S,a)=∑γ·r
[0069] Where γ represents the weight, that is, the weight of the reward factor in each part of the reward function; r represents the reward function for each type, and the specific reward and penalty factors are as follows:
[0070] Considering the collision penalty factor r of the inspection vehicle collision When the inspection robot collides with an obstacle, a penalty will be imposed, and the specific formula is as follows:
[0071]
[0072] Where, d obs Indicates the distance from the inspection vehicle to the nearest obstacle; τ represents the attenuation coefficient; Π collisionRepresents the collision indication function; κ c η c κ represents the weighting coefficient, and c Much greater than η c ;
[0073] Considering the target gravity reward / penalty factor r of the inspection robot vehicle gravitation The system sets rewards and penalties based on the gravitational potential field of the inspection robot vehicle at the target point. A positive reward is given whenever the distance between the inspection robot vehicle and the target point decreases, and a penalty is given otherwise.
[0074]
[0075] Among them, D i D represents the Euclidean distance between the inspection robot and the target point at time i; i-1 K represents the Euclidean distance between the inspection robot and the target point at time i-1; alt Represents the weighting coefficient; r alt Indicates the gravitational coefficient;
[0076] Considering the reward factor r for the inspection robot reaching its destination destination The inspection robot will be rewarded when it reaches the target point, according to the following formula:
[0077]
[0078] Where, d prev d represents the distance from the target point at the previous moment; current Indicates the current distance; d init Indicates the initial distance; Π reached Target arrival indicator; η d , Indicates the weighting coefficient;
[0079] Considering the energy consumption penalty r of the inspection vehicle energy The specific formula is as follows:
[0080]
[0081] in, t represents the energy consumption of the current action; enery Indicates the time already elapsed; T enery max Indicates the maximum allowed time; λ1 and λ2 represent weighting coefficients;
[0082] Considering the speed reward factor r of the inspection robot vehicle velocity Within a unit sampling period, the value of the reward factor is positively correlated with the speed, as shown in the following formula:
[0083]
[0084] Among them, v current This indicates the linear velocity of the inspection vehicle; v max Maximum permissible speed; v target This indicates the recommended speed for the current state, which can be dynamically adjusted; a v ,b v This represents the weighting coefficient.
[0085] Furthermore, the reward and penalty function is improved by incorporating a safe time-distance model:
[0086] Traditional collision time (TTC) is expressed as follows:
[0087]
[0088] Among them, D rel Indicates the relative longitudinal distance between the inspection vehicle and the obstacle; v rel This indicates the relative longitudinal velocity between the inspection vehicle and the obstacle;
[0089] Emergency braking safe distance:
[0090]
[0091] Where d1 represents the braking distance of the inspection robot; v ego Indicates the speed of the inspection vehicle; v f t represents the velocity of the obstacle. r Indicates the delay time of the emergency obstacle avoidance system; a ego d0 represents the absolute value of the braking deceleration of the inspection vehicle; d0 represents the distance between the inspection vehicle and the obstacle in front after the vehicle stops through the braking obstacle avoidance operation, d0 = 0.1m.
[0092]
[0093] Where T1 represents the braking critical TTC value;
[0094] The time-distance condition that must be met for emergency braking to avoid obstacles is:
[0095]
[0096] Safe distance for emergency steering:
[0097]
[0098] Where d2 represents the emergency turning distance of the inspection robot; t c Indicates the delay time for emergency steering;
[0099]
[0100] Where T2 represents the critical TTC value for steering;
[0101] The time-distance condition that must be met for emergency braking and steering is:
[0102]
[0103] The process of repeated environmental interaction and network updates continuously adjusts the movement trajectory of the inspection robot in the local area until the maximum number of iterations is reached, and the inspection robot stably finds the local optimal path within a certain period of time.
[0104] Furthermore, S4 specifically includes:
[0105] Design the objective function minimize f(x) TTC ):
[0106]
[0107] Where, f(x) TTC () represents the objective function value; x TTC This represents a vector of decision variables, including the speed of the inspection robot vehicle, braking deceleration, etc. This represents the weighting coefficient, used to balance the influence of different factors on the objective function;
[0108] The constructed objective function is min mize f(x) TTC ) and decision variable x TTC Input the improved GOA optimization algorithm to find the optimal solution that satisfies the safe time interval condition;
[0109] Randomly generate the initial goat population:
[0110]
[0111] in, Let represent the position vector of the i-th candidate solution individual, i.e., a d-dimensional vector in the search space; d represents the dimension, i.e., the number of decision variables; i represents the number of candidate solution individuals, i = 1, 2, ..., NR;
[0112] The initial population was generated as follows:
[0113]
[0114] Where UB and LB represent the upper and lower bounds of the search space, respectively; rand(d) represents a d-dimensional random vector with values ranging from [0,1]. The fitness value for each goat's position is also calculated, representing the objective function value.
[0115] The formula for updating the new position is:
[0116]
[0117] in, This indicates the position of the i-th candidate solution in the (t+1)-th iteration; α represents the position of the i-th candidate solution in iteration t; GOA R represents the exploration coefficient, which controls the intensity of random motion; Guass Let N(0,1) represent a random variable drawn from a Gaussian distribution N(0,1).
[0118] Introducing adaptive inertia weights to optimize the exploration coefficients of the GOA optimization algorithm:
[0119]
[0120] Where, k GOA This represents a parameter that controls the upper and lower limits of the weights; μ GOA This indicates the parameter controlling the smoothness of the search; T represents the maximum number of iterations. GOA Indicates the current iteration number;
[0121] The position update formula is:
[0122]
[0123] in, β represents the current optimal solution. GOA Indicates the development coefficient;
[0124] An improvement is made by introducing a Cauchy-Gaussian mutation strategy, the specific formula of which is as follows:
[0125] β GOA =βC GOA [1+η GOA 1·cauchy(0,δ GOA 2 )+η GOA 2·Gauss(0,δ GOA 2 )]
[0126]
[0127] Wherein, βC GOA δ represents the original development coefficient value in the range [0,1]; GOA Indicates standard deviation; cauchy(0,δ) GOA ) and Gauss(0,δ GOA () represents a random variable based on the Cauchy and Gaussian distributions; and This represents an adaptive adjustment variable that is dynamically adjusted based on the population's evolutionary state during the iteration process;
[0128] The position update formula is:
[0129]
[0130] Among them, J GOA Indicates the jump coefficient; This represents a candidate solution individual randomly selected from the population;
[0131] Reset Formula:
[0132]
[0133] Stopping Criteria
[0134]
[0135] in, This represents the fitness of the optimal solution in the (t+1)th iteration; Let represent the fitness of the optimal solution in the t-th iteration;
[0136] If the difference is less than the preset threshold ε' GOA If the algorithm has converged to a sufficiently good solution, then the iteration can be stopped.
[0137]
[0138] The average of the squared differences between the fitness values of all candidate solutions in the population and the fitness value of the current best solution is calculated.
[0139] If the average value is less than the preset threshold δ' GOA If the fitness values of all candidate solutions in the population are close enough to the current best solution, then the iteration can be stopped.
[0140] Furthermore, S5 employs the NLM model for image denoising, including:
[0141] Substation instrument images u NLM pixel i in NLM A pixel block the size of a reference window is generated centered on the image, and candidate pixel blocks are generated within the search window using a sliding window approach. Weights are determined by the similarity between non-local pixels in the substation instrument image.
[0142] Calculate pixel i NLM and j NLM Euclidean distance:
[0143]
[0144] Among them, a NLMd represents the standard deviation of the Gaussian kernel. NLM (i NLM ,j NLM ) represents a function of Euclidean distance, and represents the decay of weights; and Representing pixels i NLM The size of the center is N NLM *N NLM The square neighborhood and pixels j NLM The size of the center is N NLM *N NLM The square neighborhood of u(N); iNLM ) represents N iNLM grayscale value; express grayscale value; u NLM This refers to the instrument images captured by the inspection robot, i.e., images containing noise.
[0145] The weighting coefficients are:
[0146]
[0147] And satisfy
[0148]
[0149] Where, w(i NLM ,j NLM () is the weight, used to evaluate pixel j. NLM The degree of influence on pixel i; C(i) NLM ) is a standardized constant, i.e., a normalization constant; i NLM ,j NLM ∈X NLM X NLM It is a pixel field; h NLM This represents the filtering parameter, which controls the degree of decay of the exponential function;
[0150] A dynamic parameter mapping adjustment strategy is introduced to automatically adjust 'a' based on the noise level of local image patches. NLM and h NLM The value of is adjusted to more effectively suppress noise while preserving image details.
[0151] First, local noise is estimated, and the variance of the grayscale values for each reference window is calculated:
[0152]
[0153] Where, σ NLM 2 It is the variance of grayscale values; n NLM 2N is the total number of pixels within the neighborhood window; NLM It is a reference window; μ NLM It is the average grayscale value of the window;
[0154] Mapping dynamic parameters based on the variance of gray values:
[0155]
[0156] Among them, h NLM ' represents the filter parameters after dynamic mapping; a NLM ' represents the standard deviation of the Gaussian kernel after dynamic mapping; α NLM β NLM Indicates the adjustment coefficient; This represents the maximum noise variance across the entire image;
[0157] The formula for the weighting coefficients has been updated to:
[0158]
[0159] Use weights to process pixel i NLM The denoised image U(i) is obtained by weighting the values of the surrounding pixels. NLM ):
[0160]
[0161] Among them, U(i NLM ) represents the image after denoising; u(j) NLM ) is pixel j NLM The original pixel values.
[0162] Furthermore, S5 employs the SegVG model for image feature extraction:
[0163] For the denoised image U, DETR and BERT are used as visual and text backbone networks, respectively, to extract image and text features;
[0164] The denoised instrument image is input into a pre-trained DETR model, which uses its ResNet and Transformer encoders to extract visual features. A pre-trained ResNet model is used to extract 2D feature maps, and a 1×1 convolutional layer is used to reduce the number of channels in the feature maps, resulting in feature map I'. Feature map I' is then flattened into a one-dimensional vector Z. v ;
[0165] Vector Z v Positional encoding is added and sequentially fed into the encoder layer of the DETR model for feature extraction, resulting in the final visual feature vector.
[0166]
[0167] in, These are the original visual features of the i1+1th layer; These are the original visual features of the i1th layer; This is the i1th layer in the DETR backbone network; i1 is the total number of layers; v1 represents vision.
[0168] The text is processed using a pre-trained BERT model to obtain the text feature vector Z. t :
[0169] The input text is segmented and special markers [CLS] and [SEP] are added, placed at the beginning and end of the text respectively;
[0170] The text is converted into a language feature vector Z using the embedding layer of a pre-trained BERT model. t ;
[0171] The language feature vector Z t The features are sequentially input into the encoder layer of the BERT model for feature extraction, resulting in the final text feature vector Z. t :
[0172]
[0173] in, These are the original text features of the i1+1th layer; It represents the original text features of the i1th layer; t represents the text. It is the 2i1+1 layer in the DETR backbone network; It is the 2i1st layer in the DETR backbone network;
[0174] The Triple Alignment module is introduced to iteratively update query, text, and visual features through a three-way attention mechanism, eliminating domain differences between them.
[0175] Z o It is initialized with learnable embeddings, including a regression query and multiple split queries;
[0176] A triple multi-head attention mechanism is employed to perform triangular updates on query, text, and visual features, enabling them to share the same feature space and mitigating domain differences. The formula is as follows:
[0177]
[0178] Among them, Tri-MHA is the triangular attention mechanism; Z o It is the original query feature; Z' o This is the updated query feature; Z t' is the updated text feature; It refers to the updated visual features; 'o' represents the query.
[0179] The updated features are then merged back into the original features, using the following formula:
[0180]
[0181] The aligned text feature vector Z t and visual feature vectors The features are connected to form a multimodal feature vector, which is then input into the Transformer encoder layer for feature fusion to obtain the encoder output containing text and visual information. The encoder output is then input into the decoder, which uses the bbox2seg scheme to convert the target box annotations into a segmentation mask.
[0182] Furthermore, S6 includes:
[0183] The digital region image block U1 output by SegVG is cropped and then input into the MHAFF module to meet the input requirements of CNN and Transformer;
[0184] Using CNN to extract local features of images Capture local information such as edges and textures of numbers; use Transformer to extract global features of images. Capture the positional relationships and overall layout of numbers within the entire image;
[0185] Where X1 is the feature matrix extracted by the Transformer branch; Y is the feature matrix extracted by the CNN branch;
[0186] A multi-head attention mechanism is used to fuse the features extracted by CNN and Transformer to obtain a more comprehensive feature representation;
[0187] The fused features are classified to identify numbers in the image.
[0188] Furthermore, a multi-head attention mechanism is used to fuse the features extracted by the CNN and the Transformer. The steps are as follows:
[0189] (1) Generate the Q, K, V matrices:
[0190] Q = X1W Q K = YW K V = X1W V
[0191] Where Q is the query matrix, used to find relevant information; K is the key matrix, used to store information; and V is the value matrix, containing the information W to be searched.Q W K W V It is a learnable weight matrix used to map the input sequence to the Query, Key, and Value matrices;
[0192] Calculate attention score:
[0193]
[0194] Here, Attention(Q,K,V) is used to calculate the attention score, which represents the similarity between the Query and the Key; is the scaling factor used to prevent gradient explosion; softmax is the normalization function that converts the attention score into a probability distribution.
[0195] (2) Calculate multi-head attention:
[0196] MHA(Q,K,V)=Concat(head1,head2,...,head h W O
[0197] MHA(Q,K,V) is a multi-head attention mechanism that inputs the Query, Key, and Value into h independent attention heads and outputs the fused features; head1, head2,...,head h There are h independent attention heads, each responsible for searching for different information; W O It is a learnable weight matrix used to linearly combine the outputs of h attention heads;
[0198] (3) Generate the fused feature vector:
[0199] Z = f(MHA)
[0200] Where Z is the fused feature vector; f(·) is a nonlinear function;
[0201] The specific steps for classifying the fused features and identifying numbers in the image are as follows:
[0202] (1) A fully connected layer is used to map the fused features to the classification result:
[0203] Z' = AZ + b
[0204] Where Z' is the classification result vector, and each element represents the probability of belonging to a certain number category; A is the weight matrix, which is used to map the fused feature vector to the classification result vector; b is the bias vector.
[0205] (2) The output is converted into a probability distribution using the softmax function, thereby enabling the classification and recognition of numbers in the image:
[0206]
[0207] Where P(cow=k|Z') is the probability that sample i belongs to digit class k; k is the class index; C1 is the total number of classes; and e is the base of the natural logarithm.
[0208] Beneficial effects: Compared with the prior art, the significant progress of this invention is to improve inspection efficiency and identification accuracy, while enhancing the security of the system. Attached Figure Description
[0209] Figure 1 This is a flowchart of a method according to an embodiment of the present invention;
[0210] Figure 2 This is a flowchart of the improved DOA optimization algorithm according to an embodiment of the present invention;
[0211] Figure 3 Flowchart of local path optimization for the improved DDPG reinforcement learning algorithm;
[0212] Figure 4 This is a flowchart of the improved GOA optimization algorithm according to an embodiment of the present invention. Detailed Implementation
[0213] like Figure 1-4 As shown in the figure, this embodiment provides an automatic meter reading identification method for substation inspection vehicles. The method consists of two main parts: path planning of the inspection vehicle and automatic meter reading image recognition.
[0214] The path planning process includes: the inspection robot constructs a 3D grid map of the substation using LiDAR and vision sensors; a global path multi-objective function is established for the inspection robot, considering factors such as path length, obstacle avoidance, turning angle, and energy consumption, and an improved Dream Optimization (DOA) algorithm is used for global path planning to find the optimal path from the starting point to the destination; then, based on the global path and combined with real-time environmental information, the inspection robot uses an improved DDPG reinforcement learning algorithm for local path optimization; the DDPG algorithm introduces an improved Goat Optimization (GOA) algorithm into the reward and penalty function to optimize the safe time-distance model, ensuring the safety of the inspection robot's driving, and selecting the best action based on the current state to reduce energy consumption and time costs.
[0215] The specific process of automatic meter reading image recognition includes: the substation inspection robot reaches the destination by finding the optimal path through path planning, uses a camera to capture meter images and uses an improved NLM algorithm to remove image noise; then, the SegVG model is used to extract and fuse multi-scale features of the image to generate a target area segmentation mask, accurately locating the meter reading dial area; finally, the MHAFF model performs multi-level feature extraction and adaptive fusion on the located dial digits to achieve accurate recognition of the digits, thereby completing the automatic meter reading task.
[0216] The specific implementation process is as follows:
[0217] (1): Construct a three-dimensional raster map of the substation environment;
[0218] The inspection vehicle acquires real-time point cloud data of the substation environment using an onboard A1M8 lidar. Simultaneously, obstacle detection in the working environment is also performed in real-time by sensors built into the inspection vehicle. Specifically, by calculating the time difference between the emitted and received signals using the A1M8 lidar carried by the inspection vehicle, the distance between the laser beam and obstacles can be determined. Then, a 360-degree omnidirectional laser ranging scan is performed to acquire point cloud data of the substation's surrounding environment.
[0219] The inspection robot vehicle integrates LiDAR and visual sensor data to construct a 3D point cloud map, using visual information to correct inter-frame distortion from the LiDAR. The map is then optimized, and loop closure detection corrects accumulated errors to ensure accuracy. Figure 1 The system achieves consistency and divides the substation scene into local areas, constructing local maps for each area and then fusing them with high precision to obtain a complete map. During the inspection process, new data is continuously collected to update the map. Considering the semi-static environment of the substation, changing object information is detected and updated, thus providing accurate environmental information for the inspection robot's path planning and automatic meter reading.
[0220] When constructing a detailed 3D grid map of a substation, the area to be measured in the substation is divided into a×b×c l×l rectangular grids according to specific requirements. Each rectangular grid is marked in the sensor coordinate system using row and column numbers and corresponding angle information.
[0221] Set the positions of the Nr data points detected by the lidar as: p i =(x i ,y i ,z i ), i∈[1,Nr], are projected onto a×b×c rectangular grids to accurately reflect the substation environment; p i This represents the location information of the i-th data point; x i y i z iThe x-axis coordinate, y-axis coordinate, and z-axis coordinate of the i-th data point are represented sequentially.
[0222] Calculate the probability P that each small grid cell is occupied. i The formula is as follows:
[0223]
[0224] The formula for the distance Dr from the origin of the sensor's coordinate system to the center of each small grid is as follows:
[0225]
[0226] Where l represents the length of a grid cell; multiple small grid cell information layers are stacked to form a 3D grid map;
[0227] The criteria for determining the grid status are as follows:
[0228] ① when When this occurs, it is determined that the grid is in an occupied state, and p is set to... i =1;
[0229] ② when When this occurs, it is determined that the grid is in an unoccupied state, and p is set to... i =0.
[0230] By fusing the data from each grid cell of the substation, a complete three-dimensional grid map of the substation environment is obtained.
[0231] (2): The multi-objective function of global path planning for inspection robot vehicles;
[0232] The path planning problem for an inspection robot can be described as finding a path from a starting point to an end point in three-dimensional space. This path should satisfy the following conditions: shortest path length, obstacle avoidance, reduced steering angle changes, and lower energy consumption. A multi-objective function is established, considering factors such as path length, obstacle avoidance, steering angle, and energy consumption, to optimize the global path of the inspection robot. The multi-objective function F for the global path planning of the inspection robot is defined. total for:
[0233] F total =w1·F length +w2·F collision +w3·F smooth
[0234] Among them, F length F represents the total path length; collision F represents the minimum distance between the path and the obstacle. smooth This indicates the turning angle of adjacent path segments.
[0235] The total path length F length Defined as the sum of Euclidean distances between adjacent nodes, the shortest path should directly reduce travel time and energy consumption. The specific formula is as follows:
[0236]
[0237] Where, p i+1 p i Represents the three-dimensional coordinates of two different nodes; Nr represents the total number of nodes.
[0238] An exponential penalty function is introduced to strengthen the penalty for nearby obstacles, ensuring a safe distance between the inspection robot and the obstacle. The minimum distance between the path and the obstacle is calculated using the following formula:
[0239]
[0240] Where, d obs,i k represents the distance from the path to the obstacle. collision This represents the attenuation coefficient.
[0241] By calculating the steering angles (including horizontal turning angles and vertical climb angles) of adjacent path segments, reducing the number of steering maneuvers and angle changes of the inspection robot can reduce mechanical wear and energy consumption. The smoothness cost is defined by the following formula:
[0242]
[0243] Where, Δθ i Indicates the horizontal steering angle; Δφ i Indicates the vertical ascent angle.
[0244] (3): Improved Dream Optimization (DOA) algorithm to find the global optimal path;
[0245] In this invention, an improved Dream Optimization (DOA) algorithm is used to optimize the multi-objective function F of global path planning. total The optimal global path for the inspection robot is found by solving the problem. The population size is set to ND, and the maximum number of iterations is determined. Maximum number of iterations in the exploration phase And set the number of forgetting dimensions k. p (Exploration Phase) and k r (Development phase)
[0246] (301) Initialization phase
[0247] During the initialization phase, ND individuals are randomly generated in the search space, and each individual represents a feasible path candidate solution.
[0248] X i =Xl +rand×(X u -X l ), i = 1, 2, ..., ND
[0249] Among them, X i Let represent the i-th feasible path candidate solution in the population; ND represents the population size, i.e., the number of feasible path candidate solutions; rand represents a random number between [0,1]; X u X l These represent the upper and lower bounds of the search space, respectively, which represent the feasible range of candidate solutions.
[0250] In this invention, the Tent chaotic mapping is introduced to generate a uniform initial population to improve the DOA algorithm, thereby better assisting the algorithm in subsequent optimization and improving its optimization accuracy. The specific formula is as follows:
[0251]
[0252] Where, α DOA Represents a random number between [0, 1].
[0253] The initial population matrix is represented by X as follows:
[0254]
[0255] Where, x i,j This represents the i-th feasible path candidate solution in the j-th dimension; Dim represents the dimension of the problem, i.e., the number of decision variables in the optimization problem.
[0256] (302) Exploration Phase
[0257] The DOA optimization algorithm enters the exploration phase, using a global search to find potential optimal feasible path solutions. To ensure the scope of the global search, a maximum number of iterations is set for the exploration phase. The current iteration number t is less than At this stage, the algorithm focuses on the global search exploration phase. Each inspection vehicle has varying abilities to retain and forget path information during the global feasible path exploration process. Based on these differences in memory capacity, the population is divided into 5 groups, each with a different number of forgetting dimensions, denoted as k. q Let q = 1, 2, 3, 4, 5, where q represents the ordinal number of the group. Each iteration is considered as a continuous exploration and optimization of feasible candidate paths. By adjusting the memory capacity of the inspection robot, a balance is struck between exploring new paths and utilizing existing information.
[0258] (1) Memory strategies
[0259] At the start of each iteration, each inspection robot remembers the best path found in its group during previous iterations and resets its position information to the position information of the best path in that group at the start of each iteration. This avoids the inspection robot repeatedly exploring the same area and helps it find a feasible path more quickly. The specific formula is as follows:
[0260]
[0261] in, This represents a feasible path candidate solution at the (t+1)th iteration; This represents the current best path solution for group q in the t-th iteration.
[0262] (2) Forgetting and Replenishment Strategies
[0263] In each iteration, each inspection robot forgets some of the previously explored path information and reorganizes a new path based on the best path information in the current iteration. The specific formula is as follows:
[0264]
[0265] in, This represents the i-th feasible path candidate solution in the j-th dimension during the (t+1)-th iteration; x represents the best feasible path solution in the j-th dimension of the q-th group at the t-th iteration; l,j x u,j Let these represent the upper and lower bounds of the search space in the j-th dimension, respectively; Indicates the maximum number of iterations; This indicates the maximum number of iterations during the exploration phase. This indicates an exploration of the dimension of forgetting.
[0266]
[0267] Where randi(a,b) represents an integer randomly selected from the range; k q This indicates the number of forgotten dimensions in the q-th group during the exploration phase; Dim represents the question dimension.
[0268] (3) Dream sharing strategy
[0269] In each iteration, each inspection robot randomly acquires a portion of its positional information along the forgotten dimension from other inspection robots. This helps the inspection robots explore new areas and find potentially overlooked feasible paths. The specific formula is as follows:
[0270]
[0271] in, represents the m-th feasible path candidate solution in the j-th dimension in the (t+1)-th and t-th iterations, respectively; m represents the randomly selected individual number, m∈[1,N].
[0272] (303) Development Phase
[0273] (1) Memory strategies
[0274] During the development phase, the current iteration count range is: Next, before each iteration, the best candidate path from the previous iteration of the entire population is updated to the latest feasible candidate path solution.
[0275]
[0276] in, This represents the i-th feasible path candidate solution in the (t+1)-th iteration; This represents the candidate solution for the best feasible path for the entire population at the t-th iteration.
[0277] (2) Forgetting and Replenishment Strategies
[0278] Continue updating each feasible path candidate solution on the forgetting dimension.
[0279]
[0280] in, This represents the i-th feasible path candidate solution in the j-th dimension during the (t+1)-th iteration; x represents the best feasible path solution in the j-th dimension at the t-th iteration; l,j x u,j Let these represent the upper and lower bounds of the search space in the j-th dimension, respectively; Indicates the maximum number of iterations; This indicates the dimension forgotten during the development phase.
[0281]
[0282] Where, k r This indicates the number of forgotten dimensions during the development phase.
[0283] (304) Evaluation and Output
[0284] In this invention, a forward greedy selection mechanism is introduced to improve the algorithm. The optimal individual position, i.e., the best feasible path for the inspection robot, is selected based on the fitness value of candidate solutions. This forward greedy selection mechanism is used to update feasible path solutions, improving the efficiency of the global search. The specific formula is as follows:
[0285]
[0286] Wherein, F(X) i ) represents the fitness value of the i-th feasible path solution in the population; This represents the fitness value of the feasible path solution in the j-th dimension at iteration t. Specifically, based on the fitness value, if the fitness of the i-th feasible path solution selected in the population is smaller than the fitness value of the feasible path solution in the j-th dimension at iteration t, then the feasible path solution in the j-th dimension is replaced as the current better path solution.
[0287]
[0288] Wherein, F(X) best ) represents the fitness value of the optimal path solution for the inspection robot vehicle; This represents the fitness value of the optimal path solution for the inspection robot in the t-th iteration.
[0289] A forward greedy selection mechanism is used to determine the optimal solution, selecting the feasible path with the minimum objective function value as the global optimal solution for the inspection robot. Simultaneously, it is checked whether the iterative optimization satisfies the maximum iteration condition. If the condition is met, the iteration stops; otherwise, the loop continues until the optimal solution, i.e., the optimal path solution for the inspection robot, is obtained.
[0290] (4): Local path optimization in the improved DDPG reinforcement learning algorithm
[0291] In this invention, an improved DDPG reinforcement learning algorithm is employed to further optimize the local path of the global path. Based on real-time local environmental information, local path optimization is performed to further optimize the path of the inspection robot, enabling it to avoid obstacles more efficiently during meter reading tasks, reducing energy consumption and time costs.
[0292] (401) Initialization
[0293] Randomly initialize the policy network (Actor network) and value network (Critic network), along with their corresponding target networks. The policy Actor network is determined based on the input state S. t (e.g., the current position of the inspection robot, the target point position, and information about surrounding obstacles), outputting the speed and turning angle of the inspection robot within a local area. t The value Critic network is used to evaluate the value of the current state-action pair.
[0294] Initialize the experience replay buffer: Set a fixed-size experience replay buffer R to store the experience generated by the inspection robot's interaction with the environment, including the current state S. t Action a t Reward r, Next state S t+1And information such as whether it is in a terminated state.
[0295] (402) Interacting with the environment
[0296] 1) State-space design:
[0297] The inspection vehicle travels in the substation environment according to the general direction determined by global path planning. When local path optimization is required, the current local environment state is obtained. The state in the state space of this invention represents the relationship between the inspection vehicle and obstacles in the current environment, the linear velocity of the inspection vehicle, and the energy consumption of the inspection vehicle's current action. The specific formulas are as follows:
[0298]
[0299] in, This indicates the coordinate difference between the current position of the inspection robot and the obstacle; This indicates the coordinate difference between the current position of the inspection vehicle and the target point; v current This indicates the linear velocity of the inspection vehicle. This indicates the energy consumption of the inspection vehicle during its current operation.
[0300]
[0301] Among them, C obs_i (x obs_i ,y obs_i ) represents the current position of the i-th obstacle; C goal (x goal ,y goal ) represents the coordinates of the target point; C agent (x agent ,y agent () indicates the current coordinates of the inspection vehicle.
[0302] 2) Motion space design
[0303] The action space in deep reinforcement learning is determined by selecting the next action to be performed based on the current state of the inspection robot. The specific formula for setting the action space is as follows:
[0304]
[0305] in, This represents the output of the Actor network, which is the distance the inspection robot moves in the x and y directions.
[0306] Inspection robot performs action a t Move to a new location in the environment and observe the reward r and the next state S. t+1 And whether it is in a terminated state. Also, the experience (S) generated from this interaction will be recorded.t ,a t ,r,S t+1 Store it in the experience playback buffer R.
[0307] (403) Further, the specific components of the reward function design for the improved DDPG optimization algorithm are as follows:
[0308] In complex scenarios, planned paths may still suffer from problems such as redundant points, low pathfinding efficiency, numerous turns, and excessive pathfinding nodes. In this invention patent, the reward and penalty function considers the following types of incentives: safe distance reward (turning and braking), speed reward, target gravity reward, destination reward, collision penalty, and energy consumption penalty.
[0309] Assume the reward / penalty function is composed of the collision penalty factor r collision Target attraction reward / punishment factor, destination reward factor r destination Energy consumption penalty r energy Speed reward factor r velocity The reward consists of the safe time-distance model, and the specific formula is as follows:
[0310] r(S,a)=∑γ·r
[0311] Where γ represents the weight, i.e., the weight of the reward factor in each part of the reward function; r represents the reward function for each type. The specific reward and penalty factors are as follows:
[0312] (1) Considering the collision penalty factor r of the inspection vehicle collision When the inspection robot collides with an obstacle, a penalty will be imposed, and the specific formula is as follows:
[0313]
[0314] Where, d obs Indicates the distance from the inspection vehicle to the nearest obstacle; τ represents the attenuation coefficient; Π collision This represents the collision indicator function (1 when a collision occurs); κ c η c κ represents the weighting coefficient, and c Much greater than η c .
[0315] (2) Considering the target gravity reward / penalty factor r of the inspection robot vehicle gravitation The system sets rewards and penalties for the gravitational potential field of the inspection vehicle based on the target point. This is related to the distance between the inspection vehicle and the target point. A positive reward is given whenever the distance between the inspection vehicle and the target point decreases, and a penalty is given otherwise.
[0316]
[0317] Among them, D i D represents the Euclidean distance between the inspection robot and the target point at time i; i-1 K represents the Euclidean distance between the inspection robot and the target point at time i-1; alt Represents the weighting coefficient; r alt This represents the gravitational coefficient.
[0318] (3) Consider the reward factor r for the inspection robot reaching the destination. destination The inspection robot will be rewarded when it reaches the target point, according to the following formula:
[0319]
[0320] Where, d prev d represents the distance from the target point at the previous moment; current Indicates the current distance; d init Indicates the initial distance; ∏ reached Target arrival indicator; η d , This represents the weighting coefficient.
[0321] (4) Considering the energy consumption penalty r of the inspection vehicle energy The specific formula is as follows:
[0322]
[0323] in, t represents the energy consumption of the current action; enery Indicates the time already elapsed; T enery max λ1 and λ2 represent the maximum allowed time; λ1 and λ2 represent the weighting coefficients.
[0324] (5) Consider the speed reward factor r of the inspection robot. velocity Within a unit sampling period, the value of the reward factor is positively correlated with the speed, as shown in the following formula:
[0325]
[0326] Among them, v current This indicates the linear velocity of the inspection vehicle; v max Maximum permissible speed; v target This indicates the recommended speed for the current state, which can be dynamically adjusted; a v ,b v This represents the weighting coefficient.
[0327] (6) In this invention, an improved reward and penalty function is introduced, considering a safe time interval model. Simultaneously, an improved Goat Algorithm (GOA) is used to solve for the optimal solution under the safe time interval condition. The specific implementation process is as follows:
[0328] The specific formula for the traditional collision time TTC is expressed as follows:
[0329]
[0330] Among them, D rel Indicates the relative longitudinal distance between the inspection vehicle and the obstacle; v rel This indicates the relative longitudinal speed between the inspection vehicle and the obstacle.
[0331] 1) Emergency braking safe distance:
[0332]
[0333] Where d1 represents the braking distance of the inspection robot; v ego Indicates the speed of the inspection vehicle; v f t represents the velocity of the obstacle. r Indicates the delay time of the emergency obstacle avoidance system; a ego d0 represents the absolute value of the braking deceleration of the inspection vehicle; d0 represents the distance between the inspection vehicle and the obstacle in front after the vehicle stops through the braking obstacle avoidance operation, d0 = 0.1m.
[0334]
[0335] Where T1 represents the braking critical TTC value.
[0336] The time-distance condition that must be met for emergency braking to avoid obstacles is:
[0337]
[0338] 2) Safe distance for emergency turning:
[0339]
[0340] Where d2 represents the emergency turning distance of the inspection robot; t c This indicates the delay time for an emergency turn.
[0341]
[0342] Where T2 represents the turning critical TTC value.
[0343] The time-distance condition that must be met for emergency braking and steering is:
[0344]
[0345] (404) In the application, the safe distance model is used to evaluate the safe distance between the inspection robot and obstacles to ensure the safe operation of the inspection robot. An improved Goat Optimization (GOA) algorithm is used to optimize the safe distance model, simulating the exploration, development, and jumping behaviors of goats. This effectively searches the solution space and finds the optimal solution that satisfies the safe distance condition. The specific process is as follows:
[0346] Considering the safety distance model, which simultaneously takes into account emergency braking, emergency steering, and the corresponding delay time factors, the objective function is designed as min mize f(x). TTC The specific formula is as follows:
[0347]
[0348] Where, f(x) TTC () represents the objective function value; x TTC This represents a vector of decision variables, including the speed of the inspection robot vehicle, braking deceleration, etc. This represents the weighting coefficient, used to balance the influence of different factors on the objective function.
[0349] The constructed objective function is min mize f(x) TTC ) and decision variable x TTC The improved GOA optimization algorithm is input, and the decision variable x is continuously adjusted by simulating the exploration, development, and jumping behaviors of goats. TTC So that the objective function value f(x) TTC The GOA algorithm can effectively search the solution space and find the optimal solution that satisfies the safe time interval condition, thereby ensuring the safety of the inspection robot vehicle.
[0350] (1) Population initialization
[0351] An initial goat population is randomly generated, with each goat represented as a d-dimensional vector in the search space, which is a combination of decision variables for a safe time-distance model. Its position is randomly generated within a given upper and lower bound.
[0352]
[0353] in, Let represent the position vector of the i-th candidate solution individual, which is a d-dimensional vector in the search space; d represents the dimension, i.e. the number of decision variables; i represents the number of candidate solution individuals, i = 1, 2, ..., NR.
[0354] The formula for generating the initial population is as follows:
[0355]
[0356] Where UB and LB represent the upper and lower bounds of the search space, respectively; rand(d) represents a d-dimensional random vector with values ranging from [0,1]. The fitness value for each goat's position is also calculated, which represents the objective function value.
[0357] (2) Exploration Phase
[0358] Simulating goat foraging behavior, the goat explores the search space by making random moves to find potential optimization areas. Each goat explores the search space by making random moves, and the update formula for its new position is:
[0359]
[0360] in, This indicates the position of the i-th candidate solution in the (t+1)-th iteration; α represents the position of the i-th candidate solution in iteration t; GOA R represents the exploration coefficient, which controls the intensity of random motion; Guass Let N(0,1) represent a random variable drawn from a Gaussian distribution N(0,1).
[0361] Exploration coefficient α GOA To control the intensity of random motion and to perform a more detailed search within the global region, this invention introduces adaptive inertia weights to optimize the exploration coefficients of the GOA optimization algorithm. The specific formula is as follows:
[0362]
[0363] Where, k GOA μ represents a parameter that controls the upper and lower limits of the weights. GOA This indicates the parameter controlling the smoothness of the search; T represents the maximum number of iterations. GOA This indicates the current iteration number.
[0364] (3) Development stage
[0365] The behavior of a goat moving towards an optimal position is simulated, and the solution is improved by moving closer to the current optimal position. The goat gradually moves towards the current optimal solution to refine the solution's quality, and its position update formula is:
[0366]
[0367] in, β represents the current optimal solution. GOA This represents the development coefficient.
[0368] Development coefficient β GOATo control the step size used to approach the current optimal position during the development phase, this invention introduces a Cauchy-Gaussian mutation strategy for improvement, as shown in the following formula:
[0369] β GOA =βC GOA [1+η GOA 1·cauchy(0,δ GOA 2 )+η GOA 2·Gauss(0,δ GOA 2 )]
[0370]
[0371] Among them, βC GOA This represents the original development coefficient value within the range [0,1]; δ GOA Indicates standard deviation; cauchy(0,δ) GOA ) and Gauss(0,δ GOA () represents a random variable based on the Cauchy and Gaussian distributions; and This represents an adaptive adjustment variable that is dynamically adjusted based on the population's evolutionary state during the iteration process.
[0372] (4) Jump Strategy
[0373] Update the goat's position to simulate its behavior of jumping to a new location to escape a local optimum. The position update formula, which helps the goat escape local optima through a jumping mechanism, is as follows:
[0374]
[0375] Among them, J GOA Indicates the jump coefficient; This represents a candidate solution individual randomly selected from the population.
[0376] (5) Parasite avoidance and reconciliation screening
[0377] Reset the locations of low-quality solutions to simulate areas where goats avoid parasite infection. For goats with fitness values in the bottom 20% of the population, reset their locations to randomly generated new locations to maintain population diversity and robustness. The reset formula is:
[0378]
[0379] (6) Stopping Criteria
[0380] 1)
[0381] in, This represents the fitness of the optimal solution in the (t+1)th iteration; Let represent the fitness of the optimal solution in the t-th iteration.
[0382] If the difference is less than the preset threshold ε' GOA If the algorithm has converged to a sufficiently good solution, then the iteration can be stopped.
[0383] 2)
[0384] This involves calculating the average of the squared differences between the fitness values of all candidate solutions in the population and the fitness value of the current best solution.
[0385] If the average value is less than the preset threshold δ' GOA If the fitness values of all candidate solutions in the population are close enough to the current best solution, then the iteration can be stopped.
[0386] By using the improved GOA optimization algorithm to optimize the decision variables, the optimal path that meets the safe time-distance condition can be calculated and applied to the path planning of the inspection robot to ensure the safety of the inspection robot during operation.
[0387] (405) Network Update
[0388] In this invention, the optimal global path solution obtained from the above steps is placed into the experience replay buffer R, and network updates begin. First, a batch of experiences, i.e., one global path solution, is randomly sampled from the experience replay buffer.
[0389] The DDPG algorithm employs the Actor-Critic framework and improves upon it by combining deep networks and deterministic policy gradients. Within its architecture, DDPG utilizes a dual neural network structure consisting of an Online network and a Target network.
[0390] Using the experience gained from sampling, the value network parameters are updated by minimizing the mean square error between the Q-value output of the value network and the target Q-value. The Critic network is then updated, and the target network is used to estimate the Q-value function of the inspection robot's state-action at the next time step. The Q-value function is: Q w' (S i+1 ,π θ' (S i+1 The next action value π is approximated using an Actor target network. θ' (S t+1 Thus, the target value of the Q-value function in the current state is obtained, and the specific formula is as follows:
[0391] y i =r i +γQw' (S i+1 ,π θ' (S i+1 ))
[0392] Where, r i γ represents the reward / penalty factor obtained by the inspection robot at time i; γ represents the discount factor used to measure the importance of future rewards; Q w' S represents the evaluation function of the current policy, w' represents the parameter vector of the Q function; i+1 Represents the state at time i+1; π θ' (S i+1 ) indicates that in state S i+1 The probability distribution of action selection based on strategy π with parameter θ' is given below.
[0393] The network is trained using Critic to output the Q-value function Q of the current state-action sequence. w (S i ,a i ), a i This represents the action taken at time i. The objective of the Critic network is defined as y. i -Q w (S i ,a i The parameters of the Critic network are updated by minimizing the loss value. The loss function for updating the Critic network is expressed as:
[0394]
[0395] Among them, a i =π θ (S i )+ε, where ε represents the exploratory noise in the behavioral strategy.
[0396] The Actor's target network and training network provide the policy for the next state and the policy for the current state, respectively. By combining the Q-value function of the Critic training network, the policy gradient of the Actor during parameter updates can be obtained, as shown in the following formula:
[0397]
[0398] For updates to the target network parameters w' and θ', the DDPG soft update mechanism slowly updates the target network weights:
[0399] w'←ξw+(1-ξ)w'
[0400] θ'←ξθ+(1-ξ)θ'
[0401] Where ξ represents the update coefficient; w,θ represents the weights of the current Actor network and Critic network; and w',θ' represents the target network weights of the current Actor network and Critic network.
[0402] (406) Iterative optimization
[0403] The process of interacting with the environment and updating the network is repeated, continuously adjusting the trajectory of the inspection robot within the local area until the maximum number of iterations is reached. The inspection robot stably finds a locally optimal path within a certain timeframe. Once the training termination condition is met, the algorithm terminates, resulting in a trained policy network and value network. These guide the inspection robot in finding local paths in the real-world environment, ultimately yielding the optimal path optimized from global path planning.
[0404] (5) In this invention, the inspection robot vehicle combines global path planning obtained by the improved DOA optimization algorithm and local path optimization obtained by the improved DDPG optimization algorithm. As a result, the inspection robot vehicle can perform automatic meter reading tasks efficiently and safely in the substation environment and successfully reach the destination where the meter is located.
[0405] Furthermore, by acquiring instrument images through a substation inspection vehicle, an improved NLM model with a dynamic parameter mapping adjustment strategy is used to denoise the acquired substation instrument images, removing noise from the original images. The specific process is as follows:
[0406] Due to the complex environment of substations, images are easily affected by various factors, resulting in noise that reduces image clarity and affects subsequent instrument identification and data reading. Therefore, this invention employs an improved nonlocal mean (NLM) filtering algorithm to denoise the instrument images captured by the inspection robot via camera.
[0407] The NLM filtering algorithm utilizes the numerous repetitive structures contained in an image for noise reduction. It determines weights by calculating the similarity between non-local pixels, and then reconstructs the image by applying a weighted average. The specific steps are as follows:
[0408] (501) Determine the generation window
[0409] Substation instrument images u NLM pixel i in NLM Generate a pixel block the size of a reference window centered on the search window, and generate candidate pixel blocks within the search window in a sliding window manner;
[0410] (502) Calculate the weights
[0411] The steps for determining weights based on the similarity between non-local pixels in substation instrument images are as follows:
[0412] Calculate pixel iNLM and j NLM The Euclidean distance is given by the formula:
[0413]
[0414] Among them, a NLM d represents the standard deviation of the Gaussian kernel. NLM (i NLM ,j NLM ) represents a function of Euclidean distance, and represents the decay of weights; and Representing pixels i NLM The size of the center is N NLM *N NLM The square neighborhood and pixels j NLM The size of the center is N NLM *N NLM The square neighborhood of u(N); iNLM ) represents N iNLM grayscale value; express grayscale value; u NLM This refers to the instrument images captured by the inspection robot, i.e., images containing noise.
[0415] Therefore, the formula for the weighting coefficient is:
[0416]
[0417] And meet the conditions
[0418]
[0419] Where, w(i NLM ,j NLM () is the weight, used to evaluate pixel j. NLM The degree of influence on pixel i; C(i) NLM ) is a standardized constant, i.e., a normalization constant; i NLM ,j NLM ∈X NLM X NLM It is a pixel field; h NLM This represents the filtering parameter, which controls the degree of decay of the exponential function;
[0420] Furthermore, considering the Gaussian kernel standard deviation a NLM and filter parameter h NLM Fixed settings may not be sufficient to meet the robustness requirements of various noise types. This invention introduces a dynamic parameter mapping adjustment strategy, which automatically adjusts α based on the noise level of local image patches. NLM and h NLMThe value of is determined to suppress noise more effectively while preserving image details. The formula is as follows:
[0421] First, local noise is estimated, and the variance of the grayscale values of each reference window is calculated using the following formula:
[0422]
[0423] Where, σ NLM 2 It is the variance of grayscale values; n NLM 2 N is the total number of pixels within the neighborhood window; NLM It is a reference window; μ NLM It is the average grayscale value of the window;
[0424] Then, the dynamic parameters are mapped based on the variance of the gray values, and the formula is as follows:
[0425]
[0426] Among them, h NLM ' represents the filter parameters after dynamic mapping; a NLM ' represents the standard deviation of the Gaussian kernel after dynamic mapping; α NLM β NLM Indicates the adjustment coefficient; This represents the maximum noise variance across the entire image;
[0427] Therefore, the formula for the weighting coefficient is updated as follows:
[0428]
[0429] (503) Weighted average
[0430] Use weights to process pixel i NLM The denoised image U(i) is obtained by weighting the values of the surrounding pixels. NLM The formula is:
[0431]
[0432] Among them, U(i NLM ) represents the denoised image; u(j) NLM ) is pixel j NLM The original pixel values;
[0433] (6) The SegVG model is used to extract multi-scale features from the denoised image and fuse them to generate the final target region segmentation mask, thereby achieving accurate positioning of the instrument reading dial.
[0434] In substation inspection, accurate positioning of instrument reading panels is one of the key steps in achieving automatic meter reading. Only by accurately locating the panel area can effective area information be provided for subsequent digital identification, avoiding interference from invalid areas and improving the efficiency and accuracy of the entire system.
[0435] Therefore, this invention employs an improved SegVG model to process the denoised image, achieving precise localization of the instrument reading dial. This model extracts and fuses multi-scale features to generate a final target region segmentation mask, thereby achieving precise localization of the instrument reading dial. The specific steps are as follows:
[0436] (601) Feature extraction stage
[0437] For the denoised image U, DETR and BERT are used as visual and text backbone networks, respectively, to extract image and text features. Visual feature extraction can capture rich information from the image, helping the system identify the location of the instrument panel; text features can utilize labels, markings, or descriptive text on the instrument to more accurately identify and distinguish different types of instruments, thereby improving the accuracy of instrument panel image localization. The specific steps are as follows:
[0438] 1) Visual feature extraction
[0439] The denoised instrument image is input into a pre-trained DETR model, which uses its ResNet and Transformer encoders to extract the visual features of the image. The specific steps are as follows:
[0440] The input denoised image U is resized to 640×640 while maintaining the original aspect ratio. Shorter sides are zero-padded to make them the same length as the longer sides, ensuring that the image does not lose important information or become distorted due to size issues during subsequent processing.
[0441] A pre-trained ResNet model is used to extract 2D feature maps from the image, and a 1×1 convolutional layer is used to reduce the number of channels in the feature maps, resulting in feature map I'. Feature map I' is then flattened into a one-dimensional vector Z. v ;
[0442] Vector Z v Positional encoding is added and sequentially fed into the encoder layer of the DETR model for feature extraction, resulting in the final visual feature vector. The formula is:
[0443]
[0444] in, These are the original visual features of the i1+1th layer; These are the original visual features of the i1th layer; This is the i1th layer in the DETR backbone network; i1 is the total number of layers; v1 represents vision.
[0445] 2) Text Feature Extraction
[0446] The text is processed using a pre-trained BERT model to obtain the text feature vector Z. t The specific steps are as follows:
[0447] The input text is segmented and special markers [CLS] and [SEP] are added, placed at the beginning and end of the text respectively.
[0448] The text is converted into a language feature vector Z using the embedding layer of a pre-trained BERT model. t ;
[0449] The language feature vector Z t The features are sequentially input into the encoder layer of the BERT model for feature extraction, resulting in the final text feature vector Z. t Its formula is:
[0450]
[0451] in, These are the original text features of the i1+1th layer; It represents the original text features of the i1th layer; t represents the text. It is the 2i1+1 layer in the DETR backbone network; It is the 2i1st layer in the DETR backbone network;
[0452] (602) Feature Alignment Stage
[0453] The Triple Alignment module is introduced to iteratively update query, text, and visual features through a three-way attention mechanism, eliminating domain differences between them. The specific steps are as follows:
[0454] Z o It is initialized with learnable embeddings, including a regression query and multiple split queries;
[0455] A triple multi-head attention mechanism (Tri-MHA) is employed to perform triangular updates on query, text, and visual features, enabling them to share the same feature space and mitigating domain differences. The formula is as follows:
[0456]
[0457] Among them, Tri-MHA is the triangular attention mechanism; Z o It is the original query feature; Z' o This is the updated query feature; Z t' is the updated text feature; It refers to the updated visual features; 'o' represents the query.
[0458] Finally, the updated features are merged back into the original features, using the following formula:
[0459]
[0460] (603) Feature fusion
[0461] The aligned text feature vector Z t and visual feature vectors The features are connected to form a multimodal feature vector, which is then input into the Transformer encoder layer for feature fusion to obtain the encoder output containing textual and visual information.
[0462] (604) Target positioning
[0463] The encoder's output is input into the decoder, which uses the bbox2seg scheme to convert the bounding box annotations into a segmentation mask. The specific steps are as follows:
[0464] 1) Regression query
[0465] The multimodal features output by the encoder are used to regress a bounding box using a regression query vector. This regression query vector is then fed into a Transformer decoder layer and interacts with the encoder output. An MLP network is then used to decode the regression query vector into a bounding box, determining the location of the dial within the image.
[0466] 2) Partitioned query
[0467] The target region is segmented using segmentation query vectors with different learnable positional codes. The segmentation query vectors are input into the Transformer decoder layer and interact with the encoder output. Then, the segmentation query vectors are repeated N times. v This is then combined with the visual feature vector and input into an MLP network for decoding to obtain a segmentation mask for the target region. By marking pixels within the dial area as foreground (value 1) and pixels outside the dial area as background (value 0), the dial area can be accurately distinguished from the background and other irrelevant areas, thereby achieving pixel-level localization of the dial area.
[0468] 3) The final output is the located dial image U1;
[0469] (7) The MHAFF model is adopted to achieve accurate recognition of dial numbers based on multi-head attention feature fusion;
[0470] Due to the complex environment of substations, the located instrument images often suffer from uneven lighting, partial occlusion, and background interference. Therefore, this invention employs an improved Multi-Head Attention Feature Fusion (MHAFF) model to perform multi-level feature extraction and adaptive fusion on the denoised instrument images, thereby improving the recognition accuracy in complex scenes. The specific steps are as follows:
[0471] (701) Data Preprocessing
[0472] The digital region image block U1 output by SegVG is cropped and input into the MHAFF module to meet the input requirements of CNN and Transformer.
[0473] (702) Dual-branch feature extraction:
[0474] Using CNN to extract local features of images Capture local information such as edges and textures of numbers; use Transformer to extract global features of images. Capture the positional relationships and overall layout of numbers throughout the image.
[0475] Where X1 is the feature matrix extracted by the Transformer branch; Y is the feature matrix extracted by the CNN branch;
[0476] (703) Feature Fusion
[0477] A multi-head attention mechanism is used to fuse the features extracted by CNN and Transformer to obtain a more comprehensive feature representation. The specific steps are as follows:
[0478] (1) Generate the Q, K, V matrices using the following formula:
[0479] Q = X1W Q K = YW K V = X1W V
[0480] Where Q is the query matrix, used to find relevant information; K is the key matrix, used to store information; and V is the value matrix, containing the information W to be searched. Q W K W V It is a learnable weight matrix used to map the input sequence to the Query, Key, and Value matrices;
[0481] The formula for calculating attention score is as follows:
[0482]
[0483] Here, Attention(Q,K,V) is used to calculate the attention score, which represents the similarity between the Query and the Key; is the scaling factor used to prevent gradient explosion; softmax is the normalization function that converts the attention score into a probability distribution.
[0484] (2) Calculate multi-head attention using the following formula:
[0485] MHA(Q,K,V)=Concat(head1,head2,...,head h W O
[0486] MHA(Q,K,V) is a multi-head attention mechanism that inputs the Query, Key, and Value into h independent attention heads and outputs the fused features; head1, head2,...,head h There are h independent attention heads, each responsible for searching for different information; W O It is a learnable weight matrix used to linearly combine the outputs of h attention heads;
[0487] (3) Generate the fused feature vector, the formula of which is:
[0488] Z = f(MHA)
[0489] Where Z is the fused feature vector; f(·) is a nonlinear function;
[0490] (704) Output Classification
[0491] The specific steps for classifying the fused features and identifying numbers in the image are as follows:
[0492] (1) A fully connected layer is used to map the fused features to the classification result. The formula is as follows:
[0493] Z' = AZ + b
[0494] Where Z' is the classification result vector, and each element represents the probability of belonging to a certain number category; A is the weight matrix, which is used to map the fused feature vector to the classification result vector; b is the bias vector.
[0495] (2) The output is converted into a probability distribution using the softmax function, thereby achieving the classification and recognition of numbers in the image. The formula is as follows:
[0496]
[0497] Where P(cow=k|Z') is the probability that sample i belongs to digit class k; k is the class index; C1 is the total number of classes; and e is the base of the natural logarithm.
Claims
1. A method for automatic meter reading and identification using a substation inspection robot, characterized in that, Includes the following steps: S1. Construct a 3D raster map of the substation environment; S2. Establish a multi-objective function for the global path planning of the inspection robot vehicle; S3. Use the improved DOA optimization algorithm and the improved DDPG reinforcement learning algorithm to perform global and local path planning and find the optimal path for the inspection robot. The S4 and DDPG algorithms introduce an improved GOA algorithm into the reward and penalty function to optimize the path of the safe time-distance model. S5. Combining visual and textual features, the NLM model is used for image denoising, and the SegVG model is used for image feature extraction. S6. An improved MHAFF model is used to perform multi-level feature extraction and adaptive fusion on the located dial digits to achieve accurate recognition of the digits. In S2, a multi-objective function F is established for the global path planning of the inspection robot. total for: F total =w1·F length +w2·F collision +w3·F smooth ; Among them, F length F represents the total path length. collision F represents the minimum distance between the path and the obstacle. smooth Indicates the turning angle of adjacent path segments; Where, p i+1 p i Represents the three-dimensional coordinates of two different nodes; Nr represents the total number of nodes; Where, d obs,i k represents the distance from the path to the obstacle. collision Indicates the attenuation coefficient; Where, Δθ i Indicates the horizontal steering angle; Δφ i Indicates the vertical climb angle; S3 employs an improved DOA algorithm to find the globally optimal path for multi-objective functions, specifically including: Randomly generated within the search space Each individual represents a candidate solution for a feasible path. X i =X l +rand×(X u -X l ),i=1,2,…,ND; in, Indicates the first in the population One feasible path candidate solution; This represents the population size, which is the number of candidate solutions for feasible paths. Indicates in A random number between X and X; u X l These represent the upper and lower bounds of the search space, respectively, which represent the feasible range of candidate solutions; An improvement to the DOA algorithm is achieved by introducing the Tent chaotic map to generate a uniform initial population. Where, α DOA Represents a random number between [0, 1]; The initial population matrix is represented by X as follows: Where, x i,j This represents the i-th feasible path candidate solution in the j-th dimension; Dim represents the dimension of the problem, i.e., the number of decision variables in the optimization problem; The DOA optimization algorithm has entered the exploration phase, using a global search to find potential optimal feasible path solutions; Set the maximum number of iterations during the exploration phase. At the current iteration number Less than At that time, the algorithm focuses on the exploration phase of the global search; At the start of each iteration, each inspection robot remembers the best path found in the previous iteration within its group, and resets its position information to the position information of the best path in that group at the start of each iteration, as shown in the following formula: in, This represents a feasible path candidate solution at the (t+1)th iteration; This represents the current best path solution for group q in the t-th iteration; In each iteration, each inspection robot forgets some of the previously explored path information and reorganizes a new path based on the best path information in the current iteration, as shown in the following formula: in, This represents the i-th feasible path candidate solution in the j-th dimension during the (t+1)-th iteration; x represents the best feasible path solution in the j-th dimension of the q-th group at the t-th iteration; l,j x u,j Let these represent the upper and lower bounds of the search space in the j-th dimension, respectively; Indicates the maximum number of iterations; This indicates the maximum number of iterations during the exploration phase; This indicates an exploration of the dimension of forgetting; In each iteration, each inspection robot randomly obtains a portion of the forgotten dimension's location information from other inspection robots to help it explore new areas and find potentially overlooked feasible paths. The specific formula is as follows: in, Let represent the m-th feasible path candidate solution in the j-th dimension in the (t+1)-th and t-th iterations, respectively; m represents the randomly selected individual number, m∈[1,N]; During the development phase, the current iteration count range is: Next, before each iteration, the best candidate path in the previous iteration of the entire population is updated to the latest feasible path candidate solution; in, This represents the i-th feasible path candidate solution in the (t+1)-th iteration; This represents the candidate solution for the best feasible path for the entire population at the t-th iteration. Continue updating each feasible path candidate solution on the forgetting dimension. in, This represents the i-th feasible path candidate solution in the j-th dimension during the (t+1)-th iteration; x represents the best feasible path solution in the j-th dimension at the t-th iteration; l,j x u,j Let these represent the upper and lower bounds of the search space in the j-th dimension, respectively; Indicates the maximum number of iterations; This indicates the dimension forgotten during the development phase; An improved algorithm is introduced by a positive greedy selection mechanism. The optimal individual position, i.e., the best feasible path for the inspection robot, is selected based on the fitness value of the candidate solutions. The specific formula is as follows: Wherein, F(X) i ) represents the fitness value of the i-th feasible path solution in the population; This represents the fitness value of the feasible path solution in the j-th dimension at iteration t. That is, based on the fitness value, if the fitness value of the i-th feasible path solution selected in the population is smaller than the fitness value of the feasible path solution in the j-th dimension at iteration t, then the feasible path solution in the j-th dimension is replaced as the current better path solution. Wherein, F(X) best ) represents the fitness value of the optimal path solution for the inspection robot vehicle; This represents the fitness value of the optimal path solution for the inspection robot in the t-th iteration; A forward greedy selection mechanism is used to determine the optimal solution, selecting the feasible path with the minimum objective function value as the global optimal solution for the inspection robot. Simultaneously, it is determined whether the iterative optimization satisfies the maximum iteration condition. If the condition is met, the iteration stops; otherwise, the loop continues until the optimal solution, i.e., the optimal path solution for the inspection robot, is obtained.
2. The automatic meter reading and identification method for substation inspection vehicles according to claim 1, characterized in that, S3 employs an improved DDPG reinforcement learning algorithm for local path planning, specifically including: Randomly initialize the policy network and value network and their corresponding target networks, and initialize the experience replay buffer; Perform state-space design: in, This indicates the coordinate difference between the current position of the inspection robot and the obstacle; This indicates the coordinate difference between the current position of the inspection vehicle and the target point; v current This indicates the linear velocity of the inspection vehicle. This indicates the energy consumption of the inspection vehicle during its current operation; Among them, C obs_i (x obs_i ,y obs_i ) represents the current position of the i-th obstacle; C goal (x goal ,y goal ) represents the coordinates of the target point; C agent (x agent ,y agent () indicates the current coordinates of the inspection vehicle; Perform motion space design: in, This represents the output of the Actor network, i.e., the distance the inspection robot has moved in the x and y directions; Inspection robot performs action a t Move to a new location in the environment and observe the reward r and the next state S. t +1 And whether it is a terminated state, and at the same time, the experience (S) generated by this interaction. t ,a t ,r,S t+1 Stored in the experience replay buffer R; Design the reward function: based on the collision penalty factor r collision Target attraction reward / punishment factor, destination reward factor r destination Energy consumption penalty r energy Speed reward factor r velocity The reward consists of the safe time-distance model, and the specific formula is as follows: r(S,a)=∑γ·r Where γ represents the weight, that is, the weight of the reward factor in each part of the reward function; r represents the reward function for each type, and the specific reward and penalty factors are as follows: Considering the collision penalty factor r of the inspection vehicle collision When the inspection robot collides with an obstacle, a penalty will be imposed, and the specific formula is as follows: Where, d obs Indicates the distance from the inspection vehicle to the nearest obstacle; τ represents the attenuation coefficient; Π collision Represents the collision indication function; κ c η c κ represents the weighting coefficient, and c Much greater than η c ; Considering the target gravity reward / penalty factor r of the inspection robot vehicle gravitation The system sets rewards and penalties based on the gravitational potential field of the inspection robot vehicle at the target point. A positive reward is given whenever the distance between the inspection robot vehicle and the target point decreases, and a penalty is given otherwise. Among them, D i D represents the Euclidean distance between the inspection robot and the target point at time i; i-1 K represents the Euclidean distance between the inspection robot and the target point at time i-1; alt Represents the weighting coefficient; r alt Indicates the gravitational coefficient; Considering the reward factor r for the inspection robot reaching its destination destination A reward will be given when the inspection robot reaches the target point, according to the following formula: Where, d prev d represents the distance from the target point at the previous moment; current Indicates the current distance; d init Indicates the initial distance; Π reached Target arrival indicator; η d , Indicates the weighting coefficient; Considering the energy consumption penalty r of the inspection vehicle energy The specific formula is as follows: in, Indicates the energy consumption of the current action; t enery Indicates the time already elapsed; T enery max Indicates the maximum allowed time; λ1 and λ2 represent weighting coefficients; Considering the speed reward factor r of the inspection robot vehicle velocity Within a unit sampling period, the value of the reward factor is positively correlated with the speed, as shown in the following formula: Among them, v current This indicates the linear velocity of the inspection vehicle; v max Maximum permissible speed; v target This indicates the recommended speed for the current state, which can be dynamically adjusted; a v ,b v This represents the weighting coefficient.
3. The automatic meter reading and identification method for substation inspection vehicles according to claim 2, characterized in that, The reward and penalty function is improved by introducing a safety time interval model: Traditional collision time (TTC) is expressed as follows: Among them, D rel Indicates the relative longitudinal distance between the inspection vehicle and the obstacle; v rel This indicates the relative longitudinal velocity between the inspection vehicle and the obstacle; Emergency braking safe distance: Where d1 represents the braking distance of the inspection robot; v ego Indicates the speed of the inspection vehicle; v f t represents the velocity of the obstacle. r Indicates the delay time of the emergency obstacle avoidance system; a ego d0 represents the absolute value of the braking deceleration of the inspection vehicle; d0 represents the distance between the inspection vehicle and the obstacle in front after the vehicle stops through the braking obstacle avoidance operation, d0 = 0.1m. Where T1 represents the braking critical TTC value; The time-distance condition that must be met for emergency braking to avoid obstacles is: Safe distance for emergency steering: Where d2 represents the emergency turning distance of the inspection robot; t c Indicates the delay time for emergency steering; Where T2 represents the critical TTC value for steering; The time-distance condition that must be met for emergency braking and steering is: The process of repeated environmental interaction and network updates continuously adjusts the movement trajectory of the inspection robot in the local area until the maximum number of iterations is reached, and the inspection robot stably finds the local optimal path within a certain period of time.
4. The automatic meter reading and identification method for substation inspection vehicles according to claim 3, characterized in that, S4 specifically includes: Design the objective function minimize f(x) TTC ): Where, f(x) TTC () represents the objective function value; x TTC This represents a vector of decision variables, including the speed of the inspection robot vehicle, braking deceleration, etc. This represents the weighting coefficient, used to balance the influence of different factors on the objective function; Minimize the constructed objective function f(x) TTC ) and decision variable x TTC Input the improved GOA optimization algorithm to find the optimal solution that satisfies the safe time interval condition; Randomly generate the initial goat population: in, Let represent the position vector of the i-th candidate solution individual, i.e., a d-dimensional vector in the search space; d represents the dimension, i.e., the number of decision variables; i represents the number of candidate solution individuals, i = 1, 2, ..., NR; The initial population was generated as follows: Where UB and LB represent the upper and lower bounds of the search space, respectively; rand(d) represents a d-dimensional random vector with values in the range [0,1], and calculates the fitness value of each goat position, which represents the objective function value. The formula for updating the new position is: in, This indicates the position of the i-th candidate solution in the (t+1)-th iteration; α represents the position of the i-th candidate solution in iteration t; GOA R represents the exploration coefficient, which controls the intensity of random motion; Guass Let N(0,1) represent a random variable drawn from a Gaussian distribution N(0,1). Introducing adaptive inertia weights to optimize the exploration coefficients of the GOA optimization algorithm: Where, k GOA This represents a parameter that controls the upper and lower limits of the weights; μ GOA This indicates the parameter controlling the smoothness of the search; T represents the maximum number of iterations. GOA Indicates the current iteration number; The position update formula is: in, β represents the current optimal solution. GOA Indicates the development coefficient; An improvement is made by introducing a Cauchy-Gaussian mutation strategy, the specific formula of which is as follows: b GOA =βC GOA [1+n GOA 1·cauchy(0,δ GOA 2 )+η GOA 2·Gauss(0,δ GOA 2 )] Wherein, βC GOA This represents the original development coefficient value within the range [0,1]; δ GOA Indicates standard deviation; cauchy(0,δ) GOA ) and Gauss(0,δ GOA () represents a random variable based on the Cauchy and Gaussian distributions; and This represents an adaptive adjustment variable that is dynamically adjusted based on the population's evolutionary state during the iteration process; The position update formula is: Among them, J GOA Indicates the jump coefficient; This represents a candidate solution individual randomly selected from the population; Reset Formula: Stopping Criteria in, This represents the fitness of the optimal solution in the (t+1)th iteration; Let represent the fitness of the optimal solution in the t-th iteration; If the difference is less than the preset threshold If the algorithm has converged to a sufficiently good solution, then the iteration can be stopped. The average of the squared differences between the fitness values of all candidate solutions in the population and the fitness value of the current best solution is calculated. If the average value is less than the preset threshold δ' GOA If the fitness values of all candidate solutions in the population are close enough to the current best solution, then the iteration can be stopped.
5. The automatic meter reading and identification method for substation inspection vehicles according to claim 4, characterized in that, S5 uses the NLM model for image denoising, including: Substation instrument images u NLM pixel i in NLM A pixel block the size of a reference window is generated centered on the image, and candidate pixel blocks are generated within the search window using a sliding window approach. Weights are determined by the similarity between non-local pixels in the substation instrument image. Calculate pixel i NLM and j NLM Euclidean distance: Among them, a NLM d represents the standard deviation of the Gaussian kernel. NLM (i NLM ,j NLM ) represents a function of Euclidean distance, and represents the decay of weights; and Representing pixels i NLM The size of the center is N NLM *N NLM The square neighborhood and pixels j NLM The size of the center is N NLM *N NLM The square neighborhood of u(N); iNLM ) represents N iNLM grayscale value; express grayscale value; u NLM This refers to the instrument images captured by the inspection robot, i.e., images containing noise. The weighting coefficients are: And satisfy Where w(i NLM ,j NLM () is the weight, used to evaluate pixel j. NLM The degree of influence on pixel i; C(i) NLM ) is a standardized constant, i.e., a normalization constant; i NLM ,j NLM ∈X NLM X NLM It is a pixel field; h NLM This represents the filtering parameter, which controls the degree of decay of the exponential function; A dynamic parameter mapping adjustment strategy is introduced to automatically adjust 'a' based on the noise level of local image patches. NLM and h NLM The value of is adjusted to more effectively suppress noise while preserving image details. First, local noise is estimated, and the variance of the grayscale values for each reference window is calculated: Where, σ NLM 2 It is the variance of grayscale values; n NLM 2 N is the total number of pixels within the neighborhood window; NLM It is a reference window; μ NLM It is the average grayscale value of the window; Mapping dynamic parameters based on the variance of gray values: Among them, h NLM ' represents the filter parameters after dynamic mapping; a NLM ' represents the standard deviation of the Gaussian kernel after dynamic mapping; α NLM β NLM Indicates the adjustment coefficient; This represents the maximum noise variance across the entire image; The formula for the weighting coefficients has been updated to: Use weights to process pixel i NLM The denoised image U(i) is obtained by weighting the values of the surrounding pixels. NLM ): Among them, U(i NLM ) represents the image after denoising; u(j) NLM ) is pixel j NLM The original pixel values.
6. The automatic meter reading and identification method for substation inspection vehicles according to claim 5, characterized in that, S5 uses the SegVG model for image feature extraction: For the denoised image U, DETR and BERT are used as visual and text backbone networks, respectively, to extract image and text features; The denoised instrument image is input into a pre-trained DETR model, which uses its ResNet and Transformer encoders to extract visual features. A pre-trained ResNet model is used to extract 2D feature maps, and a 1×1 convolutional layer is used to reduce the number of channels in the feature maps, resulting in feature map I'. Feature map I' is then flattened into a one-dimensional vector Z. v ; Vector Z v Positional encoding is added and sequentially fed into the encoder layer of the DETR model for feature extraction, resulting in the final visual feature vector. in, These are the original visual features of the i1+1th layer; These are the original visual features of the i1th layer; This is the i1th layer in the DETR backbone network; i1 is the total number of layers; v1 represents vision. The text is processed using a pre-trained BERT model to obtain the text feature vector Z. t : The input text is segmented and special markers [CLS] and [SEP] are added, placed at the beginning and end of the text respectively; The text is converted into a language feature vector Z using the embedding layer of a pre-trained BERT model. t ; The language feature vector Z t The features are sequentially input into the encoder layer of the BERT model for feature extraction, resulting in the final text feature vector Z. t : in, These are the original text features of the i1+1th layer; It represents the original text features of the i1th layer; t represents the text. It is the 2i1+1 layer in the DETR backbone network; It is the 2i1st layer in the DETR backbone network; The Triple Alignment module is introduced to iteratively update query, text, and visual features through a three-way attention mechanism, eliminating domain differences between them. Z o It is initialized with learnable embeddings, including a regression query and multiple split queries; A triple multi-head attention mechanism is employed to perform triangular updates on query, text, and visual features, enabling them to share the same feature space and mitigating domain differences. The formula is as follows: Among them, Tri-MHA is the triangular attention mechanism; Z o It is the original query feature; Z' o This is the updated query feature; Z t ' is the updated text feature; It refers to the updated visual features; 'o' represents the query. The updated features are then merged back into the original features, using the following formula: The aligned text feature vector Z t and visual feature vectors The features are connected to form a multimodal feature vector, which is then input into the Transformer encoder layer for feature fusion to obtain the encoder output containing text and visual information. The encoder output is then input into the decoder, which uses the bbox2seg scheme to convert the target box annotations into a segmentation mask.
7. The automatic meter reading and identification method for substation inspection vehicles according to claim 6, characterized in that, S6 includes: The digital region image block U1 output by SegVG is cropped and then input into the MHAFF module to meet the input requirements of CNN and Transformer; Using CNN to extract local features of images Capture local information such as edges and textures of numbers; use Transformer to extract global features of images. Capture the positional relationships and overall layout of numbers within the entire image; Where X1 is the feature matrix extracted by the Transformer branch; Y is the feature matrix extracted by the CNN branch; A multi-head attention mechanism is used to fuse the features extracted by CNN and Transformer to obtain a more comprehensive feature representation; The fused features are classified to identify numbers in the image.
8. The automatic meter reading and identification method for substation inspection vehicles according to claim 7, characterized in that, A multi-head attention mechanism is used to fuse the features extracted by CNN and Transformer. The steps are as follows: (1) Generate the Q, K, V matrices: Q=X1W Q ,K=YW K ,V=X1W V Where Q is the query matrix, used to find relevant information; K is the key matrix, used to store information; and V is the value matrix, containing the information W to be searched. Q W K W V It is a learnable weight matrix used to map the input sequence to the Query, Key, and Value matrices; Calculate attention score: Here, Attention(Q,K,V) is used to calculate the attention score, which represents the similarity between the Query and the Key; is the scaling factor used to prevent gradient explosion; softmax is the normalization function that converts the attention score into a probability distribution. (2) Calculate multi-head attention: MHA(Q,K,V)=Concat(head1,head2,...,head h )WO MHA(Q,K,V) is a multi-head attention mechanism that inputs the Query, Key, and Value into h independent attention heads and outputs the fused features; head1, head2,...,head h There are h independent attention heads, each responsible for searching for different information; W O It is a learnable weight matrix used to linearly combine the outputs of h attention heads; (3) Generate the fused feature vector: Z = f(MHA) Where Z is the fused feature vector; f(·) is a nonlinear function; The specific steps for classifying the fused features and identifying numbers in the image are as follows: (1) A fully connected layer is used to map the fused features to the classification result: Z' = AZ + b Where Z' is the classification result vector, and each element represents the probability of belonging to a certain number category; A is the weight matrix, which is used to map the fused feature vector to the classification result vector; b is the bias vector. (2) The output is converted into a probability distribution using the softmax function, thereby enabling the classification and recognition of numbers in the image: Where P(cow=k|Z') is the probability that sample i belongs to digit class k; k is the class index; C1 is the total number of classes; and e is the base of the natural logarithm.
Citation Information
Patent Citations
Substation inspection unmanned aerial vehicle path planning method based on fusion A*- grey wolf algorithm
CN119642839A
Multi-robot trajectory planning method
WO2022241808A1