1 Introduction

The global demand for electricity is expected to increase rapidly extrapolating its direct usage in agricultural sector, industries and residential applications [1]. It is expected that the energy demand may rise about \(2\%\) per annum [2]. Rapid economic development, industrialization and population contributes towards annual growth in energy demand [3]. This demand is largely fulfilled by the conventional sources of energy dominated by coal and oil. Combustion of coal and oil results in carbon emission which may adversely effect the climatic pattern of the world [4]. Hence, a strategic shift is required to facilitate the development of low carbon renewable based technologies. This transition is focussed on implementation of cost effective and technically feasible solutions towards decarbonisation of the energy sector [5].

Since mid \(20^{th}\) century , the electric power industry was largely focussed on coal and oil fired power plants. During \(21^{st}\) century, attention has been paid towards integration of renewable based technologies into the existing power infrastructure [6]. The power system infrastructure needs transformation in all sections i.e generation, transmission and distribution to provide more flexibility, reliability and stability [2]. The concepts related to ‘Microgrid’, ‘High voltage DC transmission’, ‘Distribited generation’ and ‘Flexible AC transmission’ have revolutionized the power system industry.

Technically, microgrids and distributed generation systems have the potential to reshape the scalability and reliability of the existing power grid at a relatively lower cost of energy and environmental impact. Solar based DGs are quiet popular among other renewables due to the tremendous potential of solar energy as a resource, easy availability of raw materials to fabricate solar cells, low maintenance cost and decreasing trend in PV prices. The major issue to deal with wide scale adoption of solar based DGs is the intermittence in solar output generation due to daily or seasonal dependence on meterological conditions. Thus, the energy transition is not only focussed on wide scale utilization of renewable energy but also on energy security and \(100\%\) energy access. Energy storage technologies ranging from short term to long term storage can eventually absorb the variable nature of renewable energy sources and thus play a crucial role during supply and demand mismatch [7].

Integration of solar based DGs into the main grid created a pathway to generate and supply electrical power near the load centres. While transferring electric power to the grid, certain strict integration requirements are being imposed by power system operators to maintain the stability and power quality of the grid. These grid integration requirements have a big impact on the design and analysis of photovoltaic based distributed generation systems. Organizations such as IEEE and IEC are among certain policy makers that frame technical standards, procedures and specifications to interconnect DGs into the main grid [8]. A microgrid should comply to these standards related to the safety of power converters, allowable limits of voltage and frequency variations, anti-islanding and power quality [9].

Microgrids can be categorized into AC type, DC type and hybrid AC–DC type based on nature of loads. Modern day power system has seen an increased penetration of DC loads. Applications including variable speed drives for industries, HVAC, tractions system, LED street lighting, power distribution in data centres, electrical vehicle (EV) charging requires DC supply for their operation [10]. Power electronics plays a vital role in conversion and control of power generated by renewable energy sources. Due to significant improvement in power semiconductor and microelectronics technologies, research works are focused on exploring the potential of power electronics in the field of power system [11, 12].

The role of batteries and energy storage solutions will be crucial in defining the future of the energy system. With the focus on early adoption of EVs and renewable based technologies, the research in the field of batteries and its optimal operation, control and management has gain popularity. Cost effective integration of batteries requires efficient energy management and proper control architecture to maximize battery lifetime. Hence, energy management is an important research aspects which focuses on economic operation of microgrid by effectively managing renewable energy sources and energy storage elements. Additionally, energy management controller also contribute towards effective regulation of DC link voltage profile .

Various microgrid architectures, power converter topologies, control techniques and energy management schemes have been adopted by researchers worldwide. Some of the researches related to the control, synchronization and energy management of renewable based ,microgrids has been reviewed. They have been listed in the Table 1.

Table 1 Research works related to modeling, control and integration of renewable based microgrids

Based on the literature review, following observations were drawn related to the power converter topologies , control , synchronization and energy management of Microgrids:-

  • Power electronic converters are the core of photovoltaic based energy conversion Grid connected photovoltaic energy systems based on single stage and two stage conversion are practically employed. Buck and boost converters are widely employed for DC–DC conversion whereas voltage source converters are usually employed for DC–AC conversion.

  • Photovoltaic generation side control includes maximum power point tracking (MPPT). MPPT technique controls the voltage and current of PV panel such that maximum power can be extracted

  • Effective DC voltage regulation is required which may otherwise be responsible for propagation of power system disturbances between the microgrid and the main grid.

  • Cascaded control loop structure is adopted for regulative the voltage and current injected into the grid. PI controllers are adopted in stationary reference frame while a PR controller is usually adopted in synchronously rotating reference frame.

  • Phase locked loops (PLLs) are commonly employed for synthesizing the phase and frequency information of the power grid required for efficient synchronization.

Certain drawbacks have been identified in the literature survey:-

  • The architecture based on conventional bidirectional controllers may not be suitable for high power applications considering wide scale deployment of renewable based technologies.

  • High pass filtering based current sharing approach may not be enough to suppress the transients alone due to thermal limitation during battery’s charge and discharge cycle.

  • The non-isolated power converter topologies could be hazardous for the system components from safety point of view.

  • PI and PR controllers provide a good response in terms of steady state error reduction, yet they experience some disturbances due to switching harmonics resulting in reduction of THD.

Fig. 1
figure 1

System architecture of hybrid AC–DC microgrid connected to the main grid

Based on the shortcomings listed above, the contributions of the research are summarized below:-

  • Efficient dual active bidirectional DC–DC converter is employed for energy storage system. This ensures efficient high power transfer capability with low filter requirement.

  • Anti windup based modified high pass filtering approach is employed to suppress the impact of high frequency transients on the DC-link capacitor. The proposed current sharing scheme is designed such that the rate of discharge/charge is limited during sudden power transients.

  • Model predictive strategy has been adopted and employed to achieve reliable energy management control.

  • Bode magnitude-frequency loop shaping approach is employed to design the current controllers for grid connected distribution system. Eventually, the harmonic content is reduced to achieve a better power quality.

Research works related to the control of solar photovoltaic based AC–DC type microgrid are largely focussed on improving the power quality of the current injected to the grid or to the loads. The role of power electronics converter in microgrid is gradually advancing towards increasing the efficiency, safety and reliability of the system particularly in high power applications. In view of this, full bridge isolated DC–DC converter not only provides efficient operation but also provides galvanic isolation. Moreover, the filter requirement for PV based full bridge isolated DC–DC converter is reduced compared to conventional buck and boost topologies. Similarly, a more efficient dual active bidirectional DC–DC converter is employed for energy storage system. This topology provides a benefit over conventional bidirectional converter in terms of high power transfer capability, efficiency and low filter requirement [22].

Modified high pass filtering approach is employed to suppress the impact of high frequency transients on the DC-link Capacitor. Proposed current sharing scheme considers the thermal limits of the battery to limit current through it. It ensures battery’s state of health for long term. Battery state of health is highly correlated to its operating state. Battery’s operating state is characterized by the instantaneous battery voltage, state of charge, charging/discharging current rate (di/dt) and the temperature. frequency of discharge/charge cycles. Any deviation of these key parameters from allowable range could lead to degradation of the cells [23]. Hence, the proposed current sharing scheme is designed such that the rate of discharge/charge is limited during sudden power transients [24]. Eventually, the residual power is being supplied by the supercapacitor modules. In a grid connected DG environment, the power quality of the grid current and voltage is of major importance. Hence, a bode magnitude-frequency loop shaping approach is employed to compensate for the harmonics present in the AC side of the system.

Fig. 2
figure 2

a Model of a full bridge isolated DC–DC converter connected to PV strings ‘A’ b Closed loop control architecture employing MPPT and PID controller

2 Hybrid AC–DC Microgrid Architecture

In this research work, a 0.5 MW solar based grid distributed generation system with dual energy storage option has been carried out. Solar based DG along with battery and supercapacitor storage is connected to the power grid through a switch at the point of common coupling. Additionally , DC loads are connected at the medium voltage DC link to form a hybrid AC–DC microgrid. The architecture of hybrid AC–DC microgrid is schematically shown in Fig. 1. To demonstrate the widely adopted distributed structure of solar photovoltaic system, two parallel PV strings comprising of 10\(*\)100 PV panels are connected to the 1kV medium voltage DC link through two individual isolated full bridge DC/DC converter. The distributed structure of solar PV panels are practically adopted to minimize any voltage/current stress on the semiconductor switches while processing and controlling high power. Energy storage solution in the form of Li-ion battery bank and supercapacitor is considered to absorb the intermittency of the solar PV output. Battery bank act as a energy buffer i.e discharges under deficit power situation while charges under excess power situation. DC link voltage profile may experience frequent short duration transients during sudden load switching or grid connection. Supercapacitor modules eventually improves the transient performance of the system because of their high power density. A better DC link voltage regulation can be achieved by incorporating fast charging and discharging feature of the supercapacitor. Battery bank and supercapactiors are connected to the medium voltage DC link through individual dual active bridge DC/DC converter. The hybrid AC/DC microgrid is connected to the 480 V, 50 Hz distribution level power grid through a voltage source converter to enable active and reactive power exchange between DC link and power grid.

