Design and Implementation of an Energy-Management System for a Grid-Connected Residential DC Microgrid

: The design and implementation of an energy-management system (EMS) applied to a residential direct current microgrid (DC- µ G) is presented in this work. The proposed residential DC- µ G is designed to provide a maximum power of one kilowatt by using two photovoltaic arrays (PAs) of 500 W, a battery bank (BB) of 120 V–115 Ah, a supercapacitor module of 0.230 F and a bidirectional DC–AC converter linked to the AC main grid (MG). The EMS works as a centralized manager and it deﬁnes the working operation mode for each section of the DC- µ G. The operation modes are based on: (1) the DC-link bus voltage, (2) the generated or demanded power to each section of the DC- µ G and (3) the BB’s state of charge. The proposed EMS—during the several working operation modes and at the same time—can obtain the maximum energy from the PAs, reduce the energy consumption from the main grid and keep the DC-link bus voltage inside a range of 190 V ± 5%. The EMS and local controllers are implemented by using LabVIEW and NI myRIO-1900 platforms. Moreover, experimental results during connection and disconnection of each DC- µ G sections and di ﬀ erent on-the-ﬂy transitions are reported, these results focus on the behavior of the DC bus, which shows the DC bus robustness and stability. The robustness of the DC- µ G is demonstrated by maintaining a balance of energy between the sources and loads connected to the DC bus under di ﬀ erent scenarios.


Introduction
Power consumption increase and the never-ending industrial demand on electrical energy have resulted in a higher requirement of electrical energy generation worldwide and therefore, a depletion of conventional generation resources, such as fossil fuels. On the other hand, renewable energies are still facing issues for massive generation and supply due to its unpredictable nature. These challenges have allowed a development in efficient technologies for energy conversion. An alternative to cope this situation is the use of renewable energy sources; however, its' massive introduction and sustainable production are still open challenges to be satisfied. One alternative to solve these issues is an unknown dynamic that can be modeled using fuzzy controllers. Consequently, in [23] a control strategy for a hybrid renewable energy sources (HRES) system is proposed using FC systems that contain adaptive rules to obtain better performance from an HRES system evaluated under different load conditions and failures in renewable energy sources.
The previously described state of the art shows that several architectures implemented in hardware have been reported with satisfactory results. However, in author's opinion, some of them are oversimplified and other considers ideal conditions, which are not satisfied in real-life situations. Therefore, this study proposes a methodology for the design and implementation of a EMS that has a global administrator, which defines the operation mode each PEC's controllers inside the DC-µG. Both controllers use National Instruments technology; indeed, the embedded EMS was used in an experimental DC-µG prototype that has two PAs, a BB and a bidirectional DC-AC converter to interconnect it. Experimental tests on DC-µG's behavior with the EMS were performed using electronic loads such as computer equipment, LED lamps and fluorescent lamps focusing on the behavior of the DC-link bus when connecting and disconnecting sources and loads which generate changes in the operating modes of each of the local controllers in charge of manipulating the PECs that make up the DC-µG.
The obtained results show stability in the DC-link bus due to the generated disturbances and to changes in the operating modes of the DC-µG components, advantages of this proposed system compared with reported literature is listed to follow. First, results obtained show that it is not necessary to include electrical components to the network for the connection and disconnection of energy sources and real loads. Second, the DC-µG state machine that controls the global manager considers six operating scenarios to stability of the DC bus, taking advantage of the maximum power of the PAs, balancing the energy generated and demanded by the elements that make up the DC -µG, and take care of the charging and discharging processes of the battery bank, thus increasing their useful life. Third, results presented focus on the behavior of the DC bus when connecting and disconnecting electronic sources and loads used daily, which shows robustness and stability, presenting transitory response times between 4 and 20 s with variations in voltage on the bus less than 5%. Finally, using the LabVIEW virtual instrumentation software (2015, National Instruments, USA) and the NI myRIO-1900 for the implementation of the global administrator and local controllers has virtues such as the generation of a user-friendly interface, which allows monitoring relevant variables of the DC-µG and modify parameters of the controllers in real time. Additionally, it has flexibility for the quick reconfiguration of the generated controllers, which enables the generation of more complex systems in a short time, adapting embedded systems to new experiments.
This work is organized as follows: In Section 2, the structure of the DC-µG used to evaluate the EMS under different scenarios is described. In Section 3, the control and management system (CMS) is described which establishes the mode of operation for each element of the DC-µG in order to extract the maximum energy from the PVEs. In Section 4, the results obtained are described to verify the behavior of the CMS embedded with the experimental prototype of the DC-µG, each of the PVEs was configured with the following parameters: V mpp = 120 V, V oc = 130 V, I mpp = 2 A and I sc = 3 A. Section 5, finally, presents a brief summary and conclusions of the obtained results.

DC Microgrid Structure
The DC-µG was designed to deal with a maximum power of 1 kW, with a DC-link bus of 190 V. The energy direction between sources and loads is shown with blue color lines Figure 1 and the experimental prototype is shown in Figure 2. The left part of Figure 1 shows two PAs emulated with two Agilent E4360A which were connected to a pair of 600 W DC-DC boost converters this section as the main energy source. On the other hand, in the right section of Figure 2, a bidirectional DC-AC converter allows to flow energy, in both directions, between the DC-µG to the MG. Additionally, a BB of 115 Ah and 120 V is connected to the DC-link bus by using a bidirectional buck-boost converter.
Energies 2020, 13, 4074 5 of 30 Finally, a supercapacitor bank of 0.230 F is directly linked to the DC-link bus, without converter, this bank allows to support the DC-link voltage during connection or disconnection of any µG section.
Energies 2020, 13, x FOR PEER REVIEW 5 of 30 type of electrical modification to be connected to the voltage bus of the proposed DC-µG. With these considerations, the PECs in charge of transferring energy between the different elements of the DC-µG were designed. It is important to mention that the reported research studies operate with DC buses in operating ranges between 190 V to 210 V [24,25].

DC-DC Boost Converter
As mentioned before, the main DC-µG sources, PAs, are two photovoltaic emulators (PVEs), those are connected to a pair of classical boost converters, Figure 3. The boosts converters were designed with a step-up relation of VµG⁄VPVE = 1.5 (VµG DC bus voltage, VPVE PVE voltage) and continuous conduction mode. These specifications allow to achieve 190 V in the maximum power point (MPP) and buy using [26], with a frequency of 40 kHz, the following data were obtained, L = 107 µH, C = 440 µF. It is necessary to mention that, in order to use of PVEs was required to provide the following parameters: voltage in the maximum power point (Vmpp), open-circuit voltage (Voc), current in the maximum power point (Impp) and short-circuit current (Isc). Additionally, those parameters rely on the µG's experimental tests. type of electrical modification to be connected to the voltage bus of the proposed DC-µG. With these considerations, the PECs in charge of transferring energy between the different elements of the DC-µG were designed. It is important to mention that the reported research studies operate with DC buses in operating ranges between 190 V to 210 V [24,25].

