Design and Application of a Power Unit to Use Plug-In Electric Vehicles as an Uninterruptible Power Supply

Grid-enabled vehicles (GEVs) such as plug-in electric vehicles present environmental and energy sustainability advantages compared to conventional vehicles. GEV runs solely on power generated by its own battery group, which supplies power to its electric motor. This battery group can be charged from external electric sources. Nowadays, the interaction of GEV with the power grid is unidirectional by the charging process. However, GEV can be operated bi-directionally by modifying its power unit. In such operating conditions, GEV can operate as an uninterruptible power supply (UPS) and satisfy a portion or the total energy demand of the consumption center independent from utility grid, which is known as vehicle-to-home (V2H). In this paper, a power unit is developed for GEVs in the laboratory to conduct simulation and experimental studies to test the performance of GEVs as a UPS unit in V2H mode at the time of need. The activation and deactivation of the power unit and islanding protection unit are examined when energy is interrupted.


Introduction
The world faces an environmental crisis as the volatile prices of petroleum meet rising concerns regarding each nation's energy independence and global warming issues due to greenhouse gas (GHG) emissions.In this regard, the transportation sector plays a crucial and growing role in world energy use and, accordingly, GHG emissions, accounting for approximately 15% of overall GHG emissions [1,2].These factors contribute to increase interest in alternative vehicle technologies.Nowadays, electrification of transportation has become an important, supported industry trend.Along the past few years, grid-enabled vehicles (GEVs) such as plug-in electric vehicles (PEVs) and plug-in hybrid electric vehicles (PHEVs) are growing in popularity due to increasing governmental regulations on industries and public will to reduce GHG emissions [3].Given GEVs' popularity, different types are estimated to constitute 35% of the automotive market by 2025 [4].For this reason, many automotive manufacturers have already started to expand their productions to benefit from the growing GEV market.
In the near future, increasing number of GEVs will be connected to power distribution systems for charging their batteries [5].In [6], Electric Power Research Institute (EPRI) estimates new vehicle market shares of conventional vehicles (CVs) and PHEVs using a choice-based market modeling of customer choice.Results of this report suggest that CVs will have a market share of 56%, 14%, and 5% and PHEVs will have a market share of 20%, 62%, and 80% by 2050 in low, medium, and high penetration scenarios, respectively.In Morgan Stanley's report [7], specific information is used to forecast sales of GEVs.Market demand of GEV is forecasted to reach one million by 2020.The study of Pacific Northwest National Laboratory (PNNL) [8] examines GEV market penetration scenarios.Yearly market penetration ratios for PHEVs are estimated from 2013 to 2045 for three scenarios: hybrid technology-based assessment, R&D goals achieved, and supply constrained scenarios, in which PHEV market penetration is estimated to reach 9.7%, 9.9%, and 26.9% by 2023, and 11.9%, 29.8%, and 72.7% by 2045, respectively.The study of Oak Ridge National Laboratory (ORNL) [9] estimates that the demand for GEVs will be almost one million by 2015 [9].It is clear that massive integration of GEVs on the power distribution system will result in a significant increase in electric energy demand and will raise load values at peak times [10].Also, various studies have already been carried out to predict the effects of GEVs on the power distribution system.As a result of these studies, GEVs have been observed to cause some special effects such as phase imbalance, power quality issues, grid stability, transformer degradation and failure, and circuit breaker and fuse blowout on the power distribution systems [11][12][13][14][15].
All these problems can be prevented with well-designed GEV battery chargers and intelligent charging as part of the smart grid technologies.Massive integration of batteries of GEVs into the power grid can create some opportunities.With smart grid technologies, the function of the GEVs as a mobile energy storage unit in the power grid includes some opportunities such as reactive power compensation, harmonic filtering, voltage support, reducing frequency fluctuations, functioning as an emergency power supply such as an uninterruptible power supply (UPS) which is often named as vehicle-to-home (V2H), improving the effectiveness of home renewable energies by using GEV as storage, load balancing, peak shaving unit [16][17][18][19][20][21][22][23].However, the design and control of a GEV on-board battery charger is important to perform specified operating conditions.
As it is well known, an energy storage unit that provides the required power for a vehicle is employed in GEVs.This energy storage unit must be recharged at charging points.Nowadays, the interaction of a commercial GEV with the grid is generally unidirectional-the charging process.However, GEVs can be operated bi-directionally by modifying the design of power units of GEV.Thus, the storage units can be supplied to small isolated systems such as single households without the power grid in V2H mode.Due to the large amount of energy stored in batteries of GEVs, they can supply the demand of the consumption center.The general scheme of the V2H operating condition is illustrated in Figure 1.V2H operating conditions would offer the possibility of using a GEV as a domestic back-up power as a UPS [24,25].Instead, a power unit that can be utilized for the consumption center connection of vehicular systems is important for the realization of this operating condition.The simulation studies are performed in MATLAB & Simulink environments.For the experimental studies, a test platform formed by a battery group, a power unit, measurement units, an islanding protection unit, a load unit, a dead-time generation unit, and a dSPACE control unit is configured to test V2H operating conditions-different from the existing literature, which considers the topic a solely theoretical point of view.
The remainder of this paper is organized as follows: Section 2 describes the V2H simulation model that has been developed and explains the physical configuration of the test platform as well as the testing methodology; Section 3 demonstrates the simulation and experimental results; and finally, conclusions are made in Section 4.

System Description and Methodology
In order to test and improve the effectiveness of the proposed methodology, an initial analysis is performed in a simulation environment before conducting experimental studies.In this simulation study, the modeling and analysis of the prepared system are realized using MATLAB & Simulink, Sim Power Systems.Afterwards, a test platform is established in order to use GEV as a UPS if necessary.The parameters of the components used in the test platform are normalized to real GEV specifications.The concept of the simulation model and test platform, control algorithms, and the principle of the operation as well as the general structure of the V2H are explained in detail in the following subsections.

