Inertia emulation with incorporating the concept of virtual compounded DC machine and bidirectional DC–DC converter for DC microgrid in islanded mode

Independence in energy generation, attention to environmental issues, limited fossil fuel sources, and easy access to renewable energy sources have led governments, industry, and engineering to use renewable energy sources for decades. Meanwhile, microgrids for resi-dential, commercial, industrial, and military purposes are widely used using these resources. However, the use of these sources in microgrids is associated with the challenges of uncertainty and lack of inertia. Therefore, by using energy storage systems in DC microgrids, the mentioned challenges can be overcome by emulating inertia. The purpose of this paper is to present a virtual compounded DC machine (VCDCM). The governing equations of the compounded DC machine have been accurately studied and the desired characteristics of this machine have been used to emulate inertia through the control of the buck-boost converter connected to the energy storage systems in the concept of VCDCM. Proposed scheme; in an islanded microgrid with maximum components and standards required; Simulated in the Simulink/MATLAB environment. The results obtained under different sce-narios conﬁrm the ability of the proposed scheme to stabilize the DC bus voltage. The magnitude of DC bus voltage deviation from the reference value when an error occurs has resulted in a signiﬁcant reduction compared to conventional schemes.


INTRODUCTION
In the past, three-phase AC generation and transmission systems have been widely used and popular because of their main advantage over DC systems, mean long-distance power transmission due to the easy conversion of voltage levels. However, in recent decades, the structure of electrical grids has significantly changed that making new challenges to the utilization of power systems. On the other hand, with increasing demand for electrical energy, long distances between generation and consumption, losses and limitations of transmission lines [1], excessive use of natural resources, environmental issues of large power plants and the advent of modern power electronics [2] have led to the desire for distributed generator (DG) and the use of renewable energy sources (RESs). Modern power grids tend FIGURE 1 Classification of inertial emulation methods in ACMG and DCMG no rotating object, and a lack of inertia will cause problems in microgrid. Inertia is a physical property of rotating objects. Every rotating object tends to maintain its position, that is, it resists change of velocity or direction of motion. This property in large generators is one of the important components in increasing the stability of grids against sudden power changes [6].
In conventional AC grids, the occurrence of faults and power changes that cause disturbances in the grid frequency is partially compensated by the kinetic energy stored in the rotating parts of synchronous generators (SGs). In other words, inertia will cause resilience in the grid. Due to the development and use of power electronic converters (PECs), we are facing a lack of inertia in grids. This reduction in inertia has led to the development of a concept called virtual synchronous generator (VSG). This method actually implements the behaviour of a real synchronous generator using the concept of inertial emulation by PECs. This is to inertia emulation if the real synchronous generator is not accessible and far away and to minimize control problems and complexity. On the other hand, considering different control methods to emulate the inertia in AC microgrids (ACMGs) and DCMGs in two working modes connected to the utility grid and the islanded has been investigated. Different techniques are introduced separately for each case. (see Figure 1).
Mainly in ACMGs connected to the utility grid, the RES or utility grid with their PECs can be used as sources of inertial emulation, which is expressed as follows: To improve the performance of the frequency control, an additional fuzzy type controller is implemented in [7] to increase frequency stability. [8] by directly controlling the current flowing through the wind turbine (WT) rotor based on doubly-fed induction generator the optimal virtual inertia can be emulated in microgrid and frequency deviations can be improved. The effect of the virtual inertial response with respect to the kinetic energy stored in its rotating part is evident in [9] using variable speed wind turbines. [10] examines two control strategies that enable WT based on permanent magnet synchronous generator (PMSG) system inertial support in transient events. Both strategies use DC link capacitor energy and WT rotor kinetic energy to support system inertia. The incorporating of two improved governor controllers and a coupled compensator has been proposed to improve the quality of VSG control in [11]. The fuzzy controller with virtual inertia adjustment has been investigated to increase the inertia of the VSG [12]. Droop properties have been used to control the active and reactive power with the concept of VSG and by adjusting the rotation equation in [13]. By emulation the SG behaviour of a photovoltaic array (PV-A) converter in [14], frequency disturbances can be avoided during transient faults in the grid. On the other hand, due to the lack of access to the utility grid and the voltage source converter, the mentioned methods cannot be used in the islanded operation mode of ACMG. In this regard, RESs, ESS or the combined use of these two units together in microgrids, will be used to prevention frequency deviations. Considering the changes of irradiation, temperature and wind and their effect on RES, a variable droop design has been proposed to adjust the frequency according to the inertial emulation in [15]. By using DC capacitors during load changes or deviations of RESs output power, the stability of the grid can be increased [16]. Based on the optimal proportional-integral (PI) controller, a virtual inertia simulation scheme is implemented in the microgrid control loop in [17]. The ACMG inertia can be improved according to the proposed method [18] by adjusting the frequency based on the combination of wind turbines with electric vehicles. In [19], new control loops in WT converters have been used to create a virtual inertia and adjust the frequency of support in the microgrid.
In DCMG, due to the presence of RESs, the lack of inertia will cause problems, and this time the DC bus voltage stability will be threatened. Although each of the VSG models has its advantages, they cannot be used in DCMG. So, in DCMG, in order to improve the stability of the DC bus voltage through inertial emulation, the researches have been done for DCMG in two operation modes islanded and connected to the utility grid is examined. In order to increase the DCMG inertia, a virtual synchronous machine based on a bidirectional gridconnected converter is proposed [20]. In the case of the utility grid-connected, the proposed inertia control strategy is in [21] and [22], respectively, adaptive virtual inertia control with variable droop coefficient and self-adaptive inertia control combined with fast predictive converter regulation control. Virtual inertia control (VIC) and energy economic optimization have been proposed through a sequential current sharing program with a restoration controller to achieve DC bus voltage stability in [23].
In islanded mode DCMGs, like ACMGs, other methods must be used that do not require a utility grid to emulate inertia. In [24] by placing a high-pass filter to adjust the wind speed in the WT unit based on PMSG and the kinetic energy in its rotor, along with the ESS unit, the DC bus voltage fluctuations have been improved. Virtual inertia is controlled in [25] by introducing a simple first-order inertia loop distributed in microgrid. VIC has been implemented through PV-As active power control with ESS to achieve adaptive virtual inertia gain in [26]. Random changes in output power in weather-based generation cause uncertainty in the use of RESs as sources of inertia emulation and indicate the necessity use for ESS in microgrid [27][28][29]. On the other hand, batteries are more suitable than other ESSs for emulation inertia for long-term energy exchange and high power [30]. If the ESS unit is used alone in DCMG, the virtual inertia can be controlled similarly by controlling the droop of impedance type by modifying the droop coefficient [31]. Virtual DC machine (VDCM) simulation and virtual capacitor control for inertia have been investigated in [32,33]. Today, the implementation of VDCM using conventional DC/DC converters can be considered as a virtual inertia controller in DCMGs with RES [34]. A bidirectional DC/DC converter, as VDCM, is based on the theory of real DC machine operation and uses its velocity control technique [35].
So far, among the models expressed for implementing VDCM in [32,36,37], the equations of excited have been used. According to the Figure 2(a) and the comparison of the characteristic curves of different DC generators, it can be seen that the cumulatively compounded DC generator is the most suitable of all for the purpose of emulation inertia, because with increasing load power, the delivered voltage is almost constant. Therefore, by using the equations governing the compounded DC machine, VDCM can be reasonably upgraded to a virtual compounded DC machine in an acceptable way.
In this regard, the purposes of this paper are summarized as follows: • Review the principle of inertial emulation and present it in accordance with the DC machine. • Analysis and modelling of real compounded DC machine.
• Description of the implementation of a virtual compounded DC machine by accurately applying the governing equations of a real compounded DC machine in the control system of the interface converter between ESS and DCMG. • implementation of a DCMG with the maximum possible components and following the necessary standards, in order to evaluate the capabilities of the proposed scheme. The other sections of this paper are organized as follows: Section 2 describes DCMG configuration and description. Section 3 expresses the concept of inertia and the principle of virtual inertia (VI). Sections 4 and 5 defines the structure and modelling of the compounded DC machine and the structure of the VDCM. In Sections 6 and 7, the VDCM mechanism and VDCM control strategy are analysed, respectively. Finally, in Sections 8 and 9 simulation results and the conclusion of the article is presented.

