1 Introduction

Currently, with the enormous demand for electricity, the research focus on integrating multiple power sources, such as oil, coal, nuclear or renewable energy. With the urgent necessity to balance fossil fuel depletion and reduce greenhouse gas emissions, the world is going towards on clean and efficient power sources, such as renewable (Photovoltaic, wind, biomass etc.) or fuel cells.

Fuel cell (FC) known as a high specific energy source, it is one of the possible alternative power sources for the future. Because it’s efficiency, reliably and high power density [1], the FCs are a highly acceptable eco-friendly source for microgrids [2, 3]. Microgrids based on fuel-cells are getting more attractive, as a result of the combination of the fuel-cell technology with microgrids, which serve a mutual task. Collaboratively, it meets current energy demand at a competitive cost, extremely reliable, clean, quiet, contained, modular and scalable.

Fuel cell installations worldwide are expected to increase more than tenfold, from the 262 MW installed in 2016 to more than 3000 MW after nine years. This would put the market for new fixed fuel cells at $ 16.2 billion in 2025, according to Navigant Research [4]. It is wildly intercorporate with other sources under the management controller, such as [5] which aims to reduce the fuel consumption based on an advanced manager.

According to the research in the literature [6,7,8], the time constant is depended on the temperature and the injection system (compressor, valves and the hydrogen reformer). As a consequence, fast change in the demand will cause temporarily a drop voltage (stack starvation phenomenon) [9, 10]. To avoid the drop voltage and supply the trainset period, the system must have at least one auxiliary source (storage device) forming a hybrid power system. Thus, to use the FC, it’s recommended to employ a current control loop to prohibit the overloads and improve its performance.

It is well known that if several DGs are deployed in a power grid, they will cause problems such as increasing voltage and instability [11]. These problems may damage some sensitive electrical loads.

To solve these problems, a powerful management algorithm has to be applied to ensure stable DC bus voltage against the environmental variations (demand or weather conditions).

Concerning the energy storage system, by comparing the power characteristics of the batteries and supercapacitors, the charge efficiency is higher for the SC than the battery (95% for the SC and 50% for the battery) [12]. Furthermore, the batteries' main disadvantage is a slow-charging time, constrained by a charge current [13]. On the other hand, the supercapacitors can be charged in a short period depending on the charge current (power) obtainable. More beneficial, unlike batteries, supercapacitors can endure a very high number of charge/discharge cycles without degradation (or visually unlimited cycles). Thus, the supercapacitors have high power density, long lifetime and faster dynamics than the batteries [14], this comparison proves that the supercapacitor is the most suitable over the battery.

Moreover, renewable energy sources are gaining more attention. One of these eco-friend sources is solar energy. It can be converted directly to electricity by the solar panels or concentrated solar power technology based on its thermal energy [15,16,17].

Conserving the solar panels, they can be integrated into the microgrid beside the other sources, such as wind or diesel generators [18,19,20]. It has been wildly used for serval application such as agriculture [21]. However, due to their intermittent production, cause a mismatch between supply and demand for power, and may affect the grid stability and reliability. Many studies have been done to improve the energy management system against this drawback. The combination between PV, FC and SC for energy production with short and long-term storage capacity is studied in [22]. PV/FC/battery two-level strategy for energy management is proposed in [23]. In [24], the proposed control algorithm is based on flatness approach; it provides stable operating for all the sources. Although, the fuel consumption is an important indicator for the management system. For this purpose, the fuel consumption optimizer is proposed in this paper.

In this paper, a hybrid power system consisting of PV, FC and SC is studied. This hybrid system is controlled by an algorithm based on PI-flatness approach. The paper is structured as: Section I is the introduction. In Section II, the structure of the proposed hybrid power system, including the mathematical model. Then, Section III presents the control algorithm. Next, simulation results are explained in Section IV. Finally, the paper ends with the conclusion in Section V.

2 Hybrid system structure

2.1 System configuration

