Application of Model Predictive Control to BESS for Microgrid Control

Battery energy storage systems (BESSs) have been widely used for microgrid control. Generally, BESS control systems are based on proportional-integral (PI) control techniques with the outer and inner control loops based on PI regulators. Recently, model predictive control (MPC) has attracted attention for application to future energy processing and control systems because it can easily deal with multivariable cases, system constraints, and nonlinearities. This study considers the application of MPC-based BESSs to microgrid control. Two types of MPC are presented in this study: MPC based on predictive power control (PPC) and MPC based on PI control in the outer and predictive current control (PCC) in the inner control loops. In particular, the effective application of MPC for microgrids with multiple BESSs should be considered because of the differences in their control performance. In this study, microgrids with two BESSs based on two MPC techniques are considered as an example. The control performance of the MPC used for the control microgrid is compared to that of the PI control. The proposed control strategy is investigated through simulations using MATLAB/Simulink software. The simulation results show that the response time, power and voltage ripples, and frequency spectrum could be improved significantly by using MPC.


Introduction
Microgrids are becoming popular in distribution systems because they can improve the power quality and reliability of power supplies and reduce the environmental impact.Microgrid operation can be classified into two modes: grid-connected and islanded modes.In general, microgrids are comprised of distributed energy resources (DERs) including renewable energy sources, distributed energy storage systems (ESSs), and local loads [1][2][3].However, the use of renewable energy sources such as wind and solar power in microgrids causes power flow variations owing to uncertainties in their power outputs.These variations should be reduced to meet power-quality requirements [4,5].This study focuses on handling the problems that are introduced by wind power.
To compensate for fluctuations in wind power, various ESSs have been implemented in microgrids.Short-term ESSs such as superconducting magnetic energy storage (SMES) systems [6], electrical double-layer capacitors (EDLCs) [7], and flywheel energy storage systems (FESSs) [8][9][10] as well as long-term ESSs such as battery energy storage systems (BESSs) [11,12] are applied to microgrid control.ESSs can also be used to control the power flow at point of common coupling in the grid-connected mode as well as to regulate the frequency and voltage of a microgrid in the islanded mode.Among these ESSs, BESSs have been implemented widely owing to their versatility, high energy density, and efficiency.Moreover, their cost has decreased whereas their performance and lifetime has increased [13].
In practice, BESSs with high performance such as smooth and fast dynamic response during charging and discharging are required for microgrid control.This performance depends on the control performance of the power electronic converter.Proportional-integral (PI) control is a practical and popular control technique for BESS control systems.However, PI control might show unsatisfactory results for nonlinear and discontinuous systems [10].Meanwhile, model predictive control (MPC) is considered an attractive alternative to promote the performance of future energy processing and control systems [14].Predictive strategies are based on the inherent discrete nature of a power converter.Owing to the finite number of switching states of a power converter, all possible states are considered for predicting the system behavior.Then, each prediction is used to evaluate a cost function.Consequently, the switching state with the minimum cost function is selected and applied to the converter [15].One of the advantages of an MPC is the easy inclusion of constraints and nonlinearities.Therefore, MPC has been widely applied to drive applications [15][16][17][18] and power converters such as active front-end rectifiers [19], matrix converters [20], and multilevel converters [21].Recently, it has been applied to a bidirectional AC-DC converter for use in BESSs [22][23][24].
Only a few literatures were found on the application of MPC to microgrid control.Most existing studies focused on MPC for a distributed generator in a microgrid with voltage and/or power control [25][26][27].A modified MPC method for voltage control of a BESS in the islanded mode operation of a microgrid was presented in [27].However, this study did not deal with frequency control in the islanded mode operation of a microgrid.MPC based on PI control in the outer control loop and predictive current control (PCC) in the inner control loop for BESS was presented in [28].Coordinated predictive control of a wind/battery microgrid system was proposed to maintain the system voltage and frequency by adjusting the output power of BESS.PCC was used to control the current in the inner control loop, whereas PI regulators were used to regulate the voltage and power in the outer control loop.Owing to the use of PI regulators in the outer control loop, the dynamic response time under such MPC techniques was similar to that under PI control techniques with outer and inner control loops using PI regulators.
Another MPC technique is based on predictive power control (PPC), in which the power is predicted and controlled directly.This MPC technique could be applied to microgrid control because it affords advantages such as fast dynamic response for power control; however, studies have not yet explored the application of the PPC-based MPC technique to microgrid control.Furthermore, this MPC technique can only be used for power control.To overcome this problem, PI regulators can be used in an additional control loop to control the frequency and voltage.Therefore, this MPC technique uses PI regulators in the outer control loop and PPC in the inner control loop.It is similar to previous MPC techniques in which PI control is used in the outer control loop and PCC is used in the inner control loop.However, an MPC technique based on PI and PPC requires more computation time than does one based on PI and PCC, owing to the predicting powers in the inner PPC control loop.Therefore, in a microgrid with a single BESS, MPC based on PI and PCC is a suitable alternative for microgrid control.Another approach to overcome this limitation of the MPC control technique is to use a droop control scheme.Thus, a PPC-based MPC technique can be applied to microgrids consisting of multiple BESSs with different functionalities.This study deals with the effective application of an MPC technique to a microgrid with two BESSs as an example of multiple BESSs in a microgrid.
This study discusses the effective application of two MPC techniques to BESSs for microgrid control based on the characteristics of the MPC techniques as well as the functionalities of BESSs.One BESS is based on PI control in the outer and PCC in the inner control loops (PI (outer) + PCC (inner)); it is used for smoothing wind power fluctuations both in the grid-connected and the islanded modes.The other BESS is based on PPC (one loop); it controls the tie-line powers at the point of common coupling in the grid-connected mode and the frequency in the islanded mode.Additionally, to reduce the power losses of converters, the reduction of the switching frequency of the converter is considered an additional control variable in the MPC algorithm.The control performances of the two types of MPC techniques are compared to the PI control technique using PI regulators in the outer and inner control loops (PI (outer) + PI (inner)).The tuning of PI regulator parameters must be taken into account to effectively compare the control performance of MPC techniques to the PI control technique.Several tuning techniques have been used to select the PI regulator parameters.In this study, the tuning technique provided by MATLAB/Simulink software is used.The efficacy of the proposed control system is verified via simulations in the MATLAB/Simulink environment.
The remainder of this paper is organized as follows.Section 2 introduces the discrete-time model of the converter for prediction and MPC algorithms.Two types of MPC techniques are introduced in this section.Section 3 describes the microgrid system used to test the performance of the proposed control strategies.Section 4 presents a comparison of the MPC and PI control techniques and the considerations for the effective application of MPC-based BESSs to microgrid control.Section 5 presents the simulation results for microgrid control in the grid-connected and islanded modes.The performances of the MPC techniques are compared to those of the PI control technique.Finally, Section 6 summarizes the main conclusions of this study.

