FIU

: The fast development of the residential sector regarding the additional integration of renewable distributed energy sources and the modern expansion usage of essential DC electrical equipment may cause severe power quality problems. For example, the integration of rooftop photovoltaic (PV) may cause unbalance, and voltage ﬂuctuation, which can add constraints for further PV integrations to the network, and the deployment of DC native loads with their nonlinear behavior adds harmonics to the network. This paper demonstrates the smart integration of a DC microgrid to the neighborhood low-voltage distribution network (NLVDN). The DC microgrid is connected to the NLVDN through a three-phase voltage source inverter (VSI), in which the VSI works as a distribution static compensator (DSTATCOM). Unlike previous STATCOM work in the literature, the proposed controller of the VSI of the DC smart building allows for many functions: (a) it enables bidirectional active / reactive power ﬂow between the DC building and the AC grid at point of common coupling (PCC); (b) it compensates for the legacy unbalance in the distribution network, providing harmonics elimination and power factor correction capability at PCC; and (c) it provides voltage support at PCC. The proposed controller was validated by Matlab / Simulink and by experimental implementation at the lab.


Introduction
The predicted massive utilization of photovoltaic (PV) systems in the residential sector is justified for several reasons.The efficiency of the PVs is improving, the cost of manufacturing is declining, and incentives provided by the utility have decreased the utility bills.Additionally, it is expected that the DC loads usage is increasing in the distribution network, such as the usage of new DC appliances and equipment in the residential sector (consumer electronics, LED lighting, and compact fluorescent lamps) [1].Despite the benefits of the innovations in source and demand sectors, many power-quality problems are present in the distribution network that work against all these innovations.For example, the integration of rooftop PVs may cause severe voltage fluctuations and unbalance due to the uncertainty and the lack of availability of the irradiance [2][3][4][5].Additionally, the increased usage of DC loads adds more harmonics to the distribution network [6,7].This is because each individual DC load needs an individual rectifier to facilitate the connection of the equipment to the current AC network and provide power factor correction to comply with the utility policy [8,9].Moreover, the expedite movement toward the usage of a sensitive component in residential, commercial, industrial, and traction applications such as refrigerators, televisions, computers, and switched-mode power supplies adds nonlinear and unbalanced loads to the distribution network [10].Degrading the power quality of the power system network wears out the network component, increases the probability of system shutdown, and increases maintenance disbursal [11][12][13].As a consequence, enhancing the power quality of the electric power network is a critical factor in the process of power generation and delivery.
As a consequence, this paper proposes a smart integration of a DC microgrid to neighborhood low-voltage distribution network (NLVDN), as depicted in Figure 1.The DC microgrid is connected to the NLVDN through three-phase voltage source inverter (VSI), in which the VSI works as a distribution static compensator (DSTATCOM), and the DC link provides an integration point for the PV and the DC native loads.The DC microgrid is composed of a photovoltaic (PV) source and DC loads connected to the DC side, DC link capacitor bank, and three-phase VSI to integrate the NLVDV.
Inventions 2019, 3, x FOR PEER REVIEW 2 of 14 [10].Degrading the power quality of the power system network wears out the network component, increases the probability of system shutdown, and increases maintenance disbursal [11][12][13].As a consequence, enhancing the power quality of the electric power network is a critical factor in the process of power generation and delivery.
As a consequence, this paper proposes a smart integration of a DC microgrid to neighborhood low-voltage distribution network (NLVDN), as depicted in Figure 1.The DC microgrid is connected to the NLVDN through three-phase voltage source inverter (VSI), in which the VSI works as a distribution static compensator (DSTATCOM), and the DC link provides an integration point for the PV and the DC native loads.The DC microgrid is composed of a photovoltaic (PV) source and DC loads connected to the DC side, DC link capacitor bank, and three-phase VSI to integrate the NLVDV.The electrical regulation standards in distribution networks such as power factor and harmonics levels are applied on all AC loads connected to the current AC network.Some of these regulations define the interconnection requirement of the distributed generation (DG) units in low-voltage distribution systems [14][15][16].Others determine the interconnection regulation for the electric loads, such as home appliances [17][18][19].The main concern for the utility companies is the massive utilization of loads in current homes that do not comply with the standard regulation and degrade the power quality of the power system network [20].
The IEEE 1547 is one of the power-quality standards, which define the harmonics and total harmonic distortion (THD) levels.Several works introduce different ways to mitigate harmonic components and compensate for reactive current, negative harmonics.Some use the injection of the negative reactive current to the power network to reduce the harmonics and provide power factor correction [21][22][23][24].Another approach allows the simultaneous compensation of the harmonics and reactive power issues known as the active power filter (APF).In addition, it can provide compensation for the system load unbalance and compensate for voltage fluctuations at the point of common coupling (PCC).There are different topologies of APF such as series and shunt.The performance of the APF depends on the accuracy of selecting a suitable method to extract the The electrical regulation standards in distribution networks such as power factor and harmonics levels are applied on all AC loads connected to the current AC network.Some of these regulations define the interconnection requirement of the distributed generation (DG) units in low-voltage distribution systems [14][15][16].Others determine the interconnection regulation for the electric loads, such as home appliances [17][18][19].The main concern for the utility companies is the massive utilization of loads in current homes that do not comply with the standard regulation and degrade the power quality of the power system network [20].
The IEEE 1547 is one of the power-quality standards, which define the harmonics and total harmonic distortion (THD) levels.Several works introduce different ways to mitigate harmonic components and compensate for reactive current, negative harmonics.Some use the injection of the negative reactive current to the power network to reduce the harmonics and provide power factor correction [21][22][23][24].Another approach allows the simultaneous compensation of the harmonics and reactive power issues known as the active power filter (APF).In addition, it can provide compensation for the system load unbalance and compensate for voltage fluctuations at the point of common coupling (PCC).There are different topologies of APF such as series and shunt.The performance of the APF depends on the accuracy of selecting a suitable method to extract the undesired current.The synchronous reference frame (SRF) method is used in three-phase balanced systems [25,26].Another effort is based on instantaneous power theory in three phases, known as the unbalanced system [27][28][29][30].However, the previous approach requires extra computation to process the three phases current and the voltage measured, which affects the cost of implementation.In this paper, the smart integration of a DC microgrid to NLVDN was demonstrated.The DC microgrid is connected to the NLVDN through a VSI, in which the VSI works as a DSTATCOM and the DC link provides an integration point for the PV and the DC native loads.The proposed technique is capable of compensating the reactive power, unbalance, and harmonics demanded by three-phase non-linear loads, and unbalance connected to the distribution side improves the power quality.Furthermore, it is able to prevent the source from getting overloaded by providing active power support to the load.Unlike previous STATCOM work in the literature, the proposed controller of the VSI of the DC smart building allows for multiple functions, as follows: (a) it enables the bidirectional active/reactive power flow between the DC building and the AC grid at PCC, (b) it compensates for the legacy unbalance in the distribution network, providing harmonics elimination and power factor correction capability at PCC, and (c) it provides voltage support at PCC.A simulation model based on MATLAB/SIMULINK is modeled to validate the functionality of the proposed control algorithm.Moreover, the experimental setup is laboratory implemented to prove the validation of the performance experimentally.The results depict that the developed controller succeeds to maintain bi-directional power flow controllability, while simultaneously acting as an active power filter to ensure improved power quality at the PCC under various loading conditions.
The paper is arranged as follows: in Section 2, a description of the system under study and the suggested control technique is demonstrated.In Section 3, simulation results are presented and inquired about to validate the proposed technique.In Section 4, experimental results are presented to evidence the validation of the controller's execution experimentally.Finally, in Section 5, the conclusions of the paper's contributions are listed.