Simulation Model
Firstly, all subsystems of the general structure in the performed simulation study are prepared separately.The simulation study consists of four units: Battery, DC-DC converter, DC-AC converter (inverter), and the load model.The block diagram of the prepared system is shown in Figure 2 and the simulation model is given in Figure 3. Also, the parameter values used in the simulation are given in Table1.In this simulation study, the charging process of the GEV is not included in order to reduce the complexity in a model that mainly focuses on the V2H operating mode.For this reason, the power grid and the islanding protection unit are not modeled and used in the simulation study.The main idea presented in this paper is using GEVs as a power supply to the consumption center when needed.The proposed study contributes to the relevant literature regarding the fact that both the simulation and the experimental analyses have been conducted for use of GEVs as UPS.The concept of using GEVs as a UPS unit is different from the regular UPS structures.Firstly, the GEVs are not continuously available at the residential premises as the GEV owners use their GEVs during daily life for traveling to work, etc. Besides, the use of GEVs for such purposes should be limited by comfort conditions as the GEV owner requiring a minimum level of charge for his/her GEV for possible unexpected GEV use during the evening, etc.Moreover, such systems should be continuously controlled regarding the fact that battery charge/discharge lifetime is limited and uncontrolled daily use of GEVs for such purposes will present drawbacks in this regard.However, the GEVs can be considered as a mobile UPS unit readily available during energy outages, etc. for supplying at least the minimum level of electrical energy for sustaining daily activities at home, work, etc. as GEVs are also mostly idle during the daytime (at work, etc.) even when the GEV is not at home.A limitation for the minimum State-of-Charge (SoC) is implemented within the control structure.In addition, an islanding unit is designed specifically for the mentioned type of use for GEVs in this study.
The simulation studies are performed in MATLAB & Simulink environments.For the experimental studies, a test platform formed by a battery group, a power unit, measurement units, an islanding protection unit, a load unit, a dead-time generation unit, and a dSPACE control unit is configured to test V2H operating conditions-different from the existing literature, which considers the topic a solely theoretical point of view.
The remainder of this paper is organized as follows: Section 2 describes the V2H simulation model that has been developed and explains the physical configuration of the test platform as well as the testing methodology; Section 3 demonstrates the simulation and experimental results; and finally, conclusions are made in Section 4.

System Description and Methodology
In order to test and improve the effectiveness of the proposed methodology, an initial analysis is performed in a simulation environment before conducting experimental studies.In this simulation study, the modeling and analysis of the prepared system are realized using MATLAB & Simulink, Sim Power Systems.Afterwards, a test platform is established in order to use GEV as a UPS if necessary.The parameters of the components used in the test platform are normalized to real GEV specifications.The concept of the simulation model and test platform, control algorithms, and the principle of the operation as well as the general structure of the V2H are explained in detail in the following subsections.

