7
USING THE SIMULATION LANGUAGE "MODELS" WITH EMTP L. Dube Simulation software developer, USA M. T. Correia de Barros Technical University of Lisbon, Portugal Keywords: Modeling and Simulation, Electromagnetic Transients ABSTRACT I. Bonfanti CESI, Italy V. Vanderstockt LABORELEC, Belgium This paper describes the simulation language MODELS and its use with EMTP to study electromagnetic transients, with focus on the needs answered by the language for EMTP use. MODELS allows users to describe electrical components and control systems that otherwise could not be represented easily using regular components and control functions of EMTP. MODELS also provides a standardized interface at the modeling level for connecting user-supplied external programs to EMTP. The two examples selected for this paper illustrate how MODELS can be used in EMTP simulations for modeling multiple reignitions in circuit breakers, nnd for representing the distributed nonlinear dynamics of corona on overhead transmission lines. INTRODUCTION This paper is an application paper illustrating the use of the MODELS language in EMTP simulations. Its purpose is to demonstrate how the language can be applied by the user for including in EMTP simulations components that could not up to now be represented easily using the regular circuit elements and control functions of EMTP. The design objectives of the language are presented in terms of the simulation needs of the user, and their implementation in the MODELS language is briefly discussed. The use of MODELS in an EMTP simulation is presented in detail, and illustrated by a model simulating multiple reignitions in a circuit breaker. The use of MODELS as a standardized interface between external programs and EMTP is then discussed. It is illustrated by a simulation in which an external line model is interfaced with EMTP via MODELS in order to include in a circuit the representation of the distributed nonlinear effect of corona on a transmission line. DESCRIPTION OF THE MODELS LANGUAGE Design Objectives of MODELS The design objectives that have directed the construction of the MODELS language are the following: 1) to give the possibility directly to the users of EMTP to develop models of network components and control algorithms which cannot be built easily with the set of basic elements available in EMTP and TACS; 2) to provide to the user the flexibility of a full programming language without requiring the user to interact with EMTP at the programming level; 3) to Jet the user describe not only how a component operates, but also how the initial state (initial values and initial history) of the component is established, at a detail level selected by the user; 1063 4) to provide a standardized interface to EMTP defined at the modeling level in terms of voltages, currents, and control quantities (as opposed to an interface which would be defined at the programming level in terms of arrays of values and internal EMTP execution flow), giving directly to the user the possibility of connecting external programs to EMTP for modeling of components, access to measurements, or interaction with equipment, without requiring the user to have a programming knowledge of the internal operation of EMTP or to make any modification to the source code of EMTP. In order to provide maximum power and flexibility when building models, it was considered necessary to maintain the advantages offered by regular programming languages. In particular, the language had to include the following eapab iii ties : - separating the description of a component from its actual use in a simulation; - allowing the use of multiple instances of the same component, each possibly supplied with different parameters, different inputs, or different simulation directives; - providing a formal mechanism for the division of a large component description into smaller procedures, for reduced model complexity, explicit identification of interfaces and functionality, easier testing, and use of prototyping during model development; - providing a separate naming scope for each procedure, to allow the user to assign meaningful names to the variables used in a description; - supporting the use of comments within a description, as an aid to producing models and procedures that are self- documenting; - supporting the use of conditions and loops (if, while, for, etc.) for building the structure of the execution flow of a procedure; - providing a regular syntax for the use of variables, arrays, expressions, and functions.

USING THE SIMULATION LANGUAGE MODELS WITH EMTP · USING THE SIMULATION LANGUAGE "MODELS" WITH EMTP L. Dube Simulation software developer, USA M. T. Correia de Barros Technical University

Embed Size (px)

Citation preview

Page 1: USING THE SIMULATION LANGUAGE MODELS WITH EMTP · USING THE SIMULATION LANGUAGE "MODELS" WITH EMTP L. Dube Simulation software developer, USA M. T. Correia de Barros Technical University

USING THE SIMULATION LANGUAGE "MODELS" WITH EMTP

L. Dube Simulation software developer, USA

M. T. Correia de Barros Technical University of Lisbon, Portugal

Keywords : Modeling and Simulation, Electromagnetic Transients

ABSTRACT