The proposed typical system consists of a 5 parallel solar panels 2 series (Soltech model-245Wh), fuel cell (PEMFC-6KW-45VDC) and a supercapacitor (80F-48VDC). They are connected to the DC bus via DC/DC converters further control the power-sharing and to stabilize the DC bus voltage (120 V). This microgrid has been designed to operate in islanded (off-grid). The performance is inspected by imposing deferent loads. On the whole, the FC stack and the PV source provide power to satisfy the demand power needs. The supercapacitor delivers the power to stabilize the DC bus voltage during the transient periods.

The structure of the studied system with the power electronic converters are illustrated in Fig. 1 which shows that all the converters are connected in parallel. Two-phases parallel boost converters used to control the FC stake, this converter is controlled with interleaving technic, thus, the power quality is improved [25]. A boost converter is utilized to control the produced power by the solar cell. The supercapacitor is always connected to the DC bus by a bidirectional boost converter, this structure allows to charge or discharge the supercapacitor. Moreover, to ensure safe operating and soft dynamics, all the converters are controlled by the current regulation loop. This supercapacitor control loop is supposed much faster than the other control loops. The energy management system generates tow references signals: \(i_{FC\_REF}\) and \(i_{SC\_REF}\). The merits of this algorithm are devoted to finding the optimal FC power correction effort through the management of the system stockers’ energy, namely the energy of the DC-bus and SCs.

Fig. 1
figure 1

The proposed hybrid system with PV and FC as primary sources, and supercapacitor as an auxiliary source connected in parallel with the load side. Where the PV is connected via a boost converter, the FC is connected by an interleaved two-phase boost converter and the SC is connected via a bidirectional DC–DC converter

In this studied system, there are two energy variables to be controlled, the DC bus energy and the supercapacitor energy.

2.2 FC modelling

The FC is an electrochemical source, which converts the energy of the fuel reaction to electricity, from [26, 27], the production depends only by the availability of the fuel as explained following expression

$${\text{H}}_{2} + {\raise0.7ex\hbox{$1$} \!\mathord{\left/ {\vphantom {1 2}}\right.\kern-\nulldelimiterspace} \!\lower0.7ex\hbox{$2$}}{\text{O}}_{2} \to {\text{H}}_{2} {\text{O}} + Heat + Electricity$$
(1)

The fuel cell stack can be considered as controlled current sources. The model provided by Sim Power System of MATLAB/SIMULINK is employed in this study. Figure 2 shows the equivalent circuit of the studied model. Where the V-I and P-I characteristics curves are depicted in Fig. 3.

Fig. 2
figure 2

The equivalent circuit of the FC stack

Fig. 3
figure 3

I–V and P–V characteristics graphs of the proposed Fuel cell

To operate an FC, its constraints have to be respected such as:

  • The generated power shall be held within an interval (max and 0)

  • The FC current slope should be limited to a max value to avoid the FC stack from a fuel starvation phenomenon.

  • The switching frequency of the current shall be higher than 1.25 kHz and the FC ripple current shall be less than about 5% of the rated value to assure a small impact on the FC conditions [28].

The parameters are obtained from [29, 30] where

$$E_{OC} = k_{C} E_{n}$$
(2)
$$i_{O} = \frac{{zFR(P_{{{\text{H}}_{2} }} + P_{{{\text{O}}_{2} }} )}}{Rh}e^{{ - \frac{\Delta G}{{RT}}}}$$
(3)
$$A = \frac{RT}{{z\alpha F}}$$
(4)

And the FC model parameters are given in Table 1 [29].

Table 1 Model parameters

2.3 PV modelling

The solar energy is converted to electricity by using photovoltaic modules. These modules can be connected in series or parallel depending on the desired voltage and current. From [31, 32], the output current is defended as

$$I = I_{ph} - I_{0} \left[ {e^{{\frac{{q(IR_{S} )}}{{K_{B} Ta}}}} - 1} \right] - \frac{{(V + IR_{S} )}}{{R_{P} }}$$
(5)

where q is the charge of the electron and \({K}_{B}\) is the Boltzmann constant. The photocurrent depends on the variation of the radiance and temperature as [31]

$$I_{ph} = \left[ {I_{SC} + K(T - T_{ref} )} \right]\lambda$$
(6)