Simulation Model
Firstly, all subsystems of the general structure in the performed simulation study are prepared separately.The simulation study consists of four units: Battery, DC-DC converter, DC-AC converter (inverter), and the load model.The block diagram of the prepared system is shown in Figure 2 and the simulation model is given in Figure 3. Also, the parameter values used in the simulation are given in Table 1.In this simulation study, the charging process of the GEV is not included in order to reduce the complexity in a model that mainly focuses on the V2H operating mode.For this reason, the power grid and the islanding protection unit are not modeled and used in the simulation study.Under normal conditions, islanding operation is important for safety as it separates the power grid and the consumption center.Thus, the electrical energy generated by the GEV is only consumed by the consumption center in the V2H operation mode by this way the staff of the grid operator can safely rectify the fault.Also even when the power grid is powered up again the GEV is temporarily kept mechanically isolated to protect the power converters from transient effects that may occur.Under normal conditions, islanding operation is important for safety as it separates the power grid and the consumption center.Thus, the electrical energy generated by the GEV is only consumed by the consumption center in the V2H operation mode by this way the staff of the grid operator can safely rectify the fault.Also even when the power grid is powered up again the GEV is temporarily kept mechanically isolated to protect the power converters from transient effects that may occur.Under normal conditions, islanding operation is important for safety as it separates the power grid and the consumption center.Thus, the electrical energy generated by the GEV is only consumed by the consumption center in the V2H operation mode by this way the staff of the grid operator can safely rectify the fault.Also even when the power grid is powered up again the GEV is temporarily kept mechanically isolated to protect the power converters from transient effects that may occur.In this study, as the first unit in simulation, the existing battery model within the Simulink library was selected.The type of battery is lithium-ion and the battery values determined as 240 V, 10 Ah, and initial SoC of 100%.
The second unit is a load model that models the consumption center in the simulation study.This load model consists of a controlled voltage source, resistor, and the control block of the controlled voltage source.As the basic operating principle of this system, control block of the load model generates the reference voltage value of the controlled voltage source and current is drawn through 1 ohm virtual resistance.The control inputs of the load unit are active power (P), reactive power (Q), and the instantaneous value of the voltage at the load connection point (V) is used as a feedback signal to calculate reference current value.The mentioned P and Q values of a three-story office building are used.The output of the load model is the voltage signal generated for the controlled voltage source.The signal production method for the controlled voltage source is shown in Figure 4.  First, as in Figure 4, angle (φ) is calculated in the unit of radians.The power factor (cos φ) value is calculated with φ.Also, φ is converted to seconds from radians for creating the phase difference between the current and the voltage.Afterwards, the RMS value of the current is calculated so that the peak value of the current can be specified.After all of these processes, a pure sine wave is generated with the same phase angle with the voltage of load connection point.This reference wave form is shifted to φ angle and multiplied by the peak value of the current and the reference current signal is produced.Finally, the measured current signal is subtracted from the voltage value on the load connection point.Thus, the control signal for the voltage controlled source is produced.
The third unit is a DC-DC converter, which generates an appropriate DC voltage for the inverter input.This DC-DC converter requires bi-directional operation (charging and discharging of the battery).In this simulation study, the bi-directional DC-DC converter is operated only for discharging the battery.The charging of the GEV battery is not in the scope of this study; relevant charging methodologies are presented in [24].Therefore, a bi-directional DC-DC converter control is realized just for the boost operating state.In control unit of the converter, the reference and measured values of DC bus voltage are required.First, the control unit of the DC-DC converter receives the information of the DC bus voltage in the DC-DC converter output.Then, the reference voltage information is compared with the measured voltage in the PI controller.The DC reference voltage value is chosen as 425 VDC for resembling the voltage value at load connection to the grid voltage value.After this process, a pulse width modulation (PWM) signal is obtained by comparison of a saw tooth signal, with the signal received from the output of PI controller.Afterward, zero First, as in Figure 4, angle (ϕ) is calculated in the unit of radians.The power factor (cos ϕ) value is calculated with ϕ.Also, ϕ is converted to seconds from radians for creating the phase difference between the current and the voltage.Afterwards, the RMS value of the current is calculated so that the peak value of the current can be specified.After all of these processes, a pure sine wave is generated with the same phase angle with the voltage of load connection point.This reference wave form is shifted to ϕ angle and multiplied by the peak value of the current and the reference current signal is produced.Finally, the measured current signal is subtracted from the voltage value on the load connection point.Thus, the control signal for the voltage controlled source is produced.
The third unit is a DC-DC converter, which generates an appropriate DC voltage for the inverter input.This DC-DC converter requires bi-directional operation (charging and discharging of the battery).In this simulation study, the bi-directional DC-DC converter is operated only for discharging the battery.The charging of the GEV battery is not in the scope of this study; relevant charging methodologies are presented in [24].Therefore, a bi-directional DC-DC converter control is realized just for the boost operating state.In control unit of the converter, the reference and measured values of Energies 2016, 9, 171 6 of 17 DC bus voltage are required.First, the control unit of the DC-DC converter receives the information of the DC bus voltage in the DC-DC converter output.Then, the reference voltage information is compared with the measured voltage in the PI controller.The DC reference voltage value is chosen as 425 V DC for resembling the voltage value at load connection to the grid voltage value.After this process, a pulse width modulation (PWM) signal is obtained by comparison of a saw tooth signal, with the signal received from the output of PI controller.Afterward, zero signal is given to the S1 switch and the PWM signal is sent to the S2 switch.S1 and S2 switches are shown in Figure 3.In order to maintain the DC bus voltage, the control algorithm presented in Figure 5 is used.
The third unit is a DC-DC converter, which generates an appropriate DC voltage for the inverter input.This DC-DC converter requires bi-directional operation (charging and discharging of the battery).In this simulation study, the bi-directional DC-DC converter is operated only for discharging the battery.The charging of the GEV battery is not in the scope of this study; relevant charging methodologies are presented in [24].Therefore, a bi-directional DC-DC converter control is realized just for the boost operating state.In control unit of the converter, the reference and measured values of DC bus voltage are required.First, the control unit of the DC-DC converter receives the information of the DC bus voltage in the DC-DC converter output.Then, the reference voltage information is compared with the measured voltage in the PI controller.The DC reference voltage value is chosen as 425 VDC for resembling the voltage value at load connection to the grid voltage value.After this process, a pulse width modulation (PWM) signal is obtained by comparison of a saw tooth signal, with the signal received from the output of PI controller.Afterward, zero signal is given to the S1 switch and the PWM signal is sent to the S2 switch.S1 and S2 switches are shown in Figure 3.In order to maintain the DC bus voltage, the control algorithm presented in Figure 5 is used.The fourth and the last unit is the power unit.This unit includes an inverter and the LC filter, which is located in the inverter output.A sinusoidal pulse width modulation (SPWM) control is applied at the aforementioned inverter.Due to the SPWM method, the switching elements (IGBT, MOSFET) are entered in cutoff mode and transmission mode to generate a sinusoidal wave form during each period.Thus, the variable amplitude sinusoidal signal can be obtained.A sinusoidal control signal is compared with a higher frequency triangle wave for achieving the desired frequency of SPWM.In this comparison result, the SPWM signals required for cross-arms of the power unit are obtained.An LC passive filter is used to filter the harmonics on the output of the inverter.The filter's inductance and capacitor values are selected as 0.03 mH and 100 μF, respectively.The filter is designed and implemented to minimize the system harmonics.
All subsystems in the simulation study are prepared separately, as mentioned before.Then, the interconnection of these subsystems is performed and the simulation results are obtained.The fourth and the last unit is the power unit.This unit includes an inverter and the LC filter, which is located in the inverter output.A sinusoidal pulse width modulation (SPWM) control is applied at the aforementioned inverter.Due to the SPWM method, the switching elements (IGBT, MOSFET) are entered in cutoff mode and transmission mode to generate a sinusoidal wave form during each period.Thus, the variable amplitude sinusoidal signal can be obtained.A sinusoidal control signal is compared with a higher frequency triangle wave for achieving the desired frequency of SPWM.In this comparison result, the SPWM signals required for cross-arms of the power unit are obtained.An LC passive filter is used to filter the harmonics on the output of the inverter.The filter's inductance and capacitor values are selected as 0.03 mH and 100 µF, respectively.The filter is designed and implemented to minimize the system harmonics.
All subsystems in the simulation study are prepared separately, as mentioned before.Then, the interconnection of these subsystems is performed and the simulation results are obtained.