The Proposed System Description
In order to evaluate the effect of a smart load on the distribution system, the smart load was connected on the IEEE 13-bus test feeder system.The test system was modified to include the smart load.Figure 1 shows the standard IEEE system under study, and the smart load was connected at bus 675.The network buses 632, 671, 692, and 675 were renamed as buses Z, M, Y, and X, respectively.The effect of imposing the smart load on the distribution system was studied on the pass from bus Z to bus L. The smart load contained a non-linear load, which was connected directly to bus L. The PV source and the DC load were connected to grid via a coupling converter.On the one hand, the converter worked to harvest the PV energy and drive the DC load, while the proposed control system will provide ancillary service and ensure the power quality at the point of the common coupling, which will positively impact the distribution grid.

The Control Technique
The main functions of the control technique are canceling the harmonics caused by the non-linear loads and compensating for the load unbalance caused due to the existence of single-and three-phase powered loads that are arbitrarily distributed and act as power factor corrector (PFC) at PCC.The proposed algorithm is based on a modified version from vector decoupled control in which the instantaneous three phases current was measured and transformed from ABC to DQ reference frame.This revised version of vector decouples control technique is capable of dealing with unbalanced and balanced systems.A block diagram depicting the control algorithm is shown in Figure 2.This controller is based on the park's transformation, in which the three-phase current is converted to direct and quadrature current ild and ilq, respectively.This calculated current ild has been analyzed.The results provide a DC value representing the fundamental active component and AC value representing the harmonic components, unlike the vector decouple control method, which uses the high pass filter to isolate the AC component from ild.The proposed modified vector decouple control method uses a low-pass filter with a cut-off frequency of 75 Hz.The DC component of ild is obtained by passing ild through the low pass filter.The low pass filter output represents the magnitude of the fundamental active current component existing in the load current.To regulate the DC bus voltage, a power balance technique is used to control the power delivered and submitted to/from the DC link.To maintain the power balance through the DC microgrid, the amount of power controlled by the grid tie converter needs to be obtained, as given in (1), which represents the difference of power between the PV power and the local DC load power.The active power component is controlled as given in (2).Since the synchronous reference frame d-axis is aligned with the three-phase voltage angle, Vq will be equal to zero.Then, the Id reference is calculated in (3), as follows: in which a PI controller will preserve this balance and provides a direct current component Idvr to represent the voltage regulator direct current share.This voltage regulator direct current component can be calculated from (4) to (6), as follows: The previous component is added to the calculated ild (low pass filter output).Then, by using inverse Park's transform, the three-phase sinusoidal current reference is obtained.The quadrature current component ilq and zero current component il0 are set to zero, since the target is to capture the active fundamental component only.Consequently, the obtained three-phase sinusoidal current This controller is based on the park's transformation, in which the three-phase current is converted to direct and quadrature current ild and ilq, respectively.This calculated current ild has been analyzed.The results provide a DC value representing the fundamental active component and AC value representing the harmonic components, unlike the vector decouple control method, which uses the high pass filter to isolate the AC component from ild.The proposed modified vector decouple control method uses a low-pass filter with a cut-off frequency of 75 Hz.The DC component of ild is obtained by passing ild through the low pass filter.The low pass filter output represents the magnitude of the fundamental active current component existing in the load current.To regulate the DC bus voltage, a power balance technique is used to control the power delivered and submitted to/from the DC link.To maintain the power balance through the DC microgrid, the amount of power controlled by the grid tie converter needs to be obtained, as given in (1), which represents the difference of power between the PV power and the local DC load power.The active power component is controlled as given in (2).Since the synchronous reference frame d-axis is aligned with the three-phase voltage angle, V q will be equal to zero.Then, the I d reference is calculated in (3), as follows: in which a PI controller will preserve this balance and provides a direct current component I dvr to represent the voltage regulator direct current share.This voltage regulator direct current component can be calculated from (4) to (6), as follows: The previous component is added to the calculated ild (low pass filter output).Then, by using inverse Park's transform, the three-phase sinusoidal current reference is obtained.The quadrature current component ilq and zero current component il0 are set to zero, since the target is to capture the active fundamental component only.Consequently, the obtained three-phase sinusoidal current reference is subtracted from the load current.The resulting reference current represents all harmonics and reactive components associated with the load current, plus a fundamental component necessary for power balancing.The obtained three-phase sinusoidal reference is subtracted from the load current to obtain the final current reference controls the injected current to the AC side.Therefore, the injected current will contain a component to balance the power flow and component to counteract the harmonics and unbalance values at the original non-linear load, which will result in a pure current from the utility side at the PCC.Also, it will maintain the load balance at bus L.

