Modeling and Analysis of a DC Electrical System and Controllers for Implementation of a Grid-Interactive Building

As the penetration of photovoltaic (PV) systems on building rooftops increases, the accumulated effect of the rooftop PV power outputs on electric network operation is no longer negligible. Energy storage resources (ESRs) have been used to smooth PV power outputs, particularly when building load becomes low. In commercial buildings, the batteries of plug-in electric vehicles (PEVs) can be regarded as distributed ESRs. This paper proposes a DC electrical system in a commercial building that enables PEVs to compensate for rooftop PV power fluctuation and participate in tracking signals for grid frequency regulation (GFR). The proposed building system and associated controllers are modeled considering steady-state and dynamic operations of the PV system and PEV batteries. Simulation case studies are conducted to demonstrate the performance of the proposed building system under various conditions, determined by such factors as the maximum voltage, minimum state-of-charge, and desired charging end-time of PEVs batteries.


Introduction
As the penetration of renewable energy sources (RESs) has been growing continuously, it becomes more difficult to maintain real-time balance between power generation and load demand and consequently to regulate grid frequency within an acceptable range [1].In particular, small-and medium-sized photovoltaic (PV) systems have continued to be installed on rooftops of residential or commercial buildings and provide power to electric networks particularly when building load becomes low.In distribution networks, the accumulated power output of rooftop PV systems is no longer negligible [2,3].For reliable operation of traditional distribution networks, grid operators have devised regulations that require the maximum capacity of rooftop PV systems to be limited below minimum demand of building load, for example, in the United States [4] and South Korea [5,6].Specifically, it was reported in [4] that a 300-kW PV system was installed on the rooftop of a convention center, located in Boulder, Colorado.For the installation of the PV system, dynamic inverters were installed to reduce the PV energy output particularly when the convention center cannot consume the PV energy.Therefore, to further increase the maximum capacity of rooftop PV systems, energy storage resources (ESRs) are often connected to AC or DC electrical systems in buildings.
In the meantime, based on the average short driving distance of a vehicle, it is predicted that many plug-in electric vehicles (PEVs) spend most of time in parking lots while being plugged into an electric system of a commercial building.With proper implementation of battery chargers, PEVs can then act as behind-the-meter batteries that compensate for excess, intermittent power output of PV systems.Batteries have fast dynamic response suitable for high frequency and high power cycling operation.The lifetime degradation of PEV batteries is mainly affected by deep depth of discharge encountered while driving, rather than small swings of state of charge (SOC) [7,8].Therefore, PEVs enable cost-effective compensation for intermittent output power of PV systems or random variations in load demand [9,10].It implies that commercial buildings become important aggregators of PV systems and PEV batteries, which can coordinate with a central load dispatching center or local control centers to improve operational stability of AC networks [10].
In regard to a building electrical system, it is shown in [11] that DC-DC converters have the advantage of achieving higher efficiency of power conversion than AC-DC inverters.This makes a strong argument for investigating the benefits of directly coupling DC power sources with DC energy storage resources: for example, PV systems and PEVs, respectively.In addition, Table 1 shows a general comparison of the energy densities of PV generators and PEV batteries, which implies that PEV batteries can be significantly recharged for commuting by PV systems.The comparison supports the application of PV systems to PEV charging.Therefore, this paper presents a DC electrical system in a commercial building that includes a rooftop PV generator and multiple PEVs.The proposed system structure and control scheme enable the power fluctuation of the rooftop PV generator to be mitigated or hidden from grid operators.Furthermore, individual PEV batteries are capable of being charged or discharged with different input or output power under various conditions, determined by such factors as initial SOC levels and the limitations on maximum voltage and minimum SOC.The proposed electrical system also can allow the building to act as an intermediate aggregator of the PEVs and actively participate in the ancillary service provision for grid frequency regulation (GFR) in an isolated power system.It should be noted that for analysis in time scales of seconds, averaged-circuit dynamic models or steady-state operating equations of power electronic devices and controllers have been adopted in this paper.Simulation case studies are then performed in MATLAB/SIMULINK (R2011b) to analyze the operation of the proposed building system.→ PEV battery energy density per unit area 1 : 0.542 kWh/m 2 . 1 Assuming that its initial SOC level is set to 20%.
In previous papers, several DC electrical systems have been proposed particularly for residential buildings.For example, the structure and operation of DC nanogrid were introduced in [3] to implement sustainable home where one PV generator and one PEV were included.The main concern in [3] was to improve the transient response of the PEV converter to disturbance and consequently stabilize the DC link voltage by using a droop-control scheme.In addition, controlling the input power of PEV batteries has been widely studied to provide ancillary services to AC or DC microgrids and distribution networks.For example, the response of PEVs to frequency control signals was investigated in [16][17][18][19][20][21][22][23][24][25].Specifically, a proportional controller and a high-pass filter were used to adjust the PEV input power in [16,17], respectively, to reduce the battery power capacity required for a stabilized frequency control.A participation factor of PEVs was also determined using statistical data, to reflect their aggregated dynamic response in PFC [18].In [19], PEVs responded to PFC signals mainly via vehicle-to-grid (V2G) methods.V2G control was further investigated for ancillary service provision and cost-effective battery energy management [20].In [21,22], the V2G control was applied to support frequency control, considering the battery charging demand.The charging-rate control of PEVs was studied to coordinate with PEV agent policies [23].Sophisticated frequency control schemes for PEVs have been further reported to improve frequency stability, for example, by using fuzzy logic or distributed data acquisition [24,25].
However, the aforementioned papers analyzed the effects of PEVs without consideration of the batter voltage variations and the electrical systems of residential or commercial buildings, where the PEVs are expected to be parked for most of the day.The co-operation of individual, small-scale PEV batteries still needs to be comprehensively considered to enable the building electrical system to act as a large-scale grid-interactive ESR, which can be better controlled under the supervision of an independent system operator (ISO).In fact, as the penetration of behind-the-meter ESRs continues to increase, ISOs will encounter difficulties in simultaneously controlling a number of small-scale ESRs [26].A new type of electrical system in a building, as well as building-level and device-level controllers, will be necessary to achieve reliable ancillary service provision of behind-the-meter ESRs.Therefore, the main contributions of this paper are as follows:

•
Unlike the previous papers [16][17][18][19][20][21][22][23][24][25], this paper has comprehensively modeled a DC electrical system for use in a commercial building, where the PEVs, PV systems, and DC loads are coordinated to improve the electricity grid operation under various conditions, characterized by the physical characteristics of the DC components.

•
Compared to the building system in [27], the proposed electrical system has the advantages of: (1) directly charging PEV batteries with PV output power, which results in a decrease in power conversion loss; (2) reducing the requirements of communications systems between an ISO and individual PEV owners; and (3) easily including additional DC sources, ESRs, and loads.