DC-DC Boost Converter
As mentioned before, the main DC-µG sources, PAs, are two photovoltaic emulators (PVEs), those are connected to a pair of classical boost converters, Figure 3. The boosts converters were designed with a step-up relation of VµG⁄VPVE = 1.5 (VµG DC bus voltage, VPVE PVE voltage) and continuous conduction mode. These specifications allow to achieve 190 V in the maximum power point (MPP) and buy using [26], with a frequency of 40 kHz, the following data were obtained, L = 107 µH, C = 440 µF. It is necessary to mention that, in order to use of PVEs was required to provide the following parameters: voltage in the maximum power point (Vmpp), open-circuit voltage (Voc), current in the maximum power point (Impp) and short-circuit current (Isc). Additionally, those parameters rely on the µG's experimental tests. The selection of the DC-µG bus voltage level is due to the operating characteristics of the loads connected to the bus, these are conventional electrical loads designed for connection to the AC MG with a universal input voltage range of 100-264 VAC according to manufacturer specifications, the objective of using these loads is to demonstrate that these types of nonlinear loads do not require any type of electrical modification to be connected to the voltage bus of the proposed DC-µG. With these considerations, the PECs in charge of transferring energy between the different elements of the DC-µG were designed. It is important to mention that the reported research studies operate with DC buses in operating ranges between 190 V to 210 V [24,25].

DC-DC Boost Converter
As mentioned before, the main DC-µG sources, PAs, are two photovoltaic emulators (PVEs), those are connected to a pair of classical boost converters, Figure 3. The boosts converters were designed with a step-up relation of V µG ⁄V PVE = 1.5 (V µG DC bus voltage, V PVE PVE voltage) and continuous conduction mode. These specifications allow to achieve 190 V in the maximum power point (MPP) and buy using [26], with a frequency of 40 kHz, the following data were obtained, L = 107 µH, C = 440 µF. It Energies 2020, 13, 4074 6 of 30 is necessary to mention that, in order to use of PVEs was required to provide the following parameters: voltage in the maximum power point (V mpp ), open-circuit voltage (V oc ), current in the maximum power point (I mpp ) and short-circuit current (I sc ). Additionally, those parameters rely on the µG's experimental tests.
Energies 2020, 13, x FOR PEER REVIEW 6 of 30  Figure 4 shows the designed bidirectional buck-boost converter. During the rectifier operation from MG to the DC-link, this converter provides energy to the DC loads, to the BB or both. On the other hand, during the inverter operation, it provides energy from the DC-link to the MG. This converter requires a capacitor Cbus, to stabilize the DC-link voltage. The minimum capacitance is given by:

Bidirectional DC-AC Converter
where Pout represents the output power, VµG,min the minimum DC bus voltage required to transfer energy to the MG and t1 the time interval given as where fgrid is the grid frequency, with a value of 60 Hz. On the AC side, an LCL filter is connected to the midpoints of inverter legs and is used to interface the DC-link to the MG. To design the LCL was followed the Official Mexican Norm (NOM) and the Mexican Electricity Commission (CFE), those are based on IEC 61727:2004. The filtering inductance is obtained as where n represents the number of levels of the inverter (+VµG, −VµG and 0), D the duty cycle, fsw the commutation frequency and ΔIf the ripple current. The criteria considered for the design of the filtering inductance is that ΔIf should be 10% of the nominal value of If. The Cf capacitance was designed to allow the maximum reactive power exchange. In this operation point the value were:  Figure 4 shows the designed bidirectional buck-boost converter. During the rectifier operation from MG to the DC-link, this converter provides energy to the DC loads, to the BB or both. On the other hand, during the inverter operation, it provides energy from the DC-link to the MG.  Figure 4 shows the designed bidirectional buck-boost converter. During the rectifier operation from MG to the DC-link, this converter provides energy to the DC loads, to the BB or both. On the other hand, during the inverter operation, it provides energy from the DC-link to the MG. This converter requires a capacitor Cbus, to stabilize the DC-link voltage. The minimum capacitance is given by:

Bidirectional DC-AC Converter
where Pout represents the output power, VµG,min the minimum DC bus voltage required to transfer energy to the MG and t1 the time interval given as where fgrid is the grid frequency, with a value of 60 Hz. On the AC side, an LCL filter is connected to the midpoints of inverter legs and is used to interface the DC-link to the MG. To design the LCL was followed the Official Mexican Norm (NOM) and the Mexican Electricity Commission (CFE), those are based on IEC 61727:2004. The filtering inductance is obtained as where n represents the number of levels of the inverter (+VµG, −VµG and 0), D the duty cycle, fsw the commutation frequency and ΔIf the ripple current. The criteria considered for the design of the filtering inductance is that ΔIf should be 10% of the nominal value of If. The Cf capacitance was designed to allow the maximum reactive power exchange. In this operation point the value were: This converter requires a capacitor C bus , to stabilize the DC-link voltage. The minimum capacitance is given by: where P out represents the output power, V µG,min the minimum DC bus voltage required to transfer energy to the MG and t 1 the time interval given as where f grid is the grid frequency, with a value of 60 Hz. On the AC side, an LCL filter is connected to the midpoints of inverter legs and is used to interface the DC-link to the MG. To design the LCL was followed the Official Mexican Norm (NOM) and the Mexican Electricity Commission (CFE), those are based on IEC 61727:2004. The filtering inductance is obtained as where n represents the number of levels of the inverter (+V µG , −V µG and 0), D the duty cycle, f sw the commutation frequency and ∆I f the ripple current. The criteria considered for the design of the filtering inductance is that ∆I f should be 10% of the nominal value of I f . The C f capacitance was designed to allow the maximum reactive power exchange. In this operation point the value were: The filter resonance frequency, f res , was given as where f res should be 0.5 times the commutation frequency and 10 times the fundamental frequency of the MG, to avoid any problems related with the resonance state of the LCL filter. This criterion is met by assigning values of 1 mH and 1 µF to L g and C f , respectively, and considering a 2% of the value obtained for C f [27]. As a result, a f res of 6.1 kHz was obtained.

Bidirectional DC-DC Converter
A traditional buck-boost DC-DC converter was used, and it is shown in Figure 5. In this kind of converter, the energy direction is controlled by firing S 1 and S 2 . In the step-down operation, DC-link to BB, S 1 is switching and S 2 is open. During the step-up operation, BB to DC-link, S 1 is open and S 2 is switching. The BB was made by connecting ten deep-cycle batteries CALE-SOLAR (CL-31 T/S-190 M) in series, each one with a voltage of 12 V and 115 Ah. Additionally, a passive equalization method was employed to guarantee the voltage balance between cells [28]. Table 1 shows the parameters to design the bidirectional DC-DC converter; Table 2 shows the determined parameters. The filter resonance frequency, fres, was given as where fres should be 0.5 times the commutation frequency and 10 times the fundamental frequency of the MG, to avoid any problems related with the resonance state of the LCL filter. This criterion is met by assigning values of 1 mH and 1 µF to Lg and Cf, respectively, and considering a 2% of the value obtained for Cf [27]. As a result, a fres of 6.1 kHz was obtained.

