Digital Adaptive Hysteresis Current Control for Multi-Functional Inverters

This paper proposes a digital adaptive hysteresis current control method for multi-functional inverters in a power-flow control device called digital grid router. Each inverter can be controlled in master, grid-connected, or stand-alone modes, which can be specified by the controller. While the popular linear sine-triangle pulse width modulation (SPWM) control technique requires complicated proportional-integral (PI) regulators with an unavoidable time delay, hysteresis current control has a simple structure, fast responses, and robustness due to its independent system of parameters. Since the hysteresis current control method controls the output current stay around the reference current directly, in the multi-functional inverter, the reference output is not given by a current directly. Thus, the reference current used to implement the hysteresis current control in this study is calculated from the given reference voltage or power in each control mode. The controller uses high-speed sampled data at MHz level and is implemented by using a field-programmable gate array (FPGA). Experimental results show good performances of the proposed controller in controlling power exchanges in the digital grid router.


Introduction
Nowadays, distributed energy resources have become a solution to address energy security concerns, quality of power grids, and greenhouse gas emission standards in most countries [1,2]. The power grid has been developed with various distributed small sources, such as fuel turbines, gas, diesel, and renewable energy generations including photovoltaic, wind turbine, etc. However, these distributed generations cause problems such as voltage rise and instability problems in the power grid. The interconnection between these sources may increase the risk of cascading failures because any imbalance in the power grid may propagate quickly over a wide area [3,4]. Furthermore, it is difficult for the conventional grid architecture to maintain the supply-demand balance with the variations caused by the increase of renewable and variable energy generations [5,6].
In order to accept more and more renewable energy by enhancing the reliability of the conventional power grid, a concept called digital grid has been proposed [6]. In the digital grid system, the large scale synchronized current power system is divided into multiple smaller power systems called digital grid cells. The digital grid cells are connected together and connected to the current grid asynchronously via a digital grid router (DGR). The DGR identified by its media access control (MAC) address can send power packets to any location over existing transmission lines or by using other sub-grids with a peer-to-peer power network.
The DGR is composed of multiple AC/DC/AC multi-functional inverters connecting to a common DC bus. This structure allows the DGR to transmit the power-packets between the various distributed electrical sources, the load, and the power grid asynchronously. The functions of each inverter are changed just by the control algorithm, regardless of the inverter circuit. Thus, the controller for each inverter in the DGR plays an important role in accommodating router legs with electrical power.
Among various current control techniques for inverters, the hysteresis current control technique is used in many applications of switching inverters due to its simplicity in implementation. The popular linear sine-triangle pulse width modulation (SPWM) technique has a disadvantage of requiring a complicated proportional-integral (PI) regulator with an unavoidable delay. On the other hand, hysteresis current control has fast responses and robustness due to its independent of system parameters [7,8]. The switching signals of the hysteresis current control are derived by comparing the actual hysteresis current with the reference current bounded by a band. In the classical hysteresis control technique, the hysteresis current band is fixed to a certain value. This makes the switching frequency vary to retain the hysteresis current within the hysteresis current band and leads to unwanted resonance in the output current [9]. In order to solve this problem, an adaptive hysteresis current control, which has the hysteresis current band controlled adaptively to maintain the switching frequency at a constant value, has been proposed. In the adaptive hysteresis current control, the hysteresis current band is not fixed at a constant value but calculated using the measured output voltage during each switching modulation period [10,11].
Since a digital controller usually requires an efficient high sampling frequency at MHz level to control the hysteresis current with an accurate switching time, it is difficult to implement the hysteresis current control on a conventional microcomputer or digital signal processor (DSP), which have the sampling frequency at kHz level [12,13]. However, calculations for such the high sampling frequency can be implemented on a high-speed field programmable gate array (FPGA), which is being used in more and more applications of the inverter control. In this study, we propose a control method for the multi-functional inverter in the DGR using FPGA-based digital adaptive hysteresis current control. This paper is organized as follows: the concepts of the digital grid system and digital grid router are introduced in Section 2. The adaptive hysteresis current control method is presented in Section 3. The adaptive hysteresis current control for multi-functional inverters is proposed in Section 4. The experimental results showing the good performances of the proposed control method are in Section 5. Conclusions are presented in Section 6.

