Distributed Secondary Controller to Minimize Circulating Current Flowing Among Sources in DC Microgrid

In the islanded mode of operation of a DC microgrid, the main objective is to achieve proportional sharing of load power among sources and to maintain the source voltage within the specified limit. The droop control technique is widely used to achieve these objectives. Nevertheless, the performance of the traditional droop control technique becomes poor in the case of DC Microgrid including sources having unequal values of nominal voltages. The difference in nominal voltages arises due to errors in the measurement of the voltage feedback signal. The unequal values of nominal voltages lead to errors in the proportional sharing of the load current among the source converters. The mismatch in nominal voltages leads to a flow of circulating current among sources. To minimize this circulating current flowing among the sources, various distributed secondary controllers are suggested in the literature. However, these controllers require prior information of circulating current flowing among sources or accurate measurement of line parameters. Further, the applicability of these controllers is valid for the radial configuration of the DC microgrid. To resolve these issues, a distributed secondary controller is proposed in this paper which shifts the droop characteristics of the source parallel to the voltage axis. The proposed controller does not require prior information of circulating current and no estimation of line parameters. The proposed controller requires the evaluation of proportional current to minimize the circulating current. The proportional value of current for a given source is calculated using the formation of power ratings of sources and initial values of their droop gains. The proposed controller ensures the accurate sharing of the load current among source converters in case of a microgrid having sources of unequal capacity or communication link failure. Further, the voltage regulation is maintained within the defined limit. A small signal model is derived to show the effect of the variation of parameters of the proposed controller on the stability of the DC microgrid. The efficacy of the proposed controller is validated with the help of results capture using the Controller Hardware-in-Loop (CHIL) approach which includes a Real-Time Digital Simulator (RTDS) and Digital Signal Processor (DSP).


I. INTRODUCTION
The increase in world energy consumption, the fear of climate change caused by CO 2 emissions, and the diminishing non-renewable resources, encouraged the use of renewable The associate editor coordinating the review of this manuscript and approving it for publication was Qiang Li . resources. However, to harness energy from these renewable energy sources, a microgrid is considered to be the most appropriate solution. Depending upon the nature of the voltage output, AC and DC microgrids can be used to integrate renewable energy sources. Yet, with the increased loads being dc in nature, renewable sources would require multiple ac-dc and dc-ac conversions resulting in decreased efficiency due to these extra conversions in the case of AC microgrid. To resolve this issue, the use of a DC microgrid is suggested, which can offer high efficiency, reliability, and easier control [1], [2]. Renewable energy sources like solar photovoltaic (PV) sources, fuel cells, and battery storage devices can be directly connected to the DC microgrid. DC microgrid does not require synchronization of sources and power quality issues like harmonics are not present [3]. The absence of skin and proximity effects further increases the effective efficiency of the DC microgrid [4]. Due to these advantages, the DC microgrid is much preferred over ac microgrid. The concept of the DC microgrid is gaining popularity due to its application in remote electrification to provide power to sensitive loads like military loads, hospitals, and data centres. DC microgrids find their use in potential applications like data centres, electric vehicles, marine vessel charging, telecom stations, etc. [5], [6].
In a DC Microgrid, energy sources, loads, and storage devices are typically operating on dc voltage. To connect these elements, dc-dc converters are to be used. In an islanded DC Microgrid, renewable resources, and storage components are used for providing energy to the loads as shown in Figure 1. Source-side converters are used for connecting renewable resources to the dc-bus of the DC microgrid. The storage-side converters (SSCs) are used to connect the battery devices to the loads. Renewable side converters (RSCs) are used to extract the maximum power from renewable resources like photovoltaic (PV) sources and wind turbines and provide it to the storage elements and loads. The purpose of SSC is to regulate the dc-bus voltage at the nominal value. A combination of many dc-dc converters in parallel is preferred over the usage of just a single converter as it ensures more reliability. The faulty converter can be isolated and replaced without interrupting the system [7]. It is easier to add more converters with increased demand by adding more parallel units, while the manufacturing cost and design efforts are reduced [8], [9].
The objective of the parallel operation of SSCs is to ensure proportional sharing of the load current among the parallel-connected battery sources and to maintain the output voltage across the output terminals of SSC to be within the accepted range for the load. The techniques used to achieve these objectives are classified as techniques (i) requiring communication and (ii) techniques that don't require communication links. The popular technique requiring communication is the Master-Slave control technique. In this technique, one of the converters operates in voltage-controlled mode (VCM), which is referred to as the Master that regulates the output voltage of the battery source equal to its nominal value. The other converters would operate in current-controlled mode (CCM), referred to as Slave and regulate output current [10]. The controller of the Master converter is responsible for regulating the voltage and providing the necessary current in case of a sudden change in load by taking the difference between the total current provided by slaves and the current demanded by the loads [11]. In this technique, a centralized controller and communication way are required among the converters to operate the system efficiently. As mentioned, this method can be expensive, complex, and low on reliability. Many papers are reported to resolve issues related to this technique [12], [13]. Nevertheless, this method may introduce high amounts of noise into the system, and an increase in the cost of the overall system. It is typically used in low-power systems.
To overcome the above-mentioned issues associated with techniques requiring communication, the droop control technique is widely used [14]. In this technique, parallel converters work in voltage control mode and a reference voltage is produced for each converter by the measurement of its parameters which eliminates the need for communication channels among SSC. Using this technique, the system will continue to work without interruptions in case of a communication failure. This increases the reliability of the system. This technique is highly scalable, and each battery source becomes a plug-and-play unit after its connection to the DC Microgrid [15].
Nevertheless, the performance of the traditional droop control technique becomes poor in the case of DC Microgrid including sources having unequal values of nominal voltages. The difference in nominal voltages arises due to errors in the measurement of the voltage feedback signal. The unequal values of nominal voltages lead to errors in the proportional sharing of the load current among the source converters. The mismatch in nominal voltages leads to a flow of circulating current among sources. The unequal initial values of the SoCs, and mismatching in charging and discharging rates of battery storage devices also lead to a flow of circulating current among batteries [16]. This current produces losses and reduces the efficiency of the DC Microgrid [17]. This current further reduces the useful life of the battery source due to the unnecessary cycling of the battery [16]. The flow of circulating current also leads to the overloading of some of the source converters and may cause premature failure of the power semiconductor devices connected to the source converter [18], [19].
To resolve this issue, additional controllers are required besides the droop controller. The additional controllers suggested in the literature to minimize circulating current are classified into two broad categories which are (1) controllers requiring no communication (2) controllers requiring communication channels among sources. Controllers requiring no communication among sources to minimize circulating currents are suggested in [20] and [21]. A virtual impedancebased method is suggested [20] in which the droop gain of the sources is modified in such a way that drop in the source voltages is within the predefined limit. However, the suggested method includes the estimation of line resistances which uses additional current sensors and increases the cost of the system. A back-stepping method-based controller is suggested in [21] to minimize the circulating current. The suggested controller minimizes the circulating current among sources by modifying the nominal values of source voltages and maintains the source voltage within the defined limits. However, the suggested controller is nonlinear and suffers from the limitation of practical applicability. Due to the absence of a communication channel, the proportional current sharing among sources in [20] and [21] may not be very accurate.
To overcome this problem, all-to-all communication-based secondary controllers, are suggested in the literature. Secondary controllers are used to adjust the parameters of droop controllers and minimize the difference in proportional current sharing created due to droop controllers [22]. These controllers require communication among the sources for their implementation. The secondary controllers are used to minimize circulating currents among Sources may be further classified as the controllers including (i) voltage shift and (ii) modification in droop gain of sources.
Secondary controllers including the shift in droop characteristics of sources are discussed in [14], [16], and [28]. The secondary controller suggested in [14] shifts droop characteristics in the upward direction of the source for which the circulating current is negative. However, the suggested controller requires the operation of the DC microgrid at no-load for evaluation of the circulating current. This option may not be feasible in a DC microgrid having multiple sources and loads. The secondary controller suggested in [14] requires all-to-all communication among sources which may lead to data congestion. To reduce the communication burden, a reduced communication-based secondary controller is suggested in [16] and [28], which modifies the estimation of the average source voltage. However, the reduced communication-based secondary controllers take more time to reach a consensus among the sources and the dynamic response of the system becomes slower [23].
The secondary controller including modification in droop gain of sources is discussed in [17], [24], and [29]. The controller discussed in [17] includes the formulation of an optimization problem, which is used to evaluate optimum values of initial values of droop gains of the sources. During the operation of the DC Microgrid, droop gains are adjusted adaptively to minimize circulating current flowing between the sources. However, the complexity of the secondary controller increases for a DC microgrid having multiple sources and loads. In [24] and [29], the droop gain of the source is modified to minimize the circulating current flowing among the sources in the DC Microgrid. For this, the line resistance is measured and droop gain is adjusted to make the equivalent output resistance of each source to be identical. However, the suggested techniques used to modify the droop gain are applicable to the radial configuration of the DC microgrid. The performance of the suggested secondary controllers may deteriorate in the case of mesh configuration of the DC microgrid. The techniques discussed in [25] to suppress the circulating current require the accurate measurement of line parameters. The technique suggested in [26] to estimate the line resistance to adjust the droop gain to minimize circulating current is only applicable to the radial configuration of the DC microgrid. The Steepest Decent Method (DSM) which is an optimization-based technique is suggested [27]. The proposed technique adjusts the voltage reference of individual sources in a way to minimize circulating current. However, the practical applicability of the suggested technique is difficult.
Additional challenges associated with distributed secondary controller is ensuring proportional sharing of the load current among sources in case of DC microgrid having sources of unequal capacity. Due to this, some sources may be underloaded and some sources may be overloaded which may lead to premature failure of the converters. Further, the performance of distributed secondary controllers depends upon the latency of communication links provided among sources for information exchange. In case of communication link failure, the performance of the distributed secondary controller is affected. To enhance the resiliency of the DC microgrid against communication link failure, provision should be there to detect the communication link failure or source failure to ensure the fail-safe behaviour of the DC microgrid in case of communication link failure [22].
To overcome the above-mentioned limitations and challenges, a distributed secondary controller is proposed in this paper. The comparison of the proposed controller concerning the state-of-the-art controllers suggested in the literature is listed in Table 1. The salient features of the proposed controller are as follows: 1. To minimize the circulating current, the proposed secondary controller shifts the droop characteristic parallel to the voltage axis. 2. The controller ensures minimization of circulating current for radial, mesh or generic of the two configurations of DC Microgrid. 3. The controller requires the information of source currents which leads to a reduction in communication data congestion and requires low bandwidth communication. 4. The controller ensures the proportional sharing of load current in case of DC microgrid having sources of unequal capacity. Further, the proposed controller is applicable to radial, mesh or generic configurations of dc microgrid. 5. The proposed controller ensures the fail-safe behaviour of the DC microgrid in case of communication link failure. 6. For the calculation of voltage shift, the proposed controller does not require information of line resistance. 7. Applicability of the controller is validated for a ring configuration of a DC microgrid having multiple sources and loads.

II. PROPOSED METHOD
To achieve proportional sharing of the load current among the source converter with high accuracy, the distributed sec- ondary controller including voltage shift is proposed. In this section, the procedure for the implementation of the proposed controller is explained.

A. CAUSE OF CIRCULATING CURRENT
The circulating current arises due to unequal values of the nominal voltages of sources. The nominal voltages of the sources are unequal due to errors in sensors used to sense output voltage. The output of these sensors is used as a feedback signal for the voltage controller, which leads to discrepancies in the nominal voltages of sources. Due to unequal values of nominal voltages, the circulating current starts flowing among the sources. The sources having higher values of nominal voltages, which is more than the base value of nominal voltage, starts supplying the circulating current. The sources whose nominal voltages are less than the base value of nominal voltage start sinking the circulating current. A generalized DC Microgrid including the interconnection of various sources and local loads connected across source buses is shown in Fig.2  where V n nom is the nominal voltage of n th source when the source current is zero, d n is the droop gain and i sn is the source current supplied by the n th source. However, the sources are connected to the load with the nonzero value of cable resistance which cannot be neglected as shown in Fig.3 and The source current supplied by the n th source, i sn consists of two components of currents which can be furnished as actual source current, i dn and circulating current, i cn . The circulating current i cn for n th source may be positive or negative depending upon the magnitude of the nominal voltage of the source. If the source voltage, V nom n is higher than the base voltage, V nom , then i cn will be positive otherwise negative. On the other hand, if V nom n < V nom , then i cn < 0. To make the idea clearer about the signs of circulating currents flowing in a DC microgrid, consider a two-source microgrid as shown in Fig. 3. From this figure, it is noted that the nominal voltage of source-1, V nom 1 is more than the nominal voltage, V nom by a factor of V nom 1 . Here, v nom n is the difference between the actual, V nom 1 and the base value, V nom of nominal voltage. For source-2, V nom 2 is assumed to be smaller than the nominal voltage, V nom by a factor of V nom 2 . Due to the unequal values of nominal voltages of source-1 and source-2, the circulating current, I c1 =-I c2 starts flowing between source-1 and source-2. From Fig.3, it is noted that the circulating currents, I c1 and I c2 flow through the local circuit formed by source-1 and source-2 not through the load and produces only a heating effect which may reduce the efficiency of the DC microgrid.
Using (1), the reference voltages of source-1 and 2 are where, i s1 and i s2 represent actual source currents supplied by the source-1 and source-2, i d1 and i d2 represent the currents supplied by source-1 and souece-2 when nominal voltages of source-1 and source-2 are equal. The elements, i c1 and i c2 represent the circulating currents contributed by source-1 and source-2. The above explanation is extended for a DC microgrid including n-sources as shown in Fig. 4. From Fig. 4, it is noted that the nominal voltages of source-1 and source-2 are assumed to be less than the nominal voltage, V nom while the nominal voltages of j th source and n th source are assumed to be greater than nominal voltage, V nom . The direction of circulating currents supplied by the respective sources is shown in dotted arrows. The above assumption is made to simplify the analysis which is used to evaluate the circulating currents, i c1 , i c2 , . . . , i cn supplied by each source. For the n th source converter, it is assumed that V nom n > V nom and v nom n is the difference between V nom n and V nom which is given by, For this case, the expression for i sn is where i dn represents the components of current supplied by n th source when nominal voltages of all sources are equal. The element, i cn represents the circulating current contributed by source-n. Using (4) and (5), the resultant expression for v nom As shown in Fig.4, the values of nominal voltages of source-1, 2 are less than the base value, V nom , while for j th source, V nom j is greater than V nom . Similar to (6), the expressions for . . , V nom n . However, minimization of these offset voltages requires the measurement of circulating currents, i c1 , i c2 , . . . , i cj . . . , i cn flowing among the source converters which is explained in the next subsection.

B. EVALUATION OF CIRCULATING CURRENTS
In this subsection, the procedure for the evaluation of circulating currents, i c1 , i c2 , . . . , i cn flowing among the sources is explained.
From the above-mentioned discussion, it is observed that the circulating current is positive for the sources having nominal voltages higher than the base value while their values are negative for the sources having nominal values of voltages less than the base value. Therefore, the expression for circulating currents supplied by the sources-1, 2, . . . , n is evaluated using (5) which is given by From (7), it is noted that the algebraic sum of source currents will be free from all types of leakage components of currents which can be observed in Fig i dj (8) where n is the total number of sources connected in the DC microgrid. Using (7) and (8), the expression for circulating current supplied by source-1, 2, . . . , n is approximated as The values of circulating currents, i c1 , i c2 ,. . . , i cn supplied by source-1, 2, . . . , n can be calculated using the expression (9). For the DC microgrid having sources of identical ratings, the relation i d1 = i d2 = . . . = i dn = i d holds and i avg = i dn . From (9), the modified relations for i c1 , i c2 ,. . . , i cn are

C. SOURCE WITH UNEQUAL POWER RATINGS
The relation given by (10) for evaluating the circulating currents i c1 , i c2 ,. . . , i cn supplied by source-1, 2, . . . , n is valid for DC microgrid having sources with equal power ratings. However, in practical DC microgrids, the sources with unequal power ratings are usually connected. In this case, the average value of source current, i avg used to calculate the circulating currents will be different for each source. It is because each source contributes to the circulating current according to its power rating. In this case, the systematic procedure to evaluate the average current is discussed. The droop gain, d for a given source in a DC microgrid is evaluated using the following relation [30]: where, v s is the output voltage of the converter when a load of rated power capacity, P is connected across its output. The value of droop gain, d is usually selected in such a way that the voltage regulation across the output terminals is less than 5% of nominal voltage, V nom [22]. If nominal voltages, V nom 1 , V nom 2 , . . . , V nom n of all the converters are equal. Therefore, the voltage regulation, V nom 1 − v o for each converter at the rated load will be equal. Using (11), the power ratings, P 1 , P 2 , . . . , P n of converters are related to their droop gains, d 1 , d 2 , . . ., d n as follows: Now considering the case when there is no error in nominal voltages of the source-1, 2, . . . , n. In this case, the currents, i d1 , i d2 , . . ., i dn supplied by the source-1, 2, . . . , n are given by Dividing (12) by (13), the resultant expression is From (8), the total source current i s supplied by the source-1, 2, . . . , n is Substituting the values of i d1 , i d2 , . . . , i dj from (14) in (15), the simplified relation for i dn is Now the circulating current supplied by the source-n is The values of circulating currents, i c1 , i c2 ,. . . , i cn supplied by source-1, 2, . . . , n can be calculated using the expression (17) in the case of DC microgrid including sources of unequal power ratings. VOLUME 11, 2023 89493 Authorized licensed use limited to the terms of the applicable license agreement with IEEE. Restrictions apply.

D. MINIMIZATION OF CIRCULATING CURRENTS
Minimization of circulating currents requires the accurate measurement of circulating currents which are evaluated using the expression (9) and (17). From these expressions, it can be noted that depending upon the values of V nom 1 , V nom 2 , . . . , V nom n ,the value of circulating currents, i c1 , i c2 , . . . , i cn can be either positive or negative. Depending upon the value of i cn , the dead band output, i cn is given by Depending upon the output of the dead band, the following three cases are possible: For, i cn > 0, the output of the integrator switches to the left position with the help of the transition switch and the negative voltage shift takes place in droop characteristics of n th source. For this case, the droop characteristics of the n th source are shifted in the downward direction parallel to the voltage axis by the proposed secondary controller. Assuming that the vertical shift in the droop characteristic of n th sources is v shiftn provided by the secondary controller, the output of the droop controller is To ensure oscillation-free convergence of the controller about the operating point of the DC microgrid, a tolerance, ε is defined for the circulating current. Therefore, the shift in the droop characteristic of n th source continues until and unless the magnitude of the circulating current becomes less than the tolerance limit, ε.
89494 VOLUME 11, 2023 Authorized licensed use limited to the terms of the applicable license agreement with IEEE. Restrictions apply.
For the value of |i c | > ε, the value of v shiftn for n th source is evaluated using the following relation, Here, v n [n] is the new and v n [n-1] is the previous value of the voltage shift, v shiftn respectively. The element, k n is a constant. It determines the rate of convergence of circulating current, i cn towards ε. By increasing the value of k n , fast convergence of i cn towards ε can be ensured. However, the large value of k n may lead to an oscillatory response of the DC microgrid about the operating point. DSP is used to execute the equation (21). The time period during which the value of δv n is updated in a DSP is T s . Taking z-transformation of (21), the expression for v shiftn is given by The relation for v shiftn in the time domain can be written as Taking the derivative of both sides, the first-order differential equation representing the dynamics of the secondary controller is 3) CASE-3 (i cn = 0) From (18), it is noted that for |i cn |< ε, the output of dead band block will be zero. The integrator included in the proposed secondary will not integrate the input k n i sj and the voltage shift, v shift will be restored to its previous value, v shift [n-1]. Therefore, the n th source continues to share its power as per normal droop control law.

E. EVALUATION OF v shiftn
The corrective term of the n th source is evaluated by the secondary controller of the n th source using the relation (21). Assuming that the secondary controller starts its control action at time t=t 1 . Before the time instant t=t 1 , the output of the secondary controller will be zero. As soon as the secondary controller is initiated, the initial output of the secondary controller will be k n i sn . If the magnitude of the circulating current, i cn is greater than the tolerance limit, ε, the secondary controller starts the integration of its output until and unless the current i c is reduced to |i cn | < ε. During this procedure, the reference voltage of n th source given by (19) keeps on increasing which shifts the droop characteristic in the upward direction. To ensure the stable operation of the dc microgrid, the initial value of k is chosen in such a way that k n < d n . As soon as the circulating current is converged to the condition , |i cn | < ε, the output of the secondary controller is fixed to the last sampled value, v shiftn [n] given by (21) and the secondary stops modifying the voltage reference

F. CONTROL SCHEME OF THE CONVERTER
In the case of a DC microgrid, dc-dc boost converters are normally used to interface the battery source to the source bus in the DC microgrid. The dc-dc boost converters step up the battery voltage and reduce the requirement for a greater number of battery sources. The control scheme of the boost converters including the proposed secondary controller used to minimize the circulating current of n th source is shown in Fig. 5(a). The distributed nature of the proposed secondary controller is represented in Fig. 5(b). The droop controller and inner loop controllers (voltage and current controllers) are shown in Fig. 5(a). First of all, the information corresponding to all source currents is supplied to the n th source using the communication channel. Using this, the average value of the source current is calculated using (8). Now, the value of circulating current supplied by the n th source is evaluated using (9). If the magnitude of i cn is greater than ε, a shift δv shiftn is provided in the reference value of voltage, v ref n . Depending upon the sign of i cn , the magnitude δv shiftn can be positive as well as negative. For, i cn > 0 , the voltage shift, δv shiftn is negative and for i cn < 0 , the voltage shift, δv shiftn is positive. The effect of voltage shift on the droop characteristics of n th source is shown in Fig. 6. Fig. 7 shows the flow chart of the proposed secondary controller used to provide voltage shift in droop characteristic of n th source. From this chart, it observed that to execute the desired control task, the information corresponding to source VOLUME 11, 2023 89495 Authorized licensed use limited to the terms of the applicable license agreement with IEEE. Restrictions apply. currents, i s1 , i s2 , . . . ,i sn is acquired using a low bandwidth communication channel among the sources. Using this information, the average values of source current, i avg is calculated using (8). Now using (9), the circulating current supplied by the n th source is evaluated. If the magnitude of the circulating current is greater than the tolerance limit, ε, the proposed secondary controller starts shifting droop characteristics of n th source. Depending upon the sign of i cn , these characteristics may be shifted in the upward or downward direction. For |i cn | < ε, the secondary controller stops modifying the nominal voltage of the source and the magnitude of the voltage shift remains fixed at its previous value.

G. USE OF LOW BANDWIDTH COMMUNICATION CHANNEL
The proposed distributed secondary controller requires the information of the currents, supplied by the source-1, 2 . . . , n for its implementation. This information can be acquired with the help of a communication channel having low bandwidth like Controller Area Network (CAN) communication. This leads to a reduction in the cost of the system and makes the proposed scheme to be an economical one.

H. FAIL-SAFE BEHAVIOUR OF DC MICROGRID IN CASE OF COMMUNICATION LINK FAILURE
In case of failure of the communication link between the sources, the performance of the proposed secondary controller will be deteriorated and the circulating currents contributed by the source may not converge to zero. To avoid this condition and to maintain the resiliency of DC microgrid in case of link failure or source failure, a fault detection mechanism discussed in [31] and [32] is used which detects the source failure or link failure. The fault detection mechanism ensures the convergence of circulating current to their minimum values even in case of communication link failure in the DC microgrid.

III. MODELING OF THE SYSTEM
In this section, the modelling of the various elements of the DC microgrid like sources, loads and interconnecting network including the proposed secondary controller is explained. A linearized model of the DC microgrid is derived which is used to study the effect of variation of parameters of the proposed controller on the stability of the DC microgrid. The linearized model is derived for the mesh configuration of the DC microgrid shown in Fig. 2. However, the derived model applies to the radial, ring or generic of the two configurations. As shown in Fig. 5(a), the dc-dc boost converters are used to configure the sources to the buses of the DC microgrid. The dynamics of the inner loop voltage and current controller are assumed to be much faster than the dynamics of the outer droop control loop. Therefore, to study the dynamic response of the DC microgrid including the proposed controller, a reduced order model is used in which the dynamics of inner voltage and the current control loop are neglected without affecting the accuracy of the analysis.

From (1), the reference voltage generated by the droop controller is
Here, v ref n is taken as v s which represents the source voltage of n th converter. Linearizing both sides and writing in matrix form for a DC microgrid having multiple sources and loads, where, vs(t), vshift(t) and i s (t) are the column vectors of deviations in source voltages, voltage shifts in source voltage and source currents, respectively. Here, the element D is a diagonal matrix and the expression is D = diag[d1, d2,. . . , dn]. Now the linearized relation derived for the load and the interconnecting network which is discussed in [33] is included. The voltage across the bus −i and bus −j of DC microgrid is given by where R ij and L ij are the resistance and inductance of ij th branch of the DC microgrid. Linearizing (28) and writing in the matrix for the DC microgrid, the linearized column vector where, v b (t) and ib(t) are the column vector of branch voltages and branch currents, respectively. Here, L b = diag[L b1 , L b2 , . . . L bn ] and R b = diag[R b1 , R b2 , . . . R bn ] are the diagonal matrices of cable inductances and cable resistances, respectively. M is the incidence matrix of the DC microgrid network. As shown in Fig. 2, resistive loads are assumed to be connected across each source bus. The current, i Lj (t) drawn by the load, R Lj connected at bus-j is Linearizing (30) and writing in matrix form, the linearized relation for the load current in matrix form is, Applying Kirchoff Current Law (KCL) at source bus-j, the load current, iLj(t) and source current, isj(t) and branch current, iij(t) are related to each other by the following relation: Applying Kirchoff Current Law (KCL) at each source bus, and linearizing the load current, iL(t) and source current, is(t) and branch current, ib(t) are related to each other by the linearized relation given by Substituting the value of iL(t) from (31) in (33), the simplified expression of is(t) is VOLUME 11, 2023 Authorized licensed use limited to the terms of the applicable license agreement with IEEE. Restrictions apply. (27), the simplified relation for vs is

Now substituting the value of is(t) from (34) in
Substituting the value of v s (t) in (28), the linearized Fig. 5(a) shows the control scheme of the dc-dc boost converter along with the voltage shift-based secondary controller. Relation (22) gives the dynamics of the controller in a discrete domain. From (24), the dynamics of the voltage shift controller is represented using first order differential equation in the time domain as, Linearizing (37) and writing in matrix form as, Here, K s = diag[K s1 ,K s2 , . . . K sn ] is the diagonal matrices of coefficients. Substituting the value of i s (t) from (24) in (38), the simplified relation for v shift (t) is, Substituting the value of v s (t)from (35) in (39), the simplified relation for v shift (t)is The linearized model given by (36) and (40) can be represented in standard state variable form, Here, x(t) is a column vector of state variables and The relation (41) is used to study the effect of variation of parameters of the DC microgrid on the stability of the system.

IV. SYSTEM SIMULATION
The linearized model given by (41) is derived for a mesh configuration of the DC Microgrid shown in Figure 2. However, it is equally applicable for radial and ring configurations.
To simplify the analysis, the DC Microgrid including three sources, and three loads connected across source buses and these sources are connected in the form of ring configuration as shown in Fig. 8 is considered. The parameters of the DC   Microgrid are listed in Table 2 while the parameters of the DC interconnecting network are included in Table 3. The switching frequency of the dc-dc boost converter used to interface the battery to the source bus is 5 kHz. Corresponding to this, the parameters of the inner current controller are tuned in such a way that the phase margin of the inner current controller is 86.63 o which is achieved at a crossover frequency of 1 kHz. The phase margin of the voltage controller is 55.82 o which is achieved at a crossover frequency of 25 Hz. The initial value of droop gain of each source is 0.0475 . The value of the coefficient, k for each source is set to 100µV/A and the value of tolerance, ε is 0.5% of the rated value of source current.

A. SIMULATION RESULTS
For the abovementioned parameters of the DC Microgrid, the eigenvalues of the DC Microgrid are plotted in a complex VOLUME 11, 2023 FIGURE 9. Eigenvalues root loci plot for variation in values of coefficient, k n frequency plane. Fig. 9 shows the effect of the variation of coefficient, k n on the stability of DC Microgrid. From this plot, it is observed that the dominant eigenvalues of the DC Microgrid start shifting towards the Right-Hand Plane (RHP). Some of the eigenvalues start shifting away from the real axis. For high values of coefficient, k, the stability margin of the DC Microgrid decreases, and the response of the DC Microgrid becomes oscillatory.

B. PERFORMANCE OF THE PROPOSED SECONDARY CONTROLLER WITH SOURCES HAVING EQUAL POWER RATINGS
To study the performance of the proposed secondary including the source having equal power ratings, the ring configuration of the DC microgrid as shown in Fig. 8. is simulated in Matlab/Simulink. The parameters of the microgrid are listed in Table 2. The power rating of each source converter is 100 kW and the droop gain, d of each converter is calculated using (11) and is found to be 0.076 for voltage regulation of 5% of the base nominal voltage, 400V. The value of the tolerance limit, ε is set to 0.5% of the rated value of source current. The error in nominal voltages of source-1 and 3 is assumed to be -1% and 1% of the base nominal voltage, V nom . The initial value of the load connected across bus-1, bus-2 and bus-3 is 50 kW each. Therefore, the initial value of circulating current contributed by the source-1, 2 and 3 are -36A, 14A and 22A. At time instant, t= 0.2s, the step variation in load demand from 50kW to 60kW at bus-2 and from 50 kW to 70kW at bus-3 is applied. Due to the increment in load demand, the circulating currents contributed by source-1, source-2 and source-3 are further modified and the resultant values of these currents are -44A, 7A and 37A, respectively. The proposed secondary controller is started at the time instant of t= 0.4s. In the case of equal power ratings of sources, the circulating current contributed by various is evaluated using (9). Depending upon the sign of circulating current, i c , the proposed secondary controllers start shifting droop characteristics of source-1 in the upward direction and source-2, 3 in the downward direction as shown in Fig. 10(c). From Fig. 10(a), it is noted that the circulating currents, i c1 , i c2 and i c3 are reduced to the tolerance limit, ε. Fig. 10(b) shows that the initial currents supplied by source-1, 2 and 3 are 183A, 154A and 102A respectively. Due to the secondary controller action, these currents are converged to the average value of source current, i avg =147A. Waveforms of the voltages across the output of source-1, source-2 and source-3 are shown in Fig. 10(c). The voltage regulation across the output terminal of source-1, 2 and 3 are observed to be 2.5%, 2.5% and 3.25% of the base nominal voltage, 400V. Now the performance of the proposed distributed secondary controller is validated for a condition when the controller is activated and step variation in load demand is applied. The initial values of the loads connected across bus-1, bus-2 and bus-3 are 50 kW each. Therefore, the initial value of circulating current contributed by the source-1, 2 and 3 are -36A, 14A and 22A which can be observed from Fig. 11(a). The proposed secondary controller is switched on at time instant, t=0.2s. Depending upon the sign of circulating current, i c , the proposed secondary controllers start shifting droop characteristics of source-1 in the upward direction and source-2, 3 in the downward direction as shown in Fig. 11(c). From Fig. 11(a), it is noted that the circulating currents, i c1 , i c2 and i c3 are reduced to the tolerance limit, ε. From Fig. 11(b), it is noted that the initial values of currents supplied by source-1, 2 and 3 are 146A, 135A and 86A, respectively. However, due to the controller action initiated at time instant, t=0.2, the currents supplied by source-1, 2 and 3 start converging towards the average value of current to be supplied by each converter which is i avg =123A. Waveforms of the voltages across the output of source-1, source-2 and source-3 are shown in Fig. 11(c). The voltage regulation across the output terminal of each source is observed to be 2.5% of the base nominal voltage, 400V. At time instant, t=0.7s, the step variation in load demand from 50kW to 60kW at bus-2 and from 50 kW to 70kW at bus-3 is applied. From Fig. 11(a), it is noted that the controller is active and takes immediately the control action. Due to controller action, the circulating current contributed by each source is reduced to the tolerance limit, ε. The source current supplied by each source is reduced to the average value of 147A as shown in Fig. 11(b). The voltage regulation across the output terminal of source-1, 2 and 3 are observed to be 2.5%, 2.5% and 3.25% of the base nominal voltage, 400V.

C. PERFORMANCE OF THE PROPOSED SECONDARY CONTROLLER WITH SOURCES HAVING UNEQUAL POWER RATINGS
To validate the performance of the proposed distributed secondary controller, the DC microgrid including three sources having rated power capacity of 100kW, 50kW and 25 kW is considered. The droop gains selected for source-1, 2 and 3 for voltage regulation of 5% of the nominal voltage are 0.076 , 0.152 and 0.304 , respectively. The nominal voltage of source-2 is 400V while errors of -1% and 1% are considered in the nominal voltages of source-1 and source-3, respectively. The initial value of the load connected across bus-1,   and v s3 in case of DC microgrid having sources of unequal ratings. The capacity of Source-1 is 100 kW, source-2 is 50 kW and that of source-3 is 25 kW.
bus-2 and bus-3 are 25kW each. Therefore, the initial value of circulating current contributed by the source-1, 2 and 3 are -33A, 10A and 23A. At time instant, t=0.2s, the step variation in load demand from 25kW to 35kW at bus-2 and from 25kW to 45kW at bus-3 is applied. Due to the increment in load demand, the circulating currents contributed by source-1, source-2 and source-3 are further modified and the resultant values of these currents are -41A, 7A and 34A, respectively. The proposed secondary controller is started at the time instant of t= 0.4 s. In case of unequal power ratings of sources, the circulating current contributed by various is evaluated using (15). Depending upon the sign of circulating current, i c , the proposed secondary controller starts shifting droop characteristics either in the upward or downward direction. From Fig. 12(a), it is noted that the circulating currents, i c1 , i c2 and i c3 are reduced to the tolerance limit, ε which is 0.5%. Fig. 12(b) shows that due to the secondary controller action, the currents supplied by source-1, 2 and 3 are reduced to average values of source-1, 2 and source-3 currents which are 150A, 75A and 37.5A respectively. Waveforms of the voltages across the output of source-1, source-2 and source-3 are shown in Fig. 12(c). The voltage regulation across the output terminal of source-1, 2 and 3 are observed to be 0.75%, 1% and 3.25% of the base nominal voltage, 400V.

D. PERFORMANCE OF THE PROPOSED SECONDARY CONTROLLER WITH COMMUNICATION LINK FAILURE
To validate the performance of the proposed secondary controller during link failure, it is assumed that communication link failure occurs between the source-1 and source-2 as shown in Fig. 13. Due to communication failure, the secondary controller of source-3 will have the information corresponding to the currents supplied by source-1 and source-2. However, the secondary controllers included with source-1 and source-2 will have information of currents supplied by source-1, 3 and source-2, 3, respectively. To evaluate, i c1 , the secondary controller of source-1 evaluates the average of i s1 , i s2 and i s3 . However, due to the action of the link failure detection algorithm [31], [32], the secondary controllers of source-1 and source-2 evaluate the circulating currents, i c1 and i c2 using the average of source currents, (i s1 , i s3 ) and (i s2 , i s3 ),respectively. The waveforms of circulating current, source currents and source voltage under the link failure condition are shown in Fig. 14. The link failure occurs at the instant of t=1s. At time instant, t=1.5, the communication link is again restored between source-1 and 2. From the waveforms of i c1 , i c2 and i c3 shown in Fig. 14(a), it is observed that the proposed secondary controller ensures the convergence of circulating currents, i c1 , i c2 and i c3 to the tolerance limit, ε even in the case of one of the communication link failure. This validates the resiliency of the DC microgrid against the communication link failure. The waveforms of source currents, i s1 , i s2 and i s3 and the waveforms of source voltages v s1 , v s2 and v s3 are shown in Figs. 14(b) and 14(c).