where, \({I}_{SC}\) is the short circuit current, \(T\) and \({T}_{ref}\) represents the actual and reference temperature, K is the co-efficient of temperature at \({I}_{SC}\) and λ is the value of radiance in kW/m2. Hence, the expression of current provided by the PV array in the function of the number of modules in series (\({N}_{S}\)) and parallel (\({N}_{P}\)), photocurrent (\({I}_{ph}\)), and saturation current (\({I}_{0}\)), ideality factor (a), series (\({R}_{S}\)) and parallel (\({R}_{P}\)) resistances can be expressed as

$$\begin{gathered} I = N_{P} I_{ph} - N_{P} I_{0} \left[ {e^{{\frac{{V + I(N_{S} N_{P} )R_{S} }}{{N_{S} aV_{th} }}}} - 1} \right] \\ - \frac{{V + I(\frac{{N_{S} }}{{N_{P} }})R_{S} }}{{(\frac{{N_{S} }}{{N_{P} }})R_{P} }} \\ \end{gathered}$$
(7)

Based on the P–V and the I–V characteristics displayed in Fig. 4. The MPPT algorithm extracts the power at its maximum point.

Fig. 4
figure 4

I–V and P–V characteristics graphs of the proposed solar panel for T = 25° and rad = 1000 W/m2

From this figure, it’s clear that there is an operating point (Vmpp–Impp) represent the maximum power obtained from the PV. To achieve this point a DC-DC converter controlled by MPPT technic is employed.

P&O (Perturbation & Observation) technic [33, 34] is used in this paper, it has been widely used in the real application. It moves the operating point toward the MPP periodically increasing or decreasing the PV array variable. Thus, the operating point oscillates around the MPP. The principal steps are given in the flowchart in Fig. 5.

Fig. 5
figure 5

Flow chart of perturbation and observation (P&O) technic

2.4 Supercapacitor modelling

Supercapacitors (SCs) reflect electrical energy storage devices that offer high power density, fast charging times, high cycles and long service life. It mostly used in fast energy-storage applications, where fast dynamic charging and high-current discharging processes are needed [35]. The used model in this paper is based on Matlab/Simulink model which illustrated in Fig. 6. Where all the model parameters are extracted from the Matlab mode (2017b).

Fig. 6
figure 6

The equivalent circuit of the SC module

2.5 Load modelling

A dynamic load profile is proposed where the required power have the behaviour of a controlled current source where the load power equals to

$$P_{load} = i_{load} \cdot v_{bus}$$
(8)

2.6 System behaviour modelling

The objective of the management system is to maintain the DC bus voltage at the reference voltage (120 V), for this purpose the supercapacitor control the DC bus energy by transmitting the energy to (discharge) or from (charge) the DC bus. According to [36], the capacitive energy is given as

$$E_{SC} = {\raise0.7ex\hbox{$1$} \!\mathord{\left/ {\vphantom {1 2}}\right.\kern-\nulldelimiterspace} \!\lower0.7ex\hbox{$2$}}C_{SC} v_{SC}^{2}$$
(9)

Due to the capacitance on the DC bus, the electromagnetic energy on a common link can be written as

$$E_{bus} = {\raise0.7ex\hbox{$1$} \!\mathord{\left/ {\vphantom {1 2}}\right.\kern-\nulldelimiterspace} \!\lower0.7ex\hbox{$2$}}C_{bus} v_{bus}^{2}$$
(10)

Following Fig. 1, the DC bus capacitive energy \({E}_{bus}\) is given in function of \({P}_{{FC}_{o}}\),\({P}_{{PV}_{o}}\),\({P}_{{SC}_{o}}\) and \({P}_{load}\), it can be written as

$$\dot{E}_{bus} = P_{{FC_{o} }} + P_{{PV_{o} }} + P_{{SC_{o.} }} - P_{load}$$
(11)

where \({P}_{{FC}_{o}}\),\({P}_{{PV}_{o}}\) and \({P}_{{SC}_{o}}\) are the delivered power from the sources including the converter losses

