A Centralized Power Flow Control Scheme of EV-Connected DC Microgrid to Satisfy Multi-Objective Problems under Several Constraints

: Integrating electric vehicles (EVs) into a microgrid improves the efﬁciency, ﬂexibility, and robustness of microgrids. Unfortunately, the uncertainties of EVs, in terms of their connec-tion/disconnection times and their initial SOC values, make integrating EVs into microgrids a more challenging issue. Contrary to the standard energy management system (EMS), integrating EVs into microgrids raises several multi-objective problems that need to be solved. In this study, a centralized power ﬂow control scheme for an EV-connected DC microgrid (DCMG) is proposed to satisfy these multi-objective problems under several constraints. Two prime objective functions of the DCMG are presented to demonstrate the beneﬁts to both the DCMG system and EV owners. Then, a reliable and optimized DCMG system is constructed to satisfy the selected prime objective function. The operating modes of each agent in the DCMG are deﬁned based on information regarding the EV connection/disconnection status, the initial EV SOC values, the generation power of the wind power agent, the battery SOC levels, and the grid availability. The effectiveness and robustness of the proposed scheme have been validated by in-depth simulations and experimental tests under the uncertainties of DG power, grid availability, electricity price conditions, and EV connections. In addition, the proposed scheme reliably regulates the DC-link voltage without severe transience, even if these uncertainties cause the task of controlling the DC-link voltage to be transferred from one agent to another.


Introduction
The rapid development of the global economy continues to have a negative impact on the global energy and sustainability sectors. Increases in energy demand and consumption mean that environmental pollution and the energy crisis have become serious issues [1]. In order to overcome such problems, revolutionary innovations are needed in electrical power generation systems. The development of alternative energy technologies, such as wind and solar-based energy generation systems, is receiving worldwide attention [2]. As an example, California plans to supply 33% of its needed energy from renewable energy sources in 2020 [2]. In addition, the European Parliament aims to generate 20% of the EU's total energy needs by renewable energy in 2020 [3]. Despite the promising future for the development of renewable energy sources, the uncertainty and unreliability of generation systems still create other challenges, such as the problem of integrating renewable energy systems into electrical power grids, which is difficult because of their intermittent characteristics [4]. Installation of energy storage systems (ESSs) has been proven to reduce the fluctuations of renewable energy sources [5]. Moreover, the recent increased number of electric vehicles (EVs) has led several researchers to investigate using EVs to diminish the fluctuation of renewable energy sources [6].

1.
The power flow control structure of an EV-connected DCMG is presented. The proposed control scheme guarantees the stability of the DC-link voltage under uncertainties of EV, power generation, grid availability, and electricity price conditions. 2.
A power flow control scheme that provides benefits to the DCMG system or the EV owners is proposed. Depending on the selection of the prime objective function, the EV battery SOC can be maximized, or the electricity cost can be minimized. Despite the DCMG prime objective change, the proposed scheme ensures a stable and smooth DCMG operation without any severe transience. 3.
The proposed scheme is simple and easy to implement in the real system. The feasibility of the proposed scheme is validated with the experimental testbed consisting of practical power electronics converters.
The rest of the paper is structured as follows: Section 2 presents a configuration of an EV-connected DCMG system. Section 3 proposes the power flow control strategy for the EV-connected DCMG system in both the grid-connected mode and islanded mode. Sections 4 and 5 demonstrate the effectiveness of the present work based on simulation and experiment results, respectively. Finally, conclusions are presented in Section 6. Figure 1 shows a configuration of the DCMG system with EV and grid connections. Figure 1a shows a structure of a DCMG, in which the DCMG system is composed of different sources such as grid, battery, wind, load, and EV agents. The DCMG system in Figure 1 can be extended into a larger system with multiple renewable energy sources, batteries, loads, and EVs. The reference direction of current is also shown in this figure, in which the current that flows into the DC-link is denoted as negative (−) current. In contrast, the current that flows out of the DC-link is denoted as positive (+) current. In Figure 1a, P G denotes the power exchange between the DC-link and grid agent, P B denotes the power exchange between the DC-link and battery agent, P EV denotes the exchange power between the DC-link and EV agent, P L is the power absorbed in the load agent, and P W is the power generated by the wind power agent. A grid-connected inverter and transformer are installed to exchange the power between the grid agent and the DCMG. A bidirectional DC-DC converter is employed in the battery and EV agent systems in order to connect those systems to the DC-link. The wind turbine is connected with a unidirectional AC-DC converter and a permanent magnet synchronous generator (PMSG) to inject the generated power into the DCMG system. Load shedding and reconnection are carried out in the load agent by switching the electronic switches. Figure 1b shows a detailed configuration of the DCMG system with EV and grid connections. The grid-connected inverter uses an inductive-capacitive-inductive (LCL) filter to reduce the switching harmonics in the grid-side currents in the grid agent. The filter resistances, filter inductances, and filter capacitance are denoted by R 1 , R 2 , L 1 , L 2 , and C f , respectively. In addition, i 1 and i 2 represent the grid-side current and inverter-side current, respectively. In the grid-connected mode of the DCMG, the grid agent operates with three operating modes. When the grid agent supplies the power from the main grid into the DCMG system to support the DC-link voltage, the grid agent operates in the DC-link voltage control converter (VDC CON) mode. The grid agent also works in the inverter mode (VDC INV), in which the grid agent regulates the DC-link voltage by injecting the surplus power from the DCMG system into the main grid. The remaining operation of the grid agent is the IDLE mode in which the grid agent and DCMG system are interconnected without any power exchange.

