Professional Documents
Culture Documents
Models Rule Book PDF
Models Rule Book PDF
IN
ATP
LANGUAGE MANUAL
February 1996
TABLE OF CONTENTS
1. INTRODUCTION ............................................................................................................1
1.1 THE MODELS LANGUAGE......................................................................................1
1.2 MAIN FEATURES.....................................................................................................1
2. MODEL DESCRIPTION .................................................................................................2
2.1 SYSTEM REPRESENTATION .................................................................................2
2.2 MODEL REPRESENTATION ...................................................................................3
2.2.1 MODEL DECOMPOSITION ...............................................................................3
2.2.2 MODEL DEFINITION .........................................................................................4
2.2.3 FOREIGN MODELS ...........................................................................................5
2.2.4 EXTERNAL MODELS ........................................................................................6
2.3 STATEMENTS..........................................................................................................6
2.3.1 ASSIGNMENT STATEMENTS...........................................................................6
2.3.1.1 VALUE ASSIGNMENT ................................................................................6
2.3.1.2 DIFFERENTIAL EQUATION........................................................................7
2.3.1.3 LAPLACE TRANSFER FUNCTION.............................................................8
2.3.1.3 Z TRANSFER FUNCTION...........................................................................9
2.3.2 ALGORITHM CONTROL STATEMENTS ........................................................11
2.3.2.1 IF................................................................................................................11
2.3.2.2 WHILE .......................................................................................................11
2.3.2.3 FOR ...........................................................................................................11
2.3.2.4 DO .............................................................................................................12
2.3.2.5 REDO.........................................................................................................12
2.3.2.6 COMBINE ..................................................................................................13
2.3.2.7 SEQUENCE...............................................................................................14
2.3.2.8 USE ...........................................................................................................14
2.3.3 SIMULATION DIRECTIVE STATEMENTS ......................................................15
2.3.3.1 WRITE .......................................................................................................15
2.3.3.2 ERROR ......................................................................................................15
2.3.3.3 DEPOSIT ...................................................................................................15
2.4 VALUE-HOLDING ELEMENTS ..............................................................................16
2.4.1 ARRAYS...........................................................................................................16
2.4.2 CONSTANTS ...................................................................................................16
2.4.3 RESIDENT CONSTANTS ................................................................................17
2.4.4 DATA................................................................................................................17
2.4.5 VARIABLES .....................................................................................................18
2.4.6 RESIDENT VARIABLES ..................................................................................19
2.5 MODEL INTERFACE..............................................................................................20
2.5.1 INPUT...............................................................................................................20
2.5.2 OUTPUT...........................................................................................................21
2.6 FUNCTIONS ...........................................................................................................21
2.6.1 FUNCTIONS IN A MODEL...............................................................................21
2.6.2 STATEMENT FUNCTION ................................................................................21
2.6.3 POINTLIST FUNCTION ...................................................................................22
2.6.4 FOREIGN FUNCTIONS ...................................................................................23
2.6.5 RESIDENT FUNCTIONS .................................................................................23
2.6.6 RESIDENT SIMULATION FUNCTIONS ...........................................................25
2.7 NAMES ...................................................................................................................26
2.7.1 NAME DEFINITION..........................................................................................26
2.7.2 USE PATHNAMES...........................................................................................26
2.8 VALUES..................................................................................................................27
2.8.1 VALUE TYPES.................................................................................................27
2.8.2 VALUE REFERENCE.......................................................................................27
2.8.3 VALUE LIMITS .................................................................................................28
2.9 EXPRESSIONS ......................................................................................................28
2.9.1 EXPRESSIONS IN A MODEL ..........................................................................28
2.9.2 REGULAR EXPRESSIONS .............................................................................29
2.9.3 SUM EXPRESSIONS.......................................................................................31
2.9.4 DERIVATIVE EXPRESSIONS .........................................................................32
2.9.5 INTEGRALS .....................................................................................................33
2.9.5.1 INTEGRAL EXPRESSION.........................................................................33
2.9.5.2 INTEGRAL VALUE RESET .......................................................................33
2.10 FORMAT...............................................................................................................34
2.10.1 DESCRIPTION FORMAT...............................................................................34
2.10.2 DELIMITERS..................................................................................................34
2.10.3 LINE INDENTATION ......................................................................................35
2.10.4 COMMENTS ..................................................................................................35
3. MODEL SIMULATION..................................................................................................35
3.1 SIMULATION DIRECTIVES ...................................................................................35
3.1.1 TIMESTEP .......................................................................................................35
3.1.2 INTERPOLATION ............................................................................................36
3.1.3 DELAY..............................................................................................................37
3.2 SIMULATION PROCESS .......................................................................................38
3.2.1 INITIALIZATION ...............................................................................................38
3.2.2 HISTORY FUNCTIONS....................................................................................38
3.2.3 INIT PROCEDURE...........................................................................................40
3.2.4 EXEC PROCEDURE........................................................................................40
3.2.5 SIMULTANEOUS VARIABLES ........................................................................41
3.2.6 SIMULTANEOUS LINEAR VARIABLES USING A LINEAR COMBINE...........41
3.2.7 SIMULTANEOUS NONLINEAR VARIABLES USING A LINEAR COMBINE...42
4. MODELS IN ATP..........................................................................................................44
4.1 MODELS SECTION IN THE DATA CASE..............................................................44
4.1.1 INPUTS FROM THE ELECTRICAL CIRCUIT TO MODELS............................45
4.1.2 OUTPUTS FROM MODELS TO THE ELECTRICAL CIRCUIT........................46
4.1.3 TOP VARIABLES OF THE MODELS SECTION..............................................46
4.1.4 RECORDED VALUES IN MODELS .................................................................47
4.2 TYPE-94 COMPONENTS IN THE CIRCUIT ..........................................................47
4.2.1 THREE TYPES: THEVENIN, ITERATED, NORTON ........................................48
4.2.2 TYPE-94 FORMAT IN ATP ..............................................................................49
4.2.3 TYPE-94 MODEL TEMPLATES.......................................................................50
4.2.3.1 THEVENIN MODEL TEMPLATE ................................................................50
4.2.3.2 ITERATED MODEL TEMPLATE ................................................................51
4.2.3.3 NON-TRANSMISSION NORTON MODEL TEMPLATE .............................51
4.2.3.4 TRANSMISSION NORTON MODEL TEMPLATE ......................................52
MODELS -- p. 1
1. INTRODUCTION
- dynamically-controlled modification of the values of the inputs and variables of a model during
the course of a simulation;
- dynamically-controlled modification of the structure of a model (both topological composition
and algorithmic flow) during the course of a simulation.
________________________________________
2. MODEL DESCRIPTION
The operation directives that are specific to the individual uses of a model are specified in each
USE statement, in the form of local DATA and HISTORY assignments, and of local simulation
directives (see USE).
________________________________________
declarations:
- CONST declarations specify the name, array range, and value of the constants of the model
(the internally-assigned constant value-holding elements);
- DATA declarations specify the name, array range, and optional default value of the data
parameters of the model (the externally-assigned constant value-holding elements);
- VAR declarations specify the name and array range of the variables of the model (the
internally-assigned variable value-holding elements);
- INPUT declarations specify the name, array range, and optional default value of the inputs of
the model (the externally-assigned variable value-holding elements);
- OUTPUT declarations specify which of the model's elements may be used as outputs of the
model;
- FUNCTION declarations specify the description of functions used in the model;
- MODEL declarations specify the description of submodels used in the model;
simulation directives:
- TIMESTEP directives specify the optional default value of time step minimum and maximum
limits for the model;
- INTERPOLATION directives specify the default interpolation degree to be applied to the inputs
of the model if the model is used at sub-steps of the external time step;
- DELAY directives specify the default size of value storage associated with usage of the delay()
function in the model;
- HISTORY declarations specify the name of the model's variables for which a history function
must be defined when using the model; they may optionally be used to assign default history
functions to any of the model's inputs and variables;
operation procedures:
- the EXEC procedure describes the execution algorithm of the model;
- the INIT procedure describes the initialization algorithm of the model.
Once defined, a model can be used independently in as many separate uses as required. Each
use of a model is introduced in a separate USE statement specifying the inputs and outputs of the
used model, and stating the local directives controlling its simulation (see USE).
The names chosen for identifying the constants, data, variables, inputs, functions, and submodels
defined in a model are local to the model. They are not visible outside the model, and can be
selected without concern for the possible duplication of names already used outside the model.
________________________________________
MODELS -- p. 5
where:
- name: local name by which the foreign model can be referenced in the model;
- idname: arbitrary name used in the connection table of the foreign interface subroutine of
MODELS to recognize calls to this model;
and where the following pre-defined names must be used to identify the size of the four arrays
used to interface this model with the rest of the simulation:
- ixdata: number of elements in the array xdata
- ixin: number of elements in the array xin
- ixout: number of elements in the array xout
- ixvar: number of elements in the array xvar
A foreign program must be compiled and linked to the simulation program before it can be called
by MODELS. Any source language may be used, provided that the compiled object code is
compatible with the linker available on the computer platform used to run the simulation. The
interface routine of MODELS (in file mod001.for) is where the user registers the correspondence
between the idname used in the foreign model declarations, and the actual names of the foreign
subroutines and functions linked with the program.
Once declared and named, a foreign model can be used independently in as many separate uses
as required. The inputs and outputs of the foreign model, along with the directives controlling its
MODELS -- p. 6
simulation, are specified in a regular USE statement (see USE). The following simulation directives
apply:
- DATA directives specify the value of the elements of the xdata array;
- INPUT directives specify values to be assigned to elements of the xin array at model
execution;
- OUTPUT directives specify usage of the values of elements of the xout array at model
execution;
- HISTORY directives specify history functions used for assigning pre-simulation history to
elements of xvar and xin;
- TIMESTEP and INTERPOLATION directives can be specified as in a regular USE statement.
All local variables of a foreign model are considered to be under memory management defined
locally in the foreign procedure. Storage for the elements of the arrays xdata, xin, xout, and xvar is
provided automatically by MODELS. The array xvar can be used by the foreign procedure for
storage by MODELS, between calls to the procedure, of the state variables of the procedure.
Storage of these values is provided and managed by MODELS, automatically taking into account
the possibly many separate uses of the same model.
________________________________________
2.3 STATEMENTS
Three categories of statements are available for describing the operation of a model's procedures:
assignment statements, algorithm control statements, and simulation directive statements.
________________________________________
A single value can be assigned to a single variable, to a single element of a variable array, or to a
group of elements of a variable array sharing the same value, by using a single-value assignment
as follows:
and an array of values can be assigned to a group of elements of a variable array, using an array-
value assignment as follows:
name [ expr .. expr ] := array-value expr
Minimum and maximum limits can be attached to the value of a variable or array of variables inside
the expression describing the value (see EXPRESSIONS).
________________________________________
i
The D-polynomial describes the terms "aiD " of the equation, written as follows:
where each coefficient can be represented as an arbitrary expression (linear or nonlinear, constant
or time-varying), and is separated from the D operator by a vertical bar, which is the "applies to"
i
operator of MODELS, with the meaning of "expression applied to D " (see DERIVATIVE
EXPRESSIONS for examples). Minimum and maximum limits can be specified for any of the
coefficients (see EXPRESSIONS).
The keyword CDIFFEQ can be used instead of DIFFEQ, as follows:
CDIFFEQ ( D-polynomial ) | y := x
to indicate a constant-coefficients differential equation. The expressions specifying the value of the
coefficients in CDIFFEQ are not re-evaluated during the execution, regardless of the variation of
the values of any input or variable possibly referred to in these expressions. Using CDIFFEQ
instead of DIFFEQ when the coefficients are constant will increase the simulation speed of the
solution by avoiding needless re-evaluation of the coefficients at each step.
MODELS -- p. 8
Dynamic minimum and maximum limits can be imposed on the value of "y". The limits are specified
in the statement as follows:
DIFFEQ ( D-polynomial ) | y { limits } := x
or
CDIFFEQ ( D-polynomial ) | y { limits } := x
where the limits are expressed using the following syntax:
The limit applied to a variable expressed by means of a differential equation is a "dynamic limit".
While an external static limit would simply clip the value of the variable outside of the procedure by
which the value of the variable is calculated, a dynamic limit modifies the calculation procedure
itself by recognizing that the values of the derivatives of the variable held at a constant limit are
zero.
In a case in which the value of the variable calculated by means of a differential equation is
subsequently reassigned by other means during the same time step, the action of any dynamic
limit previously applied to that variable at that time step is ignored.
When the driving variable "x" of a differential equation of "y" is itself a function of "y", the differential
equation should be solved simultaneously with the equation of "x" in a COMBINE group or in an
explicitly-defined iteration structure, because both are together defining the value of "y"
concurrently with the value of the derivatives of "y".
________________________________________
can be used for expressing the value of a variable "y", where "s" is the Laplace operator.
A Laplace transfer function is specified in MODELS as follows:
LAPLACE ( y / x ) := ( S-polynomial ) / ( S-polynomial )
where "y" can refer to any variable of the model, and "x" to any variable or input of the model,
specified using a simple name or a reference to an element of an array as follows:
i i
The s-polynomials describe the terms "ais " and "bis " of the Laplace function, with each polynomial
written as follows:
where each coefficient can be represented as an arbitrary expression (linear or nonlinear, constant
or time-varying), and is separated from the "s" operator by a vertical bar, which is the "applies to"
i
operator of MODELS, with the meaning of "expression applied to s " (see DERIVATIVE
EXPRESSIONS for examples). Minimum and maximum limits can be specified for any of the
coefficients (see EXPRESSIONS).
The keyword CLAPLACE can be used instead of LAPLACE, as follows:
CLAPLACE ( y / x ) := ( S-polynomial ) / (S-polynomial )
MODELS -- p. 9
to indicate a constant-coefficients Laplace function. The expressions specifying the value of the
coefficients in CLAPLACE are not re-evaluated during the execution, regardless of the variation of
the values of any input or variable possibly referred to in these expressions. Using CLAPLACE
instead of LAPLACE when the coefficients are constant will increase the simulation speed of the
solution by avoiding needless re-evaluation of the coefficients at each step.
Dynamic minimum and maximum limits can be imposed on the value of "y". The limits are specified
in the statement as follows:
LAPLACE ( y / x ) { limits } := ( S-polynomial ) / (S-polynomial )
or
CLAPLACE ( y / x ) { limits } := ( S-polynomial ) / (S-polynomial )
where the limits are expressed using the following syntax:
The limit applied to a variable expressed by means of a Laplace function is a "dynamic limit". While
an external static limit would simply clip the value of the variable outside of the procedure by which
the value of the variable is calculated, a dynamic limit modifies the calculation procedure itself by
recognizing that the values of the derivatives of the variable held at a constant limit are zero.
In a case in which the value of the variable calculated by means of a Laplace function is
subsequently reassigned by other means during the same time step, the action of any dynamic
limit previously applied to that variable at that time step is ignored.
When the driving variable "x" of a Laplace function of "y" is itself a function of "y", the Laplace
function should be solved simultaneously with the equation of "x" in a COMBINE group or in an
explicitly-defined iteration structure, because both are together defining the value of "y"
concurrently with the value of the derivatives of "y".
The operator "p" may be used equivalently to "s" when describing the polynomials of the Laplace
function.
________________________________________
can be used for expressing the value of a variable "y", where "z" is the z-transform operator.
A z transfer function is specified in MODELS as follows:
ZFUN ( y / x ) := ( Z-polynomial ) / ( Z-polynomial )
where "y" can refer to any variable of the model, and "x" to any variable or input of the model,
specified using a simple name or a reference to an element of an array as follows:
-i -i
The z-polynomials describe the terms "aiz " and "biz " of the Z function, with each polynomial
written as follows:
MODELS -- p. 10
where each coefficient can be represented as an arbitrary expression (linear or nonlinear, constant
or time-varying), and is separated from the "z" operator by a vertical bar, which is the "applies to"
-i
operator of MODELS, with the meaning of "expression applied to z " (see DERIVATIVE
EXPRESSIONS for examples). Minimum and maximum limits can be specified for any of the
coefficients (see EXPRESSIONS).
The keyword CZFUN can be used instead of ZFUN, as follows:
CZFUN ( y / x ) := ( Z-polynomial ) / (Z-polynomial )
to indicate a constant-coefficients Z function. The expressions specifying the value of the
coefficients in CZFUN are not re-evaluated during the execution, regardless of the variation of the
values of any input or variable possibly referred to in these expressions. Using CZFUN instead of
ZFUN when the coefficients are constant will increase the simulation speed of the solution by
avoiding needless re-evaluation of the coefficients at each step.
Dynamic minimum and maximum limits can be imposed on the value of "y". The limits are specified
in the statement as follows:
ZFUN ( y / x ) { limits } := ( Z-polynomial ) / (Z-polynomial )
or
CZFUN ( y / x ) { limits } := ( Z-polynomial ) / (Z-polynomial )
where the limits are expressed using the following syntax:
The limit applied to a variable expressed by means of a Z function is a "dynamic limit". While an
external static limit would simply clip the value of the variable outside of the procedure by which the
value of the variable is calculated, a dynamic limit modifies the calculation procedure itself by
recognizing that the values of the derivatives of the variable held at a constant limit are zero.
In a case in which the value of the variable calculated by means of a Z function is subsequently
reassigned by other means during the same time step, the action of any dynamic limit previously
applied to that variable at that time step is ignored.
When the driving variable "x" of a Z function of "y" is itself a function of "y", the Z function should be
solved simultaneously with the equation of "x" in a COMBINE group or in an explicitly-defined
iteration structure, because both are together defining the value of "y" concurrently with the value
of the derivatives of "y".
________________________________________
2.3.2.1 IF
The use of an IF statement allows the conditions applying to the selective operation of groups of
statements to be stated explicitly. An IF statement is specified as follows:
in which the conditions are expressed as logical expressions, and the statement lists can include
any arrangement of MODELS statements.
MODELS -- p. 11
Only one option among the IF, ELSIF, and ELSE options of an IF statement is operative at a time:
it is the first option for which the logical expression describing the condition associated with the
option is evaluated as true (see EXPRESSIONS). All remaining options are ignored at that time.
________________________________________
2.3.2.2 WHILE
The use of a WHILE statement allows the conditions applying to the repetition of a group of
statements to be stated explicitly. A WHILE statement is specified as follows:
WHILE expr DO statement-list ENDWHILE
in which the condition is expressed as a logical expression, and the statement list can include any
arrangement of MODELS statements.
The entire statement list placed in a WHILE statement is considered to be looped onto itself as a
repetition. The condition expressed in the associated logical expression is evaluated every time the
decision to enter or re-enter the list of statements must be made. The group is entered only if the
condition is true. The group is then re-entered as many times as required at the same simulation
time as long as the condition continues to be evaluated as true (see EXPRESSIONS).
________________________________________
2.3.2.3 FOR
The use of a FOR statement allows the value of the parameters controlling the repetition of a group
of statements to be stated explicitly. One or more parameters can be specified in the same FOR
statement, as follows:
in which the statement list can include any arrangement of MODELS statements.
The values of each parameter can be specified as a list of values, a range of values, and a
combination of the two, as follows:
The entire statement list placed in a FOR statement is considered to be looped onto itself as a
repetition. The list of statements is entered and re-entered as many times as required until all the
parameters have been assigned all combinations of their specified values.
The names chosen for representing the parameters are local to the FOR statement. They are not
visible outside the FOR statement, and can be selected without concern for the possible
duplication of names of variables already defined in the model. They may not, however, duplicate
the names of the resident variables and constants and of the model's constants, data, and inputs.
When a parameter of a FOR statement is used as an array index, and the expression defining its
value yields a non-integer value, a value rounded to the nearest integer is implied and used.
When the size of the "BY" interval used for covering a range of values is not specified, a default
value of +1 is implied.
________________________________________
MODELS -- p. 12
2.3.2.4 DO
The use of a DO statement allows the association of a group of statements to be stated explicitly.
An DO list of statement is specified as follows:
DO statement-list ENDDO
in which the statement list can include any arrangement of MODELS statements.
The use of the DO...ENDDO statement is equivalent to the use of parentheses marking association
in an algebraic expression. It defines the boundaries of a group of statements to which a common
operation applies (see REDO).
________________________________________
2.3.2.5 REDO
The use of a REDO statement allows internal conditions controlling the repetition of a
DO...ENDDO group of statements to be stated explicitly.
The indication that the operation of a DO...ENDDO group of statements is to be repeated is
specified within the group by the use of one or more REDO statements. The boundaries of
application of the REDO directive are determined by the extent of the DO...ENDDO statement
enclosing the group that is to be repeated (see DO).
The REDO statement sets a repetition flag if it is encountered during the execution of the
DO...ENDDO group of statements. At the start of each repeated execution of the group, the
repetition flag is reset. At the end of each execution of the group, the status of the flag determines
whether the group will be repeated or not.
The REDO directive has no qualifiers, and is specified by the simple use of the "REDO" statement
anywhere in a DO...ENDDO group.
The simple DO repetition structure differs from the conditional (see WHILE) and indexed (see
FOR) repetition structures as follows:
- the directives controlling the repetition are internal to the group of statements forming the
DO...ENDDO repetition group;
- the execution of the DO...ENDDO group of statements is conducted at least once.
________________________________________
2.3.2.6 COMBINE
A group of variables can be solved simultaneously by placing their assignment statements inside a
COMBINE group of linear statements of the form:
COMBINE AS identifier statement-list ENDCOMBINE
or a COMBINE group of nonlinear statements of the form:
COMBINE ITERATE AS identifier statement-list ENDCOMBINE
or COMBINE ITERATE { max-iter } AS identifier statement-list ENDCOMBINE
where the identifier is a name or an indexed name uniquely identifying the group in the model, and
"max-iter" is the maximum allowed number of iterations to convergence, defaulted to 10.
The first form is used for groups of linear variables, and is solved in matrix form using Gaussian
elimination. The statement list of a linear COMBINE can include any of the following value
assignments:
- differential equations
- Laplace functions
- Z functions
MODELS -- p. 13
2.3.2.7 SEQUENCE
When no other form of structure is specified, the statements describing the operation of a model
are considered to be assembled in a sequence form. The sequence structure can also be specified
explicitly in a SEQUENCE statement as follows:
SEQUENCE statement-list ENDSEQUENCE
in which the statement list can include any arrangement of MODELS statements.
MODELS -- p. 14
The statements assembled in a sequence are considered to operate consecutively from the first
statement to the last.
________________________________________
2.3.2.8 USE
Once defined, a model can be used in as many instances as needed in the model in which it is
defined. Each instance is introduced by its own USE statement specifying the defined model name,
the usename of the instance, and the directives controlling its simulation. The syntax for a USE
statement is the following:
where:
- modelname is the name of the used model;
- usename is a unique local identifier of each instance of the used model, in the form of a single
name or an indexed name, as follows:
2.3.3.1 WRITE
Individual lines of text can be written to the computer's standard output during a simulation, as
specified in a model description in one or more WRITE statements as follows:
WRITE ( write-list )
MODELS -- p. 15
The statement keywords WRITE1 and WRITE2 can be used instead of WRITE, to send the
respective lines of text to the files named models.1 and models.2 .
________________________________________
2.3.3.2 ERROR
Predicted error situations related to the simulation of a model can be stated explicitly in the model,
using an ERROR...STOP structure to specify the pre-termination procedure to be followed before
the simulation is halted in a well-ordered manner.
An ERROR statement is specified as follows:
ERROR statement-list STOP
where the statement list can include any arrangement of MODELS statements.
On completion of the execution of the statement list specified in an ERROR statement, the
simulation is immediately terminated.
________________________________________
2.3.3.3 DEPOSIT
The DEPOSIT statement allows a model to modify the value of any numerical program variable of
ATP that can be changed using ATP's SPY command DEPOSIT. The ATP documentation of the
SPY commands describes what variables can be modified.
The DEPOSIT statement is used as follows:
DEPOSIT( name, value )
DEPOSIT( name[ expr ] , value )
DEPOSIT( name[ expr .. expr ] , value )
where 'name' is the name of a program variable accessible from SPY;
and where a single value can be assigned to a single variable, to a single element of an array
variable, or to a group of elements of an array variable.
________________________________________
2.4.1 ARRAYS
The value-holding elements of a model can be specified singly or as elements of unidimensional
arrays, with the following advantages:
- the symmetry or similarity of a group of elements can be made more explicit when an array
form is used (for example in identifying similar inputs to a model)
- the possibility of referring to many instances of a variable or constant under the same name
simplifies the use of repetition structures (WHILE, FOR, DO).
The total index range of an array is inferred from one or more declarations of the elements of the
array in the model definition (see DATA, INPUT, CONSTANTS, VARIABLES). The default index
range is one.
MODELS -- p. 16
2.4.2 CONSTANTS
The constants of a model are named value-holders carrying constant values. Their name, optional
array range, and value are declared in one or more CONST declarations in a model definition as
follows:
- where each constant element can be specified as a single name, a single array element, or a
group of array elements, as follows:
- where a single value can be assigned to a single constant, to a single element of a constant
array, or to a group of elements of a constant array sharing the same value;
- and where an array of values can be assigned directly to a group of elements of a constant
array by using an array-value expression to describe the assigned value.
The constants of a model are used as follows:
- their name, array range, and value are declared in one or more CONST declarations in the
model definition;
- their value cannot be modified in the model;
- their value can be used in any expression in the model.
________________________________________
false =0
true =1
no =0
yes =1
open =0
closed =1
off =0
on =1
________________________________________
2.4.4 DATA
The data of a model are named value-holders carrying use-defined constant values. They allow a
model to be described with generic dimensions, coefficients, parameters, and flags which can be
assigned specific values at the time the model is used. Their name, optional array range, and
optional default value are declared in one or more DATA declarations in the model definition, and
they can then be assigned local values in each USE statement where the model is used.
The data elements are declared in a model definition as follows:
- where each data element can be specified as a single name, a single array element, or a
group of array elements, as follows:
- where a single default value can be assigned to a single data, to a single element of a data
array, or to a group of elements of a data array sharing the same value;
- and where an array of default values can be assigned directly to a group of elements of a data
array by using an array-value expression to describe the assigned default value.
In a USE statement, values can be assigned to the data elements of the used model as follows:
- where a single value can be assigned to a single data, to a single element of a data array, or
to a group of elements of a data array sharing the same value;
- and where an array of values can be assigned in array form to a group of elements of a data
array.
Not all data elements of a model need be assigned a value in each model use, provided that a
default value has been specified in the model's DATA declaration for each optional data
assignment.
The value of a data element is determined at the first instant each use of a model is first executed,
and remains constant throughout the rest of the simulation for that model use.
Minimum and maximum limits can be attached to the value of a data element in the expressions
describing its default and assigned values (see EXPRESSIONS).
The data of a model are used as follows:
- their name, optional array range, and optional default value are declared in one or more DATA
declarations in the model definition;
- their value is assigned in a DATA directive of a USE statement (optional for data with a default
value);
MODELS -- p. 18
2.4.5 VARIABLES
The variables of a model are named value-holders carrying the internal variable values used in a
model. Their name and optional array range are declared in one or more VAR declarations in a
model definition as follows:
where each variable element can be specified as a single name, a single array element, or a group
of array elements, as follows:
Three other resident variables are defined globally for a simulation. They are:
starttime the value of time at the start of the simulation;
stoptime the value of time at which the simulation will end;
startstep the value of the outermost time step at the start of the simulation.
In addition to representing the present value of the simulation time in a model, the variable t can
also be used as a regular reference to the value of time in expressions describing history functions
in a model (see HISTORY).
________________________________________
2.5.1 INPUT
The inputs of a model are named value-holders carrying the external input values used in a model.
Their name, optional array range, and optional default value are declared in one or more INPUT
declarations in a model definition, and they can then be assigned local values in each USE
statement where the model is used.
The input elements are declared in a model definition as follows:
- where each input element can be a single name, a single array element, or a group of array
elements, as follows:
- where a single default value can be assigned to a single input, to a single element of an input
array, or to a group of elements of an input array sharing the same value;
- and where an array of default values can be assigned directly to a group of elements of an
input array by using an array-value expression to describe the assigned default value.
In a USE statement, values can be assigned to the input elements of the used model as follows:
- where a single value can be assigned to a single input, to a single element of an input array,
or to a group of elements of an input array sharing the same value;
- and where an array of values can be assigned in array form to a group of elements of an input
array.
Not all input elements of a model need be assigned a value in each model use, provided that a
default value has been specified in the model's INPUT declaration for each optional input
assignment.
The value of an input element is re-calculated at each call to a model use.
Minimum and maximum limits can be attached to the value of an input in the expressions
describing its default and assigned values (see EXPRESSIONS).
MODELS -- p. 20
2.5.2 OUTPUT
Any input or variable of a model can be used as outputs of the model. Their name and optional
array range are specified as outputs of the model in one or more OUTPUT declarations in the
model definition as follows:
where each output element can be specified as a single name, a single array element, or a group
of array elements, as follows:
In a USE statement, the value of any output of the used model can be assigned to any variable of
the calling model. The use of a model's outputs is specified in one or more OUTPUT directives of a
USE statement, as follows:
- where the value of a single output can be assigned to a single variable, to a single element of
a variable array, or to a group of elements of a variable array assigned the same output value;
- and where the value of a group of elements of an output array can be assigned in array form
to a group of elements of a variable array.
All outputs specified in a model definition are available for reference in any use of the model,
although not all outputs need be used in each model use.
________________________________________
2.6 FUNCTIONS
- foreign functions
In addition, two sets of functions are pre-defined and are available for use in any model:
- resident numerical and logical functions
- resident simulation functions
________________________________________
The input arguments of a function are single elements with names that are local to the function.
They are not visible outside the function, and can be selected without concern for the possible
duplication of names already defined outside the function. They may not, however, duplicate the
names of the resident variables and constants defined in MODELS.
A statement function is used by referring to the function's name and providing values for the
function's arguments in the same order as they appear in the function definition:
A statement function can be used in any expression of the model in which it is defined (see
EXPRESSIONS), except in its own definition.
Minimum and maximum limits can be attached to the value of the expression describing the
statement function in the function definition (see EXPRESSIONS). Minimum and maximum limits
can be attached to the value of the function's arguments when the function is used, in the
expressions describing their value.
________________________________________
The expressions defining the coordinates of each point are regular expressions which can refer to
the value of any value-holding element visible in the model, and which can use other functions
available in the model, including other pointlist functions (allowing the use of families of
parametrized curves defined as pointlists of pointlists).
A pointlist function is used by referring to the function's name and by providing a value for its "x"
argument and for its optional "pol" argument, in the form of f(x) or f(x,pol), as follows:
MODELS -- p. 22
- where "x" is the value at which the pointlist function f(x) is to be evaluated;
- and where "pol" is an optional argument indicating the interpolation degree 0, 1, or 2 used for
evaluating the function between its defined points (0=discontinuous, 1=linear, 2=quadratic)
(default=1).
A pointlist function can be used in any expression of the model in which it is defined.
When the variable x is considered to be holding values of time, the pointlist function can be
considered to represent a function of time f(t).
________________________________________
A foreign function can be used in any expression of the model in which it is defined. Minimum and
maximum limits can be attached to the value of the function's arguments when the function is
used, with each expression describing their value.
________________________________________
MODELS -- p. 23
where each argument of the function is assigned a value, in the sequence expected by the
function.
The following resident functions are defined:
- numerical functions returning one value for each input argument:
abs absolute value of each argument
sqrt square root of each argument
exp exponential of each argument
ln base-e logarithm of each argument
log10 base-10 logarithm of each argument
log2 base-2 logarithm of each argument
recip 1/x for each argument x, with zero-division protection (1/0 = inf)
factorial x! for each argument x
trunc integer part of each argument
fract fractional part of each argument
round rounded value of each argument (to the nearest integer)
sign =-1 when x<0, =0 when x=0, =+1 when x>0, for each argument x
rad value conversion from degrees to radians, for each argument
deg value conversion from radians to degrees, for each argument
sin sine of each argument
cos cosine of each argument
tan tangent of each argument
asin arc sine of each argument
acos arc cosine of each argument
atan arc tangent of each argument
sinh hyperbolic sine of each argument
cosh hyperbolic cosine of each argument
tanh hyperbolic tangent of each argument
asinh arc hyperbolic sine of each argument
acosh arc hyperbolic cosine of each argument
atanh arc hyperbolic tangent of each argument
- double-argument numerical functions returning a single value:
-1
atan2(x1,x2) tan (x1/x2) with 4-quadrant range as determined by the signs of
x1 and x2
binom(n,r) C(n,r) combination of r elements in a set of n
= n!/(n-r)!r!
permut(n,r) P(n,r) permutation of r elements in a set of n
= n!/(n-r)!
- multiple-argument numerical functions returning a single value:
min(x1,x2,...) minimum value of {x1, x2, ...}
max(x1,x2,...) maximum value of {x1, x2, ...}
2 2
norm(x1,x2,...) Euclidian norm =sqrt(x1 +x2 +...)
MODELS -- p. 24
- where the element can be any input or variable element of a model, as follows:
- and where, in the case of the functions histdef and histval, the element can also be the integral
of any input or variable of the model:
For those functions requiring interpolation or extrapolation (see the list of functions below), the
interpolation degree "pol" is an optional argument indicating the interpolation degree 0, 1, or 2
used for evaluating the function between the available values of the element (0=discontinuous,
1=linear, 2=quadratic) (default=1).
The following resident simulation functions are defined:
deriv(x) the value of the first-order time derivative of x at the present simulation
time
deriv2(x) the value of the second-order time derivative of x at the present
simulation time
delay(x,d,pol) past value of x at time (t-d), including references to pre-simulation times
using the history function assigned to x
MODELS -- p. 25
2.7 NAMES
Use pathnames are used by the simulation program in the printout of warning and error messages.
________________________________________
MODELS -- p. 26
2.8 VALUES
Static limits ("clipping") can be applied to any of the following calculated values:
- a regular expression
- a sum expression
- a derivative polynomial expression
Dynamic limits are specified in the following format:
________________________________________
2.9 EXPRESSIONS
The type of value (numerical or logical) resulting from the evaluation of an expression is
determined by the type of the operators used in the expression.
The following forms of expressions can be used in MODELS:
- regular expressions
- sum expressions
- derivative expressions
- use of integrals
________________________________________
- a logical term consists of one of more logical factors separated by the AND operator:
- a logical relation consists of two numerical expressions separated by one of the six relational
operators:
numerical expr relational-op numerical expr
where the relational operators are:
> greater than
>= greater than or equal to
< less than
<= less than or equal to
= equal to
<> not equal to
- a numerical expression consists of one or more numerical terms separated by the addition or
subtraction operators + and - :
- a numerical term consists of one or more numerical factors separated by the multiplication or
division operators * and / :
- an exponent relation consists of two value references separated by the exponent operator ** :
value reference ** value reference
- a modulo relation consists of two value references separated by the modulo operator MOD :
value reference MOD value reference
- a value reference is one of the following:
where:
- a simple numerical value or an array value can be described directly
- a named value, a function value, or a sub-expression can be preceded by the unary
numerical or logical inverse operators - and NOT
- a numerical value is described in the following format:
- a function value is expressed as a function name followed by a list of argument values (the
left parenthesis must immediately follow the function name):
The polynomial describes the terms "aixi" of the equation, written as follows:
and where each coefficient can be represented as an arbitrary expression (linear or nonlinear,
constant or time-varying), and is separated from the element by a vertical bar, which is the "applies
to" operator of MODELS, with the meaning of "expression applied to x". Minimum and maximum
limits can be specified for any of the coefficients (see EXPRESSIONS).
Minimum and maximum limits can be assigned to the value of the sum as follows:
y := sum ( polynomial ) { limits }
Limits applied to a sum expression are static limits. They are specified immediately following the
sum expression, enclosed in a pair of braces:
- and where the polynomial is separated from the element to which it is applied by a vertical bar,
the "applies to" operator of MODELS, with the meaning of "polynomial applied to x".
i
The D-polynomial describes the terms "aiD " of the equation, written as follows:
where each coefficient can be represented as an arbitrary expression (linear or nonlinear, constant
or time-varying), and is separated from the D operator by a vertical bar, the "applies to" operator of
MODELS, with the meaning of "expression applied to D". Minimum and maximum limits can be
specified for any of the coefficients (see EXPRESSIONS).
Minimum and maximum limit values can be assigned to a derivative polynomial as follows:
y := derivpol ( D-polynomial ) | x { limits }
Limits applied to a derivative polynomial expression are static limits. They are specified
immediately following the element to which the derivative expression is applied, as follows:
2.9.5 INTEGRALS
Minimum and maximum limits can be assigned to the value of an integral as follows:
y := integral ( x ) { limits }
They are specified immediately following the integral, enclosed in a pair of braces:
The limit applied to an integral is a "dynamic limit". While an external static limit would simply clip
the value of the integral separately from the procedure by which it is calculated, a dynamic limit
modifies the calculation procedure itself by recognizing that the past value used in a later
calculation of the integral is the integral's limited value.
When more than one integral expressions affect the same element at a given time step of a
simulation, the integral is re-evaluated each time it is used, to reflect possible changes in the value
of the element to which it applies. Each new evaluation of the integral during the same time step
also releases any previously-applied limit to that integral at that time step.
________________________________________
and an array of values can be assigned to the integral of a group of array elements, using an array-
value integral assignment as follows:
integral ( name [ expr .. expr ] ) := array-value expr
Minimum and maximum limits can be attached to the value assigned to the integral, in the
expression describing the value (see EXPRESSIONS).
From the point where a reset value is assigned to an integral until the end of the execution of that
model at that simulation time, the value of the integral becomes fixed, and is not influenced
anymore by the value of the integrated variable.
________________________________________
MODELS -- p. 33
2.10 FORMAT
2.10.2 DELIMITERS
Names, numerical values, and reserved keywords, must be written as strings of contiguous
characters.
In a name, any character other than a letter, a digit, or the underscore character, is interpreted to
indicate the end of the name (see NAME DEFINITION).
In a numerical value, any character other than a decimal digit, a plus sign, a minus sign, a period,
or the letter E, is interpreted to indicate the end of the numerical value (see VALUE TYPES).
In a reserved keyword, any character other than a letter is interpreted to indicate the end of the
keyword (see NAME DEFINITION).
Commas, semicolons, and white-space characters (spaces, tabs, carriage returns, line feeds), are
interpreted as spaces, with no additional syntactical meaning. They can be used at will to separate
keywords, names or numbers. There is one exception: a carriage return or line feed is used to
mark the end of an in-line comment.
________________________________________
2.10.4 COMMENTS
Comments can be included anywhere in a model description, and do not affect the syntactic
interpretation of the model description.
Two types of comments can be used: in-line comments, and block comments.
An in-line comment is any text beginning with a hyphen string (two or more contiguous hyphens)
and ending at the end of the line.
A block comment is enclosed by the keywords:
COMMENT ... ENDCOMMENT
MODELS -- p. 34
or
ILLUSTRATION ... ENDILLUSTRATION
and can contain any combination of text and graphics, as follows:
or
________________________________________
3. MODEL SIMULATION
3.1.1 TIMESTEP
Over the course of a simulation, the state of a model is updated at successive instants of time,
every time the model is called for execution by the environment in which it is used. The size of the
time interval between two successive instants of execution of a model is referred to as the
simulation time step of the model.
It is possible to define limits on the permitted time interval between successive executions of a
model. Variable minimum and maximum size of a model's time step can be specified in any
definition and in any USE of a model, using one or more TIMESTEP directives, as follows:
Whenever a model is called for execution after a time step that is smaller than the calculated
minimum time step, the execution request is ignored. A model can in this way be executed with a
time step larger than the time step used in the environment in which the model is used, its state
and its outputs remaining constant from one execution to the next.
Whenever a model is called for execution after a time step that is larger than the calculated
maximum time step, the model's local time step is divided into equal sub-steps of a size satisfying
the stated maximum, and the model is executed successively at each sub-step until the complete
interval is covered. A model can in this way be executed with a time step smaller than the time step
used in the environment in which the model is used (see INTERPOLATION for calculation of the
inputs to the model at each sub-step).
When no minimum and maximum values are specified for the time step, a model is executed every
time it is called by a USE statement.
The values of the minimum and maximum specified for a model's time step in a USE statement are
subject to the minimum and maximum values specified in the definition of the used model.
________________________________________
3.1.2 INTERPOLATION
When a model is executed, the values presented to its inputs by the calling model are values
calculated at the simulation time of the calling model. If the used model runs at sub-steps of the
calling model (see TIMESTEP), the values of the inputs are undefined at those intermediate times,
and must be estimated by the model, using interpolation.
MODELS -- p. 35
The inputs can be treated as continuous or discontinuous, depending on the level of interpolation
used for calculating their value for sub-step execution (0=discontinuous, 1=linear, 2=quadratic)
(default=1).
The interpolation degree to be applied to the inputs of a model for sub-step execution can be
specified for individual input elements, in the model definition and in USE statements, in
INTERPOLATION DEGREE directives of the form:
- where a different degree value can be specified for different lists of input elements;
- and where a default degree value can be specified for the remaining unlisted input elements.
Each list of elements is written in the following form:
with each element either a single input, a single element of an input array, or a group of elements
of an input array, as follows:
3.1.3 DELAY
The resident simulation function delay() provides access to past values of the input and variable
elements of a model. The simulation program reserves a default number of memory cells for each
element to which the function is applied. However, a different number of storage cells can be
assigned to any delay element, in the model definition and in USE statements, in DELAY CELLS
directives of the form:
- where a different number of cells can be specified for different lists of elements;
- and where a new default degree value can be specified for the remaining unlisted elements.
Each list of elements is written in the following form:
MODELS -- p. 36
with each element either a single element, a single array element, or a group of array elements, as
follows:
When unspecified, the program reserves a default number of 100 cells for each element to which
the delay function is applied.
A DELAY CELLS directive specified in a model definition applies to all uses of the model, and can
be modified by specifying individual DELAY CELLS directives in local USE statements.
Depending on how it is specified, the number of storage cells for each delay element is calculated
as follows:
- if specified in a DELAY CELLS list in the USE definition, then that number;
- else if specified in a DELAY CELLS list in the MODEL definition, then that number;
- else if there is a DELAY CELLS DFLT in the USE definition, then that number;
- else if there is a DELAY CELLS DFLT in the MODEL definition, then that number;
- else 100 cells.
This allows the developer and the user of a model to adjust the storage size that is required to
match the maximum number of storage cells necessary for lodging the largest delay value applied
to a given element (number of cells = largest delay value / smallest time step value).
________________________________________
3.2.1 INITIALIZATION
During the simulation of a system, the state of each used model is evaluated repeatedly at discrete
instants of time over a number of time intervals (the time steps of the model) covering the course of
the simulation.
Evaluating the state of a used model at a given instant of the simulation consists in calculating the
present value of the model's variables and integrals according to the execution procedure
describing the operation of the model (see EXECUTION), using the values being applied to the
model's inputs (see INPUT) and the accumulated history of some of the model's variables required
in the operation of the model.
At the first call for execution of a used model, this evaluation could not be conducted without first
knowing the history of the quantities expected to have been carried from non-existent previous
execution times.
The minimum initialization task then consists in defining the pre-simulation history of the quantities
expected to have been carried from the missing previous execution times.
A history function can be associated to any variable of a model. It can be defined as a general
function of time f(t), including references to pointlist functions and to the history functions of other
variables.
Three levels of history definition can be successively applied. The history can be first specified in
the definition of a model in the form of a default function; then in the HISTORY section of each
USE statement; and finally in the form of history assignment statements in the INIT procedure of
the model description.
________________________________________
MODELS -- p. 37
- where a history element can be a single name, a single array element, or a group of array
elements, as follows:
- where a history element can also be the integral of a single name or of a single array element,
as follows:
- where a single default value can be assigned to a single history element or to a group of array
elements sharing the same value;
- and where an array of default values can be assigned directly to a group of array elements
using an array-value expression to describe the assigned default value.
In a USE statement, history functions are assigned to the elements of the used model in a
HISTORY directive of the form:
In the INIT procedure of a model, history functions can be assigned privately (as opposed to
publicly in a USE statement) to elements of the model by using a history assignment statement of
the form:
histdef ( history element ) := expr
MODELS -- p. 38
Each time the model is used, the execution procedure updates the values of the variables of the
model for the new simulation time, taking into account the values assigned to the inputs of the
model in the USE statement.
The execution procedure is specified in the EXEC section of a model definition as follows:
EXEC statement-list ENDEXEC
The statement list of the EXEC procedure may include any type of statements except history
assignment statements (see STATEMENTS). The execution flow is directed by the algorithm
control statements used in the procedure (see ALGORITHM CONTROL STATEMENTS).
________________________________________
automatically recognized, and after the partial re-triangularization is performed, the back-
substitution process takes place as usual.
________________________________________
________________________________________
MODELS -- p. 42
4. MODELS IN ATP
All models used in a data case must be declared and defined in the MODELS section of the data
case. Once defined, these models can be used in a control-type connection to the circuit, or in a
circuit-type connection.
In the control-type connection, each application of a model is defined with a USE statement placed
in the MODELS section. Inputs are measurements taken from the circuit at simulation time t, and
outputs are control signals passed to the circuit at simulation time t+timestep.
In the circuit-type connection, each application of a model is introduced by defining a type-94
component in the circuit part of the data case. Inputs are voltage values at the terminals of the
component, and outputs are current values. Three types of modeling are available: Thevenin,
Norton, and iterated.
________________________________________
where the input names are arbitrary names given to each input;
where the identifier is a node name or a switch name, as required for each type;
and where the input types are v, imssv, i, imssi, switch, mach, tacs, pl4, and atp, used as
follows:
- v(nodename) indicates the value of the voltage measured at node "nodename";
- imssv(nodename) indicates the imaginary part of the complex steady-state value of the
voltage measured at node "nodename" at t=0;
- i(switchname) or i(nodename) indicates the value of the current measured through the switch
named "switchname", or through the first switch connected to node "nodename" (in the order
in which the case data is presented), with the direction of the current considered to be from
"left node" to "right node";
- imssi(switchname) or imssi(nodename) indicates the imaginary part of the complex steady-
state value of the current measured at t=0 through the switch named "switchname", or through
the first switch connected to node "nodename" (in the order in which the case data is
presented), with the direction of the current considered to be from "left node" to "right node".
- switch(switchname) or switch(nodename) indicates the status of the switch named
"switchname", or of the first switch connected to node "nodename" (in the order in which the
case data is presented);
= 0 when the switch is OPEN
= 1 when the switch is CLOSED
MODELS -- p. 44
Values can be assigned to the MODELS output variables in any USE statement of the MODELS
section. Once assigned, the output values can be used as input to other USE statements of the
MODELS section as well as control variables in the electrical circuit.
The names of the MODELS outputs are limited in length to 6 characters, in order to be compatible
with the names that can be used in ATP.
The names chosen for identifying the MODELS outputs are not visible from inside the models
defined in the MODELS section. They can be selected without concern for the possible duplication
of names already used in the models.
________________________________________
Values can be assigned to these variables from outputs of any USE statement at the top level.
Once assigned, their value can be used as input to other USE statements at the top level.
The names of these top variables are limited in length to 6 characters, in order to be compatible
with the name storage used in ATP.
MODELS -- p. 45
The names chosen for identifying these top variables are not visible from inside the models defined
in the MODELS section. They can be selected without concern for the possible duplication of
names already used in the models.
________________________________________
where each recorded element is assigned a 1- to 6-character label to be used by ATP to identify
the element in the printout/plotting list;
and where each recorded element is identified by its name, optionally preceded by an indication of
where it is used, as follows:
When a recorded element is an input, output, or top variable of the MODELS section, no path is
required. When it belongs to a model or submodel called from a USE statement of the MODELS
section, the path is the sequence of use names of the models leading to its location, separated by
periods. A use name is the AS label given to each used instance of a model.
The path of an element belonging to a model called from a type-94 component of the ATP
simulation is an 18-character name formed using the left node name, the right node name, and the
model name. All blank characters in these three names are each replaced by underscore
characters '_', in order to form a single 18-character label, which is then followed by a period and
the name of the recorded element from inside that model.
________________________________________
In the iterated type, a group of nonlinear components see the rest of the linear circuit as a
Thevenin equivalent, and each calculate their current (outputs) corresponding to estimated
voltages (inputs) provided by ATP's Newton iteration algorithm.
Both of these approaches provide a solution synchronized with the rest of the circuit. In the
Thevenin type, it is the model that solves the Thevenin circuit equation. In the iterated type, that
solution is done by ATP. In cases with only one nonlinear component (which can be multi-phase),
the Thevenin type can be used, and provides a faster execution time as it avoids iteration. The
iterated type allows to connect more than one nonlinear components (type-94 and others) per
subnetwork.
For the Norton type, the circuit sees the component as a Norton equivalent, an admittance to
ground in parallel with a current source. For a multi-phase component, the admittance to ground is
a matrix, and there is a current source at each node. At each time step, the component receives
node voltage values as inputs, and calculates as outputs the admittance and current sources to be
used in the circuit solution at the next time step. No iteration is performed by ATP. Changes in
values take effect with a delay of one time step. The time step delay is not a problem for passive
components, as this is the same method already used in ATP for the representation of
inductances, capacitances, and transmission lines. The current sources typically represent past
values, and can be easily synchronized, using prediction, with the solution time at which they will
be used. The only values affected by the delay are the admittance values, with normally negligible
consequences.
In the Norton case, when admittance values change, ATP must re-triangularize the admittance
matrix of the circuit. Because of the relatively time-consuming re-triangularization, this type is best
used for infrequently-changing values of admittances. There is no execution cost in having
frequently-changing values of the current sources. Under these conditions, the Norton type-94 is
faster than the other two, because ATP is not required to calculate a Thevenin equivalent at each
time step (needed for Thevenin and iterated), and because no iteration is taking place (needed for
iterated). The Norton approach also provides the greatest flexibility in component representation,
because it allows the user to directly control values in the admittance matrix of the ATP solution.
Because the admittance or admittance matrix supplied by the Norton type-94 component is an
admittance to ground, this type is normally used with its left nodes connected to the circuit, and its
right nodes unconnected. This provides an opportunity to assign the following additional function to
this component: when the component is connected to the circuit on both sides, it is interpreted by
ATP to be operating in transmission mode, actually isolating the subnetworks on each side from
each other. Each side of the component provides its own admittance matrix and set of current
sources to the circuit. This interpretation is not possible with the Thevenin and iterated types,
because they are branch-based instead of node-based.
________________________________________
A single-branch type-94 iterated component between nodes A1 and B1 and using a model named
'm1' would be specified as follows:
94A1 B1 M1 ITER
>END
A multi-branch component is specified in a similar way, with the additional branches following the
first card, without repeating the model information:
94A1 B1 M1 ITER
94A2 B2
94A3 B3
etc...
>END
Data values can be assigned to the model used by the component, just like in a USE statement of
MODELS. Each data card specifies the name of the parameter expected by the model, and its
value, as follows:
94A1 B1 M1 ITER
94A2 B2
94A3 B3
>DATA D1 xxxxxxxxxx
>DATA D2 xxxxxxxxxx
>etc...
>END
Like other nonlinear branches in ATP, the type-94 branches are excluded from the initial linear
steady-state calculations by ATP. Typically, a user would represent a simplified operation of the
component during steady-state in a separate sub-circuit, using the 'phasor' keyword or switches to
remove this sub-circuit from the solution at t>0. Steady-state voltages and currents from such a
sub-circuit can be used to initialize the operating point of the type-94 component, using SSI and
SSV lines as follows:
94A1 B1 M1 ITER
94A2 B2
94A3 B3
>DATA D1 xxxxxxxxxx
>DATA D2 xxxxxxxxxx
>SSV KA { Voltage(t=0) at left-node #1 = voltage at node KA
>SSV { " " " " " #2 = default existing value at A2
>SSV KB { " " " " " #3 = voltage at node KB
>SSV KC { Voltage(t=0) at right-node #1 = voltage at node KC
>SSV { " " " " " #2 = default existing value at B2
>SSV KD { " " " " " #3 = voltage at node KD
>SSI KA { Current(t=0) into left-node #1 = current in switch KA
>SSI { " " " " " #2 = default value of zero
>SSI KB { " " " " " #3 = current in switch KB
>END
N-branch Thevenin and iterated types can use up to 2n SSV values and up to n SSI values. N-
phase non-transmission Norton components can use up to n SSV and n SSI values. Transmission-
mode Norton components can use up to 2n SSV and 2n SSI value, n for each side.
________________________________________
OUTPUT i[1..n]
comment ----------------------------------------------------------------------
| Next, declarations of user-defined data for this particular model |
| - their value is defined at the time of using the type-94 component |
------------------------------------------------------------------- endcomment
DATA ...
comment ----------------------------------------------------------------------
| Next, declarations private to the operation of this model |
------------------------------------------------------------------- endcomment
VAR ...
...
INIT
...
ENDINIT
EXEC
...
ENDEXEC
ENDMODEL
________________________________________
MODEL name
comment ----------------------------------------------------------------------
| First, declarations required for any type-94 Thevenin model |
| - these data and input values are provided to the model by ATP |
| - these output values are used by ATP |
| - these names can be changed, except 'n', but not their order |
------------------------------------------------------------------- endcomment
DATA n -- number of node pairs
n2 {dflt: n*n} -- number of matrix elements
comment ----------------------------------------------------------------------
| Next, declarations of user-defined data for this particular model |
| - their value is defined at the time of using the type-94 component |
------------------------------------------------------------------- endcomment
DATA ...
comment ----------------------------------------------------------------------
| Next, declarations private to the operation of this model |
------------------------------------------------------------------- endcomment
VAR ...
...
INIT
...
ENDINIT
EXEC
...
ENDEXEC
ENDMODEL
________________________________________
MODELS -- p. 49
MODEL name
comment ----------------------------------------------------------------------
| First, declarations required for any type-94 Thevenin model |
| - these data and input values are provided to the model by ATP |
| - these output values are used by ATP |
| - these names can be changed, except 'n', but not their order |
------------------------------------------------------------------- endcomment
DATA n -- number of phases
ng {dflt: n*(n+1)/2} -- number of conductances
comment ----------------------------------------------------------------------
| Next, declarations of user-defined data for this particular model |
| - their value is defined at the time of using the type-94 component |
------------------------------------------------------------------- endcomment
DATA ...
comment ----------------------------------------------------------------------
| Next, declarations private to the operation of this model |
------------------------------------------------------------------- endcomment
VAR ...
...
INIT
...
ENDINIT
EXEC
...
ENDEXEC
ENDMODEL
________________________________________
MODEL name
comment ----------------------------------------------------------------------
| First, declarations required for any type-94 Thevenin model |
| - these data and input values are provided to the model by ATP |
| - these output values are used by ATP |
| - these names can be changed, except 'n', but not their order |
------------------------------------------------------------------- endcomment
DATA n -- number of phases
ng {dflt: n*(n+1)/2} -- number of conductances on each side
comment ----------------------------------------------------------------------
| Next, declarations of user-defined data for this particular model |
| - their value is defined at the time of using the type-94 component |
------------------------------------------------------------------- endcomment
DATA ...
comment ----------------------------------------------------------------------
| Next, declarations private to the operation of this model |
------------------------------------------------------------------- endcomment
VAR ...
...
INIT
...
ENDINIT
EXEC
...
ENDEXEC
ENDMODEL
________________________________________