Case Study A
In this case study, the smart load control system is applied to t = 1.5 s.Moreover, the following figures depict the comparison between the IEEE 13-bus system before and after the smart load application.To show the improved performance after applying the smart load, Figure 3 shows the effect of the smart load on active power, reactive power, and voltage profiles at bus X, M, and Z.The results show that the active power capability for the whole pass of the smart load is increased.
Inventions 2019, 3, x FOR PEER REVIEW 5 of 14 reference is subtracted from the load current.The resulting reference current represents all harmonics and reactive components associated with the load current, plus a fundamental component necessary for power balancing.The obtained three-phase sinusoidal reference is subtracted from the load current to obtain the final current reference controls the injected current to the AC side.Therefore, the injected current will contain a component to balance the power flow and component to counteract the harmonics and unbalance values at the original non-linear load, which will result in a pure current from the utility side at the PCC.Also, it will maintain the load balance at bus L.

Case Study A
In this case study, the smart load control system is applied to t = 1.5 s.Moreover, the following figures depict the comparison between the IEEE 13-bus system before and after the smart load application.To show the improved performance after applying the smart load, Figure 3 shows the effect of the smart load on active power, reactive power, and voltage profiles at bus X, M, and Z.The results show that the active power capability for the whole pass of the smart load is increased.In addition, the reactive power at the same pass is reduced, which improves the power factor and the voltage profile at these points.Correspondingly, as shown in Figure 4, the unbalanced current ratio is diminished through the distribution bus pass, especially at point X.To clearly show the effect of the smart load application, the instantaneous values of three-phase voltages, load currents, coupling converter currents, and bus L injected currents are illustrated in Figure 5.The figure In addition, the reactive power at the same pass is reduced, which improves the power factor and the voltage profile at these points.Correspondingly, as shown in Figure 4, the unbalanced current ratio is diminished through the distribution bus pass, especially at point X.To clearly show the effect of the smart load application, the instantaneous values of three-phase voltages, load currents, coupling converter currents, and bus L injected currents are illustrated in Figure 5.The figure demonstrates that the non-linear load and the converter compensation current to balance the bus L (PCC) three-phase current.
Inventions 2019, 3, x FOR PEER REVIEW 6 of 14 demonstrates that the non-linear load and the converter compensation current to balance the bus L (PCC) three-phase current.Analytically, Figure 6 illustrates the harmonic analysis and vector diagram for five cycles before and after the controller compensation effect.In Figure 6a, the total harmonic distortion was 6.7%.In addition, the current vector is not only unbalanced but also is shifted away from the voltage angle.On the other hand, Figure 6b shows the effect of the smart load control system; the total harmonic distortion is reduced to 4.78% with balanced current, and the power factor is improved toward unity.
Inventions 2019, 3, x FOR PEER REVIEW 7 of 14 Analytically, Figure 6 illustrates the harmonic analysis and vector diagram for five cycles before and after the controller compensation effect.In Figure 6a, the total harmonic distortion was 6.7%.In addition, the current vector is not only unbalanced but also is shifted away from the voltage angle.On the other hand, Figure 6b shows the effect of the smart load control system; the total harmonic distortion is reduced to 4.78% with balanced current, and the power factor is improved toward unity.