Configuration of EV-Connected DCMG System
Two bidirectional interleaved buck-boost DC-DC converters are installed to connect the DCMG system with the battery agent and the EV agent through an inductive (L) filter. The battery and EV agents have five operating modes: two voltage control modes, two current control modes, and the IDLE mode. The DC-link voltage control by discharging (VDC D) mode is the first one, in which the battery and EV agents control the DC-link voltage by supplying the discharging power into the DC-link. On the contrary, the agent operating mode is the DC-link voltage control by charging (VDC C) mode, if the DC-link voltage is maintained by charging the battery or EV agent with the surplus power. Two current control modes are charging with the maximum allowable power (Max C) and discharging with the maximum allowable power (Max D). The last operating mode of the battery and EV agents is the IDLE mode in which the power does not exchange between these agents and the DC-link. In Figure 1b, L B and L EV represent the filter inductances of the battery and EV agents, respectively, and i bat and i EV denote the battery and EV currents, respectively. Two bidirectional interleaved buck-boost DC-DC converters are installed to connect the DCMG system with the battery agent and the EV agent through an inductive (L) filter. The battery and EV agents have five operating modes: two voltage control modes, two current control modes, and the IDLE mode. The DC-link voltage control by discharging (VDC D) mode is the first one, in which the battery and EV agents control the DC-link voltage by supplying the discharging power into the DC-link. On the contrary, the agent operating mode is the DC-link voltage control by charging (VDC C) mode, if the DC-link voltage is maintained by charging the battery or EV agent with the surplus power. Two current control modes are charging with the maximum allowable power (Max C) and discharging with the maximum allowable power (Max D). The last operating mode of the battery and EV agents is the IDLE mode in which the power does not exchange between these agents and the DC-link. In Figure 1b, LB and LEV represent the filter inductances of An L filter is also employed in the wind power agent to connect the PMSG and unidirectional AC-DC converter. In Figure 1b, L W and R W are the filter inductance and resistance parameters, while i W denotes the phase current of the PMSG. There are two operating modes in the wind power agent. The first operating mode is the maximum power point tracking (MPPT) mode, in which the wind power agent maximally extracts power from the wind turbine. The next operating mode is the DC-link voltage control (VDC) mode. This mode occurs in the condition that the generated power from the wind power agent P W is greater than the demand load power P L , and any other agents cannot Sustainability 2021, 13, 8863 6 of 37 absorb the surplus power of the DCMG system. In this situation, the nominal DC-link voltage should be maintained by reducing P W .
Whenever the load power is higher than the available power in DCMG, the load agent commences load shedding (SHD) mode to prevent the DCMG system from collapsing by eliminating the unnecessary load. In this operation, the least important loads are first disconnected until the power balance in the system is guaranteed. When the grid is reconnected to the DCMG or the battery/EV agents have sufficient SOC level, shedded loads are reconnected by the load reconnection (RECON) algorithm. Table 1 shows the summary of the operating modes of each power agent for the EV-connected DCMG. To ensure a DCMG operation, the reliable control of power electronics converters is an indispensable part. To effectively realize all the operating modes by each power agent in Table 1, power converter controllers are implemented by modifying the configuration in [20].

Proposed Power Flow Control Strategy of EV-Connected DCMG
The proposed power flow control strategy of the EV-connected DCMG is determined based on the correlation between the generated power and demanded power. The power balance equation for this study is described in (1). To avoid the grid, battery, and EV agents operating in two operating modes at the same time, the constraints are added in (2)-(5) and (8)-(9), respectively. Additionally, the power limit for the battery and EV agents are expressed in (6)-(7) and (10)-(11) as follows: P W + P G,CON ·x G,CON + P B,dis ·x B,dis + P EV,dis ·x EV,dis = P L + P G,INV ·x G,INV + P B,char ·x B,char + P EV,char ·x EV,char (1) where: P G,CON : power injected from grid in converter operation; P G,INV : power absorbed by grid in inverter operation; P B,dis : battery discharging power; P B,char : battery charging power; P EV,dis : EV discharging power; P EV,char : EV charging power; x G,CON , x G,INV , x B,dis , x B,char , x EV,dis , and x EV,char : binary variables.
x B,dis + x B,char = 1 (4) To decide the operating modes of power agents, the CC exchanges the data with power agents in the proposed scheme. The crucial factors that determine power agents' operations are as follows: the grid availability, the EV connectivity to DCMG, SOC levels of the battery and EV, the available power of the wind power agent, the electricity cost condition, and the DCMG prime objective. The CC considers these factors in order to send the data regarding the operating modes to all power agents. According to the grid availability, the proposed EV-connected DCMG is mainly divided into power flow structures in grid-connected and islanded modes. Figure 2 shows the power flow control strategy of the DCMG with EV and grid connections, which is developed to consider several uncertainty factors. Even if the proposed power flow control strategy is developed considering only the wind turbine as a renewable energy source, it can be easily extended by introducing the term of the total DG power, P DG , instead of P W when other renewable energy sources are used interconnected into the DCMG system. According to the existence of EV in the DCMG, the power flow control in Figure 2 is classified into three main groups. The first category is the power flow control strategy when EV departs from the DCMG. This power flow control strategy is represented in Figure 3 in detail. With the EV connections into the DCMG, the power flow control strategy is further divided into two groups according to the generation power of the DG, P W . Figures 4 and 5 show the power flow control schemes for the remaining two groups, in which Figure 4 represents the case when P W is less than P L , while Figure 5 represents the case when P W is greater than P L .      In the control strategy of the DCMG with EV and grid connections, as shown in Figure 3 through Figure 5, the wind power agent is always operated in the MPPT mode. As a result, the wind power agent operating mode is not described in these figures. The other agents' operating modes are decided by the operating conditions of the agents, constraints, and DCMG prime objective.

Power Flow Control of DCMG with EV and Grid Connection
In Figure 3, a total of five operating modes (denoted by rectangular boxes) compose the power flow control strategy of the DCMG with grid connections when EV departs. In this case, the battery SOC level, PW, and PL are considered as dominant factors to select the operating modes. Several operating modes for the DCMG power flow are explained as follows:  As the first example, when the wind power generation PW is higher than PL, and the battery SOC is higher than the maximum SOC level (SOCMax), the grid agent operates in the VDC INV mode to control the DC-link voltage by absorbing the surplus power from the wind power agent. The battery agent operates in the IDLE mode.  As the second example of selecting the operating mode, when the wind power generation PW is not enough to supply the load power PL, and the battery SOC is between the minimum SOC level (SOCMin) and the maximum SOC (SOCMax) during the high electricity price conditions, the battery agent controls the DC-link voltage by operating in the VDC D mode, and the grid agent operates in the IDLE mode. On the other hand, if the electricity price is in normal condition, the battery agent operates in the Max C mode. The grid agent supplies the necessary power to keep the power balance by operating in the VDC CON mode. The remaining three operating modes of DCMG power flow in Figure 3 can be explained similarly. When the EV is connected into the DCMG, the SOC level of the EV battery is also considered to select the best operating modes for the DCMG as shown in Figures 4 and 5. The power flow control schemes in these figures are designed in order to fulfill different prime objectives under the constraint of uncertainty in electricity price conditions. Table  2 shows the prime objectives (POs) of the EV-connected DCMG considered in this study. The first prime objective is to maintain the EV battery level as maximum as possible. The other prime objective is to achieve a minimum utility cost. Depending on the selected prime objective, the power agents of the DCMG should operate differently. Obviously, in some conditions of Figures 4 and 5, the operating modes for the power agents are determined regardless of the selection of prime objective. According to the selected prime objective, the operating mode change of each power agent is clearly represented in Figures 4 and 5 by expressing the agent operation after PO 1 and PO 2. Several operating modes in Figure 4 are described as follows:  In the case that the SOC levels of the EV and battery agents are in the normal region (between SOCMin and SOCMax) under high electricity price conditions, the operation mode of the DCMG is decided based on the selected prime objective. If PO 1 is selected as the prime objective of the DCMG to benefit the EV owner, the EV agent In the control strategy of the DCMG with EV and grid connections, as shown in Figure 3 through Figure 5, the wind power agent is always operated in the MPPT mode. As a result, the wind power agent operating mode is not described in these figures. The other agents' operating modes are decided by the operating conditions of the agents, constraints, and DCMG prime objective.
In Figure 3, a total of five operating modes (denoted by rectangular boxes) compose the power flow control strategy of the DCMG with grid connections when EV departs. In this case, the battery SOC level, P W , and P L are considered as dominant factors to select the operating modes. Several operating modes for the DCMG power flow are explained as follows:

