4041 2032 2031 40314031 4032 4044 4046 4047 4042 4043 4063 4062 4045 10421043 1044 1041 1045 4051 4061 1021 1022 1014 1013 1011 1012 4012 4011 4072 4071 4022 4021 Ancillary Service for Frequency Support Design of a Battery Storage Based Ancillary Service for Fre- quency Support in the Nordic Power System Master’s thesis in Electric Power Engineering OMAR JUÁREZ MORENO Department of Energy and Environment CHALMERS UNIVERSITY OF TECHNOLOGY Gothenburg, Sweden 2017 Master’s thesis 2017 Ancillary Service for Frequency Support Design of a Battery Storage Based Ancillary Service for Frequency Support in the Nordic Power System OMAR JUÁREZ MORENO Department of Energy and Environment Division of Electric Power Engineering Chalmers University of Technology Gothenburg, Sweden 2017 Ancillary Service for Frequency Support Design of a Battery Storage Based Ancillary Service for Frequency Support in the Nordic Power System OMAR JUÁREZ MORENO © OMAR JUAREZ MORENO, 2017. Supervisor: Oscar Lennerhag, STRI AB Examiner: Peiyuan Chen, Department of Energy and Environment Master’s Thesis 2017 Department of Energy and Environment Division of Electric Power Engineering Chalmers University of Technology SE - 412 96 Gothenburg Telephone +46 31 772 1000 Cover: Nordic32. © OMAR JUAREZ MORENO, 2017. Typeset in LATEX Printed by Chalmers Reproservice Gothenburg, Sweden 2017 iv Ancillary Service for Frequency Support Design of a Battery Storage Based Ancillary Service for Frequency Support in the Nordic Power System OMAR JUÁREZ MORENO Department of Energy and Environment Chalmers University of Technology Abstract In recent years, the frequency in the Nordic power system has been experiencing an increasing number of minutes outside the normal frequency band of ±100 mHz determined by ENTSO-E. It could be argued, that this trend is expected to con- tinue, specially with the current tendency to replace conventional generation with intermittent, renewable energy sources that are decoupled from the grid. This in turn, has given rise to new opportunities in the Ancillary Service (AS) market, that can take advantage of network connected devices such as Energy Storage Systems (ESS), to increase the grid’s flexibility. This thesis deals with the design and implementation of a Battery Energy Storage System (BESS) that aims to provide the grid with frequency support in the frame of the Nordic reserve product Frequency Containment Reserve for Disturbance opera- tion (FCR-D). The proposed Ancillary Service (AS) consists of a dynamic battery model that is controlled with an energy-curtailment strategy dependant on its State of Charge (SOC). The control system for the Voltage Source Converter (VSC) that interfaces the battery with the grid is conformed of a two-degree-of-freedom current controller implemented in the synchronous reference frame that receives the active and reactive power references from the outer frequency and voltage controllers, re- spectively. The proposed AS was implemented using the simulation tool DIgSILENT Power- Factory. The models were tested in CIGRÉ’s Nordic32A bus system with three different study cases: the loss of a generating unit that caused the frequency to drop below 49 Hz, where it was proven that a 50 MW, 300 MW h BESS could reduce the Nadir enough to avoid the activation of more drastic frequency-controlled actions. The second scenario explored the effect of converter rating versus battery capacity when the BESS is providing FCR-D, where it was concluded that the BESS ca- pacity is not the limiting factor for providing the service but rather the converter’s rating. Finally, the impact of the BESS was studied in a weaker grid where conven- tional generation was replaced with static generation. Here, it was shown that the proposed AS effect was more noticeable in the weaker grid, where the same BESS was able to reduce the Nadir by an additional 8.11% for the same frequency event, compared to the base case where no conventional generation was phased-out. Keywords: Battery energy storage system, ancillary service, frequency control, Nordic power system, VSC control. v Acknowledgements First and foremost, I would like to credit Chalmers University of Technology for awarding me the Avancez Scholarship that made it possible for me to study my master’s degree in this prestigious university. Secondly, I wish to acknowledge STRI AB for having sponsored this thesis, specially Pablo Rey, VD of Consulting Services. Next, I would like to express my appreciation to Emil Hillberg, for granting me the opportunity to conduct my thesis at STRI Göteborg. I would also like to convey my deep gratitude to my supervisor Oscar Lennerhag, for his patient guidance, enthusiastic encouragement and useful critiques of this mas- ter’s thesis. My grateful thanks are extended to my examiner Peiyuan Chen, for his useful and constructive recommendations on this project. Advice given by Gustavo Pinares has been a great help and his willingness to share his time so generously is very much appreciated. Special thanks are also extended to the staff of STRI Göteborg for their support and for making my day-to-day at the office more pleasant. I would also like to acknowledge my friends who have made my time in Sweden so enjoyable, even though they have been often times relegated during the span of this project. Last but not least, I would like to thank my family for their unconditional support in all my endeavours. All I am, I owe to them. Omar Juárez Moreno, Gothenburg, June 2017 vii Contents List of Figures xiii List of Tables xvii List of Acronyms xix 1 Introduction 1 1.1 Background and motivations . . . . . . . . . . . . . . . . . . . . . . . 1 1.2 Aim and scope . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 1.3 Structure of the thesis . . . . . . . . . . . . . . . . . . . . . . . . . . 3 2 Basic Concepts 5 2.1 The Nordic power system . . . . . . . . . . . . . . . . . . . . . . . . 5 2.1.1 Nordic32A bus system . . . . . . . . . . . . . . . . . . . . . . 6 2.2 Frequency dynamics . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 2.3 Ancillary services . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 2.4 Operational reserves . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 2.4.1 Primary, secondary and tertiary reserves . . . . . . . . . . . . 8 2.4.2 Reserve products in the Nordic power system . . . . . . . . . 9 2.4.3 Other frequency-control actions in the Nordic power system . 9 2.5 Energy storage in power systems . . . . . . . . . . . . . . . . . . . . 10 2.5.1 Basic layout of a ESS . . . . . . . . . . . . . . . . . . . . . . . 10 2.6 Battery energy storage systems . . . . . . . . . . . . . . . . . . . . . 11 2.6.1 Batteries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 2.6.2 Battery management systems . . . . . . . . . . . . . . . . . . 12 2.7 Voltage source converters . . . . . . . . . . . . . . . . . . . . . . . . . 13 2.7.1 Limiting strategies . . . . . . . . . . . . . . . . . . . . . . . . 14 3 Design of the proposed ancillary service 15 3.1 System layout . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 3.2 Control strategy for the VSC . . . . . . . . . . . . . . . . . . . . . . 16 3.3 PLL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 3.4 Inner current control loop . . . . . . . . . . . . . . . . . . . . . . . . 17 3.4.1 One-degree-of-freedom controller design . . . . . . . . . . . . . 18 3.4.2 Improved current controller . . . . . . . . . . . . . . . . . . . 20 3.4.3 Analysis of the current controller . . . . . . . . . . . . . . . . 22 3.5 Voltage limiter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 ix Contents 3.6 Reference calculation . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 3.7 Implementation of a current limiter . . . . . . . . . . . . . . . . . . . 24 3.8 Derivation of anti-windup function for the integrator . . . . . . . . . 25 3.9 Outer controllers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26 3.9.1 Frequency controller . . . . . . . . . . . . . . . . . . . . . . . 26 3.9.2 AC voltage controller . . . . . . . . . . . . . . . . . . . . . . . 27 3.10 Battery . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27 3.11 Battery management system . . . . . . . . . . . . . . . . . . . . . . . 30 4 Implementation and model verification 33 4.1 Implementation approach . . . . . . . . . . . . . . . . . . . . . . . . 33 4.1.1 RMS and EMT simulations . . . . . . . . . . . . . . . . . . . 33 4.1.2 Model revision . . . . . . . . . . . . . . . . . . . . . . . . . . 34 4.1.3 Model evaluation . . . . . . . . . . . . . . . . . . . . . . . . . 35 4.2 VSC control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36 4.3 Current controller . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38 4.3.1 Basic current controller . . . . . . . . . . . . . . . . . . . . . . 38 4.3.2 Improved current controller . . . . . . . . . . . . . . . . . . . 40 4.3.3 Current controller analysis . . . . . . . . . . . . . . . . . . . . 42 4.3.4 Sensitivity to parameter variations . . . . . . . . . . . . . . . 43 4.3.4.1 Sensitivity to variations in the filter inductance . . . 43 4.3.4.2 Sensitivity to variations in the filter resistance . . . . 44 4.4 Frequency controller . . . . . . . . . . . . . . . . . . . . . . . . . . . 46 4.5 Current limiter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47 4.6 Battery . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48 4.7 BMS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50 5 Results from application study 53 5.1 Test scenario . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53 5.2 Frequency dip after 750 MW of generation is tripped . . . . . . . . . 54 5.3 Different converter ratings . . . . . . . . . . . . . . . . . . . . . . . . 55 5.4 Decommissioning of thermal plants in the Southwest zone . . . . . . . 58 6 Discussion 61 6.1 Sustainable development . . . . . . . . . . . . . . . . . . . . . . . . . 61 6.2 Areas of opportunity . . . . . . . . . . . . . . . . . . . . . . . . . . . 61 7 Conclusions 63 Bibliography 65 A Per-Unit values I B Transformations for three-phase systems III B.1 Transformation of three-phase quantities into vectors . . . . . . . . . III B.2 Transformation between fixed and rotating coordinate systems . . . . IV C Nordic32A VII x Contents C.1 PowerFactory implementation . . . . . . . . . . . . . . . . . . . . . . VII C.2 Load flow LF32_028 results . . . . . . . . . . . . . . . . . . . . . . . VIII xi Contents xii List of Figures 1.1 Evolution of frequency deviation outside 49.90 – 50.10 Hz in the Nordic power system (ENTSO-E, 2016) . . . . . . . . . . . . . . . . . 1 2.1 Map showing the conforming countries of the Nordic power system . . 5 2.2 Nodal distribution of the buses in the Nordic32 system over Scandi- navia. Zone "External" is coloured red, zone "North" is shown in blue, zone "Central" is delineated in black and zone "Southwest" is depicted in magenta. The voltage level of each bus can be discerned by the first number of the bus in question, i.e. 400 kV, 220 kV and 130 kV buses begin with 4,2 and 1 respectively . . . . . . . . . . . . . . . . . 6 2.3 Changes in primary, secondary and tertiary reserves following a severe disturbance (Bohlen and Hassan, 2011) . . . . . . . . . . . . . . . . . 8 2.4 Frequency controlled actions in the Nordic synchronous system (ENTSO- E, 2016) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 2.5 Value of energy storage applications (EPRI, 2010) . . . . . . . . . . . 11 2.6 General control strategy for a grid-connected battery system (Lawder et al, 2014) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 2.7 Three-phase, two-level bridge inverter with a battery as the energy source . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 2.8 Different limitation strategies . . . . . . . . . . . . . . . . . . . . . . 14 3.1 Three-phase two-level voltage source converter connected to the grid through a filter reactor . . . . . . . . . . . . . . . . . . . . . . . . . . 15 3.2 Main block diagram of the control system . . . . . . . . . . . . . . . 16 3.3 Single line diagram of a three-phase SRF-PLL. Dashed lines indicated time-varying signals . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 3.4 Single line diagram of a battery storage system connected to the grid via a voltage source converter and a filter . . . . . . . . . . . . . . . . 17 3.5 Closed-loop block diagram of the basic current controller showing the control block Fc(s) and the system block Gc(s) . . . . . . . . . . . . . 19 3.6 Addition of active damping, together with a decoupling term through a feed-forward loop and the incorporation of the grid voltage to the current controller. G′c(s) represents the modified process transfer function, over which the controller Fc(s) acts. Gc(s) remains actual process transfer function. v ′c(s) is the modified control signal after the addition of the feed forward terms . . . . . . . . . . . . . . . . . 21 3.7 Voltage limiter implementation at the output of the current controller 23 xiii List of Figures 3.8 Current limiting strategy that prioritizes the d component and rele- gates the q component to the remaining capacity of the inverter . . . 24 3.9 Depiction of an anti-windup function for the real component of the current controller. Dashed lines indicate back-calculation paths for the modified error signal of the integrator . . . . . . . . . . . . . . . . 25 3.10 Block diagram of the frequency controller consisting of a proportional gain and a droop . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26 3.11 Elements of the voltage AC outer controller . . . . . . . . . . . . . . 27 3.12 Simple battery model consisting only of a resistance in series with an ideal voltage source . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 3.13 Dynamic battery model which uses a non-linear equation to control the voltage source . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 3.14 Typical discharge curve of a 3.5 V, 1 A h Li-Ion battery for a 10C discharge rate. E0 = 3.7348, K = 0.00876, Q = 1, A = 0.468, B = 3.5294, R = 0.09. . . . . . . . . . . . . . . . . . . . . . . . . . . 29 3.15 Diagram showing a dynamic battery model with charge and discharge capabilities. It uses a non-linear voltage source dependent on the current and the integrated current flowing trough the battery . . . . . 29 3.16 Ksoc droop characteristics . . . . . . . . . . . . . . . . . . . . . . . . 30 4.1 Single-line diagram of a simple test grid consisting of a controllable AC voltage source and a static generator representing the BESS . . . 35 4.2 Built-in current controller for the static generator (DIgSILENT, 2016) 36 4.3 PowerFactory implementation of the control system of the Battery- based proposed ancillary service . . . . . . . . . . . . . . . . . . . . . 36 4.4 PowerFactory implementation of a one-degree-of-freedom current con- troller with decoupling term . . . . . . . . . . . . . . . . . . . . . . . 38 4.5 Basic current controller response after a 1 p.u. step in the d current is applied at 500 ms . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39 4.6 Controller currents response to set-point changes in the basic current controller from Figure 4.4 with decoupling term only . . . . . . . . . 39 4.7 PowerFactory implementation of an improved current controller with feed-forward of the grid voltage, decoupling term, active-damping and an integrator anti-windup function . . . . . . . . . . . . . . . . . . . 40 4.8 Current controller with added active damping response compared to a basic current controller after a 1 p.u. step in the d current is applied at 500 ms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41 4.9 Comparison of the currents response to set-point changes between a basic current controller and an improved current controller with active damping . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41 4.10 Analysis of the current controller with (green) and without (black) active damping. Pole placement is plotted in the complex plane and magnitude and phase margins in Bode plots. Note that the frequency axis units in Bode plots are in p.u. . . . . . . . . . . . . . . . . . . . 42 4.11 Pole-zero maps of the system’s behaviour with an error in the esti- mation of the filter inductance L̂f . . . . . . . . . . . . . . . . . . . . 43 xiv List of Figures 4.12 Oscillations in the current response to a unitary step and decoupling not working due to an under estimation of the estimated filter induc- tance L̂f = 0.1Lf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44 4.13 Pole-zero maps of the system’s behaviour with an error in the esti- mation of the filter inductance R̂f . . . . . . . . . . . . . . . . . . . . 45 4.14 Overshoot in the d current response due to an over estimation of the filter resistance R̂f = 10Rf . . . . . . . . . . . . . . . . . . . . . . . . 45 4.15 PowerFactory implementation of the outer frequency controller . . . . 46 4.16 Frequency controller signals illustrating the effect of the filter acting on the frequency input and the dead-band . . . . . . . . . . . . . . . 47 4.17 Current limiter giving preference to the d component of the current . 48 4.18 PowerFactory implementation of a dynamic battery model with charge/dis- charge capabilities . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49 4.19 Nominal voltage discharge characteristic at different C rates for a 3.3 V, 2.3 A h Li-Ion battery. E0 = 3.366, R = 0.01, K = 0.0076, A = 0.26422, B = 26.5487 . . . . . . . . . . . . . . . . . . . . . . . . . . . 49 4.20 Battery’s states of a 3.3 V, 2.3 A h Li-Ion battery when subjected to charge/discharge cycles. E0 = 3.366, R = 0.01, K = 0.0076, A = 0.26422, B = 26.5487, Crate = 10 . . . . . . . . . . . . . . . . . . . . . 50 4.21 3.3 V, 2.3 A h Li-Ion battery state of charge, Ksoc droop component and nominal discharge curve.E0 = 3.366, R = 0.01, K = 0.0076, A = 0.26422, B = 26.5487, Crate = 10 . . . . . . . . . . . . . . . . . . . . . 51 5.1 Frequency measurement showing the action of the BESS after 750 MW of generation is tripped. The right plot is a zoom of the frequency Nadir. 50 MW, 300 MWh BESS . . . . . . . . . . . . . . . . . . . . . 54 5.2 Frequency measurements for the base case and BESS compensated scenario after the loss of 750 MW of generation juxtaposed with the power measurements from the BESS. 50 MW, 300 MWh BESS . . . 55 5.3 Battery states of a a 50 MW, 300 MWh BESS after the loss of 750 MW of generation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56 5.4 Frequency measurements comparing the effect of converter rating for the same frequency event caused by the loss of 300 MW of generation 56 5.5 Power and SOC measurements comparing the effect of converter rat- ing for the same frequency event caused by the loss of 300 MW of generation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57 5.6 Decommissioning of generators G4062, G4063_1 and G4063_2 for wind farms with the same power output in the Southwest zone . . . . 58 5.7 Frequency measurements after the loss of 300 MW of generation. The blue line represents the case were a part of the thermal generation has been replaced by wind power. The right plot is a zoom of the frequency Nadir . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59 5.8 Frequency measurements for a 300 MW loss of generation. The right plot is a zoom of the frequency Nadir. 50 MW, 300 MWh BESS . . . 60 xv List of Figures 5.9 Frequency measurements for a 300 MW loss of generation in the case where nuclear has been replaced by wind power. The right plot is a zoom of the frequency Nadir. 50 MW, 300 MWh BESS . . . . . . . . 60 B.1 Two sample vectors, v(t) and u(t), rotating in the positive sequence with constant frequency in the fixed reference frame αβ . . . . . . . . IV B.2 Relation between the stationary αβ reference frame and the rotating dq reference frame. Vector u(t) is taken as reference for the d axis . . V C.1 PowerFactory single-line diagram of the Nordic 32 bus system showing the results of the load flow LF23_28 with high transfers . . . . . . . VII C.2 PowerFactory output displaying the results of the load flow LF23_28 with high transfers . . . . . . . . . . . . . . . . . . . . . . . . . . . . VIII xvi List of Tables 5.1 System data from load flow LF32_028 (Svenska kraftnät, 1993) . . . 53 5.2 Ratings and inertias (Svenska kraftnät, 1993) . . . . . . . . . . . . . 53 xvii List of Tables xviii List of Acronyms aFRR Automatic Frequency Restoration Reserves. AS Ancillary Service. BESS Battery Energy Storage System. BMS Battery Management System. BOP Balance of Plant. ESS Energy Storage Systems. FCR Frequency Containment Reserves. FCR-D Frequency Containment Reserve for Disturbance operation. FCR-N Frequency Containment Reserve for Normal Operation. FRR Frequency Restoration Reserves. mFRR Manual Frequency Restoration Reserves. PCS Power Conversion System. PLL Phase Locked Loop. SOC State of Charge. SRF-PLL Synchronous Reference Frame Phase-Locked Loop. TSO Transmission System Operators. VSC Voltage Source Converter. xix List of Acronyms xx 1 Introduction This chapter provides the background and motivations for the realization of this thesis. It also outlines the structure of the chapters contained in the report. 1.1 Background and motivations The power system is constantly subjected to all kinds of disturbances. The severity of the these can range from minor disturbances such as the constant changes in the load condition, to acute ones, like a fault leading to the loss a large generating unit. These events are usually reflected in deviations in the frequency. In order to main- tain an acceptable level of quality, ENTSO-E has defined the highest permissible frequency variation for the Nordic power system to be between 49.90 and 50.10 Hz [1]. The adherence to this standard is measured by the number of minutes that the system exceeds is outside the normal frequency operation band. Figure 1.1: Evolution of frequency deviation outside 49.90 – 50.10 Hz in the Nordic power system (ENTSO-E, 2016) According to [1], the goal for frequency deviations outside normal frequency band shot not be more than 10 000 min/year. However, in recent years, the number of minutes outside the permissible range for normal operation has increased. Figure 1.1 shows the trend of frequency quality in the Nordic power system from 2001 to 2016. It could be argued, that this trend is expected to continue, specially with the current tendency to replace conventional generation with intermittent, renewable 1 1. Introduction energy sources (RES) that are decoupled from the grid. On that account, the future of the power system has been envisioned as a Smart Grid [2]. A Smart Grid can be defined as an electricity network that can intelli- gently integrate the actions of all users connected to it, in order to efficiently deliver sustainable, economic and secure electricity supplies [3]. This vision has lead to the introduction of newer products and AS with the objective of facilitating the implementation of renewable energy sources, while at the same time, ensuring the security and reliability of the system [4]. Traditionally, Transmission System Operators (TSO) have made use of generators and, recently, of flexible loads and FACTS devices, to provide AS to the grid. How- ever; nowadays, the Smart Grid framework also allows the possibility to use network connected devices, such as batteries, as ancillary service providers [5]. The joint programming initiative ERA-Net Smart Grids Plus has provided funding for the research project "CloudGRid", which aims to develop the smart grid con- cept in the interconnected European power system. The project is divided into six Work Packages (WP), from which WP5 deals with Ancillary Services and Energy Management. WP5 primary objective is to explore opportunities to support the system through additional ancillary service solutions and novel strategies for energy management. This thesis was carried out within the frame of WP5, during a period of 6 months, from January to June 2017, at STRI AB in Gothenburg, Sweden. 1.2 Aim and scope The aim of the thesis is to develop a model of a battery storage system to be used as a frequency support ancillary service in the Nordic power system. The focus of the thesis is to study the effect that a battery storage system providing frequency support can have on enhancing the robustness of the power system. This means that the main interest of the thesis is the action of the system as a whole and not the detailed modelling of the individual components that make up the system. The network will be assumed to be in steady state and only balanced faults/trippings will be applied to provoke a frequency event. No consideration is given to thermals or losses, therefore, no efficiency evaluation is provided. Since the aim of the model is to provide frequency support, only the frequency measurements and battery states will be pondered for the evaluation and results. Transient and voltage stability were not considered when performing dynamic simulations. 2 1. Introduction 1.3 Structure of the thesis The outline of the thesis is as follows: Chapter 1 introduces the thesis’ background and motivations. Chapter 2 equips the reader with basic concepts that provide a solid foundation about the thesis’ field of study. Chapter 3 describes in detail the development and derivation of the models used in the proposed ancillary service. Chapter 4 presents the implementation approach and validation of the derived mod- els. Chapter 5 reports the results obtained from the study case. Chapter 6 proposes a discussion on the possible environmental impacts that such a system would have and also puts forward possibilities to expand the work presented in this thesis. Chapter 7 draws up the conclusions of the thesis. 3 1. Introduction 4 2 Basic Concepts This chapter intends to acquaint the reader with the basic basic concepts needed to understand the background of the thesis. 2.1 The Nordic power system Figure 2.1 shows a map over Scandinavia. In the Nordic countries, production sys- tems differ greatly from one country to another. Denmark uses conventional thermal power and an increasing proportion of wind power. Norway has hydropower, whilst Finland and Sweden have a mix of different systems with mostly hydro and nuclear power [6]. Figure 2.1: Map showing the conforming countries of the Nordic power system The subsystems in Finland, Norway, Sweden and eastern Denmark are intercon- nected synchronously and form what is known as the “synchronised system”. The subsystem in Western Denmark is connected to Norway and Sweden via HVDC links. Together, the synchronous system and the Western Denmark subsystem form the interconnected Nordic electric power system [6]. 5 2. Basic Concepts 2.1.1 Nordic32A bus system The Nordic32A test power system was developed by CIGRÉ in cooperation with Svenska kraftnät, the Swedish TSO, in 1993. It is intended for transient and long- term stability simulations and consist of 32 buses, 52 lines and 23 generators. 4041 2032 2031 40314031 4032 4044 4046 4047 4042 4043 4063 4062 4045 10421043 1044 1041 1045 4051 4061 1021 1022 1014 1013 1011 1012 4012 4011 4072 4071 4022 4021 Figure 2.2: Nodal distribution of the buses in the Nordic32 system over Scandinavia. Zone "External" is coloured red, zone "North" is shown in blue, zone "Central" is delineated in black and zone "Southwest" is depicted in magenta. The voltage level of each bus can be discerned by the first number of the bus in question, i.e. 400 kV, 220 kV and 130 kV buses begin with 4,2 and 1 respectively The system is fictitious, but has a distribution and dynamic properties similar to that of the Swedish power system. That is, the system is characterized by large power transfers from a hydro-dominated north zone to a central load zone with large amounts of load and some thermal power [7]. 6 2. Basic Concepts 2.2 Frequency dynamics In an interconnected system, frequency is a global factor. A change in power balance in one part will be reflected as a change of frequency in the whole system [8]. This is the reason why a fundamental part in describing the frequency stability of the system is understanding the relation between the mechanical input of a generator, Pm and the electrical output, Pe. Thus, in steady state the balance between generation and consumption is Pm = Pe (2.1) The rotational energy of the machine is given by Erot = 1 2Jω 2 (2.2) where J is the combined moment of inertia of the generator and the turbine in kg m2 and ω is the angular velocity of the rotor in rad/s. Any unbalance would result in a change in the rotating energy of the machine: d(Erot) dt = Pm − Pe (2.3) Putting (2.2) into (2.3) and calculating the derivative gives dω dt = Pm − Pe Jω (2.4) Defining the inertia constant H as the ratio of the rotational energy at nominal speed ω0 and the total base power Sb: H = 1 2Jω 2 0 Sb (2.5) Now, we can describe J as J = 2H Sb ω2 0 (2.6) Inserting (2.6) in (2.4) we get dω dt = Pm − Pe 2H Sb ω2 0 ω (2.7) If we assume a small variation in the rotational speeds, ω ∼= ω0, then, dω dt = ω0 2H Pm − Pe Sb (2.8) Similarly, if we consider ω = 2πf and ω0 = 2πf0, then the change in frequency due to unbalance power between Pm and Pe, both in p.u. is df dt = f0 2H (Pmp.u. − Pe p.u.) (2.9) 7 2. Basic Concepts From (2.9), it is evident that the system frequency is dependant on the active power balance. Since there exist many generating units supplying the system, some means must be procured to respond to the change in demand in the system. This is achieved by means of frequency control [8]. 2.3 Ancillary services EURELECTRIC defines Ancillary services as: "All services required by the trans- mission or distribution system operator to enable them to maintain the integrity and stability of the transmission or distribution system as well as the power quality [9]." The main services in use today are voltage control and frequency control at different time scales and black start capability for system restoration [10]. 2.4 Operational reserves 2.4.1 Primary, secondary and tertiary reserves Am ou nt o f r es er ve Time Primary Secondary Tertiary Figure 2.3: Changes in primary, secondary and tertiary reserves following a severe disturbance (Bohlen and Hassan, 2011) Primary reserves are used to quickly react on frequency deviations and to stabilize frequency. After a short while, the primary reserves are restored by the secondary reserves which in turn, are replaced by the tertiary reserves. This releases the pri- mary and secondary reserves which are, then, again available for the next balancing needs. This is illustrated in Figure 2.3 adapted from [11], where the change in re- serve type as a function of time is shown (not to scale). The n-1 criterion is fulfilled for this case. At this point, the customer has not yet been impacted by the dis- turbance. Only when the magnitude of the disturbance is larger than the primary reserves does the system become unstable. 8 2. Basic Concepts 2.4.2 Reserve products in the Nordic power system ENTSO-E has laid down clear rules in [10] about the amount of operational reserves and who is responsible for procuring them. Nonetheless, different terminology is used for the types of reserves used in the individual synchronous areas. For the Nordic system, ENTSO-E distinguishes the following reserve products [1]: • Frequency Containment Reserve for Normal Operation (FCR-N). Is a specific Nordic product with the purpose of balancing the system within the normal frequency band (49.90 < f < 50.10 Hz). Since this is within the range of normal operation for the Nordic synchronous area, no sudden changes in pro- duction take place and the activation time is rather slow: normally regulated upwards/downwards within 2 min to 3 min. • Frequency Containment Reserve for Disturbance operation (FCR-D). It has the purpose of stabilizing the system in case of disturbances where frequency drops below 49.9 Hz and it will be completely committed at 49.5 Hz. 50% of the reserve shall be regulated upwards within 5 s and the 100% shall be regu- lated upwards within 30 s. • Manual Frequency Restoration Reserves (mFRR) is used for power balanc- ing and to handle congestions in normal and disturbance situations. mFRR is the main balancing resource which when activated replaces both remain- ingFrequency Containment Reserves (FCR) and aFRR activations and brings frequency back to the frequency target. The required activation time is 15 min. • Automatic Frequency Restoration Reserves (aFRR) is an automatic comple- ment in the FRR process. The aFRR reserve differs from FCR in that the reserve is remotely controlled by a centralized controller while FCR is locally controlled. An advantage of aFRR over FCR is that it can be based on a merit order and take congestions in the grid into account. 2.4.3 Other frequency-control actions in the Nordic power system ENTSO-E operation’s agreement for the Nordic synchronous area [12], states the following frequency controlled system protection to be activated by a deviating fre- quency: • Regulation of DC facilities, emergency power • Production shedding or downward regulation of production • Start-up of production • Automatic load shedding • Network switchings. 9 2. Basic Concepts Frequency control50 49 48 47 51 52 HzH Frequency controlled reserve and frequency controlled protection actions are activated Emergency power actions on HVDC links Load-shedding and network-splitting Manual down regulation Emergency power actions on HVDC links Power plants are disconnected Large thermal power plants are disconnected Figure 2.4: Frequency controlled actions in the Nordic synchronous system (ENTSO-E, 2016) Figure 2.4, adapted from [12], illustrates the actions taken by system operators within the Nordic synchronous area to deal with frequency disturbances. 2.5 Energy storage in power systems In power systems, Energy Storage Systems (ESS) are energy storage technologies that absorb electrical power during periods of excess capacity so that it can be re- leased later when it has more value. This characteristic makes it possible for ESS providers to supply various types of services to the power grid utility. The pos- sibilities encompass the entire value chain of the electrical system, ranging from generation level and system utilities to end-user applications. In Figure 2.5, EPRI, proposes the following classification of ESS according to their intended application in the value chain [13]. 2.5.1 Basic layout of a ESS Each energy storage unit facility is made up of three distinct components: the stor- age medium, the Power Conversion System (PCS), and the Balance of Plant (BOP) [14]. The energy storage unit is also commonly referred to as the energy reservoir and it 10 2. Basic Concepts Benefit type Time Distribution Transmission Utility system TSO Energy (€/KWh) ho ur s Power (€/KW) m in ut es Reliability (€/KW) Operations (€/KVAr & €/KW) se co nd s 100s KW 10s MW 100s MW Energy arbitrage System capacity Ancillary services Renewable integration Renewable smoothing T&D system support Size of application Hi gh er va lu e fo r en er gy st or ag e Hi gh er va lu e fo r di sc ha rg e ca pa cit y Figure 2.5: Value of energy storage applications (EPRI, 2010) is the main component of a ESS. The main differentiating factor between them is the form in which the energy is stored. This in turn, influences each technology’s operational capabilities and consequently, the application in which it is used for. Of course, even though some technologies center around an specific goal, they are also able to provide multiple benefits. For example, the energy stored can be delivered in large amounts and sold as a commodity. Another possibility is to operate the unit in a controlled charge/discharge cycle in order to dampen fluctuations in the system’s power level. However, not all technologies have been developed enough to make them suitable for large-grid scale applications [13]. The PCS is also an integral part of any ESS. It consists of a number of devices and controllers to enable energy conversion from the storage state to the grid-bound state. Finally, the BOP comprises the auxiliary systems that support the operation of the ESS. BOP typically includes transformers, electrical interconnections, surge protec- tion devices, a support rack for the storage medium and the facility to shelter the unit from the elements [14]. 2.6 Battery energy storage systems While many technologies have been developed for large-scale energy storage purposes such as pumped-hydro storage, compressed-air energy storage or flywheels; many are limited in their site dependence, capacity, or response capabilities. Battery Energy Storage System (BESS) on the other hand offer great flexibility in capacity ratings and a rapid response which is ideal to meet demands over a much wider range of functions than many other types of storage [15]. 11 2. Basic Concepts 2.6.1 Batteries Batteries comprise a wide range of technologies based on the material used in elec- trodes and electrolytes, and the way they convert chemical energy into electrical energy and vice versa. Batteries can be divided into two categories: primary or secondary. Primary batteries are not rechargeable: they are single-use disposable batteries and must be discarded once their charge has been depleted. On the other hand, secondary batteries are rechargeable [16]. When discussing batteries it is valuable to get acquainted with some terminology that is often used. Concepts like Ah, C-rate and State of Charge (SOC) define the operational characteristics of a battery pack. The capacity of a battery is often stated in Ah (Ampere hours). If a battery has a capacity of 5Ah hours, it can deliver 5A for 1 hour or it can deliver 1A for 5 hours. The amount of energy the battery can deliver is the current multiplied with the voltage and integrated over time. A complicating factor is that the battery terminal voltage varies depending on the amount of current that is delivered to or drawn from the battery. The internal voltage level also depends on the SOC, which is a number between 0 and 1 (or 0-100 %) that tells us how much charge is still left in the battery, such that an SOC of 1 (or 100 %) means that the battery is fully charged. In reality however, it is not possible to use 100% of the battery pack’s capacity, only about 80–90% of the capacity of the battery is usable depending on the cell selection and usage profile. The C-rate describes how fast the battery can be charged or discharged. A 1C dis- charge rate means that the total battery capacity of the battery will be utilized in 1 hour. If the battery is discharged at a 2C rate, the battery will be emptied in half an hour, and the current drawn will be twice as large as in the 1C case. The total energy content is the pack voltage times the pack ampere hours. Each battery cell typically holds just a few volts and can deliver only a few Ah. Different battery technologies have different typical ratings. To reach desired battery pack voltage and energy ratings, many cells are combined. By series connecting cells the battery voltage can be increased. If the battery pack’s energy content is not enough with one layer of series connected cells, it can be increased by adding one or several parallel layers as well, which increases the battery-pack’s capacity. 2.6.2 Battery management systems The basic task of a Battery Management System (BMS) is to ensure that optimum use is made of the energy inside the battery powering a BESS and that the risk of damage inflicted upon the battery is minimized [17]. BESS require a BMS to keep track of important operational attributes of the battery in order to maintain the unit operating safely and optimally. Batteries are dynamic in nature and their operation is dependent on many factors interrelated to each 12 2. Basic Concepts Input Process Act Measure Grid state Battery condition Command Battery rules Grid rules Figure 2.6: General control strategy for a grid-connected battery system (Lawder et al, 2014) other. The most basic BMS controls only the power exchange. However, an integral BMS will also monitor the health of the battery, by keeping track of the temperature gradients across the system, for example. In addition to that, it will also improve the performance of the system by, for instance, providing optimal charging patterns and balancing the cells in the stack. BMS are able to accomplish these functions by manipulating the current and computing it to accurately estimate many internal variables to which it has no access [15]. As a controller, the BMS receives signals from external sources such as commands and measurements, while it calculates the appropriate response to fulfill the action as required by the grid. Figure 2.6 illustrates a general control strategy for grid- connected BESS proposed in [15]. In short, it can be said that the BMS is responsible for safe operation of the BESS: making sure that it operates within thermal and safe voltage and current limits; and for state estimation of the SOC among others. 2.7 Voltage source converters Three-phase inverters are power electronic devices that convert a DC voltage into an AC voltage. They are used when the objective is to produce a sinusoidal output voltage with a controllable magnitude and frequency. There exist many possible configurations, but the most widely used to feed AC power supplies or motor drives consists of three legs, one for each phase. A schematic of the device is shown in Figure 2.7. Two equal capacitors are connected in series in parallel to the DC output of the energy storage medium [18]. The output voltage uc(t) of each leg depends only on the DC voltage of the converter udc(t) and the status of the switch T±. The converter switches are usually IGBT semiconductors in an anti-parallel diode, D±, arrangement [18]. 13 2. Basic Concepts aUP (4) aU0 (4) aUL (4) ~\L(4) 2 ~\L(4) 2 ~LP(4) ~L0(4) ~LL(4) Ñp446?Ä $4Ç?pr6 kPÖ kP7 k07 k0Ö kLÖ kL7 ÅPÖ ÅP7 Å07 ÅL7 ÅLÖÅ0Ö Figure 2.7: Three-phase, two-level bridge inverter with a battery as the energy source 2.7.1 Limiting strategies ~],VWJ ~],VWJ~],VWJ ~\,VWJ ~\,VWJ ~\,VWJ ~(4)~(4) ~(4) ~\,Z:[ ~\,Z:[ ~\,Z:[ ~],Z:[ ~],Z:[ ~],Z:[ Figure 2.8: Different limitation strategies As opposed to electromechanical devices such as motors and generators, solid-state components do not have any inherent overload capability. In the case of a VSC, it may occur that some events demand a response that exceeds the rating of the converter, thus damaging the device. This is the reason why current and voltage limiters are implemented in the control system of a VSC. Basically, three different types of limitations exist [19]. Taking the vector u(t) in the synchronous dq reference frame as an example, these limiting strategies are vi- sualized in Figure 2.8. One can choose to prioritize one component over the other, at the expense of affecting the angle of the resulting limited vector, while it is also possible to limit the magnitudes of the vectors and to keep the reference angle intact. 14 3 Design of the proposed ancillary service This chapter contains a detailed description of the derivation of the models that make up the proposed ancillary service. 3.1 System layout Figure 3.1 depicts the schematics of a battery interfaced to the grid via a VSC through a filter reactor composed of an inductance Lf in series with a resistance Rf . The reactor serves as filter to reduce high switching harmonics due to the switching of the VSC and also to limit short-circuit currents in the event of a fault [8]. The VSC injects the currents ifa(t), ifb(t) and ifc(t). The points of connection to the grid for the three legs of the converter are ega(t), egb(t) and egc(t) respectively. The grid impedance is represented by the terms Lg and Rg. aUP (4) aU0 (4) aUL (4) ~\L(4) 2 ~\L(4) 2 ~LP(4) ~L0(4) ~LL(4) Ñp446?Ä $4Ç?pr6 kPÖ kP7 k07 k0Ö kLÖ kL7 ÅPÖ ÅP7 Å07 ÅL7 ÅLÖÅ0Ö GH, /HGJ, /J 6HP (4) 3J0 (4) GH, /HGJ, /J 6H0 (4) 3Jy (4) GH, /HGJ, /J 6HL (4) 3JP (4) Figure 3.1: Three-phase two-level voltage source converter connected to the grid through a filter reactor 15 3. Design of the proposed ancillary service 3.2 Control strategy for the VSC The block diagram presented in Figure 3.2 illustrates the proposed control strategy for the grid connected VSC from Figure 3.1. Voltage and current measurements from the grid connection point are rotated from three-phase quantities to the dq synchronous reference frame. The system uses a SRF-PLL in order to track the phase angle θ(k) used for the coordinate transformation blocks, where (k) stands for the sample index. The battery storage system is controlled by an IMC inner current control loop. The BMS receives the SOC information from the battery and computes it in the form of a droop component Ksoc. This droop, together with the frequency measurement from the PLL, is used by the outer frequency controller to output the active power reference. The reactive power reference is obtained from the outer voltage controller. Current and voltage limiter blocks are implemented at the output of the set-point changers in order to restrict the system’s response to the physical limits of the VSC. The control algorithm provides the switching signals swa(k), swb(k) and swc(k) to be used as reference for the PWM that drives the valves of the three-phase, two-level inverter. abc αβ 6HP(Q) 6H0(Q) 6HL(Q) abc αβ 3JP(Q) 3J0(Q) 3JL(Q) dq αβ dq αβ PLL Freq ctrl Batt Volt ctrl BMS Ref calc I limiter Current controller V limiterdq αβ abc αβ PWM R(Q) R(Q) R Q + ∆R >(Q) To VSC 2OTLSOC $UP Q , $U0 Q , $UL(Q) 'VWJ(Q) +VWJ(Q) 3VWJ,XYZ:[\] (Q) 3VWJ\] (Q) KL,XYZ:[\] (Q)KL\](Q)KL^_(Q) 6H\](Q) 6H^_(Q) 3J ^_(Q) 3J\](Q) KLP(Q) KL0(Q) KLL(Q) Figure 3.2: Main block diagram of the control system In the dq/αβ transformation block at the output of the voltage limiter, a compen- sation angle ∆θ = 1.5ω Ts, where Ts stands for sampling time, is added to take into account the one and a half sample delay introduced by the discretization of the measured quantities. 16 3. Design of the proposed ancillary service The derivation of the different control blocks will be described in detail in the fol- lowing sections. 3.3 PLL Many implementations of the PLL exist for both one-phase and three-phase appli- cations. However, the most widely used form of PLL in the areas of electric power engineering is the SRF-PLL [20]. >. >Y pqy/{| {|/}o ~P0L ~^_ ~] '# R. < � � Figure 3.3: Single line diagram of a three-phase SRF-PLL. Dashed lines indicated time-varying signals Figure 3.3 shows the single line diagram of a SRF-PLL. The input signal is a three- phase quantity, usually the voltage. It is transformed into a two-phase representation in the static reference frame αβ. For information on coordinate transformations for three-phase systems, refer to Appendix B. The resulting signal is still a time-varying complex quantity composed of a real component α and and imaginary component β. Then, the dq signals can be computed using the phase angle and the projection matrix described in Appendix B. Assuming that the output frequency is equal to the input frequency, udq is constant with no double-frequency oscillations. By regulating uq to 0, the SRF-PLL regulates the output phase angle θ0 to the input angle θi. Consequently, by regulating uq to 0, ud is regulated to the input signal’s magnitude [20]. 3.4 Inner current control loop In order to facilitate the analysis, the circuit presented in Figure 3.1 can be simplified to a single line diagram such as the one presented in Figure 3.4, which is composed of the same elements and represents the same dynamics. GH, /H Grid GJ, /J KL (4) 6O (4) 6H (4) 3J (4) VSC Battery Figure 3.4: Single line diagram of a battery storage system connected to the grid via a voltage source converter and a filter 17 3. Design of the proposed ancillary service Taking as reference Figure 3.4, the dynamics of the current if (t) flowing through the reactor, in αβ, are Lf d dt iαβf (t) = vαβc (t)− eαβg (t)−Rf i αβ f (t) (3.1) By adding the phase angle θ(t) to the αβ quantities, a rotation with the same system frequency is incorporated to the vectors, effectively making them appear static in the dq frame. vαβ(t) = vdq(t)ejθ(t) (3.2) After inserting it to all of the terms, equation (3.1) will transform into Lf d dt iαβf (t)ejθ(t) = vαβc (t)ejθ(t) − eαβg (t)ejθ(t) −Rf i αβ f (t)ejθ(t) (3.3) Simplifying yields the current dynamics in the dq reference frame. For clarity pur- poses, no indexes will be used for the complex dq values. Lf d dt if (t) = vc(t)− eg(t)−Rf if (t)− jωLf if (t) (3.4) Arranging the terms yields the voltage expression vc(t) in terms of the current if (t) and the additional grid voltage term eg(s). vc(t) = Lf d dt if (t) + eg(t) + (Rf + jωLf )if (t) (3.5) Taking the Laplace transform, vc(s) = sLf if (s) + eg(s) + (Rf + jωLf )if (s) (3.6) 3.4.1 One-degree-of-freedom controller design Arranging equation (3.6) as a function of the output over the input, the transfer function Gc(s) of the system’s process is obtained. Gc(s) = if (s) vc(s)− eg(s) = 1 sLf +Rf + jωLf (3.7) Figure 3.5 depicts a graphical configuration of a closed-loop control system consist- ing of a controller Fc(s) and the process Gc(s). The controller transfer function Fc(s) is connected in series. Since the controller operates with only one input, the error signal e, it is said that it is working with only one degree of freedom. The transfer function of the control system illustrated in Figure 3.5 can be obtained through block algebra and is defined as C(s) = Fc(s)Gc(s) 1 + Fc(s)Gc(s) (3.8) The term jωLf if (s) is a coupling term introduced by the coordinate transformation and the grid voltage, eg(s), can be considered as a disturbance. Both terms will be 18 3. Design of the proposed ancillary service _L(`) K′L(`) 3J(`)3J,UVJ (`) 6 1 `GJ + /J + *>GJ 6H(`) KL(`) bL(`) Figure 3.5: Closed-loop block diagram of the basic current controller showing the control block Fc(s) and the system block Gc(s) removed by cross-coupling compensation and a feed-forward term, respectively. As a result, the process transfer function Gc(s) from equation (3.7) can be reduced to a equivalent transfer function G′′c (s), where G′′c (s) = if (s) vc(s) = 1 sLf +Rf (3.9) Since the parameters of the process are known, they could be used to select appro- priate values for the controller’s terms. A good approach is to use this knowledge to shape the response of the system with a method called loop-shaping. Electrical dynamics are of order one, so a simple PI controller can provide good performance with a simple arrangement [21]. Consequently, the approximation is made to shape the control system transfer function C(s) to a first order system of the form Hc(s) = αc s+ αc = αc/s 1 + αc/s = 1 sTc + 1 (3.10) where Tc is the process time constant and αc is the closed-loop bandwidth in rads/s linked to the system’s response rise time Tre by the relation αc Tre = ln(9) (3.11) Then, considering G′′c (s) defined in (3.9) as the process function, the approximation is made as C(s) = αc/s 1 + αc/s (3.12) Fc(s)G′′c (s) 1 + Fc(s)G′′c (s) = αc/s 1 + αc/s (3.13) Equating both numerators from equation (3.13) gives Fc(s)G′′c (s) = αc s (3.14) Then, considering that Fc(s) is a PI controller, the parameters Kpc, proportional gain and the integrator gain, Kic, can be found as 19 3. Design of the proposed ancillary service Fc(s) = αc s G′′c (s)−1 (3.15) Kpc + Kic s = αc s (sL̂f + R̂f ) (3.16) which finally yields Kpc = αcL̂f ; Kic = αcR̂f (3.17) where the tilde "hat" indicates estimated values which should be as close as possible to the actual process parameters. 3.4.2 Improved current controller The current controller derived in section 3.4.1 is not very robust since it has only one degree of freedom. Moreover, the currents are coupled, which means that a step in one component will have an effect on the other. This is not desirable since it gives poor set-point following. Moreover, the grid voltage eg(s) is constantly acting as a disturbance, which means that any perturbation on the grid voltage will impact the performance of the controller. It is possible to tackle the aforementioned issues by feed-forwarding another loop to the control signal, thus giving the controller two degrees of freedom. To begin, the grid voltage signal eg(s) will be added in order to cancel out the disturbance in the process transfer function Gc(s), linearizing the the model. Next up, a decou- pling term jωL̂f if (s) will be feed-forwarded. These two actions will immediately improve the performance of the current controller, specially the introduction of the decoupling term. Additionally, it is also possible to include an "active damping" term in the feed- forward loop in order improve the system’s disturbance rejection and improve its robustness. The resistive term in the filter reactor provides damping to the con- trollers response. However, adding more resistance would cause unnecessary losses. The solution is to add a "virtual" resistance Ra to the internal model process of the controller. These actions are illustrated on Figure 3.6, where an improved version of the current controller is shown. Analyzing both sides of the modified control signal v ′c(s) as shown on Figure 3.6 and comparing the expressions gives that v′c(s) = (sLf +Rf + jωLf )if (s) + eg(s) (3.18) v′c(s) = vc(s) + (jωL̂f +Ra)if (s) + eg(s) (3.19) Equating both expressions and simplifying gives v′c(s) = v′c(s) (3.20) 20 3. Design of the proposed ancillary service L̀(a) KL(a) 3J(a)3J,VWJ (a) 6 1 aGJ + /J + *>GJ 6H(a) K′L(a) cL(a) *>GJd − /P 6H(a) c′L(a) Figure 3.6: Addition of active damping, together with a decoupling term through a feed-forward loop and the incorporation of the grid voltage to the current controller. G′c(s) represents the modified process transfer function, over which the controller Fc(s) acts. Gc(s) remains actual process transfer function. v ′c(s) is the modified control signal after the addition of the feed forward terms (sLf +Rf )if (s) = vc(s) +Raif (s) where a new process transfer function G′c(s) can be defined as G′c(s) = if (s) vc(s) = 1 sLf +Rf +Ra = αc s+ αc (3.21) The assumption is made again to approximate G′c(s) to a first order system of the type defined in equation (3.10). In order to avoid impacting the behaviour of the controller with the added term, it is imperative to give the added term Ra the same process bandwidth αc. For this purpose, αc = R̂f +Ra L̂f (3.22) where the parameters are now the estimated values denoted by the tilde "hat" and where the value of Ra is calculated as Ra = αcL̂f − R̂f (3.23) Following the same procedure as in section 3.4.1, equations (3.13) and (3.14), the new controller parameters can be found. Fc(s) = αc s G′c(s)−1 = αc s (sL̂f + R̂f +Ra) (3.24) Kpc = αcL̂f ; Kic = αc(R̂f +Ra) (3.25) 21 3. Design of the proposed ancillary service Replacing the term Ra with its definition from equation (3.23) gives Kpc = αcL̂f ; Kic = αc(R̂f + αcL̂f − R̂f ) (3.26) which results in the calculation of the improved PI controller parameters as Kpc = αcL̂f ; Kic = α2 c L̂f (3.27) Now it is clear why the above-derived controller may be referred to as having two degrees of freedom: it uses two inputs, the error signal e and the current if (t) directly via the active damping term [21]. 3.4.3 Analysis of the current controller In order to make a detailed analysis of the controller, it is necessary to derive the transfer function from the current if (s) to the reference if,ref (s) to obtain the poles and zeros of the function. Making the assumption that with the feed-forward terms in the controller the system is linearized and decoupled and that the parameter es- timation is perfect, the two sides of the control signal v ′c(s), as seen in Figure 3.6, are studied: v′c(s) = (sLf +Rf + jωLf )if (s) + eg(s) (3.28) v′c(s) = ( Kpc + Kic s ) [if,ref (s)− if (s)] + (jωL̂f −Ra)if (s) + eg(s) (3.29) Similarly to what is done in the previous section, equating both expressions as v′c(s) = v′c(s) and developing gives (sLf +Rf )if (s) = ( Kpc + Kic s ) [if,ref (s)− if (s)]−Raif (s) (3.30) arranging the elements returns if (s)(s2Lf + s(Rf +Ra +Kpc) +Kic) = (sKpc +Kic)if,ref (s) (3.31) from which finally the transfer function to be analyzed is if (s) if,ref (s) = (sKpc +Kic) s2Lf + s(Rf +Ra +Kpc) +Kic (3.32) Considering the definition of the controller gains and the active damping, as previ- ously defined from equations (3.23) and (3.27) and substituting them into equation (3.32) yields if (s) if,ref (s) = αc ( s+ R̂f +Ra L̂f ) (s+ αc) ( s+ R̂f +Ra L̂f ) (3.33) where the tilde "hat" indicates that the parameters are now the estimated ones. 22 3. Design of the proposed ancillary service Looking at equation (3.33), it becomes apparent that the zero is cancelled out by one of the poles and that the close-loop current controller is a first-order transfer function. 3.5 Voltage limiter When deriving the controller, the system is treated as ideal. However in practice this is not the case. The terminal voltage of the converter, for example, cannot be made arbitrarily large. It has to be restricted to the converters physical limits. This is the reason why a saturation is implemented at the output of the current controller to limit the voltage magnitude to the maximum voltage the converter can produce. The angle is kept the same since it is the angle that governs the power transfer. K ∠K KL,XYZ:[(a) ∗ ∠* KL,Z:[(a) K[Pg Figure 3.7: Voltage limiter implementation at the output of the current controller 3.6 Reference calculation In αβ, the instantaneous active and reactive power can be calculated respectively as p(t) = 3 2K2 ( vα(t)iα(t) + vβ(t)iβ(t) ) (3.34) = 3 2K2< { vαβ(t) i∗αβ(t) } (3.35) and q(t) = 3 2K2 ( vβ(t)iα(t) + vα(t)iβ(t) ) (3.36) = 3 2K2= { vαβ(t) i∗αβ(t) } (3.37) where K is an arbitrary scaling constant, which is selected as √ 3 2 in order to achieve a power-invariant scaling K = √ 3 2 ⇒ p(t) = uαiα + uβiβ (3.38) Considering that the formula for the complex power S(t) is 23 3. Design of the proposed ancillary service S(t) = P (t) + jQ(t) = ( u(t) i∗(t) ) (3.39) S(t)∗ = P (t)− jQ(t) = ( u∗(t) i(t) ) (3.40) Then, aligning the grid voltage vector on the d-axis gives u(t) = ud(t), the reference for the d component of the current becomes id,ref,unlim(t) = P (t) ud(t) (3.41) and similarly for the q component iq,ref,unlim(t) = −Q(t) ud(t) (3.42) 3.7 Implementation of a current limiter Similarly to the voltage, a current limiter is implemented at the output of the reference calculation block. This is done to ensure that the set-point changer is limited to the actual physical ratings of the components of the system. Different limiting strategies exist, such as prioritizing one current component over the other or choosing to limit the magnitude but keeping the angle, as it was done in the voltage limiter. Since the aim is to provide frequency support and that the voltage support is a secondary service, the dref component will be given priority and the qref component will be limited to the remaining capacity of the inverter. The implementation is shown in Figure 3.8. 3:Xl,ZPf mC mC 3:Xl,UP;V[(`) 3J[,UVJ,WXY:Z(`) `n?4() op`() `qr() 3J[,UVJ(`) min () 3J\,UVJ,WXY:Z(`) 3J\,UVJ(`) Figure 3.8: Current limiting strategy that prioritizes the d component and relegates the q component to the remaining capacity of the inverter 24 3. Design of the proposed ancillary service 3.8 Derivation of anti-windup function for the in- tegrator K ∠KKL,XYZ:[(a) ∗ ∠* KL,Z:[(a)ℜ ℑ K′L\(a) ℜ ℑ j 1 a 2kL\ 3J\,VWJ(a) 3J\(a) 6\ 6\ 23L\ *lGJd − /P6H\(a) Figure 3.9: Depiction of an anti-windup function for the real component of the current controller. Dashed lines indicate back-calculation paths for the modified error signal of the integrator The limitations imposed at the set-point changer have as a consequence that in case of large steps in the current, the integral part of the PI controller gets “overcharged” due to the limited response in if,ref (s). This occurs because the integrator keeps accumulating error, producing an overshoot in the response. This would continue to be the case until the windup is taken care of by a large negative control error [21]. A solution is to feed a modified error signal into the integrator in order to limit the integration when the output voltage of the current controller is limited. Figure 3.9 shows the current control loop together with the implementation of a voltage saturation. The dashed lines indicate the signal paths to "back calculate" the error signal when the output voltage is vc,unlim(s) > Vmax. The function H is a gain to act on the added feed-forwarded loop. First, we examine the control signal v′cd(s) v′cd(s) = ( Kpcd + Kicd s )( ifd,ref (s)− ifd(s) ) + (jωL̂f −Ra)ifd(s) + egd(s) (3.43) We define the error signal ed entering into the proportional part as ed = ifd,ref (s)− ifd(s) (3.44) and the error signal from the integrator, Id as Id = ∫ ed dt = ∫ ( ifd,ref (s)− ifd(s) ) dt (3.45) then, by inserting equations (3.44) and (3.45) in (3.43) we get vcd(s) = Kpcd ed +Kicd Id + (jωLf −Ra)ifd(s) + egd(s) (3.46) 25 3. Design of the proposed ancillary service We now define a new integrator error signal as Id = ∫ ed dt (3.47) We then analyze the output vc,lim(s) vcd,lim(s) = Kpcd ed +Kicd Id + (jωLf −Ra)ifd(s) + edg(s) (3.48) Equating equations (3.46) and (3.48), and simplifying terms v′cd(s) = vcd,lim(s) (3.49) vcd,lim(s)− v′cd(s) = Kpcd ed −Kpcd ed (3.50) It is now possible to define the modified integrator error e as ed = ed + 1 Kpcd ( vcd,lim(s)− vcd(s) ) (3.51) where it is evident that 1/Kpcd is the value of the function H from Figure 3.9. 3.9 Outer controllers 3.9.1 Frequency controller The goal is to reduce the rate-of-change-of-frequency, therefore a simple P controller is sufficient. Kpf is the proportional component that acts on the measured frequency deviation. Its value its chosen in p.u. according to the maximum allowed frequency deviation. Figure 3.10 shows the proposed control. fmeas,pu is the frequency mea- surement from the PLL in p.u.. fref,pu is the reference frequency in p.u. 2kJ 'UVJ(`) 2OSL FZVPO,ÄW FUVJ,ÄW Figure 3.10: Block diagram of the frequency controller consisting of a proportional gain and a droop Ksoc is a droop factor introduced to take into account the limited battery capac- ity, thus as the battery SOC reaches a limit (maximum or minimum), the BESS equivalent frequency droop will be gradually reduced by means of Ksoc. This droop characteristic will be further explained in Section 3.11. 26 3. Design of the proposed ancillary service 3.9.2 AC voltage controller The voltage controller is implemented as a single droop controller. Its implementa- tion is shown in Figure 3.11a. The controller computes the difference between the magnitude of the voltage measurement from the grid and the reference. nC nC 6H](a) 6H\(a) ao?4() 6H,VWJ(a) +,\VTTw +VWJ(a) (a) Block diagram of the AC voltage controller 6H,w.X. +[Pg+[:Y 6H,[Pg 6H,[:Y + (b) Voltage droop slope for the voltage controller Figure 3.11: Elements of the voltage AC outer controller QVdroop is a general voltage droop representing the slope of the voltage as in Figure 3.11b. 3.10 Battery Modelling batteries is the process of describing the phenomena that occur inside the battery through mathematical equations. Two main types of models exist: on one hand there are the electrochemical models that describe the reactions and physical processes taking place inside the battery. On the other hand, electric circuit-based models are useful to represent electrical characteristics of batteries [17]. The most simple electric model is shown in Figure 3.12, which consists only of a constant resistance Rb in series with an ideal voltage source E0. This model, how- ever, does not take into account the battery’s internal dynamics and some of the element’s non-linearities, which makes it only suitable for very simplistic modelling [22]. More accurate models for dynamic simulations, that can accurately represent the electrical behaviour of four distinct battery types: Lead-Acid, Li-Ion, NiMH and NiCd, alongside important internal states such as the SOC, are proposed in [23, 24]. In [23], the author describes a universal battery model intended for applications in dynamic simulations. It uses a non-linear equation to describe the voltage source’s behaviour based on the SOC-level, which in turn is estimated by integrating the current. The non-linear voltage equation uses the electrochemical behaviour of a 27 3. Design of the proposed ancillary service -. /0 ,0 Figure 3.12: Simple battery model consisting only of a resistance in series with an ideal voltage source battery in terms of terminal voltage, open circuit voltage, internal resistance, dis- charge current and SOC. A graphical representation of the model is presented in Figure 3.13. - / ,0 -. − 2 + + − 34 + 56 789:; 34 < . ; . 3 < . ; . Figure 3.13: Dynamic battery model which uses a non-linear equation to control the voltage source where Vb = no-load voltage (V) E0 = battery constant voltage (V) K = polarisation voltage (V) Q = battery capacity (A h) A = exponential zone amplitude (V) B = exponential zone time constant inverse (A h−1) R = internal resistance (Ω) i = battery current (A) it = ∫ t 0 i dt = integrated battery current (A h) The exponential zone A represents the fully charged area comprised between the point of full charged voltage and the beginning of the nominal area. This is shown in Figure 3.14, which illustrates a typical nominal current discharge characteristic obtained using the model in [23], for a 3.5 V, 1 A h Li-Ion battery for a discharge 28 3. Design of the proposed ancillary service current of 10 A (10 C-rate). Figure 3.14: Typical discharge curve of a 3.5 V, 1 A h Li-Ion battery for a 10C discharge rate. E0 = 3.7348, K = 0.00876, Q = 1, A = 0.468, B = 3.5294, R = 0.09. According to the author, the model presented in [23] is valid in steady state (con- stant current) but this model produces false results when the current varies. - /0 ,0 ,LáPVHW = Fà(2, +, -., /, 5, Ñ, 3, 34) 34 < . ; . $6â < . ; . ,\:OLáPVHW = FC(2, +, -., /, 5, Ñ, 3, 34) yℎp?r6 }3ayℎp?r6 3 Figure 3.15: Diagram showing a dynamic battery model with charge and discharge capabilities. It uses a non-linear voltage source dependent on the current and the integrated current flowing trough the battery On [24], the author presents an improved version of the dynamic battery model that can be applied both for discharge and charge dynamics. It uses the same electrome- chanical parameters as in [23] to represent the dynamic behavior of the voltage. In the particular case of [24], for a Li-Ion battery, the adapted non-linear voltage equation for the discharge phase is Vb = E0 −R · i−K Q Q− it · (it+ i) + Ae(−B · it) (3.52) 29 3. Design of the proposed ancillary service and for the charge phase Vb = E0 −R · i−K Q it− 0.1 ·Q · i−K Q Q− it · it+ Ae(−B · it) (3.53) The layout of a dynamic battery model adapted from [24] is presented in Figure 3.15. It can be seen how the voltage source E0 is controlled by non-linear equations that provide valid results for both charge and discharge dynamics. 3.11 Battery management system The BMS, handles actions related to the battery’s condition. In the proposed BESS ancillary service, it interacts with the system’s first level of control by using the battery’s SOC as input and providing the operational parameter Ksoc which acts as a droop to limit the contribution of the system in order to protect the battery. The proposed BMS scheme, based on [25], uses a power-curtailment strategy when the battery’s SOC reaches critical levels. The curtailment mechanism provides a smooth transition between the normal operation and idle operating points. Thus, by allowing the battery to gradually reduce its output, a sudden loss of support power is prevented therefore preventing further disturbance to the grid [25]. 0 100% 2OTL $çéà $çéC 0 100% 2OTL $çéè $çéê ∆F > 0∆F < 0 $çé $çé 11 (a) Evolution of Ksoc when the frequency deviation ∆f is negative. SOC1 indicates an idle point of operation and SOC2 represents the point at which the droop limits the BESS compensation 0 100% 2OTL $çéà $çéC 0 100% 2OTL $çéè $çéê ∆F > 0∆F < 0 $çé $çé 11 (b) Evolution of Ksoc when the frequency deviation ∆f is positive. SOC3 illustrates the point at which the droop starts to act in order to limit the BESS compensation and SOC4 represents the idle operation point Figure 3.16: Ksoc droop characteristics Figure 3.16 shows how the droop component Ksoc depends on the frequency de- viation ∆f . When load exceeds generation, or when a generating unit is lost, a frequency dip ensues and thus ∆f < 0. In that case, the droop will act as depicted in Figure 3.16a. It is clear the battery’s compensation level will begin to decrease at the point SOC2 until the point SOC1 when the battery stops injecting power 30 3. Design of the proposed ancillary service completely, in order to avoid a total discharge of the battery cells. Conversely, when there is excess power in the system, ∆f will be positive. In such an instance, the droop component will behave as illustrated in Figure 3.16b. There, the BMS begins restricting the battery compensation when the SOC reaches the operation point SOC3, and the battery stops charging completely at the operation point SOC4. The operational points (e.g. SOC1 = 5%, SOC2 = 15%, SOC3 = 80% and SOC4 = 90% of SOC) depend on the battery’s physical constraints, as well as on the preferred support strategy. For example, if the BESS is intended exclusively to mitigate frequency dips, then the values for SOC3 and SOC4 can both be set to 100%, so that there is no droop component when the battery is charging. This in order to maximize the availability of the battery’s capacity. On the other hand, if the BESS is intended to mitigate both negative and positive frequency regulations, it is important to restrict the maximum battery charging to a certain level in order to have capacity available to absorb power if needed. 31 3. Design of the proposed ancillary service 32 4 Implementation and model verification This chapter presents the reader with the implementation approach and validation of the derived models in the simulation tool PowerFactory. 4.1 Implementation approach The implementation of this thesis was carried out using DIgSILENT GmbH Power- Factory® 2016 SP3 Build 16.0.4(6018)/Rev. 36850. PowerFactory is an engineering simulation software developed for the analysis of transmission, distribution and in- dustrial electrical power systems. It can be applied as a simulation tool for, to name a few: load flow analysis, short-circuit analysis, power quality and harmonic analy- sis, quasi-dynamic as well as dynamic simulations, contingency analysis, eigenvalue analysis and many others [26]. The software is extremely capable and comes pre-loaded with many standard mod- els like governors, power system stabilizers, etc. with different levels of detail. It is, however, also possible to implement user-defined models that can be interfaced alongside standard models and network elements [19]. For the dynamic simulations, all tests were conducted using the RMS simulation method. 4.1.1 RMS and EMT simulations In PowerFactory, dynamic simulations can be performed using RMS (phasor-based) and EMT (electromagnetic transients) methods. In RMS simulations, electromag- netic dynamics of the electrical network are neglected and voltages and currents are defined as phasors. In this way, the voltages and currents in the network are found by algebraic equations rather than by differential equations [19]. v = jωLi (4.1) i = jωCv (4.2) The only differential equation considered in an RMS simulation is the swing equation for mechanical transients: 33 4. Implementation and model verification d dt 1 2Jω 2 = Pmech − Pel (4.3) In EMT simulations, voltages and currents are represented by their instantaneous values, which means that the quantities are found by differential equations. v = L d dt i (4.4) i = C d dt u (4.5) A disadvantage of EMT over RMS simulations is the very small simulation time-step needed to get accurate results. This makes simulations computationally-intensive and time-consuming, since the software engine has to solve a set of differential equa- tions for a greater number of time-points. For transient stability studies as well as for evaluation of control systems, RMS simulation is preferable since the simplified network using phasors provides accurate enough results and allows for shorter cal- culation times. An in-depth comparison of RMS versus EMT results is discussed in detail in [19], where the authors conducted extensive testing and comparison of both simulation methods applied to slow dynamic studies of systems incorporating HVDC links. 4.1.2 Model revision Taking the RMS simulation approach into consideration, the derivation of some parts of the control system have to be adapted. For the current controller, the term sLf is neglected and thus, the system transfer function from equation (3.7) becomes Gc(s) = if (s) vc(s)− eg(s) = 1 Rf + jωLf (4.6) which means that the one-degree-of-freedom controller parameters, as defined in equation (3.17), are now calculated as Kpc = 0; Kic = αcR̂f (4.7) Similarly, the active damping definition in equation (3.23) is modified to Ra = αc − R̂f (4.8) and so, the two-degree-of-freedom controller parameters are Kpc = 0 (4.9) Kic = αc(R̂f +Ra) = αc(R̂f + αc − R̂f ) = α2 c (4.10) Finally, since Kpc = 0, the definition of the anti-windup function, as obtained in equation (3.51), is now derived as H = 1 R̂f (4.11) 34 4. Implementation and model verification 4.1.3 Model evaluation A simple arrangement consisting of the static generator and a controllable AC volt- age source was implemented as the test grid. In this way, the behaviour of the control system can be evaluated by setting values for both frequency and voltage independently. Figure 4.1 shows the implementation of the simple test grid used to verify the models. Terminal 0,4 1,00 0,0 PowerFactory 2016 SP3 Test grid for the proposed BESS Author: Omar Juárez Moreno Supervisor: Oscar Lennerhag Project: Exjobb Graphic: BESS test Date: 2017 Annex: Static Generator 0,0 0,0 0,0 0,000 V ~ AC Voltage Source 0,0 0,0 0,000 D Ig S IL E N T Figure 4.1: Single-line diagram of a simple test grid consisting of a controllable AC voltage source and a static generator representing the BESS The battery system is represented in the network as a static generator, which is a model that can represent any kind of non-rotating generation unit. These types of generators include photovoltaic generators, storage devices, HVDC terminals, reac- tive power compensators, wind generators, etc. Basically any type of generation interfaced with the grid through a full-size converter can be modelled as a static generator, since the behaviour of the plant (as seen from the grid) is determined by the converter [27]. The static generator in PowerFactory supports four different models: voltage source, current source, constant impedance and constant power. It was decided to frame- work the system as a voltage source. The final expression of the voltage output from the current controller is expressed in equation (3.43), which is valid for both components dq. It could be argued that static generator could also be modelled as a current source. However, in PowerFactory the current source model uses a built-in current controller defined in Figure 4.2. As stated before, in order for the RMS model to have the same response as the EMT model, the proportional partK, as seen in Figure 4.2, has to be set to 0. This makes the use of the built-in current controller only suitable for EMT simulations. Other reasons to implement a user-defined current controller using a voltage source model is that the built-in one is very basic and lacks a decoupling term, feed-forward of the grid voltage, active damping and it has no anti-windup function for the integrator. 35 4. Implementation and model verification 2\ 1 + 1 Ö\a 2] 1 + 1 Ö]a 3\,X 3]_VWJ 3\ 3] 3\_VWJ 3],X Figure 4.2: Built-in current controller for the static generator (DIgSILENT, 2016) 4.2 VSC control VSC controller frame: REF * 0 1 2 0 1 BMS * FREQ CTRL * 0 1 V CTRL * 0 1 ILIM * 0 1 0 1 BESS * 0 1 0 1 VLIM * 0 1 0 1 2 3 V FILTER * 0 1 0 1 CC * 0 1 2 3 4 5 6 7 0 1 UABDQ * 0 1 2 3 0 1 VMEAS * 0 1 BATT * UDQAB * 0 1 2 3 0 1 PLL * 0 1 2 PowerFactory 2016 SP3 Main frame of the control system Author: Omar Juárez Moreno Supervisor: Oscar Lennerhag Project: Exjobb Graphic: Project Date: 2017 Annex: VSC controller frame: id_ref_unlim iq_ref_unlim P_ref so c ksoc Q_ref id _ re f iq _ re f fm e a s u 1 r_ in u 1 i_ in iq uqc id udc u d u q ed_tilde uq_lim eq_tilde ud_lim ui uq_prime ur ud_prime sinphi cosphi D Ig S IL E N T 1 2 3 4 5 6 7 8 910 11 12 13 14 Figure 4.3: PowerFactory implementation of the control system of the Battery-based proposed ancillary service Figure 4.3 illustrates the implementation of the proposed control strategy for the BESS in PowerFactory. A description of the blocks is provided in the following list: 1. The PLL input signals are the real and imaginary components of the volt- age, which are automatically retrieved from the specified connection point. It outputs the signals sinphi and cosphi that together provide the phase angle information necessary for the dq transformations. 36 4. Implementation and model verification 2. The VMEAS slot houses the voltage measurement. Just as the PLL, the in- put signals are connected automatically from the point of connection in the network. It outputs the signals ur and ui, which are the αβ components of the measured grid voltage. 3. The UABDQ slot is the αβ to dq transformation of the voltage signals ur and ui. It receives the information about the phase angle from the PLL slot. 4. The output voltage signals ud_prime and uq_prime are filtered in order to re- move high frequency harmonic components that may affect the performance of the controller. Based on [25], the signals are passed through two Butterworth LPF with the function specified in equation (4.12), where the cut-off frequency ωcf is chosen to be 100 times lower than the base switching frequency of the converter. LPF (s) = ω2 cf s2 + √ 2ωcf · s+ ω2 cf (4.12) 5. The Voltage controller receives the filtered voltage signals in dq as inputs and outputs the reactive power reference Qref . 6. The frequency controller inputs are the measured frequency fmeas from the PLL and the Ksoc droop component from the BMS. 7. The reference calculation block outputs the unlimited d and q current refer- ences which it calculates with the inputs from the outer frequency and voltage controllers, together with the filtered d component of the voltage. 8. The unlimited current references are capped in the ILIM slot, where the d component is given priority over the q one. 9. The current controller slot calculates the unlimited voltage control signals in dq. 10. The voltage limiter block restricts the magnitude of the output control voltage and outputs back the signals ed_tilde and eq_tilde, which are used for the back calculation of the integrator error for the anti-windup function imple- mented in the current controller. 11. The limited voltage control signal is rotated to the αβ reference frame wit the block UDQAB. 12. The BESS model is interfaced with a static generator in the network. It receives the αβ voltage control signals u1r_in and u1i_in and outputs the device current components in dq. 13. The battery block takes the measured current as input in order to compute the state of charge SOC. 37 4. Implementation and model verification 14. The BMS takes in the SOC information from the battery to output the Ksoc droop that will curtail the systems response capability in accordance to the battery’s internal states. 4.3 Current controller 4.3.1 Basic current controller The implementation of a basic current controller with only the decoupling feed- forward loop is presented in Figure 4.4. The parameters for the filter resistance and inductance are chosen respectively as 0.0025 and 0.25 in p.u. of the converter rated power. current controller: - 1/sT Ti K Kp 1/sT Ti - K Kp - - K L K L PowerFactory 2016 SP3 One-degree-of-freedom Current Controller Author: Omar Juárez Moreno Supervisor: Oscar Lennerhag Project: Exjobb Graphic: CC Date: 2017 Annex: current controller: 0 3 1 2 0 2 0 2 uqc udc yi1iq iq_ref o6 o 7 o2 o5 o3 id id_ref o4 o1 o 8 D Ig S IL E N T Figure 4.4: PowerFactory implementation of a one-degree-of-freedom current controller with decoupling term In order to test the performance of the current controller, a 1 p.u. step in the d current is applied at 500 ms, as shown in Figure 4.5. The systems response to the step has the shape of a first-order system, as it was designed to do. The controller bandwidth αc is chosen to be one tenth of the switching frequency of the converter, as suggested in [28]. The data points in the figure show the rise-time from 10% to 90% of the final value. As defined by equation (3.11), the data points evidence that the controller’s bandwidth is 4 p.u., which means that the controller is behaving as expected. Figure 4.6 shows the response of the currents to a 0.5 p.u. step in the d current at 550 ms and a negative step with the same magnitude at 555 ms. The d component 38 4. Implementation and model verification 490 495 500 505 510 515 520 Time [ms] 0 0.2 0.4 0.6 0.8 1 id [p .u .] id to idref; c = 4 p.u. idref id X: 500.092 Y: 0.108243 X: 501.822 Y: 0.900505 Figure 4.5: Basic current controller response after a 1 p.u. step in the d current is applied at 500 ms 540 545 550 555 560 565 570 Time [ms] 0 0.2 0.4 0.6 id [p .u .] id to idref; c = 4 p.u. idref id 540 545 550 555 560 565 570 Time [ms] -0.01 -0.005 0 0.005 0.01 iq [p .u .] iq to iqref; c = 4 p.u. iqref iq Figure 4.6: Controller currents response to set-point changes in the basic current controller from Figure 4.4 with decoupling term only 39 4. Implementation and model verification displayed in the top plot is behaving correctly. However, the q component exhibits disturbances in response to the set-point changes in the d component. The distur- bances are small and quickly die out thanks to the action of the decoupling-term. 4.3.2 Improved current controller Figure 4.7 displays the feed-forward of the grid voltage, active-damping and an in- tegrator anti-windup function to the basic current controller. current controller: K Ra K Ra K L K L 1/K Aw 1/K Aw - - - K Kp K Kp 1/sT Ti 1/sT Ti - - PowerFactory 2016 SP3 Two-degree-of-freedom Current Controller Author: Omar Juárez Moreno Supervisor: Oscar Lennerhag Project: Exjobb Graphic: CC Date: 2017 Annex: current controller: 2 5 3 4 0 1 0 7 1 6 o15eq_tilde o14ed_tilde uq ud yi2 yi1 yi o13 uqco12 udco11 o 1 0 o 7 o2 o 9 o 8 o1 o6 o5 o4 o3 iq iq_ref id id_ref D Ig S IL E N T Figure 4.7: PowerFactory implementation of an improved current controller with feed-forward of the grid voltage, decoupling term, active-damping and an integrator anti-windup function In order to corroborate that adding all these terms has not affected the behaviour of the system, a 1 p.u. step in the d current is applied at 500 ms and its response (green) is superposed to the response from the basic current controller (dotted-black) in Figure 4.8. References are represented by the dashed-black lines. By looking at the shape of the response, it is evident that the controller continues to behave as expected and that the addition of the active damping term Ra has not affected the response’s rise-time. Figure 4.9 illustrates behaviour of the currents against set-point changes. The re- sponse of the improved current controller is shown in green and that of the basic current controller is the dotted-black line. References are the dashed-black lines. It is clear that the addition of active damping has a big effect on the robustness of the controller. This is specially evident when looking at the response of the q current after set-point changes in the d component. As opposed to the case without ac- tive damping, the disturbances in the q current are now completely damped, which 40 4. Implementation and model verification 490 495 500 505 510 515 520 Time [ms] 0 0.2 0.4 0.6 0.8 1 id [p .u .] id to idref; c = 4 p.u. idref id Ra id w/o Ra X: 500.092 Y: 0.108243 X: 501.822 Y: 0.900505 Figure 4.8: Current controller with added active damping response compared to a basic current controller after a 1 p.u. step in the d current is applied at 500 ms 540 545 550 555 560 565 570 Time [ms] 0 0.2 0.4 0.6 id [p .u .] id to idref; c = 4 p.u. idref id Ra id w/o Ra 540 545 550 555 560 565 570 Time [ms] -0.01 -0.005 0 0.005 0.01 iq [p .u .] iq to iqref; c = 4 p.u. iq Ra iqref iq w/o Ra Figure 4.9: Comparison of the currents response to set-point changes between a basic current controller and an improved current controller with active damping 41 4. Implementation and model verification proves that adding active damping enhances the disturbance-rejection capability of the controller. 4.3.3 Current controller analysis Figure 4.10 shows the results of the current controller transfer function analysis from if (s) to if,ref (s) at αc = 4 p.u.. The plot in the upper left corner shows the pole-zero map of the controller without active damping. The controller pole (black) is positioned on the real axis at the controller bandwidth value 4 and the system pole (black) is positioned closer to the origin. The lower left corner plot shows the position of the controller poles (green) with active damping. It is evident that with active damping, the system pole is moved to the controller pole, which gives a double pole at that position. This means that the controller with active damping is now insensitive to disturbances with bandwidth below 4 p.u.. The bode diagrams show the amplitude and phase margins for the controller without active damping (dotted-black) and with active damping (green). The fact that both curves are the same proves that adding active damping doesn’t affect the frequency response of the controller. -8 -6 -4 -2 0 -1 -0.5 0 0.5 1 Pole-Zero Map current controller no Ra Real Axis (seconds-1 ) Im ag in ar y Ax is (s ec on ds -1 ) -8 -6 -4 -2 0 -1 -0.5 0 0.5 1 Pole-Zero Map current controller added Ra Real Axis (seconds-1 ) Im ag in ar y Ax is (s ec on ds -1 ) 10-2 100 102 -30 -20 -10 0 M ag ni tu de (d B) Bode Diagram Frequency (rad/s) 10-2 100 102 -90 -45 0 Ph as e (d eg ) Bode Diagram Frequency (rad/s) Controller pole System pole Double pole Figure 4.10: Analysis of the current controller with (green) and without (black) active damping. Pole placement is plotted in the complex plane and magnitude and phase margins in Bode plots. Note that the frequency axis units in Bode plots are in p.u. 42 4. Implementation and model verification 4.3.4 Sensitivity to parameter variations The parameters used to calculate the gains of the controller, R̂f and L̂f are the esti- mated values of the reactor filter Rf and Lf . In order to achieve good performance of the controller, the estimated values should be as close as possible to the actual values. However in practice, a perfect estimation is difficult to achieve. This is the reason why a parameter sensitivity analysis was conducted in order to study how the controllers behaviour is affected by imprecise parameter estimation. 4.3.4.1 Sensitivity to variations in the filter inductance -4 -3 -2 -1 0 -2 -1.5 -1 -0.5 0 0.5 1 1.5 2 Pole-Zero Map, under estimation of Lf Real Axis (seconds-1) Im ag in ar y Ax is (s ec on ds -1 ) -80 -60 -40 -20 0 -1 -0.8 -0.6 -0.4 -0.2 0 0.2 0.4 0.6 0.8 1 Pole-Zero Map, over estimation of Lf Real Axis (seconds-1) Im ag in ar y Ax is (s ec on ds -1 ) Figure 4.11: Pole-zero maps of the system’s behaviour with an error in the estimation of the filter inductance L̂f Figure 4.11 illustrates the pole placement in the complex plane for varying values of the filter inductance. The left hand plot shows the poles for an underestima- tion of Lf of the order 0.1Lf < L̂f < 1Lf in steps of 0.1. The right hand plot shows an overestimation of Lf < L̂f < 10Lf in steps of 1. The non-zero imaginary parts of the solution in the left plot indicate an oscillatory behaviour. The left plot also shows that the smaller the inductance, the closer to the imaginary axis the poles move, approaching instability and making them more dominant. On the other hand, the right plot shows that overestimating the inductance has little effect on the system behaviour since it just pushes the poles away from the origin on the real axis. 43 4. Implementation and model verification 500 520 540 560 580 Time [ms] -0.4 -0.2 0 0.2 0.4 0.6 0.8 1 1.2 id , i q [p .u .] id to idref; c = 4 p.u. id id 0.1Lf idref iq iqref Figure 4.12: Oscillations in the current response to a unitary step and decoupling not working due to an under estimation of the estimated filter inductance L̂f = 0.1Lf In order analyze the worst case (under estimation L̂f = 0.1Lf ), a step of p.u.i n the d current was applied at 500 ms. The d component is plotted in solid black, the q in red, the references are dotted black and red, respectively and the systems response with perfect parameters is shown in green. As evidenced by the poles placement, the system has an oscillatory behaviour. Even though the controller has active damp- ing, the q component is heavily affected by the step in the d current. This indicates that the decoupling is not working as expected. This comes as no surprise, since the decoupling term is the filter’s reactance. 4.3.4.2 Sensitivity to variations in the filter resistance Figure 4.13 shows the pole-zero maps for under and over estimation of the filter resistance R̂f . The left hand plot shows the behaviour of the system poles when the value is under estimated as 0.1Rf < R̂f < 1Rf in steps of 0.1. On the other hand, the right plot depicts the pole placement when R̂f is varied as per Rf < R̂f < 10Rf in steps of 1. Looking at the right hand plot of Figure 4.13, it is evident that over estimating the value of the filter resistance causes the system to respond in a slightly oscillatory manner. This is evidenced by the non-zero imaginary parts of the solu- tions that lean slightly towards the imaginary axis. This response might seem counter-intuitive at first, since it is the resistive term that provides damping to the response of the controller, so one would expect that more resistance would mean a more damped system. However, a larger resistive term is translated into a slower rise time, so the integrating part computes a larger error and this gives as a result a larger integrator contribution and consequently an over shoot. This response is illustrated in Figure 4.14, where a step of 1 p.u. was applied to the d component at 500 ms. The estimated resistive term is 10 times the value of the actual. The plot shows a small overshoot of 0.00015 p.u in the d current response. 44 4. Implementation and model verification -4.2 -4.1 -4 -3.9 -3.8 -1 -0.8 -0.6 -0.4 -0.2 0 0.2 0.4 0.6 0.8 1 Pole-Zero Map, under estimation of Rf Real Axis (seconds-1) Im ag in ar y Ax is (s ec on ds -1 ) -4 -3.98 -3.96 -3.94 -0.6 -0.4 -0.2 0 0.2 0.4 0.6 Pole-Zero Map, over estimation of Rf Real Axis (seconds-1) Im ag in ar y Ax is (s ec on ds -1 ) Figure 4.13: Pole-zero maps of the system’s behaviour with an error in the estimation of the filter inductance R̂f 495 500 505 510 515 520 Time [ms] 0.9995 0.9996 0.9997 0.9998 0.9999 1 1.0001 1.0002 1.0003 id [p .u .] id to idref; c = 4 p.u. id 10Rf idref Figure 4.14: Overshoot in the d current response due to an over estimation of the filter resistance R̂f = 10Rf 45 4. Implementation and model verification 4.4 Frequency controller The block diagram of the frequency controller is shown in Figure 4.15. The differ- ence between the measured and nominal frequency is passed trough a LPF with a time constant of 0.5 s. This filter is intended to mitigate the variation of the fre- quency estimation due to the phase angle jump after the disturbance is measured by the PLL. The time constant is chosen small in order to not affect the controller’s set-point following. Frequency controller: Deadband_Step delta 1 K Kpf 1/(1+sT) T - Frequency controller: 1111 0 PowerFactory 2016 SP3 Frequency controller Author: Omar Juárez Moreno Supervisor: Oscar Lennerhag Project: Exjobb Graphic: FREQ CTRL Date: 2017 Annex: ksoc yife_prime fn o m P_reffe_delayfefmeas D Ig S IL E N T Figure 4.15: PowerFactory implementation of the outer frequency controller The dead-band accounts for the fact that the proposed ancillary service is intended to provide FCR-D, which will only act on deviations outside the normal range of operations for the Nordic power system (49.90 < f < 50.10 Hz). The resulting signal fe_prime is then multiplied with the droop Ksoc coming from the BMS. The gain of the controller Kpf is chosen in p.u. according to the maximum allowed frequency deviation. In the case of FCR-D this value is 49.5 Hz (0.01 p.u. for a nominal frequency of 50 Hz), So, for that case Kpf = 1 0.01 = 100 (4.13) where the numerator is the rating of the converter in p.u. and the denominator is the maximum allow frequency deviation in p.u. at which point the full BESS should be fully committed. 46 4. Implementation and model verification Figure 4.16 illustrates how the filter and the dead band work. Right after an event alters the frequency, the PLL phase-angle measurement experiences a step, which is registered in the calculated frequency coming into the controller. The signal fe is the difference between the calculated frequency signal from the PLL and the set- point nominal frequency fnom. In this case the event was at time 20s. However this signal entering the controller does not reflect the actual frequency deviation in the system, so the signal fe is filtered. The filtering action entails a delay, which is evident in the filtered signal fe_delay. The stepped dead-band then holds up the frequency controller action signal fe_prime until the frequency deviation is larger than 0.002 p.u. in order to comply with FCR-D requirements. 19.5 20 20.5 21 21.5 Time [s] 0 0.5 1 1.5 2 2.5 3 3.5 4 Fr eq ue nc y [p .u .] 10-3 Frequency controller signals fe_delay fe fe_prime deadband Figure 4.16: Frequency controller signals illustrating the effect of the filter acting on the frequency input and the dead-band 4.5 Current limiter Figure 4.17 illustrates the principle of the current limiting strategy used, as ex- plained in Section 3.7. On the right hand side plot, at time 470 ms, the controller is given a 0.1 p.u. reference step in the q current, indicating that reactive power compensation is needed. At time 500 ms, the current controller receives a step in the d current of 1p.u., suggesting that there has been a big frequency dip and the whole converter capacity must be committed. Since the reference for the q current (0.1 p.u) is larger than the remaining converter capacity after the d current step (1 p.u.), the q component is curtailed. On the left hand side plot, the current controller is given the same set-point changes, only that this time the d current reference is 0.9 p.u.. On this occasion, the converter is able to provide both active and reactive power compensation, so no curtailment on the q component is enforced. 47 4. Implementation and model verification 460 480 500 520 Time [ms] 0 0.2 0.4 0.6 0.8 1 id , i q [p .u .] iq to iqref id to idref; c = 4 p.u. id iq idref iqref 460 480 500 520 Time [ms] 0 0.2 0.4 0.6 0.8 1 id , i q [p .u .] iq to iqref id to idref; c = 4 p.u. id iq idref iqref Figure 4.17: Current limiter giving preference to the d component of the current 4.6 Battery The implementation shown in Figure 4.18 consists of two user-defined functions con- taining the charge and discharge equations defined in [24]. The discharge current of the battery can be adjusted using the scaling constant Ibess. The function selector works by comparing the magnitude of the current through the logic bloc "lower than". Once the adequate equation has been activated, it is feed the current and the integrated current, both of which pass through the inverted gain of the number of parallel cells, whose number decides the capacity of the battery. The output is the battery’s voltage, which in turn is multiplied by the gain of the number of series cells to determine the battery’s voltage level. The battery’s starting state of charge, SOCinit, can be set by adjusting the initial conditions of the integrator’s state variable x with the equation inc(x) = Q ∗ nparallel ∗ SOCinit 100 (4.14) Figure 4.19 shows the discharge curves for different C-rates. It demonstrates that the battery can deliver different levels of energy depending on the magnitude of the discharge current. 48 4. Implementation and model verification Batt charge-discharge: 1/K n_parallel 1/K n_parallel 1/sT T logic