A charging pile power load prediction method based on machine learning
By constructing a charging pile power load prediction model based on machine learning, the problems of inaccurate and inefficient charging pile load prediction caused by linear data models in the prior art are solved, and more efficient and accurate load prediction is achieved.
Patent Information
- Application Number
- CN202411446703.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-16
- Publication Date
- 2025-04-11
- Estimated Expiration
- 2044-10-16
AI Technical Summary
The prior art uses linear data models to predict charging pile loads, resulting in inaccurate prediction and inefficient efficiency.
Using a machine learning-based method, by obtaining the power load characteristics and historical data of the charging piles, a machine learning model (such as BP neural network) is built to learn the data relationship and obtain the power load prediction model of the charging piles.
The accuracy and efficiency of charging pile load prediction is improved, and the power load of charging piles in the area to be predicted can be more accurately predicted.
Smart Images

Figure CN119340982B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of charging pile load prediction, and in particular relates to a charging pile power load prediction method based on machine learning. Background Art
[0002] Charging piles, also known as electric vehicle charging piles, are facilities used to provide charging services for electric vehicles (EVs). They can charge various types of electric vehicles through different charging methods and interfaces, including battery electric vehicles (BEVs), plug-in hybrid electric vehicles (PHEVs), etc. With the popularity of electric vehicles, the demand for charging piles is growing. The power load prediction of charging piles is of great significance to the stable operation of the power system. However, traditional power load prediction methods are often based on linear mathematical models, which make it difficult to accurately predict the nonlinear and time-varying power load of charging piles. Summary of the invention
[0003] The present invention provides a charging pile power load prediction method based on machine learning, which is used to solve the technical problems of inaccurate prediction and low efficiency caused by charging pile load prediction through linear data model in the prior art.
[0004] A charging pile power load prediction method based on machine learning, comprising:
[0005] Obtaining charging pile power load characteristics at consecutive time points in the area to be predicted and the total charging pile power load corresponding to the charging pile power load characteristics;
[0006] Using a machine learning model to learn the data relationship between the charging pile power load characteristics and the charging pile power total load corresponding to the charging pile power load characteristics, to obtain a charging pile power load prediction model;
[0007] The power load characteristics of the charging piles to be predicted corresponding to the area to be predicted are obtained, and the power load prediction model of the charging piles is used to identify the power load characteristics of the charging piles to be predicted, so as to obtain the power load prediction result of the charging piles.
[0008] Furthermore, the charging pile power load characteristics of the area to be predicted at continuous time points and the total charging pile power load corresponding to the charging pile power load characteristics are obtained, including:
[0009] Taking each hour of each day as a unit, the charging pile power load characteristics of the area to be predicted at continuous time points are collected, and the total charging pile power load corresponding to the charging pile power load characteristics in each hour is collected.
[0010] Furthermore, a machine learning model is used to learn the data relationship between the charging pile power load characteristics and the charging pile power total load corresponding to the charging pile power load characteristics to obtain a charging pile power load prediction model, including:
[0011] Constructing a machine learning model, and randomly initializing parameters of the machine learning model to initialize a population;
[0012] According to the charging pile power load characteristics and the total charging pile power load corresponding to the charging pile power load characteristics, obtaining the fitness value corresponding to each individual in the population, and arranging the individuals in the population in descending order according to the fitness values;
[0013] Based on the current number of training times, an adaptive segmentation ratio is obtained, and the sorted population is divided into a first sub-population, a second sub-population, and a third sub-population according to the adaptive segmentation ratio;
[0014] For the first sub-population, the sine-cosine optimal region exploration strategy is used to make the first individual in the first sub-population explore in the solution space, and the first individual after the exploration is obtained;
[0015] For the second sub-population, a competitive learning coordinated exploration strategy is adopted to enable the second individual in the second sub-population to explore in the solution space, and obtain the second individual after exploration;
[0016] For the third sub-population, a random crossover mutation learning detection strategy is adopted to make the third individual in the third sub-population explore in the solution space, and obtain the third individual after exploration;
[0017] The first individual after exploration, the second individual after exploration, and the third individual after exploration are remixed into one population;
[0018] Determine whether the iteration end condition is met. If so, obtain the optimal individual based on the remixed population, and use the optimal individual as the final hyperparameter of the machine learning model to obtain the charging pile power load prediction model. Otherwise, return to the step of obtaining the fitness value corresponding to each individual in the population.
[0019] Further, according to the charging pile power load characteristics and the total charging pile power load corresponding to the charging pile power load characteristics, the fitness value corresponding to each individual in the population is obtained, including:
[0020] For each individual in the population, the hyperparameters contained in the individual are applied to the machine learning model, the charging pile power load characteristics are used as the actual input of the machine learning model, and the actual output of the machine learning model is obtained;
[0021] The total charging pile power load corresponding to the charging pile power load characteristic is used as the expected output of the machine learning model, and the error function value corresponding to the machine learning model is obtained according to the actual output of the machine learning model and the expected output of the machine learning model;
[0022] After adding the error function value corresponding to the machine learning model to the preset constant term, the fitness value corresponding to the individual is obtained, and each individual is traversed to obtain the fitness value corresponding to each individual in the population.
[0023] Furthermore, based on the current number of training times, an adaptive segmentation ratio is obtained, including:
[0024] Based on the current number of training times, the first split ratio corresponding to the first sub-population is obtained as:
[0025]
[0026] Among them, P1 represents the first segmentation ratio, α1 represents the proportional attenuation control factor, π represents the circumference, T represents the preset maximum number of training times, t represents the current number of training times, P 1min Indicates the minimum value corresponding to the first segmentation ratio;
[0027] Based on the current number of training times, the second split ratio corresponding to the second sub-population is obtained as:
[0028]
[0029] Among them, P2 represents the second segmentation ratio, α2 represents the proportional growth control factor, and P 2max Indicates the maximum value corresponding to the second segmentation ratio;
[0030] According to the first segmentation ratio corresponding to the first sub-population and the second segmentation ratio corresponding to the second sub-population, the third segmentation ratio corresponding to the third sub-population is obtained as follows:
[0031] P3=1-P3-P2
[0032] Wherein, P3 represents the third division ratio;
[0033] The first segmentation ratio, the second segmentation ratio and the third segmentation ratio are collectively used as an adaptive segmentation ratio.
[0034] Furthermore, dividing the sorted population into a first sub-population, a second sub-population and a third sub-population according to the adaptive segmentation ratio includes:
[0035] Multiplying the first segmentation ratio in the adaptive segmentation ratio by the total number of individuals in the population to obtain a first multiplication number, and rounding the first multiplication number to obtain a first total number of individuals;
[0036] Based on the total number of the first individuals, individuals are taken out from the sorted population one by one to form the first sub-population;
[0037] Multiplying the second split ratio in the adaptive split ratio by the total number of individuals in the population to obtain a second multiplied number, and rounding the second multiplied number to obtain a second total number of individuals;
[0038] Based on the second total number of individuals, individuals are taken out from the population one by one to form a second sub-population;
[0039] Multiplying the third segmentation ratio in the adaptive segmentation ratio by the total number of individuals in the population to obtain a third multiplied number, and rounding the third multiplied number to obtain a third total number of individuals;
[0040] Determine whether the total number of the third individuals is greater than the total number of remaining individuals in the population. If so, randomly generate new individuals until the sum of the total number of remaining individuals in the population and the total number of new individuals is the same as the total number of the third individuals, and the remaining individuals in the population and the new individuals are combined into a third sub-population. Otherwise, based on the total number of the third individuals, take individuals out of the population one by one to form a third sub-population.
[0041] Furthermore, for the first sub-population, a sine-cosine optimal region exploration strategy is used to make the first individual in the first sub-population explore in the solution space, and the first individual after the exploration is obtained, including:
[0042] Based on the current number of training times, the search direction control factor is obtained as:
[0043]
[0044] Where γ represents the search direction control factor, a represents a positive constant, T represents the preset maximum number of training times, and t represents the current number of training times;
[0045] For the first individual in the first subpopulation, randomly match it with another first individual to obtain a first paired individual corresponding to the first individual;
[0046] The fitness value corresponding to the first individual and the fitness value corresponding to the first paired individual are obtained respectively, and the position update factor is obtained according to the fitness value corresponding to the first individual and the fitness value corresponding to the first paired individual thereof:
[0047]
[0048] Where σ represents the position update factor, f i represents the fitness value corresponding to the first individual of the i-th ipeirepresents the fitness value of the first paired individual corresponding to the first individual of the ith individual, ε represents the preset constant term, and is set to 0.00001; exp represents an exponential function with the natural constant e as the base;
[0049] According to the search direction control factor and the position update factor, the first individual in the first subpopulation is explored in the solution space, and the first individual after the exploration is obtained as:
[0050]
[0051] in, represents the d-th dimension hyperparameter of the first individual of the ith training process, represents the d-th dimension hyperparameter of the first individual after the i-th exploration, i=1,2,…,K, K represents the total number of the first individual, j=1,2,…,D, D represents the total dimension of the hyperparameter in the individual, r1 represents a random number between [0,2π], r2 represents a random number between [0,2], r3 represents a random number between (0,1), represents the d-th dimension hyperparameter of the optimal individual in the first individual.
[0052] Furthermore, for the second sub-population, a competitive learning coordinated exploration strategy is adopted to enable the second individual in the second sub-population to explore in the solution space, and the second individual after exploration is obtained, including:
[0053] For the second individual in the second subpopulation, randomly match the second individual with a first individual to obtain a second paired individual; and randomly match the second individual with another second individual having a larger fitness value to obtain a third paired individual;
[0054] According to the second paired individuals, the first learning factor is obtained as follows:
[0055]
[0056] Among them, c1 represents the first learning factor, f m represents the fitness value corresponding to the mth second individual, f mpei2 represents the fitness value corresponding to the second paired individual, and ε represents the preset constant term;
[0057] According to the third paired individual, the second learning factor is obtained as follows:
[0058] c2=exp(f mpei3 -f m )
[0059] Among them, c2 represents the second learning factor, f mpei3 Indicates the fitness value corresponding to the third paired individual;
[0060] According to the second paired individual, the third paired individual, the first learning factor and the second learning factor, the second individual in the second subpopulation is explored in the solution space, and the second individual after the exploration is obtained as follows:
[0061]
[0062] in, represents the j-th dimension hyperparameter of the m-th second individual in the t-th training process, m = 1, 2, ..., M, M represents the total number of second individuals, represents the j-th dimension hyperparameter of the second individual after the m-th exploration, ω represents the inertia weight, r4 represents a random number between (0,1), represents the j-th dimension hyperparameter of the second paired individual, r5 represents a random number between (0,1), represents the j-th dimension hyperparameter of the third paired individual.
[0063] Furthermore, for the third sub-population, a random crossover variation learning detection strategy is adopted to make the third individual in the third sub-population explore in the solution space, and the third individual after exploration is obtained, including:
[0064] For the third individual in the third subpopulation, randomly matching the third individual with a second individual to obtain a fourth paired individual;
[0065] According to the fourth paired individual and the optimal individual, the third individual in the third subpopulation is explored in the solution space, and the third individual after exploration is obtained as:
[0066]
[0067] in, represents the j-th dimension hyperparameter of the n-th third individual in the t-th training process, represents the j-th dimension hyperparameter of the third individual after the n-th exploration, ρ represents the random cross-variation adjustment coefficient between (0,2), ω represents the inertia weight, and r6 represents a random number between (-1,1). represents the j-th dimension hyperparameter of the fourth paired individual, Indicates except The j-th dimension hyperparameter of a random third individual other than represents the j-th dimension hyperparameter of the optimal individual, and r7 represents a random number between (0,1).
[0068] Further, judging whether the iteration end condition is met includes:
[0069] Determine whether the current number of training times is equal to or greater than the maximum number of training times. If so, determine that the iteration end condition is met, otherwise determine that the iteration end condition is not met.
[0070] The present invention provides a charging pile power load prediction method based on machine learning. The method adopts a machine learning model to learn the data relationship between the charging pile power load characteristics and the total charging pile power load corresponding to the charging pile power load characteristics, so as to obtain a charging pile power load prediction model; then the charging pile power load characteristics to be predicted corresponding to the area to be predicted are obtained, and the charging pile power load prediction model is adopted to identify the charging pile power load characteristics to be predicted, and finally a charging pile power load prediction result is obtained. Not only can the charging pile load in the area to be predicted be predicted efficiently, but also the prediction accuracy of the charging pile load is improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0071] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and, together with the description, serve to explain the principles of the invention.
[0072] Figure 1 A flowchart of a charging pile power load prediction method based on machine learning is provided in an embodiment of the present invention.
[0073] The above drawings have shown clear embodiments of the present invention, which will be described in more detail below. These drawings and text descriptions are not intended to limit the scope of the present invention in any way, but to illustrate the concept of the present invention for those skilled in the art by referring to specific embodiments. DETAILED DESCRIPTION
[0074] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present invention. Instead, they are merely examples of devices and methods consistent with some aspects of the present invention as detailed in the appended claims.
[0075] The embodiments of the present invention are described in detail below with reference to the accompanying drawings.
[0076] like Figure 1 As shown, an embodiment of the present invention provides a charging pile power load prediction method based on machine learning, comprising:
[0077] S1. Obtaining the charging pile power load characteristics of the area to be predicted at continuous time points and the total charging pile power load corresponding to the charging pile power load characteristics;
[0078] The charging pile power load characteristics can be weather, temperature, season, day of the week, whether it is a holiday, and other characteristics that affect the user's use of the charging pile (i.e., power consumption characteristics), or other characteristics, so as to achieve accurate prediction. At the same time, the total power load of the charging pile corresponding to the charging pile power load characteristics is collected as the expected label to facilitate machine learning.
[0079] S2. Using a machine learning model to learn the data relationship between the charging pile power load characteristics and the total charging pile power load corresponding to the charging pile power load characteristics, to obtain a charging pile power load prediction model;
[0080] In this embodiment, the machine learning model can be set to a BP (Back Propagation) neural network, CNN (Convolutional Neural Network), SVM (Support Vector Machine) and other models. In order to simplify the data processing process, this embodiment preferably uses a BP neural network as the machine learning model.
[0081] S3. Obtain the power load characteristics of the charging pile to be predicted corresponding to the area to be predicted, and use the charging pile power load prediction model to identify the power load characteristics of the charging pile to be predicted, so as to obtain the charging pile power load prediction result.
[0082] Charging piles are one of the important loads of the power grid, and the prediction of power load is crucial to the stable operation and energy dispatch of the power grid. Based on machine learning technology, the present invention can effectively predict the power load of charging piles in different time periods through historical data analysis, helping the power grid to optimize energy distribution and avoid overload or waste of power resources. It is applied to the management of large-scale charging pile networks.
[0083] In an embodiment of the present invention, obtaining the charging pile power load characteristics of the area to be predicted at continuous time points and the total charging pile power load corresponding to the charging pile power load characteristics includes:
[0084] Taking each hour of each day as a unit, the charging pile power load characteristics of the area to be predicted at continuous time points are collected, and the total charging pile power load corresponding to the charging pile power load characteristics in each hour is collected.
[0085] It is worth mentioning that in order to make data prediction more accurate, as much historical data as possible should be collected so that the machine learning model can learn more features and achieve more accurate predictions.
[0086] In an embodiment of the present invention, a machine learning model is used to learn the data relationship between the charging pile power load characteristics and the charging pile power total load corresponding to the charging pile power load characteristics to obtain a charging pile power load prediction model, including:
[0087] Constructing a machine learning model, and randomly initializing parameters of the machine learning model to initialize a population;
[0088] According to the charging pile power load characteristics and the total charging pile power load corresponding to the charging pile power load characteristics, obtaining the fitness value corresponding to each individual in the population, and arranging the individuals in the population in descending order according to the fitness values;
[0089] Based on the current number of training times, an adaptive segmentation ratio is obtained, and the sorted population is divided into a first sub-population, a second sub-population, and a third sub-population according to the adaptive segmentation ratio;
[0090] For the first sub-population, the sine-cosine optimal region exploration strategy is used to make the first individual in the first sub-population explore in the solution space, and the first individual after the exploration is obtained;
[0091] For the second sub-population, a competitive learning coordinated exploration strategy is adopted to enable the second individual in the second sub-population to explore in the solution space, and obtain the second individual after exploration;
[0092] For the third sub-population, a random crossover mutation learning detection strategy is adopted to make the third individual in the third sub-population explore in the solution space, and obtain the third individual after exploration;
[0093] The first individual after exploration, the second individual after exploration, and the third individual after exploration are remixed into one population;
[0094] Determine whether the iteration end condition is met. If so, obtain the optimal individual based on the remixed population, and use the optimal individual as the final hyperparameter of the machine learning model to obtain the charging pile power load prediction model. Otherwise, return to the step of obtaining the fitness value corresponding to each individual in the population.
[0095] Optionally, after each exploration, out-of-bounds processing can be performed on the individuals after the exploration to ensure that the training process is effective.
[0096] In the prior art, the Adam optimizer is often used to optimize the BP neural network. Although it has a faster speed, the Adam optimizer not only easily causes the training to fall into the local optimum, but also may cause poor training accuracy, so that the machine learning model ultimately cannot complete the predetermined task, and thus cannot accurately predict the charging pile power load. Therefore, the embodiment of the present invention provides an algorithm for collaborative search of multiple populations to solve the problems of the prior art while improving the convergence speed of the algorithm, and ultimately improving the accuracy of charging pile power load prediction.
[0097] In an embodiment of the present invention, according to the charging pile power load characteristics and the total charging pile power load corresponding to the charging pile power load characteristics, obtaining the fitness value corresponding to each individual in the population includes:
[0098] For each individual in the population, the hyperparameters contained in the individual are applied to the machine learning model, the charging pile power load characteristics are used as the actual input of the machine learning model, and the actual output of the machine learning model is obtained;
[0099] Using the charging pile power load characteristics as the actual input of the machine learning model can include: the charging pile power load characteristics corresponding to a certain time period (the embodiment of the present invention uses hours to divide each day, such as: 0 o'clock-1 o'clock, 1 o'clock-2 o'clock, and so on) and the total power load of the charging pile in the same period of the previous H days (such as 15 days, 30 days) together form a vector feature, and use the vector feature as the actual input of the machine learning model. It is worth noting that in the process of forming vector features, non-numerical data needs to be digitized, and the features that do not change with time in the same day remain unchanged (such as whether it is a holiday), and the features that change with time use the average value (such as the temperature in a certain time period), so that the machine learning model can learn both spatial features and temporal features, which can effectively improve the charging pile load prediction method.
[0100] The total charging pile power load corresponding to the charging pile power load characteristic is used as the expected output of the machine learning model, and the error function value corresponding to the machine learning model is obtained according to the actual output of the machine learning model and the expected output of the machine learning model;
[0101] Optionally, the error function value may be obtained by a root mean square error function or a cross entropy error function, but may also be obtained by using other error functions.
[0102] After adding the error function value corresponding to the machine learning model to the preset constant term, the fitness value corresponding to the individual is obtained, and each individual is traversed to obtain the fitness value corresponding to each individual in the population.
[0103] In the embodiment of the present invention, based on the current number of training times, the adaptive segmentation ratio is obtained, including:
[0104] Based on the current number of training times, the first split ratio corresponding to the first sub-population is obtained as:
[0105]
[0106] Wherein, P1 represents the first segmentation ratio, α1 represents the proportional attenuation control factor (for example, α1 can be a number between (0, 0.2)), π represents the circumference, T represents the preset maximum number of training times, t represents the current number of training times, and P 1min Indicates the minimum value corresponding to the first segmentation ratio;
[0107] Based on the current number of training times, the second split ratio corresponding to the second sub-population is obtained as:
[0108]
[0109] Wherein, P2 represents the second segmentation ratio, α2 represents the ratio growth control factor (for example, α2 can be a number between (-0.2, 0)), P 2max Indicates the maximum value corresponding to the second segmentation ratio;
[0110] According to the first segmentation ratio corresponding to the first sub-population and the second segmentation ratio corresponding to the second sub-population, the third segmentation ratio corresponding to the third sub-population is obtained as follows:
[0111] P3=1-P3-P2
[0112] Wherein, P3 represents the third division ratio;
[0113] The first segmentation ratio, the second segmentation ratio and the third segmentation ratio are collectively used as an adaptive segmentation ratio.
[0114] The adaptive segmentation ratio provided in the embodiment of the present invention can gradually reduce the first segmentation ratio and gradually increase the second segmentation ratio, so that the optimal area exploration can be quickly realized while traversing more positions in better directions, thereby improving the ability to find the optimal solution and improving the algorithm convergence accuracy.
[0115] It is worth noting that the proportional attenuation control factor, the proportional growth control factor, the minimum value corresponding to the first segmentation ratio, and the minimum value corresponding to the third segmentation ratio can be set according to actual needs, but it is necessary to ensure that the sum of the first segmentation ratio and the second segmentation ratio is less than 1, and the third segmentation ratio is not 0.
[0116] In the embodiment of the present invention, dividing the sorted population into a first sub-population, a second sub-population, and a third sub-population according to the adaptive segmentation ratio includes:
[0117] Multiplying the first segmentation ratio in the adaptive segmentation ratio by the total number of individuals in the population to obtain a first multiplication number, and rounding the first multiplication number to obtain a first total number of individuals;
[0118] Based on the total number of the first individuals, individuals are taken out from the sorted population one by one to form the first sub-population;
[0119] Multiplying the second split ratio in the adaptive split ratio by the total number of individuals in the population to obtain a second multiplied number, and rounding the second multiplied number to obtain a second total number of individuals;
[0120] Based on the second total number of individuals, individuals are taken out from the population one by one to form a second sub-population;
[0121] Multiplying the third segmentation ratio in the adaptive segmentation ratio by the total number of individuals in the population to obtain a third multiplied number, and rounding the third multiplied number to obtain a third total number of individuals;
[0122] Determine whether the total number of the third individuals is greater than the total number of remaining individuals in the population. If so, randomly generate new individuals until the sum of the total number of remaining individuals in the population and the total number of new individuals is the same as the total number of the third individuals, and the remaining individuals in the population and the new individuals are combined into a third sub-population. Otherwise, based on the total number of the third individuals, take individuals out of the population one by one to form a third sub-population.
[0123] In the embodiment of the present invention, for the first sub-population, a sine-cosine optimal region exploration strategy is used to make the first individual in the first sub-population explore in the solution space, and obtain the first individual after the exploration, including:
[0124] Based on the current number of training times, the search direction control factor is obtained as:
[0125]
[0126] Where γ represents the search direction control factor, a represents a positive constant, T represents the preset maximum number of training times, and t represents the current number of training times;
[0127] For the first individual in the first subpopulation, randomly match it with another first individual to obtain a first paired individual corresponding to the first individual;
[0128] The fitness value corresponding to the first individual and the fitness value corresponding to the first paired individual are obtained respectively, and the position update factor is obtained according to the fitness value corresponding to the first individual and the fitness value corresponding to the first paired individual thereof:
[0129]
[0130] Where σ represents the position update factor, f i represents the fitness value corresponding to the first individual of the i-th ipei represents the fitness value of the first paired individual corresponding to the first individual of the ith individual, ε represents the preset constant term, and is set to 0.00001; exp represents an exponential function with the natural constant e as the base;
[0131] According to the search direction control factor and the position update factor, the first individual in the first subpopulation is explored in the solution space, and the first individual after the exploration is obtained as:
[0132]
[0133] in, represents the d-th dimension hyperparameter of the first individual of the ith training process, represents the d-th dimension hyperparameter of the first individual after the i-th exploration, i=1,2,…,K, K represents the total number of the first individual, j=1,2,…,D, D represents the total dimension of the hyperparameter in the individual, r1 represents a random number between [0,2π], r2 represents a random number between [0,2], r3 represents a random number between (0,1), represents the d-th dimension hyperparameter of the optimal individual in the first individual.
[0134] The sine-cosine optimal area exploration strategy provided in the embodiment of the present invention can adaptively adjust the position update factor of the first individual according to the relationship between its own position and the optimal position, and adaptively adjust the search direction control factor, which can effectively realize the learning of the optimal position information, and can enable the algorithm to have stronger search capabilities in the early stage, which helps to jump out of the local optimum, and will not affect the search accuracy in the later stage of the algorithm, which greatly avoids the technical problems existing in the prior art.
[0135] In the embodiment of the present invention, for the second sub-population, a competitive learning coordinated exploration strategy is adopted to enable the second individual in the second sub-population to explore in the solution space, and the second individual after exploration is obtained, including:
[0136] For the second individual in the second subpopulation, randomly match the second individual with a first individual to obtain a second paired individual; and randomly match the second individual with another second individual having a larger fitness value to obtain a third paired individual;
[0137] According to the second paired individuals, the first learning factor is obtained as follows:
[0138]
[0139] Among them, c1 represents the first learning factor, f mrepresents the fitness value corresponding to the mth second individual, f mpei2 represents the fitness value corresponding to the second paired individual, and ε represents the preset constant term;
[0140] According to the third paired individual, the second learning factor is obtained as follows:
[0141] c2=exp(f mpei3 -f m )
[0142] Among them, c2 represents the second learning factor, f mpei3 Indicates the fitness value corresponding to the third paired individual;
[0143] According to the second paired individual, the third paired individual, the first learning factor and the second learning factor, the second individual in the second subpopulation is explored in the solution space, and the second individual after the exploration is obtained as follows:
[0144]
[0145] in, represents the j-th dimension hyperparameter of the m-th second individual in the t-th training process, m = 1, 2, ..., M, M represents the total number of second individuals, represents the j-th dimension hyperparameter of the second individual after the m-th exploration, ω represents the inertia weight, r4 represents a random number between (0,1), represents the j-th dimension hyperparameter of the second paired individual, r5 represents a random number between (0,1), represents the j-th dimension hyperparameter of the third paired individual.
[0146] It is worth noting that the second individual with the largest fitness value does not have a corresponding third paired individual, and the third paired individual can be matched for it from the first individual. And in order to ensure that a better position is learned, the paired individuals should be obtained using the first sub-population, the second sub-population, and the third sub-population at the beginning of this training.
[0147] The competitive learning coordinated exploration strategy provided by the embodiment of the present invention can enable the second individual to compete with other second individuals for a better position while learning a better position, which is more conducive to the development of local areas and improves the ability to explore better solutions.
[0148] In the embodiment of the present invention, for the third sub-population, a random crossover variation learning detection strategy is adopted to enable the third individual in the third sub-population to explore in the solution space, and the third individual after exploration is obtained, including:
[0149] For the third individual in the third subpopulation, randomly matching the third individual with a second individual to obtain a fourth paired individual;
[0150] According to the fourth paired individual and the optimal individual, the third individual in the third subpopulation is explored in the solution space, and the third individual after exploration is obtained as:
[0151]
[0152] in, represents the j-th dimension hyperparameter of the n-th third individual in the t-th training process, represents the j-th dimension hyperparameter of the third individual after the n-th exploration, ρ represents the random cross-variation adjustment coefficient between (0,2), ω represents the inertia weight, and r6 represents a random number between (-1,1). represents the j-th dimension hyperparameter of the fourth paired individual, Indicates except The j-th dimension hyperparameter of a random third individual other than represents the j-th dimension hyperparameter of the optimal individual, and r7 represents a random number between (0,1).
[0153] The random crossover mutation learning detection strategy provided by the embodiment of the present invention can control the third individual to mutate, so that the third individual can better jump out of the local optimal solution and improve the possibility of learning the optimal solution.
[0154] The embodiments of the present invention can effectively improve the hyperparameter optimization effect of the machine learning model through the above three strategies, and ultimately improve the accuracy of charging pile load prediction.
[0155] In the embodiment of the present invention, judging whether the iteration end condition is met includes:
[0156] Determine whether the current number of training times is equal to or greater than the maximum number of training times. If so, determine that the iteration end condition is met, otherwise determine that the iteration end condition is not met.
[0157] It is worth noting that the above-mentioned iteration termination condition is only a preferred implementation of the embodiment of the present invention, and the training may also be terminated when the error function value of a certain individual is less than a certain threshold value during multiple consecutive training processes.
[0158] Those skilled in the art will readily appreciate other embodiments of the present invention after considering the specification and practicing the invention disclosed herein. The present invention is intended to cover any variations, uses or adaptations of the present invention that follow the general principles of the present invention and include common knowledge or customary techniques in the art that are not disclosed by the present invention. It should be understood that the present invention is not limited to the precise structure described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from the scope thereof. The scope of the present invention is limited only by the appended claims.
Claims
1. A charging pile power load prediction method based on machine learning, characterized in that: include: Obtaining charging pile power load characteristics at consecutive time points in the area to be predicted and the total charging pile power load corresponding to the charging pile power load characteristics; Using a machine learning model to learn the data relationship between the charging pile power load characteristics and the charging pile power total load corresponding to the charging pile power load characteristics, to obtain a charging pile power load prediction model; Acquire the charging pile power load characteristics to be predicted corresponding to the area to be predicted, and use the charging pile power load prediction model to identify the charging pile power load characteristics to be predicted, so as to obtain the charging pile power load prediction result; A machine learning model is used to learn the data relationship between the charging pile power load characteristics and the charging pile power total load corresponding to the charging pile power load characteristics to obtain a charging pile power load prediction model, including: Constructing a machine learning model, and randomly initializing parameters of the machine learning model to initialize a population; According to the charging pile power load characteristics and the total charging pile power load corresponding to the charging pile power load characteristics, obtaining the fitness value corresponding to each individual in the population, and arranging the individuals in the population in descending order according to the fitness values; Based on the current number of training times, an adaptive segmentation ratio is obtained, and the sorted population is divided into a first sub-population, a second sub-population, and a third sub-population according to the adaptive segmentation ratio; For the first sub-population, the sine-cosine optimal region exploration strategy is used to make the first individual in the first sub-population explore in the solution space, and the first individual after the exploration is obtained; For the second sub-population, a competitive learning coordinated exploration strategy is adopted to enable the second individual in the second sub-population to explore in the solution space, and obtain the second individual after exploration; For the third sub-population, a random crossover variation learning detection strategy is adopted to make the third individual in the third sub-population explore in the solution space, and obtain the third individual after exploration; The first individual after exploration, the second individual after exploration, and the third individual after exploration are remixed into one population; Determine whether the iteration end condition is met. If so, obtain the optimal individual based on the remixed population, and use the optimal individual as the final hyperparameter of the machine learning model to obtain the charging pile power load prediction model. Otherwise, return to the step of obtaining the fitness value corresponding to each individual in the population.
2. The charging pile power load prediction method based on machine learning according to claim 1 is characterized in that: Obtain the charging pile power load characteristics of the area to be predicted at continuous time points and the total charging pile power load corresponding to the charging pile power load characteristics, including: Taking each hour of each day as a unit, the charging pile power load characteristics of the area to be predicted at continuous time points are collected, and the total charging pile power load corresponding to the charging pile power load characteristics in each hour is collected.
3. The charging pile power load prediction method based on machine learning according to claim 1 is characterized in that: According to the charging pile power load characteristics and the total charging pile power load corresponding to the charging pile power load characteristics, the fitness value corresponding to each individual in the population is obtained, including: For each individual in the population, the hyperparameters contained in the individual are applied to the machine learning model, the charging pile power load characteristics are used as the actual input of the machine learning model, and the actual output of the machine learning model is obtained; The total charging pile power load corresponding to the charging pile power load characteristic is used as the expected output of the machine learning model, and the error function value corresponding to the machine learning model is obtained according to the actual output of the machine learning model and the expected output of the machine learning model; After adding the error function value corresponding to the machine learning model to the preset constant term, the fitness value corresponding to the individual is obtained, and each individual is traversed to obtain the fitness value corresponding to each individual in the population.
4. The charging pile power load prediction method based on machine learning according to claim 1 is characterized in that: Based on the current number of training times, get the adaptive segmentation ratio, including: Based on the current number of training times, the first split ratio corresponding to the first sub-population is obtained as: Among them, P1 represents the first segmentation ratio, α1 represents the proportional attenuation control factor, π represents the circumference, T represents the preset maximum number of training times, t represents the current number of training times, P 1min Indicates the minimum value corresponding to the first segmentation ratio; Based on the current number of training times, the second split ratio corresponding to the second sub-population is obtained as: Among them, P2 represents the second segmentation ratio, α2 represents the proportional growth control factor, and P 2max Indicates the maximum value corresponding to the second segmentation ratio; According to the first segmentation ratio corresponding to the first sub-population and the second segmentation ratio corresponding to the second sub-population, the third segmentation ratio corresponding to the third sub-population is obtained as follows: P3=1-P3-P2 Wherein, P3 represents the third division ratio; The first segmentation ratio, the second segmentation ratio and the third segmentation ratio are collectively used as an adaptive segmentation ratio.
5. The charging pile power load prediction method based on machine learning according to claim 4 is characterized in that: The sorted population is divided into a first sub-population, a second sub-population and a third sub-population according to the adaptive segmentation ratio, including: Multiplying the first segmentation ratio in the adaptive segmentation ratio by the total number of individuals in the population to obtain a first multiplication number, and rounding the first multiplication number to obtain a first total number of individuals; Based on the total number of the first individuals, individuals are taken out from the sorted population one by one to form the first sub-population; Multiplying the second split ratio in the adaptive split ratio by the total number of individuals in the population to obtain a second multiplied number, and rounding the second multiplied number to obtain a second total number of individuals; Based on the second total number of individuals, individuals are taken out from the population one by one to form a second sub-population; Multiplying the third segmentation ratio in the adaptive segmentation ratio by the total number of individuals in the population to obtain a third multiplied number, and rounding the third multiplied number to obtain a third total number of individuals; Determine whether the total number of the third individuals is greater than the total number of remaining individuals in the population. If so, randomly generate new individuals until the sum of the total number of remaining individuals in the population and the total number of new individuals is the same as the total number of the third individuals, and the remaining individuals in the population and the new individuals are combined into a third sub-population. Otherwise, based on the total number of the third individuals, take individuals out of the population one by one to form a third sub-population.
6. The charging pile power load prediction method based on machine learning according to claim 1 is characterized in that: For the first sub-population, the sine-cosine optimal region exploration strategy is used to make the first individual in the first sub-population explore in the solution space, and the first individual after the exploration is obtained, including: Based on the current number of training times, the search direction control factor is obtained as: Where γ represents the search direction control factor, a represents a positive constant, T represents the preset maximum number of training times, and t represents the current number of training times; For the first individual in the first subpopulation, randomly match it with another first individual to obtain a first paired individual corresponding to the first individual; The fitness value corresponding to the first individual and the fitness value corresponding to the first paired individual are obtained respectively, and the position update factor is obtained according to the fitness value corresponding to the first individual and the fitness value corresponding to the first paired individual thereof: Where σ represents the position update factor, f i represents the fitness value corresponding to the first individual of the i-th ipei represents the fitness value of the first paired individual corresponding to the first individual of the ith individual, ε represents the preset constant term, and is set to 0.00001; exp represents an exponential function with the natural constant e as the base; According to the search direction control factor and the position update factor, the first individual in the first subpopulation is explored in the solution space, and the first individual after the exploration is obtained as: in, represents the d-th dimension hyperparameter of the first individual of the ith training process, represents the d-th dimension hyperparameter of the first individual after the i-th exploration, i=1,2,…,K, K represents the total number of the first individual, j=1,2,…,D, D represents the total dimension of the hyperparameter in the individual, r1 represents a random number between [0,2π], r2 represents a random number between [0,2], r3 represents a random number between (0,1), represents the d-th dimension hyperparameter of the optimal individual in the first individual.
7. The charging pile power load prediction method based on machine learning according to claim 6 is characterized in that: For the second sub-population, a competitive learning coordinated exploration strategy is adopted to enable the second individual in the second sub-population to explore in the solution space, and the second individual after exploration is obtained, including: For the second individual in the second subpopulation, randomly match the second individual with a first individual to obtain a second paired individual; and randomly match the second individual with another second individual having a larger fitness value to obtain a third paired individual; According to the second paired individuals, the first learning factor is obtained as follows: Among them, c1 represents the first learning factor, f m represents the fitness value corresponding to the mth second individual, f mpei2 represents the fitness value corresponding to the second paired individual, and ε represents the preset constant term; According to the third paired individual, the second learning factor is obtained as follows: c2=exp(f mpei3 -f m ) Among them, c2 represents the second learning factor, f mpei3 Indicates the fitness value corresponding to the third paired individual; According to the second paired individual, the third paired individual, the first learning factor and the second learning factor, the second individual in the second subpopulation is explored in the solution space, and the second individual after the exploration is obtained as follows: in, represents the j-th dimension hyperparameter of the m-th second individual in the t-th training process, m = 1, 2, ..., M, M represents the total number of second individuals, represents the j-th dimension hyperparameter of the second individual after the m-th exploration, ω represents the inertia weight, r4 represents a random number between (0,1), represents the j-th dimension hyperparameter of the second paired individual, r5 represents a random number between (0,1), represents the j-th dimension hyperparameter of the third paired individual.
8. The charging pile power load prediction method based on machine learning according to claim 7 is characterized in that: For the third sub-population, a random crossover variation learning detection strategy is used to make the third individual in the third sub-population explore in the solution space, and the third individual after exploration is obtained, including: For the third individual in the third subpopulation, randomly matching the third individual with a second individual to obtain a fourth paired individual; According to the fourth paired individual and the optimal individual, the third individual in the third subpopulation is explored in the solution space, and the third individual after exploration is obtained as: in, represents the j-th dimension hyperparameter of the n-th third individual in the t-th training process, represents the j-th dimension hyperparameter of the third individual after the n-th exploration, ρ represents the random cross-variation adjustment coefficient between (0,2), ω represents the inertia weight, r6 represents a random number between (-1,1), represents the j-th dimension hyperparameter of the fourth paired individual, Indicates except The j-th dimension hyperparameter of a random third individual other than represents the j-th dimension hyperparameter of the optimal individual, and r7 represents a random number between (0,1).
9. The charging pile power load prediction method based on machine learning according to claim 8 is characterized in that: Determine whether the iteration end conditions are met, including: Determine whether the current number of training times is equal to or greater than the maximum number of training times. If so, determine that the iteration end condition is met, otherwise determine that the iteration end condition is not met.
Citation Information
Cited By
New energy automobile charging pile load prediction method and system based on machine learning
CN121536200A
New energy vehicle charging pile load prediction method and system based on machine learning
CN121536200B