Introduction

Maintaining uniform active power flowing in a control area is one of the main objective of the daily management of the power system. This balance must be maintained even when the active power demand variation occurs. The control problem becomes more complex when considering an interconnected smart grid system. The call of additional active power in any one of them is met by the increasing the active power generated of all connected areas and frequency variation occurs as consequence of this new situation. Keeping the system frequency approximately at normal value, maintaining the power flow in tie-line at planned value and the ability of each area to absorb its own load variation are the main qualities of a good control strategy. The sensitivity against frequency and load changes determine the robustness of the controller. Two approaches are widely used in control strategies: state variables and transfer function models. Most of the paper found in the literature addressing LFC solution using MPC algorithm are based on the Simulink model of MPC or transfer functions models. Table 1 presents some of them.

Table 1 MPC based LFC solutions

Most of the control strategies are based on the conventional controllers as the proportional integral and derivative (PI and PID). Which are easier to apply but most of the time give large settling time. The research carried out nowadays were initially based on artificial intelligent systems mainly on neural networks and fuzzy logic [14,15,16,17,18]. These techniques are based on the human expertise knowledge of their behaviour only and do not require any identification or system model. This is their main advantage over the others methods. The actual tendency in control strategies is the combination of the artificial intelligence algorithms with the conventional controller to solve the frequency or active power flow control issue in microgrids [19,20,21,22,23,24]. These algorithms have attracted attention in load frequency controller design and showed their effectiveness for the design problems, but two difficulties must be taken into account. The first one is the convergence when dealing with refined search space, and the second one is the feasible trap in local minima solution due to the weakness of the local searching space ability [25, 26].

The algorithm named Model Predictive Control (MPC) belongs to a category of artificial intelligence algorithms that compute in a sequential manner using adjustments of manipulated variables to optimise and predict the future behaviour of the system. MPC is considered as one of the advanced control technique in control area [2, 27]. Its theoretical development over years can be seen by the amount of research available in the literature. As regards to the solution of load control frequency problem in power network some researches can be cited as references. Considering the imbalance uncertainty in the power system a predictive load frequency control model was presented in [2]. The presented model was based on the simplified system model that was updated using the Kalman algorithm for estimation of state and parameter considering the tie-line flow limit. The second model incorporating tie-line power flow limit, the capacity of generation units, and their change rate was proposed in [10]. According to this research, considering certain problems of LFC the MPC is a more realistic solution to the issues that power systems are dealing with nowadays. A model predictive load frequency control was presented in [11]. The proposed simplified MPC model took into account the existing network configuration and the power flow limitation in the tie-lines. Kassem [28] has proposed a model predictive controller based on neural network of a two microgrids LFC for improving the power grid dynamic performance. The effectiveness of the presented approach was demonstrated over a LFC using a fuzzy logic controller. Table 1 summarises some predictive controllers model based LFC solutions.

Khalid and Savkin [29] have proposed LFC based MPC for an optimal control of wind battery energy storage system (BESS). A model based on the prediction of frequency using Grey theory was also designed to optimise the performance of the basic predictive controller. LFC of multi-interconnected area power system using distributed model predictive was proposed in [29]. Analyses of results from three interconnected power system network have shown some improvements robustness and computational burden was show in the performance of closed-loop. Mohamed et al. [3] have presented a decentralised MPC based LFC in an interconnected power system. The results have shown that considering the proposed predictive method the overall performance of the closed loop technique has demonstrated robustness in load disturbances condition.

An economic aspect included in MPC to solve the LFC in one control area that was presented in [5]. The authors have proposed an operation cost reduction approach considering an order of magnitude similar based on the difference ratio of two set points MPC and PI controller. Sokoler et al. [30] have proposed an application of economic MPC for LFC considering a single area power system. The optimal operation control problem directly includes all the operation costs into its objectives function. Decentralised MPC based LFC in a tough situation for deregulated power systems was proposed in [6]. The effectiveness of the proposed model has been shown using different scenarios on interconnected power system model. Ersdal et al. [7] have proposed a MPC for power grid LFC when considering the imbalance uncertainty. Based on the simulations performed on the power system with a high number of wind generation integrated, it was shown that in certain cases in which the state of the art LFC applying PI controller and normal MPC have failed by violating the constraints of the system whislt the robust MPC fulfil all these constraints.

