Improved Voltage Control for the Electric Vehicle Operation in V2H Mode as an Off-Line UPS in the Context of Smart Homes

As a contribution for sustainability, electric vehicles (EVs) are seen as one of the most effective influences in the transport sector. This paper proposes an improved voltage control of the EV operating as uninterruptible power supply (UPS) in smart homes. With the EV plugged-in into the smart home, it can act as an off-line UPS protecting the electrical appliances from power grid outages. The foremost advantages of the proposed voltage control strategy are comprehensively emphasized, establishing a comparison with the classical approach. Aiming to offer a sinusoidal voltage for linear and nonlinear electrical appliances, a pulse width modulation with a multi-loop control scheme is used. A Kalman filter is used for decreasing significantly the time of detecting power outages and, consequently, the transition for the UPS mode. The computer simulations and the acquired experimental results validate the proposed strategy in different conditions of operation.


Introduction
The intensification in the use of electric vehicles (EVs) leads to new and unpredictable challenges for the electrical power grid controlling regarding the energy needed, when the EVs are parked for implementing the battery charging [1][2] [3].This process, designated as grid-to-vehicle (G2V), consists in transfer energy from the grid to the EV, independently of the primary energy source.For the EV, it receives energy from the grid at any place where it is plugged-in, but from the point of view of the grid, the controllability is more exigent due to the increasing number of EVs.Future interactions of the EV into the grid are proposed in [4] and a study about power quality concerns is introduced in [5] from a residential point of view.A collaborative strategy dealing with the peak power caused by EVs is presented in [6].The contextualization of EVs in distributed grids toward demand response programs is studied in [7].Different dynamics concerning conceptual frameworks about the EV integration into grids are addressed in [8].An ample review and future perspectives about the pros and cons respecting the EVs participation on distribution grids is introduced in [9].In addition to the EV direct control in terms of charging times, by using bidirectional systems, the EV can be interpreted as an energy source for the grid, in which this perspective is called as vehicle-to-grid (V2G).Thus, using EVs that employ bidirectional functions and that also have a bidirectional communication channel, the EV can contribute to new opportunities for the grid controllability.The Vitor Monteiro et al.

concerted operation with distributed energy resources (DER) is distinguished as one of the main opportunities.
A plan to handle DER with EVs, renewables and electrical markets is suggested in [10], which is based on an energy collaborative broker encompassing the DER players.A smart distribution grid, having as key argument the EV, is validated in [11].The perspective of the EV operation with DER framed in building microgrids is introduced in [12].An optimal dispatch based on the EV interaction with wind power is offered in [13], employing an enhanced particle swarm optimization.Similar interaction but with photovoltaic panels is offered in [14], prospecting future investments.The optimization of the EV interactions from the customer point of view is revealed in [15].The EV operation as a function of energy optimization in a microgrid is accessible in [16].The previously identified interaction (between the EV and the grid) consists of bidirectional energy and data exchange.Nonetheless, by using the same bidirectional systems, the EV can be useful for the energy management of the grid in supplementary perspectives of operation, without needing the energy of the EV batteries.The potential contribution of the EV with capability of producing reactive power is explored in [17].Innovative and futuristic modes for the interface between the EV and the grid are investigated in [18], [19], and [20] toward the smart grids conception.
In addition to the modes that allow the various interactions between the EV and the grid, the predictable EV vulgarization will also lead to new operating principles for the EV at a residential level, i.e., employing the EV as a positive complement to the development of smart homes.Thus, one of the main gains of the EV for smart homes is the possibility of using the EV stored energy in the event of grid failures.In this circumstance, the EV is recognized by a smart home as an uninterruptible power supply (UPS).As this mode is focused on smart homes, the interaction between the EV and the grid is termed as vehicle-to-home (V2H).It is important to note that this mode of operation is completely different from the scheduling of operation between EVs and electrical appliances in an energy management perspective, as suggested in [21] and [22].The smart home only uses this mode of operation when there is an energy failure in the grid, when the home disconnects from the grid and the only power source is coming from the EV.However, given the energy limitations of the battery, the smart home can only use this mode during specific times that are a function of the battery state of charge, the expectations of the user and the electrical appliances connected in the smart home.The EV-home interaction, through V2H mode, was introduced in [23] for conjunctures of isolated locations without access to the grid.A similar way, but using external equipment between the EV and the EV smart home, was proposed by Nissan, where the main inconvenience is that it does not operate as a UPS and the operation is restricted to the place where the equipment is installed.Later, the EV-home interaction as UPS, through the V2H mode was experimentally proven in [24], but without a convenient quality regarding the voltage produced by the EV.Based on the recognition of this adversity, this article points out as essential contributions: (i) a more adequate control of the voltage produced by the EV, minimizing inherent power quality problems, regardless of the structure of the electrical appliances; (ii) a faster transition between the grid and the EV interaction (charging mode, G2V) and EV-home interaction (mode where EV is the only power source for home, V2H); (iii) an experimental corroboration of the proposed voltage control, using a laboratory prototype of an EV bidirectional system.
The introduction of the EV battery charger into a smart home during the operation in G2V mode (charging the batteries) and in V2H mode (as an off-line UPS to supply the smart home electrical appliances) is presented in Figure 1. Figure 1(a) shows the EV plugged-in and receiving power from the grid, i.e., operating as an electrical  Operation During Outages 3 appliance in the home (G2V mode).This is the most common approach to the EV.However, even during the time of the G2V process, if a grid failure is identified by the proposed system with multiple control strategies, the house is isolated from the grid and the EV starts to operate as the source of power for the home.This situation is demonstrated in Figure 1(b), in which, as it can be verified, the main circuit breaker makes the house independent of the grid and the EV starts supplying power to the electrical appliances.
After the introductory contextualization, the paper is arranged as follows: the theoretical basis of the operation modes for the EV-home interaction is presented in section 2; in section 3 is disclosed a technical description of the EV battery charger; section 4 introduces the proposed multi-loop voltage control for the V2H mode; section 5 shows the most significant experimental results; finally, the conclusions are presented in section 6.

