PSCAD Users Guide v4.2
PSCAD Users Guide v4.2
PSCAD Users Guide v4.2
PSCAD
Copyright 2005 Manitoba HVDC Research Centre Inc. All rights reserved.
Information in this document is subject to change without notice. No part of this
document may be reproduced in any form or by any means, electronically or
mechanically, for any purpose without the express written permission of Manitoba
HVDC Research Centre Inc.
PSCAD is a registered trademark of Manitoba HVDC Research Centre Inc.
EMTDC is a trademark of Manitoba Hydro, and Manitoba HVDC Research
Centre Inc. is a registered user.
Microsoft, Windows 95, Windows 98, Windows NT, Windows 2000, Windows
ME, NT, XP, Developer Studio are the registered trademarks or trademarks of
Microsoft Corporation in the United States and other countries.
DEC and DEC Fortran are trademarks of Digital Equipment Corporation.
UNIX is a registered trademark in the United States and other countries licensed
exclusively through X/Open Company.
Netscape and Netscape Navigator are registered trademarks of Netscape
Communications Corporation in the United States and other countries.
MATLAB and Simulink are registered trademarks of The MathWorks, Inc.
Compaq and the names of Compaq products referenced herein, are either
trademarks and/or service marks or registered trademarks and/or service marks
of the Compaq Computer Corporation.
WinZip is a registered trademark of WinZip Computing, Inc.
Other product and company names mentioned herein may be trademarks or
registered trademarks of their respective holders.
Print history:
Foreword
The evolution of the power system simulator is born from many forces. Some are
driven by the need to solve a problem while others have come directly from scientific research. Over the last decade, the manipulation of increasingly complex
systems has been the driving force behind the graphical interface and its working
environment. Every year there is an increasing demand for more flexibility and
speed, taxing the software in every direction.
I once read a quote, To do the difficult task easily, you must do the simple tasks
perfectly. Nowhere has this been more applicable as in the latest rendition of
PSCAD. The fundamentals have been revisited once again to ensure that they
perform precisely and consistently every time. Built on the strong foundation left
by the original creators of EMTDC some twenty years ago, the software has solidly reached the ranks of world class. This by no means indicates that the tasks
are complete. Like the wave on a beachfront, there are always more to come.
As I look back on the last decade of development, the question of the next decade moves into the light. Solutions are found in a montage of tools specifically
targeted for their domain. The distinction of these domains fades as the drive
toward a unified tool grows. Convergence forces us to view it not as waves on
rocks, soil and trees, but to consider it as a beach where all these forces interact.
Thus, tackling this convergence and creating a more powerful set of tools is the
next great challenge for the team and those that partner with us.
The many hours and hard work that has gone into the software over the last two
decades is hard to imagine. It has become and will continue to be the bedrock
of development for the future. In the next years, the many tools will form a nexus
point and change the nature of those solutions and how they are used once
again. I am proud to be a part of the last decade, working alongside all the great
contributors and look forward in earnest to the next.
Craig Muller, P. Eng.
Software Development Manager
September 2005
PSCAD
Table of Contents
About This Guide....................................................................... xxvii
Organization ............................................................................ xxvii
Documentation Conventions ...................................................xxviii
References .........................................................................xxviii
Notes ................................................................................... xxix
Text Boxes........................................................................... xxix
Chapter 1: Welcome to PSCAD .................................................. 1
What is PSCAD? .......................................................................... 2
Typical PSCAD Studies ................................................................ 3
Whats New in PSCAD V4?.......................................................... 3
V3/V4 Comparison Tables....................................................... 6
Appearance and Terminology ............................................ 6
Chapter 2: Installation and Setup ............................................ 19
Hardware and Software Requirements ...................................... 19
Fortran Compilers....................................................................... 20
Licensing .................................................................................... 20
Multi-User Licensing.............................................................. 20
Single-User Licensing ........................................................... 22
Trial Licensing ....................................................................... 23
Hardware Locks (Dongles).................................................... 23
License Key........................................................................... 24
License Manager Software......................................................... 25
Standalone License Manager ............................................... 25
Maintenance and Support ............................................... 25
Local License Manager ......................................................... 25
Trial License Manager ........................................................... 26
PSCAD Usage Log ............................................................... 26
Installing V4 For The First Time ................................................. 27
Installing PSCAD................................................................... 27
Installing the License Manager ............................................. 33
Possible Messages .......................................................... 35
Troubleshooting ............................................................... 40
Installing EGCS/GNU Fortran ............................................... 42
Installing LiveWire/LiveWire Lite ........................................... 42
Upgrading Your V4 Software ...................................................... 42
Upgrading a Previous Installation with a Patch ..................... 42
PSCAD Users Guide
Table of Contents
Modifying a Previous Installation........................................... 44
Possible Messages ............................................................... 46
Repairing a Previous Installation........................................... 48
Possible Messages .......................................................... 50
Uninstalling............................................................................ 51
Possible Messages .......................................................... 52
Finalizing Your Installation .......................................................... 53
Windows 98/ME Only ............................................................ 53
Windows NT4/XP/2000 Only................................................. 54
Adding a Shortcut to the PSCAD Executable ....................... 54
Running PSCAD For The First Time .......................................... 54
Failed to Connect to License Manager Server ...................... 54
Running a Simulation Generates a make -f or
nmake -f Error...................................................................... 56
Setting Compiler Environment Variables .................................... 57
EGCS/GNU Fortran 77 Compiler .......................................... 57
Digital Fortran 5 Compiler ..................................................... 58
Compaq Fortran 6 Compiler.................................................. 58
Intel Fortran 9 Compiler ........................................................ 59
Trial Licenses ............................................................................. 60
Requesting a Trial License .................................................... 60
Installing a Trial License ........................................................ 64
Adding/upgrading Stand-alone License Manager Licenses ....... 66
Adding/upgrading A Single-user License ................................... 67
Changing Active Licensing Settings ........................................... 68
Changing License Manager Host .......................................... 68
Changing Active License Type .............................................. 69
Viewing Active License Information ............................................ 69
Getting Licensing Information .................................................... 70
Standalone License Manager Information ............................ 70
Active Licensing Information ................................................. 71
Manually Starting The License Manager .................................... 71
Manually Stopping The License Manager .................................. 72
Chapter 3: Workspace Settings ............................................... 73
Workspace Settings Overview .............................................. 73
Projects ...................................................................................... 74
Initialization ........................................................................... 74
HTML Browser ...................................................................... 75
Views .......................................................................................... 75
Circuit View ........................................................................... 76
Script Editor........................................................................... 77
Graph and Control Panel Style ............................................. 77
Runtime ...................................................................................... 77
vi
PSCAD
Output Channel Warnings ..................................................... 78
System Memory Load ........................................................... 78
Fortran ........................................................................................ 79
Fortran Compiler ................................................................... 79
Matlab ...................................................................................... 80
Interface Settings .................................................................. 80
License ....................................................................................... 81
License Host ......................................................................... 81
Trial License .......................................................................... 81
Single User License .............................................................. 82
Available License(s) .............................................................. 82
Active License ....................................................................... 82
Associations ............................................................................... 82
Customize File Associations ................................................. 83
Creating a New Association ............................................. 83
Removing an Association................................................. 84
Invoking an Associated External Application.................... 84
Chapter 4: The PSCAD Environment ....................................... 85
Terminology And Denitions ....................................................... 85
Components .......................................................................... 85
Denitions ........................................................................ 86
Instances.......................................................................... 86
Modules................................................................................. 86
Projects ................................................................................. 86
Case................................................................................. 87
Library .............................................................................. 87
Tutorial: My First Simulation ...................................................... 87
Starting PSCAD .................................................................... 87
Title, Menu and Main Tool Bar............................................... 88
Title Bar and Active Project .............................................. 88
Menu Bar and Menu Items............................................... 88
Toolbar Buttons ................................................................ 89
Workspace and Output Windows .......................................... 89
Loading a Case Project ......................................................... 90
Running a Simulation ............................................................ 92
Printing the Circuit ................................................................. 93
The Workspace .......................................................................... 94
Moving and Resizing the Workspace Window ...................... 95
The Projects Section ............................................................. 95
Main Page Branch ........................................................... 96
Denitions Branch ............................................................ 97
Active Project ................................................................. 101
The Master Library ......................................................... 101
PSCAD Users Guide
vii
Table of Contents
The Runtime Section........................................................... 102
Modules View ................................................................. 103
Runtime Objects ....................................................... 105
Observers ................................................................. 109
Groups View ...................................................................110
Radio Links View ............................................................ 111
TLines/Cables ......................................................................112
The Files Section .................................................................114
Transmission Lines and Cable Files ...............................116
RTP/COMTRADE Recorder Files ...................................117
The Output Window...................................................................118
Moving and Resizing the Output Window ............................118
Errors and Warnings ............................................................119
Build .................................................................................... 120
Runtime ............................................................................... 120
Locating the Problem Source .............................................. 120
Search............................................................................ 120
The Design Editor..................................................................... 121
Viewing Windows ................................................................ 121
Circuit ............................................................................. 122
Graphic .......................................................................... 122
Parameters .................................................................... 122
Script .............................................................................. 122
Fortran ........................................................................... 122
Data ............................................................................... 122
Other Important Features ......................................................... 122
Menus ................................................................................. 122
Main Menu Bar............................................................... 123
Right-Click Pop-Up Menus............................................. 123
Library Pop-Up Menus ................................................... 124
Toolbars............................................................................... 125
Main Toolbar .................................................................. 125
Status Bar ...................................................................... 126
Rotation Bar ................................................................... 126
Runtime Bar ................................................................... 127
Electrical Palette ............................................................ 127
Control Palette ............................................................... 128
Graphic Palette .............................................................. 129
Graphic Filter Bar ........................................................... 130
Parameters Bar .............................................................. 130
Script Bar ....................................................................... 132
Keyboard Shortcuts............................................................. 132
General .......................................................................... 132
viii
PSCAD
Wires .............................................................................. 134
Plotting ........................................................................... 134
Window Settings ................................................................. 135
Tab Navigation .................................................................... 135
PSCAD Temporary Directories ................................................. 136
PSCAD On-line Help System ................................................... 136
Look and Feel ..................................................................... 137
The Help Toolbar ................................................................. 137
The Navigation Pane........................................................... 137
Contents......................................................................... 138
Index .............................................................................. 138
Search............................................................................ 139
Favourites ...................................................................... 139
The Main Viewer ................................................................. 140
Tutorial Projects ....................................................................... 140
Voltage Divider .................................................................... 141
Fast Fourier Analysis........................................................... 141
Simple AC System with a Transmission Line ...................... 141
Use of Control Arrays .......................................................... 141
Use of Slider, Switch, Button, and Dial................................ 141
Interpolation ........................................................................ 141
Generating a Legend and using PSCAD Macros................ 141
Chatter Elimination .............................................................. 141
Multiple Run ........................................................................ 142
Chapter 5: Features and Operations ..................................... 143
Projects .................................................................................... 143
Creating a New Project ....................................................... 143
Loading a Project ................................................................ 144
Recent Files ................................................................... 145
Opening and Viewing a Project ........................................... 145
Navigating Through an Open Project .................................. 145
Scroll Bars...................................................................... 145
Arrow Keys..................................................................... 146
Panning (Dynamic Scroll) Mode .................................... 146
Moving In and Out of Modules ....................................... 146
Forward/Back Buttons.................................................... 147
Tabs ............................................................................... 147
Zooming .............................................................................. 148
Refresh................................................................................ 149
Setting the Active Project .................................................... 150
Compiling and Building a Project ........................................ 150
Compile .......................................................................... 151
Make .............................................................................. 151
PSCAD Users Guide
ix
Table of Contents
Viewing Errors and Warnings .............................................. 152
Finding the Message Source ......................................... 152
Running a Simulation .......................................................... 153
Changing the Run Duration................................................. 154
Changing the Simulation Time Step .................................... 154
Changing the Simulation Plot Step ..................................... 154
Taking a Snapshot............................................................... 154
Manual ........................................................................... 155
Pre-Dened .................................................................... 155
Starting from a Snapshot .................................................... 155
Saving Output to File........................................................... 156
Saving Project Changes...................................................... 156
Save Project As.............................................................. 157
Saving as an Older PSCAD Format............................... 158
Editing Project Settings ....................................................... 159
Cleaning The Temporary Directory .................................... 160
Unloading A Project ............................................................. 161
Components And Modules ....................................................... 162
Selecting Objects ................................................................ 162
Adding Components To A Project........................................ 162
Adding Multiple Instances of a Component ................... 164
Moving Or Dragging An Object ........................................... 165
Cut/copy/paste .................................................................... 165
Rotate/Mirror/Flip ................................................................ 165
Deleting Objects .................................................................. 166
Undo And Redo ................................................................... 166
Connecting Components Together...................................... 166
Invalid Component Connections .................................... 167
Transferring Data Into And Out Of Modules ........................ 168
Data Signals................................................................... 168
Hard Wiring ............................................................... 168
Wireless Connections ............................................... 170
Electrical Nodes ............................................................. 171
Wire Mode ........................................................................... 173
Editing Module Settings ...................................................... 173
Display Options .............................................................. 174
Show Connection Grid .............................................. 174
Show Signal Locations ............................................. 174
Show Virtual Control Wires ....................................... 174
Fortran Code Sequencing .............................................. 174
Assign Execution Sequence Numbers
Automatically ............................................................ 174
Show Sequence Numbers on Circuit Schematic ...... 175
PSCAD
Editing The Page Setup ...................................................... 175
Editing Component Parameters .......................................... 176
Changing Parameter Values .......................................... 178
Editing Denition Properties ................................................ 178
Viewing/Saving Component Parameters ............................ 179
Viewing Component Parameters ................................... 179
Column Descriptions ...................................................... 180
Formatting Viewed Parameters ..................................... 181
Saving Component Parameters to a File ....................... 181
Changing To Single-Line View ............................................ 182
Creating A New Component Or Module .............................. 182
Using the Component Wizard ........................................ 182
Creating a Default Module ............................................. 186
Creating The First Instance of a Denition .......................... 187
Compiling an Individual Module .......................................... 187
Importing/Exporting Denitions ........................................... 188
Import a Denition .......................................................... 188
Export a Denition.......................................................... 188
Copy As Meta-le Or Bitmap ............................................... 189
Printing Selected Objects .................................................... 189
Printing a Module Page ....................................................... 189
Tutorial: Creating A New Project .............................................. 190
Adding a New Case Project ................................................ 190
Saving the Project ............................................................... 192
Opening the Project Main Page .......................................... 193
Opening the Master Library................................................. 193
Assembling a Voltage Divider Circuit .................................. 194
Locating the Single-Phase Source................................. 194
Add and Assemble ......................................................... 196
Editing the Remaining Component Parameters............. 196
Plotting Results ................................................................... 197
Adding a Graph Frame .................................................. 197
Adding Another Overlay Graph and Curve ................... 199
Editing the Graph Properties.......................................... 200
Running the Project............................................................. 201
Drag and Drop .......................................................................... 202
Create a Component Instance ............................................ 202
Copy a Component Instance............................................... 203
Adding a Curve to a Graph ................................................. 203
From an Output Channel .............................................. 203
From a Runtime Object .................................................. 204
Adding a Meter to a Control Panel ...................................... 204
From an Output Channel .............................................. 205
xi
Table of Contents
From a Runtime Object .................................................. 205
Adding a Control Interface to a Control Panel..................... 206
From a Controls Component ......................................... 206
From a Runtime Object .................................................. 206
Move/Copy Meters and Curves Between Graphs/Panels ... 207
Accessing The Online Help System ......................................... 207
Tool Tips ................................................................................... 208
Searching ................................................................................. 209
Component And Signal Tables ................................................. 210
Component Table ................................................................ 210
Signal Table..........................................................................211
Control Settings ........................................................................ 213
Storing Settings to a Template ............................................ 213
Synchronizing Default Settings ........................................... 214
Duplicate, Rename or Delete Template .............................. 214
Template Settings Viewer.................................................... 215
Features and Functions ................................................. 215
Global Substitutions ................................................................. 216
Unit System .............................................................................. 218
Enabling the Unit System .................................................... 218
Unit Format ......................................................................... 219
Base Units ........................................................................... 219
Exceptions ..................................................................... 222
Aliases ........................................................................... 222
Prexes ............................................................................... 222
Target Units ......................................................................... 223
Unit Conversions ................................................................. 224
Compound Units ................................................................. 225
Verifying Unit Conversions .................................................. 228
Backward Compatibility ....................................................... 229
EMTDC Output Files ................................................................ 229
Creating Output Files .......................................................... 230
Multiple Output Files ........................................................... 230
Column Identication and the Information File .................... 231
Chapter 6: Online Plotting and Control ................................. 233
Preparing Data For Control Or Display .................................... 233
Channeling Output Data...................................................... 234
Controlling Input Data ......................................................... 234
Graph Frames .......................................................................... 235
Adding a Graph Frame........................................................ 235
Moving and Resizing a Graph Frame ................................. 236
Cut/Copy Frames ................................................................ 236
Paste Frame........................................................................ 237
xii
PSCAD
Adjusting Frame Properties................................................. 237
Adjusting Horizontal Axis Properties .............................. 238
Graphs...................................................................................... 239
Adding Graphs to a Graph Frame ....................................... 240
Graph Order ........................................................................ 240
Cut/Copy Graphs ................................................................ 240
Paste Graph ........................................................................ 241
Copy Data to Clipboard ....................................................... 241
Overlay Graphs ................................................................... 242
Adjusting Overlay Graph Properties .............................. 242
PolyGraphs ......................................................................... 244
Adjusting PolyGraph Properties ..................................... 244
Curves ...................................................................................... 245
Adding a New Curve to a Graph ......................................... 246
Curve Legends .................................................................... 247
Curve Order ........................................................................ 247
Cut/Copy/Paste an Existing Curve ...................................... 248
Copy Data to Clipboard ....................................................... 248
Adjusting Curve Properties ................................................. 248
Active Trace ................................................................... 249
Style ............................................................................... 250
Digital Style .................................................................... 250
Adjusting Channel Settings ................................................. 250
Synchronizing Output Channel Limits with Those of
the Graph ............................................................................ 250
Traces ...................................................................................... 251
Trace Drop Down Menu ...................................................... 251
Adjusting Trace Properties .................................................. 252
Polymeters ............................................................................... 252
Adding a PolyMeter ............................................................. 253
Moving and Resizing a PolyMeter....................................... 254
Cut/Copy PolyMeter ............................................................ 254
Paste PolyMeter .................................................................. 255
Copy PolyMeter as Meta-File/Bitmap.................................. 255
Navigate to Channel............................................................ 255
Adjusting Channel Settings ................................................. 255
Displaying Specic Data ..................................................... 255
Phasormeters ........................................................................... 255
Preparing Data for Display .................................................. 256
Adding a PhasorMeter ........................................................ 257
Moving and Resizing a PhasorMeter .................................. 257
Cut/Copy PhasorMeter........................................................ 258
Paste PhasorMeter ............................................................. 258
xiii
Table of Contents
Copy PhasorMeter as Meta-File/Bitmap ............................. 259
Navigate to Channel............................................................ 259
Adjusting Channel Settings ................................................. 259
Displaying Specic Data ..................................................... 259
Adjusting Phase Angle Input Format ................................... 259
XY Plots.................................................................................... 260
Adding an XY Plot ............................................................... 260
Moving and Resizing an XY Plot Frame ............................. 261
Cut/Copy XY Plot Frame ..................................................... 261
Paste XY Plot Frame........................................................... 262
Copy Data to Clipboard ....................................................... 262
Adjusting XY Plot Frame Properties.................................... 262
Adjusting Plot Properties ..................................................... 264
Polar Grid ............................................................................ 266
Dynamic Zoom .................................................................... 267
Tool Tips In Plots ...................................................................... 267
Dynamic Aperture Adjustment .................................................. 268
Adjusting and Controlling the Aperture in XY Plots ............. 269
Markers .................................................................................... 270
Show/Hide Markers ............................................................. 271
Graph Frame Marker Legends ............................................ 272
XY Plot Marker Legends ..................................................... 273
Changing the Active Curve.................................................. 274
Adjusting Marker Positions.................................................. 274
Toggle Time Difference Frequency/Delta ............................ 275
Locking/Unlocking Markers ................................................. 275
Setting Markers ................................................................... 275
Using Markers as Bookmarks ............................................. 276
Preferences .............................................................................. 277
Zoom Features ......................................................................... 278
General Zoom In and Zoom Out ......................................... 278
Box Zoom ............................................................................ 278
Vertical Zoom ...................................................................... 279
Horizontal Zoom .................................................................. 279
Zoom Previous/Next............................................................ 279
Zoom Extents ...................................................................... 280
Zoom Limits......................................................................... 280
Resetting All Extents and Limits .......................................... 281
Dynamic Zoom in XY Plots ................................................. 281
Cross Hair Mode ...................................................................... 281
Pop-up Tool Bars ...................................................................... 282
Online Controls And Meters ..................................................... 283
Control Panels..................................................................... 284
xiv
PSCAD
Adding a Control Panel .................................................. 284
Moving and Resizing a Control Panel ............................ 284
Cut/Copy Panel .............................................................. 284
Paste Panel.................................................................... 285
Adjusting Panel properties ............................................. 285
Control Interfaces ................................................................ 285
Adding a Control Interface to a Control Panel ............... 286
Control Interface Order .................................................. 287
Cut/Copy Control Interface ............................................ 288
Paste Control Interface .................................................. 288
Navigate to Control ........................................................ 288
Adjusting Control Interface Properties ........................... 289
Using the Control Interfaces .......................................... 289
Meters ................................................................................. 291
Adding a Meter to a Control Panel ................................. 292
Meter Order.................................................................... 293
Cut/Copy Meter .............................................................. 293
Paste Meter.................................................................... 294
Navigate to Channel/Control .......................................... 294
Adjusting Meter Properties............................................. 294
Grouping Of Runtime Objects .................................................. 294
Creating a Runtime Object Group ....................................... 295
Viewing Runtime Object Groups ......................................... 296
Displaying Group Name on Graph Frames and
Control Panels..................................................................... 296
Frame/panel Minimization ........................................................ 297
Moving and Organizing Minimized Frames/Panels ............. 298
Displaying Plots And Controls In Reports ................................ 298
Setting Panel Style .............................................................. 298
Copy as Meta-File or Bitmap............................................... 299
Chapter 7: Project Settings .................................................... 301
Project Settings Overview ................................................... 301
General..................................................................................... 302
Description .......................................................................... 302
File Path .............................................................................. 302
Persist As ............................................................................ 303
Revision Tracking ................................................................ 303
File Version .................................................................... 303
First Created .................................................................. 303
Last Modied.................................................................. 303
Author ............................................................................ 303
Runtime .................................................................................... 303
Time Settings ...................................................................... 304
PSCAD Users Guide
xv
Table of Contents
Duration of Run (sec) ..................................................... 304
Solution Time Step (us).................................................. 304
Channel Plot Step (us) ................................................... 304
Start-up Method .................................................................. 305
Standard ........................................................................ 305
From Snapshot File........................................................ 305
Save Channels to Disk? ...................................................... 306
Timed Snapshot .................................................................. 306
Single (Once Only)......................................................... 306
Incremental (Same File)................................................. 306
Incremental (Many Files) ............................................... 306
Multiple Run ........................................................................ 307
Miscellaneous ..................................................................... 308
Remove Time Offset When Starting From a Snapshot .. 308
Send Only the Output Channels That are In Use .......... 309
Start Simulation Manually to Allow Use of an
Integrated Debugger ...................................................... 309
Enable Component Graphics State Animation............... 309
Network .................................................................................... 309
Process Communication ..................................................... 309
Allow Simulation to Run Ahead at Most ......................... 310
Use Idle Time Polling if Network is Large
(200+ Nodes) ................................................................. 310
Network Solution Accuracy ................................................. 310
Interpolate Switching Events to the Precise Time ...........311
Use Ideal Branches for Resistances Under ....................311
Numerical Chatter Suppression ...........................................311
Detect Chatter that Exceeds the Threshold ....................311
Suppress Effects When Detected .................................. 312
Diagnostic Information ........................................................ 312
Echo Network and Storage Dimensions ........................ 312
Echo Runtime Parameters and Options ........................ 312
Echo Input Data While Reading Data Files.................... 312
Dynamics.................................................................................. 312
Signal Storage..................................................................... 313
Store Feed Forward Signals for Viewing ....................... 313
Signal Flow.......................................................................... 315
Compute and Display Flow Pathways on
Control Wires ................................................................. 315
Buses .................................................................................. 315
Treat Multiple Buses with Matching Names as the
Same Bus ...................................................................... 315
Unit System ......................................................................... 316
xvi
PSCAD
Enable Unit Conversion and Apply to
Parameter Values .......................................................... 316
Mapping.................................................................................... 316
Network Splitting ................................................................. 317
Split Decoupled Networks into Separate Matrices ......... 317
Combine Isolated Non-Switching Local Networks ......... 317
Matrix Optimizations............................................................ 317
Optimize Node Ordering to Speed Up Solution ............. 318
Move Switching Devices to Speed Up Solution ............. 318
Fortran ...................................................................................... 319
Additional Source (.f) Files .................................................. 319
Runtime Debugging ............................................................ 320
Enable Addition of Runtime Debugging Information ...... 320
Checks ................................................................................ 320
Array & String Bounds ................................................... 321
Floating Point Underow ................................................ 321
Integer Overow............................................................. 321
Argument Mismatch ....................................................... 321
Uncalled Routines .......................................................... 321
Uninitialized Variables .................................................... 321
Link ........................................................................................... 322
Additional Library (.lib) and Object (.obj) Files .................... 322
User Library Path Method .............................................. 322
Absolute Path Method.................................................... 323
Entering Multiple Files.................................................... 324
Matlab ................................................................................. 324
Link This Simulation with the Currently Installed
Matlab Libraries ............................................................. 324
Chapter 8: Tranmission Lines and Cables ............................ 325
Constructing Overhead Lines ................................................... 326
Building an Overhead Line (/w Remote Ends) .................... 327
Building an Overhead Line (Direct Connection Style) ......... 328
Editing the Line Main Parameters ....................................... 329
Constructing Underground Cable Systems .............................. 330
Building an Underground Cable System ............................. 330
Editing the Cable Main Parameters .................................... 331
The T-line/cable Properties Editor ............................................ 332
Editing a Transmission Line Segment Cross-Section ......... 333
Adding a Tower Component........................................... 335
Editing Tower Properties ................................................ 337
Editing a Cable Segment Cross-Section ............................. 337
Adding a Cable Cross-Section Component ................... 339
Editing Cross-Section Properties ................................... 341
PSCAD Users Guide
xvii
Table of Contents
Selecting the Proper Line Model ......................................... 341
The Bergeron Model ...................................................... 342
The Frequency-Dependent (Mode) Model ..................... 342
The Frequency-Dependent (Phase) Model.................... 342
Adding a Line Model ...................................................... 343
Editing Line Model Parameters ...................................... 343
Line Constants Files ................................................................. 344
Solving the T-Line/Cable Constants Manually .................... 344
Viewing Line Constants Files .............................................. 345
Input (*.tli/*.cli) File .............................................................. 345
Constants (*.tlo/*.clo) File.................................................... 347
Log (*.log) File ..................................................................... 347
Output File........................................................................... 347
Phase Data .................................................................... 348
Series Impedance Matrix (Z): ................................... 348
Shunt Admittance Matrix (Y): .................................... 348
Long-Line Corrected Series Impedance
Matrix (ZLL): ............................................................. 349
Long-Line Corrected Shunt Admittance
Matrix (YLL): ............................................................. 349
Sequence Data .............................................................. 349
Sequence Impedance Matrix (Zsq):.......................... 350
Sequence Admittance Matrix (Ysq): ......................... 351
Load Flow RXB Formatted Data .................................... 351
Detailed Output Viewer ............................................................ 352
Creating Detailed Output..................................................... 353
Invoking the Detailed Output Viewer ................................... 353
The Viewer Environment ..................................................... 354
Spreadsheet Data Viewer .............................................. 354
Column Organization ................................................ 354
Switching between Spreadsheets............................. 355
Copying Data Rows .................................................. 355
Detailed Output Toolbar ................................................. 356
Curve Viewer ................................................................. 356
Invoking the Curve Viewer ........................................ 356
Element Identication ............................................... 357
Chapter 9: Designing Components ....................................... 359
The Design Editor..................................................................... 359
Editing a Component or Module Denition ............................... 360
Returning To Circuit View ......................................................... 361
The Graphic Section................................................................. 361
Navigating and Zooming ..................................................... 361
Scroll Bars...................................................................... 362
xviii
PSCAD
Arrow Keys..................................................................... 362
Panning (Dynamic Scroll) Mode .................................... 362
Zooming ......................................................................... 362
Graphic Objects .................................................................. 363
Adding Graphic Objects ................................................. 363
Rotate, Flip, Mirror and Resize Graphic Objects ........... 364
Changing Graphic Object Properties ............................. 365
Changing Arc Object Properties..................................... 368
Cut, Copy, Paste and Delete Objects ............................ 371
Text Labels .......................................................................... 371
Adding Text Labels......................................................... 371
Rotate, Flip or Mirror Text Labels ................................... 372
Changing Text Label Properties ..................................... 373
Cut, Copy, Paste and Delete Labels .............................. 374
Linking a Text Label to an Input Field ............................ 374
Connections ........................................................................ 375
Adding Connections ....................................................... 375
Changing Connection Properties ................................... 376
Cut, Copy, Paste and Delete Connections..................... 378
Electrical Node Types .................................................... 378
Undo and Redo ................................................................... 379
Saving and Reloading Graphics.......................................... 379
Adjusting Graphic Page Size .............................................. 380
The Parameters Section........................................................... 381
Categories ........................................................................... 381
Adding a New Category ................................................. 382
Viewing Categories ........................................................ 383
Ordering Categories....................................................... 384
Previewing Categories ................................................... 384
Changing Category Properties....................................... 385
Duplicating a Category................................................... 386
Deleting a Category ....................................................... 386
Text Field ............................................................................. 387
Adding Text Fields .......................................................... 387
Moving and Resizing Text Fields ................................... 387
Changing Text Field Properties ...................................... 388
Cut, Copy, Paste and Delete Text Fields ....................... 389
Input Field ........................................................................... 389
Adding Input Fields ........................................................ 389
Moving and Resizing Input Fields .................................. 390
Changing Input Field Properties .................................... 390
Cut, Copy, Paste and Delete Input Fields ...................... 392
Allowing Signal Names .................................................. 392
xix
Table of Contents
Choice Box .......................................................................... 393
Adding Choice Boxes..................................................... 394
Moving and Resizing Choice Boxes .............................. 394
Changing Choice Box Properties ................................... 395
Cut, Copy, Paste and Delete Choice Boxes .................. 396
Adding Choices to a Choice Box ................................... 396
Field Alignment.................................................................... 398
Make Same Width.......................................................... 398
Space Evenly ................................................................. 399
Undo and Redo ................................................................... 399
Find Symbol ........................................................................ 399
Saving and Reloading Parameters ..................................... 400
Conditional statements, Layers and Filters .............................. 401
Conditional Statements ....................................................... 401
Layers ................................................................................. 404
Viewing Layers ............................................................... 404
Setting Layers ................................................................ 405
Graphic Filters ..................................................................... 406
The Script Section .................................................................... 407
Segments ............................................................................ 407
Managing Segments ...................................................... 408
Viewing Segments ......................................................... 409
Segment Types ................................................................... 409
Computations ................................................................. 409
Branch.............................................................................411
Fortran ........................................................................... 415
DSDYN .......................................................................... 418
DSOUT .......................................................................... 418
Checks ........................................................................... 418
Help................................................................................ 419
Comments...................................................................... 419
FlyBy .............................................................................. 420
Transformers .................................................................. 421
Model-Data .................................................................... 424
Matrix-Fill ....................................................................... 424
T-Lines ........................................................................... 427
Undo and Redo ................................................................... 428
Syntax Colouring ................................................................ 428
Internal Output Variables .......................................................... 429
Outputting EMTDC Measured Voltages and Currents ....... 429
CBR ............................................................................... 429
VDC ............................................................................... 430
Adding A Reference To A Source File....................................... 430
xx
PSCAD
Interfacing To C Code............................................................... 431
Using the GNU Compiler..................................................... 431
Using a Fortran 90 Compiler ............................................... 433
Tutorial: Creating A New Component ...................................... 434
Adding Graphics.................................................................. 435
Adding a User Interface ...................................................... 436
Adding Conditional Statements to the Graphic Objects ...... 438
Pre-Processing User Input .................................................. 439
Dening the Electrical Branch ............................................. 440
Adding Code to Dene the Source...................................... 441
Setting the Branch Source .................................................. 442
Sanity Checks ..................................................................... 442
Testing Your New Component ............................................. 443
Adding Internal Output Variables ........................................ 444
Running Your Component ................................................... 446
Chapter 10: PSCAD Script ........................................................ 447
Substitutions ............................................................................. 447
$ Value Substitution Prex Operator ................................... 448
Valid Context and Key Names ....................................... 450
Local Context Short Form .............................................. 450
Substituting Component Constants into Script .............. 451
Substituting Component Constants into Text Labels ..... 453
% Data Substitution Prex Operator ................................... 454
Substituting Text into Commented Script ....................... 455
Substituting Text into Text Labels ................................... 455
{ } Braces............................................................................. 456
Anonymous Expression Substitution ............................. 457
Block Processing ........................................................... 457
! Comment Indicator ............................................................ 458
Script Directives ....................................................................... 459
#STORAGE......................................................................... 460
#LOCAL .............................................................................. 461
#FUNCTION........................................................................ 462
#SUBROUTINE................................................................... 463
#OUTPUT ........................................................................... 464
#TRANSFORMERS ............................................................ 465
#WINDINGS ........................................................................ 466
#IF, #ELSEIF, #ELSE, #ENDIF Directives ................................ 466
~ Line Continuation Operator ................................................... 469
#CASE Conditional Directive.................................................... 470
Expression Evaluation .............................................................. 472
Mathematical Functions ...................................................... 472
xxi
Table of Contents
Chapter 11: Debugging and Finalizing .................................... 477
Compiling Projects ................................................................... 477
Common Output Window Messages ........................................ 477
Warning: Suspicious isolated node detected ..................... 478
Parser: Suspicious substitution of empty key <name> ...... 478
Signal <name> type conversion may lose accuracy ......... 478
Signal <name> source contention -> <source_1>
and <source_2>................................................................. 478
Signal <name> dimension mismatch -> <dim_1> !=
<dim_1> .............................................................................. 478
Signal <name> size mismatch at connection <con> ........ 479
Array <Name> cannot be typecasted ................................ 479
Invalid breakout connection to ground at <Node>.
Node array elements cannot be individually grounded. ...... 479
Short in breakout at <Node>. Node array elements
must be uniquely dened. ................................................... 479
Branch imbalance between breakouts at <Node>.
Node array elements cannot be shared between signals. .. 479
Find Feature ............................................................................. 480
Find What ............................................................................ 480
Search ................................................................................. 480
Viewing Search Results ...................................................... 481
Viewing Build And Data Files ................................................... 481
Fortran and Data Files ........................................................ 482
Map and Make Files ............................................................ 482
Component Ordering ................................................................ 483
Showing Sequence Numbers.............................................. 483
Manually Setting Sequence Numbers ................................. 484
Show Signal Locations ............................................................. 485
Control Signal Flow Indicators.................................................. 486
Virtual Control Wires ................................................................ 487
Using An Integrated Debugger ................................................. 488
Project Options to Preset .................................................... 488
Linking to the Debugger ...................................................... 489
Creating Library (*.lib) and Object (*.obj) Files ......................... 491
Object (*.obj) Files............................................................... 491
Library (*.lib) Files ............................................................... 491
Creating a Library (*.lib) File .......................................... 492
Chapter 12: MATLAB/Simulink ........................................... 495
MATLAB Interface Subroutine .................................................. 495
Arguments ........................................................................... 496
Inputs ............................................................................. 496
Outputs .......................................................................... 496
xxii
PSCAD
Simulink Interface Subroutine .................................................. 497
Arguments ........................................................................... 498
Inputs ............................................................................. 498
Chapter 13: Migrating from Older Versions ............................ 507
Converting PSCAD V2 Projects ............................................... 507
User-Written EMTDC Source Code .................................... 508
Conversion Issues............................................................... 508
V2 Control Type Components ........................................ 508
V2 Electrical Interface Components............................... 508
V2 Component Libraries ................................................ 509
Component Denitions................................................... 510
Importing V2 Draft and Runtime Batch Files ....................... 510
Common Warning and Error Messages ......................... 513
Importing Additional Runtime Batch Files ...................... 513
Importing V2 User Libraries ................................................ 514
Importing Individual V2 Components .................................. 516
Manual Revisions to the New PSCAD V4 Project............... 519
Too Many External Connections .................................... 519
Import/Export Tags with Array Variables ........................ 519
Runtime Module ............................................................. 521
Migrating V2 Cable Systems.......................................... 521
Migrating V2 Transmission Line Systems ...................... 521
Converting PSCAD V3 Projects ............................................... 522
Conversion Issues............................................................... 522
System Dynamics Component Ordering........................ 522
Additional Libraries and Object Files ............................. 522
Flyby Windows ............................................................... 523
Node Loop Component Output Format.......................... 523
MATLAB Libraries and Interface .................................... 524
Appendix A: References ............................................................ 525
Index ............................................................................................. 527
xxiii
PSCAD
ORGANIZATION
The PSCAD Users Guide is organized in the following manner:
xxv
DOCUMENTATION CONVENTIONS
The following general conventions are followed throughout this
manual:
References
References are cited using boxed brackets. For example, referring
to Reference #5 would appear as [5].
xxvi
PSCAD
Notes
All note text will appear in text boxes, as shown below:
NOTE text.
Text Boxes
All code examples will appear in text boxes, as shown below:
CODE
xxvii
PSCAD
Chapter 1:
Welcome to PSCAD
Whether you are a seasoned user upgrading to PSCAD V4, or
you have just recently joined our expanding, worldwide user base
- welcome!
PSCAD was first conceptualized in 1988 and began its long evolution as a tool to generate data files for the EMTDC simulation
program. In its early form, Version 1 was largely experimental. Nevertheless, it represented a great leap forward in speed and productivity, since users of EMTDC could now draw their systems, rather than
creating text listings. PSCAD was first introduced as a commercial
product as Version 2 targeted for UNIX platforms in 1994. It arrived
as a suite of associated software tools that performed circuit drafting,
runtime plotting/control and off-line plotting.
When Version 3 for Windows arrived in 1999, it sought to push the
envelope by introducing a simulation system that could be built in a
modular form. Systems could now be built up using interconnecting
drawing blocks, compiled individually and having their own private
data space. This modular system improved accuracy and correctness of the simulation. In addition, Version 3 brought some new
usability by fully integrating the drafting and runtime systems of its
predecessor. This integration produced an intuitive environment for
both design and simulation.
PSCAD Version 4 represents the latest developments in power
system simulation software. With much of the simulation engine
being fully mature for many years, the new challenges lie in the
advancement of the design tools for the user. The goal is to produce
software that is both powerful and easy to use. Version 4 retains
the strong simulation models of its predecessors while bringing to
the table an updated and fresh new look and feel to its windowing
and plotting. New single-line representations and new compiler
enhancements improve both the accuracy and reliability of the
simulation. New editors and easier navigation mean that finding your
way and maintaining larger systems is far easier to do. Portability to
Version 3 means updating to Version 4 is as simple as point, click,
and run. These and many other enhancements are why PSCAD has
been, and is, the professionals choice for transients simulation.
PSCAD Users Guide
PSCAD
TYPICAL PSCAD STUDIES
The PSCAD users spectrum includes engineers and scientists
from utilities, manufacturers, consultants, research and academic
institutions. It is used in planning, operation, design, commissioning, preparing of tender specifications, teaching and research. The
following are examples of types of studies routinely conducted using
PSCAD:
PSCAD
PSCAD
Category
Project
Organization
PSCAD V3
Project Tree
PSCAD V4
Workspace. The Workspace
contains information on loaded
projects. The organizational
structure of information in each
individual project is now referred to as the project tree for
that particular project.
Messaging
Message Tree
Graphical
View
Draft window
Viewing
Fortran
Fortran file
viewed in text
editor
Viewing
Electrical
Data
Component
Design
Component
Workshop
Component
Workshop:
Graphics
Graphics
category in
Component
Workshop
Parameters
category in
Component
Workshop
Component
Workshop:
SectionsNode
Code section
category in
Component
Workshop
Keyboard Shortcuts
There have been some minor changes to the keyboard shortcuts (especially plotting related shortcuts) from that used in PSCAD V3. The
following tables summarize these changes:
General:
Shortcut
PSCAD V3
PSCAD V4
Dynamic
Scroll
Ctrl + left
mouse hold
Iconify Plot
Shortcut
PSCAD V3
PSCAD V4
Zoom to Time
Frame
Zoom
Previous
Shift + Z
Show Cross
Hairs
Zoom Actual
No longer used
Zoom Smart
Zoom to
Default
Cut Graph
Ctrl + X
No longer used
Plotting:
PSCAD
For a complete list of PSCAD keyboard shortcuts, see Keyboard
Shortcuts.
New Master Library Models
Many new models have been added to the PSCAD Master Library
since the last release of PSCAD V3. The following summary provides a picture and a quick description of each new model. For more
details on these components, see the PSCAD Online Help system.
Graphic
Description
Permanent Magnet
Synchronous Machine
Wind Turbine
Wind Governor
Wind Source
Optimum Run
10
PSCAD
Two CT Differential
Configuration - JA Model
Interface to Harmonic
Impedance Solution
6-Dimension / 2 x 3-Dimension
Electrical Wire Converter
11
Multimeter
12
PSCAD
DIMENSION LIMITS
Any limitations imposed on your simulation projects will depend
mainly on which PSCAD edition you are using, and which Fortran
compiler you have chosen. The following tables list the most commonly encountered dimension limitations.
PSCAD Imposed Dimensions (all Editions and Compilers)
Description
Number of Transmission Line or Cable conductors
per right-of-way
Limit
20
Page Modules
1,024
Components
65,536
1,024
13
Student
Educational
Professional
Electrical
Subsystems
Unlimited
Electrical Nodes
15
200
Unlimited
Page Modules
64
1,024
32,768
32,768
65,536
Components
Fortran 90/95
Compilers
10
Unlimited
200 /
Subsystem
2,000 /
Subsystem
Unlimited
Unlimited
Transformers
70
Unlimited
Mutually Coupled
Windings
10
Unlimited
50
Unlimited
Frequency Dependent
(Phase) Transmission
Lines and Cables
20
Unlimited
1,030
Unlimited
50
Unlimited
500
Unlimited
50,000
Unlimited
10,000 Each
Unlimited
EGCS/GNU
Fortran 77
Compiler
PSCAD
PSCAD COMMUNITY FORUM
On August 18, 2004, the Manitoba HVDC Research Centre unleashed the PSCAD Community Forum on the online world. This
forum is an online environment where users of PSCAD (and other
related products) from around the world can meet and discuss
the issues important to them. The forum includes several separate topic areas, and allows for the exchange of files through post
attachments. Users may contribute to a growing list of example case
projects, and show off what they have accomplished with PSCAD
and/or other related software.
Please note that there are other regional users groups as
well: Please contact PSCAD Technical Support (support@pscad.
com) to find out if your region has one.
Membership
To become a member of the PSCAD Community Forum, you must
have a passion for PSCAD/EMTDC! To add your name to the
forums worldwide member list, simply access the site (details below)
and register online. There is no membership fee.
Forum Details
Users can submit their questions/comments/examples regarding PSCAD or related software by posting under the appropriate
forum. Your post will immediately be viewable to all registered
members. If you are responding to an existing topic, the forum will
automatically send an email to the member who posted the topic.
PSCAD Community Forum: http://bb.pscad.com
NOTE: The PSCAD Community Forum
should not be used as a support medium. If
you have queries regarding problems
simulating with PSCAD, bug reports, etc.,
please contact the PSCAD Support desk at
[email protected]. Contacting the support
desk will ensure a prompt response to your
query.
15
[email protected]
+1 (204) 989-1240
+1 (204) 453-5074
www.pscad.com
Address:
16
PSCAD
This will bring-up the Support Request dialog window. Simply add
your comments in the space provided. Please ensure that you select
a Description of the Problem from the drop list, which most adequately describes your problem type. When finished, press the Send
button. An email will be sent directly to the PSCAD Support Desk.
17
18
E-mail:
Phone:
Fax:
Web Site:
[email protected]
+1 (204) 989-1240
+1 (204) 453-5074
www.pscad.com
Address:
PSCAD Sales
Manitoba HVDC Research Centre Inc.
244 Cree Crescent
Winnipeg, Manitoba R3J 3W1
Canada
PSCAD
Chapter 2:
Minimum
Recommended
Processor
3 GHz (Pentium 4 or
Athlon)
Operating
System
Windows 2000
Windows XP
Windows 2000
Windows XP Pro SP2
Additional
software
Memory
(RAM)
256 MB
Hard Disk
500 MB
40 GB (Fast SCSI or
IDE)
Video
Other
Peripherals
and
Hardware
Same
19
LICENSING
All PSCAD software editions, except the Student Edition, must
be licensed. Licensing is organized and controlled using License
Manager software, which can exist either as a separate, standalone
program, or can be embedded within PSCAD itself.
The type of licensing arrangement that is best for you depends on
how you wish to utilize PSCAD, and on what type of license you
purchased. The following sections describe each type of licensing
arrangement in detail.
Multi-User Licensing
The multi-user licensing (MUL) method was first introduced with
PSCAD V3, and was then the only licensing option available. With
this configuration, the License Manager software is installed as a
standalone program, which can be accessed by any computer (including the host), on a Local Area Network (LAN).
20
PSCAD
NOTE: The License Manager will only
grant licenses to computers on the same
subnet. Licenses requested via a router will
not be accepted.
21
22
PSCAD
Single-user licenses can be time limited or infinite (no time limit).
Trial Licensing
In order to simplify the evaluation process, and to provide access to
the full PSCAD Professional Edition functions, trial licensing is now
available with PSCAD V4. A trial license is a special type of singleuser license, where a time limit is mandatory and the user may only
own a single trial license of the PSCAD Professional Edition.
NOTE: Only the Professional Edition of
PSCAD is available for trial licensing.
With trial licensing, neither the License Manager nor the dongle
is required. However, the user must request a trial license after
PSCAD is installed. Note that until the trial license is approved and
sent by the Manitoba HVDC Research Centre Inc., the installed copy
of PSCAD will function as a Student Edition (SE), with all SE limitations imposed (i.e. 15 electrical nodes maximum).
NOTE: Do not upgrade your operating system, hard drive, or network card during the
duration of the trial license period. Any one
of these changes will cause your trial license
to be lost.
23
The USB and parallel port dongles are the preferred choice, due
to their small size. The parallel port dongle is perfect for laptop
computers, as it features a low profile and does not protrude from
the back of the machine (and typically does not ever need to be
removed). The serial and parallel port locks are compatible with all
Windows platforms on which PSCAD is supported. However, the
USB dongle is NOT compatible with the following operating systems:
Windows NT 4.0
Windows 95 OEM Service Release 2 or earlier
NOTE: Not all computers come with USB
ports. If you are not sure if you have one,
contact your system administrator for help.
License Key
The license key is an ASCII text file named license.txt, which usually resides on a floppy disk (called License Manager: License.txt)
required for the PSCAD Professional and Educational Editions. This
file contains encrypted information designed to act as a Key to adding or upgrading licenses (both single-user and standalone) to the
license database file, which is used directly by the License Manager.
24
PSCAD
LICENSE MANAGER SOFTWARE
In addition to the standalone License Manager software that was first
introduced with PSCAD V3, the PSCAD package now includes two
additional types of License Manager. The type of License Manager
you will need depends on your licensing arrangement.
There are a few important points to discuss regarding the maintenance and operation of the License Manager. These are outlined in
the following sections as well.
Standalone License Manager
The Standalone License Manager (SLM) is used only with multiuser licenses. The SLM can operate on a dedicated server, or on
any machine running PSCAD. Any combination of PSCAD products can be included and used interchangeably with this License
Manager. Installation instructions for the SLM are given later in this
chapter.
Maintenance and Support
Once the License Manager is installed and running, it is a good idea
for the person operating the designated License Manager server to
maintain the software and ensure proper operation.
The Standalone License Manager (SLM) usually starts automatically
when the machine is booted (unless manual starting is specified during installation) and runs as a background process. All SLM events
and transactions are recorded in a log file entitled Lmgrd-log.txt,
which is usually located in the Windows or WINNT directory (depending on your OS). When troubleshooting, this file contains important
information about the cause of any problems.
If problems arise with the operation of your License Manager software, first try to address the problem using the clues found in the
log file. If the solution remains elusive, send us an email at PSCAD
Support Services ([email protected]) with a detailed description
of the problem. To ensure efficient response time, please attach the
log file (i.e. Lmgrd-log.txt). Also, go to START | Programs | HVDC
Lmgr and run the Get License Info utility and attach the generated
Get License Info file (getinfo.txt) to the email.
Local License Manager
The Local License Manager (LLM) is utilized only when running
under a single-user license. Although the LLM will support multiple
PSCAD Users Guide
25
7327,
7328,
26
PSCAD
27
28
PSCAD
NOTE: The PSCAD version numbers on this
dialog may vary according to what version
you are upgrading to/from.
29
30
PSCAD
31
If you are a Student Edition user, will be using a SingleUser License, or intend to request a Trial License (time
limited), then you do not require a Standalone License
Manager. Select the appropriate choice within the I do not
need a standalone License Manager section of the above
dialog.
If you did not select to install the Standalone License
Manager in Step 5, but have changed your mind, select I
will use a License Manager on this machine.
If this machine will be contacting a remote Standalone
License Manager, select I will use a License Manager on
another machine on my network. If this option is selected,
you must then enter the hostname of the machine, on which
the License Manager resides. For example, if this machine
is named zeus, then you should enter this name as shown
above. The Installer will also accept an IP address. The
hostname CANNOT contain spaces!
32
PSCAD
At this point, the Installer will install PSCAD, and then branch off into
additional installations that were indicated in Step 5. If you did not
select the License Manager in Step 5, proceed to the section entitled
Installing EGCS/GNU Fortran.
Installing the License Manager
The License Manager Installer will only run if you selected it in Step
5. If you did not, proceed to the section entitled Installing EGCS/
GNU Fortran.
8. You will be presented with the following dialog window. Click
Next.
33
34
PSCAD
12. You have the option of installing the License Manager
anywhere on your system. The dialog above will allow
you to make any changes that you require for installation
location. When you have nished selecting a destination,
click Next.
13. You will then be asked to enter a program folder, in which to
place all of the License Manager related program icons. A
folder called HVDC Lmgr is selected by default. Click Next
when nished.
Windows 98/ME Only:
14. The installer will ask Would you like to start the License
Manager during machine boot?. Selecting Yes means
that the License Manager will start automatically when
the system is re-booted. If No is selected, the License
Manager must be manually started following each machine
reboot. See Manually Starting the License Manager in this
chapter for more details.
35
17. Before the hardware lock drivers are installed, you should
receive an important warning message similar to the
following. Click OK once you have unplugged your dongle.
36
PSCAD
19. The Installer will now ask you to connect your dongle
as shown below. If you are unsure where your USB,
parallel or serial ports are located, contact your system
administrator. Also, see the notes given below.
IMPORTANT:
A. Parallel Port Dongle:
B. USB Dongle:
37
As this is the first time you are installing PSCAD V4 and the License
Manager will require a new product license - select Yes - install/
update product licenses. If this is not your first installation of the
License Manager or you prefer not to install or update your license,
select No - dont install/update product licenses. See the notes
below if you are not sure. Click Next. If No - dont install/update
product licenses is selected, proceed to Step 24.
38
PSCAD
NOTE:
Select Yes:
If this is the rst time you are installing the License Manager
on this machine, or
If you are adding a new license (V4 for instance) to an
existing license database le, or
If you are updating or modifying a license, which is already in
the existing license database le.
Select No:
21. The Installer will then invoke the Enter License Key
program, and a Command Prompt window should appear
asking you to enter the License Key File Name. This le is
located on the oppy disk provided with PSCAD, entitled
License Manager: License.txt.
22. Place the License Floppy Disk into your oppy drive and
enter a:\license.txt, as shown below, where a represents
the drive letter. If your License File is located at another
location, such as on the network, enter the absolute path to
the le or contact your system administrator for help.
39
If so, make sure that the path to the license file is indeed correct. Also, make sure that there are no problems with the floppy disk or drive
(if your License File is on a floppy disk). Press the Enter key.
License File and License Database Do Not Match:
This problem usually arises during a new installation when License
Manager software was previously installed on this computer. The
licensing information is stored on a file called lmgr-hvdc (with no
extension), which is usually located in your Windows or WINNT
directory. This file is not deleted when the License Manager is
uninstalled. If this is indeed the case, select Option 3 as indicated
below:
40
PSCAD
23. The Install program will now scan both the dongle and the
license le and check for validity. The output will be similar
to that shown above. Press the Enter key to exit.
24. This completes the License Manager installation process. It
is highly recommended that you view the Read Me le
when prompted, as it contains useful information to users.
41
42
PSCAD
Please perform the following steps:
1. Go to the ofcial PSCAD website (www.pscad.com) and
select the Downloads section from the main menu bar. You
will be asked to enter your PSCAD Member ID and
Password before being allowed access to the download
site. If you do not have a Member ID and Password, you
can become a member by selecting the register link on the
page. Contact us at [email protected] if you experience
problems.
2. Once you are in the Downloads area, select the desired
Download, Update or Patch PSCAD V4 link under
PSCAD V4 heading. This will direct you to a new page
corresponding to the PSCAD Edition type selected. Please
review the information presented in this page before
proceeding. Select the link entitled Patch PSCAD V4
<xxx> Edition to V4.x.x.
3. On the resulting page, click the Install button.
4. Set-up will initiate and you should see a dialog indicating
the security risk of downloading the patch directly from our
website. Please read carefully and select I understand the
security risk and wish to continue and click Next IF this is
indeed what you wish to do. If you wish to cancel the patch
installation, click the Cancel button.
43
44
PSCAD
4. Select Modify and then click Next. Each screen that
requires important user input will have a corresponding step
to it in the following pages.
5. The following warning should pop-up. If this warning is
not heeded, the Installer may not be able to perform the
modications. Click OK.
45
Possible Messages
License Manager is Currently Running:
If you selected to either install or uninstall the License Manager software and an instance of the License Manager is detected as running
on this PC, you will receive the following dialog.
46
PSCAD
See Manually Stopping the License Manager for more details. Click
Retry once the License Manager process has been stopped.
PSCAD is Currently Running:
If you selected to either install or uninstall the PSCAD and an instance of PSCAD is detected as running on this PC, you will receive
the following dialog.
47
4. Select Repair and the click Next. Each screen that requires
important user input will have a corresponding step to it in
the following pages.
5. The following warning should pop-up. Click OK.
48
PSCAD
49
See Manually Stopping the License Manager for more details. Click
Retry once the License Manager process has been stopped.
PSCAD is Currently Running:
If you selected to repair PSCAD and an instance of PSCAD is detected as running on this PC, you will receive the following dialog.
50
PSCAD
51
52
PSCAD
See Manually Stopping the License Manager for more details. Click
Retry once the License Manager process has been stopped.
PSCAD is Currently Running:
If you selected to remove PSCAD and an instance of PSCAD is detected as running on this PC, you will receive the following dialog.
53
PSCAD
PSCAD is invoked, it will ask the License Manager if there is a
license available. If PSCAD cannot communicate with the License
Manager at all, the following screen will be encountered upon attempting to start PSCAD:
Followed by:
55
56
PSCAD
'autoexec.bat' le, or in the system environment variables. In
other words, this other utility is being called.
Solution: Ensure that the specified Fortran compiler is
installed. Make sure that your virus scanner is configured to allow
the required communication. Check that the compiler environment
variables are set properly. Check either your autoexec.bat file or
your environment variables (depending on your OS) to see if there
is a conflicting utility. If so, you may be able to solve this problem by
placing the utility definition statement, related to the PSCAD compiler, before the other. When in doubt, ask your system administrator
for help.
If all else fails, contact us by email at PSCAD Support Services
([email protected]) with a detailed description of the problem.
Value
GCC_EXEC_PREFIX
C:\progra~1\egcs\lib\gcc-lib\
PATH
C:\progra~1\egcs\bin
Windows 98/ME:
57
Value
FPS_LIB
C:\Program Files\DevStudio\VC\LIB
INCLUDE
LIB
Path
C:\Program Files\DevStudio\DF\INCLUDE;
C:\Program Files\DevStudio\VC\INCLUDE
C:\Program Files\DevStudio\DF\LIB;
C:\Program Files\DevStudio\VC\LIB
C:\Program Files\DevStudio\SharedIDE\BIN;
C:\Program Files\DevStudio\DF\BIN;
C:\Program Files\DevStudio\VC\BIN
Windows 98/ME:
The above changes need to be made by editing the autoexec.bat
file according to standard formats. For help on this, contact your
system administrator.
Compaq Fortran 6 Compiler
Windows NT4/XP/2000:
1. Right-click on your My Computer icon and select
Properties...
2. Click the Advanced tab and select Environment Variables.
3. Ensure that the following System Variables are set:
58
PSCAD
Variable
Value
INCLUDE
LIB
Path
Windows 98/ME:
The above changes need to be made by editing the autoexec.bat
file according to standard formats. For help on this, contact your
system administrator.
Intel Fortran 9 Compiler
Windows NT4/XP/2000:
1. Right-click on your My Computer icon and select
Properties...
2. Click the Advanced tab and select Environment Variables.
3. Ensure that the following System Variables are set:
Variable
INTEL_
LICENSE_FILE
LIB
Path
Value
C:\Program Files\Common Files\Intel\Licenses
C:\Program Files\Intel\Compiler\Fortran\9.0\IA32\lib
C:\Program Files\Intel\Compiler\Fortran\9.0\IA32\Bin
Path
Value
C:\Program Files\Microsoft Visual Studio .NET\VC7\
PlatformSDK\lib;
C:\Program Files\Microsoft Visual Studio .NET\VC7\lib
C:\Program Files\Microsoft Visual Studio .NET\VC7\
bin;
C:\Program Files\Microsoft Visual Studio .NET\
Common7\IDE
59
Path
Value
C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\
PlatformSDK\lib;
C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\lib
C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\
bin;
C:\Program Files\Microsoft Visual Studio .NET 2003\
Common7\IDE
Windows 98/ME:
The above changes need to be made by editing the autoexec.bat
file according to standard formats. For help on this, contact your
system administrator.
TRIAL LICENSES
If you have already installed the PSCAD V4 Student Edition and
require more than the fixed 15 electrical node limit, or if you would
like to review the component design features, you may be interested
in a time limited evaluation license for the PSCAD V4 Professional
Edition. If interested, please follow the procedures below to receive
your Trial License.
NOTE: Once you have submitted Trial
License request, a new License Key will be
sent pending approval. Trial licensing is only
available for the PSCAD V4 Professional and
Educational Editions.
60
PSCAD
1. Open the PSCAD Student Edition and go to Edit |
Workspace Settings... in the main menu bar to open the
Workspace Settings dialog.
2. Select the License tab near the top of the dialog.
61
6. A dialog will appear asking if you would like to email the Trial
License Request le now. Click Yes to proceed to Step
7. Click No if you wish to email the Trial License Request
le at a later time. If you decide to send the le at a later
62
PSCAD
time, you can start at Step 8 of this procedure, as the le has
already been created.
8. PSCAD will then open a new email form from your default
email tool. The body of the email will contain the information
given in Step 4 and the sending address is set to PSCAD
Sales ([email protected]).
NOTE: If you generated your Trial License
Request file at an earlier time, you do not
need to add the text to the body of the email,
as this is contained within your Trial License
Request file anyway.
63
PSCAD
65
66
PSCAD
ADDING/UPGRADING A SINGLE-USER LICENSE
You do not need to reinstall the License Manager in order to update
or add a single-user license. You will simply need to update the
License Manager database file, which resides on your computers
hard drive.
To update or add a new license to your license database file:
1. Save your license le (located on the oppy disk provided
with PSCAD, entitled License Manager: License.txt) to a
convenient directory (say C:\temp).
2. Open PSCAD V4 Student Edition and go to Edit |
Workspace Settings... in the Main Menu Bar. Click the
License tab.
67
68
PSCAD
Changing Active License Type
To change the active license type, click the down arrow in the selection box under the Available License(s) area and select the required
license. Click the Activate button.
69
70
PSCAD
When you run this program, a DOS based window should appear
similar to that shown above.
A text file will also be created at the same time called getinfo.txt (as
indicated above). This is an important file to include when contacting
PSCAD Support Services by email ([email protected]).
Active Licensing Information
See Viewing Active License Information in this chapter for more
details.
71
Windows XP/2000
Right-click on your My Computer desktop icon and select
Manage.
Double-click on the Services and Applications entry and
then double-click Services.
Highlight 'HVDC License Manager,' right-click and select
'Start.'
Press Ctrl + Alt + Del to bring up the Task List and then use
End Task to stop any instances of lmgrd-hvdc.
Windows NT
Windows XP/2000
72
PSCAD
Chapter 3:
Workspace Settings
Workspace Settings Overview
Now that PSCAD has been installed successfully, you may want to
adjust some of the available work environment settings and preferences available. Workspace settings are those that affect the entire
Workspace (i.e. all loaded Projects). These parameters are contained within a single dialog window called the Workspace Settings
dialog.
To access this dialog, go to Edit | Workspace Settings... in the Main
Menu bar.
The settings available in the Workspace Settings dialog control window are divided into seven specific areas:
Projects
Views
Runtime
Fortran
Matlab
License
Associations
73
Initialization
This area provides some preferences specific to saving and initialization:
74
PSCAD
HTML Browser
This area provides some preferences specific to HTML browser settings:
PSCAD will use this browser for user dened help: Enter
the path to your preferred HTML browser. You can either
enter the path directly, or use the browse button to select the
directory. This browser will be used for viewing your userwritten component help les. See the section entitled Help
Segment in Chapter 9 of this manual for details on setting
up component help les.
VIEWS
The Views section of the Workspace Settings dialog window
contains a variety of mostly cosmetic preference settings and
functions. These are explained in detail below.
75
76
PSCAD
window, will focus the Circuit canvas on the project main
page.
Script Editor
This area provides some preferences specific to the Script section of
the Design Editor:
The default setting is 3D Shadow, but you may also choose either
Plain Paper or Metal Chisel.
RUNTIME
The Runtime section of the Workspace Settings dialog window is
used to set-up output and memory related settings. These are explained in detail below.
77
78
PSCAD
FORTRAN
The Fortran section of the Workspace Settings dialog window is
used to set-up Fortran related settings. These are explained in detail
below.
Fortran Compiler
This section contains Fortran compiler settings:
79
MATLAB
The MATLAB section of the Workspace Settings dialog window is used to set-up MATLAB/Simulink Interface related
settings. These are explained in detail below.
Interface Settings
The Interface Settings area is used to set-up a directory path to the
MATLAB installation libraries.
80
PSCAD
NOTE: Enabling the MATLAB/ Simulink
interface is a Project specific option. See the
section entitled Link Options in Chapter 7
for more details.
LICENSE
The License section of the Workspace Settings dialog window is
devoted to License Manager and other licensing preferences and
features. These are explained in detail below.
License Host
The hostname of the License Manager server machine on your
network.
81
See the section entitled Trial Licenses in Chapter 2 for more details.
ASSOCIATIONS
The Associations section of the Workspace Settings dialog window
is used specifically to set-up file association settings. All file associations specified here, will enable the user to start-up external applications from within PSCAD, by using the File Reference component.
82
PSCAD
Enter the file extension (without the period) and press Enter. Either
double left-click the box directly to the right of the new extension,
or press the Browse (...) button to enter a path to the corresponding
application executable file. The Browse button will bring up a dialog
window by which you can navigate to the file.
83
Thats all there is to it! The next time the File Reference component
is double-clicked, it will start the associated application and open the
specified file.
84
PSCAD
Chapter 4:
85
PSCAD
and of course the graphically constructed system itself. There are
two types of projects in PSCAD: Library and Case projects.
NOTE: Component definitions stored in case
projects are local to that case and cannot
be used in other projects. Library projects
should not contain components defined in
other cases or libraries.
Case
Case projects (or simply cases) are where most work is performed
in PSCAD. In addition to performing the functions of a library project, cases may be compiled, built and run. Simulated results can
be viewed directly within the project through on-line meters and/or
plots. Case projects are saved with the file extension *.psc.
Library
Library projects are used primarily to store component definitions
and viewable component instances. Instances of component definitions stored in a library, can be used in any case project, provided
that the library is loaded first. Library projects are saved with the file
extension *.psl.
If you can successfully run this example Project at the end of this
chapter, it will also mean that your installation was successful. So
lets begin!
Starting PSCAD
To start PSCAD, go to Start | Programs | PSCAD in the Windows
Start Menu, and select whichever PSCAD Edition you are licensed
for. This will open the main PSCAD environment, as shown below.
PSCAD Users Guide
87
You should see a list of items across the top of the environment
(File, Edit, etc.). These items are part of the Main Menu. The buttons directly below the main menu are part of the Main Toolbar.
Title, Menu and Main Tool Bar
The image below shows the PSCAD V4 Title and Menu Bars.
88
PSCAD
Toolbar Buttons
The row of buttons directly below the Main Menu bar comprises the
Main Toolbar.
While menu items are a two-stage process, a toolbar offers a singleclick alternative. The Main Toolbar buttons initiate actions as soon
as you click on them and hence are easier to use. For this reason,
most frequently used operations have toolbar button equivalents.
After you become more familiar with the program, you may begin to
use the many keyboard shortcuts available. See the section entitled
Keyboard Shortcuts in this chapter for more details.
Workspace and Output Windows
If you take a look at the top left-hand corner of the PSCAD
Environment, you should see a smaller window referred to as the
Workspace window. If it is not visible, go to the main menu bar and
click on View | Workspace.
The Workspace gives you an overall view of any library and/or case
projects loaded. You can use it to select components and perform
many other activities.
89
All the status, warning and error messages involved in both Build
and Runtime procedures are logged in this window - so it is a good
idea to keep this window open and visible at all times.
Both the Workspace and Output windows are based on a tree-type
structure, where branches can be expanded and collapsed at will.
Loading a Case Project
We will start with the most simple of example cases for this
tutorial. This exercise will help us to ensure that PSCAD and any
Fortran compilers being used are installed correctly. We will learn
to create a case from scratch in Creating a New Project tutorial of
Chapter 5.
To load an existing Case Project, click on File from the Main Menu
bar and select Load Project... You can also either press Ctrl + O or
click the Load button in the Main Toolbar.
You should see the Load Project dialog pop up on your screen. By
default, the selected file type is PSCAD Files (*.psc, .psl) at the bottom of the dialog. With this type selected, you will see only PSCAD
Project files that have *.psc or *.psl extension and directories. The
file extensions stand for pscad case or pscad library.
90
PSCAD
Navigate to the tutorial directory inside your PSCAD installation
directory (i.e. C:\Program Files\PSCAD4xx\examples\tutorial). Click
on the vdiv_1.psc file and then click on the Open button to load this
Case Project into PSCAD.
The Workspace window will now list a second project entitled vdiv_1
(Single Phase Voltage Divider) directly under the Master Library
Listing. Double-click on the Project title (or right-click and select
Open) in the Workspace window to open and view the main page of
the Project in the Circuit window of the Design Editor.
91
The plot and graphs will contain the values of the voltage at the midpoint of the circuit, and the current flowing through the circuit when
the project is run.
Running a Simulation
Before we run the simulation we will do a simple calculation to
find out what load current and mid-point voltage we should be
expecting. Double-click on the source component to open and view
its properties - note that the source voltage magnitude is 70.71 kV
RMS (or 100 kV peak). Close this dialog by clicking on the Cancel
button at the bottom of the dialog and left-click anywhere in an empty
space on the page, to de-select the selected source component (this
will stop the component from blinking). For a 100 kV source voltage,
we know that the mid-point voltage should then be 50 kV peak, and
the load current should be 50 kA peak. Now let us run the simulation
and actually verify the current and voltage waveforms.
To run a case, simply click on the Run button in the Main
Toolbar. When this button is pressed, PSCAD will go through several stages of processing the circuit before starting the EMTDC
simulation. You should see a message in the status bar at the
bottom of the PSCAD window, related to various stages of the
process. Depending on how fast your computer is, you may not be
able to read these.
Watch the graphs as the simulation progresses. If you look near
the bottom-right corner of the PSCAD Environment, you will see a
message xx% complete where xx represents the percentage of the
total simulation length. To the right of it you will also see the current
simulation time, which changes with the simulation. Once again,
depending on the speed of your computer, the simulation may finish
almost instantaneously.
92
PSCAD
This tutorial case is set up to run for 0.2 seconds. At the end of the
run you will see the message EMTDC run completed in the status
bar. Your plots should look similar to the following - depending on
your plot settings:
Make sure that your simulation produces the same result as shown
here. This is one step towards ensuring that your PSCAD is installed
correctly.
Click again on the Run button to see the run once again. PSCAD
will go through all three stages (i.e. compile, build and run), however,
you may not be able to detect the first two stages, as they pass by
very quickly. This is because PSCAD performs them only if changes
have been made to the circuit.
Printing the Circuit
To print the circuit along with the graph you just simulated, click the
right mouse button on the background of the main circuit page and
either select Print Page or Print Preview Page items.
93
This should bring up either the Print dialog or the Print Preview
Viewer. The contents of the Print dialog depends on what you are
printing - click the OK button to proceed. The Print Preview Page
allows you to view your page before printing.
THE WORKSPACE
Formally known as the Project Tree in PSCAD V3, the Workspace
has matured into a central project database for PSCAD. The
Workspace not only provides an overview of all projects currently
loaded, but also organizes data files, signals, controls, transmission
line and cable objects, display devices, etc. within an easily navigable environment. Features such Drag and Drop may also be utilized
from the Workspace.
NOTE: The PSCAD Master Library is
always the first project loaded into the
Workspace. The Master Library cannot be
unloaded.
Projects
Runtime
94
TLines/Cables
Files
PSCAD
Moving and Resizing the Workspace Window
The Workspace window may be moved and dropped anywhere in
the PSCAD environment. To do this, click and hold the left mouse
button with the mouse pointer directly over the top window bar.
Drag the window to where you want it placed (you should see a
boxed outline of the window) and let go of the mouse button. Depending on where the window outline is when the mouse button is
released, the window will either dock itself into position or appear as
a floating window.
The Workspace window can be resized by moving the mouse pointer
over one of the four window edges until the pointer changes to that
shown below:
or
Click and hold the left mouse button and drag the mouse pointer to
resize in either the horizontal or vertical direction as shown above.
The Projects Section
When a Case or Library Project is loaded into PSCAD, the Project
filename and description will appear in the Projects section of the
Workspace window. It is possible to load multiple Projects and if
this happens the Projects will be listed in the order in which they
were loaded.
The Projects section is used mainly for navigating either between
Projects or within Projects; including direct access to Modules and
95
Library Project
As mentioned above, each project listed in the Projects section contains information regarding any stored Definitions, as well as Module
hierarchy, organized into a standard tree-type structure. This structure is referred to as the Project Tree.
You can expand and detract each branch in the project tree by clicking on either the [+] or the [-] symbols respectively.
Main Page Branch
This branch lists the various Module instances in the project. Starting with the main page, any existing Modules are organized as they
exist in the Project, not only making navigation simple, but providing
an overview of the Project structure.
96
PSCAD
For example, the Case Project above (called test) contains a main
page with two Modules called net1 and net2. The Module net1
contains another Module called sub1.
A simple double-click on a particular Module will bring you directly
to that page in the Circuit window of the Design Editor. Right-clicking on a Module will bring up a menu where you can either compile
that particular Module, or change the Module page set-up. See
Compiling an Individual Module or Editing the Page Setup in
Chapter 5 for more details on these menu functions.
Icons are included in this branch for visual representation and are
listed below:
Main Page
Module Instance
Denitions Branch
The Definitions branch contains a list of all definitions that are stored
within that particular Project. Instances of component Definitions that
are defined in other Projects (such as Master Library components)
do not appear here.
The image below shows the list of component Definitions for the
same Case Project discussed in the previous section. In addition
to the definitions of each Module, the existence of a component
Definition (called user_comp) is also indicated.
97
NOTE: This example is for illustrative purposes only. It is not usually a good idea to
define component Definitions within a Case
Project, as they can then only be used in that
Project. All component Definitions should
exist exclusively in Library Projects.
98
PSCAD
99
Modules Only:
Components Only:
Icons are included for visual differentiation between component definitions and module definitions. These are listed below:
100
PSCAD
Active Project
As mentioned earlier, the Projects section of the Workspace will allow you to have multiple Projects loaded simultaneously. If a Case
Project is to be compiled and run, PSCAD needs to know which
one this is accomplished by selecting an Active Case Project
(right-click on the project and select Set as Active). The Projects,
Runtime and Files sections of the Workspace operate based on the
Active Project.
Active case projects are indicated as shown below:
101
If you want to add any of these components to your own case, simply
copy the Instance directly from the Master Library and paste into
your own Project. You can also use the Library Pop-up Menu system, or the Draw toolbars.
The Runtime Section
The Runtime section is provided specifically for the organization
of Runtime related objects, such as Output Channels, Controls,
Graphs, etc. into a convenient tree-based environment. The main
trunk of the Runtime tree is by default arranged according to existing Modules. However, it is also possible to view Runtime objects
according to Runtime Group, or to view a list of existing Radio Links
components. Regardless of the view settings, any Runtime object
can be navigated to directly with a simple double-click.
NOTE: The Runtime Section is available
only for the currently Active Project. If you
would like to see the Runtime details of a
Project that is not active, simply set the desired project as active first before clicking the
Runtime tab. See Setting the Active Project
in Chapter 5 for more details.
102
PSCAD
Modules View
In Modules View, each Module Instance existing in a Project is
represented in the Runtime section as a branch. If the Module
contains any Runtime objects, such as Output Channels, Controls,
Graphs, etc. within it, a [+] box will appear beside its branch. In the
PSCAD Users Guide
103
A simple double-click on a particular Module branch will bring you directly to that page in the Circuit window of the Design Editor. Rightclicking on a Module branch will bring up the corresponding pop-up
menu.
104
PSCAD
Runtime Objects
Each Module branch will contain a list of all Runtime objects that
exist in the corresponding Module (provided that View All is selected
as described above). Whenever a Runtime object is added to the
Project, a Record of it is immediately added under the appropriate
Module branch. The Record will remain until the object is removed
from the project.
Runtime objects are classified as special components that are
involved exclusively with the PSCAD Runtime interface and are
organized into four main groups:
Controls
Recorders
Display Devices
Named Signals
If a module contains any Runtime objects, these will appear as subbranches under the corresponding Module branch, as shown below.
105
106
PSCAD
The following list describes the functions of this menu:
Controls Only:
Records Only:
107
Module
Runtime sub-branch
Controls:
Recorders:
Display Devices:
XY Plot Instance
PolyMeter Instance
PhasorMeter Instance
Named Signals:
108
PSCAD
Observers
Output Channels and Control objects can exist in a Project without
being associated with a Curve, Meter or Control Interface (i.e. the
data is not plotted or monitored). If any of these objects is added as
a Curve to a Graph, Meter to a Control Panel, or added directly to a
PolyMeter or PhasorMeter, an entry referred to as an Observer will
be added as a sub-branch to the corresponding Recorder or Control
in the Runtime section. If the object is displayed in more than one
Display Device, an Observer will be added for each occurrence.
The figure below shows the existing Controls and Recorders in the
Network #1 Module for our test Project. The Project contains a
Slider called Slider 1, a Two State Switch called Switch 1, as well
as two Output Channels entitled Ea and Switch 1 Output. Each object possesses an Observer to indicate that the output of the objects
is being sent to a Display Device.
109
Icons are included for all Observer types. These are listed below:
Recorders:
Curve
Meter
PolyMeter
PhasorMeter
Controls:
Slider
Dial
Push Button
Groups View
In Groups View, Runtime objects are listed according to Runtime
Group. If a particular Group contains any Runtime objects within it,
a [+] box will appear beside its branch. Right-clicking on a Group
branch will invoke a pop-up menu:
110
PSCAD
NOTE: To switch to Groups view, rightclick on the Project name and select View
Groups. See the beginning of this topic for
details.
In this view, all Controls or Output Channel objects (and corresponding Observers) are organized according to a specified
Runtime Group name. Each group can contain any Controls or
Output Channel object that is described in the Runtime Objects and
Observers sections above.
For more information on creating Runtime Groups, see Grouping of
Runtime Objects in Chapter 6.
Radio Links View
In Radio Links View, all Radio Links components existing in the
Project are listed in alphabetical order. Right-clicking on a Group
branch will bring up a pop-up menu:
NOTE: To switch to Radio Links view, rightclick on the Project name and select View
Radio Links. See the beginning of this topic
for details.
111
Icons are included for both Radio Link types. These are listed below:
Transmitter
Receiver
TLines/Cables
The TLines/Cables section is provided specifically for the organization of Overhead Transmission Line and Underground Cable related objects, specifically Transmission Line/Cable Configuration,
Overhead Line Interface, and Cable Interface components. The
main trunk of the TLines/Cables tree is a simple list of all such objects, where the objects may be sorted by name.
NOTE: The TLines/Cables Section is available only for the current Active Project. If
you would like to see the TLines/Cables
details of a Project that is not active, simply
set the desired project as active first before
clicking the TLines/Cables tab. See Setting
the Active Project in Chapter 5 for more
details.
Icons are included for easy visual differentiation between TLines and
Cables. These are listed below:
Underground Cable
112
PSCAD
113
114
PSCAD
Close all File Windows: Selecting this option will close all
text le windows currently open for viewing. This option will
only close windows related to external les, it will not close
any open Circuit views.
Sort By Name: Select this option to sort all Modules
displayed by name. Continually selecting this option will
toggle the alphabetical order from A to Z or Z to A.
Sort By Description: Select this option to sort all Modules
displayed by description. Continually selecting this option
will toggle the alphabetical order from A to Z or Z to A.
Clean Temporary Directory (.emt): Select this option to
delete all temporary Project les (i.e. compilation, make,
data, etc. les) from the Temporary Directory. See PSCAD
Temporary Directories in this chapter for more details.
The files shown on the main trunk are the Active Case Project files
themselves (*.psc), along with the corresponding Map (*.map) and
Make (*.mak) files. A simple double-click on any file will open that
file in the main viewing area of the PSCAD Environment. Right-clicking on the File will invoke a pop-up menu:
115
Module directory
File
116
PSCAD
Right-clicking on a transmission line or cable sub-directory will invoke
a pop-up menu as shown above. The options in this menu are as
described below:
117
Cable directory
Drag the window to where you want it placed (you should see a
boxed outline of the window) and let go of the mouse button. Depending on where the window outline is when the mouse button is
118
PSCAD
released, the window will either dock itself into position or appear as
a floating window.
The Output window can be resized by moving the mouse pointer
over one of the four window edges until the pointer changes that
shown below:
or
Click and hold the left mouse button, and drag the mouse pointer to
resize in either the horizontal or vertical direction.
Errors and Warnings
A distinction can be made between error and warning messages simply by the colour of the symbol preceding the message. The colour
code is as follows:
OK
Warning
Error
119
Search
If a message indicates that the problem is arising at a particular subsystem and node, then you can utilize the Find feature in PSCAD to
search for this exact location. Simply Invoke the Find dialog and in
the Search input field, select Node Number. Enter the Subsystem
# and Node # indicated in the Output Window and select the Find it
now button.
120
PSCAD
The feedback from this search will be displayed in the Search section of the Output window. Simply double-click the search feedback
messages and PSCAD will automatically open the source page in
Circuit view and point directly at the problem (with the same arrow as
described above).
As you can see, some of the tabs are initially disabled (greyedout). This depends on what you are trying to view, as well as whether or not the project has been compiled.
The Graphic, Parameters and Script tabs are used exclusively for
component design, and will not be enabled unless editing a component definition. The Graphic window will also be enabled while
viewing a module page. You can edit a component definition by a
PSCAD Users Guide
121
PSCAD
Main Menu Bar
The Main Menu bar contains an assortment of the most common PSCAD commands. It is located near the top of the PSCAD
Environment, appearing as shown below:
You will notice that some menu items, New in the File menu for instance, contain an arrow symbol pointing to the right. This indicates
that there are sub-menu listings related to that menu item, as shown
above.
You may also notice that some menu items are followed by a
triple-period, for instance the Load Project... menu item in the File
menu. This signifies that a dialog box will open if this command is
invoked.
NOTE: The Main Menu bar contains only
some of the standard PSCAD functions.
There are many others available using rightclick pop-up menus.
123
Library pop-up menus display whatever is entered into the description field of the component definition. In the above image, the user
has two Library Projects currently loaded in the Workspace: The
Master Library and another library with Electranix E-TRAN... entered into the Project description field. The mouse pointer is pointing
towards the Current Source component in the Sources module, in
the Master Library. A left-click at this point will add the current source
component to whichever project page is open in Circuit view.
In general, library pop-up menus construct a system of menus according to the hierarchal structure of any loaded library projects. As
a default, the Master Library will always be displayed first, and any
user-defined library projects will then be placed in the order as they
appear in the Workspace. If components are located within a module in a specific library project, the library pop-up menus will automatically nest these components into another sub-menu. This sub-menu
will be named according to the contents of the corresponding module
description field.
124
PSCAD
Here are some key points to remember when using library pop-up
menus:
Toolbars
Toolbars are useful in any program to provide a quick and easy
method to access menu functions. PSCAD V4 now includes multiple
toolbars, which contain the most commonly used menu tasks.
The new PSCAD drawing related toolbars allow you to add the most
common drawing objects and components by simply using the left
mouse button: A single click on the toolbar to select an object, and a
single click to add the object to the drawing canvas.
Main Toolbar
The Main Toolbar resides near the top of the PSCAD environment.
This bar primarily contains tasks found in the Main Menu bar, but
also includes others, as well. The individual toolbar buttons are
listed below with a short description:
Button
Description
Creates a new Case Project (*.psc file)
Loads a case project (*.psc file)
Saves changes to the Active Project (*.psc file)
Print
Cuts the current selection to the Windows clipboard
Copies the current selection to the Windows clipboard
Pastes from the Windows clipboard
PSCAD Users Guide
125
Description
Rotate selection counter-clockwise
Rotate selection clockwise
Mirror selection
Flip Selection
126
PSCAD
Runtime Bar
The individual Settings bar buttons are listed below with a short
description:
Button
Description
Compile (build) all modules (active project
only)
Make project (active project only)
Run simulation (active project only)
Stop simulation (active project only)
Pause simulation (active project only)
Advances run by one time step (while pause
is invoked)
Take a snapshot
Change PSCAD Plot Step
Control settings menu button
Control settings template list
Electrical Palette
The Electrical palette contains common electrical components used
when building circuits in Circuit view. Most of these button functions
can also be found under Add New Component in the Circuit view
right-click pop-up menu. The individual toolbar buttons are listed
below with a short description:
Button
Description
Add Wire
Add Resistor
Add Inductor
Add Capacitor
Add Ground
PSCAD Users Guide
127
Description
Add Data Tap
Add Data Merge
Add Data Label
Add Integer Constant
Add Real Constant
Add Import
Add Export
128
PSCAD
Add Radio Link
Add Output Channel
Add Slider
Add Switch
Add Dial
Add Pushbutton
Add Graph Frame
Add Phasor Plot
Add XY Plot
Add Control Panel
Add Annotation Box
Add Sticky Note
Graphic Palette
The Graphic palette contains functions used only when editing component definitions in the Graphic section of the Design Editor. The
individual toolbar buttons are listed below with a short description:
Button
Description
Reload changes from last save
Return to Circuit view
Set layers
Show/Hide all layers
Add Line
Add Rectangle
Add Ellipse
129
Description
Show/hide ellipses
Show/hide arcs
Show/hide lines
Show/hide rectangles
Show/hide text
Show/hide connections
Show/hide all graphics
Parameters Bar
The Parameters bar contains functions used only when editing
component definitions in the Parameters section of the Design
130
PSCAD
Editor. The individual toolbar buttons are listed below with a short
description:
Button
Description
Reload changes from last save
Return to Circuit view
Set layers
Search for symbol names
Space Fields evenly (See Field Alignment)
Make Fields same width (See Field Alignment)
Add new Text Field
Add new Input Field
Add new radio button Choice Box
Add new drop list choice box
Navigate Category pages
Add new Category
Duplicate current Category
View Category properties
Delete Category
Move Category up one level
Move Category down one level
Move Category to top
Move Category to bottom
131
Description
Reload changes from last save
Return to Circuit view
Search for text
Search for and replace text
Navigate segments drop list
Segment Manager
Keyboard Shortcuts
There are many keyboard shortcuts (or hotkeys) available in order to
make the design process more efficient. Hotkeys help to reduce the
amount of clicks required for performing a specific task.
The following tables list the available keyboard shortcuts in PSCAD
V4. See Whats New in PSCAD V4? in Chapter 1 for changes to
keyboard shortcuts since PSCAD V3.
General
Note that Ctrl may be dropped where indicated (i.e. [Ctrl +]) if
Enable Cut/Copy/Paste without Ctrl Key is selected. See the
section entitled Views in Chapter 3 for more.
Shortcut
Description
[Ctrl +] X
Cut selection
[Ctrl +] C
Copy selection
[Ctrl +] V
Paste selection
132
Select all
PSCAD
R
Mirror selection
Flip selection
Ctrl + Z
Undo
Ctrl + Y
Redo
Ctrl + F
Ctrl + O
Load project
Ctrl + N
New project
Ctrl + S
Ctrl + G
Ctrl + U
Ctrl + W
Esc
Cancel action
Zoom in
Zoom out
Backspace
133
Refresh canvas
F1
Help
Wires
To apply any of the following shortcuts, simply move your mouse
pointer over a Wire.
Shortcut
Description
Decompose Wire
Plotting
To apply any of the following shortcuts, simply move your mouse
pointer over a plot area. Note that in some instances, the graph
must be selected.
Shortcut
Insert
134
Description
Insert an Overlay Graph
Zoom in to graphs
Zoom previous
Zoom next
PSCAD
Ctrl + Left Mouse
Hold
Shift + Left
Mouse Hold
Left Mouse Hold
Show Markers
Set X marker
Set O marker
Show x-intercept
Show y-intercept
Space Bar
Window Settings
PSCAD V3 users will notice a difference in the window settings for
V4. That is, all environment windows are now docked (i.e. embedded) rather than floating by default. Docked windows, although
embedded, may still be manipulated in the standard ways. They
may be moved, stretched, maximized, minimized and turned off quite
easily.
Tab Navigation
Another dimension was added to the navigational abilities of
PSCAD in V4: Tabs. Tabs allow you to view several aspects of a
project, by simply clicking tab buttons (usually located at the bottom
of the window). For example, once a project is compiled, you can
quickly look at project related files (i.e. Circuit, Fortran, Data, etc.)
with a single click.
135
136
PSCAD
Look and Feel
When the help system is invoked (by pressing the F1 key), a window
similar to that shown below should appear.
There are three main sections of the help system. Across the top is
the Help Toolbar, and below this are the Navigation Pane on the left,
and the Main Viewing Window on the right.
The Help Toolbar
The Help toolbar contains the most commonly used functions. These
are summarized below:
Button
Description
Hides navigation pane
Moves backward in the viewed topic list
Moves forward in the viewed topic list
Prints currently viewed topic
Provides some options to allow the user to customize the online help viewer
137
There are two icons associated with the TOC: Books and Topics. A
Book simply contains a selection of Topics:
Book
Topic
Index
The index contains a large list of keywords, listed in alphabetical order, that have been associated with various topics within the
help system. You have the choice of either scrolling through this list
directly, or you may type in a word into the input field near the top of
the index pane, in order to directly look up a word.
In the figure below, for example, a user is looking up air core
reactance. Entering air will bring the list window to the nearest
matching word.
138
PSCAD
Search
The Search section allows you to enter in a single word or a text
string, and then list the topics that contain the word or string. Simply
enter the text string and click the List Topics button. Any topics
containing the string will be displayed in the output field, as shown
below.
To bring up a listed topic into the main viewer, simply left doubleclick, or select it and click the Display button.
Favourites
The Favourites section allows users to bookmark their favourite help
pages. To add a favourite topic to the favourites list, simply left click
the Add button. To remove a topic from Favourites, select it and left
139
TUTORIAL PROJECTS
The PSCAD software package is installed complete with a directory
of tutorial projects, which contains a variety of simple cases to illustrate various features of PSCAD. This directory is located within the
PSCAD installation directory under ...examples\tutorial.
The tutorial projects described in this section are mainly meant to
illustrate the use of PSCAD and hence, they are simple cases from
an electrical engineering point of view. If you are a first time user, go
through all the tutorial cases in the order they are listed below.
Once you are familiar with these projects, have a look at the
more detailed projects contained within the main examples
directory. These include a variety of practical examples ranging in
topics from machines to FACTS devices.
140
PSCAD
Voltage Divider
vdiv_1.psc
141
142
PSCAD
Chapter 5:
PROJECTS
Creating a New Project
Click the left mouse button on the menu item File in the Main Menu
bar - a drop down menu should appear. With your mouse pointer,
select New. A secondary menu should open listing a choice of either
a Library project or a Case project.
143
Click the Open button to open the project. The project name should
then appear in the Workspace window, indicating that the project was
loaded.
144
PSCAD
You can also bring up the Load Project dialog by simply pressing the
Load Project button in the Main Toolbar, or by pressing Ctrl + O on
your keyboard.
Recent Files
You can also load previously loaded projects by using Recent
Files. Simply hold the mouse pointer over the Recent Files menu
item and a list of previously loaded and saved projects should
appear. Select the desired project from the list. The number of projects listed can be adjusted from 0 to 16 in the Projects section of the
Workspace Settings dialog.
Opening and Viewing a Project
Right-click on the desired project in the Workspace window and
select Open. You can also open a project for viewing, with a left
double-click on the project title in the Workspace window.
Once opened, the main page of the project should appear in the
Circuit window of the Design Editor.
Navigating Through an Open Project
Once a project has been opened in Circuit view, there are many
navigational features available to help you efficiently navigate about
the project.
Scroll Bars
Standard vertical and horizontal scroll bars are available in all Design
Editor windows. These are located at the right-most and bottommost edges of the open window respectively.
145
On a blank portion of the page, press the Ctrl and Shift keys
at the same time, then click and hold the left mouse button
(Ctrl + Shift + left mouse hold). Moving the mouse will
then allow panning though the page.
Press the Pan button in the Main Toolbar to invoke panning
mode. To indicate that you are in panning mode, the mouse
pointer will change into a hand shape, as shown to the
right. Press Esc to cancel Pan Mode.
To move out of the current module (i.e. move back one level), press
either the Backspace key on your keyboard, press the Up one mod-
146
PSCAD
ule button on the Main Toolbar, or right-click on a blank part of the
module page and select Up one module.
Forward/Back Buttons
PSCAD maintains a navigational history while moving into and out
of modules in a project. This history is presented in the form of
Forward and Back buttons on the Navigation Bar, which should be
located near the top of the PSCAD Environment. If you cannot see
this bar, select View | Navigation Bar in the PSCAD Main Menu.
Tabs
The new tab features in PSCAD V4 add an extra dimension to
navigation. That is, the tabs allow you to jump from one viewing area
PSCAD Users Guide
147
Zooming
Zoom features are available when working in either the Circuit or
the Graphic sections of the Design Editor. There are a few different
methods for zooming available:
From the main menu bar, select View | Zoom. You then
have a choice to select either In, Out or a specied zoom
percentage.
148
PSCAD
Refresh
You can refresh the page view in either the Circuit or Graphic windows by one of the following methods:
149
PSCAD
NOTE: Running a Project without compiling is perfectly fine. If a Run command is
issued, PSCAD will perform the Compile
Modified Modules and then the Make procedures before the run starts. See Running
a Simulation in this chapter for more.
Compile
Compiling refers to the recreation of Fortran, Data, and Map files
for a the Project. You may choose to compile the entire Project, or
only Modules that have been modified since the last compile. The
latter choice comes in handy for very large Projects, which may take
minutes to compile all.
To compile the entire Project from scratch, select the Compile All
Modules button in the Main Toolbar:
To compile the only Modules that have been modified since the last
compile, select the Compile Modified Modules button in the Main
Toolbar:
Make
Making the Project refers to the assembly of the associated executable file (*.exe) to be run by EMTDC. To make your Project, press
the Make button.
151
The Output window is divided into three main areas: Build, Runtime
and Search. Compilation messages will appear under Build, while
EMTDC runtime messages will appear in Runtime. The Search area
is used to view results from the Find Feature.
Finding the Message Source
If an error or warning message is received, PSCAD can automatically point to the source of the problem. In the Output window, navigate
to the error or warning message, hold the mouse pointer over the
message itself and either left double-click or right-click and select
Point to Message Source. PSCAD will point to the problem source
in the Circuit window of the Design Editor.
152
PSCAD
In the example image below, it can be seen that the voltmeter Vmid
has been shifted and is not measuring a specific node voltage.
Running a Simulation
Before running a simulation, ensure that the desired project is the
Active Project in the Workspace window. Use either of the following
methods:
153
Taking a Snapshot
Taking a snapshot of a simulation run is presently the only way to
start PSCAD from an initialized condition. This can be accomplished
by one of several methods. See Initialization and Initial Conditions
in Chapter 2 of the EMTDC Manual for more details on Snapshot
Files.
154
PSCAD
Manual
You can manually take a snapshot by either pressing the Snapshot
button on the Main Toolbar, or selecting Build | Snapshot from the
Main Menu bar, while the project is running.
Pre-Dened
Pre-defined snapshots are set before the run is started. There are a
couple of different pre-defined snapshot types available.
Open the Project Settings dialog window as described in Editing
Project Settings. In the Runtime section of the Project Settings dialog, choose the snapshot type from the Timed Snapshot(s) drop list.
Enter a name for the snapshot file in the Snapshot File field, and the
exact time at which to take the snapshot during the next run in the
Time field.
Click the OK button to exit the Project Settings dialog and save
changes. Run the project to completion.
NOTE: Make sure that the run duration is
greater than the snapshot time, or no snapshot file will be created!
155
Click the OK button to exit the Project Settings dialog and save
changes. Run the project - it should start initializing from the snapshot time. See Initialization and Initial Conditions in Chapter 2 of
the EMTDC Manual for more details on Snapshot Files.
Saving Output to File
Open the Project Settings dialog window as described in Editing
Project Settings. In the Runtime section of the Project Settings dialog, choose Yes from the Save channels to disk? drop list. Enter
the name for the output file in the Output File field.
Click the OK button to exit the Project Settings dialog and save
changes. Run the case to create the output file. See EMTDC
Output Files in this chapter for more details on Output File format.
Saving Project Changes
To save the Active Project, click the left mouse button on the
menu item File in the Main Menu bar - a drop down menu should
appear. With your mouse pointer, select Save Active Project....
156
PSCAD
You can also save the Active Project by pressing the Save Active
Project button in the Main Toolbar, or by pressing Ctrl + S on your
keyboard.
To save a selected project (either active or inactive), right click on
the project title in the Workspace window and select Save from the
pop-up menu.
157
Click the Save button to save the project under a different file
name. The project name should then change in the Workspace window, indicating that the project was renamed.
Saving as an Older PSCAD Format
Follow the same procedure outlined in the Save Project As... section
above. When the Save As dialog window appears, go to the Save
as type drop list and select PSCAD Vx.x File (*.psc, *.psl).
158
PSCAD
159
160
PSCAD
Unloading A Project
In the Workspace window, select the project that is to be
unloaded. Click the left mouse button on the menu item File in
the Main Menu bar - a drop down menu should appear. With your
mouse pointer, select Unload Project.
You can also unload a project by either right clicking on the project
title in the Workspace window and selecting Unload from the popup menu, or by selecting the project in the Workspace window and
pressing Ctrl + U on your keyboard.
161
Press and hold the Ctrl key and then separately select (leftclick) all objects to be grouped into one selection.
Press and hold the left mouse button and then drag the
mouse pointer so that a box outline appears. Encompass
all desired objects to be selected and then release the left
mouse button.
To ungroup any objects, hold the Ctrl key and then select (left-click)
all objects to be ungrouped.
Adding Components To A Project
There are a variety of ways to insert components into a Project
page. Before proceeding, ensure that your project has been opened
and you are viewing the desired Project page in the Circuit window.
162
PSCAD
163
164
PSCAD
Moving Or Dragging An Object
To move an object, place the mouse pointer over the object icon.
Press and hold the left mouse button. Now drag the mouse to move
the component. When you move a component, it will always snap to
the nearest drawing grid, even if the grid dots are not visible.
Cut/copy/paste
Objects can be cut, copied and pasted as many times as desired
within the Circuit window: Right-click on the object and select either
Cut or Copy (or select the object and press Ctrl + X or Ctrl + C
respectively). Multiple objects can be cut, copied or pasted simultaneously.
Once cut or copied, you can paste the object by right clicking over a
blank area of the Project page and selecting Paste (or press Ctrl +
V).
Rotate/Mirror/Flip
Once added, single or multiple objects can be rotated, flipped or mirrored:
165
Deleting Objects
Select the object (or objects) and press the Delete key.
Undo And Redo
To undo or redo any object manipulations, such as moves, cuts,
pastes, deletions, etc., select the Undo or Redo button in the Main
Toolbar, or press Ctrl + Z or Ctrl + Y. The undo and redo features
will store most manipulations and changes, however some limitations
will apply.
If this feature does not appear to be working, check the Views section of the Workspace Settings dialog to see if Undo-Redo is enabled in the Circuit View area.
Connecting Components Together
A connection between components can be made in one of the following ways:
166
PSCAD
Not Connected
Not Connected
Connected
Connected
167
PSCAD
3. Return to Circuit View. See Returning to Circuit View in
Chapter 9.
4. Add an Import or Export tag component within the Module
Circuit view. Each Import or Export must be named the
same as its corresponding Connection.
EXAMPLE 5-1:
Consider a case Project that consists of a simple phase angle offset
control being input into a Module. The Module definition (i.e. Graphic
view) consists of a single external Connection named in1, which is
hard wired to the incoming data signal from the control system on the
main page. The input signal in1 is used as a reference angle to a
firing pulse generator inside the Module (i.e. Circuit view).
Graphic View
of Module
Definition
Circuit View of
Module
A user wants to bring the firing pulse output signal back out to the
main page, and wants hard wire it using an output Connection. The
first step is to define an Export tag and connect it to the firing pulse
output signal. The user names the export signal out. The final
step is to define an output Connection in the Module definition (i.e.
Graphic view). See Connections in Chapter 9 for details on adding
a new output Connection.
169
The user may now input this new output signal to any other component or Wire on the main page.
Wireless Connections
The above control signal transfers can also be accomplished using
Radio Link components. Radio Links offer a wireless method of
transferring the signals, without the need for cumbersome imports
and exports on each Module. In fact, Radio Links allow the user to
transfer signals through multiple Module layers.
170
PSCAD
EXAMPLE 5-2:
Consider the Project in Example 5-2. A user wants to modify the system so that the input signal in1 is transferred into the Module with a
wireless connection. The input data signal is first disconnected from
the Module and then reconnected to a Radio Link transmitter named
in1. Secondly, the input Connection is removed from the Module
definition (i.e. Graphic view), as it is no longer required. Lastly, the
Import tag is removed and replaced with a Radio Link receiver.
Graphic View
of Module
Definition
with Input
Connection
Removed
Circuit View of
Module with
New Radio Link
Receiver
Electrical Nodes
When a project is compiled, PSCAD creates a variety of files describing the case so that EMTDC can understand it and run the
simulation. One or more of these files are Data Files (*.dta), which
describe the construction of electrical network in the case. One
Data file is created for each Module existing in the case (including
the main page see Network Solution in Chapter 2 of the EMTDC
Manual).
If an electrical node needs to be represented within a module, then
PSCAD must be informed of this requirement so that the network of
electric nodes can be properly mapped. The manner in which this is
accomplished is as follows:
1. Create a new Module or edit the denition of a Module
to which you want to transfer data. See Creating a New
PSCAD Users Guide
171
EXAMPLE 5-3:
Consider a simple case, which consists of a single-phase source line
being input into a Module. The Module definition (i.e. Graphic view)
includes a single external Connection named NA, which is hard
wired to the incoming line from the source on the main page. The
Module canvas (i.e. Circuit view) consists simply of a Resistor component connected directly to a Ground component.
Graphic
View of
Module
Definition
172
PSCAD
Wire Mode
PSCAD includes a special wire drawing feature called Wire Mode,
which allows the user to quickly draw interconnecting Wires between
components.
To invoke Wire Mode, click the Wire Mode button in the Main Toolbar
or press Ctrl + W on your keyboard. With the Project open in Circuit
view, move the mouse pointer onto the Project page. The mouse
pointer will have turned into a pencil, which indicates you are in Wire
Mode.
To draw a wire, move the cursor to the node where you want the line
to start and left-click. Move the cursor to where you want the line to
end and left-click again to complete the wire. Multi-segment Wires
may be built by continuing to left click at different points.
To turn-off Wire Mode, either press the Esc key, press Ctrl + W, or
click the Wire Mode button again.
Editing Module Settings
Right-click on a blank part of the Circuit page and select Module
Settings... These settings are module specific and they will vary for
each individual module in the project.
173
The Module Settings dialog inputs are described in the following sections.
Display Options
These option are related to the page display.
Show Connection Grid
Select this option to view the major grid points on the module page.
Show Signal Locations
When this option is enabled, PSCAD will use icons placed on data
signal wires and connections so as to allow for easy, graphical differentiation between feed-forward and feed back signals. For more
on this, see Component Ordering in Chapter 11.
Show Virtual Control Wires
Select this option to virtually connect signals on a page that are connected by Data Labels. For more on this, see Virtual Control Wires
in Chapter 11.
Fortran Code Sequencing
These options are related to the way in which System Dynamics
code is ordered. For more on this option, see Component Ordering
in Chapter 11.
Assign Execution Sequence Numbers Automatically
Select this option to ensure that a PSCAD smart algorithm will automatically order your control components. This algorithm systemati174
PSCAD
cally scans all control systems and sub-modules with the Module and
determines the sequence that each component should appear in the
in EMTDC System Dynamics.
This option is by default enabled, and should remain that way unless
the user wants to order these components manually. For more on
this option, see Component Ordering in Chapter 11.
Show Sequence Numbers on Circuit Schematic
When this option is enabled, PSCAD will label each Component
and Module in the Project with an auto-generated sequence
number. This sequence number represents the sequential placement of the Component or Module code in the Project Fortran
files. For more on this option, see Component Ordering in Chapter
11.
Editing The Page Setup
The Page Setup dialog contains features related specifically to a
particular module canvas. That is, these features can vary for each
individual Module in the project.
Right-click on a blank part of the canvas in Circuit view and select
Page Setup...
175
176
PSCAD
This will bring up the properties dialog for that particular component
Instance. The figure below shows the first page of the Parameters
dialog for one of the single-phase source models in the PSCAD
Master Library.
Dialogs for other components will differ, but all include the same
basic features and most contain multiple pages. At the top of the
dialog is a drop list, which contains a list of all the Parameter dialog
pages. In this example, the first page is entitled Configuration. If
only one page exists, then the drop list will be disabled. To move
through or view any other existing pages, left-click the down arrow
on the field as shown below:
If there are too many items in the list, you will need to scroll through
the list to see all the form names. To scroll though the list, hold the
left button pressed on the list and drag it up and down. Or press
the up or down arrow on your keyboard when the list is open. If
there are more items in the list that it can display, you will see the list
scrolling.
177
Once you are finished with all of your editing, click on the OK button
to accept the edited values and to exit the dialog. Clicking on the
Cancel button will exit the form and ignore all the changes made.
Editing Denition Properties
Editing definition properties, as opposed to Editing a Component
or Module Definition, refers to two special properties of the definition that must be accessed separately: The definition Name and
Description.
In the Workspace window, access the Definitions Branch and
right-click on the component definition listed therein, and select
Properties...:
178
PSCAD
This brings up the Definition Properties dialog window for editing the
definition Name and Description:
179
Column Descriptions
The parameter and computation data is organized into
columns. Each column is described below:
Parameters Tab
Parameters:
180
PSCAD
Computations Tab
Computations:
181
Enter a name for the file and press the Save button. Once saved,
PSCAD will open the file automatically for viewing.
Changing To Single-Line View
If the component being edited is a three-phase electrical component,
then it is likely there will be a Drop List entitled Graphics Display on
the main properties page.
182
PSCAD
Step 1
Step 1 in creating a new component involves entering the following
data:
183
Enter all the parameters that you require according to the above
descriptions. When finished, click the Next > button. If no
Connections were specified above, skip to Step 4.
Step 2
Step 2 in creating a new component involves defining data for any
Connections specified in Step 1.
184
PSCAD
Enter all the parameters that you require according to the above
descriptions. This page will be repeated for each Connection
specified in Step 1, starting with the left side of the component
Graphic. The text box at the top of the dialog will indicate what
Connections are currently being defined.
When finished each page, click the Next > button. If Page Module
was not selected in Step 1, skip to Step 4. If a mistake is made,
press the < Back button at any time.
Step 3
Step 3 in creating a new component involves defining the Page
Setup if the Page Module input was selected in Step 1.
185
When finished, click the Next > button. If a mistake is made, press
the < Back button at any time.
Step 4
Step 4 is simply a confirmation step. Press the Finish button if you
are satisfied that everything is correct. Press the < Back button to
go back to the previous step.
186
PSCAD
This creates a simple Module with no external connections to its parent page. To create a Module with Connections, follow the procedure outlined above.
Creating The First Instance of a Denition
In the Workspace window, navigate to the Definitions branch within
the project tree. Either select the desired component Definition from
the list, right-click and select Create Instance as shown below, or
drag and drop the definition directly on the canvas. See Drag and
Drop in this chapter for more details.
187
Export a Denition
To export a Definition (or save the Definition to a special Component
Definition (*.cmp) file), left-click on the [+] box beside the Project
name where the Definition is stored to expand the Project
Tree. Expand the Definitions Branch in the same manner. Rightclick on the desired Definition from the list and select Export
As.... See Definitions Branch in Chapter 4 for more details.
188
PSCAD
Copy As Meta-le Or Bitmap
Bring up the desired area in Circuit view. Select the objects to be
printed (see Selecting Objects in this chapter), right-click and select
Copy as Meta-File or Copy as Bitmap.
Then, simply paste the copied selection into a report program of your
choice.
Printing Selected Objects
Bring up the desired area in Circuit view. Select the objects to be
printed (see Selecting Objects in this chapter), right-click and select
Print Selection. A print dialog window should appear - select your
desired printer properties and click OK.
189
A new Case Project should appear in the Workspace window entitled noname. Right-click on the Project name and select Project
Settings....
190
PSCAD
This action will open the Project Settings dialog. Click the General
tab at the top of the dialog, left-click inside the Description field and
type a description for the case, say, Voltage Divider.
Click the Runtime tab and get familiar with the inputs displayed
therein (see Runtime in Chapter 7 for details on parameters).
191
Use the buttons at the top of this dialog to navigate to the desired
directory in which you want to save the Project. Type the name
of the file (say vdiv.psc) in the File name field near the bottom of
the dialog. Make sure that you include the extension *.psc. Click
192
PSCAD
the Save button to save the changes. The Project name in the
Workspace will turn to black and the new filename should appear.
NOTE: Although we strive to avoid spurious
crashes, you should save your case project
frequently in order to avoid loss of work.
193
194
PSCAD
195
196
PSCAD
197
Right-click on the Graph Frame title bar (top bar on the plot labelled
Main : Graphs) and select Graph Frame Properties... from the
pop-up menu.
198
PSCAD
To resize the Graph Frame at any time, left click on the Graph Frame
title bar so that Grips appear. Left-click and hold on a corner Grip
and drag mouse outwards. Resize the Graph Frame to approximately 5x5 inches.
A new Overlay Graph should appear within the Graph Frame directly
below the existing graph (see Graphs in Chapter 6 for more).
199
Select the
Output
Channel
(Ctrl + left
mouse
hold)
200
PSCAD
For example, change the Y-Axis Title input field to show Voltage on
the voltage graph, and Current on the load current graph. You may
also want to turn on/off Grid Lines and adjust the scaling. The Graph
Frame should appear similar to that shown below once completed.
201
202
PSCAD
Copy a Component Instance
All component Instances appearing on the Circuit canvas may be
copied and pasted using drag and drop.
1. Hold down the Ctrl key.
2. Move the mouse pointer over the component Instance to be
copied.
3. Select and hold with your left mouse button.
4. Drag the mouse pointer to a blank area of the Circuit canvas
and release the mouse button to paste.
203
204
PSCAD
From an Output Channel
1. Hold down the Ctrl key (use the Shift key if Enable
Shift key to create controls and curves is enabled in the
Workspace Settings dialog).
2. Move the mouse pointer over the desired Output Channel
Instance.
3. Select and hold with your left mouse button.
4. Drag the mouse pointer over the desired Control Panel title
bar and release the mouse button to paste.
205
206
PSCAD
207
You may also bring up the On-Line Help by simply pressing the F1
key.
Master Library component specific help can be accessed by one of
the following methods:
TOOL TIPS
Tool Tip windows (otherwise known as Flybys) are a PSCAD feature
especially designed for obtaining circuit information on the fly. Tool
Tips are available either for providing pop-up help on component
instances, or for monitoring electrical or data quantities during a
simulation.
To monitor an electrical or data signal during a run:
1. Left-click on a blank part of the Circuit canvas (this is to
ensure that the Circuit canvas is the active window).
208
PSCAD
2. Move and hold the mouse pointer over the signal Wire where
you want to monitor the data. In a second or two, a Flyby
window should pop-up as shown below:
If the mouse pointer is held over a Wire carrying an electrical signal, the Flyby will indicate the voltage in kilovolts at that electrical
node. The Flyby shown above indicates that this is EMTDC node
NT_2, which is a scalar quantity (i.e. single-phase node). The value
of the node voltage at the instant this snapshot was taken was
39.3877 kV.
If the mouse pointer is held over a data (control) signal, the value of
the data itself will be shown in the Flyby.
SEARCHING
If the user wishes to search a project for a signal name, Connection
name, node number, etc., the Find feature in PSCAD can be
used. To bring up the Find dialog window, either:
209
Component Table
The Component Table lists all Component Instances currently existing in the Project. Along with the component name and type, some
other important information is also summarized to help users in
debugging or understanding the Project.
210
PSCAD
Signal Table
The Signal Table summarizes all pertaining to both control and
electrical signals in the Project. Information is given, such as the
EMTDC control signal variable name and from where the signal is
sourced. For electrical signals, node name and index is given.
211
Electrical Signals:
212
PSCAD
CONTROL SETTINGS
The Control Settings feature was introduced in PSCAD V4, and
provides users with the ability to save the settings of all Dial, Switch
and Slider control components in a Project to a Template. When
the Project is reloaded, these settings can be reset immediately by
selecting the Template. It is possible to store multiple Templates so
that the user can easily switch between one Template to another,
without having to manually reset all the control components.
The Control Settings feature can be accessed through the Runtime
Bar.
If you cannot see this tool bar, go to the Main Menu bar and select
View | Runtime Bar.
Storing Settings to a Template
Before storing your control settings to a Template, first ensure that
all Dial, Switch and Slider control components have been set, and
that the current Project is the Active Project. Press the Control Data
Menu for Active Project button to bring up the Control Data Menu
pop-up as shown below:
213
When finished, press the OK button. Your control settings will now
be stored in this new Template. Whenever you reload the Project, or
want to revert back to these settings, simply left-click the down arrow
on the Template drop list and select the Template.
214
PSCAD
Template Settings Viewer
Once at least one Template has been created for a Project, PSCAD
provides a Template Settings Viewer so that users can view and
verify control settings in a visually organized environment. To bring
up the Template Settings Viewer, simply select the corresponding
function from the Control Data Menu pop-up as shown below:
The button bar includes three buttons. The OK button closes the
viewer window. The Save As... button allows the user to save the
PSCAD Users Guide
215
GLOBAL SUBSTITUTIONS
Substitutions are well defined when used with Component
Definitions. These types of substitutions operate using Component
input parameters as a source, while using the Definition to define the
actions. This means that all components of a certain type will process substitutions in the same way. If substitutions are required on
a per Instance basis however, then this process cannot be used. In
PSCAD versions previous to V4.2, implementations of a Component
Instance based substitution was referred to as a Global Constant,
which allowed the user to enter a defined text string. This was then
inserted as a numerical value into an Input Field, but was limited for
many other actions.
This mechanism has been reworked and the concept of a Global
Constant has been replaced by a Project based Global Substitution.
A Global Substitution is a raw text string that is represented by a
unique identifier, which can be used within any Component Instance
input parameter. The big difference with the new approach is the
process is completely general, and does not require that a substitution be of a numerical type. This allows for raw text substitutions
combing both pre-fix and post-fix patterns. The syntax is the same
as used for Component Definition substitutions:
$(<Key>)
The substitution contains an item <Key>, where:
PSCAD
any point within a Component Instance input parameter. The input
parameter containing the Global Substitution will be pre-processed
before it is returned for use within the component. This allows the
input parameter to act exactly as if the user entered that data directly.
To define a Global Substitution, right-click on the desired project in
the Workspace window and select Global Substitutions... or simply
press Ctrl + G on your keyboard.
217
Entering f in Single-Phase
Transformer Parameters
Dialog
Global Substitutions are saved within the Project file itself, so once
defined, they remain as a Project setting until they are removed from
the Global Substitutions dialog.
UNIT SYSTEM
In past versions of PSCAD, units were entered for display only, and
provided no means to convert or scale component input parameters.
The primary purpose of these units was simply to indicate to users
that a particular input parameter was expected in the displayed unit.
For example, if a default unit for a parameter was set as [kA], then a
value of 10 Amps would need to be entered as 0.01 [kA].
In PSCAD V4, component parameter units will now perform limited conversion and scaling, depending on the unit entered and the
default (or Target) unit for that particular input parameter. The Unit
System includes base units for time, length, weight and speed (both
translational and rotational), as well as of course electrical units,
such as voltage, current and power.
NOTE: The Units System is not backwards
compatible to PSCAD versions previous to
v4.2. See Backward Compatibility for more.
See http://physics.nist.gov for more details
on the reference standard used to create the
PSCAD units system.
218
PSCAD
Unit Format
Units are entered exclusively into component Input Fields and may
only be associated with numerical input data. That is, units are invalid when using input variables or Global Constants. All entered units
must be enclosed with square brackets [<Unit>], where the brackets
are at least one space from the number. For example:
Base Units
The foundation of the PSCAD Unit System are the base units. Base
units represent all units that are recognized by the Unit System. If a
type of unit does not exist as a base unit, then it will be ignored. This
does not mean however, that the unit cannot be used. It simply
means that the unrecognized unit will be used for display only, and
will hence not modify the quantity. Scaling and conversions cannot
be performed on non-standard base units. Most base units adhere
to the International System of Units (SI).
The following lists the valid (standard) base units recognized by
the Unit System. All symbols are case sensitive and must appear
exactly as shown to maintain validity:
219
Symbol
Volt
Electrical voltage
Ampere
Electrical current
Ohm
ohm
Siemen
Electrical conductance 1
mho
mho
Electrical conductance 2
Watt
Volt-Amps
VA
1 VA = 1.0
W
Electrical power 2
Horsepower
hp
1 hp =
746.0 W
Electrical power 3
Farad
Electrical capacitance
Henry
Electrical inductance
Tesla
Second
Time in seconds 1
Second
sec
Time in seconds 2
Minute
min
1 min = 60 s
Hour
hr
1 hr =
3600 s
Time in hours
Day
day
1 day =
86400 s
Time in days
Electrical
Time
220
Conversion
Factor
Description
Electrical resistance
Electrical power 1
Time in minutes
PSCAD
Length
Metre
Inch
in
1 in =
0.0254 m
Length in inches
Feet
ft
1 ft =
0.3048 m
Length in feet
Yard
yd
1 yd =
0.9144 m
Length in yards
Mile
mi
1 mi =
1609.344 m
Length in miles
Gram
Pound
lb
Revolutions
rev
Radian
rad
1 rad = 1/2
rev
Angle in radians
Degree
deg
1 deg =
1/360 rev
Angle in degrees
Cycles per
Second
rev/s
Cycles per
Second 2
Hz
1 Hz = 1
rev/s
Revolutions
per Minute
rpm
1 rpm =
1/60 rev/s
Per-Unit
pu
Percent
Weight
Rotational
Frequency
(Rotational
Speed)
Other
Length in metres
Weight in grams
1 lb =
453.59237
g
Weight in pounds
Per-unit quantity
1 % = 0.01
pu
Percent quantity
221
Aliases
Aliases are short forms for writing specific compound units. There
are currently two aliases existing in the Unit System:
Hz = 1 rev/s
rpm = 1 rev/min
NOTE: Aliases may not be used within
Compound Units.
Prexes
The Unit System utilizes a limited list of SI prefixes in order to allow
for scaling of Base Units. Prefixes must precede a valid Base Unit,
and may be inserted anywhere within Compound Units.
The following table lists all valid prefixes:
222
Name
Symbol
Scale Factor
tera
giga
mega
kilo
milli
micro
nano
pico
T
G
M
k
m
u
n
p
1012
109
106
103
10-3
10-6
10-9
10-12
PSCAD
Target Units
The Unit System will determine the final conversion or scaling factor
to apply, based on the Target Unit of the Input Field. The Target Unit
is the symbol entered in the Units field (i.e. the default unit) in the
Input Field Property Settings dialog.
NOTE: You can view the set Target Units
of a component by invoking the View
Parameters/Computations dialog.
Target units are not limited to the Base Units alone, and may include
Prefixes by default (i.e. kA): In instances such as these, any Prefixes
in the Target Unit will be considered if further scaling is performed
later on. In fact, this is quite common in the Master Library, where
many Target Units are specified in [kA], [kV] or [uF].
EXAMPLE 5-4:
The Master Library component 3-Phase 2-Winding Transformer
contains an input Parameter called Winding 1 Line to Line Voltage,
whose Target Unit is specified as kV in the Units field.
A user enters data into the Winding 1 Line to Line Voltage field
as 0.153 [MV]. Given that the Target Unit contains the Prefix k,
PSCAD will understand that any quantity entered in this Parameter
field must be converted back to kilovolts (not the Base Unit of volts
[V]). Therefore in this case, the quantity will be multiplied by a scale
factor of 1000 to convert it from 0.153 [MV] back to 153 [kV], before it
is considered for further calculations.
223
Unit Conversions
The most useful aspect of the Unit System is the ability to convert
one unit to another, be it an Imperial/Metric conversion or simply converting from one form to another, such as radians to degrees.
Converting units from one form to another is relatively straightforward. The only rule is that the conversion must take place within
the same Base Unit class; for example, [m] to [ft] (both units measure
length) or [sec] to [hr] (both units measure time). Valid Prefixes my
be included in the conversion as well: For instance, [km] to [mi].
EXAMPLE 5-5:
A user is designing a transmission line tower. The default units for
the tower dimensions are in metres, but the users specification
sheets give the dimensions in feet. The Unit System will allow the
user to enter this data directly in feet, without the need to convert to
metres.
224
PSCAD
Compound Units
The Unit System will recognize three types of Arithmetic Operator
within the unit brackets, in order to allow for combining (or compounding) units together. These are:
Arithmetic
Operator
*
/
^
Description
Multiply
Divide
Exponent
Correct:
[hp*min/MVA]
Incorrect:
[hp/MVA*min]
Target
[MW*s/MVA]
225
[ft*ft]
Incorrect:
[ft^2]
Entered
Correct:
[lb*ft*s^-2]
Incorrect:
[lb*ft/s*s]
[m*m]
Target
[kg*m*s^-2]
Target
[lb*ft*s^-2]
[lb*deg*min^-2]
Target
[kg*m*s^-2]
[ft/min*min]
Incorrect:
[ft/min/min]
Target
[m/s*s]
EXAMPLE 5-6:
The Master Library component Wind Turbine contains an input
Parameter called Machine rated angular speed, whose Target Unit
is specified as rad/s in the Units field.
226
PSCAD
Wind Turbine
A user enters data into this Parameter as 60.0 [Hz]. This is a valid
unit in this case as both Hz and rad/s are essentially the same
type of measure, where 2 [rad/s] = 1 [rev/s] = 1 Hz (see Base Units
above).
EXAMPLE 5-7:
The Master Library component Wind Turbine (described above) also
contains an input Parameter called Air Density, whose Target Unit is
specified as kg/m^3 in the Units field.
227
Wind Turbine
228
PSCAD
229
0.0000000000000
0.0000000000000
0.86727047422974
1.7674567004163
2.2542364437667
2.8373003607589
4.0202957514613
5.5547061594874
6.5791178737352
6.9456914675731
7.1369144410646
7.1669414384869
7.0023750435365
7.1529925186834
9.3453281849245
The project description is written as the first row of text at the top
of the file. The first column of data is always the EMTDC simulation time. The subsequent columns are not labelled - see Column
Identification and the Information File below for more details on this.
EMTDC output files may be used for waveform analysis by a selected post-processing software package. As they are formatted in
a delimited columnar format, they can be easily imported into most
graphing or data analysis programs. EMTDC output files are given
the extension *.out and are stored in the project temporary directory.
Creating Output Files
EMTDC output files are created by choosing Yes in the Save channels to disk? drop list, in the Runtime section of the Project Settings
dialog.
230
PSCAD
The naming convention for multiple output files is to simply append
a sequential number as a suffix. For example, if the output file is
named abc.out, and there are three files as described above, the
output files would be named abc_01.out, abc_02.out and abc_
03.out. This sequential numbering is important when identifying
data columns.
Column Identication and the Information File
As mentioned above, EMTDC output file columns are not labelled. In
order to determine which column is what, an information file (*.inf)
is also created along with the output file(s), that contains cross-referencing information. The information file will be named the same as
the output file primary file name. For example, if the output file name
is abc.out, the information file will be named abc.inf. Only one
information file is created, even for multiple output files.
A typical information file is shown below for a project containing three
output channels.
PGB(1) Output Desc=Fund - mag Group=Main Max=25.0 Min=0.0 Units=
PGB(2) Output Desc=2nd harm - mag Group=Main Max=25.0 Min=0.0 Units=
PGB(3) Output Desc=3rd harm - mag Group=Main Max=25.0 Min=0.0 Units=
231
232
PSCAD
Chapter 6:
233
234
PSCAD
NOTE: The Control objects cannot be manually adjusted (as they appear above) until
they are linked to a Control Interface.
GRAPH FRAMES
A Graph Frame is a special Runtime object used for accommodating
Overlay or Poly Graphs and can be placed anywhere on the canvas
in Circuit view. Once a Graph Frame has been added, you may then
proceed to add as many Graphs to it as you wish.
Graph Frames are used exclusively for plotting Curves versus
time. That is, the Graph Frame horizontal axis is always the EMTDC
simulation time. If you need to a plot a Curve as a function of another variable, see the section entitled XY Plots in this chapter.
235
If you cannot see the Control Palette, go to the View menu and ensure Control Palette is selected.
Moving and Resizing a Graph Frame
To move a Graph Frame, move the mouse pointer over the title bar
and then left-click and hold. Drag the frame to where it is to be
placed and release the mouse button.
To resize, move the mouse pointer over the title bar and left-click to
select the Graph Frame. Grips should then appear around the outer
edge as shown below.
Move the mouse pointer over one of the grips. Left-click and hold
and then drag then move the pointer to resize.
Cut/Copy Frames
Right-click over the Graph Frame title bar and select Cut Frame or
Copy Frame respectively.
236
PSCAD
Once a Graph Frame has been cut or copied it may then be pasted
into another location in the Project (along with its contents).
Paste Frame
Cut or copy a Graph Frame as described above. Right-click over a
blank area of the Project page in Circuit view and select Paste. A
Graph Frame may be pasted multiple times.
Adjusting Frame Properties
To access the Graph Frame Properties dialog, left double-click the
Graph Frame title bar, or right-click over the title bar and select
Graph Frame Properties....
Caption: Enter a title for the Graph Frame (this text will
appear in the Graph Frame title bar). The default text
may appear a bit cryptic: This syntax is used as a naming
convention for grouping objects in the Workspace. For
more information on this syntax, see Grouping of Runtime
Objects in this chapter.
Preferences:
237
NOTE: Adjusting the horizontal axis properties will affect all Graphs in the Graph Frame.
Axis:
238
Title: Enter a title for the x-axis. This text will appear in the
bottom-left corner of the Graph Frame, directly beside the
x-axis.
Snap Aperture to Grid: Select this feature so that when
using Dynamic Aperture Adjustment, the aperture view will
snap to the major grid while scrolling.
PSCAD
Markers:
GRAPHS
A Graph is a special Runtime object, which can reside only inside a Graph Frame. There are two types of Graphs available in
PSCAD: Overlay and Poly Graphs. A single Graph may hold and
display multiple Curves, where all Curves in a Graph are based on
the same y-axis scale.
The following illustrates a Graph Frame with an Overlay Graph at the
top and a PolyGraph below it.
239
Graph Order
Once multiple Graphs have been added to a particular Graph Frame,
you may change the order in which they appear. Right-click over the
graph to be moved and select one of the following:
Move Graph Up
Move Graph Down
Move Graph to Top
Move Graph to Bottom
Cut/Copy Graphs
Right-click over the Graph to be cut (removed) or copied and select
Cut Graph or Copy Graph respectively.
240
PSCAD
Once a Graph has been cut or copied it may then be pasted into the
same or another Graph Frame.
Paste Graph
Cut or copy a Graph as described above. Right-click on the Graph
Frame title bar and select Paste Graph. A Graph may be pasted
multiple times, where each paste will replicate the entire Graph.
Copy Data to Clipboard
If a simulation has been run and your Graph contains Curve data,
you have the option of copying all or a portion of all Curve data in the
Graph to the clipboard. Right-click over the corresponding Graph
and select Copy Data to Clipboard and then select one of the following from the pop-up menu:
241
242
PSCAD
There are various parameters that may be edited through this window, each of which are described below.
Preferences:
Y-Axis:
Title: Enter text for display as the Graph title (located on the
left side of the Graph).
PSCAD Users Guide
243
PolyGraphs
PolyGraphs are used specifically to display plotted curves in a
stacked format. That is, each Curve is contained within its own
viewing space, and are stacked one atop the other. A PolyGraph
may be chosen over a standard Overlay Graph if the user needs to
either view many single-curve plots in a compact space, or to make
use of the Curve Digital Style functions to create a logic transition
diagram:
244
PSCAD
There are various parameters that may be edited though this window, each of which are described below.
Preferences:
CURVES
A curve is a special Runtime object best described as a graphical
representation of a string of data points, where each point is associated with a simulation time step. Curves are created by linking to an
Output Channel component, to which a scalar or array set of data
signals have been input. As such, curves can be multi-dimensional;
that is a single Curve may possess many sub-curves or Traces,
where each Trace corresponds to a single array value.
PSCAD Users Guide
245
246
PSCAD
NOTE: If the simulation has been run
already (with this Output Channel inserted),
the corresponding Curve data will be displayed immediately in the Graph upon being
pasted.
Curve Legends
Once a Curve has been added to a Graph, the Curve Title will appear in the Curve Legend.
Curve Order
Once multiple Curves have been added to a particular Graph, you
may change the order in which they appear. Ordering Curves can be
accomplished in one of two ways:
1. Drag and Drop: Left-click and hold over the Curve in the
Curve Legend. Drag the mouse pointer to a new position in
the Curve Legend and release the mouse button. See Drag
and Drop in Chapter 5 for more details on this.
2. Right-Click Menu: Right-click over the corresponding
Curve Legend and select one of the following from the popup menu: Move to the Start or Move to the End.
247
248
PSCAD
Active Trace
The following list describes the parameters in this section:
249
Style
The following list describes the parameters in this section:
Digital Style
These options are only considered if the Curve is part of a Poly
Graph. Digital style controls the properties of the Curve Traces when
they are in digital Mode. The following list describes the parameters
in this section:
250
PSCAD
TRACES
Multiple signal Curves can be plotted online as a single entity,
where each sub-curve in a multiple signal Curve is referred to as
a Trace. Each Trace in a Curve may be enabled or disabled separately (i.e. shown or hidden).
Trace Drop Down Menu
Trace properties and control can be accessed through a special drop
down menu with a single left-click on the Curve title in the Curve
Legend.
251
POLYMETERS
A PolyMeter is a special Runtime object used specifically for monitoring a single, multiple-trace Curve. The PolyMeter dynamically
displays the magnitude of each Trace in bar type format (called
Gauges), which results in an overall appearance similar to a spectrum analyzer. The power of this device lies in its ability to compress
a large amount of data into a small viewing area, which is particularly
252
PSCAD
helpful when viewing harmonic spectrums, such as data output from
the On-Line Frequency Scanner (FFT) component.
The Gauge width is fixed, and so if the PolyMeter is not wide enough
to display all data, a simple horizontal scroll bar is provided. An
Array Index display is included directly under the Gauges for easy
identification.
PolyMeters are special objects that cannot be added directly from
the toolbar. Each PolyMeter is directly linked with a single Curve
from a single Output Channel component.
NOTE: PolyMeters will appear as a blank
container (as shown below) until the Project
is compiled and run.
Adding a PolyMeter
Right-click on an Output Channel component within Circuit view
of the Design Editor and select Input/Output Reference | Add as
PolyMeter.
253
Move the mouse pointer over one of the grips. Left-click and hold
and then drag the pointer to resize.
Cut/Copy PolyMeter
Right-click over the PolyMeter and select Cut or Copy respectively.
254
PSCAD
Once a Polymeter has been cut or copied it may then be pasted to
another location in the Project.
Paste PolyMeter
Cut or copy a PolyMeter as described above. Right-click over a
blank area of the Project page in Circuit view and select Paste. A
Polymeter may be pasted multiple times.
Copy PolyMeter as Meta-File/Bitmap
The entire Polymeter display can be copied to the Windows
Clipboard in either Meta-File (*.wmf) or Bitmap (*.bmp)
format. Right-click over the Polymeter title bar and select Copy
as Bitmap or Copy as MetaFile. Go to your report document and
paste the image.
Navigate to Channel
You can navigate directly to the associated Output Channel component by selecting this option. Right-click over the PolyMeter and select Navigate to Channel. PSCAD will automatically find the Output
Channel and point to it with an arrow.
Adjusting Channel Settings
The y-axis properties of the Polymeter are set in the corresponding
Output Channel Properties dialog. This dialog may be accessed
directly from the Polymeter by right-clicking over the Polymeter title
bar and selecting Channel Settings....
Displaying Specic Data
The magnitude of individual array elements can be displayed in
the status bar at the bottom of the PolyMeter. Simply left-click on a
particular index number in the Array Index, to view the magnitude of
that element.
PHASORMETERS
A PhasorMeter is a special Runtime object that can be used to display up to six, separate phasor quantities. The PhasorMeter displays
phasors in a polar graph, where the magnitude and phase of each
phasor responds dynamically during a simulation run. This device
255
256
PSCAD
The PhasorMeter always assumes that the elements of the array are
in the above displayed order. That is, element 1 is the magnitude
and element 2 is the phase angle.
The PhasorMeter allows up to six phasors per display, which corresponds to an array signal of dimension 12. In cases of multiple phasors, the order of each magnitude/phase angle group must appear in
the same order as the first (i.e. magnitude, phase angle, magnitude,
phase angle, etc.) as shown below for a three phasor display:
Adding a PhasorMeter
Right-click on an Output Channel component within Circuit view
of the Design Editor and select Input/Output Reference | Add as
PhasorMeter.
257
Move the mouse pointer over one of the grips. Left-click and hold
and then drag the pointer to resize.
Cut/Copy PhasorMeter
Right-click over the PhasorMeter and select Cut or Copy respectively.
258
PSCAD
Copy PhasorMeter as Meta-File/Bitmap
The entire PhasorMeter display can be copied to the Windows
Clipboard in either Meta-File (*.wmf) or Bitmap (*.bmp)
format. Right-click over the PhasorMeter title bar and select Copy
as Bitmap or Copy as MetaFile. Go to your report document and
paste the image.
Navigate to Channel
You can navigate directly to the associated Output Channel component by selecting this option. Right-click over the PhasorMeter
and select Navigate to Channel. PSCAD will automatically find the
Output Channel and point to it with an arrow.
Adjusting Channel Settings
The polar axis limits of the PhasorMeter are set in the corresponding Output Channel Properties dialog. This dialog may be accessed
directly from the PhasorMeter by right-clicking over the device title
bar and selecting Channel Settings....
Displaying Specic Data
The magnitude and phase angle of individual array elements can be
displayed in the status bar at the bottom of the PhasorMeter. Simply
left-click on the Display Selector over the proper button. The buttons
represent phasors 1 through 6 from left to right.
D: Degrees
R: Radians
259
260
PSCAD
Moving and Resizing an XY Plot Frame
To move an XY Plot, place the mouse pointer over the title bar and
then left-click and hold. Drag the XY Plot frame to where it is to be
placed and release the mouse button.
To resize, place the mouse pointer over the title bar and left-click to
select the XY Plot frame. Grips should then appear around the outer
edge as shown below.
Move the mouse pointer over one of the grips. Left-click and hold
and then drag the pointer to resize.
Cut/Copy XY Plot Frame
Right-click over the XY Plot title bar and select Cut or Copy respectively.
261
262
PSCAD
There are various parameters that may be edited though this window, each of which are described below.
Name: Enter a title for the XY Plot (this text will appear in
the Graph Frame title bar). The default text may appear a
bit cryptic: This syntax is used as a naming convention for
grouping objects in the Workspace. For more information
on this syntax, see Grouping of Runtime Objects in this
chapter.
263
Markers:
264
PSCAD
There are various parameters that may be edited though this window, each of which are described below.
Display Preferences:
Show Grid: Select this option to display grid lines for the
x-axis and y-axis major grids.
Show Ticks: Select this option to show major grid tick
marks along the x and y-axis intercept lines.
Show Intercepts: Select this option to display both
intercept lines (horizontal and vertical). The intercepts are
always at zero, and cannot be adjusted.
Show Glyphs: Select this option to show glyph symbols on
all curves in the graph.
Show Cross Hair: Select this option to invoke the Cross
Hairs mode.
Auto Curve Colours: Select this option to use automatic
colouring of curves in the graph. You cannot change curve
colour manually when this option is selected.
Invert Colours: Select this option to give the graph a black
background (instead of white or yellow).
Snap Aperture to Grid: Select this feature so that when
using dynamic aperture adjustment, the aperture view will
snap to the major grid while zooming.
265
Trace Style:
Polar Grid
The default cartesian (XY) grid display can be switched to a polar
grid by simply toggling the XY/Polar display button at the top-left of
the Graph Frame.
The polar and XY grids are simply overlayed on top of the plotted
data:
Polar Grid
266
Cartesian Grid
PSCAD
Dynamic Zoom
See Dynamic Zoom in XY Plots in this chapter for more details.
Existing Tool Tips, such as Cross-Hair and Min/Max curve Tool Tips
are also standardized to 12 significant digits. The following images
show the locations of other Tool Tips in the plotting environment:
267
Min/Max Tool
Tip
Cross-Hair Tool
Tip
Marker Tool
Tip
As can be seen from the Graph, the fault occurs around 0.25 s and
lasts for about 0.07 s. The Dynamic Aperture Adjustment feature can
be used to close the viewing window to a smaller time width, so that
the fault waveforms can be more easily studied. To do this, move
your mouse pointer over the horizontal scroll bar at the far right so
that the mouse pointer turns into a double-headed arrow.
Click and hold the left mouse button and drag the scroll bar aperture
slowly to the left.
268
PSCAD
You should see your graph display dynamically adjusting as you
change the size of the scroll bar aperture. Watching the horizontal
axis display, shrink the aperture to an appropriate size (for the graph
above, about 0.05 s or so).
Release the left mouse button and move the pointer over the scroll
bar aperture, click and hold the left mouse button again the mouse
pointer icon should become a hand. Drag the mouse so as to scroll
across the time frame of the graph.
If desired, you can shrink the aperture further for even more
detail. An aperture will also be created automatically when you zoom
into a certain data range.
You may also use either the left and right arrow buttons at each
end of the scroll bar, or the arrow keys on your keyboard to scroll
through data: To scroll in small increments, simply left-click the
either arrow, for larger increments hold down the Ctrl key and then
left-click. When using the arrow keys, make sure that the focus is on
the Graph Frame being viewed, as these keys can also function as a
scroll mechanism for the Circuit page.
NOTE: This exercise is for the purpose of
describing Dynamic Aperture Adjustment. A
more efficient way to zoom into this aperture
window is to use Horizontal Zoom.
269
If the aperture Width is a fraction of the total time scale for the plot,
then the aperture indicator scroll bar will reflect this by showing a
smaller aperture window:
You may now move the aperture window along the time axis, maintaining its set width. To do this, move your mouse pointer over the
aperture indicator in the scroll bar and left-click and hold. Your
mouse pointer should become a hand symbol. Move the mouse left
or right along the axis.
The aperture Position indicator at the bottom-right corner will indicate the starting time of the aperture.
MARKERS
Markers are a special feature included in both Graph Frames and XY
Plots to help users with the analysis of their online data. Specifically,
they are used to delineate the data so as to focus analysis to that
specific range. Depending on Marker position, convenient legend
displays will indicate the difference between the two Markers in both
the x and y directions.
270
PSCAD
Markers are used only on the x-axis (time axis) and will appear as
two adjustable tabs. The Marker tabs are labelled as X and O and
the combination of the two set the specified boundaries. Once
Markers are set, analysis can be performed on the data contained
within them.
Markers are used in a slightly different manner between Graph
Frames and XY Plots. Any differences are noted in the sections
below.
Show/Hide Markers
There are a few ways to show or hide Markers:
Left double-click the Graph Frame horizontal axis, or rightclick over the horizontal axis and select Axis Properties...
to bring up the Axis Properties dialog. Select the Show
Markers selection box.
271
If you are working with a Graph Frame, two tabs should appear along
the horizontal axis. Each marker tab, labelled X and O, correspond
to an x-axis (time) position.
If you are working with an XY Plot, an extra display bar will appear at
the bottom of the plot frame as shown below:
Marker Display in
Graph
272
PSCAD
Each Graph in the Graph Frame will have a legend directly to the
right of the Graph. The values displayed are specific to each Graph
and are described as follows:
The x-axis will also have its own legend where the values displayed
are similar to those described above, but for the x-axis.
XY Plot Marker Legends
Once Markers are enabled (shown) in an XY Plot, a Marker bar will
appear at the bottom of the Plot Frame. As soon as either of these
Markers is moved, marker legends will appear directly to the right of
each:
273
274
When using XY plots, right-click over the plot title bar and
select Plot Frame Properties... to bring up the Plot Frame
Properties dialog. Select the Show Markers selection box
and then set the time-axis values of each marker directly in
the input elds provided.
PSCAD
Right-Click Menu
Setting Markers
Markers can be set to a certain position on the Graph Frame time
axis as follows:
1. Show the Markers by pressing the M key.
275
Instead of pressing the above keys, you can also use the time axis
pop-up menu. Left-click on the Graph Frame time axis at the approximate position where you wish to place a Marker, then select the
appropriate menu function.
276
PSCAD
PREFERENCES
Plotting preferences can be adjusted from either the Graph or XY
Plot pop-up menus (depending on which one you are using). Simply
right click over a Graph or XY Plot to bring up the corresponding popup menu. Then, select Preferences.
Many of the above preferences can be set within the various dialog
windows involved with Graphs and XY Plots.
PSCAD Users Guide
277
278
PSCAD
NOTE: You can also zoom along a single
axis by drawing out a narrow box. The zoom
will ignore the narrow side of the box.
Vertical Zoom
Select the desired Graph or XY Plot with a left-click on the Graph
display area. Press Shift + left mouse hold and drag the mouse
pointer in a vertical direction (i.e. up or down along the y-axis) to create a vertical zoom region. Release the left mouse button to zoom to
that region.
Horizontal Zoom
Select the desired Graph or XY Plot with a left-click on the graph display area. Press Ctrl + left mouse hold and drag the mouse pointer
in a horizontal direction (i.e. left or right along the x-axis) to create a
horizontal zoom region. Release the left mouse button to zoom to
that region.
Zoom Previous/Next
Select the desired Graph or XY Plot with a left-click on the graph
display area. Right-click over the graph to generate a pop-up menu
and select Zoom | Previous or Zoom | Next.
279
280
PSCAD
Select the desired Graph or XY Plot with a left-click on the graph
display area. Right-click over the graph to generate a pop-up menu
and select either Zoom | X Limits or Zoom | Y Limits.
As an alternative, you can also use the E or U keyboard shortcuts for
Zoom X Limits or Zoom Y Limits respectively (once the desired graph
has been selected).
Resetting All Extents and Limits
Select the desired graph or XY plot with a left-click on the graph display area. Right-click over the graph to generate a pop-up menu and
select either Zoom | Reset All Extents or Zoom | Reset All Limits.
As an alternative, you can also use the R or B keyboard shortcuts for
Reset All Extents or Reset All Limits respectively (once the desired
graph has been selected).
Dynamic Zoom in XY Plots
Dynamic zoom is a feature specific to the XY Plots. Left click and
hold with your mouse pointer over the dynamic zoom control bar as
shown below:
281
282
PSCAD
Graph
PolyMeter
Description
Zoom In
Zoom Out
Zoom horizontal extents
Zoom vertical extents
Reset all extents
Previous zoom
Next zoom
Toggle Cross-Hair Mode
Toggle Auto-Pan of X-Axis
Toggle Markers
PolyMeters:
Button
Description
Toggle index labels
Toggle scroll view mode
283
Move the mouse pointer over one of the Grips. Left-click and hold
and then drag the pointer to resize.
Cut/Copy Panel
Right-click over the Control Panel title bar and select Cut or Copy
respectively. You can also use the standard Ctrl + X or Ctrl + C.
284
PSCAD
Once a Control Panel has been cut or copied, it may then be pasted
into another location in the Project (along with its contents).
Paste Panel
Cut or copy a Control Panel as described above. Right-click over
a blank area of the project page and select Paste. A Control Panel
may be pasted multiple times.
Adjusting Panel properties
To access the Control Panel Properties dialog, left double-click the
Control Panel title bar, or right-click over the title bar and select
Control Panel Properties....
Caption: Enter a title for the Control Panel (this text will
appear in the Control Panel title bar). The default text
may appear a bit cryptic: This syntax is used as a naming
convention for grouping objects in the Workspace. For
more information on this syntax, see Grouping of Runtime
Objects in this chapter.
Control Interfaces
A Control Interface is just as its name describes: A user interface
object, which allows manual adjustment of an EMTDC data input
variable by the user. A Control Interface must first be linked with
one of the I/O Devices available in the Master Library (i.e. Variable
Real/Integer Input Slider, Two State Switch, Rotary Switch (Dial),
PSCAD Users Guide
285
Drag and Drop: Hold down the Ctrl key, left-click and hold
the associated control component and drag and release over
the Control Panel. See Drag and Drop in Chapter 5 for
more details.
Right-click on the associated control component and select
Input/Output Reference | Add as Control. Right-click over
the desired Control Panel title bar and select Paste.
286
PSCAD
Drag and Drop: Left-click and hold over the title bar of
a particular Control Interface and then drag the mouse
pointer over the Control Panel title bar. A downward arrow
will appear between existing interfaces depending on the
position of the mouse pointer. Release the left button to
drop the interface.
Left-Click and
Hold
Drag
Release Button
287
288
PSCAD
289
Dial Component:
To operate the Dial component, left-click and hold on the slider
control knob and move the knob up or down. As the control knob
is moved, the Dial interface will indicate graphically, which of the
multiple states is currently being output from the corresponding Dial
component.
The image below shows a plot of a Dial component output, where
the user has changed its state during a 1.0 second simulation run.
Slider Component:
The Slider component is operated in the same manner as the Dial
interface described above. The only difference is that the Slider output does not operate in discrete states, but provides a continuously
variable output.
The image below shows a plot of a Slider component output, where
the user has varied its output during a 1.0 second simulation run.
290
PSCAD
Meters
A meter is similar to a Graph in that it is used for displaying an
EMTDC output signal and is linked to a corresponding Output
Channel. Instead of displaying the signal as a Curve (as a graph
would), the signal is used to operate a realistic meter display, with a
pointer position proportional to the signal magnitude. For example,
the following image shows an Output Channel component linked to a
meter in a control panel.
291
292
Drag and Drop: Hold down the Ctrl key, left-click and
hold the associated Output Channel component and drag
and release over the Control Panel. See Drag and Drop in
Chapter 5 for more details.
Right-click on the associated Output Channel component
and select Input/Output Reference | Add as Meter. Rightclick on the desired control panel title bar and select Paste.
PSCAD
Meter Order
Once multiple Meter Interfaces have been added to a particular
Control Panel, you may change the order in which they appear. This
is accomplished either through the Drag and Drop feature, or the
right-click menu:
Drag and Drop: Left-click and hold over the title bar
of a particular Meter Interface and then drag the mouse
pointer over the Control Panel title bar. A downward arrow
will appear between existing interfaces depending on the
position of the mouse pointer. Release the left button to
drop the interface.
Left-Click and
Hold
Drag
Release Button
Cut/Copy Meter
Right-click over the meter title bar and select Cut or Copy respectively.
293
PSCAD Points to
Object
PSCAD
For example, consider the following Project page, where the user
wishes to group existing Control objects according to function:
295
EXAMPLE 6-1:
A user wants to display the Group Name of all Interfaces within a
Control Panel. The default Caption parameter in the Control Panel
Properties dialog is $(GROUP) : Controls. Two interfaces are
then inserted into the Control Panel, one called Firing Angle Group
Name Firing Control, and the other named Volts with Group Name
Monitoring. The resulting Caption will appear as illustrated below:
296
PSCAD
FRAME/PANEL MINIMIZATION
All Graph Frames, Control Panels, Polymeters and XY Plot Frames
can be minimized in order to reduce clutter and save space when
viewing data. This feature is similar to the PSCAD V3 feature Iconify
Plot, however additional functionality has been added to make the
minimization process more intuitive.
Minimizing a Frame/Panel is accomplished simply by clicking the
Minimize button in the top right-hand corner:
The Frame/Panel can then be restored by clicking the Restore button in the right-hand corner:
297
Graph Frame
Control Panel
PolyMeter
PhasorMeter
XY Plot
298
PSCAD
Edit | Workspace Settings... in the Main Menu bar. See Views in
Chapter 3 for more details.
Copy as Meta-File or Bitmap
Right-click over the plotting or control object and select Copy <object> as Meta-File or Copy <object> as Bitmap from the pop-up
menu. Depending on the object selected, the <object> part of the
command will be replaced by the object type.
You may then go directly to a report document and paste the image,
while it is still in the Windows clipboard.
299
PSCAD
Chapter 7:
Project Settings
Project Settings Overview
Most features and settings related directly to the control of the
actual simulation in PSCAD are contained in the Project Settings
dialog. Important parameters, such as total simulation time and time
step, are included here along with more advanced, Project specific
PSCAD and EMTDC features and processes.
This dialog can be accessed through a right-click on the project title
itself (either a case or a library) in the Workspace window, and selecting Project Settings... from the pop-up menu.
General
Runtime
Network
Dynamics
Mapping
Fortran
Link
PSCAD Users Guide
301
GENERAL
The properties contained within the General section of the Project
Settings dialog control window are related to Project naming and version tracking. These are explained in detail in the sections below.
Description
This field allows for the entry of a single-line description of the
Project. This description will be displayed beside the Project filename in the Workspace Viewer. Do not use quotes () and apostrophes () in this field.
File Path
File Path displays the path and filename information for the
Project. This field is for display only and cannot be changed through
the Project Settings dialog.
302
PSCAD
Persist As
Persist As displays the Project filename. This field is for display only
and cannot be changed through the Project Settings dialog.
Revision Tracking
These settings display particular information regarding the Project
revision history.
File Version
This is the PSCAD version used to create the project.
First Created
This is the date and time at which the project was first created.
Last Modied
This is the date and time at which the project was last modified.
Author
This is the name (userid) of the person who created and/or modified
the project.
RUNTIME
The properties contained within the Runtime section of the Project
Settings dialog control window are the most commonly accessed
project parameters. These are explained in detail in the sections
below.
303
304
PSCAD
observed from a plotted simulation output, run the case with the plot
step equal to the EMTDC time step and compare the results.
NOTE: The plot step can be modified during
a run (or after starting from a snapshot). You
can change the value from the Project
Settings dialog or from the Settings bar.
Start-up Method
There are two ways to start a simulation in PSCAD: The standard
method (i.e. from time = 0.0 seconds) and from a Snapshot File.
Standard
The standard method to start an EMTDC case is to simply start from
an un-initialized state (i.e. from time t = 0.0). This is how simulations
are started most of the time.
From Snapshot File
There may be instances when you would like to start your simulation from a pre-initialized state. Although initial conditions are not
yet available as direct entry into certain components, it is possible in
PSCAD to run a case to a steady state and then to take a snapshot
at a certain instant during the run. All relevant network data will be
saved to a snapshot file, from which you may start your case already
pre-initialized.
An input field is included directly beside this field called Input
File. Enter a name for the snapshot file to be used here. See the
section entitled Starting from a Snapshot in Chapter 5 of this manual for more details on how to create and start from a snapshot file.
NOTE: When you start from a Snapshot
File, make sure that you have not altered the
circuit from which the snapshot was taken,
otherwise an error may occur.
305
Timed Snapshot
There are two ways to utilize a snapshot file: Single and incremental
snapshots.
An input field is included directly beside this field called Snapshot
File. Enter a name for the snapshot file to be created here. Another
input field is included called Time. Enter the time in seconds at
which the snapshot is to be taken.
PSCAD
The file naming convention is:
base_name_##.snp
You are required to provide only the base_name (in the Snapshot
File field). The extension will be added automatically.
Multiple Run
There are currently two different methods for performing multiple
runs in PSCAD - this is the simpler and most basic of the two. This
method is used in conjunction with the Current Run Number and
Total Number of Multiple Runs components, which are available in
the PSCAD Master Library.
EXAMPLE 7-1:
Consider the simple comparator below. The Multiple Run parameter
is enabled from the Project Settings dialog and set to 10 runs.
In this case, the comparator output is set to go low (0) when input A
is less than or equal to 1.0 (i.e. the last two runs).
An additional input field is included directly beside this field called
Output File. Enter a name for the Multiple Run Output File to be
created here. Another input field is included called # runs. Enter the
total number of runs here (this value is used to set the Total Number
of Multiple Runs component).
307
Miscellaneous
The remaining Runtime parameters are outlined below:
EXAMPLE 7-2:
A user runs a case project to steady state, and then takes a snapshot at 0.5 seconds. The user then re-starts the simulation from the
snapshot file created, and sets the Duration of Run to 0.05 s.
If Initial Start Time Always Zero is enabled, the simulation run will
be displayed from 0.0 to 0.05 seconds. If disabled, from 0.5 to 0.55
seconds.
308
PSCAD
Send Only the Output Channels That are In Use
Selecting this option will essentially turn off all Output Channels that
are not being plotted in Graphs, or monitored in Meters. Enabling
this option has the potential to greatly reduce the amount of storage
for the simulation, as well as a slight simulation speed improvement.
NETWORK
The properties contained within the Network section of the Project
Settings dialog control window are related to the EMTDC Electric
Network Solution and diagnostics. These are explained in detail in
the sections below.
Process Communication
The input parameters involved here are outlined below.
309
310
PSCAD
Interpolate Switching Events to the Precise Time
To account for inter time step switching of switching devices (i.e.
those components whose electrical properties change during a run),
the EMTDC Electric Network Solution uses an interpolation algorithm in order solve at the exact switching instant. This is the default
behaviour of EMTDC and is essential for the accurate simulation of
frequently switching devices, such as FACTS models.
Use Ideal Branches for Resistances Under
The Ideal Branch algorithm allows for zero resistances and true infinite bus voltage sources in EMTDC.
With this option enabled, you can create an infinite bus by either entering a value less than the threshold (set in the threshold
field directly to the right of this check box) or 0.0 for the source
resistance. Similarly, for a zero resistance branch, enter a value less
than the threshold or 0.0 for the ON resistance of a diode, close
resistance of a breaker, etc.
The default threshold value is preset to 0.0005 . As this algorithm
involves extra computations and so a non-zero value greater than
this threshold is recommended, unless ideal like results are paramount.
Numerical Chatter Suppression
The following input parameters are related to the detection and removal of numerical oscillations called chatter.
311
DYNAMICS
The properties contained within the Dynamics section of the Project
Settings dialog control window are related to the EMTDC System
Dynamics. These are explained in detail in the sections below.
312
PSCAD
Signal Storage
The input parameters involved here are outlined below.
In smaller projects, this toggling control will have very little effect on
the simulation speed. As Projects become larger and contain many
control signals, this feature may help to speed things up.
EXAMPLE 7-3:
In the simple control system shown below, there will be a total of four,
type REAL variables declared in the project Fortran file when this
Project is compiled; In1, error, Out and In2. Three are feed-forward
variables (indicated by the O symbol), and one is a feedback variable
(indicated by the X symbol).
313
If Store Feed Forward Signals for Viewing is enabled, all four variables will be written to storage every time step as indicated in the
following excerpt from the Project Fortran file:
!================================================
SUBROUTINE DSDyn()
!--------------------------------------! Transfers from storage arrays
!--------------------------------------In2
= STOF(ISTOF + 1)
In1
= STOF(ISTOF + 2)
error
= STOF(ISTOF + 3)
Out
= STOF(ISTOF + 4)
!--------------------------------------! Feedbacks and transfers to storage
!--------------------------------------STOF(ISTOF + 1) = In2
STOF(ISTOF + 2) = In1
STOF(ISTOF + 3) = error
STOF(ISTOF + 4) = Out
If Store Feed Forward Signals for Viewing is disabled, all four variables will be written to storage every time step as indicated in the
following excerpt from the Project Fortran file:
314
PSCAD
!================================================
SUBROUTINE DSDyn()
!--------------------------------------! Transfers from storage arrays
!--------------------------------------Out
= STOF(ISTOF + 4)
!--------------------------------------! Feedbacks and transfers to storage
!---------------------------------------
STOF(ISTOF + 4) = Out
Signal Flow
The input parameters involved here are outlined below.
315
MAPPING
The properties contained within the Mapping section of the Project
Settings dialog control window are related to the EMTDC Network
Solution conductance matrix optimization. These are explained in
detail in the sections below.
316
PSCAD
Network Splitting
The input parameters involved here are outlined below.
317
318
PSCAD
FORTRAN
The parameters contained within the Fortran section of the Project
Settings dialog are used for the control of Fortran compiler based error and warning messages. Also, any additional Fortran source files
required for the compilation of the project are indicated here, as well.
If only the filename is entered, PSCAD will assume that the source
file is located in the same directory as the project file itself, and will
append this path to the filename. You may also use standard directory navigational features when working with relative paths. For example, if a source file called test.f is located in the directory directly
above the project file, then the file entry would appear as follows:
319
This input field will only accept the following source file types:
320
PSCAD
Array & String Bounds
With this option selected, the program will stop if you are accessing
an invalid array index. For example, if the array X is declared to be
of dimension 10, and you have a line of source code that has X(J). If
J ever goes greater than 10, the program will stop with a proper
message. If this option is de-selected, the program will continue
execution and may eventually crash, adding difficulty to tracing the
cause.
This option should be used when testing your new models. It will
slow down the simulation and the speed penalty will vary from
machine to machine - you can disable this option if speed is a
concern. Please read the Fortran compiler documentation you are
using for more details.
Floating Point Underow
This option is useful for debugging but has a speed penalty that is
again architecture dependent. Please read the Fortran compiler
documentation for more details.
Integer Overow
This option is useful for debugging but has a speed penalty that is
again architecture dependent. Please read the Fortran compiler
documentation for more details.
Argument Mismatch
The Fortran compiler issues a warning if the argument type (REAL,
INTEGER, etc.) of the CALL statement does not match with the subroutine statement (this is applicable to functions, as well).
Do not ignore this warning as it may have the potential to create
unpredictable and hard to trace results.
Uncalled Routines
The Fortran compiler issues a warning if a routine is not called in the
program.
Uninitialized Variables
A warning is issued if a variable is used before it is assigned a
value. Normally, the cause of this is a typographical mistake in the
source code.
321
PSCAD
used with PSCAD, there can be up to three sub-directories specified,
which must be named as follows:
Any library or object files required should be created with both compilers, and then added to the corresponding sub-directory.
If only the filename is entered, PSCAD will assume that the library or
object file is located in the specified sub-directory in the User Library
Path directory. For example, if a user specifies C:\my_libs as the
User Library Path and is using the Compaq Fortran 90 compiler,
entering test.obj, as shown below, would indicate to PSCAD that the
specified file is located at C:\my_libs\cf6\test.obj.
323
Matlab
The input parameters involved here are outlined below.
324
PSCAD
Chapter 8:
Using the data provided by the cross-sectional definition of the corridor, the transmission lines and cables are modeled using one of
three distributed (travelling wave) models:
Bergeron
Frequency Dependent (Mode)
Frequency Dependent (Phase)
325
326
PSCAD
327
328
PSCAD
Transmission Line
Configuration Component
Properties Dialog
PSCAD Users Guide
329
330
PSCAD
The Cable Configuration component and two Cable Interface components are interlinked through input parameters. Ensure that the
following steps are taken:
1. Segment Name: Ensure that the Segment Name inputs
in both the Cable Conguration component and two Cable
Interface components are identical.
2. Number of Cables: The Number of Cables parameter in the
Cable Interface components species how many individual
cables there are in the system. Each of these cables
however, could contain different numbers of conducting
layers, and so the total number of conductors is arbitrary
(this is why the Number of Conductors parameter is
disabled in the Cable Conguration component). The user is
required to specify the number of conducting layers for each
cable in the Cable Interface components. This data must
match what is dened within the Cable Segment CrossSection.
Cable Interface
Component
331
Cable Configuration
Component Properties
Dialog
332
PSCAD
The main section is entitled Editor, and is usually the default section
view when the editor is invoked. The four remaining sections are for
viewing transmission system related files, after the project has been
built.
The T-Line/Cable Properties Editor can be accessed through either
the Transmission Line or Cable Configuration components. See
Editing a Transmission Line Configuration or Editing a Cable System
Configuration for more on invoking this editor.
Editing a Transmission Line Segment Cross-Section
To invoke the T-Line / Cable Properties Editor, right-click over the
Transmission Line Configuration component (without selecting it) and
select Edit Definition, as shown below:
333
PSCAD
Entry of Admittance/Impedance Data (Bergeron model only). In
either case, this is left for the user to add manually.
335
Multiple towers may be added to a single configuration. Just remember to ensure that the conductors are numbered properly within each
of the tower components, and that the X positions of the new towers
in the corridor are adjusted. Also, any conductors added by the additional towers must be reflected in the corresponding Transmission
Line Interface components (if in Remote Ends mode).
336
PSCAD
Editing Tower Properties
Tower properties can be edited through the corresponding tower
properties dialog window. Right-click over the Overhead Line Tower
(without selecting it) and select Properties... to access this dialog.
Editing a Cable Segment Cross-Section
To invoke the T-Line / Cable Properties Editor, right-click over the
Cable Configuration component (without selecting it) and select Edit
Definition, as shown below:
337
338
PSCAD
339
NOTE: The location of the Cable CrossSection component does not affect the
results. However, the cross-section (or
cross-sections) should be positioned to allow
for ease in readability. That is, directly below
the Ground Plane.
Multiple cables may be added to a single configuration. Just remember to ensure that the conductors are numbered properly within each
340
PSCAD
of the cross-section components, and that the X positions of the new
cross-sections in the corridor are adjusted. Also, any conductors
added by the additional cross-sections must be reflected in the corresponding Cable Interface components.
Editing Cross-Section Properties
Cable cross-section properties can be edited through the corresponding cross-section properties dialog window. Right-click over
the cross-section component (without selecting it) and select Edit
Parameters... to access this dialog.
Selecting the Proper Line Model
There are three types of distributed (i.e. travelling wave) transmission models that may be selected to represent your transmission
corridor: The Bergeron model, the Frequency-Dependent (Mode)
model, and the Frequency-Dependent (Phase) model. These models exist as components in the Master Library, and each include adjustable properties. The requirements for your study will determine
which of the three models is suitable.
341
342
PSCAD
The Frequency-Dependent (Phase) model should always be the
model of choice, unless another model is chosen for a specific
reason. This model is the most advanced and accurate time domain
line model in the world!
Adding a Line Model
Line model components can be added to the T-Line/Cable
Configuration Editor in one of two ways. The most straightforward
method is to use the right-click pop-up menu: In the Editor section of the Editor, move the mouse pointer over a blank area of the
window. Right-click and select Choose Model. A sub-menu will appear containing a list of all model components available in the Master
Library. Select a model and it will be automatically added.
You can also copy and paste model components directly from the
Master Library. Open the Master Library in Circuit view and then
open either the TLines module or the Cables module on the main
page. Select a line model component (middle of the page), rightclick on the component and select Copy (or press Ctrl + C). Open
the Editor section of the T-Line/Cable Configuration Editor, right-click
over a blank area and select Paste (or press Ctrl + V).
Editing Line Model Parameters
Line model properties can be edited through the corresponding
model properties dialog window. Right-click over the line model
component (without selecting it) and select Edit Parameters... to
access this dialog.
PSCAD Users Guide
343
344
PSCAD
Viewing Line Constants Files
There are a few files involved with the T-Line/Cable Constants
program. These are the Input, Constants, Log and Output files. To
view any of these files, first execute the T-Line/Cable Constants
program. Then, simply click the corresponding tab in the T-Line
Properties Editor tab bar, located near the bottom of the Design
Editor window.
345
346
PSCAD
3. Model Component: Some important information will appear
in the input le from whatever model is being used. In this
case, it is the Frequency Dependent (Phase) model:
Frequency Dep. (Phase) Model Options:
{
Interpolate Travel Times = 1
Infinite Line Length = 0
Curve Fitting Start Frequency = 0.5
Curve Fitting End Frequency = 1000000.0
Maximum # of Poles for Surge Admittance Fit = 20
Maximum # of Poles for Attenuation Constant Fit = 20
Maximum Fitting Error (%) for Surge Admittance = 0.2
Maximum Fitting Error (%) for Attenuation Constant = 2.0
Weighting Factor 1 = 100.0
Weighting Factor 2 = 1000.0
Weighting Factor 3 = 1.0
Write Detailed Output Files = 0
}
347
The positions of elements in this matrix are dependent on the manner in which the conductors/ground wires have been numbered. The
type of ideal transposition that has been selected will also affect this
matrix.
Shunt Admittance Matrix (Y):
This data represents the system shunt admittance matrix Y per-unit
length (S/m). The diagonal terms represent the self admittances of
each conductor, whereas the off-diagonals are the mutual admittances between the respective conductors. The dimension of the matrix
depends on the final number of equivalent conductors/ground wires
in the system N:
348
PSCAD
The positions of elements in this matrix are dependent on the manner in which the conductors/ground wires have been numbered. The
type of ideal transposition that has been selected will also affect this
matrix.
Long-Line Corrected Series Impedance Matrix (ZLL):
This data represents the long-line corrected, series impedance
matrix Z (). This matrix is the impedance of the entire line length,
where all quantities have been passed through a correction algorithm
to account for the electrical effects of long line distances.
The long-line corrected quantities have a specific use: They should
be used whenever a single PI-section equivalent is being derived
to represent the entire line length at a specific frequency. This data
should not be used to define time domain traveling wave models.
Long-Line Corrected Shunt Admittance Matrix (YLL):
This data represents the long-line corrected, shunt admittance matrix
Y (S). This matrix is the admittance of the entire line length, where
all quantities have been passed through a correction algorithm to account for the electrical effects of long line distances.
The long-line corrected quantities have a specific use: They should
be used whenever a single PI-section equivalent is being derived
to represent the entire line length at a specific frequency. This data
should not be used to define time domain traveling wave models.
Sequence Data
The sequence data section displays relevant line parameters at a
specific frequency, where all quantities are sequence quantities. The
349
Transformation Matrix
Sequence Impedance Matrix (Zsq):
This data represents the system sequence impedance matrix Zsq
per-unit length (/m). Zsq is derived directly from the series impedance matrix Z and the sequence transform matrix T (both described
above) as follows:
If all 3-phase circuits in the Z matrix are ideally transposed, then the
sequence impedance matrix Zsq will be a diagonal matrix, where
the diagonal terms are the equivalent zero, positive and negative
sequence components.
For a single 3-phase, ideally transposed circuit, the sequence impedance matrix appears as follows:
350
PSCAD
Where,
Zero sequence impedance of the nth circuit [/m]
Positive sequence impedance of the nth circuit [/m]
Negative sequence impedance of the nth circuit [/m]
Zero sequence mutual impedance [/m]
Sequence data, of course, only makes sense when 3-phase circuits
are considered. The format of this matrix depends heavily on the
manner in which the individual circuits in the system are transposed
(if at all). For example, if a double-circuit line is transposed so that
all six conductors are included in the transposition, a sequence matrix will not be provided.
The positions of elements in this matrix are dependent on the manner in which the conductors/ground wires have been numbered. The
type of ideal transposition that has been selected will also affect this
matrix.
Sequence Admittance Matrix (Ysq):
This data represents the system sequence admittance matrix Ysq
per-unit length (S/m). Ysq is derived directly from the shunt admittance matrix Y and the sequence transform matrix T (both described
above) as follows:
351
Series Impedance
Shunt Admittance
Eigenvectors/Eigenvalues
Curve Fitting Output
The plotting tools used in the environment are based on the same
used in PSCAD, including features, such as Markers, Zoom and
Cross-Hairs. Data may be written to file or copied to the clipboard
just as it can be in the PSCAD Online Plotting Tools.
352
PSCAD
The detailed output data files are written as columnar formatted
ASCII text files, which are placed to the Project Temporary Directory
when the line constants are solved.
Creating Detailed Output
Before any detailed output can be viewed, the transmission line
or cable system must be solved by either using the Frequency
Dependent (Phase) or Frequency Dependent (Mode) model. Note
that in either case, the input parameter Output Detailed Output
Files? must be selected as Yes before the constants are solved.
353
354
PSCAD
Array:
etc...
Array quantities are simply listed in order.
Calculated/Fitted Quantities:
etc...
When curve fitting results are included, the calculated and fitted
quantities are staggered, as indicated by the C and F respectively.
Switching between Spreadsheets
Only one parameter may be viewed at a time in spreadsheet
form. To switch to another available parameter, click on the parameter selection drop list in the Detailed Output Toolbar:
355
The individual toolbar buttons are listed below with a short description:
Button
Description
View only curves from presently viewed
spreadsheet
View all curves at once
X-axis settings (i.e. plot vs. frequency or
log(f))
Drop list to select data viewed in spreadsheet
Access help
Curve Viewer
The Curve Viewer is a simple utility used for viewing the line constants detailed output data graphically. The utility uses the same
online plotting facilities that are provided in the main PSCAD environment, tailored to this specific use. There are two Curve View
utilities: View Single Graph and View All Graphs.
NOTE: For detailed information on using
these plotting tools, see Online Plotting.
356
PSCAD
This will bring up the Curve Viewer as a floating window, as shown
below for the Single Graph Viewer:
When viewing matrix quantities like the Series Impedance (Z) above,
only the diagonal elements of the matrix are initially enabled. This is
mainly to reduce the number of possible Traces.
Element Identication
The Curve Viewer makes use of the multi-trace Curve feature available in the PSCAD online plotting tools, in order to allow plotting of
2-dimensional parameters, such as matrices. For example, if plotting a 3x3 matrix, such as the Y or Z matrix magnitudes, the matrix
elements are organized according to Curve and Trace, where each
multi-trace Curve represents an entire matrix column, and the respective Traces represent the elements of that column.
A 3x3 Matrix
In the diagram above, the column 1 Curve has been expanded
to reveal the three Traces representing the 3-elements of the
column. That is, elements (1,1), (2,1) and (3,1). For more on multitrace Curves, see Curves and Traces.
357
A 3-Element Array
358
PSCAD
Chapter 9:
Designing Components
One of the features that makes PSCAD such a powerful simulation
tool is its allowance for the design of custom models. Users can develop models from the very simple, to the very complex, limited only
by their skills and knowledge of the subject.
In order for a custom model to be included in either the System
Dynamics or the Electric Network Solution in EMTDC, the model
must first be added as a component in PSCAD. Components act as
a graphical representation of models, allowing the user to supply input parameters, perform pre-calculations on input data, and change
the component appearance.
This topic discusses the various features and tools available to the
user for the design of custom components in PSCAD. The information here is closely linked with the following topic entitled PSCAD
Script. It is suggested that you become familiar with both chapters
before proceeding with your component design.
The last section of this topic includes a tutorial called Creating a New
Component, which goes through many of the features described
below.
NOTE: See Creating a New Component or
Module in Chapter 5 for details on creating a new component or module, using the
Component Wizard.
359
Graphic
Parameters
Script
360
PSCAD
NOTE: You cannot edit the definition of
Master Library components, unless you
rename the master.psl file.
361
Arrow Keys
You can use the arrow buttons on your keyboard to scroll both horizontally and vertically while in the Graphics section.
Panning (Dynamic Scroll) Mode
The panning or dynamic scroll feature allows you to scroll through
the Graphic section in a fluid motion. You can invoke panning mode
by one of the following methods:
Zooming
Zoom features are available when working in the Graphic
section. There are a few different methods for zooming available:
362
PSCAD
Graphic Objects
There are several types of graphic objects available to help design a
visually appealing component. These include:
Arc
Arc
Ellipse
Line
Rectangle
363
Depending on the object selected, a new object should appear attached to your mouse pointer. With your mouse, move the object to
the desired location within the Design Window and left-click to place
the object.
Rotate, Flip, Mirror and Resize Graphic Objects
Graphic objects can be rotated, flipped, mirrored or resized once
they have been placed in the Graphic window. To resize, left-click on
the object so that Grips appear.
Place the mouse pointer over a selected Grip, press and hold the left
mouse button, and move the mouse. Note that the corner Grips will
364
PSCAD
allow resizing in both directions, while the mid-point grips will only
allow movement in either the horizontal or vertical directions.
Rotate, flip or mirror can be accomplished in one of three ways. The
first is to use the speed buttons on the Rotation Bar.
If you cannot see this toolbar, go to the Main Menu bar and select
View | Rotation Bar. Select the object with a left-click of your
mouse. Then, click one of the four buttons shown above.
You can also use the right-click pop-up menus: Right-click over the
object and select Rotate. Choose one of the options given.
365
366
PSCAD
object is associated with will determine the line weight. See
the Connection input below for more details.
367
Fill Palette
BDiagonal Sub-Palette
Other:
In addition to the Format Graphic Object dialog, you can change the
line/border colour, weight and style, as well as fill properties directly
from the Graphic Palette. First, select the object with a left-click
(Grips appear). Then adjust any of the above properties by using the
appropriate buttons.
368
PSCAD
369
Other:
370
PSCAD
visible. See Conditional Statements, Layers & Filters in this
chapter for more details.
In addition to the Format Arc Object dialog, you can change the
line/border colour, weight and style from the Graphic Palette. First,
select the arc with a left-click (Grips appear). Then adjust any of the
above properties by using the appropriate buttons.
Text Labels
Text can be displayed on component graphics by using a Text Label
object. Text labels can be one line of text only, and the user may
select alignment and size.
Adding Text Labels
To add a Text Label object to your component definition, the most
straightforward method is to use the Graphic Palette:
PSCAD Users Guide
371
Simply left-click the New Text Label button on the toolbar, drag
the label to where you want it placed and left-click again. Another
method is to use the right-click menu: Move the mouse pointer over
a blank area of the Graphic window. Right-click and select New
Graphic | Text.
If you cannot see this toolbar, go to the Main Menu bar and select
View | Rotation Bar. Select the object with a left-click of your
mouse. Then, click one of the four buttons shown above.
372
PSCAD
You can also use the right-click menus: Select the label with a leftclick of your mouse. Right-click over the selected object and select
Rotate. Choose one of the options given.
As shown above, text features, such as size and style, can be adjusted.
373
Select on the Label with a left mouse click. Click the Cut or
Copy buttons from the Main Toolbar. Click the Paste button
Main Toolbar to paste.
Right-click on the Label and select Cut or Copy from the
pop-up menu. Right-click over a blank area of the Graphic
window and select Paste from the pop-up menu.
Select on the Text Label with a left mouse click so that Grips
appear. Press Ctrl + x or Ctrl + c to cut or copy the label
respectively. Press Ctrl + v to paste.
EXAMPLE 9-1:
A user wants to display the value of an Input Field with Symbol name
timec, which represents the component time constant. The user
374
PSCAD
adds a Text Label to the component graphic and adds the following
to the Text input field in the Format Text Label dialog window:
If the timec input field has a value of say 10.0 [s], then the resulting
display on the Circuit canvas would be similar to:
Connections
Connections are used to provide an interface to or from your component and the external system (as drawn on the Circuit canvas). They
provide a means to either read data from, or output data to the
external system each simulation time step. These nodes play an
essential part in the construction of circuits in PSCAD, and are the
graphical signal communication avenue between models.
Adding Connections
To add a Connection object to your component definition, the most
straightforward method is to use the Graphic Palette:
375
Simply left-click the New Connection button on the toolbar, drag the
connection to where you want it placed and left-click again. Another
method is to use the right-click menu: Move the mouse pointer over
a blank area of the Graphic window. Right-click and select New
Graphic | Connection.
376
PSCAD
377
378
PSCAD
379
380
PSCAD
Categories
Within the Parameters section, Categories are ordered similar to
pages in a book. You may include several pages, each containing
inputs pertaining to a similar function, or you may place all inputs in a
single Category page. There are three different types of input fields
that may be added to Category pages. These include:
Text Field
Input Field
Choice Box
381
PSCAD
When input. Click the OK button. A new Category page should then
appear within the Parameters section viewing window.
You can edit the parameters of the Category Properties dialog at any
time. See Changing Category Properties below for more details.
Viewing Categories
As mentioned above, categories are organized similar to pages in a
book. Once you have added more than one category, there may be
a need to navigate through these pages. The most straightforward
method is to use the Parameters Bar. Simply left-click the down arrow on the View Category drop list as shown below:
383
Previewing Categories
For convenience, a preview function exists so that look and feel
of the category pages can be viewed, as they would appear to
someone using the component - without leaving the Component
Definition. The most straightforward method is to use the
Parameters Bar. Simply left click Preview Dialog button.
Another method is to use the right-click menu: Move the
mouse pointer over a blank area (white part) of the Parameters
window. Right-click and select Preview....
384
PSCAD
385
Duplicating a Category
The ability to duplicate a Category (including all of its contents) is essential when designing components. A direct duplication will ensure
that all Input Fields, Text Fields and Choice Boxes are aligned in the
same manner as the copied Category. This saves time in designing
the Category layout. The most straightforward method to duplicate a
Category is to use the Parameters Bar.
PSCAD
Left click the New Text Field button - a Text Field should appear
within the Category page. Another method is to use the right-click
menu: Move the mouse pointer over a blank area of the Category
page. Right-click and select New Control | Text Field.
The new Text Field should appear somewhere within the Category
page.
Moving and Resizing Text Fields
To move the new Text Field, left-click over top of the field to select it
(Grips appear).
387
388
Symbol: Enter a name for the Text Field. Note that this
name must be compatible with standard Fortran naming
conventions (i.e. it must begin with a non-numeric character,
do not include spaces, etc.).
Caption: Enter text to describe the Text Field. What is
entered here will be displayed in the Category page directly
to the left of the Text Field box.
Width: Select the character width of the Text Field box itself
(i.e. white box).
Default: Use this eld to add text, which will show up as
default text in the Text Field box.
PSCAD
Options:
Input Field
Input Fields allow the user to add numerical input to the
component. They can also be used (instead of an external input
connection) to import a defined signal from elsewhere in the system
directly as an online input to the component (i.e. for signal feedback).
Adding Input Fields
To add an Input Field to your component definition, the most straightforward method is to use the Parameters Bar:
Left click the New Input Field button - an Input Field should appear
within the Category page. Another method is to use the right-click
menu: Move the mouse pointer over a blank area of the Category
page. Right-click and select New Control | Input Field.
PSCAD Users Guide
389
The new Input Field should appear somewhere within the Category
page.
Moving and Resizing Input Fields
To move the new Input Field, left-click over top of the field to select it
(Grips appear).
390
PSCAD
Symbol: Enter a name for the Input Field. Note that this
name must be compatible with standard Fortran naming
conventions (i.e. it must begin with a non-numeric character,
do not include spaces, etc.).
Caption: Enter text to describe the Input Field. What is
entered here will be displayed in the Category page directly
to the left of the Input Field box.
Width: Select the character width of the Input Field box
itself (i.e. white box).
Data Type: Select Integer or Real. This input denes the
type of input variable and is based on the standard Fortran
INTEGER or REAL declarations.
Default: Use this eld to add a value, which will show up as
the default value in the Input Field box. Assume that a user
who is not familiar with this component might simply accept
your default value for lack of a better value. So, do your best
to enter an appropriate value.
Units: Add a unit (if any) to represent the Target Unit related
to this Field. See Unit System in Chapter 5 for more details.
Min / Max: Enter the maximum and minimum value
limits. If you are unsure of what these limits should be, or
limits are not required, simply enter -1e-038 and 1e+038
respectively. If a user enters a value outside this range,
PSCAD will provide a warning in the Output Window.
Enabled When: Enter a conditional statement to determine
under what input conditions the Input Field is to be
PSCAD Users Guide
391
392
PSCAD
EXAMPLE 9-2:
A user needs to use an instantaneous measured voltage, from a
remote location in the system, as feedback to a user-defined source
component. The first step is to ensure that the measured voltage
signal is actually defined somewhere in the system. That is, it is being generated by a Voltmeter component similar to that shown below:
The second step is to define an Input Field that will accept the
measured signal Va as input: In the Parameters section of the
Component Definition, add a new Input Field on an existing category
page. Change the properties of the Input Field as follows:
The Allow Variables option should remain de-selected if the particular Input Field is intended to be a constant value only.
Choice Box
Choice Boxes are used to allow the user to set conditions according
to a selected choice. Choice Boxes can be included in a category
PSCAD Users Guide
393
Left click the New Choice Box (Radio Style) or the New Choice
Box (Drop Style) buttons - a new Drop List or set of Radio Buttons
should appear within the Category page. Another method is to use
the right-click menu: Move the mouse pointer over a blank area of
the Category page. Right-click and select New Control | Choice
Box (Radio Style) or New Control | Choice Box (Drop Style).
The new Choice Box should appear somewhere within the Category
page.
Moving and Resizing Choice Boxes
To move the new Choice Box, left-click over top of the field to select
it (Grips appear).
PSCAD
2. Use the arrow keys on your keyboard. Press and hold an
arrow key to move the box in large increments. Tap the
arrow key to move the box in small increments.
To resize the new Choice Box, left-click over top of the field to select
it (Grips appear). Select a Grip, hold down the left button and move
in an outwards direction.
Changing Choice Box Properties
Choice Box properties can be adjusted through the Choice Box
Properties dialog window. To change the Choice Box properties,
right-click over the Choice Box and select Properties....
Symbol: Enter a name for the Choice Box. Note that this
name must be compatible with standard Fortran naming
conventions (i.e. it must begin with a non-numeric character,
do not include spaces, etc.).
Caption: Enter text to describe the Choice Box. What is
entered here will be displayed in the Category page directly
to the left of the Choice Box.
Width: Select the character width of the Choice Box drop
list itself (i.e. white box /w arrow).
Choices: Congure the choice list as described in Adding
Choices to a Choice Box below.
395
Options:
396
PSCAD
To add more choices to the list, click the Dup button.
Note that when adding choices to the Choice Box, the most important thing to remember is that a unique number must be assigned to
each entry in the choice list. This is accomplished by simply adding
a prefix to each entry in the form of:
<Assigned Number>=
It is this assigned number that will be associated with the Symbol
name of this Choice Box.
397
Space Evenly
A dialog will appear asking to enter the width in pixels for all fields:
398
PSCAD
Space Evenly
This function spaces all fields in a Category evenly in the vertical
direction. First define all Fields within the Category (see Text Field,
Input Field, and/or Choice Box). Press the Space Evenly button on
the Parameters toolbar:
Find Symbol
The Parameters section includes a search feature for finding parameter Symbol Names in all Category pages that exist. To invoke this
feature, the most straightforward method is to use the Parameters
Bar.
399
Enter the Symbol Name of the Text Field, Input Field, or Choice Box
you are looking for (do not enter the Caption or any other text) and
click OK. If the Symbol Name exists in any of the Category pages,
you will be automatically brought to that Category, and the corresponding field will appear selected (i.e. with Grips).
Saving and Reloading Parameters
Any changes made in the Parameters section should be saved
regularly. To save changes, simply exit the component definition (i.e.
go back to the Circuit window). To do this:
1. Either left double-click the project name in the Workspace
window, or click the Return to Circuit View button in the
Parameters Bar:
400
PSCAD
If desired, you can at any time reload the graphics from the time at
which they were last saved, by pressing the Reload Dialog button.
401
EXAMPLE 9-3:
A component designer wants to change the appearance of a component according to user-selected input. The component graphic is to
be either an ellipse or a rectangle, depending on a Choice Box with
Symbol Name Type. The Choice Box specifies two choices: Ellipse,
which is given the value 0, and Rectangle, which is given the value
1.
In the component Parameters section, the designer adds a single
Choice Box:
In the component Graphic section, the designer draws a simple ellipse and a simple rectangle:
402
PSCAD
In the properties dialog for the Graphic Objects, the following conditional statements are added to the respective Visibility Condition
input fields:
Now, if a user selects Ellipse in the Choice Box, only the ellipse will
appear in the component graphic. If Rectangle is chosen, only the
rectangle will appear.
403
Layers
As component graphics become larger and more complicated, the
graphical working environment can become quite unruly - especially
when many conditional statements are used.
Fortunately, there is a way to avoid the potential clutter by utilizing
the graphical Layers available in the Graphic section. Layers are
based solely on conditional statements, in that whenever a conditional statement is entered into an object or field, a new layer is
created. Any other Graphic Object, which utilizes an identical conditional statement, will also be included in that particular Layer.
NOTE: Be sure when adding conditional
statements that the statements themselves
are identical in format, as well as logical
truth. If the statements vary slightly in
format, a separate layer will be created,
even though the statements may indicate the
same thing.
Viewing Layers
By default, only the layers visible on the graphic of a particular
component instance will be initially visible in the Graphic window
when the Design Editor is invoked (i.e. the component definition is
edited). Although a component definition may have several instances, only the layers present on the instance used to access the
definition will be visible by default.
404
PSCAD
To adjust the layer visibility, move the mouse pointer over a blank
area of the Graphic window. Right-click and select Layers. The
resulting sub-menu will list all of the available layers (or conditional
statements) that currently exist in the component graphics.
Simply select or de-select each layer to make visible or invisible respectively. You can also select Show All to make all layers
visible. There is also a button on the Graphic Palette, which will
allow you to toggle between showing and hiding all Layers called
Show/Hide All Layers.
Setting Layers
Instead of turning layers on and off through the right-click menu
(which can become cumbersome as the number of layers increases),
you can set and test the visible layers by using the Set Layers
feature. This feature provides a fully functional preview of the parameter dialogs as they would be seen by a user. Simply set all the
Choice Boxes to the desired settings and click the OK button - the
graphical layers pertaining to that setting will become visible in the
Graphic window.
To set the layers graphically, the most straightforward method is to
use the Graphic Palette.
405
Left click the Set Layers button. Another method is to use the rightclick menu: Move the mouse pointer over a blank area (white part)
of the Graphic window. Right-click and select Set Layers.
Graphic Filters
In addition to the Layers, you can also use the Graphic Filter function to help alleviate graphical clutter. Graphic Filters allow the user
to view objects based on the Graphic Object type (i.e. Connections,
Text Labels, etc.).
To adjust the Graphic Filters, the most straightforward method is to
use the Graphic Filter Bar.
406
PSCAD
Another method is to use the right-click menu: Move the mouse
pointer over a blank area (white part) of the Graphic window. Rightclick and select Graphic Filters.
407
Simply left-click the Segment Manager button on the toolbar. Another method is to use the right-click menu: Move the mouse pointer
over a blank area of the Segment page. Right-click and select
Segment Manager.
408
PSCAD
The left-side lists the available Segments, while the right-side lists
the Segments already in the component definition. To add or remove
Segments to or from the definition, simply select the Add-> or <Remove buttons. Once satisfied with the selection, click the Apply
button. If you chose to remove any existing Segments, a dialog will
appear asking you to confirm the removal. Press the Cancel button
to cancel the operation.
NOTE: Deleted Segments will be lost if
removed, as removal cannot be undone!
Viewing Segments
As mentioned above, categories are organized similar to pages in a
book. Once you have added more than one Segment, there may be
a need to navigate through them. The most straightforward method
is to use the Script Bar.
Left click the down arrow on the View Segment drop list.
Segment Types
There are several Segment types available, each existing for a
specific purpose, but only required if that specific function is needed
as part of the component design. Most of the time, a component will
only need to make use of two or three of these Segments.
Although this section does provide an assortment of simple examples, there is a huge wealth of examples in the PSCAD Master
Library itself. Simply edit any Master Library definition (right-click on
the component and select Edit Definition...) to study its contents.
Computations
The Computations Segment is an environment provided for the preprocessing of component input data. Although component parameter input may be in the most convenient form for the user, it may
not be so convenient for the component code itself. For example,
the component routine may require the system frequency in radians
per second, but the input data field may ask the user for the same
quantity in Hertz.
PSCAD Users Guide
409
A typical Computations Segment entry must have the following standard format:
<DataType> <Name> = <Expression>
Where,
EXAMPLE 9-4:
A designer wants to convert an input parameter with Symbol Name
Vset in kV, to a per-unit value called SetPU, before it is used in
component Fortran code. An additional input parameter with Symbol
Name Vbase in kV has also been defined for the system voltage
base.
410
PSCAD
In the above example, the designer has defined a new REAL constant entitled SetPU. This constant may now be used in any other
Segment in the Script section, both in equations and/or in logical
expressions.
Branch
The Branch Segment is an environment provided for the input of
electric branch information (if it exists), for insertion into the EMTDC
Electric Network Conductance Matrix: It is essentially an input
portal for control of the EMTDC Equivalent Conductance (GEQ)
Interface. Branch design is accomplished by specifying the type and
size of passive elements (i.e. lumped R, L and/or C), and to which
electrical Connections they fall between.
411
Where,
EXAMPLE 9-5:
A designer wants to define a component, which represents an RC
series branch, connected in parallel with a purely inductive branch,
between electrical Connections (nodes) N1 and N2. These two
Connections have already been defined in the Graphic section of the
Component Definition.
412
PSCAD
$N2
$N2
$R
0.0
0.0
0.001
$C
0.0
413
$N2
$N2
$R
0.0
0.0
0.001
$C
0.0
The branch may also contain an inherent ideal source in series with
the passive elements. The Branch Segment syntax allows you to indicate to PSCAD that there is a voltage source in a particular branch
as follows:
[<Branchname> = ] $<TO> $<FROM> SOURCE [$]<R> [$][<L>] [$][<C>]
Now that PSCAD knows that there is a source in this branch, control
of the source (i.e. magnitude, etc.) is then up to the user. One way
this can be accomplished is by defining the EMTDC Internal Variable
EBR every time step, directly in the model code itself.
NOTE: For more examples on this, edit the
definition of the Voltage Source Model 2 in
the PSCAD Master Library.
EXAMPLE 9-6:
A designer adds a resistive branch containing an ideal voltage
source to the component in EXAMPLE 9-5, which is to be connected
between node N1 and a ground electrical Connection GND. The
source possesses a source resistance RS, which can be entered as
an input parameter.
The Branch Segment could then contain something similar to the
following:
BRNS = $GND $N1
BRN1 = $N1 $N2
BRN2 = $N1 $N2
414
SOURCE
$RS
$R
0.0
0.0
0.0
0.001
0.0
$C
0.0
PSCAD
These statements are a schematic equivalent to:
Fortran
The Fortran Segment is where any Fortran code, defining what the
component is to model, is placed. Code entered in this Segment
should either be in the form of standard formatted Fortran 77, or
PSCAD Script (or a combination of these two). Fortran 90 format is
not recommended here, as some incompatibility problems can occur
during compilation (line breaks for example). It is also possible to
define a function, or call an external subroutine from this Segment.
Although Fortran Segment code should be in Fortran 77 format,
PSCAD will convert it to a form that is compatible with both Fortran
77 and 90 formats when the project is compiled. Code existing in
external source files (i.e. subroutines or functions) should be compatible with both Fortran 77 and Fortran 90 however. This will avoid
compatibility problems between the various Fortran compilers available for use with PSCAD. When using formatted Fortran in the
Fortran Segment, it is important to note that all lines of code should
be preceded by six spaces.
415
EXAMPLE 9-7:
The following code is a simple example of how standard Fortran
would appear in the Fortran Segment. This code defines an instantaneous voltage source magnitude VT, according to the value of an
input parameter Type. If Type = 0, then the magnitude is calculated
using the standard equation for a sinusoidal source with phase shift:
416
PSCAD
! Calculation of an AC or DC voltage source magnitude
!
#IF $Type == 0
!
! AC source
!
$VT = $VPEAK*SIN( TWO_PI*$FREQ*TIME + $PHI )
#ELSE
!
! DC source
!
$VT = $VDC
#ENDIF
There are pros and cons to adding standard Fortran code directly
into the Fortran Segment, as opposed to calling a subroutine or function. Here are some key points to consider:
417
418
PSCAD
EXAMPLE 9-8:
A designers component contains an input for frequency with Symbol
Name F. The designer wants to ensure that only a value greater
than zero is entered.
The Checks Segment should then contain the following:
ERROR System frequency must be greater than zero : F > 0.0
Help
The Help Segment is useful when the user wants to provide an external HTML based help file for a particular component. For example
if the user has created an HTML document entitled help.html for a
particular component, then all that is required is that the name and
extension be added to the Help Segment as shown below:
help.html
Then, when a user right-clicks on the component in the Circuit window and selects Help from the pop-up menu, the external document
indicated will open.
In order to reduce confusion when linking components to help
documents, the path to the Library Project (*.psl) file in which
the Component Definition is located, will be appended to the
filename. Therefore, the external help file must always be located
in the same directory as the parent Library Project.
Comments
Add your comments / reminders / notes about the design of this component here. Do not use this Segment as a means of providing help
PSCAD Users Guide
419
EXAMPLE 9-9:
A designer wants to add FlyBy help to the component below:
420
PSCAD
Transformers
The Transformers Segment is used both to define data for any existing mutual impedance matrices, as well as to provide dimensioning information to EMTDC regarding transformers and windings. A
single component may contain multiple mutual impedance matrices.
The user must include transformer information in three main parts:
421
<Prefix> is not mandatory, but is required to indicate an ideal transformer matrix (i.e. already inverted). Also, resistance values (i.e.
<R_xx> are not required if the transformer is ideal.
Note that only the diagonal and the data below the diagonal need to
be entered. The matrix is assumed to be symmetrical.
EXAMPLE 9-10:
A user wants to create a non-ideal single-phase, two-winding
transformer. The component Graphics, Parameters and other Script
Segments, has already been included. The component electrical
Connections have been set-up as shown below in the Graphic section.
422
PSCAD
The Transformers Segment should then appear similar to the following:
#TRANSFORMERS 1
!
2 /
$A1 $B1
$R11 $L11 /
$A2 $B2
$R12 $L12 $R22 $L22 /
!
EXAMPLE 9-11:
In the example above, the user wants to modify the component, so
that it contains two identical single-phase transformers within it. The
component electrical Connections have been set up, as shown below in the Graphic section.
423
Model-Data
The Model-Data Segment is used as a way to bring input data into a
user-defined subroutine, without having to declare an argument for
each bit of data. There is no specific format for text in this Segment,
as this format depends on READ statement within the users code.
When the project is compiled, PSCAD will include all text within
this Segment in the corresponding Data File, under the headings
DATADSD or DATADSO. If the subroutine is called from DSDYN,
the Model-Data contents will appear in the DATADSD section, and
DATADSO otherwise.
In order to read this information, a standard Fortran READ statement
must be added to the user-defined subroutine as follows:
!
!
!
!
!
!
...
INCLUDE fnames.h
READ(IUNIT,*) ...
Matrix-Fill
When a Project is initially compiled, PSCAD will construct a temporary logical matrix for the purpose of indicating how the electrical system is connected (i.e. how nodes and branches are put
together). The Optimize Node Ordering algorithm in PSCAD then
424
PSCAD
uses this information to optimize node placement in the actual system conductance matrix. However, only electrical nodes and branches, defined within the Branch Segments of each component present
in the system, are considered.
Any internal node connections defined in Segments other than
Branch will not be included in this matrix. Therefore, the logical matrix may have missing information, thereby reducing the effectiveness
of the Optimize Node Ordering algorithm. The Matrix-Fill Segment
can be used to help this algorithm by providing the omitted connection information for any internal component nodes.
The general format for a Matrix-Fill Segment statement would appear
as follows:
<Node_1> <Node_2> <Node_3> <Node_4> ...
Where <Node_#> is the Symbol Name of the Connection involved
with Matrix-Fill. All Connections in a single statement are assumed
as connected to each other.
EXAMPLE 9-12:
A user creates a single-phase electrical circuit in PSCAD, which
includes a classical transformer component connected as follows:
As can be seen above, there are six electrical nodes in this system,
and therefore the system matrix will have dimension 6 x 6. Internal
connections internal to the transformer component cannot be determined initially by PSCAD, and so when a logical matrix for the
Optimize Node Ordering algorithm is created, the transformer appears as a black box as shown below:
425
The logical matrix for the Optimize Node Ordering algorithm would
appear as follows, where X indicates a known connection:
The matrix above does not contain all of the connection information
required, however. We know through the Transformers Segment
in the transformer component, that nodes N2, N3, N5 and N6 are
all part of a mutual impedance matrix and are hence all connected
together as shown below:
By adding in Matrix-Fill information, we can tell PSCAD to add connection information to the matrix so it will appear as follows, where
+ indicates a connection added by Matrix-Fill:
426
PSCAD
If the four electrical Connections on the transformer were given as
follows in the Graphic section of the Component Definition,
427
Syntax Colouring
In order to make Script section code easier to understand, syntax colouring is used similar to code viewed in popular developer software
programs. Most PSCAD Script commands will appear in blue, while
all commented code will appear in green, for example:
428
PSCAD
#LOCAL INTEGER M_ACTV
#IF IcTyp==1
#LOCAL REAL RVD1_1
#LOCAL REAL RVD1_2
CALL E_CPFSYNC($P0Z,$Q0Z,$VT,$Pheta,$Vbase,RVD1_1,RVD1_2)
#ENDIF
! Synchronous machine model
STORI(NSTORI) = NINT(STOR(NEXC+294))
EXAMPLE 9-13:
A user wants to measure the current in a branch called BRN. A Text
Field has been added to the component Parameters section with
Symbol Name Ia.
The following should then appear in the Fortran segment:
PSCAD Users Guide
429
VDC
VDC is a special substitution operator that will take the voltage difference between two different electrical nodes. A special syntax is used
for this - see the example below:
EXAMPLE 9-14:
A user wants to measure the voltage difference between two
Connections defined within a user component, called N1 and N2.
A Text Field has been added to the component Parameters section
with Symbol Name Vdiff.
The following should then appear in the Fortran Segment:
#OUTPUT REAL Vdiff {$VDC:N1:N2}
Note that N1 and N2 are not preceded by a $ Prefix Operator.
PSCAD
2. Add a File Reference component: Right-click over a blank
area of your project page in Circuit view and select Add
Component | File Reference. Open the File Reference and
select the source le.
INTERFACING TO C CODE
In PSCAD, you may interface to C language source code in the form
of a subroutine or function. As C code cannot be used directly within
component definition Fortran, DSDYN or DSOUT Segments, it must
be provided in the form of an external source (*.c) file or object file.
There are subtle differences between how C source code is handled
between the EGCS/GNU Fortran 77 compiler and the Fortran 90
compilers compatible with PSCAD. The method for each is described in the following sections.
NOTE: Before running the case, the user
must ensure that the *.c (and *.f) file(s) be
referenced in the Additional Source Files
input field. Alternatively, object files (*.obj)
or a library file (*.lib) (made from the source
files) should be referenced in the Additional
Library (*.lib) and Object (*.obj) Files input
field.
431
EXAMPLE 9-15:
A user has written the following simple subroutine in C, and wants to
call this source code from a user-defined component:
/* User C Source Code */
void test_csub__(int* arg, int* res)
{
*res = 6*(*arg);
}
A standard call statement can be made from within the Fortran,
DSDYN or DSOUT segments of the component definition.
CALL TEST_CSUB($IN,$OUT)
Where $IN and $OUT are input and output Connections on the component respectively.
EXAMPLE 9-16:
A user has written the following simple function in C, and wants to
use this source code in a user-defined component:
/* User C Source Code */
int test_cfun__(int *arg)
{
return 2*(*arg);
}
The function must be declared before it is used within the
component. Then, the function is used as it normally would in
Fortran in the Fortran, DSDYN or DSOUT segments of the component definition.
432
PSCAD
#FUNCTION INTEGER TEST_CFUN
$OUT = TEST_CFUN($IN)
Where $IN and $OUT are input and output Connections on the component respectively.
EXAMPLE 9-17:
A user has written the following simple subroutine in C, placed it into
a C file (*.c).
/* User C Source Code */
void test_csub(int* arg, int* res)
{
*res = 6*(*arg);
}
The user then defines an interface subroutine in a Fortran (*.f)
source file as follows:
433
!
! Fortran 90 interface to a C procedure
!
INTERFACE
SUBROUTINE TEST_CSUB (in, out)
!DEC$ ATTRIBUTES C :: TEST_CSUB
!DEC$ ATTRIBUTES REFERENCE :: in
!DEC$ ATTRIBUTES REFERENCE :: out
!
! in, out are passed by REFERENCE
!
INTEGER in, out
END SUBROUTINE
END INTERFACE
!
! Call the C procedure
!
CALL TEST_CSUB(in, out)
END
A standard call statement is then added to the Fortran segment of
the user component definition:
CALL AUX_CSUB($IN,$OUT)
Where $IN and $OUT are input and output Connections on the component respectively.
434
PSCAD
See The Graphic Section in this chapter for more details on drawing
objects available.
NOTE: Make sure the graphics are of a reasonable size in relation to other components
in the Master Library.
435
436
PSCAD
Add a Choice Box to the Category with the Caption Is This Source
Grounded?. Give it an appropriate Symbol Name (say gnd) and
then add two Choices: 1=Yes and 0=No. Decide on whether to
use Radio Buttons or a Drop List format.
437
Modified Component
Graphics
In the Visible When field of all the newly added Lines, add
Conditional Statements so that they will become Visible/Invisible
according to the setting specified in the Is This Source Grounded?
438
PSCAD
Choice Box. That is, when Is This Source Grounded? is set to Yes,
the ground symbol graphics above should be visible.
439
In the Computations Segment text window, add lines of Script to convert your Voltage Magnitude (RMS) (Vrms) input from RMS to peak
kV and to convert your Frequency (f) input from Hz to peak radians
per second. Your Computations Segment should appear similar to
the following:
PSCAD
depending on the condition of the Is this source grounded? Choice
Box. Your Branch Segment should then look similar to the following:
441
PSCAD
that you must use negative logic in this section, and so this statement should appear as follows:
443
444
PSCAD
445
Any Text Field with a Symbol Name identical to those defined above
(i.e. Isource and Vsource), will act as Internal Output Variable
ports for the component. Any variable name entered into either
the Source Current or Source Terminal Voltage Text Fields in the
Parameters section will create signals which, when connected to an
Output Channel, can be plotted.
Save your component changes by Returning to Circuit View. Save
the Project.
Running Your Component
Keeping the test circuit used in the Testing Your New Component
section, remove the ammeter and voltmeter from the circuit. Replace
these two signals by entering Vs and Is into the Internal Output
Variable Text Fields that were created in the component Category
page.
Run the case again. You should see identical results as before in
Testing Your New Component.
446
PSCAD
Chapter 10:
PSCAD Script
PSCAD Script was originally introduced back in PSCAD V2, primarily
to provide a more flexible, compiler independent work environment
for the programming of custom components. It is recommended that
Script be used whenever possible to ensure that component definitions are not effected by the compiler.
Script is given the highest priority by the PSCAD pre-compiler. That
is, Script is considered first before all other code, and is hence used
by the pre-compiler for expression evaluation, substitutions and
to generate formatted Fortran code for the Fortran File or Electric
Network Data for the Data File. By using the available Script
Directives, Script Operators, and other features available, the appearance, structure and functionality of a component can be manipulated before the greater project compilation is performed.
This chapter is closely linked with Chapter 9 - Designing
Components. It is recommended that you read both topics before
attempting to design your own component. The following sections
describe the available PSCAD Script functions, and provide examples on how each can be used.
NOTE: If the need arises, subroutines or
functions (written in Fortran or C) can be
called directly, using standard Fortran call
statements. Any standard Fortran code entered directly must be preceded by six empty
spaces, according to formatted Fortran
standards. See the section entitled Fortran
Guidelines for EMTDC in the EMTDC
Manual for more details on coding rules.
SUBSTITUTIONS
Substitutions are a fundamental element of component design that
can appear in all parts of a Component Definition. Substitutions
provide a means to communicate information between Definition
sections, bring a dynamic aspect to component graphics, and help in
formatting code and Comments. The substitution operators available
in PSCAD are as listed below:
PSCAD Users Guide
447
448
PSCAD
Substituting Connection
Name into a Fortran
Statement
449
Description
Available Keys
<none>
Defn
Context is that of
the Definition of the
Component Instance.
Name, Desc,
Path
Project
Name, Desc,
Version, Author,
Path
Session
Name, Version
System
Name, Version,
User
450
PSCAD
This syntax is backwardly compatible with PSCAD version previous
to V4.2 and the simple un-delimited form is still the one that is used
in most cases (although both forms are now legal). The delimited
version has special properties in that it can be used to format identifiers or other fields where there is an alphanumeric post-fix. This is
a new capability and by design, if the character immediately following the $ operator is the same, then that character is copied directly
to the stream without processing. This allows for $ insertions, for
example, to insert a dollar-sign character, use $$.
Substituting Component Constants into Script
One form of possible substitution is that of pre-processed constants
into component Fortran code. Here, the actual numerical value of
the constant (i.e. Connection, Input Parameter or any variable defined in the Computations Segment) will be directly substituted upon
compilation by PSCAD. Substitutions may also be performed within
Commented Script, in case the user would like to display certain predefined values in the compiled Fortran files for the Project.
EXAMPLE 10-1:
A user component utilizes an external Fortran function, which requires an angle input argument in degrees to convert to radians. The
data input in this case is a Connection, defined in the Graphic
Section of the component definition, and has a Symbol Name
in. The function output out is defined as an output Connection in
the Graphic Section.
451
EXAMPLE 10-2:
A user-defined component definition called my_new_comp has
been programmed to display the contents of certain key Input Fields,
along with the definition name, within Comments provided in the
component Fortran segment, namely: Frequency with Symbol freq,
value 60.0 and units in Hz, and Voltage with Symbol volts, value
120.0 and units in kV. Note that both freq and volts are local variables and so the Local Context short form is used.
PSCAD
When the component is evaluated, the Symbol names (freq and
volts) are declared as variables internal to the component, and are
given the value entered in their respective fields. In this case, freq
= 60.0 and volts = 120.0. The user is now free to insert these variables elsewhere within the component code by using the $ Variable
Substitution Prefix Operator.
Something similar to the following comments could appear in either
the Fortran, DSDYN, or DSOUT segments:
This feature is excellent for ensuring the Project Fortran File code is
always properly commented.
NOTE: The value substituted is the value
in terms of the default unit specified in the
Input Field properties dialog. If the actual
entered value is entered in another unit,
then this value will be processed first, before
substitution takes place. See Unit System
in Chapter 5 for more details on units.
EXAMPLE 10-3:
A user has created a single-phase, two-winding transformer component and wishes to display both the primary and secondary winding voltage ratings directly on the component graphic. The primary
453
In the component Graphic Section, the user adds two new Text
Labels (positioned accordingly) and enters $Vprim and $Vsec
in the Text field of the two Text Label Properties dialogs as shown
below:
Component Graphic
454
PSCAD
The % operator may be used in Text Labels within the Graphic
Section, as well as within Commented code in the Fortran, DSDYN,
DSOUT, Branch, Model-Data, Matrix-Fill, Transformers, or T-Lines
segments of the Script Section.
% should only precede variable names defined as Input
Parameters. Bracket delimitors (i.e. %(...) ) may be used when postfix formatting is required.
Substituting Text into Commented Script
One form of substitution is that of text into component Fortran
Comments. Unlike the $ Value Substitution Prefix Operator, the entire, unprocessed contents of an input parameter (including the units)
will be directly substituted upon component evaluation.
EXAMPLE 10-4:
Consider Example 10-2 above, but replace the $ Value Substitution
Prefix Operator with the % Data Substitution Prefix Operator. The
following comments could then appear in either the Fortran, DSDYN
or DSOUT segments:
EXAMPLE 10-5:
Consider Example 10-4 above, but replace the $ operator with the
% Data Substitution Prefix Operator in the new Text Labels. When
PSCAD Users Guide
455
{ } Braces
Braces can be used to perform mathematical, logical and formatting
operations before other Script is considered by the compiler. Braces
can appear all over the component Definition. There are two main
forms in which Braces may be used: Anonymous Expression
Substitution and Block Processing. The Brace syntax is as follows:
[$]{<Expression>}
Where:
456
PSCAD
Anonymous Expression Substitution
EXAMPLE 10-6:
The following example shows how expression braces can be used
within Text Labels to perform a mathematical operation on substituted values from the $ Variable Substitution Prefix Operator. Say
that two input variables are entered as A1 = 2.0 and A2 = 3.0. The
user wants to display a value based on these values directly on the
component graphic as follows:
Text Label = A1*A2 = 6.0
The following could then be entered into the Text Label Properties
dialog:
Block Processing
EXAMPLE 10-7:
A user has modified the Fortran function PH_CON in Example 10-1
to include phase angle conversion in both directions (i.e. degrees to
radians and radians to degrees). In the component Parameters section, a Choice Box with Symbol Ptype is designed with two options
as shown below:
457
! Comment Indicator
The exclamation point ! is used throughout the component definition
segments to indicate that a particular line of code is a comment. All
458
PSCAD
lines of script, which is preceded by !, will be written as standard
Fortran comments in the project Fortran or Data Files.
NOTE: Commented code that is written
to the data file, requires that the Comment
Indicator be in the first column from the left.
EXAMPLE 10-8:
Comments should be used to describe the users code, as well as to
provide spacers and section breaks in order to enhance the readability of the users code. The ! comment indicator may be used everywhere except the Branch segment.
The following example illustrates the use of comments in the Fortran
or DSDYN segments in a user component definition:
! MY FIRST PSCAD SCRIPT
! --------------------!
! Storage:
!
#STORAGE REAL:1
!
! Main body of script:
!
NOTE: See the #STORAGE Directive for
more details.
SCRIPT DIRECTIVES
Script directives are used to facilitate the creation of Fortran
code. Each directive type has a specific purpose, as explained in the
following sections. Script directives always begin with a pound #
symbol prefix. Spaces before and after the # symbol are allowed for
flexibility in code structure.
459
EXAMPLE 10-9:
A users custom component code specifies that 10 REAL, 4
INTEGER and 1 LOGICAL variable are to be stored each time
step. The user wants to ensure that storage is dynamically allocated
by PSCAD.
The storage statement should appear as follows, in either the
Fortran, DSDYN or DSOUT segments:
#STORAGE REAL:10 INTEGER:4 LOGICAL:1
The actual #STORAGE statement can appear anywhere in script, but
should be placed near the top.
460
PSCAD
All three variable types above do not need to appear in the
#STORAGE statement if they are not needed. For example, if only
REAL variables need to be stored, only the REAL type needs to be
specified.
#LOCAL
This directive is used to define any local variables that are not classified as pre-defined. That is, any variables introduced within the code
that do not require the pre-defined variable prefix $.
The #LOCAL directive is used only in the Fortran, DSDYN or DSOUT
segments, and should appear as follows:
#LOCAL <TYPE> <Name> <Array_Size>
<TYPE> can be either REAL, INTEGER, or LOGICAL. <Name> is
the given name for the local variable. <Array_Size> is an optional
integer that defines the size of the array. If the variable has only a
single dimension, then leave <Array_Size> blank.
NOTE: Care should be exercised when
using #LOCAL. Make sure to give your variable a unique name, so as to avoid the same
name being used in different variable types.
EXAMPLE 10-10:
A users custom component requires two local variables for use as
subroutine arguments. According to a conditional statement based
on a pre-defined variable A, a local INTEGER variable MY_X and a
local REAL array Error are defined before the subroutine is called.
The local variable definitions should then appear as follows in the
Fortran, DSDYN or DSOUT segments:
461
#FUNCTION
This directive is used to declare the existence of a function, and the
argument type it returns. #FUNCTION is mandatory if a function is
called within the component definition.
The #FUNCTION directive is used only in the Fortran, DSDYN or
DSOUT segments, and should appear as follows:
#FUNCTION <TYPE> <Name> <Description>
<TYPE> can be either REAL, INTEGER, or LOGICAL. <Name> is
the given name of the function. <Description> will be included as a
comment line near the beginning of the EMTDC Fortran File.
EXAMPLE 10-11:
The Hard Limiter component in the PSCAD Master Library utilizes a
REAL function called LIMIT to determine the output signal to be sent
to an external connection O, according to pre-defined inputs LL,
UL, and I.
462
PSCAD
The following code appears in the Fortran segment of the Hard
Limiter component definition:
#FUNCTION REAL LIMIT Hard Limiter
!
$O = LIMIT($LL, $UL, $I)
!
#SUBROUTINE
This directive is used to provide a description for a subroutine that is
being called from the component. #SUBROUTINE is used simply for
cosmetic purposes, and is not mandatory (although its use is recommended anyway).
The #SUBROUTINE directive is used only in the Fortran, DSDYN or
DSOUT segments, and should appear as follows:
#SUBROUTINE <Name> <Description>
<Name> is the given name for the subroutine. <Description> will
be included as a comment line near the beginning of the EMTDC
Fortran File.
EXAMPLE 10-12:
A user includes a call to a subroutine, named SUB1, within the component code. It is suggested that a description be added for clarity.
The following code should appear in the Fortran, DSDYN or DSOUT
segment of the component:
#SUBROUTINE SUB1 User Subroutine
!
CALL SUB1($X, $Y, $Z)
!
Where X, Y and Z are pre-defined variables.
463
EXAMPLE 10-13:
The manner in which the value of the named output variable may be
defined, can appear in many different ways. The following list shows
some of the possibilities:
! Defines a REAL variable freq and substitutes
! the value of a pre-defined variable Fout.
!
#OUTPUT REAL freq {$Fout}
!
! Defines an INTEGER variable Xon and assigns
! it the value of a storage location.
!
#OUTPUT INTEGER Xon {STORI(NSTORI+1)}
!
! Defines a REAL variable POut and assigns
! it the value of a given mathematical
! expression.
!
#OUTPUT REAL POut {$V*$I}
!
464
PSCAD
#TRANSFORMERS
This directive should be included whenever mutually coupled coils
are to be represented in a model. Examples of Master Library models that use this directive are (of course) the transformers and the PI
Section components.
#TRANSFORMERS has two primary purposes:
1. Provides a method to sequentially number all models that
contain mutually coupled coils for the purpose of dynamic
dimensioning (when using a Fortran 90 compiler).
2. The same number provides addressing information
for the monitoring of mutually coupled winding
currents. Transformer winding currents are measured using
the EMTDC CDCTR(M,N) matrix. CDCTR(M,N) is the
current through the Mth winding of the Nth transformer.
The #TRANSFORMERS directive is used only in the Transformers
segment, and should appear as follows:
#TRANSFORMERS <Number>
<Number> indicates the total number of transformers within the
component.
NOTE: Assigning #TRANSFORMERS
correctly is important even if you are not
using the dynamic version of EMTDC, as the
information for monitoring winding currents is
still needed.
EXAMPLE 10-14:
The 3-Phase, 2-Winding classical transformer component, located
in the Transformers section of the Master Library, consists of three,
1-Phase transformers.
The directive would appear as follows in the Transformers segment:
465
#WINDINGS
This directive was first introduced in PSCAD V4.0.2, in order to
remove a fixed limitation on the number of coupled coils in a transformer, which was previously set to 10.
#WINDINGS can be used to assign the number of coupled windings
in a transformer. PSCAD will look for the highest number associated
with all existing #WINDINGS directives and then assigns that number (as the maximum number of windings) to the Map (.map) file.
The #WINDINGS directive is used only in the Transformers segment,
and should appear as follows:
#WINDINGS <Number>
<Number> indicates the maximum number of coupled windings
within that specific component.
EXAMPLE 10-15:
The 3-Phase, 2-Winding classical transformer component, located
in the Transformers section of the Master Library, consists of three,
1-Phase transformers.
The directive would appear as follows in the Transformers segment:
#WINDINGS 2
466
PSCAD
These directives can be used to change the electrical configuration,
or act as standard Fortran IF-THEN-ELSE keywords in the EMTDC
System Dynamics (i.e. DSDYN and DSOUT). Similar to normal
script directives, #IF, #ELSEIF, #ELSE, #ENDIF directives always
begin with a # prefix.
#IF, #ELSEIF, #ELSE, #ENDIF directives can be used in all segments and should appear as follows:
#IF <Logic>
...Application_Code...
#ELSEIF <Logic>
#IF <Logic>
...Application_Code...
#ELSE
...Application_Code...
#ENDIF
#ELSE <Logic>
...Application_Code...
#ENDIF
If just a simple IF-THEN condition is required, the following shortcut
using expression braces may be used:
#IF <Logic> {<Expression>}
<Logic> is a logical expression using logical
operators. <Expression> can be a variable definition.
EXAMPLE 10-16:
A user needs to change the output of a signal generator model,
according to whether a sine or cosine output is required. The component definition provides an input parameter choice box in the
Parameters section, called Type. If this parameter is 1, then the
output is sinusoidal (if 0 then co-sinusoidal).
The following code should appear in the Fortran, DSDYN or DSOUT
segments of the component:
467
$OUT = SIN(TWO_PI*$F)}
$OUT = COS(TWO_PI*$F)}
EXAMPLE 10-17:
A user has created an electrical component that can either be a simple resistor, inductor or capacitor. The component definition provides
an input parameter choice box in the Parameters section, called
Type. This parameter can either be 1, 2 or 3 to represent a resistor,
inductor or capacitor respectively. Three other input text boxes also
exist (called R, L and C) in order to specify the respective values
of these elements.
The following code should appear in the Branch segment of the
component:
468
PSCAD
#IF Type == 1
$N1 $N2 $R 0.0 0.0
#ELSEIF Type==2
$N1 $N2 0.0 $L 0.0
#ELSE
$N1 $N2 0.0 0.0 $C
#ENDIF
where N1 an N2 are electrical Connections in the Graphic section.
Using Expression Braces, the above example could also be written
as:
!
#IF Type == 1 {$N1
#IF Type == 2 {$N1
#IF Type == 3 {$N1
!
$N2
$N2
$N2
$R
0.0
0.0
0.0
$L
0.0
0.0}
0.0}
$C}
469
EXAMPLE 10-18:
In Example 10-16, conditional statement directives were used in
order to determine the output of a signal generator model. As a
simple illustration of how line continuations can be used, the code in
Example 10-16 has been re-written below:
!
! Signal Generator
!
$OUT = ~
#IF Type==1
~SIN~
#ELSE
~COS~
#ENDIF
~(TWO_PI*$F)
!
If Type is 2, after conditional statement processing and line continuation, the PSCAD Script would appear as follows, before being
transformed into formatted Fortran:
!
! Signal Generator
!
$OUT = COS(TWO_PI*$F)
!
470
PSCAD
#CASE <Expression> {<Clause_0>} {<Clause_1>} ...
<Expression> must return an integer from 0 to n, and can either be a
mathematical expression or simply a defined variable. <Clause_n>
represents what is to occur given the value of the expression, and
where in the sequence of clauses it resides. For example, the
results of <Clause_0> will occur if <Expression> is equal to 0. If
<Expression> is equal to 1, <Clause_1> will occur, etc.
EXAMPLE 10-19:
Once again referring to Examples 10-16, a simple illustration of
how the #CASE directive can be used instead of the #IF, #ELSEIF,
#ELSE, #ENDIF directives.
!
! Signal Generator
!
$OUT = ~
#CASE Type {~COS~} {~SIN~}
~(TWO_PI*$F)
!
Note that Type can be either 0 or 1.
EXAMPLE 10-20:
The following illustrates how the #CASE directive is used in the
Transformers segment of the 3-Phase, 2-Winding classical transformer component, located in the Master Library.
Here, YD1 and Lead are both input parameters. YD1 can be
either 0 or 1 and Lead is either 1 or 2. Multiplying of these two integers can result in 0, 1 or 2, and this information is used to determine
which clause to select:
!
#CASE YD1*Lead {$A1 $G1~} {$A1 $B1~} {$A1 $C1~}
!
471
472
Function
Description
SIN(x)
Sine function
COS(x)
Cosine function
TAN(x)
Tangent function
ASIN(x)
ACOS(x)
ATAN(x)
SINH(x)
COSH(x)
TANH(x)
LOG(x)
Natural logarithm
EXP(x)
Exponential
LOG10(x)
Base 10 logarithm
SQRT(x)
Square root
ABS(x)
Absolute value
REAL(x)
IMAG(x)
NORM(x)
CEIL(x)
FLOOR(x)
PSCAD
ROUND(x)
INT(x)
FRAC(x)
RAND(x)
P2RX(m,)
P2RY(m,)
R2PM(x,y)
R2PA(x,y)
Arithmetic Operators
Listed below are the arithmetic operators available in PSCAD. These
operators are used to perform mathematical calculations primarily in
the Computations, Fortran, DSDYN and DSOUT segments.
Function
Description
Add
Subtract
Multiply
Divide
Remainder
**
Raise to power
Logical Operators
Listed below are the logical operators available in PSCAD. Logical
expressions are primarily used in conjunction with #IF, #ELSEIF,
#ELSE, #ENDIF Directives and the Ternary Operator. They are also
used in the Checks segment.
NOTE: Logical expressions will return a
value of 1 if true, and a value of 0 if false.
473
Description
==
Equal to
!=
Not equal to
<
Less than
>
Greater than
<=
>=
||
OR
&&
AND
EXAMPLE 10-21:
Logical Operators can appear in many different areas. The following
examples illustrate the various ways these operators can be used:
!
! ...with #IF, #ELSEIF, #ELSE, #ENDIF Directives
!
#IF F >= 60.0
Fout = 60.0
#ENDIF
!
! ...with a Ternary Operator in the Computations
!
segment
!
REAL L = X == 0.0 ? Y*2.0 : Y/3
!
! ...in the Checks segment
!
ERROR Value too small : R > 0.001
!
See the Ternary Operator below for more details
Ternary Operator
The ternary operator is yet another short form method offered in PSCAD Script for representing an IF-ELSE-ENDIF type
474
PSCAD
expression. It allows the user to define a variable, according to
certain conditions, in a single line.
The ternary operator is used only in the Computations segment, and
should appear as follows:
<Logic> ? <Value_if_True> : <Value_if_False>
<Logic> is a logical expression using logical operators. <Value_if_
True> and <Value_if_False> can either be a single constant, or a
mathematical expression.
NOTE: Care must be taken when designing
components with ternary operators: Ensure
that variables used within the ternary expression will not be disabled under otherwise
valid conditions. In other words, unrelated
logic may disable one or more of the variables used within the ternary expression,
which may render the ternary result invalid.
Input variables are enabled/disabled by
way of Conditional Statements, Layers and
Filters.
EXAMPLE 10-22:
A user wants to define a REAL variable X in the Computations
segment of a component definition. The value of X is to be equal to
1.0 if an input parameter N is 2 or 3, or defined by a mathematical
expression otherwise.
The following code should appear in the Computations segment of
the component definition:
REAL X = (N==2 || N==3) ? 1.0 : SQRT(2)*V
where V is a pre-defined constant.
475
476
PSCAD
Chapter 11:
COMPILING PROJECTS
PSCAD does not include a full time error messaging system, and
so in order to view any warnings or errors, you must first Compile
and Build your Project. As a matter of fact, it is always a good
idea to compile your project first, before actually running the
simulation. This is especially true for the first run.
See Compiling and Building a Project and/or Compiling an
Individual Module in Chapter 5 for more on this.
477
PSCAD
Signal <name> size mismatch at connection <con>
This error usually accompanies the previous error
message. <name> is the name of the signal, and <con> is the
name of the connection to which the signal is being input.
Array <Name> cannot be typecasted
This error is issued if PSCAD detects an array signal type
mismatch. For example, if a data signal array was defined as type
INTEGER and the user attempted to tap off a single element with
the Data Signal Array Tap component set to type REAL (or viceversa). Or, if an array of type REAL is input into a component, where
the external input Connection in question is defined as an INTEGER
array.
Invalid breakout connection to ground at <Node>. Node array
elements cannot be individually grounded.
This error is related to the use of the Breakout component: Ground
components cannot be directly connected to Breakout
terminals. The Breakout is designed specifically for mapping multiple connections on the scalar side to a single array. Since Ground
nodes cannot be mapped, the compiler will issue this warning. The
suggested work around is to use a Current Meter as a series element between the Breakout terminal and ground.
<Node> is the name of the Breakout reference node connected to
ground.
Short in breakout at <Node>. Node array elements must be
uniquely dened.
This error is related to the use of the Breakout component: The
nodes on the 3-phase side of this component are not actual electrical nodes, but references that will assume the node number to which
they are connected. This error is posted if these reference nodes
are shorted (i.e. electrically connected together). Each node on the
3-phase side of the Breakout component must be unique.
<Node> is the name of the Breakout connection which is shorted.
Branch imbalance between breakouts at <Node>. Node array
elements cannot be shared between signals.
This error is related to the use of the Breakout component: The
nodes on the 3-phase side of this component are not actual electrical nodes, but references that will assume the node number to which
they are connected. A special condition that cannot be referenced is
PSCAD Users Guide
479
FIND FEATURE
If the user wishes to search a project for a Data Label, Connection,
node number, etc., the Find feature in PSCAD can be used. To bring
up the Find dialog window, simply select Edit | Search... from the
Main Menu bar, press the Find button in the Main Toolbar or press
Ctrl + F on your keyboard, while in Circuit view. Any of the above
operations will open the Find dialog.
The various input parameters for this dialog are described below.
Find What
Enter the character string that you would like to search for. Be sure
to check the selection boxes at the bottom of the dialog to modify
your search options. If All Pages is selected, then Find will search
the entire project, as opposed to just the current page. If Whole
Word is selected, then Find will only look for the Find What string
as a whole word, as opposed to part of a word. If Match Case is
selected, then the search will be case sensitive.
Note that if you are performing a Node Number search, this input is
disabled.
Search
It is possible to narrow a search to just a certain type of object in the
project.
480
PSCAD
Each entry in the list will have a description including the location of
the object plus the object type. Simply left double-click on a particular list entry and PSCAD will automatically point to the source with an
arrow icon in Circuit view.
481
This will invoke a separate file viewer window, which will temporarily
replace the Design Editor window. This viewer has its own tab bar,
which allows you to switch between files quickly.
482
PSCAD
COMPONENT ORDERING
PSCAD V4 now includes a smart algorithm, which will automatically sequence (order) all components in the EMTDC System
Dynamics. This is done to ensure that variables are calculated in the
proper sequence, and that single time step delays are minimized.
The ordering method in PSCAD V3 was simple: The components
were ordered from left to right and from top to bottom of where they
appeared in the project page. In PSCAD V4, the algorithm iteratively
scans the entire project and then assigns sequence numbers to all
existing blocks. Input constants are moved to the top of the sequence, whereas outputs are moved to the bottom.
This function should be left on by default at all times, however there
may be instances where it is desirable to turn it off and manually
order the components during the debugging process. This may be
the case if you wish to manually control the feedback points. Alternatively, a feedback can be introduced by inserting a Feedback Loop
Selector component in the signal path.
NOTE: Component ordering functions are
performed by PSCAD on a per Module
basis. By default, the Assign Execution
Sequence Numbers Automatically
option is enabled in all new and existing
Modules. This option may be disabled by
the user in selected Modules, and yet still
maintain automatic ordering in others.
483
484
PSCAD
Enter the desired sequence number and click the OK button. Repeat
this process for the remaining components and modules.
485
Colour Legend:
PSCAD
dialog. Click the Views tab and select Show control signal flow on
wires.
NOTE: The indicators are orientated by
default according to the Wire component
direction (i.e. towards the End Point of the
Wire), not the actual control signal flow. If
a flow indicator appears reversed, simply
Reverse the Vertexes of the Wire. You must
compile the case first before you can view
the flow indicators.
To enable this feature, right-click on a blank part of the Module canvas and select Module Settings... to bring up the Module Settings
dialog. Select the Show Virtual Control Wires option. See Editing
Module Settings in Chapter 5 for more details on the other options in
this dialog.
NOTE: The dashed connections are
purely visual, that is you cannot use them
as physical connections for data sources or
sinks. You must compile the case first before
you can view the control wires.
487
PSCAD
Ensure that any user source files are referenced in the Additional
Source (.f) files field, as well. If you fail to do this, your source files
will not be included when the project is compiled, and you will not be
able to debug your code.
Linking to the Debugger
The following procedure outlines how to set-up an integrated debugging session for your case project. Note that the following steps are
described using the Compaq Visual Fortran 6 compiler. If you are
using Digital Fortran 5, the steps are very similar.
1. Ensure that the project settings described above in Project
Options to Preset are enabled. Run the simulation (press
the Run button in the Main Toolbar). A pop-up message
should appear as follows:
489
PSCAD
Once debugging is complete and the code is clean, make sure that
all debugging options outlined in the Project Options to Preset section are disabled. Failure to do so may affect simulation speed.
491
Step 2:
Right-click on the Library name in the Workspace and select Create
Compiled Library (*.lib):
492
PSCAD
493
PSCAD
Chapter 12:
MATLAB/Simulink
PSCAD provides users with the ability to interface and utilize the
functionality of MATLAB commands and toolboxes (including all
graphical commands) through a special interface. This is achieved
by calling a special subroutine from within a standard component in
PSCAD.
Components that interface to MATLAB/Simulink are not offered as
part of the Master Library, and must be specially developed for this
purpose. In other words, if a specific MATLAB/Simulink component
is required, the user must design his or her own to do the job. Once
designed however, this component will be treated as a normal component in PSCAD, and may be used interactively with other components in a particular project.
There are two important things to remember before attempting to
interface with MATLAB from PSCAD:
1. The MATLAB Interface is only compatible with the dynamic
version of EMTDC. That is, it will not function when using
the free EGCS/GNU Fortran 77 Compiler.
2. MATLAB must be installed on your computer in order to use
the MATLAB interface.
3. PSCAD can be interfaced with both MATLAB versions 5 and
6 library les.
495
Arguments
SUBROUTINE MLAB_INT(MPATH, MFILE, INPUTS, OUTPUTS)
Inputs
Argument
Type
MPATH
CHARACTER
MFILE
CHARACTER
INPUTS
CHARACTER
Description
Character string of MATLAB
*.m le path
Name of module within *.m
le (the .m extension should
not be added)
Format string for all input
variables.
Outputs
Argument
OUTPUTS
Type
CHARACTER
Description
Format string for all output
variables
PSCAD
is helpful in initializing the MATLAB environment and designing a
component that runs MATLAB *.m files and Simulink *.mdl files
simultaneously.
EXAMPLE 12-1:
A MATLAB module is called by [D] = TEST(A,B,C), where TEST
is a module in a MATLAB file TEST.m, that is located in C:\TEMP
MLAB_FILES. The input A is a REAL variable, B is a REAL array
of dimension 31 and C is an INTEGER. The output D is a REAL
array of dimension 10.
The MATLAB interface subroutine call would then appear as follows:
CALL MLAB_INT(C:\TEMP\MLAB_FILES, TEST, R R(31)
I, R(10))
EXAMPLE 12-2:
A MATLAB file entitled TEST.m is located in C:\TEMP\ MLAB_
FILES. It consists of MATLAB commands that may take a snapshot
of MATLAB results, or initialize the environment (such as setting
global variables or changing directory, etc.).
The MATLAB interface subroutine call would then appear as follows:
CALL MLAB_INT(C:\TEMP\MLAB_FILES, TEST, , )
497
Arguments
SUBROUTINE SIMULINK_INT(MPATH, MFILE INPUTS)
Inputs
Argument
Type
Description
MPATH
CHARACTER
MFILE
CHARACTER
INPUTS
CHARACTER
PSCAD
SIMULINK interface is automatically handled inside the subroutine
and is always put into the corresponding EMTDC STORF array.
EXAMPLE 12-3:
A Simulink module called TEST.mdl, has external inputs A, B and
C and is located in C:\TEMP\SIMULINK_FILES. The input A is a
REAL variable, B is a REAL array of dimension 31 and C is an
INTEGER.
The Simulink interface subroutine call would then appear as follows:
CALL SIMULINK_INT(C:\TEMP\SIMULINK_FILES, TEST, R
R(31) I)
499
EXAMPLE 12-4:
Consider a simple example for a PSCAD component, which has 2
REAL input connection nodes (A and B), and a single REAL output
connection node (C).
The following code should then appear in the Fortran segment of the
component definition:
#STORAGE REAL:3
STORF(NSTORF) = $A
STORF(NSTORF+1) = $B
!
CALL MLAB _ INT($Path, $Name, R R, R)
!
$C = STORF(NSTORF+2)
NSTORF = NSTORF + 3
!
The component definition will need to define at least two input fields
in a Parameters section category page. In this case for example,
$Path is a text field symbol name expecting the pathname to where
the *.m files are located. $Name is also a text field symbol name
expecting the name of the MATLAB module. For example, if the
MATLAB function is called TEST1, contained within a file called
TEST1.m, then the $Name parameter should then be entered as
TEST1.
PSCAD
of dimension 31 would appear as R(31), or an INTEGER array of
dimension 10 as I(10). Each variable should be separated by one
or more spaces, and the order of variables should be identical to the
order expected in the MATLAB function.
A good mechanism in Fortran to transfer array variables into or out of
the EMTDC STORF or STORI arrays is the DO/ENDDO loop.
EXAMPLE 12-5:
Here is an example illustrating a MATLAB component, which has a
single REAL input connection array of dimension 31, and a single
output connection of dimension 2.
The following code should then appear in the Fortran segment of the
component definition:
#STORAGE REAL:33
#LOCAL INTEGER I _ CNT
!
! First Input Array (REAL(31))
!
DO I _ CNT = 1,31,1
STORF(NSTORF+I _ CNT-1) = $INPUT(I _ CNT)
ENDDO
!
CALL MLAB _ INT($Path,$Name,R(31),R(2))
!
! First Output Array (REAL(2))
!
DO I _ CNT=1,2,1
$OUTPUT(I _ CNT) = STORF(NSTORF+31+I _ CNT-1)
ENDDO
!
! Increment STORF pointer
!
NSTORF = NSTORF + 33
!
Note that when the output variables are extracted from the STORF
array, the offset 31 must be added, as 31 input variables were alPSCAD Users Guide
501
EXAMPLE 12-6:
The figure below illustrates a MATLAB/Simulink component in
PSCAD. The input to the component is an array of four variables,
named TIME, Freq, Phase, and Mag. The output from the component is an array of six variables as labelled.
502
PSCAD
#IF $mName2 !=
CALL MLAB_INT($Path,$mName2, , )
#ENDIF
ENDIF
!
! TIME info to run either *.m or *.mdl module
!
#IF ($OPTSEC == 0 )
STORF(NSTORF) = TIME
STORF(NSTORF + 1) = DELT
M_CNT = 2
#ELSE
STORF(NSTORF) = TIME
M_CNT = 1
#ENDIF
!
! Transfer inputs to EMTDC STORF array
!
DO I _ CNT = 1, $#DIM(sig _ in)
STORF(NSTORF + M _ CNT + I _ CNT-1) = $sig _ in(I _ CNT)
END DO
M _ CNT = M _ CNT + I _ CNT - 1
!
! CALL PSCAD MATLAB INTERFACE
!
#IF $OPTSEC == 0
CALL MLAB _ INT($Path,$mfile,R(6),R($#DIM(sig _
out)))
#ELSE
CALL SIMULINK _ INT($Path,$simfile,R(5))
#ENDIF
!
! Transfer MATLAB output variables
!
I _ CNT = 1
DO WHILE (I _ CNT .LE. $#DIM(sig _ out))
$sig _ out(I _ CNT) = STORF(NSTORF + M _ CNT + I _ CNT
- 1)
I _ CNT = I _ CNT + 1
END DO
!
! Update storage array
!
NSTORF = NSTORF + M _ CNT + I _ CNT - 1
503
INTERFACING NOTES
The MATLAB engine performs operations very slowly, compared with
the same equivalent operation hard-coded directly into a PSCAD
component. The MATLAB source code is interpreted each time it is
called, allowing users to dynamically edit the *.m file in the middle of
a run and see its effect immediately. This inter-activity is also possible in PSCAD through the use of on-line sliders, switches, dials and
buttons. Any combination of the two methods can be used simultaneously.
Alternative Simulink Interface
There is an alternative way to invoke a Simulink module. Instead of
calling the SIMULINK_INT subroutine, users may call MLAB_INT
subroutine to invoke an *.m file, which uses the MATLAB command sim to handle the Simulink module. However, the use of
SIMULINK_INT is highly recommended due to the synchronization
mechanism between MATLAB and PSCAD implemented within this
subroutine. This is especially true for Simulink modules that run
longer than the time step defined inside EMTDC.
504
PSCAD
Simulation Speed
To try and speed up the MATLAB solution, it is often a good idea to
try and use a larger time step when invoking MATLAB components
(wherever possible or practical). An enable/disable switch can also
be implemented, so as to allow PSCAD to operate at close to full
speed.
EXAMPLE 12-7:
The figure below illustrates one way to speed up your PSCAD/
MATLAB simulation. Here, an impulse train is applied to an additional enable/disable input to control how often the MATLAB solution
engine is invoked.
The Impulse Train frequency can be varied for optimal speed/accuracy considerations.
Conversion to C
It should also be possible to convert *.m source code directly to C
code using the MATLAB C compiler, and then directly compile and
link the C source code into the EMTDC executable. This has not
been tested thoroughly, but no obvious technical reasons exist as to
why it should not. With this hard-compiled approach, you lose the
ability to edit the MATLAB *.m interpreted file during simulations.
The hard-compiled approach also may not work with any MATLAB
graphical functions.
A good compromise can be reached by first using MATLAB components to develop and test algorithms, but in the end to optimize the
speed of the final design by hard-coding the algorithms in Fortran or
C (either manually or using the MATLAB C compiler). The final hardPSCAD Users Guide
505
506
PSCAD
Chapter 13:
507
The following topics describe the procedures involved when importing PSCAD V2 circuits, components and associated files into PSCAD
V4.
User-Written EMTDC Source Code
Fortran source code written specifically for use with EMTDC in
PSCAD V2 must be filtered before it can be used in PSCAD V4. For
more information on importing user-written Fortran source code, see
Converting V2 Fortran Files.
Conversion Issues
The following sections describe a general overview and background
of some important conversion issues. Please review these sections
first before attempting to upgrade to PSCAD V4.
V2 Control Type Components
All control type components (i.e. components whose code appears
in the EMTDC System Dynamics only) should be upgradable. One
important fact to consider, however, is that using the EMTDC internal
variable for time step (i.e. DELT) in the Computations portion of a
component definition is no longer allowed in PSCAD V4.
V2 Electrical Interface Components
There have been many changes made to EMTDC since V2, mostly
associated with electrical signals and their interface to user-written components. It is possible that these types of components may
cause some compatibility problems when upgrading to V4. For
instance, electrical branches in EMTDC were originally referenced
using a branch TO and FROM node convention. This tended to
cause problems with parallel branches (as they have identical connection nodes), and resulted in numerous workarounds to avoid the
problem. One example was the output of the calculated current in
faults, breakers, thyristors, diodes, GTOs, arresters, etc. - all of these
had a single time step delay. This was because all parallel switching
branches were combined into a single branch for solution in the main
program. One side effect was that the current had to be output as an
argument of the DSDYN subroutine call, and could not be placed in
DSOUT.
508
PSCAD
In PSCAD V4, the above problem is circumvented, as each branch
is given a unique branch number and the current in each branch is
referenced directly in DSOUT. This system of referencing electrical
branches directly (by a branch number instead of by node numbers)
results in some obsolete function calls. These include all switching
routines, as well as any electrical interface array names.
V2 Component Libraries
Since V2, PSCAD has allowed users to create their own components to represent custom models. In V2, this was accomplished by
editing a text file, where graphical information, parameter form data,
and Data/Fortran output code were entered. Each component was
contained within its own file, which resided in either the users library
(~/PSCAD/xdraft_lib), or in a Group Library (only two libraries were
allowed).
Those who received a project from other users always experienced
difficulties in maintaining these components and great confusion (as
to what the most recent version of the component was) generally
resulted. If two or more components by the same name were kept,
then the PSCAD V2 Draft program would search first in the users
xdraft_lib directory, then in the Group directory (if one has been
specified), and then finally in the Master library. This allowed users
to overwrite the functionality of Master Library components, often
with confusing or inconsistent results.
In PSCAD V4, the Design Editor is used to graphically manipulate
custom components. Component definitions are stored within a
single library project file (*.psl), where any number of library projects
can be loaded in the Workspace simultaneously. Users who wish to
transfer custom components to other users need only to supply the
library project containing the components.
When PSCAD V4 loads a project, it knows not only the name of the
component, but that it came from a library project. This allows users
to copy a component definition from any other library, customize
it, and then place it in their own library. Whenever either of these
components is used, PSCAD will keep track of which library each is
from. PSCAD V4 also allows components to be kept directly in case
projects (*.psc), so that a temporary component can be developed
for a specific case, without having to clog up a library with the test
code.
509
510
PSCAD
NOTE: PSCAD V4 will initially allow the
import of only a single runtime batch (*.rtb)
file, associated with a specific V2 draft (*.dft
or *.dfx) file. This *.rtb file must have the
identical filename as the draft file being
imported. For more information on importing any remaining Runtime batch files, see
Importing Additional Runtime Batch Files
below.
NOTE: If a V2 draft project containing undefined components is loaded into PSCAD V4,
all undefined components will be substituted
with a temporary placeholder component.
511
512
PSCAD
Common Warning and Error Messages
There are some common warnings and error messages that may
appear in the Output window following the migration of a V2 draft
file. Some of these are described below:
Warnings:
Errors:
513
This will bring up the Import Runtime Module dialog window. Select the *.rtb file you wish to import and click the Open button.
514
PSCAD
To transfer this palette into PSCAD V4:
1. Open PSCAD V2 on your UNIX terminal and run the Draft
program. Press the LIBRARY button in the main menu and
select LOAD | USER.
NOTE: Make sure that any of the components included in your PSCAD User Library
file have a unique component definition
name. Otherwise these components may be
overwritten by other component definitions.
2. Select the desired user library le from the Load User Library
dialog and then press the PROCEED button.
3. Copy the desired component instances from the user library
palette over to the Draft canvas. From the FILE menu,
select SAVE AS... | TRANSFER to save the Draft project as
a transfer le (i.e. as a *.dfx le). This will ensure that the
component denitions are included within the V2 draft le.
515
PSCAD
517
8. Open the library project main page in Circuit view. Rightclick on the page and select Paste from the pop-up
menu. A new graphical instance of the component should
appear. You can also use Drag and Drop to perform steps 7
and 8.
9. Right click on the noname library in the Workspace window
and select Save As... to rename and save the library project.
518
PSCAD
Manual Revisions to the New PSCAD V4 Project
Open the new PSCAD V4 project in Circuit view (left double-click
on the project name in the Workspace window) and you should see
a parent (top-level) module that did not exist in your PSCAD V2
project. This module will contain other modules representing each
page that existed in your original V2 draft project. A separate module
will also be included, which contains all information from the associated runtime batch (*.rtb) file.
Depending on whether or not there were any associated import or
export connections in the original V2 draft project, each module may
now possess external input and output connections on their respective graphics. Each of these connections corresponds to an import
or export connection in PSCAD V2. PSCAD V4 uses this input/output information to order modules in such a way as to minimize any
feedback paths in signals.
Too Many External Connections
If the parent module is visually unreadable due to too many external
connection graphics on the module, then this is probably because
the original V2 Draft page had an excessive number of import or exports (i.e. > 100). The auto-routing of these connections in PSCAD
V4 becomes too complex in such situations, but the connections are
still functionally correct. Too simplify matters, you can go back to the
PSCAD V2 Draft circuit, and manually collapse related import and
export signals into arrays. Then go through the import procedure
again. This will reduce the number of connections in the parent module and help to keep things organized.
Import/Export Tags with Array Variables
Each module may also require editing if you used any import or
export tags with array variables in the original PSCAD V2 draft
project. The old import and export components did not contain any
information regarding the dimension or type of variable (all import/exports were performed with REAL numbers).
PSCAD V4 now allows import/exports to be performed with the original variable type, thus avoiding needless (and potentially incorrect)
data conversions. The user must manually enter the import/export
variable type and dimension information into the modules (there will
be at least two modules that must be edited - one for the import and
one for the export).
519
520
PSCAD
Runtime Module
The Runtime module represents the contents of the V2 runtime
batch file. This module may require some house cleaning and
re-organization (i.e. re-size graph frames, etc.). Control panels are
used to contain sliders, dials, switches and meters. Grouped components in the PSCAD V2 Runtime program are now added merely as
additional modules.
Migrating V2 Cable Systems
PSCAD V2 cable migration into V4 is not supported. Any cable
systems in your V2 project (i.e. defined in *.clb files) must be reconstructed from scratch once the project is migrated into PSCAD
V4. See the chapter entitled Transmission Lines and Cables in this
manual for more details.
Migrating V2 Transmission Line Systems
There are fundamental differences in how transmission line systems
are represented between PSCAD Versions 2 and 4. In V4, transmission line systems are interfaced to the rest of the electric circuit
through special interface components. The properties of the actual
transmission corridor are defined within a special properties component (i.e. tower geometry, conductor properties, etc.).
When a PSCAD V2 draft project containing transmission line systems is migrated into V4, the above described transmission system
is not automatically constructed. Instead, the transmission line system is inserted into the V4 project using special V2 alias components
called V2 Style T-Line Connection. The transmission system properties remain based on the transmission line batch (*.tlb) file created by
V2.
Although this substitution will provide correct results when the simulation is run, it may prove cumbersome if the transmission system
properties need to be changed (must edit the *.tlb file), or if the
project file is transferred to other users (must move the *.tlb file with
it). It is therefore recommended that V2 style transmission systems
be eventually converted to V4 format.
Although this process must be performed manually, it is
straightforward. Simply replace the V2 Style T-Line Connection
PSCAD Users Guide
521
522
PSCAD
Library Path (set in the Workspace Settings dialog window), or can
be entered directly as absolute paths.
These paths must be changed accordingly in your V4 projects. Open
the respective Project Settings dialog for the project (right-click on
the project filename in the Workspace and select Project Settings...)
and select the Fortran tab. Modify the paths in the Additional Fortran
Library (*.lib) and Object (*.obj) Files input field. For example, a V3
reference is shown below:
Flyby Windows
A new feature was added to PSCAD V4, which optimizes variable
storage between time steps during a simulation. Unfortunately, when
this optimization algorithm is enabled, it also disables Flyby window
functionality. To enable Flyby windows while debugging your project,
the optimize storage feature must be turned off.
Right-click on the project filename in the Workspace window and
select Project Settings.... Click the Dynamics tab and select the option called Store Feed-Forward Signals for Viewing.
Node Loop Component Output Format
The output format of the Node Loop component was altered to
reflect changes made to the subsystem splitting algorithm in PSCAD
V4. This becomes important if your PSCAD V3 user components utilize the Node Loop for input. If this is the case, then you must alter
your components before running any V4 projects.
In PSCAD V3, the subsystem global variable (SS) always retained the same value within the same circuit module. In PSCAD
V4, the components on a single circuit can reside in different
subsystems. As such, a new Loop prefix has been added to tell the
compiler to use the subsystem number of the Node Loop component
when processing.
PSCAD Users Guide
523
524
PSCAD
Appendix A:
References
1. Hydraulic Turbine and Turbine Control Models for System
Dynamic Studies, Working Group on Prime Mover and
Energy Supply Models for System Dynamic Performance
Studies, Transactions on Power Systems, Vol. 7, No. 1,
February 1992.
2. Dynamic Models for Fossil Fuelled Steam Units on Power
System Studies, Working Group on Prime Mover and
Energy Supply Models for System Dynamic Performance
Studies, Transactions on Power Systems, Vol. 6, No. 2, May
1991.
3. P. Kundur, Power System Stability and Control, McGraw
Hill Inc., 1994.
4. IEEE Recommended Practice for Excitation System Models
for Power System Stability Studies, IEEE Std. 421.5-1992.
5. Computer Models for Representation of Digital-Based
Excitation Systems, IEEE Transactions, 1996.
6. Franz Karlecik-Maier, A New Closed Loop Control Method
for HVDC Transmission, IEEE Transactions on Power
Delivery, Vol. 11, No. 4, October 1996, pp 1955-1960.
7. W. Tinney, N. Sato, Techniques for Exploiting the Sparsity
of the Network Admittance Matrix, IEEE PAS Vol. 82,
December 1963, pp. 944-950.
8. W. Tinney, J. Walker, Direct Solutions of Sparse Network
Equations by Optimally Ordered Triangular Factorization,
Proc. IEEE Vol. 55, pp. 1801-1809, November 1967.
9. P. Kuffel, K. Kent, G. Irwin, The Implementation and
Effectiveness of Linear Interpolation Within Digital
Simulation, Proceedings, International Conference on
Power Systems Transients (IPST 95), Lisbon, September
3-7, 1995, pp. 499-504.
10. A. M. Gole, I. T. Fernando, G. D. Irwin, O. B. Nayak,
Modeling of Power Electronic Apparatus: Additional
Interpolation Issues, Proceedings, International Conference
on Power Systems Transients (IPST 97), Seattle, June 2226, 1997, pp. 23-28.
11. B. A. Adkins, R. G. Harley, The General Theory of
Alternating Current Machines, Chapman and Hall, 1975.
525
Appendix A: References
12. J. R. Lucas, Representation of Magnetization Curves
Over a Wide Region Using a NonInteger Power Series,
International Journal of Electrical Engineering Education,
Vol. 25, pp. 335-340, Manchester U.K.
13. D. C. Jiles and D. L. Atherton, Theory of Ferromagnetic
Hysteresis, Journal of magnetism and magnetic materials,
vol. 61, pp. 48, 1986.
14. J. T. Thrope, D. C. Jiles and M. Devine, Numerical
Determination of Hysteresis Parameters Using the Theory of
Ferromagnetic Hysteresis, IEEE Transactions on Magnetics,
vol. 28, pp. 27-35, 1992.
15. U. D. Annakkage, P. G. McLaren et al, A Current
Transformer Model Based on the Jiles-Atherton Theory of
Ferromagnetic Hysteresis, IEEE transactions on power
delivery, Jan. 2000.
16. P. G. McLaren and R. P. Jayasinghe, Transformer Core
Models Based on the Jiles - Atherton Algorithm, IEEE
WESCANEX Communications, Power and Computing, May
1997.
17. P. G. McLaren, E. Dirks, U. D. Annakkage, R. P. Jayasinghe,
A. Parker, Real time Simulation of CTs in a Current
Differential Protection Scheme, Transmission and
Distribution Conference, 1999 IEEE, Volume 2, 11-16, pp.
470-475, April 1999.
18. P.M. Anderson, Anjan Bose, Stability Simulation Of Wind
Turbine Systems, Transactions On Power Apparatus And
Systems. Vol. PAS 102, No. 12, December 1983, pp. 37913795.
19. Control Design And Performance Analysis Of A 6 Mw Wind
Turbine Generator, IEEE Transactions On Power Apparatus
and Systems, Vol. PAS 102, No. 5, May 1983, pp. 13401347.
20. A. Deri, G. Tevan, A. Semlyen, A. Castanheira, The
Complex Ground Return Plane: A Simplied Model for
Homogeneous and Multi-Layer Earth Return, IEEE
Transactions on Power Apparatus and Systems, vol PAS100, pp. 3686-3693, Aug. 1981.
21. (Pending)
526
PSCAD
Index
Symbols
#CASE directive 470
#FUNCTION directive 462
#IF, #ELSEIF, #ELSE, #ENDIF directives 466
#LOCAL directive 461
#OUTPUT directive 464
#STORAGE directive 460
#SUBROUTINE directive 463
#TRANSFORMERS directive 465
#WINDINGS directive 466
~ 469
A
Absolute value 472
Active project 88,150
Aperture 268
Arc 363
Associations 82
B
Bus 315
C
C 431
Cables 325
Constructing 330
Cross-sections 337
Editing properties 329,333
Finding using workspace 112
Migrating V2 521
Model selection 341
Output data 347
Case project 87,95
Categories 381,409
CBR 429
Chatter 311
Choice box 393
Comment operator 458
Compaq visual fortran 488
Compilers 19,20,46,53,57
Limitations 14
Components 85
Adding to project 162
Connecting 166
Creating new 182
Cut/copy/paste 165
Drag and drop 202
Editing a denition 360
Editing parameters 176
Moving 165
Printing 189
Rotate/mirror/ip 165
Selecting 162
Viewing parameters/computations
179
527
Index
Contact information 16
Control groups 110,294
Control panels 284
Displaying in reports 298
Grouping 294
Minimizing 297
Preparing data for display 233
Settings 213
Style 77
Control settings 213
Control signal ow indicators 486
Cosine 472
Cross-hairs 281
Curves 245
Curve tting 356
D
Data les 481
Debugging 309,320,477,488
Delete 166
Design editor 121,359,381
Detailed output les 352
Creating 353
Viewing 353
Dfx 507
Diagnostics 309
Dimension limits 13
Dongles 23
Drag and drop 202
Drop list 394
Dynamic aperture adjustment 268
E
Eigenvalues 352
Eigenvectors 352
Ellipse 363
Emtdc system dynamics 483
Emt directory 136,160
Environment variables 57
Error messages 119,120,152,477
Exponential 472
Expression evaluation 472
External applications 82
External les 319,322,430
F
Feedback signals 486
528
Fft 253
Files 83,114,136,481
File path 302
File reference 84
Find symbol 399
Fixed node 378
Flip 165
Flybys 208,313
Fortran 20,79
Forum 15
G
Global substitution 216
Gnu fortran compiler
Installing 42,46
Graphics 363,371,375,379,380,401
Graphs 235,239
Aperture 268
Cross hairs 281
Curves 245
Displaying 298
Drag and drop 202
Grouping 296
Markers 270
Phasormeter 255
Polymeter 252
Pop-up toolbars 282
Preferences 277
Preparing data for display 233
Style 77
Tool tips 267
Traces 251
Xy plot 260
Zoom 278
Graph frames 235,272
Minimizing 297
Grid 174
Ground node 379
Group names 111,296
H
Hardware locks 23
Hardware requirements 19
Harmonics 253
Help browser
Setting 75
Help system 136,207
PSCAD
Hotkeys 132
Hyperbolic functions 472
I
Ideal branch 311
Idle time polling 310
Import
Runtime batch les 510
V2 draft les 510
V2 user libraries 514
Innite bus 311
Information le 231
Inf le 231
Initialization 308
Input eld 389
Installation 20,27,42,53,54,57
Interpolation 311
L
Layers 401
Lib 322
Library les 322
library les 491
Library project 87,96
License key 24
License manager 20,25
Installing 33,42
Local 25
Manually starting/stopping 71,72
Standalone 25
Trial 26
Licensing 20,81
Active license 68,69
Adding/upgrading 66,67
Getting info 70
License host 68
License key 24
Multi-user 20
Single-user 22
Trial 23,60
Line 363
Line constants program 344,345
Constants le 347
Editor 332
Input le 345
Log le 347
Manually solving 344
Output le 347
Viewing detailed output 352,353
LiveWire
Installing 42,46
Logarithm 472
Logical operators 473
M
Make -f message 56
Make le 482
Map le 482
Markers 270
Master library 101
Mathematical functions 472
Matlab interface 80,324,495,504,506
Designing a component 499,502
Simulink 495,497,502
Memory settings 78
Menus 122
Messages 35,118,119,120,152,477
Meta-le 189
Meters 283
Minimum requirements 19
Mirror 165
Modules 86
Compiling 187
Creating new 182
Editing a denition 360
Editing settings 173
Page setup 175
Printing 189
Transferring data 168
Viewing 103
Module denition 360
Mul 20
Multi-user licensing 20
Multiple run 307
N
Network splitting 317
Nmake -f message 56
Node 378
Optimal ordering 318
Node loop 523
O
Obj 322
PSCAD Users Guide
529
Index
Object les 322
object les 491
Observers 109
Online plotting 233
Optimization 317
Output channel 78,294
Output les 114,156,229,304
Output window 118,477
P
Phasor display 256
Plotting 233,250,267,268,281,298
Plot step 154,304
Point to source 152
Polymeters 252
Pop-up toolbars 282
Printing 93,189
Projects 74,86,159
Active 150
Adding 190
Adding components 162
Automatic reload 74
Changing run duration 154
Compile/build 150
Creating new 143
Default directory 75
Description 302
Loading 144
Migrating from V2 507
Navigating 145,361
Opening 145
Output les 156,229
Plot step 154
Printing 93
Recently used 75
Running 54,153,303
Saving 156
Show signal locations 485
Unloading 161
View component/signal tables 210
Project settings 301
Accessing 301
Editing 159
Pscad community forum 15
Push button control 289
530
R
Radio buttons 394
Radio links
Viewing 103
Recent les 145
Rectangle 363
Redo 76,428
Refresh 149
Removable node 377
Reports 298
Revision tracking 303
Rotary swtich 285
Rotate 165
Round 472
Router 21
Rtb 510,519
Run-ahead 310
Runtime batch le 510,519
Runtime messages 120
S
Saving
As older versions 158
Automatic 75
Projects 157
Script 77,407,428,447,451,459,469
#CASE directive 470
#IF, #ELSEIF, #ELSE, #ENDIF
directives 466
Expression evaluation 472
Search 209,399,480
Sequence numbers 174,483
Serial port 24
Shortcut keys 132
Signal ow paths 315
Signal locations 174
Simulink 495
Sine 472
Single-line diagrams 182
Single-user licensing 22
Slider control 290
Snapshots 154,155,306
Software requirements 19
Source code 431,508
source code 491
Source les 319,322,430,431
Spectrum analyzer 252
PSCAD
Square root 472
Start simulation 305
Storage
Signals 313
Storage dimensions 312
Substitutions 216,447
Subsystems 317
Sul 22
Support 16
Switched node 378
Switching
Switching node optimization 318
Switching devices 311
Switch control 289
Syntax colouring 77
T
Tabs 135
Tangent 472
Temporary directory 136,160,230
Ternary operator 474
Text eld 387
Text labels 371
Time offset 308
Time step
Changing 154,304
Tinney algorithm 318
Toolbars 125
Tool tips 208,313
Towers 335
Traces 251
Transmission lines 325
Constructing 326
Editing properties 327,333
Finding using workspace 112
Migrating V2 521
Model selection 341
Output data 347
Towers 335
Trial licensing 23,60
Troubleshooting 40,120
Tutorial projects 140
Typical studies 3
Upgrading 42,507,522
Issues with pscad V2
508,510,514,516,519
Usb port 24
User library path 322
V
Valid connections 166
VDC 430
Viewing Errors 152
Virtual control wires 174,487
Visibility condition 368
W
Warning messages
35,119,120,152,477
Whats new 3
Wire 486
Wire mode 173
Workspace 94,102,114
Tlines/cables 112
Workspace settings 73,77,79,80,82
X
Xnode 172
Xy plotting 260
Z
Zoom 148
U
Undo 76,428
Units 218
531