1. Introduction
With the government targets set to reduce the dependency on fossil fuel energy sources, there is a rapid increase in using renewable energy sources (RES) for electricity generation. The most abundant renewable energy sources, wind and solar, are well received for deployment in many existing power systems (for example, Denmark, Ireland, and Germany) [
1]. These sources are stochastic and intermittent in nature, which implies that in addition to traditionally variable demand, the power systems have to deal with rising variabilities in the power supply [
2].
For the efficient management of electric power systems, including those with RES, forecasting of electric demand and wind and solar power outputs is utilized. Based on such forecasts, scheduling of controllable and flexible sources of energy (e.g., conventional power plants, batteries, etc.) is performed. The actual operation of the system elements, however, differs from the predicted (planned) one due to forecast errors, which consist of errors in the forecasting method, an unexpected change in electric demand, and an unexpected change in the generation at a wind (solar) power output. Forecast errors cannot be predicted, therefore, they belong to the category of uncertainties in the form of irregular and short-term changes in active power. While increasing RES penetration, it is essential to take measures to improve the system flexibility and prevent future stability and reliability issues.
The stable and safe operation of the electric power system (EPS) is possible if there are reserves to maintain the power balance between the generation and consumption under normal and post-emergency conditions. The contingency reserves utilized under normal operating conditions (to perform regulation services) can pose a threat to the system functioning. This situation, however, can be avoided. To this end, the imbalances caused by uncertainties should be compensated for at the expense of the flexibility sources, i.e., the power regulation reserves that are not planned to be used under emergencies. The flexibility sources include [
3] the power system reserve [
4,
5], demand-side management [
6,
7], energy storage systems, dispatchable distributed generators, grid interconnection [
8], and multi-energy systems [
9].
The problems associated with the flexibility of power systems are solved by researchers in many countries. They have developed probabilistic and deterministic methods for calculating flexibility, as well as methods based on artificial intelligence.
A unified four-element framework (time, uncertainty, action, and cost) for determining the power system flexibility is presented in [
10]. Based on this framework, the authors of [
10] have developed a flexibility metric that factors in the system operation and transmission network constraints. The proposed metric quantifies the broadest variation range of uncertainty the power system can meet. The robust optimization technique is used to compute this metric [
10].
The study in [
11] examines the power system flexibility that becomes available via demand response. The authors consider the thermostatically controlled loads (TCLs) as an important class of demand response. The proper coordination of TCLs plays a significant role in providing different services to the grid (renewable integration, peak shaving, etc.). The control model of TCLs is integrated into the system-level operation and control is calculated. The set of valid power profiles of individual TCLs is represented by a polyhedron. The Minkowski sum is calculated to determine the aggregated flexibility. The study [
11] relied on an optimization algorithm for approximating a polynomial by homotheties of a given convex set represented by a virtual battery model.
The insufficient ramping resource expectation (IRRE) metric is developed to measure the flexibility of a power system [
12]. It is used to recognize the time intervals during which the power system experiences a shortage of flexible resources, and, consequently, there is a probability that it will not be able to cope with the predicted or unpredicted changes in the net load. The value of the abovementioned probability is calculated from the cumulative probability. The authors [
12] give a detailed description of the algorithm for calculating IRRE for the time horizons of interest.
In [
13], the flexibility metric is developed and used to accurately estimate the flexibility level of a power system for various time horizons and directions. This metric is based on a kernel density estimator and means that the EPS has insufficient ramp resources if the probability of the flexibility residual is less than zero. The flexibility residual is considered to be a mismatch between the available flexibility and the forthcoming net load ramps. The kernel density estimator needs to estimate the probability density function of the time series, where the Gaussian kernel is chosen as the kernel function. The authors of [
14] simulate multiple scenarios considering different demand and generation profiles to calculate a flexibility metric.
The papers [
15,
16,
17,
18,
19,
20] are devoted to the use of an artificial neural network (ANN) to calculate the flexibility of an EPS. In [
15,
16,
17], an ANN is used to model the flexibility of distributed energy sources. The trained ANN assesses whether the flexibility of specific distributed energy resources is available for a given load curve. The advantage of this approach is that there is no need to create accurate models of the allocated resources. The authors [
18] explore and define the flexibility of distributed energy resources. In [
19] a new approach for quantifying the network flexibility potential is introduced. In that work, historical demand data are classified using an ANN.
Many of the abovementioned methods share some similarities where in order to calculate the EPS flexibility, the simulation of multiple scenarios has to be performed.
In this research, the flexibility of an EPS with a wind farm (i.e., the ability of the system to maintain a balance with irregular and short-term changes in active power during a specified time at the expense of flexibility sources) is calculated in real time for
n minutes ahead. Since the flexibility metric is assumed to be calculated in real time using the current state variables and very short-term forecast variables, there is no need to simulate any scenario. The focus is on forecasting the power generated by a wind farm. There is a whole host of studies on the creation of an ANN for wind power forecasting in the world [
21].
This paper shows the significance of assessing the flexibility of an electric power system with a wind farm and a battery in real time for n minutes. The battery is one of the essential components for providing the flexibility of such power systems. The EPS flexibility calculation involves the development of a deterministic method to qualitatively and quantitatively assess the EPS readiness to the load variation. A criterion is proposed for determining the combination of imbalances arising from forecast errors (uncertainties), which, when exceeded, make the EPS incapable of maintaining the power balance (cause flexibility losses). This problem is solved as an optimization problem with equality and inequality constraints. To check if the constraints, which are the electrical circuit equations, are met, a load flow solution is found. The optimization parameters are the components of vector z, which are used for modeling a variety of loads.
The main contributions of this paper are as follows:
A methodology for real-time flexibility assessment for a power system with high wind energy penetration is developed. This methodology uses measurements as input data, handles them, and then provides information about the EPS flexibility for n minutes ahead, taking into account the battery control strategy;
Wind power forecasting integrated within the methodology is performed using state of the art forecasting method (variational mode decomposition and long short-term memory (VMD-LSTM));
A new term “operating state with minimum flexibility” is introduced.
The paper has the following structure. The second section presents the purpose and concept of the research. The third section focuses on the EPS flexibility calculation and describes the modeling of the EPS flexibility sources. This section also presents, in a general form, information related to the processing of measurement data (data collection system and state estimation); and makes a forecast of the active power at the wind farm. The same section gives the main idea of the method, presents the optimality criterion and the objective function for calculating the maximum loads, and sets the constraints. The fourth section discusses the research results. The conclusion contains the analysis of the work performed.
3. Real-Time Flexibility Assessment
3.1. Data Acquisition
Traditionally, electricity is generated by large power plants and delivered to the end user via transmission and distribution networks [
22]. These networks are equipped with measurement devices (e.g., remote terminal units (RTUs), intelligent electronic devices (IEDs), and phasor measurement units (PMUs)) connected to a local area network (LAN) along with supervisory control and data acquisition (SCADA) systems [
23].
There are several sources of measurements in the EPS (
Figure 2):
SCADA systems, IEDs, PMUs, and RTUs provide real-time voltage, current, and power flows measurements;
Meter data management systems (MDMS) along with a customer information system (CIS) are used to monitor the network consumption and distributed energy resources (DER) output. In case of insufficient data redundancy, a pseudo measurement generator is used;
Automated mapping and facility management (AM/FM) systems along with geographic information and outage management systems (GIS and OMS, respectively) monitor the equipment connectivity status.
3.2. State Estimation
The state estimator is the data processing algorithm used to filter raw measurements from noise, detect and eliminate gross errors, and determine the optimal estimates for the system state. It includes topology processing, an observability analysis, a state estimation, and bad data detection [
24,
25].
The measurement set used by the state estimator looks as follows:
where
,
,
is the magnitudes of nodal voltages;
are the active and reactive power generation at the nodes;
are the active and reactive power load at the nodes;
are power flows in the transformers and the lines;
is the voltage phases at the nodes.
The objective function used in the traditional state estimation is as follows:
where
is a covariance matrix of measurement errors (diagonal matrix),
is the state vector (a part of the state variables, which is used to find the load flow solution).
The state vector calculation involves the minimization of criterion Equation (2) with respect to the voltage phase and magnitude.
The derivative
is set to zero, and the system of non-linear equations is solved:
subject to
where
is a Jacobi matrix,
represents the equations of the electric circuit connecting the measured (
y) and unmeasured (
y1) variables.
The system Equation (4) is linearized at each iteration
i. The system of linear equations is solved, where the correction vector is calculated by the equation:
The components of the state vector are calculated by the equation:
If , the iteration process converges, where is the accuracy of the iterative process. Then, a load flow solution is obtained using the state vector.
3.3. Wind Power Forecasting Using VMD-LSTM
The wind farms power outputs have both fluctuating and random components. Therefore, forecasting of the future wind energy production might be a challenging task. To adequately determine the EPS flexibility, it is particularly important for system operators to have as accurate forecasts of power outputs as possible.
The forecasting technique used in this paper is based on the hybrid variational mode decomposition and long short-term memory (VMD-LSTM) artificial neural network [
26]. Hybrid models can recognize hidden signal features in time series (including wind power time series) and learn from them. The original wind power time-series signal is decomposed into multiple sub-series, which are less chaotic and, consequently, more predictable. For this purpose, variational mode decomposition (further VMD method) is used. The VMD method is described in detail in [
27]. To implement this method, the following mathematical functions are used: Wiener filtering, Hilbert transform and frequency mixing, and heterodyne demodulation.
The wind power time series are decomposed according to the physical signal properties. With such a decomposition, the original wind power signal is divided into three components: the long-term trend, short-term fluctuation, and ultra-short randomness.
The algorithm for forecasting wind power consists of five steps, described below.
Select an ANN type. This study uses an LSTM ANN. It is a kind of recurrent neural network that overcomes the memory limitations by adding particular cells aimed at filtering new information (preserve or ignore);
Form a data set for training, validation, and testing. In this study, historical wind power measurements are used as a data set;
Initialize LSTM. Determine the LSTM starting parameters. The starting parameters are as follows: and are activation functions ( denotes the state (sigmoid), and denotes the gate (hyperbolic tangent)); W, M, and b are input weights, the recurrent weights, and the bias of each component, respectively; and is the cell memory state, is the hidden state, is a time-series vector.
Train LSTM. Use the method of backpropagation for training LSTM. The key element of LSTM is a cell state. During the LSTM training, the memory cell state changes. LSTM is considered to be trained if the memory cell stops changing. The following equations describe the forward pass of an LSTM unit with the input, output, and forget gates and with the memory cells at each time step
t (
Figure 3):
The sigmoid layer of the LSTM cell determines what information should be removed from the cell of state
The input gate determines what part of the new information needs to be added to the memory
The tanh layer creates the cell candidate
The new information is added
The output gate defines the extent to which the existing part of the memory contributes to the output
- 5.
Test LSTM.
Figure 3.
Long short-term memory.
Figure 3.
Long short-term memory.
Figure 4 shows a schematic representation of the VMD-based LSTM wind power forecasting where two measurements are used to predict one point.
The wind power forecasting process may be divided into several steps.
Step 1. Select the input data. Use several previous measurements (two in
Figure 4) to predict the wind power output
t + 1 min ahead.
Step 2. Perform the VMD to decompose each input datum into three features. These features are as follows: the long-term trend (, ), short-term fluctuation (, ), and ultra-short randomness (, ).
Step 3. Forecast wind power. Three components of wind power are predicted using an LSTM artificial neural network.
Step 4. Build the predicted point from , , and .
3.4. Computing Load Flow Solution t + n Minute Ahead
The load flow calculation aims to clarify the scheduled state variables at time t + n according to the information available at time t. In this case, the scheduled state variables are referred to as the load patterns and generation profiles (unit commitment solutions), to which the time instant t + n belongs. In the load flow calculation, injections of active and reactive power at all the nodes, except for the slack one, are used as independent state variables. The variables are refined in the following order:
The wind farm injections are predicted for n minutes ahead;
The capacity values for the load and generator units are taken from the data of the scheduled operating state;
The battery power is calculated according to the control strategy for the battery energy storage system (BESS) based on the forecast data on the wind farm power and the scheduled load data. The BESS control strategy can vary. For example, the strategy can suggest the use of a BESS to maximize the renewable energy penetration or to smooth a profile of power output from the wind and solar power plants. This study uses the former [
28];
The reactive power values are calculated based on the rule of maintaining the proportion between active and reactive power;
The initial voltage approximations are set. The initial approximations are the voltages calculated with the state estimation at time t;
Based on the known active and reactive injections at the nodes, the load flow solution is computed.
3.5. The Flexibility Assessment
The power system flexibility is characterized by the following three indices: ramping limit (Δ
R), power capacity (
P), and energy capacity (
E). Each index is a time derivative of the previous index [
3].
The calculation of the flexibility of the EPS resources:
Assumes that the ramping limit of the flexible source (ΔR) is equal to the lead time for which the flexibility is calculated;
Factors in the maximum and minimum generation (P) index;
Takes into account that the final energy capacity of the battery (E) limits its capabilities.
3.5.1. Modeling the Flexibility of EPS Components
Model of generator flexibility of a conventional power plant
The flexibility available from each generator
is determined by the power that can be additionally generated over the time under consideration and is calculated using the equation:
where
is the regulating reserve (employed in normal condition),
is the active power of the generator at the moment in question.
Model of battery flexibility
The flexibility available from the battery
is determined by the state of charge and the current power. If the battery is charged within the specified limits:
then the power output is calculated using the equation:
otherwise,
where
SoC is the state of charge,
is the minimum level of charge,
is the maximum level of charge,
is the active power of the battery at the moment in question.
Model of system flexibility at the time in question
The power system flexibility at the time in question (
) is determined as a sum of flexibilities of all the facilities in the system. When two kinds of flexibility are available in the system,
is calculated by the equation:
where
n1 is the number of generators at conventional plants,
n2 is the number of batteries.
3.5.2. Metric of Flexibility
Whether the power system is flexible or not during the time [
t:
t +
n] is determined by calculating a flexibility metric:
where
is the largest active loads when the power system can remain flexible,
is the active powers in a scheduled operating state.
where
is the maximum load at node
i, at a set loading of generators (at a given dispatch solution),
is the number of load nodes.
If FS > 0, then the considered EPS is flexible (during the time [t: t + n]). The value is the largest range of uncertainty, within which there is no danger for the power system. shows how much flexibility the power system has.
3.5.3. Determination of Operating State with Minimum Flexibility. Objective Function
The operating state with the minimum flexibility is calculated as a problem of nonlinear optimization (we have non-linear constraints). The optimality criterion is the maximum difference between the values of active powers at nodes with uncertainty in the scheduled operating state and in the operating state with minimum flexibility. The optimization parameters are the components of vector z, which are responsible for modeling the load value at load nodes from the minimum to maximum values.
The objective function, i.e., the maximum sum of differences between the modeled and scheduled powers at nodes with uncertainty, is written as follows:
where
r is the number of nodes with uncertainty. In this case, these are the load nodes, nodes where control actions are performed, and a slack node,
is calculated as follows [
10]:
A distinctive feature of the research is the method of forecasting the active power of a wind farm, which gives more accurate results in comparison with load forecasts. Therefore, wind farm power is considered to be an exact value and is not entered into the objective function. The predicted battery power value calculated based on the predetermined battery control strategy is also not input to the objective function. The uncertainties associated with an error in a forecast of power at the wind farm and battery are compensated for at the balancing power plant.
Each component Equation (21), given Equation (22), can be represented as follows:
When all the values independent of the optimization parameters are excluded, the objective function has the form:
In Equations (23) and (24), i is the number of a node with uncertainty, is the value of active power at node i in the scheduled operating state; is the relationship between active power and value z responsible for the variation in values of power at node i, , are the maximum (minimum) values of consumed (generated) power at node i. The maximum generated power is the maximum power that can be used in the normal operating state, in particular, to compensate for the uncertainties.
The search for optimal parameters is performed given the equality and inequality constraints. The equality constraints are the balance of active power in system Equation (25) and the equation that controls the implementation of the electric circuit laws Equation (26). The inequality constraints are introduced to control the transfer capability of the lines and the power limits at nodes with uncertainty Equations (27)–(29).
The constraints have the following form:
where
n is the number of nodes in the grid;
is the node
i power value obtained from solving the optimization problem;
are state variables at node
i;
are the voltage magnitude and phase at node
i;
is the transfer capability limit of the transmission line limited by nodes
l,
j;
,
,
,
are the maximum and minimum active power at the controlled and slack nodes, respectively.
The power balance in system Equation (25), given Equation (22) and after some transformations, is written as follows:
where
n is the number of nodes in the system,
is the system active power losses calculated in the operating state.
is for the load nodes,
is for the generator nodes.
Equation (26) guarantees the observance of Ohm’s and Kirchhoff’s laws since it includes the steady-state variables. To calculate the steady-state variables, a system of nodal equations is built in the form of power balances:
where
,
are the active and reactive conductivity of the shunt at node
l;
,
are the active and reactive power in the lines limited by nodes
l,
j;
m is the number of adjacent nodes. This system of equations is solved by Newton’s iterative method, where
,
is the accuracy of the iteration process. The achieved accuracy of Equations (31) and (32) means the end of the iterative process.
4. Case Study
4.1. Description of a Scheme and a Scenario
The developed method is applied to calculate the power system flexibility in the normal operating state and is verified using the test scheme shown in
Figure 5:
The scheme consists of six tie lines and six nodes, including a wind farm (node 1), a battery (node 5), conventional plants (nodes 2 and 6), and loads (nodes 3 and 4). Nodes 2, 3, 4, and 6 are assigned to be the nodes with uncertainty. Nodes 1 and 5 are considered to be the nodes without uncertainties since the uncertainties associated with the wind farm and the battery are assumed to be compensated for at the balancing power plant (node 6).
The calculations are performed according to the scenario: calculate the power system flexibility in two normal operating states 10 min ahead. The operating states differ from each other by the power of the battery. The load uncertainties are compensated for at the controlled plant. The uncertainties exceeding the permissible size of the control action are compensated for by the power at the balancing power plant.
The ramping limit (ΔR) is assumed to be 10 min. This means that in 10 min, the entire reserve available at a conventional plant, designed to compensate for uncertainties, is turned on, and the battery delivers the maximum power. The maximum and minimum values of active power at nodes with uncertainty and the active powers of two operating states are shown in
Table 1. The powers are taken from the operating state scheduled 10 min ahead.
4.2. Flexibility Calculation for a Six-Node System
This problem-solving process can be represented by several steps.
Step 1. Acquire the data. Perform the state estimation.
Step 2. Forecast the wind power. Make a very short-term forecast (10 min ahead). Use the historical wind power measurements as a training data set. The answers of trained LSTM are 16.14 and 15.12. (The real values of wind power output are 16.04 and 15.0).
Step 3. Determine the state variables 10 min ahead. The results are shown in
Table 1, columns 4 and 5. The real values of wind power output are shown in brackets.
Step 4. Describe the objective function and constraints following the requirements for the input data of the software programs used.
The objective function
is written as follows:
where
,
i = 2, 3, 4, 6.
The power balance in the system is written in the following way:
The constraints that control the power balances at the nodes have the form
where
are optimization parameters,
,
,
are active powers at the nodes, which are the steady-state variables. The constraints (31) and (32) are factored in in the load flow calculation.
The constraints of the form Equations (27)–(29) are built relying on the data from
Table 1.
Step 5. Solve the optimization problem considering the set constraints. The Matlab environment is employed with the function fmincon. The result of the optimization problem is . Equation (22) is then used to compute the optimal steady-state variables, which are the variables of the operating state with minimum flexibility.
Step 6. Assess the flexibility. Equation (18) is used to measure the flexibility of the power system for 10 min.
4.3. Analysis of Results and Discussion
The results are summarized in
Table 2. Columns 2 and 4 contain the active power values determined in accordance with Equation (22), where z is the result of optimization. Columns 3 and 5 show flexibility
. The last line indicates the total EPS flexibility calculated according to Equation (18).
Figure 6 shows the maximum power values (
Table 1, column 2) and the optimization results (
Table 2, columns 2 and 4).
A comparison of the preset maximum loads (
Table 1, italics) with the maximum possible loads (
Table 2, bold type) demonstrates: 1) the calculated loads do not exceed the maximum values; 2) if we take the value of loads in the scheduled operating state as 100%, then, the maximum load deviations, given the constraints set, are 13.87% and 19.63% in operating state 1 (38.82% and 12.07% in operating state 2) at nodes 3 and 4, respectively;
The flexibility of the considered system is equal to 7.02 MW and 11.32 MW for operating state 1 and operating state 2, respectively. This means that when the battery delivers the maximum power, the highest load deviation, provided that the balance can be restored, is 11.32 MW; when the battery supplies the minimum power, the maximum load deviation is 7.02 MW.
The flexibility was calculated for 25 snapshots (sets of measurements taken simultaneously). In this case, the measurements were taken 25 times every 10 min.
Figure 7 shows the active power at all the nodes in 25 normal operating states.
Figure 8 shows the active power at all the nodes in the operating states with minimum flexibility.
Figure 9 shows the difference between two operating states, where the difference between the active power at nodes 3 and 4 is used to calculate the flexibility (
). The analysis of the results, presented in
Figure 7,
Figure 8 and
Figure 9, shows how the EPS flexibility differs at different time.
The developed methodology provides information about the upward flexibility. In some cases, it is important for system operators to have the knowledge of the downward flexibility, which can be a subject of further research.
In this work, the utilized BESS control strategy was used for illustrative purposes. To determine the effect of implementing different control strategies on the EPS flexibility, further research is needed.
5. Conclusions
The paper presents a method for the real-time calculation of the flexibility of an electric power system with a wind farm. An optimality criterion has been developed to identify the combination of loads that are the maximum for the planned generating capacities in the period at issue. The problem of flexibility calculation is solved as an optimization problem with a linear objective function and equality and inequality constraints. The developed method enables a quantitative metric of flexibility to be calculated.
When solving the optimization problem, the observance of Ohm’s and Kirchhoff’s laws is guaranteed by introducing a constraint as a function representing the load flow solution. The calculation of the steady-state variables involves the construction of a system of nodal equations, which is solved by Newton’s method. The state variables are maintained within the specified limits by introducing inequality constraints.
The size of flexibility is calculated for the normal operating state disregarding emergencies in the EPS. At the same time, when using the obtained information to adjust the state variables, the system is guaranteed not to be exposed to the threat of a system failure during the considered time. The active power balance is maintained at the expense of the flexibility sources. The emergency reserve remains unchanged, which is achieved by correctly set power constraints at the slack node (the available power is reduced by the emergency reserve magnitude).
The wind farm active power has been forecast. The developed method for its forecasting is sufficiently accurate (the error of 0.6% in the first operating state, and 0.8% in second (
Table 1)). The ability of the forecasting system to predict wind power has been improved by decomposing the original wind power measurements into three components: the long-term trend, fluctuation component, and signal randomness.
The flexibility of a six-node system, which includes a wind power plant, a storage battery, two loads, and two generating plants, has been calculated. A comparative analysis of the flexibility values calculated for the different operating states shows that the EPS flexibility value depends on the state variables at the considered time instant. This confirms the need to determine flexibility in real time for some time in advance.