3 Modelling of Full Bridge Isolated DC–DC Converter for PV Applications

To model a full bridge isolated DC–DC converter for PV applications as shown in Fig. 2, we need to understand the dynamic behaviour of the converter. The input capacitance \(C_\mathrm{in}\) plays a vital role in suppressing the voltage ripple at input of the DC–DC converter. Thus, it ensures stable maximum power point tracking even during switching transitions. Based on average switching action of \(S_\mathrm{i1}\) and \(S_\mathrm{i4}\) or \(S_\mathrm{i2}\) and \(S_\mathrm{i3}\) over one time period, the dynamics of the converter can be explained through (1) and (2) [25].

$$\begin{aligned}&\frac{{{\mathrm{d}}{i_{{\mathrm{i}}{{\mathrm{L}}_1}}}}}{{{\mathrm{d}}t}} = \frac{1}{{{L_{i1}}}}\left( {{d_{\mathrm{i}}} \cdot n \cdot {v_{{\mathrm{P}}{{\mathrm{V}}_{\mathrm{i}}}}} - {v_{{\mathrm{DC - link}}}}} \right) \end{aligned}$$
(1)
$$\begin{aligned}&{{{\mathrm{d}}{v_{{\mathrm{P}}{{\mathrm{V}}_{\mathrm{i}}}}}} \over {{\mathrm{d}}t}} = {1 \over {{C_{{\mathrm{i1}}}}}}\left( {{i_{{\mathrm{P}}{{\mathrm{V}}_{\mathrm{i}}}}} - n.{i_{{\mathrm{i}}{{\mathrm{L}}_1}\;}}} \right) \end{aligned}$$
(2)

\(I_\mathrm{iL}\) and \(V_\mathrm{pv}\) are considered as the two state variables while the instantaneous duty ratio is the control variable. The state space representation of PV based isolated full bridge DC–DC converter connected to the DC link can expressed in matrix form as:

$$\begin{aligned} \left[ {\begin{array}{*{20}{c}} {{{\tilde{i}}_{{\mathrm{i}}{{\mathrm{L}}_{\mathrm{1}}}}}}\\ {{{\tilde{v}}_{{\mathrm{P}}{{\mathrm{V}}_{\mathrm{i}}}}}} \end{array}} \right] = \left[ {\begin{array}{*{20}{c}} {{{\mathrm{A}}_1}}&{}{{{\mathrm{A}}_2}}\\ {{{\mathrm{A}}_3}}&{}{{{\mathrm{A}}_4}} \end{array}} \right] \;\left[ {\begin{array}{*{20}{c}} {{{\tilde{i}}_{{\mathrm{i}}{{\mathrm{L}}_{\mathrm{1}}}}}}\\ {{{\tilde{v}}_{{\mathrm{P}}{{\mathrm{V}}_{\mathrm{i}}}}}} \end{array}} \right] + \left[ {\begin{array}{*{20}{c}} {{{\mathrm{B}}_1}}\\ {{{\mathrm{B}}_2}} \end{array}} \right] {\tilde{d}_{\mathrm{i}}} \end{aligned}$$
(3)

Where,

$$\begin{aligned}&{{\mathrm{A}}_1} = 0\;,\;{{\mathrm{A}}_2} = \frac{{n \cdot {D_{\mathrm{i}}}}}{{{L_{{\mathrm{i1}}}}}}\;,\;{{\mathrm{A}}_3} = \frac{{ - n \cdot {D_{\mathrm{i}}}}}{{{C_{{\mathrm{i1}}}}}},\;{A_4} = \frac{1}{{{r_{{\mathrm{P}}{{\mathrm{V}}_{\mathrm{i}}}}}.{C_{{\mathrm{i1}}}}}} \nonumber \\ \end{aligned}$$
(4)
$$\begin{aligned}&{{\mathrm{B}}_1} = \frac{{n \cdot {V_{{\mathrm{P}}{{\mathrm{V}}_{\mathrm{i}}}}}}}{{{L_{{\mathrm{i1}}}}}}\;{\mathrm{and}}\;{{\mathrm{B}}_2} = \frac{{ - n \cdot {I_{{\mathrm{i}}{{\mathrm{L}}_1}}}}}{{{C_{{\mathrm{i1}}}}}} \end{aligned}$$
(5)

The value of leakage inductance and input capacitance are chosen according to (6) and (7) in order to limit maximum peak to peak ripple in the inductor current and capacitor voltage within the specified allowable range. In our analysis, the peak to peak ripple in \(I_\mathrm{l}\) and \(V_{C}\) are limited to \(5\%\) of the rated PV current and \(2\%\) of rated PV voltage respectively.

$$\begin{aligned}&{L_{{\mathrm{i1}}}}{\mathrm{= }}{{{V_{{\mathrm{DC - link}}}}.(1 - {D_{\mathrm{i}}})} \over {\Delta {I_{\mathrm{L}}}.{f_{{\mathrm{DAB}}}}}} \end{aligned}$$
(6)
$$\begin{aligned}&{C_{{\mathrm{i1}}}}{\mathrm{= }}{{{I_{{\mathrm{MP}}{{\mathrm{P}}_{\mathrm{i}}}}}.(1 - {D_{\mathrm{i}}})} \over {\Delta {V_{{\mathrm{PV}}}}.{f_{{\mathrm{DAB}}}}}} \end{aligned}$$
(7)

The effect of varying duty ratio on PV voltage profile can be explained through state space representation and can be mathematically expressed by the transfer function \(G_{PV}\) given in (8) [25,26,27]. The equation suggests that the output variable i.e. PV string voltage shows a second order response when disturbances occur due to the control variable i.e. the duty ratio. This information is useful in determining the operating frequency for the MPPT controller.

$$\begin{aligned} {G_{{\mathrm{PV}}}} = \frac{{{{{\hat{\mathrm{v}}}}_{{\mathrm{P}}{{\mathrm{V}}_{\mathrm{i}}}}}({\mathrm{s}})}}{{{{\hat{d}}_{\mathrm{i}}}({\mathrm{s}})}}{\mathrm{= }}\frac{{\left( {\frac{{ - n.{I_{{\mathrm{i}}{{\mathrm{L}}_1}}}}}{{{C_{{\mathrm{i1}}}}}}} \right) {\mathrm{s}} + \left( {\frac{{ - {n^2}.{D_{\mathrm{i}}}.{V_{{\mathrm{P}}{{\mathrm{V}}_{\mathrm{i}}}}}}}{{{C_{{\mathrm{i1}}}}.{L_{{\mathrm{i1}}}}}}} \right) }}{{{{\mathrm{s}}^2} - {\mathrm{s}}\left( {\frac{1}{{{r_{{\mathrm{P}}{{\mathrm{V}}_{\mathrm{i}}}}}.{C_{{\mathrm{i1}}}}}}} \right) + \left( {\frac{{{n^2}.{D_{\mathrm{i}}}^2}}{{{C_{{\mathrm{i1}}}}.{L_{{\mathrm{i1}}}}}}} \right) }} \end{aligned}$$
(8)

Small signal model of full bridge isolated DC–DC converter represented by (8) can be obtained by solving equation (A.13) and (A.14) explained in A. D represents duty ratio at steady state and n is the number of turns of the high frequency transformer. \(L_{i1}\) and \(L_{i1}\) represents the leakage inductance and input capacitance of the \(i^\mathrm{th}\) PV converter. \(r_\mathrm{PVi}\) represents the dynamic resistance of the ith PV String and \({r_{{\mathrm{P}}{{\mathrm{V}}_{\mathrm{i}}}}} = \frac{{{v_{{\mathrm{P}}{{\mathrm{V}}_{\mathrm{i}}}}}}}{{{i_{{\mathrm{P}}{{\mathrm{V}}_{\mathrm{i}}}}}}}\).

Mitsubishi Electrical MLU series (PV-MLU250HC) PV panels are considered for the analysis. Important electrical parameters obtained from the manufacturers datasheet were utilized to accurately estimate output characteristics curve at different environmental conditions [28]. Two PV strings each composed of 10\(*\)200 PV panels having a maximum power rating of 500 kW are connected to the common medium voltage DC link through two individual isolated full bridge DC–DC converter. Each isolated DC–DC converter is controlled in such a manner that maximum power is processed through each PV string at varying environmental conditions. However, practically in a distributed type PV system architecture, different PV string may operate at different radiation and temperature level due to shading of PV panels, thermal and cooling management issues. Each PV string generates a maximum power of 500 kW operating at 310 V (PV String MPP voltage) and 1.6 kA (PV string MPP current) under standard test conditions.

Fig. 3
figure 3

Open loop response of PV string ‘A’ voltage , current and power profile due to step increase in duty ratio of a full bridge isolated DC–DC converter

