Development of Methods for Research of Electric Power System Flexibility

This paper presents deterministic methods developed to study the flexibility of an electric power system. They rely on the proposition that an electric power system is flexible if power balance is maintained at a considered time. These methods are aimed at determining the combination of the largest loads, which, when exceeded a little, disturb power balance at studied nodes. The paper presents two methods: brute-force optimization and nonlinear optimization. Results obtained using the first method are taken to be a reference for verification of nonlinear optimization output.


Introduction
In terms of control of an electric power system (EPS), the flexibility of the EPS that has generating equipment with specific maneuverability characteristics is closely related to its ability to maintain frequency and voltage in the system under uncertainty and variability [1]. Thermal and hydroelectric power plants, which can quickly ramp up and ramp down the load, provide the flexibility of the EPS on the generation side. A variety of load management techniques that have emerged owing to the development of new technologies solve the flexibility problem on the demand side. With the adoption of wind and solar farms, energy storage is becoming an important tool for ensuring flexibility.
Reserve is used in the case of an unplanned increase or decrease in load. A large number of sources of variable generation (wind, solar) in the EPS require the placement of upward and downward reserves [2]. Authors of [3] provide an overview of the operating reserves used in the USA and Europe. In [4], a methodology for determining the minimum required reserves of Russia's EPSs is given.
Energy storage devices are used to store and deliver power during a certain time. Energy storage technologies are based on different physical principles. The following classification of energy storage devices is given in [8]:  Mechanical: flywheels, hydraulic accumulators, pneumatic accumulators.  Electric: capacitors and supercapacitors.  Electrochemical: storage batteries, hydrogen fuel cells, nano-ion cells.
Author of [9] describes Superconducting Magnetic Energy Storage (SMES), which stores energy in a magnetic field created by direct current in a coil with zero electrical resistance, cooled below a characteristic critical temperature.
Researchers in many countries are studying the issues of the flexibility margin, presence, and absence in the power system. There are currently probabilistic and deterministic methods for determining flexibility.
In [11], a deterministic method was proposed to determine the largest variation range of uncertainties at which the power system remains flexible for a specified time within acceptable cost. The flexibility metric is calculated by comparing the obtained range with the target range. In [10], the flexibility residual, which is the difference between the available flexibility and the expected load ramps is calculated for each observation and horizon. Then, the probability that the residual flexibility will be less than zero is determined, which means the probability of insufficient resources in the system. In [11], the flexibility of thermostatically controlled loads (TCLs) when integrated into system-level operation and control is calculated. The authors propose a geometric approach to modeling the aggregate flexibility of TCLs. The set of valid power profiles of individual TCLs is represented by a polyhedron. Aggregated flexibility is calculated as the Minkowski sum. The authors developed an optimization algorithm for approximating polynomial by homotheties of a given convex set represented by a virtual battery model. The insufficient ramping resource expectation (IRRE) metric to estimate flexibility is calculated in [12]. For each direction and time horizon, a probability distribution of IRRE is formed. This paper presents deterministic methods developed to study the EPS flexibility. The structure of the paper is as follows. The second section discusses modeling the flexibility of EPS facilities and modeling the archive of loads. The third section presents the ideas of methods, the objective function of calculating the maximum loads and constraints. The fourth section provides a detailed description of the methods for calculating flexibility. The fifth section presents the research results. The sixth section is the conclusion.

Model of generator flexibility of a conventional station
The flexibility available from each generator is determined by the power that can be generated over the considered time horizon and is calculated by the formula [12] )