•
As the first example, when the wind power generation P W is higher than P L , and the battery SOC is higher than the maximum SOC level (SOC Max ), the grid agent operates in the VDC INV mode to control the DC-link voltage by absorbing the surplus power from the wind power agent. The battery agent operates in the IDLE mode.

•
As the second example of selecting the operating mode, when the wind power generation P W is not enough to supply the load power P L , and the battery SOC is between the minimum SOC level (SOC Min ) and the maximum SOC (SOC Max ) during the high electricity price conditions, the battery agent controls the DC-link voltage by operating in the VDC D mode, and the grid agent operates in the IDLE mode. On the other hand, if the electricity price is in normal condition, the battery agent operates in the Max C mode. The grid agent supplies the necessary power to keep the power balance by operating in the VDC CON mode. The remaining three operating modes of DCMG power flow in Figure 3 can be explained similarly.
When the EV is connected into the DCMG, the SOC level of the EV battery is also considered to select the best operating modes for the DCMG as shown in Figures 4 and 5. The power flow control schemes in these figures are designed in order to fulfill different prime objectives under the constraint of uncertainty in electricity price conditions. Table 2 shows the prime objectives (POs) of the EV-connected DCMG considered in this study. The first prime objective is to maintain the EV battery level as maximum as possible. The other prime objective is to achieve a minimum utility cost. Depending on the selected prime objective, the power agents of the DCMG should operate differently. Obviously, in some conditions of Figures 4 and 5, the operating modes for the power agents are determined regardless of the selection of prime objective. According to the selected prime objective, the operating mode change of each power agent is clearly represented in Figures 4 and 5 by expressing the agent operation after PO 1 and PO 2. Several operating modes in Figure 4 are described as follows:

•
In the case that the SOC levels of the EV and battery agents are in the normal region (between SOC Min and SOC Max ) under high electricity price conditions, the operation mode of the DCMG is decided based on the selected prime objective. If PO 1 is selected as the prime objective of the DCMG to benefit the EV owner, the EV agent operates in the Max C mode to maximally charge the EV battery with the allowable power from the grid. In this case, the grid regulates the DC-link voltage through the VDC CON mode. On the contrary, if PO 2 is selected to reduce the electricity cost, the operations of both the grid and EV agents are changed into IDLE mode, and the battery agent operating in VDC D mode takes the role of maintaining VDC at the nominal value. In both cases, the wind power agent works in the MPPT mode, as mentioned before.

•
In the case that the SOC levels of EV and battery agents are in the critical condition (less than SOC Min ) under the high electricity price conditions, the grid agent controls the DC-link voltage in the VDC CON mode, and the battery is put to IDLE mode. The behavior of the EV agent is chosen based on the selected prime objective function of the DCMG. If PO 1 is selected, the operating mode of the EV agent should be in Max C to charge the EV battery as soon as possible. On the other hand, if PO 2 is selected, the IDLE mode should be used for the EV agent to minimize the consumer electricity price. Table 2. Prime objective (PO) of EV-connected DCMG.

Prime Objective Symbol
Maintain the EV battery in as maximum state as possible PO 1 Achieve the minimum utility cost PO 2 The selection of prime objectives also affects the two operating modes in Figure 5. The first case occurs when the SOC levels of EV and battery agents are either in the normal or critical region; in addition, the wind power generation P W cannot supply the demand load P L , and the maximum EV charging power P EV,charmax is under high electricity price conditions. In this case, the battery agent operates in IDLE mode regardless of the selection of prime objective. However, the prime objective selection affects the operating modes of the other agents. If PO 1 is selected, the grid agent operates in the IDLE mode. Meanwhile, the EV agent operates in the VDC C mode to charge the EV battery by regulating the DC-link voltage. If PO 2 is selected, the EV agent operation is changed into the IDLE mode. The grid agent operation is changed into the VDC INV mode to inject the surplus power from the wind power agent into the utility to minimize the utility cost.
The operating modes of each power agent are also influenced by selecting the prime objective in the case of EV SOC level, eventually reaching the threshold SOC Max , while the SOC level of the battery agent is still in the normal region under high electricity price conditions. In this condition, the EV agent operates in IDLE mode regardless of the selection of prime objective because the EV SOC is already in full-charge condition. If PO 1 is selected, the battery agent takes the responsibility to control the DC-link voltage by operating the VDC C mode, while the grid agent operates in IDLE mode. If PO 2 is selected, the battery agent operates in the Max D mode to maximize the profit by injecting the energy into the main grid to supply more power into the DCMG. The grid agent operates in the VDC INV mode. Figure 6 presents the power flow control strategy of the islanded DCMG with EV connections. Similar to the grid-connected DCMG case, the power flow control in Figure 6 is classified into three main groups according to the existence of EV and the power generation of the DG. Figure 7 shows the power flow control of the islanded DCMG when the EV departs from the DCMG. Figures 8 and 9 show the power flow control schemes of the EV-connected islanded DCMG with low DG power and high DG power, respectively. Since the grid agent is absent in the islanded DCMG case, maintaining the EV battery in a maximum state as much as possible is considered as the only prime objective. As a result, each power agent maintains the same operating mode according to the prime objective.    The absence of the grid agent also affects the operation of the DG system such as t wind power agent. In the grid-connected DCMG case, the DCMG can inject surplus pow to the main grid even if the generated power of the wind power agent exceeds the d manded load power. As a result, as stated in Section 3.1, the wind power agent is alwa operated in the MPPT mode in the grid-connected case to draw the maximum power.