$$P_{{FC_{o} }} = P_{FC} - r_{FC} \left( {{{P_{FC} } \mathord{\left/ {\vphantom {{P_{FC} } {v_{FC} }}} \right. \kern-\nulldelimiterspace} {v_{FC} }}} \right)^{2}$$
(12)
$$P_{{PV_{o} }} = P_{PV} - r_{FC} \left( {{{P_{PV} } \mathord{\left/ {\vphantom {{P_{PV} } {v_{PV} }}} \right. \kern-\nulldelimiterspace} {v_{PV} }}} \right)^{2}$$
(13)
$$P_{{SC_{o} }} = P_{SC} - r_{SC} \left( {{{P_{SC} } \mathord{\left/ {\vphantom {{P_{SC} } {v_{SC} }}} \right. \kern-\nulldelimiterspace} {v_{SC} }}} \right)^{2}$$
(14)

\({r}_{FC}\) Static losses in the FC converter, \({r}_{PV}\) Static losses in the PV converter, and \({r}_{SC}\) Static losses in the SC converter.

Supposing that FC and SC follow their reference values, the power references can write as

$$P_{FC}^{ref} = P_{FC} = v_{FC} i_{FC}$$
(15)
$$P_{SC}^{ref} = P_{SC} = v_{SC} i_{SC}$$
(16)

The total electromagnetic stored in the DC bus capacitor and the supercapacitor given as

$$E_{T} = E_{bus} + E_{SC}$$
(17)

where the load power can be expressed from Eq. (9) as

$$P_{load} = \sqrt {{{2E_{bus} } \mathord{\left/ {\vphantom {{2E_{bus} } {C_{bus} }}} \right. \kern-\nulldelimiterspace} {C_{bus} }}} \cdot i_{load}$$
(18)

3 Control strategy

In this proposed system, the PV panel operates at the maximum power point tracking (MPPT); P&O algorithm illustrated in Fig. 2 applied to achieve the MPPT [33]. Both the PV and the FC stack are generators supplying the demand. The total power generated can be written as

$$P_{Gen} = P_{{PV_{o} }} + P_{{FC_{o} }}$$
(19)

By replacing in Eq. (11)

$$\dot{E}_{bus} = P_{Gen} + P_{{SC_{o.} }} - P_{load}$$
(20)

This generated power must satisfy the load demand and charge the storage device similarly. While the PV provides its maximum power to the load, the difference between the required power and the offered by the PV is supplied by the FC stack.

From Eq. (19), the total generated power can be expressed as

$$P_{Gen} = \dot{E}_{bus} + P_{load} - P_{{SC_{o.} }}$$
(21)

The generated power is the sum of the PV and the FC power. Mainly, the generated power is depended on the PV power, as mentioned before, the deference on power is compensated by the FC power. Hence, the power reference of the FC stack is given as

$$P_{FC}^{ref} = P_{Gen} - P_{{PV_{o} }}$$
(22)

3.1 Principle of differential flatness theory

Because of the non-linearity of the system, the control may be more complex. Nevertheless, the reduced-order model obtained by applying the differential flatness theory on the non-linear system. This alternative model allows characterizing the trajectories including their dynamics. According to Fliess et al. [37, 38], the system can be considered flat is the flat output y can give by

$$y = \phi (x,u,\dot{u},.....,u^{(\alpha )} )$$
(23)

where x is the stat variables and u the control input variables, they can be written as

$$x = \varphi (y,\dot{y},.....,y^{(\beta )} )$$
(24)
$$u = \psi (y,\dot{y},.....,y^{(\beta + 1)} )$$
(25)

With \(\varphi (.),\psi (.),\phi (.)\) are the smooth mapping functions, The latter notation generalizes to yield the notation \({y}^{\beta +1}\) for the (β + 1)th derivative of y. Similarly, α is a finite number of there derivative, and \(rank(\phi ) = m\),\(rank(\psi ) = m\), and \(rank(\varphi ) = n\).

3.2 The flatness of the power system

