Home

object{oriented modeling of power{electronic circuits using dymola

image

Contents

1. u lt 0 and not i gt 0 end The circuit of Fig 2 can now be described as follows model Rectifier submodel VSource UO submodel Resistor Ri R 10 RL R 50 submodel Capacitor C C 0 001 submodel IdealDiode Diode submodel Common output y parameter f 50 connect Common U0 Ri Diode C RL U0 VO sin 2 3 14159 x f x Time y C u end where denotes a connection in series and indicates a connection in parallel How this model is translated to efficient simulation code is described in detail in Elmqvist et al 1993 Note that the ideal switch element is sometimes difficult to use since se veral things can go wrong as will be explained in due course A POWER CONVERTER WITH IDEAL SWITCHES Let us discuss one of the basic configurations of power converters Ramshaw 1993 Its circuit diagram is shown in Fig 3 The switches can be realized in many different Sw1 Sw2 Source lt lt O Hira 7 Sw3 Sw4 Figure 3 Circuit diagram of a power converter ways Depending on the control of the switches different types of power regulation are obtained The normal mode of operation of this circuit is that either Swl and Sw4 are closed whereas Sw2 and Sw3 are open or vice versa In these two situation the source voltage is applied to the load in one of two polarities What happens if all four switches are open at the same time In this case t
2. veniently at different abstraction levels in accordance with the needs of the simulation attempted In this way highly ef ficient simulation code can be generated It is also very easy to integrate the power electronics models with the usually electro mechanical plant models that the power converters are supposed to drive i e Dymola can be conveniently used for modeling mechatronic systems Otter et al 1994 REFERENCES Anderson E Z Bai C Bischof J Demmel J Dongarra J Du Croz A Greenbaum 5 Hammarling A McKenney S Ostrouchov and D Sorensen 1992 SIAM Philadelphia LAPACK User s Guide Andersson M 1990 Omola An Object Oriented Language for Model Representation Licenciate Thesis TFRT 3208 Depart ment of Automatic Control Lund Institute of Technology Lund Sweden Andersson M 1992 Discrete Event Modelling and Simulation in Omola In Proc IEEE Symposium on Computer Aided Control System Design Napa California March 17 19 262 268 Cellier F E 1979 Combined Continuous Discrete System Simu lation by Use of Digital Computers Techniques and Tools Ph D Dissertation Diss ETH No 6483 ETH Z rich CH 8092 Z rich Switzerland Cellier F E 1991 Verlag New York Continuous System Modeling Springer Cellier F E 1995 Verlag New York Continuous System Simulation Springer Cellier F E and H Elmqvist 1993 Automated Formula Ma nipulation in O
3. connection from one wire to the other used for connecting two pin devices into a circuit The local variable u describes the voltage drop across the device The resistor can be modeled as a specialization of the two pin device model class TwoPin Resistor parameter R u Ri end It inherits all the declarations and equations of the generic two pin device and extends them by the more specific decla rations and equations that make the device behave like a re sistor Note that in Dymola equations such as u R i are not assignment statements but real equations Ohm s law could have been equally well defined as u R 1 0 The capacitor and the voltage source can be described as model class TwoPin Capacitor parameter C C x der u i end model class TwoPin V Source terminal VO u V0 end Also the deal switch element can be described directly as a two pin device model class TwoPin IdealSwitch terminal OpenSwitch 0 if OpenSwitch then i else u end The switch equation states that either 2 or u are zero at all times depending on whether the switch is open Opens witch true or closed OpenSwitch false respectively Dy mola is able to cope with such a variable structure equation as shown in Elmqvist et al 1993 Using this ideal switch component it is now possible to model power electronic de vices such as ideal diodes model class IdealSwitch IdealDiode new OpenSwitch
4. 50 source current W R 1 0 0 0 6 1 2 1 8 2 4 3 0 time 10 2 R Ly li fi N Kn VA A z AA i VA l 5 g I EN ALY A EN IV N tAd 3 joy I IV IN 2 J yak UA So N y V V N I V r 0 0 0 6 12 18 2 4 3 0 time 10 2 Figure 6 Source and load currents lation time using a second order variable step Runge Kutta algorithm in ACSL on a Compaq 486 66 MHz machine was 1 92 seconds Simulating the same circuit in PSpice on the same computer required 44 seconds i e the ACSL code ge nerated by Dymola ran about 20 times more faster than the PSpice code How can this speedup be explained One important fac tor is the use of indicator functions Abusing the integration step size control algorithms to locate discontinuities in a si mulation model is very inefficient A second important factor relates to the integration method itself Dymola can be as ked to translate implicit DAE models into explicit ODE mo dels Whereas a DAE solver as it is used in Spice iterates on all the model equations simultaneously Dymola isolates systems of algebraic equations and makes each system of si multaneous equations as small as possible Linear systems of equations can then either be solved symbolically at compile time using a version of Cramer s rule or they can be solved at run time by generating calls to LAPACK Anderson et al 1992 Nonlinear systems are always solved numerically at
5. The coefficients of these equations are time varying The opening and closing of switches corresponds to toggling certain coefficient values between zero and one Elmqvist et al 1993 If the above switch settings take place and proper remedies are not intro duced in the model the set of equations becomes singular and it is no longer possible to solve the system of equations i e the simulation has to be aborted To summarize the usage of ideal switch elements requires special attention by the modeler However the problems as sociated with ideal switch elements can be easily circumven ted by using a slightly more realistic switch model in which the switch is represented by a big yet not infinitely big resi stance when it is open and by a small yet not vanishingly small resistance when it is closed NON IDEAL SWITCHES AND THYRISTORS A general switch element with open and close resistances could be described as model class TwoPin GenSwitch terminal OpenSwitch parameter GOpen 0 0 RClose 0 0 O if OpenSwitch then i GOpen u else u RClose xi end which behaves like the resistive switch when GOpen and RC lose are different from zero and degenerates to the ideal switch when the default values of both RClose and GOpen are in effect Using such a general switch a Gate Turn Off GTO thy ristor Ramshaw 1993 could be described as cf the ideal diode model class GenSwitch GTOThyristor main cut control G
6. of this problem as well What happens if either Sw1 and Sw3 or Sw2 and Sw4 are closed at the same time In this case the source gets short circuited and an arbitrarily large current will flow One way to overcome this problem is to model the source more reali stically by adding an internal source resistance Of course the use of non ideal switch elements will take care of the problem as well not necessarily in a very realistic fashion since voltage sources today on the market certainly don t come with internal resistance values of 2 107 Q Let us assume the voltage source has been modeled with an internal source resistance so that no unrealistically large currents can ever flow What happens if all four switches are closed at the same time Now there are two wires connec ted in parallel and it is not clear how the current that is drawn out of the shortcircuited source will be split between them Again the use of resistive switches will take care of the problem The small resistances in the parallel branches serve as a current divider which is exactly what physics will do in the real case as well What happens if the modeler does not take these situa tions properly into account This kind of circuit exhibits a variable structure i e the causality changes as a function of the switch position When Dymola analyses the struc ture of the model equations a set of equations is isolated that need to be solved simultaneously
7. run time by generating calls to a nonlinear programming routine Whether the symbolic or the numeric solution of li near systems is preferable depends on the application 1 e it depends on whether the explicit solution destroys the inhe rent sparsity of the system or not In the AC DC converter example a linear system of nine equations resulted and in this example it was indeed considerably more efficient to solve the system of equations symbolically at compile time This reduced the run time computations by about a factor of three A third important factor relates to the use of ideal GTOs and diodes Spice employs more accurate but unne cessarily inefficient models The results obtained by ACSL are undistinguishable from those obtained by Spice Finally in Spice the control signal had to be generated using circuit elements In Dymola a behavioral description was used Of course when building the circuit something similar to the Spice circuit will be needed but for the purpose of the simu lation this detail was entirely unessential It is a strength of Dymola that it allows to mix abstraction levels arbitrarily and easily CONCLUSIONS In this paper a new tool for flexibly and efficiently mode ling and simulating power electronic circuits was presented Contrary to Spice Dymola offers direct access to all model equations at an object oriented easy to use equation level It was shown that different phenomena can be modeled con
8. simu lation software To this end both the discrete event actions and their associated indicator functions for efficient event detection are automatically being generated by the Dymola compiler Dymola employs highly sophisticated and efficient symbo lic formulae manipulation algorithms that are able to trans late a topological description of a higher index model down to state space form e g to an ACSL simulation program or to Fortran code Cellier and Elmqvist 1993 The distance in conceptual abstraction between the modeling surface i e the Dymola program and the representation at the level of the simulation program e g an ACSL program that is being bridged by the Dymola compiler is much larger than with most other modeling tools Dymola combines the best of two worlds It provides the user with an object oriented modeling surface that is as convenient to use as that of Spice yet a simulation run time engine that employs the latest in simulation technology Omola Andersson 1990 is another object oriented mo deling tool in many ways quite similar to Dymola Also Omola is capable of reducing higher index models Mattsson and S derlind 1993 However it always translates them into an index 1 differential algebraic equation DAE descrip tion and never into an index 0 ordinary differential equation ODE model Dymola offers additional flexibility here since the user can select between an ODE and a DAE representa tion at t
9. OBJECT ORIENTED MODELING OF POWER ELECTRONIC CIRCUITS USING DYMOLA Hilding Elmqvist Dynasim AB Research Park Ideon S 223 70 Lund Sweden Elmqvist Dynasim SE U S A ABSTRACT In this paper a new approach to the object oriented mo deling of power electronic circuits is demonstrated It ena bles the user to specify power electronic circuits conveniently in an easy to use modular fashion yet generate simulation code that is efficient in its use not requiring the introduction of artificial fast time constants as was the case with many of the earlier proposed methodologies Dymola enables the user to specify models for individual circuit elements in a highly modular compact and object oriented fashion Circuit mo dels invoke these component models and connect them in a topological manner just as a Spice program would The Dy mola compiler automatically translates these circuit models into monolithic descriptions at the level of the simulation language resolving discontinuous circuit elements such as switches into appropriate event descriptions For a typical AC DC converter circuit controlled by GTO thyristors it is shown that a speedup factor of about 20 can be achieved with respect to an equivalent PSpice model INTRODUCTION Power electronic circuits form a central part of most con trol systems They are at the heart of the actuators that translate information signals i e the output signals of the controllers into pow
10. ate new OpenSwitch u lt 0 and not i gt 0 gt or not Gate end Contrary to Spice which offers a fixed set of basic circuit component models new model types can be added to Dy mola easily and in a compact and convenient fashion AC DC CONVERTER WITH PULSE WIDTH MODULATION CONTROL As a more complete example an AC DC converter with pulse width modulation PWM control will be studied A Spice implementation of the same circuit is presented in Rashid 1993 Its circuit diagram is shown in Fig 4 Gate pwm Gate pwm2 Sl A 82 3 A Vs A Dm 7 Di 1 D2 g L J Common Figure 4 Circuit diagram of AC DC converter It becomes evident from looking at Fig 4 that this AC DC converter is just a special case of the generic converter scheme shown in Fig 3 Two gate turn off thyristors 51 and The diodes D1 and D2 complete the bridge to obtain full wave rectification Since the load is inductive a freewheeling diode Dm is needed in addition S2 are used for control Different schemes for controlling the GTOs can be used One scheme called sinusoidal pulse width modulation Ras hid 1993 will be studied The pulses controlling the GTOs are determined by the intersection of a sinusoidal and a saw tooth signal Fig 5 When using Spice for simulation Ras hid 1993 the generation of these control pulses was done by modeling a precision rectifier and comparator including three ope
11. ation Pantelides C C 1988 The Consistent Initialization of Differential Algebraic Systems SIAM J Scientific and Statisti cal Computing no 9 2 213 231 Ramshaw R S 1993 Power Electronics Semiconductor Switches Chapman amp Hall London Rashid M H 1994 Spice for Power Electronics and Electric Po wer Prentice Hall Englewood Cliffs N J
12. bject Oriented Continuous System Modeling IEEE Control Systems no 13 2 28 38 Cellier F E H Elmqvist M Otter and J H Taylor 1993 Gui delines for Modeling and Simulation of Hybrid Systems In Proc IFAC World Congress Sydney Australia July 18 23 vol 8 391 397 Dynasim 1994 Dymola User s Manual Dynasim AB Rese arch Park Ideon Lund Sweden Elmqvist H 1978 A Structured Model Language for Large Continuous Systems Ph D Dissertation Report CODEN LUTFD2 TFRTI 1015 Dept of Automatic Control Lund In stitute of Technology Lund Sweden Elmqvist H F E Cellier and M Otter 1993 Object Oriented Modeling of Hybrid Systems In Proc ESS 93 European Si mulation Symposium Delft The Netherlands October 25 28 xxxi xli Mattsson S E and G S derlind 1993 Index Reduction in Differential Algebraic Equations Using Dummy Derivatives SIAM J Sci Comput no 14 3 677 692 Mitchell amp Gauthier Associates Inc 1991 Advanced Continuous Simulation Language ACSL Reference Manual Concord Mass Nagel L W 1975 SPICE2 A Computer Program to Simulate Semiconductor Circuits Report ERL M520 Electronic Research Laboratory University of California Berkeley Berkeley Calif Otter M H Elmqvist and F E Cellier 1994 Modeling of Multibody Systems With the Object Oriented Modeling Langu age Dymola J Nonlinear Dynamics accepted for public
13. er signals i e the signals that drive the actual plant to the desired operating point The energy for these power signals is taken out of the electric net Le actuators are power converters that convert a fixed power signal usually either ac or dc into a variable power sig nal under the control of an information signal A typical actuator is shown schematically in Fig l The modulation or regulation of power signals almost invariably employs high frequency switching devices thus a continuous system simulation language that is not equipped to deal with dis continuitiesin the trajectories to be integrated across cannot be used to simulate power electronic circuits A general purpose continuous system simulation langu age such as ACSL Mitchell amp Gauthier 1991 is princi pally capable of providing efficient simulations of electronic Francois E Cellier Dept of Electr amp Comp Engr The University of Arizona Tucson Arizona 85721 Cellier ECE Arizona Edu Martin Otter Inst fur Robotik amp Systemdynamik DLR Oberpfaffenhofen D 82230 Wessling Germany DF43 Master DF OP DLR DE electrical power net j actuator contro m gt plant Figure 1 Schema of a typical actuator switching circuitry but the tool is hardly ever used for such purpose since it is a very difficult task to convert the topo logical description of a complex electronic switching circuit diagram into a state s
14. he level of the simulation language Omola is also able to handle discrete events Andersson 1992 but does so with explicit event descriptions i e through lower level con structs Dymola offers a more convenient user interface for describing discontinuous models and is therefore preferred in the context of modeling switching circuitry Yet when modeling switching circuitry and especially when ideal switching elements are used a lot can go wrong that the user needs to be aware of and the modeling ele ments of Dymola can thus not be used carelessly It is the purpose of this paper to show what can go wrong and what the user needs to know in order to successfully employ Dy mola for modeling power electronic switching circuits CIRCUIT MODELING IN DYMOLA Let us start by modeling the simple circuit of Fig 2 in Dy mola All four components used in the model are two pin Ri Diode N L gt U0 Common Figure 2 Half wave rectifier circuit one port devices that can be described in Dymola as model class TwoPin cut WireA Va i WireB Vb i main cut PlugC WireA WireB main path PathAB lt WireA WireB gt local u u Va Vb end The cut declaration describes the interface of the two pin device with its environment Each wire carries two varia bles a potential V an across variable and a current 1 a through variable The path declaration describes a logical
15. he load gets disconnected from the gro und altogether In electrical circuit modeling there is always a need for one arbitrary assumption Usually this assump tion will be that the potential of the ground is zero This is not a truth statement but simply a convention When the load gets disconnected from the ground the model uni verse suddenly decays into two separate universes and the modeler now needs to supply two arbitrary equations one for each universe Usually this problem is resolved by attaching the load to the rest of the circuit e g the ground through an arbitrarily selected large resistor Of course if a non ideal switch element modeled by means of variable resistors is used this happens automatically and the user need not to worry In Dymola such a resistive switch could be described as follows model class TwoPin VarResistor terminal R u Rxi end model class Var Resistor ResSwitch terminal OpenSwitch parameter ROpen 1 0E 6 RClose 1 0E 6 R if OpenSwitch then ROpen else RClose end What happens if either Swl and Sw3 or Sw2 and Sw4 are opened at the same time If the load contains an inductor its current will not immediately cease to flow but instead an arc will appear A common remidy for this type of problem is the introduction of a large shunt resistor placed in parallel with the inductor or a freewheeling diode when converting to dc The use of resistive switch elements will take care
16. pace model with schedule statements and discrete sections for discontinuity handling as would be required by ACSL Most circuit designers today use dialects of Spice Nagel 1975 to simulate switching circuitry However while Spice provides for a convenient input description language the un derlying software is hardly suited for simulating switching circuitry If the switching devices are modeled in a detailed fashion using physical models of the components that im plement the switching characteristics such as power MOS or BJT devices the simulation will run correctly since the model doesn t contain any discontinuities at all but the si mulation engine will have to employ extremely small step sizes in order to follow the fast transients that respresent the true switching behavior of the switching devices This is appropriate for simulating one or two or maybe 10 swit ching characteristics to investigate the transient behavior of the switching device itself e g to check whether any sort of ringing takes place after the device has switched but it is hardly suitable to simulate the hundreds or even thousands of switching events during analysis of a cycloconverter For such purposes a coarser grain simulation is needed Some Spice dialects offer a switch element in which the If the switch is closed the resistance assumes a small value and when it is open the resistance is large However the integration routines within Spice s
17. rational amplifiers nine resistors and other circuit elements PWM reference signals gt 0 025 0 0 005 0 01 0 015 0 02 Figure 5 Sinusoidal pulse width modulation In Dymola this control scheme can be realized using the following much simpler behavioral description model class PW M control main cut control Gate parameter p 1 f M constant PI 3 14159265 local Vr 1 Ve fr square rate Generate saw tooth reference signal fr 2 pxf square if sin 2 PI fr x Time gt 0 then 1 else 1 rate 2x fr der Vr rate square Generate carrier signal Ve Mxsin 2 PI x f x Time Determine output Gate not Vr lt Ve end The complete AC DC converter can be described as follows model Converter submodel Vsource Vs submodel Resistor R R 2 5 submodel Inductor L L 6 5E 3 D1 GOpen 1E 6 gt D2 RClosed 1E 6 gt Dm GOpen 1E 6 submodel GTOThyristor S1 RClosed 1E 6 gt S2 RClosed 1E 6 submodel Diode submodel Common submodel PWMeontrol PWM1 p 4 f submodel PWMcontrol PWM2 p 4 f parameter f 60 constant PI 3 14159265 connect Common D2 Vs S1 connect S1 R L Dm Common connect D1 1 D2 82 connect PWM1 at S1 connect PWM2 at 2 Vs VO 169 7 sin 2 PI f Time end The results of the simulation are shown in Fig 6 The simu
18. till have problems when the resistance switch is represented by a variable resistor suddenly changes The discontinuity forces the step size to be decreased The reasons for these difficulties are explained for example in Cellier et al 1993 Modern integration routines handle discontinuities and events more efficiently and accurately They require more information about the model though Information about discontinuities is provided by means of indicator functions Whenever an indicator function crosses through zero this indicates to the integration algorithm that a discrete event is about to occur Instead of decreasing the step size the in tegration routine interpolates the indicator function in order to locate the zero crossing with sufficient accuracy The time of the event is thus determined in an efficient way After the discrete action associated with the event such as a sudden change of a resistance has been simulated the integration algorithm is restarted Dymola offers an attractive alternative to Spice for simu lating switching circuitry Dymola is an object oriented mo deling language Elmqvist 1978 Dynasim 1994 with power ful discontinuity handling capabilities Discontinuous models are described in an object oriented fashion using if expressi ons and when statements as explained in detail in Elmqvist et al 1993 These expressions statements are translated into event descriptions at the level of the underlying

Download Pdf Manuals

image

Related Search

Related Contents

VGN-Z series - Sony Europe  Cypress Perform STK16C88-3 User's Manual  Leica EG 1160 - Leica Biosystems  

Copyright © All rights reserved.
Failed to retrieve file