Power Flow Control of Islanded DCMG with EV Connection
On the contrary, in the islanded DCMG case, surplus power cannot be injected in the grid. In addition, the power absorption of battery and EV agents may be limited und certain conditions. When these energy storage devices have a higher SOC level th SOCMax, the battery or EV agent cannot receive additional power. This condition also o curs when the power from the wind power agent exceeds the maximum absorbable pow in the DCMG either by the load or energy storage devices. As shown in Figure 7, when is greater than PL, and the battery agent SOC is in full charge (greater than SOCMax) cond tion, the wind power agent should reduce the power generation. This condition can al be observed in Figure 9, where PW is greater than PL, and the SOC levels of the EV a battery agents are in full charge condition. Instead of operating in the MPPT mode, t wind power agent uses the VDC mode to reduce the power generation by regulating t     Integrating EV agents into the DCMG system significantly increases the flexibility in power system operation. In a low DG power case, as shown in Figure 8, the battery can supply power for the EV agent to fulfill the prime objective when the battery SOC is more than SOCMin, and the EV SOC is lower than SOCMin. The modes of the EV and battery are chosen in relation to the total wind power generation PW, the maximum discharging In the islanded DCMG, the critical condition in which the power balance of the DCMG is liable to collapse may occur when the wind power generation P W is less than the demand load P L and the remaining agents cannot supply power to the DCMG due to the low SOC levels of the battery and EV agents. In this condition, the load agent activates the SHD mode to reduce the demanded load power until the power balance is ensured. Since the wind power agent operates in the MPPT mode, if there is a small surplus power in the DCMG after a load shedding event, it can be absorbed by the battery or the EV agent to restore the power balance in which battery and EV agents operate in the VDC C mode as shown in Figures 7 and 8, respectively. When the DCMG system is changed into the gridconnected mode due to the grid recovery, the load agent triggers the RECON operating mode to reconnect the shedded load. The load reconnection is also achieved when the SOC levels of the battery or EV agent are recovered to a sufficient value in the islanded DCMG mode.
The absence of the grid agent also affects the operation of the DG system such as the wind power agent. In the grid-connected DCMG case, the DCMG can inject surplus power to the main grid even if the generated power of the wind power agent exceeds the demanded load power. As a result, as stated in Section 3.1, the wind power agent is always operated in the MPPT mode in the grid-connected case to draw the maximum power.
On the contrary, in the islanded DCMG case, surplus power cannot be injected into the grid. In addition, the power absorption of battery and EV agents may be limited under certain conditions. When these energy storage devices have a higher SOC level than SOC Max , the battery or EV agent cannot receive additional power. This condition also occurs when the power from the wind power agent exceeds the maximum absorbable power in the DCMG either by the load or energy storage devices. As shown in Figure 7, when P W is greater than P L , and the battery agent SOC is in full charge (greater than SOC Max ) condition, the wind power agent should reduce the power generation. This condition can also be observed in Figure 9, where P W is greater than P L , and the SOC levels of the EV and battery agents are in full charge condition. Instead of operating in the MPPT mode, the wind power agent uses the VDC mode to reduce the power generation by regulating the DC-link voltage. In this case, the energy storage devices such as the EV and battery operate in IDLE mode.
Integrating EV agents into the DCMG system significantly increases the flexibility in power system operation. In a low DG power case, as shown in Figure 8, the battery can supply power for the EV agent to fulfill the prime objective when the battery SOC is more than SOC Min , and the EV SOC is lower than SOC Min . The modes of the EV and battery are chosen in relation to the total wind power generation P W , the maximum discharging power of the battery P B,dismax , the total load demand P L , and the maximum charging power of the EV P EV,charmax . Suppose the total power injection into the DCMG surpasses the total power absorption. In that case, the EV agent operates in the Max C mode, and the battery agent operates in the VDC D mode. On the contrary, if the total power injection into the DCMG from the wind power and battery cannot support the load and EV charging, the battery agent operates in the Max D mode, and the EV agent operates in the VDC C mode.
The EV agent introduces significant flexibility to improve the power system stability in the islanded DCMG by helping the battery agent avoid the critical condition if the EV SOC level is sufficient. Similar to the previous case, when the total injecting power into the DCMG from the wind power and EV exceeds the total absorbing power by the load and battery charging, the battery agent operates in the Max C mode, and the EV agent controls the DC-link voltage in the VDC D mode. On the contrary, if the total injecting power into the DCMG is less than the total absorbing power, the EV agent supplies the DCMG by operating in the Max D mode, and the battery agent operates in the VDC C mode to maintain the DC-link voltage at the nominal value.

Simulation Results
To validate the usefulness of the power flow control scheme for a DCMG system with EV and grid connections, the simulation has been conducted using the PSIM software tool. The performance and reliability of the proposed DCMG control scheme are tested in the presence of several uncertainties such as the generated power, EV connection and disconnection times, initial SOC level of the EV battery, grid availability, and electricity price conditions. The DCMG system parameters are listed in Table 3, in which the maximum and minimum SOC values of the battery and EV agents are determined as 90% and 20%, respectively [34]. Simulations are conducted for five cases: low DG power, high DG power, prime objective change in low DG power, prime objective change in high DG power, and islanded DCMG with EV connections. In these simulation tests, all the power agents start the control at t = 0.1 s. The currents of the grid agent, battery agent, EV agent, wind power agent, and load agent are denoted as I G , I B , I EV , I W , and I L , respectively. The powers of the wind power and load agents are represented as P W and P L . The reference direction of currents and powers follows Figure 1a. The positive DC current indicates that the current flows from the DC-link into each power agent, and the negative DC current indicates that the current flows from the power agent into the DC-link.  In these simulation tests, all the power agents start the control at t = 0.1 s. The currents of the grid agent, battery agent, EV agent, wind power agent, and load agent are denoted as IG, IB, IEV, IW, and IL, respectively. The powers of the wind power and load agents are represented as PW and PL. The reference direction of currents and powers follows Figure  1a. The positive DC current indicates that the current flows from the DC-link into each power agent, and the negative DC current indicates that the current flows from the power agent into the DC-link.  Figure 4; (c) DCMG operating mode selection in Figure  3.