Discrete-Time Model of Converter
The predicted variables of BESS are determined based on the discrete-time model of the converter.In this study, the BESS uses a two-level voltage source converter (VSC) converter, shown in Figure 1, connected to the three-phase AC power supply voltage vg through filter inductance L and resistance R. The equations for each phase are given by Equations ( 1)-( 3): These equations can be represented by the space-vector equations given in Equation (4).
The voltage v in Equation ( 5) is determined by the switching states of the converter and the DC link voltage (  ), as given in Equation (8).
Where the switching signals Sa, Sb, and Sc are defined as follows: The combination of Sa, Sb, and Sc creates eight switching states and eight voltage vectors, as shown in Table 1.
Substituting Equations ( 5)- (7) in Equation ( 4), we get From Equation ( 12), the discrete-time model of the converter is determined by approximating the derivative load current / in terms of a forward Euler approximation, as shown in Equation (13).
By substituting Equation (13) in Equation ( 12), the future current at the sampling instant k + 1 is represented as where i(k) and vg(k) are the three-phase current and voltage of the BESS measured at sampling instant k, respectively; v(k) is the voltage vector according to the eight switching states of the converter; and Ts is the sampling time.
Based on the measured voltage and current of BESS at sampling instant k, the variables at sampling instant k + 1 are predicted as given in Equation ( 14).For a small sampling time (Ts), the predicted grid voltage at sampling instant k + 1 can be assumed equal to the measured grid voltage at the k th sampling instant (vg(k + 1) = vg(k)) owing to the fundamental grid frequency [29].As a result, the predicted instantaneous real and reactive powers can be expressed as follows: ( + 1) = 1.5 {  ( + 1)   ()} where i p (k + 1) is the complex conjugate of the predicted current vector i p (k + 1).
Equations ( 14) (16) show that the predictive current and power highly rely on system model, converter, and filter parameters.Any change in the model parameters can provide inaccuracy in the predictive variables.Reference [29] shown that the current or power ripple could be affected by the parameter variations, whereas the dynamic response was almost unchanged.In case of extreme variations in the model parameters, an online parameter estimation algorithm should be included in the MPC strategy [30,31].However, MPC can effectively handle the small change in inductive filter parameters.The comparison between MPC with and without the online filter estimation was presented in [29,32].The major errors were observed at low values of the filter parameters.In addition, only a small difference was observed at high values of the filter parameters.In this study, a high value of the filter parameter is chosen to avoid the major errors by filter parameter variations.Thus, the model parameters is assumed unchanged during simulation for the sake of simplicity.

