Charging pile fault diagnosis method and device considering data enhancement and improved bidirectional long short-term memory network
By constructing a time series data set of charging bills and maintenance work orders, and using the bidirectional long-short-term memory network method of generative adversarial network and particle swarm optimization algorithm, the problem of insufficient data volume in charging pile fault diagnosis is solved, and the accuracy and accuracy of fault diagnosis are improved. Reliability ensures the safety of charging equipment.
Patent Information
- Application Number
- CN202410860499.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-28
- Publication Date
- 2024-09-24
AI Technical Summary
In the current charging pile fault diagnosis, the insufficient amount of data leads to a reduction in the accuracy of the prediction model. Especially when the sensor or communication unit fails during the use of the charging pile, the fault risk cannot be accurately judged.
The data enhancement and improved two-way long short-term memory network method is used to construct a time series data set through charging bill data and maintenance work order data, a generative adversarial network is used to generate simulated real samples, and the particle swarm optimization algorithm is used to optimize the model parameters to realize the complexity of charging piles. Troubleshooting.
It improves the accuracy and reliability of charging pile fault diagnosis, solves the problem of insufficient data volume, enhances the prediction ability of the model, and ensures the safety and reliability of charging equipment.
Smart Images

Figure CN118690302A
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of charging pile fault diagnosis, and more specifically, relates to a charging pile fault diagnosis method and device considering data enhancement and improved bidirectional long short-term memory network. Background Art
[0002] As the global energy crisis continues to intensify and environmental problems become increasingly prominent, electric vehicles are becoming more and more popular. Compared with traditional vehicles, electric vehicles have huge advantages in energy conservation and emission reduction. According to statistics, by the end of 2023, China's electric vehicle ownership will reach 20.41 million, and it is still growing rapidly. This has also promoted the construction of electric vehicle charging infrastructure. Governments of various countries have invested a lot of money in the construction of electric vehicle charging stations and charging piles to meet the growing demand for electric vehicle charging. The construction of electric vehicle infrastructure in my country has also made great progress. According to statistics from the National Energy Administration, by the end of 2023, the total amount of charging infrastructure in my country reached 8.596 million units, a year-on-year increase of 65%. With the construction and commissioning of a large number of electric vehicle charging equipment, its charging reliability and safety have gradually become the focus of attention.
[0003] Regarding the fault diagnosis of charging equipment, the main research direction is to use the sensors and communication equipment inside the charging equipment to collect various data generated during the charging process, such as temperature, voltage, current, frequency, etc., and then use technologies such as machine learning and neural networks to analyze the charging process and determine whether it has a risk of failure. However, during the use of charging piles, if various sensors or communication units fail, the collected voltage, current and other data will be incomplete or insufficient. Most existing technologies are based on complete simulation data. In actual use, insufficient data often leads to reduced accuracy of the prediction model. Therefore, for charging piles with less data, improving their diagnostic accuracy is of great significance to improving the reliability and safety of charging equipment. Summary of the invention
[0004] In view of the above defects or improvement needs of the prior art, the present invention proposes a charging pile fault diagnosis method and device that considers data enhancement and improved bidirectional long short-term memory network, thereby solving the problem of charging pile fault diagnosis accuracy due to insufficient data volume from the perspective of charging bill data and maintenance work order data.
[0005] To achieve the above object, according to one aspect of the present invention, the present invention provides a charging pile fault diagnosis method considering data enhancement and improved bidirectional long short-term memory network, comprising:
[0006] Step 1: Preprocess the charging bill data and maintenance work order data of the charging pile to construct a time series data set of charging bills and operation and maintenance work orders;
[0007] Step 2: Generate data simulating real samples based on the generative adversarial network to expand the preprocessed time series data set;
[0008] Step 3: Construct a bidirectional long short-term memory network to model the charging pile fault diagnosis method;
[0009] Step 4: Optimize the parameters of the bidirectional long short-term memory network based on the particle swarm optimization algorithm;
[0010] Step 5: Based on the improved bidirectional long short-term memory network fault diagnosis method, complex fault diagnosis of charging piles is realized.
[0011] Preferably, in step 1, the charging bill data and maintenance work order data of the charging pile are preprocessed to construct a time series data set of the charging bill and the operation and maintenance work order, and the implementation process is:
[0012] Step 1.1: Starting from the charging pile maintenance work order data, find the corresponding charging pile in the charging bill data according to the charging pile number. According to the charging pile repair time in the maintenance work order data, select the charging bill data seven days before the repair time as the negative example, and according to the charging pile completion time in the maintenance work order data, select the charging bill data seven days after the completion time as the positive example;
[0013] Step 1.2: For the charging data set of the maintained charging piles, classify each charging order record into normal orders, invalid orders, and faulty orders. Normal orders are charging order records where the charging ends due to the set charging amount, user remote termination (mobile phone, website), electric vehicle full charge, etc., and the charging time is greater than 1 minute; invalid orders are charging order records where the charging ends due to the set charging amount, user remote termination (mobile phone, website), electric vehicle full charge, etc., but the charging time is less than or equal to 1 minute; faulty orders are orders where the charging ends due to abnormal terminations such as detection point voltage detection failure, meter communication failure, and charging interface electronic lock failure;
[0014] Step 1.3: Considering the charging order type, charging order quantity and other factors, the features are selected as follows:
[0015] (1) Charging order summary data: Changes in the number of orders can often reflect the status of the charging pile. When there is a problem with the charging pile, the number of abnormal orders will increase, the number of normal orders will decrease, and the total number of orders will also decrease. This type of features includes the total number of orders, the proportion of faulty orders, the proportion of invalid orders, and the proportion of orders on the last day, reflecting the proportion of each type of order in the total number of orders.
[0016] (2) Changes in the number of orders per day: This type of feature selection also reflects the changes in the number of orders, but is more detailed than the previous type. It mainly reflects the changes in the proportion of orders, the proportion of faulty orders, and the proportion of invalid orders each day within seven days, and focuses on the impact of the distance from the fault time on the proportion of order quantity.
[0017] (3) Charging end reason: Considering the charging end reason of the charging order, the abnormal end of the charging pile often indicates that there may be a problem with the charging pile. Therefore, each charging end reason is listed as a characteristic factor;
[0018] Step 2.4: Based on the above three categories, a total of 122 features are constructed for feature engineering, and a time series data set is constructed in chronological order according to the time of the orders for the same charging pile.
[0019] Preferably, in step 2, the data of simulating real samples is generated based on the generative adversarial network to expand the preprocessed time series data set, and the implementation process is:
[0020] Step 2.1: Build the generator model. By giving a random noise signal z as input, after multiple hidden layer transformations, the input space is mapped to the sample space. The output of the generator will try to imitate the real samples in the training set. Its objective function is as follows:
[0021]
[0022] in, represents the expected value of calculation; P g represents the sampling noise prior distribution; G represents the generator model;
[0023] Step 2.2: Build a discriminator model. Randomly extract real samples and generated samples as input. After training, the discriminator will try to distinguish whether the input is a real sample or a generated sample from the generator. Its objective function is as follows:
[0024]
[0025] Where P data represents the real data distribution; z represents the noise input; D represents the discriminator model; P z represents the sampling noise prior distribution;
[0026] Step 2.3: Combining the objective functions of the generator and the discriminator, the final objective function is as follows:
[0027]
[0028] The discriminator D is trained to identify the label of the training sample with the highest probability (lgD(x)), and the generator G is trained to minimize lg(1-D(z)), that is, to maximize the loss of D. During the training process, one side is fixed and the parameters of the other network are updated, and the iterations are repeated alternately to maximize the error of the other side. Finally, G can estimate the distribution of the sample data and generate sufficiently realistic samples.
[0029] Step 2.4: Input the preprocessed time series dataset into the generative adversarial network, train the model, generate sufficient new data, and construct an expanded time series dataset.
[0030] Preferably, in step 3, the bidirectional long short-term memory network is constructed to model the charging pile fault diagnosis method, and the implementation process is:
[0031] Step 3.1: Construct a long short-term memory network, and the output is calculated by the fully connected layer of the activation function Sigmoid function (σ). Its overall framework is:
[0032] Input Gate I t =σ(X t W xi +H t-1 W hi +b i ), (4)
[0033] Forget Gate F t =σ(X t W xf +H t-1 W hf +b f ), (5)
[0034] Gate control unit C' t =tanh(X t W xc +H t-1 W hc +b c ), (6)
[0035] C t =F t ⊙C t-1 +I t ⊙C' t , (7)
[0036] Output Gate O t =σ(X t W xo +H t-1 W ho +b o ), (8)
[0037] Where: Xt is the mini-batch input vector for a given time step t; W xi and W hi is the weight matrix of the input gate; b i is the bias term of the input gate; W xf and W hf is the weight matrix of the forget gate; b f is the bias term of the forget gate; C' t Candidate memory cells that need to be calculated for short-term memory; W xc and W hc is the weight matrix of the gate unit; b c is the bias term of the gate control unit; C t is the state of the gate control unit at the current moment, C t-1 Indicates the last unit state; W xo and W ho is the weight matrix of the output gate, b o is the bias term of the output gate. Use the function with a value range of as the activation function to control the flow of information in the hidden state by element-wise multiplication;
[0038] Step 3.2: Output Gate O t Control the information flow from memory cells to hidden states to obtain the final output H t for:
[0039] H t =O t ⊙tanhC t , (9)
[0040] Step 3.3: Construct a bidirectional LSTM network, which is composed of a forward LSTM network and a backward LSTM network. Feature extraction is performed from both forward and reverse perspectives, and then the results of the bidirectional extraction are combined in a specific way. The final output is as follows:
[0041] H t1 =Lstm(X t ,H t-1 ), (10)
[0042] H t2 =Lstm(X t ,H t+1 ), (11)
[0043] Y t =w h1 H t1 +w h2 H t2 +b y , (12)
[0044] Among them, wh1 is the weight matrix of the forward LSTM network layer, w h2 is the weight matrix of the backward long short-term memory network layer, b y is the bias matrix of the output layer.
[0045] Preferably, in step 4, the particle swarm optimization algorithm is used to optimize the parameters of the bidirectional long short-term memory network, and the implementation process is:
[0046] Step 4.1: Initialize the particle swarm parameter settings and set the number of particle swarms N p , number of iterations t p , the search dimension is D p ;
[0047] Step 4.2: Initialize the position and speed of the particle swarm algorithm. The initial position of the particle is random, and the position of the randomly generated i-th particle is X i =(l,h), where l represents the learning rate range of the bidirectional long short-term memory network model, and h is the number of neurons in the hidden layer;
[0048] Step 4.3: Determine the fitness function of the particle swarm algorithm, use the bidirectional long short-term memory network model to train the training set, and compare the actual results with the predicted values. The fitness function is as follows:
[0049]
[0050] Where f(y) is the fitness function, y' is the number of predicted values that are the same as the actual results, and y is the total number of test sets;
[0051] Step 4.4: Iterative calculation, calculate the new position of the particle after each iteration, and adjust the position and speed of the particle so that the particle constantly approaches the optimal position, thus finally obtaining the optimal solution. The update formula of speed and position is as follows:
[0052]
[0053] n=1+lnt max , (16)
[0054]
[0055] in, is the particle velocity at the t-th iteration and the t+1-th iteration; is the particle position at the tth iteration and the t+1th iteration; w is the inertia weight, c1 and c2 are learning factors, and r1 and r2 are random numbers on [0, 1]; is the optimal position of particle i in the t-th iteration and the t+1-th iteration and the global optimal position; t is the current iteration number, and T is the time factor; after the optimal solution is obtained through iteration, the optimal learning rate and the number of hidden layer neurons are transmitted to the bidirectional long short-term memory network model;
[0056] Step 4.5: After obtaining the optimal solution through iteration, the optimal learning rate and the number of hidden layer neurons are transferred to the bidirectional long short-term memory network model.
[0057] Preferably, in step 5, the fault diagnosis method based on the improved bidirectional long short-term memory network realizes complex fault diagnosis of the charging pile, and the implementation process is:
[0058] Step 5.1: Preprocess the charging bill data and maintenance work order data to build a time series data set of charging bills and operation and maintenance work orders;
[0059] Step 5.2: Based on the generative adversarial network, the preprocessed time series data set is enhanced and divided into the test set and the training set;
[0060] Step 5.3: Input the training set into the bidirectional long short-term memory network model after the particle swarm algorithm optimizes the parameters for training;
[0061] Step 5.4: Input the test set into the trained model to test the accuracy of the model in diagnosing the cause of the charging pile failure and verify the correctness and reliability of the model.
[0062] Preferably, the charging pile fault diagnosis device considering data enhancement and improved bidirectional long short-term memory network is used to implement the charging pile fault diagnosis method, and the charging pile fault diagnosis device includes
[0063] A data acquisition module, used to acquire the historical charging bill data and maintenance work order data of the charging pile;
[0064] A data processing module, used to process the historical data information, determine the characteristic vector of the data influencing factors, and generate a time series data set of charging bills and operation and maintenance work orders;
[0065] The data set enhancement module is used to enhance the preprocessed time series data set based on the generative adversarial network and expand the data set size;
[0066] Model parameter optimization module, used to train the bidirectional long short-term memory network model optimized by particle swarm algorithm based on time series data set;
[0067] The fault diagnosis module is used to input the characteristic vector of the target data into the bidirectional long short-term memory network model optimized by the particle swarm algorithm that meets the preset conditions to obtain the fault diagnosis result of the charging pile.
[0068] In general, the above technical solutions conceived by the present invention can achieve the following beneficial effects compared with the prior art:
[0069] The technical solution provided by the present invention is as follows: first, the charging bill data and maintenance work order data of the charging pile are preprocessed to construct a time series data set of the charging bill and the operation and maintenance work order; then, data simulating real samples are generated based on the generative adversarial network to expand the preprocessed time series data set; thirdly, a bidirectional long short-term memory network is constructed to model the charging pile fault diagnosis method; secondly, the parameters of the bidirectional long short-term memory network are optimized based on the particle swarm optimization algorithm; finally, the fault diagnosis method based on the improved bidirectional long short-term memory network is used to realize the complex fault diagnosis of the charging pile. In the prior art, the voltage and current data of the charging pile are usually used for fault diagnosis, but on the one hand, the internal sensors or communication equipment of the charging pile may fail, etc., and on the other hand, the amount of voltage and current data is huge. Generally, after being stored for a period of time, the new voltage and current data will overwrite the old voltage and current data, which often leads to data missing and insufficient data. The present invention uses the charging bill and maintenance work order data to construct a time series feature set. The charging bill and maintenance work order data are often stored for a long time due to their low storage cost, which solves the problem of data missing in the traditional fault diagnosis through voltage and current. And due to the site selection, the small number of electric vehicle users and other reasons, some charging stations may have the problem of less order data. If data enhancement is not performed, the fault diagnosis model may be insufficiently trained and cannot be accurately predicted. The present invention uses a generative adversarial network to perform data enhancement based on the original data set, expand the data set to a suitable scale, and help train subsequent diagnostic models and improve the accuracy of fault diagnosis. In addition, the input of the fault diagnosis model of the present invention is a time series data set, and a bidirectional long short-term memory network model is used for prediction, which can better mine the dependency of the time data series and the dependency of the influencing factor characteristics, and use the particle swarm algorithm to optimize the initial parameters, which can significantly improve the prediction accuracy of the model, thereby improving the safety and reliability of the charging pile. BRIEF DESCRIPTION OF THE DRAWINGS
[0070] Figure 1 It is a flow chart of a charging pile fault diagnosis method considering data enhancement and improved bidirectional long short-term memory network provided by an embodiment of the present invention;
[0071] Figure 2 A charging pile fault diagnosis device considering data enhancement and improved bidirectional long short-term memory network is provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0072] In order to make the purpose, technical solutions and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention. In addition, the technical features involved in the various embodiments of the present invention described below can be combined with each other as long as they do not conflict with each other.
[0073] like Figure 1 The flowchart of a charging pile fault diagnosis method considering data enhancement and improved bidirectional long short-term memory network according to an embodiment of the present invention is shown, including:
[0074] A charging pile fault diagnosis method and device considering data enhancement and improved bidirectional long short-term memory network, comprising:
[0075] Step 1: Preprocess the charging bill data and maintenance work order data of the charging pile to construct a time series data set of charging bills and operation and maintenance work orders;
[0076] Step 2: Generate data simulating real samples based on the generative adversarial network to expand the preprocessed time series data set;
[0077] Step 3: Construct a bidirectional long short-term memory network to model the charging pile fault diagnosis method;
[0078] Step 4: Optimize the parameters of the bidirectional long short-term memory network based on the particle swarm optimization algorithm;
[0079] Step 5: Based on the improved bidirectional long short-term memory network fault diagnosis method, complex fault diagnosis of charging piles is realized.
[0080] Among them, in step 1, the charging bill data and maintenance work order data of the charging pile are preprocessed to construct a time series data set of charging bills and operation and maintenance work orders:
[0081] Step 1.1: Starting from the charging pile maintenance work order data, find the corresponding charging pile in the charging bill data according to the charging pile number. According to the charging pile repair time in the maintenance work order data, select the charging bill data seven days before the repair time as the negative example, and according to the charging pile completion time in the maintenance work order data, select the charging bill data seven days after the completion time as the positive example;
[0082] Step 1.2: For the charging data set of the maintained charging piles, classify each charging order record into normal orders, invalid orders, and faulty orders. Normal orders are charging order records where the charging ends due to the set charging amount, user remote termination (mobile phone, website), electric vehicle full charge, etc., and the charging time is greater than 1 minute; invalid orders are charging order records where the charging ends due to the set charging amount, user remote termination (mobile phone, website), electric vehicle full charge, etc., but the charging time is less than or equal to 1 minute; faulty orders are orders where the charging ends due to abnormal terminations such as detection point voltage detection failure, meter communication failure, and charging interface electronic lock failure;
[0083] Step 1.3: Considering the charging order type, charging order quantity and other factors, the features are selected as follows:
[0084] (1) Charging order summary data: Changes in the number of orders can often reflect the status of the charging pile. When there is a problem with the charging pile, the number of abnormal orders will increase, the number of normal orders will decrease, and the total number of orders will also decrease. This type of features includes the total number of orders, the proportion of faulty orders, the proportion of invalid orders, and the proportion of orders on the last day, reflecting the proportion of each type of order in the total number of orders.
[0085] (2) Changes in the number of orders per day: This type of feature selection also reflects the changes in the number of orders, but is more detailed than the previous type. It mainly reflects the changes in the proportion of orders, the proportion of faulty orders, and the proportion of invalid orders each day within seven days, and focuses on the impact of the distance from the fault time on the proportion of order quantity.
[0086] (3) Charging end reason: Considering the charging end reason of the charging order, the abnormal end of the charging pile often indicates that there may be a problem with the charging pile. Therefore, each charging end reason is listed as a characteristic factor;
[0087] Step 1.4: Based on the above three categories, a total of 122 features are constructed for feature engineering, and according to the time of the order of the same charging pile, a time series data set of charging bills and operation and maintenance work orders is constructed in chronological order.
[0088] In step 2, data simulating real samples is generated based on the generative adversarial network to expand the preprocessed time series data set:
[0089] Step 2.1: Build the generator model. By giving a random noise signal z as input, after multiple hidden layer transformations, the input space is mapped to the sample space. The output of the generator will try to imitate the real samples in the training set. Its objective function is as follows:
[0090]
[0091] in, represents the expected value of calculation; P g represents the sampling noise prior distribution; G represents the generator model;
[0092] Step 2.2: Build a discriminator model. Randomly extract real samples and generated samples as input. After training, the discriminator will try to distinguish whether the input is a real sample or a generated sample from the generator. Its objective function is as follows:
[0093]
[0094] Where P data represents the real data distribution; z represents the noise input; D represents the discriminator model; P z represents the sampling noise prior distribution;
[0095] Step 2.3: Combining the objective functions of the generator and the discriminator, the final objective function is as follows:
[0096]
[0097] The discriminator D is trained to identify the label of the training sample with the highest probability (lgD(x)), and the generator G is trained to minimize lg(1-D(z)), that is, to maximize the loss of D. During the training process, one side is fixed and the parameters of the other network are updated, and the iterations are repeated alternately to maximize the error of the other side. Finally, G can estimate the distribution of the sample data and generate sufficiently realistic samples.
[0098] Step 2.4: Input the preprocessed time series dataset into the generative adversarial network, train the model, generate sufficient new data, and construct an expanded time series dataset.
[0099] In step 3, a bidirectional long short-term memory network is constructed to model the charging pile fault diagnosis method:
[0100] Step 3.1: Construct a long short-term memory network, and the output is calculated by the fully connected layer of the activation function Sigmoid function (σ). Its overall framework is:
[0101] Input Gate I t =σ(X t W xi +H t-1 W hi +b i ), (4)
[0102] Forget Gate F t =σ(X t W xf +H t-1 W hf +bf ), (5)
[0103] Gate control unit C' t =tanh(X t W xc +H t-1 W hc +b c ), (6)
[0104] C t =F t ⊙C t-1 +I t ⊙C' t , (7)
[0105] Output Gate O t =σ(X t W xo +H t-1 W ho +b o ), (8)
[0106] Where: X t is the mini-batch input vector for a given time step t; W xi and W hi is the weight matrix of the input gate; b i is the bias term of the input gate; W xf and W hf is the weight matrix of the forget gate; b f is the bias term of the forget gate; C' t Candidate memory cells that need to be calculated for short-term memory; W xc and W hc is the weight matrix of the gate unit; b c is the bias term of the gate control unit; C t is the state of the gate control unit at the current moment, C t-1 Indicates the last unit state; W xo and W ho is the weight matrix of the output gate, b o is the bias term of the output gate. Use the function with a value range of as the activation function to control the flow of information in the hidden state by element-wise multiplication;
[0107] Step 3.2: Output Gate O t Control the information flow from memory cells to hidden states to obtain the final output H t for:
[0108] H t =O t ⊙tanhC t , (9)
[0109] Step 3.3: Construct a bidirectional LSTM network, which is composed of a forward LSTM network and a backward LSTM network. Feature extraction is performed from both forward and reverse perspectives, and then the results of the bidirectional extraction are combined in a specific way. The final output is as follows:
[0110] H t1 =Lstm(X t ,H t-1 ), (10)
[0111] H t2 =Lstm(X t ,H t+1 ), (11)
[0112] Y t =w h1 H t1 +w h2 H t2 +b y , (12)
[0113] Among them, w h1 is the weight matrix of the forward LSTM network layer, w h2 is the weight matrix of the backward long short-term memory network layer, b y is the bias matrix of the output layer.
[0114] In step 4, the parameters of the bidirectional long short-term memory network are optimized based on the particle swarm optimization algorithm:
[0115] Step 4.1: Initialize the particle swarm parameter settings and set the number of particle swarms N p , number of iterations t p , the search dimension is D p ;
[0116] Step 4.2: Initialize the position and speed of the particle swarm algorithm. The initial position of the particle is random, and the position of the randomly generated i-th particle is X i =(l,h), where l represents the learning rate range of the bidirectional long short-term memory network model, and h is the number of neurons in the hidden layer;
[0117] Step 4.3: Determine the fitness function of the particle swarm algorithm, use the bidirectional long short-term memory network model to train the training set, and compare the actual results with the predicted values. The fitness function is as follows:
[0118]
[0119] Where f(y) is the fitness function, y' is the number of predicted values that are the same as the actual results, and y is the total number of test sets;
[0120] Step 4.4: Iterative calculation, calculate the new position of the particle after each iteration, and adjust the position and speed of the particle so that the particle constantly approaches the optimal position, thus finally obtaining the optimal solution. The update formula of speed and position is as follows:
[0121]
[0122] n=1+lnt max , (16)
[0123]
[0124] in, is the particle velocity at the t-th iteration and the t+1-th iteration; is the particle position at the tth iteration and the t+1th iteration; w is the inertia weight, c1 and c2 are learning factors, and r1 and r2 are random numbers on [0, 1]; is the optimal position of particle i in the t-th iteration and the t+1-th iteration and the global optimal position; t is the current iteration number, and T is the time factor; after the optimal solution is obtained through iteration, the optimal learning rate and the number of hidden layer neurons are transmitted to the bidirectional long short-term memory network model;
[0125] Step 4.5: After obtaining the optimal solution through iteration, the optimal learning rate and the number of hidden layer neurons are transferred to the bidirectional long short-term memory network model.
[0126] In step 5, the fault diagnosis method based on the improved bidirectional long short-term memory network is used to realize the complex fault diagnosis of the charging pile:
[0127] Step 5.1: Preprocess the charging bill data and maintenance work order data to build a time series data set of charging bills and operation and maintenance work orders;
[0128] Step 5.2: Based on the generative adversarial network, the preprocessed time series data set is enhanced and divided into the test set and the training set;
[0129] Step 5.3: Input the training set into the bidirectional long short-term memory network model after the particle swarm algorithm optimizes the parameters for training;
[0130] Step 5.4: Input the test set into the trained model to test the accuracy of the model in diagnosing the cause of the charging pile failure and verify the correctness and reliability of the model.
[0131] Example 2: Figure 2 The figure shows a charging pile fault diagnosis device considering data enhancement and improved Bi-LSTM provided by an embodiment of the present invention, including:
[0132] A data acquisition module, used to acquire the historical charging bill data and maintenance work order data of the charging pile;
[0133] A data processing module, used to process the historical data information, determine the characteristic vector of the data influencing factors, and generate a time series data set of charging bills and operation and maintenance work orders;
[0134] The data set enhancement module is used to enhance the preprocessed time series data set based on the generative adversarial network and expand the data set size;
[0135] Model parameter optimization module, used to train the bidirectional long short-term memory network model optimized by particle swarm algorithm based on time series data set;
[0136] The fault diagnosis module is used to input the characteristic vector of the target data into the bidirectional long short-term memory network model optimized by the particle swarm algorithm that meets the preset conditions to obtain the fault diagnosis result of the charging pile.
[0137] It will be easily understood by those skilled in the art that the above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the protection scope of the present invention.
Claims
1. A charging pile fault diagnosis method considering data enhancement and improved bidirectional long short-term memory network, characterized in that: include: Step 1: Preprocess the charging bill data and maintenance work order data of the charging pile to construct a time series data set of charging bills and operation and maintenance work orders; Step 2: Generate data simulating real samples based on the generative adversarial network to expand the preprocessed time series data set; Step 3: Construct a bidirectional long short-term memory network to model the charging pile fault diagnosis method; Step 4: Optimize the parameters of the bidirectional long short-term memory network based on the particle swarm optimization algorithm; Step 5: Based on the improved bidirectional long short-term memory network fault diagnosis method, complex fault diagnosis of charging piles is realized.
2. The charging pile fault diagnosis method considering data enhancement and improved bidirectional long short-term memory network according to claim 1 is characterized in that: Step 1: Preprocess the charging bill data and maintenance work order data of the charging pile to construct a time series data set of charging bills and operation and maintenance work orders, as follows: Step 1.1: Starting from the charging pile maintenance work order data, find the corresponding charging pile in the charging bill data according to the charging pile number. According to the repair time of the charging pile in the maintenance work order data, select the charging bill data seven days before the repair time as the negative example. According to the completion time of the charging pile in the maintenance work order data, select the charging bill data seven days after the completion time as the positive example; Step 1.2: For the charging data set of the maintained charging piles, classify each charging order record into normal orders, invalid orders, and faulty orders. Normal orders are charging order records where the charging ends due to the set charging amount, user remote termination, electric vehicle full charge, etc., and the charging time is greater than 1 minute; invalid orders are charging order records where the charging ends due to the set charging amount, user remote termination, electric vehicle full charge, etc., but the charging time is less than or equal to 1 minute; faulty orders are orders where the charging ends due to abnormal terminations such as detection point voltage detection failure, meter communication failure, and charging interface electronic lock failure; Step 1.3: Consider the charging order type and the number of charging orders, and select the following features: (1) Charging order summary data: Changes in the number of orders can often reflect the status of the charging pile. When there is a problem with the charging pile, the number of abnormal orders will increase, the number of normal orders will decrease, and the total number of orders will also decrease. This type of features includes the total number of orders, the proportion of faulty orders, the proportion of invalid orders, and the proportion of orders on the last day, reflecting the proportion of each type of order in the total number of orders. (2) Changes in the number of orders per day: This mainly reflects the changes in the proportion of orders per day, the proportion of faulty orders, and the proportion of invalid orders within seven days, focusing on the impact of the distance from the time of the fault on the proportion of orders. (3) Charging end reason: Considering the charging end reason of the charging order, the abnormal end of the charging pile often indicates that there is a problem with the charging pile. Therefore, each charging end reason is listed as a characteristic factor; Step 1.4: Based on the above three categories, a total of 122 features are constructed for feature engineering, and according to the time of the order of the same charging pile, a time series data set of charging bills and operation and maintenance work orders is constructed in chronological order.
3. The charging pile fault diagnosis method considering data enhancement and improved bidirectional long short-term memory network according to claim 1 is characterized in that: Step 2: Generate data simulating real samples based on the generative adversarial network and expand the preprocessed time series data set as follows: Step 2.1: Build a generator model. By giving a random noise signal z as input, the input space is mapped to the sample space through multiple hidden layer transformations. The output of the generator will try to imitate the real samples in the training set. Its objective function is as follows: in, represents the expected value of calculation; P g represents the sampling noise prior distribution; G represents the generator model; Step 2.2: Build a discriminator model and randomly extract real samples and generated samples as input. After training, the discriminator will try to distinguish whether the input is a real sample or a generated sample from the generator. Its objective function is as follows: Where P data represents the real data distribution; z represents the noise input; D represents the discriminator model; P z represents the sampling noise prior distribution; Step 2.3: Combining the objective functions of the generator and the discriminator, the final objective function is as follows: The discriminator D is trained to identify the label of the training sample with the maximum probability (lgD(x)), and the generator G is trained to minimize lg(1-D(z)), that is, to maximize the loss of D. During the training process, one side is fixed and the parameters of the other network are updated, and the iterations are alternated to maximize the error of the other side. Finally, G can estimate the distribution of the sample data and generate sufficiently realistic samples. Step 2.4: Input the preprocessed time series dataset into the generative adversarial network, train the model, generate sufficient new data, and construct an expanded time series dataset.
4. The charging pile fault diagnosis method considering data enhancement and improved bidirectional long short-term memory network according to claim 1 is characterized in that: Step 3: Construct a bidirectional long short-term memory network to model the charging pile fault diagnosis method, as follows: Step 3.1: Construct a long short-term memory network. The output is calculated by the fully connected layer of the activation function Sigmoid function (σ). The overall framework is: Input Gate I t =σ(X t W xi +H t-1 W hi +b i ),(4)Forget gate F t =σ(X t W xf +H t-1 W hf +b f ),(5) Gate control unit C t '=tanh(X t W xc +H t-1 W hc +b c ),(6) C t =F t ⊙C t-1 +I t ⊙C′ t , (7) Output Gate O t =σ(X t W xo +H t-1 W ho +b o ),(8) Where: X t is the mini-batch input vector for a given time step t; W xi and W hi is the weight matrix of the input gate; H t-1 is the hidden state of the previous time step; b i is the bias term of the input gate; W xf and W hf is the weight matrix of the forget gate; b f is the bias term of the forget gate; C′ t Candidate memory cells that need to be calculated for short-term memory; W xc and W hc is the weight matrix of the gate unit; b c is the bias term of the gate control unit; C t is the state of the gate control unit at the current moment, C t-1 Indicates the last unit state; W xo and W ho is the weight matrix of the output gate, b o is the bias term of the output gate, uses a function with a range of as the activation function, and controls the flow of information in the hidden state by element-wise multiplication; Step 3.2: Output Gate O t Control the information flow from memory cells to hidden states to obtain the final output H t for: H t =O t ⊙tanhC t , (9) Step 3.3: Construct a bidirectional LSTM network, which is composed of a forward LSTM network and a backward LSTM network. Feature extraction is performed from both forward and reverse perspectives, and then the results of the bidirectional extraction are combined in a specific way. The final output is as follows: H t1 =Lstm(X t ,H t-1 ), (10) H t2 =Lstm(X t ,H t+1 ), (11) Y t =w h1 H t1 +w h2 H t2 +b y , (12) Among them, w h1 is the weight matrix of the forward LSTM network layer; w h2 is the weight matrix of the backward long short-term memory network layer; b y is the bias matrix of the output layer; H t1 is the forward long short-term memory network layer; H t2 Y is the backward long short-term memory network layer; t It is a bidirectional long short-term memory network layer.
5. The charging pile fault diagnosis method considering data enhancement and improved bidirectional long short-term memory network according to claim 1 is characterized in that: Step 4: Optimize the parameters of the bidirectional long short-term memory network based on the particle swarm optimization algorithm: Step 4.1: Initialize the particle swarm parameter settings and set the number of particle swarms N p , number of iterations t p , the search dimension is D p ; Step 4.2: Initialize the position and speed of the particle swarm algorithm. The initial position of the particle is random, and the position of the randomly generated i-th particle is X i =(l,h), where l represents the learning rate range of the bidirectional long short-term memory network model, and h is the number of neurons in the hidden layer; Step 4.3: Determine the fitness function of the particle swarm algorithm, use the bidirectional long short-term memory network model to train the training set, and compare the actual results with the predicted values. The fitness function is as follows: Where f(y) is the fitness function, y' is the number of predicted values that are the same as the actual results, and y is the total number of test sets; Step 4.4: Iterative calculation, calculate the new position of the particle after each iteration, and adjust the position and speed of the particle so that the particle constantly approaches the optimal position, thus finally obtaining the optimal solution. The update formula of speed and position is as follows: n=1+lnt max , (16) Among them, V i t 、V i t+1 is the particle velocity at the t-th iteration and the t+1-th iteration; is the particle position at the tth iteration and the t+1th iteration; w is the inertia weight, c1 and c2 are learning factors, r1 and r2 are random numbers on [0, 1]; P i t , is the optimal position of particle i in the t-th iteration and the t+1-th iteration and the global optimal position; t is the current iteration number, and T is the time factor; after the optimal solution is obtained through iteration, the optimal learning rate and the number of hidden layer neurons are transmitted to the bidirectional long short-term memory network model; Step 4.5: After obtaining the optimal solution through iteration, the optimal learning rate and the number of hidden layer neurons are transferred to the bidirectional long short-term memory network model.
6. The charging pile fault diagnosis method considering data enhancement and improved bidirectional long short-term memory network according to claim 1 is characterized in that: Step 5: Based on the improved bidirectional long short-term memory network fault diagnosis method, the complex fault diagnosis of the charging pile is realized, as follows: Step 5.1: Preprocess the charging bill data and maintenance work order data to build a time series data set of charging bills and operation and maintenance work orders; Step 5.2: Based on the generative adversarial network, the preprocessed time series data set is enhanced and divided into the test set and the training set; Step 5.3: Input the training set into the bidirectional long short-term memory network model after the particle swarm algorithm optimizes the parameters for training; Step 5.4: Input the test set into the trained model to test the accuracy of the model in diagnosing the cause of the charging pile failure and verify the correctness and reliability of the model.
7. A charging pile fault diagnosis device considering data enhancement and improved bidirectional long short-term memory network, characterized in that: Used to implement the charging pile fault diagnosis method according to any one of claims 1 to 6, The device comprises: A data acquisition module, used to acquire the historical charging bill data and maintenance work order data of the charging pile; A data processing module, used to process the historical data information, determine the characteristic vector of the data influencing factors, and generate a time series data set of charging bills and operation and maintenance work orders; The data set enhancement module is used to enhance the preprocessed time series data set based on the generative adversarial network and expand the data set size; Model parameter optimization module, used to train the bidirectional long short-term memory network model optimized by particle swarm algorithm based on time series data set; The fault diagnosis module is used to input the characteristic vector of the target data into the bidirectional long short-term memory network model optimized by the particle swarm algorithm that meets the preset conditions to obtain the fault diagnosis result of the charging pile.
Citation Information
Cited By
Charging pile fault data generation method and device, storage medium and product
CN119025999A
Charging pile abnormal data diagnosis method and system based on AP clustering and LSTM network
CN119150149A
Charging pile fault diagnosis method based on network model
CN119830131A