I. Bonfanti CESI, Italy

V. Vanderstockt LABORELEC, Belgium

This paper describes the simulation language MODELS and its use with EMTP to study electromagnetic transients, with focus on the needs answered by the language for EMTP use. MODELS allows users to describe electrical components and control systems that otherwise could not be represented easily using regular components and control functions of EMTP. MODELS also provides a standardized interface at the modeling level for connecting user-supplied external programs to EMTP. The two examples selected for this paper illustrate how MODELS can be used in EMTP simulations for modeling multiple reignitions in circuit breakers, nnd for representing the distributed nonlinear dynamics of corona on overhead transmission lines.

INTRODUCTION

This paper is an application paper illustrating the use of the MODELS language in EMTP simulations. Its purpose is to demonstrate how the language can be applied by the user for including in EMTP simulations components that could not up to now be represented easily using the regular circuit elements and control functions of EMTP. The design objectives of the language are presented in terms of the simulation needs of the user, and their implementation in the MODELS language is briefly discussed . The use of MODELS in an EMTP simulation is presented in detail, and illustrated by a model simulating multiple reignitions in a circuit breaker. The use of MODELS as a standardized interface between external programs and EMTP is then discussed. It is illustrated by a simulation in which an external line model is interfaced with EMTP via MODELS in order to include in a circuit the representation of the distributed nonlinear effect of corona on a transmission line.

DESCRIPTION OF THE MODELS LANGUAGE

Design Objectives of MODELS

The design objectives that have directed the construction of the MODELS language are the following: 1) to give the possibility directly to the users of EMTP to

develop models of network components and control algorithms which cannot be built easily with the set of basic elements available in EMTP and TACS;

2) to provide to the user the flexibility of a full programming language without requiring the user to interact with EMTP at the programming level;

3) to Jet the user describe not only how a component operates, but also how the initial state (initial values and initial history) of the component is established, at a detail level selected by the user;

1063

4) to provide a standardized interface to EMTP defined at the modeling level in terms of voltages, currents, and control quantities (as opposed to an interface which would be defined at the programming level in terms of arrays of values and internal EMTP execution flow), giving directly to the user the possibility of connecting external programs to EMTP for modeling of components, access to measurements, or interaction with equipment, without requiring the user to have a programming knowledge of the internal operation of EMTP or to make any modification to the source code of EMTP.

In order to provide maximum power and flexibility when building models, it was considered necessary to maintain the advantages offered by regular programming languages. In particular, the language had to include the following ea pab iii ties : - separating the description of a component from its actual

use in a simulation; - allowing the use of multiple instances of the same

component, each possibly supplied with different parameters, different inputs, or different simulation directives;

- providing a formal mechanism for the division of a large component description into smaller procedures, for reduced model complexity, explicit identification of interfaces and functionality, easier testing, and use of prototyping during model development;

- providing a separate naming scope for each procedure, to allow the user to assign meaningful names to the variables used in a description;

- supporting the use of comments within a description, as an aid to producing models and procedures that are self­documenting;

- supporting the use of conditions and loops (if, while, for, etc.) for building the structure of the execution flow of a procedure;

- providing a regular syntax for the use of variables , arrays, expressions, and functions .

Page 2: USING THE SIMULATION LANGUAGE MODELS WITH EMTP · USING THE SIMULATION LANGUAGE "MODELS" WITH EMTP L. Dube Simulation software developer, USA M. T. Correia de Barros Technical University

Implementation of the Design Objectives

In order to support the above design objectives, the simulation language MODELS has been constructed as a Pascal-like procedural language with additional application-specific syntax and functions for representing the continuous-time operation of dynamic systems. Its grammar is keyword-directed and non-formatted.

In addition to the block diagram approach of TACS, MODELS accepts component descriptions in terms of procedures, functions and algorithms. The user is not limited to a pre-defined set of components, but can build libraries of components and submodels as required by each application. Similarly, the user is not limited to an input-output signal flow representation, but can also combine this with numerical and logical manipulation of variables inside algorithmic procedures.

The free format of the description and the possibility of using arbitrarily-long names facilitates self-documentation, valuable especially when large systems and team work are of concern. Comments and illustrations can be introduced throughout a model description for clearer documentation.