Principle of MPC
MPC is based on the inherent discrete nature of a power converter, which has a finite number of switching states.All possibilities of variables (current or real/reactive powers) of the converter according to switching states can be predicted.The predicted variables are compared to the reference control signal, and the predicted variable that is closest to the reference control signal is chosen as shown in Figure 2.Then, the switching state related to this predicted variable is applied to control the converter.Figure 3 shows two types of MPC techniques applied for BESSs: MPC based on PI control in the outer and PCC in the inner control loops (Figure 3a) and MPC based on PPC (Figure 3b).As shown in Sampling instant Reference signal

Predicted variables
Figure 3a, PI control in the outer control loop is used to regulate the real/reactive powers as well as voltage of the microgrid.The reference current obtained by the outer control loop is used for the inner PCC control loop based on Equation (14).As shown in Figure 3b, in comparison, PPC based on Equations ( 15) and ( 16) can control real/reactive powers directly.To control the frequency of the microgrid, the frequency droop control scheme is suitable for a BESSs control system.However, conventional droop control can cause a steady-state error [33].Thus, this study proposes an improved droop control scheme in which the steady-state error is removed by a new feedback signal through the PI regulator [9].The objective of the MPC scheme is to minimize the error between the reference values and the measured values.This can be achieved by introducing a cost function   for PCC and   for PPC, as shown in the following equations.
= | * ( + 1) −   ( + 1)| 2 + | * ( + 1) −   ( + 1)| 2 +    where   * ( + 1) and   * ( + 1) are the real and imaginary parts of the reference current,    ( + 1) and    ( + 1) are the real and imaginary parts of the predicted current vectors   ( + 1) according to Equation ( 14),  * ( + 1) and  * ( + 1) are the real and reactive reference powers,   ( + 1) and   ( + 1) are the predicted real and reactive powers according to Equations ( 15) and ( 16),     and     represent the reduction of switching frequency of the converter where  is the number of switches that change when the switching states  = (  ,   ,   ) are applied, and   and   are the weighting factor for PCC and PPC, respectively.The cost functions   and   have two terms with different goals.The primary goal is the current control in case of   or power control in case of   , which must be achieved to provide a proper system behavior.The secondary goal is the reduction of switching frequency (    and    ) in both cost functions.The importance of second term corresponds to the weighting factors   and   that can impose a trade-off with the primary control objective.The algorithm to adjust the weighting factors proposed in [29] is used in this study.Total harmonic distortion (THD) is used to estimate the trade-off between the primary and secondary goals.
The switching frequency of the converter depends on the change in the switching state, which can be only one or zero.Therefore, the number of switches that change from ( − 1) to () is defined as given in Equation ( 19): The control strategy of MPC techniques involves the following four steps: (1) The three-phase current and voltage of the BESS are measured, and the values of reference signals are obtained from the outer control loop.
(2) The discrete-time model of the converter is used to predict the values of current or real/reactive powers in the next sampling interval (k + 1) for each voltage vector according to Equations ( 14)-( 16).
(3) The cost function   or   based on Equations ( 17) and ( 18) is used to compute the errors between the reference and the predicted current or real/reactive powers for each voltage vector.
(4) The minimum value of the cost function gives the minimum error between the reference and the measured signals.The voltage vector with respect to the minimum cost function is selected, and the corresponding switching state signals are generated to apply to the converter.

