You are on page 1of 43

13/02/2010

PSCAD : POWER SYSTEM SIMULATOR


Copyright 2005

WELCOME TO THE PSCAD INTRODUCTORY TRAINING COURSE

SUMMARY
I II III IV V VI VII VIII IX X XI General Features First steps with PSCAD Introduction on control systems Breakers & Faults Switching & Interpolation Transformers in PSCAD Rotating Machines in PSCAD Transmission Lines & PSCAD User Component Organizing the Worksheet Matlab Interface
2

I General Features

13/02/2010

PSCAD: General Features

Load Flow / Transient Stability


Each solution based on phasor calculations Sequential time domain calculations

Electro-Magnetic Transients = PSCAD


Direct time domain solution of Differential Equations Trapezoidal integration

V I R L

dI V (t ) = [I ( t ) R ] + L dt
4

Selection of Simulation Tools

Stability/Load Flow Tools (Phasor Solutions)


Transients Tools (PSCAD) (Time Solutions)


Valid only for Steady State and Low Frequency Swings Simplified Controls (approximated as S functions) Steady State Equations for HVDC Efficient for Large Systems

Valid Over a Wide Frequency Range Detailed Analog and Digital Controls Detailed Switching of Thyristors, Diodes, GTOs Harmonics Transient Overvoltages, Lightning Impulses Machine Dynamics
5

Transient vs Steady State


Transient solution

Harmonics Non-linearities Frequency dependent effects

Steady state solution


RMS Value

13/02/2010

Typical studies

Find the over voltages in a power system due to a fault or a breaker operation Over voltages due to lightening strikes Find the harmonics generated by Power electronic devices (SVC,HVDC link, STATCOM, Machine drives) Tune and design control systems for maximum performance Investigate sub synchronous resonance (SSR) Study the interaction between the SVC,HVDC links and other non linear devices. Variable speed drives Industrial systems

Typical studies- Power Quality


Grounding methods Over-voltages due to switching Voltage sags Iron saturation inrush Performance of FACTS devices Ferro resonance Active and passive filters Distributed generation Flicker Variable speed drives and related harmonics Industrial systems
8

PSCAD: Simulation Theory


Based on Dommels representation of power system components

Admittance matrix based

[i] = [Y] [v]


[i] [v] [Y] Node current injection matrix Node voltage matrix System Admittance matrix

13/02/2010

PSCAD: Simulation Theory


Example: How an inductance is modelled ?

10

Integration of components to form the system


PSCAD Compiles the circuit draft to form the FORTRAN file Defines the Y matrix (map file) Subroutines are called to compute R and I of models at a given time step

EMTDC : Solves for node voltage based on Y and I values Increments the time step FILES : PSCAD shematics: *.psc file directory *.emt : contains data file, map file, line.* files, output files

11

PSCAD: Specifications

PSCAD needs a Fortran Compiler to run:


Compaq Visual Fortran V5 or V6 (Intel Fortran Compiler v9) The free Th f GNU F77 compiler il i is d delivered li d with ith PSCAD: PSCAD Limitations

12

13/02/2010

PSCAD: Limits
Professional edition GNU Compaq FORTRAN Visual F77 FORTRAN ( V5 ou V6) 200 Unlimited 2000 Unlimited 25 Unlimited 50 Unlimited 70 Unlimited

Electrical Nodes Electrical branches Sub-pages Sub pages T-Lines/Cables Transformers

Educational edition Electrical Nodes Electrical branches Sub-pages

200 2000 25

13

II First steps with PSCAD

14

PSCAD Workspace

15

13/02/2010

Menu Edit - Workspace Settings


Fortran:

Select your FORTRAN compiler


Matlab:

Choose your MATLAB version and the corresponding libraries


License:

Licensing info and installation


Preferences:.

16

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 needed, d d prepare dynamic d i control t l devices d i 5) Prepare plotting and metering tools 6) Parameterize the simulation => time step, parameters...

17

Create Projects

To create a new case: [File][New][Case] or :

To load an existing project: [File] [Load Project] or :

18

13/02/2010

Activate Projects

To 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

Access to the Master Library


All the PSCAD components are saved in the MASTER LIBRARY

20

Define components

Component parameters Window (e.g: Synchronous machine)

21

13/02/2010

On Line Help

[Help][Table of Contents]

Or directly click on the [Help] button from the dialog box of a component
22

