Keywords

7.1 Introduction

During the last decade regulatory and technological advancements have been quickly driving the renovation of legacy power systems towards the future smart grids. The unbundling process has created new grid players and some others are expected to arise in coming years while progressively emerging new technical solutions for grid efficiency and interdependences with other systems. This is the case of the mobility sector, where a significant shift from fossil fuels to electromobility is expected for the coming years, creating huge opportunities and challenges in the way distribution electricity grids will be operated.

On one hand relevant investments for network upgrade and the establishment of new business models are necessary [1], on the other massive penetration of plug-in electric vehicle (PEV) technology will have a significant technical impact, as highlighted in [14]. A first consequence will be a relevant change in the magnitude and shape of distribution lines loading, considering the significant difference between the traditional electricity demand and the current mechanical power on the road [5]. Further, strengthening the coupling between transportation and electrical systems will increase uncertainty and intermittency of load profiles, which are typical “side effects” associated with renewable energy sources (RES). As a result, grid operation will become more complex, in terms of load balancing, survivability of network elements and overall power quality [6], asking for charging strategies aimed at providing the new load with a more regular behavior.

Nevertheless, PEV technology also represents a valuable opportunity [7]. The rapid integration of RES, recognized as a priority for an eco-sustainable growth of industrialized countries [8], asks for the availability of negative and positive balancing power as a basic requirement for mitigating the effects of RES volatility on grid stability and reliability [9]. Depending on the size and placement of RES, the balancing task can be performed at different levels, according to the basic principle “the smaller the distance between renewables and consumption, the higher the benefit for the grid”. In this sense early works [10] have recognized that a proper control of PEVs charging at fleet level can contribute to meet this requirement. Such result can be achieved by combining the control of fleet charging power [11] with the control of reverse energy flows from the PEVs to the grid (vehicle to grid—V2G) [5], then exploiting the flexibility of drivers through proper demand side management (DSM) programs and the huge potential of PEVs of acting as distributed storage systems. In the light of above a charging control system appears as the enabler of local matching between demand and supply, and the regulator of power flow exchanges between the charging area and the distribution grid, according to the needs of the distribution system operator (DSO) and the distributed energy resources (DER) operator owning RES in the charging area.

In this chapter, a model predictive control (MPC) framework for automatic control of a set of charging sessions running in a load area (LA) is discussed. A LA is a DSO-defined portion of the distribution grid under a secondary substation [12]. In the considered scenario, the LA is equipped with photovoltaic (PV) plants and hosts a set of remotely controlled, IEC 61851-compliant electric vehicle supply equipment (EVSE), also known as charging stations (CSs), which are the stations where the PEVs are brought and plugged in by the PEVs’ users to have the batteries recharged. The proposed framework works regardless of the particular EVSE technology and charging power level (direct current, alternating current, single phase or three phases). The controller, named load area controller (LAC), works under the main requirements of: (i) pursuing the minimization of the charging costs to be sustained by the PEVs’ users, while respecting the PEVs users’ preferences regarding the maximum available time for charging and the amount of energy to be recharged (or the desired final state of charge (SoC)); (ii) tracking of a LA-level power reference defined by the DSO according to its own criteria (as clarified in the following) on a day-ahead basis and possibly updated intraday; (iii) favoring the integration of RES into the grid by, e.g., maximizing the share of PV power absorbed by the LA and flattering the overall LA load profile, thus avoiding the injection into the grid of possibly intermittent power profiles and hence resulting into greater economic benefits for both the DSO and the RES operators. As regards the costs minimization requirement, the LAC is designed to work under both designed and market indexed pricing models, and is able to react to DSM signals. Secondly, differently from other works in literature [4, 13], which integrate grid constraints directly in the charging control problem formulation (via, e.g., power flow constraints), this work, in line with the electromobility business chain, regards the LAC as a software module belonging to a specific electromobility business actor (e.g. the EVSE operator, i.e. the business actor managing the EVSEs) and able to provide smart charging services to the interested actors. In this way, in a DSO-oriented scheme for example, the DSO works out (via its SCADA/distribution management system (DMS) running dedicated power flow routines) a desired daily LA-level power reference for electromobility, to ensure safe and efficient operation of the grid. The LAC takes the DSO-generated power reference as an input and ensures, given the power tracking requirement, that the charging sessions are dynamically updated so that the aggregated charging power matches the reference. RES integration can be achieved either via the establishment, by the DSO, of a proper LA power reference taking into account RES profiles, or, as shown in this work, by ensuring the maximization of RES self-consumption by the LA (by properly controlling the charging processes); for this purpose the controller is able to update the control when receiving a new RES generation forecast.

The control problem is formulated as a MPC problem, based on mixed integer quadratic programming. An instance of the problem is built and solved by the LAC on a periodic basis considering all the meaningful events triggering the controller (such as, a new user request, a price signal, a volume DSM signal, notifications of availability of new RES forecasts, etc.). The objective function is given by a linear weighted combination of the (controlled) cost for satisfying the charging requests currently managed, of the L-2 norm of the error between the aggregated (controlled) charging power and the LA power reference, and a term for RES self-consumption maximization. The control variables are given by the PEV charging rates. They are either Boolean or semi-continuous in nature, depending on if on-off charging is chosen (as reasonably the case for slow charging) or the charging power is modulated (when different from zero) between a minimum positive value and a maximum positive value, in accordance with standard IEC 61851 (this latter choice being relevant in case of high-power charging processes); discharging (i.e. V2G) is also considered. Constraints are given by User Preferences (UP) (thus directly integrated at problem formulation level, and which can be updated at any time by the driver), by technical limits at EVSE-level imposed by IEC 61851, by technical limits of the PEV battery, by the overload power at LA level, etc. In particular, a battery control model is integrated in order, for the LAC, to be able to predict the future SoC of the PEVs based on the assigned charging load profile and the measure or estimation of the current SoC; considering the current unavailability of real time data about the battery SoC from car manufacturers, two practical strategies are reported for SoC estimation, based on the use of (i) meter readings and; (ii) a very detailed, highly non-linear model [14] of the batteries considered representative of a real battery pack. A set of simulations is proposed in order to validate the concept and show its effectiveness.

The remainder of the chapter is organized as follows. Section 7.2 discusses the state of the art in control approaches for PEVs charging. Section 7.3 presents the reference charging scenario, detailing the role of actors involved and components making part of the architecture. In Sect. 7.4 the considered use cases are presented, and consequently a set of functional requirements and technical specifications for the controller are listed. Based on that, the proposed control system flow of operations and the open loop optimal control problem at the basis of the closed loop MPC approach are presented in Sects. 7.5 and 7.6, respectively. Section 7.7 is dedicated to the delicate point of SoC estimation, which is necessary to achieve a closed loop control system. Simulation results are shown in Sect. 7.8 and finally the conclusions are drawn in Sect. 7.9. Starting from some key concepts proposed within the reference ADDRESS project [12] like the one of LA, aggregator and DSM signals, the solution reported in the chapter is the result of the investigation performed by the authors in the framework of the European Union SMART V2G [15] and MOBINCITY [16] projects, where the local charging control problem has been studied on an incremental basis, collecting use cases, requirements and specifications through the interaction with DSOs and other players of the electromobility sector.

7.2 State of the Art and Proposed Innovation

The emerging concept of smart grid is based on the deployment of a multi-level control architecture, with the aim of reaching a deeper integration between generation and demand. Demand response, DSM and active demand are terms which all refer to new central paradigms evoked for referring to a direct influence of demand on the technical and economical balance of the grid [17]. Load management problems have received an increasing attention from academics and industry during the last decade. Industry has been the driving sector for many years and it is also the first one for which pioneer DSM programs have been proposed [1820]. Load shifting concept is being deeply investigated also in the residential sector, with the purpose of optimally controlling smart household appliances, storage devices and local renewable energy sources [2123].

The concepts established in the aforementioned works in the field of load management find a natural application also to electromobility. An interesting approach for coordinating charging operation of multiple EVs in a smart grid system is presented in [13]. A maximum sensitivities selection (MSS) optimization problem is established, with the aim of minimizing cost of energy consumption and network losses. PEVs are divided into priority groups, depending on UP and sensitivity of system losses due to each PEV. Moreover, voltage constraints at each EVSE of the network and congestion constraints are considered. Grid variables are computed through simulation, via a standard Newton-based load flow routine. The main drawbacks of this work are: (i) charging control signals are continuous in nature but not IEC 61851 compliant; (ii) there is not a strict control over the time needed to provide the charging service and on the desired final state of charge of the batteries; (iii) backfeeding is not considered. These are rather common drawbacks in the relevant literature.

A similar approach is presented in [24], where the authors set up an optimization problem seeking to maximize the amount of energy available for charging operations, while considering constraints on voltage levels, charging rates changes, network congestion and thermal loading of network components. Voltage levels and thermal loadings are calculated based on load flow analysis. Interestingly, a weighted objective function is proposed, in order not to penalize charging points characterized by a high sensitivity (in radial networks, voltage level is generally more sensitive to addition of load far from the transformers). Among the drawbacks of the work there is the fact that charging control signals are continuous in nature but not IEC 61851 compliant; moreover, UP are poorly modelled (the overall energy available for charging operations is maximized, not taking into account the precise amount of energy demanded by each PEV, or the time preferences for charging operations set by the users). Also in this work the authors do not take into account the possibility of delivering active demand services to the grid.