Test Platform
An experimental test platform is built to verify the controller system design and to implement a successful connection between the GEV and the end-user premise.The parameters of the components used in the test platform are normalized to certain values in order to reduce high costs, minimize the size of the components, and achieve flexible controllability.This test platform consists of a battery, a power unit (inverter), measurement units, an islanding protection unit, a dead-time generation unit, and a dSPACE control unit.The block diagram of the mentioned system is given in Figure 6.The test platform for experimental studies is shown in Figure 7. Also, the values of components used in the test platform are given in Table 2.
components used in the test platform are normalized to certain values in order to reduce high costs, minimize the size of the components, and achieve flexible controllability.This test platform consists of a battery, a power unit (inverter), measurement units, an islanding protection unit, a dead-time generation unit, and a dSPACE control unit.The block diagram of the mentioned system is given in Figure 6.The test platform for experimental studies is shown in Figure 7. Also, the values of components used in the test platform are given in Table 2.          the data storage block.The information of incoming grid voltage is checked if it is in the voltage range specified by the grid monitoring block.Accordingly, the islanding protection signal is generated.Also, some data are sent to the V2H control block, which provides safe system operation.These data are the battery voltage and the terminal voltage of the power unit, respectively.Furthermore, the V2H control block receives the confirmation signal of the end-user, SoC limit, the price of electricity, and the islanding protection signal from the grid monitoring block.Depending on these inputsV2H operation is started by generating SPWM signal.The SPWM signal generated by dSPACE is applied to the power unit through the dead-time generation unit in order to perform the energy transfer from the battery to the load.In addition to this generated signal, the dSPACE control unit transmits another control signal to the islanding protection unit for commissioning and decommissioning procedures.Lastly, the SPWM block operates according to the confirmation signal of the end-user and generates the driving signal required for the power unit.In this experimental study, the SPWM block for the power unit is operated at 10 kHz.
The control algorithm was developed utilizing MATLAB & Simulink and SimPowerSystems.A dSPACE embedded control unit is used as the controller in experimental studies.The control algorithm of the test platform, as illustrated in Figure 8, includes eight input and two output signals.
Five of the input signals are measurement data taken from sensors.At first, these measurement data enter the calibration block and signals are converted to the actual values.Then, the calibrated signals enter the data storage block.The grid voltage information is sent to the grid monitoring block from the data storage block.The information of incoming grid voltage is checked if it is in the voltage range specified by the grid monitoring block.Accordingly, the islanding protection signal is generated.Also, some data are sent to the V2H control block, which provides safe system operation.These data are the battery voltage and the terminal voltage of the power unit, respectively.Furthermore, the V2H control block receives the confirmation signal of the end-user, SoC limit, the price of electricity, and the islanding protection signal from the grid monitoring block.Depending on these inputsV2H operation is started by generating SPWM signal.The SPWM signal generated by dSPACE is applied to the power unit through the dead-time generation unit in order to perform the energy transfer from the battery to the load.In addition to this generated signal, the dSPACE control unit transmits another control signal to the islanding protection unit for commissioning and decommissioning procedures.Lastly, the SPWM block operates according to the confirmation signal of the end-user and generates the driving signal required for the power unit.In this experimental study, the SPWM block for the power unit is operated at 10 kHz.

Operation of the Test Platform
Initially, the battery group and the power unit representing a GEV are connected to the grid connection point via a transformer.However, in this study, GEV is operated as a UPS and therefore the charging of the battery is not included in the experimental study and the power unit is employed only for discharging the battery.The reason for using a transformer in the test platform is the quite low level of battery voltage according to the grid voltage.At the beginning of the experimental study, the grid supplies the load and GEV is in standby mode, depending on the status of the power grid.After a while, the power failure occurs on the grid side and the load does not remain energized.As a result of this fault, the recommended V2H operating mode will take action.From this moment, the power unit requires the formation of the necessary conditions to operate as an UPS.Those conditions are:


If the initial SoC of the battery is greater than the reference SoC limit,  If the end-user gives permission for V2H,  If the islanding protection process is realized (the grid is isolated from loads and power unit),  If the voltage value of the power unit is approximately zero regarding the measurement unit signal,  If the price of electricity is greater than the reference price value (optional).

Operation of the Test Platform
Initially, the battery group and the power unit representing a GEV are connected to the grid connection point via a transformer.However, in this study, GEV is operated as a UPS and therefore the charging of the battery is not included in the experimental study and the power unit is employed only for discharging the battery.The reason for using a transformer in the test platform is the quite low level of battery voltage according to the grid voltage.At the beginning of the experimental study, the grid supplies the load and GEV is in standby mode, depending on the status of the power grid.After a while, the power failure occurs on the grid side and the load does not remain energized.As a result of this fault, the recommended V2H operating mode will take action.From this moment, the power unit requires the formation of the necessary conditions to operate as an UPS.Those conditions are:

‚
If the initial SoC of the battery is greater than the reference SoC limit,

‚
If the end-user gives permission for V2H,

‚
If the islanding protection process is realized (the grid is isolated from loads and power unit),

‚
If the voltage value of the power unit is approximately zero regarding the measurement unit signal,

‚
If the price of electricity is greater than the reference price value (optional).
If all of the foregoing conditions are met, the control system formed by dSPACE allows GEV to be operated as a UPS.In this V2H operating mode, the power unit is operated as voltage-controlled and the power flow is provided from the battery to the loads.
The last step is the termination of this operation mode.There are several conditions for the termination of this operation mode.The mentioned conditions for operation termination are: Energies 2016, 9, 171 9 of 17

‚
If the SoC of the battery is lower than the reference SoC limit,

‚
If the end-user cancels the operation status,

‚
If the measurement signals of the grid side show existence of energy (if the voltage value of the power grid is within appropriate values for standards),

‚
If the price of grid electricity is more than the reference value (optional).
As a result of the provision of one or more termination conditions, dSPACE terminates sending signals to the power unit through the dead-time generation unit.After that, dSPACE receives and evaluates data coming from sensors.As a result of this evaluation, dSPACE interrupts the signal of the islanding protection unit (contactor) when there is no problem in terms of security (approximately two cycles).Consequently, the grid-load connection can be realized again.