•
Few papers have included building-level controllers for the input power control of PEV chargers.In this paper, the coordination of the building-and device-level controllers, including the PEV charger controllers, has been developed such that the commercial building can act as an intermediate aggregator between an ISO and multiple PEV owners and, consequently, operate as a large-scale stationary ESR, particularly from the viewpoint of the ISO.The coordination also enables the building electrical system to effectively hide the rooftop PV power fluctuation from the ISO.

•
The new control scheme of PEV chargers has been developed in this paper.The controller enables the power input of the building electrical system to successfully follow the reference input while not leading to the overvoltages of PEV batteries.In addition, even when PEV battery voltages are close to the maximum limits, the control scheme enables the power input to gradually change from the reference input, which prevents sudden variations in the power outputs of conventional generators.
This paper is organized as follows: Section 2 describes the individual power devices and corresponding controllers; Section 3 explains the building-and device-level controllers; Section 4 describes the results of simulation case studies; and Section 5 provides conclusions.It should be noted that, in this paper, well-known models of the power devices and controllers are adopted to demonstrate the feasibility of the proposed building system.The models are briefly reviewed in Section 2 to explain the configuration of the proposed building system and the coordinated scheme of the building-and device-level controllers, which are the main focus in this paper.In addition, note that designing optimal pricing schemes (e.g., [28][29][30][31][32][33]) to reward the contributions of the proposed grid-interactive building is beyond the scope of this paper.

Modeling of the Proposed DC Electrical System in a Commercial Building
A new electrical system configuration inside a commercial building, as well as its building-level and device-level controllers, is developed to address the practical difficulties in the implementation of grid-interactive buildings, which result from not only the limited battery power and energy capacities of individual PEVs but also an increase in their penetration.Specifically, the proposed electrical system consists mainly of three devices: for example, an AC-DC bidirectional converter, a rooftop PV generator, and PEV batteries, which are connected to a common DC link in parallel.The proposed system structure and control scheme have been generalized such that additional PV generators, PEVs batteries, and controllable or uncontrollable building loads can be easily included.
As shown in Figure 1, the AC-DC converter acts as an interface between the AC distribution network and the DC electrical system in a building, which enables the commercial building to act as a large-scale inverter-interfaced ESR, as well as an intermediate aggregator, under the control of central or local dispatching centers.It is well known that behind-the-meter ESRs have the huge potential to provide various ancillary services (e.g., grid frequency/voltage regulation and spinning reserve provision) to AC networks.However, as the penetration of behind-the-meter ESRs continues to increase, it is expected that an ISO will encounter difficulties in simultaneously controlling a number of small-scale ESRs in buildings, which are usually distributed over a wide range of location.These may be with respect to the number of communication links required, the integration of the various communication protocols, or the real-time processing of transferred data [26,34,35].As an intermediate aggregator, the proposed building system can be effectively used to mitigate the requirements of ISO's communications systems.
Energies 2017, 10, 427 4 of 21 proposed system structure and control scheme have been generalized such that additional PV generators, PEVs batteries, and controllable or uncontrollable building loads can be easily included.As shown in Figure 1, the AC-DC converter acts as an interface between the AC distribution network and the DC electrical system in a building, which enables the commercial building to act as a large-scale inverter-interfaced ESR, as well as an intermediate aggregator, under the control of central or local dispatching centers.It is well known that behind-the-meter ESRs have the huge potential to provide various ancillary services (e.g., grid frequency/voltage regulation and spinning reserve provision) to AC networks.However, as the penetration of behind-the-meter ESRs continues to increase, it is expected that an ISO will encounter difficulties in simultaneously controlling a number of small-scale ESRs in buildings, which are usually distributed over a wide range of location.These may be with respect to the number of communication links required, the integration of the various communication protocols, or the real-time processing of transferred data [26,34,35].As an intermediate aggregator, the proposed building system can be effectively used to mitigate the requirements of ISO's communications systems.In addition, the proposed building system can resolve the issues (e.g., power conversion loss and electrical system complexity) resulting from the current "DC-AC" route: for example, from DC sources or loads to AC distribution grid via small, individual AC-DC converters.The potential of multi-terminal DC electrical systems was investigated in [11,36] to improve energy conversion efficiency in residential and commercial buildings.For example, data centers often include a number of servers, which inherently operate on DC and require an uninterruptible power supply in the form of energy storage resources that also operate on DC [36].The proposed DC system can be easily adopted for data centers, which will significantly reduce the power conversion loss resulting from the operation of a number of servers.In [37,38], advanced (e.g., peer-to-peer) communication technologies have been studied to make multi-terminal DC systems more robust and practical particularly in coordination with DC microgrids; however, it is not further discussed in this paper for brevity.

AC-DC Bidirectional Converter and Rooftop PV System
Figure 2 presents an averaged-circuit dynamic model of the AC-DC converter and its duty ratio controller.The converter is capable of not only rectifying the AC power for the PEV battery charging but also delivering the DC power from the PV generator and PEV batteries in a V2G mode to the AC In addition, the proposed building system can resolve the issues (e.g., power conversion loss and electrical system complexity) resulting from the current "DC-AC" route: for example, from DC sources or loads to AC distribution grid via small, individual AC-DC converters.The potential of multi-terminal DC electrical systems was investigated in [11,36] to improve energy conversion efficiency in residential and commercial buildings.For example, data centers often include a number of servers, which inherently operate on DC and require an uninterruptible power supply in the form of energy storage resources that also operate on DC [36].The proposed DC system can be easily adopted for data centers, which will significantly reduce the power conversion loss resulting from the operation of a number of servers.In [37,38], advanced (e.g., peer-to-peer) communication technologies have been studied to make multi-terminal DC systems more robust and practical particularly in coordination with DC microgrids; however, it is not further discussed in this paper for brevity.