The open loop performance of the full bridge DC–DC converter on the output PV voltage profile due to step disturbance in duty ratio can be graphically observed in Fig. 3 which confirms that the PV strings connected to the medium voltage DC bus behaves as a second order system oscillating at undamped frequency 8.034 \(*\) \(10^3\) and the damping ratio 0.1815 as suggested by (12). Output PV string voltage get settles to the new steady state value within 2.8 msec after the step disturbances in the duty ratio of the full bridge DC–DC Converter. The solar radiation and ambient temperature are continuously varying in nature which tends to shift the operating point of the PV panels and possibly may restrict the maximum power capability of the distributed PV system. Hence, a closed loop control architecture is employed as shown in Fig. 2b in order to extract maximum power from the PV Panels at different operating conditions by regulating either the PV current or the PV voltage using a MPPT controller. However, the regulation of PV output current is much complex as the level of solar radiation changes significantly during sunlight hours and thus, the operating range of the PV output current is significantly wider. On the contrary, the operating range of the output PV voltage is comparably narrower under varying irradiation levels. Only marginal change is observed in PV output voltage operating point under different temperature and irradiance levels. Hence, the regulation of the output PV voltage is achieved by incorporating a MPPT and PID based controller in the control architecture. Based on the operating environmental conditions, the maximum power point tracking (MPPT) controller generates a reference PV output voltage signal corresponding to the maximum power operating point. For a successful MPPT operation, voltage across the PV strings and the current through the PV strings are sensed at the PV strings output terminal. The MPPT algorithm then calculates the change in voltage (\(\Delta V\)) and power (\(\Delta P\)). The reference voltage (\(V_{{{PV}}}^{{{ref}}}\)) is obtained based on the logical criteria listed below:

  • If the product is greater than zero, \(V_{{\mathrm{PV}}}^{{\mathrm{ref}}}\) is increased by \(\Delta {v_{{\mathrm{step}}}}\).

  • If the product is greater than zero, \(V_{{\mathrm{PV}}}^{{\mathrm{ref}}}\) is increased by \(\Delta {v_{{\mathrm{step}}}}\).

  • If the product is greater than zero, \(V_{{\mathrm{PV}}}^{{\mathrm{ref}}}\) remains unchanged.

Fig. 4
figure 4

Magnitude and phase plot of compensated open loop gain for a full bridge isolated DC–DC converter connected to PV string ‘A’

The error obtained on comparing the actual and reference PV output voltage is compensated through a PID controller to generate the operating duty ratio for the converter. Finally, the PWM generator modulates the duty ratio to control the switching action of the full bridge isolated DC–DC converter.

PID controller is properly designed to improve the closed loop performance of the system. The coefficients \(k_\mathrm{p}\), \(k_\mathrm{i}\) and \(k_\mathrm{d}\) are chosen such that

  • The overall closed loop transfer function is expected to be of form 1/(as+1) i.e a first order system with time constant ‘a’.

  • Time constant is chosen such that closed loop response is 8-10 times faster than than uncompensated open loop response i.e.

    $$\begin{aligned} a = \frac{1}{{8.\xi .{\omega _n}}} \end{aligned}$$
    (9)
  • The closed loop system should have adequate gain and phase margins.

Based on above performance characteristics, the tuning of PID controller is performed using MATLAB SISO Tool. The obtained optimal values of \(k_\mathrm{p}\), \(k_\mathrm{i}\), \(k_\mathrm{d}\) is used to determine the compensated loop gain and the overall transfer function of the closed loop system. Figure 4 shows the frequency response of compensated open loop gain which confirms the stability of the closed loop system.

4 Modelling of Dual Active Bridge Bidirectional DC–DC Converter for Energy Storage Applications

The energy storage elements act as energy buffers for the microgrid especially under islanded mode of operation. Wide scale utilization of solar photovoltaic based DGs will essentially require cost effective and efficient energy storage technologies to support the grid even if there is inadequate power supply from the PV side [29]. In our research , we have considered the Li-ion batteries and the supercapacitors for dual energy storage options in a AC–DC microgrid. In case of a medium voltage DC link operation, supercapacitors provide a fast transient response towards sudden change in load conditions especially under short duration transient peaks [30]. Hence , these can be considered as a transient surge absorbers. These short duration power transient adversely effects the dynamics of the DC link. Consequently, ripples in DC link voltage may contribute to voltage stress on grid side converter or DC–DC converter switches. Power electronic interface between the DC bus and the energy storage elements should be appropriately designed such that bidirectional flow of power/current is achieved. In order to enable co-ordinated charging and discharging of energy storage elements, a dual active bridge DC–DC bidirectional converter is employed is this research.

Fig. 5
figure 5

A dual active bridge bidirectional DC–DC converter for Energy storage system

Dual active bridge DC–DC bidirectional converter consists of two active bridges connected through a high frequency transformer as shown in Fig. 5. All the switches operate at \(50\%\) duty cycle. Due to the switching operation of two active bridges, symmetrical square waveform is obtained at the primary and secondary terminal of the transformer. The bidirectional exchange of the power between the DC bus and the energy storage element is dependent on the phase lag or lead between the two signals. The dynamics of the dual active bridge bidirectional DC–DC converter can be explained through (10). The steady state power flow can be estimated through (11).

$$\begin{aligned}&{{{\mathrm{d}}{i_{{{\mathrm{L}}_{\mathrm{B}}}}}} \over {{\mathrm{d}}t}} = {1 \over {{L_{{{\mathrm{B}}_{{\mathrm{DAB}}}}}}}}\int {({V_{\mathrm{p}}} - {V_{\mathrm{s}}}).{\mathrm{d}}t} \end{aligned}$$
(10)
$$\begin{aligned}&{P_{\mathrm{bat}}} = {{{V_{\mathrm{B}}}.{V_{{\mathrm{DC - Link}}}}.\phi .(\pi - \phi )} \over {\pi .\omega .n.{L_{{{\mathrm{B}}_{{\mathrm{DAB}}}}}}}} \end{aligned}$$
(11)

Maximum power exchange (either during charging or discharging) can be achieved for a phase difference of \(\phi =90^{\circ }\). For rated/maximum capacity of a battery or a supercapacitor, the value of coupling inductor can be choosen for a particular value of switching frequency \(f_\mathrm{DAB}\) and maximum power rating \(P_\mathrm{B_\mathrm{rated}}\) according to (12).

$$\begin{aligned} {L_{{{\mathrm{B}}_{{\mathrm{DAB}}}}}} \le {{{V_{\mathrm{B}}}.{V_{{\mathrm{DC - Link}}}}} \over {8.{f_{\mathrm{s}}}.n.{P_{{{\mathrm{bat}}_{{\mathrm{rated}}}}}}}} \end{aligned}$$
(12)

LG Chem 48V, 126 Ah RESU 6.5 Li-ion battery pack is considered for the analysis [31]. The technical specification of the battery pack is extracted from the manufacturer datasheet to construct the equivalent thevenin’s model of Li-ion battery . A battery bank consisting of 100 LG Chem batteries in parallel is connected to the medium voltage DC bus through a dual active bridge bidirectional DC–DC converter to ensure proper charging and discharging. At a steady state value of \(\phi =45^{\circ }\), 187.5 kW power can be discharged through the battery bank. The energy storage system should be adequately designed to deliver or absorb power so as to achieve proper DC-link voltage regulation. Hence it becomes important to understand the behaviour of DC link voltage profile during charging and discharging of battery bank/supercapacitor through the bidirectional converter. The dynamics of the DC link connected to battery through a bidirectional converter can be explained through (14).

$$\begin{aligned}&{C_{{\mathrm{DC}}}}{{{\mathrm{d}}{v_{{\mathrm{DC - link}}}}} \over {{\mathrm{d}}t}} = {i_{{{\mathrm{B}}_{{\mathrm{DAB}}}}}} - {i_{{\mathrm{Load}}}} \end{aligned}$$
(13)
$$\begin{aligned}&{C_{{\mathrm{DC}}}}{{{\mathrm{d}}{v_{{\mathrm{DC - link}}}}} \over {{\mathrm{d}}t}} = {{{P_{\mathrm{bat}}}} \over {{V_{{\mathrm{DC}}}}}} - {{{v_{{\mathrm{DC - link}}}}} \over {{R_{{\mathrm{Load}}}}}} \end{aligned}$$
(14)
Fig. 6
figure 6

Impact of step variation in phase difference (\(\phi \)) on the DC link voltage profile

\(C_{DC}\) represents the capacitance of the DC bus. \(i_{Load}\) is introduced to examine the effect of variation of load on the DC bus. From our application point of view, \(i_{Load}\) represents deficit or excess power based on loading conditions. \(R_{Load}\) represents the load resistance as seen by the DC bus. According to the operating principle of dual active bridge bidirectional DC–DC converter, the power delivered (or absorbed) by the battery is dependent on the phase difference between the switching states of two active bridges. Hence, the dynamics of the DC link can be studied through analysing the impact of variation of phase difference \(\phi \) on the DC link voltage.

Fig. 7
figure 7

Closed loop architecture for proper DC voltage regulation

Considering, \(V_{DC-link}\) as the state variable and \(\phi \) as the control variable, the small signal dynamics (in s-domain) is represented by linearizing equation (14) as

