INTELLIGENT LOAD SHEDDING SCHEME FOR FREQUENCY CONTROL IN COMMUNITIES WITH LOCAL ALTERNATIVE GENERATION AND LIMITED MAIN GRID SUPPORT by Shahrzad Rostamirad B.A.Sc., The University of British Columbia, 2009 A THESIS SUBMITTED IN PARTIAL FULFILLMENT OF THE REQUIREMENTS FOR THE DEGREE OF MASTER OF APPLIED SCIENCE in The Faculty of Graduate Studies (Electrical and Computer Engineering) THE UNIVERSITY OF BRITISH COLUMBIA (Vancouver) June 2011 © Shahrzad Rostamirad, 2011 ii Abstract The number of microgrids in the electric power system is increasing rapidly to meet the increased electrical demand at the distribution level instead of delivering the additional power from centralized generation stations. Due to the above-mentioned transformation and a number of other factors, the utilities find themselves less attracted to investing in the supply lines. As a consequence, the connection points of these, rather self-supplied, microgrids become more vulnerable to any major disturbances in the downstream network. Because microgrids with renewable energy resources do not have a generation reserve, an intelligent load shedding algorithm (based on a smart grid) is proposed, that balances the power demand and generation, and prevents the upstream supply lines from exceeding their capacity at any time. Although the algorithm is accurate, it may not be fast enough to prevent a cascading power outage in the isolated microgrid due to very fast frequency decline. To help maintain the frequency of the microgrid close to the normal level, a supplementary controller is added to the doubly fed induction generator wind turbine. The studied microgrid corresponds to a case study in the University of British Columbia (UBC). A scenario of demand and distributed generation of the campus in the year 2030 are modeled. The proposed algorithm, which combines intelligent load shedding with wind turbine controller, succeeds in managing the power requirements for both grid connected and isolated microgrids. However, the algorithm has a weakness which is its operation delay; for longer delays in deactivating the controller and load shedding, the frequency might drop below the threshold. A number of suggestions are made to overcome this problem. iii Preface Different versions of chapter 2 of this thesis have been published in the Journal of Power System Technology and in the IEEE Canadian Conference on Electrical and Computer Engineering: [1] Wang, k., S. Rostamirad, J.R. Marti. Frequency Response Improvement in a Microgrid with Doubly Fed Induction Generator, Power system technology, Beijing. [2] Rostamirad, S., K. Wang, J.R. Marti. Power Management in Disasters: Application of Load shedding and Wind Turbine Controllers. in IEEE Canadian Conference on Electrical and Computer Engineering, Connecting Engineering Applications and Disaster Management Workshop 2011: Niagara Falls, Ontario. I wrote the first draft of result, discussion and conclusion sections of the “Frequency Response Improvement in a Microgrid with Doubly Fed Induction Generator” paper. Dr. Kui Wang wrote the entire manuscript. I wrote and edited the majority of the “Power Management in Disasters: Application of Load shedding and Wind Turbine Controllers”. Dr. Jose R. Marti, Dr. Kui Wang and Dr. Paul Lusina provided guidance and revisions for the manuscript. iv Table of Contents Abstract .................................................................................................................................... ii Preface ..................................................................................................................................... iii Table of Contents ................................................................................................................... iv List of Tables .......................................................................................................................... vi List of Figures ........................................................................................................................ vii Acknowledgements ................................................................................................................ ix Dedication ................................................................................................................................ x 1 Introduction .......................................................................................................................... 1 1.1 Microgrids ............................................................................................................................. 1 1.2 Wind Turbine Controller ....................................................................................................... 4 1.3 Load Shedding Scheme ......................................................................................................... 6 1.3.1 Architecture ...................................................................................................................... 8 1.3.2 Detection ......................................................................................................................... 10 1.4 Load Prioritization .............................................................................................................. 13 1.5 Research Objective ............................................................................................................. 14 2 Intelligent Load Shedding ................................................................................................. 15 2.1 UBC Campus Microgrid ..................................................................................................... 15 2.1.1 Frequency Response Model ............................................................................................ 22 2.2 Load Shedding Method ....................................................................................................... 25 2.2.1 Conventional Load Shedding ......................................................................................... 26 2.3 Wide Area Network Load Shedding Proposed for UBC System ........................................ 31 2.4 Wind Turbine Controller ..................................................................................................... 37 3 Simulation Results and Discussions ................................................................................. 48 3.1 Scenario 1: Average Demand ............................................................................................. 48 3.2 Scenario 2: Average Wind Speed ....................................................................................... 49 3.3 Scenario 3: High Wind Speed ............................................................................................. 51 3.4 Scenario 4: Concurrent Contingencies ................................................................................ 53 3.5 Scenario 5: Delay ................................................................................................................ 55 v 3.6 Simulation Conclusion ........................................................................................................ 58 4 Conclusion and Future Work ........................................................................................... 60 Bibliography .......................................................................................................................... 63 Appendices ............................................................................................................................. 69 Appendix A Load Shedding Schemes .............................................................................................. 69 A.1 Traditional Load Shedding ............................................................................................. 72 A.2 Intelligent Load Shedding ............................................................................................... 73 Appendix B Wind Turbine Models .................................................................................................. 77 B.1 General Model of Wind Turbine DFIG .......................................................................... 77 B.2 UBC Wind Turbine DFIG .............................................................................................. 78 vi List of Tables Table 1: WECC under frequency minimum requirements [38]................................................ 7 Table 2: UBC backup generators for high priority loads ........................................................ 16 Table 3: Economical suitability of wind power based on wind speed [82] ............................ 20 Table 4: Off shore wind speed [84] ........................................................................................ 21 Table 5: Load shedding plan template .................................................................................... 26 Table 6: Common load shedding table ................................................................................... 27 Table 7: Delay of various communication links [92] ............................................................. 36 vii List of Figures Figure 1: Extracted power coefficient curve versus tip speed ratio [27] (1a) Extracted power curve versus rotational speed [26] (1b) ..................................................................................... 5 Figure 2: Frequency regulation framework [35] ....................................................................... 6 Figure 3: Vancouver Island (VI) Area Emergency Manual Load Shedding (EMLS) display [41] ............................................................................................................................................ 8 Figure 4: Centralized versus distributed under frequency load shedding [44] ......................... 9 Figure 5: Oscillations of frequency gradients for bus 4 and 39 of New England 39-bus test system [37] .............................................................................................................................. 11 Figure 6: Major North American regional reliability council entities [67] ............................ 12 Figure 7: Map of the UBC campus and possible location of its off-shore wind farm ............ 15 Figure 8: Transmission lines to UBC campus [77] ................................................................. 17 Figure 9: Nexterra Biomass Combined Heat and Power system [78] .................................... 19 Figure 10: Green House Gas (GHG) emission of different alternative resources [79] .......... 20 Figure 11: Histogram of UBC on-shore wind speed in Winter [84] ....................................... 21 Figure 12: Histogram of UBC off shore wind speed [84] ...................................................... 22 Figure 13: Generator and load block of frequency response model ....................................... 23 Figure 14: Load block with load shedding for the frequency response model ....................... 23 Figure 15: Four of the campus buildings at their annual peak demand .................................. 24 Figure 16: Generator block for the frequency response model ............................................... 24 Figure 17: FR model of UBC campus .................................................................................... 25 Figure 18: Results of typical 5 steps Load shedding scheme in UBC campus case ............... 28 Figure 19: Results of 15 steps load shedding scheme on UBC campus case ......................... 29 Figure 20: Load shedding results with and without delays ..................................................... 30 Figure 21: Load shedding WAN structure for the UBC campus ............................................ 32 Figure 22: Intelligent load shedding flowchart ....................................................................... 34 Figure 23: Load shedding arrays ............................................................................................. 35 Figure 24: Maximum power extraction curve ........................................................................ 38 Figure 25: Simplified model of Doubly Fed Induction Generator wind turbine .................... 41 Figure 26: Electrical output power of wind turbine in per unit .............................................. 41 viii Figure 27: IRE controller of DFIG wind turbine .................................................................... 42 Figure 28: Wind turbine contribution to power deficit after adding the inertia-emulating controller ................................................................................................................................. 42 Figure 29: Evolution of wind turbine from 15 year ago [94] ................................................. 44 Figure 30: Optimal extraction torque curve for a typical 2MW wind turbine [96] ................ 44 Figure 31: The complete FR model of wind turbine DFIG with IRE controller .................... 47 Figure 32: Total power flow to UBC microgrid at various wind speed ................................. 48 Figure 33: Power curves for scenario one ............................................................................... 49 Figure 34: Frequency of UBC campus for scenario one ......................................................... 50 Figure 35: Wind turbine rotational speed for scenario one ..................................................... 51 Figure 36: Power curves for scenario two .............................................................................. 52 Figure 37: Frequency of UBC campus for scenario two ........................................................ 52 Figure 38: Power curves for scenario three ............................................................................ 53 Figure 39: Frequency for scenario three ................................................................................. 54 Figure 40: Rotational speed of wind turbine for scenario three.............................................. 55 Figure 41: Frequency level for longer duration of IRE connection ........................................ 56 Figure 42: Frequency level if load shedding delay is 500 ms ................................................. 57 Figure 43: Simulink model of UBC campus........................................................................... 71 Figure 44: Simulink model of traditional load shedding scheme ........................................... 72 Figure 45: Details of simulink model of wind turbine and IRE controller ............................. 77 Figure 46: Details of frequency response model of DFIG wind turbine ................................ 79 ix Acknowledgements I like to take this opportunity and thank the faculty, staff and my fellow students at the University of British Columbia, who have supported me in completing the Master‟s program. Above all, I like to thank my supervisor, Professor Dr. Jose R. Marti, for his guidance and support during the last two years. He has broadened my understanding of the power engineering and beyond to face multi-disciplinary problems. I owe particular thanks to Professor Dr. K.D. Srivastava for his insightful feedback and encouragement of higher-order thinking. I also thank Dr. Juri Jatskevich for offering the Dynamic Modeling of Electric Machines and Control course; I learned a lot from the course and the discussions. Professors Marti, Srivastava and Jatskevich have been my inspirations during my undergraduate and graduate years at UBC. I am very grateful to Dr. Kui Wang for her invaluable suggestions and discussions throughout my research. Other members of Electric Power and Energy System (EPES) lab with whom I had a pleasure of working are: Dr. Tom De Rybel, HyunJung Lee, Dr. Marcelo Tomim, Dr. Jorge Hollman, Dr. Arvind Singh, Mehrdad Chapariha, Hamid Atighechi, Amir Rasuli, Dr. Paul Lusina, Rui Ren, Ruvini Kankanamalage, Mohammed Talat Khouj, Sina Chiniforoosh, Mehmet Sucu, Marco Gonzalez-Rojas, Cesar Lopez, Dr. Hafiz Abdur Rahman, Alexander De Maeseneer and others. I would like to thank them all for the valuable discussions and cherish the great memories. I also appreciate the UBC Utility staff, Richard Hugli and Jeff Giffin, for information about the energy system of the campus. Special thanks are owed to my parents, siblings and best friends for their love and support throughout my years of education. Finally, I appreciate Natural Sciences and Engineering Research Council of Canada (NSERC) for funding the final year of my master‟s program via Alexander Graham Bell Canada Graduate Scholarship (CGS). x Dedication DEDICATED TO MY PARENTS 1 1 Introduction The subject of this thesis is intelligent load shedding for low-voltage microgrids connected to weak transmission lines. A special wind turbine controller was developed to help with the dynamic real power compensation of the system. The load prioritization is determined by a specialized simulator, the Infrastructure Interdependencies Simulator (I2Sim), which was developed by The University of British Columbia [1-2]. 1.1 Microgrids While the electric distribution system is referred to as the „soul‟ of the power grid because it serves the individual consumer, very little attention has been paid to the low voltage system since the early years of the 20 th century [3-4]. These low-voltage systems now face numerous challenges due to past neglect [3]. One of the new developments aimed at addressing these challenges is Distributed Generation (DG), which includes technologies such as wind turbines, solar photovoltaic cells, combined heat and power (CHP), and reciprocating engine generation (GENSET) [5]. The last two have great economic potential which the University of British Columbia (UBC) will soon exploit to deliver waste heat from power generators (Biomass plant) for local consumption. The distribution system (or its sections) to which at least one DG is connected forms a microgrid. While standards for the microgrid such as IEEE and IEC are still under development, many documents have proposed the following definitions of microgrid. One that is referenced by a number of publications is: The Consortium for Electric Reliability Technology Solutions (CERTS) MicroGrid concept assumes an aggregation of loads and microsource operating as a single system providing both power and heat. The point of coupling between the microgrid and the main grid differentiates some of the microgrid definitions [6]; some publications define a microgrid as an intentional island [7], while others characterize it as operating connected to the main grid [8]. This thesis 2 combines the definitions and instead categorizes microgrids according to their interconnection: Type 1 microgrids are normally connected to the main grid at a single or multiple points. In this type of microgrid, the DGs are designed to work in parallel with the main grid and shut down when the microgrid is isolated. With prior studies and arrangements, they can operate under an intentional islanding situation. This microgrid category is currently suggested by a number of interconnection guidelines [9-11]. Type 2 microgrids are normally isolated from the main grid and operate independently. In this case, the local DGs need to meet the peak demand of the microgrid. Type 2 microgrids are present in the non-integrated areas (or remote off-grid communities) [12] of British Columbia such as the Queen Charlotte islands that are only supplied by diesel generation stations. Type 2 microgrids are also used by electrical consumers such as hospitals with backup (or emergency) generators which kick in once a power outage is sensed [7]. Type 3 microgrids can operate in both grid connected and isolated situations and switch between the two modes seamlessly. The development of this microgrid category, which is still an active field of research [13], utilizes communication and sophisticated control strategies to meet its objectives of power reliability and quality. The above-mentioned definition of microgrids cover a large range of applications that can be divided into: institutional, commercial/industrial, community/utility, remote off-grid and military [14]. Among these different applications, institutional microgrids are expected to account for over fifty percent of deployments by 2015, globally [14]. In fact, the microgrid discussed in this thesis is the UBC campus distribution system, which is currently a Type 1 microgrids: With the help of the method proposed in this thesis, the UBC distribution system will be able to operate as a Type 3 microgrid. Every microgrid consists of two key components: a microsource or DG and a static switch which islands the microgrid in less than a cycle after disturbances, such as, faults, power quality or other IEEE 1547 events, and reconnects to the utility autonomously after the removal of the disturbance [15-16]. As the retail (distribution) price of electricity is 2-3 times more than its wholesale value, the power generated by DGs has a higher value compared to that generated by centralized generators due to the DG‟s close proximity to the electrical demand which 3 minimizes the use of transmission and distribution networks [17]. DGs are even more valuable when the main network equipment and infrastructure are operating close to their limits (weak connections). Local DGs can both remove transmission bottlenecks by reducing loads, and lower maintenance and upgrading costs [18]. In order to integrate DGs successfully and achieve the above objectives, the network operator (or autonomous algorithm) has to manage the risks associated with the microgrid power flow. Traditionally, power flow control mechanisms incorporate Preventive and Corrective modes. In the preventive control mode, the line transfer limit is prevented from exceeding a pre-determined security limit which is calculated based on the N-1 criteria [19]. When a contingency occurs and the line power flow limit is violated, the corrective control mode is activated [19]. Although the risk management of power flows represents a classical power system problem, the increasing number of microgrids has exacerbated the problem. For example, if a distributed generator capacity surpasses the ratings of the upstream network, power flows become a risk control problem because following a contingency, the network assets may operate above their firm capacity and fail [20]. Power flow management systems need to consider the capacity and security of the system during Normal, Emergency (after circuit outage) and Island operations. Thus, microgrids are operated in one of the following configurations: 1. “Unit Power Control”; 2. “Feeder Flow Control” and 3. Hybrid [18]. The first scheme, which is ideal for normal conditions, sets DGs to generate certain amounts of power based on factors such as cost and environmental impacts, an example being the UBC Living Laboratory project [21]. The second scheme, Feeder Flow Control, maintains the power flow so that the microgrid appears as a constant load from the utility‟s point of view [18]. Reference [22] suggests monitoring the “thermally vulnerable” feeders in real time and adjusting DGs according to their sensitivity factor. Other researchers [22-23] calculate the real time capacity of the feeders by taking into account the meteorological factors and set the new values of power flow thresholds. The hybrid scheme combines both methods, based on the needs of the system [18]. If the capacity of the upstream equipment is insufficient in the case of a contingency, it is referred to as a weak connection. For microgrids with weak links to the utility, a hybrid 4 mechanism is recommended, as it applies the Unit Power Control under normal conditions. To deal with emergencies, i.e., when the supply lines operate at or above their transmission limits, this thesis proposes utilizing a Feeder Flow Control algorithm that combines on-line load shedding with a wind turbine supplementary controller. 1.2 Wind Turbine Controller Traditional power controllers of wind turbines are designed to simply optimize the “machine function” by assuring constant-rated power and maximum possible power at full and partial loads, respectively [24-26]. In full load conditions, i.e., when wind speed is higher than nominal, the pitch angle of the wind turbine blades is reduced below its nominal value to transfer less mechanical energy from the wind to the shaft, maintaining the rotational speed at the nominal value [25, 27]. At partial loads or wind speeds below the nominal value, pitch angle is kept at the optimal value and variable speed wind turbines are forced to work at the maximum power coefficient to capture the maximum energy from the wind [25, 27]. For better integration of wind turbines into the electric grid, wind power plants may be required to participate in the operation of the grid by adopting more sophisticated power control mechanisms that consider system level objectives [24-25]. For example, the grid codes adopted by some European countries specify the possible contribution of wind farms to maintaining the stability of their systems [27-30]. In the literature, it is proposed that power control systems for wind turbines are made dispatchable by adjusting their generation to reference setpoints from a central control. The two dominant strategies vary the pitch angle or power extraction curve between their optimum and pre-specified deloaded values to inject additional power as needed [25, 27]. Reference [26] combines both approaches to increase power control flexibility. 5 (a) (b) Figure 1: Extracted power coefficient curve versus tip speed ratio [27] (1a) Extracted power curve versus rotational speed [26] (1b) In the first approach, the blade pitch angles are turned toward the wind to reduce the turbine speed and capture less energy from the wind. The second approach stores kinetic energy by adjusting the converter control to increase wind turbine rotational speed (or tip speed ratio) beyond the optimal value. Given the physical values of air density (ρair), the area of the wind turbine (A), and the wind speed (Vwind), the maximum mechanical power obtained from wind ( ) depends on the optimal extracted power coefficient (Copt). Figure 1a illustrates the relation between the Copt coefficient and the tip speed ratio (λ = ), which depends on the rotational speed (ω), the radius (R) and the wind speed (V). Thus, by increasing the speed beyond its optimal value, Copt decreases to deload the wind turbine (new deloaded power curve) accordingly, and reserve power for dispatch (Figure 1b). However, all of these methods require the wind turbine to operate at a deloaded or de- optimized point, to allow the system operator to dispatch more power from the wind power plant; a higher power reserve means that the wind turbine has to operate less efficiently. Thus, these methods are uneconomic for occasional short-term power regulation. References [27, 31-34] have implemented wind turbine control systems that create an artificial inertial response for converter-based wind turbines by locally sensing frequency deviation, and injecting additional power from the kinetic energy stored in the WT rotating Maximum Mechanical Power Pre-defined de- loaded optimal power curve 13m/s 12m/s 11m/s 10m/s 9m/s 8m/s 7m/s Rotor speed referred to generator side (p.u.) M ec h an ic al P o w er ( M W ) 20% de- loaded ↔ 6 mass into the grid. With minor adjustments, this kinetic-energy-based controller is suitable for our purposes as it responds within milliseconds and allows the wind turbine to operate efficiently at all times. 1.3 Load Shedding Scheme The primary responsibility of electric grids (both large interconnected systems and microgrids) is to match demand and generation with the help of primary, secondary and tertiary controllers. Figure 2 shows the three levels of control that ensure active power demand is met, by adjusting the Pwanted (or power set-points) within the maximum available generation. After a sudden loss of generation units (or tie lines), and assuming these control mechanisms fail or their reserves are insufficient, load shedding is vital to secure the operation of the system. Figure 2: Frequency regulation framework [35] In a synchronous generator, electrical and mechanical torques try to accelerate the rotor in the opposite directions, because mechanical torque is generated from the source (e.g., water or steam) while electrical torque is the result of the load (system demand). Scheduled Power P C Reserve S C Reserve T C Reserve 7 The Swing Equation is , where Tm and Te represent mechanical and electrical torque, respectively, J is the total moment of inertia, and ω is the angular speed. The Swing equation illustrates that, in the event of a significant drop in generation or excess demand, the rotational speed of the turbine-generator, along with the main frequency, will decrease accordingly. While under-frequency relays and load shedding scheme were anticipated over sixty years ago [36], it was only after the 1965 Northeast blackout that the North American Electric Reliability Council (NERC) recommended employing under frequency load shedding [37]. Under frequency degrades all components of a power system, particularly generators and turbines [36]. Table 1 shows typical under frequency protection settings for turbine- generator units [38]. In addition to equipment damage, under frequency reduces the performance of power plant auxiliaries (motor driven) and therefore generation output [36]. Thus, loss of generation (or excess demand) may lead to a cascading loss of generating units due to excess frequency drop. Table 1: WECC under frequency minimum requirements [38] Under-frequency Limit Minimum Time > 59.4 Hz N/A Continuous Op. <=59.4 Hz 3 minutes <=58.4 Hz 30 seconds <= 57.8 Hz 7.5 seconds <=57.3 Hz 45 cycles <=57 Hz Instantaneous trip When the system splits into islands due to excess demand, load shedding becomes “the only possible protection” against cascading outages [39]. NERC specifies the purpose of the automatic under frequency load shedding as follows [40]: [To] stabilize the system frequency in an area during an event leading to declining frequency while recognizing the generation characteristics in each area. The goal of the program is to arrest the system frequency 8 decline and to return the frequency [to a desirable level within an acceptable time frame]. 1.3.1 Architecture The IEEE standard for abnormal frequency load shedding and restoration (Std C37.117-2007) divides load shedding methods into four categories: Manual/SCADA, Automatic, Local and Wide Area. Manual load shedding is initiated by a system operator to prevent any further decline in frequency or to restore it to normal. For example, BC Hydro Corporation allows its transmission coordinators to manually shed up to 50% of the area load within five minutes [41]. Figure 3: Vancouver Island (VI) Area Emergency Manual Load Shedding (EMLS) display [41] However, manual load shedding (MLS) “is not generally relied on to arrest system frequency decline” due to its slow response [37]. MLS is just a supplement to an Automatic load Shedding program, which uses frequency sensing relays to detect an emergency under Non Emergency Load Blocks Non-EMLS EMLS Real Time System Information, e.g.: Total Demand, Voltage and Frequency Load or Substation ID M an u al ( an d a u to m at ic ) L S S w it ch S ta tu s 9 frequency condition and disconnect radially supplied loads within one second. These two methods are widely used by power utility companies around the world [38, 42-43]. The third method is Local load shedding which performs frequency measurements and load curtailment at the substation level. This method is further divided into two subcategories: centralized and distributed local load shedding [37]. The Centralized scheme uses one frequency relay for an entire substation; moreover, based on the frequency deviation and supervisory logic, it may employ a new schedule to shed busses [37]. The Distributed scheme, on the other hand, does not rely on a single relay at the substation level to detect under frequency; instead, each interrupting unit has its own under frequency sensor (see Figure 4). In order to reduce installation costs, communication delays and reliability risks, the communication means between frequency measuring relays and breakers are eliminated [37]. However, the distributed load shedding scheme requires the control centre to be connected to all distributed load shedding devices for coordination, restoration or simply information gathering purposes [37]. Figure 4: Centralized versus distributed under frequency load shedding [44] The Wide Area Under Frequency load shedding scheme closes the gap between the centralized and distributed methods, by using frequency sensing breakers to shed whole sections of feeders or individual customers, and by allowing communication between relays and substations, as well as between substations and control centres. The main advantage of 10 Wide Area over Local load shedding methods is that Wide Area load shedding is not limited to the substation, bus or circuit level, but can be applied to the whole microgrid. In the islanding situation, where even a small power mismatch can affect the system significantly, a more precise technique is required. Because breakers are placed closer to the load (smaller load shedding blocks) and the under frequency situation can be detected at one location (no needs for calibration), the Wide Area method is better. 1.3.2 Detection There are three load shedding (overload) detection methods: under frequency, under voltage and power deficit. The simplest, yet most robust, frequency detection method is the “fixed frequency” [37, 45-47], in which the relay operates when the frequency falls below certain thresholds. Another frequency-based detection technique is based on the rate of change of frequency, which is used in adaptive load shedding. Anderson [48-50] uses the initial frequency gradient to determine the incremental load shed at each frequency threshold. In one area of Ontario, if the rate of frequency decline exceeds pre-specified values, additional blocks of load are rejected [51-52]. Although adaptive load shedding techniques claim that the frequency gradient is a better indication of the size of the power disturbance based on the Swing equation, they can potentially be very inaccurate due to the oscillatory nature of turbines during speed changes [37, 53]. Figure 5 illustrates the change in the derivative of frequency at bus 4 and 39 of the New England 39 bus system when it separates into three islands. 11 Figure 5: Oscillations of frequency gradients for bus 4 and 39 of New England 39-bus test system [37] 4 4 12 Because the instantaneous rate of frequency decline is “highly irregular” and “non- linear” during a disturbance [37], some recommended using the average frequency gradient instead; however, this approach requires hundreds of milliseconds to complete, which is unacceptable in many systems [37]. Both static and adaptive load-shedding schemes depend on many system parameters, such that some of the literature suggests using artificial intelligence to select the load shedding parameters [54-57]. Due to the numerous disadvantages of adaptive methods, including those discussed earlier, none of the North American regions (Figure 6) use rate of frequency decline; rather, they use static under frequency load shedding which has been developed based on their experience and frequent simulations [37-38, 58-66]. Figure 6: Major North American regional reliability council entities [67] The second detection technique is voltage-based load shedding which is much slower than under frequency load shedding. The under voltage condition must continue for several 13 seconds to minutes before under voltage load shedding takes place, in order to differentiate it from a voltage dip during a fault or load energization [68]. Advances in communication and computer technologies have led to the development of a third detection method which is accurate, fast and reliable [69]. Computer network based load shedding collects real time data about the system, including demand/generation and breaker status [68-75]. Once a power deficit is detected, the load shedding controller disconnects the pre-selected load blocks [72, 74] or individual loads, based on their availability and priority [70]. The adopted load shedding strategy in this thesis is a combination of Wide Area architecture and network based detection. 1.4 Load Prioritization Once the architecture and detection methods are selected to develop the load shedding algorithm, the next step is to decide which load blocks to drop first. Prioritizing load blocks is an old concept, probably as old as the load shedding technique itself. According to a survey conducted by IEEE committee in 1968, about 86% of the participating utilities dropped low priority loads during their load shedding process [76]. The same survey also showed that different departments were involved in determining the load priorities such as planning engineers (46%), sales (4%), management (12%), and other groups including operators (38%) [76]. Even a small group of utilities allowed rotating the customers for load shedding purposes [76]. However, all of the priority and rotation schedules were predetermined, and the actual demand was assumed constant. For example, during the 2010 Vancouver Olympic Games, the British Columbia Transmission Corporation temporarily removed all the Olympic venues and the related facilities from the load shedding schedules. Changing the priority level of the corresponding feeders was performed offline and long before the games. While the state-of-the-art load shedding algorithm allows the operators to choose the priority of loads on the fly via Human Machine Interface (HMI), an external program with higher level objectives − such as economical and social well being − should dictate the priorities by assigning a number to each load shedding block. In this concept, the load shedding program downloads the load priority schedule from a peripheral program, such as 14 the Infrastructure Interdependencies Simulator (I2Sim) [1], which optimizes decisions based on the objective of the overall system and its hidden interdependencies. 1.5 Research Objective The objective of this thesis is to remove the transmission bottleneck of microgrids such as the UBC distribution system by adopting an intelligent load shedding mechanism. The proposed method disconnects the precise amount of load very quickly when the utility line reaches its full capacity; moreover, during the islanding condition, the proposed controller will facilitate load shedding. This algorithm, in fact, ensures that during an emergency, the microgrid remains connected longer and, after islanding, reconnects to the grid faster. In addition to the intelligent load shedding method, a frequency response model of the UBC campus microgrid (individual loads, biomass generator and wind turbine controller) will be built in a MATLAB/SIMULINK environment. The simulations demonstrate the ability of the method to achieve the stated objectives well, while conventional methods fall short. This thesis is organized as follows: Chapter 1 gives a comprehensive literature review pertaining to the topic and the research objectives. Chapter 2 gives a detailed description of the proposed Intelligent Load Shedding method and the UBC microgrid frequency response model. Some preliminary results and considerations − bearing on both the proposed method and the conventional ones are also discussed. In Chapter 3, a number of scenarios for the UBC campus are simulated, and the results analyzed. Chapter 4 includes conclusions, along with recommendations for future research. 15 2 Intelligent Load Shedding Due to increasing demand for electricity, power companies need to continuously upgrade their infrastructure which often involves many years of engineering design, planning and analysis, social, economical and political negotiations, and, finally, construction. This is especially difficult in congested areas, such as Vancouver. As a result, there are numbers of bottlenecks in the electrical grid including the supply lines to UBC campus. Intelligent load shedding is a state-of-the-art method to continuously monitor the microgrid for power deficit, using real-time system-wide data acquisition, thus creating the optimal load shedding solution to preserve the system [72]. 2.1 UBC Campus Microgrid The University of British Columbia campus, which is more than 400 hectares in size, is located on the West side of Vancouver city and is bordered by the Salish Sea along the North and West shores (refer to Figure 7). The university owns and operates its electrical distribution system which supplies all campus loads, from educational and research buildings to hospitals and residences. With over 47,000 graduate and undergraduate students, the university has over 67 classroom buildings. Figure 7: Map of the UBC campus and possible location of its off-shore wind farm X The University of British Columbia Proposed location of wind farm 16 Since BC Hydro (the provincially owned power utility) bills the UBC campus, BC Hydro meters located at UBC substations ─ UNY and UNS substations ─ record the total demand of the campus on an hour-by-hour basis. These records have shown that UBC has a winter peak of over 40 MW in early November every year and that the peak demand has been increasing rapidly in recent years. Based on UBC‟s 20-year Campus Development Plan and the estimated electrical consumption of the projected loads, the peak demand is expected to increase from 44 MW in 2010 to 65 MW in 2030 [77]. At this target year, UBC will have about 33 MW of high priority loads such as sensitive research labs, museums, service buildings and sport centers, for which electrical demand must be met at all times. To achieve uninterruptable supply of high priority loads, these loads are connected to backup diesel generators with automatic switches for emergencies. The campus currently has 34 backup generators with a total capacity of 10.867 MVA (Table 2). This arrangement will not be sufficient in the future. Table 2: UBC backup generators for high priority loads Building name Electrical capacity KVA Building name Electrical capacity KVA Fairview Crescent Housing 10 IKE Barber 230 BRIMACOMBE 50 Life Sciences Centre 2250 Lower Mall Research Station 75 Woodward Library 60 Henry Angus 125 Cummins Onan 47 Aquatic Center 30 Vanier Pump Stantion 25 Asian Centre 10 Thunderbird Parkade 60 Biological Science West 1600 Museum of Anthropology 45 Michael Smith 150 Poultry Sciences 33 Brock Hall Student Services 150 Kenny Douglas 200 Buchanan ‘D’ 55 Wesbrook Animal Faculty 10 CICSR and ICICS 350 Winter Sports Center 350 David Strangway 250 Gage B (North Tower) 16 Scarfe 220 Gage C (East Tower) 16 Chem Biological Eng. 350 Gage E 25 Forest Sciences Center 400 New Pharmacy 2000 Green Collage 150 New EOB 1000 Chemistry A & B 350 CIRS 25 Koerner Library 150 Total KW 10867 17 BC Hydro‟s supply to the UBC campus is provided from the Sperling substation, via two North and South transmission lines with thermal capacities of 62 and 42 MVA, respectively (Figure 8). Since sections of both lines run through forests, they have failed in the past due to fallen trees during storms [77]. If the North feed fails during peak demand, the other transmission line will overload and possibly fail. This will be an even bigger problem in the future, when the peak demand increases to 65 MW and a single line won't be able to supply the whole campus. Figure 8: Transmission lines to UBC campus [77] 18 In addition to the transmission lines, the supplying substation is nearing its capacity, and by 2030, the campus may face multiple outages each year due to overload. To deal with this situation, UBC is looking into new sources of electricity to meet some of its demands; for example, some of the high priority loads already have backup generators, and a new Nexterra Biomass generator will be commissioned next year to provide 1.6 MW of electricity. Considering the load projection for 2030, the UBC campus will need enough distributed generators to be able to operate in both grid connected and islanding modes. The local generation should match the amount with which transmission lines are overloaded in grid connection mode, and meet high priority loads in islanding mode. For the grid connection mode, all loads, high and low priority, must remain connected with backup diesel generators not connected. This results in an extra needed generation of: 65 – 40 (transmission capacity @ PF = 95%) = 25 MW In the islanding mode, the low priority loads get disconnected and the backup diesel generators are connected immediately. This represents an additional requirement of generation of: 33 (high priority load) - 10 (backup) = 23 MW Taking the larger of the two requirements, the campus will need an additional 25 MW of electricity. In addition to the risk of overload failure, the N-1 criterion does not allow the system to run under these circumstances unless additional criteria or requirements are set. This chapter talks about different strategies to avoid power outages on campus, while the N-1 criterion, or equivalent, is met. Because of the rapidly expanding load requirements of the Vancouver area, the adoption of these load shedding strategies will provide BC Hydro with additional time to upgrade campus feeding infrastructures. UBC Climate Action Plan requires the campus to reduce its Green House Gas (GHG) emission to 33% below 2007 level by 2015, to 67% by 2020, and to 100% by 2050. As part of this plan, the university is supplementing its existing natural-gas heaters with a biomass combined heat and power (CHP) plant by Nexterra which also generates 1.6 MW of 19 electricity for campus usage. Nexterra is installing a CHP plant which first generates syngas via a biomass gasification process, and then combusts this gas in a GE Jenbacher engine to generate heat and electricity. The province of British Columbia produces 30 million tones of biomass feedstock from its large agricultural and forestry industries every year, which can be transported to the UBC campus to provide biomass for the Nexterra plant. Although this is a good option for heating systems, additional CHP or biomass power plants may not be built on campus, due to limited local wood waste resources. The rather long traveling distance for the biomass can limit the utilization of this resource. With 1.6 MW biomass generation, the campus still needs other renewable energy resources to supply the expected deficit of about 25 MW by the year 2030. Figure 9: Nexterra Biomass Combined Heat and Power system [78] The main grid electricity provider to the UBC campus, BC Hydro, produces about 90% of its electricity through hydroelectric means. The remaining 10% of electrical generation is from natural gas. On the other hand, wind power, with almost zero GHG emissions, is one of the cleanest energy resources after hydro and wave energy (Figure 10). With UBC‟s restrictions on GHG emissions, wind is a good candidate as a source of electricity. Actually without it, UBC may not achieve its climate action plans of zero GHG emissions in the future. 20 Figure 10: Green House Gas (GHG) emission of different alternative resources [79] With an annual growth rate of 34% in the past five years, wind power is the fastest growing energy resource in the world [80]. In particular, the Doubly-Fed Induction Generator is one of the fastest growing types of wind power technologies [81]. This thesis focuses on this type of distributed generator. Although economical feasibility is not the focus of this thesis, it is worth mentioning that the government of Alberta has evaluated the economical suitability of wind power based on average wind speed, as shown in Table 3. Table 3: Economical suitability of wind power based on wind speed [82] Average Wind Speed Suitability Up to 4 m/s Not good 5 m/s Poor 6 m/s Moderate 7 m/s Good 8 m/s Excellent Thus, if the annual mean wind speed at or near UBC is above 5 m/s, wind power is also an economically suitable option [82]. On the shores of the campus, the average wind speed at 50 m above ground is 5.39 m/s. The wind histogram during the winter season is shown in Figure 11. Based on current technologies and electricity rates, the exploitation of wind power on campus is moderately economical; this will be more profitable as low wind speed turbine technologies with a nominal speed of 6 m/s progress [83]. 21 Figure 11: Histogram of UBC on-shore wind speed in Winter [84] Offshore of UBC, the average wind speed at 80 m above the Salish sea floor is 7.6 m/s as shown in Table 4. Figure 12 shows the corresponding histogram [84]. Table 4: Off shore wind speed [84] Period Mean Wind Speed Annual 7.60 m/s Winter 8.23 m/s Spring 7.20 m/s Summer 7.78 m/s Fall 7.34 m/s Wind Speed A v ai la b il it y 22 Figure 12: Histogram of UBC off shore wind speed [84] Thus, with an annual mean wind speed between 5.4-7.6 m/s, wind power is an economical and sustainable option for the UBC campus. 2.1.1 Frequency Response Model The Frequency Response (FR) model of an isolated power system, which estimates the dynamic frequency behavior of the network, can be used to test speed control mechanisms for the entire system wehn it responds to load variations [49]. The dynamic uniform frequency concept has been studied for more than 50 years and is utilized in system area control simulators [49]. It is important to emphasize that this model does not represent the exact frequency behavior of the system at a particular location, but it can be used to closely estimate the weighted average frequency of a clustered electrical subsystem (island) [49]. Figure 13 shows a block diagram for a generator and load, which takes in the real power difference in per unit (generation is positive) and outputs the change in average frequency. The generator and load FR model is a combination of the Swing equation and the Speed-Load Characteristic and it can be approximated as [85]: , where Wind Speed A v ai la b il it y 23 frequency sensitive load change non frequency sensitive load change For loads that are sensitive to frequency variations, the value of D is non-unity (above or below one). Figure 13: Generator and load block of frequency response model Traditionally the dominant parameter in frequency models is the equivalent constant of inertia (Heq), which determines how fast the frequency changes in the system when mismatches between generated and demanded real power occur. The equivalent constant of inertia of the biomass generator on campus is 1 s which is much smaller than Heq of large power systems (3-5s) [49]. The damping factor, D, which is usually close to 1 for typical loads, captures the frequency dependence of load. The load‟s real power is usually represented by a number that captures the demand at that instant while the load variations due to frequency (motor loads for example) are captured by the D constant. However, when we later add the load shedding algorithm, the frequency model of the load will change, as shown in Figure 14. Figure 14: Load block with load shedding for the frequency response model The load shedding block consists of load shedding logic and loads. On the model, each of the UBC campus loads is represented by its maximum demand and a switch. The demand of each block could vary, but because of the short simulation period, the value is 24 assumed constant. When the load shedding algorithm decides to drop some of the load blocks, it sends a signal to the breaker of the corresponding block, as in Figure 15. Figure 15: Four of the campus buildings at their annual peak demand Figure 16 illustrates a typical generator model, which consists of transfer functions that incorporate the governor and turbine time constants; the input of the model is the change in frequency while the output is the change in generated power. For the UBC campus case, this model is used to model the Nexterra biomass plant but without the governor, because the plant is assumed to generate at full capacity during all normal times, except during islanding conditions. Figure 16: Generator block for the frequency response model The parameters of the model in Figure 16 are: R = 0.05: speed droop constant Ƭgov: governor time constant Ƭt: turbine time constant PREF: power reference set up AGC 25 Figure 17: FR model of UBC campus So far, this chapter has presented the frequency response model for the campus load, the biomass power plant, and the connection of the load shedding controller. The next sections will explain the details of the load shedding algorithm, and the frequency response model for the wind turbine controller. 2.2 Load Shedding Method One of the two transmission lines connecting the UBC microgrid to BC Hydro‟s grid will not be enough to carry the entire campus load by itself in the near future (the other line is needed to comply with the N-1 criteria). Although new distributed generation on campus will help offset the difference, the campus microgrid demand may exceed under certain circumstances BC Hydro‟s supply capacity and eventually isolate the campus microgrid. A load shedding algorithm is required to deal with the power deficit issue. 26 2.2.1 Conventional Load Shedding The load shedding protection plan for automatic under frequency load shedding recommended by electric regulatory councils, and used widely by power utility companies, is summarized in Table 5. In this strategy, every relay/breaker is programmed based on a schedule. Every load shedding table with fixed frequency technique consists of three columns: frequency threshold, load shedding block size and delay. When the supply frequency drops to one of the frequency set points, the relay timer starts counting for as long as the frequency remains below the threshold. When the time counter reaches the pre- specified time delay, the corresponding amount of load is shed. Table 5: Load shedding plan template Stop frequency drop Return frequency to normal Step Frequency set points Load blocks (%) Time delays Additional load blocks Time delays 1 F1 ΔL1 Δt1 ΔL1‟ Δt1‟ 2 F2 ΔL2 Δt2 ΔL2‟ Δt2‟ 3 F3 ΔL3 Δt3 ΔL3‟ Δt3‟ 4 F4 ΔL4 Δt4 ΔL4‟ Δt4‟ 5 F5 ΔL5 Δt5 ΔL5‟ Δt5‟ Load shedding schedules usually have 3-5 steps with frequency difference of 0.2-0.5 Hz [41]. Once the maximum probable overload and the number of frequency levels are determined, the size of the load shedding steps is calculated by dividing these two quantities. Although some load shedding plans use unequal steps by shedding larger load blocks at the beginning and reducing the step size at lower frequency set points, both plans accomplish similar results [46]. Similarly, the delay steps are equal. ΔL1= ΔL2= ΔL3= ΔL4= ΔL5 Δt1= Δt2= Δt3= Δt4= Δt5 If, after a load shedding that corresponds to a specific level, the frequency remains below the set point, some utilities shed additional loads automatically (Table 5). In many 27 cases, the first time delay is instantaneous to stop the frequency decay without any intentional time delay, while the subsequent time delays are larger [48]. For the particular system (the UBC campus) studied in this thesis, the number of variables can be reduced to only those parameters that will offset load shedding, while the parameters related to machine dynamics, for example, inertia, governor and excitation, are fixed. Table 6: Common load shedding table Frequency Set point Load shedding Block 59.3 Hz 16% 59.0 Hz 16% 58.7 Hz 16% 58.4 Hz 16% 58.1 Hz 16% Table 6 illustrates a common load shedding schedule in North America [37] which will be used for the UBC study. The initial pickup frequency is 59.3 Hz based on the mains frequency remaining between 59.4 Hz and 60.6 Hz about 95% of the time [86]. The difference between frequency set points is 0.3 Hz. In order to calculate load shedding blocks, the maximum possible overload must be calculated for the UBC system. The worst, but yet possible, scenario is when the BC Hydro supply lines are disconnected, the wind turbine generates zero MW, and the campus demand is at its maximum: In fact, for an isolated system, it is recommended to include 80% of the total load for the load shedding scheme. Once the maximum power deficit is decided, the load shedding steps are calculated as: Testing the load shedding scheme of Table 6 in the UBC campus case with varying disturbance levels from 5%-85% illustrates the need for more steps and smaller load 28 shedding blocks to avoid over frequency (excess load shedding) situations. It is important to note that in this scheme the frequency remains above 57 Hz. The M-file and the Simulink model of the conventional load shedding scheme for the UBC campus are illustrated in the appendix A.1. Figure 18: Results of typical 5 steps Load shedding scheme in UBC campus case Small inertia and lack of sufficient reserves can cause the frequency to drop significantly, such that even one percent mismatch between generation and load can change the frequency by about 1 Hz. It is, therefore, important in this case to reduce the load shedding stages for a better match with overload. Increasing the number of load shedding steps by a factor of three reduces the frequency window from 57-66 Hz (Figure 18) to 57- 61.5 Hz (Figure 19). In the new load shedding schedule, the frequency and load shedding steps are reduced to 0.1 Hz and 5.3%. The results of the new schedule for the UBC case are demonstrated in Figure 19. It illustrates the UBC average frequency (left subplot) during and after load shedding (right plot) for different amounts of disturbance (5%-85%); the number next to each curve shows the initial overload in per unit. 0 1 2 3 4 57 58 59 60 61 62 63 64 65 66 0.05 0.15 0.25 0.35 0.45 0.55 0.65 0.75 0.85 Time (s) F re q u e n c y ( H z ) UBC System Frequency 0 0.1 0.2 0.3 0.4 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.05 0.15 0.25 0.35 0.45 0.55 0.65 0.750.85 Time (s) L o a d s h e d d in g ( P .U .) Traditional Loadshedding 29 Figure 19: Results of 15 steps load shedding scheme on UBC campus case The issues of fixed load prioritization and varying demand of the load shedding blocks in the traditional load shedding scheme can be solved by changing the set points of each under-frequency relay. Each relay sends the demand measurement information to the central hub which also receives information about the prioritization level of each load from an external program or operator. Then, the control centre groups the loads with similar priority level into load shedding blocks of the size that is specified in the schedule. Higher frequency set points will be sent to load shedding blocks with lower priority, in order to make sure high priority loads disconnect last. Just to further emphasize the importance of real time demand data acquisition, it is worth mentioning that the Italian blackout of 2003 was the result of a mismatch between available and scheduled load shedding blocks [75]. Although frequent updates regarding the actual demands of load shedding blocks improve the method significantly due to the nature of the method, the relay set points have to be communicated before the disturbance. The operator (or the automated program) must change these remote settings quickly and carefully, because the relays can become deactivated during this time. For example, the 1977 New York blackout was partially the result of disabled load shedding blocks [75]. 0 5 10 57 57.5 58 58.5 59 59.5 60 60.5 61 61.5 62 0.05 0.1 0.15 0.2 0.25 0.3 0.35 0.4 0.45 0.5 0.55 0.6 0.65 0.7 0.75 0.8 0.85 Time (s) F re q u e n c y ( H z ) UBC System Frequency 0 0.5 1 1.5 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.05 0.1 0.15 0.2 0.25 0.3 0.35 0.40.45 0.5 0.55 0.6 0.65 0.7 0.75 0.80.85 Time (s) L o a d s h e d d in g ( P .U .) 15 Steps Loadshedding 30 Figure 20: Load shedding results with and without delays Another major concern with this methodology is the influence of the load shedding delay, which determines the amount of frequency overshoot above the required set point [13]. Microprocessor based relays have a total delay (breaker and relay) of 3 cycles [7]. This delay was applied to the previous load shedding scenario with the results shown in Figure 20. In our case study, with a steady state over frequency of 63 Hz after a 5% disturbance, the traditional load shedding scheme failed. The reason is that the small inertia constant of the UBC microgrid causes a significant frequency drop during the operation delay, the frequency passes through multiple frequency thresholds thus misleading the relays to shed more load blocks than required. On the other hand, for larger disturbances, the frequency might fall below 57 Hz and trip DGs before load shedding completes. The 1996 WSCC blackout was the result of load curtailment delays that tripped many generators during the load shedding and worsened the power deficit [75]. Once the UBC microgrid islands and loses the frequency support of the inertial power from on the supply lines, its frequency changes drastically and the conventional automatic under frequency load shedding schemes are not accurate and fast enough to deal with this. Furthermore, in this traditional method, remotely setting the load shedding schedules to project the real time status of the system is risky and may cause more damage. The next section in this thesis introduces a new wide area load shedding algorithm that is more suitable for the UBC campus system both in islanded and interconnected situations. 0 2 4 6 8 10 59 60 61 62 63 64 Time (s) F re q u e n c y ( H z ) total delay of 3 cycles zero delay 31 2.3 Wide Area Network Load Shedding Proposed for UBC System As discussed in the previous section, the conventional method of automatic under frequency load shedding may fail for small micro grids such as the UBC distribution network. To prevent a complete blackout of the microgrid, a fast acting and accurate load shedding scheme is required to detect the system disturbances that result in supply lines operating above their capacity and to isolate the microgrid from the main grid. The scheme presented in [74] detects the overload or trip of the supply lines, calculates the generation deficit, based on the amount of power inflow from utility and locally available power generation (reserves), and signals pre-specified interlocked load breakers to open. Although this method is quite fast, it has many disadvantages such as: hard to change the priority of loads, no knowledge of actual demand of each feeder, shedding more loads than necessary and often shutting down the entire microgrid due to demand and generation mismatch [72]. To overcome the above mentioned problems, the load shedding algorithm needs to deploy a communications network (WAN or LAN) as the backbone to convey monitoring and control data. The difference between Wide Area Networks (WAN) and Local Area Networks (LAN) platforms is their coverage. In protection particularly load shedding architectures, the LAN based system only covers inside substations, while the WAN goes beyond [37]. In the case of the UBC campus, the university owns and operates its two substations and the downstream distribution system and a WAN can cover the entire campus microgrid (Figure 21). The most common physical layer chosen for area network based systems is Ethernet, because of its predominance in the market and its low-cost implementation [87-89]. 32 Figure 21: Load shedding WAN structure for the UBC campus One critical piece of information for an accurate load shedding scheme is the actual demand of each load block which can be communicated through an Intelligent Electronic Device (IED). All IEDs are grouped based on their geographical location or circuit number, and each group reports to a Data Interface Unit (DIU) which is a gateway to send the demand information to the Load Shedding Manager (LSM) and to transmit commands back from LSM to circuit breakers of load blocks [69]. In a similar fashion, IEDs collect the metered data from local DGs and utility supply lines and send it to the LSM. Based on these measurements, the LSM detects that the utility lines are overloaded and decides how much load shedding is required. The interruption of a 33 utility breaker is an immediate trigger of load shedding. Its status is reported to the LSM and to the wind turbine controller via hardwired Digital Interface Board (DIB) [69]. When both supply lines to the UBC campus are connected (Figure 21), they will be able to meet the peak demand of the campus without going over their capacity. As soon as one of the lines disconnects (emergency condition), the LSM calculates how much the remaining line is overloaded by subtracting its capacity from the total power delivered to the campus ( ). Similarly, when both lines trip out and island the microgrid, the LSM will shed load based on the amount of power that was delivered before the disturbance ( ). : Power delivered through the utility transmission lines : Power capacity of the line that remains connected : Power demand of each load block Although in the transition from a normal condition to and emergency situation or islanding, the LSM does not require information about the local generation and demand to calculate the amount of load shedding, this information is important during islanding operations: PWT, PBM: Wind and biomass generated power PL: Total load demand m: Load meter number PLm: Demand of each load block 34 Figure 22: Intelligent load shedding flowchart Figure 22 illustrates the load shedding mechanism for three different scenarios of overloaded supply system, islanding transition and overloaded island; in all three cases, load blocks are shed in the order of their priority level and size, to equate or exceed the specified amount. To make sure that all low priority loads are disconnected before shedding high priority ones, they are separated and placed in different arrays (Figure 23). Each array, to which a priority number is associated, is organized from large load blocks to smaller ones; shedding larger loads first increases the speed and reduces the number of curtailed loads. Once a load block is shed, its values (load size, priority level and ID) will be moved to a different matrix, Curtailed Loads, which will keep track of shed loads as a reference for future restoration purposes. It is important to emphasize that the priority level of loads can change any time and the load shedding algorithm needs to be adjusted accordingly. For example, if the priority of 35 a load increases after it is disconnected, the load will be restored and the load shedding manager will drop a load with a similar size but lower priority level, instead. Figure 23: Load shedding arrays The scheme proposed in this thesis ensures an accurate amount of load shedding in the event of a power deficit; however, the other important factor in optimal load shedding is the time delay from the occurrence of the disturbance until the completion of the load shedding. Due to the simplicity of this algorithm, having a reasonably fast computer system, Load Shedding Manager can complete its task very quickly. However, the command and data packets may suffer several types of delays while traveling through the network. The most important delays include [90]: 1. Processing delay (negligible) is the results of testing the header of a packet and deciding where to send it. This is on the order of microseconds or less. 2. Queuing delay ( ) is the result of packets waiting to get transmitted onto the link; it depends on the number of packets that are already inside the queue. The queuing delay may take from zero to a few milliseconds. 36 3. Transmission delay ( ) is the time it takes to push all bits of a packet into the link. The transmission delay is practically on the order of the micro- to milliseconds and is calculated dividing the length of a packet (L) by the transmission rate (R) of the link ( ). 4. Propagation delay ( ), which depends on the length (d) and propagation speed (s) of the link ( ). The propagation speed of Ethernet cables (coaxial cable, twisted pair and optical fiber) is close to speed of light. The total communication delay is the sum of all the above delays. A number of studies have estimated the delay of WANs in a power system. Table 7 compares the WAN delays of different communication links in worst case scenarios. Reference [91] investigated a number of different WAN areas in most Chinese provincial power utilities and concluded a maximum communication delay of 100 ms. Table 7: Delay of various communication links [92] Communication Links Associate delay (one way ) Ethernet cables ≈ 100-150 ms Digital microwave links ≈ 100-150 Power line (PLC) ≈ 150-350 Telephone lines ≈ 200-300 Satellite link ≈ 500-700 Communication delays in WANs depend on many parameters such as the propagation and transmission speeds, the data packets size and length, and the type of the communications link (which may be unknown). Furthermore, there are some random delays associated with lost packets (or jitter) [92]. References [69, 72-73, 87] presume a communication delay of 100-200 ms for WAN load shedding studies. This thesis assumes a delay of 200 ms for a worst-case scenario. WAN-based load shedding accurately calculates the power deficit but it may not be fast enough, especially after the microgrid becomes islanded. The next Section in this thesis introduces a supplementary controller for wind turbines to help microgrids that have little inertia support (e.g. in the case of UBC campus). In order to test the impact of the controller 37 on the microgrid, a frequency response model of wind turbine is implemented and described in the next section. 2.4 Wind Turbine Controller The University of British Columbia will be installing new sources of generation on campus to solve the problem of having a weak supply line. However, due to environmental commitments, its future sources of energy will be renewable. There are differences that need to be considered between these sources and conventional power plants. In a conventional generation plant, a change in the demand (electrical power) accelerates the turbine until mechanical and electrical power match; furthermore, governor and AGC are used to increase mechanical power by increasing water or steam. However, in the case of renewable energy resources, such as wind, the moving fluid (source of mechanical power) cannot be adjusted. Another issue with distributed generators, particularly the renewable type, is their small (or lack of) moment of inertia. In conventional generation, the inertia constant slows down the frequency drop and gives more time to the operators and protective devices to stop the frequency decline. Lacking this inertia in alternative generation sources (e.g. solar) makes even small delays in load shedding (discussed in the previous section) of critical importance. In terms of inertia constants, wind turbines are an exception among other renewable technologies; the constants of inertia of the wind turbines are in fact competitive with those of conventional power plants [34]. However, the wind power plants commonly have electronic interfaces [86] which decouples them from the grid frequency. This wind technology cannot contribute to the moment of inertia of the system, and their inertia constant is not included in equivalent inertia constant of the microgrid. Wind turbines that are connected via convertors (DFIG and FRC) do not naturally provide an inertia response, as their rotor speed is decoupled from the system frequency. However, a wind turbine inertia response can be emulated by adding special controllers, which decrease the speed of the turbine, and by increasing the referenced torque to release kinetic energy when frequency drops. 38 Reference [86] has developed a linearized model of a wind Doubly Fed Induction Generator (DFIG) and validated it against the DFIG detailed model of [93]. For this thesis, the preceding linearized model was implemented in MATLAB Simulink. After isolation of the campus island from the supply grid but before the completion of the local load shedding, the inertia of the wind turbine helps to maintain the microgrid frequency until the required load blocks are disconnected. The inertia response controller and the frequency response model of DFIG wind turbine are described in this section. The DFIG requires a dynamic control mechanism to be able to operate the wind turbine in a variable rotational speed. This is often achieved through the current-mode control of the rotor-side convertor [94]. The current mode control divides the rotor current into two orthogonal components of direct and quadrature which are used to adjust the torque (torque control scheme) and terminal voltage (voltage control scheme), respectively [94]. As frequency response model is only concern with real power (torque), just the q-component is modeled and the change in d-component is neglected [86]. The torque control loop of the DFIG adjusts the electromagnetic torque (Te) based on the wind speed and drives the system to operate at the optimal point [94]. One advantage of variable speed wind turbines such as DFIG over the fixed speed type is their ability to extract maximum power (or torque) from wind at any speed. Figure 24- (a) demonstrates the variations in extracted torque based on different wind and rotational speeds. Connecting the peak of all curves for different wind speeds gives the maximum torque curve, Figure 24-(b), which is defined by [93]: Where Kopt constant depends on the aerodynamics of the wind turbine Figure 24: Maximum power extraction curve 39 The key points shown in Figure 24 include: The minimum wind speed at which the wind turbine-generator will be able to generate useful power is called the cut-in speed. The maximum wind speed beyond which the wind turbine is not allowed to generate power is called shutdown speed. The rated wind speed at which wind turbine delivers the rated power is called the speed limit. To keep the turbine on the curve, the torque control loop first derives a reference value (or set point) for the generated torque (Tsp) based on the measured rotor speed and Topt of the curve in Figure 24 [81]. Second, a current reference point is derived from the Tsp [86]: The direct axis is selected to coincide with the maximum stator flux [86]. Using the stator flux equation, a simple relation between electromagnetic torque and the q-component of the rotor current (and their set point values) can be derived: Third, a PI compensator processes the error signal (difference between and ) to generate the rotor voltage ( ), for DFIG voltage source converters [86, 94]. Then the voltage is injected into the rotor, which with a simplified model gives [94]: Rotor voltage equations: 40 Rotor flux equations: Substituting for flux in the voltage equation gives the following voltage/current relationship: Neglecting the voltage-related d-components ( ) and substituting ( ) from the voltage-current equation: Converting the above equation to the s-domain: 41 Figure 25: Simplified model of Doubly Fed Induction Generator wind turbine From the rotor current, the actual electromagnetic torque and then the rotor speed are calculated from the swing equation: which is in s-domain The output power of the wind turbine is related to the electromagnetic torque, assuming zero convertor loss, by Figure 26: Electrical output power of wind turbine in per unit Under normal conditions, the DFIG controller maintains the turbine at its optimal speed to generate the maximum available power. The converter follows the optimal extracted power curve by maintaining the electromagnetic torque close to the referenced torque (Tsp) until the DFIG is prompted to do otherwise. For example, during a disturbance in which the system frequency drops, the converter based wind turbines can release additional power from the stored kinetic energy of their rotating masses. This is achieved by adding an Inertia Response Emulating (IRE) controller (Figure 27). 42 Figure 27: IRE controller of DFIG wind turbine Due to the converters of the DFIG, the wind turbine is decoupled from the system frequency and cannot participate in the inertia response unless a controller is added to the torque control loop to imitate the inertia response by decreasing the torque setpoint and, therefore, the rotor speed. The frequency drop will inject more power into the grid, similarly to the synchronous generator‟s swing equation. As in IRE control, a trip signal is added to the proportion block (similar to the droop in conventional generators) to connect the controller when the microgrid is islanded, and later disconnect it when the controller is not needed. Figure 28: Wind turbine contribution to power deficit after adding the inertia-emulating controller (a) (b) (c) 43 Since kinetic energy from the wind turbine is consumed to inject more electrical power into the electric system, the rotor speed decreases. The two phenomena are illustrated in Figure 28(a) and (b). The rotor slows down until its speed reaches zero or the controller turns off (either due to a trip signal or because of a return of frequency back to normal). Figure 28(c) shows that after 5 seconds, the system frequency is close to its normal value. Simultaneously, the output power of the wind turbine drops below its initial value. In other words, the incremental power shown in Figure 28(b) becomes negative because the wind turbine is rotating below its optimal speed (thus below maximum power) until it absorbs enough power from the grid to regain its speed. The amount of drop in power depends on the amount of rotational speed drop and the duration of the non-optimal operation periods. In other words, it depends on how much power was injected, over what period of time, and how fast the power is being absorbed. In Figure 28(b), comparing the area under the incremental power curve, before and after the under frequency situation (5 seconds), shows that the method of inertia response emulation is not ideal because the turbine needs to absorb more power than it injected [34]. Figure 28(c) illustrates that the IRE controller improves the initial frequency level by sacrificing the secondary frequency level by sucking power from the system. However, the main concern with load shedding is the initial frequency drop which can potentially drop below the acceptable threshold due to measurement/communication delays and lack of an inertia constant. Simulation details of Figure 28 are described in appendix B.1. As the fastest growing and most sustainable renewable technology, the wind turbine DFIG may become the dominant DG on campus. Figure 29 illustrates that wind turbines have evolved from low power (smaller diameters) to larger wind turbine with longer blades and taller towers which means that interception with higher wind speeds and better power extraction coefficients will be possible [95]. 44 Figure 29: Evolution of wind turbine from 15 year ago [94] The average wind speed off shore of the university campus is 7.6 m/s. The wind turbine in the case study in this thesis is chosen based on the site wind condition in order to balance mechanical load and maximum power extraction [94]. Among different wind turbine-generator types (Figure 29), a 2 MW wind turbine is typically used for sites with an average annual wind speed of 8 m/s [94-96] and is also chosen for the UBC campus in this thesis. Figure 30 demonstrate the simplified relation between electrical torque and rotor speed for the selected wind turbine (Kopt = 0.628) [96]. Figure 30: Optimal extraction torque curve for a typical 2MW wind turbine [96] -0.2 0 0.2 0.4 0.6 0.8 1 0 0.5 1 1.5 e le ct ri ca l t o rq u e rotor speed 45 Details of the wind turbine and doubly fed induction generators are shown in appendix B.2: 2 MW wind turbine [96]: Number of blades = 3; Rotor diameter = 80 m; Air density = 1.255 kg/m3; Gear box ratio = 1:85; Inertia time constant = 3.5 s; Nominal wind speed = 12 m/s; Cut-in wind speed = 4.5 m/s; Cutoff wind speed = 25 m/s; At a wind speed of 7.6 m/s, the average speed off shore the UBC campus, the mechanical power is calculated as: V wind speed = 7.6 m/s R rotor radius = 40 m; air density = 1.255 kg/m3; The calculated mechanical torque is then entered in the wind turbine model to initiate its electrical torque and power. As discussed earlier, the UBC campus needs 25 MW extra generation on campus to meet the N-1 criteria, in case the BC Hydro transmission line trips 46 out during the winter peak demand. If the campus chooses to build a wind farm with this same capacity, it will have over 25% chance (from Figure 12) of meeting the criterion under the worst case scenario and without disconnecting any load. However, there is still a 75% chance of low wind speed (below 11 m/s) in which case the disconnection of the high capacity transmission line will overload the other line and a fast and accurate load shedding is required to avoid islanding. If the campus becomes isolated from the grid, the combination of load shedding and wind turbine IRE controller will help maintain the integrity of the island. Although more kinetic energy is available at higher wind speeds, the wind turbine can help maintain the frequency even during the low wind speeds. This chapter described the proposed method for dealing with the problem of a weak supply connection to microgrids and illustrates the importance of choosing the proposed methodology over the conventional methods. This method relies on an accurate load shedding scheme that takes energy from the wind turbine inertia and delivers it to the microgrid. The next chapter illustrates the performance of the proposed algorithm for different availabilities of distributed generation. 47 Figure 31: The complete FR model of wind turbine DFIG with IRE controller 48 3 Simulation Results and Discussions In this chapter, numbers of scenarios are applied to the frequency response model of the UBC microgrid. These scenarios illustrate the impact of the wind speed, power imbalance and load shedding delay on the microgrid and examine the performance of the intelligent load shedding method. 3.1 Scenario 1: Average Demand In the academic year of 2009-2010, the average campus demand was 31 MW and its projection in 2030 is 46 MW. With future wind and biomass generation plants on campus, part of this demand could be met from within the university microgrid. Assuming that wind speed is at its annual average value, BC Hydro needs to deliver about 37 MW power to the campus, which is below the capacity of a single supply line to it. Figure 32 illustrates that even at cut-in wind speed, the campus supply lines meet the N-1 criteria and as wind speed increases, the power flow through the lines decreases. Figure 32: Total power flow to UBC microgrid at various wind speed Wind speed = 11 m/s 9 m/s 7 m/s 5 m/s Cut-in Speed 49 3.2 Scenario 2: Average Wind Speed For the second scenario, the average wind speed is assumed. It is a busy winter day and campus demand is at its peak value. To meet this demand, in addition to on the campus wind turbine and biomass power plants, both utility lines are also providing electricity to campus. Due to a fault, the higher capacity transmission line disconnects, and the lower capacity line is forced to carry the entire power, but this is beyond its thermal capacity. The intelligent load shedding mechanism detects the overload and sends commands to specific load blocks to disconnect. Although this process takes less than 200 ms, this time delay may be long enough to trigger a disconnect command to the protection mechanisms of the 42 MVA transmission line. The second line may trip out due to a second contingency. In any of these cases, the campus microgrid becomes islanded and further load shedding is required. Figure 33: Power curves for scenario one Figure 33 shows variations in power demand and generation on campus, over a period of 40 seconds. The delay of the first load shedding, from 5 s to 5.2 s, leaves the line in an overloaded condition, and potentially islands the campus after a few seconds. The second load shedding is triggered at 7 s and completes after 200 milliseconds. The islanding also First line is out Second line overloaded 50 triggers the IRE controller of the wind turbine to inject more power to the island, while the loads are being shed. While the delay of the first load shedding could potentially island the campus microgrid, the second delay could have a more devastating impact: a campus wide power outage. Figure 34 compares the microgrid frequency with (solid line) and without (dash line) the wind turbine IRE controller. Figure 34: Frequency of UBC campus for scenario one With an accurate load shedding mechanism, the system manages to return to 60 Hz by disconnecting the amount with which the line was overloaded. During the load shedding delay, the supplementary controller of the wind turbine stops the frequency from dropping below 57 Hz, and keeps it close to the normal range. Thus, the wind turbine slows down by 0.06 per unit and then returns to normal (refer to Figure 35). First line out Second line out IRE control off 51 Figure 35: Wind turbine rotational speed for scenario one For the next scenario, the wind turbine is initially operating at full demand when the disturbance disconnects the supply line. 3.3 Scenario 3: High Wind Speed If the wind speed increases to 11 m/s, the wind turbine will generate at full load. With over 28 MVA local generation, the campus needs less than 40 MVA of external generation to meet its maximum demand. In this case, when the 62 MVA transmission line trips out, no load shedding is required and the campus microgrid continues its normal operation. 52 Figure 36: Power curves for scenario two In Figure 36, after the first supply line disconnects, the power flow in the other line increases to 35 MW which is below its capacity (42 MVA) and no load blocks are shed. However, after the second line trips out, close to 35 MVA loads are disconnected. Figure 37: Frequency of UBC campus for scenario two First line out Second line out 53 Again, Figure 37 illustrates that intelligent load shedding maintains the frequency of the island within the acceptable range, while for load shedding without the help of the wind turbine IRE, the frequency drops to 57 Hz, which could potentially disconnect the biomass plant and damage some of the local loads. 3.4 Scenario 4: Concurrent Contingencies In this example, the wind speed remains average and seven seconds later, both transmission lines are disconnected in order to isolate the campus. The amount of power deficit is larger, as the load shedding is not staged, and both contingencies happen concurrently. Figure 38: Power curves for scenario three Figure 38 compares the power demand and generation of single contingency and simultaneous contingency scenarios. The total demand starts at peak value and eventually drops to the same level in both cases because the cumulative power deficit and amount of load shedding is the same in both cases. The extracted power from wind turbine in the single contingency scenario is lower than for the double contingency case due to the additional drop in frequency. 54 Figure 39: Frequency for scenario three The frequency variations are compared in Figure 39. For both, single and double contingencies, without the wind turbine supplementary controller, the frequency drops to 56.5 and 55.5 Hz, which will lead to a power outage. With the wind IRE controller, there are very small frequency differences between two scenarios and the frequency stays above 58 Hz. However, the drop in frequency after the disconnection of the controller is more significant because the wind turbine has to slow down more to compensate for a larger demand and generation imbalance and more power is delivered to the wind turbine to return its speed back to normal. 55 Figure 40: Rotational speed of wind turbine for scenario three 3.5 Scenario 5: Delay So far, all the scenarios demonstrate that the inertia response support from the wind turbine outperforms the load shedding alone (No IRE) by maintaining the frequency within the acceptable frequency range. In order to demonstrate the possible shortcomings of the proposed intelligent load shedding method, this section gives a couple of examples in which the method cannot stop frequency from dropping below the threshold. Isolation of the microgrid triggers the IRE control of the wind turbine to deliver more power to the system, and shortly after when the frequency returns to 60 Hz, the IRE control is disconnected to allow the wind turbine to regain its optimal speed. Why should the IRE controller be disconnected? It may seem better to keep the controller connected after the load shedding is completed especially if the static switch tries to connect the island to the grid in the first few seconds. However, the wind turbine has to eventually take that power back from the system to return to its optimal operation mode. Due to the limitations of the method, the longer the controller remains connected, the more power it will draw from the microgrid when the wind turbine is returning back to normal. This means a power deficit and lower frequency level (secondary frequency). 56 Figure 41: Frequency level for longer duration of IRE connection Figure 41 compares the frequency dynamics of two cases: the first case is when the wind turbine inertia is not used (dashed line) and the second case is when the IRE controller remains connected for 15 seconds after islanding (solid line). Without the inertia emulator, the frequency drops below 56 Hz initially and returns to an acceptable range in three seconds. In the second case, the IRE emulator controls the frequency for 15 seconds after which the controller disconnects and brings the frequency down below 56 Hz. Keeping the controller connected for longer time than necessary brings the frequency down to the same level as the initial frequency of the microgrid without controller (case one). Due to the larger frequency drop and longer recovery duration, the supplementary control is more harmful than useful, unless the grid is reconnected. If the grid is reconnected, it will provide the excess power to return the wind turbine speed back to normal without effecting the frequency. To keep the frequency close to 60 Hz for a longer time immediately after islanding, one may want to keep the controller for a longer time to increase the chance of resynchronization of the microgrid and, therefore, reconnection. However, this has consequences in that if the reconnection fails the microgrid may fail all together because of low frequency. Another alternative is to temporarily shed some low priority load until the wind turbine regains its speed and while the IRE controller disconnects  Primary Frequency   Secondary Frequency  57 system frequency remains close to normal. However, it is usually unacceptable to interrupt customers. The better alternative is to only keep the controller connected when it is needed, for example, while load shedding is taking place. Another delay, which effects the performance of load shedding and the IRE control, is the load shedding delay, which is the time from the moment when islanding occurs until the selected load blocks are shed. The communication delay is hard to predict as it depends on many factors including the number and size of data packets at the time of disturbance. The communication delay in the power system was assumed 200 ms in this study [69, 72-73, 87]. If a satellite communication link is used, or if the standard links are congested, the delay of the load shedding may increase. Figure 42: Frequency level if load shedding delay is 500 ms Figure 42 demonstrates the impact of load shedding delay on frequency behavior. With a delay of 500 ms, the load shedding will let the frequency drop to 49 Hz and in the case of load shedding scheme combined with the IRE controller, the frequency reaches 56 Hz. Although the combined method surpasses the first one (load shedding alone), the size of the frequency drop is unacceptable in both cases. Thus, the designers of the intelligent load 58 shedding system have to pay close attention to the maximum possible delay, and ensure that it is less than 500 ms. The last two scenarios showed the importance of two delays: controller detachment and load shedding. Increasing the first delay beyond the frequency drop period of load shedding is not recommended, as the proposed load shedding combined with the IRE control method may become inferior to load shedding alone. The second delay is more difficult to control due to the traffic of data packets, and if it reaches 500 ms or above, the proposed method will not be able to maintain the frequency above the frequency threshold, and the system will fail. 3.6 Simulation Conclusion In order to illustrate the effectiveness and limitations of the proposed method and the impact of different factors, five scenarios for the UBC campus microgrid were simulated and the results were presented in the previous sections. The first scenario demonstrated that the chosen size of the wind farm was appropriate for the projected needs of the UBC campus in 2030, because the wind turbine could reduce the power flow from the main grid below the capacity of a single line and meet the N-1 criteria during the average electrical demand of the campus. Scenarios two and three demonstrated the impact of wind speed on the frequency of the microgrid with the load shedding method and on the primary and secondary frequencies with the load shedding and IRE controller combined methods. They showed that even at average wind speeds and peak demands, the wind turbine could inject enough excess power to prevent the frequency from dropping below the acceptable level. Besides the effectiveness of intelligent load shedding scheme in disconnecting the right amount of load blocks, the fourth scenario illustrated the impact of a power disturbance from simultaneous disconnection of supply lines. The initial frequency level (primary level) of this scenario was similar to those of scenarios two and three; the secondary frequency level, on the other hand, was lower, because the turbine had to release more power for the period when load shedding occurred. 59 The last scenario investigated the limitations of the method with respect to delays. The two undesirable, yet unavoidable, delays are related to the controller detachment and to the load shedding. The longer the first delay, which is the total time IRE remains connected, the better the improvement on the primary frequency, but the worse the secondary frequency. Unless the microgrid is guaranteed to reconnect to the main grid during the primary frequency period, or interruption of additional load is acceptable, the controller should be disconnected as soon as the frequency returns to the acceptable range. The second delay, which occurs from the moment the microgrid island is formed until load blocks are shed, significantly affects the frequency for both the load shedding and the combined methods. This delay − which depends on the communication delays, especially the congestion of the links − needs to remain as small as possible. In summary, the proposed method can maintain the frequency close to the normal range and speed up the resynchronization and reconnection of the microgrid to the main grid. 60 4 Conclusion and Future Work In order to remove the supply bottlenecks of microgrids, this thesis presented an intelligent load shedding algorithm that operates in a corrective mode to maintain the power flow in the main utility supply below their limits. In the case of islanding of the microgrid, the load shedding manager can help balance the electrical demand and generation of the microgrid. With or without islanding, the proposed methodology considers the real-time priority of the load blocks and drops those with lower importance levels. This thesis demonstrates the advantage of the algorithm in returning the system frequency back to 60 Hz after loss of generation in situations where the more conventional methods fail. In addition to the common detection and operation delays in the load shedding process, the proposed method uses communication links which may introduce additional delays. Because the modern microgrids have very small moments of inertia as compared to the traditional centralized grids, the frequency drops very rapidly for even a small power unbalance, and the communication delays in the system can drop the microgrid frequency low enough to trip the generators and damage the loads. To provide frequency support during the load shedding period, the thesis proposes to temporarily increase the effective inertia of the microgrid by using a special wind turbine controller, the Inertia Response Emulator (IRE). The microgrid studied is the distribution system of the campus of the University of British Columbia. Without energy efficiency improvement and load reduction strategies, in 2030, the campus demand will exceed the power flow limits of the main grid supply lines. In the assumed scenario, distributed generation on campus will include a biomass CHP plant and a wind farm. A frequency response model of the UBC microgrid with all the prospect loads and DGs was developed in MATLAB/SIMULINK to test the proposed power management algorithm which is a combination of intelligent load shedding and IRE control. The obtained simulation results demonstrated the effectiveness of the proposed method in maintaining frequency within the acceptable range in order to prevent cascading outages, and to resynchronize and reconnect to the grid. This was achieved by increasing the torque setpoint of the wind turbines in order to release their kinetic energy into the microgrid. This energy is returned to the turbines once the load shedding is completed and the frequency 61 has been restored close to the normal level. The results of the simulations also showed the limitations of the algorithm in case of longer delays in the controller detachment and in the load shedding, and concluded that both delays should be kept as small as possible. Although this research concentrated on microgrids that operate in parallel with the main grid (Type 1), the developed algorithm also applies to isolated microgrids (Type 2). This is an important planning consideration for remote, off-grid communities. The engineering analysis and design for these communities should hold for either scenario because they may be required to join the grid as their economic development continues. The proposed algorithm allows operation in both modes by balancing the real power of generation and demand in the islanding mode, and synchronizing the frequency of the microgrid with the main grid in the parallel mode. The proposed technique and model focus on real power and frequency: The frequency response model demonstrates the success of the proposed algorithm in balancing real power fast and accurately, and in maintaining frequency within the acceptable range. An assumption in the analysis was that the voltage of the microgrid, especially at the DG terminals, remains constant; thus, the real power of the generators and loads is not influenced by voltage variations. While most publications on under frequency load shedding use a linear dynamic frequency model at least in the initial study, it is also important to consider the voltage variations. In addition to closely monitoring frequency, utilities also closely monitor the voltage level [41]. For future research, an automatic reactive power management algorithm should be developed in order to utilize the available reactive resources (such as variable capacitor banks or VARIAC), to achieve a satisfactory voltage level at all times. One of the objectives of the thesis was to be able to reconnect the microgrid to the utility as soon as possible. Because the proposed algorithm keeps the frequency close to normal levels and the local DGs connected, the possibility of the microgrid reconnecting to the grid is increased. However, for the synchronization of the microgrid with the main grid, other criteria − such as voltage magnitude and angle − have to be met, as well. Once the reactive power requirements of the microgrid are met, matching the angle at the grid connection point is also required. There are a number of techniques that help achieve this 62 objective, such as phase shifting transformers and specialized wind turbine controllers; further research is required to synchronize the angle. Finally, the current study considers the wind power as a viable resource on campus because it has the lowest greenhouse gas emission among renewable energy resources. The average annual wind speed off shore of the campus is sufficient to economically generate electricity, especially in winter when the peak demand occurs. However, as a future research objective, a more detailed economical analysis of different renewable resources on campus may suggest cheaper resources. In that case, if the recommended generation is decoupled from the microgrid via an electronic interface, a similar IRE controller may be applied to emulate its inertia response. Otherwise, for other distributed generations which have small or no moment of inertia, the university should consider other ways of increasing the equivalent inertia constant of the microgrid. These options include battery banks and flywheels. These alternatives will require further studies to ensure their effectiveness in maintaining frequency during load shedding. 63 Bibliography 1. Marti, J.R. Infrastructure Interdependencies Simulator (I2SIM). 2007; Available from: http://www.i2sim.ca/. 2. Marti, J.R. The Disaster Response Network Enabled Platform (DR NEP). 2011; Available from: http://dr-nep.ece.ubc.ca. 3. Venkata, S. and H. Rudnick, Distribution systems [Guest Editorial]. Power and Energy Magazine, IEEE, 2007. 5(4): p. 16-22. 4. Olken, M., Soul of the power system [From the Editor]. Power and Energy Magazine, IEEE, 2007. 5(4): p. 4-6. 5. Hatziargyriou, N., et al., Microgrids. Power and Energy Magazine, IEEE, 2007. 5(4): p. 78-94. 6. Ye, Z. and N.R.E. Laboratory, Facility Microgrids. 2005: National Renewable Energy Laboratory. 7. Kroposki, B., T. Basso, and R. DeBlasio. Microgrid standards and technologies. in Power and Energy Society General Meeting - Conversion and Delivery of Electrical Energy in the 21st Century, 2008 IEEE. 2008. 8. Kaplan, S.M., F. Sissine, and T. Net, Smart grid: modernizing electric power transmission and distribution; energy independence, storage and security; energy independence and security act of 2007 (EISA); improving electrical grid efficiency, communication, reliability, and resiliency; integrating new and renewable energy sources. 2009: The Capitol Net Inc. 9. BC Hydro 35 kV and Below Interconnection Requirements for Power Generators. 2010; Available from: http://www.bchydro.com/etc/medialib/internet/documents/info/pdf/info_distribution_i nterconnection_requirements.Par.0001.File.DIR_May_2010.pdf. 10. BC Hydro 69 kV to 500 kV Interconnection Requirements for Power Generators. 2010; Available from: http://transmission.bchydro.com/NR/rdonlyres/32A51FA4- EB39-49B4-BE2A- 250504F594E2/0/Technical_Interconnection_Requirements_for_Generators_R11_20 100705.pdf. 11. BC Hydro Distribution Power Generator Islanding Guidelines. 2006. 12. Final Report Microgrids Research Assessment for the US Department of Energy’s Office of Electricity Delivery and Energy Reliability and the California Energy Commission’s Public Interest Energy Research Program. May 2006, Navigant Consulting Inc. 13. Khan, M.S. and M.R. Iravani. Supervisory Hybrid Control of a Micro Grid System. in Electrical Power Conference, 2007. EPC 2007. IEEE Canada. 2007. 14. More than 2,000 Microgrids to be Deployed by 2015, Forecasts Pike Research. 2010; Available from: http://eon.businesswire.com/news/eon/20100126005808/en. 15. Lasseter, R., et al., Integration of distributed energy resources. The CERTS Microgrid Concept. 2002. 16. Ding, M., Y. Zhang, and M. Mao. Key technologies for microgrids-a review: IEEE. 17. Djapic, P., et al., Taking an active approach. Power and Energy Magazine, IEEE, 2007. 5(4): p. 68-77. 64 18. Lasseter, R.H., Microgrids and distributed generation. Journal of Energy Engineering, 2007. 133: p. 144. 19. Kabouris, J. and C.D. Vournas, Application of interruptible contracts to increase wind-power penetration in congested areas. Power Systems, IEEE Transactions on, 2004. 19(3): p. 1642-1649. 20. Collinson, A., et al., Solutions for the connection and operation of distributed generation. DTI New & Renewable Energy Programme, 2003. 21. Lopez, C., P. Lusina, and J.R. Marti, Real-Time Monitoring of Energy Infrastructure, in IEEE Canadian Conference on Electrical and Computer Engineering, Connecting Engineering Applications and Disaster Management Workshop 2011: Niagara Falls, Ontario. 22. Jupe, S. and P. Taylor, Distributed generation output control for network power flow management. Renewable Power Generation, IET, 2009. 3(4): p. 371-386. 23. Yip, T., et al. Dynamic line rating protection for wind farm connections. 2008: IEEE. 24. Hinrichsen, E., Controls for variable pitch wind turbine generators. Power Apparatus and Systems, IEEE Transactions on, 1984(4): p. 886-892. 25. Rodriguez-Amenedo, J.L., S. Arnalte, and J.C. Burgos, Automatic generation control of a wind farm with variable speed wind turbines. Energy Conversion, IEEE Transactions on, 2002. 17(2): p. 279-284. 26. De Almeida, R.G., E.D. Castronuovo, and J.A.P. Lopes, Optimum generation control in wind parks when carrying out system operator requests. Power Systems, IEEE Transactions on, 2006. 21(2): p. 718-725. 27. Teninge, A., et al., Contribution to frequency control through wind turbine inertial energy storage. Renewable Power Generation, IET, 2009. 3(3): p. 358-370. 28. Jauch, C., et al., International comparison of requirements for connection of wind turbines to power systems. Wind energy, 2005. 8(3): p. 295-306. 29. Bublat, T. and T. Gehlhaar. Comparison of high technical demands on grid connected wind turbines defined in international Grid Codes. 2008. 30. EirGrid Grid Code. 2009; Available from: http://www.eirgrid.com/media/EirGrid%20Grid%20Code%20Version. 31. Ramtharan, G., J. Ekanayake, and N. Jenkins, Frequency support from doubly fed induction generator wind turbines. Renewable Power Generation, IET, 2007. 1(1): p. 3-9. 32. Ekanayake, J. and N. Jenkins, Comparison of the response of doubly fed and fixed- speed induction generator wind turbines to changes in network frequency. Energy Conversion, IEEE Transactions on, 2004. 19(4): p. 800-802. 33. Anaya-Lara, O., et al. Contribution of DFIG-based wind farms to power system short- term frequency regulation. 2006: IET. 34. Morren, J., et al., Wind turbines emulating inertia and supporting primary frequency control. Power Systems, IEEE Transactions on, 2006. 21(1): p. 433-434. 35. Rebours, Y. and D. Kirschen. What is spinning reserve? 2005; Available from: http://fgamedia.org/faculty/afirouzi/ENGR600/lesson03/reading/University%20of%2 0Manchester%20-%20Spinning%20reserve-%202005.pdf 36. New, W.C., J. Berdy, and P. Brown, Load Shedding, Load Restoration and Generator Protection Using Solid State and Electromechanical Underfrequency Relays. 1983, General Electric: Philadelphia. 65 37. IEEE Guide for the Application of Protective Relays Used for Abnormal Frequency Load Shedding and Restoration. IEEE Std C37.117-2007, 2007: p. c1-43. 38. WSCC-Subcommittee, WECC Coordinated Off-Nominal Frequency Load Shedding and Restoration Requirements, in "Underfrequency Issues Work Group ". 1997, Citeseer. 39. Tom si c, T., G. Verbic, and F. Gubina, Revision of the underfrequency load-shedding scheme of the Slovenian power system. Electric power systems research, 2007. 77(5- 6): p. 494-500. 40. Emergency Operation Criteria, Northeast Power Coordinating Council (NPCC). NPCC Document A-03 2004; Available from: http://www.ieso.ca/imoweb/pubs/ircp/NPCC/A-03.pdf. 41. Ghangass, D. Emergency Manual Load Shedding And Peak Load Reduction Procedures. 2010; Available from: http://transmission.bchydro.com/nr/rdonlyres/dc6441a2-09e5-4c3b-b2f4- 7026968647a2/0/6t29.pdf. 42. Chuvychin, V.N., et al., An adaptive approach to load shedding and spinning reserve control during underfrequency conditions. Power Systems, IEEE Transactions on, 1996. 11(4): p. 1805-1810. 43. Bialek, J.W. Wide-area blackouts: why do they happen and how can modelling help. 2010; Available from: www.newton.ac.uk/programmes/SCS/seminars/052514001.ppt 44. Apostolov, A., D. Tholomier, and A. Edwards, Advanced Load-Shedding Functions in Distribution Protection Relays, in International Conference on Electricity Distribution. 2007, CIRED: Vienna. p. 21-24. 45. Maliszewski, R., R. Dunlop, and G. Wilson, Frequency actuated load shedding and restoration Part I-Philosophy. Power Apparatus and Systems, IEEE Transactions on, 1971(4): p. 1452-1459. 46. Lokay, H.E. and V. Burtnyk, Application of Underfrequency Relays for Automatic Load Shedding. Power Apparatus and Systems, IEEE Transactions on, 1968. PAS- 87(3): p. 776-783. 47. Concordia, C., L.H. Fink, and G. Poullikkas, Load shedding on an isolated system. Power Systems, IEEE Transactions on, 1995. 10(3): p. 1467-1472. 48. Delfino, B., et al. Implementation and comparison of different under frequency load- shedding schemes. in Power Engineering Society Summer Meeting, 2001. IEEE. 2001. 49. Anderson, P.M., et al., Power system protection. 1998: Wiley. 50. Anderson, P.M. and M. Mirheydar, An adaptive method for setting underfrequency load shedding relays. Power Systems, IEEE Transactions on, 1992. 7(2): p. 647-655. 51. Kundur, P., N.J. Balu, and M.G. Lauby, Power system stability and control. 1994. 52. Berry, D.H., et al., Underfrequency Protection of the Ontario Hydro System. CIGRE, 1970. 32(14). 53. Alberto, L.F.C., J.R. Borelli, and N.G. Bretas. Estimating the frequencies of load buses and their effects on the critical clearing time. in Power System Technology, 1998. Proceedings. POWERCON '98. 1998 International Conference on. 1998. 54. Mitchell, M.A., et al. Using a neural network to predict the dynamic frequency response of a power system to an under-frequency load shedding scenario. in Power Engineering Society Summer Meeting, 2000. IEEE. 2000. 66 55. Jung, J., et al., Adaptation in load shedding under vulnerable operating conditions. Power Systems, IEEE Transactions on, 2002. 17(4): p. 1199-1205. 56. Haibo, Y., V. Vittal, and Y. Zhong, Self-healing in power systems: an approach using islanding and rate of frequency decline-based load shedding. Power Systems, IEEE Transactions on, 2003. 18(1): p. 174-181. 57. Hsu, C.T., M.S. Kang, and C.S. Chen, Design of adaptive load shedding by artificial neural networks. Generation, Transmission and Distribution, IEE Proceedings-, 2005. 152(3): p. 415-421. 58. SPP Criteria Under-Frequency Load Shedding and Restoration, in Southwest Power Pool. 59. Mid-Continent_Area_Power_Pool, MAPP Reliability Handbook. Section 5.9. Nov. 2000. 30. 60. ERCOT Operation Guide 1, in Introduction Version 1, Electric Reliability Council of Texas. Febuary 2001. p. 1-14. 61. MAIN Guide No. 1B, Revision No. 2, Mid America Interconnected Network. May 1997. p. MG1B-3-MG1B-7. 62. ECAR Document No. 3, Emergency Operations, East Central Area Reliability Coordination Agreement. June 1968. p. 3. 63. NPCC Document A-03, Emergency Operation Criteria, Northeast Power Coordinating Council. Aug. 31, 2004. p. 4. 64. MAAC, Protective Relaying Philosophy and Design Standards, Mid Atlantic Area Council. p. 5-6. 65. Florida Reliability Coordinating Council (FRCC), FRCC Standards Handbook, Policy 6 Operations Planning, FRCC Automatic Underfrequency Load Shedding Program. p. 6.30-6.37. 66. Northwest Power Pool (NWPP), Enhanced Underfrequency Load Shedding Program. December 1999: p. 3-4. 67. Mid-Continent Area Power Pool, in MAPP Reliability Handbook. November 2000. p. 30. 68. Finley, D.J. and J. Horak. Load Shedding for Utility and Industrial Power System Reliability. Available from: http://www.basler.com/downloads/loadshed.pdf. 69. Qiu, B., Next generation information communication infrastructure and case studies for future power systems, in Electrical and Computer Engineering. 2002, Virginia Polytechnic Institute and State University: Blacksburg. p. 186. 70. Bin, Q., et al., LAN-based control for load shedding. Computer Applications in Power, IEEE, 2001. 14(3): p. 38-43. 71. Fievet, J.P., The use of programmable logic controllers in paper mill load shed systems. Tappi journal, 1997. 80(3): p. 105-109. 72. Shokooh, F., et al. An intelligent load shedding (ILS) system application in a large industrial facility. 2005: IEEE. 73. Ling, L.E., M.H.V. Wong, and N.M. Vong, Wide Area Protection (WAP) as an Enhance Load Shedding Scheme to Mitigate Loss of Supply to Load Center, in CEPSI. 2010: Taipei. 74. Nirenberg, S.A., D.A. McInnis, and K.D. Sparks, Fast acting load shedding. Power Systems, IEEE Transactions on, 1992. 7(2): p. 873-877. 67 75. Bonian, S., X. Xiaorong, and H. Yingduo. WAMS-based Load Shedding for Systems Suffering Power Deficit. in Transmission and Distribution Conference and Exhibition: Asia and Pacific, 2005 IEEE/PES. 2005. 76. Survey of Underfrequency Relay Tripping of Load Under Emergency Conditions. Power Apparatus and Systems, IEEE Transactions on, 1968. PAS-87(5): p. 1362- 1366. 77. Tailor, H., Alternative Energy Feasibility Report for University of British Columbia. 2010, Stantec Consulting. 78. Nexterra to power UBC, in Globe-net, F. Came, Editor. 2010. 79. Needham, S., The potential for renewable energy to provide baseload power in Australia. Science, Technology, Environment and Resources Section, Department of Parliamentary Services, 2008: p. 2008–09. 80. Yazhou, L., Studies on wind farm integration into power system [J]. Automation of Electric Power Systems, 2003. 8. 81. Ackermann, T. and J. Wiley, Wind power in power systems. Vol. 140. 2005: Wiley Online Library. 82. Lund, K. Wind Power. Agricultural Technologies Section, Government of Alberta 2002; Available from: http://www1.agric.gov.ab.ca/$department/deptdocs.nsf/all/eng4456. 83. Di-zheng, K., L. Qun, and Y. Ming-hui. Application Research of Low Wind-speed and Distributed Wind Power Technologies. Available from: http://www.aesieap0910.org/upload/File/PDF/4- Technical%20Sessions/TS26/TS2604/TS2604_FP.pdf. 84. Canadian Wind Energy Atlas. Environment Canada 2011 Jan 9, 2011]; Available from: http://www.windatlas.ca/en/index.php. 85. Hadi, S., Power system analysis. 2004, McGraw-Hill. 86. Ekanayake, J., N. Jenkins, and G. Strbac, Frequency Response From Wind Turbine. Wind Engineering, 2008: p. 573-586. 87. Qiu, B., et al. LAN-based load shedding controller (LSC) for the oil refinery facility. 2001: IEEE. 88. Peterson, L.L. and B.S. Davie, Computer networks: a systems approach. 2003: Morgan Kaufmann. 89. Adamiak, M. and W. Premerlani. The role of utility communications in a deregulated environment. in System Sciences, 1999. HICSS-32. Proceedings of the 32nd Annual Hawaii International Conference on. 1999. 90. Kurose, J.F., K.W. Ross, and B. Anand, Computer networking: a top-down approach. 2008: Pearson/Addison Wesley. 91. Xiaorong, X., et al., WAMS applications in Chinese power systems. Power and Energy Magazine, IEEE, 2006. 4(1): p. 54-63. 92. Naduvathuparambil, B., M.C. Valenti, and A. Feliachi. Communication delays in wide area measurement systems. in System Theory, 2002. Proceedings of the Thirty- Fourth Southeastern Symposium on. 2002. 93. Holdsworth, L., et al., Comparison of fixed speed and doubly-fed induction wind turbines during power system disturbances. Generation, Transmission and Distribution, IEE Proceedings-, 2003. 150(3): p. 343-352. 68 94. Anaya-Lara, O., et al., wind energy generation modeling and control. 2009: John Wiley & Sons, Ltd. 95. Fox, B., Wind power integration: connection and system operational aspects. 2007: Iet. 96. Shahabi, M., et al., Microgrid Dynamic Performance Improvement Using a Doubly Fed Induction Wind Generator. Energy Conversion, IEEE Transactions on, 2009. 24(1): p. 137-145. 69 Appendices Appendix A Load Shedding Schemes The complete model of the UBC campus and the corresponding load shedding algorithms are presented in this appendix. Wind_Parameters clc clear all Wind_Parameters dt1=0.5; dt2=0.5; dt3=0.5; dt4=0.5; a=0; Ltotal=1.5*2*(10867+10501); WTC=25e3; Tm=0.4; [xFinal,PSS]=initiate(Tm); time1=[0 5]; amp1=[(1-(PSS*WTC+1600)/Ltotal)/2 0]; time2=[0 5.0]; amp2=[(1-(PSS*WTC+1600)/Ltotal)/2 0]; for Tm=0.4, amp2 drop by +12750 at 5.2 s, and delay of 5.008 5.2 for Tm=0.9 time2=[0 5.0 5.2 7]; amp2=[(1-(PSS*WTC+1600)/Ltotal)/2 1-(PSS*WTC+1600)/Ltotal 1- (PSS*WTC+1600)/Ltotal 0]; WTtime=[0 5 7]; WTamp=[0 1 0]; TMtime=[0 1000]; TMamp=[Tm 0.9]; figure; for R=200:50:200 sim('UBCmodel_loadshedding_and_windcontroller_v7'); hold all; plot(load.time,load.signals.values(1,:),wt.time,wt.signals.values... 70 ,'--b',l1.time,l1.signals.values,l2.time,l2.signals.values... ,bm.time,bm.signals.values); grid on; hold all; plot(freq.time,freq.signals.values, '--b'); hold all; plot(pd.time,pd.signals.values); plot(load.time,load.signals.values(1,:),'-r',wt.time,wt.signals.values,'-- r') plot(Wr.time,Wr.signals.values,'-r') a=0; sim('UBCmodel_loadshedding_and_windcontroller_v4'); % hold all; plot(freq.time,freq.signals.values, '--r'); hold all; plot(load.time,load.signals.values(1,:),'- r',wt.time,wt.signals.values,'--r') end a=1; time1=[0 7]; amp1=[(1-(PSS*WTC+1600)/Ltotal)/2 0]; time2=[0 7]; amp2=[(1-(PSS*WTC+1600)/Ltotal)/2 0]; sim('UBCmodel_loadshedding_and_windcontroller_v7'); hold all; plot(load.time,load.signals.values(1,:),'- b',wt.time,wt.signals.values,'--b') hold all; plot(Wr.time,Wr.signals.values,'-b') grid on; a=0; sim('UBCmodel_loadshedding_and_windcontroller_v4'); hold all; plot(freq.time,freq.signals.values,'-b'); grid on; hold all; plot(pd.time,pd.signals.values,'--b'); a=0; sim('UBCmodel_loadshedding_and_windcontroller_v4'); % hold all; plot(freq.time,freq.signals.values, '--b'); hold all; plot(load.time,load.signals.values(1,:),'- b',wt.time,wt.signals.values,'--b') grid on; 71 Figure 43: Simulink model of UBC campus 72 A.1 Traditional Load Shedding The details of the program and the model developed to test the traditional load shedding algorithm for the UBC campus are presented below: clear all clc figure; dP=0.1; %dP=0.05:0.05:0.85 for cntMax=1:10/6:20 sim('UBCmodel_traditional_load_shedding') hold all; subplot(1,2,1); plot(freq.time,freq.signals.values,'--b'); text(freq.time(1500),freq.signals.values(1500), num2str(cntMax)... ,'VerticalAlignment','bottom','HorizontalAlignment','right'); hold all; subplot(1,2,2); plot(ls.time,ls.signals.values,'--b'); axis([0 1.5 0 0.85]); text(ls.time(200+round(dP*20)),ls.signals.values(200+round(dP*20))... , num2str(dP),'VerticalAlignment','bottom','HorizontalAlignment','right'); end Figure 44: Simulink model of traditional load shedding scheme 73 A.2 Intelligent Load Shedding function [o,b] = fcn(u2,u1,u3) % %#eml eml.extrinsic('load'); Lsize=176; persistent prev_u; if isempty(prev_u) prev_u=u1+u2; end sortedLSarray=zeros(Lsize,2); sortedLRarray=zeros(Lsize,2); offset=0.05; persistent error; if isempty(error) error=0; end persistent flag1; persistent flag3; if isempty(flag1) flag1=0; flag3=0; end persistent flag2; if isempty(flag2) flag2=0; end % Cls is the amount of loadshedding required % if this is the very 1st time we shed load, Cls=u % otherwise, only shed the additional amount, Cls=u-prev_u if u1==0 && u2==0 %island is formed if flag3==0 Cls=prev_u; flag3=1; else Cls=0; end elseif u1>62000 %line 1 is overloaded if flag1==0 Cls=u1-62000; flag1=1; else Cls=0; end elseif u2>42000 %line 2 is overloaded if flag2==0 Cls=u2-42000; flag2=1; else Cls=0; 74 end else %normal condition Cls=0; end persistent prev_u3; if isempty(prev_u3) prev_u3=0; end if u3==prev_u3 else u3-prev_u3 end Cls=Cls+u3-prev_u3; prev_u3=u3; % L is consisted of: % Column 1 -> electrical demand of each load block (building) % Column 2 -> priority of each load block (from I2Sim) % Column 3 -> switching condition ON=1, OFF=0 % Value of L could be an input too (or updated by I2Sim) persistent L; if isempty(L) L=zeros(Lsize,3); L=load('UBC_load_data.dat'); L(:,1)=1.5*L(:,1); % to include the future demand end if Cls>0 % loadshedding is required % Cls % sortedLSarray = sort(L); % sort loadshedding array n=0; temp=zeros(Lsize,2); % 1st eliminate loads that are high priority or disconnected for k=1:size(L,1) if L(k,2)==1 if L(k,3)==1 n=n+1; temp(n,:)=[k L(k,1)]; else L(k,:); end end end % 2nd sort temp array from large to small in sortedLSarray 75 for m=1:size(temp,1) max=[0 0]; s=1; for i=1:size(temp,1) if temp(i,2)>max(2) max=temp(i,:); s=i; end end temp(s,2)=0; sortedLSarray(m,:)=max; end Ctemp=Cls*(1+offset); % swip through the array from left to right to find % maximum load block that is smaller than % load shedding amount (x110%) for p=1:10 for m=1:size(sortedLSarray,1) if (Ctemp>offset*Cls) if (sortedLSarray(m,2)>0 && sortedLSarray(m,2)0.1Cls or Ctemp==1.1Cls then we don't have % small enough load to match it => use reserve/battery % assuming enough charged/reserved or leave it out % if Ctemp<0.1Cls then we are within acceptable range % then extra load shedding can become reserve for % Nexterra or wind turbine or charge battery % else % % error=Cls; % reserve or load restoration elseif Cls<0 % load restoration is required n=0; temp2=zeros(Lsize,2); % 1st eliminate loads that are connected 76 for k=1:size(L,1) if L(k,3)==0 n=n+1; temp2(n,:)=[k L(k,1)]; end end % 2nd sort temp array from large to small in sortedLSarray for m=1:size(temp2,1) max=[0 0]; s=1; for i=1:size(temp2,1) if temp2(i,2)>max(2) max=temp2(i,:); s=i; end end temp2(s,2)=0; sortedLRarray(m,:)=max; end % swip through load restoration array Ctemp=abs(Cls*(1+offset)); for p=1:10 for m=1:size(sortedLRarray,1) if (Ctemp>offset*abs(Cls)) if (sortedLRarray(m,2)>0 && sortedLRarray(m,2)