Faculty of Engineering Master thesis Tertiary control in microgrids: an optimal power flow approach based on convex optimization and Wirtinger calculus by Diego Alejandro Ramirez Loaiza August 19, 2020
www.utp.edu.co
TERTIARY CONTROL IN MICROGRIDS: AN OPTIMAL POWER FLOW
APPROACH BASED ON CONVEX OPTIMIZATION AND WIRTINGER
CALCULUS.
by: Diego Alejandro Ramirez Loaiza (email: alejandro.ramirez@utp.edu.co) Advisor: Professor Alejandro Garcés Ruiz (email: alejandro.garces@utp.edu.co). Master in electric Power Engineering Universidad Tecnológica de Pereira August 19, 2020
Abstract This work presents a tertiary control for microgrids considering renewable energy sources and energy storage devices. The proposed model considers the operation in 24h including capacity and grid-code limitations. The optimization problem under consideration is non-convex, therefore, the model is approximated to a convex representation, by using a linear formulation of the optimal power flow equations via Wirtinger’s calculus. As for the mathematical methodology, the use of convex optimization and Wirtinger calculus guarantee uniqueness of the solution, global optimality and convergence of the algorithms. These characteristics are key for applications in automation processes such as the tertiary control which requires real-time operation. The model is implemented in a low cost small single-board computer (Raspberry-pi) programmed in Python. Numerical experiments on the CIGRE low voltage test system demonstrate the usage of the model.
Contents
1
Introduction
6
1.1
Motivation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
6
1.2
State of the art . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
7
1.3
Contribution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
9
1.4
Outline of the thesis . . . . . . . . . . . . . . . . . . . . . . . . . . .
10
2
Operation of microgrids
11
2.1
Hierarchical control . . . . . . . . . . . . . . . . . . . . . . . . . . .
11
2.2
Grid-connected operation . . . . . . . . . . . . . . . . . . . . . . . .
13
2.3
Islanded operation . . . . . . . . . . . . . . . . . . . . . . . . . . . .
14
2.3.1
Intended-island operation . . . . . . . . . . . . . . . . . . . .
15
2.4
Real time operation . . . . . . . . . . . . . . . . . . . . . . . . . . .
16
2.4.1
Wireless communication delay on microgrids control . . . . .
17
3
Tertiary control and optimal power flow
18
3.1
Tertiary control . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
18
3.2
Three-phase grid model . . . . . . . . . . . . . . . . . . . . . . . . .
19
3.3
Load model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
22
3.4
Photovoltaic panels . . . . . . . . . . . . . . . . . . . . . . . . . . .
23
3.5
Wind turbines . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
23
3.6
Energy storage
. . . . . . . . . . . . . . . . . . . . . . . . . . . . .
24
3.7
Power electronics . . . . . . . . . . . . . . . . . . . . . . . . . . . .
25
3.8
Static reserve . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
25
3.9
Non-convex tertiary control model . . . . . . . . . . . . . . . . . . .
26
4
Convex formulation of the tertiary control
28
4.1
The OPF problem . . . . . . . . . . . . . . . . . . . . . . . . . . . .
28
4.2
Convex identification . . . . . . . . . . . . . . . . . . . . . . . . . .
29
4.3
Wirtinger’s linearization
. . . . . . . . . . . . . . . . . . . . . . . .
29
4.4
Wirtinger linearization for the power flow equations . . . . . . . . . .
30
4.5
Wirtinger linearization for the exponential model of the loads . . . . .
32
4.6
Operation under surplus energy limitation . . . . . . . . . . . . . . .
CONTENTS
5
Results
34
5.1
Linearization accuracy . . . . . . . . . . . . . . . . . . . . . . . . .
34
5.2
Tertiary control . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
36
5.2.1
Case 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
39
5.2.2
Case 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
41
5.3
Time response of Convex-TC using Raspberry Pi . . . . . . . . . . .
43
6
Conclusions
45
6.1
Further work
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
46
Appendixes
46
A Data for the benchmark microgrid
47
B Brief review on Wirtinger’s calculus
Nomenclature 핀3 Identity matrix of size 3 × 3 휔nom Rated wind speed of wind turbins 휕 Conventional derivative 휌푠 Productivity coefficient of solar unitŝ 휕 Wirtinger’s derivative 퐷(푡) Deficit of power 퐸(푡) Energy in the battery 퐼 Branch currents 퐼 Nodal currents 푃charge Losses in the energy storage during charging 푃discharge Losses in the energy storage during discharging 푃퐿 Power losses of the system 푃퐵+ Power in the battery during charging 푃퐵− Power in the battery during discharging 푃푃푉 Upper bound of active power supplied by solar units 푃푊푇 Upper bound of active power supplied by wind turbines 푉 Nodal voltages 푣nom Nominal voltage of the system 푌 Three-phase admittance matrix Convex-TC Convex tertiary control DERs Distributed energy resources NC-TC Non-convex tertiary control
RES
Renewable energy sources
Chapter 1 Introduction
1.1
Motivation Modern power distribution grids present a massive integration of distributed resources such as renewable energy sources and energy storage devices. These new elements can be grouped to form a microgrid (Lopes et al., 2013). A microgrid requires an optimization stage that allows to minimize losses and improve efficiency, which are two key aspects in modern intelligent distribution systems. This stage of optimization is associated with the tertiary control and its mathematical structure is usually known as optimal power flow (OPF). However, additional conditions are required on the OPF model in order to achieve a comprehensive tertiary control: Global optimality and convergence. Convex optimization models fulfil these conditions, although unfortunately, the OPF is non-convex. Therefore, suitable approximations are required.
An OPF tailored for tertiary control in microgrids, requires to consider unbalanced operation and the effect of energy storage devices as well as the grid code limitations (for example, maximum and minimum limits on the voltages). In addition, non-convex constrains require to be linearized in order to obtain a convex model, considering a trade off between precision and simplicity. These linearizations are usually based on real domain despite being a problem on the complex domain. This is because the power flow equations do not satisfy the Cauchy-Riemann conditions (i.e the functions are non-analytic in a complex domain). In this context, a non-standard calculus named after Wirtinger’s calculus provides an efficient alternative for calculating linear approximations that can be easily implemented in modern script-based languages such as Matlab or Python. To the best of the author knowledge, this type of approximation has not been proposed before.
An aspect that is usually ignored in the OPF literature for tertiary control is its practical implementation. Unlike power systems, microgrids are controlled by small single-board computers that act as agregators or generation-load controllers. These devices have low performance and hence the algorithms must be designed considering these features. The cost and feasibility of the microgrid control technology is highly related to these aspects, since it is not realistic to have a high performance computers
1.2. STATE OF THE ART
for this application.
1.2
State of the art A microgrid is a low-voltage system that consists of renewable energy sources and storage devices, that can operate both in connected mode or in island mode, which has led to multiple studies regarding the tertiary control algorithms and optimal power flow (OPF) models, applied to these two operation modes. Tertiary control is the highest and slowest control in the hierarchical control of a microgrid. It defines the optimal point of operation of active and reactive power for the converters of each distributed generator, and how much energy the microgrid is willing to trade with the main grid to satisfy the power balance between the load and power generation (Yamashita et al.,
2020).
Related studies regarding the operation of microgrids focused on the economic dispatch of the renewable energy sources were presented in (Henao-Muñoz et al., 2017) and (Li et al., 2018). In (Henao-Muñoz et al., 2017) the problem was presented as a case of optimization of an isolated microgrid through mixed integer linear programming (MILP), minimizing the operation cost, mainly in photovoltaic generators; the algorithm performed an optimal dispatch of energy from all distributed generation units using reduced linear models and operational restrictions for each unit, together with a cost function and historical information on weather and demand conditions. On the other hand, in (Li et al., 2018) a business model was proposed to operate the microgrid, including critical loads and generators of multiple owners different from conventional modeling where the renewable energy sources belong to the same owner. Photovoltaic and wind generation can have considerable forecast errors due to uncertainties of solar irradiance and wind speed; Additionally, demand forecast errors can also affect the operation decision making tasks. For this type of problem, solutions such as those presented in (Byung Ha Lee and Jin Ah Yang, 2015) and (Mohagheghi et al., 2016) have been proposed, where is used the Monte Carlo method to consider the uncertainties of generation and demand, where a degree of uncertainty of generation and demand was presented in the solution obtained, using predicted generation and demand duration curves when the methodology reaches a stochastic solution; a methodology was presented in which available predictions are updated in an optimal and fast way in order to obtain an optimal operation of the system with loss reduction, implemented in real time.
Metaheuristic algorithms have been applied to tertiary control problems; however, they are not suitable for real-time operations problems and could require a high number of parameters that require to be calibrated according to the particular problem (Zhao et al., 2013)(Marzband et al., 2016); in addition, the abuse of biological metaphors has been criticized in the scientific literature (Sörensen, 2015). Another alternative to solve the tertiary control problem is trough artificial intelligence as presented in (Liu et al., 2018), which proposed the use of a cooperative reinforcement learning algorithm for distributed economic dispatch in microgrids to avoid the difficulty of stochastic modeling and high computational complexity, increasing the time horizon without enhancing the computational cost burden.
1.2. STATE OF THE ART
Uncertainties may be confronted with stochastic-optimizations-based algorithms as in (Wang et al., 2018), where a two-stage energy management strategy was developed for microgrids including renewable resources. Multiple scenarios were analyzed Implementing the mean-variance Markowitz theory, considering the uncertainties on electricity price, load, and power generation of the renewable resources. Similarly, in (Vergara et al., 2020) a stochastic mixed-integer nonlinear programming (MINLP) model for the optimal operation of islanded microgrids. Moreover, the microgrid is in presence of stochastic demands and renewable resources, considering an unbalanced three-phase distribution system. Furthermore, a set of linearizations were used to transform the MINLP model into an approximated MI-convex model.
Recent models take into account the emissions as presented in (Shafiq et al., 2018), where the problem was solved by a bird swarm algorithm. This model claimed to reduce operating cost and carbon emissions. Several other extensions of tertiary control as optimal power flow have been studied under more general settings, to address considerations such as the security operation (Dvorkin et al., 2018), energy storage (Li and Vittal, 2017), distributed platforms (Dall’Anese et al., 2013), uncertainty of generation (Dall’Anese et al., 2017), real-time operation (Marley et al., 2017), voltage stability (Cui and Sun, 2018), and unit commitment (Castillo et al., 2016).
In the field of the power flow linearizations, recent investigations have demonstrated the possibility to obtain affine approximations to the power-flow in distribution grids and microgrids (Molzahn and Hiskens, 2019). These approximations are different from the conventional dc-power flow since they include variations on the magnitude of the voltage, are general for any 푥∕푟ratio and include unbalanced operation. Three linear approximations in power distribution grids have been recently suggested by Bolognani (Bolognani and Zampieri, 2016), Marti (Marti et al., 2013) and Garcés (Garces, 2016). Methods based on Kron’s reduction technique have been also proposed in (Caliskan and Tabuada, 2014). Although these approximations are equivalent for voltages close to 1.p.u, their use depends on the applications. For example, the approximation presented in (Garces, 2016) requires a constant current representation in order to be used in a optimal power flow model (Garces, 2016). In addition, in (Bolognani and Zampieri, 2016) an explicit approximation of the solution is considered. Requiring a balanced power distribution network and a linear representation of the active and reactive power demands.
There are key factors listed in Table 1.1 needed to be considered in a hierarchical control of microgrids. A tertiary control algorithm requires to include constraints related to renewable energies and energy storage devices as well as grid constraints. In addition, the model must be tailored for physical implementation; this implies to guarantee global optimum, uniqueness of the solution, and fast convergence of the algorithms where convex formulations emerges as a suitable alternative in this context. On the other hand, the model must be simple but specific to be implemented in a practical situation considering three-phase unbalanced conditions, dynamic price of energy during the day and different configurations of the system.
1.3. CONTRIBUTION
Reference Henao-Muñoz et al. (2017) Byung Ha Lee and Jin Ah Yang (2015) Vergara et al. (2020) Dvorkin et al. (2018) Li and Vittal (2017) Dall’Anese et al. (2013) Dall’Anese et al. (2017) Marley et al. (2017) Cui and Sun (2018) Castillo et al. (2016) Proposed relaxed model (Convex-TC) Uniqueness of the solution ◓ ◔ ◓ ◓ ● ◓ ◓ ● ◔ ◔ ● Convex formulation ⚪ ⚪ ● ◓ ● ● ● ● ◓ ⚪ ● Complex domain formulation ⚪ ⚪ ⚪ ⚪ ⚪ ⚪ ⚪ ⚪ ⚪ ⚪ ● Global optimum ◔ ◔ ◓ ◔ ◓ ● ● ● ◔ ◔ ● Calculation complexity ◓ ◓ ● ● ● ◓ ● ● ● ● ● Three-phase unbalanced conditions ⚪ ⚪ ● ⚪ ◓ ● ◓ ⚪ ⚪ ◓ ● Network Topology ⚪ ⚪ ● ◓ ● ● ◓ ● ● ● ● Dynamic price ● ● ● ◓ ● ⚪ ● ● ⚪ ● ● Physical implementation ⚪ ⚪ ⚪ ⚪ ⚪ ⚪ ⚪ ⚪ ⚪ ⚪ ● Calculation time ● ⚪ ◓ ● ● ● ◔ ● ● ● ● Connected/Islanded C/I C/I I C C C C C C C C/I Table 1.1: Various considerations of papers about tertiary control. ⚪means not considered; ◓means half considered; ◔means partially considered; ●means fully considered.
1.3
Contribution The contribution of the thesis can be summarized as follows:
• A linear formulation on complex domain of the power flow for three-phase unbal-
anced systems that guarantees an affine separation between voltages and powers.
• A convex tertiary control model based on a linear formulation of the power flow
for connected/islanded microgrids and power distribution networks using Wirtinger’s calculus.
• A convex approximation of the exponential models of the loads (previous lin-
earizations considered ZIP models).
• A static reserve model that allows the transition from grid-connected to island
operation.
• An implementation in small single-board computer (a Raspberry-Pi that demon-
strates the proposed algorithm can be implemented in a practice at low cost.
1.4. OUTLINE OF THE THESIS
Two papers were presented as result of this master thesis: in (Ramirez and Garcés, 2019), presented in the IEEE-PES General Meeting 2019, the main features of the linearization were presented whereas in (Ramirez and Garcés, 2020) the complete optimization model was analized.
1.4
Outline of the thesis After this introduction, Chapter 2 introduces the operation in microgrids. A general description of the hierarchical control applied in microgrids is given, where the primary, secondary and tertiary controls are explained. Furthermore, grid-connected and islanded operations are presented and also the real time implementation of microgrids is analyzed. Chapter 3 introduces the tertiary control and optimal power flow. The architecture of the proposed tertiary control and a general representation of three-phase microgrids with their main components, such as wind turbines, solar panels, load model, and energy storage devices, is given; moreover, a general formulation of the tertiary control for grid-connected operation is presented. In Chapter 4, a formulation of the tertiary control is proposed, where the power flow equations and the exponential model of the loads are linearized through the proposed Wirtinger linearization resulting in a convex model, moreover, an operation mode under surplus of energy is given. Simulation results in the CIGRE microgrid benchmark are presented in Chapter 5, followed by its implementation in a Raspberry-Pi. Conclusions of the thesis and future work are presented in Chapter 6, and finally the references are exposed. Parameters of the test system and a basic introduction to Wirtinger calculus are given as Appendix.
Chapter 2 Operation of microgrids The use of renewable energy sources in distribution systems has increased in recent years in form of microgrids, facing many challenges for the system operation. In general a microgrid is considered as a small-scale and low-voltage system, which is a combination of controllable distributed renewable generators, energy storage systems, and local loads (Bui et al., 2016).
microgrids can be operated in several ways as grid-connected, islanded mode and a new concept known as a intended-islanded mode. To realize the transition of these operation modes, the microgrid needs to ensure the normal operation to support the load, without affecting distributed energy resources (DERs) through the network controllers. Stable operation of the microgrid needs the stability of the voltage and frequency, especially during the transition between connected to islanded mode. For the sake of simplicity, in this thesis the effects of the network controllers during the transition of the operation mode are omitted. Furthermore, proper control of microgrid is a prerequisite for stable and economically efficient operation; thus, most microgrids operate under a hierarchical control structure divided into three main controls as explained below.
2.1
Hierarchical control Hierarchical control strategy consist of three levels, namely the primary, secondary and tertiary controls, as shown in Figure 2.1. The primary control maintains voltage and frequency stability of the microgrid subsequent to the islanding process, where the microgrid may lose its voltage and frequency stability due to the mismatch between the power generated and consumed. Moreover, the primary control provides the reference points for the voltage and current control loops of distributed energy resources. Primary control are commonly local control applied directly in the converters of the microgrid. The secondary control compensates for the voltage and frequency deviations caused by the operation of the primary control, that means that the voltage and frequency are taken to the nominal values. Unlike the primary control, the secondary control is centralized or distributed, but in any case, communications are required; this control is designed to have slower dynamic response than that of the primary, which can make possible
2.1. HIERARCHICAL CONTROL
to decouple the dynamics of the primary and secondary controls and facilities their individual designs (Bidram and Davoudi, 2012).
Primary Secondary Tertiary DC AC DC AC DC AC Signal 1 Main grid Signal 2 Signal 3 Electricity price and energy negotiation Operative Frequency and voltage Voltage and frequency stability Economic power dispatching Micro-grid suppervision Aggregator and cloud services Energy exchange Hierarchical control Micro-grid Figure 2.1: Hierarchical control of a microgrid.
Finally, the tertiary control is the slowest control level that is usually implemented as a centralized control in the microgrid. Tertiary control is in charge of the economical concerns in the optimal operation of the system handling the active and reactive power exchanges with the main grid. Adjusting the optimal power set points of DERs, the tertiary control can obtain an economical dispatch of the microgrid in a defined horizon of time, minimizing generation costs and the prices associated to the power supplied by the main grid. Moreover, as depicted in Figure 2.1 exist an external communication between the tertiary control and the operating environment represented as signals; signal 1 is in charge of communicating with each one of the converters in the microgrid giving an active power point of reference 푃ref, signal 2 is in charge of communicating the decision of the operation mode (grid-connected/islanded), and finally the signal 3 is in charge of communicating with the aggregator and cloud services of the system sharing information about the electricity price and energy negotiations, weather predictions and load data. The main interest of implement a hierarchical control in microgrids is that it makes possible to consider multiplied objectives, despite they are not in the same time scale, such as increasing active power injection without affect the microgrid when is in islanded operation (Simpson-Porco et al., 2015) or reducing power consumption without affect the load demand comfort; in addition, assuring safe power-sharing while keeping the level of voltage unbalance within the standard boundaries (von Jouanne and Banerjee, 2001).
2.2. GRID-CONNECTED OPERATION
2.2
Grid-connected operation In this operation mode, the microgrid remains physically connected to the main grid, allowing exchange of active and reactive power. The storage devices stay inactive or can be charged depending on their state of charge. Both, renewable resources and energy storage devices are integrated through power electronic converter that are generally handled by a 푃푄control under connected-operation as depicted in Figure 2.2. These converters allows to generate or consume reactive power. One main concern of the grid connected operation is the management of this reactive power capability. 푃푄 Control Main grid Microgrid 푃, 푄 DC AC DC DC 푃푠 푃푠, 푄푠 DC AC AC DC 푃푤 푃푤, 푄푤 DC AC DC DC 푃퐵 푃퐵, 푄퐵 Figure 2.2: Grid-connected mode operation.
Furthermore, in this case the main grid can be regarded as a voltage and power source that owns infinite capacity to support the microgrid when the load overcomes the power supplied by the DERs in the microgrid; nevertheless, the frequency of the microgrid must be the same of the major grid in order to maintain the stability of the system, but besides, the voltage magnitude and phase angle difference between the microgrid and the main grid bus voltages require to be close. The loads of the microgrid are supplied by the available distributed energy resources and the deficit is faced by the main grid. In case of a surplus energy in the microgrid owing to an increase in the primary resource, the energy supplied by the RES may be storage in the energy storage devices or injected to the main grid.
2.3. ISLANDED OPERATION
2.3
Islanded operation During transmission or distribution network downtimes due storms, natural disasters or external attacks, the microgrids with flexible resources can still continue electricity supply to consumers in islanded operation mode. In this case, the microgrid is not physically connected to the main grid and therefore there is no exchange of active and reactive power as depicted in Figure 2.3.
푉푓 Control Main grid Microgrid DC AC DC DC 푃푠 푃푠, 푄푠 DC AC AC DC 푃푤 푃푤, 푄푤 DC AC DC DC 푃퐵 푃퐵, 푄퐵 Figure 2.3: Grid-islanded mode operation.
In microgrids operating in islanded mode, the energy storage resources have the blame for maintain the system’s stability due to the variability of the primary resource that affect directly the generation provided by the DERs of the microgrid; this energy storage systems can be designed to reduce the stochastic power generation of the DERs, soften fast peak of load and regulate the frequency of the microgrid when is in island operation. The hierarchical control in islanded operation seeks to set the voltage and frequency of the isolated system, therefore, the converters of each DER require to include an additional control that defines the set point of voltage and frequency. Generally, the control schemes of the hierarchical control mentioned in previous section, are designed to operate in both grid-connected and island operation in microgrids. In particular, when the microgrid is in connected operation the DERs are generally handled by a 푃푄control, since it is possible to dispatch active power without voltage and frequency control, which is favored by the main grid. On the other hand, when the microgrid is in island operation, it is necessary to switch to a different control mode of the DERs (i.e. a voltage,frequency control), which has to assure voltage and frequency stability of the islanded microgrid. The loads in the microgrid are supplied by the available distributed energy resources, and the deficit in this case is supported with the energy
2.3. ISLANDED OPERATION
storage resources during a period of time determined by their state of charge. As equal as connected operation, in case of a surplus energy in the microgrid, the energy supplied by the DERs can be storage in the energy storage devices.
2.3.1
Intended-island operation Within the connected/islanded mode operation arises a new operation mode named intended-island operation of microgrids. In this case, the microgrid remain connected to the main grid but the active and reactive power interchanged between the grid and the microgrid is always zero as shown in Figure 2.4. In order to achieve this type of operation, it is required that the available power given by generators and storage, is greater than the load. In intended-island operation, the main grid acts as a voltage and frequency reference of the microgrid, even though the main grid and the microgrid are physically connected.
푉푓푃푄 Control Main grid Microgrid 푃, 푄= 0 DC AC DC DC 푃푠 푃푠, 푄푠 DC AC AC DC 푃푤 푃푤, 푄푤 DC AC DC DC 푃퐵 푃퐵, 푄퐵 Figure 2.4: intended-islanded mode operation.
In intended-island operation mode is necessary to implement a 푉푓and a 푃푄control, since even though the microgrid remains connected to the main grid is required a control under the complex voltages of the system, to ensure electrical insulation of the microgrid in addition to constant monitoring of frequency stability. It is important to note that since the main grid is acting as the system’s reference, it is probable that in this case a cost associated with the provision of this service by the grid operator can be incurred.
2.4. REAL TIME OPERATION
2.4
Real time operation In this section the implications associated with the real-time implementation of microgrid are analyzed. As mentioned in Section 2.1, the hierarchical control in microgrids has a multi-scale behavior that enables separate the dynamic of each control. Temporary separation of the hierarchical control can be represented as depicted in Figure
2.5.
AC DC Primary Secondary Tertiary AC DC Primary Local control Centralized controls Microgrid Data frame
50 ms
500 ms
Stationary state Objective Stable equilibrium (P,Q) Operative frequency and voltage Optimal operation Figure 2.5: Temporary representation of hierarchical control in microgrid’s operation. Primary control in microgrids must operate in a temporary scale under 50 ms that corresponds to 3 cycles of a 60 Hz wave, hence primary control require to be fast enough to guarantee stability in this time interval and therefore the most useful controls in the practice are local controls.
Secondary control is usually a centralized control which may be developed using recending horizon strategy and/or consensus strategies (Khayat et al., 2020). Expected times of secondary control are at about 500 ms in order to guarantee the stability of the system and lead the voltage and frequency to an operative value, taking into account the action of the primary control and the references provided by the tertiary control. Tertiary control has a more extended response time since it works in steady state, then the times associated with the commutations are not a limitation. However, due to the complexity of the model, the optimization algorithm must guarantee real-time convergence. Hence, the algorithm must find an optimal solution in intervals of 5 minutes to 1 hour.
2.4. REAL TIME OPERATION
2.4.1
Wireless communication delay on microgrids control Subsystems in microgrids may use communication networks, specially in the case of tertiary control. Wireless communications are useful in the sense that is more efficient than physical communications, however, wireless communication may have high latency, i.e. a delay in information transfer (Ci et al., 2012). This latency as well as the natural latency of the calculation process must be consider in the analysis of the tertiary control.
Basically two types of latencies can be presented in a centralized tertiary control: those associated with the calculation times of the optimization model and those associated with communications. In hierarchical control described in the Section 2.1, primary control is not affected by the wireless communication delay since it is a local control; accordingly, it is highly reliable if is properly designed. Secondary and tertiary controls are centralized controls therefore both can be influenced by the latency associated to the communications and the optimization algorithms. Some technologies such as ZigBee allows a distance of 50 meters with 50 bytes packets, with a latency of 18 ms according to (Lab, 2019). In other words, is less than the 500 ms required by the secondary control as well for the tertiary control. On the other hand, tertiary control is not affected by the communication delay since the expected calculation time is in order of minutes. The amount of information transferred is not a limitation due there are few values desired by the converters (e.g frequency, voltage, active and reactive power values). Latency related to the solution of the model optimization can be evaluated considering the calculation times presented in Chapter 5 for tertiary control that is the main topic of the thesis.
Chapter 3 Tertiary control and optimal power flow
3.1
Tertiary control Microgrids are commonly used in non-interconnected areas, where renewable energy availability can behave differently to typical demand curves. Figure 3.1 shows the energy availability in a typical system with high solar and wind penetration and its load demand conditions. Notice that the difference between the average availability of energy from renewable resources and load demand during a specific day is considerable. Under these conditions, if the system is islanded or intended-islanded operated, is clearly necessary to include energy storage devices such as those proposed in (Luo et al., 2015). Storage devices are essential in order to exploit of all the renewable energy resources to the maximum in the periods that generation overcomes the load of the microgrid, and alleviate the intermittence of the renewable source power generation. Under these conditions, an optimal dispatch is required and its optimization stage is associated with tertiary control, but its mathematical structure is usually known as optimal power flow or OPF. A typical architecture for tertiary control is shown in Figure
3.2. Renewable resources and energy storage devices are integrated through power
electronics converters that allow controlling both active and reactive power. However, this control is limited by the capacity of the converters and the availability of the primary resource (i.e., solar irradiance and wind speed). In addition, the state of charge of the batteries requires to be managed to minimize power loss. This entails an optimization problem that requires to be executed by a central controller.
The OPF is a non-convex problem with many variants in both power systems and microgrids (Capitanescu, 2016). A detailed model is required in the later, considering unbalanced operation and the effect of energy storage devices as well as the grid code limitations.
3.2. THREE-PHASE GRID MODEL
−2
0
2
4
6
8
10
12
14
16
18
20
22
24
0
0.2
0.4
0.6
0.8
1
1.2
Time (hours) Power (pu) Solar Wind Demand Figure 3.1: Solar and wind energy availability vs load demand in typical wind-solar microgrid (Henao-Muñoz et al., 2017).
3.2
Three-phase grid model A three-phase microgrid is represented as a connected hypergraph = {, }, where represents the set of hypernodes and ⊆×represents the hyperbranches. Each hypernode and hyperbranch has three components that represent the phases {퐴, 퐵, 퐶} as depicted in Fig 3.3.
Circuit variables in each hyperbranch 푙∈are represented by a 3 × 3 admittance matrix as given in (3.1).
퐼푙= 푌푙푉푙
(3.1)
where the admittance matrix structure is presented in (3.2) in function of the impedance matrix of the hyperbranch 푙∈.
푌푙= ⎛ ⎜ ⎜⎝ 푧푠 푧푚 푧푚 푧푚 푧푠 푧푚 푧푚 푧푚 푧푠 ⎞ ⎟ ⎟⎠ −1
(3.2)
These matrices can be grouped together in a block diagonal matrix 푌that relates the vector of three-phase voltages with the vector of three-phase currents, as given in
(3.3).
퐼= 푌푉
(3.3)
where 푉and 퐼are vectors where the first elements correspond to the phase 퐴, next the phase 퐵and finally the phase 퐶. An incidence matriz 퐴∈× is created
3.2. THREE-PHASE GRID MODEL
central controller Main grid communications dc ac dc dc 푃푠 푃푠, 푄푠 dc ac ac dc 푃푤 푃푤, 푄푤 dc ac dc dc 푃퐵 푃퐵, 푄퐵 Figure 3.2: Integration of wind, solar and energy storage devices through power electronic converters.
for the hypergraph, where 푎푘푙= 1 if the hyperbranch 푙∈is in the direction 푘푚and 푎푘푙= −1 if is the direction 푚푘. This matrix require to be augmented in order to consider three phases in each hypernode by using the Kronecker product as follows. 핀3 ⊗퐴= ⎛ ⎜ ⎜⎝
1
0
0
0
1
0
0
0
1
⎞ ⎟ ⎟⎠ ⊗ ⎛ ⎜ ⎜⎝ 푎11 ⋯ 푎1푙 ⋮ ⋱ ⋮ 푎푘1 ⋯ 푎푘푙 ⎞ ⎟ ⎟⎠
(3.4)
then, Kronecker product gives as a result 핀3 ⊗퐴= ⎛ ⎜ ⎜ ⎜ ⎜ ⎜ ⎜ ⎜ ⎜ ⎜ ⎜⎝ 푎11 ⋯ 푎1푙
0
0
0
0
0
0
⋮ ⋱ ⋮
0
0
0
0
0
0
푎푘1 ⋯ 푎푘푙
0
0
0
0
0
0
0
0
0
푎11 ⋯ 푎1푙
0
0
0
0
0
0
⋮ ⋱ ⋮
0
0
0
0
0
0
푎푘1 ⋯ 푎푘푙
0
0
0
0
0
0
0
0
0
푎11 ⋯ 푎1푙
0
0
0
0
0
0
⋮ ⋱ ⋮
0
0
0
0
0
0
푎푘1 ⋯ 푎푘푙 ⎞ ⎟ ⎟ ⎟ ⎟ ⎟ ⎟ ⎟ ⎟ ⎟ ⎟⎠
(3.5)
It is important to notice that 핀3 ⊗퐴≠퐴⊗핀3 (i.e the operator is not commutative). In this case, 핀3 ⊗퐴organizes the new three-phase incidence matrix such that all nodes in
3.2. THREE-PHASE GRID MODEL
hypernode k hypernode m hyperbranch km phase C phase B phase A phase C phase B phase A Figure 3.3: Hypergraph representation for line sections in microgrids phase-A are placed first, then all nodes of phase-B and finally all nodes in phase-C, say {1푎, 2푎, 3푎, … , 1푏, 2푏, 3푏, … , 1푐, 2푐, 3푐, … }. The model could be defined in terms of 퐴⊗핀3 but in that case, all three phases of each node would be placed in order as follows {1푎, 1푏, 1푐, 2푎, 2푏, 2푐, … }.
Therefore, the following expression are obtained:
퐼= (핀3 ⊗퐴)퐼
(3.6)
푉= (핀3 ⊗퐴)⊤푉
(3.7)
퐼= (핀3 ⊗퐴)푌((핀3 ⊗퐴))⊤푉= 푌푉
(3.8)
where 핀3 is the identity matrix of size 3 × 3, 푌is the three-phase admittance matrix, ⊗is the Kronecker product and (⋅)⊤represents the transpose conjugate. The hypernode set is divided in two new sets = {푆, 푁} where 푆represents the slack hypernode and 푁are the rest of hypernodes. Therefore, the model of the grid is given by the following matrix equations:
퐼푆= 푌푆푆푉푆+ 푌푆푁푉푁
(3.9)
퐼푁= 푌푁푆푉푆+ 푌푁푁푉푁
(3.10)
where 푌=
(
푌푆푆 푌푆푁 푌푁푆 푌푁푁
)
(3.11)
Notice that 푆is size three since there are three slack nodes in the system, corresponding to each phase. The voltage 푉푆is given by (3.12):
푉푆= 푣slack ⎛ ⎜ ⎜⎝
1
푒−2휋∕3푗 푒2휋∕3푗 ⎞ ⎟ ⎟⎠
(3.12)
3.3. LOAD MODEL
Voltages 푉푁are variables in the optimization model, therefore, the current in each node of the grid is given by 퐼푘= ∑ 푆 푦푠푘푣푠+ ∑ 푚 푦푘푚푣푚
(3.13)
This expression can be written in terms of the nodal powers as follows: 푠∗ 푘= ∑ 푆 푣∗ 푘푦푠푘푣푠+ ∑ 푚 푣∗ 푘푦푘푚푣푚
(3.14)
where (⋅)∗represents the complex conjugate. Considering the following expression of the total losses of the grid 푃퐿= real (푉 푇푌푉
)
(3.15)
expanding in the matrix expressions 푃퐿= real (( 푉푆 푉푁 ) ⋅
(
푌푆푆 푌푆푁 푌푁푆 푌푁푁
)
⋅
(
푉푆 푉푁
))
(3.16)
after simple algebraic manipulations, an expression of total losses of the grid is presented in (3.17).
푃퐿= real (푉⊤ 푆푌푆푆푉푆+ 2푉⊤ 푆푌푆푁푉푁+ 푉⊤ 푁푌푁푁푉푁
)
(3.17)
Further, the power supplied by the slack node to the microgrid is defined as follows 푃slack = real
(
푉푆 (푌푆푆푉푆+ 푌푆푁푉푁 )∗)
(3.18)
where (⋅)∗represents the conjugate (notice the term in parentesis is a scalar an not a vector).
3.3
Load model Three-phase loads are represented by a general model that consider constant power, constant current and constant impedance (Bazrafshan and Gatsis, 2018). This model can be described in terms of a constant 훼∈{0, 1, 2} as given in (3.19) where 0 corresponds to constant power, 1 to constant current and 2 to constant impedance. Fractional values of 훼are also allowed in the model.
푆푘= 푆load ‖‖‖‖ 푣푘 푣푛표푚 ‖‖‖‖ 훼
(3.19)
Where 푆load is the nominal power of the load. Notice that the load model depends on the term ‖‖푣푘‖‖ 훼that is clearly non-linear due to the product of a complex variable with its conjugate and the term 훼. Therefore, is necessary to linearize the expression in order to be included in an optimization algorithm.
3.4. PHOTOVOLTAIC PANELS
3.4
Photovoltaic panels The model that represents the power supplied by the photovoltaics units (PVs) during a period of time is presented in (3.20) 푃푃푉(푡) = 휌푠푅(푡)
(3.20)
where 푃푃푉(푡) corresponds to the maximum power that the photovoltaic generator can inject in the period of time 푡, 휌푠is the productivity coefficient associated with the solar panel, and 푅(푡) corresponds to the irradiance measured in (푊∕푚2), perpendicular to the panel’s plane for the period 푡(Henao-Muñoz et al., 2017).
3.5
Wind turbines Generally, wind power may be obtained using wind turbine profile given by the manufacturer. In this case, the proposed model represents an approximation of the active power supplied by the wind turbine (Ackermann, 2005), thus the wind power may be calculated based on the wind speed and the wind turbine power coefficient as follows: 푃푊푇(푡) = ⎧ ⎪ ⎪ ⎨ ⎪ ⎪⎩ 푃nom
(
푤푠(푡) 푅푎푡푒푑푤s
)3
, if 퐶푢푡−푖푛푤s ≤푤푠(푡) ≤푅푎푡푒푑푤s 푃nom , if 푅푎푡푒푑푤s ≤푤푠(푡) ≤퐶푢푡−표푢푡푤s
0
, if 퐶푢푡−표푢푡푤s ≤푤푠(푡)
(3.21)
where 푃푊푇(푡) corresponds to the maximum power that the wind turbine can deliver in the period of time 푡, the wind speed is a time variable described by 푤푠(푡), and 푃푛표푚is the rated-output power that each of the wind turbines can inject to the system. 퐶푢푡−푖푛푤s is the wind speed at which the turbines begin to supply power, 푅푎푡푒푑푤푠represents the rated wind speed at which the turbines generate its rated power, and the maximum wind speed that the turbines tolerates is represented by 퐶푢푡−표푢푡푤푠. A typical representation of the behavior of the wind model (3.21) as a function of the wind speed is depicted in Figure 3.4
3.6. ENERGY STORAGE
0
5
10
15
20
25
30
0
1
2
퐶푢푡−푖푛푤s 퐶푢푡−표푢푡푤s 푅푎푡푒푑푤s 푅푎푡푒푑−표푢푡푝푢푡푃표푤푒푟 Wind speed Power delivered Figure 3.4: Approximate model of power supplied by wind turbines.
3.6
Energy storage Energy storage systems or 퐸푆푆has been recognized as one of the most important implementation in microgrids operation, converting the excess of energy in a storable form and reservating it in various mediums until it is necessary to be injected back to the microgrid when needed. 퐸푆푆can have multiple attractive functions for the microgrid operation and load balancing, such as helping in meeting peak load demands, providing time varying energy management, alleviating the intermittence of renewable source power generation, improving power quality/reliability and reducing import during peak demand periods (Luo et al., 2015). Currently, there are several 퐸푆푆technologies that based on the form that the energy is storaged they may be classified in six main technologies such as: mechanical, electrochemical, electrical, thermochemical, chemical and thermal. In microgrids, considering the size of the systems exist the need for a highly compact technology suitable for the volume-limited applications, consequently the most common energy storage systems implemented in microgrids are those based on electrical (푆푀퐸푆, supercapacitors) and electrochemical (Batteries) technology due to their high performance regarding power density and energy density. Within the framework of this thesis, batteries such as the Lithium-ion (Li-ion) or lead-acid batteries are considered as the 퐸푆푆implemented in the microgrid; therefore, a simplified dynamic model of the battery energy storage is proposed by the following equation, making it clear that this model is general and may be extended to 푆푀퐸푆and supercapacitor applications.
퐸퐵(푡) = 퐸퐵(푡−1) + (푃퐵+(푡) −푃퐵−(푡))Δ푡
(3.22)
|푃퐵(푡) −푃퐵(푡+ 1)| ≤Δmax
(3.23)
where 푃퐵+(푡) is the charging power, 푃퐵−(푡) is the power at discharge, and 퐸퐵(푡) is the energy stored by the batteries in the period 푡; assuming a positive value if it injects power to the microgrid and a negative value for the charging mode. The term Δmax is related to the time response of the 퐸푆푆and current limitations of the IGBTs in the
3.7. POWER ELECTRONICS
power electronic converters, moreover, it restrict the number of charge and discharge cycles improving shelf life of the batteries.
3.7
Power electronics Photovoltaic units, wind turbines and battery energy storage devices are integrated to the microgrid through power electronic converters. Power electronic converters are of great importance in microgrids operation, arguing that they are in charge of integrate the 퐷퐸푅푠and local demands into the system. The most common microgrid converters is the voltage source converter or VSC that is a forced switching device, which is commonly composed by a set of semiconductors switches like gate-turn-offthyristors or GTOs, insulated gate bipolar transistors or IGBTs. This switches receives the control signals produced by a pulse width modulator or PWM as depicted in Fig 3.5, in order to produce a controlled dc voltage and convert of one type of current to another. Regarding to the operation mode of the power electronic converters, three models were discerned as grid forming, grid following and grid supporting (Rocabert et al., 2012). Microgrid DC AC
VSC
Renewable Resource
PWM
푃, 푄 Figure 3.5: General control scheme for the grid connected VSC. These converters have capability to generate or consume reactive power, on the assumption the current and apparent power is below its maximum and respecting the maximum current limits of the IGBTs. Therefore, the apparent power is limited by the following constrain:
‖‖푆푘‖‖ = √ 푃2 푘+ 푄2 푘≤푆max
(3.24)
where the terms 푃푘and 푄푘are the active and reactive power generated or consumed by the converter and 푆max is the related with the physical limitations of the converter. Notice that this constraint is convex.
3.8
Static reserve A static reserve is proposed in the model. This new concept is strongly related to the energy stored by the batteries. This concept is applied due to the necessity to keep
3.9. NON-CONVEX TERTIARY CONTROL MODEL
the system’s equilibrium and security when the state of the system changes from gridconnected to island operation. The static reserve guarantees a time of safe operation in which the demand of the microgrid can be supplied by the available generation and energy stored by the batteries. Taking this criterion into account, a deficit (퐷(푡)) of power provided by generators is defined as function of the demand and the power injected by the slack node to the microgrid as given in (3.25), 퐷(푡) = ∑ 푆load ‖‖‖‖ 푣푘 푣nom ‖‖‖‖ 훼 −푃slack(푡)
(3.25)
Therefore, the energy stored by the batteries is limited by the following constraints: 퐸퐵(푡) ≥real(퐷(푡))
(3.26)
Notice that the constraint (3.25) is non-convex.
3.9
Non-convex tertiary control model The proposed power flow requires a time series for wind speed, solar irradiance and power demand. The optimization model search for an optimal use of the energy storage devices as given below, where all variables depend on the time, and therefore, the subindex 푡is omitted in most of the equations.
The model seeks to minimize the costs 푐푡of the energy supplied by the main grid in order to lower operating costs and force the DERs operation. The model of each unit of the DERs is considered to establish upper bounds of the variables, in addition to regarding the microgrid parameters. Notice that this model is easily implementable in different time scales, in order to provide a more precise planing of the microgrid operation without affect the time response of the algorithm. for the sake of clarity of this model, the control variables of the algorithm are defined as follows:
• 푣푘and 푣푚are variables that represent all the three-phase voltages of the nodes
∈of the microgrid.
• 푆푘∀푘∈{wind,solar,battery} are variables that represent differentially all the
power supplied by the DERs in the microgrid.
• Indirectly the 푃slack can be considered as a control variable since it depends of all
the nodal voltages of the system as depicted in (3.18).
• 퐸퐵is a variable that represents the storaged energy of each battery bank con-
nected to the microgrid.
• 푃퐵+ and 푃퐵−are respectively the variables that represent the state of charge or
discharge of the battery in terms of active power.
3.9. NON-CONVEX TERTIARY CONTROL MODEL
The entire model is presented below:
min ∑ 푡 푐푡푃slack(푡)
(3.27)
푠∗ 푘= ∑ 푠 푦푠푘푣∗ 푘푣푠+ ∑ 푚 푦푘푚푣∗ 푘푣푚
(3.28)
푆푘= 푆wind + 푆solar + 푆battery −푆load ‖‖‖‖ 푣푘 푣nom ‖‖‖‖ 훼
(3.29)
‖‖푆푘‖‖ = √ 푃2 푘+ 푄2 푘≤푠max, ∀푘∈{wind,solar,battery}
(3.30)
‖‖푣푘−푣푛표푚‖‖ ≤훿푣nom
(3.31)
푝퐿= real (푉⊤ 푆푌푆푆푉푆+ 2푉⊤ 푆푌푆푁푉푁+ 푉⊤ 푁푌푁푁푉푁
)
(3.32)
퐸퐵(푡) = 퐸퐵(푡−1) + (푃퐵+(푡) −푃퐵−(푡))Δ푡
(3.33)
퐸퐵(푡) ≥real(퐷(푡))
(3.34)
푃퐵+ −푃퐵−= real(푆battery)
(3.35)
|푃퐵(푡) −푃퐵(푡+ 1)| ≤Δmax
(3.36)
푃푊푇≥real(푠wind)
(3.37)
푃푃푉≥real(푠solar)
(3.38)
In the previous model, equation (3.31) is included in order to consider the voltage unbalance of the system (von Jouanne and Banerjee, 2001), since the implemented microgrid consider an uneven distribution of single-phase loads, that can be continuously changing across the three-phase system; since it is not implemented, unbalanced voltages can result in adverse effects on equipment and on the power system. Hence the term 훿is included as a quality factor to consider a 2% of unbalance to mitigate the occurrence of unbalanced voltages.
Equations (3.27) to (3.38) are called in this thesis as NC-TC Model (non-convex tertiary control model). This model contains some complex variables (e.g 푆푘,푣푘and 푣푚) which simplifies its representation. However, it is important to remark that this is only a representation since an optimization model requires to be defined in a ordered set (for example, the set ℝ푛). Therefore, each equality constrain with complex variables can be separated into real and imaginary parts.
This complex representation allows a simple formulation of the linearizations using Wirtinger’s calculus. In addition, the resulting linearizations can be written directly in complex form, taking advantage of packages such as cvxpy of python to implement the algorithm in a straightforward form as is explained in the next chapter.
Chapter 4 Convex formulation of the tertiary control
4.1
The OPF problem The classic approach for the OPF problem is the use of non-linear programming models (Abdi et al., 2017), however, global solution and convergence are not guaranteed in those models. This is a problem in a tertiary control where the method requires to be automatized without human supervision. Therefore, recent investigation have been focused in convex approximations to the OPF, in order to guarantee global solution and fast convergence.
Convex approximations for the power flow equations can be classified into two main groups: those based in conic approximations and those based on linearizations. Semidefinite programming and second order cone models, stand out in the first group (Bai et al., 2008; Yuan and Hesamzadeh, 2019). These approximations are highly precise and present attractive theoretical interpretations (Low, 2014), however, computation time is prohibitive for real-time applications, specially in the case of semidefinite programming. In the second group, there are three main linearizations presented by Bolognani (Bolognani and Zampieri, 2016), Marti (Marti et al., 2013) and Garces (Garces, 2016). These linearization presents similar accuracy but have limitations for being included in optimization algorithms. In particular, none of these approximations generates an affine space in both nodal voltages and nodal powers. Therefore, additional approximations are required to be included in optimization models. For example, in (Garces, 2016) an OPF was proposed but all generators were included as constant current injection (a strong approximation for real microgrids with constant power and constant impedance loads).
On the other hand, the study of the power flow equations requires the use of a general theory for functions of several complex variables. Wirtinger calculus emerge as a suitable alternative in this aspect which allows to calculate linearizations in non analyticalcomplex functions such as the power flow equations (Remmert, 1989) (Hunger, 2007).
4.2. CONVEX IDENTIFICATION
4.2
Convex identification NC-TC model is non-linear and non convex, and therefore, a convex approximation is required. However, some parts of the model are already convex, Equations (3.30), (3.31) and (3.36) define a convex set given by the interior of an Euclidean norm and the equation (3.32) can be relaxed as follows:
푃퐿≥real (푉⊤ 푆푌푆푆푉푆+ 2푉⊤ 푆푌푆푁푉푁+ 푉⊤ 푁푌푁푁푉푁
)
(4.1)
Equation (3.33) is an affine expression. The only remaining non-convex constraints are (3.28) for the power flow equations, (3.29) and (3.34) that includes the exponential model of the loads. These constraints will be linearized by using Wirtinger calculus as presented in the next subsection.
4.3
Wirtinger’s linearization In general, an equality constraint is non-convex unless it is an affine equation. Therefore, a linearization is recommended in order to approximate the model to a convex set. Let us consider a complex variable 푧= 푥+푗푦and a complex function 푓(푧) = 푢+푗푣. The Wirtinger’s derivate and the conjugate Wirtinger’s derivate are defined as follows:̂ 휕푓 휕푧= 1
2
(
휕푢 휕푥+ 휕푣 휕푦
)
+ 푗
2
(
휕푣 휕푥−휕푢 휕푦
)
(4.2)̂ 휕푓 휕푧∗= 1
2
(
휕푢 휕푥−휕푣 휕푦
)
+ 푗
2
(
휕푣 휕푥+ 휕푢 휕푦
)
(4.3)
These operators are very similar to the conventional derivatives, despite the fact that they are not derivatives in the Cauchy-Riemann sense (see Remmert (1989) and Hunger (2007) for more details). More importantly, these operators allow a linearization on the complex numbers for non-holomorphic functions such as (3.28) and (3.29). A linearization for a complex function in terms of the Wirtinger’s operators is defined as follows:
푓≈푓(푧0) +̂ 휕푓 휕푧Δ푧+̂ 휕푓 휕푧∗Δ푧∗
(4.4)
For example, a function 푓= 푥∗ 푖푥푗can be linearized around a point 푥푖0, 푥푗0 as follows:
푓(푥∗ 푖, 푥푗) = 푥∗ 푖푥푗
(4.5)
≈푥∗ 푖0푥푗0 + 푥푗0Δ푥∗ 푖+ 푥∗ 푖0Δ푥푗
(4.6)
= 푥∗ 푖0푥푗0 + 푥푗0(푥∗ 푖−푥∗ 푖0)+ 푥∗ 푖0(푥푗−푥푗0)
(4.7)
= 푥푗0푥∗ 푖+ 푥∗ 푖0푥푗−푥∗ 푖0푥푗0
(4.8)
Notice that Wirtinger’s derivatives fulfill the basic properties for differentiation known from real-valued analysis concerning the linearity, product rule and composition of functions. (see Apendix B)
4.4. WIRTINGER LINEARIZATION FOR THE POWER FLOW EQUATIONS
4.4
Wirtinger linearization for the power flow equations A linear approximation is developed on the complex numbers using Wirtinger’s calculus and not on the reals as in the conventional load flow formulations. Consider the equation (3.14) presented in Chapter 3. Notice that this function is non-linear since it has the term 푣∗ 푘푣푚, that is defined as (4.9) for the linearization 푓(푣∗ 푘, 푣푚) = 푣∗ 푘푣푚
(4.9)
In the following, all variables and equations are represented in the complex domain and all the derivatives are Wirtinger’s derivatives. Linearizing Equation (4.9) around the point (푣푘0, 푣푚0) we obtain the following expression 푓(푣∗ 푘, 푣푚) = 푣∗ 푘푣푚
(4.10)
= 푣∗ 푘0푣푚0 + 푣푚0Δ푣∗ 푘+ 푣∗ 푘0Δ푣푚
(4.11)
= 푣∗ 푘0푣푚0 + 푣푚0(푣∗ 푘−푣∗ 푘0)+ 푣∗ 푘0(푣푚−푣푚0)
(4.12)
= 푣푚0푣∗ 푘+ 푣∗ 푘0푣푚−푣∗ 푘0푣푚0
(4.13)
Replacing Equation (4.13) in (3.14) we obtain the following linearized equation: 푠∗ 푘= 푦푘푠푣푠푣∗ 푘+ 푛 ∑ 푚=1 푦푘푚(푣푚0푣∗ 푘+ 푣∗ 푘0푣푚−푣∗ 푘0푣푚0)
(4.14)
Expanding Expression (4.14), the next equation is obtained: 푠∗ 푘= 푦푘푠푣푠푣∗ 푘+ ( 푛 ∑ 푚=1 푦푘푚푣푚0
)
푣∗ 푘+ ( 푁 ∑ 푚=1 푦푘푚푣∗ 푘0푣푚
)
− ( 푁 ∑ 푚=1 푦푘푚푣∗ 푘0푣푚0
)
(4.15)
After simple algebraic manipulations we obtain the following matrix representation of (4.15):
푠∗ 푘= diag(푦퐾⋅푉푆) ⋅푉∗ 푁+ diag(푌푁⋅푉푁0) ⋅푉∗ 푁+ (diag(푉∗ 푁0) ⋅푌푁) ⋅푉푁−diag(푉푁0) ⋅(푌푁⋅푉∗ 푁0)
(4.16)
Where (⋅) is the conventional product of matrices, 푌퐾is a 3 × 푁matrix that represents all the admittance connected to each slack node of the system neglecting selfadmittance. 푌푁is a (푁−3) × (푁−3) matrix conformed by the set of admittance that are not related to the slacks nodes. 푉푆is the set of voltages in the slack nodes and is described as follow:
푉푆= ⎛ ⎜ ⎜⎝ 푣퐴slack 푣퐵slack 푣퐶slack ⎞ ⎟ ⎟⎠
(4.17)
4.4. WIRTINGER LINEARIZATION FOR THE POWER FLOW EQUATIONS
Now, Equation (4.16) defines an affine space which constitutes an approximation of the power flow. Therefore, a three-phase grid-connected microgrid with constant power terminals can be approximately represented by an affine space given by 푆∗= 퐻⋅푉∗ 푁+ 푀⋅푉푁+ 푇
(4.18)
with 퐻, 푀, 푇constant matrices defined as follows 퐻= diag(푦푘푉푆) + diag(푌푁⋅푉푁0)
(4.19)
푀= diag(푉∗ 푁0) ⋅푌푁
(4.20)
푇= −diag(푉푁0) ⋅(푌푁⋅푉∗ 푁0)
(4.21)
In addition, for normal operation we have that det(푀) ≠0. Matrices 퐻, 푀and 푇are defined above in order to simplify Equation (4.16). Now, for normal operation (i.e if the grid is not in short circuit) then ‖‖푣푘0‖‖ ≠0. In addition, if the graph that represents the grid is connected then | det(푌푁)| ≠0. Therefore, we conclude that 푀is not singular (i.e det(푀) ≠0).
Notice that Equation (4.13) is similar from the semidefinite relaxation presented in (Zhou et al., 2019). The proposed linearization is close to the bi-linear approximation, based on the fact that in the first two terms the first voltage factors is considered as a constant and the second voltage factor is considered as a variable. Similarly, in the second linearized term, the second voltage factor is considered as a constant and the first voltage factor is considered as a variable. Nevertheless, in the proposed linearization an extra term is obtained as the product of complex constants (푣∗ 푘0푣푚0). Aditionally, the proposed linearization despite being less precise, is more efficient due to the nonnecessity of radial structure. In other words, the proposed linearization is more proper to be used in optimization algorithms for tertiary control. Furthermore, note that Equation (4.18) is different from the linearization proposed in (Garces, 2016), since here the powers are not included in the definition of the constant matrices. This is certainly an advantage of this linearization, since the resulting equation is affine in both the powers and the voltages.
Now, since M is a non-singular matrix, we can pre-multiply (4.18) by 푀−1 obtaining the following equation 푀−1 ⋅푆∗= 푀−1 ⋅퐻⋅푉∗ 푁+ 푉푁+ 푀−1 ⋅푇
(4.22)
hence, after a few algebraic operations we obtain the following result 푉푁= 푀−1 ⋅푆∗−푀−1 ⋅푇−푀−1 ⋅퐻⋅푉∗ 푁
(4.23)
Let us define 퐴= 푀−1 ⋅푆∗−푀−1 ⋅푇and 퐵= 푀−1 ⋅퐻then we can further simplify Equation (4.23) 푉푁= 퐴−퐵⋅푉∗ 푁
(4.24)
Conjugating Equation (4.24) we obtain the following equivalent expression 푉∗ 푁= 퐴∗−퐵∗⋅푉푁
(4.25)
4.5. WIRTINGER LINEARIZATION FOR THE EXPONENTIAL MODEL OF THE LOADS
now, replacing Equation (4.25) in (4.18) we have 푆∗= 퐻⋅(퐴∗−퐵∗⋅푉푁) + 푀⋅푉푁+ 푇
(4.26)
expanding 푆∗= 퐻⋅퐴∗−퐻⋅퐵∗⋅푉푁+ 푀⋅푉푁+ 푇
(4.27)
Finally, after basic algebraic operations we obtain an expression to obtain the set of voltages of a three-phase system is finally proposed as:
푉푁= (푀−퐻⋅퐵∗)−1(푆∗−퐻⋅퐴∗−푇)
(4.28)
This is clearly a function that can be easily solved by only one iteration, getting an accurate approximation of the results obtained by using an iterative method. The main advantage of Wirtinger’s calculus is that load flow equations can be obtained in a straightforward manner without separate in real and imaginary parts, resulting in a compact equation that gives an approximation of the state of the system. Notice that the use of renewable energies does not affect the model calculations, since these renewable energies are included in the model as a power injection in the system nodes.
4.5
Wirtinger linearization for the exponential model of the loads Equation (3.29) can be also linearized using Wirtinger’s calculus. The non-linear term in this expression is given by (4.29).
‖‖푣푘‖‖ 훼= (푣푘푣∗ 푘) 훼
2
(4.29)
Linearizing around 푣푘0 the following expression is obtained (푣푘푣∗ 푘) 훼
2 = (푣푘0푣∗
푘0) 훼
2 + 휕‖‖푣푘‖‖
훼 휕푣푘 Δ푣푘+ 휕‖‖푣푘‖‖ 훼 휕푣∗ 푘 Δ푣∗ 푘 = (푣푘0푣∗ 푘0) 훼
2 + 훼
2 (푣푘0푣∗
푘0) 훼
2 −1(푣∗
푘0Δ푣푘+ 푣푘0Δ푣∗ 푘)
(4.30)
Considering that the voltages of the system are near of the nominal value, a good point of linearization is 푉푘0 = 푉푛표푚as the complex nominal voltage. Therefore, the nonlinearity of the ZIP load model is represented linearly by the following expression: (푣푘푣∗ 푘) 훼
2 = (푣nom푣∗
nom) 훼
2 +
훼
2 (푣nom푣∗
nom) 훼
2 −1(푣∗
nom(푣푘−푣nom) + 푣nom(푣∗ 푘−푣∗ nom))
(4.31)
Then, simplifying (4.31), the following equation is obtained: (푣푘⋅푣∗ 푘) 훼
2 = (푣nom푣∗
nom) 훼
2 +
훼
2 (푣nom푣∗
nom) 훼
2 −1(푣∗
nom푣푘+ 푣nom푣∗ 푘−2푣nom
2)
(4.32)
4.6. OPERATION UNDER SURPLUS ENERGY LIMITATION
Assuming the term ‖‖푣nom‖‖ 훼as (푣nom ⋅푣∗ nom) 훼
2 , the equation (3.29) is replaced by
the following complex affine equation:
푆푘= 푆wind + 푆solar + 푆battery −푆load◦(퐾+ 퐿푉푁+ 푈푉∗ 푁)
(4.33)
where ◦represents the Hadamard product and 푀, 퐻, 푇are constant vectors given by 퐾= 1 −훼
(4.34)
퐿= 훼 2푣nom
(4.35)
푈= 훼 2푣∗ nom
(4.36)
For the sake of completeness, the model with all the aforementioned approximations is presented as follows:
min ∑ 푡 푐푡푃slack(푡)
(4.37)
Equation (4.18) Equation (4.33) Equation (4.1) Equations (3.30) and (3.31) Equations (3.33) to (3.38) This model will be called Convex-TC model in the following sections in order to differentiate from the NC-TC model.
4.6
Operation under surplus energy limitation Some grid codes prevent the sale of surpluses of energy. In these cases, the model must be limited with an additional constrain in order to prevent the power in the slack node becomes negative. The optimization model is modified in order to include this constraint as follows:
min ∑ 푡 푐푡푃slack(푡)
(4.38)
real(푃slack(푡)) ≥0
(4.39)
imag(푃slack(푡)) ≥0
(4.40)
+ all constrains of Convex-TC When the available energy is higher than the total load, the microgrid remains connected to the main grid but the active and reactive power interchanged between the grid and the microgrid is zero. In this case, the microgrid has the autonomy of decide to remains electrically disconnected from the main grid reducing considerably operation costs, furthermore, and intended-island operation is presented where the main grid acts as a voltage and frequency reference of the microgrid when the active and reactive power flow is zero between the microgrid and the main grid.
Chapter 5 Results In order to illustrate the use and performance of the proposed linearization, two modified versions of the test system for low-voltage microgrids proposed by CIGRE (Papathanassiou, 2005) was used to demonstrate the efficiency and accuracy of the uses applied by the linearization. The first two results were performed and executed in a computer with standard features (AMD A12 processor and 16 GB of RAM). The last section of the results was implemented in a Raspberry Pi 3 model B V 1.2. Three sections of the obtained results were analyzed, namely:
Linearization accuracy:
In this case study, an accuracy test of the power flow linearization is proposed comparing the results of a three-phase power flow using the proposed linearization with the backward/forward sweep load flow algorithm Cespedes (1990) using Python.
Tertiary control: An optimal power flow regarded as tertiary control is proposed in order to illustrate the operation of a microgrid in 24h with intervals of 1h, considering renewable generation, a variable energy cost in time supplied by the main grid.
Real-time implementation using a Raspberry pi:
a real-time implementation proposal of the tertiary control is presented throught the technology of a Raspberry pi, to which the proposed tertiary control algorithm is integrated and tested.
5.1
Linearization accuracy In order to illustrate the application of the proposed method, consider the modified test system benchmark of low voltage microgrid feeder shown in Figure 5.1. A three-phase analysis was performed through the backward/forward sweep load flow algorithm. The data used for the analysis of the system are available in Apendix A and (Papathanassiou, 2005). The process took a time of 0.265588 seconds to obtain the nodal voltage values of the system.
After that, the same three-phase analysis was calculated using equation (4.28) obtained by a linearization that was developed with the Wirtinger’s calculus. The results
5.1. LINEARIZATION ACCURACY
400V Single residential consumers Appartment building Group of four residences Single residential consumers Appartament building
3 × 250퐴
4 × 6푚푚2Cu
3 × 70푚푚2Al-XLP
4 × 25푚푚2Cu
4 × 16푚푚2Cu
4 × 6푚푚2Cu
30m 30m 30m 30m Overhead line
4 × 120푚푚2
Al-XLPE pole to pole distance 35 m Figure 5.1: The CIGRE low voltage benchmark test system.
5.2. TERTIARY CONTROL
obtained show the effectiveness of the approximation using this method, since results were very close to the results of the iterative method. This process took a time of
0.026593 seconds, ten times faster than the iterative method to obtain the nodal voltage
values of the system.
Differences between the absolute value of voltages in the iterative method and the Wirtinger linealization were less than 5 × 10−3 pu. This is a low error considering a non-iterative load flow and is acceptable for many practical applications in which a close-to-the-optimal solution is acceptable. Furthermore, the results of this method can be used as initial point of other non-linear, heuristic algorithms or in real time operation where a fast solution is required. The results of the comparison of the two methods can be observed in Figure (5.2). The values of the X-axis refer to the node and the values of the Y-axis correspond to the difference of the absolute voltage values obtained through the two methods for each phase.
0
2
4
6
8
10
12
14
16
18
0
2
4
⋅10−3 Node |푉푖푡푒푟푎푡푖푣푒−푉푊푖푟푡푖푛푔푒푟|[푝푢] phase A phase B phase C Figure 5.2: Error between the backward forward sweep load flow algorithm and the proposed linearization using Wirtinger’s calculus.
Notice that the voltage difference between the two methods increase in phase B; this is because of this is the most charged phase. Considering an increase of 50% in the resistance per phase that consequently changes the ratio 푥∕푟, the accuracy of the method remains within a permissible range of results as shown in Figure (5.3). Maximum error for this case is 8.5 × 10−3 pu.
5.2
Tertiary control A modified version of the benchmark test system for low-voltage microgrids proposed by CIGRE Papathanassiou (2005) was used to illustrate the use and performance of the proposed model. The test system was modified in order to include renewable generation and energy storage devices as depicted in Fig 5.4.
The exponential model described in subsection 4.5 was used for the loads, with values of 훼given in Table 5.1.
5.2. TERTIARY CONTROL
0
2
4
6
8
10
12
14
16
18
0
2
4
6
8
⋅10−3 Node |푉푖푡푒푟푎푡푖푣푒−푉푊푖푟푡푖푛푔푒푟|[푝푢] phase A phase B phase C Figure 5.3: Error between the backward forward sweep load flow algorithm and the proposed linearization with r increased 50%.
Table 5.1: Loads description according to the exponential load model Node Peak power demand [W] 훼
11
13400
2
13
47000
0
14
40000
2
18
70900
0
19
15600
1
The CIGRE test system is a 19-nodes, typical residential network with a peak power demand of 186.9 kW and nominal voltage of 400V. This system was analyzed for operation in 24h with intervals of 1h, considering a variable energy cost in time 푐푡supplied by the slack node as shown in the Figure 5.5.
However, the model can be extended to any period of time with any discretization. Two cases where analyzed, namely:
Case 1: In this case study, the slack node can inject and receive power from the microgrid; therefore in the periods that the available power given by generators and storage is greater than the load, the microgrid can inject power to the main grid seeing this translated as a sale of energy to the main grid. Case 2:
In this case, the slack node is limited to only supply power. Therefore, the microgrid cannot inject power to the main grid.
Results for each case are described below.
5.2. TERTIARY CONTROL
1
400 V
2
3
4
5
6
7
8
9
10
11
12
15
16
17
18
14
13
19
Overhead line 4 × 120푚푚2 Al XLPE twisted cable, pole to pole distance 35푚
4 × 6푚푚2Cu, 30m
4 × 16푚푚2Cu, 30m
4 × 25푚푚2Cu, 30m
4 × 6푚푚2Cu, 30m
4 × 16푚푚2Cu, 30m
3 × 70푚푚2Al XLP, 56.4m
single residential consumer ac ac dc ac Group of 4 residences ac dc single residential consumer dc ac apartment building apartment building ac ac ac dc ac dc dc ac Figure 5.4: The CIGRE low voltage benchmark test system.
5.2. TERTIARY CONTROL
2
4
6
8
10
12
14
16
18
20
22
24
0.1
0.11
0.12
0.13
Time (h) Price (US/kW/h) Figure 5.5: Prices from XM S.A.S, Colombian national interconnected system operator. Real time pricing for 24 consecutive hours in july-18-2019 (E.S.P, 2019)
5.2.1
Case 1 The behavior of the tertiary control for this case is shown in Fig 5.6, where 푃slack is the power taken or sold to the main grid, and 푃퐸푅represents the power provided by the photovoltaic units, wind turbines and batteries. As a result, the microgrid takes power from the main grid in the periods where the renewable generation and batteries can not satisfy the load or when the energy has a low price. Eventually, the microgrid sold power to the system in the periods where the generation can supply the load and there is an excess of generation.
5
10
15
20
−100
0
100
200
Time (h) Power (kW) Figure 5.6: Tertiary control the slack node ( ), load demand ( ) and power 푃퐸푅
(
) for the Case 1.
The photovoltaic generation uses all its available resources, injecting the maximum amount of power that the irradiance profile allow in all the periods. The behavior of the
5.2. TERTIARY CONTROL
photovoltaics units is represented in the Fig 5.7.
0
5
10
15
20
0
0.5
1
1.5
⋅105 Time (h) 푃푃푉(푊) Figure 5.7: Optimal solar generation ( ) and available solar generation ( ) for the Case 1. The algorithm always takes the maximum solar generation. Wind turbines have the same behavior of photovoltaic sources, as shown in Fig 5.8. These use the available wind speed profile, giving as a result the maximum power that the turbine can provide in each period according to the wind speed forecast.
0
5
10
15
20
0
0.5
1
1.5
⋅105 time (h) 푃푊푇(푊) Figure 5.8: Optimal wind generation ( ) and available wind generation ( ) for Case 1. The algorithm always take the maximum available power. Finally and considering an initial state of energy of the batteries in 50%, these have a response to the load as shown in Fig 5.9.
Note that all the batteries have a common behavior, charging completely in the periods of low load demand taking advantage of the excess generation by solar and wind units, and discharging in the periods where the peaks of the demand occur.
5.2. TERTIARY CONTROL
0
5
10
15
20
2
3
4
⋅104 Time(h) Energy (Wh) 퐸Node11 퐸Node13 퐸Node14 퐸Node18 퐸Node19 퐸max-min Figure 5.9: Energy stored in each battery for Case 1, considering the 푆푂퐶of the batteries between 30% and 100% of the batteries energy.
5.2.2
Case 2 The power provided by the slack node is limited in all the periods of the tertiary control as follows:
푃slack(푡) ≥0
(5.1)
Therefore, the renewable generation never overtakes the load demand and the microgrid can not inject power to the main grid. In the periods that the demand exceeds the maximum renewable generation and the power that the batteries can provide, the main grid injects power to the microgrid in order to guarantee the stability of the system and the supply of loads as shown in Fig 5.10.
0
5
10
15
20
0
50
100
150
200
Time (h) Power(kW) Figure 5.10: Energy exchange with the main grid ( ), total generation ( ) and total demand ( ) for Case 2.
The photovoltaic generation uses almost all of its available resources, limiting its
5.2. TERTIARY CONTROL
generation in periods of maximum irradiance availability as depicted in Fig 5.11 in order to keep the equilibrium of generation and load demand.
0
5
10
15
20
0
0.5
1
1.5
⋅105 Time (h) 푃푃푉(푊) Figure 5.11: Optimal power generation ( ) and available power solar generation
(
) for Case 2. The solar panels reduce their generation during the peak in order to maintain islanded operation.
On the other hand, the wind turbines reduce their generation, in order to keep the balance between the load and generation. The behavior related with the wind turbines is shown in Fig 5.12.
0
5
10
15
20
25
0.5
1
⋅105 Time (h) 푃푊푇(푊) Figure 5.12: Optimal wind generation ( ) and available wind generation ( ) for Case 2. The algorithm takes approximately the maximum available power. Eventually, the 푆푂퐶and the initial state of the batteries is the same of the previous case. The batteries tend to charge up to 100% in periods prior to maximum demand as shown in Fig 5.13, this owing to in these periods the tertiary control requires to minimize the purchase of energy to the main grid and therefore reduce costs in the peak of demand. Note that the batteries reduce their charging during the first periods in order to keep the balance of generation and demand.
5.3. TIME RESPONSE OF CONVEX-TC USING RASPBERRY PI
0
5
10
15
20
2
3
4
⋅104 Period 퐸푛푒푟푔푦[푊ℎ] 퐸퐵푁표푑푒11 퐸퐵푁표푑푒13 퐸퐵푁표푑푒14 퐸퐵푁표푑푒18 퐸퐵푁표푑푒19 퐸max-min Figure 5.13: Energy stored in each battery for Case 2, considering the 푆푂퐶of the batteries between 30% and 100% of the batteries energy.
Figure 5.14: Picture of the Raspberry-pi
5.3
Time response of Convex-TC using Raspberry Pi A Raspberry-pi is a low cost small single-board computer that can be used in many applications. In this case, it is proposed as centralized device for tertiary control operation of the microgrid. The following results were performed and executed in a Raspberry-Pi model B V 1.2 (see Fig. 5.14) with a 1.2 GHz 64-bit quad core processor, on board 802.11n Wi-Fi, Bluetooth and USB boot capabilities. The Rasberry-pi uses a linux operative system. Therefore, it was possible to install Python and cvxpy for solving the optimization problem. A simplified model of the tertiary control was implemented, the response was obtained in 24.6 seconds with the same results obtained in subsection
5.2.1 for Case 1. The response for Case 2 was obtained in 33.93 seconds with the same
results of subsection 5.2.2. Notice that the real-time response of the convex-TC implementation in Raspberry-Pi is easily adjusted with the time requirements mentioned in section 2.4.1 and is not affected by the main source of delay of the optimization model.
5.3. TIME RESPONSE OF CONVEX-TC USING RASPBERRY PI
On the other hand, the natural latency of the calculation process for the two cases before mentioned added to a standard communication latency, meets the time requirements of the tertiary control. In addition, based on the fact that the resulting calculation time of the algorithm in the Raspberry-Pi is in order of minutes (24.6 and 33.93 seconds, for case 1 and 2 respectively), tertiary control implementation is not affected by the communication delay. Accordingly, it is apposite to ensure that this device is clearly an excellent alternative for tertiary control implementation. The Raspberry-Pi implementation of the convex-TC can be scalated to a distributed implementation of the control using i.e the Consensus Alternating Direction Method of Multipliers (C-ADMM) approach (Javadi et al., 2019). This technique would provide the possibility of modeling the convex-TC problem both in centralized and decentralized manners. In a large-scale system emerges the necessity of partitionate the problem, in order to reduce the computational burden and improve the rate of convergence. Hence, the convex-TC could be applied in a large-scale system, dividing the problem in a decentralized implementation in multiple Raspberries-Pi that may include demand response.
Chapter 6 Conclusions A complete convex tertiary control model is proposed using a Wirtinger approximation in a three-phase unbalanced microgrid, besides the model consider a high wind and solar energy penetration. The methodology proposed is the key to ensure an optimum operation of the microgrid components and can be implemented as a tertiary control in a hierarchical control in microgrids. A linear approximations of the power flow and the exponential model of the loads in microgrids were developed to obtain a complete convex model. This method is based on Wirtinger’s calculus, a partial differential operators that behave in a similar manner to the ordinary derivatives, but that can be applied to non-holomorphic functions such as in the power flow and exponential model of the loads.
The proposed linearizations are performed directly in the complex domain allowing a compact representation and direct implementation in script-based languages such as Python. In contradistinction to the dc-power flow, the proposed linearization of power flow equations does not require any consideration regarded the 푥∕푟ratio and gives an accurate approximation of both magnitude and angle as presented in section 5.1. The proposed power flow linearization is general for radial and meshed microgrids under balanced and unbalanced operation. In addition, it gives both magnitude and angle of the voltages. In comparison to other recently proposed power flow linearizations, the proposed method generates an affine space in both 푆and 푉. This constitutes and advantage since it can be directly used in convex optimization problems, such as optimal power flow, tertiary control, state estimation and distribution planning among other possible applications. The proposed model can also be generalized for a general power distribution systems, however, this thesis is focused on the analysis and accuracy of the model for microgrids.
The use of Wirtinger approach for the convexification of the power flow equations and the exponential load model can optimize the operation of the system in short times. Furthermore, the injected power’s price from the main grid will be decreased considerably. A static reserve is proposed and implemented in the tertiary control model, in order to give robustness to the system keeping the equilibrium and security of the microgrid when the system changes from grid connected to islanded operation, guaranteeing a safe operating time under the power supply of batteries and renewable sources.
6.1. FURTHER WORK
A two-case under the convex tertiary control operation were presented. The presented results show a good performance of the convex tertiary control in the operation of the system under connected operation where is permitted an energy exchange between the microgrid and the main grid; in the other hand, an intended-island operation under surplus of energy where the active and reactive power interchange between the grid and the microgrid is zero when the available energy is higher than the load. Under this situation, the slack node is only used as a reference of the microgrid. A real-time low-cost, accurate implementation of the convex tertiary control model in the two-case test is proposed using a Raspberry Pi, fulfilling the time requirements of tertiary control in both situations and being able to be easily implemented using different types of communications technologies without being affected by latency. All numerical results were performed using Python over the CIGRE-microgrid test model demonstrating the accurate and fast execution of the proposed convex tertiary control model.
6.1
Further work There are several research directions that have been revealed as a result of this work. The most promising are summarized below:
• An intelligent predictor system based on prevision weather data (wind speed, so-
lar irradiance and temperature) has to be designed, in order to feed the algorithm in real-time operation.
• Prediction uncertainties on the renewable energies and load demand predictions
have to be considered, in order to design an autonomous system for an isolated area.
• Is necessary to include a more detailed model of the batteries, considering effi-
ciencies of charge and discharge.
• In islanded operation is neccesary to implement a model that determines the loads
that can be disconnected according its importance in the grid, to guarantee island operation and the stability of the system.
• A stochastic implementation of the tertiary control is required in order to give
more robustness and reliability to the system, it due to the intermittency of the renewable resources and the load.
• A distributed implementation of the convex-TC applied to a large-scale system,
to improve the rate of convergence and reduce computational burden.
Appendix A Data for the benchmark microgrid Table A.1: Interconnection microgrid nodes Node 1 Node 2 Length (m) Type
Table A.2: Impedance data for the benchmark microgrid lines Line type Rph (ohm/km) Xph (ohm/km) Rneutral (ohm/km) R0 (ohm/km) X0 (ohm/km)
1
OL - Twisted cable 4x120 mm2 Al
0.284
0.083
-
1.136
0.417
2
OL - Twisted cable 3x70 mm2 Al + 54.6 mm2 AAAC
0.497
0.086
0.630
2.387
0.447
3
OL - Al conductors 4x50 mm2 equiv. Cu
0.397
0.279
-
-
-
4
OL - Al conductors 4x35 mm2 equiv. Cu
0.574
0.294
-
-
-
5
OL - Al conductors 4x16 mm2 equiv. Cu
1.218
0.318
-
-
-
6
SC - 4x6 mm2 Cu
3.690
0.094
-
13.64
0.472
7
SC - 4x16 mm2 Cu
1.380
0.082
-
5.52
0.418
8
SC - 4x25 mm2 Cu
0.871
0.081
-
3.48
0.409
9
SC - 3x50 mm2 Al + 35 mm2 Cu
0.822
0.077
0.524
2.04
0.421
10
SC - 3x95 mm2 Al + 35 mm2 Cu
0.410
0.071
0.524
-
-
11
UL - 3x150 mm2 Al + 50 mm2 Cu
0.264
0.071
0.387
-
-
Appendix B Brief review on Wirtinger’s calculus In this section, some of the main concepts related to Wirtinger’s calculus are presented briefly. Interested reader can refer to Remmert (1989) for more details. Definition 1 (Wirtinger’s operators). Given a complex function 푓= 푢(푥, 푦) + 푗푣(푥, 푦) with 푥and 푦the real and imaginary parts of a complex variable 푧= 푥+ 푗푦, we define the Wirtinger’s derivative and the conjugate Wirtinger’s derivative as followŝ 휕푓 휕푧= 1
2
(
휕푢 휕푥+ 휕푣 휕푦
)
+ 푗
2
(
휕푣 휕푥−휕푢 휕푦
)
(B.1)̂ 휕푓 휕푧∗= 1
2
(
휕푢 휕푥−휕푣 휕푦
)
+ 푗
2
(
휕푣 휕푥+ 휕푢 휕푦
)
(B.2) Notice that, although very similar to the conventional derivatives, the Wirtinger’s operators are not derivatives in the Cauchy-Riemann sense. However, they can be used for linearization of the power flow equations directly on complex domain. Geometrically, the Cauchy-Riemann conditions imply that the derivative in all directions is the same. Figure B.1 shows schematically this concept. In this case, the complex variable is 푧= 푥+ 푗푦and hence, the limit that define the derivative must be posed in all directions Δ푧. However, the presence of the conjugate in the equation makes the limit different, according the direction.
Proposition 1 (See Remmert (1989)). Wirtinger’s derivatives apply the common rules for differentiation known from real-valued analysis concerning the sum, product and
푥 푦 Δ푧 Figure B.1: Different directions to obtain the limit when Δ푧→0 in the complex plane. composition of two functions as follows:̂ 휕(푓+ 푔) 휕푧 =̂ 휕푓 휕푧+̂ 휕푔 휕푧 (B.3)̂ 휕(푓+ 푔) 휕푧∗ =̂ 휕푓 휕푧∗+̂ 휕푔 휕푧∗ (B.4)̂ 휕(푓⋅푔) 휕푧 = 푓̂ 휕푔 휕푧+ 푔̂ 휕푓 휕푧 (B.5)̂ 휕(푓⋅푔) 휕푧∗ = 푓̂ 휕푔 휕푧∗+ 푔̂ 휕푓 휕푧∗ (B.6) In general, 푧∗can be regarded as a constant when computing the derivative respect to 푧and vice versa Hunger (2007). Therefore, we have that:̂ 휕 휕푧푧∗=̂ 휕 휕푧∗푧= 0 (B.7) For the sake of clarity, let us see two simple examples. First, let 푓(푧) = 푘푧, where 푘∈ℝis a constant. Derivatives of 푓(푧) yield:̂ 휕푓 휕푧= 1
2
(휕푘(푥+ 푗푦) 휕푥 −푗휕푘(푥+ 푗푦) 휕푦
)
(B.8) = 1 2(푘−푗(푗푘)) (B.9) = 푘 (B.10) Similarly,
̂휕푓 휕푧∗= 1
2
(휕푘(푥+ 푗푦) 휕푥 + 푗휕푘(푥+ 푗푦) 휕푦
)
(B.11) = 1 2(푘+ 푗(푗푘)) (B.12) = 0 (B.13) In this case, the function is complex-analytic. As a second example, consider the function 푓= √ 푧푧∗, then the Wirtinger derivatives are given bŷ 휕푓 휕푧= 푧∗
2
√ 푧푧∗ (B.14)̂ 휕푓 휕푧∗= 푧
2
√ 푧푧∗ (B.15) In general, Wirtinger’s derivatives can be used for complex-analytic and non-analytic functions due to the following result:
Proposition 2 (Hunger (2007)). The Cauchy-Rieman conditions can be represented aŝ 휕푓 휕푧∗= 0 (B.16) Evidently the main equations presented in this thesis does not fulfill this condition and hence the function is non-analytic. However, we can define a linearization for a non-holomorphic function as follows 푓≈푓(푧0) +̂ 휕푓 휕푧Δ푧+̂ 휕푓 휕푧∗Δ푧∗ (B.17) Notice that this is not a Taylor expansion in the complex domain since it depends on both, 푧and 푧∗. Nevertheless, This linearization is equivalent to the one obtained by splitting the function into real and imaginary parts and linearize in the real domain. However, the complex representation is more convenient from analysis and programming point of view.
Bibliography Abdi, H., Beigvand, S. D., and Scala, M. L. (2017). A review of optimal power flow studies applied to smart grids and microgrids. Renewable and Sustainable Energy Reviews, 71:742 – 766.
Ackermann, T. (2005). Wind Power in Power Systems, volume 1. Wiley, New York, 1 edition.
Bai, X., Wei, H., Fujisawa, K., and Wang, Y. (2008). Semidefinite programming for optimal power flow problems. International Journal of Electrical Power and Energy Systems, 30(6):383 – 392.
Bazrafshan, M. and Gatsis, N. (2018). Comprehensive modeling of three-phase distribution systems via the bus admittance matrix. IEEE Transactions on Power Systems, 33(2):2015–2029.
Bidram, A. and Davoudi, A. (2012). Hierarchical structure of microgrids control system. IEEE Transactions on Smart Grid, 3(4):1963–1976.
Bolognani, S. and Zampieri, S. (2016). On the existence and linear approximation of the power flow solution in power distribution networks. IEEE Transactions on Power Systems, 31(1):163–172.
Bui, V., Hussain, A., Nguyen, T., and Kim, H. (2016). Real-time optimization for microgrid operation based on auto-configuration in grid-connected mode. In 2016 IEEE International Conference on Sustainable Energy Technologies (ICSET), pages 142–146.
Byung Ha Lee and Jin Ah Yang (2015). A study on optimal operation of microgrids considering the uncertainty of renewable generation and load by use of duration curves. In 2015 IEEE Power Energy Society General Meeting, pages 1–5. Caliskan, S. Y. and Tabuada, P. (2014). Towards kron reduction of generalized electrical networks. Automatica, 50(10):2586 – 2590.
Capitanescu, F. (2016). Critical review of recent advances and further developments needed in ac optimal power flow. Electric Power Systems Research, 136:57 – 68.
BIBLIOGRAPHY
Castillo, A., Laird, C., Silva-Monroy, C. A., Watson, J., and O’Neill, R. P. (2016). The unit commitment problem with ac optimal power flow constraints. IEEE Transactions on Power Systems, 31(6):4853–4866.
Cespedes, R. (1990). New method for the analysis of distribution networks. IEEE Transactions on Power Delivery, 5(1):391–396.
Ci, S., Qian, J., Wu, D., and Keyhani, A. (2012). Impact of wireless communication delay on load sharing among distributed generation systems through smart microgrids. IEEE Wireless Communications, 19(3):24–29.
Cui, B. and Sun, X. A. (2018). A new voltage stability-constrained optimal power-flow model: Sufficient condition, socp representation, and relaxation. IEEE Transactions on Power Systems, 33(5):5092–5102.
Dall’Anese, E., Zhu, H., and Giannakis, G. B. (2013). Distributed optimal power flow for smart microgrids. IEEE Transactions on Smart Grid, 4(3):1464–1475. Dall’Anese, E., Baker, K., and Summers, T. (2017). Chance-constrained ac optimal power flow for distribution systems with renewables. IEEE Transactions on Power Systems, 32(5):3427–3438.
Dvorkin, Y., Henneaux, P., Kirschen, D. S., and Pandžić, H. (2018). Optimizing primary response in preventive security-constrained optimal power flow. IEEE Systems Journal, 12(1):414–423.
E.S.P, X. S. (2019). National price spot.
Garces, A. (2016). A linear three-phase load flow for power distribution systems. IEEE Transactions on Power Systems, 31(1):827–828.
Garces, A. (2016). A quadratic approximation for the optimal power flow in power distribution systems. Electric Power Systems Research, 130:222 – 229. Henao-Muñoz, A. C., Saavedra-Montes, A. J., and Ramos-Paja, C. A. (2017). Energy management system for an isolated microgrid with photovoltaic generation. In
2017 14th International Conference on Synthesis, Modeling, Analysis and Simulation
Methods and Applications to Circuit Design (SMACD), pages 1–4. Hunger, R. (2007). An introduction to complex differentials and complex differentiability. technical report.
Javadi, M., Nezhad, A. E., Gough, M., Lotfi, M., and Catalão, J. P. S. (2019). Implementation of consensus-admm approach for fast dc-opf studies. In 2019 International Conference on Smart Energy Systems and Technologies (SEST), pages 1–5. Khayat, Y., Shafiee, Q., Heydari, R., Naderi, M., Dragičević, T., Simpson-Porco, J. W., Dörfler, F., Fathi, M., Blaabjerg, F., Guerrero, J. M., and Bevrani, H. (2020). On the secondary control architectures of ac microgrids: An overview. IEEE Transactions on Power Electronics, 35(6):6482–6500.
BIBLIOGRAPHY
Lab, S. (2019). An1138: Zigbee mesh network performance. AN1138. Li, J., Liu, Y., and Wu, L. (2018). Optimal operation for community-based multi-party microgrid in grid-connected and islanded modes. IEEE Transactions on Smart Grid, 9(2):756–765.
Li, Q. and Vittal, V. (2017). Non-iterative enhanced sdp relaxations for optimal scheduling of distributed energy storage in distribution systems. IEEE Transactions on Power Systems, 32(3):1721–1732.
Liu, W., Zhuang, P., Liang, H., Peng, J., and Huang, Z. (2018). Distributed economic dispatch in microgrids based on cooperative reinforcement learning. IEEE Transactions on Neural Networks and Learning Systems, 29(6):2192–2203. Lopes, J. A. P., Madureira, A. G., and Moreira, C. C. L. M. (2013). A view of microgrids. Wiley Interdisciplinary Reviews: Energy and Environment, 2(1):86–103. Low, S. H. (2014). Convex relaxation of optimal power flow—part i: Formulations and equivalence. IEEE Transactions on Control of Network Systems, 1(1):15–27. Luo, X., Wang, J., Dooner, M., and Clarke, J. (2015). Overview of current development in electrical energy storage technologies and the application potential in power system operation. Applied Energy, 137:511 – 536.
Marley, J. F., Molzahn, D. K., and Hiskens, I. A. (2017). Solving multiperiod opf problems using an ac-qp algorithm initialized with an socp relaxation. IEEE Transactions on Power Systems, 32(5):3538–3548.
Marti, J. R., Ahmadi, H., and Bashualdo, L. (2013). Linear power-flow formulation based on a voltage-dependent load model. IEEE Transactions on Power Delivery, 28(3):1682–1690.
Marzband, M., Yousefnejad, E., Sumper, A., and Domínguez-García, J. L. (2016). Real time experimental implementation of optimum energy management system in standalone microgrid by using multi-layer ant colony optimization. International Journal of Electrical Power and Energy Systems, 75:265 – 274.
Mohagheghi, E., Gabash, A., and Li, P. (2016). Real-time optimal power flow under wind energy penetration-part i: Approach. In 2016 IEEE 16th International Conference on Environment and Electrical Engineering (EEEIC), pages 1–6. Molzahn, D. K. and Hiskens, I. A. (2019). A Survey of Relaxations and Approximations of the Power Flow Equations.
Papathanassiou, S. (2005). A benchmark low voltage microgrid network. CIGRE Symposium "Power systems with dispersed generation: technologies, impacts on development, operation and performances".
Ramirez, D. A. and Garcés, A. (2020). A convex approximation for the tertiary control of unbalanced microgrids. In review in Electric Power Systems Research.
BIBLIOGRAPHY
Ramirez, D. A. and Garcés, A. (2019). A wirtinger linearization for the power flow in microgrids. In 2019 IEEE Power Energy Society General Meeting (PESGM), pages 1–5.
Remmert, R. (1989). Theory of Complex Functions, volume 1. Springer-Verlag, New York, 1 edition.
Rocabert, J., Luna, A., Blaabjerg, F., and Rodríguez, P. (2012). Control of power converters in ac microgrids. IEEE Transactions on Power Electronics, 27(11):4734–
4749.
Shafiq, S., Javaid, N., and Aslam, S. (2018). Optimal power flow control in a smart micro-grid using bird swarm algorithm. In 2018 5th International Multi-Topic ICT Conference (IMTIC), pages 1–7.
Simpson-Porco, J. W., Shafiee, Q., Dörfler, F., Vasquez, J. C., Guerrero, J. M., and Bullo, F. (2015). Secondary frequency and voltage control of islanded microgrids via distributed averaging. IEEE Transactions on Industrial Electronics, 62(11):7025–
7038.
Sörensen, K. (2015). Metaheuristics—the metaphor exposed. International Transactions in Operational Research, 22(1):3–18.
Vergara, P., Lopez, J. C., Rider, M. J., Shaker, H. R., [da Silva], L. C., and Jørgensen, B. N. (2020). A stochastic programming model for the optimal operation of unbalanced three-phase islanded microgrids. International Journal of Electrical Power and Energy Systems, 115:105446.
von Jouanne, A. and Banerjee, B. (2001). Assessment of voltage unbalance. IEEE Transactions on Power Delivery, 16(4):782–790.
Wang, D., Qiu, J., Reedman, L., Meng, K., and Lai, L. L. (2018). Two-stage energy management for networked microgrids with high renewable penetration. Applied Energy, 226:39 – 48.
Yamashita, D. Y., Vechiu, I., and Gaubert, J.-P. (2020). A review of hierarchical control for building microgrids. Renewable and Sustainable Energy Reviews, 118:109523. Yuan, Z. and Hesamzadeh, M. R. (2019). Second-order cone ac optimal power flow: convex relaxations and feasible solutions. Journal of Modern Power Systems and Clean Energy, 7(2):268–280.
Zhao, B., Zhang, X., Chen, J., Wang, C., and Guo, L. (2013). Operation optimization of standalone microgrids considering lifetime characteristics of battery energy storage system. IEEE Transactions on Sustainable Energy, 4(4):934–943. Zhou, F., Chen, Y., and Low, S. H. (2019). Sufficient conditions for exact semi-definite relaxation of optimal power flow in unbalanced multiphase radial networks. In 2019 IEEE 58th Conference on Decision and Control (CDC), pages 6227–6233.
Cita: Ramírez Loaiza, Diego Alejandro (2020), Tertiary control in microgrids: an optimal power flow approach based on convex optimization and Wirtinger calculus, Universidad Tecnológica de Pereira, p. N. https://hdl.handle.net/11059/12411