Heavy truck battery replacement method and system in virtual power plant scenario
Patent Information
- Application Number
- CN202311077471.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-08-25
- Publication Date
- 2026-09-08
- Estimated Expiration
- 2043-08-25
AI Technical Summary
[0002]近几年来,随着新能源汽车的快速发展,电动重卡逐渐进入公众视野,电动重卡由于其自身的工作性质,其装载的电池箱有着体积大、重量大、充电时间长的特点
[0028]The technical solution of this invention uses a genetic algorithm to optimize and control the battery charging strategy within the station while meeting users' battery swapping needs. The goal is to minimize the sum of the total charging cost and the total battery life loss cost within the station, with battery capacity as a constraint, thereby improving the charging efficiency of the charging and swapping station.
Smart Images

Figure CN117141286B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of heavy-duty truck battery swapping technology, and in particular to a method and system for heavy-duty truck battery swapping in a virtual power plant scenario. Background Technology
[0002] In recent years, with the rapid development of new energy vehicles, electric heavy-duty trucks have gradually entered the public eye. Due to their inherent working characteristics, electric heavy-duty trucks have battery packs that are large in size, heavy in weight, and have long charging times. Therefore, the charging mode will inevitably affect the development of electric heavy-duty trucks. Existing battery swapping stations for electric heavy-duty trucks improve their range by replacing the battery packs.
[0003] When selecting a battery swapping station, heavy-duty trucks need to consider factors such as the station's location, swapping time, equipment facilities, and service quality. At the same time, the battery swapping station needs to rationally schedule swapping times based on the heavy-duty truck's driving routes and loading / transportation plans to ensure smooth swapping without affecting delivery schedules. Summary of the Invention
[0004] The main objective of this invention is to provide a method for battery swapping of heavy-duty trucks in a virtual power plant scenario, which aims to improve the battery swapping efficiency of battery swapping stations and save costs.
[0005] To achieve the above objectives, the present invention proposes a heavy-duty truck battery swapping method in a virtual power plant scenario, comprising:
[0006] Obtain vehicle information;
[0007] Obtain charging pile information from battery swapping stations;
[0008] A power function model for the battery inside the charging pile is constructed based on the acquired vehicle information and charging pile information.
[0009] Establish a charging strategy optimization model, which includes an objective economic function and constraints.
[0010] Construct a fitness function based on the objective economic function;
[0011] The optimal solution for the fitness function is obtained using a genetic algorithm.
[0012] In one embodiment of this application, the vehicle information is collected in an Internet of Things (IoT) system, and the vehicle information includes: the number of vehicles, the estimated time for the vehicles to arrive at the battery swapping station, and the remaining battery power of the vehicle when it arrives at the swapping station.
[0013] In one embodiment of this application, the time-of-use electricity price information includes peak hours, normal hours, and valley hours.
[0014] In one embodiment of this application, the battery's charge function model is characterized as follows:
[0015]
[0016] Among them, B t+1 B represents the battery capacity at time t+1. t S represents the battery capacity at time t. t+1 Represents the battery state at time t+1, P represents the charging rate, and B represents the charging rate. max This is the maximum capacity of the battery.
[0017] In one embodiment of this application, before constructing the power function model of the battery within the charging pile, the method further includes establishing the charging state matrix of the charging pile.
[0018] The charging status of the charging pile is represented by S, where 0 indicates no charging and 1 indicates charging.
[0019] In one embodiment of this application, the target economic function is:
[0020] C all =C ele +C time +C loss
[0021] Among them, C all For the total cost, C ele For electricity costs, C time C represents the economic cost corresponding to the waiting time of heavy trucks at charging stations. loss Cost of battery wear and tear each time the battery begins to charge.
[0022] In one embodiment of this application, the fitness function is:
[0023] C all '=μ / [(C all -C all,min )+μ]
[0024] Where C all ' is the fitness function, μ is the fitness operator, and is a constant.
[0025] This invention also provides a heavy-duty truck battery swapping system in a virtual power plant scenario, comprising:
[0026] At least one processor; and
[0027] A memory storing program instructions, wherein the program instructions are configured to be executed by the at least one processor, the program instructions including instructions for performing the method as described above.
[0028] The technical solution of this invention uses a genetic algorithm to optimize and control the battery charging strategy within the station while meeting users' battery swapping needs. The goal is to minimize the sum of the total charging cost and the total battery life loss cost within the station, with battery capacity as a constraint, thereby improving the charging efficiency of the charging and swapping station. Attached Figure Description
[0029] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on the structures shown in these drawings without creative effort.
[0030] Figure 1 This is a basic flowchart of the virtual power plant heavy-duty truck battery swapping method of the present invention;
[0031] Figure 2 This is a schematic diagram illustrating the changes in matrix D in an embodiment of the present invention;
[0032] Figure 3 This is a schematic diagram illustrating the principle of single-point mutation of the crossover operator in an embodiment of the present invention;
[0033] Figure 4 This is a schematic diagram illustrating the principle of multi-point mutation of the crossover operator in an embodiment of the present invention.
[0034] The realization of the objective, functional features and advantages of the present invention will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation
[0035] To enable those skilled in the art to better understand the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings.
[0036] In some of the processes described in the specification, claims, and accompanying drawings of this invention, multiple operations appearing in a specific order are included. However, it should be clearly understood that these operations may not be executed in the order they appear herein, or may be executed in parallel. The operation numbers, such as S1, S2, etc., are merely used to distinguish different operations and do not themselves represent any execution order. Furthermore, these processes may include more or fewer operations, and these operations may be executed sequentially or in parallel. It should be noted that the descriptions such as "first," "second," etc., in this document are used to distinguish different messages, devices, modules, etc., and do not represent a sequential order, nor do they limit "first" and "second" to different types.
[0037] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0038] Combined with reference Figure 1 As shown, the present invention proposes a method for battery swapping of heavy-duty trucks in a virtual power plant scenario, comprising the following steps:
[0039] S10: Obtain vehicle information;
[0040] The vehicle information includes the number of vehicles, the estimated time of arrival at the battery swapping station, and the remaining battery power when the vehicle arrives for swapping.
[0041] S20: Obtain charging pile information from the battery swapping station;
[0042] Understandably, the information about charging stations includes the number of charging stations, the charging rate P, and the maximum battery capacity B. max Electricity price information. Electricity prices are based on actual time-of-use pricing, with peak hours from 17:00 to 21:00, normal hours from 4:00 to 10:00, 15:00 to 17:00, 21:00 to 24:00, and off-peak hours from 0:00 to 4:00 and 10:00 to 15:00. The prices are 0.56 yuan for peak hours, 0.41 yuan for normal hours, and 0.35 yuan for off-peak hours. Electricity prices for each time period can be determined based on the electricity consumption during that period.
[0043] S30: Construct a power function model for the battery inside the charging pile based on the acquired vehicle information and charging pile information;
[0044] Understandably, there are 1440 minutes in a 24-hour day, with 15 charging stations. The state S of each charging station is represented by 0 or 1, where 0 indicates not charging and 1 indicates charging. Therefore, there is a total of 1440 × 15 matrices D consisting of 0s and 1s. The battery capacity of a particular charging station can then be represented by a functional model.
[0045] S40: Establish a charging strategy optimization model, which includes an objective economic function and constraints;
[0046] Understandably, the initial state of the charging pile's battery is 0, meaning it has no power at all. As time increases, the charging pile's power will also increase. When a truck enters the station, it checks if any of the 15 charging piles have a fully charged battery; if so, a battery swap will be performed.
[0047] The mathematical expression is
[0048] Where i is a number from 1 to 15, representing charging piles numbered 1 to 15, B i,t Let B be the battery capacity at time t for the i-th charging station. truck The remaining battery capacity of the trucks that are coming to the station for battery swapping.
[0049] If a truck arrives at a charging station and none of the charging piles are fully charged, the vehicle will wait in place until any of the charging piles reaches full charge, at which point the battery swapping process will begin.
[0050] Electricity price information is initialized as a 1440×1 vector, the value of which represents the electricity price per minute.
[0051] S50: Construct a fitness function based on the objective economic function;
[0052] Total cost C all =C ele +C time +C start C ele For electricity costs, C time The economic cost corresponding to the waiting time of heavy trucks at charging stations is calculated at 2 yuan per minute for the driver. Therefore, when using a genetic algorithm for calculation, the minimum objective function needs to be found. C loss Let N be the cost of battery wear and tear each time the battery begins charging. loss This represents the number of times a column of matrix D changes from 0 to 1. The principle is as follows: Figure 2 As shown in the figure, the matrix is 9×3 columns. The gray areas represent columns where the value changes from 0 to 1. What is the N of this matrix? loss =5, in this example, matrix D is a 1440×15 matrix, then
[0053] C loss =N loss ×L
[0054] Where L represents the cost of loss per charge.
[0055] The electricity cost is as follows:
[0056] C ele,t =V t *P*S t
[0057] Where C ele,t V represents the electricity cost at time t. t S represents the electricity price at time t. t This represents the battery state at time t.
[0058] The fitness function is calculated by considering the population composition C.all In the set formed, take the maximum value as C. all,max Take the minimum value as C all,min ,but
[0059] C all '=μ / [(C all -C all,min )+μ]
[0060] Where C all ' is the fitness function, μ is the fitness operator, and is a constant, which is equal to 10 in this algorithm.
[0061] S60: Solve for the optimal solution of the fitness function using a genetic algorithm.
[0062] Understandably, in order to facilitate calculation and ensure the relative accuracy of the calculation results, we select a population size of N=100, an iteration number of M=500, and randomly generate a state matrix of charging piles with 100 population sizes to solve for their fitness.
[0063] The selection operator here uses the roulette wheel selection operator, based on the population's fitness function C. all The selection probability is calculated based on the proportion of the sum of the fitness functions at the current iteration number. The formula is as follows:
[0064] P n,m =C all,n,m ' / (C all,1,m '+C all,2,m '+C all,3,m '+……C all,N,m ')
[0065] Where P n,m C represents the probability of selecting one of n individuals in the m-th iteration. all,n,m 'Represents the fitness function value of the nth individual in the mth iteration.
[0066] The crossover operator uses single-point crossover, and its principle is as follows: Figure 3 As shown in the diagram, the left side represents two parent chromosomes, each with nine gene loci, while the right side represents two offspring chromosomes. The crossover point is the third gene locus. It can be seen that the first three gene loci remain unchanged, while the fourth through ninth gene loci swap positions.
[0067] Considering the actual business scenario, since the 1440×15 matrix of charging pile status has 21600 elements, a single-point crossover is used for these 21600 elements. That is, the parent chromosome has 21600 gene points. A value between 1 and 21600 is randomly selected as the crossover point. The preceding values remain unchanged, while the following values are crossed between adjacent chromosomes. The offspring chromosomes generated after the crossover need to be processed by mutation operators.
[0068] The mutation operator employs multi-point mutation, the principle of which is as follows: Figure 4 As shown in the figure, the left side of the image represents the chromosome before the mutation, the gray areas represent the mutated gene points, and the right side represents the chromosome after the mutation.
[0069] Considering the actual business scenario, the 1440×15 matrix of charging pile status has a total of 21600 elements. Here, multi-point mutation is used on the 21600 elements, and the mutation probability of each element is 0.1. If the element before mutation is 0, it becomes 1, and if it is 1, it becomes 0.
[0070] The fitness function of the genetic algorithm is solved, and the optimal solution for calculating the fitness function in 500 generations is selected as the calculation result.
[0071] Based on meeting users' battery swapping needs, and with the goal of minimizing the sum of the total charging cost and the total battery life loss cost within the station, and with battery capacity as a constraint, the battery charging strategy within the station is optimized and controlled to improve the charging efficiency of the charging and swapping station.
[0072] In one embodiment of this application, the vehicle information is collected in an Internet of Things (IoT) system, and the vehicle information includes: the number of vehicles, the estimated time for the vehicles to arrive at the battery swapping station, and the remaining battery power of the vehicle when it arrives at the swapping station.
[0073] In one embodiment of this application, the time-of-use electricity price information includes peak hours, normal hours, and valley hours. The electricity price information can be based on the actual time-of-use electricity price, with peak hours from 17:00 to 21:00, normal hours from 4:00 to 10:00, 15:00 to 17:00, 21:00 to 24:00, and valley hours from 0:00 to 4:00 and 10:00 to 15:00, where the electricity price is RMB 0.56 for peak hours, RMB 0.41 for normal hours, and RMB 0.35 for valley hours. The electricity price for each time period can be determined based on the electricity consumption in each time period.
[0074] In one embodiment of this application, the battery's charge function model is characterized as follows:
[0075]
[0076] Among them, B t+1 B represents the battery capacity at time t+1. t S represents the battery capacity at time t. t+1 Represents the battery state at time t+1, P represents the charging rate, and B represents the charging rate. max This is the maximum capacity of the battery.
[0077] In one embodiment of this application, before constructing the power function model of the battery within the charging pile, the method further includes establishing the charging state matrix of the charging pile.
[0078] The charging status of the charging pile is represented by S, where 0 indicates no charging and 1 indicates charging.
[0079] Understandably, in this embodiment, there is a total of 1440×15 matrix D consisting of 0 or 1.
[0080] In one embodiment of this application, the target economic function is:
[0081] C all =C ele +C time +C loss
[0082] Among them, C all For the total cost, C ele For electricity costs, C time C represents the economic cost corresponding to the waiting time of heavy trucks at charging stations. loss Cost of battery wear and tear each time the battery begins to charge.
[0083] In one embodiment of this application, the fitness function is:
[0084] C all '=μ / [(C all -C all,min )+μ]
[0085] Where C all ' is the fitness function, μ is the fitness operator, and is a constant.
[0086] This invention also provides a heavy-duty truck battery swapping system in a virtual power plant scenario, including at least one processor and a memory. The memory stores computer-readable instructions, which, when executed by the processor, implement the steps of the virtual power plant heavy-duty truck battery swapping method as described in any of the above embodiments. Those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware. This computer program can be stored in a computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. The aforementioned storage medium can be a non-volatile storage medium such as a magnetic disk, optical disk, or read-only memory (ROM), or random access memory (RAM).
[0087] It should be understood that although the steps in the flowcharts of the accompanying figures are shown sequentially as indicated by the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the accompanying figures may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily completed at the same time, but can be executed at different times, and their execution order is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the sub-steps or stages of other steps.
[0088] The above description is only a partial embodiment of the present invention. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the principle of the present invention, and these improvements and modifications should also be considered within the scope of protection of the present invention.
Claims
1. A method for battery swapping of heavy-duty trucks in a virtual power plant scenario, characterized in that, include: Obtain vehicle information; Obtain charging pile information of the battery swapping station. The charging pile information includes the number of charging piles and charging rate P, maximum battery capacity Bmax, and electricity price information, which is based on the actual time-of-use electricity price. A power function model for the battery inside the charging pile is constructed based on the acquired vehicle information and charging pile information. Establish a charging strategy optimization model, which includes an objective economic function and constraints. Construct a fitness function based on the objective economic function; The optimal solution for the fitness function is obtained using a genetic algorithm. The vehicle information is collected in the Internet of Things system, and the vehicle information includes: the number of vehicles, the estimated time for the vehicles to arrive at the battery swapping station, and the remaining battery power when the vehicle arrives at the swapping station. The time-of-use electricity price information includes peak hours, normal hours, and off-peak hours; The energy function model of the battery is as follows: , Among them, This represents the battery capacity at time t+1. This represents the battery capacity at time t. This represents the battery state at time t+1, and P represents the charging rate. This is the maximum battery capacity; Before constructing the energy function model of the battery inside the charging pile, it is also necessary to establish the charging state matrix of the charging pile. The charging status of the charging pile is represented by S, where 0 indicates no charging and 1 indicates charging. The objective economic function is: , in, For total expenditure cost, For electricity costs, The economic cost corresponding to the waiting time of heavy trucks at charging stations. Cost of wear and tear on the battery each time it begins to charge; The fitness function is: , in Let μ be the fitness function, μ be the fitness operator, and μ be a constant. The fitness function is calculated by taking the maximum value (Call,max) and the minimum value (Call,min) from the set of Calls formed by the population.
2. A heavy-duty truck battery swapping system in a virtual power plant scenario, characterized in that, include: At least one processor; and A memory storing program instructions, wherein the program instructions are configured to be executed by the at least one processor, the program instructions including instructions for performing the method as claimed in claim 1.
Citation Information
Patent Citations
Charging strategy optimization control method and device
CN114742303A
Charging station charging strategy optimization control method and device, and storage medium
CN115742801A