Introduction
Integration of photovoltaic (PV) and/or wind generation through power electronic inverters means that the traditional rotational generation-based microgrids are being transformed into inverter-based systems [1], [2]. As a result, fast-frequency dynamics are more prevalent in such low-inertia microgrids. During frequency events, the rate-of-change-of-frequency (ROCOF) is large causing significant frequency deviations. This can trigger protection systems, such as under frequency load shedding (UFLS), and can lead to cascaded outages throughout the system and eventually cause a total blackout. Control strategies deployed using energy storage systems (ESSs) interfaced through power electronic inverters can provide fast-frequency support for these low-inertia microgrids to maintain stability and reliability.
Traditionally to provide fast-frequency support in low-inertia microgrids, techniques where the power output of the ESS is controlled based on the derivative of the frequency have been proposed [3], [4]. This is referred to as virtual inertia (VI) in the literature as it replicates the inertial response from rotational generators in a power system. As has been shown in [5], [6], these controllers are difficult to tune and susceptible to instability due to noisy frequency measurements from phase-locked loops (PLLs). To address these issues, a number of optimal frequency control techniques have been proposed in the literature. These control techniques provide fast-frequency control by reducing frequency deviations and the ROCOF, while minimizing the energy/power consumption. An overview of the current state-of-the-art in this area is provided in Section II.
Fast-frequency support is a power-intensive service and can result in large power demands and ramp-rates from the energy medium, which can have a substantial negative impact on the ESS lifetime [7]. The ESS operator needs to provide frequency support to minimize the ROCOF and the frequency deviation, while minimizing the impact on the ESS. Furthermore, there are physical constraints of the ESS to be considered, such as limits on peak-power and/or ramp-rates. It is thus favorable for the ESS operator to be able to dispatch the ESS unit based on desired quality-of-service (QoS) (i.e., reduction in ROCOF and the frequency deviation) and the incentives required to provide the QoS for such a frequency-as-a-service in the market.
In this paper, we formulate a flexible approach that uses model predictive control (MPC) [8] and moving horizon estimation (MHE) [9] to enable an ESS to provide fast-frequency support. MPC allows the system operator to achieve near-optimal control actions (based on a defined cost-function) while having the ability to incorporate ESS constraints into the control framework. Additionally, the ESS operator has the flexibility to change dynamic behavior of the system (based on desired QoS) by intuitive adjustment of the weighting parameters. For instance, if there are sufficient incentives in the market mechanisms, the ESS operator can select weighting parameters such that significant reduction in ROCOF is provided even at the expense of battery degradation.
MHE is used to estimate the states as it has been shown have superior performance for linear and constrained systems compared to other techniques proposed in the literature such as Kalman filters/ particle filters. In addition, MHE is also well suited to deal with state estimation when the measurement noise distribution is unknown [10]. These estimates facilitate control actions that avoid the oscillatory behavior observed with traditional derivative-based (virtual inertia) controllers due to interaction with PLLs. With traditional virtual inertia controllers, a low pass filter (LPF) is used to filter out PLL measurement noise. The delay caused by the LPF is known to cause instability, especially under high controller gain values [11]. Thus, using a LPF with low cut-off frequencies limits the controller gains and the effectiveness of the controller in providing fast-frequency support. In the proposed framework, a PLL without a LPF is used as the MHE performs the necessary filtering and prevents the aforementioned oscillatory behavior.
The authors introduced an MPC-based fast-frequency control in [12] that was analyzed in a simple linearized transfer function based power system model. In this paper, the authors extend this framework with MHE, which helps to prevent oscillatory behavior, and the combined framework is tested in a realistic test system from Cordova, Alaska. The contributions of the paper are as follows:
Designed a fast-frequency support framework that achieves the required performance while incorporating physical constraints of the ESS and enabling efficient computation for real-time operation.
Developed a flexible mechanism for an ESS operator to change dynamic performance based on available reserves and market requirements/incentives.
Improved performance compared to traditional virtual inertia controllers through the use of MHE.
The paper is organized as follows: Section II describes the state-of-the-art for optimal fast-frequency support techniques. The proposed MHE-MPC framework is introduced in Section III. The simulation setup and test system are described and presented in Section IV, followed by the simulation results and analysis in Section V. The paper is concluded in Section VI.
State of the Art: Optimal Fast-Frequency Support Techniques
Numerous fast-frequency support mechanisms for low-inertia power systems have been proposed in the literature [13], [14]. Techniques to optimize the performance in terms of reducing energy/power requirements for frequency support have been widely studied. Different machine learning/black-box approaches have been proposed to optimize the performance of the fast-frequency controllers. The main objective of these approaches is to reduce the frequency deviations and the ROCOF while minimizing the peak-power and/or energy usage. Several methods based on fuzzy logic [15], [16], neural networks [17], and reinforcement learning [18], [19] have been proposed. These methods can be computationally expensive and as the system parameters change, require complex re-training.
Approaches based on predictive models of the system have also been proposed, using the swing equation of the power system as the predictive model. A predictive controller was developed in [20] to provide dynamic frequency support using an ESS. However, the method was limited to one-sample time ahead predictions which limited the performance as the system dynamics were not captured over a longer time horizon. A technique using explicit MPC was proposed in [21] to provide frequency support. In this approach, control actions were analytically computed offline, and thus the control actions were limited to a lookup table, reducing the flexibility of the controller to changing system conditions. Similarly, a MPC was proposed to damp oscillations in a power system by controlling the power injections of high voltage direct current (HVDC) links [22]. MPC-based approaches specific to frequency containment for large power systems have been proposed in [23], [24], however they use large sampling times that may make control actions too slow for the fast-frequency dynamics that are observed in low-inertia microgrids. As will be shown later, by taking advantage of real time iteration (RTI)-based solvers [25], the proposed MHE-MPC framework is able to accommodate significantly smaller sampling times. Linear quadratic regulator (LQR) techniques have also been developed in the literature [26], [27], but these approaches are limited as they do not provide the flexibility to be reconfigured online as needed and cannot handle physical system constraints.
Other techniques to improve performance use a heuristic “alternate/flexible inertia” method where the gains of the controller are adjusted based on the acceleration of the frequency [28], [29]. Although such techniques have been shown to achieve faster settling times and reduced energy usage, they are also prone to oscillations [29]. Hence, most techniques in the literature rely on black-box models or short-horizon predictions with limited flexibility to optimize the fast-frequency controller. The proposed MHE-MPC framework allows for improved control flexibility and optimization over longer prediction horizons.
Proposed MHE-MPC Framework
The proposed MHE-MPC framework is shown in Fig. 1. The proposed framework consists of two distinct modules – the MHE and the MPC. The MHE performs state estimation based on noisy frequency and ROCOF measurements from a PLL. The state estimates are then used in the MPC algorithm that generates control signals for the ESS. The optimization problem formulations in the MHE and MPC algorithms use an approximate model of the system's frequency dynamics, physical system constraints, and defined cost-functions. Solving these optimization problems at each time step results in current state estimates and future ESS control actions. The cost-function typically consists of several terms that penalize the states (frequency and ROCOF) and/or the ESS power output. By tuning weights in the cost-function, a system operator can change the dynamic performance of the controller based on the desired QoS. Additionally, physical constraints of the ESS such as peak-power limits and/or ramp-rate limits can be formulated within the MPC framework. One of the main challenges with existing fast-frequency support techniques is that a PLL must be supplemented with a LPF to account for measurement noise. The dynamics of such PLLs with LPFs can cause oscillatory behavior, especially at higher control gains, as illustrated in a number of relevant work in the literature [5], [6], [11]. The MHE module allows the use of a PLL without a LPF, thus the combined framework can prevent oscillatory response in the system.
Proposed MHE-MPC framework for fast-frequency control. The MHE provides state estimates for the frequency and ROCOF from noisy PLL measurements while the MPC provides ESS control signals to provide fast-frequency support.
The objective of this section is to first develop an approximate model that defines the microgrid system dynamics due to changes in the ESS power output. The model makes several simplifying assumptions and is not a comprehensive representation of microgrid system dynamics. Such an approximate model is desired for the MHE/MPC to reduce computational cost and ensure optimization convergence. The approximate model is used in the formulation of the MHE and the MPC as given in the second part of this section. Both the MHE and the MPC are formulated as quadratic programs (QP) which ensures convexity and allows the use of an efficient solver for the optimization problems [30]. The effectiveness of the proposed approach when implemented in the closed-loop is illustrated in simulations that use detailed microgrid system dynamic models, as described in Section IV. Therefore, the proposed MHE-MPC approach that uses this approximate model is sufficient to provide effective state estimates and control actions for fast-frequency support in a realistic microgrid scenario.
A. Predictive Model Representing Frequency Dynamics
To model the frequency dynamics of an isolated microgrid system, a multi-machine system can be modeled by a single equivalent generator as shown in Fig. 2. Because the inverter dynamics are much faster than the dynamics of rotational generators, we assume that the frequency dynamics are mostly dominated by the rotational generators [31]. The linearized swing equation of microgrid frequency dynamics is given by [32]:
\begin{equation*}
M \Delta \dot{\omega } + D\Delta\omega = \Delta P_m - \Delta P - \Delta P_l \tag{1}
\end{equation*}
Transfer function representation of an isolated microgrid system including the frequency control loops.
The type of governor and the dynamics of the turbine itself affect the dynamics of the frequency of the system. It is assumed that in general the turbine-governor dynamics can be represented by the following differential equation [27]:
\begin{equation*}
T_g \Delta\dot{P}_m + \Delta P_m = -{R_p}^{-1}\Delta\omega \tag{2}
\end{equation*}
Based on (1) and (2), the following differential equation describing the overall frequency dynamics of the isolated microgrid system can then be derived:
\begin{align*}
\Delta\ddot{\omega } = &-\left(\frac{D}{M} +\frac{1}{T_g} \right) \Delta\dot{\omega } - \left(\frac{D}{MT_g} + \frac{1}{R_pMT_g}\right) \Delta\omega \\
&- \frac{1}{MT_g} \Delta P - \frac{\Delta\dot{P}}{M} \tag{3}
\end{align*}
\begin{align*}
\dot{x} = A x + B (u + d) \tag{4}
\\
y = C x + \eta \tag{5}
\end{align*}
\begin{equation*}
x = \begin{bmatrix}\Delta{\omega }\,\,\, \Delta\dot{\omega } \end{bmatrix}^{\top }, u = \Delta P
\end{equation*}
\begin{equation*}
{ A = \begin{bmatrix}0 & 1 \\
-\left(\frac{D}{MT_g} + \frac{1}{R_p M T_g} \right) & -\left(\frac{D}{M} +\frac{1}{T_g} \right) \end{bmatrix} ; B = \begin{bmatrix}0\\
\frac{-1}{MT_g} \end{bmatrix} }
\end{equation*}
\begin{equation*}
C = diag(1,1)
\end{equation*}
B. Formulation of Moving Horizon Estimation
Let us define
\begin{align*}
&\underset{\hat{x}_k, \hat{d}_k}{\text{min}} J_{L}:=\sum _{k=q-L}^{q} \left({C_d \hat{x}_k -y_k} \right) ^{\top }V\left({C_d \hat{x}_k -{y}_k} \right)\\
& \qquad\qquad\qquad\,\, +\sum _{k=q-L}^{q-1} \hat{d}_k^\top W \hat{d}_k \tag{6a} \\
&\text{subject to} \\
& {{\hat{x}_{k+1} = A_d \hat{x}_{k} + B_d (u_k + \hat{d}_k)}}\\
& \forall k \in {\lbrace {q-L},\ldots, q-1 \rbrace }\tag{6b}
\end{align*}
Matrices
C. Formulation of Model Predictive Control
Let us define
\begin{align*}
& \underset{u_k}{\text{min}}J_{T}:= \sum _{k=q}^{{q+T-1}} {\left(x_{k}^{\top }Qx_k + u_{k}^{\top } R u_k \right) } + x_{q+T}^{\top }Q^{f} x_{q+T} \tag{7a}\\
&\text{subject to} \\
& {x_{k+1} = A_d x_{k} + B_d u_k} \quad \forall k\in {\lbrace q,\ldots, q+T-1 \rbrace }\tag{7b}\\
& {\left| u_k\right| \leq P_{max}} \quad \forall k\in {\lbrace q,\ldots, q+T-1 \rbrace }\tag{7c}\\
& {\left\Vert u_{k+1} - u_k \right\Vert _ \infty \leq E} \quad \forall k\in {\lbrace q,\ldots, q+T-1 \rbrace }\tag{7d}
\end{align*}
The system dynamics are incorporated within constraint (7b). Similarly, (7c) limits the power output of the ESS to
Simulation Setup
A. Test System
To test the proposed estimation and control framework, the remote microgrid test system from Cordova, Alaska, was modified as shown in Fig. 3(a). Only two substations are considered – the ORCA 12.47 kV substation with three diesel generators (ORCA 3, ORCA 4, and ORCA 5) and the Humpback Creek 12.47 kV substation, where a 1 MW PV system is connected. The implementation of the governor and excitation systems of the generators is shown in Fig. 3(b). Typical parameters used are
A 3 MW ESS is connected to the ORCA substation. The proposed MHE-MPC control framework is implemented on this ESS. The ESS can be utilized to perform a wide-array of grid ancillary services in different time scales, with fast-frequency support being the application discussed in this paper. The ESS inverter is modeled using three independent current-controlled voltage sources, which allows the system to be analyzed without modeling the DC-link dynamics and/or harmonics. These dynamics are much faster than the frequency dynamics, which are the main concern of this paper. A PI-type-2 controller as described in [37] is used to implement the current controllers which control the output of the current-controlled voltage sources. The ESS is interfaced through an LC filter with an inductance
B. Configuration for the MHE-MPC Framework
A sampling time of 0.02 s was used for both the MHE and MPC modules. For the MHE, the backward time-horizon
Both the MHE and the MPC modules are formulated using the ACADO Toolkit [38], which is an open-source toolbox to implement dynamic optimization problems. The test system was implemented in MATLAB/Simulink (using the Simscape Power Systems library), and the parameters for the approximate model were estimated using an offline least squares estimator but could be estimated online using an approach as in [39]. It should be noted that while an approximate equivalent generator based model is used for formulating the MHE/MPC, the proposed framework is tested in a detail microgrid model implemented in MATLAB/Simulink as described in Section IV-A.
Results and Analysis
In this section, the performance of the MHE in estimating the frequency deviation and ROCOF of the system is first illustrated. This is followed by analysis of the proposed combined framework, which is illustrated in terms of the operational flexibility, capability to handle ESS constraints, and performance improvement under noisy measurement conditions. All simulation results are presented in p.u. with frequency and ROCOF normalized against a 60 Hz base while the power is normalized against a 3 MVA base. In all the cases, it is assumed that system base load is 3 MW (1 p.u.) to begin with, and there is a 2 MW (0.67 p.u.) change in the system load at 5 s.
A. Performance of the MHE
The performance of the MHE is illustrated in Fig. 4. The measurements from the PLL are assumed to have measurement noise with a Gaussian distribution of mean 0 and co-variance
Frequency and ROCOF of the microgrid system estimated using MHE. The estimates are compared against the noisy PLL measurements and the measurement from LPFs.
As stated earlier, a lower
The frequency estimate has similar performance as compared to the case when using a LPF. On the other hand, MHE provides significantly better ROCOF estimates than using an LPF and with minimal delay, which helps to maintain system stability. Avoiding this delay prevents oscillatory behavior in the system as highlighted in further detail in Section V.D. Even though some errors exist in the estimate, the results in the subsequent sections indicate that the proposed framework can provide desired fast-frequency support.
B. Performance: Operational Flexibility
The performance of the MPC in terms of providing operational flexibility for the ESS operator is illustrated here. The maximum frequency change, maximum ROCOF, and the peak-power injected by the ESS for different weighting constants are illustrated in the heatmaps in Fig. 5. The elements of the
Heatmaps illustrating the variation of different system parameters based on the selection of
Fig. 6 shows how the dynamics of the frequency, ROCOF and the ESS power outputs change depending on the selection of
The intention of the proposed control framework is to allow a system operator to consider ESS lifetime. Analyzing the effect of such a fast-frequency support service on the ESS lifetime is out of the scope of this work. The weighting parameters provides an intuitive mechanism for the system operator to control the frequency dynamics of the microgrid, either manually or adaptively as part of a market mechanism. Based on the ESS power availability, system inertia, and market incentives, the ESS operator can select appropriate weighting parameters. For instance, if the system inertia is particularly low at any given instance, the ESS operator can increase
C. Performance: Constraints Handling
The proposed MHE-MPC framework allows the microgrid or ESS operator to impose constraints based on available resources, QoS incentives in the market, or to provide multiple market services. For this particular analysis, it is assumed that the ESS operator has limited the power output of the unit to 0.1 p.u. (0.3 MW). Fig. 8 shows the change in frequency, ROCOF and the power output from the ESS for three cases – with no fast-frequency controller, a constrained controller, and an unconstrained controller. In all cases, the same settings were used for both the MHE and the MPC modules. For the MHE, the settings described in Section IV-B are used, while for the MPC the weights are set to
Comparison of constrained versus unconstrained system operation. The peak-power output is constrained to 0.1 p.u. in this case.
The reduction in frequency deviation is highest when there are no constraints in the formulation, as shown in Fig. 8(a). Similarly, the ROCOF is also least for the unconstrained case as illustrated in Fig. 8(b). However, significant reductions come at the cost of a larger peak-power injection of 0.3 p.u. (0.9 MW) from the ESS, as shown in Fig. 8(c). Furthermore, the energy usage per frequency event is also higher. All of these factors could degrade the ESS lifetime and impact other ESS services (e.g., arbitrage). However, with constrained operation the ESS operator can inherently include a constraint on the peak-power of the ESS within the formulation, which limits the control action generated by the MPC to 0.1 p.u. (0.3 MW) as shown in Fig. 8(c). With peak-power limited, the reduction in frequency deviation and the ROCOF is lower compared to the unconstrained case, but this results in lower power/energy usage and longer ESS lifetime.
D. Performance Improvement
To highlight the advantage of the MHE module, two sets of simulations are carried out. In the first case shown in Fig. 9(a) the measurements from the PLL with a LPF are used by the MPC. A second-order Butterworth-type LPF with a cut-off frequency
Simulation setups to analyze the advantage of the MHE module. (a) MPC with measurements from PLL+LPF. (b) Proposed combined MHE-MPC.
E. Computational Requirements/Performance
In this section, the computational requirements of the proposed MHE-MPC framework are discussed. Both the MPC and MHE are implemented using ACADO code generation toolbox [38], which uses a RTI scheme to generate optimized code for embedded applications. With this implementation, a single sequential quadratic program (SQP) is solved in each sampling time. For instance, each MPC computation is performed in two phases: in phase 1 all the derivatives and functions needed to set up a QP is performed; and in phase 2 as soon as the state estimate is available a single QP is solved to complete the SQP. ACADO exports highly efficient C-code for solving the MHE and MPC optimization problems. An interface to a QP solver (qpOASES) is also exported by the toolkit. These features make the ACADO toolkit particularly suitable for embedded MHE/MPC applications with sampling times on the order of
Conclusion and Future Work
An optimization-based estimation and control framework was developed for fast-frequency support in low-inertia microgrids. The framework used moving horizon estimation (MHE) and model predictive control (MPC) to achieve a flexible approach that can be used by system operators to achieve desired performance. Through simulations performed in a high-fidelity low-inertia test system, it was illustrated that the MHE can estimate the change in frequency and ROCOF of the system from noisy PLL measurements. These estimates enable the MPC to compute effective power commands for an energy storage system (ESS) to provide fast-frequency support. The proposed approach results in significant reductions in frequency deviation and ROCOF without any oscillatory behavior that is common with traditional virtual inertia controllers. The flexibility of the proposed MHE-MPC fast-frequency support framework allows the ESS owner or microgrid operator to tune the quality-of-service (QoS) provided by straightforwardly tuning the weighting matrices, allowing the trade-off between performance and battery degradation. It was also shown that the proposed framework can incorporate physical operating constraints of an ESS, such as peak-power limits. As an added benefit, properly setting this constraint, allows the ESS owner to provide stacked services to the microgrid and maximize benefit or revenue over the battery lifetime.
The proposed framework is tested in a relatively small microgrid model that allowed adequate frequency support to be provided from a single ESS unit. For larger power systems, multiple ESS units will be needed. This may require coordinated control through communication between the units and will be explored in the future. Furthermore, the model simplification may result in sub-optimal control action in some cases and will require further investigation in the future.
ACKNOWLEDGMENT
The authors would like to thank Dr. Rodrigo Trevizan for reviewing the paper during Sandia National Laboratories’ internal review process.