Received: March 18, 2022
Accepted: August 17, 2022
Available: November 2, 2022
This research focused on the development of a methodology for calculating the optimal power factor (OPF) in microgrids with the photovoltaic generation, in order to use solar inverters as reactive compensators, which will change their power factor according to the needs of the load. The developed methodology proposes a convex optimization model with multiple constraints to solve the OPF problem. Wirtinger's linearization in the power balance equation was implemented. The stochastic behavior of solar radiation was considered using the average sampling approach (ASA) to generate solar scenarios, which are used to calculate the magnitude of the generation of photovoltaic systems for specific hours of the day. Finally, the algorithm was run on CIGRE's 19-node test grid. The proposed methodology showed that as the radiation level increases during the day, more radiation scenarios can be tested, which increases the accuracy of the power factor value for each PV system. Although the general idea in power systems is to have a unity power factor, the algorithm resulted in power factors with values less than one in some inverters. This represents an injection of reactive power from the inverters to meet the reactive needs of the loads connected close to said PV generators, which is reflected in a variation in the magnitude of the power factor.
Keywords: Solar radiation studies, optimal power factor, stochastic formulation, nonlinear model, convex optimization.
Esta investigación se centró en el desarrollo de una metodología para el cálculo del factor de potencia óptimo (OPF) en micro redes con generación fotovoltaica, con el fin de usar los inversores solares como compensadores reactivos, los cuales cambiaran su factor de potencia de acuerdo a las necesidades de la carga. La metodología desarrollada planteó un modelo de optimización convexo con múltiples restricciones para resolver el problema de OPF; además, fue implementada la linealización de Wirtinger en la ecuación de balance de potencia. Se consideró el comportamiento estocástico de la radiación solar utilizando la aproximación de muestreo promedio (ASA) para generar escenarios solares, los cuales son usados para calcular la magnitud de la generación de los sistemas fotovoltaicos para horas específicas del día. Finalmente, se ejecutó el algoritmo en la red de pruebas de 19 nodos de CIGRE. La metodología propuesta mostró que, a medida que el nivel de radiación incrementa en el transcurso del día, más escenarios de radiación pueden ser puestos a prueba, lo cual aumenta la precisión del valor de factor de potencia para cada sistema PV. Aunque la idea general en los sistemas de potencia es tener un factor de potencia unitario, el algoritmo brindó como resultado factores de potencia con valores inferiores a uno en algunos inversores. Esto representa una inyección de potencia reactiva desde los inversores para suplir las necesidades de reactivos de las cargas conectadas cerca a dichos generadores PV, lo cual se refleja en una variación en la magnitud del factor de potencia.
Palabras clave: Estudios de radiación solar, factor de potencia óptimo, formulación estocástica, modelo no lineal, optimización convexa.
pL | Total power loss |
E(x) | Expected value of the random variable x |
pkG | Active power generated at the converter connected at node k |
qkG | Reactive power generated at node k |
vk | Voltage value at node k |
ykm | Component km of the nodal admittance matrix |
Sk(max) | Maximum capability of the converter connected to node k |
PkG(max) | Maximum generated power in the converter connected to node k |
vmin, vmax | Minimum and maximum voltages allowed in the grid |
ξt | Scenario of irradiance |
ρt | Probability of scenario ξt |
Modern distribution systems are characterized by high penetration of renewable energies such as wind and photovoltaics, which are integrated into the network through power inverter devices. Overcrowding in the installation of these devices has led to overvoltage, power factor violation, voltage imbalance, and other issues in electrical networks. Therefore, it is necessary to develop a methodology that allows for efficient control of the reactive power resources of these devices [
Several methods have been proposed before to solve this problem. In [
In [
In [
Mehbodniya et al. [
As mentioned earlier, the main differences between the approaches are as follows. i) The proposed model is convexified by using Wirtinger linearization on the power flow equations [
The rest of the article is organized as follows. Section 2 presents the problem statement, where the objective function and the constraints are presented while considering the conventional non-linear non-convex representation of the grid, the convex formulation, and the relaxation of the power flow equation using Wirtinger linearization. The stochastic model is also explained. Finally, the grid model and algorithm simulation results of each test case are presented in Section 3, followed by the conclusions, acknowledgments, and relevant references. This article is part of a selection of the best works presented at the Symposium X SICEL -2021.
2.1 Model Definition
Let us consider a microgrid represented by the three-phase nodal admittance matrix , which is divided in two sub-matrices, namely YS for the substation and YN for the rest of the nodes. A three-phase representation of the grid is considered, so the slack node has three components, as given in (1):
Model 1. Complete model for the optimal set point of the reactive power in a three-phase grid.
The grid is therefore represented by the following non-linear/non-affine model (2):
Where * represents the complex conjugate operator, and vk, vm ∈ VN, ykm ∈ YN. The optimization model consists of minimizing the expected value of the total losses pL, which is subject to technical constrains as follows (3)-(7):
Where (3) is a convex function that represents the expected losses of the network, (4) are non-linear and non-convex equations that represent the active and reactive power flow constraints, respectively, (5) is the maximum and minimum voltage of the grid, (6) is the capability of the converter, and (7) is the maximum power that can be generated in each node.
Note that (6) depends on the converter, whereas (7) depends on the primary resource (i.e., the scenario of the irradiance ξt). Therefore, PkG(max) is a random variable. It is important to note that (4) is maintained in complex form for the sake of a simple representation. However, this equation needs to be separated into real and imaginary parts.
This problem is difficult to solve due to the non-linear non-convex nature of the power flow equations and the stochastic nature of the model. In the next section, the model is simplified for a deterministic case in order to obtain a convex model (see [26] for a formal definition of convexity). After that, in section 2.4, the stochastic model is considered.
2.2 Convex Formulation
The problem of non-convexity and non-linearity mentioned in Subsection 2.2 must be relaxed to obtain a tractable model. There are different linearizations proposed in the literature, where the ones presented by [
Although each of these linearizations comes from a different theoretical background, they are equivalent for values close to 1 p.u. In this paper, a linearization based on Wirtinger's calculus is used. Like the previous linearization, this is equivalent to values close to 1 p.u. However, the advantage of this approach is that it guarantees an affine separation between voltages and powers in the optimization model. The distributed resources are considered by using a ZIP model. A deep mathematical analysis of this linearization is beyond the objectives of this paper but can be found in [
Where H, M, T are constant matrices defined by (9)-(11):
Therefore, constraint (4) can be represented as follows (12):
Note that (12) defines an affine space, even when it is separated into real and imaginary parts, since neither H, M or Tdepends on the power.
2.3 Stochastic Model
The proposed model is designed for microgrids and small power distribution systems. Therefore, the irradiance scenario is the same for all the panels in the grid. The methodology takes real data for generated power and defines ηt scenarios with probability ξt. In this situation, the expected value of the losses can be represented by the following sample average approximation (ASA), which defines an affine (13):
Where ξt is the probability of each scenario –the number of scenarios can grow very fast in many power systems applications. However, the main supposition of this work is that the solar panels are very close geographically, and hence the scenario is the same in all the panels along the microgrid. In this situation, the value of ηt is small, as it will be presented in the results. Collecting all the aforementioned approximations, the model takes the following structure (14) - (15) and the (5)- (7):
Model 2. Approximated convex model for the optimal power factor in a three-phase grid.
Note that this model is convex and tractable if the number of scenarios is finite. The power factor can be calculated after the optimization model is solved by using the values of p and q. In the next section, the generation of these scenarios will be presented.
The proposed model was evaluated on the CIGRE benchmark [
Here, the his.Values function represents the frequency of occurrence of each value, and the his.binedges function represents the radiation value associated with the frequency. This allows to better differentiate the results, as a general radiation value is not used for the entire operating time of the photovoltaic installation; these radiation levels change hour by hour, which implies greater precision in the results. This process is applied for three cases: one at sunrise (6:00 a.m.), another one at mid-morning (9:00 a.m.), and the last one at the maximum solar radiation point (12:00 p.m.). Figure 2 shows the number of scenarios and their corresponding frequency (which can be transformed into probability).
As shown in Figure 2, the radiation level is different in every case, at sunrise, a high frequency of occurrence on low radiation values (127.3 W/m2) and low frequency on high radiation levels can be observed.
This means that, at 6:00 a.m., the radiation received is low and, over the course of the hours, the frequency of occurrence in the other radiation values increases (mid-morning, mid-day), which represents an increase in the radiation received by the photovoltaic installation. With that in mind, the generation of the system is going to change in any case, thus allowing to obtain different power factor profiles for each scenario.
Equation (14) presents a minimization of the losses, optimizing the active and reactive power supplied by each solar power plant connected to the microgrid.
Starting from the basic definition of power factor (16) – (18), p element on (19) is defined, which limits the amount of reactive power in the grid. This is obtained as a result of the convex model programmed on MATLAB. Hence, the power factor for each optimized solar source can be obtained.
Our test system is based on CIGRE microgrid, which uses the same conductor type and grid scheme, albeit with some modifications. This microgrid has three mono-phase generators connected to each phase of node 2, three-phase solar generators connected to nodes 7, 13, and 18, with six unbalanced loads located at nodes 3, 8, 11, 14, and 15. The model was solved using the CVX convex optimization library for MATLAB, which was developed by Stanford University and executed on a computer with an Intel i7 processor and 6 GB of RAM.
3.1 Case 1 – 6:00 a.m.
This case was evaluated at 6:00 a.m. with a computational time of 11.0507 seconds. Here, the radiation level is low, and, as shown in Figure 2, the amount of data can only represent the first two of the five radiation scenarios. In Figure 3, graphs (a) and (b) plot the possible power factors for generation units 1 and 3 as an outcome of the optimization algorithm. The number of power factors presented on the graphic is related to the level of radiation and the frequency of occurrence obtained at sunrise (two scenarios: 127.3 W/m2 and 381.9 W/m2). Table 1 presents the result of (13), which represents the sum of the power factors by their frequency of occurrence, which yields the result of the expected value of the PF for each solar generation inverter unit. This value will be adjusted in the inverters to ensure an efficient operation of the network at that hour of the day. Most of the PV generation nodes were set to one, except on node 13, in which the power factor is lower than one. This represents a reactive power current flowing from the PV inverters to the grid to supply the needs of reactive power near the node 13.
3.2 Case 2 – 9:00 a.m.
The second test was evaluated at 9:00 a.m. with a computational time of 12.13337 seconds. In this case, the radiation level is higher than case 1, and, as shown in Figure 2, the amount of data can represent four out of five scenarios. In Figure 4, graphs (a) and (b) plot the possible power factors for generation units 1 and 3 as an outcome of the optimization algorithm. The number of power factors presented in the graph are related to the level of radiation and the frequency of occurrence obtained at mid-morning (four scenarios: 127.3 W/m2, 381.9 W/m2, 636.5 W/m2, and 891.1 W/m2). Table 2 presents the result of (13), which represents the sum of the power factors by their frequency of occurrence, thus yielding the result of the expected value of the PF for each solar generation inverter unit.
This value will be adjusted in the inverters to ensure an efficient operation of the network at that hour of the day. It can be observed that, for this case, two PV sources located on nodes 7 and 13 set their power factor to a value lower than one, which is due to an increase in the reactive power needs of the loads located near said nodes, which are supplied by the inverters of the sources.
3.3 Case 3 – 12:00 m.
This case was evaluated at 12:00 p.m. with a computational time of 11.5454 seconds. In this case, the radiation level is higher than in cases 1 and 2. As shown in Figure 2, the amount of data was enough to fit all the five proposed scenarios. In Figure 5, graphs (a) and (b) plot the possible power factors for generation units 1 and 3 as an outcome of the optimization algorithm. The number of power factors presented in the graph are related to the level of radiation and the frequency of occurrence obtained at midday (five scenarios: 127.3 W/m2, 381.9 W/m2, 636.5 W/m2, 891.1 W/m2, and 1145.7 W/m2). Table 3 presents the result of (13), which represents the sum of the power factors by their frequency of occurrence, thus yielding the result of the expected value of the PF for each solar generation inverter unit. This value will be adjusted in the inverters to ensure an efficient operation of the network at that hour of the day. As in the previous case, the sources connected to nodes 7 and 13 reduce their power factor because of more oversized loads and due to the fact that they are connected near said generation nodes, so their PF is altered since it must supply the necessary reactive power to feed the load.
Generator | Node | Phase | Eφ |
11∅ | 2 | A | 1.0000 |
13∅ | 7 | ABC | 0.9951 |
23∅ | 13 | ABC | 0.8662 |
33∅ | 18 | ABC | 1.0000 |
The development of an alternative methodology for reactive power management in microgrids was presented in this document. This methodology allows using linearized models, stochastic analysis, and convex optimization, the use of the capability of PV inverters to be programmed with a set of multiple power factor values which will change throughout the day. Traditionally, the main idea in power systems is to have a unitary power factor, which represents a completely resistive load. However, in the real world, there is no completely resistive load due to the multiple devices that inject or consume reactive power.
With this in mind, it was found that, in small microgrids with a high inclusion of photovoltaic generation, as the magnitude of the radiation increases during the day, photovoltaic sources increase their active power, but the power inverters tend to decrease their power factor to values lower than a unitary power factor. This implies an injection of reactive power from the sources to the grid to supply the load needs, which change over time. This injection of reactive power helps to reduce losses, increase the power transmission of the grid, and improve the voltage profiles.
An optimal setting of the power factor in multiple power inverters may replace the function of some capacitor banks or other reactive compensation devices in a microgrid. Moreover, our methodology allows to effectively set the power factor behavior of the sources with previous study of the grid and load for hourly operation throughout the day and year without the need for a master controller or communication devices that could increase the cost of the microgrid, making the small-scale use of these technologies viable.
We would like to thank the research groups, and Electrical and Computing Engineering faculties of Universidad Nacional Autónoma de Mexico, Universidad Distrital Francisco José de Caldas, and Universidad Tecnológica de Pereira. The Project did not receive funding from any public or private institution.
The authors declare no financial, professional, or personal conflict of interest arising from the publication of this article.
Alexander Casilimas: Design and programming of mathematical algorithms and stochastic analysis.
Óscar Danilo Montoya: Test case development, edition of concepts and contents of the article.
Alejandro Garcés: Operative information of MATLAB CVX library and establishment of the methodology.
César Angeles Camacho: Review and editing of the different chapters of the document, theory, and recommendations on the development methodology.