Case of Low DG Power
Initially, the EV agent is not connected to the DCMG system under the battery full charge condition and the normal electricity price conditions. Since the power from wind power agent PW is less than the load power PL, the DCMG system starts the operation with the operating mode (A) in Figure 10c, in which the grid agent regulates the DC-link voltage in the VDC CON mode, the battery agent operates in the IDLE mode, and the wind Initially, the EV agent is not connected to the DCMG system under the battery full charge condition and the normal electricity price conditions. Since the power from wind power agent P W is less than the load power P L , the DCMG system starts the operation with the operating mode (A) in Figure 10c, in which the grid agent regulates the DC-link voltage in the VDC CON mode, the battery agent operates in the IDLE mode, and the wind power agent operates in the MPPT mode. This operation continues until the EV agent is connected to the DCMG system at t = 0.3 s.
At t = 0.3 s, the EV is connected to the DCMG with a normal EV SOC level. Then, the DCMG operation is changed into mode (B) in Figure 10b. Since the electricity price is still in normal condition during this period, the wind power agent, battery agent, and grid agent keep the same modes as the MPPT, IDLE, and VDC CON modes, respectively. The connected EV agent operates in the Max C mode to increase the SOC level rapidly by charging with the maximum allowable power, which attracts more power from the grid agent.
When the electricity price is increased at t = 0.5 s, the DCMG system starts a new operation according to the prime objective. If the prime objective is selected as PO 2, which achieves the minimum utility cost, the DCMG operation is determined as the operating mode (C) in Figure 10b. As a result, the grid is put to the IDLE mode to ensure no more power is injected into the DCMG from the grid. Instead, to supply the deficient power into the DCMG, the battery agent operates in the Max D mode. The EV agent takes the responsibility to maintain the DC-link voltage by operating in the VDC C mode.
Finally, when the EV departs from the DCMG at t = 0.8 s, the DCMG operation is set to the operation mode (D), as shown in Figure 10c. Due to high electricity price conditions, the grid agent still operates in IDLE mode. As a result of the departure of the EV agent, which controls the DC-link voltage, the role of regulating the DC-link voltage is transferred to the battery agent with the VDC D mode.
Even though events such as "EV connections", "the electricity price change", and "EV departure" do not occur in the one-second interval, Figure 10 uses this time interval for the purpose of shortening the software running time and also proving that the power flow control algorithm works stably and robustly even under such varying conditions. The simulation result of Figure 10 can be understood more practically by considering the time axis scale of 1 s as 1 h. power agent operates in the MPPT mode. This operation continues until the EV agent is connected to the DCMG system at t = 0.3 s. At t = 0.3 s, the EV is connected to the DCMG with a normal EV SOC level. Then, the DCMG operation is changed into mode (B) in Figure 10b. Since the electricity price is still in normal condition during this period, the wind power agent, battery agent, and grid agent keep the same modes as the MPPT, IDLE, and VDC CON modes, respectively. The connected EV agent operates in the Max C mode to increase the SOC level rapidly by charging with the maximum allowable power, which attracts more power from the grid agent.

Case of High DG Power
When the electricity price is increased at t = 0.5 s, the DCMG system starts a new operation according to the prime objective. If the prime objective is selected as PO 2, which achieves the minimum utility cost, the DCMG operation is determined as the operating mode (C) in Figure 10b. As a result, the grid is put to the IDLE mode to ensure no more power is injected into the DCMG from the grid. Instead, to supply the deficient power into the DCMG, the battery agent operates in the Max D mode. The EV agent takes the responsibility to maintain the DC-link voltage by operating in the VDC C mode.
Finally, when the EV departs from the DCMG at t = 0.8 s, the DCMG operation is set to the operation mode (D), as shown in Figure 10c. Due to high electricity price conditions, the grid agent still operates in IDLE mode. As a result of the departure of the EV agent, which controls the DC-link voltage, the role of regulating the DC-link voltage is transferred to the battery agent with the VDC D mode.
Even though events such as "EV connections", "the electricity price change", and "EV departure" do not occur in the one-second interval, Figure 10 uses this time interval for the purpose of shortening the software running time and also proving that the power flow control algorithm works stably and robustly even under such varying conditions. The simulation result of Figure 10 can be understood more practically by considering the time axis scale of 1 s as 1 h. Similar to the previous case, when the DCMG starts the operation at t = 0.1 s, the EV is disconnected. Initially, both SOC levels of the EV and battery agents are in the normal region, and the power from wind power agent PW is higher than the required load power PL. However, PW is less than the sum of PL and PB,charmax. As a result, the DCMG operation is determined as the mode (A) in Figure 11c, in which the wind power agent operates in the MPPT mode, the battery is charged with the maximum allowable current in the Max Similar to the previous case, when the DCMG starts the operation at t = 0.1 s, the EV is disconnected. Initially, both SOC levels of the EV and battery agents are in the normal region, and the power from wind power agent P W is higher than the required load power P L . However, P W is less than the sum of P L and P B,charmax . As a result, the DCMG operation is determined as the mode (A) in Figure 11c, in which the wind power agent operates in the MPPT mode, the battery is charged with the maximum allowable current in the Max C mode, and the grid agent supplies inadequate power by operating in the VDC CON mode.

Case of High DG Power
As soon as the EV is connected to the DCMG at t = 0.3 s, the DCMG operation is switched into mode (B) in Figure 11b. Since the electricity price is still in normal condition during this period, the wind power agent, battery agent, and grid agent maintain operations as the MPPT mode, Max C mode, and VDC CON mode, respectively. In addition, the EV agent starts charging the EV battery in the Max C mode.
As the electricity price is increased at t = 0.5 s, the DCMG operation is set to mode (C) in Figure 11b. In this mode, to achieve PO 2, which minimizes the electricity price, the EV and battery agents change the operation into the IDLE mode. On the other hand, the grid agent operation is changed to the VDC INV mode to inject the power into the grid by controlling the DC-link voltage.
Finally, when the EV is disconnected from the DCMG at t = 0.8 s, the DCMG changes its operation into the mode (D) in Figure 11c, where the grid agent, battery agent, and wind power agent maintain the previous operating modes.
These simulation results confirm that the overall performance of the DCMG power flow control is not affected by the EV's sudden connection and disconnection, uncertain EV SOC level at the initial time, the variation of electricity price conditions, and the wind power generation P W .  Figure 12b shows the operating mode selection process of the DCMG. All the power agents start operation at t = 0.1 s. In this test, it is assumed that P W is less than P L , the SOC level of the EV agent is in full charge condition, and the battery SOC level is less than SOC Min . Additionally, the initial prime objective is selected as PO 1. As a result, the operations of the battery and EV agents are in IDLE mode, while the grid agent works with the VDC CON mode to control the DC-link voltage by injecting the power into the microgrid as shown in Figure 12a,b.