Results
In this section, the behavior of the GEV in V2H operation mode is examined firstly by the simulation studies (results presented in Section 3.1).After the simulation results are evaluated, experimental results are shown and discussed in Section 3.2.

Simulation Results
The load demand of a three-story office building located in Istanbul was used in the simulation study.On the day of measurement, building renovation work was in progress.Therefore, some of the electrical loads were continuously engaged or disengaged.In the simulation study, these power values were used as the load demand values for active and reactive power drawn from GEV, as shown in Figure 9.In order to show the simulation results, a period of 10 s was selected when the load demand was at the maximum.
If all of the foregoing conditions are met, the control system formed by dSPACE allows GEV to be operated as a UPS.In this V2H operating mode, the power unit is operated as voltage-controlled and the power flow is provided from the battery to the loads.
The last step is the termination of this operation mode.There are several conditions for the termination of this operation mode.The mentioned conditions for operation termination are:


If the SoC of the battery is lower than the reference SoC limit,  If the end-user cancels the operation status,  If the measurement signals of the grid side show existence of energy (if the voltage value of the power grid is within appropriate values for standards),  If the price of grid electricity is more than the reference value (optional).
As a result of the provision of one or more termination conditions, dSPACE terminates sending signals to the power unit through the dead-time generation unit.After that, dSPACE receives and evaluates data coming from sensors.As a result of this evaluation, dSPACE interrupts the signal of the islanding protection unit (contactor) when there is no problem in terms of security (approximately two cycles).Consequently, the grid-load connection can be realized again.

Results
In this section, the behavior of the GEV in V2H operation mode is examined firstly by the simulation studies (results presented in Section 3.1).After the simulation results are evaluated, experimental results are shown and discussed in Section 3.2.

Simulation Results
The load demand of a three-story office building located in Istanbul was used in the simulation study.On the day of measurement, building renovation work was in progress.Therefore, some of the electrical loads were continuously engaged or disengaged.In the simulation study, these power values were used as the load demand values for active and reactive power drawn from GEV, as shown in Figure 9.In order to show the simulation results, a period of 10 s was selected when the load demand was at the maximum.The load demand and the power values drawn from the GEV coincide with each other successfully.An abrupt change was observed at the time of an instant power change due to the instantaneous response of the mathematical operations performed in the simulation study.Eventually, proper functioning of the prepared load model and accuracy of the control of the converters can be observed from Figure 9.The load demand and the power values drawn from the GEV coincide with each other successfully.An abrupt change was observed at the time of an instant power change due to the instantaneous response of the mathematical operations performed in the simulation study.Eventually, proper functioning of the prepared load model and accuracy of the control of the converters can be observed from Figure 9.
It is necessary to maintain the DC bus voltage at the reference voltage value for maintaining the RMS value of the terminal voltage of the load model the same as the power grid.The mentioned DC bus voltage variation is presented in Figure 10.As seen, some fluctuations can be observed in DC bus voltage as the load power demand varies.During periods of lower power demand, the DC bus voltage can successfully be maintained at the reference voltage value.As the power demand increases, the fluctuations of the DC bus voltage increase as well.However, the controller keeps the mentioned fluctuations within acceptable limits and therefore ensures the successful operation of the system.
Energies 2016, 9, 171 9 of 15 It is necessary to maintain the DC bus voltage at the reference voltage value for maintaining the RMS value of the terminal voltage of the load model the same as the power grid.The mentioned DC bus voltage variation is presented in Figure 10.As seen, some fluctuations can be observed in DC bus voltage as the load power demand varies.During periods of lower power demand, the DC bus voltage can successfully be maintained at the reference voltage value.As the power demand increases, the fluctuations of the DC bus voltage increase as well.However, the controller keeps the mentioned fluctuations within acceptable limits and therefore ensures the successful operation of the system.Finally, the change of the load voltage value and the current variation drawn by the load in Figure 12 show that the whole system is operating successfully.It is important to notice whether the voltage waveform is kept acceptably steady during load demand variations.The change of load It is necessary to maintain the DC bus voltage at the reference voltage value for maintaining the RMS value of the terminal voltage of the load model the same as the power grid.The mentioned DC bus voltage variation is presented in Figure 10.As seen, some fluctuations can be observed in DC bus voltage as the load power demand varies.During periods of lower power demand, the DC bus voltage can successfully be maintained at the reference voltage value.As the power demand increases, the fluctuations of the DC bus voltage increase as well.However, the controller keeps the mentioned fluctuations within acceptable limits and therefore ensures the successful operation of the system.Finally, the change of the load voltage value and the current variation drawn by the load in Figure 12 show that the whole system is operating successfully.It is important to notice whether the voltage waveform is kept acceptably steady during load demand variations.The change of load Finally, the change of the load voltage value and the current variation drawn by the load in Figure 12 show that the whole system is operating successfully.It is important to notice whether the voltage waveform is kept acceptably steady during load demand variations.The change of load terminal voltage when the highest change of active load occurs in the eighth second, shown in Figure 12  Eventually, all units of the simulation system operate successfully, as claimed by the data obtained from all figures.These results show that the GEVs can successfully be used as an UPS if necessary.

Experimental Results
Once the simulation results validated the control algorithms and V2H operation mode, the test platform was built to support the obtained simulation results.At the beginning of the experimental study, the grid voltage is within specified limits and the grid supplies the load in this process.At the same time, the GEV is awaiting at full charge depending on the grid.After that, the time of the grid voltage is decreasing outside of the specified limits is shown in Figure 13.The dSPACE unit receives the grid voltage and current values from the measurement unit at the grid side and ensures the opening of the contactor through sending a signal to the islanding protection unit.The islanding protection signal, the waveform, and the RMS value of the grid voltage are illustrated in Figure 13.Eventually, all units of the simulation system operate successfully, as claimed by the data obtained from all figures.These results show that the GEVs can successfully be used as an UPS if necessary.