AC-DC Bidirectional Converter and Rooftop PV System
Figure 2 presents an averaged-circuit dynamic model of the AC-DC converter and its duty ratio controller.The converter is capable of not only rectifying the AC power for the PEV battery charging but also delivering the DC power from the PV generator and PEV batteries in a V2G mode to the AC network [39,40].Specifically, as shown in Figure 2b, the d-axis current reference i d_ref is generated from the PI controller to maintain the DC link voltage V DC as constant, whereas the q-axis current reference i q_ref is adjusted to regulate the reactive power Q inv and consequently the power factor at the input port of the inverter.The duty ratios d d and d q are then determined using the current references, as shown in Equation (1) where the term 3ωL/V DCref is added to reduce the cross-coupling between the dq-axis currents i d and i q .This enables the currents to be independently controlled to regulate V dc and Q inv , respectively.In particular, perfect decoupling is achieved in steady state when V DC is equal to V DCref at a specified line frequency.To complete the converter modeling, Equations ( 2) and ( 3) are considered based on the averaged-circuit model shown in Figure 2b.For simplicity, it is assumed in this paper that the converter operates with unity power factor (i.e., Q inv = 0) and the AC distribution network is three-phase balanced.
Energies 2017, 10, 427 5 of 21 network [39,40].Specifically, as shown in Figure 2b, the d-axis current reference id_ref is generated from the PI controller to maintain the DC link voltage VDC as constant, whereas the q-axis current reference iq_ref is adjusted to regulate the reactive power Qinv and consequently the power factor at the input port of the inverter.The duty ratios dd and dq are then determined using the current references, as shown in Equation ( 1) where the term 3ωL/VDCref is added to reduce the cross-coupling between the dq-axis currents id and iq.This enables the currents to be independently controlled to regulate Vdc and Qinv, respectively.In particular, perfect decoupling is achieved in steady state when VDC is equal to VDCref at a specified line frequency.To complete the converter modeling, Equations ( 2) and ( 3) are considered based on the averaged-circuit model shown in Figure 2b.For simplicity, it is assumed in this paper that the converter operates with unity power factor (i.e., Qinv = 0) and the AC distribution network is three-phase balanced.
(a) (b) ( ) ( ) ( ) In addition, the PV system is modeled as a parallel connection of series-wired PV modules, one of which can be represented using a controlled current source as shown in Figure 3a.The Ipvm-Vpvm characteristic equations of the PV module are presented in [41,42].The PV system is connected in parallel to the common DC link through a DC-DC boost converter.Although a comprehensive (e.g., switch-level) model of the converter can be adopted, the simple, steady-state model considering power conversion loss [43] is still appropriate for the analysis in the time horizon focused on in this paper, as discussed in Section 4. Figure 3b then shows the incremental conductance method [44], which is adopted to control the duty ratio of the DC-DC converter for the maximum power point tracking (MPPT).In this paper, the incremental duty ratio is differently determined according to the slopes for the left and right side of the PPV-VPV curve.
In addition, the PV system is modeled as a parallel connection of series-wired PV modules, one of which can be represented using a controlled current source as shown in Figure 3a.The I pvm -V pvm characteristic equations of the PV module are presented in [41,42].The PV system is connected in parallel to the common DC link through a DC-DC boost converter.Although a comprehensive (e.g., switch-level) model of the converter can be adopted, the simple, steady-state model considering power conversion loss [43] is still appropriate for the analysis in the time horizon focused on in this paper, as discussed in Section 4. Figure 3b then shows the incremental conductance method [44], which is adopted to control the duty ratio of the DC-DC converter for the maximum power point tracking (MPPT).In this paper, the incremental duty ratio is differently determined according to the slopes for the left and right side of the P PV -V PV curve.

PEV Battery and DC-DC Buckboost Converte
where ).3600 In this paper, the PEVs are used to compensate for the fluctuation of the PV power output and the rapidly-varying component of the GFR signal.Several battery models were provided in [42,45,46] with similar characteristics.In particular, as shown in Figure 4, a voltage source was adopted and controlled by Equations ( 4)-( 6) [46].The parameters used in Equations ( 4) and ( 5) were extracted from a battery manufacturer datasheet to calculate the SOC and voltage corresponding to timevarying charging or discharging current.
The voltage-source model of the PEV battery was then compared with the experimental battery model in [45], particularly with respect to the discharging curves, as shown in Figure 5. Specifically, Figure 5 shows a decrease in the internal voltage of the battery cell for a decrease in the normalized SOC level (i.e., from 1 to 0).The red line and blue dotted line represent the discharging curves obtained from Equations ( 4)-( 6) and from [45], respectively.In [45], the comprehensive experimental study was conducted to propose the electrical circuit model of a polymer Li-ion battery and extract its parameter values.Therefore, the discharging curves can be applied to the same type of Li-ion batteries.Note that in Figure 5, a battery cell was considered with the maximum voltage of approximately 4.1 V, whereas in Section 4, PEV battery packs were considered with the maximum voltage of 393 V and the rated capacities of 16 kWh, 18 kWh, and 20 kWh [47,48].

PEV Battery and DC-DC Buckboost Converte
(b) Charging (I EV > 0) where In this paper, the PEVs are used to compensate for the fluctuation of the PV power output and the rapidly-varying component of the GFR signal.Several battery models were provided in [42,45,46] with similar characteristics.In particular, as shown in Figure 4, a voltage source was adopted and controlled by Equations ( 4)-( 6) [46].The parameters used in Equations ( 4) and ( 5) were extracted from a battery manufacturer datasheet to calculate the SOC and voltage corresponding to time-varying charging or discharging current.
The voltage-source model of the PEV battery was then compared with the experimental battery model in [45], particularly with respect to the discharging curves, as shown in Figure 5. Specifically, Figure 5 shows a decrease in the internal voltage of the battery cell for a decrease in the normalized SOC level (i.e., from 1 to 0).The red line and blue dotted line represent the discharging curves obtained from Equations ( 4)-( 6) and from [45], respectively.In [45], the comprehensive experimental study was conducted to propose the electrical circuit model of a polymer Li-ion battery and extract its parameter values.Therefore, the discharging curves can be applied to the same type of Li-ion batteries.Note that in Figure 5, a battery cell was considered with the maximum voltage of approximately 4.1 V, whereas in Section 4, PEV battery packs were considered with the maximum voltage of 393 V and the rated capacities of 16 kWh, 18 kWh, and 20 kWh [47,48].The PEV battery is charged or discharged according to the direction of the current flowing through the DC-DC converter.In this paper, the converter operates in the buck mode when charging and in the boost mode when discharging the battery.The PEV charger is mathematically modeled as Equations ( 7) and ( 8) using the circuit topology shown in Figure 4.Note that the PEV charger is connected to the common DC link in parallel with other PEV chargers in the proposed DC electrical system._ , , The internal resistance of the battery often causes overvoltage before the battery is fully recharged, unless the charging current is reduced.To prevent the overvoltage, the constant-current and constant-voltage (CC-CV) controller was discussed in [49,50].Unlike the conventional CC-CV controller, a variable-current and constant-voltage (VC-CV) charging scheme has been developed in this paper, as shown in Figure 4b, to both prevent the overvoltage and allow the bidirectional flow of time-varying input current.Specifically, for the actual voltage VEV lower than the maximum voltage VEV_max, the output value of the PI1 controller is fixed to 1, such that the battery input power can follow the reference power given from the building or grid operators.When VEV increases to VEV_max, the charging current IEV starts decreasing.Therefore, the VC-CV controllers enable the PEV batteries to be continuously charged to the maximum limit of SOC without the overvoltage problem, while    The PEV battery is charged or discharged according to the direction of the current flowing through the DC-DC converter.In this paper, the converter operates in the buck mode when charging and in the boost mode when discharging the battery.The PEV charger is mathematically modeled as Equations ( 7) and ( 8) using the circuit topology shown in Figure 4.Note that the PEV charger is connected to the common DC link in parallel with other PEV chargers in the proposed DC electrical system._ , , The internal resistance of the battery often causes overvoltage before the battery is fully recharged, unless the charging current is reduced.To prevent the overvoltage, the constant-current and constant-voltage (CC-CV) controller was discussed in [49,50].Unlike the conventional CC-CV controller, a variable-current and constant-voltage (VC-CV) charging scheme has been developed in this paper, as shown in Figure 4b, to both prevent the overvoltage and allow the bidirectional flow of time-varying input current.Specifically, for the actual voltage VEV lower than the maximum voltage VEV_max, the output value of the PI1 controller is fixed to 1, such that the battery input power can follow the reference power given from the building or grid operators.When VEV increases to VEV_max, the charging current IEV starts decreasing.Therefore, the VC-CV controllers enable the PEV batteries to be continuously charged to the maximum limit of SOC without the overvoltage problem, while The PEV battery is charged or discharged according to the direction of the current flowing through the DC-DC converter.In this paper, the converter operates in the buck mode when charging and in the boost mode when discharging the battery.The PEV charger is mathematically modeled as Equations ( 7) and ( 8) using the circuit topology shown in Figure 4.Note that the PEV charger is connected to the common DC link in parallel with other PEV chargers in the proposed DC electrical system.
where I EV > 0 and D EV = d for charging, and I EV < 0 and D EV = 1 − d for discharging.
The internal resistance of the battery often causes overvoltage before the battery is fully recharged, unless the charging current is reduced.To prevent the overvoltage, the constant-current and constant-voltage (CC-CV) controller was discussed in [49,50].Unlike the conventional CC-CV controller, a variable-current and constant-voltage (VC-CV) charging scheme has been developed in this paper, as shown in Figure 4b, to both prevent the overvoltage and allow the bidirectional flow of time-varying input current.Specifically, for the actual voltage V EV lower than the maximum voltage V EV_max , the output value of the PI 1 controller is fixed to 1, such that the battery input power can follow the reference power given from the building or grid operators.When V EV increases to V EV_max , the charging current I EV starts decreasing.Therefore, the VC-CV controllers enable the PEV batteries to be continuously charged to the maximum limit of SOC without the overvoltage problem, while compensating for the PV output power and the GFR signal.The VC-CV controllers are coordinated with the building-level controllers, which enables the commercial building including small-scale PEV batteries to act as a large-scale ESR, as discussed in Section 3.2.

