Next Article in Journal
3D Skeletal Volume Templates for Deep Learning-Based Activity Recognition
Previous Article in Journal
Correction: He et al. A 3.95 ppm/°C 7.5 μW Second-Order Curvature Compensated Bandgap Reference in 0.11 μm CMOS. Electronics 2022, 11, 2869
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

A Mathematical Modeling Approach for Power Flow and State Estimation Analysis in Electric Power Systems through AMPL

by
Hugo A. Ruiz Florez
1,
Gloria P. López
2,
Álvaro Jaramillo-Duque
3,
Jesús M. López-Lezama
3,* and
Nicolás Muñoz-Galeano
3
1
Department of Electrical Engineering, Federal Technological University of Parana, Medianeira 85884-000, PR, Brazil
2
Academic Department of Computational Science, Federal Technological University of Parana, Santa Helena 85892-000, PR, Brazil
3
Research Group on Efficient Energy Management (GIMEL), Department of Electrical Engineering, University of Antioquia (UdeA), Medellin 050010, Colombia
*
Author to whom correspondence should be addressed.
Electronics 2022, 11(21), 3566; https://doi.org/10.3390/electronics11213566
Submission received: 12 October 2022 / Revised: 27 October 2022 / Accepted: 28 October 2022 / Published: 1 November 2022

Abstract

:
This paper presents a mathematical modeling approach by which to solve the power flow and state estimation problems in electric power systems through a mathematical programming language (AMPL). The main purpose of this work is to show the advantages of representing these problems through mathematical optimization models in AMPL, which is a modeling language extensively used in a wide range of research applications. The proposed mathematical optimization models allow for dealing with particular issues in that they are not usually considered in the classical approach for power flow and state estimation, such as solving the power flow problem considering reactive power limits in generation buses, as well as the treatment of errors in state estimation analysis. Furthermore, the linearized mathematical optimization models for both problems at hand are also presented and discussed. Several tests were carried out to validate the proposed optimization models, evidencing the applicability of the proposed approach.

1. Introduction

1.1. Motivation

Determining the steady-state operating point of an electric power system (EPS) is an indispensable activity that must be routinely carried out by power engineers and power system operators. Once the topology and the electrical parameters are known, the operating point of an EPS is given by finding the values of the state variables, represented as the magnitudes and angles of bus voltages. From these values, it is possible to calculate active and reactive power flows through the transmission lines, as well as power losses [1,2,3]. Determining the steady-state operating point of an EPS is the basic step for more complex studies such as vulnerability analysis [4,5,6], voltage stability studies [7,8,9], protection coordination [10,11,12,13], and optimal power flow [14,15,16], among other things. On the other hand, the state estimation consists of providing the best possible estimate of the true state of the system based on real-time bus voltages data [17,18,19].
Several formulations have been proposed in the specialized literature to solve the power flow and state estimation problems in EPS, among which the AC and linearized formulations stand out. Traditionally, the AC power flow and state estimation problems are solved iteratively through the Newton–Raphson method [20] and through the weighted least squares (WLS) method [21], respectively. Furthermore, the linearized power flow and state estimation problems incorporate a series of approximations that makes it possible to determine the operating point of an EPS in a more simplified way by solving a linear system of equations [22,23].
The load flow and state estimation problems have been widely studied in the specialized literature. Most commercial software for power system analysis include several variants of the power flow problem such as the Newton–Raphson, Gauss–Seidel, DC, and other methods. Nonetheless, the majority of commercially available software does not include a state estimation routine as evidenced in Table 1 (adapted from [24]).
A common drawback of most commercial software is the limitation to make changes in their programming to address other well-known problems in EPS such as power loss minimization [25], optimal power flow [26], transmission network expansion planning [27], optimal PMUs allocation [28], and power system observability [29], among other things.
According to the above, the purpose of this work is to show an alternative solution approach to the power flow and state estimation problems through mathematical optimization models. This allows for surpassing the difficulties mentioned above, because a reliable software widely adopted in EPS analysis, such as AMPL, can be used to solve both problems.
Additionally, this work shows that from the proposed mathematical optimization models, it is possible to incorporate new procedures that allow for solving two particular issues in EPS: computing the operating point of a power system considering reactive power limits in generation or PV buses in the power flow analysis, and the treatment of errors in the state estimation analysis. Furthermore, the mathematical optimization models for the linearized power flow and state estimation problems are also presented.

1.2. Literature Review

The state estimation problem has been the focus of several studies in the last few years. This is specially true for dynamic state estimation. The main drivers for research in this area include the lack of accurate models, the increasing availability of time-synchronized measurements, and advances in computational capability and scalability. The advantages of dynamic vs. static state estimation, based on modeling, monitoring, and operation aspects are discussed in [30].
A dynamic state estimation methodology for integrated natural gas and electric power systems is proposed in [31] by using the Kalman filter algorithm with a time-varying scalar matrix to deal with bad data. In this case, the authors combine gas and power systems through gas turbine units. A real-time state estimation approach for combined heat and power systems is also proposed in [32]. A Kalman filter algorithm is also used in [33] for the state estimation problem that evidenced accurate estimation under a variety of abnormal situations. In [34], the authors propose a graph theory-based method that aims to identify critical elements in state estimation. In this case, the authors use conventional measurements, such as branch power flows and bus power injections as well as synchrophasors.
A state estimation model for combined heat and electric networks is proposed in [35] where the Monte Carlo method is used to evaluate the performance of the proposed evaluator. False data injection attacks constitute a real threat to power systems’ reliability. In [36], the authors propose optimal coding schemes that aim to detect false data injection attacks in electric power system state estimation. Inaccurate estimation results may lead to incorrect control decisions by system operators. In [37], the authors develop a dynamic state estimation approach taking into account multi-level false data identification to guarantee accurate estimation despite eventual errors in the dataset. An analysis of bad data processing methodologies in electric power system state estimation is carried out in [38].
AMPL is defined as a high-level mathematical modeling language developed specifically for solving mathematical programming problems (linear programming and nonlinear programming) with discrete or continuous variables [39,40]. The AMPL language allows us to express in a simplified way mathematical optimization models by using a computational syntax similar to the mathematical models that are described in the literature [41]. Basically, AMPL works as an interface that allows one to read the files in which the mathematical model is described and then translated to be interpreted by optimization solvers, so that it is possible to obtain its solution [42]. In [43], it is possible to find a list of the different solvers that can be used to solve mathematical optimization problems by using AMPL.
In the specialized literature, there is a great variety of publications that use AMPL to solve mathematical optimization problems. A summary of some of the most recent academic works in EPS that were implemented in AMPL is shown below.
In [44], a mixed-integer conic programming model is proposed to solve the reconfiguration problem in electric distribution systems with the intention of reducing power losses. The authors emphasize that the proposed mathematical model is characterized by low computational effort, high accuracy, and ease of implementation; furthermore, it can be solved by several commercial and open source solvers.
In [45], the authors transform a mixed-integer nonlinear programming (MINLP) model into a mixed-integer linear programming (MILP) problem to solve the dynamical location problem of a mobile charging station for coverage of electric vehicles. The mathematical model is implemented in AMPL, and the optimal solution of the problem is obtained through the Cplex solver.
In [46], a binary linear programming (LP) model is proposed to optimize restoration actions in the resiliency problem for distribution systems considering uncertain devices and associated asynchronous information. The proposed mathematical model is implemented in AMPL and solved by using the Gurobi solver. The mathematical model was validated by using the IEEE-123 test system with low execution time.
The authors in [47] propose a convex mixed-integer conic programming formulation for the optimal placement of capacitors in electric distribution networks. The proposed model is implemented in AMPL and solved by using the Knitro and Cplex solvers. The model was tested in two benchmark power systems. The results show that the proposed mathematical model is easy to implement and provides solutions in low computational times. In [48], the authors provide optimization models for solving logically constrained AC optimal power flow problems. Because the existing nonlinear solvers are not capable of solving the logically constrained problems, the logical constraints must be recast to solver-friendly terms. Thus, the proposed MINLP models are adapted to the presolving and probing techniques of solvers. In this case, the models are implemented in AMPL and solved by using the Knitro solver.
Despite of the fact that AMPL has been extensively used for solving many problems in EPS, it can be stated that there are scarce works using AMPL as an alternative to solve the problems of load flow and state estimation. However, in [49], the authors propose a mathematical model to solve the optimal load flow problem that could be adapted to perform load flow analysis. This mathematical model is implemented in AMPL and solved through the CPlex and Gurobi solvers. On the other hand, in [50], a nonlinear programming model is presented to solve the state estimation problem. Because this mathematical model does not have an error-handling procedure, some modifications are implemented in the formulation, and a procedure that allows obtaining better results than the conventional state estimation method is proposed.
As indicated in Table 1 there are almost no commercially available software tools that handle both power flow and state estimation analyses. In this sense, this paper proposes the modeling of both power flow and state estimation procedures (in their AC and DC versions) as mathematical optimization problems. It is worth mentioning that the main focus of this paper is not the solution algorithms to the power flow or state estimation problems but instead to envisage them from a different perspective. The main advantage of recasting these procedures from the standpoint of mathematical optimization problems is the fact that different variants or features can be added.