Numerical and Boolean values are supported, in both scalar and array form. Values are described using algebraic and Boolean expressions, differential equations, Laplace transfer functions, integrals, and polynomials of derivatives . A large selection of numerical and Boolean functions can be used inside expressions. In addition, simulation-specific functions provide access to the time parameters of the simulation and to past and predicted values of the variables of a model. Additional functions can be defined by the user, in the form of parametrized expressions, point lists, and externally-programmed functions.

Dynamic changes in the operation of a modd are described by the use of IF, WHILE, and FOR directives applied to groups of statements and to the use of submodels. Groups of simultaneous linear equations are solved in matrix form, using Gaussian elimination. Arbitrary iteration procedures can also be specified by the user for solving groups of simultaneous nonlinear equations. All other value assignments are calculated and applied sequentially in the order of their definition in the model description.

The description of a model can be written directly as data in an EMTP data case, or accessed at simulation time from libraries of pre-written model files.

Self-diagnosis is especially important when large models have to be set up, debugged, and fine-tuned. Detection of the existence of possible misoperation can be built directly into the model by the user, forcing an erroneous simulation to be halted via the ERROR statement with clear indication of the problem that occurred. Warnings and other observations can also be recorded during the simulation for later analysis .

The language provides a mechanism for explicitly structuring a system into separate sub-components, supporting the definition and use of embedded submodels. The same model can be used at multiple locations in a simulation, with parameters, inputs, outputs, and simulation directives specified individually for each use.

The simulation of each instance of a model is conducted in two phases. The initialization phase establishes initial values and initial history when the instance is first accessed. The model then repeatedly updates the values of the

1064

variables and of the accumulated history of the instance, in function of the changing values applied to its inputs. A detailed procedure can be defined to describe separately with full flexibility both the initialisation and the operation of the model.

External programs can be directly defined and used as a model via a standardised interface, simply linked with the program without requiring any modification to be made to the EMTP source code. The interface is defined by the user in terms of voltages, currents, and control variables of the simulation. No knowledge of the EMTP at the programming level is required.

USE OF MODELS IN EMTP

The use of MODELS in an EMTP simulation is best demonstrated by studying a representative example of its application. The first example shown illustrates how the operation of a network component, in this case a circuit­breaker, can be described using MODELS. The example also shows how the model of the component is connected to the rest of the circuit.

Modeling Multiple Reignitions in a Circuit Breaker

The occurrence of multiple reignitions is of great interest when investigating the operation of a circuit breaker. Each reignition happens when the transient recovery voltage (TRV) created by the circuit exceeds the voltage withstand characteristic of the circuit breaker (see Fig. 1). The value of the voltage withstand increases with the increasing separation of the contacts. The probability of the first reignition depends on the TRV buildup versus the voltage withstand buildup. The value of the interrupted current (either natural zero or chopped value) influences the TRV buildup. Once the circuit breaker has reignited, a high-frequency current due to the surrounding parasitic elements is flowing in the circuit breaker. Re-opening can then occur if the slope of the current at current zero or at a current less than the high frequency chopping level, has a value lower than the critical current slope that the circuit breaker is able to interrupt. The value of this critical slope can be found to be statistically distributed within a region delimited by the slope values at which opening is always assured and that at which it will never occur.

The phenomenon of multiple reignitions is more likely to be encountered when opening small inductive currents and magnetizing currents [1]. The example discussed in this paper refers to the opening of a magnetizing current. The model of the circuit breaker reflects the behavior described above.

Description of the Circuit Breaker Using MODELS

The description of a model is divided in three sections: the declarations, the initialization procedure, and the execution procedure.

Declarations: The declarations section defines the value-holding elements, functions, sub-models, and simulation directives used in the model. In the example (see Listing 1 in Appendix), the value-holding elements are the data values (parameters supplied when using the model), the inputs, and the internal variables of the model. A point-list function is defined, representing the voltage withstand characteristic of

Page 3: USING THE SIMULATION LANGUAGE MODELS WITH EMTP · USING THE SIMULATION LANGUAGE "MODELS" WITH EMTP L. Dube Simulation software developer, USA M. T. Correia de Barros Technical University

