{"http:\/\/dx.doi.org\/10.14288\/1.0065142":{"http:\/\/vivoweb.org\/ontology\/core#departmentOrSchool":[{"value":"Applied Science, Faculty of","type":"literal","lang":"en"},{"value":"Electrical Engineering, Department of","type":"literal","lang":"en"}],"http:\/\/www.europeana.eu\/schemas\/edm\/dataProvider":[{"value":"DSpace","type":"literal","lang":"en"}],"https:\/\/open.library.ubc.ca\/terms#degreeCampus":[{"value":"UBCV","type":"literal","lang":"en"}],"http:\/\/purl.org\/dc\/terms\/creator":[{"value":"Arau\u0301jo, Anto\u0301nio E. A.","type":"literal","lang":"en"}],"http:\/\/purl.org\/dc\/terms\/issued":[{"value":"2008-09-17T16:49:32Z","type":"literal","lang":"en"},{"value":"1993","type":"literal","lang":"en"}],"http:\/\/vivoweb.org\/ontology\/core#relatedDegree":[{"value":"Doctor of Philosophy - PhD","type":"literal","lang":"en"}],"https:\/\/open.library.ubc.ca\/terms#degreeGrantor":[{"value":"University of British Columbia","type":"literal","lang":"en"}],"http:\/\/purl.org\/dc\/terms\/description":[{"value":"In power system simulations, control systems act upon the electric power system in a variety of ways. There is, therefore, a necessity of simulating the control system equations together with the power system equations. This is the case not only instability studies, but also in the simulation of electromagnetic transient phenomena. Because of the different structure of the two sets of equations, computational efficiency can be improved if both sets of equations are solved separately, with the result from one set of equations showing up in the other set of equations one or more time steps later. This procedure, however efficient, can lead to numerical instability. In the simulation of the control system itself, the modelling of nonlinearities in closed loops poses some problems as well. The most efficient way of handling a nonlinear block is to open the closed loop and use, instead of the current value of the variable, a predicted value of the feedback path. This can also lead to numerical instabilities. In this thesis a simultaneous solution of the control and power system equations is proposed. For the cases of nonlinearities in closed loops, an iterative solution is suggested. The implementation of the method is carried out in the Electromagnetic Transients Program (EMTP). Several comparisons between the proposed and other methods are performed. Incases in which the analytical solution is not available, the comparison is made against the results of the TAGS package (\"Transient Analysis of Control Systems\") which is integrated with the EMTP version of DCG\/EPRI (\"Development Coordination Group\/Electric Power Research Institute\").\r\nIt is shown through simple, but typical, case studies that the proposed method is not only accurate and efficient, but also numerically stable, thus representing a significant improvement to the ability of the EMTP to reliably simulate electromagnetic transients in power systems when control systems are involved.","type":"literal","lang":"en"}],"http:\/\/www.europeana.eu\/schemas\/edm\/aggregatedCHO":[{"value":"https:\/\/circle.library.ubc.ca\/rest\/handle\/2429\/2121?expand=metadata","type":"literal","lang":"en"}],"http:\/\/purl.org\/dc\/terms\/extent":[{"value":"4636282 bytes","type":"literal","lang":"en"}],"http:\/\/purl.org\/dc\/elements\/1.1\/format":[{"value":"application\/pdf","type":"literal","lang":"en"}],"http:\/\/www.w3.org\/2009\/08\/skos-reference\/skos.html#note":[{"value":"NUMERICAL INSTABILITIESINPOWER SYSTEM TRANSIENT SIMULATIONSByAntonio Emilio Angueth de AraujoB. Sc. (Electrical Engineering) Universidade Federal de Minas Gerais, BrazilM. Sc. (Electrical Engineering) Universidade Federal de Minas Gerais: BrazilA THESIS SUBMITTED IN PARTIAL FULFILLMENT OFTHE REQUIREMENTS FOR THE DEGREE OFDOCTOR OF PHILOSOPHYinTHE FACULTY OF GRADUATE STUDIESELECTRICAL ENGINEERINGWe accept this thesis as conformingto the required standardTHE UNIVERSITY OF BRITISH COLUMBIAJune 1993\u00a9 Antonio Emilio Angueth de Araujo, 1993In presenting this thesis in partial fulfilment of the requirements for an advanced degree atthe University of British Columbia, I agree that the Library shall make it freely availablefor reference and study. I further agree that permission for extensive copying of thisthesis for scholarly purposes may be granted by the head of my department or by hisor her representatives. It is understood that copying or publication of this thesis forfinancial gain shall not be allowed without my written permission.Electrical EngineeringThe University of British Columbia2075 Wesbrook PlaceVancouver, CanadaV6T 1W5Date: `3 9 3AbstractIn power system simulations, control systems act upon the electric power system ina variety of ways. There is, therefore, a necessity of simulating the control systemequations together with the power system equations. This is the case not only instability studies, but also in the simulation of electromagnetic transient phenomena.Because of the different structure of the two sets of equations, computationalefficiency can be improved if both sets of equations are solved separately, with theresult from one set of equations showing up in the other set of equations one or moretime steps later. This procedure, however efficient, can lead to numerical instability.In the simulation of the control system itself, the modelling of nonlinearities inclosed loops poses some problems as well. The most efficient way of handling anonlinear block is to open the closed loop and use, instead of the current value ofthe variable, a predicted value of the feedback path. This can also lead to numericalinstabilities.In this thesis a simultaneous solution of the control and power system equationsis proposed. For the cases of nonlinearities in closed loops, an iterative solution issuggested. The implementation of the method is carried out in the ElectromagneticTransients Program (EMTP).Several comparisons between the proposed and other methods are performed. Incases in which the analytical solution is not available, the comparison is made againstthe results of the TAGS package (\"Transient Analysis of Control Systems\") whichiiis integrated with the EMTP version of DCG\/EPRI (\"Development CoordinationGroup\/Electric Power Research Institute\").It is shown through simple, but typical, case studies that the proposed method isnot only accurate and efficient, but also numerically stable, thus representing a sig-nificant improvement to the ability of the EMTP to reliably simulate electromagnetictransients in power systems when control systems are involved.iiiTable of ContentsAbstract^ iiList of Tables viiiList of Tables^ viiiList of Figures ixList of Figures^ xii1 Introduction 12 Literature Review^ 42.1 Introduction  ^42.2 EMTP-TACS Approach  ^42.3 TACS Solution Method  ^62.3.1 Transfer Functions - Linear Blocks  ^62.3.2 Nonlinear Function Blocks  ^82.3.3 Transfer Function with Limiters  ^92.3.4 TACS-EMTP Interface ^  112.4 Time Delays in the TACS-EMTP Approach ^  122.5 Final Remarks^  14iv3 Time Delays and the Stability and Accuracy of the Simulation^153.1 Introduction  ^153.2 Numerical Instability  ^163.2.1 DC Circuit  ^163.2.2 Arc modelling  ^183.2.3 Sinusoidal Oscillator  ^203.3 Stable Inaccurate Results  ^213.3.1 Internal Time Delays  ^213.3.2 Converter Simulation - External Time Delays ^ 224 Simultaneous Solution of Power and Control System Equations^254.1 Introduction  ^254.2 Basic Considerations  ^264.2.1 Elimination of the External Time Delay ^ 264.2.2 Elimination of the Internal Time Delays  264.3 Actual Implementation ^  284.3.1 Interface Between the Written Program and the EMTP .^284.3.2 Capabilities of the Program  ^335 Comparison Between Simultaneous and Non-simultaneous Approach415.1 Introduction  ^415.2 Control System Case Studies ^  425.2.1 Second-Order Linear System  425.2.2 Static and Dynamic Limiters in Open Loops ^ 425.2.3 FORTRAN Function in a Closed Loop ^  445.2.4 Special Element Block ^  445.3 Simulations of Control and Power Systems ^  445.3.1 Arc Modelling ^  445.3.2 Single-Phase Variable Load ^  485.3.3 Three-Phase Variable Load  535.3.4 Simple HVDC System Model ^  645.4 Converter Simulations  ^705.4.1 Single-Phase Thyristor Rectifier Bridge  ^725.4.2 Three-Phase Thyristor Inverter  ^725.4.3 Remarks on Converter Simulation with the EMTP ^ 725.5 Final Remarks^  766 Conclusions^ 81Bibliography 83A Interpreter Basic Principles^ 86A.1 Compilation of Arithmetic Expressions ^  87A.2 From Infix to Polish Notation ^  89A.3 Evaluation of a Reverse Polish expression ^  100B SS and EMTP Input Files^ 113B.1 Control System Case Studies - SS Input Files Only ^ 113B.1.1 Second-Order linear system (Section 5  2 1)   113B.1.2 Static and Dynamic Limiters (Section 5.2.2) ^ 114B.1.3 FORTRAN Function in a Closed Loop (Section 5.2.3) ^ 116B.1.4 Special Element Blocks (Section 5.2.4) ^ 117viB.2 Control and Power System Case Studies - SS and EMTP Input Files 119B.2.1 Arc Modelling (Section 5.3.1) ^ 119B.2.2 Single-Phase Variable Load (Section 5.3.2) ^ 120B.2.3 Step Load Variation (Section 5.3.3) 122B.2.4 Pulse Load Variation (Section 5.3.3) ^ 125B.2.5 Load Variation with Thyristor Controlled Reactor (Section 5.3.3)128B.2.6 HVDC System Simple Model (Section 5.3.4) ^ 135B.2.7 Single-Phase Thyristor Rectifier Bridge (Section 5.4) ^ 138B.2.8 Three-Phase Thyristor Inverter (Section 5.4) ^ 141viiList of TablesA.1 Simple Precedence Function ^  89A.2 Transformation of a \u2014 b x c + d\/5 into Reverse Polish ^ 90A.3 Input and Stack Precedence Functions ^  91viiiList of Figures1.1 Interaction between power system and control system ^ 22.1 Typical diagram of a control system ^ 52.2 Transfer function block ^ 72.3 Control system with linear transfer function blocks ^ 82.4 Nonlinear function blocks ^ 92.5 Static and dynamic limiters 102.6 Time delay between TACS and EMTP ^ 112.7 Possible simultaneous solution with TACS-EMTP ^ 133.1 Numerical instability in a DC circuit ^ 163.2 Current and Voltage in the circuit of Figure 3.1 ^ 173.3 Arc modelling with EMTP-TACS ^ 183.4 z-transform domain analysis 193.5 Numerical instability in the arc modelling ^ 193.6 Block diagram and exact solution of^(t)^x(t) = 0 [1] ^ 203.7 Instability due to the internal time delay 213.8 Inaccuracy due to the internal time delay [1] 223.9 Three-phase thyristor inverter current - TACS inaccurate result [2] 244.1 Partition of the augmented matrix ^ 274.2 Compensation method in the EMTP 29ix4.3 Subroutine CONNEC and its interface with the EMTP ^ 304.4 Control actions upon the power system ^  314.5 Matrix formation inside CONNEC  324.6 Controlled integrator block  ^365.1 Second-order linear system: (a) Diagram; (b) Solution for a unit stepinput.  ^435.2 Static limiter: (a) Diagram; (b) Simulation results.  ^455.3 Dynamic limiter: (a) Diagram; (b) Simulation results ^465.4 Nonlinearity in a closed loop: (a) Diagram; (b) Simulation results [1] ^475.5 Special element blocks - Diagram and simulation results (source =cos wt, w = 377 rad\/s and time delay = 2 ms). ^  475.6 Arc modelling - superposition of the analytical and the SS simulationresults ^485.7 R-L load representation; c = R\/L^  495.8 Active power variation^  505.9 Block diagram - Single-phase variable load [1] ^515.10 Simulation Results: (a) TACS solution [1]; (b) SS results ^525.11 Sample power system [1]. ^  545.12 Diagram of the Thevenin reduced system [1]. ^  545.13 Load modelling - step variation [1] ^565.14 (a) Load variation - step variation, (b) TACS simulation result [1], (c)SS simulation result.  ^575.15 Load modelling - pulse variation [1].  ^585.16 (a) Load variation - pulse variation, (b) TACS simulation result [1],(c) SS simulation result.  ^595.17 Thyristor controlled reactor: (a) Circuit diagram; (b) Circuit model;(c) TCR s-domain model ^  615.18 Basic TCR voltage controller - ic\/L modelling [1] ^625.19 TCR and its control system - a simple model ^625.20 SS block diagram.  ^635.21 Load variation.  ^645.22 Load variation without TCR: (a) TACS simulation [1]; (b) SS simulation. 655.23 Load variation with TCR: (a) TACS simulation [1]; (b) SS simulation. 665.24 Power system with a DC line [1]. ^  675.25 Id and a modelling [1] ^685.26 EMTP-SS simulation diagram [1]. ^  685.27 (a) Voltage tracking system; (b) DC system equations; (c) AC currentinjection [1] ^695.28 IDC, ALPHA and IACF comparisons; (a) TACS simulation [1]; (b) SSsimulation.  ^705.29 Voltage at bus 1 (BUS1) comparison; (a) TACS simulation [1]; (b) SSsimulation.  ^715.30 Single-phase thyristor rectifier.  ^735.31 Single-phase rectifier simulations - voltage vd: (a) TACS results; (b)SS results ^745.32 Closing and opening of EMTP switches. ^  755.33 Backtracking procedure.  ^775.34 Inverter simulation: instability due to thyristor misfiring  ^78xiAcknowledgementsTo my wife Angela, for her having put aside her own career and interests to kindlyaccompany me and, with love, make my undertaking possible. To my children Thiagoand Henrique, who made my life a little more complicated but full of love and fun.To Dr. H.W. Dommel and Dr. J.R. Marti for their invaluable help, direction andadvice. To Dr. Nelson Santiago for his help during the period of my thesis writing.To my colleagues for making my stay at UBC memorable.Finally, to CNPq (Brazilian Research Council), to Universidade Federal de MinasGerais and to The University of British Columbia for their financial support.xiiChapter 1IntroductionDuring the 1960's and 1970's the modelling and simulation of power systems transientphenomena reached a high degree of sophistication. Numerical techniques, as well asmodels of various power system components, were developed for digital transientsimulation software packages.With the increased use of HVDC transmission systems, and the wide applicationof other power electronic devices in power systems, it became necessary to simulatethe control systems acting upon the power system in addition to the power systemitself. This is very important in cases where the dynamic interactions between thecontrol and the power system are of major concern.In general, the control system acts upon the power system in three different ways:\u2022 issuing commands to open or close switches and thyristors;\u2022 controlling voltage sources; or\u2022 controlling current sources.The decisions made by the control system are based on the information which itreceives from the power system, such as node or branch voltages, branch currents orstate of the switches. Figure 1.1 depicts the general situation.1Chapter 1. Introduction^ 2PowerSystemswitch statusvoltagecurrent'-7ControlSystemswitch commandvoltagecurrentFigure 1.1: Interaction between power system and control systemThe power system component models are relatively easy to incorporate into nodalnetwork equation representations. Control system components are not as easy tomodel. They do not fit into the nodal network representation, and the associatematrices are not symmetric.The easiest and most efficient way of handling these differences, is to simulatethe power system equations separately from the simulation of the control systemequations. Both sets of equations are solved separately, and then interfaced witheach other through the exchange of information about the values of the parameterswhich they share. This introduces time delays between both solutions and makes thesolution procedure non-simultaneous.The simulation of the control system itself may require some special treatment aswell. Whenever a nonlinearity exists in a closed loop in the control system, there isan efficient and non-simultaneous procedure to overcome this difficulty - opening theloop and using the past value as the actual value of the output of the feedback path.Chapter 1. Introduction^ 3Non-simultaneity is the basis for the efficiency of the solution method outlinedabove. However, this procedure can lead to two distinct and important problems -inaccuracy and numerical instability.These two problems are addressed in this thesis. A general simultaneous solutionmethod of the control and power system equations is proposed. Comparisons betweenthe proposed and other methods, showing its accuracy and stability, are performed.The thesis is divided into six chapters as outlined below:\u2022 Chapter One - Introduction\u2022 Chapter Two - Literature Review ^ An overview of the relevant technicalliterature is presented.\u2022 Chapter Three - Effects of Time Delays on the Stability and Accuracy of theSimulation ^ The main objective of this chapter is to identify the mostimportant effects of time delays (non-simultaneity) on the stability and accuracyof the solution.\u2022 Chapter Four - Simultaneous Solution of Power and Control System Equations^ The proposed method is described and the implementation of the methodis discussed.\u2022 Chapter Five - Comparison between simultaneous and non-simultaneous ap-proaches ^ The objective here is to show the main advantages and limita-tions of the simultaneous approach when compared with the other approaches.This is done through several case studies.\u2022 Chapter Six - ConclusionsChapter 2Literature Review2.1 IntroductionSeveral current digital computer programs for power system transient analysis areknown as \"Electromagnetic Transients Program\". Most of them are variations of thebasic EMTP [3]. See reference [4] for a complete description of the various versions.Control system simulation capabilities were originally added to the BPA EMTP(Bonneville Power Administration EMTP). Although other programs not directlyrelated to the EMTP exist which are able to simulate control and power systems, thischapter will cover only the EMTP-related literature, because of the wide-spread useof the EMTP compared to other programs.2.2 EMTP-TACS ApproachOne of the first works on the simulation of control and power systems using generalpurpose programs was done by L. Dube and H. Dommel [5]. Their technique wasincorporated into a digital computer program called TACS (Transient Analysis ofControl Systems), which became part of the EMTP. TACS is still used today in theDCG\/EPRI EMTP. The main objective at that time was the simulation of HVDCconverter controls.4Vcos(180-P)Kl\/sFrom internalsourceFrom EMTP SensorG(s)To EMTPChapter 2. Literature Review^ 5Figure 2.1: Typical diagram of a control systemSome important features of TACS are:\u2022 its code is independent of the EMTP, and interfaces with the EMTP with onetime step delay;\u2022 it can accept arbitrary interconnections of a set of control system buildingblocks;\u2022 it solves the control system equations by implicit integration with the trape-zoidal rule.Figure 2.1 shows a typical diagram of a control system to be simulated by theEMTP-TACS approach, where the control receives some information from the net-work, performs some actions and then gives information back to the network.Although there have been many additions to the TACS set of blocks over the years[6], the basic blocks used to simulate any control system are:\u2022 transfer functions \u2014 s-domain rational polynomial functions which are themost basic building blocks in a control system;\u2022 sources \u2014 time dependent sources, such as DC, pulse, step, etc;Chapter 2. Literature Review^ 6\u2022 Fortran expressions \u2014 a general function given by a Fortran statement whichdescribes the relationships between the inputs and the output of a block;\u2022 devices \u2014 preprogrammed subsystems of control systems, such as relay oper-ated switches, sample and track circuits, etc.2.3 TACS Solution Method2.3.1 Transfer Functions \u2014 Linear BlocksA general transfer function block is shown in Figure 2.2. It describes a relationshipbetween the output X and the inputs Ui as a rational function G(s) = N(s)\/D(s)with a gain K and m < n. Such an n-th order transfer function is transformed into asystem of first-order differential equations which are integrated with the trapezoidalrule. After eliminating internally created state variables for second and higher orderderivatives, a single equation relating the output to the inputs is formed:cx(t) = K \u2022 d \u2022 u(t) -+ hist(t \u2014 At) , (2.1)where u is the sum of all input variables. The coefficients c and d are calculated usingthe recursive formula:(-2) i {^(i i^ (At)2 \\i+i d .+1 ' \u2022 \u2022 \u2022 + (71 ( At rdn},) where ei ) is the binomial coefficient, and^n^2 \u2022co = E() 2 Dii.0 Atwhere c = co . The formulas for d are found replacing D by N in the above formulas.Chapter 2. Literature Review^ 7Ul0 + N1s + . + N sKDO + Dls + + Dn snU2 UU3XFigure 2.2: Transfer function blockThe calculation of the history term hist(t \u2014 At) is not simple and the reader isreferred to Chapter 4 and reference [7] for details.After discretizing all transfer functions, it is possible to build a matrix equation(A)(X) = (hist).To clarify this point, assume the system of Figure 2.3 is to be simulated [7].Applying Eq. 2.1 to the blocks of this figure, the related matrix equation will be\/ xiKa da Ka da 0 Kada 0 x20c,00Cb000Kbdb0X3x4(histahistbhist (2.2)0 Cd \u2014 K add 0 0 U1 histd\\ U2Ca\u2014Kbdb\u2014K cd,0If u i and u 2 are known sources at each time step, the unknowns are x l , x 2 , x3 andx4 . The previous equation can be written as follows:(Ax )(x) = (hist) \u2014 (Axu )(u),^ (2.3)b-U2UlaX1dChapter 2. Literature Review^ 8X4Figure 2.3: Control system with linear transfer function blockswhereCa Ka da Ka da 0\u2014KbdbAxe =-- \u2014Kcd,(0c,00Cb00 0 cd \u2014Kddd(\u2014Ka da 00^Kb db0^00^0The Equations 2.3 can now be solved for the unknowns at each time step. Trian-gular factorization and ordering techniques with a sparsity storage scheme are usedin the solution. The factorization is performed once, and at each time step there isone forward solution and one back substitution [5].2.3.2 Nonlinear Function BlocksNonlinear function blocks are not included in the previous simultaneous solution ofthe whole system. Instead, they are solved sequentially as soon as their input signalsbecome available at some stage in the back substitution mentioned above.andASUSystem\u20144 SectionASystemSectionBN.L. N.L. SystemSectionSystemSectionChapter 2. Literature Review^ 9Open Loop^Closed LoopSystemSection N.L.SystemSectionDelay 1--DecouplingFigure 2.4: Nonlinear function blocksIn an open loop configuration, the nonlinearity does not pose any problem sinceits input does not depend on its output. Problems arise in a closed loop configuration,where the sequential solution forces the introduction of a time-delay to decouple theinput from the output of the nonlinear block (see Figure 2.4).The introduction of this time delay occurs whenever a nonlinear block exists insidea closed loop configuration. Many of the Fortran Functions and Devices blocks arenonlinear and are likely to cause the introduction of such time delays, which theprogram user may not even be aware of.2.3.3 Transfer Function with LimitersThe general transfer function block has an additional feature that enables the user touse two types of limiters. The function of these limiters is to limit the output of theblock if a certain condition is reached.The output of the static limiter shown in Figure 2.5 isChapter 2. Literature Review^ 10xStatic LimiterXrainDynamic LimiterG(s)Figure 2.5: Static and dynamic limitersx =KuxminXmasifififXmin < Ku < Xmas,Ku < xmin,Ku> Xmas.Each of the three equations above is a linear algebraic equation of the form ofEq. 2.1, with c = d = 1, hist = 0 inside the limits, and c = 1, d = 0, hist =(Xmas or x rnin ) at the limits.Contrary to static limiters, the limiting action of dynamic limiters changes thedynamic behaviour of the transfer function block. These limiters are applied onlyfor first-order transfer functions [7]. The equations for the dynamic limiter are (seeFigure 2.5)I x +T\"t = Ku if X sam < X < Xmas ,X = Xm ia^if X < Xmin and (Ku \u2014 x) < 0,x = Xmas^if x> Xmas and (Ku \u2014 x) > 0.The dynamic limiter equations can also be put in the format of Eq. 2.1. Insidethe limits, the coefficients are:d = K;2Tc^(1+ \u2014A7 );2thist = Ku(t \u2014^(1 \u2014 \u2014At)x(t \u2014 At).Chapter 2. Literature Review^ 11EMTPt-2At^t-\/.t TACS t-:Att-20tFigure 2.6: Time delay between TACS and EMTPOutside the limits the coefficients are the same for both limiters.Although both types of limiters fit into Eq. 2.1, when they occur in closed loopstheir input will depend on their output. This situation is similar to the case of non-linear blocks where the introduction of time delays is unavoidable. This is discussedin Section 2.4.2.3.4 TACS-EMTP InterfaceAs mentioned before, TACS solves the set of control system equations independentlyfrom the EMTP and has to communicate with it to exchange information on how thecontrol action is supposed to influence the power system. Figure 1.1 in Chapter 1outlines the interface process between both programs. It is clear from this figurethat for TACS to issue any control signal to the power system it must have receivedinformation from the EMTP previously. Figure 2.6 shows how the process takes placeas a function of time.TACS solves the control system equations from (t \u2014 20t) to (t \u2014 At). Then itgives the values of the variables to the EMTP. The EMTP solves the power systemequations for (t \u2014 At) to (t). At t, the EMTP gives to TACS the values of the variablesChapter 2. Literature Review^ 12in order for TACS to advance the solution from (t - At) to (t). Therefore, the EMTPalways uses information from TACS delayed by one time step.2.4 Time Delays in the TACS-EMTP ApproachTo summarize what has been discussed so far, there are two types of time delays inthe TACS-EMTP approach:\u2022 Time delay between TACS and the EMTP - external time delays;\u2022 Time delays generated by TACS itself due to nonlinear blocks or transfer func-tion blocks with limiters - internal time delays.In 1983\/84 Ma Ren-ming made some revisions to the original TACS code withrespect to the order in which the blocks of the control system are solved [7, 8]. Oneof the objectives of this revision was to decrease the possibility of the introduction ofinternal time delays in a variety of situations.To illustrate the process, consider Figure 2.7. It consists of 10 transfer functionblocks with three of them having limits. The first four blocks form an independent setof equations, as do the last four blocks. To simultanously solve the system comprisingthe first four blocks, the output of F2 must be calculated first. This means that itsequation (Eq. 2.1) must be the last equation of equations 2.3 (the first one to besolved during the backsubstitution - see Section 2.3.1). The limits constraints areapplied as soon as the output is available. With the output of F2 known, the outputof F3 can be calculated and its equation must be solved next in the backsubstitutionprocess. Then F4 and Fl are solved in this order. F5 and F6 are solved next and inthe last set of four blocks the order is: F10 -+F7 -*F8HIF4 F3F5HILOWF6HIF2LOWFlChapter 2. Literature Review^ 13LOWFigure 2.7: Possible simultaneous solution with TACS-EMTPThe ordering used in this case avoids the introduction of time delays in the solutionprocedure, but the ordering approach is far from general. Any ordering scheme failsif there are two limiters in one single closed loop.In addition, an ordering algorithm is needed to detect the loops with limiters ornonlinear blocks. Although TACS-EMTP has a built-in ordering routine, a recentimprovement [9] has thoroughly dealt with this subject.In terms of what types of problems time delays can cause in the simulation ofcontrol and power systems, Lima [10] showed in 1985 that a numerical instabilitycan arise in the simulation of an arc of a circuit breaker, due to the time delaybetween TACS and EMTP. A more recent work [11] describes numerical instabilityin simulations of a lead acid battery (DC circuit) due to the same time delay.Examples of numerical oscillations and inaccuracies due to internal time delaysare described in [1].In 1986\/87 a study of several problems concerning TACS, after about ten years ofexistence, was carried out at The University of Wisconsin [12]. This work classifies,among others, the problem of time delays within TACS and between TACS andEMTP as a major TACS problem. It also contains examples of numerically boundedChapter 2. Literature Review^ 14oscillations caused by this problem.2.5 Final RemarksThe major work related to the elimination of time delays is reference [8]. This workreduces many of the internal time delays, but not completely. The problem of thetime delay between TACS and EMTP has not been considered either by that workor by any other work.The importance of the present thesis lies in the fact that it addresses the problemof eliminating both types of time delays. How important this is will become clear inthe next chapter, where the effects of the time delays in transient simulations will beconsidered. Several cases of inaccuracy, instabilities and bounded oscillations will beanalyzed.Chapter 3Time Delays and the Stability andAccuracy of the Simulation\"...if the feedback is delayed too long, oscillations will happen. A simple example that illustrates feedback instabilityis the common home shower. Typically the shower begins with the water too cold, and the user turns up the hot waterto get the temperature he wants. If the adjustment is too strong (he turns the knob too far), he will soon find thatthe shower is too hot, whereupon he rapidly turns back to cold and soon finds it is too cold. If the reactions are toostrong, or alternately the total system (pipes, valve, and human) is too slow, there will result a \"hunting\" that growsmore and more violent as time goes on.\"R.W. Hamming\u00b0\u00b0 Numerical Methods for Scientists and Engineers \u2014 Dover Publications \u2014 New York \u2014 1973.3.1 IntroductionThe objective of this chapter is to illustrate, with examples, the numerical instabil-ity and stable inaccurate results that arise from the introduction of time delays intransient simulations. The examples used are purposely simple to show the conceptsinvolved. However, some of them have practical importance in specific applicationsas well.15Chapter 3. Time Delays and the Stability and Accuracy of the Simulation^16R = It=0bTACS EMTPFigure 3.1: Numerical instability in a DC circuit3.2 Numerical Instability3.2.1 DC CircuitFigure 3.1 shows a circuit to be simulated by TACS-EMTP [11]. The switch andresistor R2 are simulated inside the EMTP and the voltage source V and resistor R 1are simulated inside TACS. TACS gives to the EMTP the voltage Vab and the EMTPgives to TACS the current I, as indicated in the figure. TACS is, therefore, workingas a current controlled voltage source.At any time step n,VI(n) = ab(n) R2where Vab(n) is the latest value TACS gives to the EMTP. As TACS lags one timestep behind the EMTP,Kb(n) = 1 \u2014 R i I(n \u2014 1).Figure 3.2 shows a plot of I versus t for the first 10 time steps, using the twoprevious formulas for different values of the ratio K = RI \/R2 (0.5, 1 and 1.5).From the values of I(n) and Vat, given in the formulas above one can get theze. 0.752, 0.50.252^4^6Time (s)00 10Chapter 3. Time Delays and the Stability and Accuracy of the Simulation^17402\u00b0C' 0112-20-40 ^0 2^4^6^8^10Time (s)K=1.5Figure 3.2: Current and Voltage in the circuit of Figure 3.1following difference equation:1^R1 T(^)I(n) =\u2014 R2 '  \u00b0-1^1 .Applying the z-transform technique [13]1^R1= \u2014R2 \u2014R2Z-1\/(2).Solving for \/(z) givesz\/(z) ^\/R2 z Ri\/R2The pole of \/(z) is z = \u2014R 1 \/R2 . The stability of the solutions \/(z) is guaranteedif the poles zi satisfy jzil < 1. Therefore for \/(z) to be stable, R 1 < R2. WhenRl = R2) 121 = 1 and there is a bounded oscillation around the correct value. ForR2 = 2R1 (K = 1.5) the solution is clearly unstable (see Figure 3.2).Chapter 3. Time Delays and the Stability and Accuracy of the Simulation^18I(t) = (I\/R,2 )V(t-At)(a)EMTPTACSI V 1 \/ R2 (b)Figure 3.3: Arc modelling with EMTP-TACS3.2.2 Arc modellingConsider the circuit of Figure 3.3a where the resistor R2 is simulated by a currentsource inside TACS [10]. The simulation arrangement is shown in Figure 3.3b. Thiscircuit can be used to model an arc in a circuit breaker by allowing R2 to varyaccording to the arc characteristic.The EMTP-TACS program discretizes the differential equation of the system usingthe trapezoidal rule of integration. If the system Laplace transform algebraic equationis available, it is possible to directly obtain the z-transform difference equation byreplacing s in the Laplace domain by (2\/At) (z=-1z ) [14]. The circuit of Figure 3.3b is,therefore, transformed to the circuit of Figure 3.4.Carrying out the stability analysis for the current I one obtainsI(z) =The poles of I(z) are the roots ofv1 \/Zi1 j_ (ZR2)(Z11 +Z2)Z1 Z21 + (zR2 )(Z1 + Z2 ) Zi Z2Chapter 3. Time Delays and the Stability and Accuracy of the Simulation^19Ze--(2\/At)[(z-1)\/(z+1)]LFigure 3.4: z-transform domain analysis100\".7e 50-50-100 --150 ^0 1^2^3^4^5^6^7Time (Rs)Figure 3.5: Numerical instability in the arc modellingWith At.\u2014 0 these roots are:z = 1 and z = Ri\/R2.For R 1 > R2 the system is unstable even with At^0. Figure 3.5 shows oneunstable simulation for L 0.3H, R1 = 10051, R2 = 10Q and At = 10ms.Chapter 3. Time Delays and the Stability and Accuracy of the Simulation^2020 40 60 80 100Time (s)Figure 3.6: Block diagram and exact solution of (t) x(t) = 0 [1]3.2.3 Sinusoidal OscillatorThe examples of instabilities that have been shown so far are caused by the time delaybetween the power system solution and the control system solution. The example ofthis section illustrates the effect of time delays inside the control system solutionprocedure [1].Consider the block diagram of Figure 3.6 that represents the differential equation(t) x(t) = 0^x(0) = 0, i(0) = 1.The exact solution of this equation is also shown in Figure 3.6. The introductionof one time delay in the feedback path of the block diagram causes the system tobecome unstable (see Figure 3.7).Chapter 3. Time Delays and the Stability and Accuracy of the Simulation^2120 40 60 80 100Time (s)Figure 3.7: Instability due to the internal time delay3.3 Stable Inaccurate Results3.3.1 Internal Time DelaysAs mentioned before, according to the EMTP-TACS approach, only pure transferfunction blocks will be solved simultaneously (see Chapter 2). The introduction ofany other type of control system block in closed loops will introduce time delays inthe solution procedure.Figure 3.8 shows an example of the effect of the introduction of a Fortran func-tion block in a closed loop control system [1]. The function used in the exampleis the x 1 function which would not have had any influence on the system outputif the simulation had correctly been performed. The output of the system with theTACS-introduced time delay jumps to 1.0 instantaneously l . In this case, not only the1 The latest information from R.H. Lasseter of July 15, 1993 indicates that the wrong answer isnot only caused by the time delay, but by a coding error as well. The time delay by itself will stillproduce incorrect answers, in the form of damped oscillations around the correct solution.Correct solution\u2014 TACS solutionOUT0Chapter 3. Time Delays and the Stability and Accuracy of the Simulation^2220^40^60^80^100Time (ms)Figure 3.8: Inaccuracy due to the internal time delay [1]time delay, but also the ordering scheme [1], makes TACS work inaccurately. Notethat the system is stable throughout the simulation.3.3.2 Converter Simulation \u2014 External Time DelaysA recent paper [2] shows another case of the effect of time delays in the simulation ofcontrol and power system equations. A simulation of a three-phase thyristor inverter isdescribed. The comparison between the EMTP-TACS and the simultaneous solutionis shown Figure 3.9.The three-phase inverter described in the paper is the one simulated in [15] usingthe EMTP-TACS approach and is also shown in Figure 3.9. To show how sensitiveChapter 3. Time Delays and the Stability and Accuracy of the Simulation^23an inverter is to the variation of its firing angle, consider the following values:VLL^480V at 60Hz;L l = 0.2mH;L2 = 1.0mH;Ld = 16mH;E = 600V;Firing angle a = 150\u00b0.The simulation is performed with a discretizing time step At = 50ps. A time delayof one At means a time delay of 1.08\u00b0 electric degrees at 60 Hz. The inverter currentId as a function of a is given by [16]Id^1.35VLL cos a + E= 3wL3\/71-where L, = L1 + L2. With the values shown above one has:648.23 cos(150)+600 = 89.39A for a = 150\u00b0,0.432Id =648.23 cos(151)+600 =0.432^76.49A for a = 151\u00b0.The difference between the two values above is approximately 14.4%. From Figure3.9 the value of Id which TACS calculates at t = 80ms is 50A.90^100Time (ms)Chapter 3. Time Delays and the Stability and Accuracy of the Simulation^24Ld80\"? 60t2i40020Figure 3.9: Three-phase thyristor inverter current - TACS inaccurate result [2]Chapter 4Simultaneous Solution of Powerand Control System Equations\"There are no good, general methods for solving systems of more than one nonlinear equation.\"W.H. Press, et al.\"\"...so Newton's method finds its chief use after we have got ourselves close to a root.\"Forman S. Actonba Numerical Recipes \u2014 The Art of Scientific Computing, Second Edition \u2014 Cambridge University Press \u2014 1992.b Nurnerical Methods That Work \u2014 Mathematical Association of America \u2014 Washington, D.C. \u2014 1990.4.1 IntroductionThe general concept of the simultaneous solution of the power system and the con-trol system sets of equations is developed in this chapter. It involves two distinctprocedures, each one of them dealing with the elimination of one type of time delay.The implementation of the concepts is carried out in one of the many versions ofthe EMTP. The main concerns during the implementation were: to keep the EMTPcode modifications to a minimum, and to write a code capable of simulating significantcase studies while keeping the code to a reasonable size.The code was written as a development code for testing ideas. At this stage, noattempt towards optimizing parts of the code was done.25Chapter 4. Simultaneous Solution of Power and Control System Equations^264.2 Basic Considerations4.2.1 Elimination of the External Time DelayThe basic idea of the simultaneous solution is to assemble both sets of equations (fromthe power and from the control systems) in one single matrix equation. By doing this,the time delay between the solution of both sets of equation is eliminated.The assembling procedure would produce an augmented matrix which is not sym-metric in general (see Chapter 2, Eq. 2.2). This fact must be accounted for in a fullimplementation of this method in the EMTP code, which, currently, handles onlysymmetric matrices.The present EMTP code works with symmetric matrices only, while TACS mustwork with non-symmetric ones. In the proposed scheme, the augmented matrix con-sists of the elements of both matrices put together, plus the connection elementsbetween the power and control systems (these elements are hidden by the nonsimul-taneous approach currently in use). The number of these elements depends on thenumber of elements in the power system controlled by the control system. This doesnot include switch opening or closing commands. A reasonable assumption is thatthis number is small. Therefore, the nonsymmetric augmented matrix would requiremore memory for storage (compared to the sum of memory required by the two sepa-rate matrices, one symmetric and the other nonsymmetric), as well as a small amountof extra computational time to handle the connection elements.4.2.2 Elimination of the Internal Time DelaysThe existence of internal time delays is due to nonlinearities in closed loops insidethe control system. Therefore, to eliminate them, iterations must be allowed.Chapter 4. Simultaneous Solution of Power and Control System Equations^27Linear EquationsNonlinear EquationsY11^Y12Y21^Y22Figure 4.1: Partition of the augmented matrixAlthough the two opening statements of this chapter sound discouraging, the cho-sen method for solving nonlinear equations was the Newton-Raphson procedure. Thismethod has fast convergence close to the root. The efficiency of the entire implemen-tation will depend on this fast convergence characteristic. As for the closeness tothe root, except at moments of discontinuity of the solution (switching operations),the previous value of a variable will constitute a very good guess for its present root(value).The application of the Newton-Raphson method to the whole augmented matrixwould be very inefficient. Therefore, the procedure used is similar to the one describedin [17]. The iterative method is confined only to those elements which contain thenonlinearities .Figure 4.1 shows the partition of the augmented matrix, which is necessary toisolate the nonlinear elements. Note that the nonlinear elements are not only thosefrom the control system, but also those from the power system. By the same token,the linear part of the matrix contains linear elements from both systems.The reduction of the matrix to the nonlinear element matrix is illustrated in whatChapter 4. Simultaneous Solution of Power and Control System Equations^28follows. The complete matrix equation is[1;1211 m[2Y(11 ,] t )1 ) [(e 12 (t ) 1 ) \u2014 ( k[ i21)^(4.4)where the vector [ei(t)] not only contains the node voltages in the power system, butalso includes the control system block outputs (see Chapter 2, Eq. 2.2).The vector [ki] includes the history terms from both systems; and= ( x n,x1x2is the vector of nonlinear variables which [Y22(Y, 1)] depends on. The submatrix[Y22(Y,t)} contains the information about the nonlinear elements and the submatrix[Y21 ] contains the information on how those elements are interconnected to the otherelements. Therefore, Eq. 4.4 can be reduced to the subset 2:({1'22(Y, t )} - [Y21][Yii] -1 [Y12])[e2(t) ] = [k2] - [Y211[Y111 -1 [k1].This is the equation that is to be solved by the Newton-Raphson method.4.3 Actual Implementation4.3.1 Interface Between the Written Program and the EMTPOne of the methods used by the EMTP to handle nonlinearities is the compensationmethod. This method excludes the nonlinear branch from the network and replacesit by a current source (see Chapter 12 of [7]). The value of the current will dependon the Thevenin equivalent network (seen from the nonlinear element nodes) and onthe nonlinear characteristic itself. Therefore, the equation of the network and of theLinearNetworkkmSolutionChapter 4. Simultaneous Solution of Power and Control System Equations^29Network Equation\/ Element EquationikmvkmFigure 4.2: Compensation method in the EMTPnonlinear element must be solved simultaneously. Fig 4.2 illustrates the situation.The way of describing the nonlinear characteristic is, normally, point by point in theEMTP input file.The MicroTran version of the EMTP [18] makes this compensation method ap-proach accessible through an interface which does not require any code changes inthe EMTP proper. The EMTP calculates at each time step the Thevenin equivalentcircuit of the network seen from whatever nodes are specified in the input file. It thencalls (at the same time step) a subroutine \"CONNEC\" to which it passes the valuesof the Thevenin impedance and voltage (open circuit voltage) through the argumentlist. This subroutine must return the value of the currents through the nonlinearelements (Figure 4.3). Therefore, CONNEC enables the user to write a piece of codeto describe his\/her own nonlinear elements and to interface these elements with theEMTP, without having to touch the EMTP code itself. The important feature here isthat, although the nonlinear elements are not included directly in the EMTP matrix,Chapter 4. Simultaneous Solution of Power and Control System Equations^30EMTP(Linear Network)Z'Thev ' open>^CurrentCONNECFigure 4.3: Subroutine CONNEC and its interface with the EMTPthey are solved simultaneously with the network equations.In the simultaneous solution method implementation, full advantage of the CON-NEC facility was taken. All code additions (except for the part of program thatreads the control system input file and parts of the interpreter - discussed later on)were implemented inside CONNEC. Any controlled power system element must beconsidered as a nonlinear element to be included inside CONNEC together with thecontrol system equations in this approach.Two consequences of working inside CONNEC must be pointed out:\u2022 all the nonlinear elements to be modelled, regardless where they come from(control or power system), must be included in CONNEC, since the networkmust be linear for the compensation method to be applied; and\u2022 there are actually two matrices being built (one inside the EMTP and the otherone inside CONNEC).ControlSystemT^Vcontrol'input ^Chapter 4. Simultaneous Solution of Power and Control System Equations^31Z They.-...\/.\/..\",-\u2022^Vopen(a) Vinput'controlControlSystem^\u2022(b)Figure 4.4: Control actions upon the power systemAs mentioned before (Chapter 1), there are three ways through which the con-trol system may act upon the network: switch commands (put aside for a while);controlled voltage source; and controlled current source. The two controlled sourcesituations are depicted in Figure 4.4.Figure 4.4a shows the case of a current controlled voltage source. In this situation,the equation to be included in the control system equations isVcontrol \u2014 ZThev X 'input = Vopen,Chapter 4. Simultaneous Solution of Power and Control System Equations^32Figure 4.5: Matrix formation inside CONNECwhile in the case of Figure 4.4b (voltage controlled current source), the equation isVinput + ZThev X 'control = Vopen\u2022This is done for each branch which is acted upon by the control system. A typicalmatrix formation inside CONNEC is shown in Figure 4.5.The switch commands are handled separately. CONNEC controls the firing timeof thyristors and requires the EMTP to actually fire them. The firing action appearsas changes in the Thevenin equivalent circuit of the network.Chapter 4. Simultaneous Solution of Power and Control System Equations^334.3.2 Capabilities of the ProgramIn what follows, the program capabilities are outlined. The elements which the pro-gram can model are similar to those modelled by TACS. The input format for elementssimilar to TACS elements use similar formats to facilitate the translation of TACSinput files. The present implementation can handle most (but not all) of the TACSblocks and is sufficient to allow fairly complex cases to be simulated.Linear ElementsLinear elements are transfer functions blocks, which model any n th-order transferfunction of the form\\ Output^No +^+ + Nm S mG\u00b0) \u2014 Input  K Do + D 1 s + + DnsnFigure 2.2 of Chapter 2 shows this type of block.For transient solutions, the Laplace operator s can be replaced by the differentialoperator Tic transforming the equation above into the following differential equation:dx^dnxit, , du^, dmuDox^+ \u2022 \u2022 \u2022 -4- .un ^= ix wf o^4- \u2022 \u2022 \u2022 + v m )dt dtn dt dtmThis equation can now be decomposed into a system of n first-order differential equa-tions, as follows:x1 =u1 =dx,,--1dx^dx1x2 =^\u2022 \u2022 \u2022 xn = ^dt' dt '^dtdu^dui dum_iU2 -=^Um = ^dt dt dtThe differential equation becomes an algebraic equationDox + Di +.. .  + Drix, = K (Nou^+...  + Armum).Chapter 4. Simultaneous Solution of Power and Control System Equations^34The trapezoidal rule of integration can now be used to numerically integrate thefirst -order differential equations . The internal variables x; can then be expressed asxt = 2t xi_ 1 \u2014 {x1(t \u2014 Ot) + Qt xi_1(t \u2014fit)}u7 = Qt 2lj_1 \u2014 {u,(t \u2014 Ot) + Qt u^_1(t \u2014 Ot)},for i=1. .. nand j = 1.. .m.Expressing xn in terms of x n_ 1 and then xn_ 2 in terms of xn_1 and so on, only xis left at the end of this process. If the same procedure is used for u, the followingoutput -input relationship is found:cx(t) = K d \u2022 u(t) + hist(t \u2014 Ot).The history terms are recursively calculated using the following formulation:hist 1 = Kdi u(t) \u2014 cix(t) \u2014 hist l (t \u2014 Ot) + hist 2 (t \u2014 zt)histt = Kd; u(t) \u2014 c;x(t) \u2014 hist1(t \u2014 Ot) + histi+l (t \u2014 Lit)histn = Kdn u(t) \u2014 cnx(t)where hist = hist 1 .The coefficients c and d are calculated once using the recursive formula:c, = ca_ 1 + (-2)'{ z (2 )'D1 + z + 1 ( 2 ),+1dt+1 + ... +() n(2 )ndn},i Ot^i^Ot^i OtChapter 4. Simultaneous Solution of Power and Control System Equations^35where (a.) is the binomial coefficient, andn^2 \u2022co = E()'Dii.0 Atwhere c = co . The formulas for d are found replacing D by N in the above formulas.The current implementation accepts up to 5 (five) different signals as inputs ofthis block. Therefore, the input in the equation above can be^Input = +u1 u 2 u 3^u5.The transfer function block also accepts the two types of limiters described inChapter 2 (Figure 2.5) - static and dynamic limiters.FORTRAN BlocksThe FORTRAN blocks accept fairly general FORTRAN expressions as the relationshipbetween their output and input. One can have, for example,a = 3.6 \u2022 e -1-35.4 - 4.822 \u2022 e -217 \u2022xP + 1.2217.XpThe program accepts the following operators and functions:algebraic operators^: +, - , *, \/, **relational operators^: .EQ., .NE., .LT., .LE., .GE., .GT.logical operators^: .0R., .AND., .NOT., .EQV., .NEQV.FORTRANfunctions^:SIN, COS, TAN, COTAN, SINH, COSH, TANH,ASIN, ACOS, ATAN, EXP, LOG, LOG10, SQRT, ABSAppendix A gives a complete description of the FORTRAN block capabilities.Cntrl^Named_ResetCntrl> 0 (Do + L \u2022 Do \u2022 OUT(t) =K \u2022 INPUT(t)-1- hist(t \u2014 At)wherehist(t) = K \u2022 INPUT(t)\u2014(Do \u2014 nt \u2022 D 1 ) \u2022 OUT(t)Cntrl< 0 OUT(t) = named_reset(t)Chapter 4. Simultaneous Solution of Power and Control System Equations^36Inputs (up to 5)Figure 4.6: Controlled integrator blockSpecial ElementsThere are four blocks, called special element blocks, that play a special role describedbellow.Time-delay^This block delays the input by T S.RMS block^This block calculates the RMS value of the input inthe previous 360\u00b0 electrical degrees.Controlled integrators^This block is a normal integrator that accepts twocontrolling signals. Figure 4.6 illustrate how the ele-ment works.Point -to-point functions The general output-input relationship of this blockis given point by point (two-column format) in theinput file.SourcesSeveral types of sources have been implemented in the program. They are listedbelow (cf. [6]):Chapter 4. Simultaneous Solution of Power and Control System Equations^37\u2022 Sources with User-defined parametersSource Type User-defined ParametersSinusoidalPulseRampLevel Signalamplitude and frequencystart time, amplitude, period and widthstart time, period and amplitudeamplitude\u2022 Built-in sourcesInternal Name OutputTIMEX simulation time in secondsISTEP number of the current simulation time stepDELTAT size of the time step (TIMEX=ISTEP x DELTAT)ZERO 0.0MINUS1 \u20141.PLUS1 1.INFNTY -boo (very large number)PI 7rThe InterpreterThe basic function of the interpreter is to compile a FORTRAN-like expression writtenin an input file - describing the input-output relationship of a FORTRAN block - in away that the program can calculate the value of the expression given the values ofits variables. This is done in a sequence of subroutines shown in Appendix A. Thebasic principles behind the construction of such an interpreter are also discussed inthat appendix.The process of taking the expression from the input file and transforming it intoa vector of symbols to be evaluated from the values of the constituent variables, isdivided into two parts. The first part consists of taking the expression and buildingthe vector of symbols. Each FORTRAN block gives rise to a specific vector of symbols.Chapter 4. Simultaneous Solution of Power and Control System Equations^38This is done outside the time loop. The second part of the process occurs inside thetime loop and is the evaluation of the expressions according to the values which theirvariables take.InitializationThe network steady-state initialization is performed by the EMTP. An ideal situa-tion would be a simultaneous steady-state solution of the network and the controlsystem. Although a feasible alternative [19], this has not been implemented in theEMTP-TACS program.For the purpose of this thesis, only a DC initialization was implemented. Thisinitialization is simpler and yet does not limit too much the range of the programapplications.The DC initialization process assumes that the input and output signals of thecontrol system blocks are DC quantities in steady state. In this case, the output-inputrelationship of a linear (transfer function) block isNoXpc = , ----\u201e UDC\u2022oThis equation fits into the same format of Eq. 2.1, Chapter 2 with c = 1, d = No\/Do ,and hist = 0 and a system of equations is formed and solved for the unknowns xpc.Integrators pose a problem for this procedure because Do = 0 for this type oflinear block. Therefore, their steady-state output must be supplied by the user.Since the initialization procedure implemented at this time is not iterative, itcannot calculate the output of nonlinear blocks. The user must supply those valuesto the program for the time being.Chapter 4. Simultaneous Solution of Power and Control System Equations^39The Newton Method\u2022 The \"Dishonest\" Newton MethodThere is a provision in the program to speed up the Newton-Raphson methodwith the so-called \"dishonest\" Newton method. Assume one has a vector ofnonlinear functions Ft , involving variables x i (i = I, 2, ... , n) expressed as fol-lows:x2,..., x 7i ) = 0^i = 1,2,...,n.If x denotes the variable vector and F denotes the function vector, at iteration hJx(h) \u2022 (5x = \u2014 Fx(h)whereaFi.axeThe solution vector is then modified at each iterationx(h+1)(h)^r= X + OX.The \"dishonest\" Newton method calculates the Jacobian matrix J only once (in-stead of at each time step) and this is done outside the iterative loop. Therefore,the steps, after calculating the Jacobian matrix, are:J^= \u2014FX(h )andx(h+1) = x(h) Sx.The application of this method is controlled by the user, who can disable thenormal Newton method from the input file.Chapter 4. Simultaneous Solution of Power and Control System Equations^40\u2022 The calculation of the Jacobian matrixThe Jacobian matrix is numerically calculated by the program from the valuesof the functions. The term Ji; of the matrix is calculated as follows:aF, Fi (x i ,...,xi +Axi ,...,xn)\u2014Fi (x i ,...,xi \u2014Axi ,...,x,,)ax^ 2 \u2022 AxeIf the initial increment Ax i is not enough to provide small increments in thefunction Fi, it is automatically divided by half and the Jacobian matrix iscalculated again.Memory Limitation of the Current ImplementationThe compilation of the current PC-implementation is performed by a compiler thataddresses only 640 kB of memory. Although this poses a restriction on the number ofelements in the EMTP and in the number of blocks in the control system simulationprogram, the implementation is capable of simulating cases with a considerable degreeof complexity.Chapter 5Comparison BetweenSimultaneous andNon-simultaneous Approach5.1 IntroductionThis chapter presents several cases simulated with the simultaneous solution pro-gram (SS) described in the previous chapter. It also compares results with TACSsimulations, where available.The case studies give an overall view of the behaviour of the implementation ofSS, exploring key issues such as accuracy, efficiency and stability.To focus the attention on these key issues, the cases presented here were chosen tobe simple, without any additional unnecessary complexity. They can be considered,however, prototype situations that can occur in more complex cases where the keyissues are difficult to identify.The first group of cases consists of simulations where only the control system isinvolved. Static and dynamic limiters, as well as nonlinear functions in closed loops,are simulated.The second group contains cases where the control system and the network worktogether. The cases illustrate the strength of the simultaneous solution approach.41Chapter 5. Comparison Between Simultaneous and Non-simultaneous Approach 42For the reader's reference, Appendix B shows the input files for SS and the EMTP(when available) of all cases discussed in this chapter.5.2 Control System Case StudiesThis set of cases shows the behaviour of SS in simulations involving control systemsalone. The EMTP part of it is disabled and only the program described in theprevious chapter is active.Although the cases are simple, they are useful to show how the program performsin general. Note that the case of Section 5.2.3 shows an important advantage of SSover TACS.5.2.1 Second-Order Linear SystemFigure 5.1a shows the diagram of the following second-order transfer function:\\ OutputH(s) = Input \u2014^w2s 2 gw,i s + con2This system has an analytical solution for a step input [20]:Output(t) = 1 \u2014 \u20141 \u2022 e - wn t \u2022 sin(wOt + 0)where \/13 = \u2014 4. 2 and 0 = tan' Og.Figure 5.1b shows the SS simulation for the case where w = 4.0 rad\/s, = 0.125and unit step input. The analytical result is superimposed to, and is indistinguishablefrom the SS result.5.2.2 Static and Dynamic Limiters in Open LoopsTwo simple cases are considered in this section. They are taken from Chapter 5 ofreference [1].SOutput>^1.61.20.80.4Chapter 5. Comparison Between Simultaneous and Non-simultaneous Approach 43Input(a)\\f\\i\\ --------2^4^6^8^10Time (s)(b)Figure 5.1: Second-order linear system: (a) Diagram; (b) Solution for a unit stepinput.o oChapter 5. Comparison Between Simultaneous and Non-simultaneous Approach 44Figure 5.2a shows the diagram of a static limiter system. Figure 5.2b shows itssolutions with and without the static limiter. Figure 5.3 illustrates a similar situationfor a dynamic limiter.5.2.3 FORTRAN Function in a Closed LoopAs mentioned earlier, a nonlinear function in a closed loop can lead TACS to producewrong results. Figure 3.8 of Chapter 3 is reproduced in Figure 5.4, with the SSsolution added.5.2.4 Special Element BlockTo illustrate the application of special element blocks, Figure 5.5 shows a system usesmany of them. Some of these blocks will again be used in more realistic cases insubsequent sections.5.3 Simulations of Control and Power SystemsIn this section, both the SS and the EMTP are active. The cases show the behaviour ofboth programs working together, and demonstrate the advantages of the simultaneoussolution as the cases are presented.For these cases, Appendix B shows not only the SS input files, but also the relatedEMTP files.5.3.1 Arc ModellingSection 3.2.2 of Chapter 3 mentions a case of severe instability due to EMTP-TACSinteraction. This case is, therefore, a good test for the new program. Figure 5.6 showsthe superposition of the analytical and the SS simulation results for the system of(a)u(t), x(t)6 ^x(t) - without limiter420-2-4-6 0 0.04^0.08Time (s)0.12(b)x(t) - with limiterChapter 5. Comparison Between Simultaneous and Non-simultaneous Approach 452.0-2.0u^1000sXStatic LimiterFigure 5.2: Static limiter: (a) Diagram; (b) Simulation results.u> 1000Su(t), x(t)6420-2-4-60Dynamic Limiter(a)0.04^0.08Time (s)0.12Chapter 5. Comparison Between Simultaneous and Non-simultaneous Approach 46\/-0.5(b)Figure 5.3: Dynamic limiter: (a) Diagram; (b) Simulation results.var6var5 var4varl + 5OUT\u2014 TACS solutionChapter 5. Comparison Between Simultaneous and Non-simultaneous Approach 4743201 -SS and Correct solutions0 ^0 20^40^60^80^100Time (ms)Figure 5.4: Nonlinearity in a closed loop: (a) Diagram; (b) Simulation results N.^var2y\u2014x2var3 ^var4*1var5^ var6--->K=1 TimeDelay RMS0.02^0.04time (s)Figure 5.5: Special element blocks - Diagram and simulation results (source = cos wt,w = 377 rad\/s and time delay = 2 ms).0Chapter 5. Comparison Between Simultaneous and Non-simultaneous Approach 480^0.1^0.2Time (s)1 ^riAnalytical solution: i(t) Ril1R2 e R, t,-I'Figure 5.6: Arc modelling - superposition of the analytical and the SS simulationresults.Figure 3.4 with the same parameters used in Figure 3.5. Both results are practicallyidentical.5.3.2 Single-Phase Variable LoadFigure 5.7a shows an R-L load, of which the active power P is variable (time-dependent), and the ratio P\/Q is kept constant [1}.Such an R-L circuit has a Laplace domain representation as shown in Figure 5.7bif zero initial conditions are assumed. The block diagram representation of the circuitis shown in Figure 5.7c.The assumed variation of the active power P is shown in Figure 5.8 and the systemparameters are as follows:R= 3 SI (P\/Q = 3 - for L. 2.653 mH)>^ >1I(s)(a)Source FortranBlock1s -1- cs-Block(b)(c)Chapter 5. Comparison Between Simultaneous and Non-simultaneous Approach 49Figure 5.7: R-L load representation; c= R\/L.Chapter 5. Comparison Between Simultaneous and Non-simultaneous Approach 50151.550 100 150 200 Time (s)P (W)Figure 5.8: Active power variation.Em = 3.1623 VIt can be shown [1] that the value of L is dependent on the value of P as follows:1 2wP ,P QL =^kQ+ TD )where Q is the reactive power and P\/Q = R\/wL.If P\/Q is kept constant, L will depend only on P. Therefore, the variation ofpower shown in Figure 5.8 can be accomplished by varying 1\/L from 377 (1.5 W) to3770 (15 W).The block diagram for this variable load problem is shown in Figure 5.9. Thevariable load is modelled as a control system inside SS and the sinusoidal source(e(t) = sin wt) is modelled inside the EMTP. PINST is the instantaneous power andPAVER is the average power in the circuit'.1 The instantaneous power of any electrical component is p(t) = v(t) \u2022 i(t), where v(t) is the voltageacross the component and i(t) is the current through it. The average power over one period of timeP isf1P =^t p(t)dt.If the voltage and current waveforms have half wave symmetry, P can be calculated usingT = I\/2f = 0.00833 s for 60 Hz. The values of P can be found continuously using the rollingSSNetworkSignal fromEMTP to SSK=1SCR \/ IOUTSinusoidalSourceControlledCurrent SourceCONSSCR*(CONS+PULSE)PULSE^IOUT\\_. Delay0.00833PINST120377 3393Sources^> s + 1131 *- -)PAVER vChapter 5. Comparison Between Simultaneous and Non-simultaneous Approach 51Figure 5.9: Block diagram - Single-phase variable load [1].Chapter 5. Comparison Between Simultaneous and Non-simultaneous Approach 52-15 0201510540^80^120Time (s)(a)0 --:-.2\"N,_.\"\u2014 ..--- iout40^80^120Time (s)(b)160^200-5 --10 \u2014-150 160^200Figure 5.10: Simulation Results: (a) TACS solution [1]; (b) SS results.The simulation results obtained with TACS and SS are shown in Figure 5.10for the current and the average power (PAVER). Note that both programs producepractically identical results.average power P(t) [1, Chapter 2] as follows:1 f^1 f\u2014TP(t) = 7,- 0 p(t)dt \u2014 T., 0^p(t)dt.Note that the second integral has the value of the first integral delayed by T seconds.Chapter 5. Comparison Between Simultaneous and Non-simultaneous Approach 535.3.3 Three-Phase Variable LoadThe next three case studies are related to the 230 kV power system of Figure 5.11 [1].The Thevenin equivalent circuit of the subsystem inside the dashed line is calculatedas seen from bus 7. The reduced system is shown in Figure 5.12 along with thevariable load connected to bus 13. The Thevenin equivalent values are (in sequencevalues):Zero Sequence:Ro = 0.13 SILo = 27.71 mHPositive Sequence:= 0.06 C2L i = 39.99 mH.The sequence values of the transmission lines are:Zero Sequence:Ro = 0.03167 SZ\/kmLo = 3.222 mH\/kmCo = 0.00787 pF\/kmPositive Sequence:Rl = 0.0243 Il\/km= 0.9238 mH\/kmCl = 0.0126 pF\/km.X=10%200 MVA50 MVA 50 M A 0.9 pfX\"=12%90 mirT 50 MVA13.8 kV It5 0.9 pf4. 200 MVAX\"=12%500 MVAX\"=1-IN42. 200MVA 200..- 10%iC MVA3180 mi200 MV 10X=10% mi15mi I12230kV400 MVA10.9pf500\/v1i\/A 10%210n 100MVA1 00MVI10%^J60 miChapter 5. Comparison Between Simultaneous and Non-simultaneous Approach 54Figure 5.11: Sample power system [1].They A They B T ev CThree PhaseTheveninEquivalentSequenceValuesSourcesBus7ABusl2BBus7C^Bus1C^Bus12C144.4 km three phase 24.14 km three phasetransmission lime^transmission limeTransformerBus 13IL13VariableLoad 1B111112ABus7B^BuslABus1BAFigure 5.12: Diagram of the Thevenin reduced system [1].Chapter 5. Comparison Between Simultaneous and Non-simultaneous Approach 55The line lengths are:from bus 1 to bus 7 \u2014 \/ 1 _ 7 = 144.4 kmfrom bus 1 to bus 12 \u2014 4-12 = 24.14 km.The transformer between bus 12 and bus 13 is represented by its series inductance:LT = 70.16 mH seen from the 230 kV side.As in the single-phase variable load case, it is assumed that the ratioActive Power^P = 3.042Reative Power Q wLwill remain constant during the load variation..In this case [1, Chapter 2]1^P3\u2014 41.63 \u2022 V2:whereP3 is the three-phase power in MW andVpu is the per unit value when Kase is 230000\/0 . .The variable load, as in the previous case, is simulated inside either TACS or SS.Step Load VariationThe load modelling diagram for this case is shown in Figure 5.13. The load variationis shown in Figure 5.14a. There are four three-phase power levels with the followingcorresponding values of 1\/L:= 0.1795 for 9.5 MW;Chapter 5. Comparison Between Simultaneous and Non-simultaneous Approach 56Network as in Figure 5.12 IL13CBANetworkSSK=1 K=1Bus13A Bus13BSources 0.1795 2.3715OONS2Bus13CSources 2.8650 1.2293CC NS3 C 3NS4CONS1K=1Busl3A*:CONS1+CONS24CONS3+CONS4)AINT 1 s+1146Bus13B*;CONS1+CONS2+CONS3+CONS4)INT_B1 s+1146Bus13C*CONS1+CONS2+CONS3+CONS4)INT_C1 s+1146PINSTA 120Delay8.3ms PAFigure 5.13: Load modelling - step variation [1].1 = 2.551 for 114 MW;1 = 5.416 for 190 MW;1= 6.645 for 206 MW.The voltage of phase A on bus 1 is shown in Figures 5.14b and 5.14c for TACS andSS simulations. The good agreement between the results is readily noticeable.3005 200^..^100a)co^0al.....^-1000>^-200-3000 40^80^120Time (ms)(c)160^200Chapter 5. Comparison Between Simultaneous and Non-simultaneous Approach 57 1902061149.5 40 80^120Time (ms)(a)160^200300>^200100a)0)^0cu4-.^-100-200-3000 40^80^120Time (ms)(b)160 200Figure 5.14: (a) Load variation \u2014 step variation, (b) TAGS simulation result [1], (c)SS simulation result.Network as in Figure 5.12 IL13CBANetworkBus 13A Bus 13BSource5.2364CONS2Busl3CK=1CONS1SSK=1K=1\u2022Busl3A*(CONS1+CONS2)INT A\u20141 s+1146Busl3B*(CONS1+CONS2)INT_B1 s+1146 Busl3C*CONS1+CONS2)PINSTA x1208Sourc0.1795PA1 s+1146Delay8.3msChapter 5. Comparison Between Simultaneous and Non-simultaneous Approach 58Figure 5.15: Load modelling - pulse variation [1].Pulse Load VariationThe load modelling diagram used to simulate this case is shown in Figure 5.15. Fig-ure 5.16 shows the load variation and the voltage at phase A on bus 1 for both TACSand SS simulations, respectively. Both results are practically identical.Load Variation with Thyristor Controlled ReactorA thyristor controlled reactor (TCR) is the basic building block of static Var com-pensators (SVC). It is usually connected in parallel with a fixed capacitor. The TCR300 ^200100a)-100 \u2014O>^-200 --300 ^0 40^80^120^160Time (ms)(b)200Chapter 5. Comparison Between Simultaneous and Non-simultaneous Approach 59186.29.80^40^80^120^160^200Time (ms)(a)3005- 200100rn 0ca-100 \u20140>^-200 --300 ^0 40^80^120Time (ms)(c)160 200Figure 5.16: (a) Load variation \u2014 pulse variation, (b) TACS simulation result [1], (c)SS simulation result.Chapter 5. Comparison Between Simultaneous and Non-simultaneous Approach 60consists of an inductor in series with an anti-parallel thyristor (two oppositely poledthyristors), which conduct on half-cycles of the supply frequency as indicated in Fig-ure 5.17a.The RMS value of the fundamental component of the current through inductor isIl^\u2014 sin ,=   ^ ),wL^7rwhere o- is the conduction interval. This current has the same value as that of aa \u2014 sin \u00b0-^normal inductor with Ln\u201e,,\u201e \/ = L\/K where IC = ^ (cf. Figure 5.17b).irIf all current harmonics are neglected, the inductance of Figure 5.17b is the fun-damental frequency model for the TCR of Figure 5.17a, which leads to the blockdiagram of Figure 5.17c.The TCR control system is represented, in this model, by the parameter IC. Abasic voltage controller for the TCR is shown in Figure 5.18 [1].A voltage coming from the power system (VRMS pu ) is compared with the unitysource (UNITY). The difference is integrated with a gain and multiplied by 1\/L.If VRMSp.\u2014UNITY> 0, a positive error signal is provided to the integrator. Epu,which plays the role of IC in this model, and BLgam (K\/L in Figure 5.17c) will increase.The TCR and its control system is shown in Figure 5.19. This constitutes a simpleTCR model which ignores harmonics.Consider again the power system of Figure 5.12. Capacitors are added to bus 1(7 pF) to provide the necessary dynamic range of capacitive reactive power [1]. ATCR is also added to bus 1 with L = 0.8 H.The block diagram for the SS simulation is shown in Figure 5.20. In the first sim-ulation, the TCR is disconnected from the network. The variable load is assumed tohave the variation of Figure 5.21. The TACS and SS results are shown in Figure 5.22.x \/ L SI(s)(c)Chapter 5. Comparison Between Simultaneous and Non-simultaneous Approach 61VWlirma ( a -sin a ) . 7r ICurrent fundamental component: \/ 1 =(a)L \/ KMirnI^i(t)>^II II <^  v(t) >^ I(b)V(s)a \u2014 sin aIC = ^7rFigure 5.17: Thyristor controlled reactor: (a) Circuit diagram; (b) Circuit model; (c)TCR s-domain modelVrmspu\/^ BLgamV (from the network)I (to thenetwork)EP 1 LUNITY^0Chapter 5. Comparison Between Simultaneous and Non-simultaneous Approach 62Figure 5.18: Basic TCR voltage controller - K\/L modelling [1].Figure 5.19: TCR and its control system - a simple model.Chapter 5. Comparison Between Simultaneous and Non-simultaneous Approach 63NetworkBus1A^Bus1B^Bus1CK=1IEMTP3SSK=1EMTP1^EMTP2RMS^VRMS^ 1 132.7876VRMSpu 300 EpuSource^PLUS1 CDCDFigure 5.20: SS block diagram.Chapter 5. Comparison Between Simultaneous and Non-simultaneous Approach 64209100 150 200 Time (s)Figure 5.21: Load variation.With the same load variation, the TCR is connected to the network and thesimulations result are shown in Figure 5.23. Note the excellent agreement betweenTACS and SS simulations.5.3.4 Simple HVDC System ModelAssume that the following modifications are made in the power system of Figure 5.11:\u2022 capacitors at bus 1 and 10 are removed;\u2022 generation at bus 3 is increased from 200 to 500 MW;\u2022 the double circuit lines between bus 2 and 9 are removed; and\u2022 load at bus 10 is increased from 300 to 500 MVA.To make the system operational under these circumstances, the AC transmissionline between bus 1 and 2 is now replaced by a DC line carrying 400 MW. The reactivepower consumption of the two converters is assumed to be compensated locally.Figure 5.24 shows the system under study [1]. Three events will be simulated:\u2022 initial DC current ramp-up (from 0% at time zero up to 100% at 50 ms);P (MW)9.550a)cuO270180900-90-180 -Vrms^270^j^180^\u25ba A^kAA^A^90 f 7 111a)0)^oas4-^-90 --180 --2700 40^80^120^160^200Time (ms)(b)Chapter 5. Comparison Between Simultaneous and Non-simultaneous Approach 65-270 ^0 40^80^120Time (ms)160 200(a)Figure 5.22: Load variation without TCR: (a) TACS simulation [1]; (b) SS simulation.Chapter 5. Comparison Between Simultaneous and Non-simultaneous Approach 66270 ^5' 180k- Vrms\/90G)cc;0-900-180-270270>..a)0)co....180900-90O> -180-270\u2014-0Vrms\u2014\u2014fill IITATATA0^ 40^80^120^160Time (ms)(b)40^80^120^160^200Time (ms)(a)Figure 5.23: Load variation with TCR: (a) TACS simulation [l]; (b) SS simulation.As00 MVA950 MVA^500MVA0.9 pf 500MVA3120 mi400 MW^DC line1 SOOMVA1 5000 MVA200MVA 200 MVA500 MVA 610mi^ 0.9pf11 100MVA90 mi60 mi15 mi12100MVA50 MVA50 MVA300 MVA0.9 pf200M VA0.95 pf 11Chapter 5. Comparison Between Simultaneous and Non-simultaneous Approach 67Figure 5.24: Power system with a DC line [1].\u2022 DC line to ground fault at 100 ms, followed by\u2022 a complete DC load rejection at 150 ms.To simulate these events in terms of the converter current (Id) and firing angle(a), the diagram of Figure 5.25 is used.The AC system of Figure 5.24 is reduced to its single-phase equivalent, and theHVDC system is simulated using the current injection method [1]. Figure 5.26 illus-trates the simulation diagram.In addition to the modelling for Id and a (Figure 5.25), there are three moresubsystems to be simulated. They are (Figure 5.27): the voltage tracking system,the DC system itself, and the AC current injection system. The reader is referred toreference [1] for a complete description of this system.Chapter 5. Comparison Between Simultaneous and Non-simultaneous Approach 68Magnitude = 1.6Turns on at t = 50 msRamp up to 1.6in 50 msSourceSourceIDC 107.79*(X111^-286*XPTIMEX^)1 X1*(X.GE.0)0.1^>3.6*6135\"3:4.822*e17.\"+1.2217ALPHASourceMagnitude = 0.31416Figure 5.25: Id and a modelling [1].V(t)IACF IDCSSALPHAFigure 5.26: EMTP -SS simulation diagram [1].(a)IDC^cV^eV1from Network K=1cos cotsin cotCP cos cot + SP sin cotCVeV \u2014VmCl* sin o)t -S1 cos cotVmIlpk \u2014 +elan:DCcoe(DT) cos(AF)^0'43 *Vm2*Xc*IDCwe  coe(AF) + coe(DT) 2IACFterm = cV*ces, + eV*sin,IACF = - Ilpk*terma=0.8933(b)^ (c)Vm = (CPC1+SPS1) Vm>^ cV8VChapter 5. Comparison Between Simultaneous and Non-simultaneous Approach 69Figure 5.27: (a) Voltage tracking system; (b) DC system equations; (c) AC currentinjection [1].160^200ALPHAIACF40^80^120Time (ms)(a)Time (ms)(b)160 200ALPHAChapter 5. Comparison Between Simultaneous and Non-simultaneous Approach 70Figure 5.28: IDC, ALPHA and IACF comparisons; (a) TACS simulation [1]; (b) SSsimulation.Four parameters from the TACS solution were compared against the SS solution:currents IDC and IACF; firing angle ALPHA; and voltage at bus 1 (BUS1). Figures5.28 and 5.29 show the results of both solutions.5.4 Converter SimulationsConverter simulations were briefly discussed in Chapter 3, Section 3.3.2. This sectionpresents additional results concerning the thyristor rectifier and inverter simulations.Comparisons between TACS and SS results are also provided.3001000)co -100040^80^120^160Time (ms)(a)-300 200300100a)0)co^-1000-3000^40^80^120Time (ms)(b)160 200Chapter 5. Comparison Between Simultaneous and Non-simultaneous Approach 71Figure 5.29: Voltage at bus 1 (BUS1) comparison; (a) TACS simulation [1]; (b) SSsimulation.Chapter 5. Comparison Between Simultaneous and Non-simultaneous Approach 725.4.1 Single-Phase Thyristor Rectifier BridgeA single-phase thyristor rectifier is shown in Figure 5-30a. The main functions of itscontroller with its block diagram appears in Figure 5-30b. The TACS [16] and SSsimulation results for this rectifier are shown in Figure 5-31.Although the curve of id is the same in both simulations, the curve of v d shows adifference. The TACS solution presents pronounced peaks at the times of thyristorfirings (see Figure 5.31). It was possible to reproduce these peaks with the SS programby introducing, artificially, one time delay between the program and the EMTP. Thisshows that the origin of the peaks is the external time delay between TACS andEMTP.5.4.2 Three-Phase Thyristor InverterIn the case of a three-phase thyristor inverter, the effect of the external time delaybetween TACS and EMTP appears on the DC side current (id). Figure 3.9 shows theinverter diagram and the TACS and SS simulation results. As stated before, there isa difference of 14% between the two currents. If, again, one artificially introduces atime delay between SS and the EMTP, it is possible to reproduce the TACS results.5.4.3 Remarks on Converter Simulation with the EMTPAlthough not apparent from the discussion above, there is an extra non-simultaneousphenomenon in effect in the thyristor converter simulations. This effect is a charac-teristic of the EMTP and is present both in the SS and TACS results.Thyristors are modelled by the EMTP as controlled switches. Their closing timesare controlled by the equations describing the firing angle control. The opening actionPLS1-2Chapter 5. Comparison Between Simultaneous and Non-simultaneous Approach 73VSA(a)To\u2022EMTP To EMTP\u2022K=1 hrsA120 RAMP Comparator PLS1-2 Delay Block PLS34S \/ :RAMP .GE. VCONTL, 1\/2 cycleVCONTLSource0.25FromEMTPSource1.0RAMPFiringSignalsPLS3-4(b)\u25a011tFigure 5.30: Single-phase thyristor rectifier.Chapter 5. Comparison Between Simultaneous and Non-simultaneous Approach 74270 - ^d 200 -130 -a)^ho 60-^vdCd^-10 -0\u2022^430 -^-150 ^35 36Time (s)(a)37>^200 r-1Pili^30 -60 -CDb.0^-10 -Cd17(dri.\"4-\u2022-80 \u2014 -150 ^35 36Time (s)(b)37Figure 5.31: Single-phase rectifier simulations \u2014 voltage vd: (a) TACS results; (b) SSresults.i SWITCH ?witch openscurrent forced tozero in the next stepTFIRE1closed hereChapter 5. Comparison Between Simultaneous and Non-simultaneous Approach 75Figure 5.32: Closing and opening of EMTP switches.takes place as soon as the current goes through zero, from a positive to a negativevalue.Since the EMTP uses a fixed time step to integrate the differential equations ofthe system, the closing and opening actions will generally not occur at the specifiedinstants of time [7]. Instead, there is a delay between the desired time and the realone. Figure 5-32 illustrates the situation for a given firing angle. The closing actiontakes place at the time step nearest to TFIRE (some EMTP versions may close at thetime step following TFIRE [7]). The opening action takes place after the current hasgone through zero, which is detected by the current sign change.As presented in [21] this problem can be eliminated by the following procedure:1. interpolation to obtain the variables at the point of discontinuity (switch open-ing or closing); and2. integration of the system equations after the discontinuity over two half timesteps (At\/2) using the backward Euler method, to properly re-initialize theChapter 5. Comparison Between Simultaneous and Non-simultaneous Approach 76history terms of all the system components [14].The interpolation is performed to catch the exact moment of the discontinuity.The use of the backward Euler method is necessary to re-initialize the variablesafter the switch operation. Reference [7] suggests that the integration over just onehalf time step after the interpolation is enough to re-initialize all the variables. This istrue only for isolated lumped elements, when one can assume that either a constantvoltage (across capacitances) or constant current (through inductances) will occurduring the one half time backward Euler step. One of those two conditions is essentialfor re-initializations of the variables at the instant of discontinuity.For elements connected either in series or in parallel, two backward Euler integra-tion over two half time steps are needed to provide the right re-initialization for thevariables of the system. This method is illustrated in Figure 5.33.The effectiveness of the backtracking procedure can be seen in Figure 5.34, wherethe inverter of Figure 3.9 is simulated with the normal EMTP (EMTP in the figure)and with a modified version of the EMTP that includes the backtracking method(bktrack in the figure). Because the normal EMTP misfires the thyristors, its solu-tion shows a short-circuit of the inverter that does not exist, as demonstrated by themodified EMTP solution. The time step used in the simulations was 200ps.5.5 Final RemarksAs mentioned in the introduction to this chapter, the case studies presented here wereintended to show the performance of a new, more accurate and stable approach ofthe simultaneous solution, when compared to the current non-simultaneous option.In general, when TACS performs well, so does the proposed method in termsiLt?........--->interpolationt to +A tVab1 t CLOSE^I41, a \u25a0t - At^tAt^At2 2backward Euler steps1\\..-----^---.-^1t + AtCLOSEa ........, bChapter 5. Comparison Between Simultaneous and Non-simultaneous Approach 77i(t)t - At 1:et^et 2 21Figure 5.33: Backtracking procedure.EMTPbktrackLiartA ^ vivd Chapter 5. Comparison Between Simultaneous and Non-simultaneous Approach 781000a)c3) 50000Ca)L..'5 -500-10000.16 0.185 0.21 0.235 0.26Time (s)Figure 5.34: Inverter simulation: instability due to thyristor misfiringChapter 5. Comparison Between Simultaneous and Non-simultaneous Approach 79of accuracy. In those cases where there is an instability in the TACS solution, theproposed method outperforms TACS, showing no instability in its solution. In caseswhere an analytical solution exists, it is possible to observe how accurate the SSapproach performs.The efficiency of the SS method is related to the application of the Newton-Raphson method, which is used whenever there is a nonlinearity in a closed loop.Nonlinearities outside closed loops pose no problem since they do not require anyiterative solution method. As mentioned in Chapter 4, for slowly converging cases,there is an option of the \"dishonest\" Newton method, which can speed up the solutionsomewhat. Although most of the cases simulated by the author, and the great ma-jority of the cases shown in this thesis, do not require more than three iterations, onaverage, at each time step, some cases may require more than three iterations [2]. Thissituation is caused by the fact that the convergence of the Newton-Raphson methodcan be guaranteed only if one is close enough to a root. Since almost any kind ofequation can be simulated with SS, one cannot guarantee either fast convergence, norconvergence per si, in the general case.As mentioned before, at each time step, the guess for the value of the root isnormally its previous value. This may be sufficient in the majority of situations. Incases of poor convergence, one may try to improve the method of prediction of thepresent value of the root. The author has performed a theoretical analysis on thestability and accuracy of various prediction method [22] and has implemented thelinear prediction method in the current version of the SS program. The applicationof the linear prediction method is controlled by the user.The case shown in Figure 5.24, for example, required 8 iterations to convergewhen the normal guess method is used (previous value) and the \"dishonest\" NewtonChapter 5. Comparison Between Simultaneous and Non-simultaneous Approach 80method is applied. If the linear prediction and the full Newton method is applied thenumber of iterations decreases to 4.Timing is not shown in this thesis because the code developed is not a productioncode. In a production code, simulation time would increase because of iterations, butthat is better than having unreliable answers.Chapter 6ConclusionsThe main contributions of this thesis are:\u2022 it proposes and describes a method for solving the network equations and thecontrol system equations simultaneously;\u2022 it describes the implementation of the method within the framework of theEMTP, which is one of the most widely used general purpose programs for thecalculation of transient phenomena in electric power system;\u2022 it presents a set of case studies showing the main characteristics of the presentimplementation and how well it performs when compared with other existingimplementations.The proposed method of simultaneous solution of the control and power systemsequations has proved to be, not only accurate, but also stable. A number of examplecircuits were simulated to illustrate the inaccuracy and instability problems that canoccur when artificial time delays are introduced in the simulation (as in TACS). Thesituations typified in the case studies are likely to occur in more complex simulationswhere the effect of these time delays can be much harder to isolate.On the programming side, the main objective was to write enough code to demon-strate the feasibility of the proposal. Code optimization was not considered during81Chapter 6. Conclusions^ 82the development of the ideas. In this sense, more work has to be done if this code isto become production-grade code.It may be appropriate to indicate some of the improvements which the currentimplementation might need to be transformed into a useful general-purpose code. Thefirst decision is related to the question whether the control system should be simulatedinside a subroutine (as it is in the current implementation). A better solution wouldbe to merge the control and network equations into one single system of equations.This would require a major code modification in the EMTP. The new code wouldhave to be able, among other things, to handle non-symmetric matrices. Sparsitytechniques would still be applied.One necessary modification in the current SS code, in the case of a major coderevision, is the implementation of a procedure similar to the CDA, to damp numericaloscillations originating from within the control system. The current CDA procedureis capable of damping only numerical oscillations caused by events occurring insidethe network.Although the implementation has performed well in terms of accuracy and stabil-ity, some cases may pose some problems in terms of efficiency, requiring an excessivenumber of iterations. To better guess the value of the variables and improve theconvergence of the Newton method, prediction methods should be further studied.Another possibility for improvements is the interpreter of functions outlined inAppendix A. This interpreter can be extensively improved and, perhaps, also beused as a front-end interpreter which can allow digital control systems to be read infrom the EMTP input file.Bibliography[1] R.H. Lasseter. EMTP Workbook IV. Electric Power Research Institute, PaloAlto - California, 1989.[2] A.E.A. Araujo, H.W. Dommel, and J.R. Marti. Simultaneous Solution of Powerand Control Systems Equations. Paper 93 WM 241-0-PWRS, IEEE PES WinterPower Meeting, Columbus, Ohio, 1993.[3] H.W. Dommel. Digital Computer Solutions of Electromagnetic Transients inSingle- and Multiphase Networks. Trans. Power App. and Syst., PAS-88:388-399, 1969.[4] W.F. Long. Power Systems Analysis Using Electromagnetic Transients Pro-grams. IEEE\/PES Transmission and Distribution Conference, September 1991.[5] L. Dube and H. W. Dommel. Simulation of Control Systems in an Electro-magnetic Transients Program with TA CS. In Proceedings of IEEE PICA Conf.,pages 266-271, 1977.[6] Bonneville Power Administration, Portland-Oregon. Electromagnetic TransientsProgram Rule Book, April 1982.[7] H. W. Dommel. Electromagnetic Transients Program Reference Manual (EMTPTheory Book). Department of Electrical Engineering - The University of BritishColumbia, Vancouver - Canada, 1986.[8] Ma Ren-ming. The Challenge of Better EMTP-TACS Variable Ordering. EMTPNewsletter, 4(4):1-6, August 1984.[9] D.G. Chapman, A.J. Helse, F.L. Alvarado, and N.J. Balu. Ordering and Initial-ization Algorithms for Control Systems Models. IEEE Trans. Power Delivery,3(3):1189-, July 1988.[10] J.A. Lima. Numerical Instability due to EMTP-TACS Inter-relation. EMTPNewsletter, 5(1):21-33, 1985.83Bibliography^ 84[11] M. Ceraolo. A Case of Numerical Oscillations caused by the TACS-EMTP In-terface. EMTP Newsletter, 5(3):4-10, September 1992.[12] R.H. Lasseter. Tacs improvements - classification of problems - final report.Technical report, Department of Electrical and Computer Engineering - Univer-sity of Wisconsin, Madison, June 1987.[13] Robert A. Gabel and Richard A. Roberts. Signals and Linear Systems. JohnWileys & Sons, Inc., New York - USA, 1987.[14] J.R. Marti and J. Lin. Suppression of Numerical Oscillations in the EMTP.IEEE Trans. on Power Syst., 5(2):394 -402, May 1990.[15] N. Mohan. Computer Exercises for Power Electronics Education. Departmentof Electrical Engineering-University of Minnesota, Minneapolis, 1990.[16] N. Mohan, T.M. Undeland, and W.P. Robbins. Power Electronics - Converters,Applications and Design. John Wiley & Sons, New York - USA, 1989.[17] H.W. Dommel. Nonlinear and Time - Varying Elements in Digital Simulation ofElectromagnetic Transients. Trans. Power App. and Syst., PAS-90:2561-2567,November-December 1971.[18] MicroTran Power System Analysis Corporation, Vancouver-Canada. TransientsAnalysis Program Reference Manual, 1991.[19] X.J. Cheng and C. Hatziadoniu. A Gradient-Based Algorithm for the State Ini-tialization of Control Systems. IEEE Trans. on Power Syst., 6(4):1349-1355,November 1991.[20] Richard C. Dorf. Modern Control System. Addison-Wesley Publishing Company,Inc, New York - USA, 1989.[21] A.E.A. Araujo, H.W. Dommel, and J.R. Marti. Converter Simulations with theEMTP: Simultaneous Solution and Backtracking Technique. Paper APT 286-18 - Accepted for publication, Joint International Power Conference (IEEE -NTUA) - Athens Power Tech, September 5-8, 1993, Athens, Greece.[22] A.E.A. Araujo, H.W. Dommel, and J.R. Marti. Numerical Instabilities in PowerSystem Transients Simulations. In Proceedings of the IASTED Conference,Power Systems and Engineering, pages 176-180, 1992.Bibliography^ 85[23] Jean-Paul Trembley and Paul G. Sorenson. The theory and Practice of CompilerWriting. McGraw-Hill Book Company, New York \u2014 USA, 1985.[24] S. Bhattacharya. Personal communication to Dr. H. W. Dommel. 1991.Appendix AInterpreter Basic PrinciplesThis appendix is based on references [23] and [24]. Its objective is to broadly de-scribe the principles used to write the interpreter which reads, from the input file,FORTRAN-like mathematical expressions and calculates their values, given the valuesof their variables, at each time step.The project of the interpreter begins with the definitions about the syntax, theoperators, the functions, types of variables and function arguments it will accept.These definitions for the present interpreter are as follows:algebraic operators^: +, - , *, \/ , **relational operators^: .EQ . , . NE . , . LT . , . LE . , . GE . , . GT .logical operators^: .0R., .AND., .NOT., .EQV., .NEQV.FORTRAN functions^:SIN, COS, TAN, COTAN, SINH, COSH, TANH,ASIN, ACOS, ATAN, EXP, LOG, LOG10, SQRT, ABSvariables^: any 6 character alphanumeric namearguments : any variable or any numerical arguments,either integer or realparenthesis nesting^: acceptedIn addition, all the rules for constructing standard FORTRAN expressions apply.86A.1 Compilation of Arithmetic ExpressionsThe way an arithmetic expression is written in the input file is the normal way towrite them, for example: (a + b) (c d). This type of expression is called infixexpression. This format is easier to understand but it is not efficient to evaluate.A complex expression in the infix format normally requires parenthesization. Theexpression below is known as a fully parenthesized expression((w^(x \/ y))^(z x 5)).2^3^1^2The integers below the algebraic operators specify the parenthetical level of eachoperator. To evaluate this expression, the subexpression which contains the operatorwith the highest parenthetical level is calculated first. If two or more operatorshave the same parenthetical level, they are evaluated from left to right. The processcontinues with the subexpressions at the next highest levels until all the operationshave been performed.The repeated scanning of an infix expression can be avoided if it is first transformedto a parenthesis free format such as(operand) (operand)(operator)^(suffix)or(operator) (operand) (operand)^(prefix)instead of the infix form(operand) (operator) (operand)^(prefix).The prefix and suffix forms of the notation are also called prefix Polish and reversePolish, respectively.87The evaluation of a Polish expression is much easier than the related infix expres-sion. The infix expression(x x ((y + z) \u2014 5))has the following reverse polish equivalent formxyz + 5 \u2014 x.A reverse Polish expression can be evaluated by applying the following rules re-peatedly until all operators have been processed:1. Find the leftmost operator in the expression.2. Select the two operands immediately preceding the operator found in step 1.3. Perform the indicated operation.4. Replace the operator and its operands with the result.The previous reverse Polish expression is evaluated as follows (applying the fourrules above):a-------,First evaluation x yz + 5 \u2014 x ---3 (y + z).#\u201e....-.....,Second evaluation x a5 \u2014 x \u20144 (y + z) \u2014 5.'Ye....\u2014\"\u2014.,Final evaluation x\/9 x -- 7 = x x ((y + z) \u2014 5)).Comparing this evaluation process with the evaluation of the infix expressionshown previously, one can see how much easier it is to calculate Polish expressions.88Table A.1: Simple Precedence FunctionSymbol Precedencef\u2014 1x, \/ 2Variables andnonnegative integers 30A.2 From Infix to Polish NotationThe conversion of an infix expression without parenthesis to a reverse Polish expres-sion requires an operator precedence function and the use of a stack. As seen above,in both forms of the Polish format (suffix and prefix) the variables and constants ap-pear in the same order as in the infix format. The operators, however, are reorderedand this is the reason for the use of a stack. The output of the conversion is put inan output string.For the simple example discussed in this section, assume the existence of thefour arithmetic operators, variables and nonnegative integers. Table A.1 shows theprecedence function for this case. The special symbol # has the smallest precedencevalue in the table and is used to initialize the stack and to ensure that the stack isalways nonempty.The stack is initialized with the symbol #. The algorithm to be described is mainlybased on the comparison of the precedent function value of the current input and theprecedent function value of the top element of the stack. If the precedent value ofthe input symbol is greater than that of the symbol on top of the stack, then the89Table A.2: Transformation of a\u2014 b x c+ d\/5 into Reverse PolishCurrent input Contents of stack^Reverse Polishsymbol^(rightmost symbol is expressiontop of stack)^(output string)a^#aab^#\u2014b^ax #\u2014 x abc^#\u2014 x c^ab#+ abc x \u2014d^#+d abc x \u2014\/ #+\/^abc x \u2014d5^#+\/5 abc x \u2014dtt abc x \u2014d5 +current input symbol is pushed onto the stack and the next input symbol is scanned.If, however, the precedence value of the current input symbol is less than or equal tothat of the stack top symbol, this top element is written in the output string. Afterthis, the same current input symbol is compared to the new element on the stack.The process stops when all the input symbols have been analyzed. This algorithm isillustrated in Table A.2, for the infix expression a \u2014 b x c+ d\/5.To handle more complex parenthesized expressions two precedent functions areneeded: the input precedence function f and the stack precedence function g. Theright and left parenthesis perform the same function as the special symbol # in thesimple algorithm previously described. Table A.3 shows the two functions for theimplementation of this thesis.The complete algorithm to translate infix to reverse Polish is:90Table A.3: Input and Stack Precedence FunctionsSymbol^ Input precedence Stack precedencefunction, f^function, g( 21^\u20141variables and constants^19 20intrinsic function (COS, SIN, etc.) 17 18** (exponential) 16^15*, \/^ 13 14+, - 11 12.EQ.,.NE.,.GE.,.GT.,.LT.,.LE.^9 10.NOT.^ 7 8.AND. 5 6.OR. 3^4.EQV.,NEQV.^ 1 20 not inserted in stack)^ \u20141^not inserted in stack1. InitializeTOP 4- 1NEXT 4- STACK(TOP)OUTBUFFER 4- \"2. Scan the infix expressionRepeat through step 5 while there are unprocessedtokens (symbols)3. Get next input token and set right parenthesis flag91LAST 4- NEXTNEXT 4-- GET_NEXT_TOKEN (INFIX)RIGHTJ'AREN 4-- false4. Put in the stack if token higher precedence than NEXTRepeat while f (NEXT)< g(STACK (TOP) )TEMP- STACK (TOP)TOP 4- TOP - 1if f (NEXT) < g(TEMP) thenOUTBUFFER 4- OUTBUFFER\/\/TEMPend ifif TOP=0 thenwrite(Invalid expression')end if5. Push NEXT to STACK but not `)' or ' , '. The function of the delimiter 'Y isto separate arguments of an intrinsic function. Therefore this delimiter mustnot close the left parenthesis. Its action is similar to a right parenthesis and acomma should not be inserted in the stack at any time.if not RIGHT_PAREN and NEXT comma thenTOP 4- TOP + 1STACK (TOP) 4-- NEXTend if6. Finished? or error92if TOP=0 thenexit the programel sewrite('1nvalid expression)end ifThe FORTRAN code for the precedence function f and g is shown right below. Nextit is shown the FORTRAN code for subroutine POLISH, which transforms a infix to areverse Polish expression. The subroutine EVAL (also shown below) takes the output ofPOLISH (OUTPUT) and transforms it into a character vector that has, in each position,a different token of the reverse Polish expression.INTEGER FUNCTION PFUNC(X)CHARACTER*6 XC^This Integer Function gives the input precedence function fC^Logical operatorsIF(X .EQ. '.EQV. ' .OR. X .EQ. '.NEQV.') THENPFUNC = 1ELSE IF(X .EQ. '.OR.^') THENPFUNC = 3ELSE IF(X .EQ. '.AND. ') THENPFUNC = 5ELSE IF(X .EQ. '.NOT. ') THENPFUNC = 7C^Relational operatorsELSE IF(X .EQ. '.EQ.^' .OR. X .EQ. '.NE.^' .0R.1^X .EQ. '.LE.^' .OR. X .EQ. '.LT.^' .OR.2 X .EQ. '.GE.^' .OR. X .EQ. '.GT.^') THENPFUNC = 9C^Arithmetic operatorsELSE IF(X .EQ. '+^' .OR. X .EQ.^') THENPFUNC = 11ELSE IF(X .EQ. '*^' .OR. X .EQ. '\/^') THEN93PFUNC = 13C^ExponentialELSE IF(X .EQ.^'**PFUNC = 16C^Intrinsic functions') THENELSE IF(X .EQ. 'COS ' .OR. X .EQ. 'ACOS^' .OR.1^X .EQ. 'SIN ' .OR. X .EQ. 'ASIN^' .OR.2 X .EQ. 'TAN ' .OR. X .EQ. 'ATAN^' .0R.3^X .EQ. 'ATAN2 ' .OR. X .EQ. 'TANH^' .OR.4 X .EQ. 'COSH ' .OR. X .EQ. 'SINH^') THENPFUNC = 17ELSE IF(X .EQ. 'DIM ' .OR. X .EQ. 'AMOD^' .OR.1^X .EQ. 'SIGN ' .OR. X .EQ. 'ALOG^' .OR.2 X .EQ. 'SQRT ' .OR. X .EQ. 'ALOG10' .OR.3^X .EQ. 'EXP ' .OR. X .EQ. 'ABS^' ) THENPFUNC = 17C^ParenthesisELSE IF(X .EQ. '(^') THENPFUNC = 21ELSE IF(X .EQ. ')^') THENPFUNC = -1C^DelimiterELSE IF(X .EQ.^') THENPFUNC = 0C^Variables and ConstantsELSEPFUNC = 19ENDIFRETURNENDINTEGER FUNCTION GFUNC(X)CHARACTER*6 XC^This Integer Function gives the stack precedence function gC^Logical operatorsIF(X .EQ. '.EQV.' .OR. X .EQ. '.NEQV.') THENGFUNC = 2ELSE IF(X .EQ. '.OR.') THENGFUNC = 494ELSE IF(X .EQ. '.AND.') THENGFUNC = 6ELSE IF(X .EQ. '.NOT.') THENGFUNC = 8C^Relational operatorsC^ELSE IF(X^.EQ.^'.EQ.'^1^X^.EQ.^'.LE.'2 X^.EQ.^'.GE.'GFUNC = 10Arithmetic operatorsELSE IF(X^.EQ.^'+GFUNC = 12ELSE IF(X^.EQ.^'*GFUNC = 14.OR.^X^.EQ.^'.NE.'.OR.^X^.EQ.^'.LT.'.OR.^X^.EQ.^'.GT.')'^.OR.^X^.EQ.'^.OR.^X^.EQ.^'\/.OR..OR.THEN') THEN') THENC ExponentialELSE IF(X .EQ. '** ') THENGFUNC = 15C Intrinsic functionsELSE IF(X^.EQ. 'COS ' .OR. X .EQ. 'ACOS ' .OR.1^X^.EQ. 'SIN ' .OR. X .EQ. 'ASIN ' .OR.2 X^.EQ. 'TAN ' .OR. X .EQ. 'ATAN ' .OR.3^X^.EQ. 'ATAN2 ' .OR. X .EQ. 'TANH ' .OR.4 X^.EQ. 'COSH ' .OR. X .EQ. 'SINH ') THENGFUNC = 18ELSE IF(X .EQ. 'DIM ' .OR. X .EQ. 'AMOD ' .OR.1^X^.EQ. 'SIGN ' .OR. X .EQ. 'ALOG ' .OR.2 X^.EQ. 'SQRT ' .OR. X .EQ. 'ALOG10' .OR.3^X^.EQ. 'EXP ' .OR. X .EQ. 'ABS^' ) THENGFUNC = 18C^ParenthesisELSE IF(X .EQ. '(^') THENGFUNC = -1ELSE IF(X .EQ. ')^') THENGFUNC = -1C^DelimiterELSE IF(X .EQ.^') THENGFUNC = 0C^Variables and ConstantsELSE95GFUNC = 20ENDIFRETURNENDSUBROUTINE POLISH(INPUT,OUTPUT)C^Transforms a expression from the infix to reverse Polish form. InC^the transformation, it uses two functions: input precedenceC^function PFUNC; and stack precedence function GFUNC.C^INPUT has its tokens separated by colons (delimiter). For example,C^COS;(;VAR1;+;VAR2;) for the infix expression COS(VAR1+VAR2)C^OUTPUT also has its tokens separated by colons. For example, forC^the same infix expression, OUTPUT would be VAR1;VAR2;+;COS.CHARACTER*6 COMMACHARACTER*400 INPUT, OUTPUT, OUTBUFINTEGER^TOP, PFUNC, GFUNC, IBUF, POINTRINTEGER SIX, BUFSIZ, MAXSTKLOGICAL^RPARENPARAMETER^(SIX = 6, BUFSIZ = 400)PARAMETER^(MAXSTK = 100, COMMA =CHARACTER*6 STKTOP, STACK(MAXSTK), NEXT, BLANK6EXTERNAL^PFUNC, GFUNCDATA^BLANK6\/'C^^Initialize variablesDO 10 I = 1, BUFSIZOUTBUF(I:I) = BLANK6(1:1)10^CONTINUEDO 15 I = 1, MAXSTKSTACK(I)^= BLANK615^CONTINUEIBUF = 1TOP = 1POINTR = 1STACK(TOP) = '(C^Get next token100 CONTINUEC^Get the next token from the input string and put in theC^variable NEXT. If no more token is available ISTAT is setC^to ZERO otherwise ISTAT is one.96NEXT = BLANK6J = 0ISTAT = 1DO 50 I = POINTR, BUFSIZIF(INPUT(I:I) .EQ.^GOTO 60IF(INPUT(I:I) .NE. BLANK6(1:1)) THENJ = J + 1IF(J .GT. SIX) THENWRITE(*,*) 'TOKEN IS GREATER THAN 6 CHARACTERS'STOP 'INTERNAL ERROR'ENDIFNEXT(J:J) = INPUT(I:I)ENDIF50^CONTINUEC^Check for J ?IF(J .GT. 0) THENWRITE(*,*) 'LAST TOKEN DOES NOT HAVE A ENDING DELIMITER'STOP 'ERROR'ENDIFISTAT = 060^CONTINUEC^Reset the pointerPOINTR = I + 1IF(ISTAT .EQ. 0) THENNEXT = ')ENDIFC^Set right parenthesis flagRPAREN = .FALSE.C^StartSTKTOP = STACK(TOP)70^IF(PFUNC(NEXT) .LE. GFUNC(STKTOP)) THENTOP = TOP - 1IF(PFUNC(NEXT) .LT. GFUNC(STKTOP)) THENCALL TOBUFF(IBUF,OUTBUF,STKTOP)ELSERPAREN = .TRUE.GOTO 150ENDIFIF(TOP .EQ. 0) THEN97WRITE(*,*) 'INVALID EXPRESSION'STOP 'ERROR'ENDIFSTKTOP = STACK(TOP)GOTO 70ENDIF150 CONTINUEC^Push NEXT to STACK but not \")\" or \",\"C^The function of the delimiter \",\" is to separate arguments of anC^intrinsic function. Therefore, this delimiter must not close theC^left parenthesis. Its action is similar to a right parenthesisC^and a comma should not be inserted in the stack at any time.IF((.NOT. RPAREN) .AND. NEXT.NE . COMMA) THENTOP = TOP + 1IF(TOP .GT. MAXSTK) THENWRITE(*,*) 'STACK OVERFLOW'STOP 'ERROR'ENDIFSTACK(TOP) = NEXTENDIFC^Continue till ISTAT = 0IF(ISTAT .NE. 0) THENGOTO 100ENDIFC^Finished?IF(TOP .EQ. 0) THENOUTPUT = OUTBUFRETURNELSEWRITE(*,*) 'INVALID EXPRESSION'STOP 'ERROR'ENDIFENDSUBROUTINE TOBUFF(IBUF,BUFF,TOKEN)C^Routine TOBUFF writes the token to the output buffer OUTBUF.C^It also trims each token and inserts a token delimiter ';'C^after each token.PARAMETER^(SIX = 6, BUFSIZ = 400)98CHARACTER*400 BUFFCHARACTER*6^TOKEN, TRIMTKC^Trims the incoming tokenJ = 0DO 10 I = 1, SIXIF(TOKEN(I:I) .NE. \") THENJ = J + 1TRIMTK(J:J) = TOKEN(I:I)ENDIF10^CONTINUEIF(IBUF .LE. BUFSIZ) THENIF(J .GT. 0) THENBUFF(IBUF:80) = TRIMTK(1:J) \/\/ ';'IBUF = IBUF + J + 1ENDIFENDIFRETURNENDSUBROUTINE EVAL(OUTPUT,N,ISTACK)C^Creates a stack ISTACK (a vector) that contains, in each position,C^one token of OUTPUT. ISTACK has a proper form to be evaluated byC^subroutine CALCU.IMPLICIT^REAL*8 (A-H 2 O-Z), INTEGER*4 (I-N)PARAMETER^(NSTKSIZ=400,NVAR=30)CHARACTER*400 OUTPUTCHARACTER*6 ISTACK(NVAR)N = 0K = 0DO 10 I = 1, NVARISTACK(I) = '10^CONTINUEDO 50 I = 1, NVARJ = 0100^CONTINUEK = K + 1IF(K .LE. 400) THENIF(OUTPUT(K:K) .EQ. ';') GOTO 50IF(OUTPUT(K:K) .NE. \") THEN99J = J + 1IF(J .LE. 6) THENISTACK(I)(J:J) = OUTPUT(K:K)ELSEGOTO 50ENDIFENDIFGOTO 100ENDIFGOTO 20050^CONTINUE200 CONTINUEDO 400 I = 1, NVARIF(ISTACK(I) .NE.^') N = N + 1400 CONTINUERETURNENDA.3 Evaluation of a Reverse Polish expressionTo evaluate the reverse Polish expression the following algorithm is used:1. InitializeTOP 4- 0VALUE 4- 02. Scan the reverse Polish expressionRepeat through step 5 while there are unprocessedtokens (symbols)3. Get next input token1 00NEXT <\u2014 GET_NEXT_TOKEN (REVERSE)4. Check if it is an operand (control system variable or real number)if NEXT = operand thenTOP 4-- TOP + 1STACK (TOP) = Value_of_(NEXT)GOTO step 3end if5. Find what type of operator? Apply proper operations6. Finished? or errorif TOP=1 thenVALUE = STACK (TOP)exit the programelsewrite(Invalid expression')end ifThe general algorithm to read the infix expression from the control system inputfile and transforms it into a reverse Polish expression to be calculated at each timestep is described below.1. Outside the time loop.(a) Read infix expression and take all the blank characters out of it.101(b) Separate the tokens by colons (delimiters).(c) Call subroutine POLISH(d) Call subroutine EVAL2. Inside the time loop \u2014 Call, at each time step, the subroutine CALCU (FORTRANcode shown below) to evaluate the expression (following the algorithm above).CALCU has the ability to recognize control system variable from real numbersthat could appear in the FORTRAN expressions.C^InterpreterSUBROUTINE CALCU(ISTACK,N,VALUE,II)IMPLICIT^REAL*8 (A-H 2 O-Z), INTEGER*4 (I-N)PARAMETER^(NSTKSIZ=400,NVAR=30,NFOR=18)CHARACTER*6 ISTACK(NSTKSIZ),IVARCHARACTER*6 CHECK1, CHECK2DIMENSION^STACK(NSTKSIZ)EXTERNAL^RGHTJST,CONVERTIONINCLUDE VAR1C^InitializeITOP = 0C^Start traversing the input stack (N tokens)DO 10 I = 1, NC^Check for a operatorIF(ISTACK(I) .EQ. '+^') THENIF(ITOP .LT. 2) THENWRITE(*,*) 'ERROR IN + OPERATION'WRITE(*,20) IISTOP 'ERROR'ELSEVALUE = STACK(ITOP) + STACK(ITOP-1)102ITOP = ITOP - 1STACK(ITOP) = VALUEENDIFELSE IF(ISTACK(I) .EQ. '-^') THENIF(ITOP .GT. 1) THENVALUE = STACK(ITOP-1) - STACK(ITOP)ITOP = ITOP - 1STACK(ITOP) = VALUEELSE IF (ITOP .EQ. 1) THENSTACK(ITOP) = -STACK(ITOP)ELSEWRITE(*,*) 'ERROR IN - OPERATION'WRITE(*,20) IISTOP 'ERROR'ENDIFELSE IF(ISTACK(I) .EQ. '*^') THENIF(ITOP .GT. 1) THENVALUE = STACK(ITOP-1) * STACK(ITOP)ITOP = ITOP - 1STACK(ITOP) = VALUEELSEWRITE(*,*) 'ERROR IN * OPERATION'WRITE(*,20) IISTOP 'ERROR'ENDIFELSE IF(ISTACK(I) .EQ. '\/^') THENIF(ITOP .GT. 1) THENIF(STACK(ITOP) .EQ. O.DO) THENWRITE(*,*) 'DIVISION BY ZERO;'WRITE(*,20) IICALL ERROR('Error')STOPENDIFVALUE = STACK(ITOP-1) \/ STACK(ITOP)ITOP = ITOP - 1STACK(ITOP) = VALUEELSEWRITE(*,*) 'ERROR IN \/ OPERATION'WRITE(*,20) II103STOP 'ERROR'ENDIFELSE IF(ISTACK(I) . EQ. '**^') THENIF(ITOP .GT. 1) THENIF(STACK(ITOP-1) .LT. 0.D0) THENWRITE(*,*) 'EXPONENTIATION OF NEGATIVE NUMBER'WRITE(*,20) IICALL ERROR('Error')STOPENDIFVALUE = STACK(ITOP-1) ** STACK(ITOP)ITOP = ITOP - 1STACK(ITOP) = VALUEELSEWRITE(*,*) 'ERROR IN ** OPERATION'WRITE(*,20) IISTOP 'ERROR'ENDIFELSE IF(ISTACK(I) .EQ. 'COS^') THENIF(ITOP .GE. 1) THENSTACK(ITOP) = DCOS(STACK(ITOP))ELSEWRITE(*,*) 'ERROR IN COSINE OPERATION'WRITE(*,20) IISTOP 'ERROR'ENDIFELSE IF(ISTACK(I) .EQ. 'SIN^') THENIF(ITOP .GE. 1) THENSTACK(ITOP) = DSIN(STACK(ITOP))ELSEWRITE(*,*) 'ERROR IN SINE OPERATION'WRITE(*,20) IISTOP 'ERROR'ENDIFELSE IF(ISTACK(I) .EQ. 'TAN^') THENIF(ITOP .GE. 1) THENSTACK(ITOP) = DTAN(STACK(ITOP))ELSEWRITE(*,*) 'ERROR IN TAN OPERATION'104WRITE(*,20) IISTOP 'ERROR'ENDIFELSE IF(ISTACK(I) .EQ. 'COSH ') THENIF(ITOP .GE. 1) THENSTACK(ITOP) = DCOSH(STACK(ITOP))ELSEWRITE(*,*) 'ERROR IN COSH OPERATION'WRITE(*,20) IISTOP 'ERROR'ENDIFELSE IF(ISTACK(I) .EQ. 'SQRT ') THENIF(ITOP .GE. 1) THENIF(STACK(ITOP) .LT. O.DO) THENWRITE(*,*) 'SQUARE ROOT OF NEGATIVE NUMBER'WRITE(*,20) IICALL ERROR('Error')STOPENDIFSTACK(ITOP) = DSQRT(STACK(ITOP))ELSEWRITE(*,*) 'ERROR IN SQRT OPERATION'WRITE(*,20) IISTOP 'ERROR'ENDIFELSE IF(ISTACK(I) .EQ. 'EXP^') THENIF(ITOP .GE. 1) THENSTACK(ITOP) = DEXP(STACK(ITOP))ELSEWRITE(*,*) 'ERROR IN EXP OPERATION'WRITE(*,20) IISTOP 'ERROR'ENDIFELSE IF(ISTACK(I) .EQ. 'ACOS ') THENIF(ITOP .GE. 1) THENIF(STACK(ITOP).LT.-1.DO.OR.STACK(ITOP).GT.1.D0) THENWRITE(*,*) 'ACOS ARGUMENT EITHER >1 OR <-1;'WRITE(*,20) IICALL ERROR('Error')105STOPENDIFSTACK(ITOP) = DACOS(STACK(ITOP))ELSEWRITE(*,*) 'ERROR IN ACOS OPERATION'WRITE(*,20) IISTOP 'ERROR'ENDIFELSE IF(ISTACK(I) .EQ. 'ASIN ') THENIF(ITOP .GE. 1) THENIF(STACK(ITOP) .LT. O.DO) THENWRITE(*,*) 'ASIN ARGUMENT EITHER >1 OR <1;'WRITE(*,20) IICALL ERROR('Error')STOPENDIFSTACK(ITOP) = DASIN(STACK(ITOP))ELSEWRITE(*,*) 'ERROR IN ASIN OPERATION'WRITE(*,20) IISTOP 'ERROR'ENDIFELSE IF(ISTACK(I) .EQ. 'ATAN ') THENIF(ITOP .GE. 1) THENSTACK(ITOP) = DATAN(STACK(ITOP))ELSEWRITE(*,*) 'ERROR IN ATAN OPERATION'WRITE(*,20) IISTOP 'ERROR'ENDIFELSE IF(ISTACK(I) .EQ. 'TANH ') THENIF(ITOP .GE. 1) THENSTACK(ITOP) = DTANH(STACK(ITOP))ELSEWRITE(*,*) 'ERROR IN TANH OPERATION'WRITE(*,20) IISTOP 'ERROR'ENDIFELSE IF(ISTACK(I) .EQ. 'SINH ') THEN106IF(ITOP .GE. 1) THENSTACK(ITOP) = DSINH(STACK(ITOP))ELSEWRITE(*,*) 'ERROR IN SINH OPERATION'WRITE(*,20) IISTOP 'ERROR'ENDIFELSE IF(ISTACK(I) .EQ. 'ALOG ') THENIF(ITOP .GE. 1) THENSTACK(ITOP) = DLOG(STACK(ITOP))ELSEWRITE(*,*) 'ERROR IN ALOG OPERATION'WRITE(*,20) IISTOP 'ERROR'ENDIFELSE IF(ISTACK(I) .EQ. 'ALOG10') THENIF(ITOP .GE. 1) THENSTACK(ITOP) = DLOG10(STACK(ITOP))ELSEWRITE(*,*) 'ERROR IN ALOG10 OPERATION'WRITE(*,20) IISTOP 'ERROR'ENDIFELSE IF(ISTACK(I) .EQ. 'ABS^') THENIF(ITOP .GE. 1) THENSTACK(ITOP) = DABS(STACK(ITOP))ELSEWRITE(*,*) 'ERROR IN ABS OPERATION'WRITE(*,20) IISTOP 'ERROR'ENDIFELSE IF(ISTACK(I) .EQ. '.EQV. ') THENIF(ITOP .GT. 1) THENK = 1A = STACK(ITOP-1)B = STACK(ITOP)CALL CONVERTION(A,B,VALUE,K)ITOP = ITOP - 1STACK(ITOP) = VALUE107ELSEWRITE(*,*) 'ERROR IN .EQV. OPERATION'WRITE(*,20) IISTOP 'ERROR'ENDIFELSE IF(ISTACK(I) .EQ. '.NEQV.') THENIF(ITOP .GT. 1) THENK = 2A = STACK(ITOP-1)B = STACK(ITOP)CALL CONVERTION(A,B,VALUE,K)ITOP = ITOP - 1STACK(ITOP) = VALUEELSEWRITE(*,*) 'ERROR IN .NEQV. OPERATION'WRITE(*,20) IISTOP 'ERROR'ENDIFELSE IF(ISTACK(I) .EQ. '.OR. ') THENIF(ITOP .GT. 1) THENK = 3A = STACK(ITOP-1)B = STACK(ITOP)CALL CONVERTION(A,B,VALUE,K)ITOP = ITOP - 1STACK(ITOP) = VALUEELSEWRITE(*,*) 'ERROR IN .OR. OPERATION'WRITE(*,20) IISTOP 'ERROR'ENDIFELSE IF(ISTACK(I) .EQ. '.AND. ') THENIF(ITOP .GT. 1) THENK = 4A = STACK(ITOP-1)B = STACK(ITOP)CALL CONVERTION(A,B,VALUE,K)ITOP = ITOP - 1STACK(ITOP) = VALUE108ELSEWRITE(*,*) 'ERROR IN .AND. OPERATION'WRITE(*,20) IISTOP 'ERROR'ENDIFELSE IF(ISTACK(I) .EQ. '.NOT. ') THENIF(ITOP .GE. 1) THENK = 5A = STACK(ITOP)CALL CONVERTION1(A,VALUE)STACK(ITOP) = VALUEELSEWRITE(*,*) 'ERROR IN .NOT. OPERATION'WRITE(*,20) IISTOP 'ERROR'ENDIFELSE IF(ISTACK(I) .EQ. '.EQ. ') THENIF(ITOP .GT. 1) THENK = 6A = STACK(ITOP-1)B = STACK(ITOP)CALL CONVERTION(A,B,VALUE,K)ITOP = ITOP - 1STACK(ITOP) = VALUEELSEWRITE(*,*) 'ERROR IN .EQ. OPERATION'WRITE(*,20) IISTOP 'ERROR'ENDIFELSE IF(ISTACK(I) .EQ. '.NE. ') THENIF(ITOP .GT. 1) THENK = 7A = STACK(ITOP-1)B = STACK(ITOP)CALL CONVERTION(A,B,VALUE,K)ITOP = ITOP - 1STACK(ITOP) = VALUEELSEWRITE(*,*) 'ERROR IN .NE. OPERATION'109WRITE(*,20) IISTOP 'ERROR'ENDIFELSE IF(ISTACK(I) .EQ. '.LE. ') THENIF(ITOP .GT. 1) THENK = 8A = STACK(ITOP-1)B = STACK(ITOP)CALL CONVERTION(A,B,VALUE,K)ITOP = ITOP - 1STACK(ITOP) = VALUEELSEWRITE(*,*) 'ERROR IN .LE. OPERATION'WRITE(*,20) IISTOP 'ERROR'ENDIFELSE IF(ISTACK(I) .EQ. '.LT. ') THENIF(ITOP .GT. 1) THENK = 9A = STACK(ITOP-1)B = STACK(ITOP)CALL CONVERTION(A,B,VALUE,K)ITOP = ITOP - 1STACK(ITOP) = VALUEELSEWRITE(*,*) 'ERROR IN .LT. OPERATION'WRITE(*,20) IISTOP 'ERROR'ENDIFELSE IF(ISTACK(I) .EQ. '.GE. ') THENIF(ITOP .GT. 1) THENK = 10A = STACK(ITOP-1)B = STACK(ITOP)CALL CONVERTION(A,B,VALUE,K)ITOP = ITOP - 1STACK(ITOP) = VALUEELSEWRITE(*,*) 'ERROR IN .GE. OPERATION'110WRITE(*,20) IISTOP 'ERROR'ENDIFELSE IF(ISTACK(I) .EQ. '.GT. ') THENIF(ITOP .GT. 1) THENK = 11A = STACK(ITOP-1)B = STACK(ITOP)CALL CONVERTION(A,B,VALUE,K)ITOP = ITOP - 1STACK(ITOP) = VALUEELSEWRITE(*,*) 'ERROR IN .GT. OPERATION'WRITE(*,20) IISTOP 'ERROR'ENDIFELSEC^It must be an operand, therefore place the operand on theC^top of the stackITOP = ITOP + 1READ(ISTACK(I),*,IOSTAT=NERROR) STACK(ITOP)IF(NERROR .GT. 0) THENREAD(ISTACK(I),'(1A6)') CHECK1CALL RGHTJST(CHECK1)C^Check if the operand is a control system variable or a real number.C^If it is a variable, its value is in T_IVAR.DO 9 KK = 1, LL(II)CHECK2 = IVAR(II,KK)IF(CHECK1 .EQ. CHECK2) STACK(ITOP) = T_IVAR(II,KK)9^CONTINUEENDIFENDIF10^CONTINUEC^Check if ITOP = 1IF( ITOP .EQ. 1) THEN111VALUE = STACK(1)ELSEWRITE(*,30) ITOPWRITE(*,20) IIWRITE(*,40) NENDIF20 FORMAT(' FORTRAN EXPRESSION it',I3)30 FORMAT(' ERROR IN THE END OF STACK - ITOP =',I3)40 FORMAT(' NTOKENS = ',I3)RETURNENDAppendix BSS and EMTP Input FilesB.1 Control System Case Studies \u2014 SS Input FilesOnlyB.1.1 Second-Order linear system (Section 5.2.1)C Second-order linear system -- step unit responseCC^s-block^1\/s1 VAR2 + VAR1 - LOOP2^ 1.D01.D01.D0CC^s-block -- 1\/s1^OUT - LOOP1 + VAR2^ 1.D01.D01.D0CC^k-block -- *160 VAR1 +SOURCE^ 16.D0CC^k-block^auxiliar block0 LOOP1 + OUT 1.D0CC^k-block -- *160 LOOP2 + OUT^ 16.D0CC^source block -- unit step function21SOURCE^1.D0^ O.DOCC^fortran expression block113CC^output variables33 OUT VAR1CC^connection variablesCC^initial conditions77 VAR2^O.DO77 OUT O.DOCC^end of fileB.1.2 Static and Dynamic Limiters (Section 5.2.2)C^Static limiterCC^k-block^auxiliar blockINP + SRC23 + AUXCC^k-block^auxiliar blockAUX + SRC21CC^s-block^(10**3)\/s1 VAR1 + INP1.D01.D0CC^k-block -- limiter blockOUT + VAR1^ 1.D0 -2.D0 2.D0CC^source blocks -- input square wave21 SRC21^-1.D0^ O.DO23 SRC23 2.D0^20.D-3^10.D-3^ O.DOCC^fortran expression blockC114C^output variables33 INP OUTCC^connection variablesCC^initial conditions77 OUT^-4S.D-1CC^end of file -- static limiterC^Dynamic limiterCC^k-block^auxiliar blockINP + SRC23 + AUX^ 1.D0CC^k-block^auxiliar blockAUX + SRC21 1.D0CC^s-block^(10**3)\/s with limits (-.6,1.5)1 OUT + INP1.D01.D0C1.D3-5.D-1 1.5D0C^source blocks -- input square wave21 SRC21^-1.D0^ O.DO23 SRC23 2.D0^20.D-3^10.D-3^ 0.D0CC^fortran expression blockCC^output variables33 INP OUTCC^connection variables115CC^initial conditions77^OUT^-6.D-1CC^end of fileB.1.3 FORTRAN Function in a Closed Loop (Section 5.2.3)C FORTRAN function in a closed loop -- Work Book IVCC^s-block1 VAR1 -FDBACK +SOURCE^ 1.D06.D0^1.D01.D0CC^k-block0 VAR2 + VAR1CC^k-block0 OUT + VAR2CC^k-blockOFDBACK + OUTC1.D01.D0-2.D-3 2.D-325.D-2C^source block22SOURCE^1.D0^-60.D0^90.0CC^Fortran expression blockCC^output variables33 OUT VAR2FDBACKCC^connection variablesC116C^initial conditionsCC^end of fileB.1.4 Special Element Blocks (Section 5.2.4)C RMS, NONLINEAR FUNCTION, TIME DELAY AND FORTRAN EXPRESSION BLOCKSC&CASE37.OUT^(Output file name)&CASE37.AUX (Auxiliar file name - shows how SS reads the input file)&YN^(Apply fast Newton Method)(Save number of iterations)C^k-block0 VAR1 + SCR^ 1.D0CCC^Time delay block66 VAR5 VAR4^2.D-3CC^source block22^SCR^1.D0^60.D0CC^Fortran expression block99 VAR4 =VAR2*1.D0CC^point-to-point nonlinear function --> y = x**288 VAR2^VAR1CC^x^ yC-2.D0 4.D0^-1.05D0^1.1025D0-1.D0 1.D0-9.5D-01^9.03D-01-9.0D-01 8.10D-01-8.5D-01^7.22D-01-8.0D-01 6.40D-01-7.5D-01^5.62D-01117-7.0D-01 4.90D-01-6.5D-01 4.22D-01-6.0D-01 3.60D-01-5.5D-01 3.02D-01-5.0D-01 2.50D-01-4.5D-01 2.02D-01-4.0D-01 1.60D-01-3.5D-01 1.22D-01-3.0D-01 9.00D-02-2.5D-01 6.25D-02-2.0D-01 4.00D-02-1.5D-01 2.25D-02-1.0D-01 1.00D-02-5.0D-02 2.50D-030.D0 0.D06.00D-02 2.50D-031.00D-01 1.00D-021.50D-01 2.25D-022.00D-01 4.00D-022.50D-01 6.25D-023.00D-01 9.00D-023.60D-01 1.22D-014.00D-01 1.60D-014.50D-01 2.02D-015.00D-01 2.50D-015.60D-01 3.02D-016.00D-01 3.60D-016.50D-01 4.23D-017.00D-01 4.90D-017.50D-01 5.63D-018.00D-01 6.40D-018.50D-01 7.23D-019.00D-01 8.10D-019.50D-01 9.03D-011.D0 1.D01.05D0 1.1025D01.1D0 1.21D02.D0 4.D099999.D0CC^RMS block60 VAR6 VAR5^60.D0C118C^output variables33 VAR1 VAR4 VAR5 VAR6CC^initial conditions77 VAR2^ 1.D077 VAR4 1.D0CC^end of fileB.2 Control and Power System Case StudiesSS and EMTP Input FilesB.2.1 Arc Modelling (Section 5.3.1)EMTP Input File&LIMA.INP^ SS input file^  Case identification cardResistor as a voltage contolled current source^-1* Time card.0001^.2^  Lumped RLC branch1^2^ 300.2 100.92^2 112.^0.9999999.$>>>>>>>End of level 1: Linear and nonlinear elements<<<<<<<<<$>>>>>>>End of level 2: Switches and piecewise linear elements*^  Voltage or current sources11^1 1^1$>>>>>>>End of level 3: Sources<<\u00ab\u00ab<<<\u00ab\u00ab<<<<<\u00ab\u00ab\u00ab\u00ab<<<<<1^**** All voltages will be printed ****$>>>>>>>Level 5: End of data case<<<<<<<<<<<<<<<<<<<<<<<119SS Input FileC^Arc modellingC&LIMA.OUT^ Input file name&LIMA.AUX Auxiliar file name&YN^(Apply fast Newton Method?),(Save number of iterations?)CC^k-block0 ITACS + VEMTP^ 1.D-1CC^output variables33 ITACSCC^connection variables -- variables shared by SS and EMTP44 ITACS VEMTP^0.D0CC^initial conditions77 ITACS^ 0.D0CC^end of fileB.2.2 Single-Phase Variable Load (Section 5.3.2)EMTP Input FileC^Single phase variable loadCC&CASE17.0UT&CASE17.AUX&YNCCC^s-block1 ITACS +^INT^ 1.D01131.^1.D01.D0CC s -block1201^PB + PINST^ 1.D01.D0120.D0CC^k-block0 AUX1 + SRC21CC^k-block0 AUX2 + VEMTPCC^k-block0 AUX5 + SCR23CC^k-block0 PAVER +^PB - PDELCC^time-delay block66 PDEL^PB^8.33D-3C377.D01.D01.D01.D0C^source block21 SRC21^1.D023 SCR23^3393.D0^1.D-1^5.D-2^ 5.D-2CC^Fortran expression block99 INT = AUX2*(AUX1+AUX5)99 PINST = AUX2*ITACSCC^output variables33 ITACS PAVERCC^connection variables44 ITACS VEMTP^31623D-4CC^initial conditions77^INT^0.D077 PINST 0.D077^PB O.DOC121C^end of fileSS Input File&CASE17.INP^  Case identification cardResistor as a voltage contolled current source^  Time card0.00005^0.2^ 1*^  Lumped RLC branch1^2^1.D-1992^22.^O.9999999.$>>>>>\u00bbEnd of level 1: Linear and nonlinear elements<<<<<<<<<$>>>>>>>End of level 2: Switches and piecewise linear elements^  Voltage or current sources14^1 1^3.1623^60.$>>>>>>>End of level 3: Sources \u00ab\u00ab\u00ab\u00ab\u00ab\u00ab\u00ab\u00ab\u00ab\u00ab\u00ab\u00ab\u00ab\u00ab\u00ab<1^**** All voltages will be printed ****$>>>>>>>Level 5: End of data case<<<<<\u00ab\u00ab\u00ab\u00ab\u00ab\u00ab\u00ab\u00ab\u00abB.2.3 Step Load Variation (Section 5.3.3)EMTP Input File&CASE22.INPC^. .^. Case identification cardTHREE-PHASE VARIABLE LOAD-STEP VARIATIONC LOAD REPRESENTED INSIDE SS (NODE BUS13A)CC^ . Time card50.E-6^.2^1CC^. .^. Symmetric pi circuit1 THEVA BUS7A^83.E-3^35.2 THEVB BUS7B 23.E-3^-5.^83.E-3^35.3 THEVC BUS7C^23.E-3^-5.^23.E-3^-5.CC^. . Lumped RLC branch83.E-3^35.122BUS1ABUS1BBUS1CBUS12ABUS13ABUS12BBUS13BBUS12CBUS13C92 IL13A2.^0.9999999.92 IL13B^IL13A92 IL13C IL13ACC^.4.0114.0114.01170.1670.1670.16.^. Constant-parameters line-1 BUS7A BUS1A .03167 3.222.00787 144.4-2 BUS7B BUS1B .0243 .9238^.0126 144.4-3 BUS7C BUS1C-1 BUS1ABUS12A .03167 3.222.00787 24.14-2 BUS1BBUS12B .0243 .9238^.0126 24.14-3 BUS1CBUS12C$ = = End of level 1: Linear and nonlinear elements ^BUS13A IL13A^0.^99999.BUS13B IL13B 0.^99999.BUS13C IL13C^0.^99999.$ = = = End of level 2: Switches and piecewise linear elementsCC^. .^. Voltage or current sources14 THEVA 1 187.79 60. -1.14 THEVB 1 187.79 60. -120. - 1 .14 THEVC 1 187.79 60. 120. -1.$ = = = End of level 3: SourcesCC^ . Voltage-output nodesBUS1A$ = = = End of level 4: User-defined voltage output$ = = = Level 5: End of data case ^SS Input FileC^CASE22.INPCC^Phase ACC^s-block^1ITACSA + INT_A^ 1.D011468.D-1^1.D01231.D0CC^k-blockO AUX2A +VEMTPA^ 1.D0CC^Phase BCC^s-block^1ITACSB + INT_B^ 1.D011468.D-1^1.D01.D0CC^k-blockO AUX2B +VEMTPB^ 1.D0CC^Phase CCC^s-block1ITACSC + INT_C^ 1.D011468.D-1^1.D01.D0CC^k-blockO AUX2C +VEMTPC^ 1.D0CC Auxiliar BlocksCC^k-blockO CONS1 +SRC211^ 1.D0CC^k-blockO CONS2 +SRC212^ 1.D0CC^k-blockO CONS3 +SRC213^ 1.D0CC^k-blockO CONS4 +SRC214^ 1.D0CC^k-blockO AUX2 + CONS1 + CONS2 + CONS3 + CONS4^ 1.D0CC^source block12421SRC211^1795.D-421SRC212 23715.D-421SRC213 28650.D-421SRC214 12293.D-4CC^fortran expression block99 INT_A =AUX2A*AUX299 INT_B =AUX2B*AUX299 INT_C =AUX2C*AUX2CC^output variables33 CONS4CC^connection variables44ITACSAVEMTPA^0.D044ITACSBVEMTPB O.DO44ITACSCVEMTPC^0.D0CC^initial conditions77 INT_A^ O.DO77 INT_B O.DO77 INT_C O.DOCC^end of fileB.2.4 Pulse Load Variation (Section 5.3.3)EMTP Input FilekCASE23.INPC^. .^. Case identification cardTHREE-PHASE VARIABLE LOAD-PULSATING LOAD VARIATIONC LOAD REPRESENTED INSIDE SS (NODE BUS13A)CC^. . Time card50.E-'6^.2^1CC^. . Symmetric pi circuit1 THEVA BUSTA^0.083334.5635.D-21.D-115.D-211252 THEVB BUS7B^0.0233-5.427^0.083334.5633 THEVC BUS7C 0.0233-5.427^0.0233-5.427^0.083334.563CC^. . Lumped RLC branch^BUS1A^ 4.011BUS1B 4.011BUS1C 4.011BUS12ABUS13A^ 70.16BUS12BBUS13B 70.16BUS12CBUS13C 70.1692 IL13A2.^0.9999999.92 IL13B^IL13A92 IL13C IL13ACC^. .^. Constant-parameters line-1 BUS7A BUS1A .03167 3.222.00787 144.4-2 BUS7B BUS1B .0243 .9238^.0126 144.4-3 BUS7C BUS1C-1 BUS1ABUS12A .03167 3.222.00787 24.14-2 BUS1BBUS12B .0243 .9238^.0126 24.14-3 BUS1CBUS12C$ = = End of level 1:BUS13A IL13A^0.BUS13B IL13B 0.BUS13C IL13C^0.$ = = = End of level 2:CC^.14 THEVA 1^187.7914 THEVB 1^187.79Linear and nonlinear elements ^99999.99999.99999.Switches and piecewise linear elements.^. Voltage or current sources60.60.^-120. 14 THEVC 1^187.79^60.^120.$ = = = End of level 3: Sources CC^. . Voltage-output nodesBUS1A$ = = = End of level 4: User-defined voltage output$ = = = Level 5: End of data case ^SS Input FileC^CASE23.INPCC^Phase A126CC^s-block^1ITACSA + INT_A^ 1.D011468.D-1^1.D01.D0CC^k-block0 AUX2A +VEMTPA^ 1.D0CC^k-blockO AUX3A +ITACSA^ 1.D0CC^Phase BCC^s-block1ITACSB + INT_B^ 1.D011468.D-1^1.D01.D0CC^k-blockO AUX2B +VEMTPB^ 1.D0CC^k-blockO AUX3B +ITACSB^ 1.D0CC^Phase CCC^s-block1ITACSC + INT_C^ 1 .DO11468.D-1^1.D01.D0CC^k-blockO AUX2C +VEMTPC^ 1.D0CC^Auxiliary blocksCC^k-blockO AUX3C +ITACSC^ 1.D0CC^k-blockO CONS1 + SRC21^ 1.D0CC^k-block1270 CONS2 + SRC23^ 1.D0CC^k-block^0 AUX2 + CONS1 + CONS2^ 1.D0CC^source block21 SRC21^1795.D-423 SRC23^524.D-2^1.D-1^5.D-2^ 5.D-2CC^fortran expression block99 INT_A =AUX2A*AUX299 INT_B =AUX2B*AUX299 INT_C =AUX2C*AUX2CC^output variables33 AUX2BCC^connection variables44ITACSAVEMTPA^0.D044ITACSBVEMTPB 0.D044ITACSCVEMTPC^0.D0CC^initial conditions77 INT_A^ 0.D077 INT_B O.DO77 INT_C O.DOCC^end of fileB.2.5 Load Variation with Thyristor Controlled Reactor(Section 5.3.3)Without TCREMTP Input File&CASE24.INPC128C^. .^. Case identification cardTHREE-PHASE VARIABLE LOAD WITHOUT TCRC LOAD REPRESENTED INSIDE Ss (NODE BUS13A)CC^. . Time card50.E-6^.2^1^ 1CC^. . Symmetric pi circuit1 THEVA BUS7A^0.083334.5632 THEVB BUS7B 0.0233-5.427^0.083334.5633 THEVC BUS7C^0.0233-5.427^0.0233-6.427^0.083334.563CC^. . Lumped RLC branchBUS1A^ 7.BUS1B 7.BUS1C 7.BUS12ABUS13A^ 70.16BUS12BBUS13B 70.16BUS12CBUS13C 70.1692 IL13A^ 112.^0.9999999.92 IL13B^IL13A^ 292 IL13C IL13A 3CC^. .^. Constant-parameters line-1 BUS7A BUS1A^.03167 3.222.00787 144.4-2 BUS7B BUS1B .0243 .9238 .0126 144.4-3 BUS7C BUS1C-1 BUS1ABUS12A^.03167 3.222.00787 24.14-2 BUS1BBUS12B .0243 .9238 .0126 24.14-3 BUS1CBUS12C$ = = End of level 1: Linear and nonlinear elements ^BUS13A IL13A^O.^99999.BUS13B IL13B O.^99999.BUS13C IL13C^O.^99999.$ = = = End of level 2: Switches and piecewise linear elementsCC^. . Voltage or current sources14 THEVA 1^187.79^60.^ -1.14 THEVB 1^187.79 60.^-120.^ -1.14 THEVC 1^187.79^60.^120. -1.$ = = = End of level 3: Sources C129C^. . Voltage-output nodesBUS1A$ = = = End of level 4: User-defined voltage output$ = = = Level 5: End of data case ^SS Input FileC^CASE24.INPC&CASE24.0UT&CASE24.AUX&YNCCC^Phase ACC^s-block1ITACSA + INT_A11468.D-1^1.D01.D0CC^k-blockO CONS1 +SRC211CC^k-blockO CONS2 +SRC212CC^k-block0 CONS3 +SRC213CC^k-block0 CONS4 +SRC214CC^k-blockO AUX2A +VEMTPACC^k-blockO AUX2 + CONS1 + CONS2 + CONS3 + CONS4CC^Phase BCC^s-block1ITACSB + INT_B11468.D-1^1.D01.D01.D01.D01.D01.D01.D01.D01.D01.D0130CC^k-block0 AUX2B +VEMTPB^ 1.D0CC^Phase CCC^s-block1ITACSC + INT_C^ 1.D011468.D-1^1.D01.D0CC^k-block0 AUX2C +VEMTPC^ 1.D0CC^source block21SRC211^1795.D-421SRC212 O.DO^ 5.D-221SRC213^64658.D-4 1.D-121SRC214 O.DO 15.D-2CC^fortran expression block99 INT_A =AUX2A*AUX299 INT_B =AUX2B*AUX299 INT_C =AUX2C*AUX2CC^RMS meter block60 VRMS AUX2A^60.DOCC^output variables33 VRMSCC^connection variables44ITACSAVEMTPA^0.D044ITACSBVEMTPB O.DO44ITACSCVEMTPC^0.D0CC^initial conditions77 INT_A^ O.DO13177 INT_B^ 0.D077 INT_C 0.DOCC^end of fileWith TCREMTP Input File&CASE25.INPCC^. .^. Case identification cardTHREE-PHASE VARIABLE LOAD WITH TCR AT BUS 1C LOAD REPRESENTED INSIDE SS (NODE BUS13A)CC^. . Time card50.E-6 .2 1 1CC^.^.^. . Symmetric pi circuit1 THEVA BUS7A 0.083334.6632 THEVB BUS7B 0.0233-5.427^0.083334.5633 THEVC BUS7C 0.0233-5.427^0.0233-5.427 0.083334.563CC^. . Lumped RLC branchBUS1A 7.BUS1B 7.BUS1C 7.BUS12ABUS13A 70.16BUS12BBUS13B 70.16BUS12CBUS13C 70.16IL13A 6389.^5571.IL13B 6389.^5571.IL13C 6389.^5571.IX13A 177.36154.65IX13B 177.36154.65IX13C 177.36154.6592^TCRA 12.^O.9999999.92^TCRB TCRA 292^TCRC TCRA 3CC^. .^. Constant-parameters line-1 BUS7A BUS1A^.03167 3.222.00787 144.4132-2 BUS7B BUS1B .0243 .9238^.0126 144.4-3 BUS7C BUS1C-1 BUS1ABUS12A .03167 3.222.00787 24.14-2 BUS1BBUS12B .0243 .9238^.0126 24.14-3 BUS1CBUS12C$ = = End of level 1: Linear and nonlinear elementsBUS13A IL13A 0. .1 .0001BUS13B IL13B 0. .1 .0001BUS13C IL13C 0. .1 .0001BUS13A IX13A .1 999999. .0001BUS13B IX13B .1 999999. .0001BUS13C IX13C .1 999999. .0001BUS1A^TCRA 0. 99999.BUS1B^TCRB 0. 99999.BUS1C^TCRC 0. 99999.$ = = =^End of level 2: Switches and piecewise linear elements ^CC^. . Voltage or current sources14 THEVA 1^187.79 60. -1.14 THEVB 1^187.79 60. -120. -1.14 THEVC 1^187.79 60. 120. -1.$ = = = End of level 3: Sources  CC . Voltage-output nodesBUS1A$ = = = End of level 4: User-defined voltage output$ = = = Level 5: End of data case ^SS Input FileC^CASE25.INPC&CASE25.0UT&CASE25.AUX&YNCCC^s-block 300\/s1 EPU +VRMSPU - UNITY1.D01.D0300.D0CCC^k-block0 BLGAM + EPU^ 125.D-2 0.D0125D-2133CCOVRMSPU + VRMSCC^k-blockO UNITY + SRC21CC^k-blockO EMTP1 +VEMTP1CC^k-blockO EMTP2 +VEMTP2CC^k-block0 EMTP3 +VEMTP3CC^Phase A - BusiC^s-block 1\/s1ITACS1 + BGAMA1.D01.D0CC^Phase B - BusiC^s-block^1\/s1ITACS2 + BGAMB1.D01.D0CC^Phase C - Bus1C^s-block 1\/s1ITACS3 + BGAMC1.D01.D0CC^source block21 SRC21^1.D0CC^fortran expression block99 BGAMA =EMTP1*BLGAM99 BGAMB =EMTP2*BLGAM99 BGAMC =EMTP3*BLGAMC7630823661.D-121.D01.D01.D01.D01.D01.D01.D0134C^RMS meter block60 VRMS EMTP1^60.DOCC^output variables33VRMSPUCC^connection variables44ITACS1VEMTP1^0.D044ITACS2VEMTP2 0.D044ITACS3VEMTP3^0.D0CC^initial conditions77 BGAMA^ 0.D077 BGAMB 0.D077 BGAMC 0.D077 EPU^0.D077ITACS1 0.D077ITACS2 0.D077ITACS3^ 0.D0CC^end of fileB.2.6 HVDC System Simple Model (Section 5.3.4)EMTP Input File&CASE40.INP^  Case identification cardCSTP alone - Time delay block - 2nd case* Time card5.D-5^.2^2^1^ 1*^ Lumped RLC branchSCR BUS1^1.1572 44.58^BUS1 9.6692 BUS12.^0.1359999999.$>>>>>>>End of level 1: Linear and nonlinear elements<<<<<<<<<$>>>>>>>End of level 2: Switches and piecewise linear elements^  Voltage or current sources14^SCR 1^187.794^60.^67.43^ -1.0$>>>>>>>End of level 3: Sources\u00ab<<<<<<<<<<<<<<<<<<<<<<<<<<<<<BUS1$>>>>>>>Level 5: End of data case<<<<<<<\u00ab\u00ab<<<<\u00ab\u00ab\u00ab<<SS Input FileC CASE40.INPC BASIC HVDC MODELS - FIG. 7-10 - WORKBOOK IV - CHAP 7 - PAGE 7-12C&CASE40_1.0UT^ Input file name&CASE40_1.AUX Auxiliar file name&YN^(Apply fast Newton Method?),(Save number of iterations?)CCC^k-blockO IDC +SCR211 + AUX3 + DCF^ 1.D0CC^k-blockO X + AUX2 +SCR212^ 1.D0CC^k-blockO ALPHA + CONT +SCR215^ 1.D0CC^k-block0 AUX3 + SCR24^ 1.D0CC^k-blockO AUX4 +SCR216^ 1.D0CC^k-blockO BUS1 + VEMTP^ 1.D0CC^k-blockO AUX1 +^PI^ 1.D0CC^k-blockO XC +SCR213^ 1.D0CC^k-block136O A +SCR214^ 1.D0CC^s-block^120\/s^1^C1P + PRODC 120.D01.D01.D0CC^s-block^120\/s1 S1P + PRODS1.D01.D0120.D0CC^k-blockO C1 +^C1P -^C1D^ 1.D0CC^k-blockO S1 +^S1P -^S1D^ 1.D0CC^k-blockO AUX2 + TIMEX^ 1.D0CC^Time delay block66^C1D^ClP^1667.D-566^S1D S1P^1667.D-5CC^source block21SCR211^1.621SCR212 -0.121SCR213^9.0821SCR214^0.893321SCR215^0.3141621SCR216^107.7924 SCR24 1.625 TIMEX25^PIC50.D-3^150.D-350.D-3^ 50.D-3C^Fortran expression blocks99 DCF^=1.D6*AUX4*(ABS(XP)**3.15)*EXP((0.0-286.)*XP)99 CONT =3.6*EXP((0.0-1.0)*135.*XP)-4.822*EXP((0.0-217.)*XP)+1.22299^XP =(ABS(X))*(X.GE.0)99^at =120*AUX1*AUX213799 PRODC =BUS1*COS(wt)99 PRODS =BUS1*SIN(wt)99^VM =SQRT(C1*C1+S1*S1)99^CV =(C1*COS(wt)+S1*SIN(wt))\/VM99^SV =(C1*SIN(wt)-S1*COS(wt))\/VMCC^DC system equationC99 PHI^=ACOS(COS(ALPHA)-(XC*IDC)\/(A*SQRT(3)*VM))CC^AC current injectionC99 IACF =(CV*COS(PHI)+SV*SIN(PHI))*A*2.0*SQRT(3)*IDC\/AUX1CC^output variables33^C1^CV IDC ALPHACC^connection variable44 IACF VEMTP^77.614CC^initial conditions77^C1P^ 1.D077^S1P O.DO77 DCF 0.D077 CONT^ O.DO77 PRODC 77.61477 PRODS O.DO77^VM^ 3.677^CV 1.D077^SV 0.D077 PHI .31434D077 IACF^0.D077^XP 0.D077^wt O.DOCC^end of fileB.2.7 Single-Phase Thyristor Rectifier Bridge (Section 5.4)EMTP Input File138&MOHAN5.INPC^. .^. Case identification card1-PHASE THYRISTOR RECTIFIERCC^. . Time card50.0E-6^50.0E-3^ .5E-3CC^. . Lumped RLC branchVSA VMA^ 0.2VMA^VA 1.0POSP^POS 16.0POS NEG^2.0POSP NEG 1.0E9POSP^VA^200.0^1.0POSP POSP^VA^VA NEG POSP^VANEG POSP^VAPOSA POSP^0.01POSG POSP 0.0192 VSA^ 14.0.9999999.92 POS VSA 2$ = = End of level 1: Linear and nonlinear elements  CC^. . Time-controlled switch-1^VA POSA^ 0.002^60. 1-1^NEG^ 0.002 60. 2-1 POSG 0.002^60. 3-1^NEG^VA 0.002 60. 4$ = = = End of level 2: Switches and piecewise linear elements  CC^. .^. Voltage or current sources14^VSA^169.7^60.0^-90.0$ = = = End of level 3: Sources  C^.^.^.^.^.^.^. Voltage-output nodesVSA POSP$ = = = End of level 4: User-defined voltage output  $ = = = Level 5: End of data case  SS Input FileC^MOHAN5.INPC139&MOHAN5.0UT^ Input file name&MOHANS.AUX Auxiliar file name&YY^(Apply fast Newton Method?),(Save number of iterations?)CC^k-block0 VSA + VEMTP^ 1.D0OVCONTL +SRC211 1.D0CO AUX1 + AUX 1.D0OPLS1-2 + AUX^ 1.D0CC^Time delay blocks66PLS3-4PLS1-2 0.00833333C66 AUX2 AUX1^50.D-6CC^controlled integrator block58 RAMP+SRC212^ VSA^120.^1.CC^source blocks21SRC211^0.2521SRC212 1.CC^fortran expression99 AUX = RAMP .GE. VCONTLCC^output variables33 RAMPPLS1-2PLS3-4CC^connection variables44 ICSTP VEMTP^0.D055PLS1-255PLS1-255PLS3-4S5PLS3-4CC^end of file140B.2.8 Three-Phase Thyristor Inverter (Section 5.4)EMTP Input File&MOHAN8.INPC^. . Case identification card3-PHASE THYRISTOR INVERTERCC^ . Time card^50.0E-6 100.0E-3^ .5E-3CC^. . Lumped RLC branchVSA VMA^ 0.2VSB VMB VSA VMAVSC VMC VSA VMAVMA^VA^ 1.0VMB^VB VMA^VAVMC^VC VMA^VAPOSP^POS^ 16.0^ 1POS^NEG 1.0E-6NEG^VA^1.0E5NEG^VB 1.0E5NEG^VC^1.0E5POSP NEG 1.0E9^ 2VSA VSC^1.0E9 292 VSA^ 14.4.9999999.92 VSC VSA 2$ = = End of level 1: Linear and nonlinear elements  CC^. . Time-controlled switch-1^VA POSP^ 2.E-3^60. 1-1^NEG^VC 2.E-3 60. 2-1^VB POSP 2.E-3^60. 3-1^NEG^VA^ 2.E-3 60. 4-1^VC POSP 2.E-3^60. 5-1^NEG^VB 2.E-3 60. 6$ = = = End of level 2: Switches and piecewise linear elementsCC^ .^. Voltage or current sources14^VSA^391.9^60.0^-60.014^VSB 391.9^60.0^-180.014^VSC^391.9^60.0^-300.014111^POS-1 -600.0E611^NEG-1^600.0E6$ = = = End of level 3: Sources ^C^.^. Voltage-output nodesVSA$ = = = End of level 4: User-defined voltage output$ = = = Level 5: End of data case ^SS Input FileC^MOHAN8.INPCC MOHAN8_1.PLO - Simultaneous solutionC MOHAN8_2.PLO - One time-step delayC MOHAN8_3.PLO - Two time-step delayC&MOHAN8.0UT^ Input file name&MOHAN8.AUX Auxiliar file name&YN^(Apply fast Newton Method?),(Save number of iterations?)CC^k-block0^VSA +VEMTPA 1.D00^VSC +VEMTPC 1.D00^VSAC +^VSA - VSC 1.D0OVCONTL +SRC211 1.D00^AUX1 +^AUX 1.D00^AUX3 +^AUX2 1.D00 PULS1 +^AUX4 1.D0CC^Time delay blocks66 PULS2 PULS1 0.0027777866 PULS3 PULS2 0.0027777866 PULS4 PULS3 0.0027777866 PULS5 PULS4 0.0027777866 PULSE PULS5 0.0027777866^DCMP^AUX1 250.D-666^AUX4^AUX3 100.D-6CC^controlled integrator block58 RAMP+SRC212^ VSAC^120.^1.CC^source blocks14221SRC211 .83333333321SRC212^1.CC^fortran expression99 AUX = RAMP .GE. VCONTL99 AUX2 = (.NOT. DCMP) .AND. AUX1C99 GATE1 = PULS1 .OR. PULS2C99 GATE2 = PULS2 .OR. PULS3C99 GATE3 = PULS3 .OR. PULS4C99 GATE4 = PULS4 .OR. PULS5C99 GATES = PULS5 .OR. PULS6C99 GATE6 = PULS6 .0R. PULS1CC^output variables33 PULS1 PULS2 PULS3 PULS4 PULS5 PULS6 RAMPCC^connection variables44ICSTAPVEMTPA^0.D044ICSTCPVEMTPC 0.D055 PULS155 PULS255 PULS355 PULS455 PULS555 PULS6CC^initial conditions77 AUX^ O.DO77 AUX2 O.DOCC^end of file143","type":"literal","lang":"en"}],"http:\/\/www.europeana.eu\/schemas\/edm\/hasType":[{"value":"Thesis\/Dissertation","type":"literal","lang":"en"}],"http:\/\/vivoweb.org\/ontology\/core#dateIssued":[{"value":"1993-11","type":"literal","lang":"en"}],"http:\/\/www.europeana.eu\/schemas\/edm\/isShownAt":[{"value":"10.14288\/1.0065142","type":"literal","lang":"en"}],"http:\/\/purl.org\/dc\/terms\/language":[{"value":"eng","type":"literal","lang":"en"}],"https:\/\/open.library.ubc.ca\/terms#degreeDiscipline":[{"value":"Electrical and Computer Engineering","type":"literal","lang":"en"}],"http:\/\/www.europeana.eu\/schemas\/edm\/provider":[{"value":"Vancouver : University of British Columbia Library","type":"literal","lang":"en"}],"http:\/\/purl.org\/dc\/terms\/publisher":[{"value":"University of British Columbia","type":"literal","lang":"en"}],"http:\/\/purl.org\/dc\/terms\/rights":[{"value":"For non-commercial purposes only, such as research, private study and education. Additional conditions apply, see Terms of Use https:\/\/open.library.ubc.ca\/terms_of_use.","type":"literal","lang":"en"}],"https:\/\/open.library.ubc.ca\/terms#scholarLevel":[{"value":"Graduate","type":"literal","lang":"en"}],"http:\/\/purl.org\/dc\/terms\/title":[{"value":"Numerical instabilities in power system transient simulations","type":"literal","lang":"en"}],"http:\/\/purl.org\/dc\/terms\/type":[{"value":"Text","type":"literal","lang":"en"}],"https:\/\/open.library.ubc.ca\/terms#identifierURI":[{"value":"http:\/\/hdl.handle.net\/2429\/2121","type":"literal","lang":"en"}]}}