Case of Prime Objective Change with Low DG Power
However, as soon as the prime objective is changed from PO 1 into PO 2 at t = 0.3 s, the DCMG power flow control changes the operating modes of the power agents as specified in Figure 12b. The prime objective of PO 2 is to minimize the utility cost as shown in Table 2. To achieve PO 2, the grid agent operation is changed into IDLE mode to prevent the main grid from supplying more power into the DCMG. The battery agent maintains its operation in IDLE mode. The EV agent operation is shifted to the VDC D mode in order to regulate the DC-link voltage, and the wind power agent operates in the MPPT mode. Figure 13a shows simulation results of the DCMG power flow control with EV and grid connections under prime objective change at t = 0.3 s with high DG power, and Figure 13b shows the operating mode selection process of the DCMG. Similar to the test conditions in Figure 12, the SOC levels of both the battery and EV agents are in the normal region, and all power agents start the operation at t = 0.1 s. However, this test considers the case that P W is greater than P L . When PO 2 is selected as the prime objective of DCMG initially, the EV and battery agents operate in IDLE mode, and the grid agent operates in VDC INV mode, as shown in Figure 13a Figure 13a shows simulation results of the DCMG power flow control with EV and grid connections under prime objective change at t = 0.3 s with high DG power, and Figure  13b shows the operating mode selection process of the DCMG. Similar to the test conditions in Figure 12, the SOC levels of both the battery and EV agents are in the normal region, and all power agents start the operation at t = 0.1 s. However, this test considers the case that PW is greater than PL. When PO 2 is selected as the prime objective of DCMG initially, the EV and battery agents operate in IDLE mode, and the grid agent operates in VDC INV mode, as shown in Figure 13a,b. As the prime objective is changed from PO 2 into PO 1 at t = 0.3 s, the grid agent shifts its operation into the IDLE mode to stop absorbing the power from the DCMG system. Instead, the surplus power in the DCMG is absorbed by the EV agent with the VDC C mode.

Case of Prime Objective Change with High DG Power
In spite of a sudden transition of the DCMG prime objective, the simulation results prove that all the power agents operate stably within the DCMG system without an extreme transient behavior, which verifies the robustness of the proposed scheme.  As the prime objective is changed from PO 2 into PO 1 at t = 0.3 s, the grid agent shifts its operation into the IDLE mode to stop absorbing the power from the DCMG system. Instead, the surplus power in the DCMG is absorbed by the EV agent with the VDC C mode.
In spite of a sudden transition of the DCMG prime objective, the simulation results prove that all the power agents operate stably within the DCMG system without an extreme transient behavior, which verifies the robustness of the proposed scheme. Figure 14a shows the simulation results of the islanded DCMG power flow control with EV connections. Figure 14b-d represents the operating mode selection in the islanded DCMG under the EV disconnection, EV connections with low DG power, and EV connections with high DG power, respectively. In this islanded DCMG test, similar to the grid-connected case, the EV is connected at t = 0.3 s and disconnected at t = 0.8 s with the SOC level less than SOC Min . At first, the wind power generation P W cannot supply the required load power P L until t = 0.5 s. After that, P W is increased to a greater value than P L . Additionally, the SOC level of the battery agent is in the normal region. All power agents start operation at t = 0.1 s. start operation at t = 0.1 s.

Case of Islanded DCMG with EV Connection
Initially, because the wind power generation is not sufficient to supply the load demand, the DCMG starts the operation with mode (A) in Figure 14b, in which the wind power agent operates in the MPPT mode, and the battery agent supplies the deficient power to the DCMG by operating in the VDC D mode.
Once the EV is connected to the DCMG at t = 0.3 s, the DCMG operation is changed into mode (B) in Figure 14c since the EV SOC is less than SOCMin. In this operating mode, the wind power agent remains in the MPPT mode, the battery agent supplies the DCMG with the maximum allowable discharging power (PB,dismax) by changing its operation into the Max D mode, and the EV agent starts the charging operation with the VDC C mode by regulating the DC-link voltage.
As the wind power PW is higher than PL at t = 0.5 s, the DCMG changes its operation into mode (C) in Figure 14d. In this case, due to the power increment in wind power generation, the wind power agent can support the load demand and EV charging. Consequently, the battery agent operation is changed into IDLE mode, while the wind power agent and the EV agent maintain their previous operations.
When the EV departs from the DCMG at t = 0.08 s, the DCMG operates with the mode (D) in Figure 14b. The wind power agent is still in MPPT mode. The battery agent absorbs the surplus power with the VDC C mode, in which the battery is charged by controlling the DC-link voltage.
These simulation results also prove that all power agents of the DCMG system work reliably in the islanded case even under the uncertainties of the EV connection and disconnection times, EV initial SOC value, and wind power generation.

Experimental Results
For practical verification of the proposed power flow control scheme for the DCMG with EV and grid connections, the experiments have been carried out using a prototype DCMG testbed. Figure 15 shows the prototype DCMG system used for experiments. The entire system consists of a DC load and four power electronic converters to connect the grid agent, battery agent, EV agent, and wind power agent to the DC-link. For this purpose, one bidirectional AC-DC converter, two bidirectional DC-DC converters, and one unidirectional AC-DC converter are used to connect the main grid source, two bidirectional DC sources, and a wind turbine emulator to the DC-link, respectively. A PMSG and an induction machine are arranged for emulating the wind turbine system. The load agent is constructed with parallel resistors and a magnetic contactor to implement load shedding and load reconnection algorithms. In addition, 32-bit floating-point digital signal processors (DSPs) TMS320F28335 are used to implement the proposed power flow control scheme and the power converter control algorithms for all power agents. The experiments are focused on important transient events such as electricity price change, EV departure objective change in low DG power, and objective change in high DG power. Initially, because the wind power generation is not sufficient to supply the load demand, the DCMG starts the operation with mode (A) in Figure 14b, in which the wind power agent operates in the MPPT mode, and the battery agent supplies the deficient power to the DCMG by operating in the VDC D mode.
Once the EV is connected to the DCMG at t = 0.3 s, the DCMG operation is changed into mode (B) in Figure 14c since the EV SOC is less than SOC Min . In this operating mode, the wind power agent remains in the MPPT mode, the battery agent supplies the DCMG with the maximum allowable discharging power (P B,dismax ) by changing its operation into the Max D mode, and the EV agent starts the charging operation with the VDC C mode by regulating the DC-link voltage.
As the wind power P W is higher than P L at t = 0.5 s, the DCMG changes its operation into mode (C) in Figure 14d. In this case, due to the power increment in wind power generation, the wind power agent can support the load demand and EV charging. Consequently, the battery agent operation is changed into IDLE mode, while the wind power agent and the EV agent maintain their previous operations.
When the EV departs from the DCMG at t = 0.08 s, the DCMG operates with the mode (D) in Figure 14b. The wind power agent is still in MPPT mode. The battery agent absorbs the surplus power with the VDC C mode, in which the battery is charged by controlling the DC-link voltage.
These simulation results also prove that all power agents of the DCMG system work reliably in the islanded case even under the uncertainties of the EV connection and disconnection times, EV initial SOC value, and wind power generation.