$$\begin{aligned}&{G_{{\mathrm{DAB}}}} = \frac{{{v_{{\mathrm{DC - link}}}}\left( {\mathrm{s}} \right) }}{{\phi \left( {\mathrm{s}} \right) }} = \frac{{{k_{{\mathrm{DAB}}}}}}{{(s.{\tau _{{\mathrm{DAB}}}} + 1)}} \end{aligned}$$
(15)
$$\begin{aligned}&{\mathrm{where}},{k_{{\mathrm{DAB}}}} = \frac{{{R_{{\mathrm{Load}}}}.\;{V_{\mathrm{B}}}}}{{\omega .n.\pi .{L_{{{\mathrm{B}}_{{\mathrm{DAB}}}}}}}}\left( {1 - \frac{{2\phi }}{\pi }} \right) {\mathrm{and}} \end{aligned}$$
(16)
$$\begin{aligned}&{\tau _{{\mathrm{DAB}}}} = {R_{{\mathrm{Load}}}}.{C_{{\mathrm{DC}}}} \end{aligned}$$
(17)

Open loop transfer function \(G_{DAB}\) suggests that the dual active bridge bidirectional DC–DC converter connected to the battery bank/supercapcitor can be considered as a first order system with DC gain as \(k_{DAB}\) and time constant as \(\tau _{DAB}\). The DC gain is dependent on the steady state value of phase difference while the time constant is dependent on the load resistance \(R_{Load}\). A step increase in load resistance results in slower transient response as the value of time constant increases. The effect on DC link voltage profile due to step variations (\( \pm \)5 \(\%\) around steady state value of \(\phi \)=0.7854 rad) in phase difference \(\phi \) is shown in Fig. 6. It shows that the DC link voltage instantaneously oscillates around the steady state value of 1 kV during load variation (due to variation in \(\phi \)). It can be concluded that a closed loop architecture needs to be adopted to regulate the DC link voltage at a constant value of 1 kV and to improve the transient response of the system which is discussed in the next section, battery bank and supercapacitor based dual energy storage system connected to the medium voltage DC link through dual active bridge bidirectional converter serves the following objectives:

  • Acts as energy buffer

  • Provides effective regulation of medium voltage DC link

5 DC-Link Voltage Regulation

The common DC link is an important element of an AC–DC microgrid which maintains the power balance between AC and DC side of the microgrid. The dynamics of the DC link provides an insight on the stability of the DC link voltage due to power imbalance at the DC link terminals. The dynamics at the DC link terminal can be explained using (18)

$$\begin{aligned} {C_{{\mathrm{DC}}}}\frac{{{\mathrm{d}}{v_{{\mathrm{DC - link}}}}}}{{{\mathrm{d}}t}} = \frac{{{P_{{\mathrm{ESS}}}}\; - \;\;{P_{{\mathrm{net}}\;\;}}}}{{{V_{{\mathrm{DC - link}}}}}} \end{aligned}$$
(18)

Where \(P_{ESS}\)=\(P_{bat}\)+\(P_{SC}\) is the power supplied or absorbed by the dual energy storage system and \(P_{net}\)=\(P_{PV}\)-\(P_{DC}\)-\(P_{3\phi }\) is the deficit or excess power seen by the high voltage DC link in absence of any storage system. Energy storage in the form of battery bank and supercapacitor is adopted not only to balance the power flow at the DC link terminals but also to regulate the DC link voltage. Under steady state condition, the term \(P_{ESS}\)-\(P_{net}\) has a infinitely small value and does not effect the DC link voltage profile. However, DC link voltage may be subjected to short duration transients at the instant of load switching or grid connection/disconnection. Practically, battery causes a delay equal to 4 times \(R_{Bat}\)*\(C_{Bat}\) during charging and discharging due to internal resistances and capacitance and hence produces short duration transients on DC link. In high power applications, the intermittent nature of the solar PV output also affects the thermal management of the battery.

Hence, a supercapacitor is employed along with the battery bank to suppress the high frequency short duration transient. Supercapacitors have high energy density and can absorb these transients due to their fast charging and discharging ability. Supercapacitor also plays important role in improving the thermal management of the battery. To achieve this, a current sharing scheme is adopted by the energy management controller described in section to obtain the reference current for both supercapacitor and battery bank such that the thermal limits of the battery is prevented.

The transfer function \(G_{DAB}\) and uncompensated open loop response suggests that a closed loop feedback control needs to be designed to improve the transient performance and to regulate the high voltage DC link. A proportional integral controller is employed in closed loop control architecture as shown in Fig. 7. The closed loop system is designed such that compensated plant should be 10 times faster than the original plant. Accordingly, the closed loop transfer function of the dual active bridge bidirectional DC–DC converter including a PI controller can be written as:-

$$\begin{aligned}&{C_{{\mathrm{DAB}}}} = \frac{{{G_{{\mathrm{DAB}}}}.{G_{{\mathrm{PI}}}}}}{{1 + {G_{{\mathrm{DAB}}}}.{G_{{\mathrm{PI}}}}}} \end{aligned}$$
(19)
$$\begin{aligned}&{\mathrm{where}},{G_{{\mathrm{PI}}}} = \left( {{k_{\mathrm{p1}}} + \frac{{{k_{\mathrm{i1}}}}}{{\mathrm{s}}}} \right) \end{aligned}$$
(20)

The coefficients \(k_\mathrm{p1}\) and \(k_\mathrm{i1}\) are chosen such that:-

  • The overall closed loop transfer function is expected to of the form 1/(\(\tau _\mathrm{des}\).s+1) which represents a single order system.

  • The closed loop response should be faster than the uncompensated open loop response and hence \(\tau _\mathrm{des}\) chosen to be 1/10th of \(\tau _\mathrm{DAB}\) i.e.

    $$\begin{aligned} {\tau _\mathrm{des}} = \frac{{{\tau _\mathrm{DAB}}}}{{10}} \end{aligned}$$
    (21)

According the above mentioned conditions, the values of \(k_\mathrm{p1}\) and \(k_\mathrm{i1}\) are calculated using (22).

$$\begin{aligned} {{k}_\mathrm{p1}}=\frac{{{\tau }_\mathrm{DAB}}}{{{k}_\mathrm{DAB}}.{{\tau }_\mathrm{des}}}\ { and }\ {{k}_\mathrm{i1}}=\frac{1}{{{k}_\mathrm{DAB}}.{{\tau }_\mathrm{des}}} \end{aligned}$$
(22)

The closed loop response of the battery bank connected to the high voltage DC link through a compensated dual active bridge bidirectional DC–DC converter is shown in Fig. 8. It can be seen that DC link voltage is regulated at 1 kV on step variations in load power.

Fig. 8
figure 8

Closed loop response of DC-link voltage due to step changes in DC load

6 Energy Management of Hybrid DC–AC Microgrid

Energy management is a core section that plans, organizes, coordinates and monitors the system parameters, power utility information, services and energy resources based on the techno-economical constraints imposed on the system.System uncertainties such as intermittent PV power output due to varying environmental conditions, sudden active and reactive support to the three phase utility grid, transient power surges at DC load, islanding of microgrid etc. need to be considered to define the stable operation of the AC–DC microgrid. Energy management section performs the following functions:

  • Exchange of power to or from the utility grid

  • Economic operation of microgids

  • Optimal scheduling of required power among different energy resources

  • Load shedding (in worst case scenario)

  • Dispatch of power to the local critical loads

In order to achieve cost effective operation of AC–DC microgrid, PV based DC–DC converters are operated to ensure maximum power extraction from the distributed PV System. Batteries act as energy buffer to absorb and supply excess power and deficit power respectively based on the grid and critical DC load requirement. The charging and discharging capacity of Li-ion batteries are limited within range [\(SOC_{max}\), \(SOC_{min}\)] to prevent battery degradation and thermal limits. Usually, operating capacity of a battery is limited between 30–70\(\%\) of the maximum capacity for efficient, economical and durable operation of Li−ion batteries. Supercapacitor comes into operation when a high frequency short duration transient is experienced by the DC link. Although both battery and grid can act as a energy buffer yet wide scale penetration of intermittent renewable resources may disturb the inertia of the whole power system. Additionally, Li−ion batteries shows slow response towards sudden transient variation in load power which introduces ripple in the DC link voltage profile.

The energy management controller decides the reference operating power for the dual energy storage system, active and reactive power supplied to the grid based on four cases considering the effect of stochastic response of PV power, battery state of charge and power demand by the DC loads.