Digital Grid and Digital Grid Router
The conception of the digital grid system is dividing the large scale synchronized current power system into multiple smaller asynchronous digital grid cells connecting to the current main grid, to each other, and to other power sources using the power routers DGR as shown in Figure 1 [14]. The DGR receives the electrical trading results from the trading system and control the power flow between the equipment connecting to the cell. The renewable energy sources controlled by the DGR generate powers based on the electrical trading results so that their effects on the main grid can be increased. The stability of the main grid also can be supported by the energy storages such as batteries in the digital grid cells. The DGR is composed of multi-functional inverters connected to an internal DC bus, which is controlled at a constant voltage by one of the connected inverter. A software-based digital controller enables the multi-functional inverter to connect to various power sources within the cell or connect to other cells via a sub-grid flexibility.
The Japanese power grid can be considered as an example for the digital grid concept. The Japanese grid is composed of three independent power grids connected by two AC/DC/AC power conversion stations. The peak demand of the North, East, and West grids are 5.4 GW, 113 GW, and 66 GW respectively. The capacity of the power conversion station between the North and the East grids is 0.6 GW, and the one between the East and the West grids is 1 GW. The North and the East grids have their frequency at 50 Hz, while the West grid has its frequency at 60 Hz [15]. The digital grid concept can also be adapted to US or Europe regions, which are composed of various asynchronous grids that are similar to the case of Japan. The electrical trading in the digital grid system is based on the demand and supply of the users, which are predicted by the trading system. The states of all power sources and loads connecting to the DGR are sent to the trading system on the cloud by using a communication networks such as Wi-Fi or 4G network. The transactions of the electrical trading system can be implemented automatically using the smart-contracts, an application of the block-chain technology. The trading strategy can be specified by the users and be implemented by a price-matching algorithm likes the Zaraba method [16] used in stock markets. The digital grid system composed of the power flow controller DGR and the autonomous trading system is expected to yield a free market with various players and enhance the power grid under the instability caused by the peak-demand cutting and demand-response matching issues.
The remaining parts of this paper will focus on the method to control the multi-functional inverters in the DGR.

Adaptive Hysteresis Current Control
Consider a half-bridge inverter circuit, which has two constant and balanced DC sources as shown in Figure 2. Each of the DC sources has a voltage of dc V . Parameters C , L , and g L represent the capacitance of the hysteresis current filter, the output inductance, and the grid-connected inductance, respectively. Assume that the output current o i of the inverter needs to be controlled to track a specified reference current ref i . The digital controller uses data from voltage and current sensors sent through analog/digital converters to calculate the on/off pulses of the switches 1 S and 2 S .
In the classical hysteresis current control technique, the hysteresis current band is usually fixed to a certain value S is turned on, the switch 2 S is turned off and the hysteresis current is increased to come back into the current band, as seen in Figure 3 [17]. The electrical trading in the digital grid system is based on the demand and supply of the users, which are predicted by the trading system. The states of all power sources and loads connecting to the DGR are sent to the trading system on the cloud by using a communication networks such as Wi-Fi or 4G network. The transactions of the electrical trading system can be implemented automatically using the smart-contracts, an application of the block-chain technology. The trading strategy can be specified by the users and be implemented by a price-matching algorithm likes the Zaraba method [16] used in stock markets. The digital grid system composed of the power flow controller DGR and the autonomous trading system is expected to yield a free market with various players and enhance the power grid under the instability caused by the peak-demand cutting and demand-response matching issues.
The remaining parts of this paper will focus on the method to control the multi-functional inverters in the DGR.