1.3. Article Contributions and Organization

To summarize, the main features and contributions of this paper are provided below:
  • The power flow and state estimation problems are modeled as mathematical optimization problems in their AC and DC versions.
  • Limits on reactive power injections in generation buses are modeled through a generation to load bus conversion procedure (PV to PQ bus conversion).
  • A procedure for decreasing negative impacts of errors (error-handling procedure) is implemented in the state estimation problem.
  • The proposed models for solving the load flow and state estimation problems with their corresponding variants are integrated in AMPL. Furthermore, they are easy to implement and obtain satisfactory results quickly and reliably.
Given the aforementioned features, the proposed methods are susceptible to be implemented in real-life applications. On the one hand, the power flow calculation is widely used in the industry and has been sufficiently studied; nonetheless, it is not often modeled from the point of view of an optimization problem, which opens the possibility for other applications. Moreover, the state estimation problem can be adapted not only for power systems alone but also for hybrid applications with natural gas, as explored in [31,32]. Finally, the proposed models open the possibility for exploring dynamic state estimation approaches.
The rest of the document is organized as follows: Section 2 and Section 3 present an overview of the power flow and state estimation problems in EPS, respectively; Section 4 and Section 5 describe the proposed mathematical optimization models for the AC/linearized power flow and AC/linearized state estimation problems, respectively. Section 6 presents the results obtained with several IEEE test systems, and finally, the conclusions of the study are shown in Section 7.

2. Representation of the Power Flow Problem

Several approaches for the power flow problem are proposed in the specialized literature, among which the AC and linearized formulations stand out. The main aspects of these formulations are presented below.

2.1. AC Power Flow

The AC power flow (also known as load flow) consists of obtaining the values of the nodal complex voltages ( V i , θ i ) , from the powers injected in the different buses of an EPS related to a specific operating point. The most common procedure by which to solve the AC power flow problem is the Newton–Raphson method. This method iteratively determines the values of V i , θ i , so that the mismatches of active and reactive power tend to zero ( Δ P i 0 and Δ Q i 0 ). In this way, the power balance equations at every bus (slack, P V and P Q nodes) are satisfied. The active and reactive power balance Equations are given by (1) and (2), respectively, where Δ P i and Δ Q i are the active and reactive mismatches at bus i, respectively, P i G and Q i G are the active and reactive power generated at bus i, respectively, P i D and Q i D are the active and reactive power demanded at bus i, respectively, and finally P i ( V , θ ) and Q i ( V , θ ) represent the calculated active and reactive power injections at bus i, respectively:
Δ P i = P i G P i D P i ( V , θ )
Δ Q i = Q i G Q i D Q i ( V , θ ) .
The solution of the AC power flow problem is achieved through the following strategy:
  • Subproblem 1. Calculate by an iterative process the values of V i and θ i at load nodes (known as P Q nodes); compute θ i at generation nodes (referred to as P V nodes).
  • Subproblem 2. Calculate the values of P i G and Q i G at the slack bus (known as V θ bus) and Q i G at P V nodes; compute the values of the power flows P i j and Q i j in all circuits of the EPS.
The above procedure refers to the conventional approach used to solve the load flow problem. However, there are other versions of this problem usually referred to as power flow with voltage/reactive power controls and limits.

2.2. Linearized Power Flow

The linearized power flow, also known as DC power flow, incorporates a series of approximations so that obtaining the EPS operating point is calculated in a more simplified way. Thus, the objective of the linearized power flow is to determine the values of the angles of the nodal voltages θ i , using as input information the parameters of the network and the nodal active power injections. To solve the linearized power flow problem, it is sufficient to solve the linear system of equations given by (3), taking into account that θ i = 0 at the reference bus and that B is a susceptance matrix.
P = B θ .
Active power losses can also be considered in the linearized load flow. However, in this work the version of the linearized power flow that ignores the active power losses will be used. This is a common practice in this type of electrical studies.

3. Representation of the State Estimation Problem

In the state estimation, unlike the load flow analysis, after estimating the values of the state variables, it is necessary to perform an additional procedure to validate the results. The objective of such a procedure is to debug eventual errors present in the measurements used to determine the EPS operating point, thus allowing the results obtained by the state estimator to be more reliable.
Different methods have been proposed to solve the state estimation problem in EPS, the weighted least squares (WLS) method being one of the most commonly used. Within the WLS state estimation methods, different formulations have been proposed, among which the AC state estimator and the linearized state estimator stand out [51]. The main aspects of these formulations are presented below.

3.1. AC State Estimator

The AC state estimator determines the most probable values of the state variables ( x ^ ) , represented by the complex voltages ( V i , θ i ) , from the values coming from the meter composing the supervisory control and data acquisition (SCADA) system. Therefore, to solve the AC state estimation problem, the WLS state estimator iteratively computes the values of ( V i , θ i ) , such that the value of the WLS function J ( x ^ ) is minimized, as shown in Equation (4),
J ( x ^ ) = z h ( x ^ ) t W z h ( x ^ ) ,
where z corresponds to the vector containing the values of the input information coming from the SCADA system, h ( x ^ ) is the vector containing the values of the variables calculated as a function of the values of x ^ , and W is the measurement weighting matrix.
To determine the values of x ^ that minimize the function J ( x ^ ) , shown in Equation (4), it is necessary to apply the first-order optimality conditions, as indicated by Equation (5):
J ( x ^ ) x ^ = H t W ( z h ( x ^ ) ) = 0 .
In this case, H = h ( x ^ ) / x ^ is defined as the Jacobian matrix. The problem indicated by Equation (5) can be solved iteratively by using the normal equation method as follows in Equation (6),
x ^ v + 1 = x ^ v + G 1 H t ( z h ( x ^ v ) ) ,
where G = H t W H is known as the gain matrix and can be used to evaluate the observability of the EPS, and v is the iteration counter.
In ideal conditions, the solution of the state estimation problem allows for finding the values of x ^ in such a way that J ( x ^ ) = 0 . However, in real life, reaching this condition is not possible due to several factors, such as the accuracy of the meters, calibration problems, and noises in the SCADA data acquisition system, among others. For this reason, after estimating the values of x ^ , it is necessary to perform an additional validation of results, in order to mitigate the negative impact that measurement noises exert on the final results of the state estimator.

3.2. Linearized State Estimator

The linearized state estimator incorporates some approximations in the formulation used in the AC state estimation problem, so that the state variables are calculated by means of a simplified procedure. According to the above, the linearized state estimator presents the following characteristics:
  • Vector x ^ contains the angles of the voltages, except the angle of the slack bus which is used as reference.
  • Vector z is made up of the measurements of injections and active power flows.
  • Matrices H and G are constant.
  • The state variables are calculated directly by using Equation (7).
x ^ = G 1 H t W z
Although this method provides an approximation of the operating point of an EPS, being less accurate than its nonlinear counterpart, it is widely used in various methodologies, such as observability analysis and error treatment [23].