Bidirectional DC-DC Converter
A traditional buck-boost DC-DC converter was used, and it is shown in Figure 5. In this kind of converter, the energy direction is controlled by firing S1 and S2. In the step-down operation, DClink to BB, S1 is switching and S2 is open. During the step-up operation, BB to DC-link, S1 is open and S2 is switching. The BB was made by connecting ten deep-cycle batteries CALE-SOLAR (CL-31 T/S-190 M) in series, each one with a voltage of 12 V and 115 Ah. Additionally, a passive equalization method was employed to guarantee the voltage balance between cells [28]. Table 1 shows the parameters to design the bidirectional DC-DC converter; Table 2 shows the determined parameters.

Load Description
To evaluate the system under different scenarios, linear and nonlinear loads were used. A resistive load of 600 Ω was utilized as a linear load. On the contrary, three different nonlinear loads were used. The first one was a set of seven LED lamps of 23 W each one; the second was a group of four Louver light system with three fluorescent lamps of 28 W T5 each one (those included an electronic ballast); finally, a laptop with a maximum power of 300 W was employed.

Control and Management System
The proposed CMS consist of a general administrator and independent controllers, which operates different µG's systems. The general block system of the µG is shown in Figure 6. The black color represents the µG's systems and the blue color the different local controllers. Additionally, the global controller is shown in red color. More details about the different working modes and operation of the DC-µG are given in the following sections.
Energies 2020, 13, x FOR PEER REVIEW 8 of 30 four Louver light system with three fluorescent lamps of 28 W T5 each one (those included an electronic ballast); finally, a laptop with a maximum power of 300 W was employed.

Control and Management System
The proposed CMS consist of a general administrator and independent controllers, which operates different µG´s systems. The general block system of the µG is shown in Figure 6. The black color represents the µG´s systems and the blue color the different local controllers. Additionally, the global controller is shown in red color. More details about the different working modes and operation of the DC-µG are given in the following sections.

Global Management Controller
The global management controller (GMC) operates with the following six hierarchical scenarios: (1) to maintain the DC-link bus voltage in an operation range of 190 V ± 5%, (2) to consume the maximum energy from the PVE (to reduce the energy coming from the MG), (3) in the case of low load energy consumption and over generated energy from the PVE, the remained energy is stored in

Global Management Controller
The global management controller (GMC) operates with the following six hierarchical scenarios: (1) to maintain the DC-link bus voltage in an operation range of 190 V ± 5%, (2) to consume the maximum energy from the PVE (to reduce the energy coming from the MG), (3) in the case of low load energy consumption and over generated energy from the PVE, the remained energy is stored in the BB, (4) in the case of full charge of the BB or BB discharge, the generated energy is send to the MG, (5) in the case that the load's consumption is bigger than the generated energy from the PVE, the energy difference will be provided by the MG and (6) energy from BB will be used only when the MG is not available or in the case that the generated energy from the PVE and the MG are not enough to cope the demanded load energy.
These scenarios were considered for the design of the GMC in order to keep the DC bus stable, if the bus destabilizes or goes out of the established range, the connected loads could be damaged. On the other hand, it is of utmost importance to make the most of the renewable energy source that MG has. In addition, to defining the energy exchange between the BB and the MG loads, the cost of electrical energy was considered. It is more expensive to transfer energy to the BB than to the MG. Reason why, if there is a surplus of photovoltaic energy, this energy will be stored in the BB and not in the MG. Otherwise, if the loads connected to the DC bus demand more energy than that generated by the PVEs, the missing energy will be taken from the MG and not from the BB. Finally, for the BB charging and discharging process, it is considered that the processes must be completed to take care of the BB's useful life.
It can be noticed that the GMC works as a function of the DC-link bus voltage and the working operation mode of each µG section. During the startup, the PVEs are turned on and those work in the voltage control (VC) mode, in this period, the BB and the MG are turned off. Once the system reaches the steady state, the different loads are connected.
If the demanded load energy is greater than the generated by the PVEs, the DC-link voltage will decrease, in this situation if the voltage reaches a minimum of 183 V (2 V before the critical value of 180.5 V), the GMC changes the PVEs controller to a maximum power point tracking (MPPT), and it obtains the energy difference from the DC-AC rectifier. As a result, the DC-link voltage is stabilized and the load energy demand is handled. This operation mode is also used if the energy generated by the PVEs is not enough to supply the energy demanded by the loads connected to the bus. However, this operation mode can be changed if the BB is chosen to cope the energy difference or during lack of solar or MG energy.
On the other hand, if the µG is in steady state, with the PVEs working in VC mode, and the demanded power by loads in less than 80% of the DC-link maximum capacity, the GMC monitors the S • C of the BB and the MG with the main aim to change the PVE's operation mode to MPPT and send energy to the BB or the MG. In other words, the energy sent to the BB or the MG is the difference energy generated from the PVEs and the one demanded by loads.
If the BB is depleted or in charging mode, with a light load and the PVE energy is not available, the energy to charge the BB is obtained from the bidirectional DC-DC converter. On the contrary, if the BB is charged, with a light load and the PVE energy is available, the energy is sent to the MG by using the bidirectional DC-DC converter. Figure 7 shows the state machine diagram used in the GMC and Tables 3-7 show the transitions defined between states. Figure 8 presents the flow diagram of the behavior of the GMC. This diagram illustrates the priorities of the GMC. These priorities are based on the six hierarchical scenarios described at the beginning of this section. The priority of the GMC algorithm is to keep the DC bus voltage level within the established range, to extract the maximum power from the PVEs, if the energy demanded by the loads is greater than that generated by the PVEs, the missing energy is taken from the MG, if the MG is not available the energy is drawn from the BB. In the event that the energy demanded by the loads is less than that generated by the PVEs, the excess energy will be transferred to the BB, if the BB is charged or in the process of discharge, this energy will be transferred to the MG.          The state machine diagram used in µG has ten states, which are listed to follow: START, STATE 1, STATE 2, STATE 3, STATE 4, STATE 5, STATE 6, STATE 7, STATE 8 and STATE 9. For the overall states, there are defined three main systems: the PVE (PV), the BB DC-DC converter (DC-DC) and the bidirectional converter connected to the MG (DC-AC). For instance, if the GMC is in the START mode, the PV works in voltage control mode (VC), the DC-DC is turned off (OFF) and the DC-AC is also turned off (OFF). Another example is STATE 6, the PV works in the MPPT, the DC-DC as BOOST and the DC-AC as RECTIFIER. Tables 3-7 show the states transition tables; these have a section of entries that define the conditions for changing from the current state to the next. These inputs are the following signals that were monitored in the µG: the bus voltage level (Vbus), the power generated by the PVE (PV Power), the condition of the MG (MG) and the condition of the BB (Battery). Tables have an output section that defines the operation mode of the PECs and the condition of the local loads connected to the DC bus, these operation modes are the same as those defined in the state machine of Figure 7. For example, when the current state is START, if condition 1 is met, the next state will be START. In this condition Vbus must be greater than 185 V and less than 195 V, the PV Power must be greater than 800 W, here the MG and Battery status are not considered. In condition 12, Vbus must be less than 183 V, the PV Power must be greater than 800 W, just like the power extracted from the MG (MG), in addition Battery must be in the discharge process.