Distributed MPC strategies including application to LFC in electrical network was proposed in [1]. The distributed approach framework realises the performance similar to centralised MPC. Power system MPC-LFC was presented in [8]. The authors have modelled the limit of governor valve using fuzzy logic method and the local model predictive controllers were included into a nonlinear control system strategy. Distributed LFC based MPC of multi-area power grid after deregulation was introduced in [31]. Considering the frequency control problem as a dynamic control problem this model was designed based on the distributed model predictive considering external disturbances and the limit of active power generation constraints. Shiroei et al. [12] have proposed a robust predictive control model based LFC taking into account the generation limit constraints. The authors took into account the uncertainty and parameter variations and the proposed model was robust. MPC based LFC design concerning wind turbines was introduced in [9, 13, 32]. The proposed model introduced the fast response of frequency of a connected area power system taking into account wind turbines generation. Zhang et al. [4] have proposed a MPC for a reliable LFC with wind turbines. The algorithm used has reduced the impact of the randomness and intermittence of wind turbines effectively.

This research proposes a mathematical model of active power control based on MPC algorithm. Two microgrids interconnected via two ac tie-lines are considered and the simulation results were compared with those obtained using the open control loop or applying the optimal control. The rest of this research paper is structured as follows: In “Microgrids Presentation” the configuration of the studied system is explained. Energy model system, overall structure of the microgrids are detailed in “Energy System Model”. “Energy System Control Model” introduces the open loop and close loop modelling. “Results and Discussions” presents the system data, simulations results and discussions. The conclusion of the research is summarised in “Conclusions”.

Microgrids Presentation

The studied system is composed of two microgrids, connected through two ac tie-lines, as shown in the Fig. 1. Each microgrid feeds its consumers and the tie-lines allow the power transfers between the connected microgrids. Power flow variations in the-lines give information about the local load. Each microgrid can be represented by an equivalent large turbine, energy storage system, photo-voltaic system and wind system.

Fig. 1
figure 1

Power system model

Electrically coupled together, each microgrid has an equal number of generators and constitutes a coherent group (all power sources respond directly together to any load variations). This configuration is called a control area within which the frequency is assumed to be the same regardless of the state that the network can go through (static or dynamic states). Since a tie-line transmits power within or outside a control area (microgrid), this fact must be accounted in the additional power balance equations for each control area.

Energy System Model

Overall Structure of the Microgrids

From Fig. 1, it can be seen two interconnected microgrids. The main source of microgrid 1 is conventional hydro power plant (synchronous generator 1 or SG 1, denoted by P1(k)) and microgrid 2 has a conventional thermal power plant as a main source (synchronous generator 2 or SG 2 denoted by P8(k)). Each microgrid is embedded with a wind farm (P2(k) and P9(k)), PV (P3(k) and P10(k)), Battery Energy Storage System 1 (BESS 1) (denoted by P4(k) discharging mode and P5(k) charging mode), BESS 2 (denoted by P11(k) discharging mode and P12(k) charging mode) and system load (PL1(k) and PL2(k)). Two ac ties-lines are used to interconnect the two microgrids (tie-line 1 denoted by P6(k) and P7(k) for tie-line 2). The active powers from wind farm, PV and the active load demand considered as inputs data are given and used under profile form.

Wind Farm and PV Array