Adaptive Hysteresis Current Control
Consider a half-bridge inverter circuit, which has two constant and balanced DC sources as shown in Figure 2. Each of the DC sources has a voltage of V dc . Parameters C, L, and L g represent the capacitance of the hysteresis current filter, the output inductance, and the grid-connected inductance, respectively. Assume that the output current i o of the inverter needs to be controlled to track a specified reference current i re f . The digital controller uses data from voltage and current sensors sent through analog/digital converters to calculate the on/off pulses of the switches S 1 and S 2 .
In the classical hysteresis current control technique, the hysteresis current band is usually fixed to a certain value ∆i b . While the actual hysteresis current i L is within the hysteresis current band, states of the switches are unchanged. When the hysteresis current i L is equal to or greater than the upper limit of the current band i re f + ∆i b , the switch S 1 is turned off and the switch S 2 is turned on to decrease the hysteresis current. In contrast, when the hysteresis current i L is equal to or less than the lower limit of the current band i re f − ∆i b , the switch S 1 is turned on, the switch S 2 is turned off and the hysteresis current is increased to come back into the current band, as seen in Figure 3 [17].  As mentioned in the introduction session, the fixed band hysteresis current control technique has many advantages in fast and stable response, simplicity, and independent of system parameters. However, a drawback of this technique is the non-constant switching frequency, that may lead to unwanted heavy interferences [18]. The adaptive hysteresis current control technique, which can achieve the constant switching frequency, has been presented in the pieces of literature [19][20][21]. The hysteresis current band in this technique is calculated adaptively using the measured output voltage and the desired constant switching frequency as: For digital control systems, where the voltage and current are sampled by analog/digital converters (ADCs), the hysteresis current band in Equation (2) under zero-order-holds (ZOHs) can be written by: Single-phase half-bridge inverter circuit.  As mentioned in the introduction session, the fixed band hysteresis current control technique has many advantages in fast and stable response, simplicity, and independent of system parameters. However, a drawback of this technique is the non-constant switching frequency, that may lead to unwanted heavy interferences [18]. The adaptive hysteresis current control technique, which can achieve the constant switching frequency, has been presented in the pieces of literature [19][20][21]. The hysteresis current band in this technique is calculated adaptively using the measured output voltage and the desired constant switching frequency as: For digital control systems, where the voltage and current are sampled by analog/digital converters (ADCs), the hysteresis current band in Equation (2) under zero-order-holds (ZOHs) can be written by: Figure 3. Hysteresis current control. Figure 3 is filtered by the ripple current filter C. As a result of this filter, the output current i o can track the reference current i re f without the ripple component.

Remark 1. The ripple component of the hysteresis current i L in
As mentioned in the introduction session, the fixed band hysteresis current control technique has many advantages in fast and stable response, simplicity, and independent of system parameters. However, a drawback of this technique is the non-constant switching frequency, that may lead to unwanted heavy interferences [18]. The adaptive hysteresis current control technique, which can achieve the constant switching frequency, has been presented in the pieces of literature [19][20][21]. The hysteresis current band in this technique is calculated adaptively using the measured output voltage and the desired constant switching frequency as: where f sw is the constant switching frequency. The reference current i re f (t) is slowly varying during the modulation period, such that the hysteresis current band in Equation (1) can be approximated as: For digital control systems, where the voltage and current are sampled by analog/digital converters (ADCs), the hysteresis current band in Equation (2) under zero-order-holds (ZOHs) can be written by:

Hysteresis Current Control for Multi-Functional Inverter
In this work, the adaptive hysteresis current control is used to control the multi-functional inverters composing the DGR. In the hysteresis current control method, the hysteresis current is controlled to stay in a tolerance band around the reference current directly. However, in multi-functional inverters, the reference output is not given by a reference current directly, but by a reference voltage or power. Thus, we need to calculate the reference current from the given voltage or power. The reference currents for the three main modes of the multi-functional inverter used in the DGR: stand-alone, grid-connected, and master modes, are calculated as below.

Stand-Alone Mode
In stand-alone mode, the inverter is unconnected to the grid as shown in Figure 4. The inverter receives electrical power from the DC sources to supply a given reference output voltage for a load. This reference voltage may be an AC or DC voltage.
, and sp T is a sampling interval.

Hysteresis Current Control for Multi-Functional Inverter
In this work, the adaptive hysteresis current control is used to control the multi-functional inverters composing the DGR. In the hysteresis current control method, the hysteresis current is controlled to stay in a tolerance band around the reference current directly. However, in multi-functional inverters, the reference output is not given by a reference current directly, but by a reference voltage or power. Thus, we need to calculate the reference current from the given voltage or power. The reference currents for the three main modes of the multi-functional inverter used in the DGR: stand-alone, grid-connected, and master modes, are calculated as below.

