A charging and swapping method for electric bus charging and swapping station based on genetic algorithm
Through the charging and swapping method of electric buses based on genetic algorithms, a multi-objective optimization function is constructed and the charging and discharging optimization control coefficient is solved, which solves the problem of grid load surge caused by disorderly charging of electric vehicles, reduces charging costs and improves orderly Charging participation has achieved effective regulation of electric vehicles.
Patent Information
- Application Number
- CN202211181188.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-09-27
- Publication Date
- 2024-12-06
- Estimated Expiration
- 2042-09-27
AI Technical Summary
The disorderly charging behavior of large-scale electric vehicles has led to a surge in the power grid load, transformer overload, load peak-to-valley difference increases, voltage quality deteriorates, and line network losses. The existing technology is difficult to meet the increasing demand for electric vehicles through the regulation of electricity prices. Moreover, the charging cost of users is high, and the participation in orderly charging of electric buses is low.
Using the electric bus charging and swapping method based on genetic algorithms, a multi-objective optimization function is constructed, including the goal of maximum power after the vehicle charge and discharge is completed and the cost of battery degradation is considered. The population is initialized using genetic algorithms to solve the charging of peak and regular periods. Discharge optimization control coefficients, and corrections are made according to battery capacity constraints, and the optimal solution of each optimization control period is obtained through iterative updates, and charging, discharging and idle operations are performed.
It has achieved effective regulation of the disorderly charging behavior of large-scale electric vehicles, reduced the charging cost of users, increased the participation in orderly charging of electric buses, quantified the ability of electric buses to participate in peak cutting and valley filling, and encouraged the power grid side and electric motors. Orderly control of the bus user side.
Smart Images