the circuit breaker in function of time. A numerical expression function "random_sel(min, max)" is also defined. The simulation directives of the example consist here of a list of the variables visible as outputs when using the model, and a list of the variables for which a history function can be defined when using the model. A default history function is provided in the form of a simple value, although a more elaborate function description may be used when required. The output variable of this example will be used as the signal controlling the action of the switch representing the status of the circuit breaker in the electrical model. It can be observed that comments can be used liberally for the purpose of documenting the model.

Initialization: The initialization section of this model is used for defining the past value of the state of the model, and for giving an initial value to the output "cbstatus". It should be noted that a more complex initialization algorithm could be described, however it is not required in this example. In any model, history functions and initial values can be calculated and assigned, in order to completely describe and build the pre-execution state of the model. The procedure can be made to initialize the model differently according to different conditions of use of the model known only at simulation time. In the example, there is also a verification of the congruousness of a data value given to the model when it is used . If a misuse of the model is detected, the simulation will be immediately stopped, with an explicit indication being provided to the user about the nature of the error.

Execution: The execution section of this example describes the logical rules representing the operation of the circuit breaker as its state evolves in function of time. The operating point of the breaker is updated every time step of the simulation, depending both on its past state and on the voltage and current applied from the electrical circuit. In this model, the dynamic characteristic of the arc is not represented, in order to keep the example simple. The reader is referred to [2] for the description of a model in which the dynamic arc conductance is represented.

The model of this example updates the present state of the circuit breaker by taking into account the conditions controlling four represented state transitions: first opening, reigniting, reopening, and full opening. 1) the breaker can first open from the "normal closed" state

after instant "topen" as soon as the measured current becomes lower than the user-defined power-frequency chopping level (data value 'ichl ') or has crossed zero;

2) from this "tentatively open" state, the arc may reignite whenever the TRV measured across the circuit breaker exceeds the voltage withstand characteristic of the breaker, defined as a function of time by the point-list function 'characteristic';

3) the arc will be re-extinguished as soon as the following conditions are simultaneously true:

the breaker has been in the "reignited" state for a minimum amount of time in order to prevent unrealistic opening "in the MHz range; the current is lower than the high-frequency chopping level (data value 'ich2') or it has crossed zero; and the slope of the current is lower than the critical current slope of the breaker;

4) the breaker will move from a "tentatively open" state to a

1065

"fully open" state when the time elapsed since the instant of contact separation becomes larger than the defined reignition time-window.

The connection between the EMTP circuit and a MODELS component is defined by the user in the EMTP data case (see Listing 2 in Appendix). The inputs from EMTP to MODELS are declared and assigned. For this example, MODELS will receive at every time step the voltage values at nodes 'intval' and 'intern', and the value of the current flowing through the switch connected to node 'intmon' . The names of the outputs from MODELS to EMTP are declared (here, the variable 'action'), to be assigned later in the use of a model. Then follows the description and the use of any model that is to be part of the simulation. Here, a model description from the file 'breaker.m' is inserted in the data case using the EMTP $INCLUDE command. The use of the model is then defined . In the example, the use assignment is a declaration of how input values to the model are calculated, how its outputs are retrieved, and what values are to be used by the model as data. Although not required in this example, other simulation directives can be specified, such as assignment of history functions and specification of the local timestep to be used for the simulation of that model.

During the simulation, each use of each model is executed after receiving the input values from EMTP at every time step. The outputs are then passed back to the circuit, to be used at the next simulation step by EMTP. This decoupling in time is identical to that used by TACS in EMTP, as discussed in [2]. A new interface mechanism between EMTP and MODELS is under development. It will allow the user to describe a circuit component in MODELS and connect it directly to the Thevenin interface of EMTP. The component will be treated as a regular nonlinear element solved synchronously with the rest of the electrical circuit using the compensation method [3]. This approach will relax the constraints presently imposed by the delayed-solution mechanism of T ACS on the choice of the simulation time step, as the need to minimize the size of that interface delay will be eliminated.

Figure 2a shows the current in the circuit breaker due to reignitions during the opening operation. Figure 2b shows one of the reignitions in detail. It can be noted that the current is interrupted when its slope at current zero has been reduced below the critical slope value.

Withstand voltage characteristic

TRV

