Charging station power optimization method, device and equipment based on zebra optimization algorithm
By using the zebra optimization algorithm and the long-short-term memory network model in the charging station, the charging strategy is dynamically adjusted to solve the problems of unstable charging speed and long waiting time, achieving more efficient charging and a better user experience.
Patent Information
- Application Number
- CN202410944517.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-15
- Publication Date
- 2024-10-18
- Estimated Expiration
- 2044-07-15
AI Technical Summary
The charging speed of existing charging stations is unstable and user waiting times are too long. Existing optimization methods fail to make full use of historical data for accurate prediction and optimization.
A method based on the zebra optimization algorithm is used to preprocess charging station data, input the long short-term memory network model to predict charging needs, and use the zebra optimization algorithm to optimize power distribution and dynamically adjust the charging strategy to improve charging efficiency.
It improves charging efficiency, reduces user waiting time, and improves user experience.
Smart Images

Figure CN118494259B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of charging station resource optimization, and in particular to a charging station power optimization method, device and equipment based on a zebra optimization algorithm. Background Art
[0002] Currently, with the popularity of electric vehicles, the demand for public charging stations has increased dramatically. In the existing technology, traditional charging strategies usually rely on fixed rules or simple scheduling algorithms, which cannot dynamically adapt to changes in charging demand. In addition, most of the existing optimization methods do not make full use of historical data for accurate prediction and optimization, making unstable charging speed and long waiting time for users the main problems of charging stations. Summary of the invention
[0003] In view of the above-mentioned shortcomings of the prior art, the present invention provides a charging station power optimization method, device and equipment based on the zebra optimization algorithm, which are used to solve the problems of unstable charging speed of charging stations and long waiting time for users.
[0004] To achieve the above-mentioned purpose and other related purposes, the present invention provides a charging station power optimization method based on a zebra optimization algorithm, the method comprising: acquiring charging station data, the charging station data at least comprising charging pile data and user behavior data; preprocessing the charging station data to obtain normalized time series feature data; inputting the time series feature data into a long short-term memory network model to predict charging demand; performing power allocation optimization using a zebra optimization algorithm according to the predicted charging demand to obtain an optimal power allocation scheme; wherein, an initial population is randomly generated, each zebra individual in the initial population represents a power allocation scheme, and each scheme includes power allocation values for different charging piles; calculating the fitness value of each zebra individual according to the charging speed and waiting time; updating the position of each zebra individual according to the fitness value of each zebra individual; the algorithm terminates when the maximum number of iterations is reached or the fitness value change is less than a preset threshold, and the optimal power allocation scheme is obtained.
[0005] In one embodiment of the present invention, the charging station data is preprocessed to obtain normalized time series feature data, including: supplementing missing data in the charging station data by interpolation or mean filling; detecting abnormal data in the charging station data by statistical methods; checking whether the timestamps of the charging station data are continuous and non-repetitive, and checking whether the timestamps of different data sources in the charging station data are aligned; normalizing the charging station data, and dividing the time according to a fixed step size to obtain time series feature data.
[0006] In one embodiment of the present invention, the inputting of the time series feature data into a trained long short-term memory network model to predict charging demand includes: inputting the time series feature data into the input layer of the long short-term memory network model; the LSTM layer of the long short-term memory network model extracts features from the time series feature data and outputs a hidden state; the fully connected layer of the long short-term memory network model converts the hidden state into a prediction result; and the output layer of the long short-term memory network model outputs a predicted value of the charging demand.
[0007] In one embodiment of the present invention, the training method of the long short-term memory network model includes: dividing the normalized time series feature data into a training set and a validation set; inputting the training set to train the long short-term memory network model, selecting the mean square error as the loss function, and using the Adam optimizer to update the parameters; setting the number of training rounds and batch size, and updating the parameters of the long short-term memory network model through the back propagation algorithm; and using the validation set to evaluate the performance of the long short-term memory network model.
[0008] In one embodiment of the present invention, the power allocation is optimized using the zebra optimization algorithm according to the predicted charging demand to obtain the optimal power allocation scheme, including: randomly generating an initial population, each zebra individual in the initial population represents a power allocation scheme, and each scheme includes power allocation values for different charging piles; calculating the fitness value of each zebra individual according to the charging speed and waiting time; updating the position of each zebra individual according to the fitness value of each zebra individual; when the maximum number of iterations is reached or the fitness value change is less than a preset threshold, the algorithm terminates to obtain the optimal power allocation scheme.
[0009] In one embodiment of the present invention, the fitness value of each zebra individual is calculated according to the charging speed and the waiting time, including: setting the optimal goal of the fitness value of each zebra individual to maximize the charging speed and minimize the waiting time, and the fitness value of each zebra individual is expressed as: ; Among them, f(x) represents the fitness value, x represents the zebra individual, α and β represent the weight parameters respectively, S(x) represents the charging speed of the zebra individual, and T(x) represents the waiting time of the zebra individual.
[0010] In one embodiment of the present invention, the updating of the position of each zebra individual according to the fitness value of each zebra individual includes: setting an update rule, including: each zebra individual adjusts its position according to the fitness value of its neighboring zebra individual, tending to the direction with higher fitness value; using random perturbations to increase the diversity of the population to avoid falling into a local optimal solution; the position update formula of each zebra individual is: ;in, represents the latest position of zebra individual i, represents the current position of zebra individual i, γ represents the trend factor between [0,1], represents the current optimal zebra individual position, represents the perturbation factor, and rand() represents a random number from the set {1, 2}.
[0011] To achieve the above-mentioned purpose and other related purposes, the present invention provides a charging station power optimization device based on the zebra optimization algorithm, the device comprising: an acquisition module, used to acquire charging station data, the charging station data at least including charging pile data and user behavior data; a preprocessing module, used to preprocess the charging station data to obtain normalized time series feature data; a prediction module, used to input the time series feature data into a long short-term memory network model to predict charging demand; an optimization module, used to use the zebra optimization algorithm to optimize power allocation according to the predicted charging demand, and obtain an optimal power allocation scheme; wherein, an initial population is randomly generated, each zebra individual in the initial population represents a power allocation scheme, and each scheme includes power allocation values for different charging piles; the fitness value of each zebra individual is calculated according to the charging speed and waiting time; the position of each zebra individual is updated according to the fitness value of each zebra individual; when the maximum number of iterations is reached or the fitness value change is less than a preset threshold, the algorithm terminates, and the optimal power allocation scheme is obtained.
[0012] To achieve the above-mentioned purpose and other related purposes, the present invention provides a computer device, which includes: a memory and a processor; the memory stores a computer program, and the processor executes the computer program to implement the above-mentioned method.
[0013] To achieve the above object and other related objects, the present invention provides a computer-readable storage medium having a computer program stored thereon, which implements the above method when executed by a processor.
[0014] As described above, a charging station power optimization method, device and equipment based on the zebra optimization algorithm of the present invention obtains charging station data, and the charging station data at least includes charging pile data and user behavior data; pre-processes the charging station data to obtain normalized time series feature data; inputs the time series feature data into a long short-term memory network model to predict charging demand; uses the zebra optimization algorithm to optimize power allocation according to the predicted charging demand to obtain an optimal power allocation scheme; wherein, an initial population is randomly generated, and each zebra individual in the initial population represents a power allocation scheme, and each scheme includes power allocation values for different charging piles; the fitness value of each zebra individual is calculated according to the charging speed and waiting time; the position of each zebra individual is updated according to the fitness value of each zebra individual; when the maximum number of iterations is reached or the fitness value change is less than a preset threshold, the algorithm terminates to obtain the optimal power allocation scheme.
[0015] It has the following beneficial effects:
[0016] This application utilizes a charging station power optimization solution based on the zebra optimization algorithm. It accurately predicts future charging needs through a deep learning model, and dynamically adjusts the power allocation strategy in combination with the zebra optimization algorithm, which can improve charging efficiency, reduce user waiting time, and enhance user experience. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] Figure 1 Shown is a flow chart of a charging station power optimization method based on a zebra optimization algorithm in one embodiment of the present invention.
[0018] Figure 2 Shown is a module schematic diagram of a charging station power optimization device based on a zebra optimization algorithm in one embodiment of the present invention.
[0019] Figure 3 Shown is a schematic diagram of the structure of a computer device in one embodiment of the present invention. DETAILED DESCRIPTION
[0020] The following describes the embodiments of the present invention by specific examples, and those skilled in the art can easily understand other advantages and effects of the present invention from the contents disclosed in this specification. The present invention can also be implemented or applied through other different specific embodiments, and the details in this specification can also be modified or changed in various ways based on different viewpoints and applications without departing from the spirit of the present invention. It should be noted that the following embodiments and features in the embodiments can be combined with each other without conflict.
[0021] It should be noted that the illustrations provided in the following embodiments are only schematic illustrations of the basic concept of the present invention, and thus the drawings only show components related to the present invention rather than being drawn according to the number, shape and size of components in actual implementation. In actual implementation, the type, quantity and proportion of each component may be changed arbitrarily, and the component layout may also be more complicated.
[0022] like Figure 1 As shown, a flow chart of a charging station power optimization method based on a zebra optimization algorithm in one embodiment of the present invention is shown. As shown in the figure, the method includes:
[0023] Step S1: Acquire charging station data, where the charging station data at least includes charging pile data and user behavior data.
[0024] In one embodiment of the present application, the charging station data includes historical data and / or real-time data.
[0025] The charging pile data includes real-time data including charging time, current, and voltage obtained from the charging pile. The charging time indicates the start and end time of each charging, and the data format is a timestamp; the current indicates the current value at each time point in the charging process, in amperes (A); the voltage indicates the voltage value at each time point in the charging process, in volts (V). These data can be obtained through the built-in sensors and control modules of the charging pile.
[0026] The user behavior data includes the user's charging behavior recorded by the user management system, such as the user's charging frequency, charging period, charging duration, etc.
[0027] Step S2: pre-processing the charging station data to obtain normalized time series feature data.
[0028] In one embodiment of the present application, step S2 includes:
[0029] Step S21: supplement the missing data in the charging station data by using interpolation or mean filling.
[0030] In short, the missing data in the charging station data can be supplemented by interpolation or mean filling. For example, if the current data at certain time points is missing, the current values at the previous and next time points can be used for linear interpolation.
[0031] ;
[0032] Among them, I t Indicates missing time The current value, I t-1 and I t+1 Respectively represent the current values before and after.
[0033] Step S22: using a statistical method to detect abnormal data in the charging station data.
[0034] Specifically, a statistical method is used to detect outliers, such as the 3-times standard deviation method. If the current or voltage value of a data point exceeds the range of 3-times standard deviation of the mean, it is considered an outlier.
[0035] Outlier judgment = |x i -μ|>3σ;
[0036] Among them, x i is the data point, μ is the data mean, and σ is the standard deviation.
[0037] Step S23: Check whether the timestamps of the charging station data are continuous and non-repetitive, and check whether the timestamps of different data sources in the charging station data are aligned.
[0038] In short, this step detects the consistency of the charging station data. In order to ensure the continuity of the charging station data, it should be ensured that the timestamps are continuous and non-repetitive, and check whether the timestamps of different data sources in the charging station data are aligned. In addition, the rationality of the charging station data is detected. For example, the current should not be negative and the voltage should be within a reasonable range.
[0039] Step S24: normalizing the charging station data and dividing the time by a fixed step size to obtain time series feature data.
[0040] For example, the charging station data is normalized to eliminate the dimension effect, such as current and voltage data, so that the data can be processed on the same scale. The formula is as follows:
[0041] ;
[0042] Among them, x is the original data, x' is the normalized data, min(x) and max(x) are the minimum and maximum values of the data respectively.
[0043] Then, the continuous time series data is segmented for input into the deep learning model. Each segment of data can contain a fixed number of time steps, for example, each segment contains 60 time steps (such as 60 minutes) of data. For the data of each charging pile, the current and voltage values of 60 time steps are extracted as input features, and the time series feature data after normalization is (batch_size, 60, features), where features represents features, such as current, voltage, charging time, etc. For example, 2 in (batch_size, 60, 2) represents two features, current and voltage.
[0044] In some feasible embodiments, assume that a charging station has recorded the following data in the past month:
[0045] Charging time: 2023-09-01 08:00:00 to 2023-09-01 09:00:00;
[0046] Current value: 10A, 11A, 9A, missing, 12A, 15A;
[0047] Voltage: 220V, 221V, 219V, 220V, 222V, 223V
[0048] 1) Missing value processing: For missing current values, linear interpolation is performed using the current values at the previous and next time points: .
[0049] 2) Outlier processing: Assuming the mean value of the current is 11A and the standard deviation is 2A, the range of 3 times the standard deviation is [5A, 17A]. All data points are within this range, and there are no outliers.
[0050] 3) Data normalization:
[0051] The normalized current value is expressed as: I'=(I-9A) / (15A-9A);
[0052] The normalized voltage value is expressed as: V'=(V-219V) / (223V-219V).
[0053] 4) Time series segmentation: The data is segmented into 5-minute time steps, and each segment contains 12 time steps of data.
[0054] Through the above steps, data cleaning and preprocessing are completed to ensure data quality and lay the foundation for subsequent deep learning model training and zebra optimization algorithm design.
[0055] Step S3: Input the time series feature data into the long short-term memory network model to predict charging demand.
[0056] It should be noted that the preprocessed data is used to train the deep learning model to predict future charging demand. The selection of deep learning models is crucial for time series prediction, and the long short-term memory network (LSTM) can effectively capture long-term dependencies and short-term fluctuations in time series data.
[0057] Specifically, the method of step S3 includes: inputting the time series feature data into the input layer of the long short-term memory network model; the LSTM layer of the long short-term memory network model extracts features from the time series feature data and outputs a hidden state; the fully connected layer of the long short-term memory network model converts the hidden state into a prediction result; and the output layer of the long short-term memory network model outputs a predicted value of the charging demand.
[0058] For example, suppose that the time series feature data after normalization of the charging station data is (batch_size, 60, 2), where 2 represents the two features of current and voltage. The input layer receives the time series feature data with a data shape of (60, 2), the LSTM layer is set to 128 hidden units, and the output data shape is (batch_size, 128). The fully connected layer converts the 128-dimensional hidden state into a 1-dimensional predicted value, that is, the charging demand in the next time step.
[0059] In one embodiment of the present application, the training method of the long short-term memory network model includes:
[0060] A. Divide the normalized time series feature data into a training set and a validation set. For example, divide the normalized time series feature data into an 80% training set and a 20% validation set.
[0061] B. Input the training set to train the long short-term memory network model, select mean square error as the loss function, and use Adam optimizer to update parameters.
[0062] Specifically, the mean square error (MSE) is used as the loss function to optimize the accuracy of charging demand prediction.
[0063] ;
[0064] Where N is the number of samples, is the true value, is the predicted value.
[0065] In addition, this application also selects the Adam optimizer for parameter update, which has an adaptive learning rate and fast convergence speed. For example, the learning rate is set to 0.001.
[0066] C. Set the number of training rounds and batch size, and update the parameters of the long short-term memory network model through the back propagation algorithm. For example, set the number of training rounds to 100 and the batch size to 32.
[0067] D. Use the validation set to evaluate the performance of the LSTM network model. In short, use the training set to train the model, evaluate the model performance on the validation set after each round of training, and record the loss value.
[0068] Through the above steps, we can train a deep learning model that can predict future charging demand and provide accurate demand forecast data for subsequent power allocation optimization.
[0069] Step S4: Optimize power allocation using the zebra optimization algorithm according to the predicted charging demand to obtain the optimal power allocation solution.
[0070] Based on the predicted charging demand, this application designs a Zebra Optimization Algorithm (ZOA) for power allocation optimization. The Zebra Optimization Algorithm simulates the behavior of zebra groups, especially their collaborative strategies in the process of foraging and avoiding enemies, to find the optimal power allocation strategy to improve charging speed and reduce waiting time.
[0071] The zebra optimization algorithm comes from the behavior patterns of zebras in nature. When foraging, a group of zebras will make decisions based on the surrounding environment and the behavior of other zebras, forming a self-organizing optimization process.
[0072] Specifically, the steps to implement the zebra optimization algorithm are as follows:
[0073] Step S41: randomly generating an initial population, wherein each zebra individual in the initial population represents a power allocation scheme, and each scheme includes power allocation values for different charging piles.
[0074] For example, an initial population is randomly generated, such as a population size of 20, and each zebra individual represents a power allocation scheme. The initial scheme will randomly allocate power values and satisfy the total power constraint.
[0075] Step S42: Calculate the fitness value of each zebra individual according to the charging speed and waiting time.
[0076] In one embodiment of the present application, the method of step S42 includes:
[0077] The optimal goal of the fitness value of each zebra individual is to maximize the charging speed and minimize the waiting time. The fitness value of each zebra individual is expressed as:
[0078] ;
[0079] Among them, f(x) represents the fitness value, x represents the zebra individual, α and β represent the weight parameters, S(x) represents the charging speed of the zebra individual, and T(x) represents the waiting time of the zebra individual.
[0080] Usually the charging speed S(x) and waiting time T(x) are estimated through simulation or historical data. For example, total charging capacity: 5000 kWh, total charging time: 100 hours, total waiting time: 2000 minutes, number of users: 100 people, then the charging speed = 5000kWh / 100 hours = 50kWh / h, average waiting time = 2000 minutes / 100 people = 20 minutes. Assuming the fitness value is: f(x) = 0.7⋅ S(x)-0.3⋅ T(x), then its fitness value f(x) = 0.7⋅50-0.3⋅20=29.
[0081] It should be noted that the optimization scheme can be evaluated based on the most effective power allocation scheme. The adjustment methods of the zebra optimization algorithm include adjusting the population size, optimizing the weight parameters of the charging speed and the waiting time, so as to improve the power allocation scheme.
[0082] Step S43: Update the position of each zebra individual according to the fitness value of each zebra individual.
[0083] It should be noted that the positions of the zebras here can be understood as reflecting or representing the superior and inferior positions or rankings of the zebra individuals among the group. The superior and inferior position rankings will be updated according to the fitness value of each zebra individual so as to find the zebras with higher fitness values, that is, the optimal power allocation solution. Specifically, the method is as follows:
[0084] Set the update rules, including:
[0085] Each zebra individual adjusts its position according to the fitness value of its neighboring zebra individuals, tending to the direction with higher fitness value;
[0086] Use random perturbations to increase the diversity of the population and avoid falling into local optimal solutions;
[0087] The position update formula of each zebra individual is:
[0088] ;
[0089] in, represents the latest position of zebra individual i, represents the current position of zebra individual i, γ represents the trend factor between [0,1], represents the current optimal zebra individual position, represents the perturbation factor, and rand() represents a random number from the set {1, 2}.
[0090] Step S44: When the maximum number of iterations is reached or the fitness value change is less than a preset threshold, the algorithm terminates and an optimal power allocation solution is obtained.
[0091] For example, the maximum number of iterations is set to 100, or the method is terminated when the fitness value changes less than 0.01, so as to obtain the optimal zebra individual, that is, the optimal power allocation solution.
[0092] Through the above steps, the present application can obtain an optimal power allocation solution, maximize the charging efficiency of the charging station and reduce the user's waiting time.
[0093] For example, in one iteration, an individual in the initial population may represent the following power allocation scheme (unit: kW):
[0094] Charging pile 1:20, charging pile 2:30, charging pile 3:25, charging pile 4:15, charging pile 5:10.
[0095] After several iterations, the final optimal power allocation plan may become: charging pile 1:15, charging pile 2:35, charging pile 3:20, charging pile 4:20, charging pile 5:10.
[0096] In some feasible embodiments, the present application can conduct a system evaluation once a month, collect new data, adjust models and algorithms, and ensure continuous optimization. Based on user feedback, optimize charging strategies to improve user satisfaction. For example, if it is found that users have a long waiting time during peak hours, the number of charging piles can be increased or the charging strategy can be optimized to reduce the waiting time during peak hours.
[0097] Through the above method, the present application can continuously optimize the power allocation scheme of the charging station, effectively improve the charging efficiency, and reduce the user waiting time, thereby ensuring the efficient operation of the charging station and user satisfaction.
[0098] like Figure 2 As shown, a module schematic diagram of a charging station power optimization device based on a zebra optimization algorithm in an embodiment of the present invention is shown. As shown in the figure, the charging station power optimization device 200 based on the zebra optimization algorithm includes:
[0099] An acquisition module 201 is used to acquire charging station data, where the charging station data at least includes charging pile data and user behavior data;
[0100] A preprocessing module 202, used for preprocessing the charging station data to obtain normalized time series feature data;
[0101] Prediction module 203, used for inputting the time series characteristic data into a long short-term memory network model to predict charging demand;
[0102] The optimization module 204 is used to optimize the power allocation using the zebra optimization algorithm according to the predicted charging demand to obtain the optimal power allocation plan; wherein, an initial population is randomly generated, and each zebra individual in the initial population represents a power allocation plan, and each plan includes power allocation values for different charging piles; the fitness value of each zebra individual is calculated according to the charging speed and waiting time; the position of each zebra individual is updated according to the fitness value of each zebra individual; when the maximum number of iterations is reached or the fitness value change is less than a preset threshold, the algorithm is terminated to obtain the optimal power allocation plan.
[0103] It is understandable that the device 200 can achieve the following through the operation of each module: Figure 1 The charging station power optimization method based on the zebra optimization algorithm.
[0104] It should be noted that it should be understood that the division of the various modules of the above device is only a division of logical functions. In actual implementation, they can be fully or partially integrated into one physical entity, or they can be physically separated. And these modules can all be implemented in the form of software called by processing elements; they can also be all implemented in the form of hardware; some modules can also be implemented in the form of software called by processing elements, and some modules can be implemented in the form of hardware. For example, the optimization module 204 can be a separately established processing element, or it can be integrated in a chip of the above device. In addition, it can also be stored in the memory of the above device in the form of program code, and called and executed by a processing element of the above device. The function of the above optimization module 204. The implementation of other modules is similar. In addition, these modules can be fully or partially integrated together, or they can be implemented independently. The processing element described here can be an integrated circuit with signal processing capabilities. In the implementation process, each step of the above method or each module above can be completed by an integrated logic circuit of hardware in the processor element or instructions in the form of software.
[0105] For example, the above modules may be one or more integrated circuits configured to implement the above methods, such as one or more application specific integrated circuits (ASICs), or one or more digital signal processors (DSPs), or one or more field programmable gate arrays (FPGAs). For another example, when a module is implemented in the form of a processing element scheduling program code, the processing element may be a general-purpose processor, such as a central processing unit (CPU) or other processors that can call program code. For another example, these modules may be integrated together and implemented in the form of a system-on-a-chip (SOC).
[0106] like Figure 3 FIG. 1 is a schematic diagram showing the structure of a computer device in an embodiment of the present invention. As shown in the figure, the computer device 300 includes: a memory 301 and a processor 302. The memory 301 stores a computer program, and the processor 302 executes the computer program to implement the following Figure 1 The charging station power optimization method based on the zebra optimization algorithm.
[0107] The memory 301 may include a random access memory (RAM), and may also include a non-volatile memory (non-volatile memory), such as at least one disk memory.
[0108] The processor 302 can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, and discrete hardware components.
[0109] In one embodiment of the present invention, a computer-readable storage medium stores a data transmission program, which is executed by a processor to implement the following Figure 1 The charging station power optimization method based on the zebra optimization algorithm.
[0110] The computer-readable storage medium, as can be understood by ordinary technicians in this field, can be implemented by hardware related to the computer program. The aforementioned image processing program can be stored in a computer-readable storage medium. When the program is executed, the steps of the aforementioned method embodiments are executed; and the aforementioned storage medium includes: ROM, RAM, disk or optical disk and other media that can store program codes.
[0111] These computer programs can also be loaded onto a computer or other programmable data processing device to cause a series of operational steps to be executed on the computer or other programmable device to produce a computer-implemented process, so that the instructions executed on the computer or other programmable device provide instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.
[0112] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.
[0113] In summary, the present invention provides a charging station power optimization method, device and equipment based on the zebra optimization algorithm, which can effectively overcome the various shortcomings of the prior art and have high industrial utilization value.
[0114] The above embodiments are merely illustrative of the principles and effects of the present invention, and are not intended to limit the present invention. Anyone familiar with the art may modify or alter the above embodiments without departing from the spirit and scope of the present invention. Therefore, all equivalent modifications or alterations made by a person of ordinary skill in the art without departing from the spirit and technical concept disclosed by the present invention shall still be covered by the claims of the present invention.
Claims
1. A charging station power optimization method based on zebra optimization algorithm, It is characterized in that The method comprises: Acquire charging station data, where the charging station data at least includes charging pile data and user behavior data; Preprocessing the charging station data to obtain normalized time series feature data; Inputting the time series feature data into a long short-term memory network model to predict charging demand; According to the predicted charging demand, the zebra optimization algorithm is used to optimize the power allocation to obtain the optimal power allocation plan; wherein, an initial population is randomly generated, each zebra individual in the initial population represents a power allocation plan, and each plan includes power allocation values for different charging piles; the fitness value of each zebra individual is calculated according to the charging speed and the waiting time; the position of each zebra individual is updated according to the fitness value of each zebra individual; when the maximum number of iterations is reached or the fitness value change is less than a preset threshold, the algorithm is terminated to obtain the optimal power allocation plan; Among them, the optimal goal of the fitness value of each zebra individual is to maximize the charging speed and minimize the waiting time. The fitness value of each zebra individual is expressed as: ; Among them, f(x) represents the fitness value, x represents the zebra individual, α and β represent the weight parameters, S(x) represents the charging speed of the zebra individual, and T(x) represents the waiting time of the zebra individual; The updating of the position of each zebra individual according to the fitness value of each zebra individual includes: Set the update rules, including: Each zebra individual adjusts its position according to the fitness value of its neighboring zebra individuals, tending to the direction with higher fitness value; Use random perturbations to increase the diversity of the population and avoid falling into local optimal solutions; The position update formula of each zebra individual is: ; in, represents the latest position of zebra individual i, represents the current position of zebra individual i, γ represents the trend factor between [0,1], represents the current optimal zebra individual position, represents the perturbation factor, and rand() represents a random number from the set {1, 2}.
2. The charging station power optimization method based on the zebra optimization algorithm according to claim 1, It is characterized in that Preprocessing the charging station data to obtain normalized time series feature data includes: The missing data in the charging station data are supplemented by interpolation method; Using statistical methods to detect abnormal data in the charging station data; Checking whether the timestamps of the charging station data are continuous and non-repetitive, and checking whether the timestamps of different data sources in the charging station data are aligned; The charging station data is normalized, and time is divided according to a fixed step size to obtain time series feature data.
3. The charging station power optimization method based on the zebra optimization algorithm according to claim 1, It is characterized in that Inputting the time series feature data into a trained long short-term memory network model to predict charging demand includes: Inputting the time series feature data into the input layer of the long short-term memory network model; The LSTM layer of the long short-term memory network model extracts features from the time series feature data and outputs a hidden state; The fully connected layer of the long short-term memory network model converts the hidden state into a prediction result; The output layer of the long short-term memory network model outputs the predicted value of the charging demand.
4. The charging station power optimization method based on the zebra optimization algorithm according to claim 1 or 3, It is characterized in that The training method of the long short-term memory network model includes: Dividing the normalized time series feature data into a training set and a validation set; Input the training set to train the long short-term memory network model, select mean square error as the loss function, and use Adam optimizer to update parameters; Setting the number of training rounds and batch size, and updating the parameters of the long short-term memory network model through a back-propagation algorithm; The performance of the LSTM network model was evaluated using the validation set.
5. A charging station power optimization device based on zebra optimization algorithm, It is characterized in that The device comprises: An acquisition module, used to acquire charging station data, wherein the charging station data at least includes charging pile data and user behavior data; A preprocessing module, used for preprocessing the charging station data to obtain normalized time series feature data; A prediction module is used to input the time series feature data into a long short-term memory network model to predict charging demand; an optimization module is used to use a zebra optimization algorithm to optimize power allocation according to the predicted charging demand to obtain an optimal power allocation plan; wherein, an initial population is randomly generated, and each zebra individual in the initial population represents a power allocation plan, and each plan includes power allocation values for different charging piles; the fitness value of each zebra individual is calculated according to the charging speed and waiting time; the position of each zebra individual is updated according to the fitness value of each zebra individual; when the maximum number of iterations is reached or the fitness value change is less than a preset threshold, the algorithm is terminated to obtain the optimal power allocation plan; wherein, the optimal goal of the fitness value of each zebra individual is to maximize the charging speed and minimize the waiting time, and the fitness value of each zebra individual is expressed as: ; Wherein, f(x) represents the fitness value, x represents the zebra individual, α and β represent weight parameters respectively, S(x) represents the charging speed of the zebra individual, and T(x) represents the waiting time of the zebra individual; the updating of the position of each zebra individual according to the fitness value of each zebra individual includes: setting an update rule, including: each zebra individual adjusts its position according to the fitness value of its neighboring zebra individual, tending to the direction with higher fitness value; using random perturbations to increase the diversity of the population and avoid falling into a local optimal solution; the position update formula of each zebra individual is: ;in, represents the latest position of zebra individual i, represents the current position of zebra individual i, γ represents the trend factor between [0,1], represents the current optimal zebra individual position, represents the perturbation factor, and rand() represents a random number from the set {1, 2}.
6. A computer device, It is characterized in that The device comprises: a memory and a processor; the memory stores a computer program, and the processor executes the computer program to implement the method according to any one of claims 1 to 4.
7. A computer-readable storage medium, It is characterized in that A computer program is stored thereon, and when the computer program is executed by a processor, the method according to any one of claims 1 to 4 is implemented.
Citation Information
Patent Citations
Power supply control method and system of power distribution cabinet for intelligent charging pile
CN117901694A
Intelligent and efficient charging and discharging method and system for power battery of battery swap station
CN118195825A