DCMG CONFIGURATION AND DESCRIPTION
With the increasing replacement of DGs with conventional power systems, standards have been defined for microgrid. The sources used in a DCMG are often low power and based on RESs. Solar and wind energy have the highest growth rates in the last 3 years worldwide (51.24% and 50.28%, respectively) [38]. A battery-based ESS unit is also used in microgrids with key duties including maintaining an immediate balance of power and minimizing operating costs over a period of time [39]. High efficiency, wide modular size range and compatibility with production are some of the advantages of fuel cells (FCs) that make this unit an essential part of microgrid [40]. According to the mentioned cases, the studied microgrid components have been determined and in order to analyse it more closely; The structure, PECs, and controllers of each section are examined separately.

DCMG structure
The structure of DCMG includes WT based on PMSG with a capacity of 4 kW, PV-A with a capacity of 2 kW, AC and DC loads, mainly constant power and their PECs. In microgrid, RESs operate in maximum power point tracking mode. Since DGs (WT and PV-A) usually have an uncertain and random generation pattern, two ESS units: FC with a capacity of 2.2 kW and a battery pack consisting of two series batteries with a capacity of 5 kWh, 48 V, are used for support. The generation capacity of the mentioned units provides the average power of AC and DC loads. All these components are connected to a 300 V DC bus. An overview of DCMG is shown in Figure 3 and corresponding parameters are collected in Table 1.