Experimental Results
For practical verification of the proposed power flow control scheme for the DCMG with EV and grid connections, the experiments have been carried out using a prototype DCMG testbed. Figure 15 shows the prototype DCMG system used for experiments. The entire system consists of a DC load and four power electronic converters to connect the grid agent, battery agent, EV agent, and wind power agent to the DC-link. For this purpose, one bidirectional AC-DC converter, two bidirectional DC-DC converters, and one unidirectional AC-DC converter are used to connect the main grid source, two bidirectional DC sources, and a wind turbine emulator to the DC-link, respectively. A PMSG and an induction machine are arranged for emulating the wind turbine system. The load agent is constructed with parallel resistors and a magnetic contactor to implement load shedding and load reconnection algorithms. In addition, 32-bit floating-point digital signal processors (DSPs) TMS320F28335 are used to implement the proposed power flow control scheme and the power converter control algorithms for all power agents. The experiments are focused on important transient events such as electricity price change, EV departure, objective change in low DG power, and objective change in high DG power.
(d) Figure 14. Simulation results of the islanded DCMG with EV connections. (a) DCMG system responses under the variation of DG power; (b) DCMG operating mode selection in Figure 7; (c) DCMG operating mode selection in Figure 8; (d) DCMG operating mode selection in Figure 9.

Experimental Results
For practical verification of the proposed power flow control scheme for the DCMG with EV and grid connections, the experiments have been carried out using a prototype DCMG testbed. Figure 15 shows the prototype DCMG system used for experiments. The entire system consists of a DC load and four power electronic converters to connect the grid agent, battery agent, EV agent, and wind power agent to the DC-link. For this purpose, one bidirectional AC-DC converter, two bidirectional DC-DC converters, and one unidirectional AC-DC converter are used to connect the main grid source, two bidirectional DC sources, and a wind turbine emulator to the DC-link, respectively. A PMSG and an induction machine are arranged for emulating the wind turbine system. The load agent is constructed with parallel resistors and a magnetic contactor to implement load shedding and load reconnection algorithms. In addition, 32-bit floating-point digital signal processors (DSPs) TMS320F28335 are used to implement the proposed power flow control scheme and the power converter control algorithms for all power agents. The experiments are focused on important transient events such as electricity price change, EV departure, objective change in low DG power, and objective change in high DG power.   Figure 16 shows experimental results for the proposed power flow control scheme of the DCMG with EV and grid connections under low DG power, and the electricity price is increased. Figure 16a shows the operating mode transition caused by the change of the electricity price conditions. Figure 16b,c show steady-state responses before the transition, and Figure 16d shows steady-state responses after the transition. The reference direction of current follows the notation in Figure 1b. It is assumed in this test that initially, P W is less than P L , the EV agent is connected to the DCMG system, the EV SOC level is in the normal region, and the battery SOC level is greater than SOC Max . Before the transition of operation, the DCMG operates with the operating mode (B) in Figure 10a,b, where the wind power agent operates in the MPPT mode; the battery and EV agents operate in the IDLE mode and Max C mode, respectively; and the grid agent supplies inadequate power by operating in the VDC CON mode.  Figure 17 shows experimental results for the proposed power flow contro the DCMG with EV and grid connections when EV departures, and the elec conditions changing from the normal condition to the high condition are co the same time. Figure 17a shows the operating mode transition caused by E departure, and electricity price conditions change. Figure 17b,c show the stea sponses before the transition and after the transition, respectively. The co power agents used for this test are as follows: the wind power PW is less th power PL, the EV SOC is in the normal region, and the battery agent SOC is fu After the transition due to the electricity price increase, the DCMG operation is changed to mode (C) in Figure 10a,b. The grid agent operation is changed into the IDLE mode to reduce the utility cost in this mode. Instead, the battery agent in full charge condition supplies power into the DCMG in the Max D mode. The EV agent takes responsibility for controlling the DC-link voltage by operating with the VDC C mode. The wind power agent keeps the operation with the MPPT mode. The experimental result in Figure 16 corresponds to the DCMG operating mode transition from (B) to (C) in the simulation results of Figure 10a, which shows a good agreement with results in Figure 10a. Figure 17 shows experimental results for the proposed power flow control scheme of the DCMG with EV and grid connections when EV departures, and the electricity price conditions changing from the normal condition to the high condition are considered at the same time. Figure 17a shows the operating mode transition caused by EV's sudden departure, and electricity price conditions change. Figure 17b,c show the steady-state responses before the transition and after the transition, respectively. The conditions of power agents used for this test are as follows: the wind power P W is less than the load power P L , the EV SOC is in the normal region, and the battery agent SOC is full.

Case of EV Departure
Before the transition, the EV is connected into the DCMG at the normal electricity price conditions. As shown in the operating mode (B) of Figure 10b, the battery agent operates in the IDLE mode, the grid agent controls the DC-link voltage in the VDC CON mode, and the EV agent charges the EV battery as soon as possible in the Max C mode.
As soon as the EV departs from the DCMG system, and the electricity price is increased simultaneously, the prime objective of the DCMG is also changed into PO 2, which minimizes the utility cost. As a result, the grid agent switches from VDC CON mode to IDLE mode to avoid the utility cost increment. Instead, the battery agent discharges the battery in the VDC D mode to compensate for the inadequate power of the DCMG by keeping the DC-link voltage at the nominal value as shown in the mode (D) of Figure 10c. Despite the operating mode transition caused by both the EV's sudden departure and the electricity price conditions' change, the DC-link voltage regulation is still stably accomplished. Experimental results in Figure 17 correspond to the DCMG operating mode transition from (B) to (D) in the simulation results of Figure 10a, which are well-matched with the simulations of Figure 10a. Figure 18 shows experimental results for the proposed power flow control scheme of the DCMG with EV and grid connections with low DG power, and the prime objective change from PO 1 to PO 2 is taken into consideration. Figure 18a-c show the operating mode transition response and the steady-state responses before and after transition instant, respectively. The test conditions are as follows: the EV SOC level is in the full charge condition, the battery SOC level is in the critical region, the wind power is less than the load power, and the DCMG operates under high electricity price conditions. Before the transition, PO 1 is selected as the prime objective of the DCMG. In this case, the battery agent operates in IDLE mode because it is in critical condition. Additionally, the EV agent operates in IDLE mode to maintain its SOC level because maximizing the EV battery is the prime objective in PO 1. The grid agent provides the deficient power of the DCMG by operating with the VDC CON mode in spite of the high electricity price conditions to maximize the EV SOC.