An original control approach is presented in [25]. The charging process is controlled by using a distributed additive increase multiplicative decrease (AIMD) feedback control algorithm, known for its use in telecommunication resource management problems. The main advantage of the approach is related to its distributed nature, which keeps low the number of communications needed to achieve the objectives. The main drawbacks are also related to the AIMD concept. It requires that the PEVs have the ability to vary their charge rate in a continuous manner from zero to a maximum value, a very common assumption which, again, is not compliant with the standard IEC 61851. Moreover, the vehicle-to-grid concept is not considered in that work.

Another interesting contribution from the control methodology point of view is given in [26], where the authors apply sliding mode control principles to achieve stability and robustness with respect to system uncertainties. The authors derive a simple centralized control strategy in which a unique charging rate signal for all the PEVs is adjusted in order for the aggregated charging power profile to track the available power trajectory resulting from both renewable and traditional generation. The interesting achievements of this work are the stability and robustness to the collective effects of system uncertainties (in particular, drivers’ arrival at the EVSE and power generation from RES). However, only the high level behavior of the system is investigated; driver preferences are not considered in the problem formalization and the applied control is the same for all the PEVs. So doing the benefits for the drivers are not differentiated in relation to their degree of flexibility.

Another work taking inspiration from communication engineering is [27], in which the author proposes a distributed framework for PEVs charging, based on the concept of congestion pricing in Internet traffic control. The work is based on concepts already well known and studied also in smart grid research: each PEV is modeled as an agent with an associated utility function. The objective of the agent is to maximize its individual surplus (the utility minus costs). The cost of energy is calculated by the agent based on the unit price of energy, which is centrally updated depending on the state of congestion of the network. Based on this information, agents update their charging rates, depending also on the so called “willingness to pay preference”, a parameter which has a similar role as the quality of service class parameter in telecommunications. The work does not include network constraints and does not give detailed suggestions for the selection and tuning of utility functions (which is the delicate point of such an approach). Therefore, it is not clear how UP could be modeled via utility functions.

Concluding, works in literature mostly differentiate depending on: (i) the control architecture (centralized control schemes opposed to decentralized control schemes); (ii) the control methodology (optimization techniques, optimal control, nonlinear control, telecommunication algorithms, etc.); (iii) the nature of control variables (on/off signals or continuous charging rate signals); (iv) quality and effectiveness of UP modeling; (v) inclusion of backfeeding in the problem formulation. In this respect, the characterizing aspects of this work are:

  • The charging rate is modelled as a Boolean variable or as a semi-continuous variable (in compliance with the standard IEC 61851), depending on the maximum allowed charging power

  • Backfeeding is also modelled in a Boolean or semi-continuous manner. Nowadays there is not a commonly accepted and standardized vision on V2G power from the technical point of view. By reasonably extending the technical requirement of the charge mode to backfeeding, it is shown the relevance of such a concept for the fulfilment of grid and drivers’ requirements

  • The controller works on a time driven basis. It updates the control signals periodically, taking into account all the events triggering it during the sampling period, such as charging requests, user preferences updates, RES forecast updates and DSM signals, then adapting its behavior to the uncertainty of mobility dynamics and different grid players’ needs

  • The expected cost for the charging service is notified to the driver just after the charging request is made. A modification to the cost in reaction to possible DSM signals is taken into account in order to establish the minimum rebate for drivers’ acceptance

  • Each PEV is associated with its own control signal, which is built and updated according to the time of arrival, the UP and the user flexibility in terms of parking time. So doing, the controller is able to exploit the time varying nature of the energy price and the backfeeding capability to guarantee a higher economic benefit to the drivers with the higher level of flexibility

  • The controller performs the tracking of an aggregated power reference for charging. By properly managing drivers’ flexibilities, the effects of multiple charging sessions are mitigated so that large excursions in power withdrawal are avoided

  • The controller acts so as to maximize the self-consumption from PV generation, then mitigating the intermittency of generation and allowing the penetration of RES into the electricity system

  • Battery aging is taken into account through the inclusion of a depreciation term in the objective function which depends on the control. So doing, it is possible to achieve a balance between the benefit coming from multiple activations of the battery and the decrease in the battery life cycle

  • The state of charge is used as feedback signal for control purposes.

It is to remark that, although grid constraints could be included in the problem formulation, the peaks shaving of charging power results in acceptable losses and voltage levels, as shown in [13]. In this sense, differently from most of the works appearing in the relevant literature, in which the aggregated power can freely evolve together with other physical variables within given thresholds, the power reference here considered for tracking purpose can be seen as a signal validated by the DSO for a reliable operation of the electrical infrastructure, in compliance with an unbundled scenario where, in principle, the owners of the charging infrastructure and the electricity grid are two different grid players, as detailed in Sect. 7.3.

7.3 Charging Scenario

7.3.1 Actors and Components

The charging scenario considered in this chapter (Fig. 7.1) is limited to a set of PEVs connected to EVSEs located in the same LA, the size and topology of which are established in advance by the DSO. The sample LA considered in the picture is represented by the portion of the distribution grid under a secondary substation; however, its extension can be further limited, as established within the ADDRESS project [12]. A PV generator is also connected in the LA and managed by a DER operator. The owner of the charging infrastructure is supposed to be an EVSE operator, which makes the EVSEs available to drivers having a retailing contract with qualified electric vehicle service providers (EVSPs); the charging sessions are managed in real time by the LAC, a software module hosted by the EVSE operator back-end, the basic functionality of which is to control the power withdrawals by dynamically solving a load shifting problem according to drivers’ contracts and needs, PV generation forecasts received by the DER operator and a set of boundary conditions established by the DSO on a day-ahead and intra-day basis.

Fig. 7.1
figure 1

Reference scenario

At current time, pioneer charging infrastructures in operation or used within demonstration projects are typically owned by the DSO itself, due to the need of validating the system and understanding the best way to manage it while the penetration of PEVs increases. For the coming future, as a consequence of the unbundling process driving the renovation of electricity sector in a large number of industrialized countries, the idea of establishing EVSE operator companies as owners of local charging infrastructures appears reasonable. As regards this chapter, in absence of a commonly accepted business and regulatory framework, the control system presented in the following is sufficiently general to cover the proposed reference scenario and also a number of other possible situations, such as: (i) EVSPs competing in the LA maintaining the ownership of the EVSEs or not (which implies static or dynamical EVSEs assignment, respectively); (ii) a DSO directly controlling the service and making available the metering data to the EVSPs for billing purpose only; (iii) a municipality which guarantees the charging service based on a bilateral energy contract subscribed with a generation company. Finally, also the concept of LA is sufficiently general to be tailored to specific DSO needs.

The main actors involved in the reference scenario are the PEV drivers, the DSO, the EVSP, the EVSE operator and the DER operator [28], the role of which is more specifically detailed in the following.

  • Driver. It is interested in obtaining the charging service at low price and in respect of his/her UP. The PEV driver subscribes a contract for charging service provisioning with an EVSP, receiving an radio-frequency identification (RFID) card for the authentication at the EVSE; depending on his/her flexibility in PEV charging, the contract establishes if the charging has to be uncontrolled (always at maximum power) or “smart” (power modulation); in the latter case some additional clauses can regard incentives for the acceptance of power modulation and the participation in DSM programs, and additional costs for the update of UP during the charging

  • DSO. It is the owner of the electricity distribution infrastructure and is responsible for the safe operation of the network. It establishes maximum and reference power withdrawal at LA level on a day-ahead basis. In particular, the reference power curve for electromobility could be established by the DSO according to a range of criteria, with the possible objectives of, e.g., (i) ensuring safe operation of the network (e.g. by choosing flat or shaved profiles); (ii) supporting network through, e.g., balancing of peaks from RES; (iii) ensuring that the load profiles at primary substation level agreed on a day-ahead basis with the transmission system operator are met (i.e. by properly choosing the references for the LACs “under” the primary substations in question), etc. Furthermore, the presence of a tunable reference for the LAC controllers is a degree of flexibility which could be exploited in the future by broader control schemes for optimal balance of the energy resources in a macro load area, as explained in [29]. Also, depending on the grid status acquired in real time by the SCADA system and its possible evolution, the DSO is expected to trigger the EVSE operator with DSM signals, then calling for charging rescheduling, and provide it and flexible drivers with a remuneration which depends on the grid operation saving coming from the rescheduling action

  • EVSP/Retailers. Business companies qualified to act in the electricity markets for the acquisition of the electric energy and to offer proper energy contracts to the drivers. As a result of the day-ahead market trading, each EVSP/Retailer is associated with daily energy and cost profiles, with hourly resolution. Based on that, EVSP/Retailer defines daily energy tariffs for the drivers, which can be the same every day or indexed to the market; also, the tariffs can include incentives for flexible drivers participating in DSM programs. Contract schemes including DSM are expected to be key elements allowing PEVs to be part of a future intra-day local balancing market, where managing short term requirements for the balance of demand and supply from traditional and renewable energy sources; as a matter of fact the EVSP can play the role of intermediary between grid players asking for power modulation and the drivers, taking a margin from the provided remunerations

  • DER operator. It is the owner of PV generators installed in the LA. In order to support the maximization of the hosting capacity and then sustain its business, it provides the EVSE operator with generation forecasts at LA level, then enabling the local demand/supply matching. Also, the DER operator is expected in the future to trigger grid players with DSM signals for charging rescheduling

  • EVSE operator. It is the owner of the charging infrastructure; it allows each charging session to take place only after an authentication process involving an EVSP, aimed at verifying the existence of an energy contract for the driver making the request. Charging processes are managed according to drivers’ contract and UP, PV generation forecasts and boundary conditions established by the DSO at LA level. It is remunerated by the EVSP, the DSO and DER operator, as a consequence of its ability to provide the charging service to drivers, assure the respect of grid requirements and minimize the effect of fluctuating power generation.