Case Study B
In this case study, the controller is examined to verify the capability for providing bi-directional power flow operation in addition to the power quality solving solutions.The simulation time is scaled to 24 s to represent a daily operation of 24 h.The controller is examined under severe bidirectional loading conditions to prove its capability to deal with such a load pattern.The DC voltage of the DC link bus is shown In Figure 7a.It is noticed that the voltage is consistent at a constant value (380 V) during the whole running operation.Even at the load transition instant, the bus voltage ripple fluctuates between 370 to 390 V.This ripple does not exceed the 5% ratio allowed by the standards.The PV output power profile is shown in Figure 7b.The local DC load power of the microgrid is shown in Figure 7c, and the power for the grid tie converter is shown in Figure 7d.It can be noticed that the grid tie power between 0 to 7 s and 17 to 24 s is positive, which indicates that the converter power flows from AC grid to the DC microgrid (the converter is working in rectifier mode).The reason for this is that in these intervals the PV power is insufficient to feed the local DC load, so the converter extracts power from the AC grid to supply the deficit in the DC microgrid local load.However, between 7 and 17 s, the grid tie power is negative, which indicates that the converter power flows from DC microgrid to AC grid (the converter is working in the inverter mode).The reason for this is that in these intervals, the PV output power is exceeding the local DC power, so inverter extracts power from the DC microgrid to support the local AC load on the AC utility side.Besides, the grid tie converter control proves its capability to control the power flow between both sides; it also provides power quality solutions as illustrated in the description of the next figures.