The data used in this study are taken under profile form for wind farm 1 and 2 and PV 1 and 2, for one day or 24 hours. The profile was generated based data used for wind farm and PV in the literature [33,34,35,36,37]. Wind farm, PV, BESS and SG powers can be write as following:

  • For the first microgrid:

    $$ P_{1} (k)+P_{2} (k)+P_{3} (k)+P_{4} (k)-P_{5} (k)-P_{L1} (k)\ge 0 $$
    (1)
  • For the second microgrid:

    $$ P_{8} (k)+P_{9} (k)+P_{10} (k)+P_{11} (k)-P_{12} (k)-P_{L2} (k)\ge 0 $$
    (2)

All these powers are subject to the following constraints (3):

$$ 0\le P_{i} (k)\le P_{i}^{\max } $$
(3)

where \(P_{i}^{\max } \) is the maximum active power from each source.

Storage System Bank

The dynamics of the battery, charging and discharging gives its state of charge. The general equation giving the dynamics of the battery is given as follows (4), (for BESS 1):

$$ Soc(k + 1)=Soc(k)+\eta_{c} P_{4} (k)-\eta_{d} P_{5} (k) $$
(4)

where Soc(k) expressed the state of charge considering a sampling time k, P4(k) and P5(k) express the charging and the discharging mode of the BESS 1 respectively; ηc and ηd represent the charging and discharging efficiency, both are uncertain parameters and will be estimated for this research work.

Equation 4 can be rewritten as followings for BESS 1 (charging and discharging mode):