The equipment making part of the reference architecture can be summarized as follows:

  • Plug-in electric vehicles. Fully PEVs [30] are considered, characterized by the following technical parameters: (i) the capacity of the battery pack; (ii) the input/output battery performance coefficients; (iii) the maximum and minimum allowed charge levels and; (iv) the maximum and minimum charge/discharge rates

  • EVSE. Depending on the circuit and on the current and voltage levels, different charging levels are today available [31]. This chapter deals with two different kinds of slow charging taking place at 230 V voltage level: (i) single-phase charging with 16 A maximum current (about 3.6 kW) and three-phase charging with 32 A maximum phase current (about 22 kW), being them quite common in practice; however the proposed control algorithm is also suitable for other charging levels. The power flow from the EVSE to the PEV cannot be varied continuously from zero to the maximum value: the standard IEC 61851 establishes that, beyond the standby mode (no power flow), the charging current has to be in the range from 6 to 48 A, being then a semi-continuous variable. This range can be further limited by the EVSE manufacturers, as for the case here considered

  • EVSE operator back-end. It is the charging monitoring and controlling platform; it allows drivers authentication and EVSE socket unlock, monitoring of EVSE meter readings and remote control of the charging current. It represents the heart of the infrastructure, managing in real time data of different players and able to react to different kind of events like charging requests, forecasts updates and DSM signals for charging rescheduling. It hosts two main subsystems:

    • The EVSE operation, responsible for driver authentication, socket unlock, events recording, trigger of LAC, power to phase current conversion and communication of load profiles to the EVSEs for actuation to the PEVs

    • The Load Area Controller, a control entity logically acting at LA level, responsible for real time computation of the charging power. The LAC calculates the control signals for each ongoing charging session, namely the power withdrawal over the time and the budgeted charging costs for drivers.

From the communication point of view, it is assumed that a data connection can be established between (i) the PEV and the EVSE (e.g.: via power line, wireless, GSM, etc.); (ii) the EVSE and the EVSE operator back-end (e.g. via the Internet). Reference documents on this topic are IEC 61851 and IEC 62196 and ISO 15118.

7.3.2 Use Cases

Four relevant use cases are considered:

  • UC1: charging request. The driver arrives at the EVSE site, makes the authentication through its RFID card and plugs the PEV; he/she makes a charging request by using the dashboard of the EVSE (or a mobile Internet enabled device), specifying the PEV model, initial state of charge as read on the PEV dashboard and the following UP:

    • The desired final level of charge

    • The time at which the charging process can start (typically the current time)

    • The time within which the charging process has to be terminated.

    This is in the following called a “charging request (CR) event”. The control system is expected to notify the driver of the optimal charging cost and to provide the EVSE with the optimal charging load profile

  • UC2: user preferences update. During charging the driver realizes to need the PEV charged at the desired level of charge before the departure time declared when making the charging request, then he/she sends an update of the UP (specifically the departure time) to the EVSE operator back-end by using an Internet enabled device. In the following this is referred to as “user preferences update event,” for which the control system is expected to react by updating the load profiles for all the ongoing charging sessions and calculating a new budgeted cost for the driver. This event represents the breach of the charging conditions established at the moment of making the charging request; then there is no need of keeping the original budgeted cost as target for the whole charging session and a new one for the remaining part of the charging session has to be calculated

  • UC3: forecast update. In this case the DER operator notifies the EVSE operator back-end of an update in PV generation forecast for the coming hours. In the following, this is referred to as “forecast event”. The control system uses this new data as boundary condition for the future calculations, and is expected to update the load profiles for the ongoing charging sessions

  • UC4: demand side management. In this case the involved actor is the DSO, which notifies the EVSE operator back-end of an intra-day change in the reference available power for a specific temporal slot (volume signal). The control system is expected to react to this event by updating the control signals for the EVSE and evaluating the related changes in the cost for flexible drivers, which gives rise to minimum rebates for them.

7.4 Controller Requirements and Specifications

7.4.1 Functional Requirements

The analysis of the proposed use cases results in requirements and specifications for all the involved equipment. In the following, a set of requirements and specifications are reported, to be intended as referred to the LAC component, the design of which represents the focus of this chapter. The functional requirements for the LAC can be broken down into categories as follows, depending on the grid player asking for them:

  • Driver perspective:

    • The LAC has to be able to provide each individual EVSE with a cost-effective charging power profile which satisfies driver preferences on charging

    • The LAC has to be able to provide the budgeted cost for charging in response to a charging request and to guarantee a waiting time for the driver in line with a real time application

    • The LAC has to be able to guarantee that the real cost evaluated at the end of the charging session does not differ significantly from the budgeted one.

  • DSO perspective:

    • The LAC has to be able to flatter the aggregated charging curve in the LA while managing the dynamical and asynchronous arrival of charging requests

    • The LAC has to be able to provide ancillary services for short term grid needs, in reaction to price/volume signals

    • The LAC has to be able to produce a schedule of the control signals both for the present and the coming hours, so that a lack in communications from the EVSE operator back-end to the EVSEs does not preclude the actuation of the controlled load profiles, even if suboptimal.

  • DER operator perspective:

    • The LAC has to be able to maximize the self-consumption from PV while managing the dynamical and asynchronous arrival of charging requests, then minimizing the injection of fluctuating power profiles into the distribution grid.

7.4.2 Technical Specifications

The technical specifications for the LAC are as follows:

  • The aggregated cost for charging has to be minimum

  • The budgeted cost for charging has to be available in response to each charging request

  • The difference between the real cost and the budgeted one must not exceed a given bound

  • The minimum rebate for drivers has to be calculated in reaction to DSM signals

  • The charging can take place only during the time period notified by the driver when asking for service

  • The final level of charge has to be the one notified by the driver when asking for service

  • Self-consumption from PV has to be maximized

  • The net aggregated power withdrawal in the LA has to track the reference given by the DSO

  • The tracking error of the net aggregated power reference has to be minimum

  • The net aggregated power withdrawal must not exceed a given threshold

  • The power flow for 22 kW three-phase charging has to be limited according to the standard IEC 61851

  • The gradient of power flow over the time for 22 kW three-phase charging has to be limited

  • The power flow for 3.6 kW single-phase charging has to be subject to on/off control

  • During charging, the state of charge must not exceed a given upper bound

  • During charging, the state of charge must not be lower than a given lower bound

  • The number of charging sessions managed simultaneously has to be compatible with the size of a typical LA

  • Feasible suboptimal control and cost have to be provided if a given allowed maximum computational time is overcome.

7.5 Control System Working Logic

The plant to be controlled is constituted by a time varying set of charging PEVs, while the controller to be designed has to work taking into account a set of boundary conditions including the UP established by the drivers, the power reference established by the DSO, the PV generation forecast provided by the DER operator and the energy tariff, all of them subject to possible updates during the operation. Considering the heterogeneity of PEVs to be charged, and the stringent objective to provide them with the desired level of charge at a given time, it is reasonable to let the controller relying on a PEVs SoC prediction model and the measure or an estimation of the PEVs SoC as feedback signal. Also, considering the use of digital systems and communications in a real implementation (e.g. the electronic meter hosted in the EVSE), it is reasonable to let the controller work in a discrete time framework. All these considerations suggest to design a MPC framework, by which the optimal control (the load profiles for the PEVs) over a specified control horizon is obtained at each sampling time by retrieving the PEVs SoC and solving an open loop optimal control problem. A principle scheme is reported in Fig. 7.2. The problem to be solved at each iteration can be based on a target function to be minimized taking into account the cost for charging and the tracking error, subject to a set of constraints modeling the technical specifications previously detailed, including the main one of guaranteeing the desired PEVs level of charge.

Fig. 7.2
figure 2

Control system concept

The optimal solution found at each iteration of the algorithm is intrinsically open-loop, loosing optimality over the time as a consequence of new events triggering the controller. This issue is solved by collecting the new boundary conditions and iterating optimization at the next sampling period; as customary in MPC system design, the new calculated control sequence replaces the portion of the previous control sequence that has not been actuated yet. Then the calculation of control is time-driven, while the update of boundary conditions is event-based. This approach allows to properly manage system model inaccuracies and react to the asynchronous dynamics of the environment, whatever the arrival frequency of new events will be.

In the light of above, each sampling period is characterized by the same base set of sequential steps and a number of possible events, as shown by the sequence diagram reported in Fig. 7.3. More in detail, the considered flow of operations is as follows:

Fig. 7.3
figure 3

Sequence diagram

  • Each EVSE sends the metering data to the EVSE operation module, including the energy absorbed since the beginning of the charging session, the current power withdrawal and the current SoC, in case it can be retrieved and communicated by the PEV

  • The EVSE operation collects all the events coming from drivers, DSO and DER operator

  • The EVSE operation triggers the LAC providing it with all the new boundary conditions

  • The LAC calculates the load profiles and sends them to the EVSE operation. Also the budgeted cost for charging in case of a new charging request is provided (not reported in the figure)

  • The EVSE operation converts the load profiles to phase current profiles, depending on the three-phase or single-phase nature of the charging sessions, and sends them to the EVSEs

  • At new sampling time, EVSEs actuate the control signals.

