PSCAD : POWER SYSTEM
SIMULATOR
Copyright 2005
1
WELCOME TO THE PSCAD
INTRODUCTORY TRAINING COURSE
I General Features
II First steps with PSCAD III Introduction on control systems IV Breakers & Faults
SUMMARY
2
V Switching & Interpolation VI Transformers in PSCAD VII Rotating Machines in PSCAD VIII Transmission Lines & PSCAD IX User Component
X Organizing the Worksheet XI Matlab Interface
I General Features
I General Features
PSCAD: General Features
Load Flow / Transient Stability
z Each solution based on phasor calculations z Sequential time domain
calculations
Electro-Magnetic Transients = PSCAD z Direct time domain solution of
Differential Equations z Trapezoidal integration 4 calculations R L II V
( )
[
]
⎟ ⎠ ⎞ ⎜ ⎝ ⎛ + × = dt dI L R t I t V ()Selection of
Simulation Tools
Stability/Load Flow Tools
(Phasor Solutions) z Valid only for Steady State
and Low Frequency Swings
Transients Tools (PSCAD)
(Time Solutions) z Valid Over a Wide
Frequency Range z Detailed Analog and Digital
5 z Simplified Controls
(approximated as S functions)
z Steady State Equations for HVDC
z Efficient for Large Systems
z Detailed Analog and Digital Controls
z Detailed Switching of Thyristors, Diodes, GTO’s z Harmonics
z Transient Overvoltages, Lightning Impulses z Machine Dynamics
Transient vs Steady State
z Transient solution
Harmonics Non-linearities Frequency dependent
effects
z Steady state solution
Typical studies
z Find the over voltages in a power system due to a fault or a breaker operation
z Over voltages due to lightening strikes
z Find the harmonics generated by Power electronic devices (SVC,HVDC link, STATCOM, Machine drives)
7 z Tune and design control systems for maximum performance z Investigate sub synchronous resonance (SSR)
z Study the interaction between the SVC,HVDC links and other non linear devices.
z Variable speed drives z Industrial systems
Typical studies- Power Quality
• Grounding methods
• Over-voltages due to switching
• Voltage sags
• Iron saturation – inrush
• Performance of FACTS devices
8
• Ferro resonance
• Active and passive filters
• Distributed generation
• Flicker
• Variable speed drives and related harmonics
• Industrial systems
PSCAD: Simulation Theory
Based on Dommel’s representation of power system components
Admittance matrix based
[i] = [Y] [v]
PSCAD: Simulation Theory
Example: How an inductance is modelled ?
10
Integration of components
to form the system
PSCADz Compiles the circuit draft to form the FORTRAN file z Defines the Y matrix (map file)
z Subroutines are called to compute R and I of models at a given time step
11 z EMTDC :
♦Solves for node voltage based on Y and I values ♦Increments the time step
z FILES :
♦PSCAD shematics: *.psc file
♦directory *.emt : contains data file, map file, line.* files, output files
PSCAD: Specifications
PSCAD needs a Fortran Compiler to run:
z Compaq Visual Fortran V5 or V6 (Intel Fortran Compiler v9)
Th f GNU F77 il i d li d ith PSCAD
z The free GNU F77 compiler is delivered with PSCAD: Limitations
PSCAD: Limits
Professional edition GNUFORTRAN F77 Compaq Visual FORTRAN ( V5 ou V6)
Electrical Nodes 200 Unlimited Electrical branches 2000 Unlimited Sub-pages 25 Unlimited
13 Sub pages 25 Unlimited
T-Lines/Cables 50 Unlimited Transformers 70 Unlimited Educational edition Electrical Nodes 200 Electrical branches 2000 Sub-pages 25
II First steps with PSCAD
14
II First steps with PSCAD
Menu « Edit - Workspace
Settings »
z Fortran:
Select your FORTRAN compiler
z Matlab:
Choose your MATLAB version
16 and the corresponding libraries
z License:
Licensing info and installation
z Preferences:….
PSCAD: Step by step
1) Create or load a project
2) Select the components from the library
3) Define the components and connect them with wires 4) If d d d i t l d i
17 4) If needed, prepare dynamic control devices
5) Prepare plotting and metering tools 6) Parameterize the simulation => time step,
parameters...
Create Projects
z To create a new case: [File][New][Case] or :
z To load an existing project: [File] [Load Project] or :
Activate Projects
zTo activate a project: Click on the project name then [Set as active]: The project name becomes blue
Only one project is active
Only an active project can be run and saved
19 Only an active project can be run and saved
Access to the Master Library
zAll the PSCAD components are saved in the MASTER LIBRARY
20
Define components
On Line Help
z[Help][Table of Contents]
22
zOr directly click on the [Help] button from the dialog box of a component
On Line Help
z Detailed information on: ♦Master Library 23 Library Models ♦Solver structure ♦Index, etc.Measurement
z In component parameters window, define a name to measure internal variables: (eg: Output voltage of 3 phase voltage source)
z «Multimeter » component to measure: v,i,P,Q,Vrms,theta…. anywhere in the model
Plotting Devices
z Overlay Graphs z Polygraphs 25 z MetersPlotting Curves/Metering
• Step 1 :Measurement 26Plotting Curves/Metering
• Step 2:Select the « Output channel » component and link with the measured valuePlotting Curves
•Step 3a :[Right Click] on the « Output channel » and :28
Plotting Curves
•Step 3b( if the graph is already created) :29
Metering
•Steps 1 & 2are the same: Prepare the output Channel •Step 3 :Select the « Control Panel » component
Metering
Step 4:[Input/Output Reference] from the output channel
31 Then [Paste] on the control Panel
Plotting Curves/Metering
•The « Output channel » component allows to definecharacteristics for the display of the measured value : (Title, Scale Factor, Unit,etc...
32
Project Settings Menu
zDuration of the Simulation
zSolver Time Step
How to export results ?
1) Copy results from one graph to Excel or text files
34
How to export results ?
zIn the project settings menu « Save Channels to disk »:
2) Save directly all the measured quantities in output files:
35
zOutput files (text files) will be created in the *.emt directory
zAssociated *.inf files can be directly opened in Livewire (offline PSCAD post processor)
Dynamic Control Devices
•Possibility to change dynamically (during the simulation) the values of parameters owing to several dynamic control devices:
•Slider: •Switch: •Push Button: •Dial:
Dynamic Control Devices
•Step 1 : Select your control devices
Operating Mode: example with a slider
37
Dynamic Control Devices
•Step 2 : Open the component and define the variation bracket38
Dynamic Control Devices
•Step 3 : Link it with the « manual » tool , the control pannelDynamic Control Devices
Step 4:[Input/Output Reference] from the output channel40 Then [Paste] on the control Panel
Snapshot
A Snapshotallows to launch a simulation having initial conditions given by a previous simulation
1) Run a first initialization simulation until to reach the steady
41 1) Run a first initialization simulation until to reach the steady
state and save results in a snapshot file
2) Launch transient simulations starting from snapshot files
Snapshot : Operating mode
1) First simulation: StandardStartup Method2) Define the snapshot time & File and run the initialisation simulation
Multiple run Simulations
z To run several times consecutively one case with different values ofparameters
z To find the best parameter values or the « worst case » (fault study) z Insert the following component directly in your project:
43
Parameters of the project which are monitored in the multiple solution Measured values
which will be recorded in the multiple run output file *.out
Multiple run : Operating mode
Specify the parameters variation law of themonitored parameters
44 Type of variation: list,sequential or random Boolean, Real or Integer ? List of values
Multiple run : Operating mode
Specify the recordedquantities
N b f d d
Number of recorded
quantity Recorded quantity:integer, real or boolean ?
III Introduction on control
systems
46
systems
Variable parameters
zVariable parameters in PSCAD:
♦Control signals for Power electronic devices
♦Control signals for Breakers and Faults
♦Electrical quantities externally controlled
47 ( eg: Voltage Source Magnitude, RLC values,…)
z Possibilities to design control systems with:
♦mathematical function blocks
♦sequencers
♦user interactive control tools
Control Blocks
zControl system is defined by connecting:
♦Constants and Time inputs
♦Sinusoidal functions ♦Comparators ♦Transfer functions ♦Min, max… ♦Look up table ♦Filters
Control Blocks
zExample:
49
Sequencers
zState graph form:
50
Breaker model
Single phase breaker: 1 model - 2 display
Low voltage display High Voltage display
52 Three phase breaker: 1 model - 3 display
o o tage d sp ay g o tage d sp ay
Low voltage display High Voltage display (single line)
Breaker: Parameters
Name, Roff, Ron
53 Possibility to define pre and post insertion resistances
Single pole operation: possibility to operate each phase separately
Breakers Control
zPredefine the initial state and operation time in the « Timed Breaker Logic » component:
z Link the breaker with a user interactive control tool:
Fault model
Single phase fault:
55 Three phase fault:
Three phase view Single line view
= 2 state switching resistors RON,ROFF
Fault control
zDefine the fault duration ant the time to apply fault in the « Timed Fault Logic » component:
56
z Dynamic control tools
z Sequencers:
zControl blocks ( 0: fault removed ; 1 :fault applied)
Fault control
If the option «external»control is selected, the fault type can also be externally monitored:
V Switching & Interpolation
58
g
p
Semi-Conductors Models
Available Semi-conductors models in the PSCAD Master
Library : 59 Library :
Semi-Conductors Models
Common representation of semi_conductors: RON/ROFF with parallel snubber circuit or notDiode characteristic
Parameters:
z Ron/Roff values F d V lt D V l
61
z Forward Voltage Drop Value
z Snubber Circuit Resistance & Capacitance
Note: The reverse recovery time of the diode is assumed zero
Thyristor characteristic
Parameters:z Ron/Roff values
z Forward Voltage Drop Value z The Forward Break-Over Voltage: Device will be forced into conduction if this
62
voltage is exceeded (with or without a gate pulse) [kV] z The Reverse Withstand Voltage:
Device will be forced into conduction in the reverse direction if this voltage is exceeded [kV]
z The minimum extinction Time (min of δt between Roff and Ron) z Snubber Circuit Resistance & Capacitance
GTO/IGBT characteristic
z Same characteristics as for the thyristor TURN OFF i l t b it d
Power Electronic Switching
& Time step
zPSCAD has a fixed Time Step
64 zControl system need a small time step to switch at exact
instant :
=> « Interpolation method »
Interpolation Method
Current crosses zero
t1 y1 y 1−y2 dt y 1 t 1 := y 65 t- dt t y2
Current crossing time t1 can be estimated
Interpolation Method
1 t t1 3 4 6 5 7 t t 2 3 1 – ON 2 – ON (wrong)4 – OFF (new G matrix) 5 – dt ahead from 4
Interpolation Method
Advantages of this method:
z Accuracy:Switching is made at the ‘exact’ instant F t C b t l ti t d i t i
67 z Fast:Can be run at a larger time step and maintain
accurate results
VI Transformers in PSCAD
68
PSCAD & Transformers
zTwo different models for power Voltage Transformer:
«Classical» models: single and 3phase «UMEC» models: single and 3 phase
Available in the PSCAD Master Library:
Classical Models
Classical models:
zSingle phase: 2 or 3 windings
z3 phase: 2,3 or 4 windings, autotransformers
70
p , g ,
zNo mutual coupling between the 3 phases => equivalent to 3 single phase units
Representing transformers as coupled coils
z Mutual inductance: Flux linkage
z Self inductance: Leakage inductance & Magnetizing inductance
Classical Models
71
UMEC models
Unified Magnetic Equivalent Circuit:
zTake the geometry of the core into account (ly,lw,Ay,Aw)
zMutual coupling between the
Equivalent to classical models but the inductances are dependent of the core dimensions: Lij(ly,lw,Ay,Aw)
zMutual coupling between the different phases are considered
UMEC models
z Single Phase Models: 2,3 or 4 windings
73
z Three Phase models: 2 windings/phase with 3 or 5 limbs
Equivalent Circuit
74 L1,L2: Positive Sequence Leakage reactance
L12 : Magnetizing Inductance R1,R2: Copper Losses
Iron Losses : Shunt resistance with L12
Parameters
zVoltages levels at the primary and secondary side
( not only a ratio ! Important for p.u computations) zApparent Power (MVA)
Wi di t ( Y )
zWinding types ( Y or )
zPossibility to modify dynamically the turns ratio during simulation as a « Tap changer »
Parameters
z Positive sequence leakage reactance (pu): L1+L2 (from short-circuit test)
z Magnetizing Current (pu): % of rated current => L12 (from open-circuit test)
76
( p )
z No load losses (pu): Core losses
z Copper losses (pu): resistance of windings : R1+R2 All parameters of the equivalent circuit are defined in per unit
(i.e / Zbase) :
Zbase=V1*V2 / Sn
« Ideal Model »
User can select an « ideal » model or not for the transformer: 'Ideal' means that the
magnetizing branch has been eliminated in the equivalent circuit:
77 equivalent circuit:
1) Very small magnetizing current ( << 1%)
=> numerically more efficient and stable to neglect the magnetizing inductance in the equivalent circuit
Why choosing Ideal Model ?
2) To consider non linearities in the core, useful for:
Harmonic distorsion studies
Representing saturation
In PSCAD, saturation is represented with a compensating current source injection across the selected winding
The magnetizing branch is replaced by a non linear magnetizing current source
79
Flux linkage
Mag. Current
λ
Im1 Im2
User define parameters for the curve V (Is):
z Knee voltage (generally 1.15 to 1.25 pu)
z Slope: Air core reactance (generally 2*leakage reactance)
z Dynamic parameters (Time constants)
Saturation in Classical
approach
80
y a c pa a ete s( e co sta ts)
Introduction to Electric
Machines
• Induction Machine:• 2 models: Squirell Cage and Wound Rotor • DC Machine:2 winding models
• Synchronous Machine :2 models available: Wound rotor or Permanent
82
Synchronous Machine : 2 models available: Wound rotor or Permanent Magnet model
• Full model of exciters and power system stabilizers can be associated to synchronous machine
• Turbine and Governors ( Steam, Hydro, Wind) models can be connected to the machine :
• To compute precisely the mechanical effects • Multi-mass Model: to model Shaft Torsional effect
Electric Machine Simulation
Represented as a system of coupled coils
zeg: Salient pole synchronous machine – 6 coils
83 Inductance Matrix [L] with rotor position dependent inductances
Electric Machine Simulation
The solution is based on admittance matrix:
[i] = [Y] [v]
=> Requires that [L] be inverted at each time step => Slow and computational inefficiency
The inductance matrix is converted from the ‘a-b-c phase reference frame’ to d-q-0 frame: Park Transformation
zMathematical transformation
zSymmetrical windings and linearity assumed
Electric Machine Simulation
Machine data for simulation:
zObtained from tests or given by manufacturer
zIn a form suitable to be used in d-q based models:
“Generator data format”: Classical parameters :
85
Generator data format : Classical parameters : Reactances and Time constants:
D axis: Xd,X’d,X’’d,T’d0,T’’d0
Qaxis: Xq,X’q,X’’q,T’q0,T’’q0
“Equivalent circuit data format”: Reactances and Resistancesfor d-axis and q-axis equivalent circuit
Shaft Torsional effect modelling
zInteraction of the electrical and mechanical systems
=> Multimass model connected to Synchronous generator
86 T12−Te J1 tw1 d d ⋅ +D1⋅w1+D12⋅
(
w1−w1)
:= t T12:=kk12⋅(
θ2−θ1)
k12⋅(
θ2−θ1)
−Te−D1⋅w1 J1 t w1 d d ⋅ := tSynchronous machine
initialization process
• To quickly and smoothly reach the steady state at a desired working point, user can :
♦Start the machine in « normal mode » but user has to set the proper inital conditions: P0,Q0,Ef0,Tm0
♦Or use the initialization process implemented in PSCAD: 1) Start the machine as a voltage source:
VIII Transmission Lines & PSCAD
88
Transmission Lines
Selection of a suitable model:
zAvailable data: Geometric data or Parameters
zSpeed of simulation: Time step
Li l th F l t t h d d f K
89 zLine length: From several meters to hundred of Kms
zType of study: Fast transient, Low transient, RMS
zAccuracy
Representing
Transmission Lines
Equivalent circuit model:
Equivalent circuit model
R,L and mutual inductances between wires R,L
91 Lumped parameters model
Travel time became small (compared to time step) up to several Kms To use for very short lines
Travelling Waves model
Travelling wave models:
zPropagation delay between sending end and receiving end
zFrom several to hundred of Kms
zBergeron Model:Accurate at a single frequency
92 => for Rms or low transient studies (fault analysis)
zFrequency dependent models:
accounts for the changes in line parameters due to frequency -Phase model : Most accurate model available
- Mode model: Older model (available for PSCAD V2 compatibility)
Travelling wave models
User represents:
zThe geometry of the corridor
zSag, ground wires
zConductor resistivityCo ducto es st ty
Travelling wave models
Before the global simulation of the system, the parameters of the lines are computed : Line Constans Programs
zCompute equivalent Shunt admittance Y and Series impedance Z
zReduced to Nth order Transfer functions
Curve Fitting for the frequency spectrum chosen by user
94 For Bergeron model,
Manual entry is possible:
zCurve Fitting for the frequency spectrum chosen by user
IX User Component
95
p
EMTDC:
Simplified Solving Process
Master DYNamics Subroutine DSDYN Network Solution t0 OUTput Subroutine t1 =t0+δt Network Solution DSOUT
DSDYN: Solves control systemswhich will be used for the electrical network drive at the same time step
Network Solution: Solves electrical systems: [i] = [Y] [v]
EMTDC:
Simplified Solving Process
97 DSOUT: Same structure as DSDYN but specific use:
zSolves control systemswhich will be used for the electrical network drive at the following time step
zComputes quantities to be displayed in Meters & Graphs
Main advantages of EMTDC
structure
1) Possibility to solve cases even if there is no electrical circuits (only control blocks): only DSDYN& DSOUT subroutines are used
2) U d di tl i t d i DSDYN DSOUT ti
98 2) User code directly inserted in DSDYN or DSOUT sections:
possibility to use all the existing EMTDC subroutines in order to design custom components easier
3) With the judicious use of DSDYN or DSOUT, user can decide to calculate control dynamics using pre or post solution quantities and avoid unnecessary time step delays
Create a component:
General Steps
1) Create a library
2) Define the interface of the component 3) Parameterize your component 4) Define the Code
Create your own Library
First, you can preparate your own library:
100 Then save it, open the file and create your components
Create the component
The component wizard is opening:
101 Indicate:
zThe name of the component
zThe number of connections
Create the component
Indicate:
zThe connection name
zThe type of the connection: Electrical or C t l tit (i t Control quantity (input or output)
zThe type of the data: Logical, Real, Integer
Create the component
Confirm...
103 ... then you obtain something like this:
Parametrize your component
« Edit Definition »You access to a new window:
104 the « component workshop »,
then select the tab « parameters
Select « New Category »
Define « New control »
Parametrize your component
106 Then, choose the type of variable that the user will have the possibility to enter:
z Text
z Input Field (one value)
z Choice Box
Specify:
zThe elements to be displayed in the parameter
Parametrize your component
107 box (size, title, default
value…..)
zThe data type
Parametrize your component
If several parameters are created, it is possible to edit or modify each ones in selecting the corresponding name in the drop list
Define the Code
In the component workshopwindow, select the tab « Script »
The code is organized in different sections called «segment»:
109 Each segment has its proper syntax
(based on Fortran & PSCAD script)
Segments
z Fortran:Design code or call subroutines defined in external *.f files z Branch:To design electrical branches containing R,L or C
z Computations:for precomputations (compiled only at the first time step) z DSDYN:Fortran code forced in the DSDYN sections,
DSDOUTF t d f d i th DSDOUT ti
110 z DSDOUT:Fortran code forced in the DSDOUT sections
z Transformers:Syntax adapted to simply design mutual impedance matrix
z Checks:
z T-Lines: z etc….
The STORx arrays
The STORx arrays are storage vectors allowing to store variables at a precise location:
zSTORI,STORF,STORL,STORC for integer, real, logical or complex datap
zUseful if :
The STORx arrays
To use STORx arrays need to increment the corresponding NSTORx pointers:
zNSTORI, NSTORF, NSTORL, NSTORC
zExample:
Retrieve values from STORF:Xa = STORF(NSTORF)
112 Retrieve values from STORF: Xa STORF(NSTORF)
Save values in STORF : STORF(NSTORF) = Xb Increment the pointers:NSTORF = NSTORF + 1
X Organizing the Worksheet
113
g
g
Create sub_page
When the project becomes enough large, it is interesting to sudivide it into several pages organized in an arborescent structure: Main Page Main Page Subpage2 Subpage 1 Subpage 2_1 Subpage 2_2
Create sub_page
Operating Mode: Step 1[Right Click] in the main page, the following menu appears:
115 Select « Create New
component »
Create sub_page
Step 2: The component wizard is opening:Indicate:
• the name of the sub-page
116 •The number of
connections between the sub_page and the main page
•Tick « Page Module
Create sub_page
Step 3:Indicate:
•The connection name •The type of the connection: Electrical or Control quantity q y (input or output)
Create sub_page
Step 4 :Confirm and …….that ’s finished !!
118
Create sub_page
Links between pages : Electrical Nodes
The electrical connections between a sub_page and the
i li d ith th
119 main page are realized with the
following component called External Electrical Node :
Note : This electrical node must have the same name as the one declared during the sub_page creation
Create sub_page
Links between pages : Control quantity Control quantities defined inthe main page (declared as input during the connection d fi iti ) h t b i t d definition) has to be imported in the sub_page with the «IMPORT» component Notes:
XI MATLAB-Simulink interfacing
121
g
Matlab/Simulink Interfacing:
General features
•Cosimulation:Possibility to integrate Matlab files and all the functionnalities of Simulink toolboxes in a PSCAD project
•General organization:
122 •1) Call Matlab files (*.m) or Simulink files (*.mdl) from the PSCAD workshhet
•2) Need to define a user_component to interfacing PSCAD & Matlab/Simulink
•3) Both Matlab 5or 6 and a Digital Fortran 90 compiler should be installed on your PC
Matlab files Interfacing
Need to define a user_component to interface PSCAD & MATLAB :
Matlab files Interfacing:
Operating Mode
Step 1:Design the title & connections as any other user component with the PSCAD component Wizard
Step2 :Good Advice ! Parameterize the Name of the Matlab file and the corresponding path, then, the user component
124 p g p , , _ p will be more flexible & able to call other files
Matlab files Interfacing:
Operating Mode
Step 3:Write the fortran Code1) Open the «DSDYN» segment
2) Allocate Memory : Exemple with a case with 2 real inputs A&B and 1 integer ouput C:
125 3)Transfer the input variable to STORF (real) / STORI (integer) arrays :
STORF(NSTORF) = $A STORF(NSTORF+1) = $B inputs A&B and 1 integer ouput C: #STORAGE REAL:2 INTEGER:1
Matlab files Interfacing:
Operating Mode
4) Call the Matlab Subroutine:
CALL MLAB_INT (« $Path », « $Name », « I R(31) », « R ») 5) Transfer Output variable from STORF/STORI arrays into the PSCAD output connection node:
the PSCAD output connection node: $C = STORI(NSTORI)
6) Increment the NSTORF & NSTORI index pointers: NSTORF = NSTORF + 2
Simulink files Interfacing
Need to define a user _component to interface PSCAD & SIMULINK :
127 Variable
defined in the PSCAD circuit
User_component: Send PSCAD data to a *.mdl file
Output of the *.mdl file, sent to the PSCAD project
Simulink files Interfacing:
Operating Mode
The same as for Matlab files excepted :
1) Call of the SIMULINK SUBROUTINE :
128 CALL SIMULINK_INT (« $Path », « $Name », « I R(31) », « R »)
2)You do not need to transfer Output variable from STORF/STORI arrays