$$ \left\{\begin{array}{l} soc(0)-\eta_{c} \sum\limits_{i = 1}^{j} {(P_{4} (k)-P_{5} (k))} \le soc^{\max }\Rightarrow -\eta_{c} \sum\limits_{i = 1}^{j} {(P_{4} (k)-P_{5} (k))\le soc^{\max }-soc(0)} \\ soc^{\min }\le soc(0)-\eta_{d} \sum\limits_{i = 1}^{j} {(P_{4} (k)-P_{5} (k))\Rightarrow +\eta_{d} \sum\limits_{i = 1}^{j} {(P_{4} (k)-P_{5} (k))\le soc^{\min }-soc(0)} } \end{array}\right. $$
(5)

Considering the second storage energy system (BESS 2) the Eq. 4 can be rewritten as follows:

$$ Soc(k + 1)=Soc(k)+\eta_{c} P_{11} (k)-\eta_{d} P_{12} (k) $$
(6)

Using Eq. 6, the mathematical development for BESS 2 gives Eq. 7 for charging and discharging mode.

$$ \left\{\begin{array}{l} {soc(0)-\eta_{c} \sum\limits_{i = 1}^{j} {(P_{11} (k)-P_{12} (k))} \le soc^{\max }\Rightarrow -\eta_{c} \sum\limits_{i = 1}^{j} {(P_{11} (k)-P_{12} (k))\le soc^{\max }-soc(0)} } \\ {soc^{\min }\le soc(0)-\eta_{d} \sum\limits_{i = 1}^{j} {(P_{11} (k)-P_{12} (k))\Rightarrow +\eta_{d} \sum\limits_{i = 1}^{j} {(P_{11} (k)-P_{12} (k))\le soc^{\min }-soc(0)} } } \end{array} \right. $$
(7)

Equation 8 gives the limit or constraints of SOC of the storage system bank:

$$ B_{S}^{\min } \le Soc(k)\le B_{S}^{\max } $$
(8)

where \(B_{S}^{\min } \) and \(B_{S}^{\max } \) are the upper and lower limits of the storage system bank for BESS 1 and BESS 2.

Energy System Control Model

Open Loop Modelling

Active power from wind, PV arrays and storage system (BESS 1 and BESS 2) are modelled as the variable power sources and controlled during 24 hours which is taken as control horizon. Power transfer between the two interconnected microgrids via the two ac tie-lines are optimised and kept within the tolerable limits to ensure the balance of the interconnected system as well as to decrease the stress in the operation in the presence of unbalance conditions. The multi-objective is to keep the active power flowing between the two microgrids as minimal as possible and to maximise the renewable energy production to ensure the active power spinning reserve and increase the reliability of the system. The first objective function is given by the Eq. 9 as follows:

$$ \min {\Delta} t\sum\limits_{k = 1}^{N} {(P_{6} (k)+P_{7} (k))+Bf.{\Delta} f} $$
(9)

The second objective is formulated as the maximisation of the production of renewable energy and expressed as follows:

$$ -\min \sum\limits_{k = 1}^{N} {(P_{2} (k)+P_{3} (k)+P_{9} (k)+P_{10} (k))} $$
(10)

The combinations of the two objective functions give the multi-objective function to be optimised given by the following expression:

$$\begin{array}{@{}rcl@{}} \min {\Delta} t\sum\limits_{k = 1}^{N} (P_{6} (k)&+&P_{7} (k))+Bf.{\Delta} f-\max\sum\limits_{k = 1}^{N} (P_{2} (k)\\ &+&P_{3} (k)+P_{9} (k)+P_{10} (k)) \end{array} $$
(11)

All the constraints used for this optimal control problem are given in following expressions:

  1. a)

    Constraints given in Eqs. 12 and 13 imply that the total active power of each area is equal to the active powers from the main generator, wind system, PV arrays and the battery energy system; and this total power is found applying the Kirchhoff’s current law in the main bus of each area (Eq. 12 for area 1, Eq. 13 for area 2).

    $$ P_{1} (k)+P_{2} (k)+P_{3} (k)+P_{4} (k)-P_{5} (k)=P_{L1} (k) $$
    (12)
    $$ P_{8} (k)+P_{9} (k)+P_{10} (k)+P_{11} (k)-P_{12} (k)=P_{L2} (k) $$
    (13)
  2. b)

    Constraints given in Eqs. 1 and 2 ensure that the active power delivered by the grid, wind, PV, and BESS for each area is equal to the local load and the load will be supplied anytime and in any conditions.

  3. c)

    Constraints formulated in expression (14) ensure that the active power delivered by the PV arrays, wind system and BESS directly to the local of each area is greater than zero.

    $$\begin{array}{@{}rcl@{}} P_{1} &\ge& 0;P_{2} \ge 0;P_{3} \ge 0;P_{4} \ge 0;P_{5} \ge 0;P_{8} \ge 0;\\ P_{9} &\ge& 0;P_{10} \ge 0;P_{11} \ge 0;P_{12} \ge 0 \end{array} $$
    (14)
  4. d)

    Constraints given in expression (15) ensure that each energy sourcei is constrained by two limits: a maximum and a minimum.

    $$ P_{i}^{\min } \le P_{i} (k)\le P_{i}^{\max } $$
    (15)
  5. e)

    Equations 16 and 17 ensure that battery energy storage system charge will not be less than the minimum value or higher than its maximum value

    $$\begin{array}{@{}rcl@{}} soc^{\min }&\le& soc(0)+{\Delta} t.c_{p} \sum\limits_{i = 1}^{k} P_{4} (k)\\ &&-{\Delta} t.\frac{1}{c_{t} }\sum\limits_{i = 1}^{k} {P_{5} (k)\le soc^{\max }} \end{array} $$
    (16)
    $$\begin{array}{@{}rcl@{}} soc^{\min }&\le& soc(0)+{\Delta} t.c_{p} \sum\limits_{i = 1}^{k} P_{11} (k)\\ &&-{\Delta} t.\frac{1}{c_{t} }\sum\limits_{i = 1}^{k} {P_{12} (k)\le soc^{\max }} \end{array} $$
    (17)

For all instances of k = 1,....N is the sampling time.

Model Predictive Control (MPC) Configuration (Close Loop)