Local Controllers
The GMC defines the operation mode of each of the local controllers. While these are responsible for generating the control signals that are used in each of the PECs that make up the µG. The following describes the embedded control systems designed to keep the system stable.
The DC-DC boost converters connected to the PVEs have two operation modes: (1) the VC mode, and (2) the MPPT mode. In VC mode, a classic PI controller is responsible for maintaining the output voltage of the DC-DC converter (DC bus voltage) at a level of 190 V. This control mode only works when the BB and MG do not supply or extract power to the DC bus. Figure 9 illustrates the converter diagram with the PI controller; this controller monitors the converter output voltage level (V µG ) by performing corrective actions to eliminate the effects generated by system disturbances (connection and disconnection of loads to the bus of DC).
Energies 2020, 13, x FOR PEER REVIEW 13 of 30 that defines the operation mode of the PECs and the condition of the local loads connected to the DC bus, these operation modes are the same as those defined in the state machine of Figure 7. For example, when the current state is START, if condition 1 is met, the next state will be START. In this condition Vbus must be greater than 185 V and less than 195 V, the PV Power must be greater than 800 W, here the MG and Battery status are not considered. In condition 12, Vbus must be less than 183 V, the PV Power must be greater than 800 W, just like the power extracted from the MG (MG), in addition Battery must be in the discharge process.

Local Controllers
The GMC defines the operation mode of each of the local controllers. While these are responsible for generating the control signals that are used in each of the PECs that make up the µG. The following describes the embedded control systems designed to keep the system stable.
The DC-DC boost converters connected to the PVEs have two operation modes: (1) the VC mode, and (2) the MPPT mode. In VC mode, a classic PI controller is responsible for maintaining the output voltage of the DC-DC converter (DC bus voltage) at a level of 190 V. This control mode only works when the BB and MG do not supply or extract power to the DC bus. Figure 9 illustrates the converter diagram with the PI controller; this controller monitors the converter output voltage level (VµG) by performing corrective actions to eliminate the effects generated by system disturbances (connection and disconnection of loads to the bus of DC). The operating point on the characteristics of the PVE module primarily depends on the impedance matching of the PVE module regarding the connected load. A DC-DC converter between the PVE module and the DC bus acts as an interface to operate at MPP by changing the duty cycle of the converter generated by the MPPT controller. In the MPPT operation mode, the boost converters extract the maximum power of the PVEs using the perturb and observe (P&O) control algorithm illustrated in Figure 10. The conventional P&O MPPT algorithm is developed based on the slope (dP/dV) variation on the P-V characteristics of the PVE module [29]. In this algorithm, an initial value of the duty cycle is first defined, then the voltage and current of the PVE (VPVE and IPVE) are measured to calculate its supplied power, once the value of the current power (PNEW) is known, it is compared with the power obtained in the past iteration (PPRE), the current value of the duty cycle (DNEW) is also compared and is compared with the previous value of the same (DPRE), based on these comparisons an increase is defined (Duty +) or a decrease (Duty-) in the duty cycle; with this new value of the duty The operating point on the characteristics of the PVE module primarily depends on the impedance matching of the PVE module regarding the connected load. A DC-DC converter between the PVE module and the DC bus acts as an interface to operate at MPP by changing the duty cycle of the converter generated by the MPPT controller. In the MPPT operation mode, the boost converters extract the maximum power of the PVEs using the perturb and observe (P&O) control algorithm illustrated in Figure 10. The conventional P&O MPPT algorithm is developed based on the slope (d P /d V ) variation on the P-V characteristics of the PVE module [29]. In this algorithm, an initial value of the duty cycle is first defined, then the voltage and current of the PVE (V PVE and I PVE ) are measured to calculate its supplied power, once the value of the current power (P NEW ) is known, it is compared with the power obtained in the past iteration (P PRE ), the current value of the duty cycle (D NEW ) is also compared and is compared with the previous value of the same (D PRE ), based on these comparisons an increase is defined (Duty +) or a decrease (Duty-) in the duty cycle; with this new value of the duty cycle the process is repeated, always seeking to increase the value of the power supplied by the PVE. Figure 11 shows the diagram of the converter with the MPPT controller. The controller modifies the duty cycle of the power switch and monitors the changes in the voltage and current of the PVEs, always looking for an increase in the power extracted from the PVEs.  The bidirectional DC-AC converter used to interconnect the DC-µG with the MG can operate as a rectifier (transferring energy from the MG to the loads connected to the DC bus) or as an inverter (transferring energy from the DC bus to the MG). The block diagram of the control system implemented for the converter when operating as an inverter is presented in Figure 12. This controller has a PI control action in charge of defining the amplitude of the high frequency triangular signal  The bidirectional DC-AC converter used to interconnect the DC-µG with the MG can operate as a rectifier (transferring energy from the MG to the loads connected to the DC bus) or as an inverter (transferring energy from the DC bus to the MG). The block diagram of the control system implemented for the converter when operating as an inverter is presented in Figure 12. This controller has a PI control action in charge of defining the amplitude of the high frequency triangular signal The bidirectional DC-AC converter used to interconnect the DC-µG with the MG can operate as a rectifier (transferring energy from the MG to the loads connected to the DC bus) or as an inverter (transferring energy from the DC bus to the MG). The block diagram of the control system implemented for the converter when operating as an inverter is presented in Figure 12. This controller has a PI control action in charge of defining the amplitude of the high frequency triangular signal based on the voltage level of the DC bus, thereby modifying the amount of energy that is transferred to the MG. If the DC bus suffers a voltage drop, a reduction in the amplitude of the triangular signal is generated causing a decrease in the energy transferred to the MG and thus causing an increase in the bus voltage level. In case the bus suffers a voltage overcharge, the amplitude of the triangular signal is increased generating a surge in the energy that is transferred to the MG, thereby lessening the voltage level of the DC bus. The converter diagram with the controller is shown in Figure 13. The synchronization between the signal generated by the inverter and the MG is performed by the zero crossing detection modules and the second-order generalized integrators with frequency-locked loop (SOGI-FLL) algorithm, this when determined by the GMC. The control signals of the four switches of the complete bridge inverter are generated by comparing the output signal of the SOGI-FLL block with the triangular signal of 25 kHz frequency. When the DC-AC bidirectional converter works as a rectifier, the control system is carried out with a classic PI controller, which is responsible for stabilizing the bus voltage level at 190 V by increasing or decreasing the amplitude of the high frequency triangular signal ƒs which is compared with the low frequency sine wave signal u(t) as illustrated in Figure 14. The converter diagram with the controller is shown in Figure 13. The synchronization between the signal generated by the inverter and the MG is performed by the zero crossing detection modules and the second-order generalized integrators with frequency-locked loop (SOGI-FLL) algorithm, this when determined by the GMC. The control signals of the four switches of the complete bridge inverter are generated by comparing the output signal of the SOGI-FLL block with the triangular signal of 25 kHz frequency. The converter diagram with the controller is shown in Figure 13. The synchronization between the signal generated by the inverter and the MG is performed by the zero crossing detection modules and the second-order generalized integrators with frequency-locked loop (SOGI-FLL) algorithm, this when determined by the GMC. The control signals of the four switches of the complete bridge inverter are generated by comparing the output signal of the SOGI-FLL block with the triangular signal of 25 kHz frequency. When the DC-AC bidirectional converter works as a rectifier, the control system is carried out with a classic PI controller, which is responsible for stabilizing the bus voltage level at 190 V by increasing or decreasing the amplitude of the high frequency triangular signal ƒs which is compared with the low frequency sine wave signal u(t) as illustrated in Figure 14. When the DC-AC bidirectional converter works as a rectifier, the control system is carried out with a classic PI controller, which is responsible for stabilizing the bus voltage level at 190 V by increasing or decreasing the amplitude of the high frequency triangular signal f s which is compared with the low frequency sine wave signal u(t) as illustrated in Figure 14. When the DC-AC bidirectional converter works as a rectifier, the control system is carried out with a classic PI controller, which is responsible for stabilizing the bus voltage level at 190 V by increasing or decreasing the amplitude of the high frequency triangular signal ƒs which is compared with the low frequency sine wave signal u(t) as illustrated in Figure 14. The bidirectional DC-DC converter used to interconnect the DC bus with the BB is controlled by a PI controller similar to that used for VC in the PVE converter ( Figure 9). This control system has three modes of operation defined by the GMC based on the status of the PVEs, the MG, the electronic loads connected to the DC bus and the electrical charge status of the BB. In this operation mode, it is possible to transfer power from the MG to the BB, the bidirectional DC-DC converter works as a buck. For the control of the energy that is transferred to the BB, the controller operates with the electric current that is transferred to the BB. This electric current is defined by the power demanded from the DC-AC converter before transferring power to the BB, caring not to exceed the maximum capacity of the DC-AC converter designed to work at 1 kW; (3) Battery discharge: The PVEs work with the algorithm for the MPPT, the bidirectional DC-DC converter functions as a boost transferring power from the BB to the loads connected to the bus, while the MG is disabled. The controller operates based on the voltage level of the DC bus. If the voltage level decreases, the energy transferred from the BB to the DC bus increases; otherwise, if the voltage level increases, the energy transferred decreases.
The previously described cases were defined based on the following BB operating criteria: (1) the BB charging and discharging process must always be completed, (2) the constant current charging process ends until the BB takes a value of maximum voltage of 135 V (if the energy generated is not enough to transfer energy to the BB at constant current the available energy is transferred to the BB), (3) the constant voltage charging process ends when the current that is injected into the BB is less than 0.5 A and (4) the discharge process ends when the battery voltage is 100 V. It is important to mention that the bidirectional power converter used in the BB has a maximum capacity of 1 kW, for this reason, the maximum current that can be extracted or transferred to the bank is 10 A.