Case Study B
In this case study, the controller is examined to verify the capability for providing bi-directional power flow operation in addition to the power quality solving solutions.The simulation time is scaled to 24 s to represent a daily operation of 24 h.The controller is examined under severe bidirectional loading conditions to prove its capability to deal with such a load pattern.The DC voltage of the DC link bus is shown In Figure 7a.It is noticed that the voltage is consistent at a constant value (380 V) during the whole running operation.Even at the load transition instant, the bus voltage ripple fluctuates between 370 to 390 V.This ripple does not exceed the 5% ratio allowed by the standards.The PV output power profile is shown in Figure 7b.The local DC load power of the microgrid is shown in Figure 7c, and the power for the grid tie converter is shown in Figure 7d.It can be noticed that the grid tie power between 0 to 7 s and 17 to 24 s is positive, which indicates that the converter power flows from AC grid to the DC microgrid (the converter is working in rectifier mode).The reason for this is that in these intervals the PV power is insufficient to feed the local DC load, so the converter extracts power from the AC grid to supply the deficit in the DC microgrid local load.However, between 7 and 17 s, the grid tie power is negative, which indicates that the converter power flows from DC microgrid to AC grid (the converter is working in the inverter mode).The reason for this is that in these intervals, the PV output power is exceeding the local DC power, so inverter extracts power from the DC microgrid to support the local AC load on the AC utility side.Besides, the grid tie converter control proves its capability to control the power flow between both sides; it also provides power quality solutions as illustrated in the description of the next figures.
The three-phase AC load and source currents are shown in Figure 8a,f, respectively.Figure 8a shows the load current is an unbalanced, three-phase current, which is one of the problems that the controller has to tackle.Figure 8b,c gives a close view of Figure 8a and shows the load current at two different intervals to demonstrate the performance of the system in both rectifier/inverter modes.It is noticed that the current waveforms suffer from noticeable distortion due to the existence of a nonlinear load.It can be seen in Figure 8d,e that the three phases are balanced and the current waveforms are uniform, which implies the ability of the controller to mitigate harmonics and compensate for unbalances under both modes of operation.The three-phase AC load and source currents are shown in Figure 8a,f, respectively.Figure 8a shows the load current is an unbalanced, three-phase current, which is one of the problems that the controller has to tackle.Figure 8b,c gives a close view of Figure 8a and shows the load current at two different intervals to demonstrate the performance of the system in both rectifier/inverter modes.It is noticed that the current waveforms suffer from noticeable distortion due to the existence of a nonlinear load.It can be seen in Figure 8d,e that the three phases are balanced and the current waveforms are uniform, which implies the ability of the controller to mitigate harmonics and compensate for unbalances under both modes of operation.

Hardware Implementation and Experimental Results
To investigate the feasibility of the proposed control technique, a hardware setup was established as depicted in Figure 9.The DC building was connected at the PCC through DC/AC

