## 1. Introduction

Electric power systems are progressively evolving from a generation, transmission, and distribution system almost exclusively based on AC, to hybrid configurations, where DC is gaining importance. In a few decades, DC systems could even dominate AC, and many reasons indicate that such a power system can become a reality. The fast development of voltage source converters (VSC) facilitates the interconnection of DC sources, transmission lines, and loads in AC systems. DC power systems are, in theory at least, more straightforward to operate than AC systems, because the synchronization, the phase angles, and the reactive power are not a challenge anymore.

Most electric drives operate in AC because of its simplicity and reduced cost compared with DC. Vast amounts of energy are generated in large power plants using combustion, steam, or hydraulic turbines coupled to synchronous generators. On the other hand, large quantities of renewable energy are generated in small power plants connected all to the network using distributed and intermittent DC generators located near the consumers [

1,

2]. Storage in batteries or hydrogen-based (electrolyzers and fuel cells) systems is performed in DC. Many recent projects use high voltage direct current (HVDC) to transport energy through very long distances or to connect offshore wind farms [

3,

4,

5]. Most of the residential loads, such as lighting or appliances, operate in DC because of its increased efficiency compared with AC. New isolated power systems could privilege the use of DC over AC, but for now, the electric power system evolves toward a hybrid AC/DC power system with high penetration of renewable energy [

6,

7].

The design and operation of microgrids require flexible simulation models. These models should allow the consideration of AC/DC generation and consumption simultaneously. They also should allow the user to design and evaluate the effect of the energy management and control algorithms.

One of the main challenges to operate hybrid power systems is the definition of power references for each of the sources, respecting restrictions, and minimizing at the same time multi-objective functions such as energy consumption or degradation of the sources. Matlab Simulink is one of the most used software to study the energy management in hybrid systems. Some recent developments using this software in DC microgrids are presented in the following references.

An optimal energy management strategy of an islanded DC microgrid that includes photovoltaic generation, batteries, and electrolyzers is addressed in [

8]. Modeling and control strategies for distributed converters in a DC microgrid that integrates photovoltaic panels and batteries are presented in [

9]. A distributed system to produce hydrogen with multi-stack polymer electrolyte membrane (PEM) electrolyzers (EL) coupled with a wind turbine generator is presented in [

10]. The impact of battery energy storage systems (BESS) on the stability of photovoltaic-BESS in DC microgrids is considered in [

11]. The energy management in an AC-isolated microgrid composed of a diesel generator, a wind turbine, and a flywheel system is studied in [

12].

Matlab Simulink is used in [

13] to simulate a HVDC-connected offshore wind power plant with the onshore grid. Reactive power-sharing with distributed generators in an AC microgrid is treated in [

14]. An active and reactive power distribution strategy to suppress the voltage fluctuation when adding a renewable energy source is presented in [

15]. The design of the controller for AC/DC converters to reject disturbances using sliding control is introduced in [

16].

This work focuses on the development of a simulation test bench openly available to download and distribute. We also identified some open access, ready-to-use, complete simulation testbeds for microgrids [

17,

18,

19] and hybrid electric vehicles [

20,

21,

22]. The research presented in [

17] proposes a simulation model of a microgrid, focused on the study of the power converters. It is an excellent tool to analyze the microgrid’s small-signal stability based on the Matlab LAT toolbox. References [

18,

19] introduce simulation models to study the power market in complex power networks.

Some references provide complete simulation models for hybrid electric vehicles (HEV). A complete model of a fuel cell with batteries applied to an HEV is presented in [

22]. Simulation testbeds of a fuel cell ultracapacitor-battery (FC-UC-battery) hybrid locomotive and HEV are presented in references [

21,

20]. These models are developed in Matlab Simulink and are openly available to download. They allow researchers to evaluate and compare different energy management strategies.

Numerous papers have published results obtained using such open-access software. The work presented in [

23] introduces a fuzzy logic controller to perform the energy management in a fuel cell-battery HEV. A rule-based strategy to define control references in a hybrid locomotive is presented in [

24]. A particle swarm optimization algorithm to solve multi-objective stochastic control models for microgrids operation is presented in [

25]. Reference [

26] proposes the optimization of smart grids considering market requirements. These recent research activities demonstrate the interest of developing and making openly available simulation testbeds, allowing the scientific community to evaluate and compare results under the same conditions.

The present paper introduces the energetic macroscopic representation (EMR) as a powerful formalism to organize models, identify control loops, and evaluate control and energy management strategies in AC/DC microgrids. The EMR formalism is a useful tool to organize and simulate multi-physics/multi-source energy systems [

27]. EMR allows systematic integration of subsystems based on the principle of the integral causality and has been widely used in areas such as hybrid electric vehicles [

28,

29,

30,

31], hybrid locomotives [

21], fuel cell systems [

32], photovoltaic generators [

33], marine turbines [

34], and electric vehicles charge stations [

35].

This paper uses the EMR formalism to construct a modular testbed of an AC/DC microgrid that includes a photovoltaic generator, FC, UC, and batteries at the DC side. The model includes a synchronous generator with its automatic voltage regulator and the load at the AC side. The architecture of the microgrid whose testbed is provided with this paper is illustrated in

Figure 1.

The present paper does not have the objective of proposing new models for the energy sources. For this reason, we have referenced all the models adopted and adapted from the literature. Nevertheless, the main contribution of this work is to propose a simulation testbed that permits the integration of energy sources, power converters, controllers, and energy management strategies (control references).

Regarding the components of the microgrid, the FC is modeled using polarization curves, as proposed in [

22]. The UC model is proposed by Zubieta [

36] and the battery model, the one presented by Ceraolo [

37]. The droop control architecture is presented in [

38]. The synchronous generator and its automatic voltage regulator (AVR) models are adopted from [

38,

39]. A complete simulation testbed, implemented in Matlab Simulink, is provided with this paper and made available to download and distribute from the MDPI repository. With this model, researchers can develop and evaluate control and energy management strategies in AC/DC microgrids.

Very few papers share complete simulation models allowing traceability of the claimed results. To our best knowledge, this is the first ready-to-use energy management-oriented simulation model of an AC/DC microgrid.

Compared with other testbeds and research in the literature, the one introduced in this paper:

Allows the performing of a systematic study of the energy flows in an AC/DC microgrid using the energetic macroscopic representation (EMR) formalism.

Provides simulation models, adopted and adapted from literature, for DC and AC sources, power converters, power controllers, and AC loads.

Provides two ready-to-simulate Matlab Simulink AC/DC microgrid models. All the results presented in this paper can be fully replicated using the files provided in the MDPI repository.

The paper is organized as follows.

Section 2 introduces the models of the power sources, the power converters, and control systems.

Section 3 introduces the AC/DC testbed microgrid EMR.

Section 4 presents two case studies to illustrate the use of the testbed.

Section 5 and

Section 6 present a discussion on the testbed and the conclusions.