Experimental Results
To verify the behavior of the CMS embedded with the experimental prototype of the DC-µG, each of the PVEs was configured with the following parameters: V mpp = 120 V, V oc = 130 V, I mpp = 2 A and I sc = 3 A. During the experimental tests, this configuration was used, although the PVEs can operate under uncertainties, it was not the objective of this investigation.

PVEs' Ignition
Before activating the CMS, the PVEs are switched on, the DC bus has a resistive load of 116 W and the 0.23 F supercapacitor bank, the DC-DC and DC-AC bidirectional converters are disabled and the DC-DC boost converter behaves like a short circuit by directly connecting the PVEs with the resistive load and the supercapacitor bank. Figure 15 shows the response of the DC bus during the activating of the PVEs. The DC bus takes 6.4 s to reach a voltage of 131 V, this is due to the time it takes for the supercapacitor bank to absorb the PVEs energy.

PVEs in Voltage Control Mode, MG and BB Disabled
Once the DC bus stabilizes, the CMS is activated and the first operating condition is START, the MG and the BB remain disabled, while the PVEs converters work in VC mode. Figure 16 shows the response of the DC bus when activating the CMS, the VC needs 20 seconds to stabilize at the desired voltage level (190 V). When the CMC works in the START condition, the system is able to keep the DC bus stable in case of load changes, the PVEs are responsible for supplying the energy demanded by the loads while

PVEs in Voltage Control Mode, MG and BB Disabled
Once the DC bus stabilizes, the CMS is activated and the first operating condition is START, the MG and the BB remain disabled, while the PVEs converters work in VC mode. Figure 16 shows the response of the DC bus when activating the CMS, the VC needs 20 s to stabilize at the desired voltage level (190 V).

PVEs in Voltage Control Mode, MG and BB Disabled
Once the DC bus stabilizes, the CMS is activated and the first operating condition is START, the MG and the BB remain disabled, while the PVEs converters work in VC mode. Figure 16 shows the response of the DC bus when activating the CMS, the VC needs 20 seconds to stabilize at the desired voltage level (190 V). When the CMC works in the START condition, the system is able to keep the DC bus stable in case of load changes, the PVEs are responsible for supplying the energy demanded by the loads while the DC-DC boost converters operate in mode VC. Figure 17 shows the behavior when connecting a 115 W LED-type electronic lighting load, while Figure 18 shows the behavior when disconnecting the load. When the load is connected or disconnected, a drop and an overshoot of 1.5 V (0.78%) is When the CMC works in the START condition, the system is able to keep the DC bus stable in case of load changes, the PVEs are responsible for supplying the energy demanded by the loads while the DC-DC boost converters operate in mode VC. Figure 17 shows the behavior when connecting a 115 W LED-type electronic lighting load, while Figure 18 shows the behavior when disconnecting the load. When the load is connected or disconnected, a drop and an overshoot of 1.5 V (0.78%) is generated regarding the established voltage level of 190 V, the response has a transition time of 10 s.  A 300 W fluorescent luminaire was used in the experimental tests, Figure 19 illustrates the behavior of the DC bus when connecting the load, while Figure 20 shows the behavior when disconnecting it. When the load is connected, the bus has a voltage drop of 1.5 V (0.78%), while the load is disconnected there is an excess of 4.25 V (2.2%), both responses with a stabilization time of 4 seconds.  A 300 W fluorescent luminaire was used in the experimental tests, Figure 19 illustrates the behavior of the DC bus when connecting the load, while Figure 20 shows the behavior when disconnecting it. When the load is connected, the bus has a voltage drop of 1.5 V (0.78%), while the load is disconnected there is an excess of 4.25 V (2.2%), both responses with a stabilization time of 4 seconds. A 300 W fluorescent luminaire was used in the experimental tests, Figure 19 illustrates the behavior of the DC bus when connecting the load, while Figure 20 shows the behavior when disconnecting it. When the load is connected, the bus has a voltage drop of 1.5 V (0.78%), while the load is disconnected there is an excess of 4.25 V (2.2%), both responses with a stabilization time of 4 s. A 300 W fluorescent luminaire was used in the experimental tests, Figure 19 illustrates the behavior of the DC bus when connecting the load, while Figure 20 shows the behavior when disconnecting it. When the load is connected, the bus has a voltage drop of 1.5 V (0.78%), while the load is disconnected there is an excess of 4.25 V (2.2%), both responses with a stabilization time of 4 seconds.  To verify the behavior of the GMS in the limit of the START state a fluorescent load of 400 W was used. When connecting this load, the energy generated by the PVEs is equal to the energy demanded by the loads, in Figures 21 and 22 the bus behavior, when connecting and disconnecting the load, is presented. When the load is connected, the bus has a voltage drop of 3 V (1.57%) when disconnecting, it has an overshoot of 7.5 V (3.94%), in both cases there is a stabilization time of 10 seconds.  To verify the behavior of the GMS in the limit of the START state a fluorescent load of 400 W was used. When connecting this load, the energy generated by the PVEs is equal to the energy demanded by the loads, in Figures 21 and 22 the bus behavior, when connecting and disconnecting the load, is presented. When the load is connected, the bus has a voltage drop of 3 V (1.57%) when disconnecting, it has an overshoot of 7.5 V (3.94%), in both cases there is a stabilization time of 10 s. To verify the behavior of the GMS in the limit of the START state a fluorescent load of 400 W was used. When connecting this load, the energy generated by the PVEs is equal to the energy demanded by the loads, in Figures 21 and 22 the bus behavior, when connecting and disconnecting the load, is presented. When the load is connected, the bus has a voltage drop of 3 V (1.57%) when disconnecting, it has an overshoot of 7.5 V (3.94%), in both cases there is a stabilization time of 10 seconds.

