A method, device, system and storage medium for predicting electric vehicle charging load based on a fuzzy deep neural network
By combining fuzzy deep neural network and PSO algorithm, the problem of balancing time and space characteristics in load forecasting of electric vehicle charging stations is solved, more accurate load forecasting is achieved, and the stability and economy of the power grid are improved.
Patent Information
- Application Number
- CN202310245165.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-03-10
- Publication Date
- 2025-10-17
- Estimated Expiration
- 2043-03-10
AI Technical Summary
Existing load forecasting methods for electric vehicle charging stations are difficult to take into account both the temporal and spatial characteristics of the load, resulting in reduced grid stability and economy.
A method based on fuzzy deep neural network is adopted to preprocess and fuzzify historical load data, and the weights are fine-tuned in combination with the PSO algorithm to establish an accurate electric vehicle charging load prediction model.
It improves the accuracy and reliability of load forecasting for electric vehicle charging stations and enhances the stability and economic operation capacity of the power grid.
Smart Images

Figure CN116494784B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of smart grid, in particular to an electric vehicle charging load prediction method, device and system based on fuzzy deep neural network and a storage medium. BACKGROUND
[0002] With the continuous development of society, economy and technology, people's demand for energy is also increasing. However, fossil energy, as a non-renewable energy, is becoming increasingly exhausted due to overexploitation. Electric vehicles are widely promoted due to their energy saving, environmental protection and high energy utilization rate. Large-scale electric vehicles connected to the power grid will exacerbate the peak-valley difference, reduce the stability and economic efficiency of the power system, and the connection of electric vehicle charging stations to the power grid will inject a large amount of harmonics, further increasing the risk of power supply equipment operation failure. How to guide the orderly charging and discharging of electric vehicles is the key to solving the problem of connecting electric vehicle charging stations to the power grid. How to efficiently and reasonably arrange the orderly charging of electric vehicles and convert electric vehicle load into a tool to benefit the power system and improve the stability and economic efficiency of the power system lies in accurate electric vehicle charging station load prediction. Domestic and foreign experts and scholars have proposed various methods for electric vehicle charging station load prediction. The main methods for electric vehicle charging station load prediction include regression analysis, time series model and grey system prediction method. With the rise of artificial intelligence, a large number of artificial intelligence methods have been used in the prediction of electric vehicle charging station load, such as random forest prediction model, support vector regression prediction model and deep neural network prediction method. These data not only include traditional time series data, but also include traffic and road spatial feature information data. However, these load prediction methods cannot simultaneously consider the time characteristics and spatial characteristics of the load, and more and more researchers have begun to focus on the spatio-temporal distribution characteristics of electric vehicle charging station load.
[0003] In view of the problems existing in the above load prediction method, an electric vehicle charging load prediction method based on fuzzy deep neural network is proposed, which not only considers more factors, but also objectively reflects the actual situation. The load prediction data of electric vehicle charging station is complex and diverse, and the load has strong spatio-temporal randomness. Deep learning algorithm has strong self-adaptive perception ability, and can be used to fit and predict the load for non-linear, random and uncertain data. This method not only considers various load prediction factors, but also is closer to the actual situation, and is applied to bus-only stations and social public stations, which has important reference value for improving the reliable and economic operation of electric vehicle charging stations and has a very significant positive influence on the prediction work. SUMMARY
[0004] The problem to be solved by the present application is to provide a fuzzy deep neural network-based electric vehicle charging load prediction method, device, system and storage medium, which further establishes a prediction model during electric vehicle charging to provide technical support for improving load prediction accuracy.
[0005] The object of the present application is achieved by the following technical solutions:
[0006] A fuzzy deep neural network-based electric vehicle charging load prediction method comprises the following steps:
[0007] S1, pre-process the historical load data and digitally fuzzy process the temperature using a membership function, then normalize all input data, including load data, temperature, day type and weather, and input them together into a neural network;
[0008] S2, use the load data processed in step S1 as the training sample of a spiking neural network (SNN), pre-train to initially construct a deep neural network prediction model, and complete the weight initialization of each layer of neurons in the deep neural network;
[0009] S3, after pre-training, use PSO to fine-tune the weight parameters between each layer of the fuzzy deep neural network initialized in step S2, establish a fuzzy deep neural network prediction model, input the prediction data into the fuzzy deep neural network prediction model to obtain the predicted load.
[0010] Further, step S1 pre-processes the historical load data and digitally fuzzy processes the temperature using a membership function, then normalizes all input data, including load data, temperature, day type and weather, and inputs them together into a neural network, specifically as follows:
[0011] S11, pre-process the historical load data, including filling of missing data, detection of repeated data and detection of abnormal data, specifically as follows:
[0012] (1) Filling of missing data: missing data can be filled according to the principle of same date type, and the data filling rule is as follows:
[0013] x(d,t)=ω1x(d,t1)+ω2x(d,t2)+ω3x(d1,t)+ω4x(d2,t)
[0014] Where x(d,t) is the charging load at time t on day d; x(d,t1) and x(d,t2) represent the charging load before and after time t on day d, respectively; x(d1,t) and x(d2,t) represent the charging load before day d, closest to day d, and with the same date type as day d, and after day d, closest to day d, and with the same date type as day d, respectively; ω k (k=1,2,3,4) is the weighting coefficient, which can be adjusted according to the actual load conditions;
[0015] (2) Detection of duplicate data: Adaptive nearest neighbor sorting algorithm is used to determine whether the data is duplicate data:
[0016] First, adaptive record clusters are divided, the data recording time is used as the key attribute for duplicate data detection, and the time interval of data recording is used as the similarity distance of events. The distance function is:
[0017] d(R i ,R j )=|T i -T j |
[0018] Where R i and R j are the i-th and j-th record data respectively; T i and T j are the time of the i-th and j-th record data respectively. If the similarity distance between the two data is less than the distance threshold φ, the two data are divided into the same cluster;
[0019] Then, duplicate data within the cluster is fused and the following formula is used to determine whether the data is a duplicate record:
[0020]
[0021] Where, F i and F j Represents event R i and event R j Data type; W i and W j Represents the recording event R i and event R j Monitoring device; 0 represents event R i and event R j Data that is not a duplicate record, 1 represents event R i and event R j It is the data recorded repeatedly;
[0022] (3) Abnormal data detection;
[0023] The K-means clustering method is used to distinguish abnormal data and effective data. In the first step, the clustering centers are initialized, two clustering centers c={c1, c2} are set, and the two clustering centers are respectively set as the known abnormal data and a known effective data in the Euclidean space. Each clustering center c is set as the set of data points in the clustering center c j The set where the clustering center c j is located is denoted as G
[0024]
[0025] In the formula, x i represents the clustering data; x j represents the clustering center; d(x i , x j ) represents the Euclidean distance from the clustering data to the clustering center; and n is the number of characteristics of the clustering data.
[0026] In the third step, the clustering center is updated. The clustering center is updated according to all data points contained in each clustering set, so that the geometric mean distance of each data point to the new clustering center is minimized. The formula is as follows:
[0027]
[0028] In the fourth step, when a data is input, the second step to the fourth step are repeated until the clustering of the last data is completed, the loop is exited, and the K-means clustering is completed.
[0029] S12: The historical load data is preprocessed and standardized.
[0030] The min-max standardization is a linear transformation of the original data according to the relative position principle of the maximum value and the minimum value of the data index, so that the final output result falls within [0, 1]. The conversion formula is as follows:
[0031]
[0032] In the formula, X i (i=1, 2, …, n) is the i th sample in the data set, and n is the total number of samples in the data set; X min , X max , and X k (k=1, 2, …, n) are the minimum value and the maximum value in the sample data, respectively; and X k (k=1, 2, …, n) is the value after standardization. After min-max standardization, all data becomes dimensionless data within [0, 1].
[0033] S13: The external factors are digitized and fuzzily processed by using the membership function, and then are taken as input data into the neural network. During the processing, the temperature interval is divided into three temperature subspaces, and each space is slightly overlapped to correspond to the corresponding membership function; the three subspaces are divided into a low temperature section of 0-10℃, a medium temperature section of 5-25℃, and a high temperature section of 20-40℃, and the three temperature sections all use triangular membership functions;
[0034] The predicted daily maximum temperature T h is taken into the membership function formula to calculate the three membership degrees of the maximum temperature relative to the low temperature section, the medium temperature section, and the high temperature section, respectively; the predicted daily minimum temperature T d and the average temperature T a are also taken into the formula to calculate the membership degrees of the minimum temperature and the average temperature relative to the low temperature section, the medium temperature section, and the high temperature section, respectively, and the nine temperature data formed after the fuzzification by the membership function are all between 0 and 1;
[0035] S14: Daily type data processing: 1 for Monday to Friday, and 0.5 for Saturday and Sunday;
[0036] S15: Weather factor processing: the precipitation probability of the prediction day is obtained by consulting meteorological data, the precipitation probability finely represents the weather condition of the prediction day, can reflect the sunny and rainy weather of the day, and the weather condition data represented by the precipitation probability are all within (0, 1);
[0037] The input quantities of historical load data, temperature, daily type, and weather factor are normalized to [0, 1] by the above processing, which is convenient for inputting the network for prediction.
[0038] Further, step S2 takes the load data processed by step S1 as the training sample of the spiking neural network SNN, pre-trains to preliminarily construct the deep neural network prediction model, and completes the weight initialization of each layer of neurons of the deep neural network, which is as follows:
[0039] The deep neural network model framework is constructed, and the transmission parameters of the data include: time step, learning rate, input dimension, output dimension, batch size, batch number, number of hidden layer neurons, number of deep neurons, and number of deep neural network layers. The data is divided into several batches before entering the neural network, and each batch is segmented by time step. The data first enters the input layer, then passes through the hidden layer, and then passes through several deep layers for time series prediction, and finally outputs the data through the hidden layer and the output layer;
[0040] The information connection mechanism between SNN neurons is fused into the hidden layers of deep neural network, the connection activation model of neurons is I&F model, SNN uses pulse firing time for coding, the external information is coded into pulse trigger time by pulse neurons, the trigger time is taken as input, and the I&F neuron equivalent circuit is described by the following equation:
[0041]
[0042] In the formula, u(t) is the membrane potential of the neuron, c s is the membrane capacitance of the neuron, g L is the leakage conductance of the neuron, E L is the reverse potential, and I(t) is the input current of the neuron.
[0043] When the membrane potential u(t) of the postsynaptic neuron is accumulated to the threshold voltage u th according to the above formula, a pulse is generated, and the time t a of the pulse is taken as the output of the neuron, after the neuron emits a pulse, the membrane potential is reset to the reset voltage u res immediately, and the refractory period t ref is maintained, during which period, even if there is a strong signal input, the neuron will not accumulate the membrane potential, and after the refractory period, the neuron accumulates the membrane potential again.
[0044] The deep neural network prediction model has a three-layer structure: an input layer, a hidden layer and an output layer, and the contribution of the input neuron e to the kth unweighted synapse of the output neuron f is obtained by the following formula:
[0045]
[0046] In the formula, d k is the delay of the kth synapse between two neurons, is the weight of the kth synapse;
[0047] The corresponding pulse response function expression is:
[0048]
[0049] In the formula, τ is the corresponding membrane potential delay time constant;
[0050] The comprehensive contribution of the input neuron e to the output neuron f is:
[0051]
[0052] At time t f , the membrane potential u f(t) reaches its threshold, t f is the output of the neuron, and w k (t) is:
[0053]
[0054] where s target (t) denotes the target spike train, s out (t) denotes the actual output spike train, denotes the synaptic input spike, W(s) defines the prominent plasticity determined by the spike-time correlation, and a denotes a non-Hebbian term, W(s) denotes the use of STDP when a takes a positive value, and W(s) denotes the use of anti-STDP when a takes a negative value;
[0055] According to the training process, the synaptic connection weight of the presynaptic and postsynaptic pulse neurons of the STDP is updated, a first group of load data is received as input for training, the updated weight is output, and the weight is used as the starting value of the target weight of the next round of training, then a second group of load data is received as input for training, the weight is updated again, and the subsequent training process is the same as above, so that the weight of each neuron of the deep neural network is initialized, and the PSO algorithm is used to fine-tune the weight.
[0056] Further, after pre-training, the PSO is used to fine-tune the weight parameters between the layers of the initialized fuzzy deep neural network in S2, and after pre-training and fine-tuning, the fuzzy deep neural network prediction model is established, and then the prediction data is input to obtain the predicted load, and the specific process is as follows:
[0057] The entire deep neural network framework is fine-tuned, and the target error formula and training are used for adjustment, and the target error formula is as follows:
[0058]
[0059] where y is the real data, and y' is the predicted data;
[0060] The weight between the layers of the initialized deep SNN model is used as the position information of the particle, the speed and position of the particle are updated in the algorithm optimization process, so as to search for the optimal solution in the global, and improve the training efficiency of the deep neural network;
[0061] The iteration formula of the search speed and position of the particle is:
[0062] v id (k+1)=wv id (k)+c1r1(Pbest id (k)-xid (k))+c2r2(Gbest d (k)-x id (k))
[0063] x id (k+1)=x id (k)+v id (k+1)
[0064] wherein, v id (k) and x id (k) represent the speed and position of the i-th particle in the d-th dimension in the k-th iteration respectively; w represents the inertia coefficient; c1 and c2 represent the acceleration constant; r1 and r2 represent random numbers between 0 and 1; Pbest id (k) represents the position in the d-th dimension in the historical optimal position of the i-th particle; Gbest d (k) represents the position in the d-th dimension in the historical optimal position of the group; w adopts a dynamic inertia coefficient, which decreases from 0.9 to 0.4 with the increase of the iteration number;
[0065] After fine adjustment of the entire deep neural network framework, the fuzzy deep neural network model is established, and the predicted load can be obtained by inputting the prediction data.
[0066] A charging load prediction device for electric vehicles based on a fuzzy deep neural network, comprising:
[0067] A data processing module is configured to preprocess historical load data, perform digital fuzzy processing on temperature using a membership function, and then perform normalization processing on all input data, wherein the input data includes load data, temperature, day type, and weather condition, and then input all the data into a neural network;
[0068] A model training and construction module is configured to use the load data processed by the data processing module as a training sample of a spiking neural network (SNN), pre-train a deep neural network prediction model, and initialize the weight of each neuron in the deep neural network.
[0069] A load prediction module is configured to fine-tune the weight parameters between the layers of the initialized fuzzy deep neural network using PSO after pre-training by the model training and construction module, establish a fuzzy deep neural network prediction model, and input prediction data into the fuzzy deep neural network prediction model to obtain a predicted load.
[0070] Furthermore, the data processing module pre-processes the historical load data and performs digital fuzzy processing on the temperature using a membership function, and then normalizes all input data, including load data, temperature, day type and weather conditions, and then inputs them together into the neural network, specifically including:
[0071] S11: Perform data preprocessing on historical load data, including filling missing data, detecting duplicate data, and detecting abnormal data, as follows:
[0072] (1) Filling in missing data: Missing data can be filled in according to the principle of the same date type. The data filling rules are as follows:
[0073] x(d,t)=ω1x(d,t1)+ω2x(d,t2)+ω3x(d1,t)+ω4x(d2,t)
[0074] Where x(d,t) is the charging load at time t on day d; x(d,t1) and x(d,t2) represent the charging load before and after time t on day d, respectively; x(d1,t) and x(d2,t) represent the charging load before day d, closest to day d, and with the same date type as day d, and after day d, closest to day d, and with the same date type as day d, respectively; ω k (k=1,2,3,4) is the weighting coefficient, which can be adjusted according to the actual load conditions;
[0075] (2) Detection of duplicate data: Adaptive nearest neighbor sorting algorithm is used to determine whether the data is duplicate data:
[0076] First, adaptive record clusters are divided, the data recording time is used as the key attribute for duplicate data detection, and the time interval of data recording is used as the similarity distance of events. The distance function is:
[0077] d(R i ,R j )=|T i -T j |
[0078] Where R i and R j are the i-th and j-th record data respectively; T i and T j are the time of the i-th and j-th record data respectively. If the similarity distance between the two data is less than the distance threshold φ, the two data are divided into the same cluster;
[0079] Then, duplicate data within the cluster is fused and the following formula is used to determine whether the data is a duplicate record:
[0080]
[0081] In the formula, F i and F j respectively represent the data type of event R i and event R j ; W i and W j respectively represent the monitoring device recording event R i and event R j ; 0 represents that event R i and event R j is not repeated recording data, and 1 represents that event R i and event R j is repeated recording data.
[0082] (3) Abnormal data detection;
[0083] The K-means clustering method is used to distinguish abnormal data and valid data. The first step is to initialize the clustering center. Two clustering centers c={c1, c2} are set. The two clustering centers are respectively set as a known abnormal data and a known valid data in the Euclidean space. Each clustering center c j is recorded as G j ; the second step is to put all the data to be clustered into the clustering set, and the Euclidean distance from the data to be clustered to the clustering center is calculated. The calculation formula is as follows:
[0084]
[0085] In the formula, x i represents the data to be clustered; x j represents the clustering center; d(x i , x j ) represents the Euclidean distance from the data to be clustered to the clustering center; and n is the number of characteristics of the clustering data.
[0086] The third step is to update the clustering center. The clustering center is updated according to all the data points contained in each clustering set, so that the geometric mean distance of each data point to the new clustering center is minimized. The formula is as follows:
[0087]
[0088] The fourth step is to repeat the second step to the fourth step whenever a data is input, until the clustering of the last data is completed, the loop is exited, and the K-means clustering is completed.
[0089] S12: Preprocessing and standardization processing are performed on the historical load data.
[0090] The min-max standardization is a linear transformation of the original data according to the relative position principle of the maximum and minimum values in the data index, so that the final output result falls between [0, 1], and the conversion formula is:
[0091]
[0092] In the formula, X i (i = 1, 2, …, n) is the i-th sample in the data set, and n is the total number of samples in the data set; X min , X max respectively represent the minimum and maximum values in the sample data; X k (k = 1, 2, …, n) is the value after standardization; after min-max standardization, all data becomes dimensionless data between [0, 1];
[0093] S13: After the membership function is used to digitally fuzzy process the external factors, the processed data is taken as input data and brought into the neural network; during processing, the temperature interval is divided into three temperature subspaces, which correspond to the corresponding membership functions under the condition of ensuring some overlap in each space; the three subspaces are divided into a low temperature segment of 0℃-10℃, a medium temperature segment of 5℃-25℃, and a high temperature segment of 20℃-40℃, and a triangular membership function is selected for each temperature segment;
[0094] The predicted daily maximum temperature T h is brought into the membership function formula to calculate the three membership degrees of the maximum temperature relative to the low temperature segment, the medium temperature segment, and the high temperature segment; the predicted daily minimum temperature T d and the average temperature T a are also brought into the formula to calculate the membership degrees of the minimum temperature and the average temperature relative to the low temperature segment, the medium temperature segment, and the high temperature segment; the nine temperature data formed after the membership function fuzzy processing are all between [0, 1];
[0095] S14: Daily type data processing: 1 for Monday to Friday, i.e. weekdays, and 0.5 for Saturday and Sunday, i.e. weekends;
[0096] S15: Weather factor processing: the precipitation probability of the prediction day is obtained by consulting meteorological data, which finely represents the weather condition of the prediction day, can reflect the sunny and rainy weather of the day, and the weather condition data represented by the precipitation probability are all within (0, 1);
[0097] Through the above processing, the input quantities of historical load data, temperature, daily type, and weather factor are normalized to [0, 1], which is convenient for inputting the network for prediction.
[0098] Furthermore, the model training and construction module uses the load data processed by the data processing module as training samples for the spiking neural network (SNN) to perform pre-training to initially construct a deep neural network prediction model and complete the weight initialization of each layer of neurons in the deep neural network, specifically including:
[0099] Build a deep neural network model framework. The data transmission parameters include: time step, learning rate, input dimension, output dimension, batch size, number of batches, number of hidden layer neurons, number of deep neurons, and number of deep neural network layers. The data is divided into several batches before entering the neural network. Each batch is then split into time steps. The data first enters the input layer, then passes through the hidden layer, and then passes through several deep layers for time series prediction. Finally, the data is output through the hidden layer and output layer.
[0100] The information connectivity mechanism between neurons in the SNN neural network is integrated into the hidden layers of the deep neural network. The connection activation model of neurons is the I&F model. SNN uses pulse emission time for encoding. Spiking neurons encode external information into pulse triggering time, with the triggering time as input. The equivalent circuit of the I&F neuron is described by the following equation:
[0101]
[0102] Where u(t) is the membrane potential of the neuron, c s is the membrane capacitance of the neuron, g L is the neuron's leak conductance, E L is the reverse potential, I(t) is the input current of the neuron;
[0103] When the membrane potential u(t) of the postsynaptic neuron is added to the threshold voltage u according to the above formula th When it is excited, a pulse will be generated, and the time when the pulse appears is t a As the output of the neuron, after the neuron sends a pulse, the membrane potential is immediately reset to the reset voltage u res , and lasts for a duration of t ref During the refractory period, even if there is a strong signal input, the neuron no longer accumulates membrane potential. After the refractory period, the neuron accumulates membrane potential again.
[0104] The deep neural network prediction model has a three-layer structure: input layer, hidden layer, and output layer. The unweighted contribution of input neuron e to the k-th synapse of output neuron f is obtained by the following formula:
[0105]
[0106] Where, d kis the delay of the kth synapse between two neurons, is the weight of the kth synapse,
[0107] The corresponding impulse response function is:
[0108]
[0109] where τ is the corresponding membrane potential delay time constant,
[0110] The total contribution of input neuron e to output neuron f is:
[0111]
[0112] At time t f , the membrane potential u f (t) of output neuron f reaches its threshold, t f , i.e. the output of this neuron, and the weight update size w k (t) for synapse k at time t is:
[0113]
[0114] where s target (t) represents the target pulse sequence, s out (t) represents the actual output pulse sequence, represents the synaptic input pulse, W(s) defines the prominent plasticity determined by the pulse time correlation, and a represents a non-Hebbian term, wherein W(s) represents the use of STDP when a takes a positive value, and W(s) represents the use of anti-STDP when a takes a negative value.
[0115] According to the training process, the pulse firing of the pre-synaptic and post-synaptic neurons of the STDP synapse is updated, the first group of load data is received as input for training, the updated weight is output, and the weight is used as the starting value of the next round of training target weight, then the second group of load data is received as input for training, and the weight is updated again, and the subsequent training process is the same as above, so that the weight of each neuron of the deep neural network is initialized, and the PSO algorithm is used to fine-tune the weight.
[0116] Further, the load prediction module uses PSO to fine-tune the weight parameters between the initialized fuzzy deep neural network after the model training and the pre-training of the model building module, establishes a fuzzy deep neural network prediction model, inputs prediction data into the fuzzy deep neural network prediction model to obtain predicted load, and specifically includes:
[0117] The entire deep neural network framework is finely adjusted according to a target error formula and training, and the target error formula is as follows:
[0118]
[0119] Wherein y is real data, and y' is predicted data;
[0120] The weight value between each layer of the initialized deep SNN model is taken as the position information of the particle, the speed and position of the particle are continuously updated in the algorithm optimization process, so as to search for the optimal solution in the global and improve the training efficiency of the deep neural network;
[0121] The iteration formula of the search speed and position of the particle is as follows:
[0122] v id (k+1) = wv id (k) + c1r1(Pbest id (k) - x id (k)) + c2r2(Gbest d (k) - x id (k))
[0123] x id (k+1) = x id (k) + v id (k+1)
[0124] Wherein v id (k) and x id (k) represent the speed and position of the i-th particle in the d-th dimension in the k-th iteration; w represents an inertia coefficient; c1 and c2 represent acceleration constants; r1 and r2 represent random numbers between 0 and 1; Pbest id (k) represents the position of the i-th particle in the d-th dimension in the historical optimal position; Gbest d (k) represents the position of the d-th dimension in the historical optimal position of the group; w adopts a dynamic inertia coefficient, which decreases from 0.9 to 0.4 with the increase of the iteration number;
[0125] After the entire deep neural network framework is finely adjusted, a fuzzy deep neural network model is established, and the predicted load can be obtained by inputting the predicted data.
[0126] A kind of electric vehicle charging load prediction system based on fuzzy deep neural network, comprising: computer readable storage medium and processor;
[0127] The computer readable storage medium is used to store executable instructions;
[0128] The processor is used for reading the executable instructions stored in the computer readable storage medium, and executing the electric vehicle charging load prediction method based on the fuzzy deep neural network.
[0129] A non-transitory computer readable storage medium, having stored thereon a computer program, which is executed by a processor to implement the electric vehicle charging load prediction method based on the fuzzy deep neural network.
[0130] The present application predicts the charging load of electric vehicles based on a fuzzy deep neural network, considers various load prediction factors, makes it more close to the actual situation, and can provide a technical basis for future deeper load prediction. BRIEF DESCRIPTION OF DRAWINGS
[0131] Figure 1 It is the prediction model flowchart based on the fuzzy depth of the present application;
[0132] Figure 2 It is the flowchart of the fuzzy logic system of the present application;
[0133] Figure 3 It is the temperature membership function curve of the present application;
[0134] Figure 4 It is the equivalent circuit of I&F neuron of the present application;
[0135] Figure 5 It is the typical SNN prediction model of the present application;
[0136] Figure 6 It is the schematic diagram of the synapse between two pulse neurons of the present application. DETAILED DESCRIPTION
[0137] In order to make the purpose, technical scheme and advantages of the embodiments of the present application more clear, the technical scheme in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor are within the scope of protection of the present application.
[0138] Reference Figure 1The embodiment of the application provides a charging load prediction method for an electric vehicle based on a fuzzy deep neural network. First, data is preprocessed and standardized before training a prediction model, and a membership function is used to digitally and fuzzily process temperature before the temperature and load data are taken as input data and brought into a neural network. Then, the processed load data are taken as training samples of a spiking neural network (SNN), and a deep neural network prediction model is preliminarily constructed on the basis of the training samples, and the weight initialization of each neuron of the deep neural network is completed. Finally, the PSO is used to finely adjust the weight threshold parameters between the initialized fuzzy deep neural network layers, the fuzzy deep neural network prediction model is established after pretraining and fine adjustment, and the predicted load can be obtained by inputting prediction data. The method specifically comprises the following steps:
[0139] (S1), the historical load data are preprocessed, and the temperature is digitally and fuzzily processed by using a membership function, and then all the input data are normalized, the input data including load data, temperature, day type and weather condition, and then the input data are input into a neural network together;
[0140] Step 1: The historical load data are preprocessed, including filling of missing data, detection of repeated data and detection of abnormal data, and the specific steps are as follows:
[0141] (1) Filling of missing data: missing data can be filled according to the same date type principle, and the data filling rule is as follows:
[0142] x(d,t)=ω1x(d,t1)+ω2x(d,t2)+ω3x(d1,t)+ω4x(d2,t)
[0143] In the formula, x(d,t) is the charging load at t time of the dth day, x(d,t1) and x(d,t2) respectively represent the charging load at the time before and after t time of the dth day, x(d1,t) and x(d2,t) respectively represent the charging load closest to the dth day and having the same date type as the dth day before the dth day and after the dth day, and ω k (k=1,2,3,4) is a weighting coefficient, which can be adjusted according to the actual load condition;
[0144] (2) Detection of repeated data: an adaptive near neighbor sorting algorithm is used to determine whether the data is repeated data:
[0145] First, adaptive record clusters are divided, the data record time is taken as a key attribute for repeated data detection, and the time interval of the data record is taken as the similarity distance of the event, and the distance function is:
[0146] d(Ri ,R j )=|T i -T j |
[0147] where R i and R j are the ith and jth record data respectively; T i and T j are the time of the ith and jth record data respectively. If the similarity distance between the two data is less than the distance threshold φ, then the two data are clustered into the same cluster;
[0148] Then the repeated data in the cluster are fused. In the same time period, different types or different spatial data can also be generated, which are not repeated record data, so they should be distinguished. The specific judgment function is:
[0149]
[0150] where F i and F j represent the data type of event R i and event R j respectively; W i and W j represent the monitoring device of record event R i and event R j respectively; 0 represents that event R i and event R j are not repeated record data, and 1 represents that event R i and event R j are repeated record data;
[0151] (3) Abnormal data detection
[0152] The K-means clustering method is used to distinguish abnormal data and valid data. The first step is to initialize the cluster center, and set two cluster centers c = {c1, c2}. The two cluster centers can be set as the known abnormal data and a known valid data in the Euclidean space. The set where each cluster center c j is located is recorded as G j . The second step is to put all the data to be clustered into the cluster set, and calculate the Euclidean distance from the data to be clustered to the cluster center. The calculation formula is:
[0153]
[0154] where x i represents the data to be clustered; x j represents the cluster center; d(x i ,x j) represents the Euclidean distance of the data to be clustered to the cluster center; n is the number of features of the cluster data;
[0155] The third step is to update the cluster center. The cluster center is updated according to all data points contained in each cluster set so that the geometric mean distance of each data point to the new cluster center is minimum, and the formula is:
[0156]
[0157] The fourth step is to repeat the second step to the fourth step whenever a data is inputted until the clustering of the last data is completed, the loop is exited, and the k-means clustering is completed;
[0158] Step 2: Preprocessing and standardization processing of historical load data;
[0159] The min-max standardization is linear transformation of the original data according to the relative position principle of the maximum value and the minimum value of the data index, so that the final output result falls in [0, 1], and the conversion formula is:
[0160]
[0161] In the formula, X i (i=1, 2,..., n) is the ith sample in the data set, and n is the total number of samples in the data set; X min , X max respectively represent the minimum value and the maximum value in the sample data; X k (k=1, 2,..., n) is the value after standardization processing; after min-max standardization, all data becomes dimensionless data between [0, 1];
[0162] Step 3: After the external factors are digitally and fuzzily processed by using the membership function, the processed data are taken as input and brought into the neural network, as shown in the formula: Figure 2 The flow chart of the fuzzy logic system of the application is shown in the formula, and when processing, the temperature interval is divided into three temperature subspaces, and each space is slightly overlapped to correspond to the corresponding membership function. In this paper, the three subspaces are divided into a low temperature section of 0-10℃, a medium temperature section of 5-25℃, and a high temperature section of 20-40℃. For convenience, triangular membership functions are selected for the three temperature sections;
[0163] For the low temperature section of 0-10℃, a small triangular distribution is adopted:
[0164]
[0165] For the medium temperature section of 5-25℃, a middle triangular distribution is adopted:
[0166]
[0167] For the high temperature section of 20℃-40℃, a larger triangular distribution is adopted:
[0168]
[0169] The predicted daily maximum temperature T h is brought into the above three formulas respectively to obtain the three membership degrees of the maximum temperature with respect to the low temperature section, the medium temperature section and the high temperature section. Similarly, the predicted daily minimum temperature T d and the average temperature T a are also brought into the formulas to obtain the membership degrees of the minimum temperature and the average temperature with respect to the low temperature section, the medium temperature section and the high temperature section. As shown in FIG. 1, the temperature membership function curve of the application is shown, so that the nine temperature data formed after the membership function fuzzification are all within [0, 1]; Figure 3
[0170] Step 4: Daily type data processing: 1 for Monday to Friday, i.e. weekdays, and 0.5 for Saturday and Sunday, i.e. weekends.
[0171] Step 5: Weather factor processing: The precipitation probability of the predicted day can be obtained by consulting meteorological data, which can accurately represent the weather condition of the predicted day, reflecting the sunny and rainy weather of the day, and the weather condition data represented by the precipitation probability are all within (0, 1);
[0172] In this way, the input quantities such as historical load data, temperature, daily type and rainfall probability are normalized to [0, 1], which is convenient for inputting the network for prediction.
[0173] (S2), the load data processed in step S1 is taken as a training sample of a spiking neural network (SNN) to pre-train and initially construct a deep neural network prediction model, and the weight initialization of each layer of neurons of the deep neural network is completed;
[0174] The framework of the deep neural network model is constructed. First, the transmission parameters of the data are explained, including: time step; learning rate; input dimension, output dimension; batch size, batch number; number of hidden layer neurons, number of deep neurons, number of deep neural network layers. The data is divided into several batches before entering the neural network, and each batch is segmented by time step. The data first enters the input layer, then passes through the hidden layer, and then passes through several deep layers for time series prediction, and finally passes through the hidden layer and the output layer to output the data.
[0175] The information connection mechanism between SNN neurons is fused between the hidden layers of the deep neural network, the connection activation model of the neurons is I&F model, the SNN uses pulse firing time for coding, the pulse neurons encode the external information into pulse trigger time, and the trigger time is used as the input. The equivalent circuit diagram of the I&F neuron is shown in Figure 4 , which can be described by the following equation:
[0176]
[0177] In the formula, u(t) is the membrane potential of the neuron, c s is the membrane capacitance of the neuron, g L is the leakage conductance of the neuron, E L is the reverse potential, and I(t) is the input current of the neuron.
[0178] When the membrane potential u(t) of the post-synaptic neuron is accumulated to the threshold voltage u th according to the above formula, it will be excited to generate a pulse, and the time t a of the pulse is taken as the output of the neuron. After the neuron emits a pulse, the membrane potential is immediately reset to the reset voltage u res , and lasts for a refractory period t ref . During the refractory period, the neuron will not accumulate the membrane potential even if there is a strong signal input. After the refractory period, the neuron accumulates the membrane potential again;
[0179] Figure 5 The SNN prediction model is a typical SNN prediction model, and the SNN prediction model has a three-layer structure of p x q x n, where p represents the number of input layer nodes of the pulse neural network, q represents the number of hidden layer nodes, and n represents the number of output layer nodes. t i (i = 1, 2,..., p) is the input pulse of the network, t h (h = 1, 2,..., q) is the output sequence of the hidden layer, and t j (j = 1, 2,..., n) is the output sequence of the network;
[0180] Compared with the traditional neural network, there are more synaptic connections between the neurons between any two layers of the SNN, as shown in Figure 6 , m is the number of synapses between two neurons e and f, d k is the delay of the kth synapse between the two neurons, is the weight of the kth synapse, is the unweighted contribution of the input neuron e to the kth synapse of the output neuron f, which is obtained by the following formula:
[0181]
[0182] where ε(t) is the corresponding impulse response function, which is expressed as:
[0183]
[0184] where τ is the corresponding membrane potential time constant.
[0185] Therefore, the total contribution of the input neuron e to the output neuron f is
[0186]
[0187] At the time t f , the membrane potential u f (t) of the output neuron f reaches its threshold, t f , which is the output of the neuron. The weight update size w k (t) of the synapse k at the time t is:
[0188]
[0189] where s target (t) represents the target pulse sequence, s out (t) represents the actual output pulse sequence, represents the synaptic input pulse, W(s) defines the synaptic plasticity determined by the pulse time correlation, and a represents a non-Hebbian term. When a takes a positive value, W(s) represents the use of STDP, and when a takes a negative value, W(s) represents the use of anti-STDP.
[0190] According to the training process, the pulse firing of the pre- and post-synaptic neurons of the STDP synapse is updated, the first set of load data is received as input for training, the updated weight is output, and the weight is used as the starting value of the target weight of the next round of training. Subsequently, the second set of load data is received as input for training, and the weight is updated again. The subsequent training process is the same as above. The weights of each layer of neurons of the deep neural network are initialized, and the PSO algorithm is used to fine-tune the weights.
[0191] (S3), after pre-training, the PSO is used to fine-tune the weight parameters between the layers of the fuzzy deep neural network initialized in step S2, a fuzzy deep neural network prediction model is established, and the predicted load is obtained by inputting the prediction data into the fuzzy deep neural network prediction model.
[0192] The entire deep neural network framework is fine-tuned, and the target error formula and training are adjusted. The target error formula is as follows:
[0193]
[0194] Wherein, y is real data, y' is predicted data.
[0195] The weight between the initialized deep SNN layers is taken as the position information of the particle, the velocity and position of the particle are updated in the algorithm optimization process, so that the optimal solution is searched in the global, and the training efficiency of the deep neural network is improved.
[0196] The iteration formula of the search speed and position of the particle is:
[0197] v id (k+1) = wv id (k) + c1r1 (Pbest id (k) - x id (k)) + c2r2 (Gbest d (k) - x id (k))
[0198] x id (k+1) = x id (k) + v id (k+1)
[0199] Wherein, v id (k) and x id (k) represent the speed and position of the i-th particle in the d-dimensional iteration at the k-th time; w represents the inertia coefficient; c1, c2 represent the acceleration constant; r1, r2 represent random numbers between 0 and 1; Pbest id (k) represents the position of the d-dimensional historical optimal position of the i-th particle; Gbest d (k) represents the position of the d-dimensional historical optimal position of the group; w adopts a dynamic inertia coefficient, which decreases from 0.9 to 0.4 with the increase of iteration number;
[0200] After the fine adjustment of the whole deep neural network framework, the fuzzy deep neural network model is established, and the predicted load can be obtained by inputting the prediction data.
[0201] Another aspect of the present application provides a fuzzy deep neural network-based electric vehicle charging load prediction device, comprising:
[0202] The data processing module is used for pre-processing historical load data, and carrying out digital fuzzy processing on temperature by using membership function, and then carrying out normalization processing on all input data, the input data includes load data, temperature, day type and weather condition, and then the input data is input into the neural network together;
[0203] The model training and construction module is configured to use the load data processed by the data processing module as training samples of a spiking neural network (SNN), pre-train a deep neural network prediction model, and initialize the weight of each neuron in the deep neural network.
[0204] The load prediction module is configured to fine-tune the weight parameters between the layers of the initialized fuzzy deep neural network using PSO after the pre-training of the model training and construction module, establish a fuzzy deep neural network prediction model, and input the prediction data into the fuzzy deep neural network prediction model to obtain the predicted load.
[0205] In another aspect, the application provides a fuzzy deep neural network-based electric vehicle charging load prediction system, comprising a computer readable storage medium and a processor.
[0206] The computer readable storage medium is configured to store executable instructions.
[0207] The processor is configured to read the executable instructions stored in the computer readable storage medium and execute the fuzzy deep neural network-based electric vehicle charging load prediction method of the first aspect.
[0208] In another aspect, the application provides a non-transitory computer readable storage medium having a computer program stored thereon, wherein the computer program is executed by a processor to implement the fuzzy deep neural network-based electric vehicle charging load prediction method of the first aspect.
[0209] Those skilled in the art should understand that the embodiments of the application can be provided as a method, a system, or a computer program product. Therefore, the application can be in the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware aspects. Moreover, the application can be in the form of a computer program product implemented on one or more computer usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer usable program code.
[0210] The application is described with reference to flowcharts and / or block diagrams according to the methods, devices (systems), and computer program products of the embodiments of the application. It should be understood that each flow and / or block in the flowcharts and / or block diagrams, and the combination of the flows and / or blocks in the flowcharts and / or block diagrams can be implemented by computer program instructions. These computer program instructions can be provided to a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing devices to produce a machine, so that the instructions executed by the computer or other programmable data processing devices produce a device that implements the functions described in the flowcharts and / or block diagrams. Figure 1 one flow or multiple flows and / or blocks Figure 1means for performing the function specified by the block or blocks.
[0211] These computer program instructions can also be stored in a computer readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer readable memory produce an article of manufacture including instructions which implement the flow Figure 1 one or more flows and / or blocks Figure 1 means for performing the function specified by the block or blocks.
[0212] These computer program instructions can also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the flow Figure 1 one or more flows and / or blocks Figure 1 means for performing the function specified by the block or blocks.
[0213] Finally, it should be noted that the above-mentioned embodiments are merely intended to illustrate the technical solutions of the present application, rather than limit the same. Although the present application has been described in detail with reference to the above-mentioned embodiments, those skilled in the art should understand that the specific embodiments of the present application can be modified or replaced equivalently without departing from the spirit and scope of the present application, and any modification or replacement without departing from the spirit and scope of the present application should be covered within the protection scope of the claims of the present application.
Claims
1. A method for predicting electric vehicle charging load based on fuzzy deep neural network, characterized in that: The steps include: S1, pre-processing the historical load data and digitally fuzzifying the temperature using a membership function, and then normalizing all input data, including load data, temperature, day type, and weather conditions, and then inputting them together into the neural network; S2, using the load data processed in step S1 as a training sample for a spiking neural network (SNN), pre-training to initially construct a deep neural network prediction model and completing weight initialization of neurons in each layer of the deep neural network; S3, after pre-training, uses PSO to fine-tune the weight parameters between each layer of the fuzzy deep neural network initialized in step S2, establishes a fuzzy deep neural network prediction model, and inputs the prediction data into the fuzzy deep neural network prediction model to obtain the predicted load; After pre-training, PSO is used to accurately calculate the weight parameters between each layer of the fuzzy deep neural network initialized in S2. After fine-tuning, pre-training, and fine-tuning, the fuzzy deep neural network prediction model has been established. By inputting the prediction data, the predicted load can be obtained, as follows: Fine-tune the entire deep neural network architecture and adjust it according to the target error formula and training. The target error formula is as follows: ; Among them, y is the real data, y' is the predicted data; The weights between each layer of the initialized deep SNN model are used as the position information of the particles. The speed and position of the particles are continuously updated during the algorithm optimization process, thereby searching for the optimal solution globally and improving the training efficiency of the deep neural network. The iterative formula for searching the particle speed and position is: ; in, and Respectively represent the velocity and position of the i-th particle in the d-th dimension at the k-th iteration; w represents the inertia coefficient; c1 and c2 represent acceleration constants; r1 and r2 represent random numbers between 0 and 1; Pbest id (k) represents the position of the dth dimension in the history of the best position of the i-th particle; Gbest d (k) represents the position on the dth dimension in the historical optimal position of the group; w uses the dynamic inertia coefficient, which decreases from 0.9 to 0.4 as the number of iterations increases; After fine-tuning the entire deep neural network architecture, a fuzzy deep neural network model is established, and the predicted load can be obtained by inputting the predicted data.
2. The electric vehicle charging load prediction method based on fuzzy deep neural network according to claim 1 is characterized in that: Step S1 pre-processes the historical load data and performs digital fuzzy processing on the temperature using a membership function, and then normalizes all input data. The input data includes load data, temperature, day type, and weather, and then inputs them into the neural network together, as follows: S11: Perform data preprocessing on historical load data, including filling missing data, detecting duplicate data, and detecting abnormal data, as follows: (1) Filling in missing data: Missing data can be filled in according to the principle of the same date type. The data filling rules are as follows: ; Where x(d, t) is the charging load at time t on day d; x(d, t1) and x(d, t2) represent the charging load before and after time t on day d, respectively; x(d1, t) and x(d2, t) represent the charging load before day d, closest to day d, and with the same date type as day d, and after day d, closest to day d, and with the same date type as day d, respectively; ω k (k = 1, 2, 3, 4) is the weighting coefficient, which can be adjusted according to the actual load conditions; (2) Detection of duplicate data: Adaptive nearest neighbor sorting algorithm is used to determine whether the data is duplicate data: First, adaptive record clusters are divided, the data recording time is used as the key attribute for duplicate data detection, and the time interval of data recording is used as the similarity distance of events. The distance function is: ; Where R i and R j are the i-th and j-th record data respectively; T i and T j are the time of the i-th and j-th record data respectively. If the similarity distance between the two data is less than the distance threshold ϕ, the two data are divided into the same cluster; Then, duplicate data within the cluster is fused and the following formula is used to determine whether the data is a duplicate record: ; Where, F i and F j Represents event R i and event R j Data type; W i and W j Represents the recording event R i and event R j Monitoring device; 0 represents event R i and event R j Data that is not a duplicate record, 1 represents event R i and event R j It is the data recorded repeatedly; (3) Abnormal data detection; The K-means clustering method is used to distinguish abnormal data from valid data. The first step is to initialize the cluster center and set two cluster centers. , the two cluster centers are set as the points of known abnormal data and a known valid data in the Euclidean space respectively, and each cluster center c j The set is denoted as G j ; The second step is to put all the data to be clustered into the cluster set and calculate the Euclidean distance from the data to be clustered to the cluster center. The calculation formula is: ; Where x i represents the data to be clustered; x j represents the cluster center; d(x i , x j ) represents the Euclidean distance from the data to be clustered to the cluster center; n is the number of features of the cluster data; The third step is to update the cluster center. The cluster center is updated according to all the data points contained in each cluster set so that the geometric mean distance from each data point to the new cluster center is minimized. The formula is: ; The fourth step is to repeat steps 2 to 4 every time a piece of data is input until the clustering of the last piece of data is completed, then the loop is exited and the k-means clustering is completed; S12: preprocessing and standardizing historical load data; Min-max normalization is based on the principle of the relative position of the maximum and minimum values of the data indicator in the indicator, and linearly transforms the original data so that the final output result falls between [0, 1]. The conversion formula is: ; Where, X i (i = 1, 2,…, n) is the i-th sample in the data set, n is the total number of samples in the data set; X min 、X max Respectively represent the minimum and maximum values in the sample data; X k is the value after normalization, k=1, 2,…, n; after min-max normalization, all data become dimensionless data between [0, 1]; S13: Using a membership function to perform digital fuzzy processing on external factors, the fuzzy processing is then used as input data into the neural network. During processing, the temperature range is divided into three temperature subspaces, each corresponding to a corresponding membership function while ensuring that there is some overlap between each space. The three subspaces are divided into a low temperature range of 0°C to 10°C, a medium temperature range of 5°C to 25°C, and a high temperature range of 20°C to 40°C. Triangular membership functions are used for all three temperature ranges. The maximum temperature T on the day of prediction h Substitute the membership function formula to obtain the three memberships of the highest temperature relative to the low temperature segment, the medium temperature segment, and the high temperature segment respectively; the lowest temperature T d and the average temperature T a The membership of the lowest temperature and average temperature to the low temperature segment, medium temperature segment, and high temperature segment is also calculated by using the formula. After the membership function is fuzzified, the nine temperature data are all between [0, 1]. S14: Day type data processing: Monday to Friday (i.e., working days) is set to 1, Saturday and Sunday (i.e., weekend days) is set to 0.5; S15: Processing of weather factors: Obtain the precipitation probability on the forecast day by consulting meteorological data. The precipitation probability carefully represents the weather conditions on the forecast day and can reflect whether it will be sunny or rainy. The weather condition data represented by the precipitation probability is within (0,1). Through the processing of S11-S15, the input of historical load data, temperature, day type, and weather factors are normalized to [0,1], which is convenient for input into the network for prediction.
3. The electric vehicle charging load prediction method based on fuzzy deep neural network according to claim 1 is characterized in that: Step S2 uses the load data processed in step S1 as a training sample for the spiking neural network (SNN) to pre-train and initially construct a deep neural network prediction model, completing the weight initialization of each layer of neurons in the deep neural network, as follows: Build a deep neural network model framework. The data transmission parameters include: time step, learning rate, input dimension, output dimension, batch size, number of batches, number of hidden layer neurons, number of deep neurons, and number of deep neural network layers. The data is divided into several batches before entering the neural network. Each batch is then split into time steps. The data first enters the input layer, then passes through the hidden layer, and then passes through several deep layers for time series prediction. Finally, the data is output through the hidden layer and output layer. The information connectivity mechanism between neurons in the SNN neural network is integrated into the hidden layers of the deep neural network. The connection activation model of neurons is the I&F model. SNN uses pulse emission time for encoding. Spiking neurons encode external information into pulse triggering time, with the triggering time as input. The equivalent circuit of the I&F neuron is described by the following equation: ; Where u(t) is the membrane potential of the neuron, c s is the membrane capacitance of the neuron, g L is the neuron's leak conductance, E L is the reverse potential, I(t) is the input current of the neuron; When the membrane potential u(t) of the postsynaptic neuron is added to the threshold voltage u according to the above formula th When it is excited, a pulse will be generated, and the time when the pulse appears is t a As the output of the neuron, after the neuron sends a pulse, the membrane potential is immediately reset to the reset voltage u res , and lasts for a duration of t ref During the refractory period, even if there is a strong signal input, the neuron no longer accumulates membrane potential. After the refractory period, the neuron accumulates membrane potential again. The deep neural network prediction model has a three-layer structure: input layer, hidden layer, and output layer. The unweighted contribution of input neuron e to the k-th synapse of output neuron f is obtained by the following formula: ; Where, d k is the delay of the kth synapse between two neurons, is the weight of the kth synapse; The corresponding impulse response function expression is: ; Where, τ is the corresponding membrane potential delay time constant; The combined contribution of input neuron e to output neuron f is: ; In t f At this moment, the membrane potential u of the output neuron f f (t) reaches its threshold, t f That is the output of the neuron, the weight update size of synapse k at time t for: ; in, represents the target pulse sequence, represents the actual output pulse sequence, represents the synaptic input spike, W(s) defines the saliency plasticity determined by the spike temporal correlation, a represents the non-hebbian term, when a takes a positive value, W(s) indicates the use of STDP, when a takes a negative value, W(s) indicates the use of anti-STDP; According to the pulse emission of the pulse neurons before and after the STDP synapses during the training process, the corresponding synaptic connection weights are updated, the first set of load data is received as input for training, the updated weights are output, and the weights are used as the starting values of the target weights for the next round of training, and then the second set of load data is received as input for training, and the weights are updated again. The subsequent training process is the same as above, and the weights of each layer of neurons in the deep neural network are initialized, and then the PSO algorithm is used to fine-tune the weights.
4. An electric vehicle charging load prediction device based on fuzzy deep neural network, characterized in that: include: A data processing module is used to pre-process historical load data and perform digital fuzzy processing on the temperature using a membership function before normalizing all input data, including load data, temperature, day type, and weather conditions, which are then input into the neural network. The model training and construction module is used to use the load data processed by the data processing module as training samples for the spiking neural network (SNN), perform pre-training to initially build a deep neural network prediction model, and complete the weight initialization of each layer of neurons in the deep neural network; The load forecasting module is used to fine-tune the weight parameters between each layer of the initialized fuzzy deep neural network using PSO after model training and construction module pre-training, establish a fuzzy deep neural network prediction model, and input the prediction data into the fuzzy deep neural network prediction model to obtain the predicted load; After model training and pre-training of the construction module, the load forecasting module uses PSO to fine-tune the weight parameters between the initialized fuzzy deep neural network layers, establishes a fuzzy deep neural network prediction model, and inputs the prediction data into the fuzzy deep neural network prediction model to obtain the predicted load. Specifically, it includes: Fine-tune the entire deep neural network architecture and adjust it according to the target error formula and training. The target error formula is as follows: ; Among them, y is the real data, y' is the predicted data; The weights between each layer of the initialized deep SNN model are used as the position information of the particles. The speed and position of the particles are continuously updated during the algorithm optimization process, thereby searching for the optimal solution globally and improving the training efficiency of the deep neural network. The iterative formula for searching the particle speed and position is: ; in, and Respectively represent the velocity and position of the i-th particle in the d-th dimension at the k-th iteration; w represents the inertia coefficient; c1 and c2 represent acceleration constants; r1 and r2 represent random numbers between 0 and 1; Pbest id (k) represents the position of the dth dimension in the history of the best position of the i-th particle; Gbest d (k) represents the position on the dth dimension in the historical optimal position of the group; w uses the dynamic inertia coefficient, which decreases from 0.9 to 0.4 as the number of iterations increases; After fine-tuning the entire deep neural network architecture, a fuzzy deep neural network model is established, and the predicted load can be obtained by inputting the predicted data.
5. The electric vehicle charging load prediction device based on fuzzy deep neural network according to claim 4 is characterized in that: The data processing module pre-processes the historical load data and performs digital fuzzy processing on the temperature using a membership function, and then normalizes all input data, including load data, temperature, day type, and weather conditions, and then inputs them into the neural network together, specifically including: S11: Perform data preprocessing on historical load data, including filling missing data, detecting duplicate data, and detecting abnormal data, as follows: (1) Filling in missing data: Missing data can be filled in according to the principle of the same date type. The data filling rules are as follows: ; Where x(d, t) is the charging load at time t on day d; x(d, t1) and x(d, t2) represent the charging load before and after time t on day d, respectively; x(d1, t) and x(d2, t) represent the charging load before day d, closest to day d, and with the same date type as day d, and after day d, closest to day d, and with the same date type as day d, respectively; ω k (k = 1, 2, 3, 4) is the weighting coefficient, which can be adjusted according to the actual load conditions; (2) Detection of duplicate data: Adaptive nearest neighbor sorting algorithm is used to determine whether the data is duplicate data: First, adaptive record clusters are divided, the data recording time is used as the key attribute for duplicate data detection, and the time interval of data recording is used as the similarity distance of events. The distance function is: ; Where R i and R j are the i-th and j-th record data respectively; T i and T j are the time of the i-th and j-th record data respectively. If the similarity distance between the two data is less than the distance threshold ϕ, the two data are divided into the same cluster; Then, duplicate data within the cluster is fused and the following formula is used to determine whether the data is a duplicate record: ; Where, F i and F j Represents event R i and event R j Data type; W i and W j Represents the recording event R i and event R j Monitoring device; 0 represents event R i and event R j Data that is not a duplicate record, 1 represents event R i and event R j It is the data recorded repeatedly; (3) Abnormal data detection; The K-means clustering method is used to distinguish abnormal data from valid data. The first step is to initialize the cluster center and set two cluster centers. , the two cluster centers are set as the points of known abnormal data and a known valid data in the Euclidean space respectively, and each cluster center c j The set is denoted as G j ; The second step is to put all the data to be clustered into the cluster set and calculate the Euclidean distance from the data to be clustered to the cluster center. The calculation formula is: ; Where x i represents the data to be clustered; x j represents the cluster center; d(x i , x j ) represents the Euclidean distance from the data to be clustered to the cluster center; n is the number of features of the clustered data; The third step is to update the cluster center. The cluster center is updated according to all the data points contained in each cluster set so that the geometric mean distance from each data point to the new cluster center is minimized. The formula is: ; The fourth step is to repeat steps 2 to 4 every time a piece of data is input until the clustering of the last piece of data is completed, then the loop is exited and the k-means clustering is completed; S12: pre-processing and standardizing historical load data; Min-max normalization is based on the principle of the relative position of the maximum and minimum values of the data indicator in the indicator, and linearly transforms the original data so that the final output result falls between [0, 1]. The conversion formula is: ; Where, X i (i = 1, 2,…, n) is the i-th sample in the data set, n is the total number of samples in the data set; X min 、X max Respectively represent the minimum and maximum values in the sample data; X k (k=1, 2,…, n) is the value after normalization; after min-max normalization, all data become dimensionless data between [0, 1]; S13: Using a membership function to perform digital fuzzy processing on external factors, the fuzzy processing is then used as input data into the neural network. During processing, the temperature range is divided into three temperature subspaces, each corresponding to a corresponding membership function while ensuring that there is some overlap between each space. The three subspaces are divided into a low temperature range of 0°C to 10°C, a medium temperature range of 5°C to 25°C, and a high temperature range of 20°C to 40°C. Triangular membership functions are used for all three temperature ranges. The maximum temperature T on the day of prediction h Substitute the membership function formula to obtain the three memberships of the highest temperature relative to the low temperature segment, the medium temperature segment, and the high temperature segment respectively; the lowest temperature T d and the average temperature T a The membership of the lowest temperature and average temperature to the low temperature segment, medium temperature segment, and high temperature segment is also calculated by using the formula. After the membership function is fuzzified, the nine temperature data are all between [0, 1]. S14: Day type data processing: Monday to Friday (i.e., working days) is set to 1, Saturday and Sunday (i.e., weekend days) is set to 0.5; S15: Processing of weather factors: Obtain the precipitation probability on the forecast day by consulting meteorological data. The precipitation probability carefully represents the weather conditions on the forecast day and can reflect whether it will be sunny or rainy. The weather condition data represented by the precipitation probability is within (0,1). Through the processing of S11-S15, the input of historical load data, temperature, day type, and weather factors are normalized to [0,1], which is convenient for input into the network for prediction.
6. The electric vehicle charging load prediction device based on fuzzy deep neural network according to claim 4 is characterized in that: The model training and construction module uses the load data processed by the data processing module as training samples for the spiking neural network (SNN), performs pre-training to initially construct a deep neural network prediction model, and completes the weight initialization of each layer of neurons in the deep neural network, specifically including: Build a deep neural network model framework. The data transmission parameters include: time step, learning rate, input dimension, output dimension, batch size, number of batches, number of hidden layer neurons, number of deep neurons, and number of deep neural network layers. The data is divided into several batches before entering the neural network. Each batch is then split into time steps. The data first enters the input layer, then passes through the hidden layer, and then passes through several deep layers for time series prediction. Finally, the data is output through the hidden layer and output layer. The information connectivity mechanism between neurons in the SNN neural network is integrated into the hidden layers of the deep neural network. The connection activation model of neurons is the I&F model. SNN uses pulse emission time for encoding. Spiking neurons encode external information into pulse triggering time, with the triggering time as input. The equivalent circuit of the I&F neuron is described by the following equation: ; Where u(t) is the membrane potential of the neuron, c s is the membrane capacitance of the neuron, g L is the neuron's leak conductance, E L is the reverse potential, I(t) is the input current of the neuron; When the membrane potential u(t) of the postsynaptic neuron is added to the threshold voltage u according to the above formula th When it is excited, a pulse will be generated, and the time when the pulse appears is t a As the output of the neuron, after the neuron sends a pulse, the membrane potential is immediately reset to the reset voltage u res , and lasts for a duration of t ref During the refractory period, even if there is a strong signal input, the neuron no longer accumulates membrane potential. After the refractory period, the neuron accumulates membrane potential again. The deep neural network prediction model has a three-layer structure: input layer, hidden layer, and output layer. The unweighted contribution of input neuron e to the k-th synapse of output neuron f is obtained by the following formula: ; Where, d k is the delay of the kth synapse between two neurons, is the weight of the kth synapse; The corresponding impulse response function expression is: ; Where, τ is the corresponding membrane potential delay time constant; The combined contribution of input neuron e to output neuron f is: ; In t f At this moment, the membrane potential u of the output neuron f f (t) reaches its threshold, t f That is the output of the neuron, the weight update size of synapse k at time t for: ; in, represents the target pulse sequence, represents the actual output pulse sequence, represents the synaptic input spike, W(s) defines the saliency plasticity determined by the spike temporal correlation, a represents the non-hebbian term, when a takes a positive value, W(s) indicates the use of STDP, when a takes a negative value, W(s) indicates the use of anti-STDP; According to the pulse emission of the pulse neurons before and after the STDP synapses during the training process, the corresponding synaptic connection weights are updated, the first set of load data is received as input for training, the updated weights are output, and the weights are used as the starting values of the target weights for the next round of training, and then the second set of load data is received as input for training, and the weights are updated again. The subsequent training process is the same as above, and the weights of each layer of neurons in the deep neural network are initialized, and then the PSO algorithm is used to fine-tune the weights.
7. An electric vehicle charging load prediction system based on fuzzy deep neural network, characterized in that: include: Computer-readable storage medium and processor; The computer-readable storage medium is used to store executable instructions; The processor is used to read the executable instructions stored in the computer-readable storage medium and execute the electric vehicle charging load prediction method based on fuzzy deep neural network according to any one of claims 1 to 3.
8. A non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the electric vehicle charging load prediction method based on a fuzzy deep neural network according to any one of claims 1 to 3.
Citation Information
Patent Citations
Short-period power load prediction method based on T-S fuzzy Elman nerve network
CN106971238A
Power load prediction method based on deep neural network
CN110866640A