In this section, the mathematical formulation used to obtain the energy costs minimization of the community with EVs is fully presented. The presented model is a mixed-integer linear programming model. Equation (1) presents the objective function of the problem.
where
represents the costs of prosumers;
represent the costs of electric vehicles, with prosumer
and electric vehicle
;
is the total number of prosumers; and
is the total number of electric vehicles. Equation (2) represents the calculation of the costs for prosumer
, namely
.
where
represents the amount of prosumers electricity purchase from the retailer,
is the retail price of electricity,
represents the amount of prosumers electricity sale to the grid,
is the price of electricity export to the grid,
is the amount of electricity transacted between prosumer
and EV
,
is the price of electricity transaction between prosumer
and EV
and
is the period factor adjustment. Normally, the tariff provided by retailers is available in EUR/kWh (EUR per kilowatt-hour) and the optimization can be scheduled at different period intervals (15 min).
is the fixed costs of each prosumer associated with the power contract. Equation (3) represents the calculation of the costs for EV
, namely
.
where
represents the EV electricity purchase from the retailer,
is the retail price to charge EV from the grid and
is the fixed costs of EV associated with the power contract. Equation (4) represents the electricity balance for each prosumer.
where
represents the electricity generated,
is the energy battery discharge,
represents the load of each prosumer,
represents the electricity battery charge and
represents the electricity charged by EV from the house. In this model, we consider that prosumers have EV and, when they are at home, they must participate in the prosumers’ energy balance. Equations (5)–(7) represents the limits for prosumers’ transactions.
where
represents the maximum power that prosumer can buy from the grid,
is a binary variable associated the purchase,
is the limit of electricity export to the grid,
represents a binary variable associated to the electricity export to the grid,
corresponds to the maximum limit electricity sale to the EV and
represents the binary variable associated with this transaction. Equation (8) indicates that each prosumer has the possibility to sell energy to one EV at a time. Equations (9) and (10) presents the prosumers restrictions to buy and sell electricity.
Equation (9) controls if the prosumer is buying or selling energy at a time, and Equation (10) limits prosumer electricity purchase to the retailer with a concurrent P2V transaction. Equations (11) and (12) correspond to the prosumers battery maximum charge rate and discharge rate, respectively, while constraint (13) controls the maximum charge rate of EV charging.
where
represents the maximum power for prosumer battery charge,
is a binary variable for the prosumer battery that represents the charge action when it is equal to 1,
represents the maximum power for the prosumer battery discharge,
is a binary variable that represents the discharge action when it is equal to 1,
represents the maximum power of EV battery charge located at prosumer
,
is a binary variable for EV battery that represents the charge action when it is equal to 1 and
is an input parameter that indicates if the EV is at home (1) or not (0). Equation (14) is a constraint applied to prosumers’ batteries, which limits the simultaneous charge and discharge of prosumers’ batteries.
Equations (15) and (16) represent the energy balance for the prosumers’ batteries.
where
represents the state of charge of the battery,
is the initial level of the battery,
is the efficiency of battery charge and
is the efficiency of battery discharge. Equation (15) is applied only for the first period
and Equation (16) is applied to other periods. Equations (17)–(24) represent the limits for the continuous variables associated to the prosumers’ operation and (25)–(30) is the limits for the binary variables associated to the prosumers’ operation.
where
represents the maximum capacity of the prosumers’ battery.
Equation (31) presents the energy balance for the EVs.
where
represents the electricity purchase by each EV to the retailer and
represents the electricity charged by each EV.
where
represents the energy state of the EV battery,
represents the initial level of the EV battery,
corresponds to the efficiency of EV battery charge and
corresponds to the electricity consumption of EV during trips. Equations (34) and (35) are applied to limit the EV purchase of electricity to the retailer and P2V transactions with prosumers, respectively.
where
is the maximum limit for EV electricity purchase to the retailer,
is a binary variable to active the transaction of electricity between EV and retailer and
gives the indication if the EV is travelling (0) or it is available to charge (1). Equations (36) and (37) are applied to limit the transactions of electricity by EV when they are charging at home.
Equation (38) imposes that each EV has the possibility to buy electricity from only one prosumer. Equations (39)–(42) represent the limits of continuous variables for the EV operation. From Equation (43) to Equation (44), the limits for the binary variables of EV operation are represented.
where
represents the minimum value for the EV battery and
represents the maximum value for the EV battery capacity. Equations (45) and (46) present the price calculation for the P2V electricity transaction. The P2V transaction price is the mean between the minimum retail price of each EV and the export grid price (e.g., feed-in tariff, sport market) of each prosumer.
where
represents the minimum retail price for each EV. Equation (45) calculates the price for the P2V transaction.