EV Integration into Smart Homes
Contextualizing Figure 1, in a future perspective of integrating smart homes as crucial part of smart grids, the operation of some of the electrical appliances are on/off controlled according to the energy management and the user comforts and conveniences (however, they can also be managed by the smart grid).In order to realize this controllability by the user, these electrical appliances require two fundamental things for a properly operation: power and an internal communication in the smart home.Since the EV is plugged-in at the smart home, in case of power outages, it can provide uninterrupted power for the electrical appliances according to the battery state-of-charge (determined by the internal management system of the EV, but the information is available for the user through the EV interface or even through APPs), the user preferences and the electrical appliances (cf.section I).In this context of EV-home interaction, some control strategies can be delineated as soon as a grid fault occurs, without prejudice to the operability of the home and with advantages for the EV.In order to prevent a fully battery discharging, some of electrical appliances can be turned-off at the same time of the power outage occurrence (e.g., heating systems or secondary lights), but others not (e.g., internal communication system, main lights, or the alarm system).The criteria to select the electrical appliances supplied by the V2H mode as UPS are established by the smart home energy management (which are previously established based on the user convenience).In a comprehensive and real overview of the V2H implementation in a smart home, this selection can be made automatically by the system and can be changed by the user, i.e., the priority inherent to each electrical appliance can be defined by the user according to their convenience (e.g., according to the seasons or weekdays and weekends).In addition, the priority of each electrical appliance differs from home to home.As these issues are related to the communication and energy optimization aspects of smart homes, this article discards addressing these issues, focusing only on the operation of the V2H mode (voltage failure in the grid, voltage source operation of the EV, and voltage restoration by the grid).