Case 1:- If the sum of grid power requirement and the DC load requirement exceeds the generated PV power, grid requires only active power

  • if \(SO{{C}_\mathrm{min}}\le SO{{C}_\mathrm{bat}}\left( t \right) \le SO{{C}_\mathrm{max}}\)

    $$\begin{aligned} {P_{{\mathrm{PV}}}}\left( t \right) + P_{{\mathrm{ESS}}}^{{\mathrm{dis}}} = {P_{{\mathrm{grid}}}}\left( t \right) + {P_{{\mathrm{DC}}}}\left( t \right) \end{aligned}$$
    (23)
  • if \(SO{{C}_\mathrm{bat}}\left( t \right) \le SO{{C}_\mathrm{min}}\)

    $$\begin{aligned}&{P_{{\mathrm{PV}}}}\left( t \right) = P_{{\mathrm{grid}}}^{\mathrm{'}}\left( t \right) + {P_{{\mathrm{DC}}}}\left( t \right) \end{aligned}$$
    (24)
    $$\begin{aligned}&P_{{\mathrm{grid}}}^{\mathrm{*}}\left( t \right) \rightarrow {P_{{\mathrm{PV}}}}\left( t \right) - {P_{{\mathrm{DC}}}}\left( t \right) \end{aligned}$$
    (25)

Case 2:- If the sum of grid power requirement and the DC load requirement exceeds the generated PV power, grid requires both active and reactive power

  • if \(SO{{C}_\mathrm{min}}\le SO{{C}_\mathrm{bat}}\left( t \right) \le SO{{C}_\mathrm{max}}\)

    $$\begin{aligned} {{P}_{\text {PV}}}\left( t \right) +P_{\text {ESS}}^{\text {dis}}= |{{S}_{\text {grid}}}\left( t \right) |+{{P}_{\text {DC}}}\left( t \right) \end{aligned}$$
    (26)
  • if \(SO{{C}_\mathrm{bat}}\left( t \right) \le SO{{C}_\mathrm{min}}\)

    $$\begin{aligned}&{P_{{\mathrm{PV}}}}\left( t \right) = |{S_{{\mathrm{grid}}}^{'}\left( t \right) } |+ {P_{{\mathrm{DC}}}}\left( t \right) \end{aligned}$$
    (27)
    $$\begin{aligned}&P_{{\mathrm{grid}}}^*\left( t \right) \rightarrow \root 2 \of {{{{\left( {{P_{{\mathrm{PV}}}}\left( t \right) - {P_{{\mathrm{DC}}}}\left( t \right) } \right) }^2} + {{\left( {Q_{{\mathrm{grid}}}^*} \right) }^2}}} \end{aligned}$$
    (28)

Case 3:- If the generated PV power exceeds the sum of grid and DC load power requirement, grid requires only active power.

  • if \(SO{{C}_\mathrm{min}}\le SO{{C}_\mathrm{bat}}\left( t \right) \le SO{{C}_\mathrm{max}}\)

    $$\begin{aligned} {P_{{\mathrm{PV}}}}\left( t \right) = P_{{\mathrm{ESS}}}^{{\mathrm{ch}}}\left( t \right) + {P_{{\mathrm{grid}}}}\left( t \right) + {P_{{\mathrm{DC}}}}\left( t \right) \end{aligned}$$
    (29)
  • \(SO{{C}_\mathrm{bat}}\left( t \right) \ge SO{{C}_\mathrm{max }}\)

    $$\begin{aligned}&{P_{{\mathrm{PV}}}}\left( t \right) = P_{{\mathrm{grid}}}^{'}\left( t \right) + {P_{{\mathrm{DC}}}}\left( t \right) \end{aligned}$$
    (30)
    $$\begin{aligned}&P_{{\mathrm{grid}}}^*\left( t \right) \rightarrow {P_{{\mathrm{PV}}}}\left( t \right) - {P_{{\mathrm{DC}}}}\left( t \right) \end{aligned}$$
    (31)

Case 4:- If the generated PV power exceeds the sum of grid and DC load power requirement, grid requires both active and reactive power.

  • if \(SO{{C}_\mathrm{min}}\le SO{{C}_\mathrm{bat}}\left( t \right) \le SO{{C}_\mathrm{max}}\)

    $$\begin{aligned} {P_{{\mathrm{PV}}}}\left( t \right) = P_{{\mathrm{ESS}}}^{{\mathrm{ch}}}\left( t \right) + |{{S_{{\mathrm{grid}}}}\left( t \right) } |+ {P_{{\mathrm{DC}}}}\left( t \right) \end{aligned}$$
    (32)
  • if \(SO{{C}_\mathrm{bat}}\left( t \right) \le SO{{C}_\mathrm{min}}\)

    $$\begin{aligned}&{P_{{\mathrm{PV}}}}\left( t \right) = |{S_{{\mathrm{grid}}}^{'}\left( t \right) } |+ {P_{{\mathrm{DC}}}}\left( t \right) \end{aligned}$$
    (33)
    $$\begin{aligned}&P_{{\mathrm{grid}}}^*\left( t \right) \rightarrow \root 2 \of {{{{\left( {{P_{{\mathrm{PV}}}}\left( t \right) - {P_{{\mathrm{DC}}}}\left( t \right) } \right) }^2} + {{\left( {Q_{{\mathrm{grid}}}^*} \right) }^2}}} \end{aligned}$$
    (34)

Based on above cases, energy management control can be achieved through model predictive control. Model predictive controller allows optimal power balance and control in a multi generation distributed energy system through a robust and stochastic formulation. It enables us to predict the system output response by minimizing the cost function over discrete control horizon. The cost function comprises of:

  • Weighted sum of PV power (\({{\alpha _{{\mathrm{PV}}}}{P_{{\mathrm{PV}}}}}\)), battery power (\({{\alpha _{\mathrm{B}}}{P_{\mathrm{B}}}}\)), supercapacitor power (\({{\alpha _{{\mathrm{SC}}}}{P_{{\mathrm{SC}}}}}\)) and grid power (\({{\alpha _{\mathrm{g}}}{P_{{\mathrm{grid}}}}}\)) for optimal resource allocation.

  • Weighted sum of battery (\({{\beta _{\mathrm{B}}}\Delta {P_{\mathrm{B}}}}\)) and supercapacitor power (\({{\beta _{{\mathrm{SC}}}}\Delta {P_{{\mathrm{SC}}}}}\)) deviation for rate limitation and coordinated action of energy storage system.

  • Penalty term (\({{\gamma _{{\mathrm{DC}}}}\left( {{V_{{\mathrm{DC}}}}(t + 1) - {V_{{\mathrm{DC}}}}(t)} \right) }\)) for any deviation in DC voltage to achieve efficient DC voltage regulation.

The objective of model predictive based energy management controller is to estimate the next state of the decision variables through minimization of cost function over \(n_{c}\) control horizon. The charging/discharging reference current through the battery bank and supercapacitor modules is optimally determined depending on the loading conditions, grid status, maximum power through PV strings and state of charge constraints.

$$\begin{aligned}&\sum \limits _{i = 1}^2 {{P_{{\mathrm{PV}}}}(t)} + \sum \limits _{i = 1}^{{n_{\mathrm{b}}}} {{P_{\mathrm{B}}}(t)} + \sum \limits _{i = 1}^{{n_{{\mathrm{sc}}}}} {{P_{{\mathrm{SC}}}}(t)} - {S_{{\mathrm{grid}}}}(t) \nonumber \\&\qquad - \sum \limits _{i = 1}^{{n_{{\mathrm{load}}}}} {{P_{{\mathrm{load}}}}(t)} = {P_{{\mathrm{net}}}} \end{aligned}$$
(35)
$$\begin{aligned}&x(t) = \left[ {\sum \limits _{i = 1}^{{n_{\mathrm{b}}}} {{P_{\mathrm{B}}}(t)} \;\sum \limits _{i = 1}^{{n_{{\mathrm{sc}}}}} {{P_{{\mathrm{SC}}}}(t)} } \right] \end{aligned}$$
(36)
$$\begin{aligned}&u(t) = \left[ {{S_{{\mathrm{grid}}}}(t)\;\sum \limits _{i = 1}^{{n_{{\mathrm{load}}}}} {{P_{{\mathrm{load}}}}(t)} \;SO{C_{\mathrm{B}}}({\mathrm{t}})} \right] \end{aligned}$$
(37)
$$\begin{aligned}&d(t) = {P_{{\mathrm{net}}}}(t) \end{aligned}$$
(38)
$$\begin{aligned}&{P_{\mathrm{B}}}(t + 1) = {P_{\mathrm{B}}}(t) + \sum \limits _{i = 1}^2 {{P_{{\mathrm{PV}}}}(t)} - {S_{{\mathrm{grid}}}}(t) \nonumber \\&\qquad - \sum \limits _{i = 1}^{{n_{{\mathrm{load}}}}} {{P_{{\mathrm{load}}}}(t)} \end{aligned}$$
(39)
$$\begin{aligned}&{P_{{\mathrm{SC}}}}(t + 1) = {P_{{\mathrm{SC}}}}(t) + \sum \limits _{i = 1}^2 {{P_{{\mathrm{PV}}}}(t)} - {S_{{\mathrm{grid}}}}(t)\nonumber \\&\qquad - \sum \limits _{i = 1}^{{n_{{\mathrm{load}}}}} {{P_{{\mathrm{load}}}}(t)} \end{aligned}$$
(40)

For an optimal response, the reference for the supercapacitor and battery bank can be estimated by minimizing the cost function as given below:

$$\begin{aligned} J = \left( \begin{array}{llllll} \sum \limits _{i = 1}^{{n_{\mathrm{c}}}} {\alpha _{{\mathrm{PV}}}}{P_{{\mathrm{PV}}}}(t + i) + {\alpha _{\mathrm{B}}}{P_{\mathrm{B}}}(t + i) + \\ {\alpha _{{\mathrm{SC}}}}{P_{{\mathrm{SC}}}}(t + i) + {\alpha _{\mathrm{g}}}{P_{{\mathrm{grid}}}}(t + i) + \\ \sum \limits _{i = 1}^{{n_{\mathrm{c}}}} {{\beta _{\mathrm{B}}}\Delta {P_{\mathrm{B}}}(t + i) + {\beta _{{\mathrm{SC}}}}\Delta {P_{{\mathrm{SC}}}}(t + i)} + \\ \sum \limits _{i = 1}^{{n_{\mathrm{c}}}} {{\gamma _{{\mathrm{DC}}}}\left( {{V_{{\mathrm{DC}}}}(t + i) - {V_{{\mathrm{DC}}}}(t + i - 1)} \right) } \end{array} \right) \end{aligned}$$
(41)
Fig. 9
figure 9

a Equivalent thevenin’s model of battery and supercapacitor, b Power sharing scheme for battery bank and supercapacitor modules

Further, the current sharing between the supercapacitor and the Li−ion battery is based on the concept of decomposition of total ESS charging/discharging current into high frequency and low frequency components. The electrical equivalent thevenin’s model of battery and supercapacitor is shown in Fig. 9a. In a dual active bridge bidirectional DC–DC converter, power is related to the phase difference between (\(\phi \)) switching of individual bridges. Accordingly, the control variable in this application is \(\phi \) which is proportional to the battery power and current as suggested in the equation (15). Thus, power sharing among the battery bank and supercapacitor is based on decomposition of \({{\phi }_{ESS}}\) into low frequency component and high frequency transients. A high pass filter is used to extract the low frequency components of \({{\phi }_{ESS}}\) whose cutoff frequency is chosen between 5−10 Hz. High frequency transients thus obtained are taken care of by the supercapacitor. In high power applications, due to variable nature of solar radiation the total battery charging/discharging current required may sometimes be very high which may test the thermal limits of the battery. In order to enhance the thermal management and the lifetime of the battery, the low frequency component of \({{\phi }_{ESS}}\) is passed through a slew rate limiter considering the thermal limits. As a result, battery bank charging/discharging current takes certain time to reach to the final steady state value and in the meantime, supercapacitor takes care of the transient developed on the medium voltage DC bus. The ESS power sharing scheme is shown in Fig. 9b.

7 Modelling of Neutral Point Clamped Voltage Source Converter for 3\(\phi \) Grid Connection

‘A’ phase leg of a neutral point clamped DC–AC converter consists of two half bridges (\(S_\mathrm{11}\) and \(S_\mathrm{12}\) forms one while \(S_\mathrm{21}\) and \(S_\mathrm{22}\) forms another) as shown in Fig. 10. The DC link splits into two half at the input terminal of a NPC converter. The dynamics of the NPC converter can be mathematically explained using (42)

Fig. 10
figure 10

Schematic diagram of a neutral-point clamped DC–AC converter connected to the 3-\(\phi \) power grid

$$\begin{aligned} {V_{\mathrm{c}}} = \frac{{{V_{{\mathrm{DC - link}}}}}}{2}m\left( t \right) \end{aligned}$$
(42)

7.1 Current Control of Grid Connected NPC AC–DC Converter

Certain standard grid requirement and codes are specified for integration of renewable based DGs. It provides a technical guideline to the network operators for planning, control and expansion of distributed generation technology. IEEE 929, UL 1741, IEEE 1547, IEC 61727 are certain relevant standards for integrating renewable based DGs into the grid [32, 33]. Voltage harmonic level, voltage amplitude and frequency variations, injected current harmonic levels, total harmonic distortion are the parameters of interest while designing and evaluating the control scheme of the power converters [34]. Grid side current controller can be modelled in rotating dq frame, the stationary \(\alpha \beta \) frame, and the natural abc frame.

7.2 Grid Current Control Architecture in dq Frame

In this section, synchronously rotating frame (dq) based current controllers are designed. As the grid current in abc frame gets transformed to dc values in dq reference frame, two PI controllers are employed for both d axis and q axis controller. The AC side system dynamics can be represented using (43):-

$$\begin{aligned} {L_{\mathrm{g}}}\frac{{{\mathrm{d}}{i_{{\mathrm{abc}}}}}}{{{\mathrm{d}}t}} = - {R_{\mathrm{g}}}.{i_{{\mathrm{abc}}}} + {V_{{\mathrm{c,abc}}}} - {V_{{\mathrm{grid,abc}}}} \end{aligned}$$
(43)

Using Park Transformation,

$$\begin{aligned}&{V_{{\mathrm{grid,d}}}} - {V_{{\mathrm{c,d}}}} = {R_{\mathrm{g}}}.{i_{\mathrm{d}}} + {L_{\mathrm{g}}}\frac{{{\mathrm{d}}{i_{\mathrm{d}}}}}{{{\mathrm{d}}t}} - \omega .{L_{\mathrm{g}}}.{i_{\mathrm{q}}} \end{aligned}$$
(44)
$$\begin{aligned}&{V_{{\mathrm{grid,q}}}} - {V_{{\mathrm{c,q}}}} = {R_{\mathrm{g}}}.{i_{\mathrm{q}}} + {L_{\mathrm{g}}}\frac{{{\mathrm{d}}{i_{\mathrm{q}}}}}{{{\mathrm{d}}t}} + \omega .{L_{\mathrm{g}}}.{i_{\mathrm{d}}} \end{aligned}$$
(45)

The d axis equation (44) contains \(i_{q}\) term and the \(i_{q}\) axis equation (45) contains \(i_{d}\) term. Hence, we can say that \(d-q\) axis current dynamics are cross-coupled. Two control inputs are defined as \(u_{d}\) and \(u_{q}\) which regulates the error between the reference and actual \(d-q\) axis current using a PI controller. It helps in decoupling the \(d-q\) axis current dynamics and hence \(i_{d}\) and \(i_{q}\) can be controlled independently as shown in the Fig. 11.The modulating signals \(m_{d}\) and \(m_{q}\) can be obtained as follows:-

$$\begin{aligned}&{m_{\mathrm{d}}} = \frac{2}{{{V_{{\mathrm{DC - link}}}}}}\left[ {{u_{\mathrm{d}}} - \omega .{L_{\mathrm{g}}}.{i_{\mathrm{q}}} + {V_{{\mathrm{grid,d}}}}} \right] \end{aligned}$$
(46)
$$\begin{aligned}&{m_{\mathrm{q}}} = \frac{2}{{{V_{{\mathrm{DC - link}}}}}}\left[ {{u_{\mathrm{q}}} + \omega .{L_{\mathrm{g}}}.{i_{\mathrm{d}}} + {V_{{\mathrm{grid,q}}}}} \right] \end{aligned}$$
(47)

Where,

$$\begin{aligned}&{u_{\mathrm{d}}} = \left( {{k_{\mathrm{p2}}} + \frac{{{k_{\mathrm{i2}}}}}{{\mathrm{s}}}} \right) .\left( {i_{\mathrm{d}}^* - {i_{\mathrm{d}}}} \right) \end{aligned}$$
(48)
$$\begin{aligned}&{u_{\mathrm{q}}} = \left( {{k_{\mathrm{p3}}} + \frac{{{k_{\mathrm{i3}}}}}{{\mathrm{s}}}} \right) .\left( {i_{\mathrm{q}}^* - {i_{\mathrm{q}}}} \right) \end{aligned}$$
(49)
Fig. 11
figure 11

Closed loop current control architecture for a grid connected neutral point clamped AC–DC converter

The open loop gain \(G_{OC}\) of transfer function with \(i_{d}^{*}\) (reference d axis current) as input and \(i_{d}\)(actual d axis current) can be obtained from the Fig. 11.

$$\begin{aligned} {G_{{\mathrm{OC}}}} = {C_{\mathrm{C}}}.{G_{{\mathrm{AC}}}} = \frac{{\left( {{\mathrm{s}}.{k_{\mathrm{p}}} + {k_{\mathrm{i}}}} \right) }}{{{\mathrm{s}}\left( {{\mathrm{s}}{\mathrm{.}}{L_{\mathrm{g}}} + {R_{\mathrm{g}}}} \right) }} \end{aligned}$$
(50)

Controller parameters \(k_{p}\) and \(k_{i}\) are designed such that the closed loop transfer function should be a first order system with desired closed loop time constant \(\tau _{CL}\). In case of a grid connected system, \(\tau _{CL}\) is chosen such that it provides a fast transient response i.e. it should be adequately small but controller bandwidth should not exceed (1/10\()^{th}\) of the switching frequency. Hence the desired closed response can be expressed as:-

$$\begin{aligned} {G_{{\mathrm{CL}}}} = \frac{{{C_{\mathrm{C}}}.{G_{{\mathrm{AC}}}}}}{{1 + {C_{\mathrm{C}}}.{G_{{\mathrm{AC}}}}}} = \frac{1}{{{\mathrm{s}}.{\tau _{{\mathrm{CL}}}} + 1}} \end{aligned}$$
(51)

7.3 Grid Current Control Architecture in \(\alpha \beta \) Frame

The current controller design using PI controllers in dq frame was based on improving the transient response so as to achieve the desired closed loop time constant. Total harmonic distortion is a measure of the power quality in grid current or voltage profile. THD quantifies the amount of harmonics present in the grid current/voltage based on its magnitude at different harmonic frequencies. Control architecture design using transient analysis does not take into account frequencies which might have a distortion effect on the injected grid current profile. Hence, an alternate current controller design approach is proposed based on frequency response analysis. It includes bode plot- magnitude and frequency loop shaping in order to improve the controller response based on specified design requirements. In other words, magnitude and frequencies at critical frequencies are compensated using a higher order current controller to achieve better grid current power quality. In our work, the higher order current controller is designed in \(\alpha \beta \) frame.

The control architecture for \(\alpha \beta \) frame is same as that of dq frame. The difference lies in the design approach. In dq frame, the three phase AC grid currents (\(i_\mathrm{abc}\)) are transformed into two equivalent DC quantities (\(i_\mathrm{d}\),\(i_\mathrm{q}\)). The control approach is adopted only to reduce steady state current values of \(i_\mathrm{d}\) and \(i_\mathrm{q}\). However, the three phase AC grid currents (\(i_\mathrm{abc}\)) in \(\alpha \beta \) frame are transformed into two equivalent alternating quantities (\(i_\mathrm{\alpha }\) \(i_\mathrm{\beta }\)). A control strategy that involves reduction of steady state error in both magnitude and frequency domain needs to be employed. Hence, bode loop shaping is employed to compensate for magnitude and phase at desired frequencies by including poles and zeros accordingly.

The block diagram for current control architecture in \(\alpha \beta \) frame is same as that of dq frame as shown in Fig. 11. Using equation (43) and applying three phase to two phase transformation, the modulating signals \(m_\mathrm{\alpha }\) and \(m_\mathrm{\beta }\) are :-

$$\begin{aligned}&{m_{{\alpha }}} = \frac{2}{{{V_{{\mathrm{DC - link}}}}}}\left[ {{u_{{\alpha }}} - \omega .{L_{\mathrm{g}}}.{i_{{\beta }}} + {V_{{\mathrm{grid},\alpha }}}} \right] \end{aligned}$$
(52)
$$\begin{aligned}&{m_{{\beta }}} = \frac{2}{{{V_{{\mathrm{DC - link}}}}}}\left[ {{u_{{\beta }}} + \omega .{L_{\mathrm{g}}}.{i_{{\alpha }}} + {V_{{\mathrm{grid,}\beta }}}} \right] \end{aligned}$$
(53)

Where,

$$\begin{aligned}&{u_{{\alpha }}} = {C_{{\alpha }}}(s).\left( {i_{{\alpha }}^* - {i_{{\alpha }}}} \right) \end{aligned}$$
(54)
$$\begin{aligned}&{u_{{\beta }}} = {C_{{\beta }}}(s).\left( {i_{{\beta }}^* - {i_{{\beta }}}} \right) \end{aligned}$$
(55)

The open loop gain \(G_\mathrm{oc}\) of the compensated closed loop current control scheme can be written as:-

$$\begin{aligned} {G_{{\mathrm{OC}}}} = C(s).\left( {\frac{1}{{s{L_{\mathrm{g}}} + R{}_{\mathrm{g}}}}} \right) \end{aligned}$$
(56)

To achieve high gain at system operating frequency (\(\omega _\mathrm{0}\)) i.e. 50 Hz, a complex conjugate pair is included at 314 rad/sec. This ensures zero steady error in both magnitude and phase domain at the desired nominal frequency. Figure 12 shows a magnitude-frequency response of open loop gain \(G_\mathrm{oc}\) including compensator \(C_\mathrm{1}(s)\) defined by:-

Fig. 12
figure 12

Bode plot showing magnitude and frequency response of compensated open loop gain \(G_{oc}\)

$$\begin{aligned} C(s) = {C_1}(s) \cdot K(s) \end{aligned}$$
(57)

Where,

$$\begin{aligned} {C_1}(s) = \frac{{(s + 8.33)}}{{(s + 98596)}}{\mathrm{}},\quad {\mathrm{}}K(s) = 1 \end{aligned}$$
(58)

Dotted blue curve in Fig. 12 suggests that for frequencies greater than 314 rad/sec the phase is around \(-180\). This corresponds to a marginally stable system or an unstable system against system variations. Phase margin at the desired critical frequency decides the stability of the system. In our work, critical frequency is chosen according to the bandwidth of the controller such that \(\omega _\mathrm{c}\) \(\omega _\mathrm{b}\) < 2 \(\omega _\mathrm{c}\). Accordingly, for a chosen controller bandwidth of 2700 rad/sec ( 9 times the operating frequency), the desired critical frequency or gain crossover frequency should be 1800 (\(w_\mathrm{b}\)/1.5). Including a lead filter ensures adequate phase margin at the critical frequency. A gain is multiplied which guarantees 0 dB magnitude crossing at the critical frequency. The current controller C(s) defined in (57) can be modified to improve the stability of the system by ensuring adequate gain and phase margin. The modified controller C(s) can be written as

$$\begin{aligned} C(s)= & {} {C_1}(s) \cdot {C_2}(s) \cdot K(s) \end{aligned}$$
(59)
$$\begin{aligned} {C_2}(s)= & {} 5688 \cdot \frac{{(s + 745)}}{{(s + 4346)}},K(s) = 1 \end{aligned}$$
(60)

Black dashed curve in Fig. 12 represents the frequency response of modified \(G_\mathrm{OC}\) including \(C_\mathrm{2}(s)\). It can be observed that at the gain cross over frequency (1800 rad/sec) the magnitude plot crosses 0 Db gain and the phase is -135. This corresponds to a phase margin of 45 ensuring a stable system. It can also be observed that all the frequencies less than \(\omega _0\)=314 rad/sec have equal magnitude. This could results in propagation of high frequency noise through the controller. To avoid this, a significant gain must be added to the low frequency region (particularly close to 0).

Finally, a lag compensator is employed to improve the gain in lower frequency range. Hence the controller defined in equation (59) can be finally modified to enhance the steady state accuracy of the current controller. The final current controller C(s) can be written as

$$\begin{aligned} C(s) = {C_1}(s) \cdot {C_2}(s) \cdot {C_3}(s) \end{aligned}$$
(61)

where,

$$\begin{aligned} {C_3}(s) = \frac{{(s + 2.5)}}{{(s + 0.005)}} \end{aligned}$$
(62)

The red curve in Fig. 12 shows the compensated frequency response of the closed loop current controller in \(\alpha \beta \) frame. It can be seen the system is stable as it has sufficient phase margin and \(\infty \) gain margin. It can also be observed from the magnitude corresponding to the switching frequency harmonics lies on \(-40\) dB/decade slope. Dominant switching harmonic contents are reduced which results in better grid current power quality.

8 Results and Discussion

The hybrid AC–DC solar photovoltaic based microgrid with dual energy storage option shown in Fig. 1 is implemented in MATLAB Simulink environment to show the effectiveness of:-

  • PV side control (MPPT)

  • Grid side converter control

  • Energy management controller

  • DC link Regulation

Fig. 13
figure 13

Overall control architecture of converter based AC–DC microgrid

Table 2 System Parameters for operation and control solar photovoltaic based microgrid including energy storage
Table 3 Paramters of PV side, grid side, energy storage side and DC voltage controllers

The overall control structure of the hybrid AC–DC microgrid consisting of PV strings, battery bank, supercapacitor module and three phase grid is presented in the Fig. 13. DC loads are considered as constant power loads connected to the 1 kV DC link while the three phase 480 V, 50 Hz distribution level power grid is considered as the three phase load connected through a voltage source inverter. The grid side controller is designed such that both active and reactive power can be supplied to the power grid. The PV system consisting of two distributed PV strings is operated at same irradiance. The system parameters are listed in Table 2. In our research, overall control structure is divided into three segments. Primary control deals with maximum power extraction from PV string for proper utilization of solar power. Efficient power point tracking is achieved through joint action of MPPT and PID controller. Secondary control deals with reference current generation for battery bank, supercapacitor module and local distribution grid. Effective power management, optimal resource allocation and system stability is ensured through model predictive based energy management controller, PI based DC link voltage controller and high pass filtering scheme. Tertiary control deals with reference current tracking using PI based current controllers for battery bank, supercapacitor and grid converter. The values of parameters for each controller is listed in Table 3 The performance and the transient response of the proposed hybrid AC–DC microgrid under different loading scenario and varying solar radiation profile.

Fig. 14
figure 14

a Voltage generated by the PV strings using MPPT b Total power through the solar PV system including PV strings ‘A’ and ‘B’; c Power through the battery bank; d Power through the supercapacitor modules; e Apparent (Green), Active (Blue) and Reactive power (Brown) required by the grid; f DC-link voltage profile

Fig. 15
figure 15

Instantaneous 3-\(\phi \) grid voltage and current waveform during start-up

At time t=0, the microgrid is switched ON. A DC load of 400 kW is initially connected to the medium voltage DC link. The two PV strings are operated at 500 W/\(m^2\) irradiance level while the state of charge of the battery is initially assumed to be \(45\%\) of the rated battery capacity. The microgrid is assumed to be in islanded mode initially as the switching action is blocked for the grid side converter. It can be seen from the Fig. 14a that the MPPT controller quickly responds to the operating environmental conditions and within few milliseconds maximum power is extracted from the two PV strings. Due to the energy management control design, the excess power is initially absorbed by the supercapacitor. To maintain DC link voltage at 1 kV, battery bank absorbs the power until loading condition is changed. It can be observed from Fig. 14f that the duration of start-up transient is significantly less and the sudden spike generated on the DC link voltage profile is well within the allowable range of \(\pm 5\%\). Proper current sharing is maintained between battery bank and supercapacitor modules.

At time \(t_1\)=0.5 sec, the three phase 480 V,50 Hz local power grid is connected to the microgrid system through a NPC DC–AC converter demanding 300 kW power at unity power factor. Figure 14 shows the instantaneous variations in power from the PV strings, power through the battery bank, power through supercapacitor , active and reactive power by the grid. During the time interval between \(t_1\)=0.5 and \(t_2\)=1 sec, battery discharges itself to maintain the power balance at the DC link while supercapacitor absorbs the sudden transients until battery reaches the steady state condition. It can be observed that the energy management controller effectively helps in suppressing the transients on the DC link capacitor through the proposed power sharing scheme. Instantaneous waveforms of three phase voltage and current at PCC is shown in Fig. 15. It can be observed that current waveform using dq frame controller shows more distortion than the \(\alpha \) \(\beta \) frame controller.

At time \(t_2\)=1 sec, PV strings are subjected to sudden increase in solar irradiance from 500 W/\(m^2\) to 600 W/\(m^2\). The MPPT controller instantaneously adapts to the sudden variation in environmental conditions to generate the voltage reference for the closed loop control system such that maximum power is extracted from the two PV strings. Figure 14 shows the power profile of PV strings, energy storage elements, active and reactive power through NPC and voltage profile at the DC link. It can be observed that there is an increase in power through the PV strings. Thus, the energy management controller controls the action of the dual energy storage system. At \(t_2\)=1 sec, supercapacitor comes into play to absorb the high frequency transient experienced by the DC link due to sudden change in PV output. The discharged power through supercapacitor is eventually taken up by the batteries due to power sharing mechanism. Consequently, battery bank discharges itself to reach to a new steady state value. Power demand by the grid and the DC load remains unchanged.

Fig. 16
figure 16

Instantaneous 3-\(\phi \) grid voltage and current waveform when both active and reactive power is demanded

Between the time interval \(t_3\)=2 sec and \(t_4\)=3 sec, the solar irradiance linearly rises to 800 W/\(m^2\). MPPT controller effectively manages the power flow through the PV strings as seen in Fig. 14. Co-ordinated control of supercapacitor and battery suppresses the fluctuations experienced by the DC link capacitor. At time \(t_5\)=3.5 sec, a DC load of 200 kW is connected to the DC link while other parameters remains unchanged. High power transients are limited by the fast action of supercapacitor system. Energy management is effective in maintaining the power balance at the DC side. Between the time interval \(t_6\)=4.3 sec and \(t_9\)=6 sec, the irradiance level is decreasing linearly from 800 W/\(m^2\) while the DC load demand remains unchanged. At time \(t_7\)=4.5 sec, the grid active power requirement is decreased to 50 kW. Grid side controller effectively controls the action of NPC converter to direct active power and reactive power to the main grid at PCC. Fig. 14 shows instantaneous variation of power through the microgrid components and voltage at the DC link. Instantaneous waveforms of three phase voltage and current at PCC is shown in Fig. 16. The distortion in the grid current waveform is significantly reduced using \(\alpha \) \(\beta \) frame controller. The total harmonic distortion achieved using dq frame controller is obtained as 2.32\(\%\) while for \(\alpha \) \(\beta \) frame controller it is reduced to 1.65 \(\%\). It can be observed from Fig. 17 that controller realized in \(\alpha \) \(\beta \) frame compensates for the switching frequency harmonics better than the dq frame based current controller. Moreover, short duration transient is experienced by the DC link which is eventually suppressed due to supercapacitor momentary action. As time increases, battery bank comes into play and discharges itself to manage the mismatch between generation and demand. At time \(t_8\)=5.5 sec, grid requires both active and reactive power. Co-ordinated control action effectively manages the power balance in the system as shown in Fig. 14. Supercapacitor takes care of the momentary fluctuations in the DC link voltage while the battery bank manages the steady state flow further.

Fig. 17
figure 17

Harmonic contents in grid current waveform using dq reference frame and \(\alpha \) \(\beta \) reference frame controller

Fig. 18
figure 18

a Instantaneous variation of individual battery voltage; b Instantaneous variation of individual battery state of charge

Figure 18 shows individual battery voltage and state of charge. It can be observed that the terminal voltage of the battery always lies in the allowable range between 45 V and 55 V. This corresponds to favourable operating condition for battery’s health/lifetime. Additionally, the proposed power sharing scheme helps in enhancing the battery lifespan as the battery charging/discharging current is limited under sudden power fluctuations which can be observed from individual battery’s SOC profile shown in Fig. 18. A smooth time-series transition is observed in battery state of charge profile under charging and discharging cycles. The transients developing on the DC link capacitor are subsequently absorbed by the supercapacitor modules. Overall, the performance of the hybrid AC–DC microgrid with dual energy storage is compared with the existing control technique. Table 4 shows the comparison based on DC link deviation and total harmonic distortion.

A real time validation of the proposed energy management control is performed on OPAL-RT platform as shown in Fig. 19. OP4510 simulator is used to demonstrate the performance of energy management controller in real time loading conditions. OP4510 has 96 digital and analog I/O channels. The processors allows a maximum allowable sampling time of \(10\mu s\). Workstation enabled with RT-Lab interface MATLAB and OP4510 to generate the system response in real time. System response is obtained on digital signal oscilloscope through analog output channels. The effectiveness of the energy management controller is investigated in a converter based AC–DC microgrid consisting of solar PV, batteries and supercapacitors. At t = \(T_1\) sec, solar irradiance is changed from 600 kW/m\({^2}\) to 1000 kW/m\({^2}\). This sudden change is sensed by the controllers to activate the supercapacitors for the suppression of DC link voltage as shown in Fig. 20. At t= \(T_2\) sec, there is a step increase in the grid active power requirement as shown in Fig. 21. The phase ’A’ grid voltage and current is also shown. Supercapacitors momentarily supplies the load power before the battery discharges itself to reach a new steady state value. The DC link voltage is maintained constant at 1 kV. At t= \(T_3\) sec, DC link experiences step increase in DC load as shown in Fig. 20. Impact of increased DC load on DC link is mitigated by the co-ordinated management of batteries and supercapacitors.

Table 4 Comparison of DC link voltage deviation and total harmonic distortion
Fig. 19
figure 19

Real time validation of energy management control in a AC–DC hybrid microgrid using MATLAB and OPAL-RT interface

Fig. 20
figure 20

Real time results showing DC link voltage profile, power through PV strings, batteries and supercapacitors

Fig. 21
figure 21

Real time results showing DC link voltage profile, apparent power through the grid, phase ‘A’ grid voltage and current

9 Conclusions

The performance of the solar photovoltaic based hybrid AC–DC microgrid with dual energy storage system can be justified from the transient behaviour of the system under different loading and meteorological conditions considered in the results section. Additionally, real time validation of the multi agent AC–DC microgrid is also performed through OPAL RT and MATLAB interface. The role of efficient power conversion is vital in stable operation of the microgrid involving number of power sources. The closed loop control of power electronics converter improves the transient response of the microgrid. The PV side control including MPPT and a PID controller is observed to be efficient and robust under varying solar radiation profile. The Energy management controller is efficient and responsive in controlling the action of battery bank and supercapacitor modules using proposed power sharing scheme. Additionally, effective DC voltage regulation is achieved using synchronized action of energy management and proportional-integral based DC link voltage controller. It can be seen from the DC link voltage profile that the maximum ripple obtained in DC link voltage is well within the allowable limit of \(\pm 5\%\). Grid side controller acts as a real and reactive power controller and controls the action of three phase neutral point clamped DC–AC converter to transmit both active and reactive power to the main grid. Higher order grid current controller ensures a better power quality and reduction in higher order harmonics. The performance of the hybrid AC–DC solar powered microgrid with dual energy storage is investigated under different real time loading conditions. The performance assessment of converter based microgrid with effective maximum power point tracking, efficient DC voltage regulation and reliable power sharing makes it suitable for solar and battery based distributed generation system. The results shows that proposed energy management:-

  • Efficient regulation of DC link voltage.

  • Enhancement in transient and dynamic response of the energy storage system

  • Proper power sharing among hybrid power sources.

  • Reduction in THD and improvement in grid power quality