Model of battery flexibility
The flexibility available from the battery is determined by its state of charge. If the battery is charged within the specified limits max ) ( min then the power output is calculated by the formula: otherwise: (4)

Model of system flexibility
System flexibility is determined as total flexibility available from all units of flexibility where m is the number of generators at conventional stations, n is the number of batteries.

Modeling of load archive
The load at each given node i is calculated by the formula [13]: is the upper limit of load at node i, is the lower limit of load at node i. The archive of loads is formed according to the following algorithm: 1. Set the minimum and maximum values of the active load. Form vectors and , where R is the number of given load nodes.
. Specify the number of steps N, which determines the size of the archive. Calculate the step of changing the load by the formula Initial condition: z= (0) is the zero vector, k =1 is the step number.
3. Calculate the value of load by (6).
6. Go to item 3. 7. Determine all possible load values. 8. The end. The result is a modeled archive of loads

The idea of the methods. Objective function and constraints
This paper presents deterministic methods based on the proposition that an EPS is flexible if a power balance is maintained at the considered time. An increase in the load leads to a decrease in the flexibility of the system, this is why one of the key points in the analysis of the EPS flexibility is the availability of information about the maximum possible loads. The developed methods are aimed at determining the combination of maximum loads which, when exceeded a little, disturb the power balance at the studied nodes. The objective function is the maximum sum of the differences between the predicted and simulated loads at nodes with uncertainty over a given time. It is written as follows: where r is the number of nodes with uncertainty.
where in (9) i P is the forecast (pseudo measurement) of active power at node i, which has uncertainty; ) ( i i z P is the relationship between active power and value z, which is responsible for a change in the value of power at node i. Constraint (10) is the power balance at node j (any type of node), or the power balance at EPS, (11) is the constraint on line transfer capability; − is the capability limit of transmission line i-j, (12) limits the range of control actions at the controlled node, (13) is a constraint on the parameters of optimization.

A detailed description of the developed methods
The paper presents two methods for determining flexibility: 1. Brute-force optimization. 2. Nonlinear optimization.

The brute-force optimization
The brute force optimization is used to process all combinations of possible loads in EPS to determine load combinations that, when slightly exceeded, make the system inflexible. The brute force optimization algorithm is described below.   ( ) is a combination of the largest loads in EPS, which are possible under the given conditions.

Nonlinear optimization
Nonlinear minimization refers to the problem of nonlinear programming and is performed in Matlab. As a result, the values of optimization parameters used for the calculation of active power at the nodes with uncertainty are determined. In this study, the optimization parameter is z (formula (6)). Therefore, the objective function (9) and constraints (10), (11) should be written using the parameter z. Constraint (12) is taken into account by the objective function.

The objective function.
Each element of (9), taking into account (6), can be written as: (16) , remain the constant values during the optimization process. The objective function can be written as follows and after excluding all constant values it has a compact form:

Constraints
After some transformation, power balance in EPS can be written as follows where n is the number of nodes in EPS, un is the number of uncontrolled nodes.
Building the balance and transmission constraints, which are needed to ensure that all state variables be within their limits, requires the values of power flows in the lines. In this study, power flows in the lines are calculated using the PTDF (power transfer distribution factor) method [15]. PTDFs describe how active power flows in lines are changed if power injection at the node is increased or decreased.
The power transfer distribution factor in the line limited by nodes i, j is calculated in advance as follows The power balance at nodes with uncertainty is compiled as a balance of power increments where A P  is an increase (decrease) of active power at node

Determination of EPS flexibility
The flexibility of EPS is determined as follows: where is a calculated (simulated) value of the active load at node i; is a forecast of active load at node i. If > 0, then EPS is flexible. Calculations are performed using a scheme consisting of 5 nodes and 5 lines (figure 1). Nodes 3 and 4 are the nodes with uncertainty. Node 1 stands for a wind farm. Node 5 is a battery. Node 2 (conventional plant) is a controlled node where control actions are power generation required to ensure balance in the EPS, given the forecast of generation from the wind farm and the power supplied by the battery. Nodes 1 and 5 are considered to be uncontrolled. The calculations are performed according to the scenario: it is necessary to determine a combination of the largest loads at nodes 3, 4 four minutes ahead with known:  forecasts of load values at nodes 3 and 4 ( ), which are assumed to be the lower load limits;  forecast of active power output at the wind farm;  forecast of active power output at the battery;  maximum load values, which are the upper load limits;  maximum value of active power generation at node 2;  capacity limits of transmission lines. It is assumed that it takes 4 minutes for the entire available reserve at the conventional plant to be switched on and that the battery produces maximum power. The flexibility of a 5-node EPS is calculated by two methods: the brute-force optimization and non-linear optimization. The results of the first method are taken to be a reference.

The brute-force optimization applying
Using this method, the vector of active loads is determined among 900 pre-created vectors that differs as much as possible from the forecasted loads when the following constraints are met: iteration convergence tolerance is 0.05 MW (0.05 MVAr), the upper limit of power generation at node 2 is 32 MW, active power flows in all lines should be within transfer capability. The difference between the two vectors is measured by the Euclidean distance and the Chebyshev distance. As a result of applying this method, the load flow solution with the maximum possible loads at nodes 3 and 4 is calculated. Figure 2 shows the values of active power injection which are the results of the calculation of three load flow solutions: the obtained loads at nodes 3 and 4 are equal to the forecast loads (Steady state); the obtained loads at nodes 3 and 4 are the maximum loads according to Euclidean distance (SSeuclidean) and Chebyshev distance (SSchebyshev), respectively.

Nonlinear optimization applying
Solving the problem which applies the nonlinear optimization, developed in Matlab, can be divided into several steps.
Step 2. Describe the objective function and constraints in the equivalent forms which are suitable for the programs, developed in Matlab. The objective function (̄2 − 2 ( 2 )) + (̄3 − 3 ( 3 )) + (̄4 − 4 ( 4 )) → in an equivalent form is written as follows: Similar transformations are performed for constraints. EPS active power balance: is: Active power balance at nodes 3,4 are transformed into the equations: Transmission constraints − + − ∆ 2 ( 2 ) < − (37) are transformed into the following inequalities: Optimization parameters constraints are: The objective function in the Matlab codes is: Step 3. Perform optimization. The result is a vector of optimization parameters (z) with given constraints.
Step 4. Interpret the results. Calculate the load values at nodes 3, 4, and the generation at node 2, according to formula (6). Figure 3 shows the active power values at nodes 2, 3, 4 before (SS), and after (SS max) optimization.
Step 5. Check if the obtained state variables meet the given limits. If the result is negative, invalid state variables are assumed to be corrected.

Analysis of results
The results obtained by the two methods are summarized in Table 2. The last line shows the flexibility calculated by (28) using different methods. Table 3 presents the values calculated by the formula: where is the EPS flexibility ( Table 2) calculated by the brute-force method using Euclidean distance (8.8MW) or Chebyshev distance (9.3MW), is EPS flexibility (12.9 MW, Table 2) calculated by nonlinear optimization. The active powers, which are the result of three load flow solution problems and the result of the nonlinear optimization, are shown in Figure 4.  Table 2 and Figure 4 shows that • Comparison of the given maximum loads (italics) with the maximum possible loads calculated by different methods (bold) shows that the loads calculated using nonlinear optimization are closer to the given maximum loads; • The flexibility of the considered EPS is 12.9 MW (formula 28) according to nonlinear optimization, 8.8 MW and 9.3 MW according to the brute-force method when using the Euclidean distance and Chebyshev distance, respectively, as a metric. Table 3 shows that the nonlinear optimization results are closer to the results obtained by the brute-force method in the case of the Chebyshev distance used as a metric (4.1> 3.6).
Findings have revealed that the calculation of load flow solution in the case where the result of nonlinear optimization is used as the initial data, requires that reactive power be added at node 3 for all variables to be within given limits.

Conclusion
The paper describes the methods for determining the flexibility of the electric power system: the brute-force and nonlinear optimization. In the brute-force method, the Euclidean distance and the Chebyshev distance are used as a metric for comparing the two vectors. For nonlinear optimization, a function developed in Matlab is used.
The nonlinear optimization results are analyzed. The analysis shows that the loads calculated using nonlinear optimization are closer to the given maximum loads. The study indicates that to ensure the reactive power balance in the EPS at the obtained load values, it is necessary to increase the reactive power at node 3.
A comparative analysis of the results has shown that the reference for the verification of the nonlinear optimization output should be the results calculated by the brute-force algorithm based on the Chebyshev distance as a metric.
An algorithm was developed to create an archive of loads required for the brute-force method.