Experimental Results
Once the simulation results validated the control algorithms and V2H operation mode, the test platform was built to support the obtained simulation results.At the beginning of the experimental study, the grid voltage is within specified limits and the grid supplies the load in this process.At the same time, the GEV is awaiting at full charge depending on the grid.After that, the time of the grid voltage is decreasing outside of the specified limits is shown in Figure 13.The dSPACE unit receives the grid voltage and current values from the measurement unit at the grid side and ensures the opening of the contactor through sending a signal to the islanding protection unit.The islanding protection signal, the waveform, and the RMS value of the grid voltage are illustrated in Figure 13.Eventually, all units of the simulation system operate successfully, as claimed by the data obtained from all figures.These results show that the GEVs can successfully be used as an UPS if necessary.

Experimental Results
Once the simulation results validated the control algorithms and V2H operation mode, the test platform was built to support the obtained simulation results.At the beginning of the experimental study, the grid voltage is within specified limits and the grid supplies the load in this process.At the same time, the GEV is awaiting at full charge depending on the grid.After that, the time of the grid voltage is decreasing outside of the specified limits is shown in Figure 13.The dSPACE unit receives the grid voltage and current values from the measurement unit at the grid side and ensures the opening of the contactor through sending a signal to the islanding protection unit.The islanding protection signal, the waveform, and the RMS value of the grid voltage are illustrated in Figure 13.The signal shown in Figure 13c is the control signal sent from dSPACE to the islanding protection unit.The islanding protection unit is disabled when the control signal value is 0. Thus, the energy flow from the power grid to the loads is realized.The islanding protection unit is activated and mechanically separates loads and power grid from the moment that the control signal value is 1.Furthermore, the RMS value of grid voltage is reduced to zero after a period of waveforms; this situation is shown in Figure 13b.The main reasons for this situation are that the measuring equipment can measure RMS values after one period and the displayed reduction is within a period of the power grid.
In the first stage of the experimental study, the waveform of the terminal voltage of the power unit is shown in Figure 14a and the RMS value of voltage of the power unit is shown in Figure 14b.After the islanding protection unit is activated, GEV begins to supply loads after a short time.This situation is presented in Figure 14c.Approximately one-period delay is set by dSPACE to secure the operating status of the test platform, which was expressed previously in Section 2.
Energies 2016, 9, 171 11 of 15 The signal shown in Figure 13c is the control signal sent from dSPACE to the islanding protection unit.The islanding protection unit is disabled when the control signal value is 0. Thus, the energy flow from the power grid to the loads is realized.The islanding protection unit is activated and mechanically separates loads and power grid from the moment that the control signal value is 1.Furthermore, the RMS value of grid voltage is reduced to zero after a period of waveforms; this situation is shown in Figure 13b.The main reasons for this situation are that the measuring equipment can measure RMS values after one period and the displayed reduction is within a period of the power grid.
In the first stage of the experimental study, the waveform of the terminal voltage of the power unit is shown in Figure 14a and the RMS value of voltage of the power unit is shown in Figure 14b.After the islanding protection unit is activated, GEV begins to supply loads after a short time.This situation is presented in Figure 14c.Approximately one-period delay is set by dSPACE to secure the operating status of the test platform, which was expressed previously in Section 2.   Lastly, the change of the battery voltage is shown in Figure 15 at the time of the islanding protection signal received.Initially, the fully charged battery is in standby mode until the islanding protection process is performed.After the islanding protection process, the battery voltage remains at the same value while the inverter is waiting for the provision of the necessary conditions for operation.When the power unit starts, the battery supplies the load and the battery voltage value decreases slightly.In the last stage of the experimental study, the response of the test platform is examined when the power grid is powered up again.When the voltage value of the grid is within standard limits again, the flow of energy from GEV to the load is terminated and load demand is satisfied by the grid again.These situations are illustrated in Figures 16-18.Lastly, the change of the battery voltage is shown in Figure 15 at the time of the islanding protection signal received.Initially, the fully charged battery is in standby mode until the islanding protection process is performed.After the islanding protection process, the battery voltage remains at the same value while the inverter is waiting for the provision of the necessary conditions for operation.When the power unit starts, the battery supplies the load and the battery voltage value decreases slightly.
In the last stage of the experimental study, the response of the test platform is examined when the power grid is powered up again.When the voltage value of the grid is within standard limits again, the flow of energy from GEV to the load is terminated and load demand is satisfied by the grid again.These situations are illustrated in Figures 16-18.
The waveform of the grid voltage and its RMS value are shown in Figure 16a,b respectively, when the power grid is online again.As seen in Figure 16c, the value of the islanding protection signal is 0 shortly after the grid voltage is within specified limits.Thus, the islanding protection unit remains inactivated and the grid supplies the loads.Despite the improvement of the grid voltage, the value of the islanding protection signal is zero again after a certain time.The main reason for this is that dSPACE waits for the realization of the previously mentioned security requirements in Section 2.2.2.These safety requirements ensure the safe and effective operation of the whole system.Figure 17 shows the change of the terminal voltage of the power unit and the islanding protection signal when the power grid is online again.After receiving the information indicating that the grid voltage is within specified limits, the operation of the power unit is terminated.Before islanding operation is terminated, the RMS value of the output voltage of the power unit reaches nearly zero in terms of security.Thus, the grid can be used to supply the load again.Lastly, the change of the battery voltage is shown in Figure 18.Primarily, the grid voltage reaches the specified limit.Then, dSPACE stops the operation of the power unit.From this moment on, the battery voltage is restored to the initial values.After obtaining all the safety requirements, dSPACE terminates the islanding protection.
The results of the experimental study show that all the units of the test platform perform successfully under the normalized conditions.Consequently, GEVs can be used as a UPS if the electrical infrastructure and power unit control are prepared properly.

