*3.5. Loads*

A three-phase squirrel-cage asynchronous machine 1.5 MVA, 600 V, 60 Hz in the *dq*-reference frame (as the industrial load), and a set of loads with the nominal power of 10 MW at 0.95 power factor (as the residential load) have been modeled as the loads' case study. This model can represent the impact of inductive loads on the microgrid. The residential load follows a specific profile with the assigned power factor during the day. Further, the industrial load has been controlled by the square relation between the mechanical torque and the rotor speed.

## *3.6. Power Transformers*

Two three-phase power transformers, a 20 MVA, 25kV/25kV, 60Hz transformer for the voltage regulation with Yg-Yg winding connections and a 20 MVA, 25kV/600V, 60 Hz step-down transformer with Yg-Yg winding connections have been modeled as a part of transmission systems for the power system.

#### *3.7. Power System Modeling*

As shown in Figure 3, a single-line diagram of a power system consisting of di fferent microgrids and PHEVs has been modeled, where the total peak load is 10.15 MW, and the total generated power is 19.5 MW. One of the contributions of this paper is to consider variable power loading levels for PHEVs, which lead to di fferent profiles for the charging stations. Five di fferent profiles have been assigned to PHEVs. Profile 1 is for vehicles with the possibility to be charged during the working hours. Profile 2 is for vehicles with the possibility to be charged during working hours but with a longer ride. Profile 3 is for vehicles with no possibility to be charged during the working hours. Profile 4 is for vehicles which are parked at home and charged during the whole day. Profile 5 is for vehicles that are charged during the night shift. In this case, the impact of charging on the power grid has been investigated. In order to di fferentiate between the SoC of the PHEVs and the stand-alone battery packs, di fferent charging and discharging cycles have been studied in this paper. The generator balances the power and load demand. The generator determines the frequency deviations of the grid at the rotor speed. By using transformers, the voltage level has been stepped-down to suitable voltage levels for the power grid. Table 2 shows the corresponding values of the control parameters for the charging station system in the power grid.

**Table 2.** Control parameters of the charging station.


It is well-known that the PHEV charging process highly depends upon the connection point to the power system. This means that by connecting the PHEV to a weak bus, more power drains from thegridandthevoltagedropincreases,andconsequently,ithasanegativeimpactonthepowergrid.

Two scenarios have been investigated in 24 h. The wind speed varies during the day and has multiple maximum and minimum values. The residential load consumption profile is similar to that of the real world. The demand is low during the day, increases to the peak value during the evening and night, and gradually decreases during the late night. Two events have significantly a ffected the grid frequency during the day: (1) event 1, which is the asynchronous machine (industrial load) start-up at *t* = *03:00 a.m.*, and (2) event 2, which is the wind farm outage at *t* = *10:00 p.m.*, when the wind speed exceeds the maximum speed. The case study has been simulated under two di fferent conditions for vehicles in regulation and charging modes.

#### **4. Results and Discussions**

The case study in this paper conducts the power profile (the generated and consumed power) as the bidirectional power flow during a 24-h. Contributions of the diesel generator and wind farm and the impact of PHEVs on the peak load reduction have been studied in this section. To study the

*Sustainability* **2019**, *11*, 4317

bidirectional power flow, the active and reactive power balance of the system have been determined as follows:

$$P\_{\mathcal{S},i} + P\_{\mathcal{W}\_{i,t}} + P\_{L\_{i,t}} - P\_{s,i,\mathcal{c}} + P\_{s,i,\text{disc}} - \sum\_{j} [\frac{V\_{i,t}V\_{i,t}}{Z\_{ij}} \cos \theta\_{ij} + \frac{V\_{i,t}V\_{j,t}}{Z\_{ij}} \cos(\theta\_i - \theta\_j + \theta\_{ij})] = 0 \tag{22}$$

$$\mathcal{Q}\_{\mathcal{S}\_{i,t}} - \mathcal{Q}\_{L\_{i,t}} - \sum\_{j} [\frac{V\_{i,t} V\_{i,t}}{Z\_{ij}} \sin \theta\_{ij} + \frac{V\_{i,t} V\_{j,t}}{Z\_{ij}} \sin(\theta\_i - \theta\_j + \theta\_{ij})] = 0 \tag{23}$$

subject to:

$$\frac{V\_{i,t}V\_{j,t}}{Z\_{i\text{j}}}\cos(\theta\_{i,t}-\theta\_{j,t}+\theta\_{i\text{j},t}) - \frac{V\_{i,t}V\_{j,t}}{Z\_{i\text{j}}}\cos\theta\_{i\text{j},t} \le P\_{i\text{j,max}}\tag{24}$$

$$\frac{V\_{i,t}V\_{j,t}}{Z\_{i\text{j}}}\sin(\theta\_{i,t}-\theta\_{j,t}+\theta\_{i\text{j},t})-\frac{V\_{i,t}V\_{j,t}}{Z\_{i\text{j}}}\sin\theta\_{i\text{j},t}\le Q\_{i\text{j},\text{max}}\tag{25}$$