Fig. 1 Comparison of TRV and typical withstand voltage characteristic of circuit breaker

Page 4: USING THE SIMULATION LANGUAGE MODELS WITH EMTP · USING THE SIMULATION LANGUAGE "MODELS" WITH EMTP L. Dube Simulation software developer, USA M. T. Correia de Barros Technical University

2. Bl

1.13

k l .~ " o. o+-----..µ..>---+1----+---+---+-+l+lfl.~'---+----< -= l.4 l.I 1.2 5.0

Killi1ecood1

·1.13

PILI : 06·Apt·'3 13.01.26 RAMIS : IWTMOW IWTBR1 Tmin, Y11u:, dY/div • ·2 . ll 2 . 13 0 . 5Bl

·2.ll T•in, T111:1, dT/div • 3.1!·3 5.1·3 0.21·3

Fig. 2a Circuit breaker current during multiple reignitions

. "' m ...

100

400

·UO

l.71

PILB: 06·Apt·'3 13.01.26 IJAMBS : IKTHOR IKTIRl

3. 71

Y•in, ?mu, dI/div • ·100 . lOO. 200.

l . 10 l.11 Milliaeconda

·100 T•in, T•u, dT/div • 3 . 761·) 3 . 111·3 l.99B·6

Fig. 2b Detail of circuit breaker reignition current

USE OF EXTERNAL PROGRAMS IN EMTP

The second example illustrates how MODELS can be used to connect an external program to EMTP for simulating a circuit component, in this case a transmission line with representation of corona.

Modeling The Effect of Corona On Lightning Surges

The problem of including corona in EMT programs has been a topic of research addressed by several authors. The approach often chosen takes corona into account externally to the modeling of the propagation phenomena [4] [5]. A different approach, which is considered in this example, is to include the nonlinear behavior characteristic of corona in the propagation itself.

MODELS is used to interface with EMTP a line model

1066

that is described by an external set of Fortran subroutines . This model represents the transmission line using finite differences . It is particularly adequate for inclusion of nonlinear effects in the wave propagation, as well as for consideration of current or voltage sources within the transmission line terminals, these sources being distributed or located at given points.

The basis of such a line model has been presented in [6] and its ability to take into account lightning-induced voltages in [7]. New improvements have been made for the simulation of direct lightning strokes and for interfacing the model with EMTP.

This example represents a lightning stroke hitting directly one phase conductor of an overhead line. In order to facilitate the interpretation of the results, the stroke current is considered not to cause a flashover of the line. In addition, no coupling effect with the other wires of the transmission line is taken into account. The location of the stroke is chosen to occur near the open end of a line (e.g. open circuit breaker at the entrance of a substation) in order to see clearly the reflections. The other side of the line has a propagation time longer than the time window of the calculation, and its effect will not appear in the simulation.

The results shown in figures 3 to 6 correspond to a lightning current of 10 kA that hits one phase conductor of an overhead line with a characteristic impedance of 400 Ohms at a distance of 800 m from the open end. The shape of the injected current is selected to have an initially-concave front and to provide the highest steepness close to the peak as discussed in [8].

Corona has been modeled through a simplified charge­voltage diagram, in order to facilitate the interpretation of the results and consequently the validation of the proposed algorithm. However, all main characteristics of corona have been kept, including its behavior under successive overvoltages (Fig. 7). This is an important aspect, as the reduction of the peak voltage of a subsequent surge is not as relevant as that of the first one [9]. The results shown in figures 5 and 6 correspond to a corona threshold of 500 kV and to a line capacitance during active corona of two times the geometric capacitance value of the line.

Figures 3 and 4 have been obtained without taking corona into account and they enable validation of the wave propagation algorithm. Comparing those to figures 5 and 6 emphasizes the importance of taking corona into account for the evaluation of lightning surges .

Different aspects of the influence of corona on the magnitude and waveshape of lightning surges can be observed in the results: 1) The overvoltage at the striking point has a reduced

magnitude due to corona. This reduction is explained by the decrease of the characteristic impedance of the line during active corona. Physically it is understood that part of the injected current is used for the generation of space charge around the conductor.

2) Corona slows the propagation of the wavefronts above the threshold level, this phenomenon being particularly visible on the current wave reflected at the open end.