Stand-Alone Mode
In stand-alone mode, the inverter is unconnected to the grid as shown in Figure 4. The inverter receives electrical power from the DC sources to supply a given reference output voltage for a load. This reference voltage may be an AC or DC voltage. v ± Δ directly, to control the output voltage track to a given reference voltage ref v . However, comparing with the linear response of the current, the voltage responses to the switching modulation too slowly. It makes the ripple voltage cross over the hysteresis voltage bands and the switching frequency is difficult to be controlled [22].
In this work, the hysteresis current control technique is applied to control the output voltage of the inverter indirectly. The reference current used for hysteresis current control can be calculated from the given reference voltage is as below.
Using the Kirchhoff's circuit laws for the circuit as shown in Figure 4, we can calculate the reference current flows through the output inductance L at the sampled-instant kT by a sum of the output current o i and the ripple current C i as: The ripple current C i is conducted by the difference between the measured output voltage and the reference output voltage in each switching period sw T as the following equation: Using the mind of the hysteresis current control, one may think the hysteresis voltage control algorithm, where the switches are controlled comparing the output voltage v o with tolerance voltage bands v re f ± ∆v b directly, to control the output voltage track to a given reference voltage v re f . However, comparing with the linear response of the current, the voltage responses to the switching modulation too slowly. It makes the ripple voltage cross over the hysteresis voltage bands and the switching frequency is difficult to be controlled [22].
In this work, the hysteresis current control technique is applied to control the output voltage of the inverter indirectly. The reference current used for hysteresis current control can be calculated from the given reference voltage is as below.
Using the Kirchhoff's circuit laws for the circuit as shown in Figure 4, we can calculate the reference current flows through the output inductance L at the sampled-instant kT by a sum of the output current i o and the ripple current i C as: The ripple current i C is conducted by the difference between the measured output voltage and the reference output voltage in each switching period T sw as the following equation: Thus, the reference current used for hysteresis current control can be derived by: Then, the output voltage v o is controlled to track the reference voltage v re f indirectly by using the hysteresis current control technique with the reference current i re f and the hysteresis current band ∆i b given by Equations (6) and (3) respectively.

Grid-Connected Mode
In the grid-connected mode, the output of the inverter is connected to the grid directly as shown in Figure 5. The inverter converts a given electrical power P from the DC sources into AC power and supplies it to the grid. sw T Thus, the reference current used for hysteresis current control can be derived by:  (6) and (3) respectively.

Grid-Connected Mode
In the grid-connected mode, the output of the inverter is connected to the grid directly as shown in Figure 5. The inverter converts a given electrical power P from the DC sources into AC power and supplies it to the grid. When the given power P is positive, the grid receives power from the inverter. In contrast, when the given power P is negative, the DC sources receive power from the grid. An important point in the grid-connected mode is that the output current is controlled so that it is in phase with the grid voltage to maximize the power efficiency. Thus, the output current of the inverter requires a fast dynamic response to cope with the requirement of power delivery.
Assume that the grid voltage at a sampled-instant kT is given by: Multiplying the denominator and numerator of the right-hand side of Equation (9) by g V , and using Equation (7), we can write the reference current as: When the given power P is positive, the grid receives power from the inverter. In contrast, when the given power P is negative, the DC sources receive power from the grid. An important point in the grid-connected mode is that the output current is controlled so that it is in phase with the grid voltage to maximize the power efficiency. Thus, the output current of the inverter requires a fast dynamic response to cope with the requirement of power delivery.
Assume that the grid voltage at a sampled-instant kT is given by: where V g is effective value and φ(kT) is phase angle of the grid voltage. Then the effective value of the reference current I re f can be calculated by: The reference current i re f needs to be in phase with the grid voltage, then it can be written as: Multiplying the denominator and numerator of the right-hand side of Equation (9) by V g , and using Equation (7), we can write the reference current as: In the conventional sine-triangle PWM method, the output voltage is synchronized with the grid voltage by using the phase lock loop (PLL) tool to calculate the phase angle of the grid voltage. The PLL method is basically using the analog circuit to find the zero crossing point, which may be inappropriate with the digital control where the datum is sampled by the AD converters. In this work, the inverter can supply a given power with the output current is in phase with the grid voltage by using hysteresis current control, where the reference current given by Equation (10), without the complicated PI regulator and PLL tool [23].

