DEVELOPING WIND TURBINE MODULES FOR GRIDLAB-D A Report Presented to the Faculty of the Graduate School of Cornell University In Partial Fulfillment of the Requirements for the Degree of Master of Engineering by Noah Benjamin Maze January 2014 © 2014 Noah Benjamin Maze ALL RIGHTS RESERVED ABSTRACT As modern energy production techniques move away from monolithic, fossilfuel-driven generation facilities, heuristics for the development and maintenance of distributed renewable energy systems must be developed; furthermore, antiquated heuristics undervalue renewable energy and ignore externalities. The objective of this project was to facilitate the advancement of new decisionmaking paradigms by incorporating sustainable energy sources into distribution-level simulation software. Specifically, this report describes the development and implementation of wind-turbine add-ons to an open-source distribution-network simulation and analysis tool called Gridlab-D [1]. The additions include single- and multiple-turbine simulation objects that estimate power generation based on climate data (an existing part of the simulation tool) and user-defined turbine parameters. The resulting software was verified by comparing the expected and observed power output for each turbine model. These values were calculated externally in MATLAB and then compared with the output of Gridlab-D for the same weather information. Retrospective software validation was carried out by using real-world turbine data from NREL, Weaver Wind, and Middelgrundens Wind Turbine Cooperative to generate model parameters. The resulting parameters were plugged into Gridlab-D (compiled with the new models) along with observed wind data, and then the simulated output was compared to the observed wind power output. Further work in this area could entail reproducing existing wind integration studies on the Gridlab-D platform. This would allow researchers to directly compare studies that were originally carried out in disparate simulation environments. iii ACKNOWLEDGMENTS This work would not have been possible without the guidance and support of my advisor, Dr. C. Lindsay Anderson. I would also like to thank Weaver Wind Energy, the IU Offshore Wind Energy Measurements Project, and the National Renewable Energy Laboratory for providing the turbine data used to verify and validate this work. Personally, I am grateful for the kindness of my family and friends, and for the unwavering support, love, and patience given to me by my wife, Elizabeth Ann Maze. iv TABLE OF CONTENTS Chapter 1: Introduction .............................................................................................................. 1 The Power Grid........................................................................................................................... 2 History .................................................................................................................................... 2 Modern Consequences .......................................................................................................... 2 The Smart Grid ........................................................................................................................... 3 Transmission Level Advantages.............................................................................................. 3 Consumer Level Advantages .................................................................................................. 3 Distribution Level Advantages................................................................................................ 3 Modelling the Grid ..................................................................................................................... 5 Systems of Equations ............................................................................................................. 5 Optimal power flow solvers ................................................................................................... 5 Gridlab-D ................................................................................................................................ 6 Summary of Outcomes ............................................................................................................... 6 Chapter 2: Choosing a Wind Turbine Model .............................................................................. 8 Model Examples ......................................................................................................................... 8 Static Models .......................................................................................................................... 9 Dynamic Models ..................................................................................................................... 9 Data-Driven Models ............................................................................................................. 10 Chapter 3: Implementation ...................................................................................................... 14 Compiling Gridlab-D ................................................................................................................. 14 Adding a Gridlab-D Class .......................................................................................................... 15 Source Code Requirements .................................................................................................. 15 Auxiliary Functions ............................................................................................................... 15 Merging This Project with Gridlab-D .................................................................................... 16 Chapter 4: Verification, Validation, and Discussion ................................................................. 17 Software Verification................................................................................................................ 17 Software Validation .................................................................................................................. 19 Conclusion ................................................................................................................................ 22 References .................................................................................... Error! Bookmark not defined. Appendix .................................................................................................................................. 28 v Gridlab-D Prerequisites ........................................................................................................ 28 Gridlab-D Build Procedure.................................................................................................... 28 Table of Logistic Parameters ................................................................................................ 28 Gridlab-D Compatible Timestamped Weather CSV ............................................................. 29 vi LIST OF FIGURES Figure 1 GDP per capita versus Energy per capita worldwide [48] ............................... 1 Figure 2: Parts of a Wind Turbine .................................................................................. 8 Figure 3: Piecewise Linear Model Featuring the Model (blue) and Data-points (red) 11 Figure 4: Five-Parameter Logistice Model featuring Model (blue) and Data-points (red) .............................................................................................................................. 12 Figure 5: Linear Piecewise (blue) and Aggregate power curves (green and red) ........ 13 Figure 6: System Load Time Series on a partly cloudy afternoon with (A) Low, (B) Moderate, and (C) Pervasive Solar Penetration. Plot D illustrates the solar intensity over this period. ............................................................................................................ 14 Figure 7: Static Model Verification—The original power curve (top left) is used to generate linear and logistic models (bottom left). Synthetic wind data (top right) is swept from low to high, creating the power output estimation shown (bottom right). 17 Figure 8: Multiple Turbine Model Verification--Observed and Nominal Power Curves (top) and Power Output over Time (bottom). ............................................................... 18 Figure 9: Observed and Predicted Power Output of the NREL CART 3 Wind Turbine ...................................................................................................................................... 19 Figure 10: Distribution of Power Output for Denver, Seattle, and San Francisco ....... 20 Figure 11: Observed Data and Logistic Fit for Middelgrunden Turbine ..................... 21 Figure 12: Estimated and Observed Power Output at Middelgrunden ......................... 21 Figure 13: The impact of turbine downtime on power output estimation. ................... 22 vii Chapter 1: Introduction One of the most critical aspects of the challenges presented by carbon pollution and rising energy demand is that reducing energy use is not a viable solution. Most of the basic human necessities--food, water, and shelter--cost energy. Additionally, as a country becomes more industrialized and better able to take care of its people, the energy requirements per capita increase. Unlike many developmental problems that eventually sort themselves out once the country becomes developed, per-capita power consumption correlates positively with GDP throughout the entire development process, as shown below. Figure 1 GDP per capita versus Energy per capita worldwide [48] In order to reduce the amount of carbon being released into the atmosphere, carbon-polluting technologies must be replaced with renewable technologies like solar, geothermal, hydroelectric, and wind power. However, the transition to these technologies is not easy due to the fact that the many renewable power sources are not easily dispatchable: they lack the stability and predictability of older technologies like coal and natural gas. Wind power, in particular, is subject to difficult-to-forecast meteorological processes, as well as internal dynamics that complicate the estimation of the output of the turbine even further. Mathematical models can be used to focus on particular details to facilitate the design and analysis of a given generator, and they can also be used to quantify the value of a generator given typical meteorological data for a given site. This project facilitates the simulation and analysis of wind turbine power generation by adding single- and aggregate-turbine modules to a power distribution network simulator. This addition allows users to contextualize wind power output based on locally observed wind data, and to examine its impact on the overall distribution grid. Wind energy can be unpredictable and unstable, but localized simulations help system operators understand the challenges more clearly. The 1 modules were written in C++ and compiled alongside the original source for GridlabD. The remainder of this chapter provides a brief overview of the power grid of the United States, and a discussion about the benefits of locally relevant simulation. Chapter 2 presents a collection of mathematical models for characterizing wind turbines, and the motivation behind selecting four models. Chapter 3 outlines the implementation of the chosen models and the process of creating and compiling a module in Gridlab-D. Software verification, validation, and concluding remarks can be found in Chapter 4. The Power Grid The power grid of the United States connects energy producers with consumers. Large, gigawatt-scale generation facilities provide energy to vast areas via hundreds of thousands of miles of high-voltage transmission lines [2]. Distribution networks transform this voltage to lower levels and distribute it to energy consumers. Because most renewable facilities are only megawatt scale, it can be challenging to incorporate them into this arrangement. A variety of “Smart” technologies have been proposed to help untangle the power grid from its historical roots. History The history of the power grid began in Manhattan in 1882 with Pearl Street Station, a DC plant that powered Edison’s nearby electric lamps. In the next few decades, small systems like this one sprung up all over the country. In the early 20th century governments began regulating and consolidating these systems, but this effort could not prevent monopolies and unfair pricing. In the 1930s, the whole system became a heavily regulated monopoly that encompassed everything: generation, transmission, and distribution. A byproduct of this arrangement was the increased prevalence of monolithic power plants and larger, longer transmission lines. In the 70s, legislation was passed that allowed private corporations to sell energy alongside utilities. The existing monopolies fought back against this by refusing to allow these private entities to use the lines. This resulted in a push for energy market liberalization that is still ongoing today [3]. Modern Consequences In short, the grid originated as a collection of incongruous small systems, and then grew to alarming magnitudes due to vertically-integrated monopolies. This history has produced a network with poor communication and control systems due to the regional differences. And the history of gigawatt-scale power generation has led to the creation of a grid that expects deterministic power sources and is sensitive to stochastic processes. The grid is lacking the communication and robustness that most modern systems possess. These problems impact renewable energy incorporation severely. As a result, the United States gets most of its power from the traditional monolithic, carbon-heavy power plants [4]. 2 The Smart Grid Incorporating renewable energy is one of many technical challenges facing the power grid. In [5], Beard et al stress that 1) emission-reducing strategies, 2) extreme weather events, and 3) changes in governmental policy will also impact the generation, transmission, and consumption of power. Power systems researchers from all over the world have proposed countless “Smart Grid” systems, and they usually possess three main qualities: integrated communication, improved interfaces and decision support, and advanced control methods [6]. Transmission Level Advantages At the transmission level, advanced sensing and control methods could facilitate maintenance and improve response times to outages. Sensor data provided over the integrated communication network could detect incipient failures early, allowing engineers to repair faults before they precipitate into system failures. In the event of an outage, the system could immediately recognize the affected area, allowing crews to react swiftly. The changes brought by a smarter grid would enable the transmission system to become more robust and reliable by facilitating remedial actions and preventative measures. Consumer Level Advantages Integrated communication could bring real-time information to consumers, which could help them make informed choices about their energy use. Previous research indicates that consumers value renewable energy but these values are not being acknowledged by utility companies because consumers do not have sufficient bargaining power [3]. The Smart Grid could empower consumers by giving them access to a wider variety of suppliers. The Smart Grid could also supply consumers with information relating to their own consumption, through Smart Meters. These meters could inform consumer decisions by illustrating which devices were consuming the most power, and how much this consumption was costing the consumer [7]. With better communication, this cost could be changed dynamically to reflect the current cost of power generation. The resulting peaks during heavy use could trigger consumers (and automated devices) to minimize the amount of power they were consuming. Overall, these impacts would reduce peak power usage and encourage utilities to increase renewable power generation capacity. Distribution Level Advantages The distribution system would also benefit from the previously mentioned advantages: a reduction in peak power demand would reduce generation costs while lowering bills for consumers, and the enhancement of sensing and control systems would increase the reliability of both the transmission and the distribution network. On top of these perks, the Smart Grid could create more opportunities for distributed power generation and storage facilities. These facilities could sink and source demand as needed to offset deviations from generation and consumption forecasts. 3 Like the transmission system, distribution-level security and reliability will be enhanced by the Smart Grid. Dynamic network analysis, visualization, and decision guidance will decrease reaction time and severity of distribution system faults [8]. However, increased reliance on cyber-physical systems creates more opportunities for network intrusions. Adversaries with access to distribution system control networks could cause significant harm. The security of the distribution system depends on the security of the devices, configurations, and networks contained therein, so the Smart Grid must communicate securely, mitigate possible security risks, and leverage known information flows [9]. In the event of a successful intrusion, security systems will be able to use recorded information to identify and attribute attacks. In addition to security concerns, the reliability of the system is impacted by unexpected changes in load and power generation. Demand response, alluded to in the previous section, is defined by the Federal Regulatory Commission as “changes in electric usage by end-use customers from their normal consumption patterns in response to changes in the price of electricity over time, or to incentive payments designed to induce lower electricity use at times of high wholesale market prices or when system reliability is jeopardized [10].” As Demand Response becomes a more prevalent mechanism among end-users, the resulting load shifts could reduce power consumption significantly below forecasted values. In [11], Medina et al assert that this growth in Demand Response management could negatively impact grid health unless the load reduction of each end-user is mapped to the grid model during forecasting. Renewable power generation can also create unexpected deviations from distribution forecasts. Photovoltaic systems that harvest solar energy possess both long-term and short-term variations. Long-term solar energy variations due to astronomical conditions are trivial to forecast, but fluctuations due to cloud cover and related meteorological events can cause significant, unpredictable voltage changes in the short term [12]. Wind power is also subject to stochastic meteorological conditions. The power output of wind turbines changes nonlinearly with wind speed, and the wind itself is significantly more intermittent and unpredictable than the sun. While short-term (15-minute timescale) wind fluctuations contribute to power output variance, forecast error is the primary source of imbalances [13]. To offset the stochastic nature of renewable power systems, the Smart Grid can offset fluctuations with energy storage and generation systems [14]. These systems can ramp up or reduce power output as needed, resulting in stable service for end users. Smart Grid advancements will also encourage the creation of distributed generation and storage units, designed to reside within the distribution network, near the end-users (instead of on the transmission network, near the natural resources). This shift towards smaller generation facilities will increase energy market competition and reduce the environmental impact of energy generation facilities [15]. The Smart Grid’s potential impact on power distribution systems is significant and far-reaching, but the implementation of this vast collection of concepts is 4 nontrivial. The remainder of this section discusses existing Smart Grid simulation methods and their relationship with the concepts described above. Modelling the Grid Implementing the changes discussed in the previous section is an expensive and timeconsuming process that leaves very little room for experimentation after the fact. Instead, the research and development of the modern grid must be carried out within software simulations; furthermore, system planners can use models to decide how to address projected growth [6]. This section discusses a few common approaches to modelling power networks. Systems of Equations Distribution systems can be modelled by systems of equations representing network constraints and objectives. The primary advantage of this approach is that it can be tailored to emphasize specific aspects of the grid. It can also abstract irrelevant systems away from the model. The main disadvantage of this approach is the amount of time that the original researchers and interested readers must spend understanding the model before they can move on to understanding the implementation thereof; additionally, it is challenging to compare solutions that were simulated under different constraints. An example of this approach can be found in “Learned Behaviors of Multiple Autonomous Agents in Smart Grid Markets” by Reddy and Veloso [16]. In this paper the authors introduce a distribution-level market simulation that simulates market interaction between the transmission system, broker agents, and energy consumers. The purpose of the model was to illustrate that autonomous broker agents with relearning algorithms outperform those with greedy, fixed, balanced, or random algorithms. This was accomplished by abstracting almost everything about the distribution system, leaving only a tariff market, six broker actions, and a stochastic customer allocation process. Incorporating power markets into simulations is one of the most computationally challenging aspects of smart grid research, but it is also extremely important in order to determine best practices and policies for smart grid implementation and participation. Broker agents that buy power from generators and sell to consumers have been proposed in previous work as a method to model market transactions and facilitate simulation in this area [17], but the efficacy of the presented algorithms may change when subjected to power grid constraints. It would be unreasonable to expect the authors to build an all-encompassing model, but open-source Optimal Power Flow (OPF) solvers have been created to facilitate more comprehensive power grid simulations. A more comprehensive model would describe the impact that this broker algorithm could have on a real power distribution system. Optimal power flow solvers Power system optimization has been an open problem for more than 50 years [18]. The combination of economic, electrical, and computational constraints create a 5 challenging non-linear and non-convex problem. Alternating current introduces further challenges. MATPOWER and SuperOPF are two projects intended to optimize power systems accessibly and comprehensively. MATPOWER is a suite of MATLAB files designed to solve optimal power flow problems at the transmission level [19]. Although it is primarily focused on system hardware, the suite also allows users to extend the optimization to include additional user-defined cost functions. In [20], Conley used this software suite to explore the impact of introducing distributed power generation to existing (and theoretical) bus networks, but a different tool, PLEXOS, was used to simulate the economic dispatch. In [21], Naama et al used MATPOWER to simulate an optimal power flow problem on a 57-bus power system with economic and security constraints. The simulation, which considered 7 generators attached to 42 loads, took 38 seconds to arrive at a solution. When the authors compared this solution to the results of other optimization heuristics (Genetic Algorithm, Quasi-Newton Method, and Tabu Search [22]) it was found to produce the lowest cost, but the execution time was an order-of-magnitude slower than the other heuristics. Offloading computation to Computational Unified Device Architecture (CUDA)-enabled graphics processing units and decomposing matrices with multi-frontal sparse LU factorization has been shown to reduce execution time [23]. SuperOPF is a comprehensive analysis tool that originated from work relating to day-ahead and real-time electricity markets. Instead of breaking optimization problems in to sub-problems, SuperOPF is designed to co-optimize the entire system. This co-optimization considers power flow, single-element (N-1) contingency [24], reactive power, pricing and dispatch. Gridlab-D Gridlab-D was designed with the future of the distribution system in mind. Like SuperOPF, it is comprehensive—it currently has a solver and power system, control system, building, and market modules—but it is also open-source and extensible in a variety of ways. Users can use built-in functions to create userdefined systems or attach Gridlab-D to systems written in MATLAB or Java. Because the source code is publicly available, users may also write their own custom modules that can hook in to the existing network components. The existing (incomplete) wind turbine module in Gridlab-D version 2.3.0 contains code for custom wind turbine parameters and a couple of commercial turbine presets, but it does not function. As a result, when Trevor Williams et al used Gridlab-D to investigate the impact of distributed wind generation, the authors simulated the wind turbine portion of the system in M ATLAB and fed it into the Gridlab-D simulation. Summary of Outcomes The goal of this project was to facilitate the advancement of new decision-making paradigms by incorporating sustainable energy sources into distribution-level simulation software. This goal was motivated by the fact that antiquated heuristics 6 undervalue sustainable energy and ignore externalities. To achieve this goal, a selection of single and multiple- turbine models were chosen and implemented into the source code of Gridlab-D. These models can be used alongside the existing Gridlab-D climate and power-flow modules to simulate wind power output given local meteorological data. 7 Chapter 2: Choosing a Wind Turbine Model In search of a compromise between the simplicity of static wind turbine models, and the overwhelming complexity of high-fidelity dynamic models, this section discusses at length the current state of wind turbine modeling before focusing on a data-driven approach to create a variety of power output estimators. Wind turbines can be mathematically modelled in a wide variety of ways. Aerodynamic models seek to facilitate the design and optimization of the blades of the rotor and the shape of the nacelle, aiming to maximize converted power, and to tune the turbine to work best within a specific, attainable wind speed. Mechanical models can be used to design the moving parts of the turbine safely and efficiently. Noise generation models simplify the process of site selection by reducing the necessary “buffer” zone between the turbine and the general public. Economic models range from simple statistical estimations of cost versus profits to incredibly complex systems of equations that consider every imaginable loss, gain and outage. Esoteric bird collision models can even allow engineers to minimize the chance of bird collisions based on turbine design choices, which could result in a significant operating cost reduction in places where protected bird species abound [25]. For this project many of these considerations are irrelevant. Aerodynamic and mechanical outcomes are not the focus, so the parameters relating to them can be abstracted, and economic simulation will be handled by an existing Gridlab-D module. As far as increased renewable energy reliance goes, general models that estimate the power output as a function of the turbine parameters and the weather are sufficient. Model Examples Mechanically and conceptually, wind turbines can be broken into four parts: the turbine itself, the gearbox, the generator, and the control system, as shown in the figure below. Figure 2: Parts of a Wind Turbine Each of these subsystems has a specific function and an opportunity for power to be lost. For the turbine, power is lost by failing to convert the energy of the wind into rotational mechanical energy. The absolute best efficiency by which this power can be converted is known as the Betz Limit. It is equal to 16/27, and it corresponds to the threshold wherein if any more wind energy was harnessed, the overall wind energy gradient would suffer and the available energy to harness would decrease. Once the wind energy is converted into mechanical energy, it must again be transformed: the speed and torque of the wind does not usually match the desired 8 speed and torque of the generator, so the gearbox must transform the rotational energy to maximize the efficiency of the gearbox. This conversion introduces additional losses due to friction and the inertia of the gearbox. When the energy makes its way to the generator, it is again transformed through a control system, into usable electrical energy. The design and modeling of the generator within the turbine is complex enough to merit a tremendous amount of academic investigation, and it is also important enough to be directly relevant to the overall stability of the power system. Static Models Static models attempt to estimate the losses at each stage of the process based solely on the current atmospheric conditions and known wind turbine parameters. Models can be as simple as a linear piecewise equation relating wind speed and power output, or as complex as a full-fledged electro-mechanical simulation. An example of the latter approach can be found in [26]. Moriarty and Butterfield outline an extremely fine-grain system for estimating the forces on a wind turbine based on its dimensions and the impact of its environment. This overview helps illustrate the potential benefits of an incredibly detailed model that considers more than just wind speed. By considering the control systems of the turbine alongside the environmental variables the model could produce a much more realistic estimation of the power output of a wind generator. Unfortunately, this more realistic estimation of wind events requires a huge amount of parameter estimation and many different modeling suites. The subsystems of a wind turbine are complex enough to merit modeling each one independently, but static models that are willing to sacrifice the finer details to address the big picture are more commonplace. In [27], Zaman et al use a more generalized approach to estimating power output as part of a study investigating the cost per kWh of wind power generation. The study optimized rotor and tower construction options based on a simulated maximum power output objective that depended solely on rotor height and turbine diameter. Simulating a collection of turbines as a single entity can reduce execution time and simulation complexity. Norgaard et al’s multi-turbine power curve approach is a very widely used approach to estimating the output of a collection of wind turbines based on scant data [28]. The estimated power output of a collection is determined by relating the spatial and temporal distribution of the wind to geographically distributed generation facilities. Aggregation of dispersed facilities has a well-known positive ”smoothing” impact on the chaotic output of wind farms, and this paper mathematically quantifies this effect by essentially convolving a Gaussian distribution (with parameters based on spatial and temporal distribution) with a piecewise-linear power curve at each generator. This approach is valuable for extrapolating pointsource data about turbines and climate into estimations of wind farm output. Dynamic Models The main drawback of this simplified approach is its failure to consider the impact of changing wind velocity and direction. For each subsystem’s coefficient of power, the system is assumed to be at a steady state. To address the problems associated with 9 the simplified static models, many different dynamic models have been proposed. In [29], Petru proposed an exhaustive approach that modeled the state vectors of every imaginable moving part of a turbine system, culminating in a six equation model with an enormous number of parameters that must be defined before simulation can take place. Henriksen created a simpler model to facilitate control system design, that considers the coefficient of power as a dynamic quality that is driven by the tip-speedratio, a number that compares the current speed of the turbine, the wind and the turbine’s inherent (static) rotor qualities [30]. Gyulai proposed a further simplified model based around the same concept, but with fewer additional parameters [31]. Shafiu et al propose an excellent and incredibly detailed aggregated wind generator model in [32] that is firmly rooted in the mechanical and electrical engineering foundations of wind generating systems. Instead of using a more conventional power curve with cut-in and cut-out, the authors created a higher-order model whose power output is determined by not only the current state of the wind, but also the previous states. This hysteresis is particularly important in locations where the wind is very chaotic, i.e. wind turbines that are situated very low to the ground, but it contributes a great deal of complexity that might not be necessary for wind farms with higher rotors. All of these models require a significant amount of information about the turbine in question. Estimating the parameters in question is nontrivial, and requires a great deal of data. Given that the audience for this project will likely consider various wind turbines, a complicated list of parameters for each turbine option is far too cumbersome. Simpler approximations of relevant power curves could provide enough detail to inform the decision-making process without burdening the audience with overwhelming parameter estimation requirements. Data-Driven Models In an effort to find a happy medium between simplistic and complex models, datadriven models were investigated. An ideal model would provide a high degree of specificity—allowing users to discern subtle differences between turbines—while minimizing necessary parameters to simplify estimation. The next section describes the three data-driven static models illustrated in the following figure. 1. Linear Segmented Model This model breaks the relationship between wind speed and power output into a series of linearized estimations. These equations are defined by cut-in and cut-out wind speeds and a series of ordered pairs, between which the output is assumed to be linearly interpolated. These parameters can be approximated visually, estimated based on observed data, or derived from manufacturer specifications. The implementation described in the next chapter allows users to naively scale the power output by defining the number of turbines onsite. Computationally, this model can be estimated from training data by creating an anonymous function in MATLAB that returns the estimated power output given a series of wind speeds and linear segmented model parameters and then executing a nonlinear solver like lsqcurvefit to find the model 10 parameters that best fit the training data. This optimization is not trivial; inputs to the anonymous function must be sanitized to prevent lsqcurvefit from settling on impossible curves. Advancements in machine learning have led to more effective linear piecewise estimation techniques, if this method yields poor results [33]. An example of this model is shown in the figure below. Figure 3: Piecewise Linear Model Featuring the Model (blue) and Data-points (red) 2. Five-Parameter Logistic Model The five-parameter logistic model is commonly used for curve-fitting in biomedical applications because it mathematically characterizes the process of interpolating between two levels [34]. It has not seen much use in terms of estimating wind turbine power curves, but it provides an accurate, continuously differentiable estimation that is easier to optimize computationally. The output of the model is described by the following equation. The parameters for this model are not as intuitive as the piecewise linear model, but they are much easier to estimate computationally based on observed data. Additionally, because it is commonly used by biologists doing immunoassays, users can compute these constants using conventional solvers, a MATLAB add-on [35], a website [36], or proprietary software [37]. Unlike immunoassay applications, cut-in and cut-out must be included for windturbine applications. An example of this model is shown in the figure below. 11 Figure 4: Five-Parameter Logistice Model featuring Model (blue) and Data-points (red) Aggregate Model The final model allows users to implement a group of turbines based on a power curve from either of the previous models. Based on Nørgaard and Holttinen’s multi-turbine power curve approach, this model takes spatial and wind speed distribution into account [28]. The parameters for this model include the length of the wind farm in meters, the shape and scale of the wind speed (assuming Weibull distribution), the spatial standard deviation of the wind, and the parameters of the chosen single-turbine model. The original approach temporally smoothes the power output by averaging the wind speed over a window determined by the size of the wind farm and the average wind speed. To save memory, this implementation uses an IIR filter to approximate a moving average. This approximation is described in the equation below. 𝜇̂ 𝑣 (𝑡) = (𝛼 ∗ 𝑣𝑡 ) + ( (1 − 𝛼) ∗ 𝜇̂ 𝑣 (𝑡 − 1)) In this equation 𝜇̂ (𝑡) is the estimated moving average of the wind speed at time 𝑡. The parameter 𝛼 is equal to 1/𝑁, where N is the window size defined in the original approach as the number of observations per average wind propagation time. Because the wind speed is provided as a data-stream, the mean wind speed used to calculate mean wind propagation time is estimated based on the user-provided shape and scale parameters. For a Weibull distribution, the mean 𝜇 is described by the following equation [38]. 1 𝜇 = 𝜆Γ (1 + ) 𝑘 12 In this equation 𝜆 is the shape parameter and 𝑘 is the scale parameter, both of which are supplied by the user. Because the gamma function contains computationally expensive factorial terms, this implementation implemented Stirling’s approximation to estimate this function [39]. The original approach also applies smoothing to the power curve to simulate the impact of the spatial distribution of wind speed. Spatial smoothing was implemented by calculating a weighted sum of power outputs for wind speeds ranging from zero to three standard deviations away from the observed moving average. Figure 5: Linear Piecewise (blue) and Aggregate power curves (green and red) In the above figure, three power curves are illustrated. The first curve is the original curve of a single wind turbine. The second curve is a smoothed power curve representing a collection of 330 turbines arranged in a box formation. The final curve is the same collection of turbines arranged in a single-file line. The aggregate graphs have been scaled down to facilitate comparison to the original curve. Based on the end-users of the wind turbine module, linear and logistic data-driven models were selected for implementation. Gridlab-D users who wish to quickly simulate turbines can approximate a linear model based on observed data or manufacturer specifications. The logistic model offers more precision and an easier optimization function to facilitate computerized curvefitting. Both models can be extended with Nørgaard and Holttinen’s multiturbine power curve approach [28]. 13 Chapter 3: Implementation Gridlab-D is made up of two primary components, the “Core” and the modules [1]. Modules are made up of classes that define different ways to analyze and describe distribution systems. The currently supported modules include power-flow, market, climate, and reliability. The Core connects these modules together, calculates their interactions, and executes optimizations. Gridlab-D’s Core is written in C, while the modules are written in C++. End users create and modify distribution system models by creating and connecting objects within plain-text GLM files. From the command line, users may open these GLM files with Gridlab-D. The model is then simulated, and the resulting output (if defined) is returned. The modelling language is very versatile; GLM files can be used to simulate systems as small as a single house (complete with appliances) or as large as an entire distribution system. Figure 6: System Load Time Series on a partly cloudy afternoon with (A) Low, (B) Moderate, and (C) Pervasive Solar Penetration. Plot D illustrates the solar intensity over this period. In the figure above, simulation results for various levels of solar power penetration within a neighborhood on a partly cloudy day are provided. This figure was created based on data generated by Gridlab-D. The model that generated these data contained a neighborhood of houses and solar panel objects, which are instances of classes that can be found in the residential and generator modules. In order to implement wind turbine models, a new class must be created within the generators module that interacts with the climate module. This is accomplished by creating new header and source files, modifying existing configuration and build files, and then rebuilding Gridlab-D. Compiling Gridlab-D Software development was carried out on a fresh installation of Ubuntu 12.04 LTS. The existing build process streamlines the compiling process on a variety of operating systems. A detailed description of the components required to build Gridlab-D—as well as build instructions—can be found in the Appendix. Once the automatic configuration process generates new configuration settings based on the current machine, automake compiles and installs the applications to the local machine. 14 Adding a Gridlab-D Class In order to add a class to an existing Gridlab-D module, the class must first be registered. Adding the class name to generators/Makefile.am ensures that it will be compiled alongside existing classes. To link a new generator class to the core, generators/init.cpp must be edited to include the new class as well. Finally, generators/generators.h must be updated to include the header file for the new class. After these steps are completed, work can begin on the source code of the class. Source Code Requirements The source code describes the calculations to be performed by the class, the ways that users can interact with the class, and how these calculations and interactions impact existing modules. The functions required by the Gridlab-D core are enumerated below [40]. 1. Create – This function is called once every time a new object (instance of a class) is declared within the input GLM or XML file. It contains default values for all user-defined parameters. 2. Init – This function is called after all objects have been created. When an aggregate model is used, it estimates the mean wind speed based on the usersupplied shape and scale of the wind speed distribution, and then updates the IIR weighted moving average filter parameter 𝛼. 3. Sync – This function is called after initialization, and repeatedly thereafter while the simulation executes. The bulk of the computation takes place inside of this function, and it returns a timestamp indicating when it should be called again. This mechanism allows the wind turbine model to update as often or as rarely as necessary. Auxiliary Functions The following auxiliary functions were created to supplement the functions required by Gridlab-D 1. Init_climate – This function connects the wind turbine model to an existing climate object. 2. Stir_gamma – This function is called from the Init function to approximate the average wind speed for the supplied distribution. 3. Lin_pow – This function returns the estimated power output for a given wind speed based on the user-supplied linear segmented model parameters. 4. Log_pow – This function returns the estimated power output for a given wind speed based on the user-supplied five-variable logistic model parameters. 5. Agg_lin_pow – This function calls Lin_pow for a normal distribution of wind speeds (based on user-supplied spatial standard deviation) and then combines the results with weights based on their probabilities. 6. Agg_lin_pow – This function calls Lin_pow for a normal distribution of wind speeds (based on user-supplied spatial standard deviation) and then combines the results with weights based on their probabilities. 15 Merging This Project with Gridlab-D The process for merging code changes with the source trunk involves contacting the project administrator to request access to the issue-tracking sites and code repository. Once write access is granted to the software management systems, a branch can be created. The code can be uploaded to the branch and then merged with the trunk after review. Currently, a fork (a modified copy of the complete source code) of Gridlab-D with the module described in this report resides in a public Github repository [41]. The fork can be compiled with the same build process as the original, because the source code repository includes build scripts that have been modified to reflect the additional wind turbine module. 16 Chapter 4: Verification, Validation, and Discussion When contributing to an open-source project, it is important to ensure the quality of the contribution. Validation and verification procedures must be followed in order to avoid issues upstream. Software validation is the act of assuring that the software fulfills its intended purpose, and software verification is the act of assuring that the software was written correctly. Boehm summarized these concepts concisely: To validate software, ask “Are we building the right product?” To verify is, ask “Are we building the product right?” [42] Software Verification Software verification was carried out continuously during development with static code analysis and unit testing. Once all functions were implemented, test models were written that supplied a sweep from low wind speeds to high. Because the class is composed of static models, this is sufficient to verify their functionality. Figure 7: Static Model Verification—The original power curve (top left) is used to generate linear and logistic models (bottom left). Synthetic wind data (top right) is swept from low to high, creating the power output estimation shown (bottom right). Starting with a 36-coordinate linear power curve from the National Renewable Energy Laboratory (NREL), a linear model with fewer parameters was created manually, as well as parameters for cut-in and cut-out. Shortly thereafter, a five parameter logistic model was parameterized with MATLAB’s lsqcurvefit solver. A function was designed that accepted five parameters and a vector of wind speeds. This function returned a vector of power estimations based on the supplied data. The parameters for this function were computed by passing the function to 17 lsqcurvefit alongside the existing pairs of wind-speed and power-output data shown in Figure 7. The resulting parameters for this and other logistic curve-fittings are available in the Appendix. Because the single-turbine models are static, verifying their operation was trivial. The multiple-turbine power curve approach discussed earlier does have a moving-average component that introduces dynamic behavior into the system, so verification of multiple-turbine power curves requires more realistic data. The data used for this portion of the verification process came from NREL. It was collected as part of the Eastern Wind dataset [43]. This data spans three years and includes wind and modeled power-output data-points. Each file represents a MWscale wind farm based on a collection of turbines with the nominal power curve shown in the previous example. Simply scaling the previously-modeled power curve by the number of turbines per farm would be a naïve way to estimate the power output, but the spatial and temporal distribution of the turbines prevents them from being combined so easily. The aggregate model compensates for this problem, at the cost of more parameters. Figure 8: Multiple Turbine Model Verification--Observed and Nominal Power Curves (top) and Power Output over Time (bottom). The impact of multiple turbines is slight for this dataset due to the low spatial standard deviation of wind (caused by low wind turbulence); however, the aggregate model’s ability to smooth out high-frequency speed changes allows it to estimate the 18 power output more accurately than the linear model during turbulent periods, as shown in Figure 8. Software Validation Because this project was added on to an existing platform, much of the software validation had already been done. Gridlab-D is already designed to accommodate users who design and operate distribution systems. While building the new wind class, a conscious effort was made to continue this accommodation. This effort is epitomized by the model selection process that focused on both ease of implementation and specificity. After the add-on was completed, retrospective validation was carried out by taking wind turbine data through the entire process. To understand the experience of an end-user, two tasks were undertaken. The first task was to extrapolate power output elsewhere from data collected during testing of the NREL CART 3 turbine. The data used in this portion of the validation process was provided by NREL, and it pertains to a three-bladed, 600kW wind turbine in Denver, Colorado. The figure below illustrates the observed data points and the results of a five-parameter logistic curve fit. Note that the deviation of the data from the centerline is much lower on a single turbine than it was on the previous multiple-turbine curve. Figure 9: Observed and Predicted Power Output of the NREL CART 3 Wind Turbine Once the parameters are defined, the system can be simulated as a part of Gridlab-D. Initially, the original meteorological data recorded on-site in Colorado was used to simulate data that would help contextualize other sites. This was accomplished by declaring a GLM file that contained a small distribution system with a wind turbine and a climate object. A logistic model was chosen for this wind turbine due to the ease of fitting a curve to this distribution when compared to manually choosing a linear representation. An automated piecewise-linear-fitting sub-function was 19 designed to facilitate the use of computer-generated linear models, but it does not converge as quickly as the logistic version. The climate object referenced a CSV file of meteorological data. With these sources, Gridlab-D was able to simulate a year of wind power generation. The result of this simulation was saved to disk and compared to the results of similar simulations using typical meteorological year (TMY) data from Seattle and San Francisco. The kernel-smoothed density estimation of the power output in each city is shown in the figure below. Figure 10: Distribution of Power Output for Denver, Seattle, and San Francisco The second task was to use the aggregate turbine model on real wind farm data. Dr. Barthelmie of the Indiana University Offshore Wind Energy Measurements Project provided access to a cluster of off-shore wind turbines outside of Copenhagen, Denmark. This wind farm, known as Middelgrunden, is home to 40 MW of power generation. The data has a slight problem with consistency. The farm has 21 windspeed and power sensors, but only 65.76% of the data-points feature all sensors reporting. The source of this reduction in information is unclear, but wind and power sensors drop out in unison so it is likely that individual turbines are being shut down and then brought back online. Aggregate model simulation begins just like single-turbine models: a model is chosen and then fitted to the existing data. For this task, the turbine with the highest availability (86.71%) was isolated as the sole source of training data for the logistic model. Despite this turbine’s high availability, the data has a few strange artifacts. In Figure 11, there exist a few peculiar straight lines leading out from the center of the linear region of the power curve. Because the power sensor maintains its level while the wind speed changes, this could be the result of a temporary change in power level or simply a sensor fault. After the power curve is defined, some additional aggregate model parameters must be defined. Nørgaard and Holttinen’s multi-turbine power curve approach suggests that the output of the farm is affected by both spatial and temporal distances, 20 so the model needs parameters to determine these impacts. The size of the wind farm is 3.457 km at its widest point. With this information and the average wind speed, this number could be used to calculate the average temporal distance in between turbines. The average wind speed is calculated based on shape and scale parameters supplied by the user. For this data, a call to MATLAB’s wblfit function returned a shape parameter of 2.0876 and a scale parameter of 7.343. The standard deviation of wind spatially across the farm was calculated based on simultaneous wind-speed readings at multiple nodes. Finally, the number of turbines (21) was added to the model. Figure 11: Observed Data and Logistic Fit for Middelgrunden Turbine . Figure 12: Estimated and Observed Power Output at Middelgrunden 21 Once the simulation was executed on Gridlab-D, the problems associated with middling availability began to become clearer. When all the turbines were up and running, the models correctly estimated the power output, but moments of lucidity would quickly fade as turbines were taken down and observed power output faded. The figure below sums up this phenomenon nicely. When the system is available, the aggregate model is an effective estimator, but the model does not consider system availability in its current state. Figure 13: The impact of turbine downtime on power output estimation. Curiously, the scaled model performs closer to the observed truth in Figure 12. The aggregate model is smoothing out the power curve too much, estimating too much power at low wind speeds, and too little at higher speeds. This is likely caused by an incorrect spatial standard deviation. The method mentioned at the beginning of this section may have been measuring the deviation of the wind speed sensors themselves instead of the variation of the wind. After all, the farm is situated on a broad, flat surface with little in the way of aerodynamic obstruction. It stands to reason that the variation of the wind across the entire farm is insignificant. A real-world investigation of this magnitude would include tweaking of the aggregate model parameters supplied to Gridlab-D (wind distribution and spatial deviation) to produce a more accurate estimation of the wind farm’s power output. Conclusion This report began by introducing the present abundance of carbon pollution, and acknowledging that a simple reduction in overall energy usage was not feasible solution. After discussing the historical and modern power grid, a bevy of smart grid concepts were introduced. In an effort to facilitate the analysis and comparison of proposed smart grid solutions that would encourage renewable energy production, wind turbine models 22 were investigated and four data-driven models were implemented in Gridlab-D: linearsegmented, five-variable logistic, aggregated linear-segmented, and aggregated fivevariable logistic. The linear segmented model was chosen to be human readable and easy to approximate with back-of-the-envelope calculations, while the five-variable logistic model facilitates computational estimation. The aggregate models applied temporal and spatial smoothing based on Nørgaard and Holttinen’s multi-turbine power curve approach, leading to a more accurate estimation of the power output of large, dispersed wind farms. Future work in this area could entail replicating existing distributed, renewable power simulations on the Gridlab-D platform. This would provide a standard testing ground for distribution grid solutions while informing the ongoing development of the platform. 23 References [1] Pacific Northwest National Laboratory, "GridLAB-D: A Unique Tool to Design the Smart Grid," PNNL, Richland, WA, 2012. [2] Edison Electric Institute, "Transmission," 2013. [Online]. Available: http://www.eei.org/issuesandpolicy/transmission/Pages/default.aspx. [Accessed 1 12 2013]. [3] N. Maze, "A Demand-Centric Approach to Energy Market Liberalization: Nurturing Sustainable Energy Consumption by Facilitating Market Forces," Cornell University, Ithaca, NY, 2012. [4] US Energy Information Administration, "Primary Energy Production by Source, 1949–2012," US Department of Energy, Washington, DC, 2012. [5] L. M. Beard, J. B. Cardell, I. Dobson, F. Galvan, D. Hawkins, W. Jewell, M. Kezunovic, T. J. Overbye, P. K. Sen and D. J. Tylavsky, "Key Technical Challenges for the Electric Power Industry and Climate Change," IEEE TRANSACTIONS ON ENERGY CONVERSION. [6] National Energy Technology Laboratory, "A Systems View of the Modern Grid," US Department of Energy, 2007. [7] S. Borenstein, M. Jaske and A. Rosenfeld, "Dynamic pricing, advanced metering, and demand response in electricity markets.," 2002. [8] J. Heckel, "SMART SUBSTATION AND FEEDER AUTOMATION FOR A SMART DISTRIBUTION," in 20th International Conference on Electricity Distribution, Prague, June 2009. [9] S. Sridhar, A. Hahn and M. Govindarasu, " Cyber–Physical System Security for the Electric Power Grid," Proceedings of the IEEE, vol. 100, no. 1, pp. 210-224, 2012. [10] V. S. K. M. Balijepalli, V. Pradhan, S. A. Khaparde and R. M. Shereef, "Review of Demand Response under Smart Grid Paradigm," IEEE PES Innovative Smart Grid Technologies – India, 2011. [11] J. Medina, N. Muller and I. Roytelman, "Demand Response and Distribution Grid Operations: Opportunities and Challenges," IEEE Transactions on Smart Grid, vol. 1, no. 2, pp. 193-198, 2010. [12] A. Woyte, V. V. Thong, R. Belmans and J. Nijs, "Voltage Fluctuations on Distribution Level Introduced by Photovoltaic Systems," IEEE Transactions on Energy Conversion, vol. 21, no. 1, 2006. [13] M. Gibescu, A. J. Brand and W. L. Kling, "Estimation of Variability and Predictability of Large-scale Wind Energy in The Netherlands," Wind Energy, vol. 12, no. 3, p. 241–260, April 2009. [14] J. Apt, "The spectrum of power from wind turbines," Journal of Power Sources, vol. 169, pp. 369-374, 2007. [15] G. Pepermans, J. Driesen, D. Haeseldonckx, W. D’haeseleer and R. Belmans, 24 "Distributed generation: definition, benefits and issues," Energy Policy, vol. 33, no. 6, pp. 787-798, 2009. [16] P. P. Reddy and M. M. Veloso, "Learned Behaviors of Multiple Autonomous Agents in Smart Grid Markets," in Proceedings of the Twenty-Fifth AAAI Congerence on Artificial Intelligence, 2011. [17] W. Ketter, J. Collins and C. A. Block, "Smart Grid Economics: Policy Guidance Through Competitive Simulation," ERIM Report Series Reference No. ERS-2010043-LIS., 2010. [18] M. B. Cain, R. P. O’Neill and A. Castillo, "History of Optimal Power Flow and Formulations," 2012. [19] R. D. Zimmerman and C. E. Murillo-Sanchez, "MATPOWER 4.1 User's Manual," 2011. [Online]. Available: http://www.pserc.cornell.edu//matpower/manual.pdf. [Accessed 12 2013]. [20] M. Conley, "Electricity Market Framework for Renewable and Distributed Generation," 2013. [21] B. Naama, H. Bouzeboudja and A. Allali, "Solving the Economic Dispatch Problem by Using Tabu Search Algorithm," Energy Procedia, vol. Volume 36, p. 694–701, 2013. [22] F. Glover, "Tabu Search—Part I," ORSA Journal on Computing, vol. 1, no. 3, pp. 190-206, 1989. [23] X. Li, F. Li and J. M. Clark, "Exploration of Multifrontal Method with GPU in Power Flow Computation," in Power and Energy Society General Meeting (PES), 2013 IEEE, Vancouver, BC, 2013. [24] North American Electric Reliability Corporation, "Reliability Concepts," 2007. [Online]. Available: http://www.nerc.com/files/concepts_v1.0.2.pdf. [Accessed 12 2013]. [25] V. A. Tucker, "A mathematical model of bird collisions with wind turbine rotors," Transactions - American Society of Mechanical Engineers Journal of Solar Energy Engineering, vol. 118, pp. 253-262. [26] P. Moriarty and S. Butterfield, "Wind turbine modeling overview for control engineers," in American Control Conference, St Louis, MO, 2009. [27] H. Zaman and H. Shakouri G, "A simple nonlinear mathematical model for wind turbine power maximization with cost constraints.," Energy, Power and Control (EPC-IQ), pp. 255-258, 2010. [28] P. Norgaard and H. Holttinen, "A multi-turbine power curve approach," in Nordic Wind Power Conference, 2004. [29] T. Petru and T. Thiringer, "Modeling of wind turbines for power system studies," IEEE Trans. Power Syst, vol. 17, no. 4, pp. 1132-1139, 2002. [30] L. C. Henriksen, "Model predictive control of a wind turbine," Doctoral dissertation, Technical University of Denmark, Lyngby, Denmark, 2007. [31] F. Gyulai, "Mathematical models for dynamic study of wind turbines," in The 6th International Conference on Hydraulic Machinery and Hydrodynamics, 25 Timisoara, Romania, 2004. [32] A. a. A.-L. O. a. B. G. a. J. N. Shafiu, "Aggregated wind turbine models for power system dynamic studies," Wind Engineering, vol. 30, no. 3, pp. 171-185, 2006. [33] K. Gai and C. Zhang, "Learning Discriminative Piecewise Linear Models with Boundary Points," in Proceedings of the Twenty-Fourth AAAI Conference on Artificial Intelligence, 2010. [34] P. G. Gottschalk and J. R. Dunn, "The five-parameter logistic: A characterization and comparison," Analytical Biochemistry, vol. 343, pp. 54-65, 2005. [35] G. Cardillo, "Five parameters logistic regression - There and back again," Mathworks, 6 9 2012. [Online]. Available: http://www.mathworks.com/matlabcentral/fileexchange/38043-five-parameterslogistic-regression-there-and-back-again/content/L5P.m. [Accessed 19 4 2014]. [36] "Five Parameter Logistic Curve," MyAssays.com, [Online]. Available: http://www.myassays.com/five-parameter-logistic-curve.assay. [Accessed 19 4 2014]. [37] STarStation Software, "STarStation Curve Fitting," [Online]. Available: http://www.appliedcytometry.com/docs/PD_035308_STarStation_Curve_Fitting.pdf. [38] N. L. Johnson, S. Kotz and N. Balakrishnan, Continuous univariate distributions. Vol. 1, Wiley Series in Probability and Mathematical Statistics: Applied Probability and Statistics (2nd ed.), New York: John Wiley & Sons, 1994. [39] M. Abramowitz and I. Stegun, Handbook of Mathematical Functions with Formulas, Graphs, and Mathematical Tables, USA: Dover Publications, 1999. [40] Sourceforge, "Sourceforge.net: Theory of Operation - gridlab-d," Dice Holdings, Inc, 17 April 2013. [Online]. Available: http://sourceforge.net/apps/mediawiki/gridlabd/index.php?title=Theory_of_operation. [Accessed 15 December 2013]. [41] N. Maze, "Noah-Maze/windlab-d," Github Inc., [Online]. Available: https://github.com/Noah-Maze/windlab-d/. [Accessed 30 4 2014]. [42] B. W. Boehm, Software risk management, IEEE Computer Society Press, 1989, 2008. [43] National Renewable Energy Laboratory, "Eastern Wind Methodology," [Online]. Available: http://www.nrel.gov/electricity/transmission/eastern_wind_methodology.html. [Accessed 1 12 2013]. [44] SourceForge, "SourceForge.net: Linux/Unix - gridlab-d," Dice Holdings, Inc, 12 November 2013. [Online]. Available: http://sourceforge.net/apps/mediawiki/gridlab-d/index.php?title=Linux/Unix. [Accessed 15 December 2013]. [45] Free Software Foundation, "Autoconf - GNU Project - Free Software Foundation (FSF)," 2009. [Online]. Available: http://www.gnu.org/software/autoconf/. 26 [Accessed 15 December 2013]. [46] Apache XML Project, "Xerces-C++ XML Parser," 2010. [Online]. Available: http://xerces.apache.org/xerces-c/. [Accessed 15 December 2013]. [47] N. Matloff, "Introduction to the Unix Curses Library," University of California at Davis, Davis, CA, 2011. [48] EIA, UN and DOE, "GDP versus Energy Use Per Capita Worldwide". [49] A. M. Foley, P. G. Leahy, A. Marvuglia and E. J. McKeogh, "Current methods and advances in forecasting of wind power generation," Renewable Energy, vol. 37, 2012. [50] M.-S. C. E., R. D. Zimmerman, C. L. Anderson and R. J. Thomas, "A Stochastic, Contingency-Based Security-Constrained Optimal Power Flow for the Procurement of Energy and Distributed Reserve.," Decision Support Systems, 2012. 27 Appendix Gridlab-D Prerequisites Before Gridlab-D can be compiled, the target system must have the following software [44]. 1. Autoconf GNU Autoconf generates configuration scripts that are used to adjust compilation based on detected system features [45]. Gridlab-D requires version 2.63 or higher. 2. Xerces-C Xerces-C is an XML parser that simplifies software interaction with XML files [46]. This software can be found in the “third_party” folder of the source repository. 3. Curses Curses is a control library that simplifies terminal interaction by standardizing the way that software interacts with a broad variety of terminals [47]. It is preinstalled on most linux systems. 4. Subversion Subversion is a software revision control system. While not strictly required for the build process, Gridlab-D’s source code is hosted on Sourceforge.com and managing code with Subversion is the most efficient way to access it. Gridlab-D Build Procedure Once the prerequisites are installed, building Gridlab-D is straightforward. The build must be reconfigured, compiled, and installed. The code below (reproduced from [44]) summarizes this process. host% svn checkout https://svn.code.sf.net/p/gridlab-d/code//tree workdir host% cd workdir host% autoreconf -isf ... a few messages ... host% ./configure ... many messages followed by the installed component report ... host% make ... huge number of messages ... ... *** will preceded final build error report ... host% sudo make install ... lots of messages ... host% gridlabd --version ... check the version ... host% cd workdir Table of Logistic Parameters Generator A B Nominal IEC 2.003 -13.684 Turbine 28 C D G 10.125 -0.013 0.228 Derived IEC Turbine Single Turbine Middelgrunden Weaver Wind Turbine NREL Cart 3 0.1000 4.0958 11.2427 642.2300 2.9877 34511 -10.0072 11.1017 -376.8661 0.2845 1771.4 -150 19.4 -12.9 0.0000 565.3440 -8.2656 12.2358 -6.1141 0.3631 Gridlab-D Compatible Timestamped Weather CSV #Wind Turbine Test Standard Weather File $state_name=CO $city_name=Denver $lat_deg=12 $lat_min=34 $long_deg=12 $long_min=34 $timezone_offset=0 temperature,wind_speed,pressure #month:day:hour:minute:second 10:12:16:06:05,32,9.707,1000 10:13:18:02:34,32,6.139,1000 10:13:18:52:34,32,10.735,1000 10:25:03:03:13,32,5.891,1000 10:25:03:13:13,32,5.572,1000 11:05:23:50:41,32,8.371,1000 11:15:04:18:12,32,11.869,1000 11:15:04:28:12,32,11.236,1000 11:22:20:52:05,32,9.366,1000 02:21:17:25:33,32,12.609,1000 02:21:17:35:33,32,12.640,1000 02:21:17:45:33,32,14.495,1000 03:12:17:17:03,32,11.683,1000 …etc… 29