On Line Help

Detailed information on:

Master Library Models Solver structure Index, etc.

23

Measurement

In component parameters window, define a name to measure internal variables:

(eg: Output voltage of 3 phase voltage source)

Multimeter component to measure: v,i,P,Q,Vrms,theta. anywhere in the model

24

13/02/2010

Plotting Devices

Overlay Graphs

Polygraphs

Meters

25

Plotting Curves/Metering
Step 1 : Measurement

26

Plotting Curves/Metering
Step 2: Select the Output channel component and link with the measured value

27

13/02/2010

Plotting 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 & 2 are the same: Prepare the output Channel Step 3 : Select the Control Panel component

30

10

13/02/2010

Metering
Step 4: [Input/Output Reference] from the output channel

Then [Paste] on the control Panel

31

Plotting Curves/Metering
The Output channel component allows to define characteristics for the display of the measured value : (Title, Scale Factor, Unit,etc...

32

Project Settings Menu

Duration of the Simulation Solver Time Step Plotting Time Step

33

11

13/02/2010

How to export results ?

1) Copy results from one graph to Excel or text files

34

How to export results ?

2) Save directly all the measured quantities in output files:


In the project settings menu Save Channels to disk :

Output files (text files) will be created in the *.emt directory Associated *.inf files can be directly opened in Livewire (offline PSCAD post processor)

35

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:

36

12

13/02/2010

Dynamic Control Devices


Operating Mode: example with a slider
Step 1 : Select your control devices

37

Dynamic Control Devices


Step 2 : Open the component and define the variation bracket

38

Dynamic Control Devices


Step 3 : Link it with the manual tool , the control pannel

39

13

13/02/2010

Dynamic Control Devices


Step 4: [Input/Output Reference] from the output channel

Then [Paste] on the control Panel


40

Snapshot

A Snapshot allows to launch a simulation having initial conditions given by a previous simulation

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

41

Snapshot : Operating mode


1) First simulation: Standard Startup Method 2) Define the snapshot time & File and run the initialisation simulation

3) Transient simulation: From snapshot file Startup Method:

42

14

13/02/2010

Multiple run Simulations


To run several times consecutively one case with different values of parameters To find the best parameter values or the worst case (fault study) Insert the following component directly in your project:

Measured values which will be recorded in the multiple run output file *.out

Parameters of the project which are monitored in the multiple solution

43

Multiple run : Operating mode


Specify the parameters variation law of the monitored parameters

Type of variation: list,sequential or random

Boolean, Real or Integer ?

List of values

44

Multiple run : Operating mode


Specify the recorded quantities

Number N b of f recorded d d quantity

Recorded quantity:integer, real or boolean ?

Data allowing to find the optimal run Possibility to record Max(x),Min(x) or x itself
45

15

13/02/2010

III Introduction on control systems

46

Variable parameters

Variable parameters in PSCAD:


Control signals for Power electronic devices Control signals for Breakers and Faults Electrical quantities externally controlled

( eg: Voltage Source Magnitude, RLC values,)


Possibilities to design control systems with:


mathematical function blocks sequencers user interactive control tools


47

Control Blocks

Control system is defined by connecting:


Constants and Time inputs Sinusoidal functions Comparators Transfer functions Min, max Look up table Filters ..
48

16

13/02/2010

Control Blocks

Example:

49

Sequencers

State graph form:

50

IV Breakers & Faults

51

17

13/02/2010

Breaker model
Single phase breaker: 1 model - 2 display

Low o voltage o tage display d sp ay

High g Voltage o tage display d sp ay

Three phase breaker: 1 model - 3 display

Low voltage display

High Voltage display (single line)


52

Breaker: Parameters
Name, Roff, Ron

Possibility to define pre and post insertion resistances Single pole operation: possibility to operate each phase separately
53

Breakers Control

Predefine the initial state and operation time in the Timed Breaker Logic component:

Link the breaker with a user interactive control tool:

Link with a sequencer:

Define its state (1 or 0) with another control block:


54

18

13/02/2010

Fault model
Single phase fault:

Three phase fault: = 2 state switching resistors RON,ROFF

Three phase view

Single line view


55

Fault control

Define the fault duration ant the time to apply fault in the Timed Fault Logic component:

Dynamic control tools Sequencers:

Control blocks ( 0: fault removed ; 1 :fault applied)


56

Fault control

