A method, device and terminal equipment for controlling V2G charging and discharging of electric vehicles
By generating and clustering load curves, machine learning and optimization algorithms, V2G charging and discharging strategies for electric vehicles are formulated, which solves the problem of power grid load fluctuations and improves power grid stability.
Patent Information
- Application Number
- CN202311703899.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-12-12
- Publication Date
- 2024-09-24
- Estimated Expiration
- 2043-12-12
AI Technical Summary
Existing technology cannot effectively control V2G charging and discharging of electric vehicles, resulting in increased power grid load fluctuations and affecting grid operation stability.
Determine typical daily load curves by generating sample daily load curves and clustering, use machine learning models to predict load variation values, optimize charging and discharging parameters based on battery parameters of electric vehicles, and use Jaya algorithm and gradient descent method to formulate V2G charging and discharging strategies. Ensure that the charging and discharging load does not exceed the dispatched load value.
Effectively reduce grid load fluctuations, improve grid operation stability, and achieve intelligent dispatching of electric vehicle charging and discharging.
Smart Images

Figure 00000000_0000
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of electric vehicles, and in particular to a V2G charging and discharging control method, device and terminal equipment for an electric vehicle. Background Art
[0002] V2G (Vehicle-to-Grid) technology is a technology that uses electric vehicles as distributed energy storage units to achieve two-way transmission of energy and information between vehicles and power grids. As the number of electric vehicles continues to grow, the charging and discharging behavior of electric vehicle groups is gradually having a significant impact on the power grid. At present, the existing technology lacks effective control over the V2G charging and discharging of electric vehicles, which makes it easy for electric vehicles to charge on a large scale during peak hours, making it difficult for the power grid to adjust the load in time with changes in electricity demand, resulting in increased load fluctuations in the power grid and affecting the operational stability of the power grid. Summary of the invention
[0003] The present invention provides an electric vehicle V2G charging and discharging control method, device and terminal equipment, which can reasonably allocate the charging and discharging parameters of each electric vehicle at each moment based on the dispatching load value of the target area at each moment, so that the charging and discharging load value of the electric vehicle at each moment does not exceed the dispatching load value, thereby effectively reducing the load fluctuation of the power grid and improving the operating stability of the power grid.
[0004] In order to solve the above technical problems, a first aspect of an embodiment of the present invention provides a V2G charging and discharging control method for an electric vehicle, comprising the following steps:
[0005] Generate several sample daily load curves based on the historical load data of the target area; wherein the historical load data includes the historical load values at each moment and several historical load impact characteristic quantities, and the historical load values include the historical basic load values and the historical load change values;
[0006] Clustering the sample daily load curves, determining a typical daily load curve based on the fitness values of the clustered sample daily load curves, and using the load value at each moment in the typical daily load curve as the basic load value of the target area at each moment in the target adjustment time period;
[0007] According to a number of load impact characteristic quantities corresponding to the target area in the target adjustment time period, the load change value at each moment in the target adjustment time period is obtained through a preset machine learning model; wherein the machine learning model is trained according to the load association value of each preset historical load impact characteristic quantity at each moment and the historical load change value corresponding to the load association value;
[0008] Determining a target regulation load at each moment in the target regulation time period according to a basic load value and a load variation value at each moment in the target regulation time period;
[0009] Determining the allowable adjustable load range of the target area at each moment according to the battery parameters of each electric vehicle at each moment;
[0010] According to a plurality of allowable adjustable load values in the allowable adjustable load range, nonlinearly fitting the allowable adjustable load value with the target adjustable load is performed to obtain the dispatching load value of the target area at each moment;
[0011] Taking the charging and discharging load value of the electric vehicle at each moment not exceeding the dispatching load value as a constraint condition, the charging and discharging parameters corresponding to each electric vehicle are solved by using an optimization algorithm to obtain the V2G charging and discharging strategy corresponding to each electric vehicle, and each electric vehicle is controlled to charge and discharge according to the V2G charging and discharging strategy.
[0012] As a preferred solution, the battery parameters include a battery rated current value and a battery rated voltage value; then, determining the allowable adjustable load range of the target area at each moment according to the battery parameters of each electric vehicle at each moment specifically includes the following steps:
[0013] Determining the maximum charging current value and the maximum discharging current value of each electric vehicle according to the rated current value of the battery;
[0014] Determine the lower limit of the load allowed to be adjusted in the target area at each moment according to the maximum charging current value, the battery rated voltage value and the preset charging power limit value of each electric vehicle at each moment;
[0015] Determine the upper limit value of the load allowed to be adjusted in the target area at each moment according to the maximum discharge current value, the battery rated voltage value and the preset discharge power limit value of each electric vehicle at each moment;
[0016] The allowable adjustable load range of the target area at each moment is determined according to the allowable adjustable load lower limit value and the allowable adjustable load upper limit value.
[0017] As a preferred solution, the charging and discharging load value of the electric vehicle at each moment does not exceed the scheduling load value as a constraint condition, and the charging and discharging parameters corresponding to each electric vehicle are solved by using an optimization algorithm to obtain the V2G charging and discharging strategy corresponding to each electric vehicle, which specifically includes the following steps:
[0018] Randomly generate an initial population including the charging / discharging time period, charging pile information and charging / discharging load value corresponding to each electric vehicle;
[0019] The individual in the initial population is iteratively updated using the Jaya algorithm, with the electric vehicle charging and discharging load value at each moment not exceeding the dispatching load value as a constraint condition, until the number of iterative updates reaches a preset threshold number of iterations, and an optimized population is obtained; wherein, in each iterative update process, the fitness of the individual before the update and the fitness of the individual after the update are calculated using the Jaya algorithm; if the fitness of the individual before the update is less than the fitness of the individual after the update, the individual before the update is replaced with the individual after the update; if the fitness of the individual before the update is greater than or equal to the fitness of the individual after the update, the individual before the update is retained;
[0020] According to the optimized charging / discharging time period, optimized charging pile information and optimized charging / discharging load value corresponding to each electric vehicle included in the optimized population, the V2G charging and discharging strategy corresponding to each electric vehicle is determined.
[0021] As a preferred solution, according to a plurality of allowable adjustable load values in the allowable adjustable load range, nonlinear fitting is performed between the allowable adjustable load value and the target adjustable load to obtain the dispatching load value of the target area at each moment, which specifically includes the following steps:
[0022] According to several allowable adjustable load values in the allowable adjustable load range, the gradient descent method is used through the expression: The allowable adjustable load value is nonlinearly fitted with the target adjustable load to obtain the scheduling load value of the target area at each moment; wherein W1 represents the target adjustable load at each moment, W2 represents the allowable adjustable load value in the allowable adjustable load range at each moment, and J(W1, W2) represents the loss function corresponding to the gradient descent method.
[0023] As a preferred solution, clustering the sample daily load curves and determining a typical daily load curve based on the fitness value of each clustered sample daily load curve specifically includes the following steps:
[0024] The sample daily load curve is normalized by using a mean-variance normalization algorithm to obtain a standardized daily load curve;
[0025] Based on the pre-generated number of typical daily load curves, a number of the standardized daily load curves are clustered using a K-Means algorithm, and a fitness value of each standardized daily load curve in each cluster after clustering is calculated using a maximum likelihood estimation algorithm;
[0026] The standardized daily load curve with the largest fitness value in each cluster is denormalized to obtain several candidate typical daily load curves, and the candidate typical daily load curve with the largest fitness value is used as the typical daily load curve.
[0027] As a preferred solution, the method specifically trains the machine learning model through the following steps:
[0028] According to the historical load values at each moment in the historical load data, several historical load impact characteristic quantities, the historical load mean value and the mean values of several historical load impact characteristic quantities, a load correlation value between each historical load impact characteristic quantity and the historical load value at each moment is calculated using a Pearson correlation coefficient algorithm, and based on the historical load change values at each moment, a historical load change value corresponding to the load correlation value is determined;
[0029] A model training set is constructed according to the load correlation value of each historical load impact characteristic quantity at each moment and the historical load change value corresponding to the load correlation value, and the support vector machine model is trained using the model training set to obtain the machine learning model.
[0030] As a preferred embodiment, the method further comprises the following steps:
[0031] When receiving the encrypted vehicle information sent by the charging pile, decrypting the encrypted vehicle information to obtain the vehicle information corresponding to the electric vehicle connected to the charging pile;
[0032] According to the vehicle information, a safety check is performed on the current charging and discharging scenario according to a preset check strategy, and when the current charging and discharging scenario passes the safety check, a control instruction is generated according to the V2G charging and discharging strategy;
[0033] The control instruction and the preset charge and discharge safety code are sent to the charging pile, so that when the charge and discharge safety code is verified, the charging pile controls the electric vehicle to charge and discharge in response to the control instruction.
[0034] As a preferred solution, the vehicle information includes a VIN code, a license plate number, a user ID, a current charging address, and a current SOC value; then, the safety verification of the current charging and discharging scene is performed according to the vehicle information and a preset verification strategy, specifically including the following steps:
[0035] Based on a preset valid VIN code database, determining whether there is a target valid VIN code matching the VIN code of the electric vehicle in the valid VIN code database; wherein the valid VIN code database includes a plurality of valid VIN codes and a license plate number and a user ID corresponding to each valid VIN code;
[0036] When the target valid VIN code does not exist, it is determined that the current charging and discharging scenario fails the safety verification;
[0037] When the target valid VIN code exists, determining whether the license plate number and the user ID of the electric vehicle match the target license plate number and the target user ID corresponding to the target valid VIN code, respectively;
[0038] When the license plate number of the electric vehicle does not match the target license plate number, or the user ID of the electric vehicle does not match the target user ID, it is determined that the current charging and discharging scenario has not passed the safety verification;
[0039] When the license plate number and the user ID of the electric vehicle match the target license plate number and the target user ID respectively, based on a number of preset common charging addresses corresponding to the electric vehicle, determining whether the current charging address of the electric vehicle matches the preset common charging addresses;
[0040] When the current charging address of the electric vehicle does not match the preset common charging address, and it is determined based on the charging record of the electric vehicle that the number of times that the current charging address of the electric vehicle does not match the preset common charging address continuously reaches a preset number threshold, it is determined that the current charging and discharging scenario has not passed the safety check;
[0041] When the current charging address of the electric vehicle matches the preset common charging address, or the number of times that the current charging address of the electric vehicle does not match the preset common charging address continuously does not reach the preset number threshold, determining whether the current SOC value of the electric vehicle reaches the preset SOC threshold;
[0042] When the current SOC value of the electric vehicle reaches the preset SOC threshold, it is determined that the current charging and discharging scenario fails the safety verification;
[0043] When the current SOC value of the electric vehicle does not reach the preset SOC threshold, obtaining the current grid load value, and determining whether the current grid load value is within a preset safe load range;
[0044] When the current grid load value is not within the preset safe load range, it is determined that the current charging and discharging scenario fails the safety check;
[0045] When the current grid load value is within the preset safe load range, obtaining the discharge power of the electric vehicle, and determining whether the discharge power is within the preset safe power range;
[0046] When the discharge power is not within the preset safety power range, it is determined that the current charge and discharge scenario fails the safety check;
[0047] When the discharge power is within the preset safety power range, obtaining the number of charge and discharge times and the battery health of the electric vehicle, and determining whether the number of charge and discharge times is less than a preset charge and discharge number threshold, and whether the battery health is greater than a preset battery health threshold;
[0048] When the number of charge and discharge times is greater than or equal to the preset charge and discharge times threshold, or the battery health is less than or equal to the preset battery health threshold, it is determined that the current charge and discharge scenario fails the safety check;
[0049] When the number of charge and discharge times is less than the preset charge and discharge number threshold, and the battery health is greater than the preset battery health threshold, it is determined that the current charge and discharge scenario passes the safety check.
[0050] A second aspect of an embodiment of the present invention provides a V2G charging and discharging control device for an electric vehicle, comprising:
[0051] A sample day load curve generation module is used to generate a number of sample day load curves according to the historical load data of the target area; wherein the historical load data includes the historical load value at each moment and a number of historical load impact characteristic quantities, and the historical load value includes the historical basic load value and the historical load change value;
[0052] A basic load value acquisition module is used to cluster the sample daily load curves, and determine a typical daily load curve based on the fitness value of each clustered sample daily load curve, and use the load value at each moment in the typical daily load curve as the basic load value of the target area at each moment in the target adjustment time period;
[0053] A load change value acquisition module, used to obtain the load change value at each moment in the target adjustment time period through a preset machine learning model according to a number of load impact characteristic quantities corresponding to the target area in the target adjustment time period; wherein the machine learning model is trained according to the load association value of each preset historical load impact characteristic quantity at each moment and the historical load change value corresponding to the load association value;
[0054] A target regulation load acquisition module, used to determine the target regulation load at each moment in the target regulation time period according to the basic load value and the load change value at each moment in the target regulation time period;
[0055] The module for determining the allowable adjustable load range is used to determine the allowable adjustable load range of the target area at each moment according to the battery parameters of each electric vehicle at each moment;
[0056] A dispatching load value acquisition module, used to perform nonlinear fitting between the allowable adjustable load value and the target adjustable load according to a plurality of allowable adjustable load values in the allowable adjustable load range, so as to obtain the dispatching load value of the target area at each moment;
[0057] The V2G charging and discharging control module is used to solve the charging and discharging parameters corresponding to each electric vehicle using an optimization algorithm, taking the charging and discharging load value of the electric vehicle at each moment not exceeding the scheduling load value as a constraint condition, to obtain the V2G charging and discharging strategy corresponding to each electric vehicle, and control the charging and discharging of each electric vehicle according to the V2G charging and discharging strategy.
[0058] A third aspect of an embodiment of the present invention provides a terminal device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the electric vehicle V2G charging and discharging control method as described in any one of the first aspects is implemented.
[0059] Compared with the prior art, the beneficial effect of the embodiments of the present invention is that, based on the dispatching load value of the target area at each moment, the charging and discharging parameters of each electric vehicle at each moment can be reasonably allocated, so that the charging and discharging load value of the electric vehicle at each moment does not exceed the dispatching load value, thereby effectively reducing the load fluctuation of the power grid and improving the operating stability of the power grid. BRIEF DESCRIPTION OF THE DRAWINGS
[0060] Figure 1 1 is a flow chart of a V2G charging and discharging control method for an electric vehicle according to an embodiment of the present invention;
[0061] Figure 2 : is a schematic diagram of the structure of the V2G charging and discharging management system for electric vehicles in an embodiment of the present invention;
[0062] Figure 3 It is a schematic diagram of the structure of the V2G charging and discharging control device for an electric vehicle in an embodiment of the present invention. DETAILED DESCRIPTION
[0063] 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.
[0064] See also Figure 1 According to a first aspect of an embodiment of the present invention, a V2G charging and discharging control method for an electric vehicle is provided, comprising the following steps S1 to S7:
[0065] Step S1, generating a number of sample daily load curves according to the historical load data of the target area; wherein the historical load data includes the historical load values at each moment and a number of historical load impact characteristic quantities, and the historical load values include the historical basic load values and the historical load change values;
[0066] Step S2, clustering the sample daily load curves, determining a typical daily load curve based on the fitness values of the clustered sample daily load curves, and using the load values at each moment in the typical daily load curve as the basic load values of the target area at each moment in the target adjustment time period;
[0067] Step S3, according to a number of load impact characteristic quantities corresponding to the target area in the target adjustment time period, the load change value at each moment in the target adjustment time period is obtained through a preset machine learning model; wherein the machine learning model is trained according to the load association value of each preset historical load impact characteristic quantity at each moment and the historical load change value corresponding to the load association value;
[0068] Step S4, determining the target regulation load at each moment in the target regulation time period according to the basic load value and the load change value at each moment in the target regulation time period;
[0069] Step S5, determining the allowable adjustable load range of the target area at each moment according to the battery parameters of each electric vehicle at each moment;
[0070] Step S6, performing nonlinear fitting between the allowable adjustable load value and the target adjustable load according to a plurality of allowable adjustable load values in the allowable adjustable load range, to obtain the dispatching load value of the target area at each moment;
[0071] Step S7, taking the charging and discharging load value of the electric vehicle at each moment not exceeding the scheduling load value as a constraint condition, using the optimization algorithm to solve the charging and discharging parameters corresponding to each electric vehicle, obtaining the V2G charging and discharging strategy corresponding to each electric vehicle, and controlling each electric vehicle to charge and discharge according to the V2G charging and discharging strategy.
[0072] Specifically, this embodiment first obtains the historical load data of the target area, and generates several sample daily load curves according to the historical load values at each moment of each day. Exemplarily, based on the historical load data, each hour of each day is divided into moments at intervals of 15 minutes, that is, each hour corresponds to the 15th minute, the 30th minute, the 45th minute and the 60th minute, and then generates several sample daily load curves according to the historical load values at each moment of each day. Among them, the historical load data includes the historical load values at each moment and several historical load impact characteristic quantities. It is worth noting that the load impact characteristics include but are not limited to weather characteristics such as sunshine irradiance and temperature, holiday characteristics such as working days, holidays, rest days, electricity price characteristics and electric vehicle charging and discharging behavior characteristics, and the historical load impact characteristic quantities are the characteristic values corresponding to the sunshine irradiance, temperature, holiday characteristics, electricity price data and electric vehicle charging and discharging corresponding to each moment of history. Furthermore, the historical load value includes the historical basic load value and the historical load change value. It is worth noting that the basic load value can be understood as the long-term stable load of the power system, usually referring to the industrial, commercial, residential and other power loads. The power consumption of these loads is relatively stable and will not fluctuate greatly over time. The load change value is the load change value generated by the above-mentioned load influence characteristics. For example, the total regional load composition at each moment can be expressed as: W (t) =B (t) +D (t) +H (t) +M (t) +V (t) , where the load W at a certain time t is (t) The composition includes the basic load B (t) , load variation value affected by weather factors D (t) , load change value affected by holidays H (t) , load change value M affected by electricity price (t) , load variation value V affected by electric vehicle charging and discharging (t) .
[0073] Furthermore, after clustering several sample daily load curves, the fitness value of each sample daily load curve is used to determine the typical daily load curve, and the load value at each moment in the typical daily load curve is used as the basic load value of the target area at each moment in the target adjustment time period.
[0074] Furthermore, since the machine learning model in this embodiment is trained based on the load correlation values of each preset historical load impact characteristic quantity at each moment and the historical load change values corresponding to the load correlation values, the machine learning model can learn the load correlation values between different load impact characteristic quantities and the load values at each moment and the load change values corresponding to the load correlation values, thereby inputting several load impact characteristic quantities corresponding to the target area in the target adjustment time period into the machine learning model, and obtaining the load change values at each moment in the target adjustment time period.
[0075] Furthermore, the basic load value and the load change value at each moment in the target adjustment time period are accumulated to determine the target adjustment load at each moment.
[0076] Furthermore, this embodiment can determine the available charging power and available discharging power of the electric vehicle group at each moment according to the battery parameters of each electric vehicle at each moment, and use them as the allowable adjustable load capacity of the target area, thereby determining the allowable adjustable load range of the target area at each moment.
[0077] Furthermore, a number of allowable adjustable load values in the allowable adjustable load range at each moment are nonlinearly fitted with the target adjustable load, so that the target adjustable load is close to the allowable adjustable load value, and the optimal load distribution value at each moment is continuously optimized as the dispatching load value.
[0078] Furthermore, the constraint condition is that the charging and discharging load value of the electric vehicle at each moment does not exceed the dispatching load value. For example, the charging load of the electric vehicle is a positive value, and the discharging load is a negative value, and the sum of the values is infinitely close to the dispatching load value and the load characteristics of the region become smooth. At the same time, this embodiment can also add the charging demand of each electric vehicle as a constraint condition, so that the total charging and discharging amount of the electric vehicle during the charging and discharging period meets the charging and discharging amount target uploaded by the electric vehicle, and the optimization algorithm is used to solve the charging and discharging parameters corresponding to each electric vehicle, including the charging time period, the discharging time period, the charging load value and the discharging load value, so as to obtain the V2G charging and discharging strategy corresponding to each electric vehicle and control the charging and discharging of each electric vehicle.
[0079] An electric vehicle V2G charging and discharging control method provided by an embodiment of the present invention can reasonably allocate the charging and discharging parameters of each electric vehicle at each moment based on the dispatching load value of the target area at each moment, so that the charging and discharging load value of the electric vehicle at each moment does not exceed the dispatching load value, thereby effectively reducing the load fluctuation of the power grid and improving the operating stability of the power grid.
[0080] As a preferred solution, the battery parameters include a battery rated current value and a battery rated voltage value; then, determining the allowable adjustable load range of the target area at each moment according to the battery parameters of each electric vehicle at each moment specifically includes the following steps:
[0081] Determining the maximum charging current value and the maximum discharging current value of each electric vehicle according to the rated current value of the battery;
[0082] Determine the lower limit of the load allowed to be adjusted in the target area at each moment according to the maximum charging current value, the battery rated voltage value and the preset charging power limit value of each electric vehicle at each moment;
[0083] Determine the upper limit value of the load allowed to be adjusted in the target area at each moment according to the maximum discharge current value, the battery rated voltage value and the preset discharge power limit value of each electric vehicle at each moment;
[0084] The allowable adjustable load range of the target area at each moment is determined according to the allowable adjustable load lower limit value and the allowable adjustable load upper limit value.
[0085] Specifically, this embodiment can determine the battery rated current value through the battery parameters of the electric vehicle. For example, the battery rated current value corresponding to a 100A·h battery is 100A. Based on this, the maximum charging current value and the maximum discharging current value of each electric vehicle are determined. For example, the maximum charging current value is half of the battery rated current value, and the maximum discharging current value is twice the battery rated current value.
[0086] Furthermore, due to the constraints of line power capacity, this embodiment needs to consider the charging power limit and the discharging power limit when determining the allowable adjustable load range at each moment. For example, the charging power limit is 20kW and the discharging power limit is 15kW. The upper limit and lower limit of the allowable adjustable load at each moment in the target area are determined by the following expressions, where a positive value indicates discharging and a negative value indicates charging:
[0087]
[0088]
[0089] Where n is the number of electric vehicles at each moment, I iN Indicates the rated current value of the battery, V it Indicates the rated voltage of the battery.
[0090] As a preferred solution, the charging and discharging load value of the electric vehicle at each moment does not exceed the scheduling load value as a constraint condition, and the charging and discharging parameters corresponding to each electric vehicle are solved by using an optimization algorithm to obtain the V2G charging and discharging strategy corresponding to each electric vehicle, which specifically includes the following steps:
[0091] Randomly generate an initial population including the charging / discharging time period, charging pile information and charging / discharging load value corresponding to each electric vehicle;
[0092] The individual in the initial population is iteratively updated using the Jaya algorithm, with the electric vehicle charging and discharging load value at each moment not exceeding the dispatching load value as a constraint condition, until the number of iterative updates reaches a preset threshold number of iterations, and an optimized population is obtained; wherein, in each iterative update process, the fitness of the individual before the update and the fitness of the individual after the update are calculated using the Jaya algorithm; if the fitness of the individual before the update is less than the fitness of the individual after the update, the individual before the update is replaced with the individual after the update; if the fitness of the individual before the update is greater than or equal to the fitness of the individual after the update, the individual before the update is retained;
[0093] According to the optimized charging / discharging time period, optimized charging pile information and optimized charging / discharging load value corresponding to each electric vehicle included in the optimized population, the V2G charging and discharging strategy corresponding to each electric vehicle is determined.
[0094] Specifically, this embodiment first randomly generates an initial population X=[CS, CA, PS] of size x' (usually 50), wherein CS represents the allocation of charging / discharging time periods, CA represents the allocation of charging pile information, PS represents the allocation of charging / discharging load values, the data lengths of CS and CAD are the total number of charging and discharging plans to be charged and discharged, the total value of PS is the total power to be charged and discharged, and the charging and discharging load value of the electric vehicle at each moment does not exceed the scheduling load value as a constraint condition. At the same time, according to the principle that the same electric vehicle shall not be sorted in multiple charging piles, the same charging pile shall not be allocated to multiple electric vehicles at the same time, and the allocated charging / discharging load value shall not exceed the limit of the electric vehicle and the charging pile, the Jaya algorithm is used to iteratively update the individuals in the initial population, and the expression is as follows:
[0095] P′ j,k,i =|floor[P j,k,i +rand 1,j,i (P j,best,i -P j,k,i )-rand 2,j,i (P j,worst,i -P j,k,i )]|;
[0096] Among them, Pj,best,i and P j,worst,i They represent the jth variable of the best individual and the jth variable of the worst individual in the i-th iteration process, respectively. j,k,i represents the jth variable of the kth individual in the i-th iteration, P′ j,k,i P j,k,i The updated value of rand 1,j,i and rand 2,j,i They are all random numbers between 0 and 1, and floor() represents the floor function.
[0097] In each iterative update process, the Jaya algorithm is used to calculate the fitness of the individual before the update and the fitness of the individual after the update; if the fitness of the individual before the update is less than the fitness of the individual after the update, the individual before the update is replaced by the individual after the update; if the fitness of the individual before the update is greater than or equal to the fitness of the individual after the update, the individual before the update is retained, thereby achieving continuous optimization of the population individuals.
[0098] When the number of iterative updates reaches the preset iteration threshold, such as 100 times, the final optimized population is obtained, and the V2G charging and discharging strategy corresponding to each electric vehicle is determined based on the optimized charging / discharging time period, optimized charging pile information and optimized charging / discharging load value corresponding to each electric vehicle included in the optimized population.
[0099] As a preferred solution, according to a plurality of allowable adjustable load values in the allowable adjustable load range, nonlinear fitting is performed between the allowable adjustable load value and the target adjustable load to obtain the dispatching load value of the target area at each moment, which specifically includes the following steps:
[0100] According to several allowable adjustable load values in the allowable adjustable load range, the gradient descent method is used through the expression: The allowable adjustable load value is nonlinearly fitted with the target adjustable load to obtain the scheduling load value of the target area at each moment; wherein W1 represents the target adjustable load at each moment, W2 represents the allowable adjustable load value in the allowable adjustable load range at each moment, and J(W1, W2) represents the loss function corresponding to the gradient descent method.
[0101] Specifically, this embodiment adopts the gradient descent method to obtain the allowable adjustable load value close to the target adjustable load from the allowable adjustable load range, thereby realizing the fitting of the nonlinear relationship, and continuously optimizing to obtain the dispatching load value of the target area at each moment.
[0102] As a preferred solution, clustering the sample daily load curves and determining a typical daily load curve based on the fitness value of each clustered sample daily load curve specifically includes the following steps:
[0103] The sample daily load curve is normalized by using a mean-variance normalization algorithm to obtain a standardized daily load curve;
[0104] Based on the pre-generated number of typical daily load curves, a number of the standardized daily load curves are clustered using a K-Means algorithm, and a fitness value of each standardized daily load curve in each cluster after clustering is calculated using a maximum likelihood estimation algorithm;
[0105] The standardized daily load curve with the largest fitness value in each cluster is denormalized to obtain several candidate typical daily load curves, and the candidate typical daily load curve with the largest fitness value is used as the typical daily load curve.
[0106] Specifically, this embodiment first uses the mean-variance normalization algorithm to normalize the sample daily load curve, and the expression is: Z = (X-μ) / s, where Z represents the standardized data, X represents the original data, μ represents the mean corresponding to the original data, and s represents the standard deviation corresponding to the original data.
[0107] Furthermore, based on the pre-generated number of typical daily load curves, the K-Means algorithm is used to cluster several standardized daily load curves, and then the maximum likelihood estimation algorithm is used to calculate the fitness values of each standardized daily load curve in each cluster after clustering and sort them. For each cluster, the standardized daily load curve with the largest fitness is taken for denormalization, and then the candidate typical daily load curve with the largest fitness value is taken as the typical daily load curve.
[0108] As a preferred solution, the method specifically trains the machine learning model through the following steps:
[0109] According to the historical load values at each moment in the historical load data, several historical load impact characteristic quantities, the historical load mean value and the mean values of several historical load impact characteristic quantities, a load correlation value between each historical load impact characteristic quantity and the historical load value at each moment is calculated using a Pearson correlation coefficient algorithm, and based on the historical load change values at each moment, a historical load change value corresponding to the load correlation value is determined;
[0110] A model training set is constructed according to the load correlation value of each historical load impact characteristic quantity at each moment and the historical load change value corresponding to the load correlation value, and the support vector machine model is trained using the model training set to obtain the machine learning model.
[0111] Specifically, according to the historical load values at each moment in the historical load data, several historical load impact characteristic quantities, the historical load mean and the mean of several historical load impact characteristic quantities, the Pearson correlation coefficient algorithm is used to calculate the load correlation value between each historical load impact characteristic quantity and the historical load value at each moment. The expression is as follows:
[0112]
[0113] Among them, r xy represents the load-related value, x i represents the i-th observation value of the historical load value, represents the historical load mean, y i represents the i-th observation value of the historical load impact characteristic quantity, Represents the mean value of the historical load impact characteristic quantity.
[0114] After calculating the load correlation value between each historical load impact characteristic quantity and the historical load value at each moment, the load correlation value matrix of the relevant characteristic quantities can be obtained. The load correlation value interval is [-1, 1], and the larger the value, the higher the correlation.
[0115] Furthermore, since the historical load change values for each load impact feature in the historical load value at each moment are pre-acquired, the load association value of each historical load impact feature at each moment can be associated with the historical load change value corresponding to each moment, so that a model training set can be constructed according to the load association value of each historical load impact feature at each moment and the historical load change value corresponding to the load association value, so as to train the support vector machine model and obtain a trained machine learning model. By inputting a number of load impact feature quantities corresponding to the target area in the target adjustment time period into the machine learning model, the load association value of each load impact feature quantity at each moment in the target adjustment time period can be obtained, and then the load change value at each moment in the target adjustment time period can be obtained.
[0116] As a preferred embodiment, the method further comprises the following steps:
[0117] When receiving the encrypted vehicle information sent by the charging pile, decrypting the encrypted vehicle information to obtain the vehicle information corresponding to the electric vehicle connected to the charging pile;
[0118] According to the vehicle information, a safety check is performed on the current charging and discharging scenario according to a preset check strategy, and when the current charging and discharging scenario passes the safety check, a control instruction is generated according to the V2G charging and discharging strategy;
[0119] The control instruction and the preset charge and discharge safety code are sent to the charging pile, so that when the charge and discharge safety code is verified, the charging pile controls the electric vehicle to charge and discharge in response to the control instruction.
[0120] Specifically, in this embodiment, electric vehicle users can use preset charging APPs and other tools to scan the charging QR code on the charging pile, or directly start the charging pile with one click in the charging APP, so that the charging pile can initiate a charging request and authenticate. After the charging pile sends a link request, in order to improve the safety of charging and discharging, this embodiment obtains multiple identification information of the charging pile as a device fingerprint, and then uses the SM4 symmetric encryption key and the device fingerprint to generate a random key and send it to the charging pile, so that the charging pile receives the key and saves it.
[0121] When an electric vehicle is connected to a charging pile, the charging pile can read the vehicle information of the electric vehicle through CAN communication, and then use the device key to encrypt and upload the obtained vehicle information. When the encrypted vehicle information sent by the charging pile is received, this embodiment uses a hash decryption algorithm such as the sha2 algorithm, and performs a security check on the current charging and discharging scenario according to the vehicle information obtained by decryption and a preset verification strategy. When the current charging and discharging scenario passes the security check, a control instruction is generated according to the V2G charging and discharging strategy.
[0122] Furthermore, the above-mentioned control instructions and the preset charging and discharging safety code are sent to the corresponding charging pile. It is worth noting that the charging and discharging safety code includes a 16-bit random number and has a time limit to prevent reuse. When the charging and discharging safety code is verified, the charging pile controls the electric vehicle to charge and discharge in response to the control instruction.
[0123] As a preferred solution, the vehicle information includes a VIN code, a license plate number, a user ID, a current charging address, and a current SOC value; then, the safety verification of the current charging and discharging scene is performed according to the vehicle information and a preset verification strategy, specifically including the following steps:
[0124] Based on a preset valid VIN code database, determining whether there is a target valid VIN code matching the VIN code of the electric vehicle in the valid VIN code database; wherein the valid VIN code database includes a plurality of valid VIN codes and a license plate number and a user ID corresponding to each valid VIN code;
[0125] When the target valid VIN code does not exist, it is determined that the current charging and discharging scenario fails the safety verification;
[0126] When the target valid VIN code exists, determining whether the license plate number and the user ID of the electric vehicle match the target license plate number and the target user ID corresponding to the target valid VIN code, respectively;
[0127] When the license plate number of the electric vehicle does not match the target license plate number, or the user ID of the electric vehicle does not match the target user ID, it is determined that the current charging and discharging scenario has not passed the safety verification;
[0128] When the license plate number and the user ID of the electric vehicle match the target license plate number and the target user ID respectively, based on a number of preset common charging addresses corresponding to the electric vehicle, determining whether the current charging address of the electric vehicle matches the preset common charging addresses;
[0129] When the current charging address of the electric vehicle does not match the preset common charging address, and it is determined based on the charging record of the electric vehicle that the number of times that the current charging address of the electric vehicle does not match the preset common charging address continuously reaches a preset number threshold, it is determined that the current charging and discharging scenario has not passed the safety check;
[0130] When the current charging address of the electric vehicle matches the preset common charging address, or the number of times that the current charging address of the electric vehicle does not match the preset common charging address continuously does not reach the preset number threshold, determining whether the current SOC value of the electric vehicle reaches the preset SOC threshold;
[0131] When the current SOC value of the electric vehicle reaches the preset SOC threshold, it is determined that the current charging and discharging scenario fails the safety verification;
[0132] When the current SOC value of the electric vehicle does not reach the preset SOC threshold, obtaining the current grid load value, and determining whether the current grid load value is within a preset safe load range;
[0133] When the current grid load value is not within the preset safe load range, it is determined that the current charging and discharging scenario fails the safety check;
[0134] When the current grid load value is within the preset safe load range, obtaining the discharge power of the electric vehicle, and determining whether the discharge power is within the preset safe power range;
[0135] When the discharge power is not within the preset safety power range, it is determined that the current charge and discharge scenario fails the safety check;
[0136] When the discharge power is within the preset safety power range, obtaining the number of charge and discharge times and the battery health of the electric vehicle, and determining whether the number of charge and discharge times is less than a preset charge and discharge number threshold, and whether the battery health is greater than a preset battery health threshold;
[0137] When the number of charge and discharge times is greater than or equal to the preset charge and discharge times threshold, or the battery health is less than or equal to the preset battery health threshold, it is determined that the current charge and discharge scenario fails the safety check;
[0138] When the number of charge and discharge times is less than the preset charge and discharge number threshold, and the battery health is greater than the preset battery health threshold, it is determined that the current charge and discharge scenario passes the safety check.
[0139] Specifically, this embodiment first performs a security check on the VIN code of the connected electric vehicle based on a preset valid VIN code database, and locks the charging pile and VIN code at the same time. During the locking period, the VIN code is prohibited from being used on other charging piles at the same time. Then, the license plate number and user ID security check, charging address security check, SOC value security check, power grid load value security check, electric vehicle discharge power security check, charge and discharge times and battery health security check are performed respectively. If the security check fails during the security check process, a verification failure alarm message is sent to the user terminal, charging pile, etc., and the start of charging and discharging is terminated.
[0140] As an optional embodiment, the electric vehicle V2G charging and discharging control method provided in this embodiment can be applied to an electric vehicle V2G charging and discharging management system, such as Figure 2 As shown, the system includes a V2G management module, an IoT management platform, a CSB service module, an IoT gateway module, a V2G device protocol module, an IOT platform module, an MQTT message service module, a V2G charging device group, and an electric vehicle group module.
[0141] The V2G management module is responsible for overall monitoring, data collection, strategy formulation, and command issuance. The V2G management module implements cross-environment open services through the CSB service module, thereby communicating with other functional modules such as the IoT gateway module. The V2G management module is also responsible for publishing relevant information such as the power load demand and discharge electricity price of the entire power grid, while monitoring the real-time status, location information, and battery usage of electric vehicles as a whole, and formulating the optimal V2G charging and discharging strategy based on the monitored data and the power grid's own related needs. The V2G management module summarizes and calculates the total regional load demand within the target adjustment time period and sends it to the IoT management platform.
[0142] The IoT management platform receives and decomposes the total regional load demand issued by the V2G management module as the total power regulation target, calculates the allowable adjustable load capacity reported by each IoT gateway module to obtain the total regional allowable adjustable load capacity, and then uses the gradient descent method to perform nonlinear fitting of the allowable adjustable load value and the target adjustable load, that is, adjusts the load value at each moment under the IoT gateway module to make the power regulation target close to the regional allowable adjustable load capacity, continuously optimizes to obtain the dispatching load value at each moment, and forms an adjustment plan and sends it to the IoT gateway module.
[0143] The CSB service module is used to build an open communication platform. Under the condition of internal and external service isolation, the V2G management module of the intranet can open interfaces to external devices and external services, such as the IoT management platform, across environments.
[0144] The IoT gateway module implements functions such as traffic forwarding, device authentication and startup authentication, and status reading. It communicates with the CSB service module through the HSF protocol and connects with the V2G device protocol module through HTTP. The IoT gateway module is the connection medium between the charging and discharging equipment and other related equipment and the V2G management module. It is responsible for monitoring the charging / discharging operation and status of electric vehicles, uploading them to the V2G management module, conveying the scheduling commands of the V2G management module, and completing the orderly charging and discharging operations of electric vehicles.
[0145] The IoT gateway module takes the constraint that the electric vehicle charging and discharging load value at each moment does not exceed the dispatching load value according to the dispatching load value received at each moment. At the same time, the total charge and discharge amount of the electric vehicle during the charging and discharging period meets the charge and discharge amount target uploaded by the electric vehicle. The Jaya algorithm is used to determine the charge and discharge parameters corresponding to each electric vehicle in the process of multiple iterations to formulate the V2G charging and discharging strategy for each electric vehicle. In addition, the IoT gateway module is also responsible for remote monitoring of the completion of charging and discharging. The IoT management platform monitors the safety of the power grid. The V2G management module monitors the overall completion of indicators.
[0146] The V2G device protocol module implements the basic framework of business code instruction retransmission, exception handling, status monitoring, telemetry and remote adjustment, and protocol interaction. The V2G device protocol module communicates with the V2G management module through the MQ (Message Queue) in the MQTT message service module, including business code instruction retransmission, exception handling, status monitoring, telemetry and remote adjustment. At the same time, the V2G device protocol module uses the HTTP protocol to connect to the IoT gateway module, interact with model data, and implement functions such as access to device authentication startup on the V2G management module.
[0147] The IOT platform module includes rule engine, device connection SLB, API, and Minio (object storage system). Among them, the rule engine and device connection SLB are connected to the charging device through the TCP protocol, and the API and Minio modules communicate with the asset platform through the HTTP protocol to realize functions such as certificate generation, authentication, and download.
[0148] The MQTT message service module provides MQTT message services, including application MQ, IOT message MQ, and public service MQ. It communicates with other modules through wireless communication and MQTT protocol. The MQTT message service module is a fully trusted communication management module, which is divided into multiple MQTT sub-services, such as application message MQ, IOI message MQ, asset message MQ, etc.
[0149] The V2G charging equipment group includes a variety of charging equipment with V2G functions. The charging equipment connects to the SLB communication with the equipment of the IOT platform module through the TCP protocol to realize data transmission and command reception.
[0150] The single pile in the V2G charging equipment group receives the instructions of the IoT gateway module, controls the switching action of the contactor, completes the call of the power module between the circuits, and outputs the charging and discharging power according to the power demand. When the power grid is out of power, the electric vehicle power battery is prohibited from feeding back power to the grid and cuts off the output in less than 2s. Through the input or output interface, the state control and collection of AC and DC distribution equipment and each DC contactor are realized; the metering data of AC and DC meters are collected through RS485 communication, and uploaded to the operation background after encryption; the power instructions of each power conversion module are issued and the real-time data and state of voltage, current, power, etc. are obtained through CAN communication, and the charging and discharging process and power demand data can be exchanged with the vehicle battery management system through CAN communication. The V2G charging pile is responsible for the data exchange between the electric vehicle and the IoT gateway module. The real-time state of the charging and discharging of the electric vehicle is monitored, and the relevant information is uploaded to the V2G management module to realize the control of the charging / discharging of the electric vehicle according to the V2G charging and discharging strategy.
[0151] When the state of charge in the status information is greater than a preset state of charge threshold, the energy storage device is controlled to discharge the battery until the state of charge is no greater than the preset state of charge threshold.
[0152] The electric vehicle group includes multiple electric vehicles with V2G function (two-way energy trading capability). They communicate with the V2G charging equipment group through the CAN protocol and respond to instructions to perform charging and discharging operations.
[0153] Electric vehicles can set V2G mode and multiple constraints, including: electric vehicle charging start time, charging end time, discharging start time, discharging end time, charging power, discharging power, battery available capacity and minimum state of charge (SOC) and other configuration values to operate the charging and discharging process.
[0154] Based on the electric vehicle V2G charging and discharging control system, the safety management process of electric vehicle V2G orderly charging and discharging is:
[0155] (1) Electric vehicle users use charging apps and other tools to scan the charging QR code of the charging device, or directly start the charging device with one click in the charging app tool, initiate a charging request to the V2G management module and authenticate it. The V2G management module then initiates a charge / discharge process instruction to the charging device.
[0156] The charging pile device sends a link request to the V2G management module; after receiving the request, the V2G management module obtains various identification information of the device as the device fingerprint, uses the SM4 symmetric encryption key and the device fingerprint to generate a random key and sends it to the charging device; the charging device receives the key and saves it. After the electric vehicle is connected to the charging device, the charging device reads the vehicle VIN code through CAN communication, uses the device key to encrypt the obtained VIN, and uploads it to the V2G management module. The V2G management module uses the sha2 algorithm to perform hash decryption on the VIN information, compares it with the pre-stored valid VIN code database, performs VIN information security verification, and locks the charging device and VIN code at the same time. During the locking period, the VIN code is prohibited from being used on other charging devices at the same time.
[0157] Furthermore, the vehicle information is subjected to security verification of license plate number and user ID, charging address, SOC value, grid load value, electric vehicle discharge power, charge and discharge times and battery health. After each step passes, the next step of detection is entered. If it fails, a verification failure alarm message is sent to the user terminal and charging equipment, and the charging and discharging start-up is terminated.
[0158] (2) The V2G management module calls the startup charging service and uploads the startup mode as "ordered charging". The charging device receives the startup instruction through the service output parameter feedback to the V2G management module. The charging device returns the startup charging result to the V2G management module through an event. If the V2G management module does not receive the output parameter feedback of the startup charging service, it will resend the service. The V2G management module can resend it up to 2 times. After receiving the startup request, the charging device must upload the transaction record after the order is completed, regardless of whether the order is successfully started. If the charging mode is orderly charging, the charging device needs to wait for the orderly strategy service. If it does not receive it within 30 seconds, it will enter the normal charging mode.
[0159] (3) For charging devices with orderly charging and discharging functions, when the first issuance or policy change occurs, the V2G management module calls the "ordered charging and discharging policy issuance" service. If the V2G management module does not receive a call back from the charging device within 10 seconds, it will resend the "ordered charging and discharging policy issuance" service up to 2 times. The type of orderly charging policy issuance is "service" and the calling method is "asynchronous". The V2G management module calls this service to issue the orderly charging and discharging policy, and the charging device should complete the charging and discharging control according to the policy. After the orderly policy is issued, the charging device updates the current policy. The policy content includes the policy effective time, policy configuration power, and policy segment number.
[0160] When the charging strategy is inconsistent with the power limit value in the charging start message, charging is performed according to the charging strategy.
[0161] After the charging device is started, the charging and discharging is controlled according to the "power limit" in the startup charging message before receiving the orderly strategy. If the "power limit" is not within the control range supported by the device (corresponding to a duty cycle between 10% and 90%) or the platform does not limit the charging and discharging power of the device, charging and discharging are performed according to the rated power.
[0162] If the startup mode is orderly charging and discharging, the orderly strategy issued by the V2G management module should be respondable at any time during the charging process.
[0163] During the orderly charging and discharging process, since power switching requires operation of the CP signal, the charging gun plugging and unplugging event is not reported.
[0164] In addition, for the reporting of vehicle information before charging, when the charging gun is inserted into the vehicle charging socket, the charging device should obtain and report the vehicle information within 10 seconds, including VIN code, license plate number, user ID, current charging address and current SOC value.
[0165] After the vehicle starts the V2G charging and discharging service, it automatically joins the V2G dynamic network in the area, and leaves the V2G dynamic network in the area when the charging and discharging stops. In order to protect the transmission of confidential information such as vehicle identity, vehicle model, charging and discharging time, and charging station identity in the network, the regional V2G dynamic network uses dynamic registration and anonymous authentication strategies to realize vehicle identity authentication, and uses the message verification function (MAC) for signing and verification. Through the encryption-first-then-verification mode, the encrypted message is transmitted from the vehicle to the charging device. The charging device does not decrypt the message, but will add charging and discharging operation related information to the message and forward it to the IoT gateway module to maintain end-to-end information confidentiality. Dynamic registration means that there is no need to burn different triplets for different devices under the same category, only the same device key needs to be burned, and each device dynamically registers itself in network communication.
[0166] See also Figure 3A second aspect of an embodiment of the present invention provides a V2G charging and discharging control device for an electric vehicle, comprising:
[0167] The sample daily load curve generation module 301 is used to generate a number of sample daily load curves according to the historical load data of the target area; wherein the historical load data includes the historical load value at each moment and a number of historical load impact characteristic quantities, and the historical load value includes the historical basic load value and the historical load change value;
[0168] The basic load value acquisition module 302 is used to cluster the sample daily load curves, determine the typical daily load curve based on the fitness value of each clustered sample daily load curve, and use the load value at each moment in the typical daily load curve as the basic load value of the target area at each moment in the target adjustment time period;
[0169] The load change value acquisition module 303 is used to obtain the load change value at each moment in the target adjustment time period through a preset machine learning model according to a number of load impact characteristic quantities corresponding to the target area in the target adjustment time period; wherein the machine learning model is trained according to the load association value of each preset historical load impact characteristic quantity at each moment and the historical load change value corresponding to the load association value;
[0170] The target regulation load acquisition module 304 is used to determine the target regulation load at each moment in the target regulation time period according to the basic load value and the load change value at each moment in the target regulation time period;
[0171] The module 305 for determining the load range allowed to be adjusted is used to determine the load range allowed to be adjusted in the target area at each moment according to the battery parameters of each electric vehicle at each moment;
[0172] The dispatching load value acquisition module 306 is used to perform nonlinear fitting between the allowable adjustable load value and the target adjustable load according to a plurality of allowable adjustable load values in the allowable adjustable load range, so as to obtain the dispatching load value of the target area at each moment;
[0173] The V2G charge and discharge control module 307 is used to solve the charge and discharge parameters corresponding to each electric vehicle using an optimization algorithm, taking the charge and discharge load value of the electric vehicle at each moment not exceeding the dispatch load value as a constraint condition, obtain the V2G charge and discharge strategy corresponding to each electric vehicle, and control the charge and discharge of each electric vehicle according to the V2G charge and discharge strategy.
[0174] As a preferred solution, the battery parameters include a battery rated current value and a battery rated voltage value; then, the allowable adjustable load range determination module 305 is used to determine the allowable adjustable load range of the target area at each moment according to the battery parameters of each electric vehicle at each moment, specifically including:
[0175] Determining the maximum charging current value and the maximum discharging current value of each electric vehicle according to the rated current value of the battery;
[0176] Determine the lower limit of the load allowed to be adjusted in the target area at each moment according to the maximum charging current value, the battery rated voltage value and the preset charging power limit value of each electric vehicle at each moment;
[0177] Determine the upper limit value of the load allowed to be adjusted in the target area at each moment according to the maximum discharge current value, the battery rated voltage value and the preset discharge power limit value of each electric vehicle at each moment;
[0178] The allowable adjustable load range of the target area at each moment is determined according to the allowable adjustable load lower limit value and the allowable adjustable load upper limit value.
[0179] As a preferred solution, the V2G charging and discharging control module 307 is used to solve the charging and discharging parameters corresponding to each electric vehicle using an optimization algorithm, with the charging and discharging load value of the electric vehicle at each moment not exceeding the scheduling load value as a constraint condition, to obtain the V2G charging and discharging strategy corresponding to each electric vehicle, specifically including:
[0180] Randomly generate an initial population including the charging / discharging time period, charging pile information and charging / discharging load value corresponding to each electric vehicle;
[0181] The individual in the initial population is iteratively updated using the Jaya algorithm, with the electric vehicle charging and discharging load value at each moment not exceeding the dispatching load value as a constraint condition, until the number of iterative updates reaches a preset threshold number of iterations, and an optimized population is obtained; wherein, in each iterative update process, the fitness of the individual before the update and the fitness of the individual after the update are calculated using the Jaya algorithm; if the fitness of the individual before the update is less than the fitness of the individual after the update, the individual before the update is replaced with the individual after the update; if the fitness of the individual before the update is greater than or equal to the fitness of the individual after the update, the individual before the update is retained;
[0182] According to the optimized charging / discharging time period, optimized charging pile information and optimized charging / discharging load value corresponding to each electric vehicle included in the optimized population, the V2G charging and discharging strategy corresponding to each electric vehicle is determined.
[0183] As a preferred solution, the dispatching load value acquisition module 306 is used to perform nonlinear fitting between the allowable adjustable load value and the target adjustable load according to several allowable adjustable load values in the allowable adjustable load range, and obtain the dispatching load value of the target area at each moment, specifically including:
[0184] According to several allowable adjustable load values in the allowable adjustable load range, the gradient descent method is used through the expression: The allowable adjustable load value is nonlinearly fitted with the target adjustable load to obtain the scheduling load value of the target area at each moment; wherein W1 represents the target adjustable load at each moment, W2 represents the allowable adjustable load value in the allowable adjustable load range at each moment, and J(W1, W2) represents the loss function corresponding to the gradient descent method.
[0185] As a preferred solution, the basic load value acquisition module 302 is used to cluster the sample daily load curves and determine a typical daily load curve based on the fitness value of each clustered sample daily load curve, specifically including:
[0186] The sample daily load curve is normalized by using a mean-variance normalization algorithm to obtain a standardized daily load curve;
[0187] Based on the pre-generated number of typical daily load curves, a number of the standardized daily load curves are clustered using a K-Means algorithm, and a fitness value of each standardized daily load curve in each cluster after clustering is calculated using a maximum likelihood estimation algorithm;
[0188] The standardized daily load curve with the largest fitness value in each cluster is denormalized to obtain several candidate typical daily load curves, and the candidate typical daily load curve with the largest fitness value is used as the typical daily load curve.
[0189] As a preferred solution, the device further includes a model training module, which is used to:
[0190] According to the historical load values at each moment in the historical load data, several historical load impact characteristic quantities, the historical load mean value and the mean values of several historical load impact characteristic quantities, a load correlation value between each historical load impact characteristic quantity and the historical load value at each moment is calculated using a Pearson correlation coefficient algorithm, and based on the historical load change values at each moment, a historical load change value corresponding to the load correlation value is determined;
[0191] A model training set is constructed according to the load correlation value of each historical load impact characteristic quantity at each moment and the historical load change value corresponding to the load correlation value, and the support vector machine model is trained using the model training set to obtain the machine learning model.
[0192] As a preferred solution, the V2G charging and discharging control module 307 is further used for:
[0193] When receiving the encrypted vehicle information sent by the charging pile, decrypting the encrypted vehicle information to obtain the vehicle information corresponding to the electric vehicle connected to the charging pile;
[0194] According to the vehicle information, a safety check is performed on the current charging and discharging scenario according to a preset check strategy, and when the current charging and discharging scenario passes the safety check, a control instruction is generated according to the V2G charging and discharging strategy;
[0195] The control instruction and the preset charge and discharge safety code are sent to the charging pile, so that when the charge and discharge safety code is verified, the charging pile controls the electric vehicle to charge and discharge in response to the control instruction.
[0196] As a preferred solution, the vehicle information includes a VIN code, a license plate number, a user ID, a current charging address, and a current SOC value; then, the V2G charging and discharging control module 307 is used to perform a safety check on the current charging and discharging scenario according to the vehicle information and a preset check strategy, specifically including:
[0197] Based on a preset valid VIN code database, determining whether there is a target valid VIN code matching the VIN code of the electric vehicle in the valid VIN code database; wherein the valid VIN code database includes a plurality of valid VIN codes and a license plate number and a user ID corresponding to each valid VIN code;
[0198] When the target valid VIN code does not exist, it is determined that the current charging and discharging scenario fails the safety verification;
[0199] When the target valid VIN code exists, determining whether the license plate number and the user ID of the electric vehicle match the target license plate number and the target user ID corresponding to the target valid VIN code, respectively;
[0200] When the license plate number of the electric vehicle does not match the target license plate number, or the user ID of the electric vehicle does not match the target user ID, it is determined that the current charging and discharging scenario has not passed the safety verification;
[0201] When the license plate number and the user ID of the electric vehicle match the target license plate number and the target user ID respectively, based on a number of preset common charging addresses corresponding to the electric vehicle, determining whether the current charging address of the electric vehicle matches the preset common charging addresses;
[0202] When the current charging address of the electric vehicle does not match the preset common charging address, and it is determined based on the charging record of the electric vehicle that the number of times that the current charging address of the electric vehicle does not match the preset common charging address continuously reaches a preset number threshold, it is determined that the current charging and discharging scenario has not passed the safety check;
[0203] When the current charging address of the electric vehicle matches the preset common charging address, or the number of times that the current charging address of the electric vehicle does not match the preset common charging address continuously does not reach the preset number threshold, determining whether the current SOC value of the electric vehicle reaches the preset SOC threshold;
[0204] When the current SOC value of the electric vehicle reaches the preset SOC threshold, it is determined that the current charging and discharging scenario fails the safety verification;
[0205] When the current SOC value of the electric vehicle does not reach the preset SOC threshold, obtaining the current grid load value, and determining whether the current grid load value is within a preset safe load range;
[0206] When the current grid load value is not within the preset safe load range, it is determined that the current charging and discharging scenario fails the safety check;
[0207] When the current grid load value is within the preset safe load range, obtaining the discharge power of the electric vehicle, and determining whether the discharge power is within the preset safe power range;
[0208] When the discharge power is not within the preset safety power range, it is determined that the current charge and discharge scenario fails the safety check;
[0209] When the discharge power is within the preset safety power range, obtaining the number of charge and discharge times and the battery health of the electric vehicle, and determining whether the number of charge and discharge times is less than a preset charge and discharge number threshold, and whether the battery health is greater than a preset battery health threshold;
[0210] When the number of charge and discharge times is greater than or equal to the preset charge and discharge times threshold, or the battery health is less than or equal to the preset battery health threshold, it is determined that the current charge and discharge scenario fails the safety check;
[0211] When the number of charge and discharge times is less than the preset charge and discharge number threshold, and the battery health is greater than the preset battery health threshold, it is determined that the current charge and discharge scenario passes the safety check.
[0212] It should be noted that the electric vehicle V2G charge and discharge control device provided in the embodiment of the present invention can implement all the processes of the electric vehicle V2G charge and discharge control method described in any of the above embodiments. The functions of each module in the device and the technical effects achieved are respectively the same as the functions and technical effects achieved by the electric vehicle V2G charge and discharge control method described in the above embodiments, and will not be repeated here.
[0213] A third aspect of an embodiment of the present invention provides a terminal device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the electric vehicle V2G charging and discharging control method as described in any embodiment of the first aspect is implemented.
[0214] The terminal device may be a computing device such as a desktop computer, a notebook, a PDA, a cloud server, etc. The terminal device may include, but is not limited to, a processor and a memory. The terminal device may also include an input / output device, a network access device, a bus, etc.
[0215] The processor may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc. The processor is the control center of the terminal device, and uses various interfaces and lines to connect various parts of the entire terminal device.
[0216] The memory can be used to store the computer program and / or module, and the processor realizes various functions of the terminal device by running or executing the computer program and / or module stored in the memory, and calling the data stored in the memory. The memory can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc.; the data storage area can store data created according to the use of the mobile phone (such as audio data, a phone book, etc.), etc. In addition, the memory can include a high-speed random access memory, and can also include a non-volatile memory, such as a hard disk, a memory, a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), at least one disk storage device, a flash memory device, or other volatile solid-state storage devices.
[0217] The above is a preferred embodiment of the present invention. It should be pointed out that a person skilled in the art can make several improvements and modifications without departing from the principle of the present invention. These improvements and modifications are also considered to be within the scope of protection of the present invention.
Claims
1. A V2G charging and discharging control method for an electric vehicle, characterized in that: The steps include: Generate several sample daily load curves based on the historical load data of the target area; wherein the historical load data includes the historical load values at each moment and several historical load impact characteristic quantities, and the historical load values include the historical basic load values and the historical load change values; Clustering the sample daily load curves, determining a typical daily load curve based on the fitness values of the clustered sample daily load curves, and using the load value at each moment in the typical daily load curve as the basic load value of the target area at each moment in the target adjustment time period; According to a number of load impact characteristic quantities corresponding to the target area in the target adjustment time period, the load change value at each moment in the target adjustment time period is obtained through a preset machine learning model; wherein the machine learning model is trained according to the load association value of each preset historical load impact characteristic quantity at each moment and the historical load change value corresponding to the load association value; Determining a target regulation load at each moment in the target regulation time period according to a basic load value and a load variation value at each moment in the target regulation time period; Determining the allowable adjustable load range of the target area at each moment according to the battery parameters of each electric vehicle at each moment; According to a plurality of allowable adjustable load values in the allowable adjustable load range, nonlinearly fitting the allowable adjustable load value with the target adjustable load is performed to obtain the dispatching load value of the target area at each moment; Taking the charging and discharging load value of the electric vehicle at each moment not exceeding the dispatching load value as a constraint condition, solving the charging and discharging parameters corresponding to each electric vehicle using an optimization algorithm, obtaining the V2G charging and discharging strategy corresponding to each electric vehicle, and controlling each electric vehicle to charge and discharge according to the V2G charging and discharging strategy; The constraint condition is that the charging and discharging load value of the electric vehicle at each moment does not exceed the dispatching load value, and the charging and discharging parameters corresponding to each electric vehicle are solved by using an optimization algorithm to obtain the V2G charging and discharging strategy corresponding to each electric vehicle, which specifically includes the following steps: Randomly generate an initial population including the charging / discharging time period, charging pile information and charging / discharging load value corresponding to each electric vehicle; The individual in the initial population is iteratively updated using the Jaya algorithm, with the electric vehicle charging and discharging load value at each moment not exceeding the dispatching load value as a constraint condition, until the number of iterative updates reaches a preset threshold number of iterations, thereby obtaining an optimized population; wherein, in each iterative update process, the fitness of the individual before the update and the fitness of the individual after the update are calculated using the Jaya algorithm respectively; if the fitness of the individual before the update is less than the fitness of the individual after the update, the individual before the update is replaced by the individual after the update; if the fitness of the individual before the update is greater than or equal to the fitness of the individual after the update, the individual before the update is retained; According to the optimized charging / discharging time period, optimized charging pile information and optimized charging / discharging load value corresponding to each electric vehicle included in the optimized population, the V2G charging and discharging strategy corresponding to each electric vehicle is determined.
2. The electric vehicle V2G charging and discharging control method according to claim 1, characterized in that: The battery parameters include a battery rated current value and a battery rated voltage value; then, determining the allowable adjustable load range of the target area at each moment according to the battery parameters of each electric vehicle at each moment specifically includes the following steps: Determining the maximum charging current value and the maximum discharging current value of each electric vehicle according to the rated current value of the battery; Determine the lower limit of the load allowed to be adjusted in the target area at each moment according to the maximum charging current value, the battery rated voltage value and the preset charging power limit value of each electric vehicle at each moment; Determine the upper limit value of the load allowed to be adjusted in the target area at each moment according to the maximum discharge current value, the battery rated voltage value and the preset discharge power limit value of each electric vehicle at each moment; The allowable adjustable load range of the target area at each moment is determined according to the allowable adjustable load lower limit value and the allowable adjustable load upper limit value.
3. The electric vehicle V2G charging and discharging control method according to claim 1, characterized in that: The step of performing nonlinear fitting on the allowable adjustable load value and the target adjustable load according to a plurality of allowable adjustable load values in the allowable adjustable load range to obtain the dispatching load value of the target area at each moment specifically includes the following steps: According to several allowable adjustable load values in the allowable adjustable load range, the gradient descent method is used through the expression: The allowable adjustable load value is nonlinearly fitted with the target adjustable load to obtain the dispatching load value of the target area at each moment; wherein, represents the target regulation load at each moment, Indicates the permissible adjustable load value within the permissible adjustable load range at each moment, Represents the loss function corresponding to the gradient descent method.
4. The electric vehicle V2G charging and discharging control method according to claim 1, characterized in that: The clustering of the sample daily load curves and determining a typical daily load curve based on the fitness value of each clustered sample daily load curve specifically includes the following steps: The sample daily load curve is normalized by using a mean-variance normalization algorithm to obtain a standardized daily load curve; Based on the pre-generated number of typical daily load curves, a number of the standardized daily load curves are clustered using a K-Means algorithm, and a fitness value of each standardized daily load curve in each cluster after clustering is calculated using a maximum likelihood estimation algorithm; The standardized daily load curve with the largest fitness value in each cluster is denormalized to obtain several candidate typical daily load curves, and the candidate typical daily load curve with the largest fitness value is used as the typical daily load curve.
5. The electric vehicle V2G charging and discharging control method according to claim 1, characterized in that: The method specifically trains the machine learning model through the following steps: According to the historical load values at each moment in the historical load data, several historical load impact characteristic quantities, the historical load mean value and the mean values of several historical load impact characteristic quantities, a load correlation value between each historical load impact characteristic quantity and the historical load value at each moment is calculated using a Pearson correlation coefficient algorithm, and based on the historical load change values at each moment, a historical load change value corresponding to the load correlation value is determined; A model training set is constructed according to the load correlation value of each historical load impact characteristic quantity at each moment and the historical load change value corresponding to the load correlation value, and the support vector machine model is trained using the model training set to obtain the machine learning model.
6. The electric vehicle V2G charging and discharging control method according to claim 1, characterized in that: The method further comprises the steps of: When receiving the encrypted vehicle information sent by the charging pile, decrypting the encrypted vehicle information to obtain the vehicle information corresponding to the electric vehicle connected to the charging pile; According to the vehicle information, a safety check is performed on the current charging and discharging scenario according to a preset check strategy, and when the current charging and discharging scenario passes the safety check, a control instruction is generated according to the V2G charging and discharging strategy; The control instruction and the preset charge and discharge safety code are sent to the charging pile, so that when the charge and discharge safety code is verified, the charging pile controls the electric vehicle to charge and discharge in response to the control instruction.
7. The electric vehicle V2G charging and discharging control method according to claim 6, characterized in that: The vehicle information includes a VIN code, a license plate number, a user ID, a current charging address, and a current SOC value; then, the safety verification of the current charging and discharging scene is performed according to the vehicle information and a preset verification strategy, specifically including the following steps: Based on a preset valid VIN code database, determining whether there is a target valid VIN code matching the VIN code of the electric vehicle in the valid VIN code database; wherein the valid VIN code database includes a plurality of valid VIN codes and a license plate number and a user ID corresponding to each valid VIN code; When the target valid VIN code does not exist, it is determined that the current charging and discharging scenario fails the safety verification; When the target valid VIN code exists, determining whether the license plate number and the user ID of the electric vehicle match the target license plate number and the target user ID corresponding to the target valid VIN code, respectively; When the license plate number of the electric vehicle does not match the target license plate number, or the user ID of the electric vehicle does not match the target user ID, it is determined that the current charging and discharging scenario has not passed the safety verification; When the license plate number and the user ID of the electric vehicle match the target license plate number and the target user ID respectively, based on a number of preset common charging addresses corresponding to the electric vehicle, determining whether the current charging address of the electric vehicle matches the preset common charging addresses; When the current charging address of the electric vehicle does not match the preset common charging address, and it is determined based on the charging record of the electric vehicle that the number of times that the current charging address of the electric vehicle does not match the preset common charging address continuously reaches a preset number threshold, it is determined that the current charging and discharging scenario has not passed the safety check; When the current charging address of the electric vehicle matches the preset common charging address, or the number of times that the current charging address of the electric vehicle does not match the preset common charging address continuously does not reach the preset number threshold, determining whether the current SOC value of the electric vehicle reaches the preset SOC threshold; When the current SOC value of the electric vehicle reaches the preset SOC threshold, it is determined that the current charging and discharging scenario fails the safety verification; When the current SOC value of the electric vehicle does not reach the preset SOC threshold, obtaining the current grid load value, and determining whether the current grid load value is within a preset safe load range; When the current grid load value is not within the preset safe load range, it is determined that the current charging and discharging scenario fails the safety check; When the current grid load value is within the preset safe load range, obtaining the discharge power of the electric vehicle, and determining whether the discharge power is within the preset safe power range; When the discharge power is not within the preset safety power range, it is determined that the current charge and discharge scenario fails the safety check; When the discharge power is within the preset safety power range, obtaining the number of charge and discharge times and the battery health of the electric vehicle, and determining whether the number of charge and discharge times is less than a preset charge and discharge number threshold, and whether the battery health is greater than a preset battery health threshold; When the number of charge and discharge times is greater than or equal to the preset charge and discharge times threshold, or the battery health is less than or equal to the preset battery health threshold, it is determined that the current charge and discharge scenario fails the safety check; When the number of charge and discharge times is less than the preset charge and discharge number threshold, and the battery health is greater than the preset battery health threshold, it is determined that the current charge and discharge scenario passes the safety check.
8. A V2G charging and discharging control device for an electric vehicle, characterized in that: include: A sample day load curve generation module is used to generate a number of sample day load curves according to the historical load data of the target area; wherein the historical load data includes the historical load value at each moment and a number of historical load impact characteristic quantities, and the historical load value includes the historical basic load value and the historical load change value; A basic load value acquisition module is used to cluster the sample daily load curves, and determine a typical daily load curve based on the fitness value of each clustered sample daily load curve, and use the load value at each moment in the typical daily load curve as the basic load value of the target area at each moment in the target adjustment time period; A load change value acquisition module, used to obtain the load change value at each moment in the target adjustment time period through a preset machine learning model according to a number of load impact characteristic quantities corresponding to the target area in the target adjustment time period; wherein the machine learning model is trained according to the load association value of each preset historical load impact characteristic quantity at each moment and the historical load change value corresponding to the load association value; A target regulation load acquisition module, used to determine the target regulation load at each moment in the target regulation time period according to the basic load value and the load change value at each moment in the target regulation time period; The module for determining the allowable adjustable load range is used to determine the allowable adjustable load range of the target area at each moment according to the battery parameters of each electric vehicle at each moment; A dispatching load value acquisition module, used to perform nonlinear fitting between the allowable adjustable load value and the target adjustable load according to a plurality of allowable adjustable load values in the allowable adjustable load range, so as to obtain the dispatching load value of the target area at each moment; A V2G charging and discharging control module is used to solve the charging and discharging parameters corresponding to each electric vehicle using an optimization algorithm, taking the charging and discharging load value of the electric vehicle at each moment not exceeding the dispatching load value as a constraint condition, obtain the V2G charging and discharging strategy corresponding to each electric vehicle, and control each electric vehicle to charge and discharge according to the V2G charging and discharging strategy; The V2G charging and discharging control module is used to solve the charging and discharging parameters corresponding to each electric vehicle using an optimization algorithm, taking the charging and discharging load value of the electric vehicle at each moment not exceeding the scheduling load value as a constraint condition, and obtain the V2G charging and discharging strategy corresponding to each electric vehicle, specifically including: Randomly generate an initial population including the charging / discharging time period, charging pile information and charging / discharging load value corresponding to each electric vehicle; The individual in the initial population is iteratively updated using the Jaya algorithm, with the electric vehicle charging and discharging load value at each moment not exceeding the dispatching load value as a constraint condition, until the number of iterative updates reaches a preset threshold number of iterations, thereby obtaining an optimized population; wherein, in each iterative update process, the fitness of the individual before the update and the fitness of the individual after the update are calculated using the Jaya algorithm respectively; if the fitness of the individual before the update is less than the fitness of the individual after the update, the individual before the update is replaced by the individual after the update; if the fitness of the individual before the update is greater than or equal to the fitness of the individual after the update, the individual before the update is retained; According to the optimized charging / discharging time period, optimized charging pile information and optimized charging / discharging load value corresponding to each electric vehicle included in the optimized population, the V2G charging and discharging strategy corresponding to each electric vehicle is determined.
9. A terminal device, characterized in that: The method comprises a memory, a processor and a computer program stored in the memory and executable on the processor, wherein the processor implements the electric vehicle V2G charging and discharging control method as claimed in any one of claims 1 to 7 when executing the computer program.