Test Microgrid
The test microgrid system (Figure 4) used in this study includes several components: A diesel generator, a consumer load, a wind generator, and two BESSs.Table 2 shows the parameters of the test microgrid system.In this study, the fixed-speed wind energy conversion system (WECS), a type of WECS [34], is used for simplicity.Two BESSs with different control strategies according to the operation mode of the microgrid, as shown in Table 3, are used.In the grid-connected mode, the voltage and frequency of the microgrid is set by the utility grid.Therefore, the main function of the BESS is to control the real and reactive powers.On the other hand, in the islanded mode, the microgrid is disconnected from the utility grid and controls its own frequency and voltage.

Comparison of Control Performance of MPC and PI Control Techniques
The control performances of two MPC techniques according to the change in real power are compared to that of the PI control technique proposed in [35].Tuning the PI parameters is an important factor for comparison.Several functions as well as linear analysis tools provided by MATLAB/Simulink are used for tuning.First, the function "getlinio" is used to obtain the linearized input/output of the plant.The linear approximation of the plant is estimated based on the linearized input/output by using the "linearize" function.Then, the linear analysis tool in Simulink is used to estimate the frequency response of a plant based on the linear approximation of the plant.Finally, the PID tuner in Simulink is used to automatically tune the PI parameters based on the frequency response estimation.
Figure 5 shows the simulation results of three types of control techniques.The real power changes from 0 to 50 kW at 1.0 s.The response of the PPC technique is clearly much quicker than that of other techniques.In the case of MPC based on PI in the outer and PCC in the inner control loops and PI control technique using PI regulators in the outer and inner control loops, the dynamic response is similar owing to the action of the PI controller in the outer control loop.Both MPC technique based on PI and PCC and PI technique show good reference tracking under the steady-state condition.However, the power ripple obtained by MPC technique is smaller than that obtained by PI control technique owing to PCC in the inner control loop in MPC technique.Figure 5 shows that MPC techniques can significantly improve the performance of a control system for BESSs in terms of the response time and power ripple.

Effective Application of MPC Techniques to Microgrid Control
Table 4 shows the characteristics of the MPC and PI control techniques.Among these two MPC techniques, the PPC technique shows the best control performance; however, it can only be used for controlling the power.On the other hand, the MPC technique based on PI in outer and PCC in inner control loops is more flexible owing to the use of a PI regulator in the outer control loop; this technique can be used to control the power, frequency, and voltage.The ripple in case of both MPC techniques is smaller than that in case of the PI control technique.frequency in the islanded mode, in which case fast dynamic response under disturbances is required for the control system.Therefore, PPC-based MPC is suitable for application to BESS1 because its control performance shows the shortest response time compared to other cases.Furthermore, BESS2 is used for handling fluctuations in wind power in both grid-connected and islanded modes.Thus, the control performance of the MPC technique based on PI control in the outer control loop and PCC control in the inner control loop is suitable for BESS2 owing to gradual fluctuations in wind power.The microgrid voltage is controlled by BESS2 and the frequency, by BEES1 and BESS2 through the improved frequency droop control scheme.