Master Mode
In the stand-alone and grid-connected modes, the inverters convert the DC power from the DC sources to the AC power and supply it to the load or the grid. These operation modes are also called slave modes. On the other hand, in the master mode, the inverter receives the AC power from the grid to maintain the voltages of the DC bus, which is composed of electrolytic capacitors at a given constant value as shown in Figure 6. This voltage is considered as the DC power supplier for the other inverters operated in the slave mode in the DGR. The power sent by the inverter operated in the master mode to the DC bus equals the power received by the inverters operated in the slave mode.
The PLL method is basically using the analog circuit to find the zero crossing point, which may be inappropriate with the digital control where the datum is sampled by the AD converters. In this work, the inverter can supply a given power with the output current is in phase with the grid voltage by using hysteresis current control, where the reference current given by Equation (10), without the complicated PI regulator and PLL tool [23].

Master Mode
In the stand-alone and grid-connected modes, the inverters convert the DC power from the DC sources to the AC power and supply it to the load or the grid. These operation modes are also called slave modes. On the other hand, in the master mode, the inverter receives the AC power from the grid to maintain the voltages of the DC bus, which is composed of electrolytic capacitors at a given constant value as shown in Figure 6. This voltage is considered as the DC power supplier for the other inverters operated in the slave mode in the DGR. The power sent by the inverter operated in the master mode to the DC bus equals the power received by the inverters operated in the slave mode.  [26,27]. However, most of them are for the conventional sine-triangle PWM control. In this work, the hysteresis current control for controlling the voltages of these two electrolytic capacitors is proposed as below.
Let the grid voltage be given by Equation (7). The reference current in the hysteresis current control can be calculated as: where , 0 t b k k > are the control gains, which tune the speed of the response. The first term of the reference current in Equation (11)   Assume that the inverter is controlled to maintain the voltages v 1 , v 2 of the capacitors C 1 and C 2 at a constant value of V dc_re f . Literatures [24,25] show that if the voltages v 1 and v 2 are controlled separately, or the sum voltage v 1 + v 2 is controlled singularly, it may lead to an unbalance between the voltages v 1 , v 2 . As a result, it may lead to the unbalance of DC sources from the view of the slave inverters. A number of control methods have been proposed to balance these voltages [26,27]. However, most of them are for the conventional sine-triangle PWM control. In this work, the hysteresis current control for controlling the voltages of these two electrolytic capacitors is proposed as below.
Let the grid voltage be given by Equation (7). The reference current in the hysteresis current control can be calculated as: where k t , k b > 0 are the control gains, which tune the speed of the response. The first term of the reference current in Equation (11) controls the total voltage v 1 + v 2 of the DC bus while the second term balances the two separate voltages v 1 and v 2 simultaneously. When the total voltage v 1 + v 2 < 2V dc_re f , the capacitors are charged by the passive power, and when the total voltage v 1 + v 2 > 2V dc_re f , the capacitors are discharged by the active power of the inverter. Additionally, when the voltage v 1 is higher than v 2 , it is decreased by the positive DC component of the output current. On the contrary, when the voltage v 2 is higher than v 1 , it is decreased by the negative DC component of the output current.

Remark 2.
The master-slave control for paralleled inverters [28] can be implemented by combining the proposed stand-alone and grid-connected control modes. The stand-alone inverter plays as the master to produce a reference voltage. The other grid-connected inverters connect to the master and play as slaves.

Experimental Results
The proposed control algorithm has been assessed by using a prototype of the DGR composing of three inverters as shown in Figure 7. Each inverter in the DGR has a rated power of 300 W. The inverter circuit has the parameters given by: L = 2.2 mH, L g = 1.1 mH, and C = 6.8 µF. The analog/digital converter (ADC) has the sampling frequency of 4 MHz and the output data is at 12 bit. The constant switching frequency in the adaptive hysteresis current control is at 20 kHz. The proposed control algorithm is implemented on an FPGA-based digital controller, which is used with the clock frequency of 160 MHz.

Experimental Results
The proposed control algorithm has been assessed by using a prototype of the DGR composing of three inverters as shown in Figure 7. Each inverter in the DGR has a rated power of 300 W. The inverter circuit has the parameters given by:

Stand-Alone Mode
The DC sources supplied by DC generators have the voltages at 175 V. The load is a resistor with the value of 100 Ω . Figure 8 shows the voltage and current responses of the inverter when the load is injected. The inverter is controlled to produce an AC reference voltage, which has an effective value of 100 V, frequency of 50 Hz, and given by: Figure 9 shows the responses of the same inverter when the reference voltage given by a DC voltage of 100 V. In both cases of the AC and DC reference voltages, the inverter yields output voltages, which are stable and match with the given reference voltages almost exactly, without transient delay. The output voltages are maintained robustly without any harmonic during the load injection.

Stand-Alone Mode
The DC sources supplied by DC generators have the voltages at 175 V. The load is a resistor with the value of 100 Ω. Figure 8 shows the voltage and current responses of the inverter when the load is injected. The inverter is controlled to produce an AC reference voltage, which has an effective value of 100 V, frequency of 50 Hz, and given by: Energies 2018, 11, x 9 of 14 Figure 8. Responses of the stand-alone inverter for AC reference voltage. Figure 8. Responses of the stand-alone inverter for AC reference voltage. Figure 9 shows the responses of the same inverter when the reference voltage given by a DC voltage of 100 V. In both cases of the AC and DC reference voltages, the inverter yields output voltages, which are stable and match with the given reference voltages almost exactly, without transient delay. The output voltages are maintained robustly without any harmonic during the load injection.

Grid-Connected Mode
The DC voltage sources have the values of 175 V and are supplied by the same DC generators used in the stand-alone mode. The inverter is connected to a power grid with the voltage is given by: ( ) 100 2 sin 100 The inverter is controlled to send a given electrical power to the grid. Figure 10 shows the voltage of the grid and the output current of the inverter when the given output power is changed from 100 W to 150 W suddenly. Figure 11 shows the responses of the same inverter when the grid voltage changes its effective value from 90 V to 100 V during sending a given power of 100 W to the grid. In all the cases, the output currents are regulated adaptively with fast and stable responses such that the inverter supplies the given powers almost exactly regardless of the sudden changes in the given power and the grid voltage. The output current of the inverter has the phase identical to that of the grid voltage.

Grid-Connected Mode
The DC voltage sources have the values of 175 V and are supplied by the same DC generators used in the stand-alone mode. The inverter is connected to a power grid with the voltage is given by: The inverter is controlled to send a given electrical power to the grid. Figure 10 shows the voltage of the grid and the output current of the inverter when the given output power is changed from 100 W to 150 W suddenly. Figure 11 shows the responses of the same inverter when the grid voltage changes its effective value from 90 V to 100 V during sending a given power of 100 W to the grid. In all the cases, the output currents are regulated adaptively with fast and stable responses such that the inverter supplies the given powers almost exactly regardless of the sudden changes in the given power and the grid voltage. The output current of the inverter has the phase identical to that of the grid voltage.

Master Mode
The inverters are connected to a power grid with the voltage is given by: ( ) 100 2 sin 100 At first, the electrolytic capacitors at the DC bus of the inverter are pre-charged by the grid voltage. Each capacitor has the initial value that equals the maximum value of the grid voltage (141 V). Then, the inverter is controlled to raise the voltages 1 v and 2 v of capacitors to 175 V and maintain these voltages at that value. Figure 12 shows the grid voltage, the output current, and the voltages of the DC bus of the inverter. In this case, the DC voltages balance at the beginning, and the amplitude of the sinusoidal term of the reference current are regulated to raise to and maintain the DC voltages at the desired value exactly. Figure 13 shows the responses of the inverter when the DC voltages are unbalanced at the beginning. The amplitude of the sinusoidal term of the output current is regulated to raise the DC voltages while the DC term of the output current is regulated to balance the DC voltages. In all cases, the proposed control is shown to yield stable and fast responses and balances the DC voltages while maintaining them at the desired value. Figure 11. Responses of the grid-connected inverter when the grid voltage changes its effective value from 90 V to 100 V.

Master Mode
The inverters are connected to a power grid with the voltage is given by: At first, the electrolytic capacitors at the DC bus of the inverter are pre-charged by the grid voltage. Each capacitor has the initial value that equals the maximum value of the grid voltage (141 V). Then, the inverter is controlled to raise the voltages v 1 and v 2 of capacitors to 175 V and maintain these voltages at that value. Figure 12 shows the grid voltage, the output current, and the voltages of the DC bus of the inverter. In this case, the DC voltages balance at the beginning, and the amplitude of the sinusoidal term of the reference current are regulated to raise to and maintain the DC voltages at the desired value exactly. Figure 13 shows the responses of the inverter when the DC voltages are unbalanced at the beginning. The amplitude of the sinusoidal term of the output current is regulated to raise the DC voltages while the DC term of the output current is regulated to balance the DC voltages. In all cases, the proposed control is shown to yield stable and fast responses and balances the DC voltages while maintaining them at the desired value.

