Modelling and Control of Modular DC-Nanogrids Based on Loss-Free Resistors

This paper proposes a modular photovoltaic (PV) dc-Nanogrid (dc-NG) architecture for residential applications. The proposed architecture is based on the Loss-Free Resistor (LFR) concept. The dc distribution bus is supplied by PV panels, ac utility and a storage battery. The storage battery is connected to the main dc bus through a dc-dc bidirectional converter (BDC). This battery has also an important role to ensure uninterruptible power supply to the critical loads and controls the power flow in the dc-NG. A mathematical model of the system is first derived and a stability analysis is carried out showing that the stability is guaranteed under certain mild conditions. Numerical simulations of a case study for two PV panels corroborate the theoretical predictions which have been finally confirmed by experimental measurements.


I. INTRODUCTION
Future power grids will no longer be dominated by coalfired power stations. The production of electrical energy will also be based on distributed generation sources such as solar photovoltaic (PV) arrays, wind turbines and batteries forming nano and micro grids [1], [2]. In particular, solar photovoltaic (PV) technology is considered as one of the most environmentally-friendly energy sources since it generates electricity with almost zero emissions while requiring very low maintenance efforts. Therefore, PV panels are the most important renewable energy sources that can meet power requirements of residential applications without jeopardizing the aesthetics of the building [3], [4]. This explains the increasing demand of PV arrays installation in homes and small companies in both grid-connected and in stand-alone operation modes.
DC nanogrids (dc-NGs) are gaining interest in different places such as remote areas, recharging stations for electric vehicles (EVs), data centers and residential areas [5].
The associate editor coordinating the review of this manuscript and approving it for publication was Ali Zemouche. Besides, they can be interconnected to form a microgrid for a relatively large geographical region offering several advantages such as higher efficiency, reliability and modularity [1], [6]- [8].
When dc-NGs are supplied by Renewable Energy Sources (RES), they are affected by frequent and relevant energy fluctuations, which can be only mitigated by using energy storage systems to ensure uninterruptible power supply to the critical loads and to maintain the power balance in the dc-NGs [9]. Batteries are the most common and economical storage devices in medium power-range. A dc-dc converter is always required to allow energy exchange between the battery and the rest of the system. These kind of converters must have a bidirectional power flow capability with flexible control in all operating modes [10], [11].
Many techniques have been used to control bidirectional converters. As an example, in [12], [13], several control methods such as Passivity-Based Control, Immersion & Invariance and Sliding Mode Control (SMC) have been applied to a BDC loaded by a Constant Power Load (CPL). In [14], a BDC under a hysteretic controller for a battery energy storage system has been analyzed. VOLUME 8, 2020 This work is licensed under a Creative Commons Attribution 4.0 License. For more information, see http://creativecommons.org/licenses/by/4.0/ Many research efforts have been devoted to control and stability analysis of micro and NG systems [15]- [21]. For instance, a hierarchical control system and an adaptive droop control has been introduced in [15], [16] for dc microgrids, while in [17], a simple droop control approach for autonomous power management in low voltage dc microgrids based on a master-slave concept has been presented. The distributed energy resources control and operation in a grid-connected off-grid dc microgrid have been studied in [18]. Moreover, in [19], a current controlled approach has been utilized for controlling the active power flow and the power factor of a bidirectional converter interfacing ac and dc microgrids. The stability analysis of a dc-NG has been studied using Nyquist test [20]. A frequency output impedance matrix model has been proposed to describe the output terminal frequency characteristics of a dc-dc converter in a NG around its switching frequency range [21]. Most of the research about the control and stability analysis of NGs consider the analysis of a single or two converters while ignoring the rest of the NG and the possible interactions between its different subsystems. This is mainly because of the difficulty of the analysis of the whole nanogrid under the above mentioned control approaches. Therefore, it is of primordial importance the synthesis of dc-NG without possible interactions among its composite subsystems.
The traditional description of a dc-dc switching converter as a conservative two-port circuit was due to R.D. Middlebrook [22] who established that the most appropriate model for that description was a dc transformer, i.e., a device that does not exist in nature but can be implemented electronically.
Middlebrooks paradigm was complemented some years later by the proposals of S. Singer, who introduced the notions of power gyrator [23] and Loss-Free Resistor (LFR) [24] to model the behavior of a dc-dc switching converter. The new elements were also conservative two-port circuits that completed a family of canonical elements to model any power processing circuit. The canonical elements are therefore the dc transformer, the power gyrator and the LFR, and they were categorized subsequently by S. Singer and R.W. Erickson as POPI networks [25], the acronym POPI standing for Power output-Power input, which means that the power dc at the output port equals the power dc at the input port.
These notions are not merely useful for interpreting the operation of power processing systems but they play besides an important role in the first step of designing interconnected converters. Most of the functions required in the association of converters in dc distributed power systems such as paralleling, cascading, source splitting etc. [26] can be obtained by designing dc-dc converters operating as any of the three canonical elements mentioned above. Roughly speaking, series association of ports leads to use a dc transformer approach while paralleling can be carried out using a power gyrator-based design [27].
The usefulness of an LFR-based design of a power converter has been recently revealed in the cascade connection of converters [28] and in Power Factor Correction (PFC) circuits [29], [30]. The LFR is modelled by a resistor in the input port, called emulated resistor, and a power source at the output port as shown in Fig. 1(a).
The novelty of this work is the use of a LFR-based design for three different purposes, each of them corresponding respectively to each of the three basic blocks of the proposed nanogrid; namely, photovoltaic energy processing, ac utility connection, and bidirectional operation of the battery. The three different goals to be attained with the LFR approach are the following: (i) Connecting in parallel the output ports of several power converters to process the energy provided by the photovoltaic generator without any circulating current. It has to be pointed out that connecting n power sources in parallel results in a new power source, which supplies the sum of the corresponding n corresponding currents and powers while supporting the same original voltage as depicted in Fig. 1(b).
(ii) Correcting the power factor in the rectifier stage.
(iii) Establishing the operation mode in the bidirectional converter, i.e., battery charging mode for a negative value of the emulated resistance of the LFR, and battery discharging mode for a positive value of that resistance.
The underlying idea in our proposal is the implementation of a nanogrid using only converters with LFR behavior in the three constitutive blocks of the system as shown in Fig. 2. The main antecedent of developing a power distributions system based on a single canonical element was reported in [31], where a dc grid was implemented using two different types of power gyrators, which were associated either in cascade or in parallel. A subsequent comparison between power gyrators and LFRs in the cascade connection of power converters in [28] revealed that LFRs exhibited a larger stability margin. Besides, converters with LFRs behavior are more versatile than converters with gyrator characteristics. Although the latter are particularly suitable for paralleling power converters [27], [32], they cannot be used in power factor correction and in bidirectional operation. the LFR approach is very important since it would simplify the construction and expansion of micro-grids powered by renewable sources in which the converters can be considered black boxes which can be aggregated without any stability problems.
In this paper, a dc-NG utilizing the LFR concept, supplying different types of loads and being supplied from different energy sources is presented. In [33], [34], a proofof-concept of the impedance matching of a single branch has been studied, and the idea is extended here to different branches constituting the modular NG. A comparison has been proved that the two cascaded boost converters is better than coupled-inductor step-up converter in terms of simplicity, stability and number of components [34], hence motivating the use of the the same cascaded converters for implementing the dc-NG. As will be shown later, the used approach facilitates the synthesis of the system, its stability analysis and its final realization. Furthermore, the same concept of LFR has been also applied to design the BDC interfacing a storage battery and the dc bus, and also, to the design of ac-dc converter to interface ac utility and the dc bus.
The rest of this paper is organized as follows. Section II presents the description of the proposed modular dc-NG which is constituted by n output-parallel-connected two-stage boost converters interfacing the PV panels to the dc bus, an ac-dc converter connected to an ac utility and finally a BDC connected to the storage battery. Section III deals with the mathematical modeling of the system and its stability analysis. Numerical simulations and experimental measurements from a case study with two branches (n = 2) are presented in Section IV. Finally, some concluding remarks of this study are summarized in the last section.