In the studied system, the flat model represented by its flat output \(y=\left[\begin{array}{cc}{y}_{1}& {y}_{2}\end{array}\right]\), the control variable \(u={\left[\begin{array}{cc}{u}_{1}& {u}_{2}\end{array}\right]}^{t}\), and the stat variables \(x={\left[\begin{array}{cc}{x}_{1}& {x}_{2}\end{array}\right]}^{t}\), where:

$$y = \left[ \begin{gathered} E_{bus} \hfill \\ E_{T} \hfill \\ \end{gathered} \right],u = \left[ \begin{gathered} P_{SC}^{ref} \hfill \\ P_{FC}^{ref} \hfill \\ \end{gathered} \right],x = \left[ \begin{gathered} v_{bus} \hfill \\ v_{SC} \hfill \\ \end{gathered} \right]$$
(26)

The state variables, from Eq. (9) \(v_{bus}\)(\(x_{1}\)) can be written as

$$x_{1} = \sqrt {{{2y_{1} } \mathord{\left/ {\vphantom {{2y_{1} } {C_{bus} }}} \right. \kern-\nulldelimiterspace} {C_{bus} }}} = \phi_{1} (y_{1} )$$
(27)

From Eq. (10) \(v_{SC}\) (\(x_{2}\)) is written as

$$x_{2} = \sqrt {{{2(y_{2} - y_{1} )} \mathord{\left/ {\vphantom {{2(y_{2} - y_{1} )} {C_{SC} }}} \right. \kern-\nulldelimiterspace} {C_{SC} }}} = \phi_{2} (y_{1} ,y_{2} )$$
(28)

The first input control variables, from Eqs. (10, 11, 13 and 17) the SC power reference can write as

$$\begin{gathered} u_{1} = 2P_{SC\max } \left[ {1 - \sqrt {1 - \sqrt {\frac{{\dot{y}_{1} + \sqrt {\frac{{2y_{1} }}{{C_{bus} }}} \cdot i_{load} - P_{Gen} }}{{P_{SC\max } }}} } } \right] \\ = \psi_{1} (y_{1} ,\dot{y}_{1} ) = P_{{SC_{ref} }} \\ \end{gathered}$$
(29)
$$P_{SC\max } = {\raise0.7ex\hbox{${v_{SC}^{2} }$} \!\mathord{\left/ {\vphantom {{v_{SC}^{2} } {4r_{SC} }}}\right.\kern-\nulldelimiterspace} \!\lower0.7ex\hbox{${4r_{SC} }$}}$$
(30)

Defining \({P}_{SCmax}\) as the limited maximum power from the SC converter.

For the second input control, the FC power reference is calculated from Eqs. (10, 11, 16, 17 and 20)

$$\begin{gathered} u_{2} = 2P_{G\max } \left[ {1 - \sqrt {1 - \sqrt {\frac{{\dot{y}_{2} + \sqrt {\frac{{2y_{1} }}{{C_{bus} }}} \cdot i_{load} }}{{P_{G\max } }}} } } \right] - P_{{PV_{o} }} \\ = \psi_{2} (y_{1} ,\dot{y}_{2} ) = P_{{FC_{ref} }} \\ \end{gathered}$$
(31)
$$P_{G\max } = P_{FC\max } + P_{PV\max }$$
(32)

where \({P}_{Gmax}\) the limited maximum power from the sources, PV and FC converters.

In the ideal model where the losses in the converters are neglected, the input control variables can be written as

$$u_{1} = \dot{y}_{1} + \sqrt {{\raise0.7ex\hbox{${2y_{1} }$} \!\mathord{\left/ {\vphantom {{2y_{1} } {C_{bus} }}}\right.\kern-\nulldelimiterspace} \!\lower0.7ex\hbox{${C_{bus} }$}}} \cdot i_{load} - P_{Gen} = \psi_{1} (y_{1} ,\dot{y}_{1} )$$
(33)
$$u_{2} = \dot{y}_{2} + \sqrt {{\raise0.7ex\hbox{${2y_{1} }$} \!\mathord{\left/ {\vphantom {{2y_{1} } {C_{bus} }}}\right.\kern-\nulldelimiterspace} \!\lower0.7ex\hbox{${C_{bus} }$}}} \cdot i_{load} - P_{{PV_{o} }} = \psi_{2} (y_{1} ,\dot{y}_{2} )$$
(34)