Figure CN115503536B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of electric bus charging and discharging optimization, and in particular to a charging and discharging method of an electric bus charging and discharging station based on a genetic algorithm. Background Art
[0002] Electric vehicles (EVs) have been expanding in scale in recent years due to their environmental protection, energy saving, and high efficiency. However, this has also led to the disorderly charging of large-scale electric vehicles. For electric bus charging and swapping stations, the disorderly charging of large-scale electric vehicles will cause a surge in the load of the power grid during a specific period of time, which will in turn lead to transformer overload and aging, increased load peak-to-valley difference, deterioration of voltage quality, and increased line network losses.
[0003] Bidirectional intelligent charging (V2G), as a unique function of electric vehicles, usually achieves simple regulation of electric vehicle charging and discharging behavior by increasing the electricity price during peak hours and reducing the electricity price during valley hours, and achieves simple peak reduction and valley filling for electric bus charging and swapping stations. However, regulating electricity prices alone is far from meeting the growing demand for electric vehicle regulation.
[0004] To this end, how to provide an electric bus charging and swapping station charging and swapping method based on genetic algorithms that can effectively regulate the disordered charging behavior of large-scale electric vehicles, meet the growing demand for electric vehicle regulation, reduce user charging costs, increase the participation of electric buses in orderly charging, quantify the ability of electric buses to participate in peak shaving and valley filling, and encourage the grid side and the electric bus user side to participate in the orderly regulation of vehicles is a problem that technical personnel in this field urgently need to solve. Summary of the invention
[0005] In view of this, the present invention proposes a charging and swapping method for an electric bus charging and swapping station based on a genetic algorithm.
[0006] In order to achieve the above object, the present invention adopts the following technical solution:
[0007] A charging and swapping method for an electric bus charging and swapping station based on a genetic algorithm, comprising:
[0008] Step (1): Preset an optimization control period and construct a multi-objective optimization function including the objectives of maximizing the amount of electricity after the vehicle is charged and discharged and minimizing the vehicle charging and discharging cost taking into account the battery degradation cost;
[0009] Step (2): Setting the optimal control coefficient for charging and discharging during the valley period;
[0010] Step (3): Initialize the randomly generated population using a genetic algorithm, solve the charging and discharging optimization control coefficients during peak and normal periods, and modify the charging and discharging optimization control coefficients according to the battery capacity constraint, bring them into the multi-objective optimization function, and obtain the optimal solution for each optimization control period;
[0011] Step (4): Iteratively update the initialized population, repeat step (3), obtain multiple optimal solutions for each optimization control period, and compare and select the best solution, and perform charging, discharging and idle operations with the charging and discharging optimization control coefficients corresponding to the optimal solutions for each optimization control period.
[0012] Optionally, in step (1), the battery degradation cost is expressed as follows:
[0013]
[0014] in, For vehicle EV k The battery degradation cost in period t; B k is the linear relationship coefficient between battery life and cycle number; γ k,t For vehicle EV k The cyclic charge and discharge capacity in period t; C k is the battery capacity; C B is the battery replacement cost; SOC k,t and SOC k,t-1 EV k SOC in period t and the previous period.
[0015] Optionally, in step (1), the vehicle charging and discharging cost considering the battery degradation cost is the lowest, and the expression is as follows:
[0016]
[0017] Among them, f k,1 is the vehicle charging and discharging cost of the battery degradation cost; n is the number of preset optimization control times; S t is the charging and discharging electricity price during period t; S cp , S cf , S cv S are the charging electricity prices during peak hours, normal hours, and valley hours respectively; dp , S df , S dv are the discharge electricity prices during peak hours, normal hours, and valley hours respectively; x k,t is the charge and discharge control coefficient of the electric bus; P k Rated power of electric bus.
[0018] Optionally, in step (1), the vehicle has the most electricity after charging and discharging is completed, and the expression is as follows:
[0019]
[0020] Among them, f k,2 For vehicle EV k The negative number of charge after charging and discharging is completed; SOC 0,k For vehicle EV k The initial SOC.
[0021] Optionally, in step (1), the multi-objective optimization function is expressed as follows:
[0022]
[0023] Among them, f k For vehicle EV k Multi-objective optimization function; They are the single objective functions f k,1 、f k,2 The maximum value of λ k,1 , k,2 They are the single objective functions f k,1 、f k,2 The optimization weight of .
[0024] Optionally, in step (2), the optimal control coefficient for charging and discharging during the valley period is set, specifically:
[0025] EV k The load size in each period when connected to the power grid is arranged in ascending order;
[0026] For vehicle EV k Divide the peak, flat and valley time periods into 1:1:1;
[0027] EV k When connected to the grid, all valley periods are set to charge at rated power.
[0028] Optionally, in step (3), a genetic algorithm is used to initialize a randomly generated population to solve the charging and discharging optimization control coefficients during peak hours and normal hours, specifically:
[0029] According to vehicle EV k The number of peak and flat periods remaining after the optimization of the control coefficient of valley period charge and discharge during parking time is N k Initialize the randomly generated population and get a matrix pop consisting of coded 0 and 1, as follows:
[0030] pop=round(rand(popsize,chromlength));
[0031] Among them, popsize is the number of matrix rows, which is also the number of individuals in the initialized population; chromlength is the number of matrix columns, which is also the encoding length of the individuals in the initialized population. The calculation formula is as follows:
[0032] chromlength = N k *10;
[0033] Extract the binary encoding information corresponding to the j-th variable of all individuals in the initialized population. The expression is as follows:
[0034] pop1=pop(:,1+(j-1)*10:10j);
[0035] The matrix pop1 contains the binary coded information corresponding to the jth variable of all individuals in the initialized population;
[0036] Decoding, converting the binary numbers in the matrix pop1 into decimal numbers, the expression is as follows:
[0037] [px,py]=size(pop1);
[0038] Among them, px is the number of rows of the matrix pop1, which is also the number of individuals in the population; py is the number of columns of the matrix pop1, which is also the number of bits occupied by the binary code corresponding to the j-th variable of all individuals in the population;
[0039] for i=1:py;
[0040] popp(:,1)=2.∧(py-i).*pop1(:,i);
[0041] end;
[0042] pop2 = sum(popp);
[0043] Among them, the matrix pop2 is obtained by converting the binary numbers in the matrix pop1 into decimal numbers;
[0044] Convert the binary domain numbers in the matrix pop2 into the variable domain numbers. The expression is as follows:
[0045] pop3=-1+pop2*2 / pop2 max ;
[0046] Wherein, pop3 is obtained by converting the binary domain numbers in the matrix pop2 into the numbers in the variable domain, and is also the charging and discharging optimization control coefficient for the peak period and the flat period; pop2 max is the maximum value of the variable in matrix pop2.
[0047] Optionally, in step (3), the battery capacity constraint is expressed as follows:
[0048] When SOC k,t Greater than SOC max When , the expression is as follows:
[0049]
[0050] When SOC k,t Less than SOC min When , the expression is as follows:
[0051]
[0052] in, EV k The collection of peak, flat and valley periods during the access to the power grid; SOC max is the upper limit of SOC; SOC min is the lower limit of SOC; SOC k,t is the SOC in period t, and the calculation formula is as follows:
[0053]
[0054] Among them, SOC k,t-1 is the SOC in period t-1.
[0055] Optionally, in step (4), the initialization population is iteratively updated, specifically: performing crossover and mutation on the initialization population;
[0056] Crossover is to swap the binary codes of two adjacent individuals in the initialization population;
[0057] Mutation: Set the mutation probability and mutate at random encoding positions.
[0058] It can be seen from the above technical solutions that, compared with the prior art, the present invention proposes a method for charging and swapping electric buses at charging and swapping stations based on genetic algorithms. By constructing a multi-objective optimization function with the goal of maximizing the amount of electricity after the vehicle is charged and discharged and minimizing the vehicle charging and discharging cost considering the battery degradation cost, and using the genetic algorithm to iteratively search for the best, the multi-objective optimization function is substituted to solve the optimal control coefficients corresponding to the optimal solution of each optimization control period to perform charging, discharging and idle operations, which effectively controls the disordered charging behavior of large-scale electric vehicles, meets the growing demand for electric vehicle control, reduces user charging costs, improves the participation of electric buses in orderly charging, quantifies the ability of electric buses to participate in peak shaving and valley filling, and encourages the grid side and the electric bus user side to participate in the orderly control of vehicles. BRIEF DESCRIPTION OF THE DRAWINGS
[0059] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying creative work.
[0060] Figure 1 It is a schematic diagram of the process of the present invention.
[0061] Figure 2 Schematic diagram of the linear relationship between battery life and cycle number of the present invention. DETAILED DESCRIPTION
[0062] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0063] The embodiment of the present invention discloses a charging and swapping method for an electric bus charging and swapping station based on a genetic algorithm, comprising:
[0064] Step (1): Preset an optimization control period and construct a multi-objective optimization function including the objectives of maximizing the amount of electricity after the vehicle is charged and discharged and minimizing the vehicle charging and discharging cost taking into account the battery degradation cost;
[0065] In this embodiment, the preset optimization control period is 15 minutes per period. One day of parking at the charging and discharging station is divided into 96 periods, so n=96;
[0066] The cyclic charging and discharging of vehicles will cause battery degradation. Therefore, the charging and discharging costs caused by battery degradation should be taken into account. The battery degradation cost is expressed as follows:
[0067]
[0068] in, For vehicle EV k The battery degradation cost in period t (t can be any period among 96 periods); B k is the linear relationship coefficient between battery life and cycle number, such as Figure 2 As shown, the left vertical axis is the battery capacity percentage, the right digital axis is the battery life percentage, the horizontal axis is the number of charge and discharge cycles, the oblique line in the figure is the fitting curve, and the points are data values; γ k,t For vehicle EV k The cyclic charge and discharge capacity in period t; Ck is the battery capacity; C B is the battery replacement cost; SOC k,t and SOC k,t-1 EV k In the SOC of period t and the previous period, when the vehicle EV k When participating in V2G discharge during period t, SOC k,t-1 -SOC k,t Greater than 0, γ k,t The value is (SOC k,t-1 -SOC k,t )C k , the battery has a loss cost. When the vehicle participates in V2G charging during period t, SOC k,t-1 -SOC k,t Less than 0, γ k,t When the value is 0, the battery has no loss cost, that is, the vehicle EV k When discharging during period t, there will be additional battery loss cost, while when charging, there will be no additional battery loss cost.
[0069] Considering the economic benefits of users participating in orderly charging and discharging, and at the same time allowing users who respond to V2G to charge during valley hours and discharge during peak hours as much as possible, the purpose of "peak shaving and valley filling" is achieved to meet the peak load demand on the grid side. The vehicle charging and discharging cost considering the battery degradation cost is the lowest, and the expression is as follows:
[0070]
[0071] Among them, f k,1 S is the vehicle charging and discharging cost of the battery degradation cost; t is the charging and discharging electricity price during period t; S cp , S cf , S cv S are the charging electricity prices during peak hours, normal hours, and valley hours respectively; dp , S df , S dv are the discharge electricity prices during peak hours, normal hours, and valley hours respectively; x k,t is the charge and discharge control coefficient of the electric bus; P k Rated power of electric bus.
[0072] Since the target cost in the multi-objective optimization function is as low as possible, and the target vehicle has the highest amount of power after charging and discharging, the higher the better, direct weighting is meaningless. Therefore, the maximum amount of power after the vehicle is charged and discharged is converted into the negative number of the power after the vehicle is charged and discharged. The smaller the negative number, the better. The maximum amount of power after the vehicle is charged and discharged is expressed as follows:
[0073]
[0074] Among them, f k,2 For vehicle EV k The negative number of charge after charging and discharging is completed; SOC 0,k For vehicle EV k The initial SOC.
[0075] The multi-objective optimization function is expressed as follows:
[0076]
[0077] Among them, f k For vehicle EV k Multi-objective optimization function; They are the single objective functions f k,1 、f k,2 The maximum value of λ k,1 , k,2 They are the single objective functions f k,1 、f k,2 The optimization weight of .
[0078] Step (2): Charge and discharge optimization control coefficient x k,t The values are as follows:
[0079]
[0080] Among them, x k,t is the electric bus charging and discharging control coefficient, which is used to control the vehicle EV k The charging and discharging behavior and the charging and discharging power in each period.
[0081] When the kth electric bus EV k When connected to the grid, the system obtains the battery capacity C of the vehicle through the battery management system k As well as the current SOC of the vehicle, the time tin,k when the vehicle is connected to the grid is recorded. In order to arrange the charging and discharging plan reasonably, the user needs to input the time tout,k when the vehicle exits the grid, the expected SOC value SOC when the user leaves e,k , optimize weight λ k,1 , k,2 .
[0082] During the period when the vehicle is connected to the power grid, the optimization control coefficient of electric bus charging and discharging is set to 0.
[0083] Set the optimal control coefficient for charging and discharging during the valley period, specifically:
[0084] EV k The load size in each period when connected to the power grid is arranged in ascending order;
[0085] Considering the fairness of peak and valley electricity prices to each car owner,k Divide the peak, flat and valley time periods into 1:1:1;
[0086] EV k When connected to the grid, all valley periods are set to charge at rated power, that is, the charging and discharging optimization control coefficients of all valley periods are 1.
[0087] Step (3): Initialize the randomly generated population using a genetic algorithm, solve the charging and discharging optimization control coefficients during peak and normal periods, and modify the charging and discharging optimization control coefficients according to the battery capacity constraint, bring them into the multi-objective optimization function, and obtain the optimal solution for each optimization control period;
[0088] The genetic algorithm is used to initialize the randomly generated population and solve the optimal control coefficients of charging and discharging during peak and normal periods, specifically:
[0089] According to vehicle EV k The number of peak and flat periods remaining after the optimization of the control coefficient of valley period charge and discharge during parking time is N k Initialize the randomly generated population (the individuals in the initialized population are composed of binary codes of a certain length) and obtain a matrix pop composed of codes 0 and 1, as follows:
[0090] pop=round(rand(popsize,chromlength));
[0091] Among them, popsize is the number of matrix rows, which is also the number of individuals in the initialized population; chromlength is the number of matrix columns, which is also the encoding length of the individuals in the initialized population. The calculation formula is as follows:
[0092] chromlength = N k *10;
[0093] In this embodiment, the number of individuals in the initialization population is set to 100, that is, popsize=100.
[0094] Extract the binary coded information corresponding to the jth variable of all individuals in the initialized population. Each individual has N k variables, the value of variable j can be (1, 2, 3..., N k ), the expression is as follows:
[0095] pop1=pop(:,1+(j-1)*10:10j);
[0096] The matrix pop1 contains the binary coded information corresponding to the jth variable of all individuals in the initialized population;
[0097] Decoding, converting the binary numbers in the matrix pop1 into decimal numbers, the expression is as follows:
[0098] [px,py]=size(pop1);
[0099] Wherein, px is the number of rows of the matrix pop1, which is also the number of individuals in the population. In this embodiment, it is 100; py is the number of columns of the matrix pop1, which is also the number of bits occupied by the binary code corresponding to the j-th variable of all individuals in the population. In this embodiment, the binary code corresponding to each variable is set to 10, so py=10;
[0100] for i=1:py;
[0101] popp(:,1)=2.∧(py-i).*pop1(:,i);
[0102] end;
[0103] pop2 = sum(popp);
[0104] Among them, the matrix pop2 is obtained by converting the binary numbers in the matrix pop1 into decimal numbers;
[0105] The above formula is a programming language for binary encoding and decoding. The calculation process of binary encoding and decoding is simply the process of superimposing and calculating each binary bit. In this embodiment, the number of binary bits corresponding to each variable is 10. Since it is a binary number, each bit has only two digits, 0 and 1. When the value of a certain bit is 0, the value of the bit converted to binary is also 0; when the value of a certain bit (the nth bit) is 1, the value of the bit converted to binary is 1*2(10-n). For example, when the binary code of a variable corresponding to an individual in a population is 1111111111, the decimal value corresponding to this variable is (1*29+1*28+1*27+1*26+1*25+1*24+1*23+1*22+1*21+1*20), which is 1023; when the binary code of a variable corresponding to an individual in a population is 0000000000, the decimal value corresponding to this variable is (0*29+0*28+0*27+0*26+0*25+0*24+0*23+0*22+0*21+0*20), which is 0.
[0106] The above matrix pop2 has 100 rows and 1 columns. The number of rows in the matrix pop2 represents each individual in the population, and the number of columns represents the decimal number corresponding to the jth variable of each individual. Although the matrix pop2 successfully converts the binary numbers in the matrix into decimal numbers, the maximum value of the variable obtained is 1023 and the minimum value is 0, while the minimum value of the charge and discharge control coefficient of the electric bus is -1 and the maximum value is 1. Therefore, the binary domain numbers in the matrix pop2 are converted into numbers in the variable domain. The expression is as follows:
[0107] pop3=-1+pop2*2 / pop2 max ;
[0108] Wherein, pop3 is obtained by converting the binary domain numbers in the matrix pop2 into the numbers in the variable domain, and is also the charging and discharging optimization control coefficient for the peak period and the flat period; pop2 max is the maximum value of the variable in matrix pop2.
[0109] Through the above formula, the purpose of converting the binary domain of the pop2 matrix into the variable domain is successfully achieved. The 100 rows of the pop3 matrix represent each individual in the population. The number of columns in Pop3 is 1, which represents the conversion of the jth variable (the charging and discharging control coefficient of the electric bus during peak hours and normal hours) into the variable domain. The maximum value is 1 and the minimum value is -1.
[0110] The above-mentioned solution process is the process of solving the j-th variable of all individuals in the population. Using the above-mentioned solution method, the values of all variables of all individuals in the population can be calculated, that is, all the charging and discharging control coefficients of the electric bus during peak hours and normal hours.
[0111] Battery capacity constraint, the expression is as follows:
[0112] When SOC k,t Greater than SOC max When , the expression is as follows:
[0113]
[0114] When SOC k,t Less than SOC min When , the expression is as follows:
[0115]
[0116] in, EV k The collection of peak, flat and valley periods during the access to the power grid; SOC max is the upper limit of SOC; SOC min is the lower limit of SOC; SOC k,tis the SOC in period t, and the calculation formula is as follows:
[0117]
[0118] Among them, SOC k,t-1 is the SOC in period t-1.
[0119] Step (4): Iteratively update the initialized population, repeat step (3), obtain multiple optimal solutions for each optimization control period, and compare and select the best solution, and perform charging, discharging and idle operations with the charging and discharging optimization control coefficients corresponding to the optimal solutions for each optimization control period.
[0120] Iteratively update the initialized population, specifically: perform crossover and mutation on the initialized population;
[0121] Crossover means exchanging the binary codes of two adjacent individuals in the initialized population (pop). For example, when the first individual of the initial population is crossovered with the second individual, the crossover point is randomly generated. For example, the crossover point is at the 4th bit of the binary code. Two new individuals will be generated through the crossover operation. The first 4 bits of the binary code of the new individual 1 use the binary code of the first individual of the initial population, while the binary code after the 4th bit uses the binary code of the second individual of the initial population; the first 4 bits of the binary code of the new individual 2 use the binary code of the second individual of the initial population, while the binary code after the 4th bit uses the binary code of the first individual of the initial population. And so on, until the new individuals 99 and 100 generated by the crossover operation of the 99th individual and the 100th individual of the initial population are generated, the same method is used. The 100 new individuals generated are denoted as pop. 交叉 ;
[0122] Variant: Pop 交叉 Set the mutation probability, population pop 交叉 Each individual in the is likely to mutate. In this example, the mutation probability is set to 0.5. The coding position where the mutation occurs is randomly generated. Assuming that the binary code corresponding to the coding position where the mutation occurs is 1, after the mutation, the binary code becomes 0, and vice versa. The population that has undergone the mutation operation is recorded as pop 变异 .
[0123] Finally, pop 变异The population is initialized by naming it new POP, and it is updated iteratively. In this embodiment, it is updated iteratively 400 times, and then step (3) is repeated to compare and select the optimal solutions of each optimization control period of 400 generations. The optimal control period (in this embodiment, each optimization control period is 15 minutes, which is recorded in step (1). For example, if an electric car parks in a battery swap station for one day, it is divided into 96 periods in total. Charging, discharging and idling operations are performed for each period according to the charging and discharging optimization control coefficients corresponding to the optimal solutions of each of the 96 periods) according to the charging and discharging optimization control coefficients corresponding to the optimal solutions are used to perform charging, discharging and idling operations.
[0124] The embodiment of the present invention discloses a charging and swapping method for an electric bus charging and swapping station based on a genetic algorithm. By constructing a multi-objective optimization function including the goal of maximizing the amount of electricity after the vehicle is charged and discharged and minimizing the vehicle charging and discharging cost considering the battery degradation cost, and using the genetic algorithm to iteratively search for the best, the multi-objective optimization function is substituted to solve the charging and discharging optimization control coefficients corresponding to the optimal solution of each optimization control period to perform charging, discharging and idle operations, which effectively controls the disorderly charging behavior of large-scale electric vehicles, meets the growing demand for electric vehicle control, reduces user charging costs, improves the participation of electric buses in orderly charging, quantifies the ability of electric buses to participate in peak shaving and valley filling, and encourages the grid side and the electric bus user side to participate in the orderly control of vehicles.
[0125] In this specification, each embodiment is described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the embodiments can be referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part.
[0126] The above description of the disclosed embodiments enables one skilled in the art to implement or use the present invention. Various modifications to these embodiments will be apparent to one skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown herein, but rather to the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A charging and swapping method for an electric bus charging and swapping station based on a genetic algorithm, characterized in that: include: Step (1): Preset an optimization control period and construct a multi-objective optimization function including the objectives of maximizing the amount of electricity after the vehicle is charged and discharged and minimizing the vehicle charging and discharging cost taking into account the battery degradation cost; Step (2): Setting the optimal control coefficient for charging and discharging during the valley period; Step (3): using a genetic algorithm to initialize a randomly generated population, solving the charging and discharging optimization control coefficients during peak hours and normal hours, and correcting the charging and discharging optimization control coefficients according to the battery capacity constraint, bringing them into the multi-objective optimization function, and obtaining the optimal solution for each optimization control period; Step (4): iteratively updating the initialized population, repeating step (3), obtaining multiple optimal solutions for each optimization control period, and comparing and selecting the best solution, and performing charging, discharging and idle operations with the charge and discharge optimization control coefficient corresponding to the optimal solution for each optimization control period; In step (3), a genetic algorithm is used to initialize a randomly generated population to solve the charging and discharging optimization control coefficients during the peak period and the normal period, specifically: According to vehicle EV k The number of peak and flat periods remaining after the optimization of the charge and discharge optimization control coefficient during the parking time is N. k Initialize the randomly generated population and get a matrix pop consisting of coded 0 and 1, as follows: pop=round(rand(popsize,chromlength)); Among them, popsize is the number of matrix rows, which is also the number of individuals in the initialized population; chromlength is the number of matrix columns, which is also the encoding length of the individuals in the initialized population. The calculation formula is as follows: curvelength=N k *10; Extract the binary encoding information corresponding to the j-th variable of all individuals in the initialized population. The expression is as follows: pop1=pop(:,1+(j-1)*10:10j); The matrix pop1 contains the binary coded information corresponding to the jth variable of all individuals in the initialized population; Decoding, converting the binary numbers in the matrix pop1 into decimal numbers, the expression is as follows: [px,py]=size(pop1); Among them, px is the number of rows of the matrix pop1, which is also the number of individuals in the population; py is the number of columns of the matrix pop1, which is also the number of bits occupied by the binary code corresponding to the j-th variable of all individuals in the population; for i=1:py; popp(:,1)=2.∧(py-i).*pop1(:,i); end pop2 = ssum(popp); Among them, the matrix pop2 is obtained by converting the binary numbers in the matrix pop1 into decimal numbers; Convert the binary domain numbers in the matrix pop2 into the variable domain numbers. The expression is as follows: pop3=-1+pop2*2 / pop2 max ; Wherein, pop3 is obtained by converting the binary domain numbers in the matrix pop2 into the numbers in the variable domain, and is also the charging and discharging optimization control coefficient for the peak period and the flat period; pop2 max is the maximum value of the variable value in the matrix pop2; In step (4), the initialization population is iteratively updated, specifically: crossover and mutation are performed on the initialization population; The crossover is: exchanging the binary codes of two adjacent individuals in the initialization population; The mutation is: setting the mutation probability and causing mutation at a random coding position.
2. The method for charging and swapping electric buses at charging and swapping stations based on genetic algorithms according to claim 1, characterized in that: In step (1), the battery degradation cost is expressed as follows: in, For vehicle EV k The battery degradation cost in period t; B k is the linear relationship coefficient between battery life and cycle number; γ k,t For vehicle EV k The cyclic charge and discharge capacity in period t; C k is the battery capacity; C B is the battery replacement cost; SOC k,t and SOC k,t-1 EV k SOC in period t and the previous period.
3. The method for charging and swapping electric buses at charging and swapping stations based on genetic algorithms according to claim 2, characterized in that: In step (1), the vehicle charging and discharging cost considering the battery degradation cost is the lowest, and the expression is as follows: Among them, f k,1 is the vehicle charging and discharging cost of the battery degradation cost; n is the number of preset optimization control periods; S t is the charging and discharging electricity price during period t; S cp , S cf , S cv S are the charging electricity prices during peak hours, normal hours, and valley hours respectively; dp , S df , S dv are the discharge electricity prices during peak hours, normal hours, and valley hours respectively; x k,t is the charge and discharge control coefficient of the electric bus; P k Rated power of electric bus.
4. The method for charging and swapping electric buses at charging and swapping stations based on genetic algorithms according to claim 3, characterized in that: In step (1), the vehicle has the most electricity after charging and discharging, and the expression is as follows: Among them, f k,2 For vehicle EV k The negative number of charge after charging and discharging is completed; SOC 0,k For vehicle EV k The initial SOC.
5. The method for charging and swapping electric buses at charging and swapping stations based on genetic algorithms according to claim 4, characterized in that: In step (1), the multi-objective optimization function is expressed as follows: Among them, f k For vehicle EV k Multi-objective optimization function; They are the single objective functions f k,1 、f k,2 The maximum value of λ k,1 , k,2 They are the single objective functions f k,1 、f k,2 The optimization weight of .
6. The method for charging and swapping electric buses at charging and swapping stations based on genetic algorithms according to claim 1, characterized in that: In step (2), the valley period charging and discharging optimization control coefficient is set, specifically: EV k The load size in each period when connected to the power grid is arranged in ascending order; For vehicle EV k Divide the peak, flat and valley time periods into 1:1:1; EV k When connected to the grid, all valley periods are set to charge at rated power.
7. The method for charging and swapping electric buses at charging and swapping stations based on genetic algorithms according to claim 1, characterized in that: In step (3), the battery capacity constraint is expressed as follows: When SOC k,t Greater than SOC max When , the expression is as follows: When SOC k,t Less than SOC min When , the expression is as follows: in, EV k The collection of peak, flat and valley periods during the access to the power grid; SOC max is the upper limit of SOC; SOC min is the lower limit of SOC; SOC k,t is the SOC in period t, and the calculation formula is as follows: Among them, SOC k,t-1 is the SOC in period t-1.
Citation Information
Patent Citations
Charging and discharging time period solving method and device, equipment and storage medium
CN111564861A
Electric vehicle ordered charging and discharging dynamic optimization strategy based on particle swarm optimization
CN113500940A
