Execution Flow in GridDyn

Slides:



Advertisements
Similar presentations
CS 450 Module R4. R4 Overview Due on March 11 th along with R3. R4 is a small yet critical part of the MPX system. In this module, you will add the functionality.
Advertisements

© Janice Regan, CMPT 102, Sept CMPT 102 Introduction to Scientific Computer Programming The software development method algorithms.
Functions.
1 Frameworks. 2 Framework Set of cooperating classes/interfaces –Structure essential mechanisms of a problem domain –Programmer can extend framework classes,
XSL Unit 6 November 2. XSL –eXtensible Stylesheet Language –Basically a stylesheet for XML documents XSL has three parts: –XSLT –XPath –XSL-FO.
Recursion.
Guide To UNIX Using Linux Third Edition
Introduction to Unix (CA263) Introduction to Shell Script Programming By Tariq Ibn Aziz.
Programming For Nuclear Engineers Lecture 12 MATLAB (3) 1.
1 Integrated Development Environment Building Your First Project (A Step-By-Step Approach)
M. Taimoor Khan * Java Server Pages (JSP) is a server-side programming technology that enables the creation of dynamic,
Introduction to Shell Script Programming
Working Out with KURL! Shayne Koestler Kinetic Data.
® IBM Software Group © 2009 IBM Corporation Rational Publishing Engine RQM Multi Level Report Tutorial David Rennie, IBM Rational Services A/NZ
Spreadsheet-Based Decision Support Systems Chapter 22:
Basic Pspice Instructions Stuart Tewksbury
ALLIANCE Administration 20 Oct 2009 (Based on Release 2.2) Michaël Petit.
1 Functions 1 Parameter, 1 Return-Value 1. The problem 2. Recall the layout 3. Create the definition 4. "Flow" of data 5. Testing 6. Projects 1 and 2.
CS 320 Assignment 1 Rewriting the MISC Osystem class to support loading machine language programs at addresses other than 0 1.
CSIS 123A Lecture 9 Recursion Glenn Stevenson CSIS 113A MSJC.
An Introduction to Designing and Executing Workflows with Taverna Aleksandra Pawlik materials by: Katy Wolstencroft University of Manchester.
6 th Annual Focus Users’ Conference 6 th Annual Focus Users’ Conference Import Testing Data Presented by: Adrian Ruiz Presented by: Adrian Ruiz.
] COREY PEARSON [ ASUG INSTALLATION MEMBER MEMBER SINCE: 2008 CHAVONE JACOBS [ ASUG INSTALLATION MEMBER MEMBER SINCE: 2003 ALLAN FISHER [ ASUG INSTALLATION.
XP New Perspectives on XML, 2 nd Edition Tutorial 7 1 TUTORIAL 7 CREATING A COMPUTATIONAL STYLESHEET.
Programming Errors. Errors of different types Syntax errors – easiest to fix, found by compiler or interpreter Semantic errors – logic errors, found by.
Lecture 7 Conditional Scripting and Importing/Exporting.
Sequential Processing to Update a File Please use speaker notes for additional information!
Debugging Lab Antonio Gómez-Iglesias Texas Advanced Computing Center.
Statistical process model Workshop in Ukraine October 2015 Karin Blix Quality coordinator
FILES AND EXCEPTIONS Topics Introduction to File Input and Output Using Loops to Process Files Processing Records Exceptions.
Chapter 2 Build Your First Project A Step-by-Step Approach 2 Exploring Microsoft Visual Basic 6.0 Copyright © 1999 Prentice-Hall, Inc. By Carlotta Eaton.
Emdeon Office Batch Management Services This document provides detailed information on Batch Import Services and other Batch features.
SOFTWARE TESTING TRAINING TOOLS SUPPORT FOR SOFTWARE TESTING Chapter 6 immaculateres 1.
LINGO TUTORIAL.
PowerWorld Case Validation
Product Training Program
Chapter 13 Recursion Copyright © 2016 Pearson, Inc. All rights reserved.
NETSTORM.
The Little man computer
Chapter 2: The Visual Studio .NET Development Environment
Component 1.6.
MARC extensions Yoel Kortick | Senior Librarian
Digital Assets Module Services adam-01 and adam-02 versions 17 and up
Work report Xianghu Zhao Nov 11, 2014.
DATA STRUCTURES AND OBJECT ORIENTED PROGRAMMING IN C++
Creating Custom Conversion Themes
Lecture 25 More Synchronized Data and Producer/Consumer Relationship
Software Testing With Testopia
Data Structures Recursion CIS265/506: Chapter 06 - Recursion.
Assembler Design Options
Exception Handling Chapter 9.
Topics Introduction to File Input and Output
Programming Logic and Design Fourth Edition, Comprehensive
Building Web Applications
CISC101 Reminders Assn 3 due tomorrow, 7pm.
Accurate Fault Location Using Modeling and Simulation
Electronics II Physics 3620 / 6620
Tonga Institute of Higher Education
CISC101 Reminders Assignment 3 due next Friday. Winter 2019
Rational Publishing Engine RQM Multi Level Report Tutorial
Running a Java Program using Blue Jay.
CST8177 Scripting 2: What?.
M. Kezunovic (P.I.) S. S. Luo D. Ristanovic Texas A&M University
Topics Introduction to File Input and Output
CISC101 Reminders Assignment 3 due today.
Chapter 13 Recursion Copyright © 2010 Pearson Addison-Wesley. All rights reserved.
SPL – PS1 Introduction to C++.
Presentation transcript:

Execution Flow in GridDyn GridDyn Documents Philip Top

Outline Execution Flow GridDyn Operational States Executable: GridDynMain Options and control File Types Simple power flow XML example File Read and model construction Power flow initialization Power Flow Simple Dynamic XML example Dynamic Initialization Dynamic Calculation Output

Execution Flow: States in GridDyn Startup Unloaded or loaded and not initialized Initialized Successfully completed powerflow initialization PowerFlow Complete Dynamic Initialized Successfully completed dynamic initialization initialize Initialize powerflow Dynamic solve Halted Not really used May be removed Dynamic Partial Solver Unable to continue on its own Dynamic Complete Error Unrecoverable error

GridDynMain Does two things ./gridDynMain [arguments] filename Run a simulation Load a simulation and spit out some information (MPI count, counts, help, version, etc) ./gridDynMain [arguments] filename Common arguments --flags=[gridDynFlags] //any flags used by gridDyn --powerflow-output=[filename] //save the powerflow results to a file[csv, binary, xml?] --powerflow-only //only run the power flow -- help --param ParamName=<val> //setting simulation parameters(TODO) --dir= add a search directory for input files --script = script file // [TO BE ADDED] but will allow scripting of griddyn actions and outputs

GridDynMain: Process Setup load Run Cleanup Load sub libraries Create the root simulation object Parse arguments load Process arguments (settings, flags, parameters, files, definitions) Load input files (by main input argument or import statements) Run Run the simulation (unless told not to) Cleanup Generate any extra output Cleanup any libraries

Loading files: though gridDynRunner Available File Type: Cdf: common data format Raw/dyr : pss/e files PTI : old pss/e files before it was bought by Seimens Csv : data entry in a csv file (pretty flexible) useful when you have a lot of objects Uct : Eurostag files EPC: PSLF files M files : both matpower, matdyn and PSAT files PSP :: some other format XML Most flexible input designed around Griddyn. Not intended to be used elsewhere Common use is to load most data through another file type and put the extra custom stuff in through XML. Other potential inputs get built as need arises (ODM, CIM, JSON, AUX, etc)

2 Bus Example Line properties R=0.0839 X=0.51833 B=0.127 V2=? P=? A2=? Q=? V2=? A2=? V=1.05 A=0 deg 1.15+j0.31 0.45+j0.2

Input File in XML <?xml version="1.0" encoding="utf-8"?> <griddyn name="2bus_test" version=“1"> <bus name="bus1"> <type>SLK</type> <angle>0</angle> <voltage>1.05</voltage> <generator name="gen1"> </generator> <load name="load1"> <P>1.05</P> <Q>0.31</Q> </load> </bus> <bus name="bus2"> <load name="load2"> <P>0.45</P> <Q>0.2</Q> … … <link from="bus1" name="bus1_to_bus2" to="bus2"> <b>0.127</b> <r>0.0839</r> <x>0.51833</x> </link> <flags>powerflow_only</flags> </griddyn>

Input File in XML XML and test case information <?xml version="1.0" encoding="utf-8"?> <griddyn name="2bus_test" version=“1"> <bus name="bus1"> <type>SLK</type> <angle>0</angle> <voltage>1.05</voltage> <generator name="gen1"> </generator> <load name="load1"> <P>1.15</P> <Q>0.31</Q> </load> </bus> <bus name="bus2"> <load name="load2"> <P>0.45</P> <Q>0.2</Q> … … <link from="bus1" name="bus1_to_bus2" to="bus2"> <b>0.1273164</b> <r>0.083931984</r> <x>0.518336712</x> </link> <flags>powerflow_only</flags> </griddyn> Define Bus 1 with generator and load SLK to fix the angle and voltage Define Bus 1 with generator and load SLK to fix the angle and voltage

Input File in XML Define the Link between bus1 and bus2 <?xml version="1.0" encoding="utf-8"?> <griddyn name="2bus_test" version=“1"> <bus name="bus1"> <type>SLK</type> <angle>0</angle> <voltage>1.05</voltage> <generator name="gen1"> </generator> <load name="load1"> <P>1.15</P> <Q>0.31</Q> </load> </bus> <bus name="bus2"> <load name="load2"> <P>0.45</P> <Q>0.2</Q> … … <link from="bus1" name="bus1_to_bus2" to="bus2"> <b>0.1273164</b> <r>0.083931984</r> <x>0.518336712</x> </link> <flags>powerflow_only</flags> </griddyn> Define the Link between bus1 and bus2 Any additional simulation information

Execution ./griddynMain two_bus_example.xml --powerflow-output=twobusout.csv Output on Screen area count =0 busses=2 links= 1 gens= 1 (startup)[sim]::GridDyn version 0.50 2016-2-10 (startup)[sim]::Initializing Power flow to time -0.001000 (-0.001)[sim]::saving csv powerflow to twobusout.csv Simulation GridDynSimulation executed in 0.0075812 seconds simulation final Power flow statesize= 4, 10 non zero elements in Jacobian

Solution output basepower=100.000000 Area # Bus # Bus name voltage(pu) angle(deg) Pgen(MW) Qgen(MW) Pload(MW) Qload(MW) Plink(MW) Qlink(MW) 1 "bus1" 1.05 -162.377 -53.607 115 31 47.3769 22.6065 2 "bus2" 0.891033 -13.6449 45 20 -45 -20 Which happens to match the solution in the textbook I took this problem from: Electric Energy Systems Theory by Olle Elgerd 2nd Edition Example 7-7

2 Bus Example Line properties R=0.0839 X=0.51833 B=0.127 P =1.624 Q=.536 V2=0.891 A2=-13.645 deg V=1.05 A=0 deg 1.15+j0.31 0.45+j0.2 P =.474 Q=.226 P =.45 Q=.2

Execution Flow: Model Construction Load File Detect file type based on extension Call appropriate read function Find any setup information: simulation names, definitions, libraries, basepower, etc Read and load any imported files with no dependencies Create areas, then busses Load any other subobjects (Links, relays, etc) Read the simulation information (start times, actions, outputs, etc) Load imports with dependencies Load the solver information Finalize and cleanup

Execution Flow: Model Construction (Notes) Busses and areas are always created ahead of other objects All other objects should not reference other objects which are not defined ahead of it in the XML file. Any gridSecondary or gridSubModels defined inside a parent element(XML) are created at that time the parent is created The xml relies on the objectFactory(s) for building the correct object and uses a number of templates Uses tinyxml as the default XML reader, tinyxml2 also available, and a json interpreter is also functional

Execution Flow: States in GridDyn Startup Unloaded or loaded and not initialized Initialized Successfully completed powerflow initialization PowerFlow Complete Dynamic Initialized Successfully completed dynamic initialization initialize Initialize powerflow Dynamic solve Halted Not really used May be removed Dynamic Partial Solver Unable to continue on its own Dynamic Complete Error Unrecoverable error

Execution Flow: Powerflow Initialization Execute any events that occur before t0 Run pflowInitializeA on all objects All objects should know how big their state information is at this point Setup and initialize the default solver Check the Network for issues Call pflowInitializeB Objects should be ready to go with a first guess

Execution Flow: powerflow makeReady() Power Balance Loop Measure Flow adjustment Loop Adjust Gen Levels Guess Solve* Check/adjust* Do Final stuff * Will get into more detail in later

Dynamic input Add a dynamic model to the generator <?xml version="1.0" encoding="utf-8"?> <griddyn name="2bus_test" version="0.0.1"> <bus name="bus1"> <type>SLK</type> <angle>0</angle> <voltage>1.05</voltage> <generator name="gen1"> <dynmodel>typical</dynmodel> <pmax>4</pmax> </generator> <load name="load1"> <P>1.15</P> <Q>0.31</Q> <event>@1|p=1.1</event> </load> </bus> <bus name="bus2"> <load name="load2"> <P>0.45</P> <Q>0.2</Q> … … <link from="bus1" name="bus1_to_bus2" to="bus2"> <b>0.127</b> <r>0.0839</r> <x>0.51833</x> </link> <timestop>10</timestop> <recorder period=0.05 field="auto"> <file>twobusdynout.csv</file> </recorder> </griddyn> Remove the powerflow only flag -add a recorder -add a stop time Add an event: change the load real power to 1.1 at time=1.0 s

Execution ./griddynMain two_bus_dynamic_example.xml Output on Screen area count =0 busses=2 links= 1 gens= 1 (startup)[sim]::GridDyn version 0.28 2016-2-10 (startup)[sim]::Initializing Power flow to time -0.001000 (-0.001)[sim]::Initializing Dynamics to time 0.000000 (10)[sim]::saving recorder output:twobusdynout.csv Simulation GridDynSimulation executed in 0.10127 seconds simulation final Dynamic statesize= 15, 60 non zero elements in Jacobian

Dynamic Results

Dynamic Results

Dynamic Results

Execution Flow: States in GridDyn Startup Unloaded or loaded and not initialized Initialized Successfully completed powerflow initialization PowerFlow Complete Dynamic Initialized Successfully completed dynamic initialization initialize Initialize powerflow Dynamic solve Halted Not really used May be removed Dynamic Partial Solver Unable to continue on its own Dynamic Complete Error Unrecoverable error

Execution Flow: Dynamic Initialization Make sure power flow has been run and completed Run dynInitializeA on all objects All objects should know the size of their dynamic state information and number of root finding functions is at this point Initialize the default dynamic solver information and set up Root finding Call pflowInitializeB Objects should be ready to go with a first guess Call any events at time0, set up state recorders

Execution Flow: dynamic calculation Calculation Initial conditions While time<timeStop Find next event time While time<next Event Time Solve* Check for roots Deal with any issues: reset if necessary* Save state to objects Deal with events: reset if necessary* finalize * Will get into more detail later

Execution Flow: Output Power flow output State and jacobian can output at regular intervals Recorders to capture all sorts of properties of objects Binary and CSV output Configurable (start, stop, units) Saved after specified number of points or when dynamic calculations are done and time > timeStop, or when simulation is destroyed.