3) Propagated voltage and current waveforms show the formation of a step at the threshold level as a consequence of the front-slowing and peak-shaving characteristics of corona. These are well-known aspects from experimental results [10], [11].

Page 5: USING THE SIMULATION LANGUAGE MODELS WITH EMTP · USING THE SIMULATION LANGUAGE "MODELS" WITH EMTP L. Dube Simulation software developer, USA M. T. Correia de Barros Technical University

Interfacing an external program using MODELS

MODELS provides a standard built-in interface for the use of external procedures as regular submodels. The interface simply consists of four arrays, containing respectively the data, inputs, outputs, and initial values expected by the external procedure. The procedure is written as having four corresponding arrays as its main arguments.

The connection between the external procedure and MODELS is completely accessible to the user, as it is defined in a regular "use" statement in MODELS, where data, initial values, and inputs are calculated and assigned, output values are retrieved, and simulation directives (for example, local size of time step) are specified. The four arrays have the fixed names xdata, xin, xout, and xvar.

Listing 3 in Appendix shows the "use" statement defining

,,, • ...

12

· 12

FILE : 1&-Nov-!al 20.13.36 MAMBS : TACS I HJL TACS IIHJR

TACS I NJ TACS IPROBS Yoin, Yoax, dY/d v • ·12.83 12.83 3.83 T•in, T•U, dT/d v • 0.0 20.1-6 2.B-6

Fig. 3 Lightning current (1); left and right current waves at striking point (2,3); propagated current at 2400m (4). No corona taken into account.

12

;:, 0 • ...

· 12

FILE : 16-Hov-92 19.ll.U MAMBS : TACS I RJL TACS IIHJR

TACS I NJ TACS IPROBS Y• i n, Y•ax, dY / d v • - 12 . Bl 12.1!3 3.Kl T•in, Taax, dT/d v • o . o 20.! - ' 2.E-'

Fig. 5 Lightning current (1); left and right current waves at striking point (2,3); propagated current at 2400m (4) . With corona.

1067

the MODELS interface to the program "propag" used for the line model of the example. The interface data and input arrays are loaded with values defined in the calling model. On returning from the procedure call, the values from the output array "xout" are assigned to various variables of the calling model.

The option of including non-EMTP component models to an EMTP simulation provides the user with a marked increase in modeling flexibility . Component models developed by the user in Fortran or C, for example, can be Jinked to EMTP and inserted in a simulation without any pre-required knowledge of the internal functioning of EMTP at the programming level, and without requiring the assistance of an EMTP developer. As illustrated by the example of corona modeling, a user can produce results which could not be obtained using regular EMTP components alone.

L2

2. I : ... . " 1.' .... 0 >

FILE : 16 - HOV-92 20.13.36 RAMIS : TACS VIRJ TACS VK

TACS VPROBS ·1.' Yoin, Y•u. dY/div. · 1.U6 , . 286 0 . 7Bi

Tmin, T .. x, dT/d h • 0.0 20.! · 6 2 . !·6

Fig. 4 Voltage at striking point (1); open-end voltage at 800m (2); propagated voltage at 2400m (3). No corona taken into account.

: 0 ... .. . " .... 0 >

L2

2.1

1.'

FIL8 : 16-Hov - 92 19 . 11.U RAMIS : TACS VIRJ TACS VR

TACS VPROBS ·1.' Ymin, Y•ax, dY / div • ·l.U6 L2B6 0 . 786

Tain, Taax, dT/div • 0.0 20.!-6 2.E - 6

Fig. 6 Voltage at striking point (l); open end voltage at 800m (2); propagated voltage at 2400m (3). With corona.

Page 6: USING THE SIMULATION LANGUAGE MODELS WITH EMTP · USING THE SIMULATION LANGUAGE "MODELS" WITH EMTP L. Dube Simulation software developer, USA M. T. Correia de Barros Technical University

Voltage

Time

Fig. 7 - Corona behavior under successive overvoltages

CONCLUSION