Considering the time needed by the LAC to solve the open loop optimal control problem, it is important to remark that, though the EVSE operation and EVSEs use the same time resolution T, the related sampling instants have to be shifted by a proper time period \(\Delta {\text{t}} < {\text{T}}\). This precaution, together with the choice of a proper timeout for the solver, guarantees that the new control signals are actually available (i.e. they have been computed) at the moment in which the actuation command is given (i.e. when they have to be sent to the EVSEs for actuation). As far as concerns the meter readings from the EVSEs, this data can be used to build an estimation of the PEVs SoC in case a direct measure is not available; details on this point are given in Sect. 7.7.

7.6 Problem Formalization

The following subsections detail the discrete-time, open-loop optimal control problem that the LAC solves each time it is triggered by the EVSE operation and the PEVs’ SoC feedback is estimated. The mathematical formulation of the problem is discussed starting from the objective function and then detailing the different set of constraints considered. Finally, in the last subsection, an equivalent mathematical formulation of the problem, suitable for implementation on the calculator, is given.

7.6.1 Target Function

Let \({\text{T}}\) denote the discretization step of the optimal control problem and \({\text{I}}\) the first time interval of problem definition (i.e. the time when the LAC is triggered for computation). The target function \(J\) can be written as

$$J = J^{cost} + J^{DER} + J^{reg}$$
(7.1)

where: (i) \(J^{cost}\) accounts for the cumulative cost associated to the ongoing controlled charging sessions; (ii) \(J^{DER}\) is a discount term taking into account DER exploitation and; (iii) \(J^{reg}\) is a term accounting for the remuneration associated to the tracking of a DSO-defined load profile. This function is such that its minimization leads the EVSE operator to find a trade-off between the optimal costs for PEV users, RES self-consumption and tracking error. Some notation is introduced to define the terms of \(J\) in details. Let \({\text{M}}\) denote the set of charging sessions to be controlled at time \({\text{I}}\), \(U_{mk}\) the control signal associated to the mth charging session at time \(k\) (\(m \in {\text{M }}\) univocally identifies the charging session), \({\text{C}}_{k}\) the tariff at time \(k\). Furthermore, let \(\Delta {\text{P}}_{m}\) denote the maximum charging power applicable during the charging session (which is given by the minimum between the power rating of the PEV, of the charging cable and the EVSE) and \({\text{E}}_{m}\) the last allowed end time for the charging session (set by the PEV user). The term \(J^{cost}\) can be therefore written as

$$J^{\text{cost}} \; = \; \mathop \sum \limits_{m \in {\rm{M}}} \mathop \sum \limits_{k = I}^{{{\rm{E}}_{m} }}\Delta {\text{P}}_{m} {\text{T}} {\text{C}}_{k} U_{mk}$$
(7.2)

in which the control variable \(U_{mk}\) specifies the charging rate and, therefore, \(U_{mk}\Delta P_{m}\) the power actually flowing in the cable connecting the mth PEV to the corresponding EVSE. The term \(J^{cost}\) can be further expanded to model the cost of batteries’ wear deriving from charging/discharging operations. For each PEV, a depreciation term can be added, which is proportional to the amount of energy exchanged with the grid during each sampling interval. The effect of the depreciation term is such that V2G is chosen only if the deriving economic benefit at least is greater than the cost of the associated components’ wear. It should be noted that the inclusion of a depreciation term accounts for a phenomenon (wear) that is different from that of batteries’ energy losses (modelled as well in the following), although the deriving effect which can be observed (decrease of V2G power flow) is similar. The term \(J^{cost}\) can be thus finally written as

$$J^{\text{cost}} \; = \; \mathop \sum \limits_{m \in {\rm{M}}} \mathop \sum \limits_{k = I}^{{{\rm{E}}_{m} }}\Delta {\text{P}}_{m} {\text{T}} \left\{ {{\text{C}}_{k} U_{mk} + {\text{C}}_{m}^{dep} \left| {U_{mk} } \right|} \right\}$$
(7.3)

where the coefficient \({\text{C}}_{m}^{\text{dep}}\) can be computed based on the cost of the batteries and their expected life time.

Then, the term \(J^{DER}\) in the objective function introduces a discount proportional to the amount of self-consumed DER energy. It is written as

$$J^{DER} = - \mathop \sum \limits_{{k = {\text{I}}}}^{\text{E}} {\text{P}}_{k}^{\text{DER}} {\text{TC}}^{\text{DER}} \theta_{k}$$
(7.4)

where \({\text{P}}_{k}^{\text{DER}}\) is the last available forecast for DER power at time \(k\), \({\text{C}}^{\text{DER}}\) is a discount parameter associated with self-consumption and \(\theta_{k}\) a continuous variable indicating the share of DER power self-consumed at time \(k\) (\(0 \le \theta_{k} \le 1 \forall k\)). Coefficient \({\text{E}}\) denotes the last time interval of problem definition (which therefore spans from \({\text{I}}\) to \({\text{E}}\)), and is given by

$${\text{E}} = \mathop {\hbox{max} }\limits_{{m \in {\text{M}}}} \{ {\text{E}}_{m} \}$$
(7.5)

The effect of \(J^{DER}\), being it a discount term appearing with the minus sign in a minimization problem, is such that the controller tends to increase as much as possible at each \(k\) the value of variable \(\theta_{k}\), representing the share of self-consumed power from DER. By posing a constraint (see (7.12) below) stating that, at each \(k\), the amount of self-consumed DER power \(\theta_{k} {\text{P}}_{k}^{\text{DER}}\) shall be less or equal than the charging power at the same instant, it is made sure that the power \(\theta_{k} {\text{P}}_{k}^{\text{DER}}\) accounted in the objective function actually “matches” a portion of the load curve from electromobility (eventually, that charging load is shifted under the curve of DER generation).

Finally, the last term \(J^{reg}\) appearing in the objective function is a regulation term, which allows the EVSE operator to shape the aggregated charging power according to a positive power reference \({\text{P}}_{k}^{\text{ref}}\), set by the DSO. \(J^{reg}\) can be written as

$$J^{reg} = \mu \mathop \sum \limits_{k = I}^{{\rm{E}}} \lambda_{k} \left( {P_{k} - {\text{P}}_{k}^{\text{ref}} - {\text{P}}_{k}^{\text{DER}} } \right)^{2}$$
(7.6)

where \(P_{k}\) is the aggregated controlled charging power in the LA at time \(k\), which can be written as

$$P_{k} = {\text{P}}_{k}^{s} + \mathop \sum \limits_{{m \in M_{k} }}\Delta {\text{P}}_{m} U_{mk}$$
(7.7)

being \(M_{k} \subseteq {\text{M}}\) a subset of M defined as

$$M_{k} = \left\{ {m \in {\text{M }}: {\text{I }} \le k \le {\text{E}}_{m} } \right\}$$
(7.8)

and representing the set of flexible PEVs involved in the smart charging operation at time interval \(k\). \({\text{P}}_{k}^{\text{s}}\) denotes the aggregated power consumption of those PEVs whose charging profile cannot be rescheduled (i.e. PEVs which do not allow smart charging). \(\lambda_{k} \in [0,1]\) is a shaping factor which is included to differently weight the tracking requirement along the control horizon. Acting on \(\lambda_{k}\) it is possible to influence the way the charging power is allocated in the time window ahead of the current time \({\text{I}}\). A general rule of thumb for \(\lambda_{k}\) is that it has to go to zero as \(k\) goes to \({\text{E}}\) (or, in any case, to values considerably smaller than the ones taken for \(k\) close to \({\text{I}}\)), since the tracking requirement cannot be stringent for the time periods close to \({\text{E}}\), where there might be not enough demand for charging power to let the aggregated load profile follow the reference (as a matter of fact, charging requests arrive sequentially, and hence, at time \({\text{I}}\), the demand close to time \({\text{E}}\) might be small). The parameter \(\lambda_{k}\) can be also chosen adaptively, in order to adjust the way power is allocated depending on, e.g., the congestion rate of the grid (e.g. the arrival rate of new charging requests). Finally, \(\upmu \in {\text{R}}\) is a positive weight which, together with \(\lambda_{k}\) is associated to the remuneration assured for the provisioning of the tracking service.

Concluding, (7.1) represents the objective function of the optimization problem to be solved in order to optimally schedule the charging sessions according to the requirements (posed in Sect. 7.4.1) of (i) minimizing charging costs, (ii) maximizing self-consumed DER power and, (iii) tracking of a DSO-defined, LA-level reference load curve for electromobility. Formula (7.1) also represents the function through which the exact cost minimization values associated to the found solutions can be determined. It is important to notice that the actual costs/revenues for the different actors involved in the PEV load management problem (i.e. the PEV users, the EVSE operator, the DSO, the retailer) are determined starting from metering data and based on agreed billing/revenue repartition policies, which are not dealt with in this chapter. For example, the overall charging costs for the PEV users could be determined by subtracting from the actual costs incurred for charging (accounted for by the term \(J^{cost}\)) proper remuneration from the DER operator and the DSO, in consideration of the fact that it is actually the flexibility provided by the PEV users taking part in smart charging the key factor which enables the DER operator and the DSO to extract value from the process of PEV charging control.

The next subsection starts the review of the problem’s constraints.

7.6.2 Control Model

The control model is a tractable mathematical representation of the process under control, given here by the set of PEVs and the associated EVSEs to be controlled. The control model is employed to derive a relation between the control variables (the charging rates) and the controlled output of the plant (the PEVs’ SoC). It has to be therefore simple enough to keep low the complexity of the resulting control problem, and yet accurate enough to capture the main dynamics of the physical process under control.

The following first-order control model is considered

$$\left\{ {\begin{array}{*{20}c} {x_{mk} = x_{m,k - 1} +\Delta {\text{P}}_{m} {\text{T}} (U_{mk} - \xi_{m} |U_{mk} |)} \\ {x_{m,I - 1} = X_{m}^{0} } \\ \end{array} } \right. \quad \forall k \in \left[ {{\text{I}},{\text{E}}_{m} } \right],\quad m \in {\text{M}}$$
(7.9)

which allows to predict the future SoC of the PEVs and write it as a simple (linear) function of the initial SoC and the control sequence (notice that SoC here denotes the absolute, not percentage, value of the energy stored). The captured phenomena are the integral behaviour of the battery pack and the losses in the PEV converters and in the battery pack (a simple constant loss factor \(\xi_{m}\) is considered). \({\text{X}}_{m}^{0}\) denotes the initial SoC of the mth PEV (which is either communicated by the PEV user via, e.g., a smartphone or the PEV/EVSE dashboard, or is automatically exchanged between the PEV and the EVSE as soon as the charging session is authorized). Note that \({\text{X}}_{m}^{0}\) represents one of the feedback signals considered in the presented control scheme (see the explanation in Sect. 7.5): in case the current SoC can be read and automatically communicated by the PEV to the EVSE, the value of \({\text{X}}_{m}^{0}\) can be updated at each iteration of the problem, thus allowing to counteract disturbances and model uncertainties, and making sure that the controlled charging process actually ends with a final SoC that is in accordance with the UP.

Finally, a second, very detailed model of the EVSE/battery pack, referred to as simulation model, will be given in Sect. 7.7 for the purpose of validating the proposed strategy on a simulation basis. As explained in Sect. 7.7, the simulation model accurately replicates the non-linear dynamics of the battery pack, and is therefore used for the purposes of: (i) simulating the feedback of the SoC from the field and, (ii) evaluating the actual SoC evolution resulting from the implementation of the proposed strategy, then verifying that all the posed requirements (see Sect. 7.4) are met. In particular, it will be shown via the simulations how the combined effect of reoptimization and feedback from the field lets the system recover from the inaccuracies of the control model.

7.6.3 Control Constraints

The first set of control constraints is related to the nature of the control variables \(U_{mk}\) and \(\theta_{k}\). Standard IEC 61851 prescribes that the charging power shall be either zero (when recharging is paused), or limited between a minimum positive value and a maximum positive value (when charging is in progress). By reasonably extending the same specification to the discharge phase (which is not addressed by IEC 61851), the following set of constraints for \(U_{mk}\) arises

$$U_{mk} \in \left\{ {\begin{array}{*{20}l} {c c \in \left[ {\alpha_{m} ,1} \right] \quad{\text{in case of charging}}} \\ { 0 \quad{\text{in case of standby}}} \\ {d d \in \left[ { - 1, - \alpha_{m} } \right] \quad{\text{in case of discharging}}} \\ \end{array} \quad \forall k \in \left[ {{\text{I}},{\text{E}}_{m} } \right], \quad m \in {\text{M}}} \right.$$
(7.10)

where \(\alpha_{m}\) is the ratio between the minimum positive charging power and the maximum allowed charging power (without loss of generality we assume the same ratio holds for the discharging phase). For each charging session, \(\alpha_{m}\) has to be determined depending on maximum/minimum allowed positive charging rates of the EVSE, of the charging cable and the PEV (\(\alpha_{m}\) shall be computed at the beginning of the charging session, when these values are discovered). It is worth mentioning that more restrictive values for \(\alpha_{m}\) can be also set when designing the control strategy. For example, it can be decided to allow charging power modulation only in case of high power charging sessions (e.g. when \(\Delta {\text{P}}_{m}\) is equal or greater than 22 kW), while performing on-off charging in case of low power charging sessions (i.e. single phase charging, \(\Delta {\text{P}}_{m}\) around 3.6 kW), for which it may not be worth to modulate the charging power. The latter can be simply achieved by setting \(\alpha_{m} = 1\) for the charging sessions to be controlled in an on-off manner. Formula (7.10) translates into mathematical formulation the technical specifications posed in Sect. 7.4.2 about IEC 61851-compliant control of 22 kW three-phase charging processes and on/off control of single-phase 3.6 kW charging processes.

As regards \(\theta_{k}\), it is not a control variable input to a real process; it represents the share of RES power self-consumed by the PEV fleet at time \(k\). The following simple constraint then holds

$$\theta_{k} \in \left[ {0,1} \right]\quad \forall k \in [{\text{I}},{\text{E}}]$$
(7.11)

The second set of control constraints is related namely to the definition of variables \(\theta_{k}\), and reads as follows

$${\text{P}}_{k}^{\text{DER}} \theta_{k} \le {\text{P}}_{k}^{s} + \mathop \sum \limits_{{m \in M_{k} }}\Delta {\text{P}}_{m} U_{mk} \quad \forall k \in [{\text{I}},{\text{E}}]$$
(7.12)

which assures that the share of RES power self-consumed is properly computed (by definition it cannot exceed the allocated charging power). Notice that \(\theta_{k}\) either saturates at 1 (in case the allocated charging power exceeds RES power), or it is limited by the above constraint (in case all the charging power is “matched” by DER power). Constraints (7.12), (7.11) and the term \(J^{DER}\) allow to translate into mathematical formulation the requirement posed in Sect. 7.4.2 about maximization of self-consumption of DER power.

The next set of control constraints aims at avoiding that the aggregated charging power exceeds the LA threshold \({\text{P}}_{k}^{ *}\) set by the DSO at each \(k\). The difference between the threshold and the reference can be seen as the maximum displacement which is allowed without penalties. Moreover, the threshold could also be established by the DSO during the emergency operation of the distribution grid. Such set of overload constraints can be written as

$${\text{P}}_{k}^{s} + \mathop \sum \limits_{{m \in M_{k} }}\Delta {\text{P}}_{m} U_{mk} \le {\text{P}}_{k}^{ * } + {\text{P}}^{\text{DER}} \quad \forall k \in \left[ {{\text{I}},{\text{E}}} \right]$$
(7.13)

The former constraints were related, respectively, to the RES and the DSO. The next set of constraints is instead explicative of those constraints imposed by PEV users. In particular, until this point, only cost minimization and technical constraints satisfaction related to the entire set of PEVs under control have been addressed. However, it may happen that a cost-efficient and technically feasible solution for the entire fleet does not equally distribute the cost (or the saving) among the PEVs, thus penalizing some PEVs and excessively rewarding some others. Notice that the term \(J^{cost}\) appearing in the target function is a cumulative cost, then the minimization of the target function does not guarantee that the price of the service provided to each driver remains close to the price notified at the moment of making the charging request. To take this into account, a set of constraints on the cost of charging/discharging operations is added for each PEV. Such constraints guarantee that, as required by the specifications given in Sect. 7.4.2, the cost of the charging service for each driver remains bounded iteration after iteration, without growing unpredictably. Let \({\text{c}}_{m}^{*}\) denote the cost announced to the user upon arrival at the EVSE (after the first iteration of the algorithm) and \({\text{c}}_{{m{\text{I}}}}\) the cost for the charging service provided up to time \({\text{I}}\). Then the control action can be bounded as follows

$${\text{c}}_{m\rm{I}} + \mathop \sum \limits_{k ={\rm{I}}}^{{{\rm{E}}_{m} }}\Delta {\text{P}}_{m} {\text{T}} {\text{C}}_{k} U_{mk} \le \left( {1 + \in } \right){\text{c}}_{m}^{*} \quad \forall m \in {\text{M}}$$
(7.14)

where the real number ∈ > 0 is a small tolerance parameter, necessary to account for modelling inaccuracies.

A final set of control constraints is included as representative of the technical constraints that are imposed by the PEVs (constraints which are put, for example, to ensure safe charging operations and preserve the PEV energy storage and recharging systems). In particular, according to the technical specifications given in Sect. 7.4.2, a constraint is put here on the maximum allowed rate of change of the charging power from a time slot to the following one. The constraint is

$$\left| {\Delta {\text{P}}_{m} U_{mk} -\Delta {\text{P}}_{m} U_{m,k - 1} } \right| \le \updelta_{\hbox{max} } \quad \forall k \in \left[ {{\rm{I}} + 1,{\text{E}}_{m} } \right], \quad \forall m \in {\text{M}}$$
(7.15)

The maximum allowed change of charging rate \(\updelta_{\hbox{max} }\) has to be such that \(\updelta_{\hbox{max} } \ge \upalpha_{m}\Delta {\text{P}}_{m}\), in order to allow the termination of the charging process (when the charging power goes to zero from a previous positive value).

7.6.4 State and Termination Constraints

State constraints are related to the capacity of the batteries and the related technical limitations. In principle, the level of charge must be non negative and upper bounded by the battery capacity. In practice, for reasons related to efficiency and life cycle, as specified by the technical specifications given in Sect. 7.4.2, the battery pack is never allowed to fully charge or deplete. Then it is straightforward to establish that

$${\text{X}}_{m}^{ \hbox{min} } \le x_{mk} \le {\text{X}}_{m}^{ \hbox{max} } \quad \forall m \in {\text{M}},\quad \forall k \in \left[ {{\text{I}},{\text{E}}_{m} } \right]$$
(7.16)

where \(x_{mk}\) is the SoC expressed in kWh of the mth PEV at the end of the kth time interval, \({\text{X}}_{\text{m}}^{ \hbox{max} }\) is the maximum allowed level of charge and \({\text{X}}_{\text{m}}^{ \hbox{min} }\) represents the allowed depth of discharge of the mth PEV. Interestingly, a minimum guaranteed charging profile can be established for each PEV by choosing \({\text{X}}_{\text{m}}^{ \hbox{min} }\) as an increasing function of time. So doing, a minimum ‘‘safety’’ state of charge is guaranteed at each time interval. That is relevant to remedy to real word uncertainties, among which there is the possibility that a driver terminates the charging process before the declared \({\text{E}}_{m}\), without giving any notification to the system.

Finally, a termination constraint must be considered in order to ensure that the final desired SoC set by the PEV user is eventually reached at time \({\text{E}}_{m}\) (as required by the technical specifications in Sect. 7.4.2). Such set of constraints is simply given by

$${\text{X}}_{m}^{\text{ref}} \le x_{{mE_{m} }} \le {\text{X}}_{m}^{\text{max }} \quad \forall m \in {\text{M}}$$
(7.17)

where the upper limit (given in the above by \({\text{X}}_{m}^{\text{max }}\)) can be replaced by a smaller value (greater, in any case, than \({\text{X}}_{m}^{\text{ref}}\)) in order to avoid that the PEV is recharged too much above the SoC value specified by the user.

7.6.5 Overall Problem Definition

The above detailed optimal control problem can be summarized as follows.

Problem 1 (Optimal control of PEVs charging operations in a Load Area)

Given a set \({\text{M}}\) of PEVs plugged-in at time interval \({\text{I}}\), associated with UPs \(\{ {\text{X}}_{m}^{\text{ref}} , {\text{E}}_{m} \}\), technical data \(\{\Delta {\text{P}}_{m} , {\text{X}}_{m}^{\hbox{min} } , {\text{X}}_{m}^{\hbox{max} } , \xi_{m} \}\), SoC measure \(X_{m}^{0}\) and known market/grid data \(\{ {\text{C}}_{\text{k}} , {\text{P}}_{k}^{\text{ref}} ,{\text{P}}_{\text{k}}^{ *} \}\), minimize \(J\) subject to the dynamics (7.9), control constraints (7.10)–(7.15), and state and termination constraints (7.16), (7.17), where \(E\) and \(M_{k}\) are defined in (7.5) and (7.8) respectively.

7.6.6 Equivalent Optimization Problem

The mathematical formulation of the problem given above (presented as a classical MPC problem) is not suitable for direct implementation on a calculator (observe, for example, that variables \(U_{mk}\) are defined over the union of disjoint sets). This section is therefore dedicated to show how an equivalent mathematical formulation suitable for implementation can be derived. Eventually, the MPC problem will be written as a mixed integer quadratic programming problem, which can be interpreted and solved via well-established optimization tools.

Some additional notation is introduced. First of all, let us introduce two sets of continuous variables \(y_{mk}\) and \(z_{mk}\), defined as

$$\left\{ {\begin{array}{*{20}c} {y_{mk} \quad{\text{ charging rate for the }}m{\text{th PEV at time }}k } \\ {z_{mk} \quad{\text{ discharging rate for the }}m{\text{th PEV at time }}k} \\ \end{array} } \right.$$
(7.18)

Recalling from the previous sections that the charging power is semi-continuous in nature (i.e. it is either zero or greater than a positive value), variables \(y_{mk}\) and \(z_{mk}\) can be further specified as follows

$$\left\{ {\begin{array}{*{20}c} {y_{mk} = 0 \; \vee \;y_{mk} \in [\upalpha_{m} ,1]} \\ {z_{mk} = 0 \; \vee \; z_{mk} \in [\upalpha_{m} ,1]} \\ \end{array} } \right.\quad \forall m \in {\text{M}}, \quad\forall k \in \left[ {{\text{I}},{\text{E}}_{m} } \right]$$
(7.19)

A treatable definition of \(y_{mk}\) and \(z_{mk}\) can be achieved by introducing two corresponding sets of Boolean variables \(p_{mk}\) and \(q_{mk}\) defined in such a way that, when \(y_{mk} = 0\) (\(z_{mk} = 0\)), \(p_{mk} = 0\) (\(q_{mk} = 0\)), and when \(y_{mk} \in [\alpha_{m} ,1]\) (\(z_{mk} \in [\alpha_{m} ,1]\)) \(p_{mk} = 1\) (\(q_{mk} = 1\)). That can be forced by writing

$$\left\{ {\begin{array}{*{20}c} {\upalpha_{m} p_{mk} \le y_{mk} \le p_{mk} } \\ {p_{mk} \in \{ 0,1\} } \\ \end{array} } \right. \left\{ {\begin{array}{*{20}c} {\upalpha_{m} q_{mk} \le z_{mk} \le q_{mk} } \\ {q_{mk} \in \{ 0,1\} } \\ \end{array} } \right.\quad \forall m \in {\text{M}}, \quad\forall k \in \left[ {{\text{I}},{\text{E}}_{m} } \right]$$
(7.20)

The control variable \(U_{mk}\) can be then rewritten as

$$\left\{ {\begin{array}{*{20}c} {U_{mk} = y_{mk} - z_{mk} } \\ {|U_{mk} | = y_{mk} + z_{mk} } \\ \end{array} } \right.\quad \forall m \in {\text{M}},\quad \forall k \in \left[ {{\text{I}},{\text{E}}_{m} } \right]$$
(7.21)

and the additional constraint

$$p_{mk} + q_{mk} \le 1\quad \forall m \in {\text{M}},\quad \forall k \in \left[ {{\text{I}},{\text{E}}_{m} } \right]$$
(7.22)

is put in order to state that charging and discharging cannot take place simultaneously.

The aggregated controlled charging power can be rewritten in terms of \(y_{mk}\) and \(z_{mk}\) as

$$P_{k} = {\text{P}}_{k}^{s} + \mathop \sum \limits_{{m \in M_{k} }} [\Delta {\text{P}}_{m} y_{mk} - \Delta {\text{P}}_{m}z_{mk} ]\quad \forall k \in \left[ {{\text{I}},{\text{E}}} \right]$$
(7.23)

Similarly, it is easy to rewrite all the constraints given in Sects. 7.6.27.6.4, along with the linear terms \(J^{cost}\) and \(J^{DER}\) in the objective function, in terms of the new continuous variables \(y_{mk}\) and \(z_{mk} .\) The regulation term \(J^{reg}\) can be easily rewritten as well making use of matrix notation, in which the term can be written as \(J^{reg} = \left( {\varvec{P} - {\mathbf{P}}^{{{\mathbf{ref}}}} - {\mathbf{P}}^{{{\mathbf{DER}}}} } \right)^{T} {\varvec{\Lambda}}\left( {\varvec{P} - {\mathbf{P}}^{{{\mathbf{ref}}}} - {\mathbf{P}}^{{{\mathbf{DER}}}} } \right)\), where \(\varvec{P}, {\mathbf{P}}^{{{\mathbf{ref}}}} \,{\text{and}}\, {\mathbf{P}}^{{{\mathbf{DER}}}}\) are vectors of proper dimensions whose elements are, respectively, \(P_{k}\), \({\text{P}}_{k}^{\text{ref}}\) and \({\text{P}}_{k}^{\text{DER}}\), while \({\varvec{\Lambda}}\) is a diagonal matrix with diagonal entries \(\lambda_{k}\). The quadratic term of \(J^{reg}\) is \(\varvec{P}^{T} {\varvec{\Lambda}}\varvec{P}.\) It is seen from (7.23) that \(\varvec{P}\) is linearly dependent on the control variables \(y_{mk}\) and \(z_{mk}\), and therefore it can be written as \(\varvec{P} = [{\mathbf{A}}\, {\mathbf{B}}]\left[ {\begin{array}{*{20}c} \varvec{y} \\ \varvec{z} \\ \end{array} } \right]\), where \(\varvec{y}\) and \(\varvec{z}\) are proper vectors of grouped control variables and \({\mathbf{A}}\) and \({\mathbf{B}}\) proper matrices. Finally, the quadratic term \(\varvec{P}^{T} {\boldsymbol{\Lambda}}\varvec{P}\) is rewritten in terms of the control variables as \(\varvec{P}^{T} {\boldsymbol{\Lambda}} \varvec{P} = \left[ {\varvec{y}^{T} \varvec{z}^{T} } \right]\left[ {\begin{array}{*{20}c} {{\mathbf{A}}^{T} } \\ {{\mathbf{B}}^{T} } \\ \end{array} } \right]{\varvec{\Lambda}}\left[ {{\mathbf{A}}\, {\mathbf{B}}} \right]\left[ {\begin{array}{*{20}c} y \\ z \\ \end{array} } \right]\), being then the coefficient matrix of the quadratic term given by \(\left[ {\begin{array}{*{20}c} {{\mathbf{A}}^{T} } \\ {{\mathbf{B}}^{T} } \\ \end{array} } \right]{\varvec{\Lambda}}\left[ {{\mathbf{A}} \,{\mathbf{B}}} \right]\).

The mathematical problem here defined is a mixed integer quadratic programming problem (i.e. a problem with quadratic terms in the objective function and linear constraints, with both Boolean and continuous variables), for which global solution methods and related tools [32] are available (the optimization problem has been here solved via the cplexmiqp function of CPLEX [32], dedicated specifically to the solution of mixed integer quadratic programming problems). Further details on mixed integer quadratic programming, the related solving techniques and other applications to smart grid research field can be found in [3336].

7.7 The State of Charge Feedback

Among the PEV users’ requirements considered for the derivation of the proposed centralized charging strategy there is the fulfilment by the controller of the charging requests according to the associated UP. In particular, one of the objectives of the controller is to let the PEVs reach the final desired SoC set by the PEV users. That is the reason why SoC feedback has to be foreseen for the correct implementation of the proposed strategy (SoC feedback allows evaluating the mismatch between the SoC evolution predicted by the controller and the actual one). The SoC feedback is easily included in the problem formulation through parameter \({\text{X}}_{m}^{0}\), which can be updated according to the feedback signal at each iteration of the problem, as explained in Sects. 7.5 and 7.6.2. Currently, at the best of the authors’ knowledge, there is no standardized way of automatically retrieving SoC measurements during a charging session. Such necessity is however recognized by the technical community and standards on digital communication between the EVSE and the PEV (in particular, ISO 15118) are going in this direction, making possible in the future to exchange a whole set of data crucial for enabling smart charging applications (e.g. user preferences, technical specifications of the PEV, SoC data, etc.).

For the sake of completeness, this section discusses two approaches that can be implemented in case SoC feedback is not directly available. They are based, the first, on the usage of EVSE meter readings and, the second, on the usage of detailed battery models [14].

7.7.1 Case 1: Indirect SoC Measurement Through EVSE Meter Readings

In the advanced electromobility management systems the EVSEs can be remotely controlled and monitored from the EVSE operator back–end. In particular, metering data can be retrieved from the meters inside the EVSEs. Metering data regard the instantaneous charging power supplied by the EVSE at metering time, and the charging energy supplied from the beginning of the charging session. Contrary to SoC metering, the feedback from the EVSE is already technically feasible and commonly implemented in the field. The feedback from the EVSE regarding the charging power is employed in the presented formulation to evaluate in particular the fulfilment of the tracking requirement, which is precisely related to the aggregated power supplied by the EVSEs in the LA. The feedback on the energy supplied by the EVSE up to metering time can be instead employed to monitor the correct provisioning of energy to the PEVs. In this regard, notice that the user preference related the final SoC could be replaced by a similar requirement related to the amount of energy to be provided by the EVSE. The feedback on energy would then represent a feedback precisely of the controlled variable (i.e. the energy to be provided by the EVSE). Instead, in case the user requirement is on the SoC, mathematical models of the EVSE converters and the EVSE battery pack can be employed to estimate the current SoC based on the metering data on supplied energy (the feedback would be again included in the mathematical formulation via parameter \({\text{X}}_{m}^{0}\)).

In the next subsection a SoC estimation model [14] is presented as well, which is not intended however for real time usage in the present control scheme. It is a highly detailed nonlinear model used in the simulations to emulate the real SoC feedback from the EVSEs (feedback which is not obviously available in the simulations), thus making possible to evaluate the effectiveness of the controller.

7.7.2 Case 2: SoC Estimation Using Detailed Simulation Model

The employed simulation model [14] works according to the scheme presented in Fig. 7.4. The two converters in the PEV are assumed to be characterized by constant efficiency, being the losses modelled by parameter \(\upeta\). The battery is modelled as the series of an internal resistance and a controlled voltage source, whose voltage depends, according to a nonlinear relation, on the charge stored in the battery [14]. Referring to the scheme in the figure, \(v\) is the voltage of the battery pack, \(i\) the current, \(\tilde{q}\) the charge (measured in \({\text{Ah}}\)), \(e\) the voltage of the controlled voltage source, \({\text{Q}}\) the nominal capacity of the battery (\({\text{Ah}}\)), \(Z\) the polarization voltage and, finally, \({\text{a}}\) and \({\text{b}}\) are two model parameters. The charge \(\tilde{q}\) (not to be confused with the Boolean variable \(q_{mk}\)) is computed according to the (discrete time) relation

$$\tilde{q}_{m,k + 1} = \tilde{q}_{mk} + {\text{T}}\left( {i_{mk} p_{mk} - i_{mk}^{\text{K}} q_{mk} } \right)$$
(7.24)
Fig. 7.4
figure 4

Block scheme of the accurate simulation model

in which \({\text{K}}\) is the Peukert coefficient amplifying the loss of charge during discharge (an hysteresis phenomenon). Also the equivalent resistance varies depending on the direction of the power flow (\({\text{R}}_{\text{eq}} = {\text{R}}\left( {1.5p_{mk} + q_{mk} } \right)\)).

7.8 Simulation Results

This section reports an explicative simulation study aimed at showing the effectiveness of the proposed charging controller. First of all, in the next subsection the simulation setup is detailed. Then in the subsequent section it is shown how the LAC is able to dynamically control the charging sessions in order to fulfil all the posed requirements (from the PEV users, the DSO and the DER operator), while respecting all the constraints. That is achieved by updating the computed charging load profile over the time in reaction to the asynchronous events. Among these events, a reaction to a DSM volume signal is also simulated, showing how the LAC can successfully react to the request of reducing the aggregated charging power level according to proper DSM volume signal specifications (on the amount of power reduction and the associated timelines).

7.8.1 Simulation Setup

Both single-phase and three-phase charging are considered in the following. The former refers to charging with currents limited between 6 and 16 A (resulting in a value of \(\alpha_{m}\) equal to \(0.375\)). Considering a constant grid voltage level of 230 V, the maximum charging power is therefore equal to 3.68 kW. In three-phase case instead, they are considered phase currents limited between 6 and 32 A (resulting in \(\alpha_{m} = 0.1875\)), and being thus the maximum charging power equal to 22.08 kW. It is worth recalling that it has been decided to let the LAC modulate the charging processes with higher power withdrawal, while the other charging processes are controlled by the LAC in an on-off fashion. For the sake of simplicity, all the simulated PEVs are characterized by the same following parameters: \({\text{X}}_{m}^{\text{max }} = 26\;{\text{kWh}}\), \({\text{X}}_{\text{m}}^{\text{min }} = 2.6\;{\text{kWh}}\) \(\xi = 0.04\). Also, the same simulation model (see Sect. 7.7.2) is considered for all the simulated PEVs. As suggested in [14], the values of the PEV model’s parameters can be deduced from manufacturer’s datasheet by achieving an accurate matching of the experimental charging and discharging curves (a Lithium-ion battery block [37] specifically designed for PEV applications has been considered and the following values resulted: \(\upeta = 1 - \xi = 0.96\), \({\text{Z }} = 0.14 \;{\text{V}}\), \({\text{a}} = 10\), \({\text{b}} = 0.007\), \({\text{K}} = 1.05\), \(\text{Re} {\text{q}} = 0.01\;\Omega\), \({\text{Q}} = 297.3 \;{\text{A h}}\) and \({\text{e}}^{0} = 74\;{\text{V}}\)). The kth diagonal entry of matrix \({\boldsymbol{\Lambda}}\) is chosen as \(\Lambda _{kk} = \lambda_{k} = 1/k^{2}\), the power reference \({\mathbf{P}}^{{{\mathbf{ref}}}}\) is taken constant for simplicity (\({\text{P}}_{k}^{\text{ref}} = 25\;{\text{kW}}\)). \({\text{P}}_{\text{k}}^{ *}\) is taken as \({\text{P}}_{k}^{ *} = 1.2{\text{P}}_{k}^{\text{ref}}\). A daily profile of the Italian day-ahead tariff “prezzo unico nazionale” (PUN) has been considered for \({\text{C}}_{k}\). All PEVs are assumed subject to smart charging (i.e. \({\text{P}}_{k}^{\text{s}} = 0\)). Real profiles for \({\mathbf{P}}^{{{\mathbf{DER}}}}\) have been taken by measurements of specific PV plant outputs [38].

Finally, simulations have been performed on an INTEL Core i5-3230 CPU, 2.40 GHz, 8 GB RAM computer, running the MS WINDOWS 8 64-bit operating system. The simulation environment has been built in MATLAB. The mixed integer quadratic programming problem defined in Sect. 7.6.6 has been solved by calling from MATLAB the cplexmiqp function, made available by the CPLEX for MATLAB feature of the IBM ILOG CPLEX Optimizer. The CPLEX for MATLAB module allows a user to define optimization problems and solve them within MATLAB (via the cplexmiqp function in this case).

7.8.2 Simulations

The simulated charging requests are reported in Table 7.1. In the following simulations V2G has been disabled for the sake of simplicity. Figure 7.5 reports the aggregated power profile resulting from uncontrolled charging, i.e., when charging starts at maximum power as soon as the charging sessions are authorized. In particular, Fig. 7.5a reports a bar chart visualization of the charging profiles (a different color is associated to the different charging profiles). Figure 7.5b reports the power reference, the threshold set by the DSO, the DER profile (\({\mathbf{P}}^{{{\mathbf{DER}}}}\), positive values are injections into the LA) and the net power profile of the LA (positive values mean the LA absorbs power from the main grid). It is seen that the net power profile shows large fluctuations and peaks, which is highly undesirable. As obvious, the DSO-defined reference load curve is not tracked, since no PEV load management is implemented.

Table 7.1 Simulated charging scenario
Fig. 7.5
figure 5

Uncontrolled recharging: a load profiles of the different charging sessions and resulting aggregated demand, b relevant resulting power profiles, including the net power profile, the reference profile, the power threshold and the DER forecast power output

Secondly, in the same charging scenario as above, the proposed controller is tested considering a high weight \(\upmu\) (\(\upmu = 10\)) of the tracking term \(J^{reg}\) of the objective function. In other words, it is simulated the case in which the remuneration offered by the DSO for the tracking of the DSO-defined reference \({\mathbf{P}}^{{{\mathbf{ref}}}}\) is considerably higher than the other sources of revenues (i.e. charging cost optimization and DER energy self-consumption). It is therefore expected that the net load profile accurately tracks the power reference \({\mathbf{P}}^{{{\mathbf{ref}}}} .\) As a matter of fact, Fig. 7.6 clearly shows that accurate tracking is achieved (notice from Fig. 7.6 how the peaks present in the previous Fig. 7.5 have been shaved thanks to a proper control of the charging sessions resulting from the presented control approach). From Fig. 7.6a it is easy to distinguish single-phase charging sessions from three-phase charging sessions, due to the different nature of control (on-off control for the formers, power modulation for the latters). Also, all the posed constraints are satisfied. In particular, it can be noticed from the figure that the constraint (7.15) on the maximum rate of change of the charging power is respected. Finally, the achieved solution is such that all the charging preferences expressed by the PEV users are met (i.e. all the charging sessions end within the time specified by the users and with the desired final SoC values, as it will be explicitly shown, for the sake of brevity, in the next simulation only for the case of one of the simulated charging sessions).

Fig. 7.6
figure 6

Simulation with \(\upmu = 10\) (i.e. high weight given to the revenue coming from the DSO, associated to the tracking of the DSO-defined reference)

In the next simulation, the weight of the tracking term is decreased (\(\upmu = 0.001\)) in order to give more relevance to the revenue coming from the maximization of self-consumption of the energy from RES. As expected, the aggregated charging curve is increasingly flattered in order to match the PV profile on a longer horizon with respect to the two previous cases (notice from Fig. 7.7a how the PEV load is shifted ahead in time with respect to what reported in Fig. 7.6a). In this case, the tracking of the DSO-defined reference load profile is not accurate as in the previous simulation, since the controller now pursuit more the objective of maximizing self-consumption of RES power, which ensures greater revenues compared to the objective of DSO-defined load tracking. Also in this case all the constraints and, in particular, the user preferences, are met.

Fig. 7.7
figure 7

Simulation with \(\upmu = 0.001\) (i.e. high weight given to the revenue coming from DER self-consumption)

After having reported and discussed about load profiles at PEVs fleet level, the following discussion deals with the profiles (i.e. control signal and SoC evolution) at single PEV level, related to the last simulation presented in Fig. 7.7. Figure 7.8 reports the evolution of the charging control signal associated to PEV #1 at three different optimization times. The control signal is either zero, or it is modulated between a minimum positive value \(\alpha_{m}\) and a maximum one, as prescribed by the standard. It is evident how the control signal is updated at each optimization time in order to let the LAC accommodate the new charging requests arriving sequentially. The resulting evolution of the SoC, as computed at three different time instants via both the control model (continuous line) and the simulation model (dashed line), is reported in Fig. 7.9. Notice how the desired final SoC is reached within the time specified by the PEV user, and the bounds on SoC are respected.

Fig. 7.8
figure 8

Evolution of the control signal \(U_{mk}\) at three different LAC optimisation times

Fig. 7.9
figure 9

Controlled evolution of the SoC of PEV#1 at three different time instants

Finally, a simulation of the LAC reaction to a DSM volume signal is given in the following. The DSM signal is notified to the LAC at 10:25 [hh:mm], and consists of a reprofiling of the DSO-defined reference power profile. The shape of the DSM volume signal is the typical one (see Fig. 7.10) considered for the composition of active demand services [12], and is characterized by a service time interval (i.e. the time interval during which the active demand service—i.e. the DSM volume reduction—is performed), and a “payback” zone (in the opposite direction) regulating the power profile in the immediate aftermath of the DSM service, when the impact of the payback effect is greater [12].

Fig. 7.10
figure 10

DSM signal shaped as a typical active demand product (positive values are power reductions)

Making reference to Fig. 7.10, the simulated DSM signal is characterized by the following technical specifications: \({\text{V}}_{\text{ser}} = 8\;{\text{kW}}\), \({\text{V}}_{\text{pb}} = 3\;{\text{kW}}\), \({\text{T}}_{\text{ser}} + {\text{T}}_{\text{pb}} = 1\;{\text{h}}\). Figure 7.11 reports the relevant LA load profiles immediately before the DSM signal is notified. From the figure it can be noticed how the LAC control is such that the aggregated load profile accurately tracks the reference only close to time \({\text{I}}\), while, ahead of time \({\text{I}}\) the charging power is shifted so as to optimize costs and exploit available RES.

Fig. 7.11
figure 11

Relevant controlled load profiles at 10:20 [hh:mm], immediately before the DSM signal notification (simulation performed with \(\upmu = 10\))

Then, Fig. 7.12 reports the load profiles shortly after the notification of the DSM signal (at 10:40 [hh:mm]). It is seen how the LAC is able to properly reacting to the volume signal by dynamically rescheduling the ongoing charging sessions.

Fig. 7.12
figure 12

Relevant controlled load profiles at 10:40 [hh:mm], shortly after the DSM signal notification

Finally, Fig. 7.13 reports the final evolution of the relevant LA load profiles. The DSM volume signal is met almost perfectly. The power threshold is respected and all the charging requests are fulfilled according to the user preferences. This simulation is relevant since it shows the potential of controlling via the LAC the aggregated load profile at LA level. As a matter of fact, control of demand will be more and more a tool by which active demand services will be provided to interested grid actors, especially for balancing purposes. As an example, the proper coordination and composition of a number of LA reprofiling actions (as the one reported in Fig. 7.13), by a higher level coordinating entity, could allow to compose and trade to interested upper level grid actors (i.e. a retailer, a DSO, a large DER operator, etc.) large volume active demand products, which could be employed by such actors to, e.g., remedy to short term grid imbalances (in case of the DSO) or to large variation in the RES output schedule, thus avoiding to incur in penalties.

Fig. 7.13
figure 13

Final relevant controlled load profiles

Significantly, the capability of the LAC of dynamically rescheduling the charging sessions can be also effectively exploited to mitigate the effects of RES intermittency, guaranteeing a flattered net profile at LA level. That can be achieved by simply updating control each time a new RES forecast is available and communicated to the LAC. The maximization of RES self-consumption (for which the term \(J^{DER}\) in (7.1) is responsible), and the mitigation of the effect of RES intermittency (achieved also via the term \(J^{reg}\)) are two key factors for increasing RES integration into the distribution grid, and they are fully taken into account by the presented LAC control approach to smart charging.

7.9 Conclusions

In this chapter a MPC approach for the management of PEVs charging in distribution grids has been presented. The work has moved from an in depth analysis of the state of the art of smart charging control. Then the relevant actors and components making part of the PEV charging scenario have been identified, and their role in the provisioning of the smart charging service has been discussed. Four different use cases related to smart charging have been then introduced, being them the most relevant ones that the proposed controller (named Load Area Controller—LAC), aims to support. They are: (i) LAC reaction to a charging request, (ii) LAC reaction to an update of the user preferences, (iii) LAC reaction to a DER forecast update and, (iv) LAC reaction to a demand side management signal. All these use cases rely on the solution of the smart charging control problem addressed in this chapter (i.e. on the smart charging control functionality provided by the LAC). Based on the analysis of the charging scenario and the review of the relevant use cases, requirements and specifications for the presented LAC charging controller have been given. The LAC working logic has been then discussed, giving a motivation for the adoption of the presented MPC-based charging control strategy (basically, the need of optimizing a set of key performance indicators, the presence of constraints, the need of reacting to asynchronous events from the environment and, finally, the availability of a simple control model of the plant). The resulting MPC formulation has been then presented and discussed. In particular, the proposed control framework has been designed with the aim of: (i) optimizing charging costs, thus seeking a saving for the PEV users in a scenario characterized by time variant tariffs, (ii) seeking integration of local RES, via their balancing with the controlled charging demand and, (iii) providing a load management service to the DSO, consisting in the tracking of a DSO-defined reference power curve at load area level. Proper constraints have been introduced to make the control action compliant with the technical limitations imposed by the relevant standards (i.e. IEC 61851) and with the technical and economic requirements posed by the PEV users, the DSO and the DER operator. The natural formulation of the open-loop optimal control problem at the basis of the MPC approach has been then handled in order to achieve an equivalent mixed integer quadratic programming problem, which can be solved in near real-time to provide the EVSEs with the charging load profiles and the driver with the notification of the expected cost for charging.

Explicative simulations have been presented to show how effectively the charging requests are managed and fulfilled by the LAC, according to the three aforementioned objectives (i.e. cost minimization, RES integration and load tracking). It has been shown how the LAC can effectively update time after time the charging controls in order to react to asynchronous events coming from the environment, being them new charging requests, updates of the user preferences, notifications of DSM signals, updates of the DER forecast, etc. Such a capability, here relevant for an effective matching between PEVs charging load and RES in respect of DSO and drivers’ needs, proves fundamental in all the active demand and demand side management applications so crucial in the smart grid concept.