DC-AC Converter Working as Rectifier, PVE's and BB Disabled
When PVEs are not available to generate power, the GMC has the priority of transferring power from the MG to the DC bus while keeping the BB disabled. The GMC enables the DC-AC converter to work as a rectifier with the control system illustrated in Figure 14. Figure 23 shows the behavior of the bus when enabling the converter, at this moment the supercapacitor bank absorbs energy from the MG and stabilizes at a voltage level of 144 V in a time of 12 seconds. Next, the GMC activates the rectifier controller by stabilizing the bus at the desired voltage level of 190 V (See Figure 24). The DC bus has a stabilization time of 12 seconds.

DC-AC Converter Working as Rectifier, PVE's and BB Disabled
When PVEs are not available to generate power, the GMC has the priority of transferring power from the MG to the DC bus while keeping the BB disabled. The GMC enables the DC-AC converter to work as a rectifier with the control system illustrated in Figure 14. Figure 23 shows the behavior of the bus when enabling the converter, at this moment the supercapacitor bank absorbs energy from the MG and stabilizes at a voltage level of 144 V in a time of 12 s. Next, the GMC activates the rectifier controller by stabilizing the bus at the desired voltage level of 190 V (See Figure 24). The DC bus has a stabilization time of 12 s.

DC-AC Converter Working as Rectifier, PVE's and BB Disabled
When PVEs are not available to generate power, the GMC has the priority of transferring power from the MG to the DC bus while keeping the BB disabled. The GMC enables the DC-AC converter to work as a rectifier with the control system illustrated in Figure 14. Figure 23 shows the behavior of the bus when enabling the converter, at this moment the supercapacitor bank absorbs energy from the MG and stabilizes at a voltage level of 144 V in a time of 12 seconds. Next, the GMC activates the rectifier controller by stabilizing the bus at the desired voltage level of 190 V (See Figure 24). The DC bus has a stabilization time of 12 seconds.   For this case, the same loads were used as in the previous case, presenting the behavior of the DC bus before the connection (Con) and disconnection (Discon) of these loads, in Figures    For this case, the same loads were used as in the previous case, presenting the behavior of the DC bus before the connection (Con) and disconnection (Discon) of these loads, in Figures   For this case, the same loads were used as in the previous case, presenting the behavior of the DC bus before the connection (Con) and disconnection (Discon) of these loads, in Figures

Disabled PVEs, MG Supplying Energy to the Loads and the BB
When the MG is supplying power to the loads connected to the DC bus and the power is less than 1 kW, the remaining energy is transferred to the BB (PBB = 1 kW-PLOADS). The control of the energy that is transferred to the BB is determined by the current that is injected into the BB (the setpoint of this power is determined from the PBB), in this operation mode the bidirectional DC-DC converter works as a buck. Figure 31 shows the behavior of the DC bus and the power that is injected into the BB when activating the DC-DC bidirectional converter as a buck. When activating the energy transfer to the BB, the DC bus has a voltage drop of 1.65 V (0.86%), while the power injected into the BB takes the desired level of 3 A, this transition has a stabilization time of 10 seconds. When energy is being transferred to the BB and it is charged at 80%, the power injected into the BB is canceled. Figure 32 shows the behavior of the current and the DC bus at the time of changing the operating mode. At the time of the transition, the DC bus has a 2.5 V (1.31%) overshoot with a stabilization time of 4 seconds.

Disabled PVEs, MG Supplying Energy to the Loads and the BB
When the MG is supplying power to the loads connected to the DC bus and the power is less than 1 kW, the remaining energy is transferred to the BB (PBB = 1 kW-PLOADS). The control of the energy that is transferred to the BB is determined by the current that is injected into the BB (the setpoint of this power is determined from the PBB), in this operation mode the bidirectional DC-DC converter works as a buck. Figure 31 shows the behavior of the DC bus and the power that is injected into the BB when activating the DC-DC bidirectional converter as a buck. When activating the energy transfer to the BB, the DC bus has a voltage drop of 1.65 V (0.86%), while the power injected into the BB takes the desired level of 3 A, this transition has a stabilization time of 10 seconds. When energy is being transferred to the BB and it is charged at 80%, the power injected into the BB is canceled. Figure 32 shows the behavior of the current and the DC bus at the time of changing the operating mode. At the time of the transition, the DC bus has a 2.5 V (1.31%) overshoot with a stabilization time of 4 seconds.

Disabled PVEs, MG Supplying Energy to the Loads and the BB
When the MG is supplying power to the loads connected to the DC bus and the power is less than 1 kW, the remaining energy is transferred to the BB (P BB = 1 kW-P LOADS ). The control of the energy that is transferred to the BB is determined by the current that is injected into the BB (the setpoint of this power is determined from the P BB ), in this operation mode the bidirectional DC-DC converter works as a buck. Figure 31 shows the behavior of the DC bus and the power that is injected into the BB when activating the DC-DC bidirectional converter as a buck. When activating the energy transfer to the BB, the DC bus has a voltage drop of 1.65 V (0.86%), while the power injected into the BB takes the desired level of 3 A, this transition has a stabilization time of 10 s. When energy is being transferred to the BB and it is charged at 80%, the power injected into the BB is canceled. Figure 32 shows the behavior of the current and the DC bus at the time of changing the operating mode. At the time of the transition, the DC bus has a 2.5 V (1.31%) overshoot with a stabilization time of 4 s.

PVEs Supplying Energy to the Loads and to BB and Disabled MG
Another way to transfer energy to the BB is to use excess energy from the PVEs. In this state, the energy transferred to the BB is determined by PBB = PPVEs − PLOADS. If the control of the DC-DC