PECs and controllers
Obviously, proper and reliable operation for a microgrid is achieved with its proper control. The main purpose of control in a microgrid is to achieve accurate power distribution between its sources and loads and to adjust the DC bus voltage. The output of the WT unit is connected to the bus by an uncontrolled three-phase bridge (Graetz diode bridge) and a DC/DC Boost converter. In the WT unit, the main control is located on the Boost converter. The control method is based on series loops of voltage control and current control. The PV-A output unit is connected to microgrid by a DC/DC Boost converter. In the control part of this unit, the voltage and current of PV-A are compared with their nominal value. As a result, the output power is controlled. Also, the FC output unit is connected to the DC bus by a DC/DC Boost converter. The input reference value for the current controller is done through the power management unit in order to control the delivered power of this unit. The AC load is connected to a DC bus by a voltage source inverter (VSI) and uses droop control for regulating active and reactive delivery power. A DC/DC buck converter is also used to power the DC load. To more describe their operation, the block diagrams of each control section are shown in Figure 4. For better evaluation, all control characteristics and parameters are given in Tables 2 and 3. The batteries are connected to a DC bus by a bidirectional DC/DC converter (BDDC). The BDDC is controlled by the VDCM. In fact, the BDDC and the batteries generally act as VDCMs. It will control the DC bus and effectively improve the transient and steady state. In Section 3, the concept of VDCM will be completely discussed.

THE CONCEPT OF INERTIA AND THE PRINCIPLE VI
As mentioned, with the development of DGs based RESs, concerns about grid stability have arisen as most of these sources lack the necessary inertia. Rotational inertia is a scalar quantity that expresses how much each rotating object inherently resists changes in the amount or direction of rotation. In conventional AC grids, power is supplied by large synchronous machines (SMs) with large rotary rotors. The rotation of this huge object creates efficient effects due to its inertia in the grid. The presence of this high inertia is the main factor to prevent disruption and imbalance in the system and plays an important role in its stability. A real SM is described by differential equations regardless of its physics. The rotation equation of the SM rotor is expressed as the following equation: where m r is the angular frequency of the rotor, s is the synchronous frequency, J is the moment of inertia of the rotor, D is the damping coefficient, T m and T em are mechanical torque and electromagnetic torque, respectively. As mentioned, as the penetration of DGs increases, microgrids are considered as a small power grid. This changes the dynamic behaviour of the power system. Meanwhile, DCMG has an undeniable role to play in future grids. One mode of operation of DCMG is independent operation. The main purpose of DCMG is to maintain the DC bus voltage. Due To the issues expressed and the fact that these microgrids do not have large synchronous generators, they face the problems of instability due to lack of inertia. Which has led to the introduction of the concept of inertial emulation and virtual machines. This concept is actually modelling the dynamic characteristics of real rotating machines. To understand it, rotating machines must first be considered as an exchanger of energy.
An electric motor exchanges energy by receiving mechanical energy and converting it into electrical energy. This energy exchange is accompanied with the inertial properties and mechanical equations governing the machine. Now consider an ESS that exchanges energy with the system by PEC. The difference is that the exchange of energy here is not accompanied by a change in the form of energy. The purpose in VI is to create similar characteristics of a rotating machine in exchanging ESS energy with microgrid. In explaining this method, PEC is controlled based on the mechanical equation governing a real machine. These equations actually are the basis virtual machines. In the control block is usually placed a dynamic function similar to the rotation equation of a real machine rotor. This control block, in addition to determining the output power based on bus voltage measurements and the amount of changes; provides virtual inertia. From a grid point of view, there is no difference between a real machine and a virtual machine. It should be noted that the capacitor connected to the DC bus has the same properties as inertia. In conventional rotary machines, the rotor acts as an energy store. However, for the same amount of energy in a real machine rotor, the DC capacitor would be too large, which is not economical. To solve this problem, ESS is used to use a capacitor with less capacity. It can be said that the stored electrical energy of the capacitor (W e ) is similar to the energy stored in the rotor (W r ). The dynamic equation of capacitor voltage is expressed as follows: and for the energy stored in the rotor: where m r is the mechanical angular velocity of the rotor, C dc and v dc are the capacitance and output voltage of the converter, respectively. Under these concepts, ESSs and PECs will be integrated into DCMG using the VI concept and will meet the need for DC bus voltage regulation.

STRUCTURE AND MODELING OF COMPOUNDED DC MACHINE
DC machines Due to their nature, are wider and easier to control than other machines. Typically, conventional DC machines consist of three parts: field circuit, armature circuit and commutator section. The field and armature circuit can be connected in different ways to obtain different operating characteristics. To further clarify the reason for choosing the compounded DC machine to emulate the inertial behaviour, once again consider the characteristic curves of different types of DC machines in both DC generators and motors. Figure 2 shows the voltagecurrent curve of DC generators and the speed-torque curve of DC motors. The goal is to select generators and motors that have a relatively constant output with load changes. So, among generators; flat cumulatively compounded generator and among motors; differentially compounded DC motor have the desired characteristics. Note that a differentially compounded motor may rarely be used in practice, but assumptions are made in modelling these machines. The operation range and the ratio of the series winding to parallel winding to the characteristic curve of these motors are very influential and their relative stability in the desired ranges can be guaranteed.
In this modelling, assumptions for simplification are also considered. These assumptions are: • The destructive effect of the armature reaction is not considered. • Voltage drop due to brush connection is ignored.
• Saturation is ignored in order to create a linear magnetic field.
The basis of operation and in fact the stages of complete modelling of electric machines are examined from two viewpoint using in [41][42][43]: • Electromagnetic viewpoint • Mechanical viewpoint For express and explain these two models, the electromagnetic point of view can be used to obtain the equivalent circuit and induction voltage calculations. On the other hand, the torque equation is obtained by analysing the magnetic fields and the magnetic motive force. Mechanical equations can also be used to express the properties of inertia.

Electromagnetic viewpoint
The voltage equations of field and armature circuits for a compounded DC machine of the long shunt type can be written as follows: where f and a are the linkage fluxes of the field and armature windings, respectively, and R f , R s , and R a are the parallel excitation (field) winding resistors, series excitation, and armature, respectively. The linkage flux can be defined as follows: where N and express the number of turns of the coil and the flux respectively. From Equations (5) and (6): On the other hand: By replacing Equations (8) in (7): Since the mutual inductance between the armature windings and the field series winding is proportional to the position of the mechanical angles of the rotor: Also, can be written for the mutual inductance of armature windings and field parallel windings: By separating Equation (9): From Equations (10) to (12): Basically commutation act run in DC machines and as a result, the armature and excitation fields fixed relative to each other. These fields are always perpendicular to each other and m r = ∕2: In steady state and due to commutation, the term L aa (di a ∕dt) can be omitted: where in: The above equation shows the inductive voltage (E a ) in the armature.

Mechanical viewpoint
In addition to the electrical and magnetic equations, it is necessary to model the inertial equations in the rotor. In this regard to the mechanical equation governing the rotor and its dynamics is as follows: where T damp is the damping torque that is modeled due to the friction of different mechanical parts and is expressed as follows: The difference between the mechanical equation of the rotor of the SM and the DC machine in this term is: By multiplying of Equation (20) by m r , the power equation governing the rotor can be obtained: P em and P m are electromagnetic and mechanical powers, respectively, and are expressed by the following equations:

VDCM STRUCTURES
A virtual compounded DC machine is a combination of control unit, battery and BDDC with output filter. The schematic of the virtual compounded DC machine is shown in Figure 3.
In this structure, a BDDC is used as the interface between the battery pack and the DC bus. Buck-Boost converter has been selected as BDDC due to its ease of control, few numbers of components and therefore cost in the study scheme. This converter includes two IGBT/diode type power switches. With each switch is a RC snubber circuit in parallel to reduce switching losses. The switches are never on or off at the same time and the duty cycle of each switch complements the other: where D S 1 and D S 2 are the duty cycle switches S 1 and S 2 , respectively. This converter is connected to the battery pack on the first side. On the other side of this converter, which is connected to the DC bus, a capacitor is used as a filter and inertial storage. All the magnitudes of the circuit and control parameters of the virtual compounded DC machine are given in Table 4.

VDCM MECHANISMS
As mentioned in the previous sections, the DC bus voltage depends on the power balance and must remain almost constant under different operating conditions. It is the VDCM's duty to keep the DC bus voltage constant in power changes. That is, the virtual compounded DC machine restores balance to the system with support and power exchange. This power exchange happens along with the mechanical behaviour of the real DC machine. The strategy used allows us to eliminate the effect of undesirable parameters when modelling a real DC machine while maintaining its simplicity and efficient properties, the most important of which is inertia. In the event of a power system disturbance, the VDCM must show operation commensurate with the current situation in order to reduce the voltage deflection rate and thus maintain the DC bus balance. The operation mode is determined according to the power equation governing DCMG. In the proposed test grid, if the consumption and generation capacity is considered as follows: P gen = P gen PMSG + P gen PV−A + P gen FC (26) where P AC−L and P DC−L are the power consumption of AC and DC loads. Also P gen PMSG , P gen PV−A and P gen FC are the output power of WT, PV-A and FC, respectively. Then the power difference in the grid can be expressed as follows: The VDCM operation will be determined by the size and symbol ΔP, and its changes will result in DC bus voltage changes. In other words: Hence, as shown in Figure 5, three different operating modes can be considered for the compounded DC virtual machine.

Generatoring mode
When generators are unable to meet load demand, power shortage will occur in the grid and the DC bus voltage will drop. In other words, ΔP < 0. In this case, the virtual compounded DC machine is obliged to provide power to the load by discharging the battery. This will continue as long as the balance is restored to the grid. Therefore, VDCM, like an electrical generator, provides required power DCMG through BDDC.

Floating mode
When the grid is in full equilibrium, ΔP = 0. Generation and demand are equal, and the DC bus voltage is at its reference value. In this case, the VDCM goes floating so that the balance between load and generation is not disturbed. In floating mode, power from BDDC is not exchanged with microgrid.

Motoring mode
This occurs when ΔP > 0, ie when the load is not consumed all of power and we encounter excess power in DCMG. Therefore, the DC bus voltage has increased and the virtual compounded DC machine must compensate for it. In this case, the virtual machine directs the excess power to the battery by BDDC. The battery saves extra power by being in charging mode. So, this time VDCM receives power from the mains like an electrical motor.

VDCM CONTROL STRATEGIES
In the event of a fault in the microgrid, since the amount of power exchange of the virtual compounded DC machine with the grid is not known in order to eliminate the problem, the controller must manage the exchange power based on the DC bus voltage. Therefore, the control section includes DC bus voltage control, VDCM control, current control and finally pulse width modulation (PWM), which are connected using a cascade control strategy. The schematic of the control section is shown in Figure 6.
In the DC bus voltage control section, the reference value is compared to the measured value. This difference is adjusted by a PI controller so that its output is mechanical torque (T m ). In the next step, by comparing T m and the electromagnetic torque (T em ), the amount of torque changes ΔT is obtained. ΔT is the input of the VDCM control unit. To model a compounded DC machine, the first step is to calculate the virtual rotation velocity of the rotor ( m rv ). In fact, this is done by a dynamic equation similar to the rotor rotation equation, so: In the above equation, the v index indicates that the parameters are virtual. According to Equation (30), by multiplying m rv , the total flux of the excitation windings (series and parallel) of the virtual inductive voltage (E av ) is obtained: In Equation (31) by comparing E av and DC bus voltage, (V DC ) and using the resistance of armature and series windings, (R av + R sv ) the armature current (I av ) is calculated: By calculating the parallel field current (I fv ) obtained by dividing V DC by the resistance of the parallel winding R fv , and by comparing it with I av the output current (I L_refv ) is obtained: and In the current control section, to convert I L_refv to battery reference current (I Bat_ref ), the constant conversion multiplication of V ref ∕V Bat_ref is used. Other equations used in this control section are defined according to the following equations: The output signal determines the operation of the switches by applying to the PWM unit. After an imbalance occurs, the battery reacts to the DC bus voltage by measuring the power command to exchange power. Inertial emulation is the first control action that occurs in the first moment. This operation will be possible by using a capacitor and in the form of a fast change of power to control the voltage and its purpose is to reduce the voltage deviation. If there is little inertia in the system, the voltage deviates very quickly from its reference value. As mentioned, the DC bus capacitor has the same properties as the inertia of rotating machines, and according to Equations (36), the stored electrical energy of the capacitor is similar to the energy stored in the rotor. Therefore, in a VDCM, can write: Hence, the output capacitor helps to reduce the deflection speed at the first moment, but then the controller operates by exchanging power in such a way that the capacitor is not completely discharged or the bus voltage does not droop much. In a short time, VDCM returns the system voltage to its nominal value. This is done through power transmission. This will turn virtual inertia into an available controllable quantity.