Coordination between Building-and Device-Level Controllers
3.1.Building Power Controller (BPC) and PEV Power Distributor (PPD) Figure 6 presents a simplified schematic diagram of the proposed DC electrical system in a commercial building that includes the AC-DC bidirectional converter, rooftop PV generator, PEV batteries, and DC building loads.Note that the building system still includes AC loads, as shown in Figure 1.Each device has its own controller, as discussed in Section 2.Moreover, the proposed DC electrical system has building-level controllers to adjust and distribute the total power reference to each PEV based on its battery conditions.Specifically, the Building Power Controller (BPC) adjusts the power flowing into or from the DC electrical system, given the state of the PEV batteries.The BPC determines the reference P EV_ref of the total charging/discharging power of the batteries, considering the power reference P b_ref given from the grid operator and the output power P PV of the rooftop PV system.For example, the BPC decreases P EV_ref when the internal voltage V EV of all the PEV batteries increase to the maximum limit V EV_max .Consequently, the input power P b of the AC/DC converter is reduced autonomously but slowly, which allows a grid operator to change the power outputs of conventional thermal generators without imposing significant mechanical stress in a transient state.Although P b does not follow P b_ref , the proposed DC electrical system still enables the PEV batteries to compensate for the short-term fluctuation of P PV , as well as the high-frequency component of P b_ref .Therefore, it is expected that the frequency deviation is still reduced in the AC network including a number of the grid-interactive buildings.Note that the BPC does not decrease P EV_ref when P PV decreases more than the total amount of the battery input power that has to be reduced by the VC-CV controllers.Furthermore, at least one PEV has V EV lower than V EV_max , the BPC allows the DC electrical system to control P b to follow P b_ref again.
Another building-level controller developed in this paper is the PEV Power Distributor (PPD), which enables the grid operator or, more likely, building owner to assign different charging power references to individual PEVs particularly when the PEV batteries can be sufficiently charged by the controllable input power P b of the building and the intermittent output power P PV of the rooftop PV system.Specifically, it has been assumed in this paper that the grid operator or building owner determines the references based on the initial SOC level SOC init and desired charging end-time t d , as shown in Equation ( 9), to ensure the sufficient SOC levels after t m d .
where m is the index of the PEV and M is the total number of the PEVs that participate in the PV output power compensation and grid frequency regulation.Consequently, r m represents the relative priority of a PEV in determining charging or discharging power.It should be noted that the grid operator or building owner may determine the initial values of r m differently, which allows some PEV batteries to get more involved in the ancillary service provision than other batteries.As the PEV batteries continue to be charged, r m will be automatically adjusted depending on the battery conditions, which are characterized by the maximum voltage limit V EV_max and minimum SOC limit SOC min ; it has been comprehensively explained in Section 3.2.Different values of r m do not significantly affect the proposed operation of the building electrical system and controllers.If PEV owners do not want to compensate for the PV power fluctuation or participate in the ancillary service provision, they will determine the PEV power inputs on their own.Such PEV owners are equivalent to conventional building loads, which can be modeled as the ZIP loads shown in Figure 6.In addition, when V EV of PEV m increases to V EV_max , the VC-CV controller reduces its input power.The PPD then distributes the surplus power to other PEVs for n = m based on their initial ratios r n =m , so as to enable the total building input to continuously follow P b_ref .Note that the desired and actual charging end-time of the PEV batteries may differ mainly because of intermittent P PV .For the discharging mode of the PEV batteries, the overall operations of the BPC and PPD are similar with those for the charging mode discussed above.The difference is that the PPD decreases the ratio r m of the PEV m to 0 when its SOC decreases to SOC min .When r m of all PEVs become equal to 0, the BPC allows P PV to flow to the AC distribution grid through the AC-DC bidirectional converter, so as to maintain the power balance in the DC link.

Overall Operation of the Proposed DC Electrical System in a Commercial Building
The coordination between the device-and building-level controllers enables the building electrical system to successfully respond to the time-varying input power reference P b_ref , while maintaining the energy balance in the DC link.Specifically, the complete set of operations of the BPC and PPD are summarized in Tables 2 and 3, where L is the number of the PEVs available for energy storage (i.e., V EV < V EV_max and SOC > SOC min ), and j and k are the indices of the PEVs L and (M-L), respectively.In addition, the surplus power in the DC electrical system P sur is given by  In Equation ( 10), P sur is equal to 0 where V EV of all PEVs are maintained equal to or lower than V EV_max .