Conclusions
Recently, a great number of studies have been performed on GEVs, which are considered to provide zero emissions.In these studies, it is declared that this GEV technology will gradually become widespread in the near future.As it is well known, an energy storage unit that provides the required power for a vehicle is employed in GEVs.This energy storage unit should be recharged at charging points.Also, another reason for this type of GEV to be popular is that the vehicle can be connected to the grid.Nowadays, the interaction of GEV with the grid is bi-directional, as is the charging process.However, GEVs can be operated bi-directionally by modifying the design of a vehicle's power unit or units.In such operating condition, a GEV can be operated as a UPS and supply the energy demand of the consumption center.
Before starting the study, it was assumed that battery of a GEV can supply a portion of an end-user premise's load.The test system was prepared primarily in a simulation environment for

Conclusions
Recently, a great number of studies have been performed on GEVs, which are considered to provide zero emissions.In these studies, it is declared that this GEV technology will gradually become widespread in the near future.As it is well known, an energy storage unit that provides the required power for a vehicle is employed in GEVs.This energy storage unit should be recharged at charging points.Also, another reason for this type of GEV to be popular is that the vehicle can be connected to the grid.Nowadays, the interaction of GEV with the grid is bi-directional, as is the charging process.However, GEVs can be operated bi-directionally by modifying the design of a vehicle's power unit or units.In such operating condition, a GEV can be operated as a UPS and supply the energy demand of the consumption center.
Before starting the study, it was assumed that battery of a GEV can supply a portion of an end-user premise's load.The test system was prepared primarily in a simulation environment for The waveform of the grid voltage and its RMS value are shown in Figure 16a,b respectively, when the power grid is online again.As seen in Figure 16c, the value of the islanding protection signal is 0 shortly after the grid voltage is within specified limits.Thus, the islanding protection unit remains inactivated and the grid supplies the loads.Despite the improvement of the grid voltage, the value of the islanding protection signal is zero again after a certain time.The main reason for this is that dSPACE waits for the realization of the previously mentioned security requirements in Section 2.2.2.These safety requirements ensure the safe and effective operation of the whole system.
Figure 17 shows the change of the terminal voltage of the power unit and the islanding protection signal when the power grid is online again.After receiving the information indicating that the grid voltage is within specified limits, the operation of the power unit is terminated.Before islanding operation is terminated, the RMS value of the output voltage of the power unit reaches nearly zero in terms of security.Thus, the grid can be used to supply the load again.Lastly, the change of the battery voltage is shown in Figure 18.Primarily, the grid voltage reaches the specified limit.Then, dSPACE stops the operation of the power unit.From this moment on, the battery voltage is restored to the initial values.After obtaining all the safety requirements, dSPACE terminates the islanding protection.
The results of the experimental study show that all the units of the test platform perform successfully under the normalized conditions.Consequently, GEVs can be used as a UPS if the electrical infrastructure and power unit control are prepared properly.

Conclusions
Recently, a great number of studies have been performed on GEVs, which are considered to provide zero emissions.In these studies, it is declared that this GEV technology will gradually become widespread in the near future.As it is well known, an energy storage unit that provides the required power for a vehicle is employed in GEVs.This energy storage unit should be recharged at charging points.Also, another reason for this type of GEV to be popular is that the vehicle can be connected to the grid.Nowadays, the interaction of GEV with the grid is bi-directional, as is the charging process.However, GEVs can be operated bi-directionally by modifying the design of a vehicle's power unit or units.In such operating condition, a GEV can be operated as a UPS and supply the energy demand of the consumption center.
Before starting the study, it was assumed that battery of a GEV can supply a portion of an end-user premise's load.The test system was prepared primarily in a simulation environment for testing and improving the accuracy of the planned system and algorithm and the system was tested with the real measured power data of a building.The voltage, frequency, etc., values remained within standards and the building could be supplied with high-quality energy.The results of the simulation study showed that the proposed test system can be used successfully in daily life as a UPS.
Afterwards, the test platform was established to present the verification of the controller system design and to implement a successful vehicle-home connection.The experimental results showed that the established test platform performed successfully under normalized conditions and can be practically implemented.The activation and deactivation of the power unit and islanding protection unit were realized in as rapid (approximately two cycles) and safe a way as possible when energy was interrupted on the test platform.
To this end, it should be noted that the idea of the V2H operating conditions has been confirmed by successful simulation and experimental studies.It is expected that the developed test platform can also be adapted to any GEV and end-user type, thus enabling GEVs to be employed for other purposes apart from transportation.In addition, this concept can also be used in different situations, such as emergency disasters such as earthquakes and blackouts.

Figure 1 .
Figure 1.Block scheme of the V2H operating condition.

Figure 1 .
Figure 1.Block scheme of the V2H operating condition.

Figure 2 .
Figure 2. General scheme of the simulation model.

Figure 2 .
Figure 2. General scheme of the simulation model.

Figure 2 .
Figure 2. General scheme of the simulation model.

Figure 4 .
Figure 4. Control block of load model.

Figure 4 .
Figure 4. Control block of load model.

Figure 5 .
Figure 5.Control algorithm of DC-DC converter during V2H operation mode.

Figure 5 .
Figure 5.Control algorithm of DC-DC converter during V2H operation mode.

Figure 6 .
Figure 6.General scheme of the test platform.

Figure 7 .
Figure 7. Photograph of the test platform.

Figure 6 .
Figure 6.General scheme of the test platform.

Figure 6 .
Figure 6.General scheme of the test platform.

Figure 7 .
Figure 7. Photograph of the test platform.Figure 7. Photograph of the test platform.

Figure 7 .
Figure 7. Photograph of the test platform.Figure 7. Photograph of the test platform.

2. 2 . 1 .
Control Algorithm The control algorithm was developed utilizing MATLAB & Simulink and SimPowerSystems.A dSPACE embedded control unit is used as the controller in experimental studies.The control algorithm of the test platform, as illustrated in Figure 8, includes eight input and two output signals.Five of the input signals are measurement data taken from sensors.At first, these measurement data enter the calibration block and signals are converted to the actual values.Then, the calibrated signals enter the data storage block.The grid voltage information is sent to the grid monitoring block from Energies 2016, 9, 171 8 of 17