MPC is defined as the close loop control of the process or plant which aims to predict the output. As a close loop control process, the MPC computes by iteration process the optimisation calculus after resampling the state of the plant during the control horizon. The process is computed each time there is a flow of energy from the main source to the grid and as well the flow of the energy from the storage system to the load for each area. The control system can be evaluated and the process can proceed to the next iteration based on the updated information so that the unforeseen situation can be addressed. This process is performed for each sampling time. The resampling process assists the system to become more stable when experiencing disturbances. In this research, with the dependency of the wind or PV or weather conditions, the closed-loop system provides the stability of the energy flow into the system. The structure of basic control loop of the MPC is presented in Fig. 2.

Fig. 2
figure 2

MPC control loop

The control optimal based MPC is determined in the same manner as the open control loop presented in Eq. 12. The system is modelled using the fully constrained model predictive control, satisfying the demand at any sample of time, maximising the use of renewable energy, and ensuring the robustness of the system against all disturbances due to load demand variation and renewable energy resources. The studied system has 6 inputs (3 inputs for each area), 2 outputs (one for each area). The multi-objective function is found as follows:

$$\begin{array}{@{}rcl@{}} &&\min {\Delta} t\sum\limits_{i = 1+m}^{k+m} (P_{6} (k)+P_{7} (k))+Bf\times {\Delta} f\\ &&-\min \sum\limits_{i = 1+m}^{k+m} (P_{2} (k)+P_{3} (k)+P_{9} (k)+P_{10} (k)) \end{array} $$
(18)

where m = 1,......M, M represents the last iteration of the control horizon. The objective function represented in Eq. 11 is solved using Eq. 18. From the first sampling time the sampling interval (k + 1) of the state of the plant is re-sampled when the process of the optimisation is repeated for new control horizon [38]. All the constraints applied from the open loop configurations (12) to (17) are also applied from the closed loop control, the only difference is that the application of the constraints at this level are applied to each sampling interval.

The designed controller based on the MPC is described as follows: the energy flow from the all sources defined as u(k) are taken as control input:

$$\begin{array}{@{}rcl@{}} u(k)&=&[P_{1} (k),P_{2} (k),P_{3} (k),P_{4} (k),P_{5} (k),P_{8} (k),P_{9} (k),\\ &&\ P_{10} (k),P_{11} (k),P_{12} (k)] \end{array} $$
(19)

The output is defined by PL1(k) + PL2(k) linked to the system frequency variation expressed by (Δω1ω2) and powers from renewable energy sources as inputs introduce disturbances in the process. The system must be able to keep the power transfer between the two microgrids as minimal as possible (P6(k) + P7(k) ≈ 0) and to maximise the production of the renewable energy sources.

System Modelling

Simulation model for all linear MPC is described by discrete linear system (Eq. 20 or state space) considering the fact that in most application of MPC the feed-forward matrix (matrix D) is null:

$$ \left\{ \begin{array}{c} {x(k + 1)=Ax(k)+Bu(k)} \\ {y(k)=Cx(k)} \end{array} \right. $$
(20)

where: A the system matrix (n × n); B the control matrix (m × n); C the output matrix (n × p); x(k) the state matrix; u(k) the input matrix and y(t) the output matrix.

Where:

$$ A=\left[ \begin{array}{cccc} {(1-\sigma )} & 0 & 0 & 0 \\ 0 & {(1-\sigma )} & 0 & 0 \\ 0 & 0 & 0 & 0 \\ 0 & 0 & 0 & 0 \end{array} \right] $$
(21)
$$ B=\left[ \begin{array}{cccccccccccc} 0 & 0 & 0 & {\eta_{c} }&{-\frac{1}{\eta_{d} }} & 0 & 0 & 0 & 0 & 0 & 0 & 0 \\ 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & {\eta_{c} }&{-\frac{1}{\eta_{d} }} \\ {\frac{1}{k_{S1} }} & {\frac{1}{k_{S1} }} & {\frac{1}{k_{S1} }} & {\frac{1}{k_{S1} }} & {-\frac{1}{k_{S1} }} & {-\frac{1}{k_{S1} }} & 0 & 0 & 0 & 0 & 0 & 0 \\ 0 & 0 & 0 & 0 & 0 & 0 & {\frac{1}{k_{S2} }} & {\frac{1}{k_{S2} }} & {\frac{1}{k_{S2} }} & {\frac{1}{k_{S2} }} & {-\frac{1}{k_{S2} }} & {-\frac{1}{k_{S2} }} \end{array} \right] $$
(22)

where: kS1 and kS2 are system constants of microgrid 1 and 2 respectively, σ a constant linked to the state variable of the problem.

$$ C=\left[\begin{array}{cccc} 0 & 0 & 1 & 0 \\ 0 & 0 & 0 & 1 \end{array} \right] $$
(23)
$$ x(k)=[soc_{1} (k),soc_{2} (k),{\Delta} \omega_{1} (k),{\Delta} \omega_{2} (k)] $$
(24)

where xk represents the state variable of the system, and the Eq. 25 gives the output of the system:

$$ y(k)=[{\Delta} \omega_{1} (k),{\Delta} \omega_{2} (k)] $$
(25)

The control model strategy using MPC is based on the linear state space system given in Eq. 20. This equation is taken as the plant of the system to be controlled. The objective function used in the work is given as follows [39]:

$$ J=\sum\limits_{i = 1}^{N_{P} } {(y(t+i-\frac{1}{t}))} -r(t+i-1)^{2}=(Y-R)^{T}(Y-R) $$
(26)

Subject to the following constraint:

$$ Mu(t)\le \gamma $$
(27)

where \(Y(k)=[y^{T}(k),y^{T}(k+\frac {1}{k}),...,y^{T}(k+N_{P} -\frac {1}{k})]^{T}\), and \(y(k+\frac {1}{k})\) represents the predicted value of y at step i, (i = 1,...,NP) from sampling time k.R(k) = [r(k),r(k + 1),...,r(k + NP − 1)] expresses the predicted reference value for Y; NP is the predicted horizon; and the constraints matrix M and vector γ have their proper dimensions according to the different constraints to be designed.

The control horizon must be equal to the predictive horizon and the predicted states and output can be found by the following iterations:

$$ \begin{array}{l} x(k + 1/k)=Ax(k)+Bu(k),y(k)=Cx(k) \\ x(k + 2/k)=Ax(k + 1/k)+Bu(k + 1) \\ x(k + 2/k)=A^{2}x(k)+ABu(k)+Bu(k + 1/k) \\ . \\ . \\ . \\ x(k+N_{P} -1/k)=A^{N_{P} -1}x(k)+\sum\limits_{i = 1}^{N_{P} -1} A^{N_{P} -1-i}\\ Bu(k+i-1/k) \end{array} $$
(28)
$$ Y(k)=[C,C,...,C]X(k)=Fx(k)+\varphi U $$
(29)

where:X(k) = [xT(k),xT(k + 1/t),...,xT(k + NP − 1/t)]T,

$$U(k)=[u^{T}(k),u^{T}(k + 1/k),...,u^{T}(k+N_{P} -1/k)]^{T} $$

and

$$\begin{array}{@{}rcl@{}} F&=&\left[ \begin{array}{c} {CA} \\ {CA^{2}} \\ . \\ . \\ . \\ {CA^{N_{P} }} \end{array}\right], \\ \varphi &=&\left[ \begin{array}{cccccc} {CB} & 0 & . & . & . & 0 \\ {CAB} & {CB} & . & . & . & 0 \\ . & . & . & . & . & . \\ . & . & . & . & . & . \\ . & . & . & . & . & . \\ {CA^{N_{P} -1}} & {CA^{N_{P} -2}} & . & . & . & {CA^{N_{P} -N_{C} }B} \end{array} \right] \end{array} $$
(30)

Equation 29 representing the predicted output can be substituted into Eq. 26, therefore, minimising the objective function will be equivalent to minimising the following Eq. 31:

$$ J=U^{T}EU+FU $$
(31)

where E = φTφ, H = (Fx(k) − R(k))Tφ.

This equation is solved by considering the constraints given in Eq. 27:

$$ U=\arg \min\limits_{U} U^{T}EU+FU $$
(32)

The receding in horizontal control is the basis for the implementation of the MPC. Equation 33 describes this situation, where I is the identity matrix with proper dimension:

$$ u(k)=[I,0,...,0]U $$
(33)

Active power from all sources and battery are considered as control inputs. The input vector is given in Eq. 19. The outputs of the system expressing the linear state-space form as multi-input and multi-output called MIMO system are used for MPC design. The system outputs are defined by the expression given in Eq. 25, where:

$$ \left\{ \begin{array}{l} {\Delta} \omega_{1} =(P_{1} (k)+P_{2} (k)+P_{3} (k)+P_{4} (k)-P_{5} (k)-P_{L1} (k))\times (\frac{1}{k_{S1} }) \\ {\Delta} \omega_{2} =(P_{8} (k)+P_{9} (k)+P_{10} (k)+P_{11} (k)-P_{12} (k)-P_{L2} (k))\times (\frac{1}{k_{S2} }) \end{array} \right. $$
(34)

Equation 34 gives the frequencies variations of the microgrid 1 (Δω1) and the microgrid 2(Δω2). It express simply all the power produced minus the power load demand and the BESS discharge time for each control area. The state vector is given in Eq. 24.

The objective function is to maximise the use of renewable energy and to minimise the energy transfer in the tie-lines interconnecting the two microgrids.

$$ P_{6} (k)+P_{7} (k)=\vert P_{L1} (k)-P_{L2} (k)\vert $$
(35)

Constraints

As an optimisation problem the following constraints were taken into account to solve the problem. The development of Equation (27) considering equations (3) and (35) and the input vector u(k) give two matrices: the matrix Mch (the charging constraints matrix) and the matrix Mdch (the discharging constraints matrix) given in Appendix as follows:

$$\left\{ \begin{array}{l} M_{ch} =\gamma_{ch} \\ M_{dch} =\gamma_{dch} \end{array} \right., $$

according to Eq. 27. These matrices give the compact form including all the constraints given in points (a) to (e).

Results and Discussions

Two microgrids connected through two ac tie-lines are considered in this research. A control horizon used is N = 24 hours. The main conventional hydro and thermal generator running respectively in area 1 and area 2, have the following rating power: P1(k) = P8(k) = 150MW [40]. The characteristics of PV1, PV2, wind farm 1, wind farm 2, Load 1 and Load 2 are given and were used under profile form (Appendix A.3) [40]. The data form hydro-electric power plant and thermal plant (steam turbine) can be found in [40]. Fmincon (open loop), MPC (close loop) and Proportional Integral (PI) were implemented in MatLab 2016 in a H97M-D3H system with processor: Intel (R) Core ™i5 CPU @ 3.30GHz, 3301MHz, 4 Core(S), 4 Logical Processor (S) and RAM of 8.00GB. The effectiveness of the proposed closed control loop (MPC) is show in this section through these some simulations results. These simulations are based on the introduction of active power load disturbance (0.01 MW for microgrid 1 and 0.02 MW for microgrid 2). Using the optimal control open loop and the close loop (MPC controller) both active power load disturbances were generated at t = 0.1s. To validate the effectiveness of the proposed open and close loop, the results from a traditional controller algorithm based on proportional integral were used. The presented results are based on the three controller’s algorithm performance. Table 2 presents the optimal values of power flow or power balance in the system considered when no disturbance is introduced. Where PG1 and PG2 are respectively the total active power generated in area 1 and area 2.

Table 2 Optimal values of the interconnected systems [40]

Figure 3a presents the active power deviation in tie-line 1, Fig. 3b shows the same deviation in tie-line 2 when load variation occurs in microgrid 1. By introducing the load disturbance in microgrid 2 (active power load variation), Fig. 4a and b show the results of this situation. It can be seen from Figs. 3 and 4, that obtained responses with close loop controllers are better than the ones achieved with the open loop controller. Using the close loop controller has been found to be more reliable and this improves significantly the response when considering the overshoots and settling time (Table 1).

Fig. 3
figure 3

Active power deviation in tie-lines when microgrid 1 is under disturbance

Fig. 4
figure 4

Active power deviation in tie-lines when microgrid 2 is under disturbance

Figure 5a and b show how the frequencies F1 (for microgrid 1) and F2 (for microgrid 2) vary during the load variation or perturbation introduced. At t = 0.2 s, the frequency simulations can be observed from Fig. 5a for microgrid 1 and (b) for microgrid 2. Maximum frequency deviation is about 0.037Hz for microgrid 1 and 0.04Hz for microgrid 2 when considering the open loop controller. When considering the close loop, the maximum frequency deviation is found equal to 0.022Hz for microgrid 1 and 0.0203Hz for microgrid 2. The comparison of the frequency gives a reduction of 0.015Hz and 0.0197Hz respectively for F1 and F2. The PI results have shown a good performance when compared with the open results.

Fig. 5
figure 5

Frequencies deviation of microgrid 1 and microgrid 2

The critical cases were simulated by introducing the load variation in both microgrids simultaneously. Figure 6a presents the variation of the active power in tie-line 1 and Fig. 6b presents the same situation for tie-line 2. The frequencies variation corresponding to this situation are shown in Fig. 7a and b, for Microgrid 1 (F1) and microgrid 2 (F2).

Fig. 6
figure 6

Active power deviation in tie-lines when all the system is under disturbance

Fig. 7
figure 7

Frequencies deviation in MG1 and MG2 when all the system in under disturbance

According to the results obtained, some advantages can be listed when considering the closed control loop over the open loop and the PI. In presence of uncertainties of parameter and active power demand variation the model was robust and the response to re-equilibrate the system was fast. This can be seen through presented the simulation results. The comparison of performance between the proposed closed loop controller and the open loop schemes were carried out and can be seen from the presented results. It is can be seen that from the presented results, the closed loop controller response is much more effective when compares with the open loop (based on optimal control) response; and the closed control loop was found to be more suitable to deal with more efficiency with both power demand changes and parameters uncertainties of the system. Also, it is o7.bserved that both the close loop or MPC and the open loop controllers are robust, but the closed loop controller approach has the advantage over open loop controller with regards to faster damping oscillation, the reduction of parameters variations, and frequency enhancement. The constituted system performance based and observed using the dynamic parameters, mainly composed by the settling time, overshoot and undershoot; this can be seen in Table 3.

Table 3 Dynamic information of the simulations

Table 3 gives some results concerning the dynamics information of the simulations conducted after using perturbation techniques as explained in this section.

Where MG (Microgrid), PI (Proportional Integral controller), TL (Tie-Line), OL (Open-Loop), CL (Close-Loop), OST (Over-Shoot Time) and ST (Settling Time). The comparison between the open and the close loop are presented in this paper.

Conclusions

The aim of this research was to present the simulations of open loop based on optimal control theory and the close loop based on the Model Predictive Control. The comparison of these two control models were based on the network-model of interconnection of two microgrids via two ac tie-lines. The results show the effectiveness of the method used when it comes to the problem posed and resolved in this research. Three different cases were introduced by load variations in the first microgrid, second microgrid and both simultaneously, were considered to have different simulations results. Based on the simulation results, the close loop control shows a higher accuracy and faster than an open control loop strategy scheme even for complex dynamical system. All these results have demonstrated that those obtained using the closed control loop (MPC) controller have shown robustness against large power demand changes and system parameters variations and has better performance in comparison with the open loop controller. In two words: the peak undershoot and the settling time were reduced. The results presented in this research were compared with the one obtained with PI and show that the implementation of the open and closed loop of control when considering an interconnection of the sources of renewable energies (PV, wind) depend strongly on the weather.