PVEs Supplying Energy to the Loads and to BB and Disabled MG
Another way to transfer energy to the BB is to use excess energy from the PVEs. In this state, the energy transferred to the BB is determined by PBB = PPVEs − PLOADS. If the control of the DC-DC

PVEs Supplying Energy to the Loads and to BB and Disabled MG
Another way to transfer energy to the BB is to use excess energy from the PVEs. In this state, the energy transferred to the BB is determined by P BB = P PVEs − P LOADS . If the control of the DC-DC converters of the PVEs is in VC mode and the extracted power is less than 80% of the maximum power, the GMC modifies its operating state, changing the VC mode to the MPPT mode in the converters of the PVEs and activating the control for the bidirectional DC-DC converter of the BB in buck mode. Figure 33 illustrates the behavior of the DC bus and the current (power) that is injected into the BB. When changing state, the bus suffers a voltage drop of 8.75 V (4.6%) with a stabilization time of 6 s, while the current takes its maximum value in 3 s. The current has constant variations because the control algorithm for the MPPT is responsible for disturbing the energy generated by the PVEs, which affects the injected current to the BB and the DC bus. Figure 34 shows the behavior of the same signals when the BB stops transferring energy.
Energies 2020, 13, x FOR PEER REVIEW 25 of 30 converters of the PVEs is in VC mode and the extracted power is less than 80% of the maximum power, the GMC modifies its operating state, changing the VC mode to the MPPT mode in the converters of the PVEs and activating the control for the bidirectional DC-DC converter of the BB in buck mode. Figure 33 illustrates the behavior of the DC bus and the current (power) that is injected into the BB. When changing state, the bus suffers a voltage drop of 8.75 V (4.6%) with a stabilization time of 6 seconds, while the current takes its maximum value in 3 seconds. The current has constant variations because the control algorithm for the MPPT is responsible for disturbing the energy generated by the PVEs, which affects the injected current to the BB and the DC bus. Figure 34 shows the behavior of the same signals when the BB stops transferring energy.  To recognize the dynamic response of the BB in the charging process, the bidirectional converter was used in buck mode, this converter takes the electrical energy generated by the PVEs and transfers it to the BB. When the BB is fully discharged, the constant current charge is carried out maintaining a current (power) level of 8.8 A (because the maximum capacity of the bidirectional DC-DC converter is 1 kW), as the time passes the BB voltage tends to increase up to a voltage level of 135 V, at this moment the control changes to constant voltage mode, decreasing the current that is transferred to the BB. The BB is considered to be fully charged when the current supplied is 500 mA. Figure 35 illustrates the behavior of the BB voltage while charging in constant power mode and voltage, the charge in constant power mode has a duration of 8 hours, while the charge in constant voltage mode was 8.5 hours. The behavior of the current in both modes is illustrated in Figure 36. converters of the PVEs is in VC mode and the extracted power is less than 80% of the maximum power, the GMC modifies its operating state, changing the VC mode to the MPPT mode in the converters of the PVEs and activating the control for the bidirectional DC-DC converter of the BB in buck mode. Figure 33 illustrates the behavior of the DC bus and the current (power) that is injected into the BB. When changing state, the bus suffers a voltage drop of 8.75 V (4.6%) with a stabilization time of 6 seconds, while the current takes its maximum value in 3 seconds. The current has constant variations because the control algorithm for the MPPT is responsible for disturbing the energy generated by the PVEs, which affects the injected current to the BB and the DC bus. Figure 34 shows the behavior of the same signals when the BB stops transferring energy.  To recognize the dynamic response of the BB in the charging process, the bidirectional converter was used in buck mode, this converter takes the electrical energy generated by the PVEs and transfers it to the BB. When the BB is fully discharged, the constant current charge is carried out maintaining a current (power) level of 8.8 A (because the maximum capacity of the bidirectional DC-DC converter is 1 kW), as the time passes the BB voltage tends to increase up to a voltage level of 135 V, at this moment the control changes to constant voltage mode, decreasing the current that is transferred to the BB. The BB is considered to be fully charged when the current supplied is 500 mA. Figure 35 illustrates the behavior of the BB voltage while charging in constant power mode and voltage, the charge in constant power mode has a duration of 8 hours, while the charge in constant voltage mode was 8.5 hours. The behavior of the current in both modes is illustrated in Figure 36. To recognize the dynamic response of the BB in the charging process, the bidirectional converter was used in buck mode, this converter takes the electrical energy generated by the PVEs and transfers it to the BB. When the BB is fully discharged, the constant current charge is carried out maintaining a current (power) level of 8.8 A (because the maximum capacity of the bidirectional DC-DC converter is 1 kW), as the time passes the BB voltage tends to increase up to a voltage level of 135 V, at this moment the control changes to constant voltage mode, decreasing the current that is transferred to the BB. The BB is considered to be fully charged when the current supplied is 500 mA. Figure 35 illustrates the behavior of the BB voltage while charging in constant power mode and voltage, the charge in constant

BB Supplying Energy to the Loads, Disabled PVEs and MG
After conducting experimental tests of the BB's charge, obtaining energy from the MG and the PVEs, the behavior of the BB's charging and discharging process is presented. For these tests, a load was connected to the DC bus that requires a constant power of 1 kW (maximum power of the µG), while the bidirectional converter works in boost mode keeping the voltage of the DC bus at 190 V. The behavior of the BB voltage with an initial voltage of 121.2 V is shown in Figure 37; as time passes, the BB voltage decreases and this generates an increase in the current delivered by the BB (See Figure  38), this due to a constant power of 1 kW being demanded for the load connected to the bus. Figure  38 presents the behavior of the BB current at the discharge. The discharge was carried out until the BB voltage dropped to a level of 100 V, so as not to damage the BB following the specifications given by the manufacturer. Under these conditions, the DC-DC converter was able to maintain the voltage level of the DC bus at a level of 190 V while supplying power at a 1 kW load for approximately 10 hours until the BB was discharged.

BB Supplying Energy to the Loads, Disabled PVEs and MG
After conducting experimental tests of the BB's charge, obtaining energy from the MG and the PVEs, the behavior of the BB's charging and discharging process is presented. For these tests, a load was connected to the DC bus that requires a constant power of 1 kW (maximum power of the µG), while the bidirectional converter works in boost mode keeping the voltage of the DC bus at 190 V. The behavior of the BB voltage with an initial voltage of 121.2 V is shown in Figure 37; as time passes, the BB voltage decreases and this generates an increase in the current delivered by the BB (See Figure  38), this due to a constant power of 1 kW being demanded for the load connected to the bus. Figure  38 presents the behavior of the BB current at the discharge. The discharge was carried out until the BB voltage dropped to a level of 100 V, so as not to damage the BB following the specifications given by the manufacturer. Under these conditions, the DC-DC converter was able to maintain the voltage level of the DC bus at a level of 190 V while supplying power at a 1 kW load for approximately 10 hours until the BB was discharged.