Back-to-Back System
Consider a DGR composed of the same three multi-functional inverters with a common DC bus as shown in Figure 7. In the back-to-back system, the DGR is connected to two separate power grids. The first inverter is operated in the master mode. It is connected to a power grid The last one is operated in the grid-connected mode. It is controlled to supply a power of 100 W to a different power grid _ g GC v , which has an effective value of 100 V and frequency of 50 Hz. Figure 14 shows the voltage and current responses of the master, stand-alone (SA), and grid-connected (GC) inverters respectively. The stand-alone inverter is shown to supply a voltage which matches the reference voltage almost exactly and consume a power of 100 W for the load. The grid-connected inverter transfers a power of 100 W to its grid while the master inverter receives a power of 200 W from the other grid to retain the voltages of the DC bus at 175 V. The three inverters are shown to yield stable responses and fulfill their roles almost exactly. It allows the DGR to connect to various power sources asynchronously and control the power flow smoothly.

Back-to-Back System
Consider a DGR composed of the same three multi-functional inverters with a common DC bus as shown in Figure 7. In the back-to-back system, the DGR is connected to two separate power grids. The first inverter is operated in the master mode. It is connected to a power grid v g_M , which has an effective voltage value of 100 V and frequency of 60 Hz. This inverter is controlled to maintain the voltages of the common DC bus at 175 V.
The second inverter is operated in the stand-alone mode. It is controlled to supply an AC voltage to a load, which has a value of 100 Ω. The AV reference voltage has a frequency of 50 Hz and is given by: The last one is operated in the grid-connected mode. It is controlled to supply a power of 100 W to a different power grid v g_GC , which has an effective value of 100 V and frequency of 50 Hz. Figure 14 shows the voltage and current responses of the master, stand-alone (SA), and grid-connected (GC) inverters respectively. The stand-alone inverter is shown to supply a voltage which matches the reference voltage almost exactly and consume a power of 100 W for the load. The grid-connected inverter transfers a power of 100 W to its grid while the master inverter receives a power of 200 W from the other grid to retain the voltages of the DC bus at 175 V. The three inverters are shown to yield stable responses and fulfill their roles almost exactly. It allows the DGR to connect to various power sources asynchronously and control the power flow smoothly.

Conclusions
In this paper, a digital adaptive hysteresis current control has been proposed for the multi-functional inverter in the DGR, which plays an important role in the digital grid concept. Each inverter in the DGR may be operated in the master, grid-connected or stand-alone modes, which can be specified by the software-based digital controller. The reference currents used to implement the

Conclusions
In this paper, a digital adaptive hysteresis current control has been proposed for the multi-functional inverter in the DGR, which plays an important role in the digital grid concept. Each inverter in the DGR may be operated in the master, grid-connected or stand-alone modes, which can be specified by the software-based digital controller. The reference currents used to implement the hysteresis current control are calculated from the given reference power in the grid-connected mode, the reference voltage in the stand-alone mode, or desired voltages of the DC bus in the master mode. The controller uses high-speed sampled-data at MHz level and is implemented on the FPGA, which enable the output current to be controlled exactly with the fast dynamics. Such the FPGA-based high sampling frequency is still a new challenge in the inverter digital control area, where most of the applications are using microcomputer and DSP for the controller. This high-speed hysteresis control method with its simplicity, fast and stable response enables us to achieve the software-based multi-functional inverter. Experimental results show that the proposed control method yields stable and exact responses for the prototype of the DGR. The power packets have been transmitted between the various electrical power sources and the load in the back-to-back system asynchronously.
In our ongoing study, the digital grid system, which composes of the proposed power control in the DGR and the electricity transactions using block-chain technology, is being proving tested within a project supported by Japanese government. It is expected to produce a free-electricity market between decentralized grids and enable power grids to be adaptive to the instability due to peak-demand cutting and demand-response matching issues while accepting more and more renewable energy.