4. Proposed Mathematical Optimization Models for Load Flow and Linearized Load Flow

To represent the EPS load flow problem as a mathematical optimization model, the mathematical formulations implemented in the AC power flow and linearized power flow problems are used as reference.

4.1. Mathematical Model of the AC Load Flow Problem

The mathematical model given by Equations (8)–(11), known as the classical nonlinear power flow model (NLPFM), is proposed to solve the EPS power flow problem:
min P L = ( i , j Ω L ) g i j t i j 2 V i 2 + V j 2 2 t i j V i V j cos ( θ i j + φ i j ) s . t . :
P i G P i D ( i , j Ω L ) P i j = 0 , i Ω B
Q i G Q i D + Q i s h ( i , j Ω L ) Q i j = 0 , i Ω B
Q i G ̲ Q i G Q i G ¯ , i Ω B .
The objective function, given by Equation (8), represents the total active power losses. In this case, Ω is the set of branches, g i j is the real part of the i j element of the nodal admitance matrix, t i j is the transformation ratio, θ i j is the voltage angle difference between nodes i and j, and φ i j is the angle associated with the nodal admitance matrix. The constraints given by Equations (9) and (10) represent the active and reactive power balance in every node of the system, where Q i s h is the shunt reactive injection at bus i. Finally, Equation (11) corresponds to the reactive power generation limits at generation buses. In this case, active and reactive power flows in both ways are given by Equations (12)–(15), where P i j and Q i j are the active and reactive power flows in branch i , j , respectively, and b i j is the imaginary part of the i , j position of the admitance bus matrix:
P i j = ( t i j V i ) 2 g i j t i j V i V j g i j cos ( θ i j + φ i j ) + b i j sin ( θ i j + φ i j ) )
Q i j = V i 2 ( t i j 2 b i j + b i j s h ) + t i j V i V j b i j cos ( θ i j + φ i j ) g i j sin ( θ i j + φ i j ) )
P j i = V j 2 g i j t i j V i V j g i j cos ( θ i j + φ i j ) b i j sin ( θ i j + φ i j ) )
Q j i = V j 2 ( b i j + b i j s h ) + t i j V i V j b i j cos ( θ i j + φ i j ) + g i j sin ( θ i j + φ i j ) ) .
Through the classical NLPFM, it is possible to calculate the values of V i , θ i , P i G and Q i G i Ω B , P i j , P j i , Q i j and Q j i i j Ω L , as well as the values of P i j L and Q i j L .
The classical NLPFM obtains the solution of an AC load flow problem satisfactorily, provided that the values of Q i G in Equation (11) are within the allowed limits. However, the main drawback of the NLPFM is that if the computed solution does not satisfy Equation (11); then, the operating point is not satisfactorily calculated.
To surpass this inconvenience, the following strategy, known as NLPFM with P V to P Q node conversion procedure, is proposed, which is similar to the procedure used by the iterative AC power flow method:
Step 1. Initialization: Read input data and set iteration counter v = 0 .
Step 2. Solve the classical NLPFM: Determine the EPS operating point without considering the constraint given by Equation (11).
Step 3. Convergence test: If all values of Q i G ( v ) at P V buses satisfy constraint (11), then go to step 5.
Step 4. Update: In case the constraint (11) is not met, make Q i G ( v + 1 ) = Q i G ¯ or Q i G ( v + 1 ) = Q i G ̲ depending on whether the maximum or minimum limit has been exceeded, respectively. Consequently, the EPS database has to be modified so that the corresponding P V bus is transformed into P Q bus. Set v = v + 1 and return to step 2.
Step 5. Final results: Finish the procedure and print the results of the calculated operating point.
Thus, by means of a simple and easy-to-implement procedure, the NLPFM with P V to P Q bus conversion procedure is able to overcome the limitations of the classical NLPFM. A flowchart of the aforementioned procedure is illustrated in Figure 1.

4.2. Mathematical Model of the Linearized Load Flow Problem

The Linearized Power Flow Model (LPFM) takes into account the following approximations:
  • In power transmission lines r i j < < x i j , then it can be considered that r i j = 0 . Therefore, g i j = 0 and b i j = 1 / x i j .
  • Assuming that V i 1 i Ω B and supposing that the values of θ i j and φ i j are small; then V i V j cos ( θ i j + φ i j ) 1 and V i V j sin ( θ i j + φ i j ) θ i j + φ i j .
Therefore, the linearized power flow problem can be solved by using Equations (16) and (17).
min P L = ( i , j ) Ω L P i j + P j i s . t . :
P i G P i D ( i , j ) Ω L P i j = 0 i Ω B .
The objective function shown in Equation (16) corresponds to the active power losses of the EPS. This expression will always be zero because there are no power losses. The constraint given by Equation (17) represents the active power balance. The active power flows are calculated by Equations (18) and (19):
P i j = t i j ( θ i j + φ i j ) x i j
P j i = t i j ( θ i j + φ i j ) x i j .
Through the LPFM, it is possible to calculate the values of θ i and P i G i Ω B , as well as, P i j and P j i i j Ω L .

5. Mathematical Optimization Model of the State Estimation Problem and Linearized State Estimation Problem

To represent the state estimation problem in EPS as a mathematical optimization model, the classical NLPFM, as well as the formulations of the AC state estimator and the linearized state estimator presented in the previous sections, are used as a reference.

5.1. Mathematical Model of the State Estimation Problem AC

To solve the state estimation problem in the EPS, the following mathematical model was proposed in [50], referred to in this paper as the classical nonlinear state estimation model (NLSEM):
min J ( x ^ ) = ( m , i , j ) Ω M W i j r m i j 2 + ( m , i , j ) Ω M Δ z m i j 2 s . t . :
r m i j = z m i j h ( x ^ ) m i j + Δ z m i j , m i j Ω M
p z m i j Δ z m i j p z m i j , m i j Ω M ,
where the first term of the objective function shown in Equation (20) represents the WLS function and the second one represents the maximum allowable deviation for each measurement. The constraint given by Equation (21) corresponds to the residual of each of the available measurements, and Equation (22) indicates the range of allowed values for Δ z m i j . In this case, p = 0 represents an ideal meter.
To compute the value of h ( x ^ ) m i j in Equation (21), the type of measurement ( m ) and its location ( i j ) must be considered, as shown in Equations (23) and (24). In this case, the authors define ( i = j ) for subscripts of power injections and voltage measurements.
  • Measurements of active and reactive power injections:
h ( x ^ ) m i j = P i = k Ω B V i V k G i k cos ( θ i k + φ i k ) + B i k sin ( θ i k + φ i k ) , m i j Ω M : m = 1
h ( x ^ ) m i j = Q i = k Ω B V i V k G i k sin ( θ i k + φ i k ) B i k cos ( θ i k + φ i k ) , m i j Ω M : m = 2 .
The elements of the Y B U S matrix in (23) and (24) are calculated by using Equations (25) to (28):
G i i = ( i m ) Ω L t i m 2 g i m
B i i = b i s h + ( i m ) Ω L ( b i m s h + t i m 2 g i m )
G i k = t i k g i k cos φ i k + b i k sin φ i k
B i k = t i k g i k sin φ i k b i k cos φ i k .
  • Active power flow measurements:
h m i j ( x ^ ) = P i j = t i j V i 2 g i j t i j V i V j g i j cos ( θ i j + φ i j ) + b i j sin ( θ i j + φ i j ) , m i j Ω M : m = 3
h m i j ( x ^ ) = P j i = V j 2 g i j t i j V i V j g i j cos ( θ i j + φ i j ) b i j sin ( θ i j + φ i j ) , m i j Ω M : m = 3 .
  • Reactive power flow measurements:
h m i j ( x ^ ) = Q i j = V j 2 t i j 2 b i j + b i j s h + t i j V i V j b i j cos ( θ i j + φ i j ) g i j sin ( θ i j + φ i j ) , m i j Ω M : m = 4
h m i j ( x ^ ) = Q j i = V j 2 b i j + b i j s h + t i j V i V j b i j cos ( θ i j + φ i j ) + g i j sin ( θ i j + φ i j ) , m i j Ω M : m = 4 .
  • Voltage measurements:
h m i j ( x ^ ) = V i , m i j Ω M : m = 5 .
By solving the above mathematical model, it is possible to obtain the values of V i and θ i at all buses, as well as the value of the function J ( x ^ ) and the residuals r m i j for each measurement.
It is important to highlight that the classical NLSEM obtains the solution of the AC state estimation problem in a satisfactory way, provided that there are no considerable errors in the set of measurements. However, the main disadvantage of the classical NLSEM is that it does not incorporate an error-handling procedure to reduce the negative impact that errors in the measurement set can have on the estimated results.
To solve this difficulty, the following procedure called NLSEM with error-treatment procedure was proposed in [50], which allows for obtaining more accurate results even if there are errors in the set of measurements:
Step 1. Initialization: Input data and set the iteration counter v = 0 .
Step 2. Solve the classical NLPFM: Calculate the operating point of the EPS.
Step 3. Convergence test: If the value of J ( x ^ ) ≤ tolerance then go to step 5.
Step 4. Update: If J ( x ^ ) > tolerance then update z m i j ( v + 1 ) = z m i j ( v ) + Δ z m i j ( v ) , set v = v + 1 and go back to step 2.
Step 5. Final results: Finish the procedure and print the results of the calculated operating point.
Thus, by means of a simple and easy to apply procedure, the NLPFM with errors treatment procedure is able to overcome the limitations of the classical NLSEM.

5.2. Mathematical Model of the Linearized State Estimation Problem

One of the advantages of the NLSEM with the error-treatment procedure is that a number of considerations can be made to represent the linearized state estimation problem. Thus, to determine the solution of the linearized state estimation problem, the equations of the active power injections and flows shown in (34) and (35) must be used.
  • Active power injection measurements:
h m i j ( x ^ ) = ( i , k ) Ω L t i k θ i k + φ i k x i k , m = 1 .
  • Active power flow measurements:
h m i j ( x ^ ) = t i j θ i j + φ i j x i k , m = 3 .
Therefore, by solving this mathematical model given by Equations (34) and (35), known as linearized state estimation model (LSEM) with error treatment procedure, it is possible to obtain the values of θ i i Ω B , as well as the value of the function J ( x ^ ) and the residuals r m i j of each measurement.

6. Tests and Results

Initially, several tests were carried out in order to validate the performance of the proposed mathematical models for solving the load flow and state estimation problems. First, a comparison was carried out with Matpower software [52] and a classic state estimation approach implemented in [50] for different IEEE test systems. This first validation proved the effectiveness of the proposed models. Secondly, a detail analysis is carried out by using the IEEE 118-bus test system. In this latter case, The results were divided in two parts according to the formulation of the mathematical models. In the first part, the Knitro solver is used to solve the NLPFM with P V to P Q bus conversion procedure and the NLSEM with error treatment procedure. In the second part, the CPlex solver was used to solve the linear counterparts of these problems. All simulations were performed on a personal computer with a processor of 1.8 GHz, four cores and 8 GB RAM.

6.1. Preliminary Comparison and Validation

A preliminary validation of the proposed models was carried out with different test systems for comparative purposes. Several simulations were performed by using as reference the operating points of the IEEE 14, 30, 57, and 118 bus test systems available at [53]. A summary of the results is presented in Table 2 and Table 3 where active and reactive power losses are compared, respectively, for each system. Note that the results obtained with the proposed mathematical models and those computed by Matpower [52] and a classical state estimation approach [50] are quite similar. In this sense, the greatest difference of results was around 0.04%, which can be considered as negligible; furthermore, the computation times were also quite similar and do not constitute a serious issue because they are all within the range of a few tenths of a second.
A detailed discussion of the state estimation problem and a more in-depth comparison among different methodologies can be consulted in [54,55,56].

6.2. Solving the Nonlinear Power Flow and State Estimation Problems Using the Knitro Solver

Considering the nonlinear equation of the proposed models to solve the AC load flow and state estimation problems, the Knitro solver, which is one of the most widely used solvers for this type of mathematical model, was used. The main results obtained are presented below.

6.2.1. Results of the Proposed NLPFM with PV to PQ Bus Transformation Procedure

Initially, the operating point of the test system is determined by using the classical NLPFM. In this case, an infeasible solution is obtained, because at buses 19, 32, 34, 92, 103, and 105 the reactive power capacity limits are exceeded. Thus, it is clear that the classical NLPFM cannot determine the solution of the IEEE 118-bus test system, because it does not consider the possibility of converting P V buses into P Q buses.
Table 4 shows the values of the variables V i , θ i and Q i G on the PV buses whose reactive power limits were exceeded.
According to the previous results, it can be seen that there is a more significant difference in the values of the variables θ i and Q i G .
Finally, the values of the bus voltages for the IEEE 118-bus test system using the NLPFM with P V to P Q bus conversion procedure are presented in Figure 2.
The results obtained by the NLPFM with P V to P Q bus conversion procedure are used as a reference to choose the set of measurements that will be part of the input data of the proposed state estimator.

6.2.2. Results of the Proposed NLSEM with Error Treatment Procedure

Taking into account that for the IEEE 118-bus test system the values of 235 state variables must be estimated, it is necessary to strategically choose a set of measurements to avoid observability problems [29]. Thus, 470 measurements (voltage measurements, power flow and power injections) were chosen from the results obtained of the power flow analyses.
Initially, to perform a validation of the results obtained by the NLSEM with error handling procedure, the operating point of the test system is calculated considering that there are no bad data in the measurement set. For this reason, Figure 3 shows the absolute errors of the voltages and angles (calculated based on the results obtained by NLPFM with P V to P Q conversion procedure).
Figure 3 shows that there is a small error in the calculation of voltage angles. In this case, the error in voltage magnitudes are not illustrated because they are lower than 1 × 10 5 ). However, the value of the objective function J ( x ^ ) = 1.3461 × 10 7 obtained through NLSEM with error handling procedure, indicates that the values of the state variables have been correctly estimated.
On the other hand, in order to compare the performance of the mathematical models proposed to solve the state estimation problem considering multiple bad data in the measurement set, random errors are added to each of the measurements present in the database.
First, the operating point of the test system is estimated by using the classical NLSEM. The impact that the added errors have on the obtained results can be measured through the objective function value J ( x ^ ) = 5904.1288 , which indicates that errors are present in the measurement set. Therefore, the estimated operating point using the classical NLSEM cannot be considered valid. Then, the operating point of the test system is determined by using NLSEM with error handling procedure and subsequently, the absolute errors of the voltage magnitudes and angles are calculated, as shown in Figure 4.
The objective function value J ( x ^ ) = 4.3492 × 10 7 indicates that the errors added in the measurement set have been properly mitigated, and therefore the operating point of the test system was satisfactorily estimated by using the NLSEM with the error-handling procedure.

6.2.3. Performance of the Knitro Solver

To assess the performance of the Knitro solver when dealing with the proposed procedures for solving the power flow and state estimation problems, a summary of results is presented in Table 5, which was provided by the Knitro solver for the carried out simulations.

6.3. Solving Power Flow and State Estimation Problems by Using Cplex Solver

Based on the LPFM and LSEM equations proposed to solve the linearized power flow and state estimation problems by using AMPL, it is recommended that one use Cplex solver, which is widely used to solve linear programming, mixed-integer programming, and quadratic programming problems. The main results obtained by using the IEEE-118 system as the test system are presented below.

6.3.1. Results of the LPFM

The operating point of the IEEE 118-bus test system is approximately calculated by using the proposed LPFM. The nodal voltage angles as well as the absolute errors of the calculated angles with reference to the values obtained in the NLPF with P V 4 to P Q bus conversion procedure, are shown in Figure 5.
The results provided by the proposed LPFM are used as a reference in the analyses of the proposed linearized state estimator.

6.3.2. Results of Proposed LSEM with Error-Treatment Procedure