II. NANOGRID DESCRIPTION AND ITS MATHEMATICAL MODELLING
A. SYSTEM DESCRIPTION Fig. 3 shows the block diagram of the proposed dc-NG. As can be seen in the same figure, different PV panels are supplying different kinds of loads through two-cascade boost converters operating as LFRs performing impedance matching [34]. The different n PV panels are connected to the regulated dc bus using n branches of two-stage boost LFR. Although decentralized storage systems can offer some benefits in terms of more reliability and less stress in the devices [35], [36], our proposal uses a single battery due to the low power handled by the nanogrid. This storage battery is connected to the main 380 V dc bus using a BDC also operating as an LFR with an additional outer voltage loop for regulating the dc bus. In addition, the ac utility is connected to the same bus using an ac-dc rectifier with PFC. This PFC converter is used to connect the dc-nanogrid to the AC utility. The dc-NG can be working in stand alone if this converter is disabled. The proposed dc-NG will be loaded by different linear and nonlinear loads. The load types for dc-dc switching power converters could be mainly linear resistive or constant impedance load, linear capacitive load, constant voltage or battery load, constant current load or linear inductive impedance load. Nevertheless, it has been shown in the literature that in microgrids [37] the load could also be a constant power nature. Therefore, in this paper, the system is supposed to supply a Resistive Load (RL), a Constant Current Load (CCL) and a Constant Power Load (CPL). IN all the cases, for synthesizing the different LFRs, sliding mode control is used.
A possible practical realization of the dc-NG depicted in Fig. 3 is shown in Fig. 4 where the main components have been detailed using their corresponding schematic circuit diagrams.