Thus, from Eqs. (2730)

$$x = \left[ {\phi \left( {y_{1} } \right)\quad \phi \left( {y_{1} ,y_{2} } \right)} \right]^{t} ,u = \left[ {\phi \left( {y_{1} ,\dot{y}_{1} } \right)\quad \phi \left( {y_{1} ,\dot{y}_{2} } \right)} \right]^{t}$$

As a result, the proposed reduced-order model can be considered as a flat system.

3.3 DC bus voltage stabilisation

Above all, the most important variable to regulate is to regulate the flat output \({y}_{1}={E}_{bus}\). To ensure the control of this flat variable a PI classical control low is applied. Supposing that the SC control loop is much faster than the FC and the PV control loops [36], the DC bus power expressed in Eq. (11) can be written approximately as

$$\dot{E}_{bus} = P_{{SC_{o} }}$$
(35)

The transfer function is a pure integrator. Based on [32], a PI regulator is proposed to regulate the DC bus energy. Knowing that \({y}_{1}^{ref}={E}_{bus}^{ref}\) as follow

$$\dot{y}_{1} = \frac{1}{s}\left( {K_{p} + \frac{{K_{i} }}{s}} \right)\left( {y_{1} - y_{1\_ref} } \right)$$
(36)
$$K_{p} = 2 \cdot \zeta \cdot \omega_{n}$$
(37)
$$K_{i} = \omega_{n}^{2}$$
(38)

where \(\omega_{n}\) the natural frequency, \(\zeta\) the dumping factor.

To generate the current reference for the FC converter, the power reference generated by the inverse dynamic in Eq. (29) is divided by the measured supercapacitor voltage. The control scheme of the DC bus voltage is illustrated in Fig. 7.

Fig. 7
figure 7

The control scheme of DC bus energy

3.4 SC voltage loop

The SC has enormous capacitive energy over the DC bus capacitance, but with slower dynamic. The control loop of the SC energy depends on the regulation of the total electromagnetic energy. The control low as used in [36] is written as

$$\left( {\dot{y}_{2} - \dot{y}_{2REF} } \right) + K_{SC} \left( {y_{2} - y_{2REF} } \right) = 0$$
(39)

Replacing in Eq. (29), the input control low

$$\begin{gathered} u_{2} = 2P_{G\max } \left[ {1 - \sqrt {1 - \sqrt {\frac{{\dot{y}_{2}^{ref} + K_{SC} (y_{2}^{ref} - y_{2} ) + \sqrt {\frac{{2y_{1} }}{{C_{bus} }}} \cdot i_{load} }}{{P_{G\max } }}} } } \right] \\ - P_{{PV_{o} }} \\ \end{gathered}$$
(40)

To ensure safe operating for the FC stack, the transient power must be limited. Thus, a low-pass filter is employed to ensure the desired trajectory planning as

$$\frac{{P_{{FC_{f} }}^{ref} }}{{P_{FC}^{ref} }} = \frac{1}{\tau s + 1}$$
(41)

where \({P}_{FC}^{ref}\) the limited power reference and τ time constant. Figure 8 resume the control algorithm of the SC energy.

Fig. 8
figure 8

The control scheme of supercapacitor energy

4 System simulation

The performance of the proposed EMS shall be validated by the simulation of the proposed typical DC microgrid. All sources are linked to a common DC bus, and the control system is used to maintain the voltage at its reference. After the designing of the control scheme. Simulation of the hybrid power system realized in Matlab/Simulink 2017.

The DC bus reference voltage is 120 V. The demand will be varied to emulate the real environment behaviour, as mentioned before, all the sources are connected to the DC bus via a power electronic converter. The parameters of the control loop are given in Table 2.

Table 2 System parameters

The radiance profile used in the simulation is presented in Fig. 9 while the temperature supposed fixe in 25 °C. A step in the radiance at the 2nd s is imposed from 500 to 1000 W/m2. Thus, the PV power will increase at this moment.