Considering that the IEEE 118-bus test system has 117 state variables to estimate, a total of 176 measurements (injections and active power flow) distributed along the system were selected in order to ensure its observability. Then, the operating point is calculated by using the proposed LSEM with error handling procedure, considering the absence of bad data in the set of measurements, in order to make a comparison of the results obtained with the LPFM. Thus, the values of the angles obtained by using the LSEM and the absolute errors calculated based on the LPFM results are presented in Figure 6.
The previous results show that there is a small difference between the results of the proposed LPFM and the proposed LSEM with the error-handling procedure. Furthermore, the value of the function J ( x ^ ) = 2.3146 × 10 8 confirms that no errors are present in the measurement set.
Subsequently, by adding random errors in each of the measurements present in the database, the operating point of the test system is calculated by using the classical LSEM. The value of the function J ( x ^ ) = 224.6175 , indicates errors in the set of measurements, and therefore the estimated values of the state variables cannot be considered valid. In this case, an error-handling procedure must be implemented. Therefore, the operating point of the test system is calculated by using LSEM with the error-treatment procedure, the results of which are shown in Figure 7.
According to the objective function value J ( x ^ ) = 1.4190 × 10−6 obtained in the previous simulation, it can be concluded that the errors added to the database have been satisfactorily mitigated.

6.3.3. Performance of the CPlex Solver

The performance CPlex to solve the proposed linearized power flow and state estimation problems by using AMPL is indicated in Table 6. This information was provided by the CPlex solver when running the simulations.

6.3.4. Validation of Results

To validate the results obtained with the Knitro and CPlex solvers, a comparison is made with other solvers that can be used in AMPL, namely Conopt and Snopt (used for nonlinear programming models) as well as Gurobi and Minos (used for linear programming models).
Table 7 shows the main results of the operating point obtained through the NLPFM with PV to PQ bus conversion procedure by using nonlinear solvers. It is possible to verify that the results obtained by Knitro, Conopt and Snopt solvers represent the same operating point for the IEEE 118-bus test system.
On the other hand, Table 8 shows a comparison of the results obtained by the nonlinear solvers when solving the NLSEM with errors treatment procedure. It can be verified that the three solvers present the same results.
According to the above, in Table 9 and Table 10 it is possible to compare the results obtained by the solvers CPlex, Gurobi, and Minos, used in the LPFM and LSEM with error treatment procedure. In both situations, it was verified that the solvers obtained the same results.

7. Conclusions

This paper proposes an alternative to solve the existing limitations in commercial software used to solve the problems of load flow and state estimation in EPS. Considering that both methodologies are closely related to each other, it is important to have a reliable computational tool, such as the mathematical modeling language AMPL, that allows performing both types of studies.
The results obtained show that it is possible to represent the power flow and state estimation problems through mathematical optimization models. Therefore, the mathematical models of the AC load flow and state estimation problems, as well as their linear counterparts were presented. These models were successfully solved by using the Knitro and CPlex solvers, respectively.
Additionally, it was shown that one of the advantages of representing the power flow and state estimation problems through mathematical optimization consists on the possibility of manipulating the mathematical formulation to incorporate new procedures, such as considering reactive power limits in generation buses and error-treatment procedures. Potential applications of the proposed models include the development of a dedicated system, dynamic state estimation with errors and false data input treatment, as well as hybrid applications that combine electric power with gas and heat systems.
With regard to future work, the possibility of solving other optimization problems in electric power systems based on the mathematical models used in this work is proposed. Additionally, it is possible to develop new mathematical optimization models to solve the power flow and state estimation problems in distribution systems.

Author Contributions

Conceptualization, H.A.R.F., G.P.L., Á.J.-D., J.M.L.-L. and N.M.-G.; data curation, H.A.R.F. and G.P.L.; formal analysis, H.A.R.F., G.P.L., Á.J.-D., J.M.L.-L. and N.M.-G.; funding acquisition, Á.J.-D., J.M.L.-L. and N.M.-G.; investigation, H.A.R.F., G.P.L., Á.J.-D., J.M.L.-L. and N.M.-G.; methodology, H.A.R.F. and G.P.L.; project administration, H.A.R.F., G.P.L., Á.J.-D., J.M.L.-L. and N.M.-G.; resources, H.A.R.F., G.P.L., Á.J.-D., J.M.L.-L. and N.M.-G.; software, H.A.R.F., G.P.L., Á.J.-D., J.M.L.-L. and N.M.-G.; supervision, Á.J.-D., J.M.L.-L. and N.M.-G.; validation, H.A.R.F., G.P.L., Á.J.-D., J.M.L.-L. and N.M.-G.; visualization, H.A.R.F., G.P.L., Á.J.-D., J.M.L.-L. and N.M.-G.; writing—original draft, H.A.R.F., G.P.L., Á.J.-D., J.M.L.-L. and N.M.-G.; writing—review and editing, H.A.R.F., G.P.L., Á.J.-D., J.M.L.-L. and N.M.-G. All authors have read and agreed to the published version of the manuscript.

Funding

This research received no external funding.

Institutional Review Board Statement

Not applicable.

Informed Consent Statement

Not applicable.

Data Availability Statement

Not applicable.

Acknowledgments

The authors gratefully acknowledge the support from the Colombia Scientific Program within the framework of the call Ecosistema Científico (Contract No. FP44842-218-2018). The authors also want to acknowledge the “estrategia de sostenibilidad” at Universidad de Antioquia in Medellín, Colombia, as well as the Department of Electrical Engineering (UTFPR) and the Academic Department of Computational Science (UTFPR) at Paraná, Brazil for their support in the development of this work.

Conflicts of Interest

The authors declare no conflict of interest.