B. MATHEMATICAL MODELING OF THE DC-NG
In this study, the PV generator model in a branch m is a current source in parallel with a diode (Fig. 4). It can be described by the following equation where m is an integer number varying from 1 to n labeling the different branches. where v p,m is the voltage of each module, I pv,m and I 0,m are the photogenerated and saturation currents for each module, respectively, V t is the thermal voltage for each PV module which is given by V t = N s KT /q where A is the diode ideality factor, K is the Boltzmann constant, q is the charge of the electron, T is the PV module temperature, and N s is the number of the cells connected in series.
Based on KVL and KCL, the following set of differential equations describing the system of Fig. 4 All the parameters that appear in (2a)-(2e) are shown in Fig. 4.
Variables u 1,m , u 2,m , u f and u b are the discontinuous control signals for the different converters and are shown in the same figure. R is the resistance of the load RL, I is the current of load CCL and P is the power of load CPL. The capacitor C is the parallel equivalent capacitance of the different output capacitances in each branch. For simplicity, it is assumed that all the capacitances in the different branches have negligible ESR and the dc bus has a negligible impedance in such a way that v c2, Therefore, the equivalent capacitance at the dc bus terminal can be expressed by Note that the equation describing the dynamical behavior of the dc bus voltage v bus of the dc NG depends on the inductor current i L b of the BDC and the inductor current i L f of the PFC converter.
Each branch of two cascaded boost converters is controlled using their corresponding SMC by appropriately selecting their sliding surfaces. The sliding surface in the first stage is described by a switching function s 1,m (x), which constraints the relationship between the input voltage of the module v p,m and the input current i L 1,m . In turn, the sliding surface for the second stage is described by a switching function s 2,m (x) which imposes a proportionality between the intermediate voltage v c1,m and the intermediate current i L 2,m . Therefore, the previous switching functions can be selected as follows where g 1,m is the output of the MPPT controller, which is a slowly varying state variable that is considered constant for simplicity, and g 2,m is a constant coefficient whose value can be selected according to design specifications such as regulation of the intermediate bus and efficiency optimization [34]. Their time derivatives can be therefore expressed as followṡ Note that the control variables u 1,m u 2,m appear in the expressions of theṡ 1,m andṡ 2,m through the derivative of the inductor currents i L 1,m and i L 2,m hence guaranteeing the sliding-mode operation of each stage in the different branches.

C. MODELING THE AC-DC PFC CONVERTER
The ac-dc converter performs the PFC by emulating a resistive behavior at the input port, this being the most known application of LFR. As a result, the rectifier exhibits a unity power factor, which is required to meet relevant harmonic standards (e.g. IEC61000-3-2 [38], [39]). The inductor current i Lf in the input port of the PFC converter is described by the following differential equation To induce the LFR behavior in the ac-dc PFC circuit, the following switching function is selected where g f is an appropriate conductance that can be adjusted according to the required power from the ac utility. The time derivative of the previous switching function is given by the following expressioṅ where it can be observed that the control variable u f appears through the derivative of i L f hence sliding-mode regime is guaranteed also in the ac-dc stage [33].

