DC microgrids have become a promising solution for efficient and reliable integration of renewable energy sources (RESs), battery energy storage systems (BESSs) and loads. To simultaneously achieve average voltage regulation, accurate current-sharing and state-of-charge (SoC) balance, at least two state variables need to be transmitted between neighboring BESS nodes in conventional distributed secondary control. In this paper, a simplified c. DC microgrids have become a promising solution for efficient and reliable integration of renewable energy sources (RESs), battery energy storage systems (BESSs) and loads. To simultaneously achieve average voltage regulation, accurate current-sharing and state-of-charge (SoC) balance, at least two state variables need to be transmitted between neighboring BESS nodes in conventional distributed secondary control. In this paper, a simplified consensus-based distributed secondary control for BESSs in DC microgrids is proposed with only one virtually defined state variable being transmitted, where a cascaded control framework consisting of an SoC controller and a voltage controller is used to regulate DC bus voltages. This virtual state variable combines BESS SoC and its converter output current, there is no need to change the control law when BESSs switch between charging/discharging modes. Once SoCs are balanced, SoC controller works as a current controller. With the proposed control strategy, the number of transmitted state variables and the complexity of controller design are significantly reduced. Stability and steady-state analysis are also conducted to confirm the effectiveness of the proposed control strategy. Finally, Simulink simulation and hardware-in-loop tests are presented to validate the proposed control strategy.••••A consensus-based control strategy with one virtually defined state variable.••The control strategy consists of an SoC controller and a voltage controller.••The virtual state variable combines BESS SoC and its converter output current.••Stability and steady-state analysis are conducted.Distributed secondary controlSoC balanceBattery energy storage systemDC microgridsDue to the increasing demand for electricity, compounded by the pressing need for addressing the environmental pollution and carbon emission challenges due to substantive consumption of fossil fuels in all sectors, distributed energy resources (DERs) using renewable energy sources (RESs), and battery energy storage systems (BESSs) have been intensively researched. The microgrid has been widely recognized as an effective means to integrate the RESs, BESSs and loads. Microgrids can generally be grouped to AC microgrids and DC microgrids, the latter is drawing much attention as they can more effectively and efficiently interface with various DC sources and loads, such as photovoltaics (PVs), electric vehicles (EVs), BESSs. Furthermore, compared with AC microgrids, DC microgrids have no need for frequency control and harmonics cancellation, and no requirement for synchronization, etc, which makes them a more attractive solution in many application scenarios. Even without suffering from the aforementioned issues of AC microgrids, DC microgrids still need be controlled properly. The control objectives of DC microgrids often include average voltage regulation, current-sharing between different DERs, state-of-charge (SoC) balance and avoidance of overcharging and over-discharging of BESSs if multiple BESSs are connected to the DC microgrids. To achieve these control objectives, various control strategies have been proposed, which can be categorized as centralized, decentralized. 2.1. Configuration of DC microgridsThe configuration of DC microgrids used in this paper is illustrated in Fig. 1, which consists of N DC buses, where each DC bus is connected with a BESS, a RES and a resistive load. Each BESS is connected to the DC bus through a DC–DC converter, and converters are operated at voltage control mode to support DC bus voltage, the DC buses are linked through tie-lines. Besides, the resistive loads absorb power from the microgrids while the RESs generate power for the microgrids.2.2. Electric network modelIn Fig. 1, vbusi represents ith DC bus voltage, ioi is the ith converter output current, which is positive when BESS is discharging, while negative when the BESS is charging. Based on the Kirchhoff's law, the voltage and current relationship of whole system can be expressed as follows (1)io+iRES=Y vbuswhere vbus=vbus1,vbus2.,vbusNT is the DC bus voltage vector, io=io1,io2.,ioNT is the converter output current vector. iRES=iRES1,iRES2.,iRESNT, where iRESi is the RES current fed into ith DC bus. Y represents the nodal admittance matrix of DC microgrids, and it can b.