Control Microgrid in Grid-Connected Mode
BESSs can operate in the charging or discharging mode.Therefore, they can reduce the fluctuations in wind power through effective compensation.Figure 6 shows the action of BESS2 in terms of smoothing the wind power.In the case of BESS2, the MPC technique based on PI control in the outer control loop and PCC in the inner current control loop is applied as the control system.This figure shows that the wind power fluctuations can be reduced significantly by effectively charging or discharging BESS2.Both the MPC and the PI control techniques show good results from the viewpoint of smoothing the wind power.However, the power ripple in case of the MPC technique is much smaller than that in case of the PI control technique.
On the other hand, BESS1 based on the PPC technique controls the power at the point of common coupling.In this study, it is assumed that the real power at the point of common coupling is maintained at zero. Figure 7 shows the simulation result.At 10 s, an additional load of 100 kW is connected to the microgrid.Therefore, BESS1 increases its real power to maintain the power at zero.The subfigure of Figure 7 shows that the response of the MPC technique is slightly quicker than that of the PI control technique.Additionally, the ripples of the BESS power when using the MPC technique is smaller than that of PI control technique.Both the MPC and the PI control techniques show good performance for controlling the power at the point of common coupling.

Control Microgrid in Islanded Mode
In the islanded mode, the microgrid frequency is controlled by BESS1, and the microgrid voltage is controlled by BESS2.Figures 8 and 9 respectively show the frequency and voltage of the microgrid.Both the MPC and the PI control techniques can stably control the frequency and voltage of the microgrid.However, as shown in Figure 8, the frequency response under the MPC technique is quicker than that under the PI control technique.Moreover, Figure 9 shows the microgrid voltage.Obviously, the performance of the MPC techniques is much better than that of the PI control technique.The voltage ripple in the case of the MPC technique is much smaller than that in the case of the PI control technique.Additionally, the output voltage spectra generated by the converter is one of the important factors.Figure 10 shows a comparison of the voltage spectra of the MPC and PI control techniques.As shown in Figure 10b, the frequency spectrum generated using the PI control technique is concentrated around the carrier frequency owing to PWM.For comparison, Figure 10a shows the frequency spectrum obtained by MPC.The reduction of the switching frequency of the converter is implemented in the cost function of MPC as a secondary control objective to reduce the power losses of converters.Figure 10 shows that the average switching frequency (  ) obtained by MPC is slightly lower than that obtained by the PI control technique.Moreover, the MPC technique shows significantly lower THD than the PI control technique.

Conclusions
This study discusses the effective application of two types of MPC techniques to BESSs for microgrid control: MPC based on PPC and MPC based on PI control in the outer control loop and PCC in the inner current control loop.In addition, PI control using a PI regulator in the outer and inner control loops for BESS was compared to these two types of MPC techniques.A reduction switching frequency is implemented in the cost function to reduce the power losses of converters.The simulation results show that the response time, power ripples, and frequency spectrum could be improved significantly by using MPC techniques.Both the average switching frequency and the THD obtained by using MPC techniques were lower than those obtained by using PI control.Using MPC based on PI control in the outer and PCC in the inner control loops did not improve the response time under power changing compared to PI control; however, it could significantly improve the power and voltage ripples under the steady-state condition.Moreover, using PPC-based MPC could reduce the response time under power changing compared to other control techniques.Therefore, in microgrids with multiple BESSs, the PPC-based MPC technique should be applied for BESSs that control the power at the point of common coupling and the frequency of the microgrid, and an MPC technique based on PI in the outer control loop and PCC in the inner control loop should be applied for BESSs that play the role of smoothing wind power fluctuations.Besides, in case of microgrids with a BESS, PCC-based MPC technique should be a suitable alternative for the BESS owing to its flexible characteristic.MPC technique is easy to implement and it can eliminate the tuning controller parameters effort that has to be done in the PI technique.Furthermore, various control objectives can be included in the MPC strategies.
In the future, we plan to include additional control variables such as considering the state of charge of the battery and coordination control of multiple ESSs in the MPC algorithm.

Figure 3 .
Figure 3. MPC block diagrams: (a) MPC based on PI control in the outer and PCC in the inner control loops; (b) MPC based on PPC.

Figure 5 .
Figure 5. Response of different control techniques for change in reference power.

Figure 7 .
Figure 7. Real power at point of common coupling and real power of BESS1.

Table 4 .
Characteristics of MPC and PI control techniques.BESSs with different functionalities are proposed to control the microgrid, as shown in Table3.BESS1 is used to control the power at the point of common coupling and the