Electric vehicle charging load prediction method
Through the combination of Stacking integrated method and multi-base learner, combined with the LightGBM model optimization parameters, the accuracy and stability of electric vehicle charging load prediction are solved, and higher prediction accuracy and generalization capabilities are achieved.
Patent Information
- Application Number
- CN202411348442.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-26
- Publication Date
- 2025-02-14
AI Technical Summary
The prior art is difficult to accurately predict the charging load of electric vehicles, resulting in challenges in charging station planning and power system management.
The Stacking integrated method is adopted, and prediction results are generated by combining multiple base learners (DCformer, BiTCN and ANN), and the lightweight gradient hoist LightGBM is used as a meta learner to optimize model parameters to improve prediction accuracy.
It improves the accuracy and stability of electric vehicle charging load prediction, enhances the generalization ability of the model, and has higher accuracy and stability than traditional single model prediction.
Smart Images

Figure CN119448201A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of new energy vehicles, and in particular relates to a method for predicting charging load of an electric vehicle. Background Art
[0002] In the current era, electric vehicles have gradually replaced traditional fuel vehicles, and the large-scale promotion of electric vehicles is necessary. However, the surge in the number of electric vehicle charging piles is bound to have a greater impact on the power system. Therefore, the problem of predicting the charging volume of electric vehicles in local areas needs to be solved urgently. Accurately predicting the charging load is crucial for charging station planning and power system management.
[0003] Deep learning has a more complex multi-layer structure than traditional models, with more information, better data extraction and stronger nonlinear feature expression capabilities, and can accurately map the complex mapping relationships hidden under the dam data. By taking advantage of the advantages of deep learning, data feature information can be fully extracted to improve the prediction accuracy of the model. Various deep learning models are constantly developing, and many new deep models have been introduced. However, there are many problems with a single prediction model, such as local optimality and insufficient accuracy.
[0004] In the field of new energy vehicles, traditional prediction methods, such as linear regression and time series analysis, may not be able to capture complex charging behavior patterns. Machine learning technology, especially the stacking integration method in the ensemble learning method, can improve the prediction accuracy. The stacking method is used in the present invention to combine the predictions of multiple base models. Specifically, it first uses several base models to generate prediction results, and then synthesizes these results through a secondary learner, thereby overcoming the limitations of a single model. Summary of the invention
[0005] Purpose of the invention: The present invention provides a method for predicting the charging load of electric vehicles, which effectively extracts data features by integrating several single models, improves the accuracy of prediction, and has better stability and stronger generalization ability than traditional models.
[0006] Technical solution: The electric vehicle charging load prediction method described in the present invention comprises the following steps:
[0007] S1. Obtain the historical charging load data of electric vehicles in urban residential areas in advance and use the maximum information coefficient to screen the variables with high correlation;
[0008] S2, dividing the screened data into training set, validation set and test set, and reconstructing the training set data using 3-fold cross validation;
[0009] S3. The highly correlated charging load data is used as the input data in the stacking integrated model, where the first-layer base learners include DCformer, BiTCN and artificial neural network ANN, and the output results of the base learners are used as the training set data of the second-layer meta-learner, and the lightweight gradient boosting machine LightGBM is used as the second-layer meta-learner;
[0010] S4. Use circular chaos mapping initialization and adaptive water wave factor strategy to improve the Nutcracker optimization algorithm NOA, obtain the improved Nutcracker optimization algorithm INOA, and optimize the parameters of the LightGBM model based on INOA;
[0011] S5. After the integrated model predicts the preliminary prediction value, the error sequence is obtained, and LightGBM is used as the error prediction model to obtain the final prediction value.
[0012] Furthermore, the historical charging load data of electric vehicles in step S1 includes charging load data, temperature, precipitation, charging mode, number of charging piles and number of electric vehicles in the studied area.
[0013] Furthermore, the implementation process of step S1 is as follows:
[0014] The maximum information coefficient MIC is used to explore the linear and nonlinear relationships between variables and the importance of variables. The calculation formula is as follows:
[0015]
[0016] Where: I(x, y) is the mutual information value of variables x and y; p(x, y) is the joint probability of variables x and y; p(x) and p(y) are marginal probabilities; B(n) is the upper limit of grid division, y represents charging load characteristics, and x represents other data.
[0017] Furthermore, the step S2 is implemented as follows:
[0018] The original data is divided into training set, validation set and test set in a ratio of 6:2:2, and the original training set is evenly divided into 3 subsets of data sets; then, 2 subsets are selected as training sets for the initial learner, and the last subset is used as the validation set for the initial learner, forming 3 sets of training sets and validation sets.
[0019] Furthermore, the implementation process of the first layer base learner in step S3 is as follows:
[0020] The DCformer model is used as the first primary learner of the integrated model. DCformer proposes a dynamically combinable multi-head attention DCMHA based on the transformer, and introduces the compose operation based on MHA:
[0021] A :ij ′=Compose(A :ij , Q i , K j ;θ) (3)
[0022] Among them, A :ij ′ is a new vector with trainable parameters θ, A :ij is the attention vector, Q i K stands for query. j is the key;
[0023] When calculating MHA, insert two Compose functions to realize dynamic combination of multi-head attention:
[0024]
[0025] in, is the projection matrix of the ith head, is the output projection matrix, A S and A WW Represent the attention score tensor and the attention weight tensor respectively, represents the i-th attention score tensor; D h and D m They represent multi-head dimension and model dimension respectively; O represents output. In DCMHA, the Stack operation is first performed along the first dimension, and the Concat operation is performed along the last dimension;
[0026] The BiTCN model is used as the second primary learner of the integrated model. BiTCN includes forward and reverse convolutions and introduces a bidirectional structure based on TCN. The structure of TCN is expressed by the following formula:
[0027] TCN=1DFCN+Casual Conolution(5)
[0028] Among them, 1DFCN represents a one-dimensional fully connected convolutional layer, and Casual Conolution represents the causal convolution applied to each convolutional layer;
[0029] An artificial neural network (ANN) model is used as the third primary learner of the integrated model, including an input layer, a hidden layer, and an output layer. Each neuron in the ANN model is connected by synapses, and there are certain weights and rules between synapses. The transmission between signals is completed by an activation function. With the help of the activation function, the input signal will be converted into an output signal.
[0030] Furthermore, the implementation process of the second layer meta-learner in step S3 is as follows:
[0031] LightGBM uses a leaf-first splitting strategy, selecting the leaf node with the most information gain for splitting each time, thereby generating a deeper tree and improving the accuracy of the model; in the direction of charging load prediction, LightGBM handles dynamically changing time series data such as charging load.
[0032] Furthermore, the improvement of the Nutcracker Optimization Algorithm NOA described in step S4 is implemented as follows:
[0033] The circular chaos mapping strategy is used to initialize the original random initialization of NOA:
[0034]
[0035] Among them, a and b are constants; mod is the remainder function, x t Randomly initialize the position of the population, x t+1 is the population position after initialization using the circular chaos mapping strategy;
[0036] Add adaptive water wave factors during NOA position update, as follows:
[0037]
[0038] Among them, v represents the water wave factor, t represents the current iteration number, T max is the maximum number of iterations of the population; the foraging phase is as follows:
[0039]
[0040] in, is the new position of the i-th nutcracker in the current generation, is the jth position of the i-th nutcracker in the current generation; U j and L j is a vector, including the upper and lower bounds of the j-th dimension in the optimization problem; γ is a random number generated according to the Levy flight, are the j-th dimension solutions obtained by A, B, and C, respectively. A, B, and C are three different nutcracker individuals randomly selected from the population. X m is the average position of all nutcrackers; T1, τ2, r, r1 are random real numbers in the range [0, 1]; δ is set to 0.05; the specific values of μ are as follows:
[0041]
[0042] Among them, r2 and r3 are also random real numbers in the range of [0, 1]; T4 is a random number that obeys the normal distribution, and T5 is a random number generated by a Levy flight;
[0043] The storage phases are as follows:
[0044]
[0045] in, is the new position of the Nutcracker storage area in the current iteration, λ is a value generated based on the Levy flight, T3 is also a random number in the range [0, 1]; 1 is a linear decreasing factor during the development of the algorithm;
[0046] The NOA algorithm switches between the foraging phase and the storage phase at a certain point to ensure a balance between algorithm exploration and development. The conversion method is as follows:
[0047]
[0048] in, is a random number in the range [0, 1], Indicates the current probability value that decreases linearly from 1 to 0.
[0049] Furthermore, the parameter implementation process of optimizing the LightGBM model based on INOA described in step S4 is as follows:
[0050] Set the objective function of the Nutcracker Optimization Algorithm NOA to the LightGBM model's parameter learning rate L, number of leaf nodes N, and maximum tree depth M. Take these three parameters as the input of the algorithm and set the upper and lower limits; the fitness value is the training set error index;
[0051] During the iteration process, the individual position of the nutcracker corresponding to the optimal fitness value is determined according to the training error index, and the optimal position of the nutcracker is used as the output to update the parameters of the LightGBM prediction model: the learning rate L, the number of leaf nodes N, and the maximum tree depth M; the learning rate L is 0.01, the number of leaf nodes N is 16, and the maximum tree depth M is 8.
[0052] Furthermore, the specific process of step S5 is as follows:
[0053] After step S3, the framework of the stacking ensemble model has been built. In step S4, the model is trained using the training set data and the model parameters are optimized. Then, the validation set data is used for prediction to obtain the prediction results of the validation set. The prediction results of the validation set are compared with the actual results of the validation set to obtain the error sequence of the validation set:
[0054]
[0055] Among them, y is the error sequence, Y is the true value, is the predicted value;
[0056] After obtaining the error sequence of the validation set, the LightGBM model is used as the error correction model. The error correction model takes data features as input and error values as output. After the test set data is processed by the stacking integration model to obtain a preliminary prediction result, the error prediction value is obtained, and the two are added together to obtain the final prediction result.
[0057] Compared with the prior art, the present invention has the following beneficial effects: the present invention adopts different base learners to extract different features of data based on model characteristics, takes into account the differences in training principles of different algorithms, and gives full play to the advantages of each model in the prediction process; the stronger the learning ability of the base learners, the smaller the degree of correlation between them, and the better the final prediction effect; compared with traditional single model prediction, the electric vehicle charging load prediction model based on stacking integration of the present invention has higher accuracy and generalization ability. BRIEF DESCRIPTION OF THE DRAWINGS
[0058] Figure 1 is a flow chart of the present invention;
[0059] Figure 2 It is a framework diagram based on stacking integration model;
[0060] Figure 3 Flowchart for optimizing model parameters for the algorithm. DETAILED DESCRIPTION
[0061] The present invention will be further described in detail below in conjunction with the accompanying drawings.
[0062] like Figure 1 As shown, the present invention provides a method for predicting charging load of an electric vehicle, comprising the following steps:
[0063] S1. Obtain the historical charging load data of electric vehicles in urban residential areas in advance, and use the maximum information coefficient (MIC) to screen the variables with high correlation, select the features with high correlation as the model input, and the charging load as the output.
[0064] Obtain historical charging load data for urban residential areas at the same time every day, and clean the historical charging load of electric vehicles to prevent data errors caused by equipment instability, system failures, etc. The collected data include charging load data, temperature, precipitation, charging mode, number of charging piles and number of electric vehicles in the study area.
[0065] The maximum information coefficient MIC is used to effectively mine the linear and nonlinear relationships between variables and the importance of variables. The calculation formula is as follows:
[0066]
[0067] Where: I(x, y) is the mutual information value of variables x and y; p(x, y) is the joint probability of variables x and y; p(x) and p(y) are edge probabilities; B(n) is the upper limit of grid division, y represents the charging load characteristics, and x represents other data. The present invention uses the charging load as the model output, and uses the maximum information coefficient MIC to select several features with the greatest degree of relationship with the charging load characteristics as the model input.
[0068] S2. The screened data is divided into training set, validation set and test set in a ratio of 6:2:2, and the divided training set data is reconstructed using 3-fold cross validation.
[0069] The processed data is subjected to three-fold cross validation so that the data can be used for model training to reduce the risk of overfitting. The steps of cross validation are as follows: First, the original data is divided into training set, validation set and test set in a ratio of 6:2:2, and the original training set is evenly divided into 3 subsets. Then, 2 subsets are selected as the training set of the initial learner, and the last subset is used as the validation set of the initial learner, forming 3 sets of training sets and validation sets.
[0070] S3, such as Figure 2 As shown in the figure, an integrated prediction model based on stacking is constructed, DCformer, BiTCN and artificial neural network ANN models are used as base learners of the integrated model, and the lightweight gradient boosting machine LightGBM model is used as the meta-learner of the integrated model.
[0071] Stacking integration is a machine learning method. The present invention constructs an integrated model through multiple base learners and a single meta-learner. First, DCformer, BiTCN and ANN models are used as base learners of the integrated model. The initial data is used to train these base learners to obtain prediction results, and these prediction results are input into the meta-learner LightGBM model as new features to obtain more accurate charging load prediction results.
[0072] The DCformer model is used as the first primary learner of the integrated model. DCformer proposes dynamically combinable multi-head attention (DCMHA) based on the transformer. Compared with the original multi-head attention mechanism, the dynamic combination of multiple attention heads enhances the model's ability to capture different contextual information.
[0073] The most important module of Transformer is the multi-head attention mechanism MHA, while the DCMHA module of DCformer introduces the compose operation based on MHA:
[0074] A :ij ′=Compose(A:ij , Q i , K j ;θ) (3)
[0075] Among them, A :ij ′ is a new vector with trainable parameters θ, A :ij is the attention vector, Q i K stands for query. j is the key.
[0076] Inserting two Compose functions when calculating MHA can realize the dynamic combination of multi-head attention:
[0077]
[0078] in, is the projection matrix of the ith head, is the output projection matrix, A S and A WW Represent the attention score tensor and the attention weight tensor respectively, represents the i-th attention score tensor; D h and D m They represent multi-head dimension and model dimension respectively; O represents output. In DCMHA, the Stack operation is first performed along the first dimension, and the Concat operation is performed along the last dimension.
[0079] By dynamically combining attention heads, DCFormer can better capture the diverse features in the sequence, thereby improving the expressiveness of the model.
[0080] The BiTCN model is used as the second primary learner of the integrated model. BiTCN mainly includes forward and reverse convolution. Through this bidirectional structure, the temporal relationship between the future and the past is captured, making the model more capable of extracting the relationship between data. At the same time, the convolution module of the model can also avoid the gradient disappearance problem and improve the training stability.
[0081] BiTCN introduces a bidirectional structure based on TCN. The structure of TCN can be expressed as follows:
[0082] TCN=1DFCN+Casual Conolution (5)
[0083] Among them, 1DFCN represents a one-dimensional fully connected convolutional layer, and Casual Conolution represents the causal convolution applied to each convolutional layer.
[0084] The artificial neural network ANN model is used as the third primary learner of the integrated model. The ANN model is a mathematical model that simulates the human brain neural network, generally consisting of an input layer, a hidden layer, and an output layer. In the ANN model, each neuron is connected by a synapse, and there are certain weights and rules between synapses. The transmission between signals is completed by the activation function. With the help of the activation function, the input signal will be converted into an output signal.
[0085] Using LightGBM as the second-layer meta-learner of the integrated model, the meta-learner stage of the stacking model needs to process the results predicted by the base learner. The regularization technology of LightGBM can effectively prevent overfitting and enhance the stability and generalization ability of the model. At the same time, as a meta-learner, LightGBM can use the prediction results generated by the primary learner for further optimization, thereby improving the accuracy of the final prediction.
[0086] LightGBM is mainly based on decision trees, which are algorithms based on gradient boosting trees, and improves trees through iterative training. Unlike traditional gradient boosting trees, LightGBM uses a leaf-first splitting strategy instead of layer-by-layer. This means that the leaf node with the most information gain is selected for splitting each time, thereby generating a deeper tree and improving the accuracy of the model. In the direction of charging load prediction, LightGBM can effectively handle dynamically changing time series data such as charging load, and the parallel capability of LightGBM also has great advantages in processing such large-scale data sets. In general, LightGBM can fully play its role as a meta-learner, thereby improving the prediction effect and computational efficiency of the entire Stacking integrated model.
[0087] S4, such as Figure 3 As shown, the circular chaos map initialization and adaptive water wave factor strategy are used to improve the Nutcracker optimization algorithm NOA, and the improved Nutcracker optimization algorithm INOA is used to optimize the parameters of the LightGBM model, including: learning rate L, number of leaf nodes N and maximum tree depth M.
[0088] Set the objective function of the Nutcracker Optimization Algorithm NOA to the LightGBM model's parameter learning rate L, number of leaf nodes N, and maximum tree depth M. Take these three parameters as the input of the algorithm and set the upper and lower limits; the fitness value is the training set error index;
[0089] The initialization process of the original Nutcracker Optimization Algorithm NOA is random initialization, so the population distribution is random, which easily causes the NOA algorithm to fall into the local optimum and affects the accuracy of subsequent model prediction. The present invention uses circular chaos mapping strategy initialization instead of the original random initialization:
[0090]
[0091] Among them, a is generally taken as 0.2 and b is taken as 0.5.
[0092] The position update method of the Nutcracker Optimization Algorithm NOA is mainly a foraging and storage strategy, wherein the present invention adds an adaptive water wave factor in the position update process, as follows:
[0093]
[0094] Among them, v represents the water wave factor, t represents the current iteration number, T max is the maximum number of iterations of the population.
[0095] The foraging phases are as follows:
[0096]
[0097] in, is the new position of the i-th nutcracker in the current generation, is the jth position of the i-th nutcracker in the current generation; U j and L j is a vector, including the upper and lower bounds of the j-th dimension in the optimization problem; γ is a random number generated according to the Levy flight, are the j-th dimension solutions obtained by A, B, and C respectively. A, B, and C are three randomly selected indicators in the population; τ1, τ2, r, and r1 are random real numbers in the range of [0, 1]; the specific values of μ are as follows:
[0098]
[0099] Among them, r2 and r3 are also random real numbers in the range of [0, 1].
[0100] The storage phases are as follows:
[0101]
[0102] in, is the new position of the Nutcracker storage area in the current iteration, λ is a value generated based on the Levy flight, τ3 is also a random number in the range [0, 1]; 1 is a linear decreasing factor during the development of the algorithm.
[0103] The algorithm will switch between the foraging phase and the storage phase at a certain node to ensure a balance between algorithm exploration and development. The conversion method is as follows:
[0104]
[0105] in, is a random number in the range [0,1], Indicates the current probability value that decreases linearly from 1 to 0.
[0106] During the iteration process, the individual position of the nutcracker corresponding to the best fitness value is determined according to the training error index, and the optimal position of the nutcracker is used as the output to update the parameters of the LightGBM prediction model, including the learning rate L, the number of leaf nodes N, and the maximum tree depth M.
[0107] S5. After the integrated model predicts the preliminary prediction value, the error sequence is obtained, and LightGBM is used as the error prediction model to obtain the final prediction value.
[0108] After step S3, the framework of the stacking ensemble model has been built. In step S4, the model is trained using the training set data and the model parameters are optimized. Then, the validation set data is used for prediction to obtain the prediction results of the validation set. By comparing the obtained validation set prediction results with the actual results of the validation set, the error sequence of the validation set is obtained:
[0109]
[0110] Where y is the error sequence and Y is the true value. is the predicted value.
[0111] After obtaining the error sequence of the validation set, the LightGBM model is used as the error correction model, where the parameter learning rate L is 0.01, the number of leaf nodes N is 16, and the maximum tree depth M is 8. The error correction model takes data features as input and error values as output. After the test set data is processed by the stacking integration model to obtain the preliminary prediction results, the error prediction value is obtained, and the two are added to obtain the final prediction result.
[0112] The above embodiments are only for illustrating the technical concept and features of the present invention, and their purpose is to enable people familiar with the technology to understand the content of the present invention and implement it accordingly, and they cannot be used to limit the protection scope of the present invention. Any equivalent transformation or modification made according to the spirit of the present invention should be included in the protection scope of the present invention.
Claims
1. A method for predicting electric vehicle charging load, characterized in that: The steps include: S1. Obtain the historical charging load data of electric vehicles in urban residential areas in advance, and use the maximum information coefficient to screen the variables with high correlation; S2, dividing the screened data into training set, validation set and test set, and reconstructing the training set data using 3-fold cross validation; S3. The highly correlated charging load data is used as the input data in the stacking integrated model, where the first-layer base learners include DCformer, BiTCN and artificial neural network ANN, and the output results of the base learners are used as the training set data of the second-layer meta-learner, and the lightweight gradient boosting machine LightGBM is used as the second-layer meta-learner; S4. Use circular chaos mapping initialization and adaptive water wave factor strategy to improve the Nutcracker optimization algorithm NOA, obtain the improved Nutcracker optimization algorithm INOA, and optimize the parameters of the LightGBM model based on INOA; S5. After the integrated model predicts the preliminary prediction value, the error sequence is obtained, and LightGBM is used as the error prediction model to obtain the final prediction value.
2. The method for predicting charging load of an electric vehicle according to claim 1, characterized in that: The electric vehicle historical charging load data in step S1 includes charging load data, temperature, precipitation, charging mode, number of charging piles and number of electric vehicles in the studied area.
3. The method for predicting charging load of an electric vehicle according to claim 1, characterized in that: The implementation process of step S1 is as follows: The maximum information coefficient MIC is used to explore the linear and nonlinear relationships between variables and the importance of variables. The calculation formula is as follows: Where: I(x,y) is the mutual information value of variables x and y; p(x,y) is the joint probability of variables x and y; p(x) and p(y) are marginal probabilities; B(n) is the upper limit of grid division, y represents charging load characteristics, and x represents other data.
4. The method for predicting charging load of an electric vehicle according to claim 1, characterized in that: The step S2 is implemented as follows: The original data is divided into training set, validation set and test set in a ratio of 6:2:2, and the original training set is evenly divided into 3 subsets of data sets; then, 2 subsets are selected as training sets for the initial learner, and the last subset is used as the validation set for the initial learner, forming 3 sets of training sets and validation sets.
5. The method for predicting charging load of an electric vehicle according to claim 1, characterized in that: Step S3: The implementation process of the first layer base learner is as follows: The DCformer model is used as the first primary learner of the integrated model. DCformer proposes a dynamically combinable multi-head attention DCMHA based on the transformer, and introduces the compose operation based on MHA: A :ij '=Compose(A :ij ,Q i ,K j (i) (3) Among them, A :ij ' is a new vector with trainable parameters θ, A :ij is the attention vector, Q i K stands for query. j is the key; When calculating MHA, insert two Compose functions to realize dynamic combination of multi-head attention: in, is the projection matrix of the ith head, is the output projection matrix, A S and A W Represent the attention score tensor and the attention weight tensor respectively, represents the i-th attention score tensor; D h and D m They represent multi-head dimension and model dimension respectively; O represents output. In DCMHA, the Stack operation is first performed along the first dimension, and the Concat operation is performed along the last dimension; The BiTCN model is used as the second primary learner of the integrated model. BiTCN includes forward and reverse convolutions and introduces a bidirectional structure based on TCN. The structure of TCN is expressed by the following formula: TCN=1DFCN+Casual Conolution (5) Among them, 1DFCN represents a one-dimensional fully connected convolutional layer, and CasualConolution represents the causal convolution applied to each convolutional layer; An artificial neural network (ANN) model is used as the third primary learner of the integrated model, including an input layer, a hidden layer, and an output layer. Each neuron in the ANN model is connected by synapses, and there are certain weights and rules between synapses. The transmission between signals is completed by an activation function. With the help of the activation function, the input signal will be converted into an output signal.
6. The method for predicting charging load of an electric vehicle according to claim 1, characterized in that: The implementation process of the second layer meta-learner in step S3 is as follows: LightGBM uses a leaf-first splitting strategy, selecting the leaf node with the most information gain for splitting each time, thereby generating a deeper tree and improving the accuracy of the model; in the direction of charging load prediction, LightGBM handles dynamically changing time series data such as charging load.
7. The method for predicting charging load of an electric vehicle according to claim 1, characterized in that: The improvement process of the Nutcracker Optimization Algorithm NOA described in step S4 is as follows: The circular chaos mapping strategy is used to initialize the original random initialization of NOA: Among them, a and b are constants; mod is the remainder function, x t Randomly initialize the position of the population, x t+1 is the population position after initialization using the circular chaos mapping strategy; Add adaptive water wave factors during NOA position update, as follows: Among them, v represents the water wave factor, t represents the current iteration number, T max is the maximum number of iterations of the population; the foraging phase is as follows: in, is the new position of the i-th nutcracker in the current generation, is the jth position of the i-th nutcracker in the current generation; U j and L j is a vector, including the upper and lower bounds of the j-th dimension in the optimization problem; γ is a random number generated according to the Levy flight, are the j-th dimension solutions obtained by A, B, and C, respectively. A, B, and C are three different nutcracker individuals randomly selected from the population. X m is the average position of all nutcrackers; τ1, τ2, r, r1 are random real numbers in the range [0,1]; δ is set to 0.05; the specific values of μ are as follows: Among them, r2 and r3 are also random real numbers in the range of [0,1]; τ4 is a random number that obeys the normal distribution, and τ5 is a random number generated by a Levy flight; The storage phases are as follows: in, is the new position of the Nutcracker storage area in the current iteration, λ is a value generated according to the Levy flight, τ3 is also a random number in the range [0,1]; l is a linear decreasing factor during the development of the algorithm; The NOA algorithm switches between the foraging phase and the storage phase at a certain point to ensure a balance between algorithm exploration and development. The conversion method is as follows: in, is a random number in the range [0,1], Indicates the current probability value that decreases linearly from 1 to 0.
8. The method for predicting electric vehicle charging load according to claim 1, characterized in that: The parameter implementation process of optimizing the LightGBM model based on INOA described in step S4 is as follows: Set the objective function of the Nutcracker Optimization Algorithm NOA to the LightGBM model's parameter learning rate L, number of leaf nodes N, and maximum tree depth M. Take these three parameters as the input of the algorithm and set the upper and lower limits; the fitness value is the training set error index; During the iteration process, the individual position of the nutcracker corresponding to the best fitness value is determined according to the training error index, and the optimal position of the nutcracker is used as the output to update the parameters of the LightGBM prediction model, including the learning rate L, the number of leaf nodes N, and the maximum tree depth M.
9. The method for predicting charging load of an electric vehicle according to claim 1, characterized in that: The specific process of step S5 is as follows: After step S3, the framework of the stacking ensemble model has been built. In step S4, the model is trained using the training set data and the model parameters are optimized. Then, the validation set data is used for prediction to obtain the prediction results of the validation set. The prediction results of the validation set are compared with the actual results of the validation set to obtain the error sequence of the validation set: Among them, y is the error sequence, Y is the true value, is the predicted value; After obtaining the error sequence of the validation set, the LightGBM model is used as the error correction model. The error correction model takes data features as input and error values as output. After the test set data is processed by the stacking integration model to obtain a preliminary prediction result, the error prediction value is obtained, and the two are added together to obtain the final prediction result.
10. The method for predicting charging load of an electric vehicle according to claim 8, characterized in that: The learning rate L is set to 0.01, the number of leaf nodes N is set to 16, and the maximum tree depth M is set to 8.
Citation Information
Cited By
Roadbed settlement prediction method and system for permafrost region
CN120429843A
Electric energy meter error prediction method and system based on Internet of Things
CN120742221A
Unit outlet water temperature prediction method based on ARIMAX-LightGBM combined model
CN121525002A
Road surface performance prediction method and device and electronic equipment
CN121725946A