where indices *i*, *j*, *s*, and *t* refer to the bus *i*, bus *j*, the *s*th energy storage system, and the *t*th time interval. *Pgi*,*<sup>t</sup>* , *Pwi*,*<sup>t</sup>* , *PLi*,*<sup>t</sup>* , *Qgi*,*<sup>t</sup>* and *QLi*,*<sup>t</sup>* show the active power generated by the non-renewable energy source, the active power generated by the wind farm, the active power consumed by the load, the reactive power generated by the non-renewable energy source, and the reactive power consumed by the load at the *i*th bus in the *t*th time interval, respectively. Further, *V*, θ, and *Z* indicate the voltage magnitude, and angle, and the impedance of the bus, respectively. *Pij*,*max* and *Qij*,*max* are the maximum allowable active and reactive power that can be transferred between the buses, respectively.

#### *4.1. V2G Mode is Deactivated*

Based on the results of the simulation for *86,400 sec.* (24 h), which is shown in Figure 14, when the V2G system is not under operation, due to the defined scenarios during two different time intervals, one at *t* = *03:00 a.m.* (*10,800 sec.*) and the second one at *t* = *10:00 p.m.* (*79,200 sec.*), the industrial load bus voltage shows a significant change. Due to the first event, the voltage at all buses changes. Based on the nature of the load profile, the industrial load is not under operation before the third hour (the output power is 0 MVA), and the residential load reaches its minimum value (5.446 MVA), because of less usage of the normal resistive and inductive loads, such as lightings, refrigerators, etc. Therefore, the amount of current, and consequently, the drained power from the grid is not significant. At *t* = *10,800 sec.*, the industrial load starts up, and the power flow in the grid changes. The voltage at the industrial load bus drops, and the current increases drastically (from 0 to 2184 A). Hence, 445.3 kW power is extracted as the power losses due to this event, and accordingly, this power is supplied by the diesel generator and wind farm. The total load demand at that time reaches 7.235 MVA, and the power grid supplies the load through the amount of generated power by the two microgrids, where the generation contributions of the diesel generator and wind farm are 5.328 MVA and 2.446 MVA, respectively. Thus, the total generated power is derived as 7.774 MVA, which is more than the total load demand. It should be noted that when the V2G mode is deactivated, by increasing or decreasing the corresponding values of the controller's gains (*K*1 and *K*2), the SoC of the batteries of PHEVs in the charge mode does not change.

*Sustainability* **2019**, *11*, 4317

**Figure 14.** Voltage, current, the apparent power, active power and reactive power curves of (**a**) the diesel generator, (**b**) wind farm, (**c**) residential load, and (**d**) industrial load during 24 h when the V2G system is not under operation.

As shown in Figure 15, the total load consumption increases from 6.0980 MVA at *05:00 a.m.* (*21,600 sec.*) to 8.1800 MVA at *10:00 p.m.* (*79,200 sec.*). Based on the results of the simulation, the diesel generator and wind farm successfully supply the load demand, even during the contingency. The transient time related to the voltage regulation at each bus is minimized by proper operating of the controllers. This is achieved by defining the power flow constraints (Equations 24 and 25) for the power grid. When the wind farm has less generation or is not under operation for a certain period of the time, the diesel generator acts as a fast-response power supply to supply the load without interruption. Table 3 shows the power flow of the power grid during the entire day.

**Figure 15.** Total generated and consumed power curves in 24 h when the V2G system is not under operation.


**Table 3.** Power flow results when the V2G system is not under operation.

Note: All the values are in MVA and have been rounded to the closest number.

Figure 16 shows the dynamic behavior of the converter station during the simulation time. As long as the breaker of the converter station is open and the V2G system is not under operation, the power consumption by the converter station is completely insignificant. However, the station detects the two events during the simulation time. It should be noted that the consumed power by the converter station is considered as the power losses in Table 3. As shown in Figure 16, in the regulation and charge modes, the consumed power by the converter station is close to zero.

**Figure 16.** Voltage, current, the apparent power, active power, and reactive power curves of the converter station in (**a**) the charge mode and (**b**) the regulation mode in 24 h when the V2G system is not under operation.

#### *4.2. V2G Mode is Activated*

When the V2G mode is activated, the operating impact of the V2G system changes the power flow of the grid. Theoretically, it is expected that when the V2G system is under operation, more power is supposed to be drained from the power grid. The more power consumed by the converter station, the greater the power required from the diesel generator and wind farm. Unlike the previous mode that the V2G mode was deactivated, the di fferent car profiles change the total load profile. Therefore, the peak load is expected to be more than the previous operating mode. Figure 17 shows the results of the simulation in the V2G system operation.

Unexpected events (contingency and/or outage) in the power system lead to a change in the voltage and frequency. Heavy load or generator outages can be considered as such changes that influence the voltage and frequency variations. As shown in Figure 18, based on the two defined scenarios, at *t* = *10,800 sec.*, the industrial load starts up and drains power from the generation buses. The total generated power should satisfy the total load demand, including the cars in profiles 4 and 5. Due to the sudden changes in the power, the converter station detects the voltage and frequency variations, and the controllers switch to the regulation mode and contribute to the grid regulation, as shown in Figure 18. However, the voltage curve in both charge and regulation modes fluctuates around its nominal value, the frequency deviations related to the power changes after the contingency are more visible. Due to rapid fluctuations in the voltage of the power supply or loads, a momentary flicker can also be observed in the power system. The designed system attempts to mitigate and eliminate this momentary flicker by regulating (or stabilizing) the voltage.