D. MODELLING THE BIDIRECTIONAL CONVERTER
In our case, the purpose of using a BDC is to connect a storage back-up battery to the dc distribution bus. The converter must have a power flow capability to supply the loads during power shortage. The BDC can also control the power flow direction to charge or discharge the storage battery. Moreover, in this work, one of the main functions of the BDC is to regulate the dc bus voltage. This converter is also controlled to induce LFR behavior using a sliding-mode approach. The conductance g b of the BDC is generated using a PI controller regulating the bus voltage. Fig. 5 shows the BDC connected to the rest of the NG where the models of the different elements have been simplified and represented by different kind of loads. Namely, the ac-dc converter and the output of the cascaded boost LFRs in each branch have been represented by constant power sources, P f provided by the utility and P pv delivered by the PV generators. Other loads in the form of constant current source, constant power load and constant resistance load are also taken into account in the block diagram of Fig. 5.
The BDC works in the buck-mode (charging battery), when the total generated power by the PV panels and the ac utility is higher than the absorbed power by the load p L . The generated VOLUME 8, 2020 power by the PV panels p pv , ac utility p f and the demanded power by the load p L can be expressed as follows where p om (m = 1...n) is the power at the output of each branch, P is the power of the constant power load, I is the current of the constant current source and R is the resistance of the resistive load. Similarly, the BDC works in the boost-mode in case of power shortage. The BDC can be modeled as a power source p s in case of discharging mode or as a power sink p b in case of charging mode depending on the operating point as it has been explained before. The transferred power of the BDC in both modes can be expressed by the following expressions According to Fig. 5, the BDC working as a boost converter can be expressed using the following set of differential equations where κ p is the proportional gain and τ is the time constant of the PI controller. The BDC is operated as a bidirectional LFR using a sliding-mode approach. Its sliding surface is therefore selected such that a proportionality between the current i L,b and voltage V b at its input port is imposed. The sliding mode dynamics can be expressed by the switching function s b (x) as follows Its time derivative can be expressed as followṡ where it can be observed that the control variable u b appears through the derivative of the inductor current i L,b . By controlling the sign of the conductance g b , the direction of the power flow of the BDC can be fixed. If g b is positive, the converter works in the discharging boost-mode delivering the power p s for the dc distribution bus. If g b is negative, it works in the buck mode to charge the storage battery with power p b . The power p s and p b can be expressed also a function of the conductance g b as follows The conductance parameter g b is adjusted to regulate the dc bus voltage and can be selected to be the output of the PI dc bus controller as shown in Fig. 5.

