Post on 31-Mar-2021
transcript
IOWA STATE UNIVERSITY
Final Report GE PTOOLs sdmay 1204
Cody Westlund, Tyler Thein, Brad Schmickley, Brent Jasperson, Michael Johnson
4/23/2012
2
Title of Contents
Project Plan……………………………………………………………………………………………………………………………….3
Design Document…………………………………………………………………………………………………………………………9
User Guide…………………………………………………………………………………………………………………………………36
3
GE PTOOLs UPGRADE
Project Plan
May12-04
Client: Bruno Leonardi, GE Energy
Advisor: Venkataramana Ajjarapu
Michael Johnson, Brent Jasperson, Brad Schmickley, Tyler Thein,
Cody Westlund
18 April 2012
4
Table of Contents Problem Statement ..................................................................................................................................... 5
System Block Diagram................................................................................................................................. 5
System Description ..................................................................................................................................... 5
Operating Environment .............................................................................................................................. 6
WCA User Interface Description ................................................................................................................. 6
Design Requirements .................................................................................................................................. 6
Functional Requirements (PTOOLs) ........................................................................................................ 6
Functional Requirements (WCA Tool) ..................................................................................................... 6
Market and Literature Survey ..................................................................................................................... 6
Deliverables ................................................................................................................................................ 8
Work Breakdown Structure ........................................................................................................................ 8
Resource Requirements .............................................................................................................................. 8
Project Schedule ......................................................................................................................................... 8
Risks ............................................................................................................................................................ 8
5
Problem Statement
PTOOLs is an in-house plotting tool for dynamic simulations from GE’s power system analysis software,
PSLF. Ultimately, GE would like PTOOLs to become a commercially available product. To reach this goal,
certain functionalities must be added to PTOOLs, and some features need to be improved. In its current
state, PTOOLs cannot read large plot files (>10MB) and can only plot six functions at a time. This limits
the size of power systems that can be simulated and affects the value of PTOOLs to operators of large
systems.
GE would also like to have a Worst Case Analysis (WCA) Tool implemented, which monitors system
variables and reports violations of user defined parameters. This will involve creating a user friendly
interface, along with the different software functionalities to make this a usable analysis tool.
System Block Diagram
System Description
PTOOLs is a MATLAB-based software application that graphically interprets time-based system output
files from PSLF (.CHF files). PTOOLs has four basic graphing functions, in addition to a number of
analyzing functions. The four graphing functions include interactive mode, layout setup mode, layout
viewer mode, and batch mode.
The interactive mode allows the user to view up to six variables in one time (x-axis) vs. variable (y-axis)
graph. In this mode, the user can place different markers on the graph to find specific outputs.
The layout setup mode is available to help a user determine how to place several different graphs on to
one page for reporting purposes. This also allows the user to set up and save several different page
layouts. The layout viewer mode then lays out all of the different graphs to be simultaneously viewable
for comparison. Additional markers may be placed on graphs in this mode.
The batch mode is used to record a set of steps in PTOOLs and then saves that sequence of steps to be
used again. The advantage of this is, when small changes are made in PSLF and a new .CHF file is
created, a user can quickly obtain a new set of graphs to compare to other results.
PSLF Analyzes Power
System
User Inputs Power
System Parameters
Output Results of
Power System Analysis
PTOOLS Graphical
Interpretation of Output
6
Operating Environment
PTOOLs operates in Windows using the MATLAB programming language. The supported version for
MATLAB is 2009b or later.
WCA User Interface Description
This interface will need to take in user inputs for the worst case analysis. These would include:
Channel type to monitor
Transient upper limits and lower limits
Violation time durations
Post transient upper and lower limits
The interface would also give the ability to filter out different buses by:
Base kV
Area
Zones
Bus names
The interface will also include a sample graph to help demonstrate what the input values are.
Design Requirements
Functional Requirements (PTOOLs) Currently, PTOOLs has difficulty opening files larger than 10MB. It is common to generate files much
larger than this when simulating large power systems. The maximum readable file size will be increased
to 120+ MB.
Functional Requirements (WCA Tool) The Worst Case Analysis (WCA) Tool will monitor system variables and reports violations of user defined
parameters. The requirements for this tool are as follows:
o The system shall allow the user to load CHF files
The system shall inform the user in the event the specified CHF file cannot be
loaded.
o The system shall allow the user to customize the settings (herein known as criteria )for a
WCA run
o The system shall allow the user to name, save, and load the settings for a WCA run.
o The system shall allow the user to select a different category for each CHF file loaded.
o The system shall allow the user to create multiple categories.
7
o Each category shall allow options for sub-transient, transient, and post-transient
violations. Each of the three types of violations shall allow the user to:
Set the upper and lower limit of violations.
The upper and lower limits shall be positive numeric values.
Specify the upper and lower limits as a function of the initial value or a specified
value.
Specify a duration for the violation
The duration shall be a positive numeric value
Specify a time range in which to search for a violation.
The time range shall be greater than 0 seconds/cycles.
The beginning time shall be less than the end time.
o The system shall allow the user to filter buses by area, zone, and bus.
o The system shall allow the user to add and remove (e.g. select) areas, zones, and buses.
o The system shall allow the user to filter the buses by kV range.
The system shall allow the user to specify a starting and ending point for the kV
range.
The minimum and maximum for the kV range shall be numeric values.
o The system shall allow the user to save and load the analysis.
The system shall inform the user in the event a criteria cannot be saved or
loaded.
o The system shall allow the user to view the results of the analysis with the supplied
criteria.
The resulting output shall display the number of violations and the worst
violation for each bus.
o The system shall allow the user to access a “Help” menu.
o The system shall allow the user to exit the WCA Tool.
Market and Literature Survey
GE’s direct competitor for PSLF is Siemens’ Power System Simulator for Engineering (PSS/E). PTOOLs will
have to compete with PSS/E’s Dynamic Simulation Plotting Package.
PSS/E has the following capabilities:
Power Flow
Optimal Power Flow
Balanced or Unbalanced Fault Analysis
Dynamic Simulation
Extended Term Dynamic Simulation
Open Access and Pricing
Transfer Limit Analysis
8
Deliverables
Updated PTOOLs software with:
Increased read in file size
Increase in plotted variables
Worst Case Analysis tool
Report summarizing all of the changes made to the PTOOLs source code
Work Breakdown Structure
We will start with two electrical engineers (Tyler & Mike) and one software engineer (Cody) working on
the WCA Tool, as there will be a need for a greater knowledge in the power field to understand the basis
for this tool. Meanwhile, another electrical engineer (Brent) and software engineer (Brad) will start
figuring out why the input file size is limited and why the limit is set at 6 for plotting variables.
Resource Requirements
The project will require access to PSLF along with the software and code for PTOOLs. The project will
also require MATLAB. There are no monetary requirements for this project.
Project Schedule
December & January – WCA Tool & Input file size limitations
February – Plotting multiple variables & testing WCA Tool
March – Batch processing improvements
April – Testing of all requirements writing of reports
Risks
The limited amount of time we have do to the delayed delivery of the PTOOLs code could make any
hang ups detrimental to our project schedule.
9
Final Report
GE PTOOLs sdmay 1204
Advisor: Venkataramana Ajjarapu
4/23/2012
Design Document
10
Contents Problem Statement ..................................................................................................................................... 5
System Block Diagram................................................................................................................................. 5
System Description ..................................................................................................................................... 5
Operating Environment .............................................................................................................................. 6
WCA User Interface Description ................................................................................................................. 6
Design Requirements .................................................................................................................................. 6
Functional Requirements (PTOOLs) ........................................................................................................ 6
Functional Requirements (WCA Tool) ..................................................................................................... 6
Market and Literature Survey ..................................................................................................................... 7
Deliverables ................................................................................................................................................ 8
Work Breakdown Structure ........................................................................................................................ 8
Resource Requirements .............................................................................................................................. 8
Project Schedule ......................................................................................................................................... 8
Risks ............................................................................................................................................................ 8
Table of Figures ......................................................................................................................................... 12
Project Overview ...................................................................................................................................... 13
Executive Summary ............................................................................................................................... 13
Acknowledgement ................................................................................................................................ 13
Problem Statement ............................................................................................................................... 13
Operating Environment ........................................................................................................................ 13
Intended Users and Uses ...................................................................................................................... 14
Limitations ............................................................................................................................................ 14
Expected End Product and Other Deliverables ..................................................................................... 14
Design Requirements ................................................................................................................................ 14
Functional Requirements (PTOOLs) ...................................................................................................... 14
Functional Requirements (WCA Tool) ................................................................................................... 14
Non-Functional Requirements .............................................................................................................. 15
Constraints ............................................................................................................................................ 15
Detailed Design ......................................................................................................................................... 15
Software ............................................................................................................................................... 15
Software Architecture ....................................................................................................................... 16
11
Standards .................................................................................................................................................. 16
Process Improvement Plan ................................................................................................................... 16
Methods, Tools and Techniques ........................................................................................................... 17
Product Acceptance Plan ...................................................................................................................... 17
Estimation Plan ..................................................................................................................................... 17
MATLAB Coding Standards ................................................................................................................... 18
Naming Conventions ......................................................................................................................... 18
Files and Organization ....................................................................................................................... 18
Statements ........................................................................................................................................ 19
General ............................................................................................................................................. 19
Layout, Comments and Documentation ........................................................................................... 19
White Space ...................................................................................................................................... 19
Comments ......................................................................................................................................... 20
Uses Cases ................................................................................................................................................ 20
1. Open WCA Tool ................................................................................................................................. 20
2. Load Data Sets .................................................................................................................................. 21
3. Save Criteria ...................................................................................................................................... 22
4. Load Criteria ...................................................................................................................................... 22
5. Run Analysis ...................................................................................................................................... 23
6. View Results ...................................................................................................................................... 23
7. Help Screen ....................................................................................................................................... 24
8. Add Area(s) ....................................................................................................................................... 24
9. Remove Area(s) ................................................................................................................................. 25
10. Add Zone(s) ..................................................................................................................................... 25
11. Remove Zone(s) .............................................................................................................................. 25
12. Add Bus(es) ..................................................................................................................................... 26
13. Remove Bus(es)............................................................................................................................... 26
Design Decisions ....................................................................................................................................... 27
File Size Limitation ................................................................................................................................ 27
Implementing the GUI .......................................................................................................................... 28
Graphical User Interface Layout ........................................................................................................... 28
Implementing Criteria Parameter Interface .......................................................................................... 29
12
Implementing WCA Algorithm .............................................................................................................. 29
runWCA ............................................................................................................................................. 29
violationCheck................................................................................................................................... 30
Implementing Filters ............................................................................................................................. 30
System and Unit Level Testing Cases ........................................................................................................ 31
GUI Testing........................................................................................................................................ 31
Analysis Algorithm Testing ................................................................................................................ 33
Resources.................................................................................................................................................. 34
Resources .............................................................................................................................................. 34
Tasks ..................................................................................................................................................... 34
Closure Material ....................................................................................................................................... 34
Project Team Information ..................................................................................................................... 34
Glossary .................................................................................................................................................... 35
_Toc322962464
Table of Figures Figure 1 Software Architecture ................................................................................................................. 16
Figure 2 Project Schedule ......................................................................................................................... 17
Figure 3 : Filter Flow Chart ........................................................................................................................ 31
Figure 4: newBuses Flow Chart ................................................................................................................. 31
13
Project Overview
Executive Summary As the United States’ dependency on electricity has increased over the years, the need to develop software programs to monitor this usage has as well. To address this need, General Electric (GE) has developed a power system analysis tool called Positive Sequence Load Flow (PSLF). This
application can easily simulate large-scale power systems with up to 60,000 buses. GE has developed another tool called PTOOLs that imports data from PSLF and graphically displays this data.
PTOOLs is a time domain visualization tool used to visualize transient stability simulations in power systems. It is intended to provide the basis for the next generation of visualization tools developed at GE. PTOOLs is still in development and is not a part of the PSLF package. In collaboration with GE,
Iowa State University has formed a senior design team to aid in the development of PTOOLs.
This document highlights the design process for the project. The challenges addressed in this project will help GE investigate new approaches for the tool and offer the students an opportunity to work on a real world problem.
Acknowledgement Bruno Leonardi – General Electric contact – Provides advice on project management as well as
technical support
Sajjad Mahmood – General Electric contact – Provides technical support for PTOOLS
Venkataramana Ajjarapu – Faculty Advisor – Provides advice on project management as well as
technical support
Kunjal Yagnik – Research Assistant – Providing guidance with PSLF
Problem Statement PTOOLs is an in-house plotting tool for dynamic simulations from GE’s power system analysis software,
PSLF. Ultimately, GE would like PTOOLs to become a commercially available product. To reach this goal,
certain functionalities must be added to PTOOLs, and some features need to be improved. In its current
state, PTOOLs cannot read large plot files (>10MB) and can only plot six functions at a time. This limits
the size of power systems that can be simulated and affects the value of PTOOLs to operators of large
systems.
GE would also like to have a Worst Case Analysis (WCA) Tool implemented, which monitors system
variables and reports violations of user defined parameters. This will involve creating a user friendly
interface, along with the different software functionalities to make this a usable analysis tool.
Operating Environment PTOOLs operates in Windows using the MATLAB programming language. The supported version for Java
is version 1.6 or later, and the supported version for MATLAB is 2009b or later.
14
Intended Users and Uses The intended users of PSLF are employees of General Electric. GE also has plans of commercializing the
product. Employees currently use the tool to show a graphical interpretation of PSLF outputs.
Limitations Project is starting very late, which presents the concern that it will not be completed in the
allotted time frame.
The combined experience developing in MATLAB is low, which presents a learning curve and a
hindrance in the fluidity of coding.
Expected End Product and Other Deliverables Updated PTOOLs software with:
Increased read in file size
Worst Case Analysis tool
Improved batch processing function
Report summarizing all of the changes made to the PTOOLs source code
Design Requirements
Functional Requirements (PTOOLs) Currently, PTOOLs has difficulty opening files larger than 10MB. It is common to generate files much
larger than this when simulating large power systems. The maximum readable file size will be increased
to 120+ MB.
Functional Requirements (WCA Tool) The Worst Case Analysis (WCA) Tool will monitors system variables and reports violations of user
defined parameters. The requirements for this tool are as follows:
o The system shall allow the user to load CHF files
The system shall inform the user in the event the specified CHF file cannot be
loaded.
o The system shall allow the user to customize the settings (herein known as criteria )for a
WCA run
o The system shall allow the user to name, save, and load the settings for a WCA run.
o The system shall allow the user to select a different category for each CHF file loaded.
o The system shall allow the user to create multiple categories.
o Each category shall allow options for sub-transient, transient, and post-transient
violations. Each of the three types of violations shall allow the user to:
Set the upper and lower limit of violations.
The upper and lower limits shall be positive numeric values.
15
Specify the upper and lower limits as a function of the initial value or a specified
value.
Specify a duration for the violation
The duration shall be a positive numeric value
Specify a time range in which to search for a violation.
The time range shall be greater than 0 seconds/cycles.
The beginning time shall be less than the end time.
o The system shall allow the user to filter buses by area, zone, and bus.
o The system shall allow the user to add and remove (e.g. select) areas, zones, and buses.
o The system shall allow the user to filter the buses by kV range.
The system shall allow the user to specify a starting and ending point for the kV
range.
The minimum and maximum for the kV range shall be numeric values.
o The system shall allow the user to save and load the analysis.
The system shall inform the user in the event a criteria cannot be saved or
loaded.
o The system shall allow the user to view the results of the analysis with the supplied
criteria.
The resulting output shall display the number of violations and the worst
violation for each bus.
o The system shall allow the user to access a “Help” menu.
o The system shall allow the user to exit the WCA Tool.
Non-Functional Requirements As an in-house tool, the client was not concerned with security, performance, or other non-functional
specifications at this time.
Constraints The WCA Tool has the following constraints:
o The system shall be developed in MATLAB and compatible with build 2009b or later.
o The project must be completed by the end of the semester
Detailed Design
Software PTOOLs is written in MATLAB. We will be creating the WCA Tool, which will spawn another UI upon a
button click. While in PTOOLS, all communication from the Java GUI will interact with the current
PTOOLs session via the MatlabControl Java API.
16
Software Architecture
Figure 1 Software Architecture
Standards This section outlines the Project Management standards we followed throughout our project. The
following standards are outlined from the IEEE Project Management Standards.
Process Improvement Plan Every week we met with Dr. Ajjarapu and GE to examine the implementation and the improvements to
our project to determine which processes can be improved. How we did this was by speaking with the
client and our advisor and determining the best plan of action for each week. Early on we discovered
each other's skill set and worked in smaller groups on definitive tasks. During our group meetings we
would discuss any problems we ran into, what the improvements or updates were, and debated what
improvements shall be made for the upcoming week. It was very important to follow this standard
because the requirements would periodically change and early ideas quickly became obsolete after
getting further into our project.
17
Methods, Tools and Techniques This section has asked us to reference the life cycle model management process but because our project
is a two semester task with a goal of attaining a single product, we did not have a specific cycle model
management process. We used tools to ensure safety of the code as the PTOOLs and PSLF code is
confidential. The tool we used for this was a subversion control system with access by only our group
members. By using the Tortoise SVN tool for safe-keeping of the code, we were able to effectively work
as a group on the project concurrently. It allowed for versioning which was useful at points where
certain commits should not have been made. As outlined elsewhere in this document, we used the
MATLAB tool called Guide to design and build most of our project.
Product Acceptance Plan The acceptance plan specifies the plan for the acquirer (GE) to accept the deliverable and have object
criteria for determining acceptability of the work we have completed. We have demonstrated our work
to General Electric by showing that the functional requirements set for our project were satisfied. They
have agreed that our work was as they expected. The plan for providing the finished tool to GE is to
create a new set of credentials and provide them with the repository space and allow them to download
the source code.
Estimation Plan The cost of our project is $0 as our project is fully software-based. The schedule for conducting the
project is as follows:
Figure 2 Project Schedule
To adjust the schedule, each week we would give an update to all members of the team our current
standings. At this point we would assess if we shall revise the schedule by determining how many
remaining sub functions or pieces of the project and adjust accordingly.
18
MATLAB Coding Standards
1. What standards were used in the project? We followed the MATLAB Programming Style Guidelines by Richard Johnson, Copyright © 2002 Datatool.
Naming Conventions
Establishing a naming convention for a group of developers can become ridiculously contentious.
Variables
The names of variables should document their meaning or use.
Variable names should be in mixed case starting with lower case.
Variables with a large scope should have meaningful names. Variables with a small scope can have short names.
A convention on pluralization should be followed consistently.
Negated boolean variable names should be avoided.
Acronyms, even if normally uppercase, should be mixed or lower case.
Avoid using a keyword or special value name for a variable name.
Constants
Named constants (including globals) should be all uppercase using underscore to separate words.
Functions
Names of functions should follow the naming convention for variables
Functions should have meaningful names.
The prefixes get/set should generally be reserved for accessing an object or property.
Complement names should be used for complement operations.
General
Abbreviations in names should be avoided.
Consider making names pronounceable.
All names should be written in English.
Files and Organization
Structuring code, both among and within files is essential to making it understandable. Thoughtful partitioning and ordering increase the value of the code.
M Files
Modularize.
Partitioning
Use existing functions.
19
Statements
Variables and constants
Variables should not be reused unless required by memory limitation.
Consider documenting constant assignments with end of line comments.
Loops
Loop variables should be initialized immediately before the loop.
The use of break and continue in loops should be minimized.
Conditionals
Complex conditional expressions should be avoided. Introduce temporary logical variables instead.
The usual case should be put in the if-part and the exception in the else-part of an if else statement.
The switch variable should usually be a string.
General
Avoid cryptic code.
Use parentheses.
The use of numbers in expressions should be minimized. Numbers that are subject to change usually should be named constants instead.
Layout, Comments and Documentation
Layout
The purpose of layout is to help the reader understand the code. Indentation is particularly helpful for revealing structure.
Content should be kept within the first 80 columns.
Lines should be split at graceful points.
Basic indentation should be 3 or 4 spaces.
Indentation should be consistent with the MATLAB Editor.
In general a line of code should contain only one executable statement.
Short single statement if, for or while statements can be written on one line.
White Space
White space enhances readability by making the individual components of statements stand out.
Surround =, &, and| by spaces.
Conventional operators can be surrounded by spaces.
Commas can be followed by a space (for method calls).
Blocks should be separated by more than one blank line.
Use alignment wherever it enhances readability.
20
Comments
The purpose of comments is to add information to the code.
Comments should agree with the code, but do more than just restate the code.
Comments should be easy to read.
There should be a space between the % and the comment text. Comments should start with an upper case letter and end with a period.
Comments should usually have the same indentation as the statements referred to.
Function header comments should discuss any special requirements for the input arguments.
2. Why were these standards used in the project?
The standards we followed are generally the same as those for C, C++ and Java, with modifications for Matlab features and history. It would be painstaking to outline why each and every
standard was used, instead we will outline the importance of following a series of standards. Generally
we followed these standards because it enables persons that work with the source code without
needing to recognize and adopt a different programming style. In other words, a programmer can look
anywhere in the source code with reliable expectations about how the code will be structured and be
able to find what they need. This includes variable name conventions and source code commenting
standards to aid the reader and maintainer in understanding the code.
3. How do the standards interact with each other?
One way in which the standards interact with each other is in the way the naming conventions are for
variables and function names.
4. How were the standards used?
The standards were reviewed when programming and nearly all of them are standards that we have
learned for other programming courses during our time here at ISU. Many of the standards including the
naming conventions for variables and functions, code documentation, and other general standards were
followed merely by the way we were taught to develop code. Other less commonsense standards we
adapted after the writing of the code, such as keeping code within the first 80 lines of the editor
because most visual editors such as command windows and others of that nature display a maximum of
80 characters per line.
Uses Cases
1. Open WCA Tool Summary The user would like to open the Worst Case Analysis (WCA) tool.
Actors User
21
Basic Flow 1. The user starts the PTOOLs application.
2. The user loads the desired data set(s).
3. The user clicks the “WCA” button
Alternate Flow NONE
Exceptional Flow 2. The user clicks the “WCA” button without loading any data sets.
3. An error message is displayed.
Pre-Condition The user has the PTOOLs application on the system being used.
Post-Condition The WCA Tool window is open and ready for use.
2. Load Data Sets Summary The user would like to open the WCA Tool with specific data sets (CHF files) loaded.
Actors User
Basic Flow 1. The user starts the PTOOLs application
2. The user loads the desired data set(s)
3. The user clicks the “WCA” button
Alternate Flow 1. User follows the steps from the basic flow.
2. The user realizes the file(s) loaded aren’t the desired files.
3. The user closes the WCA tool window.
4. The user starts the basic flow over.
Pre-Condition
The user has the PTOOLs application on the system being used.
The user has one or more CHF files on the system.
Post-Condition
The WCA Tool window is open and ready to use.
The specified CHF file(s) are loaded.
22
3. Save Criteria Summary The user would like to save the specified criteria (e.g. parameters for sub-transient, transient, and post-
transient violations).
Actors User
Basic Flow 1. The user enters the desired parameter values for each of the violation criteria.
2. The user clicks the “Save Criteria” button.
3. The user specifies a file name.
4. The user clicks the “Save” button.
Alternate Flow 3. The user aborts the saving process by exiting the save window.
Pre-Condition
The user has opened the WCA Tool (Use Case 1).
Post-Condition
The criteria currently entered are saved into a .MAT file.
4. Load Criteria Summary The user would like to load a saved criteria file (e.g. parameters for sub-transient, transient, and post-
transient violations).
Actors User
Basic Flow 1. The user clicks the “Load Criteria” button.
2. The user selects the desired .MAT file, containing the desired criteria.
3. The user clicks the “Open” button.
Alternate Flow 2. The user aborts the loading process by exiting the open window.
Exceptional Flow 1. The specified file cannot be read.
2. The system displays an error message.
3. The criteria is not loaded and the user is returned to the WCA GUI.
Pre-Condition
The user has access to at least one criteria file, saved in a .MAT file.
23
Post-Condition
The criteria from the .MAT file is loaded into the WCA Tool.
5. Run Analysis Summary The user would like to run an analysis on one or more data sets.
Actors User
Basic Flow 1. The user loads one or more criteria files.
2. The user selects the criteria to be used to analyze each data set by specifying the number
corresponding to the loaded criteria.
3. The user selects the bus(es), area(s), and zone(s) to be loaded for the variable to be analyzed.
4. The user clicks the “Run Analysis” button.
Alternate Flow 1. The user enters the criteria parameters manually.
2. The user saves the specified criteria (Use Case 3).
3. The user loads the criteria just saved (Use Case 4).
4. The user follows the Basic Flow starting at step 2.
Exceptional Flow 1 1. The user attempts to use a criteria for a data set.
2. The criteria doesn’t match any of the loaded criteria.
3. An error message displays.
Exceptional Flow 2 1. The user attempts to run an analysis with no selected buses.
2. An error message displays.
Pre-Condition
The user has one or more data sets loaded.
Post-Condition
The results page is displayed.
6. View Results Summary The user has run an analysis and would like to view the results.
Actors User
Basic Flow 1. The user selects the category of violation (sub-transient, transient, post-transient) to be viewed.
24
2. The violations are displayed for each bus number and data set.
Alternate Flow NONE
Pre-Condition
The user has run an analysis.
Post-Condition
The results for the analysis are displayed.
7. Help Screen Summary The user wishes to view the help screen.
Actors User
Basic Flow 1. The clicks the “Help Screen” button.
Pre-Condition
The user has the WCA Tool open.
Post-Condition
The help window is displayed.
8. Add Area(s) Summary The user would like to add one or more areas to the analysis.
Actors User
Basic Flow 1. The user selects a variable in the “Variable” drop-down box in the “Options” box.
2. Under filters, the user selects the “Area” radio button.
3. The user selects one or more areas from the “Select” list.
4. The user clicks the “Add >” button.
Pre-Condition
The user has the WCA Tool open
The user has one or more data sets loaded
Post-Condition
The user has added one or more areas to the analysis
25
9. Remove Area(s) Summary The user would like to remove one or more areas from the analysis.
Actors User
Basic Flow 1. Under filters, the user selects the “Area” radio button.
2. The user selects one or more areas from the “Selected Areas” list.
3. The user clicks the “Remove <” button.
Pre-Condition
The user has the WCA Tool open
The user has one or more data sets loaded
The user selects a variable with one or more areas already loaded.
Post-Condition
The user has removed one or more areas from the analysis
All added zone(s) and bus(es) associated with the removed area(s) should remain.
10. Add Zone(s) Summary The user would like to add one or more zones to the analysis.
Actors User
Basic Flow 1. The user selects a variable in the “Variable” drop-down box in the “Options” box.
2. Under filters, the user selects the “Zone” radio button.
3. The user selects one or more zones from the "Select” list.
4. The user clicks the “Add >” button.
Pre-Condition
The user has the WCA Tool open
The user has one or more data sets loaded
Post-Condition
The user has added one or more zones to the analysis
11. Remove Zone(s) Summary The user would like to remove one or more zones from the analysis.
26
Actors User
Basic Flow 1. Under filters, the user selects the “Zone” radio button.
2. The user selects one or more zones from the “Selected Zones” list.
3. The user clicks the “Remove <” button.
Pre-Condition
The user has the WCA Tool open
The user has one or more data sets loaded
The user selects a variable with one or more zones already loaded.
Post-Condition
The user has removed one or more zones from the analysis
All added bus(es) associated with the removed zone(s) remain.
12. Add Bus(es) Summary The user would like to add one or more buses to the analysis.
Actors User
Basic Flow 1. The user selects a variable in the “Variable” drop-down box in the “Options” box.
2. Under filters, the user selects the “Bus” radio button.
3. The user selects one or more buses from the list.
4. The user clicks the “Add >” button.
Pre-Condition
The user has the WCA Tool open
The user has one or more data sets loaded
Post-Condition
The user has added one or more buses to the analysis
13. Remove Bus(es) Summary The user would like to remove one or more buses from the analysis.
Actors User
Basic Flow 1. Under filters, the user selects the “Bus” radio button.
27
2. The user selects one or more areas from the “Selected Buses” list.
3. The user clicks the “Remove <” button.
Pre-Condition
The user has the WCA Tool open
The user has one or more data sets loaded
The user selects a variable with one or more buses already loaded.
Post-Condition
The user has removed one or more buses from the analysis.
Design Decisions
File Size Limitation Summary One of the problems the client requested be fixed was one related to the size of the CHF files that could
be loaded into the PTOOLs software. The client described a problem in which, whenever an attempt to
load file larger than about 10 megabytes in size was made, the program became unresponsive. Upon
inspection, the root of the problem was found to be inefficiency in the memory usage.
Options Considered MATLAB is a memory-intensive application, and a suggestion of increasing hardware specifications to
the client was not an attractive option. In an attempt to solve the issue programmatically, the following
options were considered:
1. Use MATLAB’s pack command
2. Break matrices into several smaller matrices
3. Use the textscan or fread functions instead of the fopen function
4. Use the matfile function to load parts of the file into a MATLAB object
5. Use sparse matrices
6. Pre-allocate contiguous memory
Decision While considering the option to use sparse matrices, the final solution was discovered. When the data
was read into the matrices and copied to the final matrix (options 2 and 6 above), the data was stored in
a type which consumed much more memory than was needed. The solution used effectively reduced
the data in the matrix to a size just large enough to store the pertinent information.
Rationale The final solution was chosen for multiple reasons. First, some of the original options were removed
from consideration for various reasons. Option 1 was removed because the pack command can only be
called from MATLAB’s command line and not programmatically. Options 2, 3, and 6 were already
implemented in the code related to the problem. Option 4 was the frontrunner, despite being less time-
efficient, because it saved more memory than option 5 would have saved. The final solution was chosen
28
because it saved space without compromising performance. In addition, it saved 20% of the memory
that the original code would have consumed.
Implementing the GUI Summary The client requested a tool which would analyze wave forms and propose information of violations on
these wave forms based upon the criteria specified before running analysis
Options Considered Based on our initial research, we had two options for implementing our project. The first option we
considered was to create a Java GUI using MATLAB commands. This is normally fine for very simple user
interfaces but as ours would have to continuously adapt as we went along based upon feedback from
the customer this option did not seem ideal. The second problem with this option was that not all
components can be created using the limited supply available in MATLAB. The second option we had
considered based off of our initial research was to create a pure Java GUI and launch it through
MATLAB. The cons for this option is that we still must find a way to communicate between MATLAB and
Java and we would still need to find a way to launch the pure Java GUI while in the current MATLAB
session.
Decision We decided to go with the second option which was to create a pure Java GUI and launch it through
MATLAB. As its use continued, it was discovered that exporting a JAR file from Eclipse was an error-
prone method. It was later found that MATLAB allows for a drag-and-drop interface for creating GUIs.
This quickly became the preferred method.
Rationale This option was preferred because a visual editor could be used to more easily create the GUI, which will
allow for quicker turn-around on GUI suggestions from the client. Other benefits for this option include:
Java components are available, and it is easier to create handles on the objects.
Graphical User Interface Layout Summary One of the requests the client made was for the GUI to be quite easy with which to become acquainted.
The client also wanted the GUI to be very simple in design. Elaborate menus and combinations of clicks
to perform simple tasks were undesirable.
Options Considered With the client’s wishes and sample GUI in mind, multiple different options were considered with
regards to each component’s positioning in the GUI.
Decision The GUI used in the final product is a composition of the decisions made, while keeping in mind the
client’s wishes, sample GUI layout, and principles in GUI design.
29
Rationale In designing a GUI, there are some principles which developers tend to follow. One of these principles
suggests that the user reads the GUI the same way a book would be read: left to right, top to bottom.
Keeping this in mind, the components that would likely be the first used (e.g. file names and locations,
loading/specifying criteria, etc.) were put in the spots likely to be read first. Another such principle,
which goes hand-in-hand with the client’s wish for ease of use, suggests that no single action should be
more than three clicks away. For example, the user shouldn’t have to use an elaborate combination of
clicks to have to run the analysis. This principle led to the lack of menus and the use of buttons on the
GUI in lieu of the menus.
Implementing Criteria Parameter Interface There are several options available to interface the selections the user makes in the GUI to the analysis
functions. The simplest and most versatile option is to use callback functions when elements of the GUI
are changed to alter global variables corresponding to the criteria parameters. This option is attractive
for the following reasons:
it allows to change loaded criteria parameters in real time without needing to save the changes
the analysis function can easily access the variables without needing them passed to it
it allows for the GUI to update its displayed parameters when selecting different loaded criteria
the data can be accessed by multiple functions that use them as inputs
Testing was conducted by manually checking the global variables in the MATLAB workspace and
comparing them to the corresponding GUI selections. The variables always reflected the changes made
in the GUI corresponding to the selected loaded criteria.
Implementing WCA Algorithm Because the algorithm will run the same analysis on multiple buses, a modular design is best. This
allows for quick changes to the algorithm by isolating the function involved. The algorithm is split into
two functions, runWCA and violationCheck.
runWCA
Inputs:
a list of the selected buses to be analyzed
the loaded violation criteria
Outputs:
a results matrix displayed in a window
RunWCA breaks down the bus data into the sections specified by the loaded criteria. It also calculates
the per-unit violation criteria from the user specified values (converting cycles to seconds for example).
The data of interest and the per-unit criteria are passed to violationCheck for each individual bus.
30
violationCheck
Inputs:
bus data of interest for a single bus
per-unit criteria
Outputs:
violation data (number, duration, highest and lowest value, at what time they occurred)
ViolationCheck takes the data passed to it from runWCA and performs the actual analysis. The function
checks the bus data one data point at a time looking for values outside the specified limits. It tracks the
violations and returns the number of violations, the highest value, lowest value, how long the violation
lasted, and at what time the violation began.
Implementing Filters The filters function uses a switch case design to make changes to the GUI tables when called. The inputs
and outputs are:
Inputs
kV status – Whether or not the buses should be filtered by kV
kV high – The high end of the kV range
kV low – The low end of the kV range
Add, Remove,Variable – Which button was pressed
Add or remove type – Whether it is a bus, zone, or area
Add or remove value – Which buses, areas, or zones
Outputs
Areas – for the select table
Zones – for the select table
Buses – for the select table
Selected Areas – for the selected table
Selected Zones – for the selected table
Selected Buses – for the selected table and the run WCA function
Two additional functions called newZones and newBuses are called within the filters function to refresh
the zones and buses when needed within the code. The flow chart below can be followed to better
understand how the function works.
31
Figure 3 : Filter Flow Chart
Figure 4: newBuses Flow Chart
System and Unit Level Testing Cases
GUI Testing
Manual tests were done to ensure that the software performs in the manner expected. The first set of tests that were performed were for the Filters panel functionality. The second set of tests covered the
32
Criteria Parameters for all three transient violations. The third set of tests for the WCA covered the saving and loading of criteria. As outlined in the testing document, for each of the areas outlined above we used the boundary value testing method where we tested normal situations, and close to boundary and boundary conditions. Using this method is one of the most efficient ways to test software and uncover the most amount of bugs. For each of the three sets, we verified that invalid input provided by the user after attempting to Run WCA alerted the user of the problem and asserted that analysis was not run.
Function Tested
What is being tested How it is tested Reasoning for test
Expected result Result Notes
Filters Select data
Load single chf that has data and try all different variables from the Options panel.
Verify that the values in the Select table are all present when the Area radio button is selected, as well as Zone, and Bus radio button. Pass Pass
Compared with excel output and pivot table
Filters Select data
Load multiple chf files that have data and try all different variables from the Options panel.
Verify that the values in the Select table are all present when the Area radio button is selected, as well as Zone, and Bus radio button. Pass Pass
Compared with excel output and pivot table
Criteria Parameters Upper Limit
Create chf that has a upper limit violation for all 3 transient types.
Verify that the analysis finds the violations. Pass Pass
Compared with PLSF analysis
Criteria Parameters Lower Limit
Create chf file that has a lower limit violation for all 3 transient types.
Verify that the analysis finds the violations. Pass Pass
Compared with PLSF analysis
Criteria Parameters Duration of violation
Create chf files that violate upper and/or lower limit settings and verify that for the duration specified they actually violate (in seconds).
Verify that the analysis finds the violations. Pass Pass
Compared with PLSF analysis
Criteria Parameters Duration of violation
Create chf files that violate upper and/or lower limit settings and verify that for the duration specified they actually violate (in cycles).
Verify that the analysis finds the violations. Pass Pass
Compared with PLSF analysis
Criteria Parameters Search from
Create chf files that violate upper and lower violations and verify that for a correct cycles or seconds window, that the WCA tools says it was violated.
Verify that the analysis finds the violations. Pass Pass
Compared with PLSF analysis
33
Analysis Algorithm Testing
Testing involved manuallyrunning an analysis using our software and comparing it to the same analysis
run on PSLF’s PLOT wca function. The analysis was run using sensitive parameters. Other than the
reported initial value, which differed slightly between the programs, every reported value was the same.
Criteria Parameters Search from
Create chf files that violate upper and lower violations and verify that for a window of cycles or seconds that does not have a violation, that the WCA tools does not report a violation.
Verify that the analysis does not find a violation. Pass Pass
Compared with PLSF analysis
Run Analysis
Run Analysis not being run
If any required fields are not provided, pressing the Run Analysis button shall let the user know that they need to provide the necessary information first before being able to run analysis.
Verify that analysis is not run. Pass Pass
The error is thrown if no buses are selected to analyze or the criteria are not specified
Criteria Used
Analysis run on specific criteria number
Attempt to run analysis without first specifying a valid loaded criteria number.
Verify that the program alerts that analysis cannot be run until a valid criteria number is provided. Pass Pass
The error is thrown when the run analysis button is pressed
Load Criteria
Loading single criteria
Load a single criteria and run it on a single Loaded Case.
Verify the analysis results are correct. Pass Pass
Compared with PLSF analysis
Load Criteria Load multiple criteria
Load multiple criteria and run it on multiple chf files.
Verify the analysis results are correct. Pass Pass
Compared with PLSF analysis
Save Criteria
Save information from the Criteria Panel
Put unique settings in the Criteria Panel, save it, and load it up again and verify that the correct options are selected.
Verify all the right check boxes and data is entered in the fields and correct dropdowns are selected. Pass Pass
This works for both when it is first loaded and when the criteria is clicked on in the loaded criteria table
Criteria Used
Incorrect Loaded Criteria Numbers
Put numbers that do not exist in the Loaded Criteria panel.
Verify that after attempting to run analysis that an error is displayed to the user and analysis is not run. Pass Pass
An error is thrown when the user attempt the invalid input
General Open-close Open WCA tool and close it repeatedly
Verify that the user can launch and close the tool repeatedly Pass Pass
A progress bar could be implemented to help the user know when it is finished loading
34
Resources
Resources The project will require access to PSLF, along with the software and code for PTOOLs. In addition, the
project will use MATLAB and Eclipse to help write and execute code. Because MATLAB does not natively
support the launching of a Java GUI, GImport helper files are used. In addition, the application makes
use of the MATLABControl JAR to facilitate communication between the Java GUI and MATLAB. There
are no monetary requirements for this project.
Tasks Implement the WCA Tool
Increase readable file size in PTOOLs to 120 MB.
Test the changes to PTOOLs and the implementation of the WCA Tool
Closure Material
Project Team Information
Cody Westlund
Software Engineer
Tyler Thein
Electrical Engineer
Brad Schmickley
Software Engineer
Brent Jasperson
Electrical Engineer
Michael Johnson
Electrical Engineer
35
Glossary General Electric – the client for the project, referred to as such; abbreviated above as GE
Graphical User Interface – abbreviated above as GUI
Positive Sequence Load Flow – abbreviated above as PSLF
PTOOLs – the system which will be extended by the addition of the WCA Tool
Worst Case Analysis Tool – the main product; abbreviated above as WCA or WCA Tool
36
Appendix A PTOOLs – WCA: User Guide
Required Equipment: Windows machine loaded with MATLAB version 2009b or later
PTools software
One or more PSLF dynamic simulation output .CHF files.
Procedures: 1. Setup
1. Run PTools executable file.
2. After PTools has launched click the ‘Open and Load Data File’ button in the top left corner of the
window.
3. In the resulting window, navigate to and select the desired .CHF file and click open. The .CHF file
should now be visible in the “Data Sets” sub-window and the channel data displayed in the
“Channel Listing” sub-window.
4. Click the “WCA” button to launch the tool. The WCA interface will appear as in figure 1.
Figure 1
37
2. Loading Previously Created Criteria 1. Click the “Load Criteria” button.
2. In the load window, navigate to and select the desired .MAT file. Click open. The file should
now be listed in the “Loaded Criteria” table.
3. Setting/Changing Criteria Parameters 1. Select the loaded criteria to be changed in the “Loaded Criteria” table. The parameter values on
the interface should reflect the current settings for that criteria set.
2. Manually change the parameter settings in the “Criteria Parameters” block. The updated
parameters will be used in the analysis.
3. Save the criteria by clicking the “Save Criteria” button if the changes are desired for future use.
4. Selecting Buses to be Analyzed 1. Select the “Area”, “Zone”, or “Bus” radio button to display the available areas, zones, or buses in
the “Select” table.
2. To narrow down the viewable buses, add the areas, or zones of interest by selecting them in the
“Select” table and clicking the “Add” button. The buses can also be filtered by kV rating by
enabling the filter by clicking the “kV Range” button and inputting the desired range. If the
area/zone is no longer of interest, they can be removed by selecting them in the “Selected
Areas” or “Selected Zones” table and clicking the “Remove” button.
3. To add the buses to be analyzed click the “Bus” radio button. The buses displayed in the select
table are limited to buses that are only in the selected zones. If no zones are selected they are
limited to buses that are in the selected areas. If there are neither zones nor areas selected
then all buses are displayed. Select the desired buses, and click the “Add” button. The buses
should now be visible in the “Selected Buses” table.
Figure 2
38
5. Running the Analysis 1. Load a criteria set. Or if using a new set of parameters, save and then load the criteria following
procedures 2 and 3.
2. In the “Loaded Cases” table under the “Criteria Used” column enter the corresponding criteria
number to be used with that data set (see figure 2).
3. In the “Options” panel select the variable to be analyzed in the drop down menu. The area,
zones, and buses with that variable type will now be displayed in the “Select” table.
4. Select the buses to be analyzed by following procedure 4.
Figure 3
5. Click the “Run Analysis” button. The results page should appear once the analysis is complete.
6. To view the results select the desired time window to be viewed. The results can display all
violations, or only the worst for each bus. Select the desired option in the “Display” pop-up
menu (see figure 4).
Figure 4