References

  1. Zhu, J.; Mo, X.; Xia, Y.; Guo, Y.; Chen, J.; Liu, M. Fully-Decentralized Optimal Power Flow of Multi-Area Power Systems Based on Parallel Dual Dynamic Programming. IEEE Trans. Power Syst. 2022, 37, 927–941. [Google Scholar] [CrossRef]
  2. Guo, X.; Bao, H.; Xiao, J.; Chen, S. A Solution of Interval Power Flow Considering Correlation of Wind Power. IEEE Access 2021, 9, 78915–78924. [Google Scholar] [CrossRef]
  3. Yan, Z.; Xu, Y. Real-Time Optimal Power Flow: A Lagrangian Based Deep Reinforcement Learning Approach. IEEE Trans. Power Syst. 2020, 35, 3270–3273. [Google Scholar] [CrossRef]
  4. Biswas, R.S.; Pal, A.; Werho, T.; Vittal, V. A Graph Theoretic Approach to Power System Vulnerability Identification. IEEE Trans. Power Syst. 2021, 36, 923–935. [Google Scholar] [CrossRef]
  5. Agudelo, L.; López-Lezama, J.M.; Muñoz-Galeano, N. Vulnerability assessment of power systems to intentional attacks using a specialized genetic algorithm. Dyna 2015, 82, 78–84. [Google Scholar] [CrossRef]
  6. Dong, Z.; Tian, M.; Ding, L. A Framework for Modeling and Structural Vulnerability Analysis of Spatial Cyber-Physical Power Systems From an Attack–Defense Perspective. IEEE Syst. J. 2021, 15, 1369–1380. [Google Scholar] [CrossRef]
  7. Li, D.; Sun, M.; Fu, Y. A General Steady-State Voltage Stability Analysis for Hybrid Multi-Infeed HVDC Systems. IEEE Trans. Power Deliv. 2021, 36, 1302–1312. [Google Scholar] [CrossRef]
  8. Montoya, O.D.; Gil-González, W.; Arias-Londoño, A.; Rajagopalan, A.; Hernández, J.C. Voltage Stability Analysis in Medium-Voltage Distribution Networks Using a Second-Order Cone Approximation. Energies 2020, 13, 5717. [Google Scholar] [CrossRef]
  9. Zhang, X.; Shao, X.; Fu, Y.; Zhao, X.; Jiang, G. Transient Voltage Recovery Control and Stability Criterion of VSC-Based DC Power Grid. IEEE Trans. Power Syst. 2021, 36, 3496–3506. [Google Scholar] [CrossRef]
  10. Jaramillo Serna, J.d.J.; López-Lezama, J.M. Alternative Methodology to Calculate the Directional Characteristic Settings of Directional Overcurrent Relays in Transmission and Distribution Networks. Energies 2019, 12, 3779. [Google Scholar] [CrossRef]
  11. Saldarriaga-Zuluaga, S.D.; López-Lezama, J.M.; Muñoz-Galeano, N. An Approach for Optimal Coordination of Over-Current Relays in Microgrids with Distributed Generation. Electronics 2020, 9, 1740. [Google Scholar] [CrossRef]
  12. Pola, S.; Azzouz, M.A. Optimal Protection Coordination of Active Distribution Networks With Synchronverters. IEEE Access 2022, 10, 75105–75116. [Google Scholar] [CrossRef]
  13. Saldarriaga-Zuluaga, S.D.; López-Lezama, J.M.; Muñoz-Galeano, N. Adaptive protection coordination scheme in microgrids using directional over-current relays with non-standard characteristics. Heliyon 2021, 7, e06665. [Google Scholar] [CrossRef] [PubMed]
  14. Bian, J.; Wang, H.; Wang, L.; Li, G.; Wang, Z. Probabilistic optimal power flow of an AC/DC system with a multiport current flow controller. CSEE J. Power Energy Syst. 2021, 7, 744–752. [Google Scholar] [CrossRef]
  15. Lopez-lezama, J.M.; Murillo-Sanchez, C.; Zuluaga, L.; Gutierrez-Gomez, J. A Contingency-Based Security-Constrained Optimal Power Flow Model For Revealing The Marginal Cost of a Blackout Risk-Equalizing Policy in the Colombian Electricity Market. In Proceedings of the 2006 IEEE/PES Transmission Distribution Conference and Exposition: Latin America, Caracas, Venezuela, 15–18 August 2006; pp. 1–6. [Google Scholar] [CrossRef]
  16. Bernal-Romero, D.L.; Montoya, O.D.; Arias-Londoño, A. Solution of the Optimal Reactive Power Flow Problem Using a Discrete-Continuous CBGA Implemented in the DigSILENT Programming Language. Computers 2021, 10, 151. [Google Scholar] [CrossRef]
  17. Zhao, J.; Gómez-Expósito, A.; Netto, M.; Mili, L.; Abur, A.; Terzija, V.; Kamwa, I.; Pal, B.; Singh, A.K.; Qi, J.; et al. Power System Dynamic State Estimation: Motivations, Definitions, Methodologies, and Future Work. IEEE Trans. Power Syst. 2019, 34, 3188–3198. [Google Scholar] [CrossRef]
  18. Chen, Y.; Chen, H.; Jiao, Y.; Ma, J.; Lin, Y. Data-driven Robust State Estimation Through Off-line Learning and On-line Matching. J. Mod. Power Syst. Clean Energy 2021, 9, 897–909. [Google Scholar] [CrossRef]
  19. Zhao, J.; Zhang, G.; Dong, Z.Y.; La Scala, M. Robust Forecasting Aided Power System State Estimation Considering State Correlations. IEEE Trans. Smart Grid 2018, 9, 2658–2666. [Google Scholar] [CrossRef]
  20. Le Nguyen, H. Newton-Raphson method in complex form. IEEE Trans. Power Syst. 1997, 12, 1355–1359. [Google Scholar] [CrossRef]
  21. Caro, E.; Conejo, A.J. State estimation via mathematical programming: A comparison of different estimation algorithms. IET Gener. Transm. Distrib. 2012, 6, 545–553. [Google Scholar] [CrossRef]
  22. Stott, B.; Jardim, J.; Alsaç, O. DC Power Flow Revisited. IEEE Trans. Power Syst. 2009, 24, 1290–1300. [Google Scholar] [CrossRef]
  23. Xu, L.; Tomsovic, K.; Bose, A. Topology error identification using a two-stage DC state estimator. Electr. Power Syst. Res. 2005, 74, 167–175. [Google Scholar] [CrossRef]
  24. Zamora-Cárdenas, E.A.; Pizano-Martínez, A.; Lozano-García, J.M.; Gutiérrez-Martínez, V.J.; Cisneros-Magaña, R. Computational development of a practical educational tool for state estimation of power systems using the MATLAB optimization toolbox. Int. J. Electr. Eng. Educ. 2019, 56, 105–123. [Google Scholar] [CrossRef]
  25. Marujo, D.; Zanatta, G.L.; Flórez, H.A.R. Optimal management of electrical power systems for losses reduction in the presence of active distribution networks. Electr. Eng. 2021, 103, 1725–1736. [Google Scholar] [CrossRef]
  26. Madani, R.; Sojoudi, S.; Lavaei, J. Convex Relaxation for Optimal Power Flow Problem: Mesh Networks. IEEE Trans. Power Syst. 2015, 30, 199–211. [Google Scholar] [CrossRef]
  27. Rider, M.J.; Garcia, A.V.; Romero, R. Power system transmission network expansion planning using AC model. IET Gener. Transm. Distrib. 2007, 1, 731–742. [Google Scholar] [CrossRef]
  28. Chen, J.; Abur, A. Placement of PMUs to Enable Bad Data Detection in State Estimation. IEEE Trans. Power Syst. 2006, 21, 1608–1615. [Google Scholar] [CrossRef]
  29. Korres, G.N.; Manousakis, N.M. State estimation and observability analysis for phasor measurement unit measured systems. IET Gener. Transm. Distrib. 2012, 6, 902–913. [Google Scholar] [CrossRef]
  30. Zhao, J.; Netto, M.; Huang, Z.; Yu, S.S.; Gómez-Expósito, A.; Wang, S.; Kamwa, I.; Akhlaghi, S.; Mili, L.; Terzija, V.; et al. Roles of Dynamic State Estimation in Power System Modeling, Monitoring and Operation. IEEE Trans. Power Syst. 2021, 36, 2462–2472. [Google Scholar] [CrossRef]
  31. Chen, L.; Li, Y.; Huang, M.; Hui, X.; Gu, S. Robust Dynamic State Estimator of Integrated Energy Systems Based on Natural Gas Partial Differential Equations. IEEE Trans. Ind. Appl. 2022, 58, 3303–3312. [Google Scholar] [CrossRef]
  32. Zhang, T.; Zhang, W.; Zhao, Q.; Du, Y.; Chen, J.; Zhao, J. Distributed Real-time State Estimation for Combined Heat and Power Systems. J. Mod. Power Syst. Clean Energy 2021, 9, 316–327. [Google Scholar] [CrossRef]
  33. Zhao, H.; Tian, B. Robust Power System Forecasting-Aided State Estimation With Generalized Maximum Mixture Correntropy Unscented Kalman Filter. IEEE Trans. Instrum. Meas. 2022, 71, 1–10. [Google Scholar] [CrossRef]
  34. Soares Lima, R.C.; Brown Do Coutto Filho, M.; Stachinni de Souza, J.C.; Protti, F. Topological Approach for Identifying Critical Measurements and Sets in State Estimation. IEEE Lat. Am. Trans. 2022, 20, 100–107. [Google Scholar] [CrossRef]
  35. Sheng, T.; Yin, G.; Wang, B.; Guo, Q.; Dong, J.; Sun, H.; Pan, Z. State estimation approach for combined heat and electric networks. CSEE J. Power Energy Syst. 2022, 8, 225–237. [Google Scholar] [CrossRef]
  36. Liu, C.; Deng, R.; He, W.; Liang, H.; Du, W. Optimal Coding Schemes for Detecting False Data Injection Attacks in Power System State Estimation. IEEE Trans. Smart Grid 2022, 13, 738–749. [Google Scholar] [CrossRef]
  37. Gao, Z.; Hu, S.; Sun, H.; Liu, J.; Zhi, Y.; Li, J. Dynamic State Estimation of New Energy Power Systems Considering Multi-Level False Data Identification Based on LSTM-CNN. IEEE Access 2021, 9, 142411–142424. [Google Scholar] [CrossRef]
  38. Basu, S.; Lavrova, O.; Ranade, S. Analysis of Bad Data Processing Methodologies in Power System State Estimation. In Proceedings of the 2021 North American Power Symposium (NAPS), College Station, TX, USA, 11–14 April 2021; pp. 1–6. [Google Scholar] [CrossRef]
  39. Olszak, A.; Karbowski, A. Parampl: A Simple Tool for Parallel and Distributed Execution of AMPL Programs. IEEE Access 2018, 6, 49282–49291. [Google Scholar] [CrossRef]
  40. Fourer, R.; Gay, D.M.; Kernighan, B.W. AMPL: A Modeling Language for Mathematical Programming; Thomson: Scituate, MA, USA, 2003. [Google Scholar]
  41. Gay, D.M. The AMPL Modeling Language: An Aid to Formulating and Solving Optimization Problems. Numer. Anal. Optim. 2015, 134, 95–116. [Google Scholar] [CrossRef]
  42. Kurth, F.; Schupp, S.; Weißleder, S. Generating Test Data from a UML Activity Using the AMPL Interface for Constraint Solvers. Tests Proofs 2014, 8570, 169–186. [Google Scholar] [CrossRef]
  43. AMPL Solvers. Available online: https://ampl.com/products/solvers/all-solvers-for-ampl/ (accessed on 21 July 2022).
  44. Mahdavi, M.; Alhelou, H.H.; Hatziargyriou, N.D.; Al-Hinai, A. An Efficient Mathematical Model for Distribution System Reconfiguration Using AMPL. IEEE Access 2021, 9, 79961–79993. [Google Scholar] [CrossRef]
  45. Wang, F.; Chen, R.; Miao, L.; Ye, B. Location Optimization of Electric Vehicle Mobile Charging Stations Considering Multi-Period Stochastic User Equilibrium. Sustainability 2019, 11, 5841. [Google Scholar] [CrossRef] [Green Version]
  46. Bedoya, J.C.; Xie, J.; Wang, Y.; Zhang, X.; Liu, C.C. Resiliency of Distribution Systems Incorporating Asynchronous Information for System Restoration. IEEE Access 2019, 7, 101471–101482. [Google Scholar] [CrossRef]
  47. Aldik, A.; Venkatesh, B. Reactive power planning using convex line-wise power balance equations for radial distribution systems. IET Gener. Transm. Distrib. 2020, 14, 2399–2406. [Google Scholar] [CrossRef]
  48. Pourakbari-Kasmaei, M.; Mantovani, J.R. Logically constrained optimal power flow: Solver-based mixed-integer nonlinear programming model. Int. J. Electr. Power Energy Syst. 2018, 97, 240–249. [Google Scholar] [CrossRef] [Green Version]
  49. Mohamed, A.A.; Venkatesh, B. Line-Wise Optimal Power Flow Using Successive Linear Optimization Technique. IEEE Trans. Power Syst. 2019, 34, 2083–2092. [Google Scholar] [CrossRef]
  50. Florez, H.A.R.; Marujo, D.; López, G.P.; López-Lezama, J.M.; Muñoz-Galeando, N. State Estimation in Electric Power Systems Using an Approach Based on a Weighted Least Squares Non-Linear Programming Modeling. Electronics 2021, 10, 2560. [Google Scholar] [CrossRef]
  51. Abur, A.; Gómez-Expósito, A. Power System State Estimation: Theory and Implementation; Marcel Dekker: New York, NY, USA, 2004. [Google Scholar]
  52. Zimmerman, R.D.; Murillo-Sánchez, C.E.; Thomas, R.J. MATPOWER: Steady-State Operations, Planning, and Analysis Tools for Power Systems Research and Education. IEEE Trans. Power Syst. 2011, 26, 12–19. [Google Scholar] [CrossRef] [Green Version]
  53. University of Washington. Power Systems Test Case Archive. Available online: http://www2.ee.washington.edu/research/pstca (accessed on 15 December 2021).
  54. Kamireddy, S.; Schulz, N.N.; Srivastava, A.K. Comparison of state estimation algorithms for extreme contingencies. In Proceedings of the 2008 40th North American Power Symposium, Calgary, AB, Canada, 28–30 September 2008; pp. 1–5. [Google Scholar] [CrossRef]
  55. Nagy, I.; Suzdaleva, E.; Mlynářová, T. Comparison of state estimation using finite mixtures and hidden Markov models. In Proceedings of the 6th IEEE International Conference on Intelligent Data Acquisition and Advanced Computing Systems, Prague, Czech Republic, 15–17 September 2011; Volume 2, pp. 527–531. [Google Scholar] [CrossRef]
  56. Patel, M.Y.; Girgis, A.A. A Comparison of State Estimation Based External Network Modeling Methods. In Proceedings of the 2006 Power Systems Conference: Advanced Metering, Protection, Control, Communication, and Distributed Resources, Clemson, SC, USA, 14–17 March 2006; pp. 517–522. [Google Scholar] [CrossRef]