Hardware Implementation and Experimental Results
To investigate the feasibility of the proposed control technique, a hardware setup was established as depicted in Figure 9.The DC building was connected at the PCC through DC/AC converter.It was implemented in the power system test-bed (Energy System Research Laboratory, Florida International University) [31] and consisted of AC and DC zones connected through an AC-DC converter.The DC zone was represented by a DC bus, where its voltage was set to 380 V, along with a DC load emulator to represent load appliances connected to the DC side and a PV emulator to represent a roof-top PV source.The PV emulator, represented by XR SERIES DC power supply offered by the MAGNA-POWER ELECTRONICS, was programmed to emulate the PV I-V characteristics [32].It was interfaced with the DC bus through a DC-DC boost converter to extract maximum power generated by the PV system.The mathematical modeling of the PV system and the converter MPPT controller were built within the MATLAB/SIMULINK environment and executed with the DSpace 1104 real-time interface.The DC load emulator was comprised of a combination of eight resistors with different values (1,5,10,20,30,40,50, and 60 Ω) in a particular arrangement [33].In addition to these load resistor combinations, eight controlled switches were used to change the connection topology, which changed the values of the equivalent load resistors to obtain different load patterns.The central concept of operation was based on sending control signals to the switches to change their states (on/off).By changing their states, the equivalent load resistance changed.The control commands were generated from a load profile generator developed in the LabVIEW environment.The control commands were transferred through the PCI 6025E card to a circuit.This circuit was based on TEXAS INSTRUMENT inverting buffer module sn7406n.This module contained six inverters with open collector output.The RMS values for the voltage in the AC zone was set to 208 V.The AC bus was connected to the utility grid at PCC.Additionally, different load models were designed to represent the AC load pattern [34].One of the passive loads that was built had a switching capacity of 10 levels parallel of resistive loads from 300-W to 3-kW power in steps of 300-W at a nominal voltage that could be switched to emulate various load patterns.
The parameters of the main components of the hardware setup are given in Table 1.The experimental results are shown in Figure 10; they show the capability of the proposed algorithm to compensate for unbalance and nonlinearity of the load current in different modes of operation.This figure is divided into four regions separated by the red-dashed line.These four regions represent three different modes of operation.In mode one (interval 0-28 s), the converter is working as an APF for the AC load but without any exchange in power between AC and DC zones.In mode two, (interval between 28-88 and 188-278 s), the converter works as an APF and rectifier in which the power is transferred from the AC side to the DC side.In mode three (interval between 88-188 s), the converter works as an APF and inverter in which the power is transferred from the DC side to the AC side.The RMS values for the voltage in the AC zone was set to 208 V.The AC bus was connected to the utility grid at PCC.Additionally, different load models were designed to represent the AC load pattern [34].One of the passive loads that was built had a switching capacity of 10 levels parallel of resistive loads from 300-W to 3-kW power in steps of 300-W at a nominal voltage that could be switched to emulate various load patterns.The parameters of the main components of the hardware setup are given in Table 1.The experimental results are shown in Figure 10; they show the capability of the proposed algorithm to compensate for unbalance and nonlinearity of the load current in different modes of operation.This figure is divided into four regions separated by the red-dashed line.These four regions represent three different modes of operation.In mode one (interval 0-28 s), the converter is working as an APF for the AC load but without any exchange in power between AC and DC zones.In mode two, (interval between 28-88 and 188-278 s), the converter works as an APF and rectifier in which the power is transferred from the AC side to the DC side.In mode three (interval between 88-188 s), the converter works as an APF and inverter in which the power is transferred from the DC side to the AC side.10a.The voltage is stable during the whole operation at 380 V.The ripple in the voltage fluctuates is in an acceptable range between 370 to 390 V at the instant of load transition.This small fluctuation in the DC bus voltage is compatible with the standards, as it does not exceed 5%.The grid tie converter power is shown in Figure 10b, which explains the bi-directional power flow between the AC grid and the DC microgrid.It can be noticed that the grid tie power between 30 and 100 s, and 188 and 278 s, is positive, which indicates that the converter power flows from AC grid to the DC microgrid (the converter is working in rectifier mode).However, between (100-188 s), the grid tie power is negative, which indicates that the converter power flows from DC microgrid to AC grid (the converter is working in the inverter mode).In response, the converter control verified its capability to control the bidirectional power flow between the DC building and the AC grid.The three-phase AC load and source currents are shown in Figure 10c-j, respectively.Figure 10d-f gives a close view of Figure 10c at modes one, two, and three, respectively.It is clear there is noticeable distortion in the current waveforms in relation to the The DC voltage of the main DC bus is shown in Figure 10a.The voltage is stable during the whole operation at 380 V.The ripple in the voltage fluctuates is in an acceptable range between 370 to 390 V at the instant of load transition.This small fluctuation in the DC bus voltage is compatible with the standards, as it does not exceed 5%.The grid tie converter power is shown in Figure 10b, which explains the bi-directional power flow between the AC grid and the DC microgrid.It can be noticed that the grid tie power between 30 and 100 s, and 188 and 278 s, is positive, which indicates that the converter power flows from AC grid to the DC microgrid (the converter is working in rectifier mode).However, between (100-188 s), the grid tie power is negative, which indicates that the converter power flows from DC microgrid to AC grid (the converter is working in the inverter mode).
In response, the converter control verified its capability to control the bidirectional power flow between the DC building and the AC grid.The three-phase AC load and source currents are shown in Figure 10c-j, respectively.Figure 10d-f gives a close view of Figure 10c at modes one, two, and three, respectively.It is clear there is noticeable distortion in the current waveforms relation to the existence of nonlinear loads.Figure 10g-i, give a close view of Figure 10j at modes one, two, and three, respectively.
The controller has the capability to mitigate the harmonics and compensate for unbalances under all modes of operation.As is seen in Figure 10g-i, the three-phase currents at the source side are balanced.This indicates that the grid tie converter's controller succeeded in cancelling out power quality issues (distortion and imbalance) from the source side.In order to validate the controller capability to improve the power factor, Figure 11 is shown.Figure 11a shows Phase A's voltage versus Phase A's load current.Figure 11h shows the Phase A voltage versus Phase A supply current.Figure 11b-d gives a close view of Figure 11a at modes one, two, and three, respectively.It is noticed that the current waveform is out of phase and lagging behind the voltage waveform, implying the involvement of a lag power factor.Figure 11e-g gives a close view of Figure 11h at modes one, two, and three, respectively.It can be seen that the current waveform is in phase with the voltage waveform, implying the involvement of unity power factor.Thus, the proposed control algorithm ID succeeds to correct the power factor for the system.existence of nonlinear loads.The controller has the capability to mitigate the harmonics and compensate for unbalances under all modes of operation.As is seen in Figure 10g-i, the three-phase currents at the source side are balanced.This indicates that the grid tie converter's controller succeeded in cancelling out power quality issues (distortion and imbalance) from the source side.In order to validate the controller capability to improve the power factor, Figure 11 is shown.Figure 11a shows Phase A's voltage versus Phase A's load current.Figure 11h shows the Phase A voltage versus Phase A supply current.Figure 11b-d gives a close view of Figure 11a at modes one, two, and three, respectively.It is noticed that the current waveform is out of phase and lagging behind the voltage waveform, implying the involvement of a lag power factor.Figure 11e-g gives a close view of Figure 11h at modes one, two, and three, respectively.It can be seen that the current waveform is in phase with the voltage waveform, implying the involvement of unity power factor.Thus, the proposed control algorithm ID succeeds to correct the power factor for t.he system.