VDCM SIMULATION RESULTS AND COMPARISON WITH CONVENTIONAL SCHEME
The structure and manner of VDCM control has been well and accurately examined, and now it is time to implement it on DCMG to analyse the ability to improve stability and voltage regulation of the proposed control strategy. The grid shown in the Figure 3 accurately implemented in MATLAB R2018b 9.5.0.944444/Simulink 9.2.
In this test scenario, the WT unit under wind speed 12 m∕s (equivalent to 1950.89 RPM for PMSG) with a power of 2.5 kW and the PV-A unit with a power of 3 kW under radiation 1000 w∕m 2 and 25 • C temperature respond for the large part of consumption. The FC unit with an output power of 2 kW is located in the microgrid for more load support. The consumer unit consists of two AC and DC loads, which are set in the values of 4.5 kW and 1.5 kW, respectively. The Figures 7(c) and 8(c) shows After starting the grid and during a short transient state, the grid reaches stability and the DC bus voltage is set to 300 V. In this period, due to the larger generation than consumption ΔP > 0. When the VDCM is in motoring mode, the I bat will be negative and 1.5 kW of excess power will be stored by the VDCM to restore balance to the system (Figure 7(b)). At 0.4 s, the DC power consumption increases by 1.5 to 3 kW. In this case, all the generation power flows to AC and DC loads and ΔP = 0, so the value of I bat will be zero and the power will not be exchanged via VDCM in the floating mode. As shown in Figure 7(a) the bus voltage drop under the proposed control reaches its maximum value of 1 V and then returns to its refer-ence value. This operation is done with minimal oscillation and smoothly. According to the Figure 7, a significant improvement can be seen compared to conventional control. Then in 0.8 s, 1.5 kW is added to the power consumption of AC load and reaches the value of 6 kW. At this moment it is ΔP < 0 and VDCM is in generatoring mode. I bat will be positive and the bus voltage drop this time reaches its maximum value of 1.2 V.
VDCM quickly restores the bus voltage to its stable state by providing the required power and prevents the grid from collapsing. As can be seen in Figures 7(a) and 8(a), the grid parameters reach their reference values faster and with less drop than usual. In 1.2 s the AC load decreases by 1.5 kW. VDCM is floated again and all output is consumed by loads. Then in 1.6 s the added DC load unit is disconnected from the grid and VDCM is put in motoring mode again and after receiving power, it puts the bus voltage in its steady state. The effect of VDCM on the stability of the grid can be seen in Figure 8. Finally, in the last 0.4 s, they repeatedly return to their original values. VDCM by changing the status to generatoring operation mode; suppresses the voltage rise and puts the DC bus in a stable state.
Compared to conventional control, the DC bus voltage disturbance range was narrowed by adopting the VDCM control strategy and a 2.8 V improvement is observed. Under the proposed scenario, it can be seen that the grid parameters are stabilized faster with the help of proposed VDCM and the power distribution is done correctly and without taking more current from the battery.

CONCLUSION
As mentioned in this article; with significant growth in the investment and operation of RESs, and the trend orientation power systems to microgrids, DCMGs have become a key element of current and future energy scenarios. The use of DCMGs, especially in the islanded mode, is associated with the main problem of lack of inertia. Therefore, in this study, a virtual compounded DC machine scheme to improve this situation with the aim of compensating for inertia and increasing DCMG security is presented. In this scheme, the governing equations of the real compound DC machine are accurately studied and by remarkably. and efficaciously incorporating it into the BDDC control plan, have succeeded in simulating the inertial properties of this machine in DCMG. Therefore, buck-boost converter as BDDC has been used due to advantages such as simplicity of structure, easy control, low cost and no need for filter capacitor on the battery side. In order to investigate the claims made, a DCMG has been simulated and used in Simulink/MATLAB environment with the utmost accuracy in components and structure. By analysing the simulation results in different scenarios, a virtual compounded DC machine shows a significant improvement in inertia imitation, suppression of DC bus fluctuations, and restoration of security to the microgrid compared to other similar schemes with an equal number of control components. So that the magnitude of deviation of the DC bus voltage from its reference value during changes and in the worst case; Reduced by half. Implementing a virtual compounded DC Machine seems practical due to the simplicity of its structure and the fact that typically each DCMG is equipped with a battery as ESS. Especially the simulation results present initial confirmation of the being practical of the virtual compounded DC machine. Due to the lack of sufficient laboratory facilities and budget, the construction of a hardware sample has been abandoned.