Figure 1. Flowchart of the proposed NLPF approach with P V to P Q bus conversion procedure.
Figure 1. Flowchart of the proposed NLPF approach with P V to P Q bus conversion procedure.
Electronics 11 03566 g001
Figure 2. Voltage magnitudes and angles of the IEEE 118-bus tests system using the NLPFM with P V to P Q bus conversion procedure.
Figure 2. Voltage magnitudes and angles of the IEEE 118-bus tests system using the NLPFM with P V to P Q bus conversion procedure.
Electronics 11 03566 g002
Figure 3. Results of the NLSEM with error-treatment procedure considering no bad data in the measurement set.
Figure 3. Results of the NLSEM with error-treatment procedure considering no bad data in the measurement set.
Electronics 11 03566 g003
Figure 4. Results of the NLSEM with error-treatment procedure considering multiple bad data in the measurement set.
Figure 4. Results of the NLSEM with error-treatment procedure considering multiple bad data in the measurement set.
Electronics 11 03566 g004
Figure 5. Results obtained with the LPFM.
Figure 5. Results obtained with the LPFM.
Electronics 11 03566 g005
Figure 6. Results of the LSEM with errors treatment procedure without bad data in the measurement set.
Figure 6. Results of the LSEM with errors treatment procedure without bad data in the measurement set.
Electronics 11 03566 g006
Figure 7. Results of the LSEM with errors treatment procedure considering multiple bad data in the measurement set.
Figure 7. Results of the LSEM with errors treatment procedure considering multiple bad data in the measurement set.
Electronics 11 03566 g007
Table 1. Available software for load flow and state estimation.
Table 1. Available software for load flow and state estimation.
Commercial SoftwarePower FlowState EstimationOpen Source SoftwarePower FlowState Estimation
PowerWorldYesNoMATPOWERYesYes
DIgSILENTYesNoPSATYesNo
PSSEYesNoUWPFLOWYesNo
PSCADYesNoVSTYesNo
SimPower SystYesNoPSTYesNo
ETAPYesYesPCFLOYesNo
NEPLANYesNoPowerWorldYesNo
DSAToolsYeYesNoPowSysGuiYesNo
EUROSTAGYesNopandapowerYesYes
SimpowYesNoPowerModels.jlYesNo
CYMEYesNoPYPOWERYesNo
Table 2. Comparison of active power losses (MW) for different IEEE test systems.
Table 2. Comparison of active power losses (MW) for different IEEE test systems.
MethodologyIEEE-14IEEE-30IEEE-57IEEE-118
Classic approach [50]13.392917.548827.8640132.4280
Matpower [52]13.393217.511827.8611132.4813
NLPFM with PV to PQ conversion13.392917.548827.8640132.4820
NLSEM with error treatment13.393117.549127.8635132.4821
Table 3. Comparison of reactive power losses (MVAr) for different IEEE test systems.
Table 3. Comparison of reactive power losses (MVAr) for different IEEE test systems.
MethodologyIEEE-14IEEE-30IEEE-57IEEE-118
Classic approach [50]54.535867.6889121.6698782.2816
Matpower [52]54.537267.6996121.6643782.2786
NLPFM with PV to PQ conversion54.535867.6889121.6698782.2816
NLSEM with error treatment54.536267.6900121.6692782.2830
Table 4. Comparison of results in P V buses with reactive power limit violations.
Table 4. Comparison of results in P V buses with reactive power limit violations.
BusClasical NLPFMNLPFM with PV to PQ Conversion Procedure
V i ( p . u ) θ i ( deg ) Q i G ( p . u ) V i ( p . u ) θ i ( deg ) Q i G ( p . u )
190.962011.3147−0.14270.963411.3068−0.0800
320.963015.0607−0.16280.963615.0595−0.1400
340.984011.5114−0.20830.985911.5059−0.0800
920.990033.8808−0.13960.992333.8545−0.0300
1031.010024.31780.75421.000724.48550.4000
1050.965020.6436−0.18330.966020.6184−0.0800
Table 5. Final statistics obtained by the Knitro solver.
Table 5. Final statistics obtained by the Knitro solver.
Mathematical Model
Characteristics
NLPFM with PV to PQ
Transformation Procedure
NLSEM with Errors
Treatment Procedure
Locally optimal solution found?YESYES
Number of variables10611638
Number of constraints1014940
Final objective function value5.8412 × 10−184.3492 × 10−7
Final feasibility absolute error3.01 × 10−101.39 × 10−10
Final optimally absolute error9.90 × 10−91.38 × 10−8
Number of objective function
evaluations
1390
Total program time (s)0.07900.7220
Table 6. Final statistics obtained by the CPlex solver.
Table 6. Final statistics obtained by the CPlex solver.
Mathematical Model CharacteristicsLPFMLSEM with Errors
Treatment Procedure
Optimal solution found?YESYES
Number of variables1061497
Final objective function value2.314 × 10−81.4190 × 10−6
Number of objective function evaluations888
Total program time (s)0.01001.037
Table 7. Main results of the operating point of the IEEE 118-bus test system calculated by NLPFM with P V to P Q bus conversion procedure using nonlinear solvers.
Table 7. Main results of the operating point of the IEEE 118-bus test system calculated by NLPFM with P V to P Q bus conversion procedure using nonlinear solvers.
Simulation ResultsKnitro SolverConopt SolverSnopt Solver
Maximum voltage magnitude (p.u) V 10 = 1.0500 V 10 = 1.0500 V 10 = 1.0500
Minimum voltage magnitude (p.u) V 76 = 0.9430 V 76 = 0.9430 V 76 = 0.9430
Maximum voltage angle (degrees) θ 89 = 39.7507 θ 89 = 39.7507 θ 89 = 39.7507
Minimum voltage angle (degrees) θ 41 = 7.0663 θ 41 = 7.0663 θ 41 = 7.0663
Maximum active power flow (p.u) P 10 9 = 4.5000 P 10 9 = 4.5000 P 10 9 = 4.5000
Minimum active power flow (p.u) P 75 70 = 0.0020 P 75 70 = 0.0020 P 75 70 = 0.0020
Maximum reactive power flow (p.u) Q 8 5 = 1.2461 Q 8 5 = 1.2461 Q 8 5 = 1.2461
Minimum reactive power flow (p.u) Q 105 104 = 0.0038 Q 105 104 = 0.0037 Q 105 104 = 0.0037
Total active power flow (p.u) P L = 1.3262 P L = 1.3262 P L = 1.3262
Total reactive power flow (p.u) Q L = 7.8295 Q L = 7.8295 Q L = 7.8295
Table 8. Main results of the operating point of the IEEE 118-bus test system calculated by NLSEM with error-treatment procedure by using nonlinear solvers.
Table 8. Main results of the operating point of the IEEE 118-bus test system calculated by NLSEM with error-treatment procedure by using nonlinear solvers.
Simulation ResultsKnitro SolverConopt SolverSnopt Solver
Maximum voltage magnitude (p.u) V 10 = 1.0534 V 10 = 1.0534 V 10 = 1.0534
Minimum voltage magnitude (p.u) V 76 = 0.9392 V 76 = 0.9392 V 76 = 0.9392
Maximum voltage angle (degrees) θ 89 = 39.6941 θ 89 = 39.6941 θ 89 = 39.6943
Minimum voltage angle (degrees) θ 41 = 7.1594 θ 41 = 7.1594 θ 41 = 7.1594
Maximum active power flow (p.u) P 10 9 = 4.4756 P 10 9 = 4.4757 P 10 9 = 4.4757
Minimum active power flow (p.u) P 75 70 = 0.0092 P 75 70 = 0.0092 P 75 70 = 0.0092
Maximum reactive power flow (p.u) Q 8 5 = 1.2900 Q 8 5 = 1.2900 Q 8 5 = 1.2900
Minimum reactive power flow (p.u) Q 105 104 = 0.0056 Q 105 104 = 0.0055 Q 105 104 = 0.0055
Total active power flow (p.u) P L = 1.3280 P L = 1.3280 P L = 1.3280
Total reactive power flow (p.u) Q L = 7.8141 Q L = 7.8141 Q L = 7.8141
Table 9. Main results of the operating point of the IEEE 118-bus test system calculated by LPFM by using linear solvers.
Table 9. Main results of the operating point of the IEEE 118-bus test system calculated by LPFM by using linear solvers.
Simulation ResultsCPlex SolverGurobi SolverMinos Solver
Maximum voltage angle (degrees) θ 10 = 41.1854 θ 10 = 41.1854 θ 10 = 41.1854
Minimum voltage angle (degrees) θ 41 = 10.2004 θ 41 = 10.2004 θ 41 = 10.2004
Maximum active power flow (p.u) P 10 9 = 4.5000 P 10 9 = 4.5000 P 10 9 = 4.5000
Minimum active power flow (p.u) P 19 34 = 0.0020 P 19 34 = 0.0020 P 19 34 = 0.0020
Total active power flow (p.u) P L = 0.0000 P L = 0.0000 P L = 0.0000
Table 10. Main results of the operating point of the IEEE 118-bus test system calculated by LSEM with error-treatment procedure by using linear solvers.
Table 10. Main results of the operating point of the IEEE 118-bus test system calculated by LSEM with error-treatment procedure by using linear solvers.
Simulation ResultsCPlex SolverGurobi SolverMinos Solver
Maximum voltage angle (degrees) θ 10 = 40.6006 θ 10 = 40.6006 θ 10 = 40.6006
Minimum voltage angle (degrees) θ 41 = 9.6281 θ 41 = 9.6280 θ 41 = 9.6281
Maximum active power flow (p.u) P 10 9 = 4.4754 P 10 9 = 4.4754 P 10 9 = 4.4753
Minimum active power flow (p.u) P 19 34 = 0.0039 P 19 34 = 0.0039 P 19 34 = 0.0039
Total active power flow (p.u) P L = 0.0000 P L = 0.0000 P L = 0.0000
Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Share and Cite

MDPI and ACS Style

Ruiz Florez, H.A.; López, G.P.; Jaramillo-Duque, Á.; López-Lezama, J.M.; Muñoz-Galeano, N. A Mathematical Modeling Approach for Power Flow and State Estimation Analysis in Electric Power Systems through AMPL. Electronics 2022, 11, 3566. https://doi.org/10.3390/electronics11213566

AMA Style

Ruiz Florez HA, López GP, Jaramillo-Duque Á, López-Lezama JM, Muñoz-Galeano N. A Mathematical Modeling Approach for Power Flow and State Estimation Analysis in Electric Power Systems through AMPL. Electronics. 2022; 11(21):3566. https://doi.org/10.3390/electronics11213566

Chicago/Turabian Style

Ruiz Florez, Hugo A., Gloria P. López, Álvaro Jaramillo-Duque, Jesús M. López-Lezama, and Nicolás Muñoz-Galeano. 2022. "A Mathematical Modeling Approach for Power Flow and State Estimation Analysis in Electric Power Systems through AMPL" Electronics 11, no. 21: 3566. https://doi.org/10.3390/electronics11213566

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop