The following topics are covered: Spread sheet fundamentals, using Excel VBA and Quattro Pro macros to peroform: basic operations & fundamental calculations of power systems analysis, fault calculations, load flow studies; using QuickBasic and HTML/JavaScript to perform power systems studies.
How-to use off-the-shelf software packages to perform power systems analysis
1. Howto use offtheshelf software packages to perform power systems analysis
Power systems, modern languages, open source OS, software & programming
Contents:
Chapter 1: Spread sheets fundamentals.
Chapter 2: Basic operation and fundamental calculations of power systems analysis.
Chapter 3: Fault calculations.
Chapter 4: Load flow studies.
Appendix A: Using Quickbasis to perform power systems studies.
Appendix B:Using HTML and Javascript to perform power systems studies.
Note: This online version of this book does not include the sketches and illustrations.
2. Chapter 1
Spread sheets fundamentals
Introduction:
Power systems analysis and calculations can be performed using offtheshelf spread sheet software
packages. The workbook (notebook) can be customized through the addition of menus and other
toolbars (or modifying the existing ones). In this book Borland Quattro Pro and Microsoft Excel will be
used to demonstrate how spread sheet programs can be modified and customized to become a tool for
the electrical power systems analyst.
Spread sheet fundamentals:
A standard spread sheet program that operates under DOS/Windows operating system will have the
following main parts:
1) The cells of the work sheet: the working area is divided into rectangles (which are called cells), each
rectangle is identified by a letter (indicating a column) and a number (indicating a row). The workbook
(or notebook as other suppliers of these packages call) will have more than one worksheet (or page).
The workbook is a file that can accept user input and then be saved to the hard disk or floppy diskette.
The user can move from one worksheet to another, add more worksheets or remove any of them.
2) The menu bar: it will have menu elements and subelements that will allow the user to perform the
tasks he/she would like to do like having a new worksheet appearing on the screen (on the monitor) in
front of him/her, adding data, formatting it and then saving the file (by giving it a name) or opening an
existing file making some modifications to it then saving it.
3) The toolbar: it is a bar with small squares (icons), if any of the icons is pressed the specific task is
performed.
4) The data entry box: when the cursor (selector) is on a cell (i.e. a cell is chosen), the content (data) in
the cell will appear in this box for the user to change. If the cell is empty, the user can enter the new
data, it will appear in this box until he/she presses Enter or click the correct sign (adjacent to this box),
after which the data is placed in the, previously, highlighted (chosen) cell.
5) The message box (status bar): it is a box close to the bottom of the screen. When the mouse (cursor)
is moved to a command (on the member) of the menu bar or to the icon on the toolbar, a brief
description (help tip) of what this command or icon will do is displayed in such a box.
Customizing such types of software packages is achieved through the use of macros and/or
programming languages, function of the package itself. A macro is a stored series of keystrokes special
keys, commands that can be played back. Macros are created by recording or typing them in. More
about macros later in this chapter.
The menu bars of spread sheets:
For a typical software package operating under Windows platform on a PC, the following main items
may be seen on the main menu of the program: FILE, EDIT, BLOCK, DATA, TOOLS, GRAPH,
PROPERTY, VIEW, INSERT and FORMAT. The file entry may have underneath it the following
options: NEW (which will give the user a blank i.e. new work book), OPEN (which enables the user to
open an existing file the worksheets to add to or modify), CLOSE which will cllose the file without
saving the changes made from the last SAVE command), SAVE (which will save the document i.e.
worksheets including all the changes or additions made up till this point), SAVEAS (save the
worksheet on the screen under the name the user will enter at the prompt i.e. in the dialog box), PRINT
16. Chapter 2
Basic operations and fundamental calculations of power systems analysis
Introduction: in any of the power systems problems that have to be solved, certain basic steps have to
be performed ahead of the beginning of the analysis or the solution process. These preliminary
operations can be any of the following:
1) The combination of the a few series or parallel impedance elements (resistance or reactance).
2) The conversion from wye to delta or vice versa of passive electrical system components.
3) Per unit (pu) calculations for the electrical power distribution zone under study.
4) Matrix manipulation and simultaneous equations solution.
5) The formation of the system admittancebus and impedancebus models (matrices).
Examples showing how to use Excel and Quattro Pro to solve for these fundamental variables or
constants of the electrical power systems:
Excel of Microsoft:
For definition of common terms, contents of controls toolbox, properties of each of the commonly used
controls, refer to Chapter 1.
Chapter 2, eg. 1, Excel, Fundamental operations and basic calculations:
1) The Workbook program
Private Sub Workbook_Deactivate() 'When this file is deactivated (closed), this sub is run resetting
the active
Application.CommandBars.ActiveMenuBar.Reset 'menu bar to its previous state.
End Sub
Private Sub Workbook_Open() 'When this workbook is opened , this sub is run adding the customized
menu
Set myMenubar = Application.CommandBars.ActiveMenuBar 'elements to the active menu bar. When
it is activate
Set newMenu = myMenubar.Controls.Add(Type:=msoControlPopup, temporary:=True) ' and then
reactivated, the
newMenu.Caption = "&Choice ????????" ' customized menu elements will not appear. The user has to
click any of
Set ctrl1 = newMenu.Controls.Add(Type:=msoControlButton, Id:=1) ' the workbook tabs to have such
elements
ctrl1.Caption = "&Series/parallel" ' added. If Sub Workbook_Activate is used, instead, then upon
deactivation
ctrl1.TooltipText = "Series/parallel" 'and activation of the workbook the customizes elements will
appear as part
ctrl1.Style = msoButtonCaption 'of the active menu bar.
With ctrl1
.OnAction = "MySub1"
End With