Figure 8 .
Figure 8.The control algorithm of the test platform.

Figure 8 .
Figure 8.The control algorithm of the test platform.

Figure 9 .
Figure 9.The load demand values and power values drawn from the GEV.

Figure 9 .
Figure 9.The load demand values and power values drawn from the GEV.

Figure 10 .
Figure 10.The voltage of the DC bus.The terminal voltage fluctuations of the power unit are shown in Figure 11.The RMS value of the voltage at the end of load is maintained close to 220 V in spite of high power values drawn from the battery.This voltage fluctuation is within the standards and therefore proper voltage regulation is provided.

Figure 11 .
Figure 11.The terminal voltage fluctuations of the power unit.

Figure 10 .
Figure 10.The voltage of the DC bus.

Figure 10 .
Figure 10.The voltage of the DC bus.The terminal voltage fluctuations of the power unit are shown in Figure 11.The RMS value of the voltage at the end of load is maintained close to 220 V in spite of high power values drawn from the battery.This voltage fluctuation is within the standards and therefore proper voltage regulation is provided.

Figure 11 .
Figure 11.The terminal voltage fluctuations of the power unit.

Figure 11 .
Figure 11.The terminal voltage fluctuations of the power unit.
, indicates the change of the current drawn by the load at the same time range.After the change of the Energies 2016, 9, 171 11 of 17 load values at the eighth second, the prepared system has been successfully adapted to this change and has continued into the current study.Energies 2016, 9, 171 10 of 15 terminal voltage when the highest change of active load occurs in the eighth second, shown in Figure 12, indicates the change of the current drawn by the load at the same time range.After the change of the load values at the eighth second, the prepared system has been successfully adapted to this change and has continued into the current study.

Figure 12 .
Figure 12.The waveform of the terminal voltage of load model and load current.

Figure 13 .
Figure 13.The waveform of the grid voltage when the power grid fails.(a) Grid voltage [V] (b) Grid voltage [Vrms] (c) Islanding protection signal.

Figure 12 .
Figure 12.The waveform of the terminal voltage of load model and load current.
the highest change of active load occurs in the eighth second, shown in Figure12, indicates the change of the current drawn by the load at the same time range.After the change of the load values at the eighth second, the prepared system has been successfully adapted to this change and has continued into the current study.

Figure 12 .
Figure 12.The waveform of the terminal voltage of load model and load current.

Figure 13 .
Figure 13.The waveform of the grid voltage when the power grid fails.(a) Grid voltage [V] (b) Grid voltage [Vrms] (c) Islanding protection signal.

Figure 13 .
Figure 13.The waveform of the grid voltage when the power grid fails.(a) Grid voltage [V] (b) Grid voltage [Vrms] (c) Islanding protection signal.

Figure 14 .
Figure 14.The waveform of the terminal voltage of the power unit when the power grid fails.(a) Terminal voltage of the power unit [V] (b) Terminal voltage of the power unit [Vrms] (c) Islanding protection signal.

Figure 15 .
Figure 15.The change of the battery voltage when the power grid fails.(a) Battery voltage [V] (b) Islanding protection signal.

Figure 14 .
Figure 14.The waveform of the terminal voltage of the power unit when the power grid fails.(a) Terminal voltage of the power unit [V] (b) Terminal voltage of the power unit [Vrms] (c) Islanding protection signal.

Figure 14 .
Figure 14.The waveform of the terminal voltage of the power unit when the power grid fails.(a) Terminal voltage of the power unit [V] (b) Terminal voltage of the power unit [Vrms] (c) Islanding protection signal.

Figure 15 .
Figure 15.The change of the battery voltage when the power grid fails.(a) Battery voltage [V] (b) Islanding protection signal.Figure 15.The change of the battery voltage when the power grid fails.(a) Battery voltage [V] (b) Islanding protection signal.

Figure 15 .
Figure 15.The change of the battery voltage when the power grid fails.(a) Battery voltage [V] (b) Islanding protection signal.Figure 15.The change of the battery voltage when the power grid fails.(a) Battery voltage [V] (b) Islanding protection signal.

Figure 16 .
Figure 16.The waveform of the grid voltage when the power grid is powered up again.(a) Grid voltage [V] (b) Grid voltage [Vrms] (c) Islanding protection signal.

Figure 16 .
Figure 16.The waveform of the grid voltage when the power grid is powered up again.(a) Grid voltage [V] (b) Grid voltage [Vrms] (c) Islanding protection signal.

Figure 17 .
Figure 17.The waveform of the terminal voltage of the power unit when the power grid is powered up again.(a) Terminal voltage of the power unit [V] (b) Terminal voltage of the power unit [Vrms] (c) Islanding protection signal.

Figure 18 .
Figure 18.Change of the battery voltage when the power grid is powered up again.(a) Battery voltage [V] (b) Islanding protection signal.

Figure 17 . 15 Figure 17 .
Figure 17.The waveform of the terminal voltage of the power unit when the power grid is powered up again.(a) Terminal voltage of the power unit [V] (b) Terminal voltage of the power unit [Vrms] (c) Islanding protection signal.

Figure 18 .
Figure 18.Change of the battery voltage when the power grid is powered up again.(a) Battery voltage [V] (b) Islanding protection signal.

Figure 18 .
Figure 18.Change of the battery voltage when the power grid is powered up again.(a) Battery voltage [V] (b) Islanding protection signal.

Table 1 .
Parameters of the simulation system.

Table 1 .
Parameters of the simulation system.

Table 1 .
Parameters of the simulation system.

Table 2 .
Parameters of the test platform.

Table 2 .
Parameters of the test platform.

Table 2 .
Parameters of the test platform.