EV Battery Charger Description
In a smart home perspective arises the occasion to integrate a bidirectional EV charger with new functionalities based on the premise of exchanging power, representing a pertinent influence for the home energy management, since the EV can be seen as a special controlled electrical appliance (fully controlled, on/off, or with dynamic adjustment of the operating power) or as a power source (providing power when grid failures occur or, simply, when required by the operator as a power source independently of the UPS mode).The bidirectional EV system that was used for experimental validation allows both features when integrated into a smart home, however, only greater importance is attached to the mode in which the EV operates as a power source (V2H mode as an off-line UPS).
In the scope of this paper, the developed EV charger comprises two power converters, where the control of both is based on a unified algorithm.The two converters are linked by a dc-link operating as energy buffer for both converters.One of the converters interfaces the grid-side and the other interfaces the batteries-side.For the converter that interfaces the grid, a fully-controlled full-bridge rectifier is used to make the current consumption/injection sinusoidal with unitary power factor (in G2V and V2G modes, respectively).When the bidirectional system operates during the G2V and V2G modes, the ac-dc converter controls the produced voltage with the clear objective of controlling the waveform of the current on the grid-side (this task must be carried out preserving aspects of power quality).For these modes, where the grid-side current is the controlled variable, a method based on a predictive control is employed, as described with particularity in [25], [26], [27], and [28].
In this circumstance, the control performed by the system is completely different from the mode in which it operates as voltage source, controlled by voltage (V2H mode as an off-line UPS).For this reason, the control proposed for this mode, where are also highlighted the foremost contributions in terms of control, is presented in detail in the following section (cf.section 4).During the V2H mode as an UPS, the ac-dc converter operates as a voltage source controlled to synthesizing a voltage signal with the amplitude and frequency needed to supply the electrical appliances connected in the smart home.Therefore, the electrical appliances must be fed as if it were the grid.The converter that interfaces the batteries (dc-dc), during the G2V mode, acts as a buck converter, controlling the periods of the battery charging concerning the current.During the V2G mode, it acts as a boost converter, discharging the batteries, where the current is also the controllable variable.
During the V2H mode as an UPS, the dc-dc converter is responsible for regulating the dc-link voltage for the correct operation of the ac-dc converter.The overview of the EV into a smart home is presented in filters are used at the grid-side and at the batteries-side to filter the high frequencies produced by the converters.In the grid-side, targeting to smooth the gain response of the LC filter at the cut-off frequency, in series with the capacitor a damping resistor is used.In the batteries-side, a capacitor with low equivalent series resistor is used, targeting to achieve a low current ripple in the batteries.All of the semiconductors (IGBTs) are switched at 20 kHz, and the rest of the components were selected creating a conciliation among the filter performance and size.In Figure 2 are also represented the emulated electrical appliances, where, for realistic circumstances of operation inside the home, linear and nonlinear electrical appliances were considered.

Multi-Loop Voltage Control
A meticulous explanation of the proposed multi-loop voltage control applied to the V2H mode as UPS is introduced in this section, which is based on a predictive control strategy deducted from the circuit topology shown in Figure 2. The multi-loop voltage control has as main purpose the EV charging control for producing an ac-side voltage with the nominal rms and frequency values of the grid voltage, i.e., the nominal values before the grid failure.Since the proposed algorithm does not require any gain in its modulation, it is only dependent of the converter parameters, representing a pertinent benefit due to the unpredictability operation of the linear or nonlinear electrical appliances connected into the home.By applying the first Kirchhoff's law, the relation among the grid-side current (i ev ), the current in the passive filter C 1 (i C1 ), and the current of the converter (i ab ) can be expressed by: On the other hand, in terms of the involved ac-side voltages, the relation among the voltage produced by the converter (denoted by v ab in Figure 2, i.e., between points a and b), the voltage in the passive filter L 1 (v L1 ), and the voltage applied to the electrical appliances, is used the second Kirchhoff's law, as expressed by: Since the voltage across the inductor L 1 is expressed during a specific time by the relation of its current and the value of L 1 , according to: by substituting equation (3) in equation ( 2), the subsequent relation is achieved: Knowing that the current i ab is provided by equation ( 1), the current in the capacitor C 1 (it was considered that the resistance of the damping resistor is negligible) is determined with the equation: the final equation is obtained from: Reorganizing the terms of equation ( 6), and considering the grid-side voltage (v g ) equal to the voltage variation at the capacitor C 1 , is obtained the equation: In this paper, the differential equations can be estimated by linear variations without adding noteworthy error for the control algorithm and controlled variables, due to the high sampling frequency employed in the control algorithm.Therefore, equation ( 7) is simplified in terms of digital implementation for:

Experimental Results
In this section, the experimental results of the tests that were carried out with the EV battery charger are presented.These results were obtained for validating the proposed multi-loop voltage control presented in section 4, mainly under the V2H mode as UPS. Figure 3 shows the laboratory workbench where all the experimental tests were carried out.
It should be noted that all the experimental results were obtained using a Yokogawa DL708E oscilloscope.The specifications of the developed system are presented in Table 1.The results were obtained with values of voltage and power that are inferior to the nominal values, however, it does not invalidate the experimental verification of the proposed mode.With the purpose to control the EV charger according to the outlined objectives, it is indispensable to implement a synchronization algorithm with the fundamental component of the grid voltage.Thereby, a phase locked-loop (PLL) was used for such synchronization.
In As mentioned in section 2, the current control strategy for the ac-dc converter needs a sinusoidal reference, which is compared with the measured grid-side current for obtaining the PWM signals of the IGBTs.As validated through the result shown in Figure 5(a), the grid-side current is sinusoidal with the same phase of the voltage, demonstrating the excellent operation of the current control loop.In order to charge the EV batteries, a constant reference of current was selected.As can be verified through the Figure 5(b), in steady state, the charging current state is constant, validating the current control and the operation of the dc-dc converter.However, as can be seen in Figure 5(b), the reference current value does not immediately take the maximum value, i.e., the value is gradually increased until reaching the desired value.This strategy is used in order to prevent oscillations of the dc-link voltage, which was perfectly achieved, as demonstrated in this figure .Figure 6 shows the measured current and its reference for two and a half cycles.This result was obtained using a DAC, and allows checking the accuracy of the applied current control, which, as shown, proves that the measured   current (controlled variable in the ac-side) follows the reference throughout the cycle.During the tests carried out with the EV battery charger operating in the V2H mode, a comparison was established in terms of the calculation of the rms voltage using a traditional method and a method based on the Kalman filter.The main purpose of this comparison was to verify if the calculation based on the Kalman filter is faster than the traditional approach for different conditions of the power outage occurrence (i.e., in any instant of the power grid voltage).A set of computer simulations were obtained for different rms values of the grid voltage, which are considered for the identification of a power outage, showing that the Kalman filter offers better results for all the operating scenarios.However, since this study is out of the scope of this paper, it was omitted.
An experimental validation was carried out using a Kalman filter and the traditional approach (which is based on the rms voltage calculation, and the detection is made when its value is inferior when compared with the established reference).An illustrative experimental validation performed for the comparison of both methods is offered in Figure 7.As can be validated through the results shown in Figure 7(a), the power outage was detected by the control system about in 0.4 ms after the outage, time in which the EV charger starts its operation as energy source, i.e., the required time for the operation as UPS.However, for the case where the traditional method is employed, Figure 7(b) shows the results obtained.In this second case, the time required to switch from the charging mode (G2V) to the mode in which the EV operated as a voltage source was 1.8 ms.As it is evident, the method based on Kalman filter is much faster in detecting the voltage failure, making it much more convenient to be employed in the control algorithm, since the transition occurs as quickly as possible.The need for a quick transition concerns the requirement for some of the electrical appliances (e.g., an electrical appliance that runs out of power for brief instants may force the entire process to start until it is operational again).
In order to confirm the EV charger operation and to evaluate the performance of the multi-loop voltage control in V2H mode as UPS considering a real scenario, linear and nonlinear electrical appliances were used in the experimental validation.The tests began with a representative linear electrical appliance of heating systems (in the laboratory, a resistor was selected for such purpose).In Figure 8(a) it can be observed the voltage synthesized by the EV battery charger, applied to a linear electrical appliance, as well as the consumed current.In this first test, the voltage synthesized by the EV charger is sinusoidal, does not present any distortion as intended, thus being validated the multi-loop voltage control applied to the ac-dc converter.After the initial test performed with a linear electrical appliance, experimental tests were carried out with nonlinear electrical appliances to evaluate the proposed multi-loop voltage control.In During the tests performed on the EV charger operating as an UPS, the dc-link voltage and the current in the EV batteries were also analysed in order to see if they are correctly controlled, mainly the dc-link voltage since it is the common controlled variable of both ac-side and dc-side converters.The result of this experimental test can be seen in Figure 9(a).As demonstrated by the results of this figure, initially, the dc-link regulation is achieved through the EV charger operating as G2V.The process starts with the dc-link voltage at zero and an auxiliary pre-charge circuit is used to increase the dc-link voltage and to prevent that the current assumes uncontrolled values and without deteriorating the components.At this point the IGBTs are not switched, since only the internal diodes are used.As soon as the dc-link voltage reaches a value corresponding to the maximum ac-side voltage, the auxiliary circuit is no longer needed.After that, the algorithm imposes a control for switching the IGBTs just until the dc-link voltage reaches its reference.When the dc-link voltage is at its reference value, a power outage occurs and, subsequently, the battery charging is interrupted, the EV battery charger is unplugged from the power grid, and it initiates the operation in V2H mode as off-line UPS.As shown in Figure 9(a),   during the transition from the G2V mode to the V2H mode as UPS, a voltage sag in the dc-link occurs, which is readily recovered by the control algorithm inherent to the dc-dc converter, keeping the dc-link voltage at a steady state voltage close to the defined reference.It should be noted that the voltage sag on the dc-link can be minimized; however, the discharging current of the batteries at that time would have a high current peak.Taking into account this factor, a cost-benefit ratio was chosen, opting to reduce the peak current of the batteries and increase the voltage sag of the dc-link during the transition from operating modes.In Figure 9(a) it is also possible to verify the discharging current with a constant stage during the operation in the V2H mode as UPS.It should be noted that throughout the V2H mode, and for all the electrical appliances, the result of the dc-link voltage and of the EV battery current is comparable, changing only the discharge current value of the batteries.In addition to the above-mentioned results, a shift from the V2H to the G2V mode was considered.As shown in Figure 9(b), a transition is obtained without the existence of any type of transient, either in the current or in the voltage.This is because the transition does not happen instantly after the power grid is restored, but rather after the signal resulting from the PLL is fully synchronized with the power grid voltage, and the control system waits a time interval of 5 s in order to verify that there were no other power grid outages.