BB Supplying Energy to the Loads, Disabled PVEs and MG
After conducting experimental tests of the BB's charge, obtaining energy from the MG and the PVEs, the behavior of the BB's charging and discharging process is presented. For these tests, a load was connected to the DC bus that requires a constant power of 1 kW (maximum power of the µG), while the bidirectional converter works in boost mode keeping the voltage of the DC bus at 190 V. The behavior of the BB voltage with an initial voltage of 121.2 V is shown in Figure 37; as time passes, the BB voltage decreases and this generates an increase in the current delivered by the BB (See Figure 38), this due to a constant power of 1 kW being demanded for the load connected to the bus. Figure 38 presents the behavior of the BB current at the discharge. The discharge was carried out until the BB voltage dropped to a level of 100 V, so as not to damage the BB following the specifications given by the manufacturer. Under these conditions, the DC-DC converter was able to maintain the voltage level of the DC bus at a level of 190 V while supplying power at a 1 kW load for approximately 10 h until the BB was discharged. 38), this due to a constant power of 1 kW being demanded for the load connected to the bus. Figure  38 presents the behavior of the BB current at the discharge. The discharge was carried out until the BB voltage dropped to a level of 100 V, so as not to damage the BB following the specifications given by the manufacturer. Under these conditions, the DC-DC converter was able to maintain the voltage level of the DC bus at a level of 190 V while supplying power at a 1 kW load for approximately 10 hours until the BB was discharged.

PVEs Supplying Power to the Loads and the MG, Disabled BB
In this test, the interconnection of the DC-µG with the MG is generated. In this condition the PVEs operate with the control algorithm for the MPPT and the DC-AC converter is enabled as an inverter transferring energy from the PVEs to the MG. In this way, the remaining energy between the energy generated by the PVEs and the energy consumed by the loads connected to the DC bus (PMG = PPVEs − PLOADS) is transferred to the MG. During the interconnection with the MG the voltage level of the DC bus suffers a drop of 2.2% with a duration of the transitory response of 6 seconds. Figure 39 shows the AC output voltage-current oscillogram of the inverter interconnected with the MG supplying 320 W. This image illustrates the AC voltage and power signals when performing the energy transfer; In addition, the instantaneous power being supplied to the AC MG and the power factor are displayed.

Conclusions
This study shows the design and implementation of a management and control system applied

PVEs Supplying Power to the Loads and the MG, Disabled BB
In this test, the interconnection of the DC-µG with the MG is generated. In this condition the PVEs operate with the control algorithm for the MPPT and the DC-AC converter is enabled as an inverter transferring energy from the PVEs to the MG. In this way, the remaining energy between the energy generated by the PVEs and the energy consumed by the loads connected to the DC bus (P MG = P PVEs − P LOADS ) is transferred to the MG. During the interconnection with the MG the voltage level of the DC bus suffers a drop of 2.2% with a duration of the transitory response of 6 s. Figure 39 shows the AC output voltage-current oscillogram of the inverter interconnected with the MG supplying 320 W. This image illustrates the AC voltage and power signals when performing the energy transfer; In addition, the instantaneous power being supplied to the AC MG and the power factor are displayed.

PVEs Supplying Power to the Loads and the MG, Disabled BB
In this test, the interconnection of the DC-µG with the MG is generated. In this condition the PVEs operate with the control algorithm for the MPPT and the DC-AC converter is enabled as an inverter transferring energy from the PVEs to the MG. In this way, the remaining energy between the energy generated by the PVEs and the energy consumed by the loads connected to the DC bus (PMG = PPVEs − PLOADS) is transferred to the MG. During the interconnection with the MG the voltage level of the DC bus suffers a drop of 2.2% with a duration of the transitory response of 6 seconds. Figure 39 shows the AC output voltage-current oscillogram of the inverter interconnected with the MG supplying 320 W. This image illustrates the AC voltage and power signals when performing the energy transfer; In addition, the instantaneous power being supplied to the AC MG and the power factor are displayed.

Conclusions
This study shows the design and implementation of a management and control system applied to an experimental prototype of a DC-µG for a maximum power of 1 kW with a DC bus with a voltage level 190 V, which can operate isolated or interconnected with the MG. The proposed DC-µG is made up of two photovoltaic systems, a complete bridge inverter, a BB and electronic loads (LED-type,

Conclusions
This study shows the design and implementation of a management and control system applied to an experimental prototype of a DC-µG for a maximum power of 1 kW with a DC bus with a voltage level 190 V, which can operate isolated or interconnected with the MG. The proposed DC-µG is made up of two photovoltaic systems, a complete bridge inverter, a BB and electronic loads (LED-type, fluorescent and computer equipment). For the administration and control of energy in the DC-µG, an EMS was implemented on the NI myRIO-1900 platform using the LabVIEW virtual programming software for the design of the EMS.
In the experimental results, the operation of the DC-µG is presented under principle operating conditions, all of them with the objective of evaluating the response of the DC bus to disturbances caused by the connection and disconnection of energy sources and real electronic loads. Throughout the different tests carried out, it was observed that the voltage bus of the proposed DC-µG remains within the operating range established in the design, and in each case the transitory response time ranged between 4 and 20 s. These periods are suitable for the design of the DC-µG because the voltage peaks and drops in the DC bus do not exceed 5% of the nominal value of the bus, this period is defined by the capacitance that the bus presents, that increased with the use of the bank of supercapacitors. This can result in the proposed bus voltage of the DC-µG being able to achieve short-term stability after being exposed to different disturbances. In addition, in the experiments performed, no inconvenience was observed in the operation of the power converters, so it is suggested that it is possible to extrapolate the design of the proposed DC-µG to a higher power.
Our proposal for administration and energy control of a DC-µG based on a state machine that presents response times similar to those shown in [30]. The authors obtained times between 4 and 37 s in 15 different operation modes using a supervisory control based on a state machine to satisfy the energy demand of an AC/DC µG and a FC to maintain the S • C of a BB. The effectiveness of the proposed was evaluated through extensive numeric simulations.
During the experiments that were carried out in this research, problems related to system instability caused by the dynamic interaction of the converters and/or impedances were not observed. For the design of the PECs, design techniques such as the one reported by [31] were used, taking into account whether the PEC commutes at a frequency at least ten times greater than the dynamics of the output voltage (or current), the switching noise is not mixed. The control technique used in parallel converters, in addition to the ratio of the impedances of the input/output sources contributed to the dynamics [32]. However, for future studies, a stability study, under conditions of higher power and a greater number of distributed generations (DGs) and loads, is necessary to ensure stability in certain interaction scenarios in the MG. If the noise is present in the complete system, a stability analysis can be done using the impedance of the source output filter and the input filter of the loads to find the loop with the lowest gain and evaluate it against criteria such as phase gain-phase margin or others [33][34][35].
Finally, for further study, the dimensioning of the components of the DC-µG proposed in order to make it economically viable will be considered. The methodology proposed by [36] is viable for this purpose because it demonstrates the effectiveness of a sizing method based on genetic algorithms applied to EMS similar to that proposed in this article. From the point of view of power electronics, the increase in the number of DGs represents a greater number of switched power converters. Dynamics under voltage drop conditions could present a problem in the stability of the DC bus.