This paper has shown in detail the design objectives which have guided the construction of the MODELS language in EMTP. Two applications have been presented to illustrate how MODELS extends the range and flexibility of component modeling available to EMTP users. The examples show how the user is provided with the abstraction power and open environment of a full simulation language, while keeping all interaction with EMTP in terms of circuit quantities and representation. The examples also illustrate some of the main characteristics of the MODELS language, such as explicit self­documentation, programmable execution diagnostics, structured algorithmic construction, modularity, model reusability, and standard interfacing of external programs.

1)

2)

3)

REFERENCES

CIGRE WG 13.02, "Interruption of small inductive currents", Chapters 1 and 2, ELECTRA No 72, pp. 73-103, Chapter 3a, ELECTRA No 75, pp. 5-30, Chapter 3b, ELECTRA No 95, pp. 31-45, Chapter 4a, ELECTRA No 101, pp. 13-39.

L. Dube, I. Bonfanti, "MODELS: a new simulation tool in the EMTP", ETEP (European Trans . on Electrical Power Engineering) vol. 2 (1992) No. 1, pp. 45-50.

H. W. Dommel, "Nonlinear and time-varying elements in digital simulation of electromagnetic transients", IEEE Trans., vol. PAS-90, pp. 2561-2567, Nov/Dec 1971.

1068

Voltage -E

4)

5)

6)

7)

Charge

W.G. Huang, A. Semlyen, "Computation of Electro Magnetic Transients on three-Phase Transmision Lines with Corona and Frequency Dependent Parameters", IEEE Transactions, Val PWRD-2, No. 3, July 1987

S. Carneiro, H.W. Dommel, J. Marti, "Efficient Implementation of Corona Models in the EMTP", Proceedings of the lOth PSCC, pp 238-244, August 1990

M.T. Correia de Barros, J.F. Borges da Silva, "A non linear propagation algorithm for transmission lines", Proceedings of the 8th PSCC, pp. 772-776, August 84.

B. Stein, M.T. Correia de Barros, " A line model for the calculation of lightning induced voltages", Proceedings of the 9th PSCC, pp. 396-401, August­September 87.

8) CIGRE Guide nr. 63, "Guide to procedures for es_timating the lightning performance of transmission lines", WG 01 (Lightning) of SC 33 (Overvoltages and Insulation Coordination), October 1991.

9) M.T. Correia de Barros, "Overvoltage Distortion Due to Corona on Transmission Lines", CIGRE Colloquium SC-33, Paper No. 02.06, Tokyo , October 1987

10) C.F. Wagner, B.L. Lloyd, "Effect of Corona on Travelling Waves", AIEE Trans ., Vol. 74, Pt.III, pp. 858-872, October 1955

11) C. Gary, G. Dragan, D. Critescu, "Attenuation of Travelling Waves Caused by Corona", CIGRE Report, 33-13, 1978

12) ATP Rule Book. Leuven EMTP Center (1990)

Page 7: USING THE SIMULATION LANGUAGE MODELS WITH EMTP · USING THE SIMULATION LANGUAGE "MODELS" WITH EMTP L. Dube Simulation software developer, USA M. T. Correia de Barros Technical University

APPENDIX Listing 1 - Model of the circuit breaker

MODEL breaker DATA

tbeg -- instant of mechanical opening begdelay {dflt: 1.e-4} -- contact separation delay topen {dflt: tbeg+begdelay} -- earliest elec opening ich1 [AJ chopping level at power frequency ich2 -· [A) chopping level at high frequency minslope - - [A/s] lower limit of the current slope maxslope -- [A/s] upper limit of the current slope reopen_delay {dflt:2.5e-6} -- [s] reopening delay reignit window {dflt:5e-3} -- [s] reignition window

INPUT -deltav current

VAR

voltage across breaker terminals current through breaker

state O= fully open 1= normal closed 2= tentatively open 3= reignited

first_opening transition from to 2 reigniting transition from 2 to 3 reopening transition from 3 to 2 fully_opening transition from 2 to 0 reopen_clock state variable of 3 elapsed time elapsed since tbeg cbstatus open/close signal to switch

OUTPUT cbstatus

HISTORY current {dflt: 0}

FUNCTION characteristic POINTLIST (0,0) , (0.98E-3, 588e3) ,(1.E-3, 600e3) ,(1.02E-3, 608e3), C4.98E-3, 752e3) ,(5.E-3, 760e3) ,(5.02E-3, 766e3), (999. 98E-3, 1058e3), ( 1, 1058e3)