Conclusions
In this paper, the smart integration of a DC microgrid to a NLVDN is proposed.The DC microgrid connected to the NLVDN through a VSI, in which the VSI works as a DSTATCOM.Unlike previous STATCOM work in the literature, the proposed controller of the VSI of the DC smart building is multifunctional: (a) it enables the bidirectional active/reactive power flow between the

Figure 1 .
Figure 1.IEEE 13-bus test feeder system with a smart load.

Figure 1 .
Figure 1.IEEE 13-bus test feeder system with a smart load.

Figure 2 .
Figure 2. A block diagram for the proposed control technique.

Figure 2 .
Figure 2. A block diagram for the proposed control technique.

Figure 3 .
Figure 3.A comparison between the active, reactive power, and the per unit (p.u.) voltage at buses X, M, and Z, respectively.

Figure 3 .
Figure 3.A comparison between the active, reactive power, and the per unit (p.u.) voltage at buses X, M, and Z, respectively.

Figure 4 .
Figure 4.A comparison between three-phase current (RMS) at buses X, M, and Z, respectively.

Figure 4 .
Figure 4.A comparison between three-phase current (RMS) at buses X, M, and Z, respectively.

Figure 4 .
Figure 4.A comparison between three-phase current (RMS) at buses X, M, and Z, respectively.

