Emtdc Manual v4 6
Emtdc Manual v4 6
USER'S GUIDE
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 Hydro International Ltd.
EMTDC™ is a trademark of Manitoba Hydro, and Manitoba Hydro International Ltd. is a registered user.
Microsoft Windows XP, Windows 7, Vista, Developer Studio are the registered trademarks or trademarks
of Microsoft Corporation in the United States and other countries.
UNIX is a registered trademark in the United States and other countries licensed exclusively through
X/Open Company.
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.
Other product and company names mentioned herein may be trademarks or registered trademarks of
their respective holders.
Print history:
EMTDC is most suitable for simulating the time domain instantaneous responses (also popularly known as electromagnetic
transients) of electrical systems.
The power of EMTDC is greatly enhanced by its state-of-the-art Graphical User Interface called PSCAD. PSCAD allows the user to
graphically assemble the circuit, run the simulation, analyze the results, and manage the data in a completely integrated graphical
environment.
What is EMTDC?
EMTDC (which stands for Electromagnetic Transients including DC) represents and solves differential equations (for both
electromagnetic and electromechanical systems) in the time domain. Solutions are calculated based on a fixed time step, and its
program structure allows for the representation of control systems, either with or without electromagnetic or electromechanical
systems present.
The first lines of code were written in 1975, at Manitoba Hydro by Dennis Woodford (Technical Director of the Centre 1986 - 2001),
out of a need for a simulation tool that was sufficiently powerful and flexible to study the Nelson River HVDC power system in
Manitoba, Canada.
Following the success of this study, development of the program continued through the next two decades. Over this time, a full
spectrum of professionally developed models was eventually accumulated (as needed for various simulation projects) - in addition
to various enhancements to the actual solution engine itself.
EMTDC now serves as the electromagnetic transients solution engine for the PSCAD family of products. PSCAD is used extensively
for many types of AC and DC power simulation studies, including: Power electronics (FACTS), sub-synchronous resonance and
lightning over-voltages (to name a few).
EMTDC results are solved as instantaneous values in time, yet can be converted into phasor magnitudes and angles via built-in
transducer and measurement functions in PSCAD - similar to the way real system measurements are performed.
Since load-flow and stability programs work with steady-state equations to represent the power system, they can output only
fundamental frequency magnitude and phase information. EMTDC can duplicate the response of the power system at all
frequencies, bounded only by the user-selected time step.
The following is a sample of the types of studies routinely conducted using EMTDC:
Contingency studies of AC networks consisting of rotating machines, exciters, governors, turbines, transformers,
transmission lines, cables, and loads
Relay coordination
Sub-synchronous resonance (SSR) studies of networks with machines, transmission lines and HVDC systems
Control system design and coordination of FACTS and HVDC; including STATCOM, VSC, etc.
Variable speed drives of various types, including cycloconverters and transportation and ship drives.
Industrial systems including compensation controllers, drives, electric furnaces, filters, etc.
Investigate the pulsing effects of diesel engines and wind turbines on electric networks.
Virtually all power system models and techniques used in other EMTP-type programs are available in EMTDC. Some of the major
differences between EMTDC and the other programs are listed as follows:
Preparation and testing time is reduced due to the PSCAD Graphical User Interface.
In EMTDC, many series and parallel electric elements are mathematically collapsed (such as an RLC branch) to reduce the
amount of nodes and branches.
The Optimal Ordering algorithm in EMTDC serves to increase LDU matrix decomposition speed.
The Optimal Switch Ordering algorithm ensures that switching operations are very fast and efficient by moving switching
elements to optimal conductance matrix positions.
EMTDC utilizes subsystems, which takes advantage of the fact that the numerical solution of electric networks, separated
by travelling wave transmission lines, are mathematically independent.
An Interpolation algorithm is used in EMTDC to perform switching operations. This allows any switching event to occur at
the exact switching instant, even if this instant is between time steps. This allows EMTDC to run at a larger time step
(faster), yet maintain accurate results. Also, additional snubber circuits are not needed to address inherent numerical
troubles.
EMTDC uses a Chatter Removal algorithm (related to the Interpolation algorithm) to remove these unwanted oscillations.
EMTDC does not restrict how circuit elements can be combined: Users can place any number of switching elements,
sources, etc. in series or in parallel.
EMTDC switching devices and sources can be ideal (i.e. 0 resistance) or non-ideal (where the user can enter the on/off
resistance values).
The EMTDC program takes advantage of the new Fortran 90/95 standard, which allows it to dynamically allocate memory
at the beginning of each run.
Initialization of systems with a Snapshot File. This initialization technique is very fast, and works for very large systems. It
is the only practical method when highly non-linear systems (such as systems with HVDC and power electronics) are
represented.
Full-time, professional support services are provided for EMTDC by the Manitoba Hydro International Ltd.
These computer programs were supposedly structured to anticipate, as the programmers hoped, the every need of the technical
user. Model construction and variation was accomplished by data entry. Unfortunately, it was impossible to anticipate all
needs. Developments in power system technologies out-sped advancements in the computer programs. Because of these
limitations in program flexibility, the programs always lagged in representation of the emerging power system. The creative
potential of the technical specialist could not be fully realized with such program modeling restrictions.
Change was on the way: Minicomputers and later personal computers came on the scene with new operating systems, which made
all the hocus-pocus associated with using large scientific programs on the old mainframes, obsolete. Virtual memory replaced
overlays. New graduates, no longer intimidated by the computer, were more than capable of dealing with any programming
situation. Today, the technical expert has control over both the computer and its programs and is intimately involved in adapting
both hardware and software to meet his/her requirements for investigation and analysis.
EMTDC was developed for this new and more acceptable environment, first specifically for UNIX/Linux, and then on to Microsoft
Windows operating systems. Model building of control and electric systems is no longer defined entirely by data entry – with the
program hidden, untouchable somewhere in the depths of the computer memory: Now the model is created by user Fortran
statements. Time domain model components, such as AC machines, exciters, six-pulse valve groups, etc., are modularized into
subroutines for easy assembly by the user. The user is able to build his or her subroutines, if and when models are not available.
With the advent of PSCAD, the graphical user interface for EMTDC, there is for the most part, no longer any need for the user to
build his/her own subroutines through coding. Subroutine assembly and insertion into EMTDC is now performed automatically by
PSCAD. The responsibility of the user has been reduced to graphically assembling a given network, and in some cases, adding some
user-defined code. However, there may still be a need in some instances, such as the conversion of older subroutines, where a good
knowledge of the internal structure and methods of EMTDC is important.
An EMTDC simulation begins at a specified start time and finishes at a specified end time. Between these two times, the program
performs the same sequential process iteratively, each iteration incrementing the time by a specified interval. This interval is
referred to as a time step, which remains constant (i.e. fixed) during the course of the simulation.
As illustrated by Figure 2-1, the core solution process begins and ends with the system dynamics. First, variables are initialized and
stored in BEGIN. Dynamic functions are performed in DSDYN, which includes the preparation of electric network devices such as
sources, etc., as well as the manipulation of control signals. The electric network is solved and the resulting measured quantities are
considered, along with any post-solution processing requirements, in DSOUT, before the time step is incremented.
Of course, the complete EMTDC solution sequence is more involved than that shown in Figure 2-1. There are several other features
present that ensure solution accuracy and speed; all of which are discussed in the following sections. A more complete program
process is illustrated in Figure 2-2.
Essentially a Fortran program in its own right, the system dynamics is built according to customizable specifications. These
specifications are normally provided through PSCAD, in the form of components and modules. Components and modules are
graphical representations of how the final program is to be structured, where each module, including the main page, is represented
by a unique Fortran file. This file consists of declarations for a DSDYN subroutine, a DSOUT subroutine, and two BEGIN
subroutines. Components always exist within modules, so as such they represent inline code that combines to define the contents
of each subroutine.
Of course, some components are electrical in nature and hence provide information for the construction of the electric network as
well. This information is collected and inserted into a Data file, where each module in a project possesses its own unique Data
file. Data files are discussed in more detail later on in the section entitled Electric Network Solution.
When it pertains to source code insertion into the system dynamics, there is no difference between DSDYN and DSOUT, besides
their sequence in the solution process. However, there are specific uses for each, and certain code may be more optimally utilized
when it is placed in one, rather than the other. For example, DSOUT is primarily used to define output variables directly following
the electric network solution. Of course, DSDYN could be used for this purpose as well, but the same output variables would be
delayed, due to the time step increment between DSOUT and DSDYN (see Figure 2-1). Likewise, variables controlling electric devices
(i.e. network input variables) are best defined in DSDYN, as then updates will occur in the same time step before the network
solution.
Component source is inserted in either DSDYN or DSOUT, depending on what the component is connected to. Decisions are made
by an involved internal algorithm in PSCAD, which ensures that both feedback and feed-forward signals are properly sequenced,
minimizing time delays. However, component source may also be forced into either DSDYN or DSOUT at the user’s discretion. To
force source script into a specific subroutine, use either the DSDYN or DSOUT script segments. To utilize the internal algorithm, use
the Fortran script segment. For more details on these segments, see the section called Segment Types in the Component Design
chapter of the PSCAD Manual.
EXAMPLE 2-1:
With the above configuration, the comparator output signal will contain a single time step delay. This is due to the fact that the
comparator dynamics in DSDYN (i.e. the code that determines its output state) are using a measured voltage Ea, defined in
DSOUT. Since the comparator output state is based on the comparator inputs, the output will appear to have been delayed by one
time step.
This delay can be removed simply by forcing the comparator dynamics code from DSDYN to DSOUT. This will force the comparator
to consider the measured voltage within the same time step, when determining its state.
The primary purpose of BEGIN source is to ensure that variables required for a particular component instance, are initialized and
stored for use later during runtime. All components with BEGIN subroutine source will have their variables stored in sequence
(according to where the component source appears in the system dynamics), to be later accessed in the same sequence during the
main runtime loop. Component parameter values are thereby unique for each instance. This enables components that are defined
as part of a module definition, to retain different parameter values in different instances of that module.
For example, Listing 2-1 illustrates snippets of code taken from a module Fortran file. The module contains an instance of the PI
Controller component from the master library. Notice that in the BEGIN section, data is stored (in this case the initial output value),
and then extracted again in the same sequence during runtime in the DSDYN subroutine.
Listing 2-1 - Variables Stored Sequentially in BEGIN and then Extracted During Runtime
See EMTDC Storage Arrays in the chapter entitled Custom Model Design for more details.
Components existing within a module are combined to define the subroutine body, by insertion of their script inline, according to
their sequence and placement on the module canvas: The actual source code is extracted from components, derived from definition
script that exists in either the DSDYN, DSOUT or Fortran segments. Figure 2-4 and Listing 2-2 combine to illustrate this concept.
SUBROUTINE DSDyn()
!...
RT_2 = 60.0
RT_1 = STORF(NSTORF)
RT_4 = SIN(RT_1)
RT_3 = COS(RT_1)
RT_1 = RT_1*BY180_PI
NSTORF = NSTORF + 1
RT_6 = PI_BY180
! 40:[mult] Multiplier
!...
RETURN
END
Listing 2-2 – Snippet of Inline Code from Module Fortran File (DSDYN Subroutine)
Figure 2-5 and Listing 2-3 illustrate how system dynamics files would be prepared upon building an example project. The project
shown consists of the default Main module, which harbours two instances of a module called Module_1 along with a single instance
of a component called Comp_1. Module_1 itself contains a single component instance called Comp_2.
! !
! !
!... !...
! !
! 10:[Module_1] ! 10:[Comp_2]
! 20:[Module_1] !
! 30:[Comp_1] !
... RETURN
! END
!... !
! SUBROUTINE Module_1Out()
RETURN !
END !...
! !
! ...
!... !
! !...
! 10:[Module_1] !
! 20:[Module_1] END
CALL Module_1Out() !
... !
! !...
!... !
! ! 10:[Comp_2]
RETURN ...
END !
! !...
SUBROUTINE DSDyn_Begin() !
! RETURN
!... END
! !
! 20:[Module_1] !...
CALL Module_1Dyn_Begin() !
! 30:[Comp_1] ! 10:[Comp_2]
... ...
! !
!... !...
! !
RETURN RETURN
END END
SUBROUTINE DSOut_Begin()
!...
! 10:[Module_1]
CALL Module_1Out_Begin()
! 20:[Module_1]
CALL Module_1Out_Begin()
! 30:[Comp_1]
...
!...
RETURN
END
Main.f Module_1.f
Note that although there are two instances of Module_1, they are both based on the same definition (i.e. Fortran file). Modules
with multiple instances can still be unique however, through the use of its argument list. Subroutine arguments are used to pass
both port connections and module input parameter values.
EXAMPLE 2-2:
Consider a user-defined module, which represents a 3-phase, 2-winding Y- The module canvas consists simply of a 3
Phase 2 Winding Transformer component from the master library, set as Y- 1 resistance connected to the common of the
primary winding. It is required that this components 3 Phase Transformer MVA input parameter be changeable on a per-module
instance basis.
If this module is to be multiply instanced, then all components forming the module must be Runtime Configurable. Fortunately, the
transformer component used in this module is such. To be runtime configurable means that components will make use of the BEGIN
section of the system dynamics if required. However, only those component input parameters defined as Constant or Variable may
be adjusted on a per-module instance basis (Literal parameters cannot).
The 3 Phase Transformer MVA input parameter in the 3 Phase 2 Winding Transformer component is fortunately defined as a
Constant. Therefore, in order to allow adjustment of this parameter on a per-module instance basis, an input parameter will need to
be defined for the module itself, and the parameter value imported onto the canvas. A Constant type module parameter with
Symbol name tx_mva is created and given a value of 100.0 MVA. Its corresponding Import tag is added to the canvas. The value of
the 3 Phase Transformer MVA input parameter in the 3 Phase 2 Winding Transformer component is also entered as tx_mva.
! -1:[my_tx]
CALL my_txDyn(100.0)
The my_tx.f file will also contain four subroutines, representing the my_tx module. These are: my_txDyn, my_txOut,
my_txDyn_Begin and my_txOut_Begin. Making up the body of these subroutines will be the extracted code from the components
defining the module (in this case mainly the 3 Phase 2 Winding Transformer).
Now let’s consider what happens if a second instance of the my_tx module is created, and its input parameter given the value of
200.0 MVA. Following rebuild, the project will still have only two Fortran files associated with it. This is because there are still only
two module definitions. However, the second instance of the my_tx module will result in an additional call to the my_tx subroutines
in the Main.f file.
! -1:[my_tx]
CALL my_txDyn(100.0)
! -1:[my_tx]
CALL my_txDyn(200.0)
Listing 2-5 – my_tx Module Call in Main.f Subroutines (Two Instances of Child Module)
Note this time how the module parameter values differ between calls. This is because of the change in value for the second instance
of the my_tx module.
Runtime Configuration
In system dynamics terms, each module instance is represented by a call to its corresponding subroutine (one call within each
dynamics section). The calls will always be located within the subroutine body of its parent module. In most cases, the Main
module is the top-most parent. However other modules can act as parents if the project hierarchy is more than two levels deep.
In many cases, it is possible that certain component input parameters may be dependent on the instance of the module in which the
component resides. That is to say that one or more parameters may differ depending on the calling point of the module subroutine
in the system dynamics. This is where the BEGIN subroutine and its inherent storage arrays come into play.
Consider a user-defined module, which contains the simple control circuit illustrated below.
The canvas contains a single master library component called Exponential Functions, which can be adjusted to represent exponential
functions of base 10 or base e (in this case it is set to base 10). The component will also accept values for a base coefficient A, as
well as an exponential coefficient B. These two component input parameters are both of type Constant and are described as
Coefficient of Base and Coefficient of Exponent respectively.
There are two port connections defined for the module: One is an input connection called exponent, which represents the value of
the exponent itself; and output, which is the result of base 10 taken to the exponential value. There are also two module input
parameters called Base Coefficient and Exponential Coefficient with Symbol name coeff_A and coeff_B, which import the parameter
values onto the canvas.
The above described system will allow the module itself to be instantiated many times, with each instance able to possess unique
values for both the exponent and the two coefficients. For example, let us create a second instance of this module and place them
both in a circuit on the main canvas as shown below.
!...
! Subroutine Parameters
! Control Signals
!...
coeff_B = coeff_B_
coeff_A = coeff_A_
!...
RTCF(NRTCF) = coeff_A
RTCF(NRTCF+1) = coeff_B
NRTCF = NRTCF + 2
RETURN
END
!...
! Subroutine Parameters
REAL output_
! Control Signals
!...
exponent = exponent_
coeff_B = coeff_B_
coeff_A = coeff_A_
!...
NRTCF = NRTCF + 2
!...
RETURN
END
EXAMPLE 2-4:
Consider the circuit described in Example 2-2. The 3 Phase 2 Winding Transformer component is runtime configurable because it
comes complete with BEGIN section source. The DSDYN segment in its definition contains a #BEGIN directive block, which specifies
that the script within the block is to be inserted into the BEGIN section of the system dynamics. Since this directive is located in the
DSDYN segment, the script will be inserted specifically into DSDYN subsection of BEGIN (i.e. the my_txDyn_Begin subroutine).
#BEGIN
RVD1_1 = ONE_3RD*$Tmva
RVD1_2 = $V1~
RVD1_3 = $V2~
CALL E_TF2W_CFG($#[1],$Ideal,RVD1_1,$f,$Xl,$CuL,RVD1_2,RVD1_3,$Im1)
CALL E_TF2W_CFG($#[2],$Ideal,RVD1_1,$f,$Xl,$CuL,RVD1_2,RVD1_3,$Im1)
CALL E_TF2W_CFG($#[3],$Ideal,RVD1_1,$f,$Xl,$CuL,RVD1_2,RVD1_3,$Im1)
RVD1_5 = 0.0
RVD1_6 = 0.0
IVD1_1 = 0
ELSE
RVD1_6 = $NLL
RVD1_4 = 6.0/($Tmva*RVD1_6)
RVD1_6 = RVD1_4*RVD1_3*RVD1_3
IVD1_1 = 1
ENDIF
CALL E_BRANCH_CFG($BR11,$SS,IVD1_1,0,0,RVD1_5,0.0,0.0)
CALL E_BRANCH_CFG($BR12,$SS,IVD1_1,0,0,RVD1_5,0.0,0.0)
CALL E_BRANCH_CFG($BR13,$SS,IVD1_1,0,0,RVD1_5,0.0,0.0)
CALL E_BRANCH_CFG($BR21,$SS,IVD1_1,0,0,RVD1_6,0.0,0.0)
CALL E_BRANCH_CFG($BR22,$SS,IVD1_1,0,0,RVD1_6,0.0,0.0)
CALL E_BRANCH_CFG($BR23,$SS,IVD1_1,0,0,RVD1_6,0.0,0.0)
CALL TSAT1_CFG($BRS1,$BRS2,$BRS3,$SS,RVD1_1,
#IF SAT==1
+RVD1_2,
#ELSE
+RVD1_3,
#ENDIF
+$Xair,$Xknee,$f,$Tdc,$Im1,$Txk)
#ENDBEGIN
SUBROUTINE my_txDyn_Begin(tx_mva_)
!...
! Subroutine Parameters
REAL tx_mva_
! Control Signals
REAL tx_mva
!...
RVD1_1 = ONE_3RD*tx_mva
RVD1_2 = 230.0*SQRT_1BY3
RVD1_3 = 230.0
&4)
&4)
&4)
RVD1_5 = 0.0
RVD1_6 = 0.0
IVD1_1 = 0
ELSE
RVD1_6 = 0.0
RVD1_4 = 6.0/(tx_mva*RVD1_6)
RVD1_5 = RVD1_4*RVD1_2*RVD1_2
RVD1_6 = RVD1_4*RVD1_3*RVD1_3
IVD1_1 = 1
ENDIF
&1_1,RVD1_2,0.2,1.25,60.0,1.0,0.4,0.1)
RETURN
END
Within the my_tx Dyn_Begin subroutine (i.e. the BEGIN section of the system dynamics), the entire contents of the #BEGIN directive
block can be found. This chunk of code contains calls to subroutines internal to EMTDC, which perform variable initialization and
storage so as to ensure that the 3 Phase 2 Winding Transformer component is indeed runtime configurable.
Network Solution
Unlike the system dynamics, the electric network is not constructed according to module hierarchy or a particular
sequence. Fundamentally, the electric network solution is a straightforward number crunch, which solves a vector of currents I for a
given vector of voltages V and a matrix of conductances G. In other words:
(2-1)
Electric network parameters, such as node and subsystem numbers, are defined automatically by PSCAD, according to how the
network is graphically constructed. This information is compiled and summarised into files for use by EMTDC.
Data File
The Data file is used solely by the electric network solution for input – each module definition in a project will be represented by a
unique Data file. Information regarding node and branch placement, the type of branch elements used, what their values are, etc.,
is stated in this file. Transmission line and transformer information, as well as information specified in component Model-Data
segments, is also listed in this file.
!---------------------------------------
! Local Node Voltages
!---------------------------------------
VOLTAGES:
1 0.0 // NT_2
2 0.0 // NT_4
!---------------------------------------
!---------------------------------------
BRANCHES:
The second and third branches are defined as being switching branches (RS) with an OFF resistance of . The last branch is an
ideal voltage source (RE), indicated by the 0.0 resistance.
The following table summarizes the symbol definitions used in the Local Branch Data section:
R Resistance
L Inductance
C Capacitance
S Switching branch
E Source branch
Table 2-1 – Symbols Used in the Local Branch Data Section of the Data File
Combinations of the symbols in Table 2-1 will appear if a particular branch contains more than one element. For example an
inductive source branch would appear as LE.
!---------------------------------------
!---------------------------------------
TRANSFORMERS:
2 / Number of windings...
4 5 0.0 1.51547336812 /
888 /
56/
20/
888 /
64/
10/
The next two un-commented lines define the R and L values of the mutual inductance matrix in the following format:
R11 L11
The 888 symbol signifies that the following lines will have the same values as those above, with different local node number
connections.
Map File
The Map file is used to display information common to the entire project, as well as to act as the link to map each Data file
together. Its key role is to provide node look-up table information so as to convert the local node number index from each module
to a global one.
This feature is critical to allow for incremental builds. That is without it, EMTDC would require a complete re-build for each circuit
change.
Dimensioning Information
The Dimensioning Information section of the Map File simply lists how the PSCAD Project File has been dynamically dimensioned. An
explanation of the dimensions listed is given in Table 2-2:
Dimension Description
PGBS *Obsolete*
Runtime Parameters
The Runtime Parameters section summarizes information regarding the actual simulation, as well as details on the advanced option
configuration for the project. The definitions of these are summarized in Table 2-3:
Dimension Description
ECHO_DATA Write data file and map file information to the message tree
!-----------------------------------------------------------------------
SUBSYSDIM:
2 9 6
SUBS:
4 1 2 1 2
0 6 1 2 3 1 2 3 /
0 2 1 1 1 2 2 2
MAP: "SS_1.dta" !
0 9 1 2 3 4 5 6 7 8 9 /
1 1 1 1 1 1 1 1 1 1 1
MAP: "SS_2.dta" !
0 6 1 2 3 4 5 6 /
2 1 2 2 2 2 2 2
Listing 2-13 – Subsystem and Node Mapping Information Section of Map File
The SUBSYSDIM heading lists the total subsystems in the project, along with the dimensions of each. The MAP heading lists all node
numbers and their corresponding subsystem directly beneath.
For example, the above indicates that the main page contains a total of 6 electrical nodes and a total of 2 subsystems. The electrical
nodes are numbered separately according to the subsystem in which they reside (that is, each node number has a corresponding
subsystem number directly beneath it). Note that the main page itself is not considered a subsystem, and is therefore listed as
subsystem 0.
!---------------------------------------
!---------------------------------------
3 0
1321
2156
TLINE-INPUT-DATA FLAT230.tli
TLINE-OUTPUT-DATA FLAT230.tlo
Listing 2-14 indicates that a single global transmission line (i.e. lines whose endpoints span multiple modules) exists in this
project. The first data line includes a 3 and a 0: The 3 indicates the number of conductors on this line. The first number, in the
second and third data lines, indicates the subsystem number. The remaining numbers represent the sending and receiving end,
local node numbers respectively.
Finally, the respective transmission line input and output file names are shown.
There are generally two ways to start a simulation: Start from time zero with no initial conditions (i.e. start from the Data file
created when the project is compiled) or start with pre-calculated initial conditions imposed on some or all elements. In PSCAD,
starting a simulation with initial conditions is achieved by using a Snapshot File.
The Snapshot file method can be used to impose initial conditions on energy storage devices (i.e. capacitors and inductors), or
memory functions involving integration when present in a simulation.
EXAMPLE 2-5:
As a simple example, suppose you wish to study the effects of inductance on the diode decay current if the switch in the circuit of
Figure 2-11 opens at time t = 0.1 s.
Depending on the size of the inductance, it will take a finite amount of time for this simple circuit to reach steady state (if started
from time zero). When the switch does actually open, the current flowing in the inductor will decay through the freewheeling
diode. In order to study the effect of the inductor size on the decay time of the current, the simulation may need to be rerun many
times. Since the time to reach steady state would be of no consequence to the study, then removing this time would be
advantageous in reducing the total simulation time.
This can be accomplished in EMTDC by taking a snapshot at a time just previous to the switch opening. Subsequent runs could be
started from this snapshot file, which would have stored, among other values, the current flowing in the inductor at the time of the
snapshot.
Example 2-5 is a very simple illustration for the use of the snapshot file, where the time to reach steady state would be in the order
of milliseconds, and of not much importance. However, snapshot files become advantageous when highly non-linear systems such
as DC converters are present in the case, or when saturation is evident in machines and transformers. Initialization calculations in
these situations can become horrendous to contemplate.
NOTE: Watch out for model instabilities. If instabilities are present, the project may never reach steady state (or at least
an excessive amount of computer time may be needed to do so).
Multiple Runs
EMTDC features the ability to automatically perform multiple simulations on the same case, while changing one or more variables
each run. For example, in non-linear models such as DC transmission links, it is possible that control system gains and time
constants can be sequentially or randomly searched to find an optimum response to a disturbance. Similarly, if a transmission line is
being switched, or a transformer is to be energized, a search for peak voltages can be undertaken by varying point on wave
switching.
Depending on the amount of variables sequenced, this feature can be time consuming, and may need to be relegated to overnight
or over the weekend computations. Nonetheless, it is a powerful technique, especially when peak values or optimum performance
of highly non-linear systems is being sought after.
If one of the components is used, it will automatically set the number of runs depending on the selected variation method. More
than one these components can exist in the same circuit, as long as only one of them is enabled.
PSCAD enables any of the selected EMTDC output variables to be plotted on-line. The on-line plotting feature provides a substantial
benefit to the user who can observe the simulation results as they are computed. The on-line plots can be manipulated in PSCAD
once the simulation is complete, or if EMTDC Output Files have been generated, the output traces can be analyzed using available
post-processing graphing software.
Output Files
Output files are formatted text files, which organize the output channel data into columns. Each column, except the first, which is
always time, represents recorded data from a single output channel. For example, if two output channels exist (say 'Voltage' and
'Current'), then three columns of data will appear in the Output file.
Output Files are given the extension *.out and will be named by default after the project itself.
The equivalent circuits of Figure 3-1 are essentially a numerical representation of the ordinary differential equations, solved for
discrete intervals. The trapezoidal rule is used for integrating these equations for lumped inductors and capacitors. It is simple,
numerically stable, and accurate enough for practical purposes [1].
The memory function of the integration process is represented by the current source , which for the inductor is
defined as:
(3-1)
(3-2)
Time step
Current through the branch from the previous time step (node k to node m)
Thus it follows that for a given time step, the current through an inductor or capacitor branch is defined by:
(3-3)
Where,
For an inductor
For a capacitor
If an electrical branch contains more than one series element, then this branch will be 'collapsed' into an equivalent resistance and
current source, effectively removing unnecessary nodes (i.e. decreasing the size of the network conductance matrix) and enhancing
solution speed.
By the time the network is solved, the branch will be seen as an equivalent conductance. This technique is illustrated below:
Such a structure lends itself to processing by simple matrix methods. Using nodal analysis, a conductance matrix |G| is formed from
the inverse resistance value of each branch in the equivalent circuit. |G| is a square matrix, whose size is determined by the number
of nodes in the network under study. A column matrix |I| is formed where each element consists of the sum of all current sources
at a node.
EXAMPLE 3-1:
Consider a simple R, L, C two node network with its equivalent circuit as shown below:
The inductors and capacitors are replaced in each case, by an equivalent resistor and current source. The nodal equations are
formed as follows:
At node 1:
(3-4)
At node 2:
(3-5)
(3-6)
Or in short form:
(3-7)
(3-4)
EMTDC does not actually calculate the inverse of the conductance matrix |G| directly. Instead it solves using forward
triangularization and back-substitution - otherwise known as LU decomposition.
The LU decomposition method takes advantage of the sparse nature of the conductance matrix |G| (i.e., entries which are 0.0 are
not involved).
In addition to those with many states, non-linear devices can also be modeled with an additional compensating current source that
can be programmed to represent any non-linearity.
Simple Switches
There are several different methods for representing a simple switching element in time domain simulation programs [5]. The most
accurate approach is to represent them as ideal. That is, possessing both a zero resistance in the ON state and an infinite resistance
in the OFF state.
Although this approach is very accurate and the resulting equations easier to solve, the drawback is that many possible states are
created, which must each be represented by different system equations.
Consider the network of Figure 3-3 and let the resistance R12 represent a simple switch. If R12 were considered ideal, then two
different networks could result, depending on the state of the switch. This is illustrated in Figure 3-4:
Now imagine for instance, a network containing many switches (as in a 48-pulse Graetz bridge STATCOM), a great number of
different possible network configurations would result if ideal switching elements were used.
In EMTDC, simple switching devices are represented as a variable resistor, possessing an ON resistance and an OFF
resistance. Although this type of representation involves an approximation of both the zero resistance (ON) and an infinite
resistance (OFF) of an ideal switch, it is advantageous in that the same circuit structure can be maintained, and the electric network
will not need to be split into multiple networks, as a result of each switching event.
NOTE: The threshold, under which the Ideal Branch algorithm will
These important factors should be kept in mind when choosing a switch resistance:
Circuit damping should not be reduced significantly: Due to the solution being in steps of discrete time intervals,
numerical error may create less damping in the circuit than expected in reality. A small amount of additional resistance
from a closed switch, if judiciously selected, may compensate the negative damping effect in the solution method.
Non-Linear Elements
There are two methods for representing non-linear elements in EMTDC: The Piecewise Linear, and the Compensating Current
Source methods. Each method possesses its own pros and cons, and the selection of either is simply up to the user.
In order to minimize run time, a Piecewise Linear approximation method as illustrated in Figure 3-5 (a) and (b) is used. A piecewise
linear curve will introduce several 'state ranges' into the non-linear characteristic, dramatically reducing the amount of matrix
inversions per run, yet maintaining reasonable accuracy.
In EMTDC, non-linear devices, such as the Arrestor component, utilize the Piecewise Linear technique.
Care must be taken when using this method to model device non-linearities. More often than not, the compensating source will be
based on values computed in the previous time step, thereby behaving as an open circuit to voltages in the present time step. This
can create de-stabilization problems in the simulation [5]. To circumvent this problem, the compensating current source should be
used in conjunction with a correction source and terminating impedance. See Machine Interface to EMTDC and/or [5] for more
details on this concept.
In PSCAD, the compensating current source method is used to model core saturation in the Classical Transformer models.
In PSCAD, mutually coupled windings can easily be constructed through the use of transformer components. See the Transformers
segment for more details.
When EMTDC was first developed, the importance of minimizing the size of the conductance matrix, in order to efficiently represent
HVDC systems, was realized. The simulation of these systems involved (and still do) many switching operations. Each time a power
electronic device is switched in EMTDC, its resistance value changes and the conductance matrix must be re-triangularized or re-
inverted. In larger systems, with matrix dimensions in the thousands, this can substantially decrease simulation speed and
efficiency.
EXAMPLE 3-4:
Consider a 10,000 node electric network containing 50 network clusters, with 200 nodes evenly distributed in each cluster. The
number of stored elements without splitting into subsystems (i.e. one large non-sparse matrix) would be:
The number of stored elements after splitting into subsystems (i.e. 50 non-sparse matrices of 200 x 200 nodes each) would be:
Stored Elements = 200 x 200 x 50 = 2,000,000 (50 times less memory required)
When distributed transmission line or cable models are used to transmit between smaller clusters of electric networks, it is possible
to effectively split these clusters and solve them independently. Since distributed line models represent travelling waves, then a
switching operation (or source perturbation) at one end of the line, will not impact the electric circuit at the opposite end within the
same time step, but at some definable number of time steps following the disturbance. The network clusters at each end can then
be considered as de-coupled, discrete subsystems, as no off-diagonal matrix elements will appear between them. Mathematically,
this means that a separate conductance matrix can be created for each discrete subsystem and processed independently from other
subsystems and their respective conductance matrices. Figure 3-7 represents four conductance matrices representing four de-
coupled subsystems.
In PSCAD, an electric network can only be split into subsystems by using distributed transmission lines or cables.
Splitting the conductance matrix into subsystems will result, in most cases, in a sparse matrix. That is, a matrix containing zero-
elements that are not involved in the system solution (as shown above).
EMTDC does not store in the sparse format but compromises: It stores conductance matrix data in a sequential, non-sparse basis. In
other words, some zero elements of the matrix are stored, but are not considered as active subsystems. The addresses of non-zero
elements in each subsystem are stored in integer vectors, and are used to access the non-zero elements only. Keeping the storage
sequential may not be the most memory efficient method possible, but it has performance advantages: Disk/RAM/cache transfers
can be streamed more effectively by the Fortran compiler, compared to pure 'random' allocated storage of a sparse matrix vector
quantity.
Due to the fixed nature of the time step, network events such as a fault or thyristor switching, can occur only on these discrete
instants of time (if not corrected). This means that if a switching event occurs directly after a time step interval, then the actual
event will not be represented until the following time step.
This phenomenon can introduce inaccuracies and undesired switching delays. In many situations, such as a breaker trip event, a
However, in power electronic circuit simulation, such a delay
One way to reduce this delay is to
reduce the time step. However, this will also increase the computation time proportionately, and still may not give good enough
results.
Another method is to use a variable time step solution, where if a switching event is detected; the program will sub-divide the time
step into smaller intervals. However, this does not circumvent the problem of spurious voltage and current spikes, due to current
and voltage differentials when switching inductive and capacitive circuits.
EMTDC uses an interpolation algorithm to find the exact instant of the event if it occurs between time steps. This is much faster and
more accurate than reducing the time step and interpolation allows EMTDC to accurately simulate any switching event, while still
allowing the use of a larger time step.
1. Each switching device adds its criteria to a polling list when called by the DSDYN subroutine. The main program then
solves for the voltages and currents at the end of the time step, while storing the switching device condition at the
beginning of the time step. These devices may specify a switching instant by time directly, or by voltage or current
crossing levels.
2. The main program determines the switching device, whose criteria for switching has been met first, and then interpolates
all voltages and currents in this subsystem to that instant in time. The branch is then switched, requiring a re-
triagularization of the conductance matrix.
3. EMTDC then solves for all history terms, increments forward by one time step past the interpolated point, and solves for
the node voltages. All devices are polled to see if more interpolated switching is required before the end of the original
time step.
4. If no further switching is required, one final interpolation is executed to return the solution to the original time step
sequence.
EXAMPLE 4-1:
Referring to Figure 4-2, let us consider a diode that is conducting, but should turn off when the current reaches zero. When the
diode subroutine is called from DSDYN at time step 1, the current is still positive, so no switching occurs.
If interpolation is not available (or turned off in EMTDC), a solution at time step 2 would be generated. The diode subroutine would
then recognize that its current is negative, and subsequently switch itself off for time step 3 - thus allowing a negative current to
flow through the device.
In EMTDC (with interpolation turned on), when the diode subroutine is called from DSDYN at time = 1, it still of course would not
switch the device off because the current is positive. However, because this is a switch-able branch, it would be part of a list
indicating to the main program that if the current through this branch should go through zero, it should switch the branch off before
the end of the time step.
The main program would generate a solution at time = 2 (as it did above), but would then check its list for interpolation
requirements. Since the new diode current is negative at time = 2, the main program would calculate when the current actually
crossed zero. It would interpolate all voltages and currents to this time (say time = 1.2), and then switch the diode off.
Assuming that there is no further switching in this time step, the main program would appropriately calculate the voltages at time =
ulation back on track with integral time
steps.
NOTE: DSDYN and DSOUT are still only called at times, 1, 2 and 3, yet the diode is still turned off at 1.2, so therefore no
negative current is observed.
There is one additional complication to the above procedure: A chatter removal flag (see Chatter Detection and Removal) is
automatically set any time a switch occurs. The flag is cleared as soon as an uninterrupted half time step interpolation is
achieved. In the example above, this means that an additional interpolation would be performed to 1.7 (half way between 1.2 and
2.2), a solution at 2.7, and then the final interpolation would return the solution to 2.0 as before.
To prevent an excessive number of switches in one time step, the solution will always proceed forward by at least 0.01% of the time
step. In addition, any two (or more) devices, which require switching within 0.01% of each other, will be switched at the same
instant.
As an example of the application of interpolation, a simple HVDC system, where the differences in measured alpha (at the rectifier)
for a constant alpha order is illustrated in Figures 4- While the interpolated firing
produces less than 0.001° fluctuation, the non-interpolated firing results in about 1° fluctuation. Such large fluctuations (of one or
more degrees) in firing will introduce non-characteristic harmonics and will prevent fine adjustments in firing angles. In these two
examples, EMTDC automatically interpolates the thyristor turn off to the zero crossing (negative) of the thyristor current.
HVDC systems with synchronous machines which are prone to Sub-Synchronous Resonance
Analysis of AC/DC systems using small signal perturbation technique where fine control of firing angle is essential.
Synthesizing open loop transfer functions of complex circuits with power electronic devices
For more details on interpolation, please see [6], [7] and [8].
Chatter is usually initiated by the closing of a switch in a branch containing inductors. It does not matter if the switching occurs
between time steps, or at a natural current zero [8]. Figure 4-5 illustrates the presence of voltage chatter, due to a natural turn-off
of a series thyristor/inductor, series branch.
Since chatter does not represent any electrical network behaviour, it must be suppressed. EMTDC includes a chatter detection
algorithm to continuously detect such spurious oscillations and remove them if so required. Chatter is detected by continuously
monitoring every node voltage and branch current and is assumed to be present if these quantities change direction successively for
five consecutive time steps. For example: 1.0, -0.9, 0.8, -0.7 and 0.6. In addition, the chatter detection algorithm continually
monitors for branch switching events. In this way, chatter introduced by any sudden changes in the electric network (even those not
initiated by switching events) is detected.
NOTE: If chatter detection is disabled and chatter removal is enabled, only chatter due to branch switching will be
removed. This is sufficient in most situations. The default Chatter Detection Level (CDL) is set to 0.001 pu in the PSCAD
Project properties.
Either when chatter is detected or when a switching event takes place, a chatter removal algorithm in invoked. Chatter is removed
using a half time step interpolation. The user has the option to enable or disable the chatter algorithms in PSCAD, however it is a
good practice to keep them enabled for all circuits.
For more detailed information on Chatter and its effects, please see [6] and [8].
Extrapolate Sources
Another feature related to interpolation is the Extrapolate Sources algorithm. During the process of switching and chatter removal,
it is necessary to extrapolate beyond the current time step. At an interpolated time t = t + , PSCAD will use the exact value if using
a sinusoidal voltage source (point A), rather than linearly extrapolating (point B). This is illustrated in Figure 4-6.
(4-1)
Where,
NOTE: The Extrapolate Sources algorithm is used ONLY with the Single-Phase Voltage Source Model 2 and the Three-
Phase Voltage Source Model 2.
Ideal Branches
Ideal branches are those with zero impedance. Examples of such branches are infinite voltage sources, ideal short circuits and an
ideal switch in closed state. Standard electromagnetic transient solution algorithms using a nodal admittance matrix require every
branch to possess a finite impedance. A zero impedance branch would yield an infinite admittance and would thereby lead to
numerical problems.
In EMTDC, a provision has been made to allow for zero resistances and true infinite bus voltage sources. The algorithm used permits
any combination of ideal branches - including loops. An exception to this is when two or more ideal branches, where one of these is
a voltage source: This would create an infinite current in the other parallel branches.
NOTE: The ideal branch algorithm involves extra computations. Thus, a non-
the ideal threshold) should be used wherever possible. See Switching and Non-Linear Elements for more.
This feature allows you to run an EMTDC simulation many times - each time with a different set of parameters. For example you can
run the case several times, each time with different fault or a different gain for a controller. This batch feature is ideal for
parametric optimization, determining worst point on wave fault over voltage, determining optimal relay settings etc.
Dynamic Dimensioning
EMTDC is available in two different flavours - dynamic and fixed. The fixed version, used exclusively with the free EGCS/GNU Fortran
77 compiler, comes with non-adjustable Fortran dimensions. The fixed version is pre-configured to handle a certain system size and
cannot adapt if the system size grows larger (see Dimension Limits).
The dynamic version is slightly slower than the fixed version because of the differences in the memory management model. In most
situations, this is not an issue and you are better off using dynamic version whenever possible.
External source is incorporated through the use of component objects. Components are employed in PSCAD to represent system
models; in fact, the entire master library project is composed of components. Some of these components are designed to insert
source directly into the system dynamics (i.e. BEGIN, DSDYN or DSOUT), and/or provide information for constructing the electric
network. Others link to subroutines imbedded within the EMTDC body of source, where intrinsic network and storage variables are
manipulated directly to represent complex electrical devices, such as machines and FACTS. Components are fully customizable and
may range from the very simple, which require just a few lines of code, to the very complex, represented by a combination of
several functions and subroutines.
The component concept affords flexibility in simulation design, providing a graphical interface to both EMTDC and the PSCAD project
compiler. This interface ensures that all possible aspects of the EMTDC program (customizable parts anyway) are fully accessible to
the user. After all, this design environment is the same one used by both PSCAD and EMTDC developers alike.
Intel Visual Fortran 9 to 15: This is the preferred compiler to be used with PSCAD, which supports the Fortran 95
language standard.
Comment Lines: Always use an ‘!’ character for comment lines. This is the common standard between all Fortran
language standards. Exclamation characters can appear anywhere on the line except for column 6.
Names Convention: To avoid conflicts between user-written procedure (subroutine/function) names and EMTDC
procedures, prefix the name of your procedures with an easily identifiable string such as U_ or MY_.
See Interfacing to C Language Source in the PSCAD manual chapter Component Design for details, as well as examples on this
subject.
For a summary of which header file corresponds to a particular variable, see Include Files to Include later in this chapter.
Inter Time REAL STORF(NSTORF) For floating point (REAL) storage only.
Step Data
Transfer INTEGER STORI(NSTORI) For INTEGER storage only.
Figure 5-1 - Typical Storage Array (STORF) Usage by System Dynamics Procedures
Each time step, all storage array pointers are reset to one (1) and then the main program is sequenced from top to bottom. Using
the storage array and pointer, each subroutine may write data to and read data from an array, consistent with the sequence in
which the subroutine appears in the main program. In order to avoid stored data being over-written, each subroutine must
increment the respective pointer, by the amount of storage locations used in the subroutine, before returning to the main
program. This will ensure that the pointers are in their proper positions when the next storage access is performed.
Consider a user-written subroutine that requires that two variables be stored for retrieval in subsequent time steps: Two REAL
variables X and Y and one INTEGER variable Z. The subroutine should include something similar to what is shown below:
SUBROUTINE U_USERSUB(...)
INCLUDE ′nd.h′
INCLUDE ′emtstor.h′
INTEGER Z, Z_OLD
X_OLD = STORF(NSTORF)
Y_OLD = STORF(NSTORF + 1)
Z_OLD = STORI(NSTORI)
...
! Save the variables to storage arrays for use in next time step:
STORF(NSTORF) =X
STORF(NSTORF + 1) = Y
STORI(NSTORI) =Z
NSTORI = NSTORI + 1
RETURN
END
A good habit to get into is to make a copy of the storage pointer, and update the original one. The copy is used only in the local
subroutine; therefore, if other nested functions or subroutines exist, storage pointer confusion is avoided. Using this approach, the
above example would become:
SUBROUTINE U_USERSUB(...)
INCLUDE ′nd.h′
INCLUDE ′emtstor.h′
MY_NSTORF = NSTORF
MY_NSTORI = NSTORI
NSTORF = NSTORF + 2
NSTORI = NSTORI + 1
X_OLD = STORF(MY_NSTORF)
Y_OLD = STORF(MY_NSTORF + 1)
Z_OLD = STORI(MY_NSTORI)
...
! Save the variables to storage arrays for use in next time step:
STORF(MY_NSTORF) =X
STORF(MY_NSTORF + 1) = Y
STORI(MY_NSTORI) =Z
RETURN
END
BEGIN was introduced primarily to provide Runtime Configuration support in EMTDC when components exist within modules with
multiple instances. The storage arrays used to transfer data (i.e. the RTCx arrays) are included, so as to not affect the storage
operations of legacy user-components that were created using PSCAD versions previous to X4. All master library components use
both storage array types when necessary.
To facilitate runtime configuration support (and thereby multiple instance modules support) within user-designed components, it
may be necessary to utilize the BEGIN section (and hence the RTCx storage arrays). This is normally the case if the component
requires time zero initialization.
EXAMPLE 5-2:
Consider a user-defined component that needs to store a set of two xy data points at time zero, for use later during runtime. The
data points are defined as follows:
X Y
The storage of these data points will need to occur within the BEGIN section of the system dynamics, so as to ensure that the
component is Runtime Configurable. The user decides to write a subroutine entitled U_BGN_XYPOINTS that will be called within the
BEGIN section. Note that the text BGN was added to the procedure name – this is to help identify it as BEGIN-type.
SUBROUTINE U_BGN_XYPOINTS(X,Y)
INCLUDE ′nd.h′
INCLUDE ′rtconfig.h′
RTCF(NRTCF) = X(1)
RTCF(NRTCF + 1) = Y(1)
RTCF(NRTCF + 2) = X(2)
RTCF(NRTCF + 3) = Y(2)
! (very important):
NRTCF = NRTCF + 4
RETURN
END
Now that the subroutine is defined, the user must specify to PSCAD that a call to it is to be inserted in the BEGIN section. This is
accomplished by using the #BEGIN/#ENDBEGIN directives within the component definition. See Script Directives in the PSCAD
manual chapter Definition Script if you are not familiar with these.
#BEGIN
CALL U_BGN_XYPOINTS($X,$Y)
#ENDBEGIN
#BEGIN
RTCF(NRTCF) = $X(1)
RTCF(NRTCF + 1) = $Y(1)
RTCF(NRTCF + 2) = $X(2)
RTCF(NRTCF + 3) = $Y(2)
NRTCF = NRTCF + 4
#ENDBEGIN
Now that the data is being stored in BEGIN, you will need to retrieve it during runtime. The user has written a subroutine that
defines the runtime (or the dynamic modeling) operation of the component called U_DYN_XYPOINTS. This routine includes RTCx
storage retrieval, along with STORx type arrays:
SUBROUTINE U_DYN_XYPOINTS(...)
INCLUDE ′nd.h′
INCLUDE ′emtstor.h′
INCLUDE ′rtconfig.h′
INTEGER MY_NRTCF
MY_NSTORI = NSTORI
MY_NRTCF = NRTCF
NSTORI = NSTORI + 1
TEMP = STORI(MY_NSTORI)
X(1) = RTCF(MY_NRTCF)
Y(1) = RTCF(MY_NRTCF + 1)
X(2) = RTCF(MY_NRTCF + 2)
Y(2) = RTCF(MY_NRTCF + 3)
...
STORI(MY_NSTORI) = TEMP
RETURN
END
Node Numbers
Node numbers may be accessed as follows:
Branch Current
The current flowing in a given branch can be monitored as follows:
CCIN(NN,SS) An ideal current source that sets the value of current injected
into the node NN from ground.
Table 5-6 – Intrinsic Variables for Control of an Interface to the Electric Network
NOTE: See the section entitled Interfacing to the Electric Network later in this chapter for more details.
Multiple calls to this routine from the same component may be required depending on where the warning messages are
generated. For example, if you have warning messages generated inside both the DSDYN_BEGIN and DSDYN system dynamics
routines, then you will need to call the COMPONENT_ID subroutine twice, one inside the #BEGIN/#ENDBEGIN directive, as well as
another outside in the DSDYN section. COMPONENT_ID should be called before the routine that generates the warning message.
#BEGIN
CALL COMPONENT_ID(ICALL_NO,$#Component)
!...
#ENDBEGIN
CALL COMPONENT_ID(ICALL_NO,$#Component)
!...
In Listing 5-7, ICALL_NO is used to set the component call number and $#Component sets the instance number. Both of these
arguments are predetermined by PSCAD.
EMTDC_WARN is used to generate warning messages from within user component Fortran code.
INCLUDE 'warn.h'
!...
ENDIF
!...
Listing 5-8 – Calling EMTDC_WARN from within User Component Fortran Code (Single Line)
Note that the warn.h file must be declared at the top of the component subroutine. In Listing 5-8, COMP_ID1 is used to set the
component call number and COMP_ID2 sets the instance number. Both of these arguments are predetermined from within PSCAD
using the COMPONENT_ID subroutine.
For multiple lines in the same message, use the EMTDC_WARN subroutine as follows:
INCLUDE 'warn.h'
!...
ENDIF
!...
Listing 5-9 – Calling EMTDC_WARN from within User Component Fortran Code (Multiple Lines)
Note that in both Listing 5-8 and 5-9, the 3rd argument is used to indicate to EMTDC how many lines in the message there are, and
which is the current line. Indicate the total number of lines in the message in the first call to EMTDC_WARN. Following that, a 0
represents an intermediate line, and a -1 indicates the final line.
Include Files
The previous section described only some of the most commonly used intrinsic variables in EMTDC. There are numerous others as
well, but regardless of which are utilized, the appropriate header file must be included within any external source procedure. The
inclusion of header files is not required when the component source is situated within the definition itself (i.e. the Script section) –
only external subroutines and functions.
NOTE: This is also a list of all reserved intrinsic variable names, which should not be declared locally in any user-written
models.
nd.h
This file contains important network dimensioning information, and must always be the first file included in all external procedures.
emtstor.h
Variable Name Type Description
rtconfig.h
Variable Name Type Description
RTCF(*) REAL Storage array for time zero floating point variables
TFDATA(*,*) REAL Used for passing R and L data to the classical transformer
model Runtime Configuration procedure
UMECWDGDATA(*,*) REAL Used for passing winding specific information to the UMEC
transformer model Runtime Configuration procedure
UMECTFDATA(8) REAL Used for passing general information (length ratios, areas,
etc.) to the UMEC transformer model Runtime
Configuration procedure
UMECSATDATA(10,2) REAL Used for passing saturation data points to the UMEC
transformer model Runtime Configuration procedure
CCIN(*,*) REAL Sets the value of current injected into a specified node
from ground
CDCTR(*,*) REAL Current flowing through the Mth winding of the Nth
transformer.
s1.h
Variable Name Type Description
FIRSTSTEP LOGICAL True for first step starting from the Data file or Snapshot
file
branches.h
Variable Name Type Description
IEF(*,*) INTEGER Branch number of 'from node' (positive current flows out)
IET(*,*) INTEGER Branch number of 'to node' (positive current flows in)
emtconst.h
Variable Name Type Description
PI_ REAL
TWO_PI REAL
PI2_BY3 REAL
PI_BY2 REAL
PI_BY180 REAL
BY180_PI REAL
BY_PI REAL
BY_2PI REAL
SQRT_3 REAL
= 1.732050807568877
SQRT_1BY2 REAL
= 0.707106781186548
SQRT_1BY3 REAL
= 0.577350269189626
fnames.h
Variable Name Type Description
DUMLIN CHARACTER Array used for storing current data line read
ONAM CHARACTER Output file name (channel information and/or print plots
warn.h
Variable Name Type Description
These older interfaces were hindered by the fact that their parameters were indexed by way of node number, rather than by
branch. Problems with these interfaces arose when connecting several of them in parallel. Due to the fact that each parameter was
indexed according to node, each paralleled branch would have the exact same index, and so additional steps by the user were
required to merge the branches into a single equivalent branch. Also, extracting branch specific quantities, such as branch current
was a bit convoluted.
The GEQ interface is virtually identical to the obsolete GDC interface, except that the parameter names and indexing have changed –
one of its nodes can be grounded if desired as well. Each parameter is indexed by a branch number directly, thereby enabling the
extraction of branch data more easily. The GEQ interface is illustrated below, where BRN represents the branch number and SS is
the subsystem number:
k and m are referred to as the ‘from’ and ‘to’ nodes respectively. The parameters shown in Figure 5-3 represent the electrical
functions of the GEQ interface, where EBR is an internal, ideal voltage source; GEQ and CCBR are the Dommel equivalent
conductance and history current respectively, and CBR contains the calculated branch current. These parameters are described in
more detail later on in this section.
One advantage to using the GEQ interface over say, CCIN and GGIN (described later on), is that the branch history current (CCBR) is
calculated by EMTDC automatically for LC branches. Also, the user need only provide the conductance (and other branch
information) once at the beginning of the simulation (unless of course the branch is a switching branch).
The GEQ interface can be set-up to represent any combination of series RLC passive elements, and along with its internal voltage
source, can represent network equivalents. It is also possible to set-up and control the GEQ interface to model non-linear
impedances.
The GEQ interface relies on the settings of certain parameters in order to effectively reduce a combination of elements to its
Dommel equivalent. This reduction is accomplished in two stages: First, each element is reduced to its respective Dommel
equivalent, and second, these individual circuits are merged into a single, lumped equivalent.
Figure 5-4 – Steps in the Reduction of an RLC Branch Impedance to a Lumped Dommel Equivalent Circuit
Although the process for deriving the reduced branch conductance is relatively straightforward, deriving the equivalent history
current IH is not. The history current derivation depends on combinations of ratios between individual conductance values in the
branch, which can be quite elaborate. Nonetheless, users must supply this information to EMTDC and fortunately, the GEQ interface
provides an avenue to do this easily.
BR = $A $B BREAKER 1.0
Listing 5-10 – Example Branch Section Script for a Custom Current Source and Conductance Branch
Once a branch has been designated as shown above, the user must enter specific subroutine calls within the component definition
DSDYN or Fortran segments (or directly within the user-written subroutine for the model). Within #BEGIN/#ENDBEGIN directives,
there should be a call to the CURRENT_SOURCE2_CFG routine.
CALL CURRENT_SOURCE2_CFG($BR,$SS)
Listing 5-11 – Example Code for a Custom Current Source and Conductance Branch (Configuration)
Where $BR and $SS are the predefined branch number and subsystem number respectively. This subroutine sets the internal
EMTDC variable DEFRDBR($BR,$SS) to .TRUE., which is required to enable the custom current interface using the CCBR($BR,$SS)
branch history current. If a call to CURRENT_SOURCE2_CFG is not provided, the CCBR variable for this particular branch is
ignored. CURRENT_SOURCE2_CFG also sets the branch conductance GEQ($BR,$SS) to zero, and removes this branch from being
used by the harmonic impedance solution.
In the main body of the DSDYN or Fortran segments, users must set the branch GEQ and CCBR by calling CURRENT_SOURCE2_EXE
routine.
CALL CURRENT_SOURCE2_EXE($BR,$SS,COND,CUR)
Listing 5-12 – Example Code for a Custom Current Source and Conductance Branch (Executable)
Where COND is the actual conductance value and CUR is the injected current value. If the conductance value changes at every time
step, then it is advisable to ensure that nodes A and B, as defined in the component Branch segment above, are switched node
types.
Listing 5-13 – Example Branch Section Script for a Runtime Configurable Passive Branch
BR is a symbolic branch name, $A and $B are the end nodes of the branch. The default resistance is 1.0 , inductance 0.1 H and
capacitance 1.0 F.
Once a branch has been designated as shown above, the user must enter specific subroutine calls within the component definition
DSDYN segment (or directly within the user-written subroutine for the model). Within #BEGIN/#ENDBEGIN directives, there should
be a call to E_BRANCH_CFG routine.
Listing 5-14 – Example Code for a Runtime Configurable Passive Branch (Configuration)
Where,
ER INTEGER Resistance:
0: Disable
1: Enable
EL INTEGER Inductance:
0: Disable
1: Enable
EC INTEGER Capacitance:
0: Disable
1: Enable
Care should be taken not to pass a zero or negative value to any of the R, L or C arguments. There should be conditional logic to set
the values of ER, EL and EC depending on the values of R, L and C. If ER is enabled and R value is less than the ideal threshold, then
the resistive portion of the branch would be modeled as a short. If ER, EL and EC are all disabled, then the branch is modeled as an
ideal open circuit.
There are two avenues through which the GEQ interface can be controlled, these are:
The Branch segment is normally selected if the user wishes to create a simple, static RLC branch (with or without an internal
source). The E_VARRLC1x subroutines can be used for this purpose as well, but with the added ability for the online control of a
single, non-linear R, L or C element in a branch.
EXAMPLE 5-3:
A user wants to create a new component, which will represent a 3-phase, Y-connected RLC constant impedance with R = 1.2 , L =
0.053 H and C = 33.3 F. A new component is created with 4 electrical connections named NA, NB, NC (phase nodes) and GND
(common node).
Figure 5-5 – Electrical Port Connections Defined in the Graphics Section of the Component Definition
A Branch segment is added and the three, Y-connected branches are defined as shown below as it would appear in the Branch
segment:
Listing 5-15 – Example Branch Section Script for a Static RLC Branch
The above script will define three separate, series RLC branches, which use the GEQ interface. See the section entitled Segment
Types in the chapter Component Design of the PSCAD Manual for more details on defining branches.
If the user wishes to enable and control the internal branch voltage source EBR, then a slight modification is required to Example 5-
3:
A user wants to create the exact same 3-phase, Y-connected load as described in Example 5-3. However an internal branch voltage
is also to be included. The component still consists of four electrical connections, but the Branch segment must be modified as
shown below:
Listing 5-16 – Example Branch Section Script for a Static RLC Branch with Internal Voltage Source
The additional SOURCE script in each branch effectively enables the EBR internal branch source in the GEQ interface. EMTDC will
then expect a value for EBR to be defined by the user each time step.
E_VARRLC1x Subroutines
These subroutines are included within EMTDC and may be called directly from the Fortran, DSDYN or DSOUT segments of any user
defined component definition. They allow the user to directly model either a linear or a non-linear R, L or C passive element, as well
as provide control of the internal source, EBR. Although this subroutine is, for the most part, a direct link to the GEQ interface, it is
limited to the fact that only a single R, L or C element can exist in a single branch.
The subroutine call statements and argument descriptions are given as follows:
CALL E_VARRLC1_CFG(RLC,M,NBR,NBRC)
CALL E_VARRLC1_EXE(RLC,M,NBR,NBRC,Z,E)
Where,
0: Resistor
1: Inductor
2: Capacitor
Table 5-8 – Argument Descriptions for the E_VARRLC1_CFG and E_VARRLC1_EXE Subroutines
Note that the E_VARRLC1x subroutines are optimized for the control of non-linear passive elements. It should not be used to
represent constant elements, as the branch cannot be collapsed with other series elements in the circuit. This can result in
additional nodes, and slower simulation times. See the section entitled Equivalent Branch Reduction in the chapter entitled Electric
Network Solution for more details on this.
EXAMPLE 5-5:
In this example, the E_VARRLC1x subroutines are called from the Fortran segment of a user defined component definition, with its
various arguments pre-defined as needed. The Fortran segment of the user component is shown below:
#BEGIN
CALL E_VARRLC1_CFG(1,$SS,$BRN,$BRN)
#ENDBEGIN
#STORAGE REAL:2
CALL E_VARRLC1_EXE(1,$SS,$BRN,$BRN,$L,$E)
Listing 5-17 – Calling the E_VARRLC1x Subroutines within the Component Definition
Here, both the E_VARRLC1_CFG and E_VARRLC1_EXE subroutines are configured to model a non-linear inductor (i.e. input argument
1), where the inductance is controlled by the input argument L. E controls the internal voltage source EBR. BRN and SS are the
branch number and subsystem number respectively.
Listing 5-18 – Branch Segment Script to Coincide with E_VARRLC1x Subroutine Calls
The GGIN interface is composed of two parts: A Norton current source and an equivalent branch conductance. These two
quantities are represented by the following EMTDC intrinsic variables:
CCIN(NN,SS) REAL Sets the value of current injected into the network. The
current source is inserted between node NN and ground.
GGIN(NN,SS) REAL Sets the conductance value of the Norton current source
Table 5-9 – Intrinsic Variables to Define the Node-Based Electric Interface Branch
The CCIN current source in Figure 5-6 represents the total value of current injected into node NA from ground. It is very important
to note that from the perspective of EMTDC, only one CCIN current source or GGIN conductance can exist on a single
node. Therefore, the user must ensure that if using a CCIN current source, the value of that particular source be summed with the
overall CCIN for that node. This will ensure that if this CCIN source is connected to a node containing other CCIN sources, its value
will combine with the existing source values. The same procedure must be performed when providing a GGIN conductance as
well. Listing 5-19 below contains a code snippet, which illustrates this concept.
THIS_CCIN = CURR
THIS_GGIN = 1.0 / R
! Combine this current and conductance with existing CCIN and GGIN
Listing 5-19 – Code Snippet Illustrating Support for Multiple CCIN and GGIN at a Single Node
NOTE: The values of CCIN and GGIN are reset to zero by the main program at the beginning of each time step, and
therefore must be defined each time step.
Enabling CCIN
In order to use the CCIN current source, it must first be enabled at time zero. This is accomplished through the following intrinsic
variable:
EXAMPLE 5-6:
The following example code shows how to use CCIN and GGIN to represent a simple inductor.
SUBROUTINE U_BGN_SIMPLE_L(SS,NA)
INCLUDE ′nd.h′
INCLUDE ′s0.h′
INCLUDE ′s1.h′
INCLUDE ′rtconfig.h′
! Argument List:
! Local Variables:
INTEGER MY_NRTCF
MY_NRTCF = NRTCF
NRTCF = NRTCF + 1
ENABCCIN(NA,SS) = .TRUE.
RETURN
SUBROUTINE U_DYN_SIMPLE_L(SS,NA)
INCLUDE ′nd.h′
INCLUDE ′s0.h′
INCLUDE ′s1.h′
INCLUDE ′emtstor.h′
INCLUDE ′rtconfig.h′
! Argument List:
! Local Variables:
REAL CURR
MY_NSTORF = NSTORF
MY_NRTCF = NRTCF
NSTORF = NSTORF + 1
RETURN
END
There are instances however, where a current source may be utilized without a corresponding conductance – to model a non-
linearity for example. Care must be exercised when representing electric models in this manner: Due to the finite calculation step,
the current source injection im(t) will be dependent on the node voltage from the previous time step, thus any sudden change in
node voltage would appear as an open circuit to the current source, resulting in spurious voltage spikes and numerical problems at
the interface node [5]. To rectify this, a large Norton resistance (small conductance) should be placed between the interface nodes
in order to ensure that finite impedance is always present.
The addition of the conductance G will introduce a small error into the interface, which should be corrected. This is accomplished
through the insertion of a compensating current source as shown in Figure 5-7.
Where,
(5-3)
Instead of injecting just the calculated current im(t), a total compensated current im(t) + iC(t) is injected, where v(t - t) is the interface
voltage at the previous time-step.
This method has proven effective in maintaining the stability of electric models over the years. For instance, this concept allowed
for the simulation of multiple rotating machine interfaces on the same bus.
EXAMPLE 5-7:
To illustrate the above concept, consider the following simple integrator circuit constructed in PSCAD:
(5-4)
(5-5)
In other words, the measured electric network voltage V, is input every time step to an integrator control component. This
integrated value can then be used to determine the equivalent flux . If desired, the flux can then be used as an input control for an
electric element, such as a current source. The following example code is for a simple integrator function, written in Fortran:
SUBROUTINE U_DYN_MYINTGL(IN,OUT,LIMITS,ULIMIT,LLIMIT)
! Language - Fortran 90
! Date -
! Author -
! Include Files
INCLUDE 'nd.h'
INCLUDE 'emtstor.h'
INCLUDE 'rtconfig.h'
INCLUDE 's1.h'
INCLUDE 'emtconst.h'
! Variable Declarations
MY_STORF = NSTORF
MY_RTCF = NRTCF
NSTORF = NSTORF + 2
NRTCF = NRTCF + 1
! Main Program
OUT = ULIMIT
OUT = LLIMIT
ENDIF
ENDIF
STORF(MY_STORF) = IN
RETURN
END
Something similar to the following script needs to be added to the component definition itself, to ensure that the model subroutine
U_DYN_MYINTGL is called. Note that a #BEGIN directive has been added to define the initial output quantity for time zero.
#BEGIN
RTCF(NRTCF) = $Out0
NRTCF = NRTCF + 1
#ENDBEGIN
CALL U_DYN_MYINTGL($In,$Out,$Limits,$ULimit,$LLimit)
Listing 5-23 – Calling Simple Integrator Subroutine from within the Component Definition
The classical approach should be used to model windings placed on the same transformer leg. That is, each phase is a separate,
single-phase transformer with no interaction between phases. The UMEC method takes inter-phase interactions into account: Thus,
3-phase, 3-limb and 3-phase, 5-limb transformer configurations can be accurately modeled.
Representation of core non-linearities is fundamentally different in each model type. Core saturation in the classical model is
controlled through the use of a compensating current source injection across selected winding terminals. The UMEC approach uses
-I curve to represent saturation.
Where,
The voltage across the first winding is V1 and the voltage across the second winding is V2. The following equation describes the
voltage-current relationship for the two, coupled coils:
(6-1)
In order to solve for the winding currents, the inductance matrix needs to be inverted:
Where,
Coupling coefficient
For 'tightly' coupled coils, wound on the same leg of a transformer core, the turns-ratio is defined as the ratio of the number of turns
in the two coils. In an 'ideal' transformer, this is also the ratio of the primary and secondary voltages. With voltages E1 and E2 on two
sides of an ideal transformer, we have:
(6-3)
And
(6-4)
Making use of this turns-ratio 'a' Equation 6-1 may be rewritten as:
(6-5)
Now the inductance matrix parameters of Equation 6-1 can be determined from standard transformer tests, assuming sinusoidal
currents. The self inductance of any winding 'x' is determined by applying a rated RMS voltage Vx to that winding and measuring the
RMS current Ix flowing in the winding (with all other windings open-circuited). This is known as the open-circuit test and the current
Ix is the magnetizing current. The self-inductance Lxx is given as:
(6-6)
Where,
Similarly, the mutual-inductance between any two coils 'x' and 'y' can be determined by energizing coil 'y' with all other coils open-
circuited. The mutual inductance Lxy is then:
(6-7)
Transformer data is often not available in this format. Most often, an equivalent circuit, as shown in Figure 6-2, is assumed for the
transformer and the parameters L1, L2 and aL12 are determined from open and short-circuit tests.
For example if we neglect the resistance in the winding, a short circuit on the secondary side (i.e. V2 = 0) causes a current
to flow (assuming aL12 >> L2). By measuring this current we may calculate the total leakage reactance L1 + L2.
Similarly, with winding 2 open-circuited the current flowing is , from which we readily obtain a value for L1 +
aL12.
Conducting a test with winding 2 energized and winding 1 open-circuited, . The nominal turns-ratio 'a'
is also determined from the open circuit tests.
PSCAD computes the inductances based on the open-circuit magnetizing current, the leakage reactance and the rated winding
voltages.
Derivation of Parameters
To demonstrate how the necessary parameters are derived for use by EMTDC, an example of a two winding, single-phase
transformer is presented. The data for the transformer is as shown in Table 6-1:
If we ignore the resistances in Figure 6-1, we can obtain the (approximate) value for L1 + L2, from the short circuit test, as:
(6-8)
Where,
Base impedance
As no other information is available, we assume for the turns ratio 'a' the nominal ratio:
(6-9)
(6-10)
Thus, we see that by energizing the primary side with 100 kV, we obtain a magnetizing current:
(6-11)
But we also have the following expression from the equivalent circuit:
(6-12)
Therefore since,
(6-13)
Then,
(6-14)
By combining Equations 6-8 and 6-14 we obtain L1 = L2 =13.263 mH and from Equation 6-12 we obtain aL12 = 26.5119 H. The values
for the parameters in Equation 6-1 are then obtained as:
26.5252 H (6-15)
6.6313 H (6-16)
13.2560 H (6-17)
An excessively small magnetising current also leads to such ill conditioning. In such cases, it is often advisable to model the
transformer with only leakage reactances and no magnetizing branch, as shown in Figure 6-3. Such a transformer is referred to as
'ideal' in this document and also in PSCAD.
For an ideal transformer, the relationship between the derivatives of current (i.e. ) and the voltages can be
directly expressed as in Equation 6-18; derived by considering the circuit equations for a short-circuit test conducted on one side,
with a voltage source applied to the other (keep in mind that and either V1 or V2 is zero for a given test):
(6-18)
Turns-ratio
A similar analysis can be used to define the derivatives of the transformer currents in terms of its voltages for an 'ideal' transformer
(i.e. zero magnetising current), when more than two windings are coupled on the same core.
EXAMPLE 6-1
Consider a three winding, 40 MVA transformer with zero magnetising current. The three-phase winding voltages are 230 kV, 66 kV
and 13.8 kV.
An equivalent circuit diagram of the positive sequence leakage reactances is shown in Figure 6-4. The inductances of the equivalent
circuit are all based on the rated voltage of one winding, which for this example is winding 1 (the HV winding), rated at 132.79 kV (
). The LV winding rated voltage is 38.1 kV and the tertiary winding rated voltage is 13.8 kV.
, ,
and,
, ,
For a 60 hertz frequency rating, the inductance of leakage reactance X1 as shown above is found be the expression:
(6-19)
, and
As mentioned previously, the inverted inductance matrix of an 'ideal' three winding transformer is not as simple as that of an 'ideal'
two winding transformer. The inverted inductance matrix of an 'ideal' three winding transformer is given as follows:
(6-20)
Where,
Core losses are represented internally with an equivalent shunt resistance across each winding in the transformer. These resistances
will vary for each winding in order to maintain a uniform distribution across all windings. The value of this shunt resistance is based
on the No Load Losses input parameter.
In most studies, core and winding losses can be neglected because of the little significance to results. Losses in the transmission
system external to the transformer tend to dominate. Many transformer studies however, do require core saturation to be
adequately modeled.
Core Saturation
An exciting current is required for voltage transformation by a transformer. The excitation characteristic of a transformer is
determined completely by the core design, and winding design affects the characteristic only in so far as it determines the flux
density in the core. Transformers are constrained in their performance by the magnetic flux limitations of the core. Since
ferromagnetic materials cannot support infinite magnetic flux densities and they tend to saturate at a certain level. The nonlinear
flux-current characteristic of a transformer iron core is illustrated below.
When a transformer's primary winding is overloaded from excessive applied voltage, the core flux may reach saturation
levels during peak moments of the sinusoidal cycle. If this happens, the voltage induced in the secondary winding will no
longer match the wave-shape as the voltage powering the primary coil. In other words, the overloaded transformer will
distort the waveshape from primary to secondary windings, creating harmonics in the secondary winding's output.
When a transformer is initially connected to an AC source, a transient current of up to 10 to 50 times larger than the
rated transformer current can flow for several cycles. For large transformers, inrush current can last for several seconds.
This happens because the transformer will always possess residual flux, and when the transformer is re-energized, the
incoming flux will add to that already existing, which will cause the transformer to move into saturation. Then, only the
resistance of the primary side windings and the power line itself limit the current.
The current IS(t) is a function of winding voltage VL(t). First of all, winding flux S(t) is defined by assuming that the current IS(t) in is
the current in the equivalent non-linear saturating inductance LS(t) such that:
(6-21)
The non-linear nature of Equation 6-21 is displayed in Figure 6-6, where flux is plotted as a function of current. The air core
inductance LA is represented by the straight-line characteristic, which bisects the flux axis at K. The actual saturation characteristic is
represented by LM and is asymptotic to both the vertical flux axis and the air core inductance characteristic. The sharpness of the
knee point is defined by M and IM, which can represent the peak magnetizing flux and current at rated volts. It is possible to define
an asymptotic equation for current in the non-linear saturating inductance LS if LA, K, M, and IM are known. Current IS can be
defined as:
(6-22)
Where,
The flux S (t) is determined as a function of the integral of the winding voltage VL(t) as follows:
(6-23)
This method is an approximate way to add saturation to mutually coupled windings. More sophisticated saturation models are
reported in literature, but suffer from the disadvantage that in most practical situations, the data is not available to make use of
them - the saturation curve is rarely known much beyond the knee. The core and winding dimensions, and other related details,
cannot be easily found.
Studies in which the above simple model has been successfully used include:
Energizing studies for a 1200 MVA, 500 kV, autotransformer for selecting closing resistors. Ranges of inrush current
observed in the model compared favorably with the actual system tests.
Core saturation instability where model results agreed closely to actual system responses [4].
In order to appreciate the saturation process described above, Figure 6-7 summarizes the use of Equations 6-22 and 6-23.
Description Value
Base frequency 60 Hz
Figure 6-8a - Primary and Secondary Voltages when the Saturation Current is Injected at the Primary Winding
Figure 6-8b - Primary and Secondary Voltages when the Saturation Current is Injected at the Secondary Winding
It can be observed above that when the saturation current is injected at the terminals where the source is connected, the secondary
voltage waveform is not distorted since other elements modeling the transformer are linear. On the other hand, injecting the
saturation current at the secondary winding increases the distortion in its voltage waveform. This phenomena is also true for three
and four winding transformer models.
Figure 6-9 shows the true location of magnetizing branch in the transformer T model. The magnetizing current can be divided into
two components; the linear component which is represented as a linear inductance defined as:
(6-24)
where λM and IM are the peak magnetizing flux and current at rated voltage as shown in Figure 6-6, and the nonlinear component
that is the difference between the total magnetizing current and the linear current as illustrated in Figure 6-10. The nonlinear
component or saturation current can be calculated as follows:
(6-25)
In Equation 6-25, im is the total magnetizing current and m is the magnetizing flux calculated by:
(6-26)
In this method of saturation modeling, the location of the saturation branch should be maintained at the terminals of the
transformer in order to retain the computational efficiency. Therefore the true saturation current is partitioned between the
terminal current sources by appropriate ratios as shown in Figure 6-11. To do so, the injected currents at both terminals should be
accurately computed to be mathematically equivalent to injection at the magnetizing branch so that the new model behaves exactly
the same as the transformer T model.
The simulation results of the secondary voltage of the same case mentioned above in Figure 6-8, using the new model, along with
the previous simulations for the placement of the saturation at either ends is presented in Figure 6-12.
For more details on this saturation method, please see transformer reference [12].
For example, if the saturation is applied to the tertiary winding of the three winding transformer, a reasonable value to select for air
core reactance would be XHT, which is 24%. Thus, as seen from the tertiary, the air core reactance would be 24%; as seen from the
low voltage winding is would be 38%, and as seen from the high voltage winding it would be 48% or twice the leakage reactance XHT.
The knee point of the saturation curve is sometimes available and is usually expressed in percent or per-unit of the operating point,
defined by rated voltage. Typical ranges in per-unit are 1.15 to 1.25. Referring to Figure 6-6, this would be:
(6-24)
Where,
If the RMS rated voltage of the winding, across which saturation is applied, is VM, then M is:
(6-25)
Where,
Equations 6-21 to 6-25 are an approximate means of defining transformer saturation and form the basis upon which the EMTDC
subroutine TSAT21 is constructed.
A change in tap setting is modeled as a change in the turns-ratio of the transformer. The per-unit leakage reactance and
magnetizing currents, specified for 100% tap, are used to calculate admittances for the new voltage rating, corresponding to the tap
setting.
EXAMPLE 6-1:
Let us assume for simplicity, that a transformer is configured as Y-Y, with winding voltages rated at 10 kV primary and 100 kV
secondary, and a tap changer is placed on the primary winding. The turns-ratio for this transformer is of course 1:10.
An on-line tap input of 1.0 corresponds to a 100% tap (i.e. no tap adjustment). If the tap input value is adjusted to say 1.05, then
the turns-ratio would become 1.05:10 or 1:9.52381.
The transformer input parameters directly involved in the adjustment of the classic core saturation characteristic are:
Magnetizing Current
Knee Voltage
These three parameters are shown, as they appear in the Saturation section of the component parameters in the figure above. Air
core reactance, knee voltage and magnetizing current provide three degrees of freedom to the shaping of the continuous, core
characteristic (knee curve) shown below.
Knee Voltage
Adjustment of the Knee Voltage vertically shifts the Y-intercept of the air core reactance asymptotic line in the above figure.
Magnetizing Current
Adjustment of the magnetizing current determines the horizontal position, along the VS = 1.0 pu voltage line, of the effective knee
point. That is, an increasing value of magnetizing current will tend to make the saturation characteristic less sharp.
The primary drawback of the above methods is that the core material data (required for magnetization modeling) is not usually
available. However, a mathematical technique may be employed to approximate the hysteresis loop behaviour for recoil loops and
renascence effects. This technique is general and sufficiently accurate to model the hysteresis phenomena, by using a lookup and
-I characteristic are generated. These
curves, along with a second set of curves representing flux differences between the two paths of the parent loop, are then used to
determine the current to be injected for any given value of flux. In this technique, the minor loop travel, sustained and initial flux
remanence, and realistic inrush phenomena are all considered [11].
-I characteristic, first a single-valued saturation curve, between plus and minus values of
the specified knee point limits, is obtained as explained earlier. Then, this curve is shifted according to the specified hysteresis loop
width in the positive direction of current. The other side of the major loop is then generated as the negative of the negative function
described by the positively offset curve. Figure 6-8 represents the major (parent) loop of the -I characteristic [10].
This maximum loop is the trajectory only when the inductor element is driven from saturation in one direction to saturation in the
opposite direction. The UPPER curve or is for increasing values of flux linkage and the DOWNER curve or is for decreasing
values of the flux linkage. The points of confluence for the two curves making up the major loop are at the defined saturation knee
point values. The characteristic is assumed to be single valued beyond the points of confluence (Figure 6-9).
1. The difference in flux between the present point and the point directly above/below the parent
curve, toward which it must travel.
2. The point of confluence, toward which it must travel.
Figure 6-11 - A Mapping of f(λ) into F(λ) Showing a Typical Turnaround Point and a Generalized Point on the Downer Curve for
Discrete Time tn+l.
These trajectory curves can be generated in the non-saturated region by translating a variable displacement from the f or g
curves. The simplest relationship for D, and the one chosen for this example of family pair mapping, is to make the displacement d
vary linearly from:
(6-25)
A typical downer curve F resulting from a variable displacement d from curve f is shown in Figure 6-10.
(6-26)
(6-27)
where He and is a parameter that represents inter-domain coupling. Ms is the saturation magnetization. Jiles and
Atherton used a modified Langevin function to produce the familiar sigmoid type curve for f(He) as expressed below:
(6-28)
(6-29)
(6-30)
The first component, Mirr, is due to pinning of the magnetic domains by discontinuities in the material structure and can be likened
to a friction effect. The second term, Mrev, is due to domain wall bending in an elastic manner. The authors then build on these
fundamental relationships to arrive at the final set of equations to be solved to construct M-He and B-H loops [9]:
(6-31)
A, , c and k are constants for the material being used and takes the value 1 or -1 based on the sign of dH/dt.
(6-32)
In power transformers at every time step, the changes in magnetizing current should be calculated based on the changes in
magnetizing flux. The magnetizing flux is also calculated by integrating the magnetizing branch voltage.
Now, these equations are iteratively solved for the unknown values of and in each time step.
In PSCAD, the following transformer core structures can be represented using the UMEC model:
For more details on the background theory of the UMEC transformer model, see [5].
Figure 6-12 - Schematic Representation of the Three-Phase, Three Limb Transformer (2 Windings per Phase)
(6-33)
Where,
Winding resistance
Winding self-inductance
The elements Li and Mij in Equation 6-33 are dependent on the core dimensions, the magnetic properties of the core material and
the number of turns in different windings.
The transformer core, along with windings 1 and 3 are shown below:
If a current i3 is passed through winding 3 with all other windings kept open-circuited, the following equations describe the current-
flux relationship:
(6-34)
(6-35)
(6-36)
(6-37)
Similar expressions can be derived for the other inductance terms in Equation 6-33.
(6-38)
Where,
The response of coils 'a' and 'b' to an electrical signal will depend on the values of La and Lb. Even if Pa and Pb are not equal, we can
still select the number of turns in each coil so that La = Lb. The UMEC approach takes advantage of this fact and assigns the value Vi
to the number of turns Ni, so that:
(6-39)
Where,
Although the exact dimensions are not known, it is reasonable to assume that the user is provided with a scaled drawing of the
transformer. The following aspect ratios can be defined based on such a drawing:
(6-40)
(6-41)
(6-42)
If winding 3 is then subjected to an open-circuit test (with all other windings kept open-circuited),
(6-43)
Where,
Rated voltage
Rated frequency
By combining Equations 6-42 and 6-43, the permeance of a winding limb can be found as:
(6-44)
(6-45)
(6-46)
(6-47)
(6-48)
(6-49)
(6-50)
Core Saturation
The UMEC transformer models treat core saturation differently than the classical models: Here, the piecewise linear technique is
used to control the model equivalent branch conductance.
The non-linearity of the core is entered directly into the model as a piece-wise linear V-I curve, which makes full use of the
interpolation algorithm for the calculation of exact instants in changing of state range. See Switching and Non-Linear Elements for
more details.
Summary
Once Pw and Py are calculated in this manner, all the off-diagonal elements in the transformer inductance matrix can be assigned the
appropriate value.
Thus, in the UMEC models, the transformer inductance matrix is derived based on the nameplate data (V1, V2, etc.), the core aspect
ratios (rA and rL), and short-circuit and the open-circuit test results.
Detailed information of the UMEC approach can be found in [5] and [6]. Interested users are encouraged to refer these publications.
Modeling Autotransformers
The PSCAD Master Library offers limited 1-Phase Auto Transformer and 3-Phase Star-Star Auto Transformer models. If preferred,
this section describes how to build an autotransformer directly by utilizing the existing transformer models with suitable tap
changers.
Figure 6-16 illustrates an equivalent circuit for a single-phase autotransformer using a classical single-phase transformer component
and a tap changer on the secondary winding (this is one possible method of modeling an autotransformer). The tap can be set up to
cover a wide operating range.
Some important notes on the use of the configuration in Figure 6-16, as compared with an actual autotransformer model are given
as follows:
The change in tap setting is modeled as a change in the turns-ratio of the transformer. The per unit leakage reactance
and magnetizing currents specified for 100% tap are used to calculate admittances for the new voltage rating,
corresponding to the tap setting. The magnetizing branch (for a non ideal transformer) is considered to be in the middle
of the two winding reactances.
For example, if the magnetizing current is assumed to be negligible, the conductance matrix with tap changer on the secondary
winding is calculated as:
(6-51)
Turns-ratio
2. H. W. Dommel, Transformer Models in the Simulation of Electromagnetic Transients, Proc. 5th Power Systems Computing
Conference, Cambridge, England, September 1-5, 1975, Paper 3.1/4.
3. V. Brandwajn, H. W. Dommel, I. I. Dommel, Matrix Representation of Three Phase N-Winding Transformers for Steady
State Transient Studies, IEEE Transactions on Power Apparatus and Systems, PAS-101, #6, pp. 1369-1378, June 1982.
4. D. A. Woodford, Validation of Digital Simulation of DC Links, IEEE Transactions on Power Apparatus and Systems, PAS-
104, #9, pp. 2588-2596, September 1985.
5. W. Enright, O. B. Nayak, G. D. Irwin, J. Arrillaga, An Electromagnetic Transients Model of Multi-limb Transformers Using
Normalized Core Concept, IPST '97 Proceedings, Seattle, pp. 93-98, 1997.
6. W. Enright, N. Watson, O. B. Nayak, Three-Phase Five-Limb Unified Magnetic Equivalent Circuit Transformer models for
PSCAD V3, IPST '99 Proceedings, Budapest, pp. 462-467, 1999.
7. Rezaei-Zare, A., Iravani, R., Sanaye-Pasand, M., Mohseni, H., Farhangi, S., An Accurate Hysteresis Model for Ferro-
resonance Analysis of a Transformer, IEEE Transactions on Power Delivery, Vol. 23, No. 3, pp.1448-1456, July 2008.
8. Chandrasena, W., McLaren, P.G., Annakkage, U.D., Jayasinghe, R.P., An improved low frequency transformer model for
use in GIC studies, IEEE Transactions on Power Delivery, Vol. 19, No. 2, pp. 643 - 651, 13-17, April 2004.
9. Annakkage, U. D., McLaren, P. G., Dirks, E., Jayasinghe, R. P., Parker, A. D., A Current Transformer Model Based on the
Jiles–Atherton Theory of Ferromagnetic Hysteresis, IEEE Transaction on Power Delivery, Vol. 15, No. 1, January 2000.
10. Talukdar, S.N., Bailey, J.R., Hysteresis models for system studies, IEEE Transactions on Power Apparatus and Systems,
Vol.95, No.4, pp. 1429- 1434, July 1976.
11. RTDS® Manual, RTDS Technologies Inc., 100-150 Innovation Drive, Winnipeg, Mantioba, R3T 2E1, Canada.
12. Samimi, M., Gole, A. M., Jayasinghe, R. P., Improvement of Transformer Saturation Modeling for Electromagnetic
Transient Programs, IPST 2013, Vancouver, Canada, July 18-20, 2013.
The machine subroutines interface with EMTDC as a compensated current source and special terminating impedance, as well as to
other subroutines through mechanical and/or field parameters.
The parameters of the various machines behave differently, so therefore separate subroutines are used. For instance, the
Synchronous Machine possesses different parameters on each axis, with only direct-axis mutual saturation of any significance. On
the other hand, an induction motor uses the same equivalent circuit on both axes, and experiences both mutual and the leakage
reactance saturation.
Other models described in this chapter, which can be used interface to the machine models, are:
Exciters
Governors
Stabilizers
Turbines
(7-1)
The three-phase rotor winding may also be transformed into a two-phase equivalent winding, with additional windings added to
each axis to fully represent that particular machine, as is shown in Figure 8-1. For more details on these transformations, please see
[12] and [13].
Where,
Amortisseur windings
Field windings
Stator windings
Support subroutines are included in the machine model library for calculating the equivalent circuit parameters of a synchronous
machine from commonly supplied data. Typical parameters are supplied for small, medium and large squirrel cage motors.
Referring to Figures 7-2 and 7-3, the following equations can be derived:
(7-2)
Where,
(7-3)
(7-5)
Similar equations hold for the q-axis except the speed voltage term, , is positive, and:
(7-6)
Inversion of Equation 7-2 gives the standard state variable form with state vector X consisting of the currents, and
the input vector U, applied voltages. That is:
(7-7)
(7-8)
In the above form, Equations 7-7 and 7-8 are particularly easy to integrate. The equations are solved using trapezoidal integration to
obtain the currents. The torque equation is given as:
(7-9)
(7-10)
The ability exists to either control the speed directly or to input the mechanical torque, and calculate the speed from Equation 7-10.
Referring to Figures 8-2 and 8-3, the d-axis voltage UD2 and current ID2 are the field voltage and current, respectively. The damper
circuit consists of parameters L3D and R3D with UD3 =0. The additional inductance L23D accounts for the mutual flux, which links only
the damper and field windings and not the stator winding. The inclusion of such flux, necessary for accurate representation of
transient currents in the rotor circuits, is illustrated in [14]. Only the saturation of LMD is considered in this machine and is based on
the magnetizing current,
(7-11)
The matrix is recalculated each time there is a significant change in the saturation factor.
The results of this simulation also serve as a validation of the Salient Pole / Round Rotor Synchronous Machine model in PSCAD. The
corresponding PSCAD case project is entitled sync_SCTest.psc and is available in the ...\Examples\sync_machines directory within
the PSCAD program folder.
Input Parameters
Voltage magnitude and phase angle of the 'infinite' source (Three-Phase Voltage Source Model 2) is 230.0 kV and 0.0 degrees,
respectively. The same parameter values are set for the machine at 13.8 kV and –31.08 degrees (includes phase shift by
transformer and interface, ∆t = 50 µs) respectively. The field voltage necessary to produce 1.0 pu terminal voltage on the open-
circuit machine is 1.0 pu. These initial conditions give open-circuit condition for the machine.
The Timed Breaker Logic component is set to apply a short-circuit at 0.5056 s, which is chosen purely for convenience (the A phase
current will not have a DC component during the short-circuit test).
The following lists the simplifications and assumptions used in setting-up this test: These simplifications allow us to focus on the
machine dynamics better.
Synchronous Machine
Mechanical Torque: The mechanical torque (Tm) terminals on the Synchronous Machine component are shorted simply
to provide a dummy input to the Tm terminal, and serves no other purpose in this example.
Prime Mover Dynamics: The machine is run at constant speed by locking the rotor (Enab = 0) at synchronous
speed: Thus, there are no prime mover dynamics involved.
Exciter Dynamics: Any exciter dynamics are also eliminated by feeding a constant field voltage (Ef = 1.0 pu) to the field
winding.
The relevant section of the Synchronous Machine component parameters is shown below.
Transformer:
Leakage Reactance: The ideal transformer is simply a ratio changer with negligible leakage (0.005 pu) reactance.
(7-T1)
(7-T2)
NOTE: For details on the above, see C.V. Jones, The Unified Theory of Electrical Machines, Plenum Press, N.Y., 1967,
Chapter 20
Thus, the sub-transient effects will be seen for only about two cycles. This can be seen in an expanded view of the phase A fault
current:
Figure 7-T5: Decay of Sub-Transient and Transient Components of the Phase A Current
(7-T3)
(7-T4)
Following a time sufficient enough for the sub-transient effects to disappear (but still short enough for the transient component to
be unaffected), the magnitude of the field current is given by:
(7-T5)
(7-T6)
The initial DC component of the field current is approximately the mid-point of the first cycle, which agrees with the above
calculation at about 3.2 pu. Assuming a fixed field voltage, the field current will eventually return to its pre-fault, steady-state
value. The decay of the field current during the transient period is given by:
(7-T7)
(7-T8)
Thus, after a time period equal to Td', the field current will decay to approximately 37% of its initial value:
(7-T9)
(7-T10)
With the fast decay rate of Ia", this difference is difficult to observe. It is apparent from the results of Figure 7-T5 that the sub-
transient and transient currents are almost of the same magnitude.
Another calculation that can be verified is the ratio of the sub-transient component Ia" to the steady-state fault current Ia. Note that
with constant field excitation we have,
(7-T11)
From Figure 7-T1, we obtain a value of 3.57 (= 25.0/7.0), which is close to the value calculated using the above equation. The
steady-state Ia of 7.0 kA also exactly matches the calculated value as seen in Figure 7-T7.
The armature time constant Ta (0.278 s) is the decay time constant of the fundamental frequency component of the field current
If: On the stator side this is the time constant, at which the DC component and the second harmonic component of stator current
decay. This time constant is estimated in Figure 8-T8. Initial peak-to-peak magnitude of the fundamental frequency component,
after the sub-transient influence disappears (a couple of cycles), is about 3.0 pu. The fundamental frequency component reached
37% of this value (1.1 pu) in about 0.270 s. This value closely agrees with the given value for parameter Ta.
NOTE: This tutorial is based on a popular document section that first appeared in the PSCAD V2 manual. It has been
brought up to date, and added to this manual at the request of many users.
Saturation occurs in both the mutual and leakage inductances. The saturation of LM (both LMD and LMQ ) is based on the total
magnetizing current,
(7-12)
while saturation of the leakage inductances L1 and L23 is based on the stator line current,
(7-13)
The d-axis equivalent circuit for the wound rotor induction machine with one squirrel cage in effect is shown in figure 7-4. This is
derived in a manner similar to that for the synchronous machine. Similar equivalent circuits are applicable to the q axis as well as to
the squirrel cage machine.
NOTE: All reactance and resistance values are those referred to the stator.
Where,
(7-14)
Note that unit current in the d-winding produces the same total MMF as unit currents acting in a balanced fashion in the abc-
windings. Unit currents in the different circuits should produce the same physical effect. In both systems base power is:
(7-15)
Mechanical angle
The impedances are given in per unit for both machines. The input voltages in are divided by Va0
multiplied by to provide a per unit incremental time. The per-unit current is converted to output current by multiplying by ia0
after transformation from the two axis-system.
Rated torque is not one per unit for the induction motor but is , which directly relates output
mechanical power to input MVA. is per unit efficiency, is power factor and 's' is the rated slip.
then divided by in order to convert it to the value of field current used in the utility system. The value of the field
Figure 7-5 shows a synchronous machine model interfaced to the EMTDC program. The synchronous machine model makes use of
the phase voltages calculated by EMTDC to update the injected currents into EMTDC. It is also shown in this figure that multiplying
the phase currents by an integer N simulates, from the system point of view, N identical machines operating coherently into the AC
system.
Terminating Resistance
It is important to note that representing machines as a Norton current source can have drawbacks. For instance, each machine must
be computationally 'far' from other machines for stable operation. In the past, this was usually achieved by separating subsystems
containing machines by distributed transmission lines (which are essentially time delays). Since the machine was represented by a
simple current source (which was dependent on voltages from the previous time step), any sudden change in voltage would cause a
current response only in the next time step. Thus, for the previous time step, the machine looked like an open circuit and spurious
spikes appeared on the machine terminal voltage. The cumulative effect of many machines causing this error simultaneously in the
same subsystem was proven to be de-stabilizing.
It was found that when the machine neared open circuit conditions a smaller time step was required to maintain computational
stability. Alternatively a small capacitance or large resistance could be placed from the machine terminals to ground to prevent the
machine from being totally open-circuited. Although the physical meaning of parasitic capacitance or leakage resistance could be
applied to these elements, it was not a satisfactory solution.
This idea led to the concept of terminating the machine to the network through a terminating 'characteristic impedance' as shown in
Figure 7-6. The effect of this added impedance is then compensated (corrected) by an adjustment to the current injected.
Using this technique, the machine model behaviour has been uniformly good. It essentially combines the compensation-based
model and the non-compensated model, while eliminating the restriction of adjacent machines and the necessity of calculating the
network Thevenin equivalent circuit.
Where,
Compensating current
The impedance r" is calculated where L" is the 'characteristic inductance' of the machine, N is the number of coherent machines in
parallel and This resistance is placed from each node of the machine terminal to ground within the
EMTDC network. Instead of injecting the calculated machine current , a compensated current is injected,
where V(t – ltage in the previous time-step. Thus, the actual current injected into the network is,
(7-16)
Exciters
Exciters are externally interfaced to the machine models through external signal connections. Since the exciter models exist as
separate components, parameters can be freely selected and adjusted by the user.
Reference [16], published by the IEEE, categorizes exciters into three different types:
1. Type DC excitation systems utilize a DC generator with a commutator as the source of excitation system power
2. Type AC excitation systems use an alternator, and either stationary or rotating rectifiers, to produce the direct current
needed for the synchronous machine field
3. Type ST excitation systems, where excitation power is supplied through transformers or auxiliary generator windings and
rectifiers
There are many different exciter models classified in one of the above three types, which are representative of commercially
available exciters. PSCAD comes complete with each of these standard models.
One of the problems with modeling exciter systems is the inherently large time-constants involved. The user should ensure that the
system is started as close to the steady state as possible (unless of course, simulation of start-up transients is required), by properly
setting the machine initial conditions. It is also possible, in the case where the exciter transfer function has large time constants, to
bypass these during the initial phase. See [16] and [17] for more details on exciters.
Governors
Mechanical transients usually fall in the realm of simulation using stability programs, where the detail of modeling is not as
comprehensive as in an electromagnetic transient program. For the duration of most transient simulation runs, the mechanical
system can often be considered invariant, and users should make sure that they really need a governor model before they use it.
As mentioned above, most governor transfer functions can be simulated by using control building blocks; interfacing to the machine
by either feeding the computed speed or the computed torque.
Governor models are initialized by continuously resetting internal storage locations to produce an output that is exactly equal to the
mechanical torque output of the machine.
PSCAD comes complete with both hydro and thermal governor models. These models support variable time step, and have an
allowance for initialization at any time (not necessarily at time t = 0.0) through additional control inputs. Refer to [18], [19] and [20]
for more on governors.
Stabilizers
Power system stabilizers are used to enhance the damping of power system oscillations, through excitation control. Commonly used
inputs to the stabilizers are:
Shaft speed
Terminal frequency
Power
Most stabilizer transfer functions can be simulated through the use of control building blocks. PSCAD comes complete with both
single-input and dual-input, power system stabilizers. Refer to [16] for more details.
Turbines
Mechanical power, supplied by turbines, can often be considered invariant for the duration of most transient simulation runs. In
some cases however, where provisions are made for fast-valving or discrete control in response to acceleration, prime mover effects
can be significant even if the phenomena of interest span only for a few seconds. Also, to ensure the accuracy of longer simulation
studies, modeling the turbine dynamics may be considered necessary.
Turbine models have been developed which can accurately represent the dynamics of many masses connected to a single rotating
shaft. The models are presently dimensioned to accommodate 6 masses (ex. 5 turbines and 1 generator, or 4 turbines, 1 generator
and 1 exciter), but more masses can easily be added if the program is re-dimensioned.
The shaft dynamics and the rotating masses are represented pictorially in Figure 7-7:
Where,
Inertia constant
In addition, two damping coefficients are included: The self-damping coefficient creates a torque on the specified mass, which is
proportional to its own speed. Thus, the self-damping feature could be used to represent friction and windage for each mass. This
torque is applied in steady state as well as in transient conditions.
The mutual damping coefficient creates a torque, which is proportional to the difference in speed from one mass to the next. Thus,
this coefficient will not produce torques in steady state, but will damp out oscillations between masses.
Each mass has its own associated inertia constant which reflects the actual size of the mass on the shaft.
The total mechanical torque applied to the shaft (from a governor for example) can be proportioned among each turbine mass. The
electrical torque produced by the electrical power system is applied to the generator mass only and opposes the mechanical input
torque. In the model a positive electrical torque corresponds to the generation of electrical power. If an exciter is to be included on
the shaft, the input torque on it will be 0.0, but self and mutual damping will still be present.
Multi-Mass Interface
The effects of multiple shaft masses are modeled separately using the Multi-mass Torsional Shaft component. This component
interfaces directly with the machine models.
Initialisation
The multi-mass output is ignored when the machine rotor is locked, however, the multi-mass model is initialized to the machine
conditions.
The multi-mass turbine model may be initialized along with the machine when it changes state freely running machine.
Machine Initialization
Usually a network is started from zero with some simple start-up sequences, such as ramping the source voltage or, if modeling an
HVDC system, ramping the power or current order. Usually, most systems can reach steady state in less than 1.0 s. However, if
there is a machine in the network, the start-up from zero initial conditions can take longer than usual (sometimes tens of seconds),
due to the large electrical and inertial time constants. With multiple machines, the situation can even get worse due to the
interaction between them. Hence, special initialization procedures have been provided to the machine model and to other models
interfacing with it.
Synchronous Machine
The Synchronous Machine model can be started from time = 0.0, as a full machine or alternatively, it can be started as a low-
resistance voltage source and then converted to a machine after the start-up transients have died away: The latter technique can be
used to shorten the time it takes to bring the Synchronous Machine to full steady-running operation.
For best results, it is recommended that conversion from source to machine operation be delayed until the start-up transient has
completely passed. If the source power controller is active then conversion from source to machine should also be delayed until the
output power has stabilized.
Induction Machines
There are no special initialization considerations for the Induction Machine model. If the motor is used for a constant torque type
application, it is good to start up the motor with constant speed mode and then switch to constant torque.
Transmission systems are frequency-dependent and so it makes sense to solve their parameters in the frequency domain. This is
only suitable for those instances when the frequency domain characteristics are of primary interest. In order to accurately represent
a frequency-dependent line when simulating with EMTDC (which of course operates in the time domain), these parameters must be
convolved into their equivalent time-domain characteristics. The techniques required for this convolution are quite complex, and
are one of the primary attributes that differentiate the various transmission system modeling methods available today.
PSCAD includes a few different modeling techniques, each with their own pros and cons. The most accurate of these, the Frequency
Dependent (Phase) model, is one of the most precise in the world.
-sections and distributed systems can be modeled with EMTDC. Distributed models are further sub-divided into single-
frequency, and frequency-dependent representations. The constants required by EMTDC to represent distributed systems are
calculated by a separate program called the Line Constants Program or LCP (discussed in the next section) -section
representations are executed entirely within EMTDC.
Frequency dependent attenuation of the traveling waves is not easily or accurately incorporated
Bergeron Model
The Bergeron model is the simplest, oldest and least accurate of the distributed branch models in PSCAD – mainly due to the fact
that it is not frequency-dependent (calculates at a single frequency).
The Bergeron model is suitable for studies where frequencies other than the fundamental are of little or no concern (i.e. many load
flow and protection studies). Situations where this model should be chosen over the more accurate frequency dependent models
include; when a lack of frequency dependent input data exists (such as when only +, -, and 0 sequence data is known), and/or when
computational speed over accuracy is more important.
For all new studies involving transmission lines or cables, it is recommended that the Frequency Dependent (Phase) model be
used. This model is the newest of the two (c. 1998) and was added to PSCAD specifically to replace the Frequency Dependent
(Mode) model, which has been carried over from PSCAD V2 to allow for compatibility with older projects. The Frequency Dependent
(Phase) model can represent any type of transmission system (i.e. aerial and underground, symmetrical and non-symmetrical) and is
more accurate and more stable than its predecessor. The Frequency Dependent (Phase) model should normally be the model of
choice for most studies.
The frequency dependent line models are discussed in more detail later in this chapter.
The present form of the LCP (originally released with PSCAD V3) is actually an amalgamation of two programs that existed in PSCAD
V2: T-LINE and CABLE. It now exists as a separate executable file placed along with the PSCAD executable in the installation
directory, and is called by PSCAD whenever a transmission system is encountered. Although the two T-LINE and CABLE programs are
now merged together, the LCP still requires that aerial and underground systems not be combined. That is, underground cables and
overhead transmission lines must be designed and solved separately. This is mainly due to the fact that the calculation of ground
return impedance in both systems is fundamentally different, and there is presently no means by which to efficiently represent the
mutual effects between the two system types.
All input data is read by the LCP from either a transmission line or cable input file (*.tli or *.cli). The input file is generated
automatically by PSCAD when a project is compiled, based on the system cross-section in the Transmission Segment Definition
Editor (see the next section called Data Input). The LCP output constants are written to either a transmission line or cable output file
(*.tlo or *.clo), which is then read in by EMTDC before the simulation begins. The output file contains pre-formatted data to help
EMTDC construct a two-port network equivalent for the system. A log file (*.log) and a user output file (*.out) are also generated by
the LCP.
The LCP is structured as illustrated in Figure 9-2. All events outlined in this diagram are described in detail later in this chapter.
Data Input
The Line Constants Program is controlled through the use of a graphical user interface tool in PSCAD called the Transmission
Segment Definition Editor. Within this tool, the user may define the transmission system by constructing a cross-section of the right-
of-way, complete with conductor/cable positions, etc. This information is compiled by PSCAD when the constants are solved for that
line, and written to a transmission line or cable input file (*.tli or *.cli) as mentioned previously.
The following list is a summary of the input parameters required by the LCP, some are referred to during discussions later in this
chapter:
General:
Number of conductors
Aerial Lines:
Symbol Description
Number of circuits
Underground Cables:
Symbol Description
Number of cables
Conductor/Cable Position
The geometric position of overhead conductors or cable centres in a transmission system cross-section, are ultimately input to the
LCP in terms of Cartesian coordinates (i.e. linear x and y dimensions). These coordinates are relative to a reference point in both the
x and y direction. The ground plane is considered the reference level (y = 0.0) in the y direction, and the x reference is an arbitrary
point that is defined through data entry in the tower or cable cross-section components (xt in Figure 8-3).
The LCP allows conductor xy position data to be entered either directly, or in a relative manner through tower dimensions, such as
horizontal and vertical distances between conductors and relative x position of the tower. The latter option is provided as
transmission line tower data is often given in this format. If the user desires to enter the coordinates directly, then the Universal
Tower component is provided in the PSCAD Master Library.
For example, the system in Figure 8-3 consists of two towers and six conductors. A set of xy coordinates for each conductor is
derived given the tower input data so that (assuming both towers are structurally identical):
NOTE: Conductor positions must be considered carefully when entering the data, otherwise erroneous results will be
given. The LCP contains some sanity checks to ensure that conductors or cables do not overlap; however there is no way
to check for incorrect conductor position!
Conductor Sag
Sag is a phenomena associated with suspended conductors, which tend to droop under their own weight when strung between
tower stands. The amount of sag present is dependent not only on conductor weight, but also on tower span length, conductor
properties and ambient temperature. Temperatures can vary considerably, depending on environmental conditions and power
demand.
The Line Constants Program approximates the affects of conductor sag by simply decreasing the effective conductor height above
ground by a factor of 2/3 of the total sag.
(8-1)
The approximation eliminates sag by assuming a conductor of uniform height y’. This effectively makes the calculation of constants,
for a particular right of way, independent of tower span.
The following list summarizes some of the more basic assumptions when modeling transmission systems:
The earth is flat! That is, the curvature of the earth surface (or any change in surface height for that matter) is not
considered.
The ground is homogeneous. The ground resistivity and permeability is constant for the length of the transmission line.
An aerial conductor is considered to be a perfectly round cylinder. That is, the conductor radius entered is the radius of a
perfect cylinder, which is used to calculate cross-sectional area, which in turn is used to derive the conductor resistivity.
It is important to note that no matter how detailed a transmission system is modeled, there will always be error. It is the job of
PSCAD and the LCP to ensure that any error is minimized to the fullest extent possible, but there are many instances when this
responsibility falls in user’s lap. For example in some places in the world, ambient temperatures can fluctuate wildly depending on
the season, or even the time of day. This temperature variance can affect the impedance properties of the line by way of
heating/cooling, as well as conductor sag. Therefore, the user should be diligent in ensuring that all input parameters reflect the
real-world conditions.
Consider a short transmission segment, whose length is small when compared to the wavelength, and the ground is the voltage
reference. The system will possess a series-impedance and shunt-admittance, which is illustrated graphically as shown in Figure 8-5:
Given that Z and Y are the system impedance and admittance per unit length respectively, V is the conductor voltage and I is the
conductor current, then the system in Figure 8-5 is described mathematically by the telegrapher’s equations (as the limit 0):
(8-2)
(8-3)
In multi-conductor systems, Z and Y are square matrices, and V and I are vectors, both with dimension equal to the total equivalent
number of conductors.
The derivation of Z and Y differs depending on the system. Specifically whether the system is underground or in air, or whether the
conductors are bare (i.e. overhead lines) or bundled in cables.
Underground Cables
Solving the Y and Z matrices for cable systems is a bit more involved than that of aerial transmission lines. In most practical systems,
cables will possess multiple conducting layers, and most often run underground.
The LCP includes algorithms to solve single-core (SC) coaxial type cable systems: SC cables will consist of a centre conductor, and can
include up to three concentric, conducting layers. Each conducting layer must be separated by an insulating layer, where the
outermost insulating layer between the cable and earth is optional. The centre conductor can be either a hollow pipe possessing a
finite thickness, or a solid, cylindrical conductor (by entering an inner radius r0 = 0.0). Any insulated conducting layer of each SC
cable may be grounded mathematically, where the voltage along the full length of that conductor will be assumed to be 0.0.
A cross-section of an SC cable consisting of core and sheath conductors is illustrated in Figure 8-6.
Where,
Relative permeability
Relative permittivity
Series Impedance Z
Apart from the centre conductor, each concentric conducting layer is represented by a combination of inner and outer surface
impedances, as well as mutual impedance between it and the adjacent conductors. Each insulating layer is characterized by a single
impedance with no mutual components. As such, and with respect to the series impedance, the SC cable shown in Figure 8-6 can be
represented by the following equivalent circuit:
NOTE: This method of circuit equivalency can be extended to consider any number of coaxial layers. The Line Constants
Program extends this method to a maximum of 4 conducting layers plus 4 insulating layers.
(8-4)
Where,
The elements of Zi and Z0 are themselves sub-matrices of dimension m x m, where m corresponds to the number of conducting
layers in each respective cable n. If Equation 9-4 is rewritten in matrix format, it would appear as follows:
(8-5)
Where,
The SC cable representation in Figure 8-7 (i.e. m = 2) corresponds to an internal impedance sub-matrix given as follows:
(8-6)
Where,
The earth return impedance sub-matrix in the case of Figure 8-7 is given as:
Where,
NOTE: For more information on the derivation of earth return impedance, see the section entitled Mutual Impedance
with Earth Return in this chapter.
There is more than one method by which to calculate the individual internal impedances of an SC cable: One popular method is to
solve them directly by using the well-known Bessel function based equations [3]. The LCP instead solves these quantities by way of
equivalent analytical approximations as described in [7], which are generally much better suited for digital computation.
In an ideal sense, the Bessel function approach is of course more accurate, as these equations directly describe the theoretical
characteristics of the conductor impedances. However when solved numerically in a digital program, the Bessel functions
themselves can quickly become mired in precision overflow/underflow problems (In(x) tends to infinity and Kn(x) tends to zero), and
additional steps must be taken avoid these situations. Also, algorithms available to solve these functions are themselves a
combination of approximate formulae [14].
The Wedepohl/Wilcox approximations outlined in [7] are exact at very low and very high frequency. The error between these and
the Bessel based equations for impedance of a solid cylinder, peaks at about 0.5% at mid-frequencies. The approximation error for
the annulus impedances is even smaller, and approaches the exact functions with increasing accuracy as the thickness of the annulus
becomes small compared with the radius of the annulus. The advantage to using these formulae over the Bessel function based
impedances is mainly stability and speed of solution. The error introduced by the approximation equations is negligible in the time
domain.
The equations for the individual impedances z1 to z6 in Figure 8-7 are given as follows. Both the Bessel function and equivalent
approximate formula are presented for comparison:
Approximate: (8-8)
Bessel:
Approximate: (8-9)
Bessel:
(8-10)
Approximate: (8-11)
Bessel:
Approximate: (8-12)
Bessel:
Approximate: (8-13)
Bessel:
(8-14)
Where,
Shunt Admittance Y
Deriving the shunt admittance matrix Y for a system of SC cables is relatively simple compared to complexities of the series
impedance. Y is based on the potential coefficient matrix P:
(8-15)
Where,
The elements of Pi are themselves sub-matrices of dimension m x m, where m corresponds to the number of conducting layers in
each respective cable n. If Equation 8-15 is rewritten in matrix format, it would appear as follows:
(8-16)
Where,
The SC cable representation in Figure 8-6 (i.e. m = 2) corresponds to an internal impedance sub-matrix given as follows:
(8-17)
Where,
(8-18)
Note that in underground systems, the surrounding earth acts as an electrostatic shield resulting in null off-diagonal elements in Y
[7].
Semiconducting Layers
The inclusion of semi-conducting layers to the coaxial cable model is based on reference [29]. The semiconductor layers can be easily
added by modifying the properties of the main insulation layer (ex. by changing the permittivity of the insulation).
(8-19)
Where,
Assumptions
The capacitance of the semi-conducting layers is neglected. The permittivity of semi-conducting layers is very high compared to the
insulator permittivity (e.g. typical values for relative permittivity of the semi-conducting layers and insulators are 1000 and 3
respectively), hence the capacitance of the semi-conducting layers is much higher than that of insulator. In the admittance
equivalent circuit of the cable, two capacitors are in series. The total capacitance is
(8-20)
Since , then .
The conductivity of the semi-conducting layer is much lower than that of core or sheath; hence the relative contribution of the
longitudinal current in the semi-conducting layers is negligible. Typical values for conductivity of the core and the semi-layers are
1e8 and 10 S/m. Note that the thickness of the first semiconducting layer must be less than the R2 - R1 and thickness of the second
semiconducting layer must be less than the R3 - R2 , where R3 is the outer radius of the sheath.
Where,
Relative permeability
Series Impedance Z
Each overhead conductor is modeled assuming a perfect cylindrical shape, which may possess a hollow core. As such, the conductor
is represented by a combination of inner and outer surface impedances. If the conductor is solid, only the outer surface impedance
is considered. The composition of the conductor is assumed to be homogeneous – that is, composite conductors, such as ACSR must
be approximated as homogeneous.
(8-21)
Where,
NOTE: For more information on the derivation of earth return impedance, see the section entitled Mutual Impedance
with Earth Return in this chapter
(8-22)
Where,
The internal impedance for an overhead conductor is given as shown below. The LCP uses an analytical approximation to the well
known Bessel based equations. Both the analytical approximation and Bessel equations are given here for easy reference:
NOTE: See the section entitled Underground Cables in this chapter for a detailed explanation why approximations are
chosen over the Bessel method.
Bessel:
Approximate: (8-24)
Bessel:
Where,
Shunt Admittance Y
The shunt admittance matrix Y for aerial transmission systems can be easily derived, due to the fact that the surrounding air may be
assumed as loss less, and the ground potential considered zero [24]. Therefore:
(8-25)
Where,
Frequency [rad/s]
Distances as described in the next section entitled Mutual Impedance with Earth Return
[m].
Aerial Lines
One of the most popular methods developed for earth return impedance in overhead lines, was first published by J. R. Carson in
1926 [1]. The equations involved (now known as Carson’s Equations) contain infinite integrals with complex arguments that are
difficult to evaluate numerically [12]. The equation for mutual impedance between aerial conductors with homogeneous earth
return is as given below:
(8-26)
Where,
Depth of penetration
The first term ZM in Equation 8-24 represents the aerial reactance of the conductor, had the ground return been a perfect
conductor. The second term ZG is referred to as Carson’s Integral, which represents the additional impedance due to a lossy ground.
An ingenious method for dealing with ground return, published by Gary in 1976 [10], introduced the concept of a super conducting,
current return plane. This fictitious plane was placed at a complex depth de, also known as the depth of penetration, and provided a
mirroring surface where the conductor 'reflections' were used to derive very simple equations for ground return
impedance. Although published in 1976, mathematical proofs for these equations did not surface until Deri and Semlyen in 1981
[12]. Basically, what is now referred to as the Deri-Semlyen approximation of Carson’s Integral is as follows:
Where,
Combing Equations 8-26 and 8-27 results in the following for mutual impedance between aerial conductors,
(8-28)
Direct Numerical
Integration:
Note that although the direct numerical integration method is slightly more accurate, the additional solution time can become quite
extensive depending on the complexity of the system if this option is chosen.
Underground Cables
The integrals describing the equations for the earth return impedance in a system consisting of buried cables were originally
developed by Pollaczek in 1931 [2]. As with Carson’s integral for aerial lines, the Pollaczek integrals are ill-conditioned and are very
difficult to evaluate numerically. The Pollaczek integrals define an electric field vector E at an arbitrary point within a homogeneous
ground, due to electric current flowing in a buried conductor.
Equation 8-28 below gives the equation for mutual impedance corresponding to the form given by Pollaczek [7]:
(8-30)
In 1973, an analytical approximation to the Pollaczek integral was developed by Wedepohl and Wilcox, who found that up to very
high frequencies only a subset of Pollaczek terms need be taken into account. The mathematical proof of their work is quite
involved and so only the end result is shown in Equations 8-29 and 8-30 below: Equations for both the self and mutual parts of the
earth return impedance is included. For a detailed account of the proof, see [7].
(8-31)
(8-32)
Where,
Distance between the centre points of the ith and jth cables [m].
Depth of the ith cable (centre point) below the ground surface [m]
Direct Numerical
Integration:
Note that although the direct numerical integration method is slightly more accurate, the additional solution time can become quite
extensive depending on the complexity of the system.
In the above diagram, cables 1 and 2 are underground and cables 3 and 4 are aerial. The Zearth and Pexternal (potential coefficient matrix
for external field) matrices are given as follows:
(8-34)
(8-35)
The sub matrices P11, P12, P21, P22 are zero since there is no capacitive coupling between cables. P33, P34, P43, P44 are derived as of
overhead lines for cable 3 and 4. Other matrices are also zero since there is no capacitive coupling between overhead lines and
underground cables [34].
Assuming:
(8-36)
Then,
Where,
More on the mutual coupling between aerial and underground cables can be found in references [32], [33], [34]. The mutual
coupling between overhead line and underground cables is given by [32].
Analytical (Ametani)
Approximation:
Where,
Conductor Elimination
In many cases, it is possible to reduce the transmission system matrix dimension by eliminating individual conductors. This process
can help to increase the solution speed, without greatly affecting the accuracy of results. Conductor elimination is performed within
the LCP in the following areas:
Reduction of sub-conductor bundles into their equivalent single conductor form (not optional).
Kron Reduction
The Kron reduction technique can be illustrated with the following simple example of reducing the system Z matrix by eliminating
aerial ground wires:
(8-39)
The 'g' and 'c' subscripts represent the conductor and ground groups respectively. In the case of eliminating ground wires, it is
assumed that Vg = 0.0, which leads to:
(8-40)
Where,
(8-41)
A similar procedure is also applied to the inverse shunt conductance matrix Y-1.
It is important to note that the elimination of ground wires from a transmission line is not the same as having no ground wires at
all. The mere presence of the ground wires, even if they are eliminated, affects the remaining system Y and Z matrices.
Conductor Bundling
The bundling together of two or more sub-conductors to form a single phase conductor is common practice in overhead
transmission line design. The sub-conductors are normally held together with spacers in a symmetrical, equidistant pattern
(asymmetrical positioning is also used).
Based on the assumption that the phase current is divided evenly amongst the sub-conductors, and that each carries the same
phase voltage, the conductor bundle may be reduced to a single, equivalent phase conductor. The Line Constants Program performs
this equivalency by using the Kron reduction technique as described earlier.
There are two avenues for entering bundled conductor data; symmetrical and asymmetrical. If the bundle is symmetrical (as shown
in Figure 8-13), then simple trigonometric techniques are used to calculate the individual XY coordinates of each sub-conductor,
given the sub-conductor spacing dsc and the number of sub-conductors per bundle N. If the bundle is asymmetrical, then the XY
coordinates of each sub-conductor must be entered directly.
Figure 8-14: Cross-Section of a 3-Phase Transmission System with Three Sub-Conductor Bundles
Each sub-conductor is initially considered a separate entity when the system matrices are constructed. For example, if a
transmission system consists of a single three-phase circuit, where each phase conductor consists of three sub-conductors (as shown
in Figure 8-14), then the resulting system matrix dimensions would be 9 x 9, as shown below for the series impedance matrix Z
(where the individual matrix elements are calculated as described in the section entitled Deriving the System Y and Z in this chapter).
Once the system matrices are defined, the Kron reduction procedure is invoked, which effectively reduces the system matrices down
to their single-conductor, multiple phase equivalent. For example Equation 8-42 is reduced to:
(8-43)
In the end, the effective number of conductors in this example is 3. This will need to be considered when you are externally
connecting the transmission system to the greater network in PSCAD. See Constructing Overhead Lines or Constructing
Underground Cables in the PSCAD Manual.
Conductor Transposition
Many long AC transmission lines employ the concept of conductor transposition in order to minimize system imbalance. In a
practical sense, this is achieved by periodically rotating the conductor positions in the circuit, so that each phase spends an equal
distance in each position, between the sending and receiving end.
There are essentially two methods by which to model practically-connected, transposed lines in PSCAD (valid when using the
Bergeron and either of the Frequency Dependent line models). The first method requires that each section of the total line to be
represented as an individual line. The transpositions can be implemented in one of two ways for this case: The first is to physically
transpose the circuit interconnections between the line sections on the PSCAD Canvas, as shown below:
An alternative method is to alter the conductor XY coordinates within the properties editor of each line section. One benefit of this
method is that phase A could remain conductor #1 throughout the length of the transmission line.
Ideal transposition is a mathematical average of the unbalanced line. This is equivalent to visualizing an infinite number of
transposition cycles, where the line segment length approaches zero. The result is a series impedance matrix Z and a shunt
admittance matrix Y that are perfectly symmetrical and balanced. For example, if Zsc is the system impedance matrix, then Z'sc is it’s
ideally transposed equivalent:
(8-44)
Where,
(8-45)
(8-46)
(8-47)
Where,
Z1, Z2, Z'1 and Z'2 are defined separately as given by Equation 8-42 and:
Figure 8-17: Major Section of Cross-Bonded Sheaths for Three Single-Core Cables in PSCAD
Ideal cross-bonding is an alternative way to include cross-bonding to the existing cable line model (see reference [31]). The cable
sheath can be assumed as cross-bonded through the entire length of the line (similar to the ideal transposition option in overhead
lines). This is a good approximation for situations where there are many cross-bonded sections. This method gives sufficient
accuracy for studies including switching transient studies and fault analysis. An additional advantage of this method is that
simulation speed is much higher than the conventional approach.
Simulation Results
Figures 8-18a and 8-18b show the simulation results for a three cable system. A step voltage is applied to the conductor of the first
cable and receiving-end of the same cable is short-circuited at t = 0.1 s. All other conductors (including sheaths) are connected to
ground through 1 resistance. The figures compare the current through the conductor of the first cable and the induced voltage on
the conductor of the second cable for three cases, ideal cross-bonded cable system, actual cross-bonded with 9 cross-bonded major
sections and a non cross-bonded system. There is a significant mismatch between the cross-bonded and non cross-bonded cable
results. Simulation results for ideal cross-bonded system are in a close agreement with cross-bonded case. If there are large number
of cross-bonded sections (typical in many practical applications), the ideal cross-bonding is a good approximate for the actual cross-
bonded system.
Figure 8-18b: Comparing Sending-End Current in Ideal, Actual and Non Cross-Bonded Systems
(8-48)
(8-49)
Eigenvalue/Eigenvector Analysis
The derivation of system eigenvalues/eigenvector is a very important step in the overall process of solving the line constants. One of
the primary purposes of eigenvector matrices for example, is to provide a transformation medium to shift between the modal
domain and the phase domain.
The general procedure is to ascertain the eigenvalues and eigenvectors of the YZ product matrix. Valid eigenvectors of YZ are
generally in complex matrix form with dimension n x n. For each YZ eigenvector matrix TI, there are n eigenvalues (also
complex). The eigenvector matrix TI can be derived from the following eigenproblem equation:
(8-50)
Where,
The YZ matrix is frequency dependent, and therefore TI will also vary with frequency. So as to guarantee a minimum complexity in
curve fitting frequency dependent properties that are derived from TI, such as Y0 and H, the TI eigenvector matrix should be smooth
and free of any abrupt changes or discontinuities in the frequency domain. In more simple systems, this is usually the
case. However, in highly asymmetrical overhead lines, or multi-layered, multi-cable underground systems, the elements of TI may
not behave well at all. In fact, eigenvalues may switch places or ’swap’ at certain frequency points.
The Line Constants Program employs a Newton-Raphson technique, based on that described in [18], which ensures a smooth and
well behaved TI matrix as a function of frequency - for all types of transmission systems.
There are n x n equations contained within Equation 8-50 above, due to the fact that there is a set of n equations for each element
kk of the matrix . Each eigenvalue kk and corresponding eigenvector matrix column TI can be solved separately as follows:
(8-51)
Where,
The equation set F(x) is combined with its corresponding Jacobian matrix J(x) to form the Newton-Raphson iterative equation
(8-52)
Seed Values
The Newton-Raphson procedure will normally converge within a few iterations, provided that the starting (or seed) value is an
accurate estimate. The LCP uses a stable, root squaring method to determine reasonable seed values at the starting frequency f0
[24].
From this point onwards (i.e. frequencies f1 to fn), the new vector of unknowns xnew, calculated by the Newton-Raphson procedure, is
used as a seed value in the subsequent iteration.
(8-53)
Modal Analysis
Generally speaking, transmission systems often consist of several mutually coupled phases or conductors. Modal analysis provides a
means for separating each mutually coupled phase into a related but independent, single-phase transmission system. In terms of a
system matrix, this means that the matrix will become diagonal, where all off-diagonal elements are zero. Each of these
independent phases is referred to as a mode.
In unbalanced transmission systems, each mode will possess a unique characteristic impedance and travel time. Usually there are
two main types of modes: Firstly the ground mode (otherwise known as the common mode or zero-sequence mode), which is active
whenever ground currents flow in the system. And secondly, the remaining modes are known as metallic modes, differential modes
or positive and negative sequence modes. The ground mode normally possesses a longer travel time, greater characteristic
impedance and larger resistance than the metallic modes.
Phase quantities in the Line Constants Program are transformed into the modal domain by using the YZ eigenvector matrix TI and
the ZY eigenvector matrix TV. For example, the modal impedance and admittance matrices are derived as follows:
(8-54)
(8-55)
(8-56)
When there is only a single conductor above a ground plane, there is just one mode. The only path the current can circulate is along
the conductor and back through the ground. This is particularly true if one end of the conductor is energized with a voltage source
and the other is grounded as shown below:
For a two-conductor transmission system, such as a bipolar DC line, there are two paths the return current can flow in as shown in
below:
(8-57)
(8-58)
It is interesting to note that the transformation matrix for a single and double-conductor flat configuration does not change with
frequency – this is because the conductors are always balanced. If a three-phase line is balanced, then the transformation is also
constant with frequency. This is the case for ideally transposed lines, or a delta configured line very high in the air. Under these
conditions, the transformation matrix becomes that consisting of Clark components:
(8-59)
(8-60)
Figure 8-20 – Three Modes of a Three-Conductor Transmission Line using Clark Components
As a three-phase circuit is not usually perfectly balanced, TI ≠ TV and it is left for the eigenvector/eigenvalue solver to determine a set
of frequency-dependent transformation matrices.
Curve Fitting
In the Line Constants Program, curve fitting is the final step in the process of solving a frequency-dependent transmission
system. The primary purpose of the fitting routine is to consider a set of frequency domain response points, and fit this data with a
low order, rational function approximation.
NOTE: Figure 8-21 illustrates this concept for the characteristic admittance YC(s) verses log(f). Here the average RMS
fitting error is about 0.2%.
Both of the frequency-dependent models in PSCAD utilize a method for rational fitting of frequency-domain responses called Vector
Fitting.
Vector Fitting
The vector fitting algorithm was first developed by Bjørn Gustavsen and Adam Semlyen in 1996, and the source was made available
to the public soon after. It is the core of the Line Constants Program curve fitting algorithm and is now used for both the Frequency
Dependent (Mode) and the Frequency Dependent (Phase) models.
NOTE: A quick overview of the vector fitting process is provided here: If the reader would like a more detailed account,
please see Reference [21], or visit www.sintef.no.
Generally speaking, the vector fitting algorithm takes a nonlinear, rational approximation of the form,
(8-61)
Where,
Real constants
And rewrites it as a linear problem of type Ax = b, and then determines the poles and zeros.
Given a reasonable set of starting poles , f(s) is multiplied by an unknown function g(s), and a rational approximation equation for
g(s) is introduced:
(8-62)
(8-63)
Equation 8-63 is linear with unknowns cn, d, h and , and may be written in the form Akx = bk for a range of frequency points,
where:
(8-64)
With the unknown quantities solved, a rational approximation of f(s) can be derived from Equation 8-63. This is clear if rewritten as
follows:
(8-65)
(8-66)
Equation 9-60 illustrates that the poles of f(s) become equal to the zeroes of gfit(s). Therefore, the poles of f(s) can be determined
more economically by instead solving the zeros of gfit(s). This same procedure can be used to solve for the residues cn of f(s). See
reference [21] for more details on Vector Fitting.
(8-68)
Where,
are used to derive an upper frequency limit , so that a time delay for each mode can be calculated:
(8-69)
NOTE: See Reference [22] for more details on calculating the time delay .
Where,
The time delays extracted for each mode are then compared. Modes with very similar time delays are sorted into groups called
delay groups, where further analysis is performed on a delay-group basis. This grouping of like modes helps to increase the speed of
the fitting solution for H(s) by effectively reducing the number of modes. This is especially effective in systems with geometric
symmetry.
The group time delay is then used to 'back-wind' each respective delay group. The back-wound modal propagation function is then
fitted as follows:
(8-70)
The resulting poles from this fit are used as starting poles in fitting H(s) in the phase domain:
(8-71)
Where,
The poles of the different modes may, in some instances, be similar due to the fact that the modes are fitted independently.
Instabilities may occur in the time domain if these similarities occur at low frequencies, and so a warning is given if the ratio
between phase domain residues and poles is greater than 100. This can be improved by decreasing the fitting order of magnitude
(i.e. decreasing the maximum number of poles).
(8-77)
A square matrix
Eigenvalues of A
all that is needed is to sum the diagonal elements of YC(s). The resulting sum as a function of frequency is referred to as the trace of
YC(s), or:
(8-78)
(8-79)
NOTE: The proportional term h as shown in Equation 8-61 is set to zero in Equation 8-79 due to the fact that the
characteristic admittance YC(s) normally converges to a constant value.
The resulting poles from this approximation are then used as starting poles for fitting the actual elements of YC(s) in the phase
domain, again using 8-79.
The passivity can be guaranteed by verifying that the eigenvalues of the Hermitian matrix derived from transmission line parameters
are positive for the frequency range of interest. The above graph shows the eigenvalues of H for particular cable configuration. The
presence of negative eigenvalues at very low frequencies indicates the non-passive cable model which may lead to unstable
simulation. In power system studies, the unstable simulation may be frequently observed, especially when simulating HVDC
underground cables and overhead lines. The proper fitting parameter selection may help to obtain passive model and hence stable
simulation. The following options can be used to verify passivity of the model.
Passivity checking is controlled from within the Frequency Dependent (Phase) Model component.
As discussed in previous sections, the use of modern phase domain modeling techniques, coupled with parameter estimation using
Vector Fitting, has greatly improved the accuracy of time-domain models for transmission lines and cables. Although the frequency-
dependent models simulate the frequency range from a default of 0.5 Hz to about 1 MHz, it has been difficult to achieve a good fit in
the proximity of 0 Hz (DC). When dealing with HVDC lines and cables, it is very important to accurately reproduce the response at
DC, as this is the nominal frequency of the line. It can be shown that forcibly trying to fit the characteristics at these extremely low
frequencies requires high order fitting and sometimes leads to inaccurate results.
A feature exists in the Line Constant Program that modifies the form of the rational function, approximated in the curve fitting
procedure, when using the Frequency-Dependent (Phase) model only. The rational function approximations, for both the
propagation and the characteristic admittance matrices, can be fitted more accurately without having to substantially increase the
number of poles. In fact, with this approach the DC response is exact! This feature is called DC Correction.
DC Correction allows for two possible variants of the functional form. In the first approach, the admittance and propagation transfer
functions are reformulated so that the DC response is factored out as an additive constant, which can then be directly selected. In
the other approach, the transfer function is first fitted over the entire frequency range, which typically results in some fitting error at
precisely DC. A low frequency first order pole is then added to the resultant fitted function in order to realize the exact response at
DC, without significantly affecting the remainder of the frequency response.
(8-80)
(8-81)
Where,
The square root term in Equations 8-80 and 8-81 does not permit a rational function approximation with a low order; and thus a
higher order rational function may be needed for the fitting if very low frequencies are considered.
Consider for example, a simple three single-core coaxial cable configuration shown below:
A typical frequency response of the Yc(1,1) element (i.e. the core admittance of cable 1) is shown in Figure 8-25, which also shows a
plot of a rational function approximation obtained by limiting the lower fitting frequency bound to 1 Hz.
Notice that the fitting at frequencies below the lower bound is poor. The response with a lower bound of 1 Hz, which is often
selected by users when studying DC systems, can produce a significant steady-state error. Reducing the lower bound to 0.1 Hz,
reduces the error, but achieves this with a significant increase in the fitting order as discussed earlier. Note that poor fitting at very
low frequencies is a major source of error when modelling DC lines.
(8-83)
By selecting ddc,theoretical to be precisely the known DC value, a perfect fit at DC is guaranteed. This approach has been introduced in
the Frequency-Dependent (Phase) model, as discussed in [27]. These modified equations can be re-expressed in a similar form to
Equations 8-71 and 8-79, so as to make the formulation amenable to the vector fitting process. Using a proper choice of variables,
Equation 8-83 can be converted into a form as shown in Equation 8-84, which is suitable for vector fitting.
(8-84)
Where,
A minor issue with the above method is that although the DC error is eliminated, the resultant propagation function at very large
frequencies deviates marginally from zero; which is contrary to the physical properties of typical propagation functions. Although
the error introduced is trivial, the terms in Equation 8-84 can be slightly perturbed, using another least squares fitting, to taper the
high frequency response to zero, without altering the correct DC value.
As seen in Figure 8-26, this approach results in an excellent fit over the entire frequency range, without any increase in the order of
the fitted function. The corresponding time domain results for a short circuit on the cable in Figure 8-24 is shown in Figure 8-
27. Over a 10 second interval, accurate reproduction of the response is shown when compared to a solution using numerical inverse
Laplace transform methods.
Figure 8-26 – Frequency Response Plots for the Elements of the First Column of the Propagation
(8-85)
Figure 8-28 – Magnitude of A(1,1) Before and After the Addition of Pole/Residue
Figure 8-29 – Sending-End Current of First Conductor with Different Poles Selected
Output parameters are written to files with the extension *.out, all of which can be found in the PSCAD Temporary Directory (*.emt)
for the case project, following a transmission system solve. Each output file will possess a unique name, which consists of the line
name prefixed to the name of whatever the quantity exists in the file:
<systemname><quantityname>.out
The only exception to this naming rule is the steady-state output file, which does not have a quantity name.
A detailed description of this file is provided in Chapter 8 of the PSCAD Manual under the heading Line Constants Files.
PSCAD provides a utility called the Detailed Output Viewer, which is programmed specifically for viewing these files.
The parameters written as detailed output depend on the frequency-dependent model being used to solve the system. The
following tables summarize the parameters output for each model:
*_zm.out
Series Impedance Matrix Magnitudes
*_zp.out
Series Impedance Matrix Phase Angles
*_ym.out
Shunt Admittance Matrix Magnitudes
*_yp.out
Shunt Admittance Matrix Phase Angles
*_lamdam.out
YZ Eigenvalue Vector Magnitudes
*_lamdap.out
YZ Eigenvalue Vector Phase Angles
*_timm.out
YZ Eigenvector (Modal Transformation) Matrix Magnitudes (Calculated/Fitted)
*_amm.out
Modal Propagation Function Magnitudes (Calculated/Fitted)
*_apm.out
Modal Propagation Function Phase Angles (Calculated/Fitted)
*_zcmm.out
Modal Characteristic Impedance Vector Magnitudes (Calculated/Fitted)
*_zcpm.out
Modal Characteristic Impedance Vector Phase Angles (Calculated/Fitted)
*_timp.out
YZ Eigenvector (Modal Transformation) Matrix Magnitudes
*_ycmp.out
Characteristic Admittance Magnitudes (Calculated/Fitted)
*_ycpp.out
Characteristic Admittance Phase Angles (Calculated/Fitted)
*_hmp.out
Propagation Function Matrix Magnitudes (Calculated/Fitted)
*_hmm.out
Modal Propagation Function Vector Magnitudes (Calculated/Fitted)
*_hpm.out
Modal Propagation Function Vector Phase Angles (Calculated/Fitted)
Where,
(8-86)
For more information on these components, please see the respective topics in the PSCAD On-Line Help.
Long-Line Correction
Long- -section circuit. A
'long' transmission line can be defined as any line exceeding approximately 200 to 250 km in length [16], although this is surely open
to interpretation.
-section equivalent circuits will become less and less accurate as the line becomes
longer. -section does not account for the uniform distribution of line parameters. It is possible
however, to derive a set of long- -section equivalent circuit does indeed provide a
better representation.
The Line Constants Program displays the long-line corrected data directly in the Output File (*.out). This information is provided
specifically for users who wish to develop their own, multi-circuit -section equivalents, using the Line Constants program as a
starting point. The long-line correction is performed directly on the elements of the modal impedance ZM and modal admittance YM
matrices as follows:
(8-87)
Where,
The long-line corrected modal parameters are then transformed back to the phase domain before being displayed in the output file.
EMTDC uses the Method of Characteristics (otherwise known as Bergeron’s Method) to represent distributed parameter branches,
which account for travel time delays, in electric networks. The following section provides a brief overview of this method. For more
details, see [6].
Method of Characteristics
Consider an ideal (loss-less) transmission system with an inductance L and capacitance C per unit length. At a point x along the
system, the voltage and current are represented as follows:
(8-89)
The general solution of for Equation 8-89 can be given in the following form:
(8-90)
The characteristic
It can then be shown (see [6]) that for a transmission system of length, Equations 8-89a and 8-89b can be re-written in two-port
format as:
(8-91)
Where,
Equations 8-91a and 8-91b can be represented schematically as Norton equivalent circuits, representing the sending and receiving
ends of the ideal, distributed branch:
It is important to note that the Bergeron model is a single-frequency model. That is, all calculated parameters, such as characteristic
impedance Z0, are calculated at a specified frequency: Usually either 50 or 60 Hz for an AC transmission line. Although the Bergeron
model can indeed be used for transients simulation in the time domain (which includes all frequencies), only results at the specified
steady-state frequency are meaningful. As such, the Bergeron model should only be used for general fundamental frequency
impedance studies, such as relay testing or matching load-flow results.
Where,
The Norton interface impedance Z at each end of the line now becomes:
(8-92)
The change in Norton impedance Z is reflected in the definition of the Norton current injections Ik and Im as follows:
(8-
93)
(8-94)
NOTE: This option can be invoked by choosing the 'Use Damping Approximation?' option in the Bergeron model.
Upon assembly of the of the Bergeron model interface, EMTDC will create a split at the log average m of the two specified
frequencies and determine the high and low frequency attenuation paths:
(8-95)
Where,
The frequency for loss approximation is normally selected to be in the range between 100 Hz and 2 kHz, which may be chosen to
accommodate specific resonance conditions of interest.
The log average frequency m is used to calculate the real pole time constant c = m , which is applied to the Bergeron model
interface.
Selection of the wave shaping constant S can be made in order to shape the steep front of a travelling wave to a known attenuation
and slope. If one is concerned about matching the steep front from the Bergeron line model to a known response, S must be
adjusted by trial and error. Care should be taken when using the wave shaping time constant, because although the real pole will
attenuate the high frequency components of the line, it will also introduce an additional lag or time delay, which in turn affects the
overall travel time and thus, the effective line impedance.
EXAMPLE 9-1:
Consider a single-phase Bergeron line model connected to an infinite source and terminated with a large resistance.
A voltage surge is applied at the sending end of the line, and the resultant sending end current is monitored. The waveform is
compared to the sending end current given by the Frequency Dependent (Phase) model, which for this example is assumed to very
similar to a real world result.
NOTE: This option can be invoked by choosing the 'Use Damping Approximation?' option in the Bergeron model.
Due to the lack of high frequency attenuation in the Bergeron model, the receiving end voltage includes frequency components of
higher order (as witnessed by the extra 'sharpness' of the reflections).
If the 'Use Damping Approximation' is enabled in the Bergeron model, then a more accurately attenuated current is
produced. However, note that a phase shift has been introduced by the wave shaping real pole function.
Two Frequency-Dependent models are available in PSCAD: The Frequency Dependent (Phase) model is the most accurate, as it
considers the frequency dependence of internal transformation matrices (thereby accurately representing unbalanced, as well as
balanced systems). The older Frequency Dependent (Mode) model assumes a constant transformation and therefore only accurate
when modeling balanced systems. For systems consisting of one or two conductors, the two models will give identical results (as the
transformation is constant anyway). This is also true for 3-phase, delta configurations (located at a high distance from ground level)
and any ideally transposed circuits.
The Frequency Dependent (Phase) model is numerically robust and more accurate than any other commercially available line/cable
model, and thus, is the preferred model to use. The FD (Phase) model will of course provide a much more accurate representation
of any transmission system than that offered by the Bergeron model.
In the formulation of a time domain equivalent circuit for the Bergeron model, the expressions were solved in a relatively
straightforward manner. However, when considering frequency dependencies, these expressions are next to impossible to
formulate directly. It is therefore most convenient to first work in the frequency domain, where an exact solution for a given
frequency can be easily derived.
Consider a single-phase of a transmission system as illustrated in Figure 8-39. In the frequency domain, the voltages and currents at
one end of the line may be represented in terms of the voltage and current at the other end in the following exact general equation:
(8-96)
Where,
Using a method similar to that described for the Method of Characteristics, forward and backward traveling wave weighting
functions Fk, Fm and Bk, Bm (see [8, 13]) are introduced. If the system is assumed to be terminated by an equivalent network whose
frequency response is identical to the characteristic impedance Z0 , then the forward and backward traveling wave functions can
be expressed in the frequency domain as:
(8-97)
(8-98)
(8-99)
(8-100)
(8-101)
(8-102)
Where,
is sometimes referred to as the attenuation function and is a complex number. The real part of is the attenuation constant, and
the imaginary part is the phase constant.
The time domain form of Equations 8-101 and 8-102 can be arrived at through the convolution integrals:
(8-103)
(8-104)
Note that the lower limit of the integral in Equations 8-103 and 8-104 is the travel time , because the fastest frequency component
of an impulse at one end of the transmission system will not reach the other end until this time has elapsed.
Equations 8-103 and 8-104 show that the values of bk(t) and bm(t) can be defined entirely by historical values of fm(t) and fk(t)
(provided that the time step ). Therefore,
And,
(8-106)
The equations above can be converted to a modal representation and illustrated schematically as in Figure 8-40.
Figure 8-40 – EMTDC Frequency Dependent (Mode) Model Time Domain Interface
In 1999, the Universal Line Model (ULM), based on the theory originally proposed in [22], was incorporated into PSCAD to address
these shortcomings, thereby providing a general and accurate frequency dependent model for all underground cables and overhead
line geometries. This model (otherwise known as the Frequency Dependent (Phase) model) and its practical implementation into
EMTDC is described in [23].
The Frequency Dependent (Phase) model operates on the principle that the full frequency-dependence of a transmission system can
be represented by two matrix transfer functions: The propagation function H, and the characteristic admittance YC.
Given Figure 8-41, the following can be derived directly from the 'telegrapher’s equations' (i.e. equations 8-2 and 8-3) as follows:
(8-107)
(8-108)
Where,
And,
H and YC are calculated multiple times by the LCP at discrete points in the frequency domain, and then approximated and replaced
by equivalent low order rational functions (see Curve Fitting in this chapter for more details). This technique allows for the use of
recursive convolution techniques in EMTDC for migration into the time domain, which have proven much more computationally
efficient than performing convolution integrals directly [9].
Figure 8-42 – EMTDC Frequency Dependent (Phase) Model Time Domain Interface
The history current source injections Ihisk and Ihism are updated each time step, given the node voltages Vk and Vm, as calculated by
EMTDC. The steps by which this is accomplished by the Frequency Dependent (Phase) Model time-domain interface routine is as
given in below:
(8-109)
Where,
For a more detailed description of this method including the convolution integration, see [23].
2. Pollaczek, F., Sur le champ produit par un conducteur simple infiniment long parcouru par un courant alternatif, Revue
Gén, Elec., 1931, 29, pp. 851-867.
3. S. A. Schelkunoff, The electromagnetic theory of coaxial transmission line and cylindrical shields, Bell Syst. Tech. J., vol.
13, pp. 532-579, 1934.
4. H. W. Bode, Network Analysis and Feedback Amplifier Design, D. Van Nostrand, New York, 1945.
5. L. M. Wedepohl, Application of Matrix Methods to the Solution of Travelling-Wave Phenomena in Polyphase Systems,
Proc. IEE, Vol. 110, No. 12, pp. 2200-2212, December 1963.
6. H. W. Dommel, Digital Computer Solution of Electromagnetic Transients in Single and Multiphase Networks, IEEE
Transactions on Power Apparatus and Systems, PAS-88, #4, pp. 388-399, April 1969.
7. L. M. Wedepohl, D. J. Wilcox, Transient analysis of underground power-transmission systems. System model and wave-
propagation characteristics, Proc. IEE, 120, (2), pp. 253-260, 1973.
9. A. Semlyen, A. Dabuleanu, Fast and Accurate Switching Transient Calculations on Transmission Lines with Ground Return
Using Recursive Convolutions, IEEE Transactions on Power Apparatus and Systems, Vol. PAS-94, No. 2, pp. 561-571,
March/April. 1975.
10. C. Gary, Approche Complète de la Propagation Multifilaire en Haute Fréquence par Utilisation des Matrices Complexes,
EDF Bulletin de la Direction des Études et Recherches-Série B, No. 3/4, pp. 5-20, 1976.
11. A. Ametani, A General Formulation of Impedance and Admittance of Cables, IEEE Transactions on Power Apparatus and
Systems, Vol. PAS-99, No. 3, May/June 1980.
12. A. Deri, G. Tevan, A. Semlyen, A. Castanheira, The Complex Ground Return Plane – A Simplified Model for Homogeneous
and Multi-Layer Earth Return, IEEE Transactions on Power Apparatus and Systems, Vol. PAS-100, No. 8, pp. 3686-3693,
August 1981.
13. J. R. Marti, Accurate Modeling of Frequency Dependent Transmission Lines in Electromagnetic Transients Simulation, IEEE
Transactions on Power Apparatus and Systems, PAS-101, #1, pp. 147-155, Jan. 1982.
14. D. E. Amos, A Portable Package For Bessel Functions Of A Complex Argument And Nonnegative Order, Trans. Math.
Software, 1986.
15. L. M. Wedepohl, Research Report: Calculation of Impedances of Power Cables, University of British Columbia, Submitted
to the Manitoba Hydro International Ltd., File E4.151, 1993.
16. J. J. Grainger, W. D. Stevenson, Power System Analysis, McGraw Hill Inc., 1994.
17. B. Gustavsen, J. Sletbak, T. Henriksen, Calculation of Electromagnetic Transients in Transmission Cables and Lines Taking
Frequency Dependent Effects Accurately Into Account, IEEE Transactions on Power Delivery, Vol. 10, No. 2, April 1995.
19. A. M. Gole, Power Systems Transient Simulation, Course Notes, University of Manitoba, 1998.
20. B. Gustavsen, A. Semlyen, Simulation of Transmission Line Transients Using Vector Fitting and Modal Decomposition, IEEE
Transactions on Power Delivery, Vol. 13, No. 2, pp. 605-614, April 1998.
21. B. Gustavsen, A. Semlyen, Rational Approximation of Frequency Domain Responses by Vector Fitting, IEEE Trans. on
Power Delivery, Vol. 14, No. 3, July 1999.
23. B. Gustavsen, G. Irwin, R. Mangelrød, D. Brandt, K. Kent, Transmission Line Models for the Simulation of Interaction
Phenomena Between Parallel AC and DC Overhead Lines, IPST '99 Proceedings, pp. 61-67, 1999.
24. L. M. Wedepohl, The Theory of Natural Modes in Multiconductor Transmission Systems, Course Notes, University of
Manitoba, 2002.
25. A. Ramirez, A. Semlyen, and R. Iravani, Order reduction of the dynamic model of a linear weakly periodic system—Part I:
General methodology, IEEE Transactions on Power Systems, vol. 19, no. 2, pp. 857–865, May 2004.
26. B. Gustavsen, Time delay identification for transmission line modeling, in Proc. 8th IEEE Workshop Signal Propagation
Interconnects, Heidelber, Germany, pp. 103–106, May 9–12, 2004.
27. H.M.J. De Silva, A.M. Gole and L.M. Wedepohl, Accurate Electromagnetic Transient Simulations of HVDC Cables and
Overhead Transmission Lines, IPST '07 Proceedings, 2007.
28. B. Gustavsen, J. Nordstrom, Pole Identification for the Universal Line Model Based on Trace Fitting, IEEE Transactions on
Power Delivery, vol. 23, no. 1, January 2008.
29. O. Saad, G. Gaba and M. Giroux, A Closed-Form Approximation for Ground Return Impedance of Underground Cables,
IEEE Transactions on Power Delivery, vol. 11, no. 3, July 1996, pp. 1536 - 1545.
30. Bjorn Gustavsen, Panel Session on Data for Modeling system Transients in Insulated Cables, Power Engineering Society
Winter Meeting, 2001. IEEE, Volume 2, pp. 718-723.
31. L.Marti, R.H. Brierley and T.E. Grainger, Analysis of electromagnetic transients in cross-bonded cable systems using
frequency dependent cable models, IPST 1995.
32. Ametani, A., An Investigation of Earth-Return Impedance Between Overhead and Underground Conductors and Its
Approximation, IEEE Transactions on Electromagnetic Compatibility, Vol. 51, Issue: 3, pp. 860 - 867, August 2005.
33. Uribe F. A., Calculating Mutual Ground Impedances Between Overhead and Buried Cables, IEEE Transactions on
Electromagnetic Compatibility, Vol. 50, Issue: 1, pp. 198 - 203, February 2008.
34. Ametani, A, EMTP Simulations and Theoretical Formulation of Induced Voltages to Pipelines from Power Lines, Session
36, Paper 2, Page 5, 15th PSCC, Liege, 22-26 August 2005.
35. Jun Zou, JunJie Li, J. B. Lee, and S. H. Chang, Fast and Highly Accurate Algorithm for Calculating the Earth-Return
Impedance of Underground Conductors, IEEE Transactions on Electromagnetic Compatibility, Vol. 53, Issue: 1, pp. 237 -
240, February 2011.
36. Theodoulidis, T. , Exact Solution of Pollaczek’s Integral for Evaluation of Earth-Return Impedance for Underground
Conductors, IEEE Transactions on Electromagnetic Compatibility, January 2012.
37. H.M.J.S.P De Silva, Gole, A.M., Nordstrom, J.E., Wedepohl, L.M., Robust Passivity Enforcement Scheme for Time-Domain
Simulation of Multi-Conductor Transmission Lines and Cables, IEEE Transactions on Power Delivery, vol. 25, April 2010.
38. C. Chen, E. Gad, R. Achar, Passivity Verification in Delay-Based Macromodels of Multiconductor Electrical Interconnects,
IEEE Trans. Circuit and systems, vol. 52, October 2005.
NOTE: The PSCAD installation script modifies the PATH setting so that access to this directory is possible from other
directories.
Replaces comment characters (i.e. 'c' or 'C') in the first column, with an exclamation mark '!'
Ensures code continuation lines are written with a '&' in column 73, as well as column 6 of the following line
Replaces the older style EMTDC COMMON statements (such as COMMON /S1/ TIME, DELT, ICH, PRINT, FINTIM) and
associated variable declarations with the new style include statements (such as INCLUDE s1.h).
NOTE: The new INCLUDE statements are necessary to allow user-written code to function with either Fortran 77 or the
new dynamic dimensioning Fortran 90.
NOTE: The Fortran Filter is no longer provided with PSCAD versions X4 and onward. To obtain a copy, contact the PSCAD
Support Desk ([email protected]).
or
The Fortran Filter comes with several options, which are described as follows in Table 9-1:
Option Description
t[number] Converts all tabs to a sequence of characters, where [number] is size of tab. The Default is
8
c Converts comments
v Converts common blocks even in the case of incomplete declaration. This needs to be
specified together with -a or -b options. (eg. -av or -bv)
e Empty working directory from intermediate files generated by the Fortran Filter
h Print help
NOTE: This list of options can also be obtained by typing 'ffilter' at a DOS prompt.
The Fortran Filter creates a directory called 'temp' inside the directory in which it is run. The original file will be copied into this
directory and saved with the postfix 'oryg'. The whole filtering process is conducted in this directory.
EXAMPLE 9-1:
Consider a V2 style Fortran source file located in a directory 'c:\temp\test', called 'file1.f'. To convert the file, open a DOS prompt in
'c:\temp\test' and type:
The new filtered source code file will be placed in the 'c:\temp\test' directory described above (the original files are untouched).
Check the '*.log' file for error messages.
EXAMPLE 9-2:
Consider a directory, containing many V2 style Fortran source files, called 'c:\temp\dir1'. To convert the entire directory, open a
DOS prompt in 'c:\temp' and type:
The new filtered source code file will be placed in the 'temp' described above (the original files are untouched). Check the '*.log' file
for error messages.
This is a particularly nasty problem, because all code in this subroutine must be manually edited to replace MYSTOR with the
standard STOR name.
REAL STOR
...
Obsolete Subroutines/Functions
One important enhancement for example, is the move from referencing branches by node numbers, to referencing by an actual
branch number. The node referencing method was found to create problems with parallel branches, which possess identical
connection nodes.
For instance, the branch current output in switching elements such as faults, breakers, thyristors, diodes, etc. all had an inherent
time step delay. This was due to the fact that all parallel switch branches were combined into a single branch for solution in the
main program (V2 had a limit of 3 parallel switch branches). This also meant that the branch current could only be output as an
argument in the DSDYN subroutine, and could not be placed in DSOUT. By referencing each branch by a unique branch number, the
branch current can now be placed directly in DSOUT.
The move to the new branch number referencing method rendered some function calls obsolete. These are listed in Table 9-2.
Table 9-4 lists Internal Variables that are still functional, but their use is in the process of being phased out. Conversion of these
variables is not mandatory, but is recommended:
STORI(*)
STORL(*)
STORC(*)
NSTORI
NSTORL
NSTORC
NOTE: The old STOR array pointer NEXC was set to 0 each time step. The new pointers are set to 1. The new equivalent
conductance GEQ, no longer requires that one branch node be grounded.
As mentioned above, the variable CDC has been replaced by the variable CBR. Manually replacing these variables should be
performed as follows.
Assume that a branch is defined and named 'BRN' in the Branch segment of Component Definition:
I = CBR($BRN, $SS)
EXAMPLE 10-4:
The variable EDC has been replaced by the variable EBR. Manually replacing these variables should be performed as follows.
Assume that a branch is defined and named 'BRN' in the Branch segment of Component Definition:
EXAMPLE 10-5:
The variable GDC and GDCS have been replaced by the variable GEQ. Manually replacing these variables should be performed as
follows.
Assume that a branch is defined and named 'BRN' in the Branch segment of Component Definition:
Storage Issues
As discussed previously, EMTDC contains new storage variables and pointers. A new syntax in the DSDYN and DSOUT segments of
the new Component Definitions is available to inform PSCAD of the total number of storage elements required for each
component. PSCAD uses this information to tell EMTDC how many elements in the array it should allocate memory for (Fortan 90
version only).
If the user wishes to stick with the STOR and NEXC storage array for now, the proper syntax to use in the Component Definition is:
#STORAGE STOR:200
EMTDC will allocate an additional 10,000 STOR locations only in cases where users, who have converted PSCAD V2 cases, have not
yet modified their Component Definitions with this new information. If running PSCAD cases which have just been converted from
V2, and custom components are being used, which collectively exceed 10,000 STOR locations, your simulation case will not function
until the #STORAGE syntax is added to the Component Definitions.
NOTE: See the STORx Arrays for more details on this storage syntax.
3. H. W. Dommel, Transformer Models in the Simulation of Electromagnetic Transients, Proc. 5th Power Systems Computing
Conference, Cambridge, England, September 1-5, 1975, Paper 3.1/4.
4. V. Brandwajn, H. W. Dommel, I. I. Dommel, Matrix Representation of Three Phase N-Winding Transformers for Steady
State Transient Studies, IEEE Transactions on Power Apparatus and Systems, PAS-101, #6, pp. 1369-1378, June 1982.
5. A. M. Gole, Power Systems Transient Simulation, Course Notes, University of Manitoba, 1998.
6. 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), pp. 499-504, Lisbon, September 3-7, 1995.
7. A. M. Gole, A. Keri, C. Nwankpa, E. W. Gunther, H. W. Dommel, I. Hassan, J. R. Marti, J. A. Martinez, K. Fehrle, L. Tang, M.
F. McGranaghan, O. B. Nayak, P. F. Ribeiro, R. Lasseter, Guidelines for Modeling Power Electronics in Electric Power
Engineering Applications, IEEE Transactions on Power Delivery, Vol. 12, No.1, pp. 505-514, January 1997.
8. A. M. Gole, I. T. Fernando, G. D. Irwin, O. B. Nayak, Modeling of Power Electronic Apparatus: Additional Interpolation
Issues, International Conference on Power Systems Transients (IPST '97), pp. 23-28, Seattle, June 22-26, 1997.
9. D. A. Woodford, Validation of Digital Simulation of DC Links, IEEE Transactions on Power Apparatus and Systems, PAS-
104, #9, pp. 2588-2596, September 1985.
10. W. Enright, O. B. Nayak, G. D. Irwin, J. Arrillaga, An Electromagnetic Transients Model of Multi-limb Transformers Using
Normalized Core Concept, IPST '97 Proceedings, Seattle, pp. 93-98, 1997.
11. W. Enright, N. Watson, O. B. Nayak, Three-Phase Five-Limb Unified Magnetic Equivalent Circuit Transformer models for
PSCAD V3, IPST '99 Proceedings, Budapest, pp. 462-467, 1999.
12. B. Adkins, R. G. Harley, The General Theory of Alternating Current Machines, Chapman & Hall, London, 1975.
14. I. M. Canay, Causes of Discrepancies on Calculation of Rotor Quantities and Exact Equivalent Diagrams of the
Synchronous Machine, IEEE Transactions, Vol. PAS-88, No. F, p. 1114-1120, July 1969.
15. M. R. Harris, P. J. Lawrenson, J. M. Stephenson, Per Unit Systems with Special Reference to Electrical Machines, IEE
Monograph, 1970.
16. IEEE Recommended Practice for Excitation System Models for Power System Stability Studies, IEEE Std 421.5-1992.
17. Computer Models for Representation of Digital-Based Excitation Systems, IEEE Transactions 1996.
18. Dynamic Models for Fossil Fueled Steam Units on Power System Studies, by the Working Group on Prime Mover and
Energy Supply Models for System Dynamic Performance Studies, Transactions on Power Systems, Vol. 6, No. 2, May 1991.
19. Hydraulic Turbine and Turbine Control Models for System Dynamic Studies, by the Working Group on Prime Mover and
Energy Supply Models for System Dynamic Performance Studies, Transactions on Power Systems, Vol. 7, No. 1, February
1992.
20. P. Kundar, Power System Stability and Control, McGraw Hill, 1994.
21. L. M. Wedepohl, Theory of Natural Modes in Multi-Conductor Transmission Lines, Course Notes, May 1989.
22. L. M. Wedepohl, Transient Analysis of Underground Transmission Systems, Proc. IEE, Vol. 120, No. 2, Feb. 1973.
23. J. Marti, Accurate Modeling of Frequency Dependent Transmission Lines in Electromagnetic Transients Simulation, IEEE
Transactions on Power Apparatus and Systems, PAS-101, #1, pp. 147-155, Jan. 1982.
25. A. Semlyen, A. Dabuleanu, Fast and Accurate Switching Transient Calculations on Transmission Lines and Ground Return
Using Recursive Convolutions, IEEE Transactions on Power Apparatus and Systems, PAS-94, pp. 561-571, March/April
1975.
26. A. Morched, B. Gustavsen, M. Tartibi, A Universal Line Model for Accurate Calculation of Electromagnetic Transients on
Overhead Lines and Cables, Paper PE-112-PWRD-0-11-1997.
27. B. Gustavsen, G. Irwin, R. Mangelrod, D. Brandt, K. Kent, Transmission Line Models for the Simulation of Interaction
Phenomena Between Parallel AC and DC Overhead Lines, IPST '99 Proceedings, pp. 61-67, 1999.
28. B. Gustavsen, A. Semlyen, Rational Approximation of Frequency Domain Responses by Vector Fitting, IEEE Paper PE-194-
PWRD-0-11-1997, presented at IEEE/PES Winter Meeting, Tampa, 1998.
29. G. V. Reklaitis, A. Ravindran, K. M. Ragsdell, Engineering Optimization - Methods and Applications, New York: Wiley-
Interscience, 1983.
30. R. L. Haupt, S. E. Haupt, Practical Genetic Algorithms, New York: Wiley-Interscience, 1998.
31. K. Y. Lee, M. A. El-Sharkawi (editors), Tutorial on Modern Heuristic Optimization Techniques with Applications to Power
Systems, IEEE Power Engineering Society 02TP160, 2002.
32. J. A. Nelder, R. Mead, A simplex method for function optimization, The Computer Journal, vol. 7, no. 4, pp. 308-313, 1965.
33. A. M. Gole, S. Filizadeh, R. W. Menzies, P. L. Wilson, Optimization-Enabled Electromagnetic Transient Simulation, IEEE
Trans. on Power Delivery, 2004.
34. Krüger, K. H., Lasseter, R. H. HVDC Simulation using NETOMAC, IEEE Montech ’86, Conference on HVDC Power
Transmission, Montreal, Canada, Sept. 29 – Oct. 1, 1986.
35. Gole, A. M., Woodford, S. A., Nordstrom, J. E., Irwin, G. D. A Fully Interpolated Controls Library for Electromagnetic
Transients Simulation of Power Systems, Proceedings, IPST’01 – International Conference on Power System Transients,
Rio de Janeiro, Brazil, June 24-28, 2001.
36. H. M. J. De Silva, A. M. Gole, L. M. Wedepohl, Accurate Electromagnetic Transient Simulations of HVDC Cables and
Overhead Transmission Lines, Proceedings IPST '07, Lyon, France, June 4-7, 2007.
37. B. Gustavsen, J. Nordstrom, Pole Identification for the Universal Line Model Based on Trace Fitting, IEEE Transactions on
Power Delivery, Vol. 23, No. 1, January 2008.