If the option external control is selected, the fault type can also be externally monitored: Fault type table :

57

19

13/02/2010

V Switching g & Interpolation p

58

Semi-Conductors Models

Available Semi-conductors models in the PSCAD Master Library :

59

Semi-Conductors Models

Common representation of semi_conductors: RON/ROFF with parallel snubber circuit or not

60

20

13/02/2010

Diode characteristic

Parameters:

Ron/Roff values F Forward d Voltage V lt Drop D Value V l Snubber Circuit Resistance & Capacitance

Note: The reverse recovery time of the diode is assumed zero

61

Thyristor characteristic
Parameters:

Ron/Roff values Forward Voltage Drop Value

The Forward Break-Over Voltage: Device will be forced into conduction if this voltage is exceeded (with or without a gate pulse) [kV]

The Reverse Withstand Voltage:

Device will be forced into conduction in the reverse direction if this voltage is exceeded [kV]

The minimum extinction Time (min of t between Roff and Ron) Snubber Circuit Resistance & Capacitance
62

GTO/IGBT characteristic

Same characteristics as for the thyristor TURN OFF signal i l to t be b monitored it d

63

21

13/02/2010

Power Electronic Switching & Time step

PSCAD has a fixed Time Step

Control system need a small time step to switch at exact instant : => Interpolation method

64

Interpolation Method

Current crosses zero y1 t- dt

y y
1

y := t

dt
t1 t y2

Current crossing time t1 can be estimated

65

Interpolation Method
4 1 t1 3 t 2 1 ON 2 ON (wrong) 3 ON (interpolate 1 &2) t 4 OFF (new G matrix) 5 dt ahead from 4 6 interpolate 4 & 5 6 7

66

22

13/02/2010

Interpolation Method

Advantages of this method:


Accuracy: Switching is made at the exact instant F t Can Fast: C b be run at tal larger time ti step t and d maintain i t i accurate results

67

VI Transformers in PSCAD

68

PSCAD & Transformers


Available in the PSCAD Master Library:

Two different models for power Voltage Transformer:


Classical models: single and 3phase UMEC models: single and 3 phase

Current Transformers (JA Model, Lucas Model) Coupled capacitor voltage transformer Coactively coupled voltage transformer

69

23

13/02/2010

Classical Models

Classical models:

Single phase: 2 or 3 windings 3p phase: 2,3 , or 4 windings, g , autotransformers No mutual coupling between the 3 phases

=> equivalent to 3 single phase units

70

Classical Models
Representing transformers as coupled coils

Mutual inductance: Flux linkage Self inductance: Leakage inductance & Magnetizing inductance

71

UMEC models
Unified Magnetic Equivalent Circuit:

Take the geometry of the core into account (ly,lw,Ay,Aw)

Mutual coupling between the different phases are considered Equivalent to classical models but the inductances are dependent of the core dimensions: Lij(ly,lw,Ay,Aw)

72

24

13/02/2010

UMEC models

Single Phase Models: 2,3 or 4 windings

Three Phase models: 2 windings/phase with 3 or 5 limbs

73

Equivalent Circuit

L1,L2: Positive Sequence Leakage reactance L12 : Magnetizing Inductance R1,R2: Copper Losses Iron Losses : Shunt resistance with L12
74

Parameters

Voltages levels at the primary and secondary side

( not only a ratio ! Important for p.u computations)


Apparent Power (MVA) Wi di types Winding t ( Y or )

Possibility to modify dynamically the turns ratio during simulation as a Tap changer

75

25

13/02/2010

Parameters

Positive sequence leakage reactance (pu): L1+L2

(from short-circuit test)


Magnetizing Current (pu): % of rated current => L12 ( (from open-circuit p test) )

No load losses (pu): Core losses 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
76

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

Why choosing Ideal Model ?


1) Very small magnetizing current ( << 1%) => numerically more efficient and stable to neglect the magnetizing inductance in the equivalent circuit

2) To consider non linearities in the core, useful for:


Harmonic distorsion studies Transformer inrush studies Ferroresonance phenomena studies


78

26

13/02/2010

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
Flux linkage

Mag. Current

Im1

Im2

79

Saturation in Classical approach


User define parameters for the curve V (Is):

Knee voltage (generally 1.15 to 1.25 pu) Slope: Air core reactance (generally
2*leakage reactance)

Dynamic y a c pa parameters a ete s ( (Time e co constants) sta ts)