III. STABILITY ANALYSIS OF THE DC NANOGRID
To perform a stability analysis of the whole dc-NG, a closedloop dynamical model is required. This model can be derived by obtaining the expressions of the equivalent control of each element and substituting them in their respective switched models (Eqs. (2a)-(2e), (5) and (13)- (14)) while taking into account the sliding-mode condition (Eqs. (3a)-(4b), (6)- (7) and (15)- (16)). The expression of the equivalent control for each element of the dc-NG can be obtained by equating to zero the corresponding switching functions and solving for the binary signals u 1,m , u 2,m , u f and u b . Hence, the following expressions for the equivalent control variables u eq 1,m , u eq 2,m and u b eq,b can be obtained where  (15)-(16) result in the following reduced-order model for the ideal sliding-mode dynamics: Note that the state equations describing the dc distribution voltage and the conductance depend on the ac utility line frequency which is well below the switching frequency. Therefore, the rectified ac input voltage at the PFC converter can be considered constant during few consecutive switching periods [40]. The term g f v 2 f (1 − g f L f ω/ tan(ωt)) can be approximated to its dc averaged value g f V 2 f over one line period, where V f is the dc component of the rectified sinusoidal voltage v f .
Using the reduced order model (19a)-(19d) and taking into account the constraints imposed by the sliding surfaces, the equilibrium point of the system is expressed as follows where where W stands for the Lambert-W function and P s is the supplied power from the storage battery to the downstream loads at the equilibrium point P s = −P b = P L − P pv − P f . The load power, generated PV power and ac utility power at the equilibrium point can be redefined as follows Let J be the Jacobian matrix of (19a)-(19d) and I be a unitary matrix with appropriate size. Therefore, the characteristic polynomial equation det(J − sI) can be expanded in the following form where a 1 and a 0 can be defined as follows Note that the characteristic polynomial has 2n + 2 roots. Namely, 2n roots correspond to the n branches of the PV-fed two-stage boost converters and two roots for the BDC. It can be observed that the roots corresponding to the n branches are located in the left half side of the complex plane. Those corresponding to the BDC can be appropriately selected to ensure the desired system performances. For the system to be stable, the following conditions must be fulfilled As mentioned before, the BDC is responsible for the regulation of the dc bus and the power flow direction in the BDC. Therefore, the PI controller for this converter should be appropriately designed. With this aim, a small-signal model is needed, which can be derived by first obtaining the large-signal model from the switched model of the converter, assuming the sliding mode condition and using the expression of the equivalent control. The switched model was given in (13)- (14) and Eq. (2e). From (2e), the equivalent control of the BDC can be expressed as follows: From the switching conditions of Eq. (15), (16), the inductor current of the BDC can be expressed as follows By substituting Eqs. (26), (27) (13), the following equation is obtained The previous equation describes the large-signal lowfrequency characteristics of the BDC operating as a LFR. The small-signal transfer functions of the BDC can be derived by linearizing the large-signal model and taking the Laplace transform of the resulting equations [41]. In the following analysis, it will be assumed that the uppercase letter denotes the steady-state value of a variable, the lowercase letter denotes the averaged value of the same variable, and the lowercase letter with a hat denotes the small-signal disturbance close to the steady-state value. Therefore, it can be written as follows By substituting the previous expressions in Eq. (28) ,p m and G v,c m can be expressed as follows where in turn, the parameters a, b 1 , b 2 and b 3 are defined as follows a = 2/(RC) In order to regulate the voltage of the dc distribution bus, the transfer function G v,g b (s) should be considered since it represents the relationship between the dc bus voltagev bus (s) and the control variableĝ b (s). The closed-loop dynamic model for the BDC is shown in Fig. 6 with all the elements of the dc-NG. The transfer function G c (s) of the PI compensator can be expressed in the following form: To simplify the design of the controller, the pole in Eq. (31a) of the BDC is canceled by the zero of the PI compensator of Eq. (32). The gain κ p and the time constant τ of the PI controller has been selected such that the system presents a phase margin of 45 o . Using Eq. (31a) and Eq. (32), and taking into account the pole-zero cancellation, the total loop transfer function T (s) of the system can be expressed as follows This model can be used to design the system with the desired closed-loop performances. Referring to Fig. 6, the closed loopî-to-v bus transfer function can be written as follows which can be expressed in the following canonical form where W 1 , W 2 , ω n and ζ are as follows:  Similarly, the closed loopv f -to-v bus transfer function can expressed as follows Using the previous parameters, the settling time t s = 4/(ζ ω n ) and the maximum overshoot M a = exp −π ζ / √ 1−ζ 2 can be calculated.