Conclusions
An improved voltage control for the electric vehicle (EV) operation in vehicle-to-home (V2H) mode as an off-line uninterruptible power supply (UPS), in the context of smart homes, is proposed.The V2H mode as UPS represents a complement to the challenges of integrating EVs into the power grid, representing a pertinent benefit for smart homes, since the EVs can be used for protecting the electrical home appliances from grid outages.The voltage control is based on a predictive control strategy, deducted from the circuit topology of the EV battery charger.Its main purpose consists in establishing an ac-side voltage with the nominal rms and frequency values of the power grid voltage.An EV battery charger based on a double stage power conversion was developed for the experimental validation, showing its correct action in the V2H mode as UPS, mainly characterized by a fast transition from the normal mode to the UPS mode, and also by a produced sinusoidal voltage, even for operation with nonlinear loads.

Figure 1 .
Figure 1.Introduction of the EV charger into a smart home during: (a) Operation in G2V mode (charging the batteries); (b) Operation in V2H mode (as an off-line UPS to supply the smart home electrical appliances).

Figure 2 ,
showing the internal arrangement of the EV charger, where LC low-pass Improved Voltage Control for the Electric Vehicle Operation in V2H Mode as an Off-Line UPS in the Context of Smart Homes EAI Endorsed Transactions on Energy Web 10 2019 -01 2020 | Volume 7 | Issue 25 | e2

Figure 2 .
Figure 2. Introduction of the EV battery charger into a smart home and its internal arrangement in terms of power electronics converters.

Figure 4 (
a), it can be observed the synchronism of the PLL signal (v PLL ) with the grid voltage during 50 ms.It should be noted that this result was obtained in steady state, i.e., after the PLL is completely synchronized with the voltage.A detail of both signals is presented in Figure 4(b).

Figure 3 .
Figure 3. Laboratory workbench used for the experimental tests.

Figure 4 .
Figure 4. Experimental results: (a) Synchronism of the PLL signal (vPLL) with the power grid voltage (vg); (b) Detail of both signals.

Figure 8 (
b) it is possible to observe the results of this experimental test, where the EV battery charger, operating as off-line UPS, is supplying a load constituted by a diode rectifier with a capacitive output filter and resistive load (C = 470 µF and R = 26 Ω) was used.As shown in the obtained result presented in Figure8(b), due to the proposed multi-loop voltage applied to the ac-dc converter, it was possible to synthesize a sinusoidal voltage with reduced harmonic distortion.It is essential to note that the obtained distortion is lower than the distortion of the power grid, representing one of the main contributions of this paper.

Figure 6 .
Figure 6.Experimental result showing the EV current (i ev ) and its reference (i ev *) in G2V mode the grid.

Figure 7 .
Figure 7. Experimental result showing the detection of a power outage and the beginning of the operation in the V2H mode as UPS based on: (a) Kalman Filter; (b) Traditional rms calculation.

Figure 8 .
Figure 8. Experimental results of the produced voltage (va) and consumed current (ia) during the V2H mode as UPS considering: (a) Linear electrical appliances; (b) Nonlinear electrical appliances.

Figure 9 .
Figure 9. Experimental results: (a) EV battery current (ibat) and dc-link voltage (vdc) in the G2V mode during the transition of the G2V mode to the V2H mode as UPS; (b) Voltage (va) and current (ia) in the electrical appliances during the transition from the V2H mode to the normal mode.

Improved
Voltage Control for the Electric Vehicle Operation in V2H Mode as an Off-Line UPS in the Context of Smart Homes EAI Endorsed Transactions on Energy Web 10 2019 -01 2020 | Volume 7 | Issue 25 | e2

Table 1 .
Specifications of the Developed System.