E. COMPARISON OF PERFORMANCE OF THE PROPOSED SECONDARY CONTROLLER WITH RESPECT TO PRIOR STUDY
The performance of the proposed secondary controller is compared to the secondary controller suggested in [24]. The secondary controller suggested in [24] includes the linear proportional plus integral controller to modify the droop gain of the source. The droop gain is modified by using the average of source currents. However, the secondary controller proposed in the revised manuscript includes an integral controller to shift the V-I droop characteristics of the source parallel to the voltage axis to minimize the circulating current. The proposed controller utilizes the proportional current rather than the average current to minimize the circulating current. The proportional current will be the same as the average current when all sources have identical ratings. However, in the case of sources having different ratings, proportional current has the advantage over average current. The same has been explained next.
For simplicity of understanding, a two-source system is considered. It is assumed that the sources have different ratings I 1 and I 2 . Source-1 supplies a current i 1 p.u and source-2 supplies i 2 p.u concerning their bases. So, the total load demand of the system is (i 1 p.u I 1 + i 2 p.u I 2 ).
When average per-unit current is used, the reference currents for both sources are ( Adding up these two current references, the total current commanded from both sources is ( I 1 +I 2 2 )i 1 p.u + ( I 1 +I 2 2 )i 2 p.u . However, the total load demand (i 1 p.u I 1 + i 2 p.u I 2 ). The error between total load demand and total current commanded to both sources is (i 1 p.u -i 2 p.u )( I 1 −I 2 2 ). Therefore, average per-unit current can lead to excess/less supply of current by the sources. This will not lead to the flow of nonzero value of circulating current flowing between the source converters. Consequently, the voltage regulation may become poor. This is a major shortcoming of using the average per-unit current-based secondary controller suggested in [24]. Now using (16), the current reference generated for source-1 is given by, Now using (12) for two sources, P 1 d 1 = P 2 d 2 = k. Therefore, d 1 = k P 1 and d 2 = k P 2 . This helps us to simplify I 1ref as, Similarly, the expression for I 2ref is given by, The addition of references for the total proportional current is (i 1 p.u I 1 + i 2 p.u I 2 ). Thus, the total load demand is the same as the total current commanded to the sources. This is true irrespective of the ratings of the source and the per-unit currents being supplied by the source. Hence, using proportional current in place of average per-unit current for the system with different ratings will give better performance. This point can be further clarified by practical examples. Consider 2 sources, one has ratings as 500 A and 500 V, and the other one is rated 250 A, 500 V. They are supposed to supply a load of 650 A. Initially, let the two source currents be 400 A and 250 A due to transmission line resistances. Using proportional current, the reference currents set for the two sources as 443.33 A and 216.67 A which matches the total current demand. However, using average per-unit current, the reference currents for the two sources are set as 450 A and 225 A. In this case, the total current reference then will be 675 A, which is more than the current demanded by the load.
Similarly, if these two sources are supplying 450 A and 200 A, average per-unit current sets references of source-1 and source-2 as 425 A and 212.5 A. Total current commanded is 637.5A which is less than the actual load demand. However, proportional current reference in this case is same as in the case above.
Also, as apparent from the above two examples, reference for per-unit average is dependent on the distribution of load currents which is not the case for proportional current. This is another drawback of per-unit average.
These two drawbacks make proposed proportional current based secondary controller more appealing to authors than per-unit average current based secondary controller suggested in [24].  generated by the simulated model of the DC Microgrid are supplied to the sensing board using a Giga Transceiver Analog Output (GTAO) card, which is mounted on the hardware module of RTDS. The DSP process these analogue signals and the digital output PWM pulses are generated by the controller implemented in DSP. These generated PWM pulses are supplied to various switches of dc-dc converters simulated in RTDS using a Giga-Transceiver Digital Input (GTDI) card.
DC Microgrid including three sources and three loads connected the ring configuration of interconnecting shown in Fig. 8 is simulated in RSCAD. The parameters of the DC Microgrid simulated in RTDS are the same as that of the parameters listed in Tables 2 and 3. Initially, the loads connected across the source bus-1, 2 and 3 are 25kW each.    16 shows the waveforms of currents supplied by source-1, source-2 and source-3. At time instant t=0.2s, the load at source bus-2 and source-3 is changed from 25kW to 35kW and 25kW to 40kW. From these waveforms, it is observed that as soon as the load demand is changed, the current immediately settles down at its steady state value within 20ms. This validates the fast dynamic response of the converters.
The nominal voltage of source-2 is 400 V. The error in the nominal value of source voltage-1 and 3 is -1% and 1% respectively, of the base nominal value of source voltages.   continues to flow among the sources. The error in current sharing for source-1, 2 and 3 are listed in Table 4 and are 4.4%, 2.2% and 2.2%, respectively. To minimize these circulating currents, the proposed secondary controller is switched on at a time instant of t = 2s. Due to the action of the proposed controller, a positive shift, v shift1 takes place in the nominal voltage of source-1, while the negative shifts, v shift2 and v shift3 take place in the nominal voltages of source-2 and source-3 as shown in Figs. 18(a) and 18(b). The magnitude of v shift1 is 4.5V while the magnitudes of v shift2 and v shift3 are -3.0V and -3.5V, respectively. Due to these shifts in nominal voltages of the sources, the circulating current flowing into source-1 is minimized to 1 A while the value of circulating currents for source-2 and source-3 is 0.5A each which is shown in Figs. 17(a) and 17(b). Fig. 19 shows the waveforms of currents supplied by source-1, source-2 and source-3. Before the time instant t=1s, the current supplied by source-1 is 70A while the currents supplied by source-2 and 3 are 87A each. At time instant, t=1s, the proposed secondary controller is switched on. Due to the action of the proposed controller, the redistribution of currents takes place among source-1, source-2 and source-3. At time instant, t=5s, the currents supplied by source-1, source-2 and source-3 are settled to 81A, 82A and 81.5A, respectively. Fig. 20 shows the waveforms of source voltage-1, 2 and 3. Initially, the voltage across source-1, 2 and 3 are 392.2 V, 396.5 V and 400 V respectively. After the voltage shift in nominal voltages, the final values of source-1, 2 and 3 voltages are 396.4 V, 393.7 V and 396.5 V respectively. The voltage regulations appearing across the terminals of the dc-dc boost converter connected across the source-1, 2 and source-3 are listed in Table 4. Using conventional droop law, the voltage regulations across the converters are 2.25%, 1.75% and 1.6%. The proposed secondary controller is switched on at a time instant of t=2s. Due to the action of the proposed controller, a positive shift, vshift1 takes place in the nominal voltage of source-1, while the negative shifts, vshift2 and vshift3 take place in the nominal voltages of source-2 and source-3 The proposed secondary controller ensures voltage regulation across the converter ends of source-1, 2 and 3 as 2.5%, 2.25% and 2.12%.
From Table 4, the voltage regulation appearing across the terminals of source-1, 2 and 3 using the proposed secondary controller is observed to be less than 5%. This eliminates the need for a controller required to improve voltage regulation across the source converters. These waveforms validate the efficacy of the proposed controller used to minimize circulating currents flowing among the source converter due to unequal values of nominal voltages.

V. DISSCUSION AND CONCLUSION
The circulating current flowing among sources connected in a DC Microgrid is a serious concern. The circulating current flows due to unequal nominal voltages of the source converters. The unequal nominal voltages occur due to errors in the measurement of voltage sensors included in source converters. In a source converter, the voltage sensor supplies a feedback signal to the voltage controller. A nonzero value of circulating current may lead to losses, decrement in efficiency, draining of battery, and overloading of converters. This in turn may lead to premature failure of converters. To resolve this issue, a distributed secondary controller is suggested in this paper. The proposed controller computes the circulating current flowing among the sources. If this current is greater than the tolerance value of the circulating current, the proposed controller keeps on shifting the droop characteristics of the source parallel to the voltage axis until and unless the circulating current is minimized below the tolerance value. To shift droop characteristics, the proposed controller includes an integrator. To validate the efficacy of the proposed controller, results are captured using the CHIL setup. The error in proportional current sharing due to the conventional and proposed controller for source-1 is observed to be 4.4% and 0.4% respectively. The voltage regulation across the source converter using conventional droop control law and the proposed secondary controller for source-1 is 2.25% and 2.5%, respectively. This validates the effectiveness of the controller's performance. Root loci plots are used to study the impact of variation in the parameters of the proposed controller on the stability of the DC Microgrid. From this plot, it is observed that the stability margin of the DC Microgrid decreases with an increase in the gain of the proposed secondary controller. The proposed secondary maintain current sharing accuracy in case of microgrid having sources of unequal capacity. Further, the proposed secondary ensures the fail-safe behaviour of the DC microgrid in case of communication link failure.

DECLARATION OF CONFLICT OF INTEREST
The authors declare that they have no conflict of interest that could have appeared to influence the work reported in this paper.

ACKNOWLEDGMENT
This publication, was made possible by NPRP grant # [13S-0108-200028] from the Qatar National Research Fund (a member of Qatar Foundation). The statements made herein are solely the responsibility of the authors. The APC for this manuscript is funded by the Qatar National Library, Doha, Qatar.