PEV Conditions Input Power P b of the Building Electrical System
As shown in Figure 6, the BPC includes the Logic 1 block, which activates the signals of Reset and SW sel for the conditions of (B)-3 (or (C)-2) and (C)-1 in Table 2, respectively.The Logic 2 block prevents the fluctuation in P b , which results from the intermittent P PV , particularly when V EV of all PEVs are close to V EV_max .Therefore, P b changes to P b_ref for |P b_ref -P b | ≤ ∆P, which was set to 760 W in this paper, as explained in Table 2 for the condition of (B)-3.Figure 7 shows the specific schematic diagrams of the Logic 1 and Logic 2 , which were implemented using MATLAB/SIMULINK (R2011b).In the PPD, the initial values of the ratios r m are calculated using Equation (11) in advance, and the actual values of r m are reduced by the PI CD controller when V EV increases to V EV_max for charging or by the Block CD when SOC m decreases to SOC min for discharging.For other PEVs still available for energy storage resources, the incremental ratios r dm are determined by where L and (M-L) are the set of the indices j and k, respectively.In addition, r mp and r mq are the initial ratios r m of PEV p and PEV q , respectively.This corresponds to the conditions of (E)-1 and (E)-2 in Table 3.The Reset C is activated when the PEV owners override the ratios r j , and r dj are then set to 0. Similarly, the signals of Hold m and Reset D aim to fix r j as described by (F)-1 and (F)-2 in Table 3, respectively.The PPD is assumed to operate with programmable current limiters (PCLs), as shown in Figure 8.Although there are several circuit models of PCLs for application to battery chargers [51][52][53], controlled current sources were adopted in this paper for simplicity; i.e., the source outputs are determined as the multiplication of the total charging (or discharging) power and the ratios r m of PEVs.In Figure 8, the numbers indicate the order of the signal activations, for example, when the input power of PEV 3 decreases to prevent the battery overvoltage.The input power of PEV 1 and PEV 2 then increases proportional to r 1 and r 2 to make P b track P b_ref continuously.Note that Figure 8 represents an example for a commercial building with constant PEV charging demand and no rooftop PV output power.
Energies 2017, 10, 427 11 of 21 ( ) for , where L and (M-L) are the set of the indices j and k, respectively.In addition, rmp and rmq are the initial ratios rm of PEVp and PEVq, respectively.This corresponds to the conditions of (E)-1 and (E)-2 in Table 3.The ResetC is activated when the PEV owners override the ratios rj, and rdj are then set to 0. Similarly, the signals of Holdm and ResetD aim to fix rj as described by (F)-1 and (F)-2 in Table 3, respectively.The PPD is assumed to operate with programmable current limiters (PCLs), as shown in Figure 8.Although there are several circuit models of PCLs for application to battery chargers [51][52][53], controlled current sources were adopted in this paper for simplicity; i.e., the source outputs are determined as the multiplication of the total charging (or discharging) power and the ratios rm of PEVs.In Figure 8, the numbers indicate the order of the signal activations, for example, when the input power of PEV3 decreases to prevent the battery overvoltage.The input power of PEV1 and PEV2 then increases proportional to r1 and r2 to make Pb track Pb_ref continuously.Note that Figure 8 represents an example for a commercial building with constant PEV charging demand and no rooftop PV output power.For the practical implementation of the centralized, coordinated control scheme in the building, real-time communications systems are required particularly to obtain the information, for example, on the battery conditions (e.g., voltages and SOC levels) and PV output power.Most commercial buildings have been already equipped with modern communications systems using Internet.In particular, IoT-based sensors have sufficient sampling rates and capabilities of communicating with centralized building energy management systems (BEMSs) directly or through multi-agent subcontrollers [38,[54][55][56].Furthermore, conventional current and potential transformers (CTs and PTs) can be cost-effectively installed in electricity distribution panels of commercial buildings.The signal ports of CTs and PTs can be easily connected with auxiliary devices for data sampling, signal processing, and communication.Moreover, battery management systems (BMSs) have been already used for various grid-side applications [57][58][59], which means that they also can be easily applied to building-side applications.
The proposed building electrical system and associated controllers are capable of avoiding undesirable interactions among various DC components.Specifically, the rooftop PV system is inherently equivalent to the DC current source.The PEV batteries essentially act as the DC current sinks in the charging mode and as the DC current sources in the discharging mode.On the other hand, the AC-DC bidirectional converter can naturally act as the DC voltage source.Therefore, the proposed building system consists of the DC voltage source where DC current sources and sinks are connected in parallel.It allows the DC current sources and sinks to be controlled independently, as long as the DC link voltage is stably maintained at the rated value.With regard to the building control scheme, the AC-DC converter measures the DC-link voltage and maintains it at the rated value by balancing the building input power Pb and the net load demand ∑allPEV + Pload − PPV in the building.As discussed above, the power balance is achieved through the coordination with the building-level and device-level controllers of the DC components.For the practical implementation of the centralized, coordinated control scheme in the building, real-time communications systems are required particularly to obtain the information, for example, on the battery conditions (e.g., voltages and SOC levels) and PV output power.Most commercial buildings have been already equipped with modern communications systems using Internet.In particular, IoT-based sensors have sufficient sampling rates and capabilities of communicating with centralized building energy management systems (BEMSs) directly or through multi-agent sub-controllers [38,[54][55][56].Furthermore, conventional current and potential transformers (CTs and PTs) can be cost-effectively installed in electricity distribution panels of commercial buildings.The signal ports of CTs and PTs can be easily connected with auxiliary devices for data sampling, signal processing, and communication.Moreover, battery management systems (BMSs) have been already used for various grid-side applications [57][58][59], which means that they also can be easily applied to building-side applications.
The proposed building electrical system and associated controllers are capable of avoiding undesirable interactions among various DC components.Specifically, the rooftop PV system is inherently equivalent to the DC current source.The PEV batteries essentially act as the DC current sinks in the charging mode and as the DC current sources in the discharging mode.On the other hand, the AC-DC bidirectional converter can naturally act as the DC voltage source.Therefore, the proposed building system consists of the DC voltage source where DC current sources and sinks are connected in parallel.It allows the DC current sources and sinks to be controlled independently, as long as the DC link voltage is stably maintained at the rated value.With regard to the building control scheme, the AC-DC converter measures the DC-link voltage and maintains it at the rated value by balancing the building input power P b and the net load demand ∑ all P EV + P load − P PV in the building.As discussed above, the power balance is achieved through the coordination with the building-level and device-level controllers of the DC components.

Simulation Case Studies and Results
To analyze the operation of the proposed grid-interactive building, simulation case studies were performed under various conditions determined by: (Case 1) the maximum limitation on PEV battery voltage; (Case 2) the fluctuation of PV output power; (Case 3) the minimum limitation on battery SOC; and (Case 4) the time-varying GFR signal.Considering the modeling complexity and computational time, the building electrical system is modeled using three representative PEVs, as shown in Figure 6, and the case studies were conducted with one-hour simulation time.Three is the minimum required to test whether the proposed coordination of building-and device-level controllers, discussed in Section 3, can be successfully applied to the building system including several PEVs.The rated capacities of the PEV chargers and batteries can be easily adjusted in the building system model.Therefore, each PEV model can be used to represent a group of PEVs that have the same profiles with respect to V EV_max , S init , and t d .The building system specifications are presented in Table 4, slightly modified based on [60,61].The specifications can be determined considering the number and capacities of the PEV batteries.For the case studies, the SOC init of the PEV batteries were arbitrarily set to 0.5, 0.65, and 0.35 for the corresponding t m d chosen as 1 h, 1.75 h, and 2.17 h, with consideration of the simulation time.This led to r m as 0.5, 0.2 and 0.3, respectively.In addition, for the interconnection of the DC electrical system to a 240-V, 60-Hz power grid, V DC was determined as 600 V based on the previous studies [62][63][64]; it was set to a rather high value mainly to reduce the line power loss.Different values of r m and V DC can be adopted for the case studies.
Table 4. Detailed specifications on the proposed DC electrical system in a commercial building.
PEV Battery Q rated = 16, 18, and 20 4.1.Case 1: Charging PEV batteries with constant P b_ref for P PV = 0 In the proposed DC electrical system, the PEVs were charged with constant power inputs.Considering the voltage margin of 2.8 V, V EV_max was set to 393 V.In Figure 9a, when V EV1 increased to V EV1_max at t = t 1 , the VC-CV controller of PEV 1 decreased I EV1 to prevent overvoltage.The PPD and PCLs then distributed the surplus power to PEV 2 and PEV 3 by Equation (11); i.e., I EV2,3 and r 2,3 increased for the time period of t 1 ≤ t ≤ t 2 .Figure 9a,b show the similar profile of the PEV charging for the period of t 2 ≤ t ≤ t 3 when V EV2 also increased to V EV2_max .When V EV of all the PEVs became equal to V EV_max at t = t 3 , r 1,2,3 did not change further, unless the building or PEV owners intended to.I EV and hence P EV continuously decreased to 0 by the BPC, as all the SOC increased close to 1.
In addition, Figure 9c shows that I b was equal to I b_ref for L ≥ 1.When L decreased to 0 at t = t 3 , the BPC gradually reduced I b , regardless of I b_ref , to maintain the energy balance in the common DC link.Note that the DC-link voltage V DC was successfully regulated within 600 V ± 0.5 V during the simulation time period of one hour.

Case 2: Sequential Changes in Pb_ref wiht Intermittent PPV
In Case 2, the short-and long-term variations in solar insolation were considered as shown in Figure 10a, which can be often observed in a moderately cloudy day.The PV system voltage did not significantly change because of the intrinsic characteristics of the PPV-VPV curve; therefore, the variation in the PV output power was similar to that in the insolation.In addition, the sequential step changes in Pb_ref and hence Ib_ref were considered as shown in Figure 10b.Specifically, Ib_ref changed from positive to negative values to analyze the proposed DC electrical system acting as a power load and then a power source.In Figure 10b, Ib successfully followed Ib_ref for 0 ≤ t ≤ t4, when at least one PEV was capable of compensating for the PV power fluctuation.For t4 ≤ t ≤ t6, the BPC then gradually reduced Ib and occasionally maintained it as constant when the reductions of PPV mitigated the battery overvoltage.This is consistent with the condition of (B)-1 in Table 2.At t = t5, the building electrical system started providing the AC distribution network with net power whose magnitude was determined based on the operating conditions of the PV system and PEV batteries.After t = t7, Ib followed Ib_ref, again under the condition of (B)-3 in Table 2.Even during In Case 2, the short-and long-term variations in solar insolation were considered as shown in Figure 10a, which can be often observed in a moderately cloudy day.The PV system voltage did not significantly change because of the intrinsic characteristics of the P PV -V PV curve; therefore, the variation in the PV output power was similar to that in the insolation.In addition, the sequential step changes in P b_ref and hence I b_ref were considered as shown in Figure 10b.Specifically, I b_ref changed from positive to negative values to analyze the proposed DC electrical system acting as a power load and then a power source.In Figure 10b, I b successfully followed I b_ref for 0 ≤ t ≤ t 4 , when at least one PEV was capable of compensating for the PV power fluctuation.For t 4 ≤ t ≤ t 6 , the BPC then gradually reduced I b and occasionally maintained it as constant when the reductions of P PV mitigated the battery overvoltage.This is consistent with the condition of (B)-1 in Table 2.

Case 2: Sequential Changes in Pb_ref wiht Intermittent PPV
In Case 2, the short-and long-term variations in solar insolation were considered as shown in Figure 10a, which can be often observed in a moderately cloudy day.The PV system voltage did not significantly change because of the intrinsic characteristics of the PPV-VPV curve; therefore, the variation in the PV output power was similar to that in the insolation.In addition, the sequential step changes in Pb_ref and hence Ib_ref were considered as shown in Figure 10b.Specifically, Ib_ref changed from positive to negative values to analyze the proposed DC electrical system acting as a power load and then a power source.In Figure 10b, Ib successfully followed Ib_ref for 0 ≤ t ≤ t4, when at least one PEV was capable of compensating for the PV power fluctuation.For t4 ≤ t ≤ t6, the BPC then gradually reduced Ib and occasionally maintained it as constant when the reductions of PPV mitigated the battery overvoltage.This is consistent with the condition of (B)-1 in Table 2.At t = t5, the building electrical system started providing the AC distribution network with net power whose magnitude was determined based on the operating conditions of the PV system and PEV batteries.After t = t7, Ib followed Ib_ref, again under the condition of (B)-3 in Table 2.Even during At t = t 5 , the building electrical system started providing the AC distribution network with net power whose magnitude was determined based on the operating conditions of the PV system and PEV batteries.After t = t 7 , I b followed I b_ref , again under the condition of (B)-3 in Table 2.Even during the time period of t 4 ≤ t ≤ t 7 when I b was deviated from I b_ref , the high-frequency component of the PV output power still could be compensated for by all the PEVs and hidden from the ISO.The slow and smooth change of I b can then be easily compensated for by large generators regulating AC grid frequency.
In addition, Figure 11 shows the corresponding charging and discharging profiles of the PEVs.It can be seen that the short-term fluctuation of the PV power was reflected on I EV and consequently V EV ; however, its effect on SOC swing was negligible.
Energies 2017, 10, 427 14 of 21 the time period of t4 ≤ t ≤ t7 when Ib was deviated from Ib_ref, the high-frequency component of the PV output power still could be compensated for by all the PEVs and hidden from the ISO.The slow and smooth change of Ib can then be easily compensated for by large generators regulating AC grid frequency.
In addition, Figure 11 shows the corresponding charging and discharging profiles of the PEVs.It can be seen that the short-term fluctuation of the PV power was reflected on IEV and consequently VEV; however, its effect on SOC swing was negligible.

Case 3: Discharging PEVs Batteries to SOCmin
All the PEV batteries were discharged to SOCmin in Case 3. In Figure 12a, when SOC3 decreased to SOCmin at t = t8, the PPD almost immediately reduced |IEV3| to 0 and distributed the surplus discharging power reference to PEV1 and PEV2; note the increases in |IEV1| and |IEV2| at t = t8.It was repeated until all the SOC reached to the minimum limits at t = t10.For t10 ≤ t ≤ t11, the PEVs stayed in an idle state.Therefore, the PV output power flew to the AC network through the AC-DC bidirectional converter, which is consistent with the condition of (C)-1 in Table 2.This is also equivalent to a conventional operating scheme of grid-connected PV generators.At t = t11 when Ib_ref increased to a positive value, the PEV batteries started being charged and became available for energy storage resources again, which enabled Ib to follow Ib_ref.At t = t11, the ratios rm for all m = 1, 2, and 3 were then reassigned upon the calls of PEV owners.
Since the DC-link voltage was successfully maintained almost constant at 600 V for all the cases (e.g., see Figure 12b), the charging power profiles were very similar with the charging current profiles, as shown in Figures 9a and 11a.Therefore, the variations in the SOC levels can be estimated based on the variations in the current inputs of the PEV batteries.The requirement on the DC-link energy balance was satisfied, which also can be seen in Figure 9c or Figure 10b, where the total current flowing into the DC link was compared with the total current flowing out from the DC link.

Case 3: Discharging PEVs Batteries to SOC min
All the PEV batteries were discharged to SOC min in Case 3. In Figure 12a, when SOC 3 decreased to SOC min at t = t 8 , the PPD almost immediately reduced |I EV3 | to 0 and distributed the surplus discharging power reference to PEV 1 and PEV 2 ; note the increases in |I EV1 | and |I EV2 | at t = t 8 .It was repeated until all the SOC reached to the minimum limits at t = t 10 .For t 10 ≤ t ≤ t 11 , the PEVs stayed in an idle state.Therefore, the PV output power flew to the AC network through the AC-DC bidirectional converter, which is consistent with the condition of (C)-1 in Table 2.This is also equivalent to a conventional operating scheme of grid-connected PV generators.At t = t 11 when I b_ref increased to a positive value, the PEV batteries started being charged and became available for energy storage resources again, which enabled I b to follow I b_ref .At t = t 11 , the ratios r m for all m = 1, 2, and 3 were then reassigned upon the calls of PEV owners.
Since the DC-link voltage was successfully maintained almost constant at 600 V for all the cases (e.g., see Figure 12b), the charging power profiles were very similar with the charging current profiles, as shown in Figures 9a and 11a.Therefore, the variations in the SOC levels can be estimated based on the variations in the current inputs of the PEV batteries.The requirement on the DC-link energy balance was satisfied, which also can be seen in Figure 9c or Figure 10b, where the total current flowing into the DC link was compared with the total current flowing out from the DC link.

Case 4: Adding the Time-Varying GFR Signal Preg to Pb_ref
In Case 4, it was assumed for simplicity that a number of the grid-interactive building systems are included in an AC network [16][17][18][19][20][21][22][23][24][25], where PEV batteries participate in the grid frequency with conventional generators.This assumption is rational particularly for microgrids, where small-and large-scale consumers are often encouraged to participate in various demand response programs.The proposed DC electrical systems could respond to the high-frequency component Preg(t) of the GFR signal due to the fast time responses of the AC-DC bidirectional converter and PEV batteries, whereas conventional thermal generators were responsible for the remaining component of the signal.The conventional thermal generators were modeled using the second-order transfer functions [65,66].The primary frequency control signals were then continuously produced using proportional (P) controllers at locations where the generators and individual buildings were connected to the AC network, whereas the secondary frequency signals were updated and delivered to the generators and buildings every 2 s.
Figure 13a,b then shows the input currents of the DC electrical system and the grid frequency deviations, respectively, for (top) Preg(t) = 0 and (bottom) Preg(t) ≠ 0. For the case of Preg(t) ≠ 0, the building acted as a large-scale inverter-interfaced ESR, as shown in Figure 1, providing the GFR ancillary service.The comparison in Figure 13b represents that, for a time-varying load demand profile, the frequency deviation was reduced to less than 34% when the building systems coordinated with the conventional generators.The SOC levels of all the PEVs were not significantly affected by the regulation current Preg, mainly because of energy neutrality; i.e., the long-term average of GFR signals is close to 0. Note that the individual building systems still enabled the PEVs to compensate for the intermittent output power of the rooftop PV system, while providing the ancillary service.In Case 4, it was assumed for simplicity that a number of the grid-interactive building systems are included in an AC network [16][17][18][19][20][21][22][23][24][25], where PEV batteries participate in the grid frequency with conventional generators.This assumption is rational particularly for microgrids, where small-and large-scale consumers are often encouraged to participate in various demand response programs.The proposed DC electrical systems could respond to the high-frequency component P reg (t) of the GFR signal due to the fast time responses of the AC-DC bidirectional converter and PEV batteries, whereas conventional thermal generators were responsible for the remaining component of the signal.The conventional thermal generators were modeled using the second-order transfer functions [65,66].The primary frequency control signals were then continuously produced using proportional (P) controllers at locations where the generators and individual buildings were connected to the AC network, whereas the secondary frequency signals were updated and delivered to the generators and buildings every 2 s.
Figure 13a,b then shows the input currents of the DC electrical system and the grid frequency deviations, respectively, for (top) P reg (t) = 0 and (bottom) P reg (t) = 0.For the case of P reg (t) = 0, the building acted as a large-scale inverter-interfaced ESR, as shown in Figure 1, providing the GFR ancillary service.The comparison in Figure 13b represents that, for a time-varying load demand profile, the frequency deviation was reduced to less than 34% when the building systems coordinated with the conventional generators.The SOC levels of all the PEVs were not significantly affected by the regulation current P reg , mainly because of energy neutrality; i.e., the long-term average of GFR signals is close to 0. Note that the individual building systems still enabled the PEVs to compensate for the intermittent output power of the rooftop PV system, while providing the ancillary service.

Conclusions
This paper proposed a new configuration for the DC electrical system in a commercial building, as well as the coordinated operating scheme of the building-and device-level controllers.The proposed electrical system was comprehensively modeled considering the steady-state and dynamic operations of the AC-DC bidirectional converter, rooftop PV array, PEV batteries, and AC and DC building loads.The coordination of the building-and device-level controllers was then developed such that the DC electrical system was capable of compensating for the rooftop PV output fluctuation and following the time-varying GFR signals given from the grid operator by actively controlling the power inputs of multiple PEV batteries.Even when the internal voltages of the PEV batteries are close to the maximum limits, the input power of the electrical system is gradually deviated from the reference input power, which allows the grid operator to control conventional generators without imposing significant mechanical stress in a transient state.The simulation case studies were performed under various conditions, determined by such factors as VEV_max, PPV, SOCmin, td, and Preg.The study results demonstrated that the proposed DC electrical system operated as intended, enabling the commercial buildings to act as important aggregators between the grid operator and PEV owners and consequently improve the grid frequency stability.
Further work is still required, particularly on the implementation of the proposed building system.In particular, using a real-time simulator, a hardware-in-the-loop simulation (HILS) platform will be implemented in a laboratory environment to analyze the effects of the proposed gridinteractive building on the charging/discharging profiles of PEV batteries and the real-time operation of AC networks.The HILS platform is expected to become an effective method for prototyping, testing, and integrating the proposed building system into various AC networks.dq-axis voltages converted from the three-phase voltages (i.e., v a , v b , and v c ) at the input port of the inverter i d , i q dq-axis input currents of the inverter d d , d q dq-axis duty ratios of the inverter K d , K q dq-axis duty ratio constants (set to 0.

Figure 1 .
Figure 1.A simplified schematic diagram of the proposed DC electrical system in a commercial building.

Figure 1 .
Figure 1.A simplified schematic diagram of the proposed DC electrical system in a commercial building.

Figure 2 .
Figure 2. (a) AC-DC bidirectional converter; and (b) its averaged model and duty ratio controller.

Figure 2 .
Figure 2. (a) AC-DC bidirectional converter; and (b) its averaged model and duty ratio controller.

Figure 3 .
Figure 3. (a) Equivalent circuit model of a PV generator; and (b) the DC-DC converter controller for MPPT.

Figure 3 .
Figure 3. (a) Equivalent circuit model of a PV generator; and (b) the DC-DC converter controller for MPPT.

Figure 4 .
Figure 4. (a) PEV battery connected to the DC link via a DC-DC converter; and (b) the VC-CV controller.

Figure 5 .
Figure 5.Comparison between simulation result and experimental data.

Figure 4 .
Figure 4. (a) PEV battery connected to the DC link via a DC-DC converter; and (b) the VC-CV controller.

Figure 4 .
Figure 4. (a) PEV battery connected to the DC link via a DC-DC converter; and (b) the VC-CV controller.

Figure 5 .
Figure 5.Comparison between simulation result and experimental data.

Figure 5 .
Figure 5.Comparison between simulation result and experimental data.

Figure 6 .
Figure 6.Proposed DC electrical system and coordination of building-and device-level controllers.

(A) L > 0 1 .Table 3 .
P b = P b_ref .(B) L = 0 (charging) 1.If P sur = 0, then maintain P b at P b_ref .2. Otherwise, decrease P b .3. If L becomes eqaul to or more than 1 when P b_ref decreases to P b ± ∆P, then set P b equal to P b_ref .(C) L = 0 (discharging) 1. P b = −P PV .2. If L ≥ 1 when P b_ref increases positive, then set P b equal to P b_ref .Set of operation of the PEV Power Distributor (PPD).PEV Conditions Input Power Ratios (r i,j ) of PEV Batteries (D) L = M 1. Maintain all r j as constant.(E) 0 < L < M As proportional to the initial values of r j , 1. (Charging): decrease r k and increase r j .2. (Discharging): decrease r k to 0 and increase r j .(F) L = 0 1. (Charging): maintain all r k as constant.2. (Discharging): maintain all r k at 0.

Figure 7 .
Figure 7. Schematic diagrams of the controllers in the: (a,b) Logic 1 ; and (c) Logic 2 blocks in the BPC.

Figure 9 .
Figure 9. (a) PEV charging profiles; (b) PEV input power ratios; and (c) variations in I b_ref , I b , and Σ m I EVm .

Figure 10 .
Figure 10.(a) Rooftop PV system operating profiles; and (b) variations in I b_ref , I b , and Σ m I EVm .

Figure 12 .
Figure 12.(a) PEV charging profiles; and (b) the input current and DC voltage of the AC-DC converter.

Figure 12 .
Figure 12.(a) PEV charging profiles; and (b) the input current and DC voltage of the AC-DC converter.

4. 4 .
Case 4: Adding the Time-Varying GFR Signal P reg to P b_ref

Figure 13 .
Figure 13.(a) Input currents of the proposed DC electrical systems; and (b) the frequency deviation in the AC network for (top) Preg = 0 and (bottom) Preg ≠ 0.
2) v α , v β αβ-axis voltages converted from v a , v b , and v c using Clarke Transform f, ω Frequency [Hz, rad/s] of v a , v b , and v c V RMS magnitude of v a , v b , and v c θ da Angle by which d-axis leads the phase-a axis V DC DC link voltage of the inverter v c Voltage across the equivalent capacitance in the DC link of the inverter R, L Equivalent line resistance and inductance seen from the inverter Rc, C Equivalent resistance and capacitance of the DC link of the inverter s 1-6 Inverter switching signals i in , i inv Currents flowing into and from the DC link of the inverter Q inv Reactive power input of the inverter S inv_rated Rated capacity of the inverter Rooftop PV System I pvm , V pvm , P pvm Output current, voltage, and power of the PV module N s , N p Number of modules in series-and parallel-wired strings I PV , V PV , P PV Output current, voltage, and power of the PV system R p , R s Equivalent parallel and serial resistances of the PV module G, T Insolation given to the PV module and temperature of the PV module V d , I d Voltage across and current flowing through the diode in the PV module I g , I o Generated PV module current and reverse saturation current L, R L Equivalent inductance and resistance of the PV converter D PV Duty ratio of the PV converter I SW , I PV_DC Currents flowing through the switch and to the DC link I scr , V ocr Nominal short-circuit current and open-circuit voltage q Charge of an electron, 1.602 × 10 −19 C k Botzmann's constant, 1.381 × 10 −23 a Ideality factor, 1.3 E g Bandgap energy of semiconductor (1.12 eV for the polycrystalline Si at 25 • C) k I Current coefficient (0.0032 A/K) ε V , ε I Voltage and current tolerance for the duty ratio control using the IC algorithm

Table 2 .
Set of operation of the Building Power Controller (BPC).