Case of Objective Change with Low DG Power
However, as the prime objective of the DCMG is changed into PO 2, the grid agent changes the operation into the IDLE mode to reduce the electricity cost. The battery agent still operates in the IDLE mode because of its critical state regardless of the prime objective selection. Instead, as a result of PO 2 selection, the EV agent changes the operation into VDC D mode for the purpose of supplying the deficient power into the DCMG by controlling the DC-link voltage.
This experimental test also confirms a stable DC-link voltage regulation performance even if the task of controlling the DC-link voltage is transferred from the grid agent to the EV agent as a result of the prime objective change. The experimental results in Figure 18 correspond to the DCMG operating mode transition in the simulation results of Figure 12a, which well coincides with the simulation of Figure 12a. Figure 19 shows experimental results for the proposed power flow control scheme of the DCMG with EV and grid connected into the DCMG with a high DG power condition and the prime objective change from PO 2 to PO 1. Figure 19a shows the operating mode transition caused by the prime objective changes. Figure 19b,c show the steady-state responses before the transition instant, and Figure 19d shows the steady-state responses after the transition instant. The test conditions of the power agents are as follows: the wind power P W is higher than the load power P L , the SOC levels of EV and battery agents are in normal condition, and the DCMG operates with PO 2 under a high electricity price condition. In addition, P W is less than the sum of load power P L and the maximum charging power of the EV P EV,charmax .  Figure 19 shows experimental results for the proposed power flow control scheme of the DCMG with EV and grid connected into the DCMG with a high DG power condition and the prime objective change from PO 2 to PO 1. Figure 19a shows the operating mode transition caused by the prime objective changes. Figure 19b,c show the steady-state responses before the transition instant, and Figure 19d shows the steady-state responses after the transition instant. The test conditions of the power agents are as follows: the wind power PW is higher than the load power PL, the SOC levels of EV and battery agents are in normal condition, and the DCMG operates with PO 2 under a high electricity price condition. In addition, PW is less than the sum of load power PL and the maximum charging power of the EV PEV,charmax.

Case of Objective Change with High DG Power
Before the prime objective change, the EV agent operates in IDLE mode, and the grid agent operates with the VDC INV mode to inject the power into the grid by regulating the DC-link voltage. The grid agent shifts its operation into IDLE mode as soon as the prime objective is changed into PO 1 to maximize the EV SOC. The surplus power in the DCMG is utilized to charge the EV battery, and the EV agent takes the responsibility to maintain the DC-link voltage by operating in the VDC C mode. With both prime objectives, the battery agent keeps operating in IDLE mode.
Due to the prime objective change from PO 2 to PO 1, the DC-link voltage regulation task is also transferred from the grid agent to the EV agent. The DC-link voltage is stably maintained, ensuring the reliability of the proposed power flow control scheme for the EV-connected DCMG system. The experimental results in Figure 19 correspond to the DCMG operating mode transition in the simulation results of Figure 13a, which also matches with the simulation of Figure 13a. Before the prime objective change, the EV agent operates in IDLE mode, and the grid agent operates with the VDC INV mode to inject the power into the grid by regulating the DC-link voltage. The grid agent shifts its operation into IDLE mode as soon as the prime objective is changed into PO 1 to maximize the EV SOC. The surplus power in the DCMG is utilized to charge the EV battery, and the EV agent takes the responsibility to maintain the DC-link voltage by operating in the VDC C mode. With both prime objectives, the battery agent keeps operating in IDLE mode.
Due to the prime objective change from PO 2 to PO 1, the DC-link voltage regulation task is also transferred from the grid agent to the EV agent. The DC-link voltage is stably maintained, ensuring the reliability of the proposed power flow control scheme for the EVconnected DCMG system. The experimental results in Figure 19 correspond to the DCMG operating mode transition in the simulation results of Figure 13a, which also matches with the simulation of Figure 13a.

Conclusions
This paper has presented a centralized power flow control scheme of EV-connected DCMG to satisfy multi-objective problems under several constraints. Considering a wind power agent, battery agent, EV agent, load agent, and grid agent as DCMG components, a reliable and optimized DCMG system that is capable of satisfying the selected prime objective function is constructed. For this aim, two prime objective functions are presented in this study to provide a benefit to the DCMG system or the EV owners. The power flow control strategy is devised for the grid-connected mode as well as the islanded mode. Moreover, considering the amount of DG power and the existence of EV in DCMG, the power flow control scheme is further subdivided to constitute six power flow control groups. In the proposed scheme, the operating modes of power agents in the DCMG are effectively decided based on the EV connection/disconnection status, initial SOC value of the EV, power generation of the wind power agent, battery SOC level, and grid availability. The electricity price conditions and the DCMG prime objective are also employed to decide the operating modes of the power agent. The main contributions of this study can be summarized as follows:

1.
A power flow control scheme for an EV-connected DCMG is developed. The proposed scheme stably maintains the DC-link voltage at the nominal value without extreme transients even under the uncertainties of DG power, grid availability, electricity price conditions, and EV connections.

2.
By using the proposed scheme, a power flow control strategy that can provide benefits to the DCMG system or the EV owners can be flexibly selected. Depending on the selection of the prime objective function, the DCMG system can be controlled to maximize the EV battery SOC or to minimize the electricity price. Despite the DCMG prime objective change, the proposed scheme ensures a stable and smooth DCMG operation without severe transience. 3.
Since the proposed scheme does not need a complex data-driven optimization algorithm and is devised based on several uncertainty factors, a fast and accurate transition of microgrid operation is achieved as proven in simulation and experimental results. Moreover, it is computationally friendly and easy to implement in the real system.
To clarify the practical usefulness of the proposed power flow control scheme for the EV-connected DCMG system, both simulations based on the PSIM software and experiments based on the prototype DCMG testbed have been carried out. In the experimental system, the DCMG consists of a bidirectional AC-to-DC converter to connect the grid source, a unidirectional AC-to-DC converter to connect the wind turbine emulator, and two bidirectional DC-to-DC converters to connect the bidirectional DC sources. Comprehensive simulation and experimental results have proven the usefulness of the proposed power flow control scheme. Several experimental tests confirm that the developed power flow algorithm stably works with satisfactory overall performance even under the uncertainties of power generation from the wind power agent, EV connection and disconnection times, initial SOC levels of the EV battery, and grid availability. In addition, a reliable DC-link voltage regulation performance is also demonstrated by the experiments.

Conflicts of Interest:
The authors declare no conflict of interest. L filter inductance of battery agent L EV L filter inductance of EV agent L W L filter inductance of wind power agent L 1 , L 2 LCL filter inductances P PMSG number of poles P B

Abbreviations
Exchange power between the DC-link and battery agent P B,char Battery charging power P B,charmax Maximum charging power of battery agent P B,dis Battery discharging power P B,dismax Maximum discharging power of battery agent P EV Exchange power between the DC-link and EV agent P EV,char EV charging power P EV,charmax Maximum charging power of EV agent P EV,dis EV discharging power P EV,dismax Maximum discharging power of EV agent P G Exchange power between the DC-link and grid agent P G, CON Power injected from grid in converter operation P G, INV Power absorbed by grid in inverter operation P L Power absorbed in the load agent P L1 Power of load 1 P L2 Power of load 2 P W Generation power by the wind power agent R W L filter resistances of wind