80

VII Rotating g Machines in PSCAD

81

27

13/02/2010

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 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
82

Electric Machine Simulation


Represented as a system of coupled coils eg: Salient pole synchronous machine 6 coils

Inductance Matrix [L] with rotor position dependent inductances

83

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 p inefficiency y The inductance matrix is converted from the a-b-c phase reference frame to d-q-0 frame: Park Transformation Mathematical transformation Symmetrical windings and linearity assumed Saturation is represented separately

84

28

13/02/2010

Electric Machine Simulation


Machine data for simulation:

Obtained from tests or given by manufacturer In a form suitable to be used in d-q based models: Generator Generator data format format: : Classical parameters : Reactances and Time constants: D axis: Xd,Xd,Xd,Td0,Td0 Qaxis: Xq,Xq,Xq,Tq0,Tq0

Equivalent circuit data format: Reactances and Resistances for d-axis and q-axis equivalent circuit

85

Shaft Torsional effect modelling


Interaction of the electrical and mechanical systems => Multimass model connected to Synchronous generator

T12 Te := J1

d w1 + D1 w1 + D12 ( w1 w1) dt

T12 := k12 ( 2 1) k12 ( 2 1) Te D1 w1 := J1 d w1 dt

86

Synchronous 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: Define V0 and 0 corresponding to the desired working point (P = 3*E*V* Sin /X), the corresponding Ef0 is computed by PSCAD 2) Then, enable the machine at locked rotor: Ef0 is now an input for the machine exciter, the corresponding Tm0 is computed 3) Then, enable the machine in normal mode, Tm0 is now an input, the machine mechanical dynamics is enable
87

29

13/02/2010

VIII Transmission Lines & PSCAD

88

Transmission Lines

Selection of a suitable model:


Available data: Geometric data or Parameters Speed of simulation: Time step Li length: Line l th From F several l meters t to t hundred h d d of f Kms K Type of study: Fast transient, Low transient, RMS Accuracy

89

Representing Transmission Lines


Equivalent circuit model:

Travelling wave models:

90

30

13/02/2010

Equivalent circuit model


R,L

R,L and mutual inductances between wires

Lumped parameters model Travel time became small (compared to time step) up to several Kms
91

To use for very short lines

Travelling Waves model


Travelling wave models: Propagation delay between sending end and receiving end From several to hundred of Kms

Bergeron Model: Accurate at a single frequency => for Rms or low transient studies (fault analysis)

Frequency 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)
92

Travelling wave models


User represents:

The geometry of the corridor Sag, ground wires Conductor Co ducto resistivity es st ty Ground resistivity

93

31

13/02/2010

Travelling wave models


Before the global simulation of the system, the parameters of the lines are computed : Line Constans Programs

Compute equivalent Shunt admittance Y and Series impedance Z Reduced to Nth order Transfer functions Curve Fitting for the frequency spectrum chosen by user

For Bergeron model, Manual entry is possible:

94

IX User Component p

95

EMTDC: Simplified Solving Process


t0
Master DYNamics Subroutine

DSDYN Network Solution t1 =t0+t DSOUT

OUTput Subroutine

Output plots (meters, graphs)

96

32

13/02/2010

EMTDC: Simplified Solving Process


DSDYN: Solves control systems which will be used for the
electrical network drive at the same time step

Network Solution: Solves electrical systems : [i] = [Y] [v]

DSOUT: Same structure as DSDYN but specific use:


Solves control systems which will be used for the electrical network drive at the following time step Computes quantities to be displayed in Meters & Graphs

97

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) User U code d directly di tl inserted i t d in i DSDYN or DSOUT sections: ti 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
98

Create a component: General Steps

1) Create a library 2) Define the interface of the component 3) Parameterize your component 4) Define the Code

99

33

13/02/2010

Create your own Library


First, you can preparate your own library:

Then save it, open the file and create your components
100

Create the component


The component wizard is opening:

Indicate:

The name of the component

The number of connections

101

Create the component


Indicate:

The connection name The type of the connection: Electrical or C t l quantity Control tit (input (i t or output) The type of the data: Logical, Real, Integer The dimension (can be an array of several values)

102

34

13/02/2010

Create the component


Confirm...

... then you obtain something like this:

103

Parametrize your component


Edit Definition

You access to a new window: the component workshop , then select the tab parameters

104

Parametrize your component

Select New Category

Choose the name of your parameter

105

35

13/02/2010

Parametrize your component

Define New control

Then, choose the type of variable that the user will have the possibility to enter:

Text Input Field (one value) Choice Box


106

Parametrize your component

Specify:

The elements to be displayed in the parameter box (size, title, default value..) The data type

107

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

108

36

13/02/2010

Define the Code


In the component workshop window, select the tab Script

The code is organized in different sections called segment :

Each segment has its proper syntax (based on Fortran & PSCAD script)

109

Segments

Fortran: Design code or call subroutines defined in external *.f files Branch: To design electrical branches containing R,L or C Computations: for precomputations (compiled only at the first time step) DSDYN: Fortran code forced in the DSDYN sections, DSDOUT Fortran DSDOUT: F t code d forced f d in i the th DSDOUT sections ti Transformers: Syntax adapted to simply design mutual impedance matrix Checks: T-Lines: etc.

110

The STORx arrays


The STORx arrays are storage vectors allowing to store variables at a precise location:

STORI,STORF,STORL,STORC for integer, real, logical or complex p data

Useful if : A variable needs to be available for another time step A variable needs to be used in another subroutine

111

37

13/02/2010

The STORx arrays


To use STORx arrays need to increment the corresponding NSTORx pointers:

NSTORI, NSTORF, NSTORL, NSTORC Example:

Retrieve values from STORF: Xa = STORF(NSTORF) Save values in STORF : STORF(NSTORF) = Xb Increment the pointers: NSTORF = NSTORF + 1

112

X Organizing g g the Worksheet

113

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 Subpage2 Subpage 2_1 Subpage 2_2

Subpage 1

114

38

13/02/2010

Create sub_page
Operating Mode: Step 1 [Right Click] in the main page, the following menu appears:

Select Create New component

115

Create sub_page
Step 2: The component wizard is opening: Indicate: the name of the subpage The number of connections between the sub_page and the main page Tick Page Module
116

Create sub_page
Step 3:

Indicate: The connection name The type of the connection: Electrical or Control q quantity y (input or output) The type of the data: Logical, Real, Integer The dimension (can be an array of several values)

117

39

13/02/2010

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 main i page are realized li d with ith the th following component called External Electrical Node :

Note : This electrical node must have the same name as the one declared during the sub_page creation
119

Create sub_page
Links between pages : Control quantity Control quantities defined in the main page (declared as input during the connection d fi iti ) has definition) h to t be b imported i t d in the sub_page with the IMPORT component Notes: 1) Above, the imported value is an array of 4 reals 2) Similarly, we use the export component to export outputs in the main page
120

40

13/02/2010

XI MATLAB-Simulink interfacing g

121

Matlab/Simulink Interfacing: General features


Cosimulation: Possibility to integrate Matlab files and all the functionnalities of Simulink toolboxes in a PSCAD project General organization: 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
122

Matlab files Interfacing

Need to define a user_component to interface PSCAD & MATLAB :

Variable defined in the PSCAD circuit

User_component: Send PSCAD data to a *.mdl file

Output of the *.m file, sent to the PSCAD project


123

41

13/02/2010

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 p g path, p , then, , the user_component p file and the corresponding will be more flexible & able to call other files

124

Matlab files Interfacing: Operating Mode


Step 3: Write the fortran Code 1) Open the DSDYN segment 2) Allocate Memory : Exemple with a case with 2 real inputs A&B and 1 integer ouput C: #STORAGE REAL:2 INTEGER:1 3)Transfer the input variable to STORF (real) / STORI (integer) arrays : STORF(NSTORF) = $A STORF(NSTORF+1) = $B
125

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: $C = STORI(NSTORI) 6) Increment the NSTORF & NSTORI index pointers: NSTORF = NSTORF + 2 NSTORI = NSTORI + 1
126

42

13/02/2010

Simulink files Interfacing


Need to define a user _component to interface PSCAD & SIMULINK :

Variable defined in the PSCAD circuit

Output of the *.mdl file, sent to User_component: Send the PSCAD PSCAD data to a *.mdl file project
127

Simulink files Interfacing: Operating Mode


The same as for Matlab files excepted : 1) Call of the SIMULINK SUBROUTINE : CALL SIMULINK_INT ( $Path , $Name , I R(31) , R ) 2)You do not need to transfer Output variable from STORF/STORI arrays

128

43

You might also like