Port-Hamiltonian Modeling and Control of Electric Vehicle Charging Stations

Electric vehicles (EV) are an important part of future sustainable transportation. The increasing integration of EV charging stations (EVCSs) in the existing power grids require new scaleable control algorithms that maintain the stability and resilience of the grid. Here, we present such a control approach using an averaged port-Hamiltonian model. In this approach, the underlying switching behavior of the power converters is approximated by an averaged non-linear system. The averaged models are used to derive various types of stabilizing controllers, including the typically used PI controllers. The pH modeling is showcased by means of a generic setup of an EVCS, where the battery of the vehicle is connected to an AC grid via power lines, converters, and filters. Finally, the control design methods are compared for the averaged pH system and validated using a simulation model of the switched charging station.


Introduction
The widespread adoption of electric vehicles (EVs) depends heavily on the extensive development of charging infrastructure and associated technologies.There is an expectation of a significant increase in the number of EV charging stations (EVCS) in the near future.Deploying an EVCS requires AC/DC converters for power conversion and DC/DC converters to regulate the charging process of EVs [1].Even though an EV's charging power may be adapted based on its state of charge (SOC), for transient stability analysis, the EV, with its DC/DC converter, is modeled as a constant power load (CPL), since the SOC remains relatively stable over the short periods considered [2].CPLs exhibit nonlinear behavior and a negative impedance V -I characteristic, posing challenges to voltage stability [3].Therefore, managing the potential deterioration of voltage stability due to CPLs is vital for ensuring the robust operation of an EVCS.
A standard control approach to ensure robust operation of power systems in general are proportional-integral (PI) or cascaded PI controllers [4,5], which were particularly applied to EVCS in [6] to achieve a robust control of the battery voltage.For a particular model of the charging station, these controllers provide good results, and an appropriate choice of control gains of these controllers can be obtained from the linearized system dynamics around the considered operation point.However, due to the switching dynamics, the performance of the PI controllers may deviate from expectations when subjected to large disturbances.Another limitation of PI controllers arises when an additional component is introduced into the existing system.In such a case, the derivation of new models to compute the required transfer functions for the control design process is needed.
To deal with these drawbacks, in recent years passivity-based and port-Hamiltonianbased nonlinear control has been considered.Those approaches are based on a physicsinspired modeling of the system which explicitly takes into account the system's energy.In particular, port-Hamiltonian (pH) modeling of dynamical systems has recently received increased attention because of its robustness, its modeling flexibility, its ability to model multiphysical systems, and its advantageous properties for stability-and passivity-preserving model reduction, numerical simulation, and optimal control methods [7,8].Furthermore, the pH modeling paradigm comprises the decomposition of the overall system model into several pH subsystems, allowing for a systematic built-up of the whole system.Due to these properties, pH control is a suitable choice for conducting real-time dynamical simulation and control of pH models for power systems.
Previously, pH modeling has been applied to power networks, see also [9] for a survey on the modeling of microgrids.In particular, various pH formulations of the synchronous generator are given in [10,11,12,13] ranging from a scalar second-order swing equation to more accurate higher dimensional models.Furthermore, there exist pH models for the phaselocked loop (PLL), which is a standard component of power converters used to synchronize the output voltage of the point of common coupling (PCC) with the grid voltage [14].
When studying pH models, only few authors consider the switched system dynamics [15], and in the context of pH control design, mostly the averaged model instead of the switched system is used.PH control is applied to islanded AC microgrids in [16] and more general types of grids [17].Furthermore, [18] provides a shifted pH formulation of power networks that contain constant power loads to estimate the regions of attraction.Additionally, averaged pH systems were recently used for observer design of DC power systems that contain DC/DC converters [19].
As an alternative to the pH control approach, shifted and Krasovskii passivity has been exploited for control of power systems in [20], but neither PI controllers, nor coupling to an AC grid, nor switched models of the power converters were considered to validate the passivity-based controller.
The main contributions of the present work are the following: • description of a general class of nonlinear systems of averaged pH systems that can be used to model switched power systems; • derivation of simple non-linear proportional (P) and proportional-integral (PI) control laws based on the averaged pH structure whose two control gains can be tuned easily; • showcasing the pH modeling approach for a generic model of an EVCS leading to an averaged pH system that can easily be adapted to model variations; • verification of the proposed pH controllers that are designed for the averaged model; • validation and comparison with a standard cascaded PI controller in a simulation of the original switching system dynamics.
The proposed generic pH model of an EVCS is based on the dynamic model which was derived in [6] and consists of five subsystems, all described via a pH model.These are (i) a load model, (ii) a DC/DC converter model, (iii) a short line model, (iv) an AC/DC converter model, as well as (v) PI-controller models.After putting the generic model of the EVCS in the pH framework, it can be easily integrated into existing pH power grid models or combined with several pH charging station models.
The paper is structured as follows: in Section 2, we review pH modeling with a particular focus on the modeling of switching power systems.In Section 3, we analyze the steady states of the systems and propose pH control designs leading to asymptotically stable pH systems.In Section 4, we derive a generic averaged pH model of an EVCS.Finally, we apply and compare the proposed pH controllers to the charging station in Section 5. Proofs of the main results are presented in the Appendix A and B.

PH state space models
We derive a pH state space model of a charging station.Because the pH modeling of the other components is relatively standard, we focus on the switching power systems arising in the converters.The complete pH model allows us to conduct a stability and passivity analysis and to study control design for these systems.

PH models for subsystems
To generate a complete model for the charging station, we first model each subsystem as a pH system using the model description introduced in [21 for some matrix functions J, R, S, N : R n → R n×n , B, P : R n → R n×m , for a time interval I, the system state x : I → R n , the input u : I → R m , and the output y : I → R m .Here H is the Hamiltonian, that describes the internal energy of the system and is assumed to be a quadratic function of the form H(x) = 1 2 x ⊤ Hx for some symmetric positive definite H ∈ R n×n .Furthermore, we assume for all states x ∈ R n that where for a symmetric matrix function M = M ⊤ , M ≥ 0 (M > 0) denotes that the matrix is positive semidefinite (definite).Generalizations of pH systems to the descriptor case and to systems with non-quadratic Hamiltonians were given in [22], see also [7] for an extensive survey.
An important property of PH systems is that they are passive, meaning that they fulfill the power balance equation and the dissipation inequality where the time derivative Ḣ is usually interpreted as the stored power, u ⊤ y is interpreted as the supplied power and the remaining summand is viewed as the dissipated power.
If u = y = 0 and if for a stationary point x the matrix (J − R)(x) is Hurwitz, i.e., all eigenvalues are in the open left half-plane, then H is a Lyapunov function implying that the system is locally exponentially stable, see [23,Theorem 5.35].Note, however, that if R(x) is not positive definite, then we can in general not use H as a Lyapunov function, but have to first transform the system, see [24].
The components of the charging station, such as converters and lines, have in-going current/voltage i i , v i : I → R ki , as well as out-going current/voltage i o , v o : I → R ko .This special structure of the components leads to the following pH subsystems for some B i ∈ R n×ki , B o ∈ R n×ko and with Using this particular input-output structure of the pH system, the dissipation inequality (2) implies that the out-going power of the components is less than or equal to the in-going power.However, (4) provides some freedom of choice in the input and output variables.Typical choices are (iii) current/voltage input systems, where (u 1 , u 2 ) = (v i , −i o ) and (y 1 , y 2 ) = (i i , v o ), or vice versa.

Interconnection of pH systems
An important property of pH representations is that for two given pH systems, their power conserving interconnection will again be pH and, in particular passive, see e.g.[ ( If we assume that the direction of the current flow and the sign of the voltages is the same for both subsystems, the natural coupling conditions based on Kirchhoff's laws are In the following, we will present a typical coupling of two power systems which both have current and voltage inputs.Let the subsystems be given by ẋj Then, the interconnected system based on ( 6) is given by .
Couplings for the other system types (i) or (ii) can be obtained analogously.More general couplings of more than two subsystems can be described using so called Dirac structures [21, Section 6.6].

Averaged pH models
The considered power electronic systems in a charging station have fast switching components which are parts of the DC/DC and the AC/DC converters.For the purpose of control system design and analysis, we approximate the switching behavior and use state space averaged pH models.For a detailed modeling of switching pH systems, see [15].We consider a periodic switching between two given pH systems of the form where we assume that Bu = B 1 u 1 = B 2 u 2 , which means that the inputs of the switched subsystems are the same.Although the averaged pH system can still be formulated without this assumption, it is used to shorten the presentation.
The duty ratio d : I → [0, 1] describes the average by which the two systems identified by j = 1 or j = 2 are weighted, respectively.In particular, d = 0 means that we keep the model j = 1 for all t ∈ I and do not switch.On the other hand, d = 1 means that we keep the model j = 2, t ∈ I.Then, the state space averaged model which approximates the switching system is given by ẋ Note that in the literature, see e.g.[25], sometimes the components are also modeled by equations using the modulation index m ∈ [−1, 1], which is related to the duty ratio via d = m+1 2 .While standard pH systems are well understood in terms of stability and passivity, see e.g.[7,8], for averaged pH systems this is new and will be discussed in the next section.

Stability analysis and control design for averaged pH systems
In this section, we determine the steady states of averaged pH systems described in Section 2.3, and study the stability of systems which include the duty ratios as control variables.
To this end, we assume that for k switched subsystems with parameters θ j ∈ [0, 1], j = 1, . . ., k the averaged pH system has the form where are all matrices in R n×n , B ∈ R n×m , and the Hamiltonian is H(x) = 1 2 x ⊤ Hx for some positive definite H ∈ R n×n .Note that we can replace duty ratios by modulation indexes and vice versa, the resulting additional terms can also be combined in the matrices J and R.
In the following subsection we study the equilibrium points and also the stabilization by controlling the duty ratios.The control design is based on extending the system by introducing θ as an additional state variable.

Extended system and steady states
System (7) depends on the vector of duty ratios θ = [θ 1 , . . ., θ k ] ⊤ ∈ [0, 1] k .In this section, we define an extended system which contains these additional parameters as a state variable and derive a characterization when this system is locally asymptotically stable.For this, the system equations ( 7) are rewritten as We consider two possible controller designs, a dynamic controller and a stationary controller with an invertible design parameter matrix K θ ∈ R k×k , and a state-dependent matrix function K H : R n → R k×n .The use of ( 8) results in the extended pH system whereas the use of ( 9) leads to an extended differential-algebraic pH system In both cases the extended Hamiltonian is and the extended J e (x, θ) and R e (x, θ) are defined as the skew-symmetric and symmetric part of for which the control design has to be chosen in such a way that the extended dissipation matrix satisfies R e (x, θ) ≥ 0. One of many possible choices to achieve this is to choose Note that a choice with K θ invertible already guarantees that the differential-algebraic system has differentiation index one, see [26] which (at least theoretically) allows to remove the algebraic equations by solving for θ.
We immediately obtain that by this extension, the steady state does not change.
Lemma 3.1.Consider an averaged pH system given by ( 7) with u = u and H(x) = 1 2 x ⊤ Hx for some positive definite H ∈ R n×n .Then the extended systems (11) and (10) have the same steady states x and θ and these can be obtained from the equation Furthermore, if D(θ) is invertible then

Control design for shifted averaged pH systems
In this section, we consider steady states of the extended system (10) and (11) for a given fixed control input u = u.This results in a non-zero equilibrium state x.Since the Hamiltonian of the system is often strictly convex with global minimum at x = 0 which is different from the equilibrium x, it is common to consider the shifted Hamiltonian, see e.g.[18,21], which is given by The expression for S is called Bregman divergence in convex analysis [27] and fulfills Using the shifted Hamiltonian ( 14) and extending it appropriately as we have We also extend the system equations.Subtracting (12) from the first equation in (10) leads to For the shifted system, we again consider two controllers with design parameters K θ ∈ R k×k and K H ∈ R k×n given by and where K H ∈ R k×n and K θ ∈ R k×k are assumed to be independent of the state variables.The use of ( 16) results in the system whereas the use of the second controller leads to a differential-algebraic pH system and extended J e (x, θ − θ) and R e (x, θ − θ) defined as the skew-symmetric and symmetric part of for which the control design has to be chosen in such a way that the extended dissipation matrix satisfies R e (x, θ − θ) ≥ 0, see Theorem 3.2 below.Many control designs of power systems use PI-controllers and cascades thereof.To allow for PI-controllers in our duty ratio control laws, we further extend (19) by using an integral state variable ξ ∈ R k and a further extended shifted Hamiltonian as well as the further extended differential-algebraic system Note that we do not include ξ in the definition of the extended shifted Hamiltonian (20), since the second line in (21) implies for the steady state values x = x, θ = θ that ξ = 0 holds.
In the following result, we show that with the so constructed controllers, we can obtain locally asymptotically stable pH systems.Theorem 3.2.Given an averaged pH system of the form (7) with equilibrium (x, θ, u) and let K θ ∈ R k×k be positive definite such that D(θ) − D(x)K −1 θ D(x) ⊤ is Hurwitz.Then the extended system (18) is locally asymptotically stable and pH for the following parameters: (a) θ = θ and K H = 0; Moreover, the following systems are equivalent to a locally asymptotically stable and pH system: (c) System (19) with K H = −δD(x) ⊤ for all K θ ∈ R k×k positive definite and δ > 0; The proof of Theorem 3.2 is presented in Section A in the appendix.To prove that the shifted closed loop system is locally asymptotically stable and pH, it is crucial to assume that there exists positive definite In the remainder of this section, we discuss several sufficient conditions for this to hold.
One trivial observation is that if the equilibrium state θ is already chosen in such a way that D(θ) is Hurwitz, then any positive definite K θ ∈ R k×k leads to a Hurwitz matrix θ D ⊤ being Hurwitz was obtained in [24] and it is based on considering its skew-symmetric part A J := J(θ) and its symmetric part A R ] has full rank.In the next result, it is shown that the existence of K θ satisfying the assumptions of Theorem 3.2 is guaranteed if the matrix [R(θ), D(x)] has full rank.
The proof of Proposition 3.3 is presented in Section B in the appendix.Another approach to obtain a locally asymptotically stable pH system for a given shifted averaged pH system (15) with equilibrium (x, θ, u) is based on the Bass stabilization algorithm, where one chooses a solution Kθ = K⊤ θ > 0 to the Lyapunov equation where A := D(θ) and α > 0 has to exceed the largest singular value of A. Then the matrix The positive definite solution Kθ of (22) can then be used in the following equations which can alternatively be employed to extend the shifted averaged pH system.This extended system is locally asymptotically stable, which can be viewed as an analogue to the results in Theorem 3.2, but to formally write the system as a pH system one has to multiply (15) with Kθ which leads to a pH descriptor system, see [22] for further reading.The control design which was outlined above was not needed to control the electric vehicle charging station because, for our application, the matrix D(θ) turned out to be Hurwitz already.
Remark 3.4.The control of EVCS often involves cascaded PI controllers [6].These controllers can be put in the proposed pH framework by further extending the system (21) and using û = u − u leading to

EVCS model as (averaged) pH system
Here, we derive a complete pH system model for the charging station without controllers, as shown in Figure 1.The charging station system encompasses, from left to right, the battery of an EV, a DC/DC bidirectional converter, a DC bus, a DC line, a DC/AC voltage source converter (VSC), an LCL output filter, an AC transformer, and the connection to the medium voltage (MV) electrical grid.The boost converter is used to step up the DC output voltage of the EV battery to the DC bus voltage.The central voltage source controller is used to interface the DC bus to the three-phase AC network.The transformer is utilized to elevate the low voltage in the charging station to the medium voltage of the MV network.Furthermore, an LCL filter is used to filter out the high frequency harmonics generated by the VSC.
In the following, the pH model of the charging station is obtained by modeling each of the subsystems as pH systems and by interconnecting them.Here one usually considers variables which represent energy of the system, i.e. instead of voltages of capacitors and currents of inductors, we will use charges and fluxes.

Battery model
The battery model is shown in Figure 2, see [29].The open-circuit voltage is denoted by The DC-DC converter model used in Figure 1.v ev , and the voltage-current characteristic is modeled by a resistance R bat .The Kirchhoff laws imply that

DC/DC converter
For the charging station we use a bidirectional DC/DC converter as in [30] that is located in Figure 1 between the EV battery and the DC Bus.This subsystem connects to the battery via the port variables (v bat , i bat ) and to a DC bus via the port-variables (v TL , i TL ).
As usual in pH modeling, we replace current i L by the flux ϕ L = Li L and voltage v bat by charge Q bat = Cv bat , Q TL = C TL v TL .Then an averaged model of the converter is given by ẋbdc where d dc ∈ [0, 1] is the duty ratio used for the converter.A simplified model for the converter can be obtained from the steady state equations of (24), which imply that i bat v bat = i TL v TL , i.e. the input power equals the output power.These models might as well be used for control purposes [31].

Distribution line model
The currents and voltages of the bidirectional converter (v TL , i TL ) = (v bdc , i bdc ) are connected to a DC voltage source with current and voltage (v dc , i dc ) via a distribution line which is modeled using the π-model, see [32,Section 6.1], which is a lumped parameter model and provides a good approximation for short lines.For longer transmission lines, it might be beneficial to replace this model by spatially discretized telegrapher equations.
The current direction is assumed to be from the voltage source towards the converter, hence, if we interconnect with the converter, we have to alternate the sign of the current.Using charge and flux variables leads to the following pH system ẋtl =

Interconnection within DC side subsystem
We rearrange ( 23) so that we can replace i bat in (24).A combination of the equations ( 23), ( 24), ( 25) and using the state

AC side subsystem
The AC side subsystems connect the AC grid via an LCL filter and an AC/DC converter to the DC bus.The LCL filter stands for Inductor-Capacitor-Inductor filter, corresponding to a passive filter used to reduce harmonic distortion in three-phase power systems.Its primary functions are to reduce harmonic content in the current and improve the power factor of the system.Assume that the grid voltage v gabc is a three-phase distortion-free sinusoidal waveform with constant amplitude and frequency, and that the PLL can always track the grid voltage angle θ(t) at the point of common coupling (PCC).In such a way, where V g is the amplitude of v gabc .
The AC/DC converter has (i dc , v dc ) as input variables and generates (i s , v s ) as output variables.The output variables are three-phase sinusoidal waveforms as averaged modeling is used.In order to simplify future calculations, the AC waveforms are transformed to equivalent DC signals, denoted as i s = (i sd , i sq ) and v s = (v sd , v sq ), by applying the directquadrature (dq) transformation.In this manner, calculations can then be carried out on these DC quantities before performing the inverse transform to restore the original threephase AC outcomes.
Denoting the modulation indexes by m q , m d , the converter is described in [5, Section 5.3.3] by the averaged converter output 1] and the power balance equation Furthermore, we assume that there is a capacitor between the DC bus side and the AC/DC converter which is described by The LCL-filter between the AC/DC converter and the AC grid voltage input is modeled by where v c is the voltage across the capacitor of the LCL-filter and Ω = 0 ω −ω 0 for given ω > 0.
A combination of ( 27), ( 28) and ( 29) leads to the following AC side system

Full model of the uncontrolled charging station
To build the overall system of the charging station we have to interconnect the subsystems ( 26) and (30).First observe that the currents in both subsystems have opposite directions.Hence, we have to use i in = −i ind and v in = v dc .This leads to an overall (averaged) pH system with where v dc appears as an additional state variable, e 5 ∈ R 5 and e 1 ∈ R 7 are canonical unit vectors and H = H DC + H AC .For the charging station we have three parameters θ 1 = d dc , θ 2 = m d , θ 3 = m q and the matrices in ( 7) are given by where again e 1 , e 3 , e 5 , e 6 , e 7 ∈ R 9 are canonical unit vectors.

Numerical simulation of an EVCS and comparison of controllers
In this section, we compare the pH approaches proposed in Theorem 3.2 for controlling the duty ratios and modulation indexes of the averaged pH model of a particular EVCS.Furthermore, the pH controllers are verified for a switched system model of the EVCS in Simulink.Here we use the following steady state duty ratios which were obtained from the Simulink model of the charging station and, hence, it can be verified that J(θ) − R given by ( 31) is Hurwitz.Thus, the steady state given by ( 13) is asymptotically stable, and the control approaches described in Theorem 3.2 lead to asymptotically stable pH systems.To compare the controllers described in Theorem 3.2, we will consider a perturbation of the zero initial condition of the shifted system, which means that we perturb the steady state solution and investigate the settling time of the controllers.
For the derivation of the controllers, we compute Applying the proportional pH controller introduced in (18) to the charging station model results in the following equations where γ > 0 is a control gain factor, that is chosen sufficiently large in order to compensate the size of the two summands written in parentheses in (32).Here, the first summand is a difference of powers which typically attains large values of approximately 10 3 and 10 4 for the considered power system and the second summand with prefactor γ is a difference of the rather small duty ratios or modulation indexes, whose absolute difference is trivially bounded from above by 2. Furthermore, the (differential-algebraic) pH controller introduced in ( 19) is given by (32) after replacing the left-hand sides by 0.
Moreover, we consider the pH PI controller which is given by equations where a suitable choice of δ > 0 improves the performance of the controller, in the sense that the simulated time of convergence towards the given steady state is short, which is a standard measure to evaluate the performance of a stabilizing controller.Another measure that is often used is the size of the overshoots after set-point changes, which we can see, for instance, in the Figures 4, right at the beginning of the simulated time-period.

Comparison of the pH controllers for the averaged model
First, the different pH controllers are applied and compared to the averaged model of an EVCS.For the simulation, we assumed for the following states an initial deviation from the  31) of an EVCS connected to an AC grid.The plots show the trajectories of the pH controlled closed-loop system, where the DC bus voltage v dc and the q-component of the AC grid current i gq were selected.
whereas all other states are initialized with the corresponding value of the set-point.The methodology of choosing the control gains γ, δ > 0 is as follows: we choose a sufficiently large value of γ = 10 5 based on the order of magnitude of the coefficients in (32) and then the additional parameter δ for the pH PI controller is chosen in a trial-and-error process by starting with some initial value δ 0 > 0 and then, based on the outcome of the simulation results, the current value of δ is either increased or decreased.As a performance measure for this decision, we use the speed of convergence towards the steady state.Another performance measure that is typically used in control design is to bound the overshoot, which can also be observed in Figure 4.The simulation results show that the pH PI controller outperforms the pH ODE and the pH DAE controllers regarding the convergence time and the overshooting behavior.
Furthermore, when increasing the control gain γ it can be observed that the convergence time of the pH ODE and pH DAE controller increases.To illustrate this in Figure 4, we chose a larger control gain γ > 0 for the pH ODE controller compared to the pH DAE controller.For the same control gain, the performance of the pH ODE and the pH DAE controller is similar.Nevertheless, merely increasing the control gain γ in the pH ODE or pH DAE controllers cannot reduce the overshooting behavior of the q-component of the AC-grid current i gq and therefore using the pH PI controller is the better option.

Validation of the pH controllers
We validate the performance of the designed pH controllers by performing time-domain simulations of the switching model of the EVCS system, as described in Section 4.
We compare the pH controllers of the DC/DC converter and DC/AC inverter with their corresponding proportional-integral (PI) type controllers of the DC/DC converter and DC/AC inverter, respectively.The cascaded PI controller, as described in [6], is detailed in Section C of the appendix.In principle, this controller adopts a cascaded configuration in the DC/AC inverter, where the outer voltage controller controls the DC bus voltage v dc and generates the reference of i sd , and the inner current controller controls the current i sd and i sq .
For the pH PI controller that is given by (33), we use the control gains δ = 1.5 and γ = 3•10 6 .Their values are derived from the simulations using the averaged model and then they are adapted in the above described trial-and-error process to increase the performance of the controllers.
Furthermore, compared to the charging station model considered in [6], an additional power line with L TL = 1.1 • 10 −6 H and C TL = 4 • 10 −4 F and R TL = 10 −3 is introduced in the generic EVCS model that is described in Section 4. The references of v bat , v dc , and i sq used in the simulations are In the simulation scenario, all variables within the charging station remain at their respective steady-states from 0 s to 0.02 s.Subsequently, during the time interval from 0.02 s to 0.12 s, disturbances in the form of changes to v dc is introduced by setting Moreover, at 0.12 s, the disturbances are removed.The dynamics of v dc is shown in Figure 5.
The simulation results in Figure 5 show that the considered pH controllers can handle large disturbances in the DC bus voltage better than the cascaded PI controller.Furthermore, we observed that the line parameters of the system might behave sensitive to perturbations.It was noticed that after increasing the line parameters L TL and C TL significantly, by one order of magnitude the set-point changes might cause some considerable resonance in the system.Although both control approaches are still able to track the setpoints, this change of parameters has a negative impact on the performance of both, the pH PI and the cascaded PI controller.

Conclusion and future work
We propose averaged pH systems as a modeling framework that allows to include averaged models of switched subsystems, such as power converters.Using the pH modeling framework, we derive several types of proportional and PI controllers for averaged pH systems in general and for EV charging stations in particular.The design of the controllers is only based on the knowledge of the system equations of the averaged models, making them easily adaptable to different models of EV charging stations or larger systems of interconnected charging stations by adapting the two scalar parameters of the pH PI controller.The designed controllers were successfully validated in simulations using the switched model of a particular EV charging stations, and the advantages compared to a standard cascaded PI controller are discussed.
In the future, we plan to consider optimized pH control designs, as there is still a considerable amount of freedom in the choice of the control design matrices which has not been explored yet.
By assumption that θ i ≥ 0, the symmetric part is positive semi-definite and therefore the system is pH.Next, we show that the system is locally asymptotically stable around the equilibrium (x, θ, u) by computing the Jacobian D of the system in (x, θ) which is given by This matrix is Hurwitz, since K θ is positive definite and its Schur complement is given by the Hurwitz matrix D(θ) − D(x)K −1 θ D(x) ⊤ .Hence, the system is locally asymptotically stable.
We continue with the proof of (c).To obtain an equivalent standard system, we solve the algebraic equation for θ − θ as follows: where e i ∈ R k denotes the canonical unit vector which has an entry 1 in the ith row and all other entries are zero.Hence, the first line in (19)  (38) Clearly, the matrix F (x, ξ) is Hurwitz in a neighborhood of (x, 0) and has positive definite symmetric part.Hence, for the choice K ξ = −(D(x)K −1 θ ) ⊤ , the system (38) is locally asymptotically stable and pH.

B Proof of Proposition 3.3
Assume that there exists an eigenvalue λ ∈ C of A with eigenvector x ∈ C n \ {0} and its entry-wise complex conjugate x.Then g.[28, p. 72], that a positive definite solution Kθ of(22) exists if (A, D(x)) is stabilizable, i.e. rk[λI n − A, D(x)] = n for all λ ∈ C satisfying Re λ ≥ 0.By assumption, λI n − A is invertible for all λ ∈ C satisfying Re λ > 0. Therefore, the stabilizability of (A, D(x)) is equivalent to rk[iω − D(θ), D(x)] = n for all ω ∈ R.

Figure 1 :
Figure 1: Circuit diagram of the EV charging station.The bidirectional DC-DC converter and the EV battery model are shown in the Figures 2 and 3.

Figure 3 :
Figure 3: The EV battery model used in Figure 1.

Figure 4 :
Figure 4: Simulation results of different pH controllers applied to the averaged model (31) of an EVCS connected to an AC grid.The plots show the trajectories of the pH controlled closed-loop system, where the DC bus voltage v dc and the q-component of the AC grid current i gq were selected.

Figure 5 :
Figure 5: Simulation results of the EV charging station switched model with the pH PI and the cascaded PI controller: (a) DC bus voltage; (b) output voltage of the EV battery; (c) output current of the EV battery.