**Figure 17.** Voltage, current, the apparent power, active power, and reactive power curves of (**a**) the diesel generator, (**b**) wind farm, (**c**) residential load, and (**d**) industrial load during 24 h when the V2G system is under operation.

**Figure 18.** Voltage, current, the apparent power, active power, and reactive power curves of the converter station in (**a**) the charge mode and (**b**) the regulation mode in 24 h when the V2G system is under operation.

According to the descriptions of the car profiles in Section 3.7, the behavior of the SoC varies based on the car profile. Figure 19 illustrates the SoC of the di fferent car profiles during the day, when the V2G system is under operation. When the second scenario occurs at *t* = *79,200 sec.*, the level of the generated power is reduced significantly. Consequently, PHEVs switch to the regulation mode to contribute to the voltage and frequency regulation and restore the system to its previous condition. Because the cars in profile 4 are connected to the grid for the entire day, their contributions to the grid

regulation are more severe. Also, due to the grid mode controller settings, a gradual increase in the SoC is expected. Due to the fact that the wind farm outage decreases the level of generated power, the system can reach a critical condition without utilizing proper control systems.

It is observed that when the V2G mode is activated, by decreasing *K*1, the SoC of the batteries decreases very slightly during the simulation time. By increasing *K*1, the SoC of the cars in profile 4 increases from 90.0 to 90.6. Decreasing *K*2 causes an inverse trend in the SoC variations. This means that the SoC of the cars in profile 4 increases, and then, gradually decreases. By increasing *K*2, the SoC of the batteries of the cars in profile 4 moderately decreases during the simulation time. It should be noted that the minimum level of the SoC is 10%.

**Figure 19.** SoC of the different car profiles in 24 h when the V2G system is under operation.

Figure 20 illustrates the total generated and consumed power curves when the V2G system is under operation. As shown in this figure, the total load demand varies throughout the day and is met by the dispatchable generation unit. The generation units adjust operations to follow the load pattern. When the V2G system is not under operation, there is only one peak point during the entire simulation time. However, when the V2G mode is activated, the number of peak points is increased due to the different car profiles. The peak points are met when the number of car-users is increased, and the generation units are forced to generate more power. The maximum peak point has been detected between *t* = *17:00* and *t* = *18:00*, because cars in profiles 1, 3, 4, and 5 are all in the charging mode. Although the wind farm has been under operation, the diesel generator has been operated close to its maximum capacity. The total power at *t* = *10,800 sec.* has reached its first peak point of 8.107 MVA as the generated power, and 7.435 MVA as the total load demand. The loads have met the minimum value of 5.616 MVA at *t* = *14,400 sec*. where the generated power has been 6.062 MVA. Between *t* = *14,400 sec.* and *t* = *16,550 sec.*, the total load demand has increased to 6.303 MVA (due to the different charging profiles), and the generation units have followed the load profile, and have generated 6.831 MVA. Over time, the total load level has shown an overall increasing trend and increased from 6.100 MVA at *t* = *18,800 sec.* to 6.317 MVA at *t* = *21,600 sec.* and 8.071 MVA at *t* = *28,800 sec.*, where the total generated power has reached 6.766 MVA, 6.802 MVA, 8.771 MVA, respectively. The power grid has experienced the second increase between *t* = *28,800 sec.* and *t* = *30.160 sec.* in which more cars have been in the charging mode. During this time interval, the total load demand has increased from 9.916 MVA to 10.200 MVA, and the generated power has been 10.680 MVA and 11.020 MVA, respectively. The same trend has been observed between *t* = *30,940 sec.* and *t* = *64,800 sec.* in which the number of PHEVs in charge has been increased. The demand has changed from 8.591 MVA to 10.270 MVA, and correspondingly, the generated power has varied from 9.365 MVA to 11.440 MVA, respectively. At the third peak point, the generated power has reached its maximum capacity where approximately the total load demand has been 12.650 MVA. From *t* = *66.200 sec.* to *t* = *79,200 sec.*, both the total load demand and generated power have decreased, but in general, their corresponding values have remained at a high level. At *t* = *79,200 sec.*, the power grid has lost 4.5 MW active power due to the outage of the wind farm and accordingly, there has been an intensive drop in the generated power, and the load demand has been more than the generated power. This could interrupt the power flow, and there has been this need to use an auxiliary system, such as the V2G system to restore power. As shown in Figure 20, PHEVs have supported the grid and contributed to the voltage and frequency regulation, and also the robustness of the proposed control system has been illustrated. The decreasing trend in both the generated power and total load demand has continued until the load level has decreased.

**Figure 20.** Total generated and consumed power curves in 24 h when the V2G system is under operation.