IV. NUMERICAL SIMULATIONS AND EXPERIMENTAL RESULTS
In this section, a validation of the previous theoretical results using numerical simulations and experimental results are presented. A system consisting of two PV panels, an ac source and a storage battery are connected to synthesize a dc-NG as shown in Fig. 7. These power sources are connected to the dc bus of the dc-NG through different converters operating as LFRs. A battery of 96 V has been used as an energy storage and has been connected to the dc bus using a BDC. The PV panels have been used to feed the dc bus through two cascaded boost converters operating as LFRs and the ac source has fed the dc bus using an ac-dc converter. The considered PV generator here has a nominal power of 85 W and its parameters are listed in [42]. The dc-NG has been loaded by a parallel combination of different loads, Constant Power Load (CPL), Constant Current Load (CCL) and a Constant Resistance Load (CRL). Two electronic loads have been used in the experimental set-up, the first one working as a CPL and the second one as CCL. The used equipments are illustrated in Fig. 7. Table 1 shows the parameter values used in the numerical simulations and experimental setup. Firstly, the validity of the ideal sliding dynamic model is verified by numerical simulation by comparing the results from this model and those from the full-order detailed switched model implemented in PSIM software in different regions of the state space. As depicted in Fig. 8, two initial conditions P1 and P2 are considered while the system is simulated using the two different models. It can be observed from this figure that there is a good matching between the two models both in transient and in steady-state operation. Secondly, the system has been checked under a step change of input power using numerical simulations and experimental results and the results are depicted in Fig. 9.
The supplied power by the ac source reduces from 600 W (Interval A) to 200 W (Interval B) for a total load power of 500 W. The supplied power by the PV panels is equal to 100 W. The total load power has been distributed among VOLUME 8, 2020 different kinds of loads, an RL of 1423 which is equivalent to 100 W, a CCL of 0.53 A which is equivalent to 200 W and a CPL of 200 W. Note that during the interval A, the supplied power is enough for the load because the total input power is equal to 700 W which includes the PV power and PFC power. The BDC in that moment operates in buck mode to charge the storage battery. On the other hand, for interval B, when the input power decreases from 600 W to 200 W, the generated power is not enough to feed the required power by the load because the total input power is equal to 300 W. Thus, the BDC operates in boost mode to compensate the lack of power which must be provided by the battery. Note also that under input power disturbances, the dc bus exhibits a recovery to its steady-state value with a settling time around 330 ms and an overshoot voltage 40 V that means around 10% The system has been also checked under a step load change and fixed input power. The total load power has been distributed among different kinds of loads, an RL of 1423 which is equivalent to 100 W, a CCL of 0.26 A which is equivalent to 100 W and a CPL of 100 W. The generated power by the PFC and PV panels have been fixed to 400 W and 100 W respectively. Therefore, the total input power to the dc-NG is equal to 500 W. The load power changes from 300 W (Interval C) to 700 W (Interval D) by changing the CCL power from 100 W to 500 W. In this test the load power was distributed among three different kinds of loads. Namely, an RL and a CPL whose power has been both maintained fixed to 100 W in both a CCL whose power has been changed from 100 W (Interval C) to 500 W (Interval D). Fig. 10 shows the corresponding simulated and experimental waveforms. Note that when the required power by the load is equal to 300 W, the input power is enough to supply the load and the extra generated power is used to charge the battery through the BDC which operates in the buck-mode. However, when the load power changes from 300 W to 700 W, the total generated input power (500 W) is not enough to supply the load and in this case, the sign of the conductance g b of the BDC is inverted automatically by the controller. Then, the power flow in the BDC is changed causing this converter to operate in the boost mode. Note that under load power changes, the dc bus exhibits a fast recovery with similar settling time and overshoot as in the previous case.
A state space trajectory of the BDC under load change with a total input power of 500 W is depicted in Fig. 11, which was obtained from numerical simulations using the detailed switched model and from experimental measurements in the  laboratory prototype. This figure shows both transient and steady-state operation of the BDC when it works in different modes. When the load power is equal to 300 W, the BDC operates in the buck mode and its average steady-state correspond to Point EP1. When the load power is equal to 700 W, the BDC operates in the boost mode and its average steady-state moves to Point EP2.
Using the previous parameters, the settling time t s = 4/(ζ ω n ) and the maximum overshoot M a = exp −π ζ / √ 1−ζ 2 have been calculated and the results are listed in Table. 2. As can be observed, the theoretical results are in a remarkable agreement with the numerical simulations and the experimental measurements.

V. CONCLUSION
In this paper, a modular PV household dc nanogrid has been proposed. The novelty lies in the synthesis and implementation of the nanogrid using converters with LFR behavior in all the elements of the network. The latter consists of three canonical elements, namely, a rectifier block supplied by the AC grid, a bidirectional converter with a battery, and several unidirectional converters each of them supplied by a PV generator. The main features of resulting network are the following: i) The LFR behavior in the converters processing the solar energy allows the straightforward paralleling of their outputs ports.
ii) The LFR nature of the rectifier provides power factor correction iii) The LFR characteristics in the bidirectional converter establish the operating modes, i.e., battery discharge when the LFR emulated resistor is positive and battery charge when it is negative.
iv) The stability of the interconnected blocks is ensured by a simple feedback loop in the bidirectional converter, which regulates the DC bus voltage.