Figure 5 .
Figure 5.The three-phase voltage, load current, converter current, and bus current, respectively, at point of common coupling (PCC).

Figure 5 .
Figure 5.The three-phase voltage, load current, converter current, and bus current, respectively, at point of common coupling (PCC).

Figure 6 .
Figure 6.Phasor Diagram for the voltage and current at PCC (a) before the proposed technique and (b) after the proposed technique.

Figure 6 .
Figure 6.Phasor Diagram for the voltage and current at PCC (a) before the proposed technique and (b) after the proposed technique.

Figure 8 .
Figure 8. Simulation results: (a) alternating current (AC) load current, (b) zoom in for the AC load current between (16.0-16.1)s, (c) zoom in for AC load current between (18.5-18.6)s, (d) zoom in for AC supply current between (16.0-16.1)s, (e) zoom in for AC supply current between (18.5-18.6)s, and (f) AC supply current.

Figure 10 .
Figure 10.Experimental results show the unbalance compensation and harmonics mitigation: (a) DC link bus voltage (V), (b) the output power of PV system (Watt), (c) AC load current, (d) zoom in for AC load current between 25.03 and 25.1 s, (e) zoom in for AC load current between 150.03 and 150.1 s, (f) zoom in for AC load current between 200.03 and 200.1 s, (g) zoom in for AC supply current between (25.03 and 25.1 s, (h) zoom in for AC supply current between 150.03 and 150.1) s, (i) zoom in for AC supply current between 200.03 and 200.1 s, and (j) AC supply current.

Figure 10 .
Figure 10.Experimental results show the unbalance compensation and harmonics mitigation: (a) DC link bus voltage (V), (b) the output power of PV system (Watt), (c) AC load current, (d) zoom in for AC load current between 25.03 and 25.1 s, (e) zoom in for AC load current between 150.03 and 150.1 s, (f) zoom in for AC load current between 200.03 and 200.1 s, (g) zoom in for AC supply current between (25.03 and 25.1 s, (h) zoom in for AC supply current between 150.03 and 150.1) s, (i) zoom in for AC supply current between 200.03 and 200.1 s, and (j) AC supply current.
Figure 10g-I, give a close view of Figure 10j at modes one, two, and three, respectively.

Figure 11 .
Figure 11.Experimental results showing the power factor correction effect on Phase A voltage and Phase A current: (a) Phase A Voltage (V) and load current, (b) zoom in between 25.03 and 25.1 s, (c) zoom in between 150.03 and 150.1 s, (d) zoom in between 200.03 and 200.1 s, (e) zoom in for between 25.03 and 25.1 sec, (f) zoom in between 150.03 and 150.1 s, (g) zoom in between 200.03 and 200.1 s, and (h) Phase A voltage (V) and Phase A supply current.

Figure 11 .
Figure 11.Experimental results showing the power factor correction effect on Phase A voltage and Phase A current: (a) Phase A Voltage (V) and load current, (b) zoom in between 25.03 and 25.1 s, (c) zoom in between 150.03 and 150.1 s, (d) zoom in between 200.03 and 200.1 s, (e) zoom in for between 25.03 and 25.1 sec, (f) zoom in between 150.03 and 150.1 s, (g) zoom in between 200.03 and 200.1 s, and (h) Phase A voltage (V) and Phase A supply current.

Table 1 .
The experimental setup parameters.environment.The control commands were transferred through the PCI 6025E card to a circuit.This circuit was based on TEXAS INSTRUMENT inverting buffer module sn7406n.This module contained six inverters with open collector output.

Table 1 .
The experimental setup parameters.The DC voltage of the main DC bus is shown in Figure