Fig. 9
figure 9

The radiance profile

Figure 10 depicts the demanded power reference during the simulation time. It changed from 1.2 to 2.4 kW (Medium load, overload, temporary transition.).

Fig. 10
figure 10

The demanded power by the load

To validate the proposed controller, a comparative study between the flat controller and a PI controller was realized. Figure 11 shows the DC bus voltage simulation results during 5 s, the first curve in bleu using the proposed control algorithm when the second curve illustrates the Vbus using the PI controller.

Fig. 11
figure 11

DC bus voltage

From the results, the DC bus voltage using the proposed controller can provide better performance than offered by the PI controller. It offers faster response without overshot, low pics value and more robustness.

Figure 12 shows supercapacitor dynamics, the dynamics are faster using the proposed algorithm. During the load variations, the SC supplies the load demand until the generated power arrived its reference (both the PV and the FC). As a result, the stabilization of the DC bus voltage is improved.

Fig. 12
figure 12

SC power using both technics PI and flatness

Figure 13 displays power waveforms that are created during the simulation. The illustrations show the PV power, the FC power, the load power as well as the SC power.

Fig. 13
figure 13

Power curves of the load, the FC, the PV and the supercapacitor

In the beginning, the load power is relatively small (1.2 kW), whilst the PV power is smaller than the demanded (nearly 1 kW); as a consequence, the FC stack begins supplying the needed power. The SC supplies almost all of the transient power, it remains decreases slowly because the steady-state load power is greater than the total generated power.

The load power at t = 1 s increases (from 1.2 to 2.4 kW). Following remarks are formulated:

  • The SC supplies almost all of the transient phase load.

  • At the same time, the FC power increases to 1.45 kW with limited dynamics.

At t = 2 s, the radiance rises, consequently, the PV power increases (to 1.84 kW). The following notes will be taken:

  • The SC absorbs the surplus of the bus energy.

  • The FC power reference decrease (to 0.56 kW) with limited power dynamics.

After 4 s, the demand decreases to its lower value (1.9 kW), the FC stack power decrease with limited dynamics, and the transient period is regulated by the SC by absorbing the excess power.

Figure 14 represents the SC stat of charge, it explains the behaviour of the SC, it mainly discharges (supplies) with the step-up in the load or case of radiance diminution. Where it charges with the step down in the load or with augmentation of the radiance.

Fig. 14
figure 14

The stat of charge (SoC) of the supercapacitor

The proposed algorithm performances are compared in the filter-based method [39]. It is shown that the proposed approach allows ensuring the requested power while it minimizes the solicitation on the stocker (SC). Therefore, the most important variable to regulate is to regulate the flat output. In contrast, the filter-based method acts only on the dynamic of the sources and the SC can experience wide change under variable loading conditions. This point in great importance in terms of the energy sizing of the SC.

Cbus conditions of selection:

As depicted in Fig. 15, the bus voltage depends also on the Cbus capacitance value, where different values were applied with different topologies (unique-parallel-series). The series montage is inappropriate for this application (low precision and high pic step). The parallel structure offers better behaviour (high stability) with small overshot and slower dynamic. Unique Cbus offers high performance with high capacitance value, thus it’s suitable for sensitive applications such as EVs.

Fig. 15
figure 15

Bus voltage with different Cbus values

5 Conclusion

In conclusion, this study's main objective is to ensure stable DC bus voltage by providing an effective system for DC micro-grid powered by a fuel cell and solar panel, and the backup storage unit (SC). The parallel employment of PV and FC ensure to the load is sustainable suppling. The research focuses mostly stabilizing the DC bus voltage, moreover, employing the FC, solar panel and SC in the energy management approach, taking into account the energetic properties of these sources such as its power and energy density and its dynamics. Nonlinear differential flatness strategy for DC microgrid based on a renewable source with a fuel cell provides excellent DC-link stabilization. The supercapacitor can move the load forward, regarding the characteristics of the main sources, by supplying a stronger power response to the load. During the important steps of the load, the supercapacitor offers the energy balance required during the transition of the load. Also, distributed power systems improve power quality and efficiency.