FUNCTION random_sel (min,max) :=mi n +(max-min)*random() INIT

IF begdelay<10e-6 OR begdelay>2e-3 THEN ERROR IJRITE("Out-of ·range value of 'begdelay' =11

, begdelay) STOP

ELSE state cbstatus

ENO IF

:=1 :=closed

-- normal closed

END I NIT EXEC

IF t>=topen THEN first_opening :=false; reopening :=false; IF state=1

-- otherwise do nothing fully_opening :=false reigniting :=false

-- was normal closed AND (abs(current) < ich1

OR current*prevval(current)<O ) THEN first_opening :=true elapsed :=t-tbeg

ELSIF state=2 THEN -- was tentatively open IF elapsed > reignit window THEN fully opening :=true

ELSIF abs(deltav) > characteristic(t -tbeg) THEN reigniting :=true

ENDIF ELSIF state=3 THEN -- was reignited

reopen_clock :=reopen_clock +timestep IF reopen_clock >= reopen_delay

AND Cabs(current) < ich2 OR current*prevval(current)<O )

AND abs(deriv(current)) < random_sel(minslope,maxslope)

THEN reopening :=true ENDIF

ELSIF state=O THEN ENDIF

IF first_opening OR reopening THEN

-- was fully open

state :=2 becomes tentatively open ELSIF reigniting THEN

reopen_clock :=O state :=3 -- becomes reignited

1069

ELSIF fully opening THEN state :=O -

ENDIF becomes fully open

IF state= 2 OR state= 0 THEN cbstatus :=open ELSE cbstatus :=closed END IF

ENDIF END EXEC ENDMOOEL

-- is now open

Listing 2 - MODELS section in EMTP data case MODELS INPUT

volval {v(intval)} -- load side breaker voltage volmon {v(intern)} -- source side breaker voltage curremtp {i(intmon)} -- breaker current

OUTPUT action -- open/close control signal to switch

$INCLUDE breaker.m USE breaker AS noarcbreaker DATA

tbeg:=0.003363 ich1:=20. ich2:=0.125 minslope:=30.e6 maxslope:=40.e6

INPUT deltav := volmon-volval current := curremtp

OUTPUT action:=cbstatus

ENDUSE ENDMOOELS

[S] [AJ [Al

[A/s] [A/sl

Listing 3 - Declaration and use of an external program in MODELS. MODEL propag FOREIGN mod002

{ixdata:30, ixin:10, ixout:40, ixvar:O}

USE propag AS line DATA

-- line parameters xdata[1J:= line Len xdata[5 •• 8J:= [line_R, line_L, line_G, line_CJ xdata[9 •• 10J := [corona_C_factor, corona_VJ

-- propag simulation directives xdata[2J:= nseg nuiber of line segments xdata[3J:= nstep -- nuiber of substeps xdata[4J:= 1 -- nuiber of iterations

-- params of surge waveshape xdata[11J := surge_type xdata[12J:= surge_point * nseg xdata[13 •• 16J:= [surgta, surgtb, surgi, surgdiJ

-- probe points xdata[21 •. 30J:= probe_point[1 •. 10J

INPUT xin[1J :=prevtime -- tini of this step in propag xin[2J:=t -- tcalc of this step in propag xin[3J := prevval(uth net[1]) -- v-th of net at tini xin[4J:= prevval(uth=net[2J) xin[5 •• 6J:= uth net[1 .. 2J -- v-th of net at tcalc xin[7J := prevvaTCrth_net[1J) -- r-th of net at tini xinCBJ:= prevval(rth_net[2J) xin[9 •• 10J := rth net[1 •• 2J r-th of net at tcalc

OUTPUT -v lin[1 .• 2J :=xout[1 •• 2J i-lin[1 •• 2J:=xout[3 •• 4J v-1n1 :=xout [51 -- v at i-inj l :=xout[6J left at i-inj-r :=xout[7J -- right at probe=vC1 •• 101 := xout [21 •• 301 probe_i [1 •• 101 .- xout [31 •. 401

ENDUSE

v at line ends i at line ends njection point njection point njection point v at probe pts i at probe pts