TyphoonSim Solver Engine
Summary of the TyphoonSim solver engine algorithms and capabilities as well as its modeling principles and simulation workflow.
TyphoonSim is equipped with state-of-the-art solvers that enable simulation of complex models exhibiting both continuous and discrete dynamics that are described by hybrid differential equations. The detailed description of the solver settings is provided in Model Settings. The basic principles applied for modeling electrical and signal prodessing domains are described in Modeling principles.
Solver Algorithms
The TyphoonSim solver engine currently offers two solver options: DAE solver and ODE solver. DAE solver, which is the default option, forms differential-algebraic equations (DAEs), which are transformed into index-1 DAEs using index-reduction techniques. On the other hand, ODE solver converts system equations into ordinary differential equations (ODEs). In both cases, the differential equations are integrated by a user-specified variable-step integration method.
TyphoonSim currently provides four integration methods: BDF, BDF-Robust, Trapezoidal, and Trapezoidal-Robust. BDF and BDF-Robust methods are implicit variable-order variable-step methods based on the backward differentiation formulas (BDFs) commonly used for solving stiff differential equations [1]. Trapezoidal and Trapezoidal-Robust methods are also implicit variable-step methods that are based on the standard trapezoidal integration method. Robust integration methods, such as BDF-Robust and Trapezoidal-Robust, apply additional scaling techniques to differential equations and tighter convergence tolerances during an integration and handling of hybrid events. Robust options must be used if the regular options fail to converge. DAE solver is recommended for simulating large-scale circuits, e.g. power grid models with high-penetration of inverter-interfaced distributed generation, that have large algebraic loops, which are handled more efficiently and solved signifiantly faster by DAE solver.
Modeling Principles
Modified Nodal Analysis
TyphoonSim leverages modified nodal analysis (MNA) to assemble system equations in DAE form [2]. These are typically high-index DAEs due to various topological conflicts that might be present in the circuit. Since high-index DAEs are numerically more challenging to solve [1], they are transformed into either index-1 DAEs or ODEs.
Power Converters
TyphoonSim is equipped with advanced discrete-event handlers that allow designing and simulating power converters using the basic switching elements such as diodes, thyristors, IGBTs, etc., instead of using pre-programmed, pre-packaged power converter components (e.g., NPC leg) from the Typhoon HIL core library intended more for real-time simulations. However, to ensure model continuity between TyphoonSim and real-time/VHIL simulation, pre-packaged components can also be simulated using TyphoonSim. Under the hood, they are broken down to the level of individual switches and simulated in the same way as if they were built using single switches. The discrete-event handlers rely on state-of-the-art estimation techniques to accurately estimate the states of the switching devices, especially, line-commutated switches such as diodes throughout a simulation run.
ODE solver models basic switching devices such as IGBTs as ideal switches (Ron = 0, Roff = inf). On the other hand, DAE solver models a switching device as a variable resistor (Ron > 0, Roff < inf), where Ron takes a low resistance value (the default value is 1 mΩ), when a switch is on, and a high resistance value (the default value is 1 MΩ), when a switch is off. Users can also set the turn-on voltage for line-commutated switches, namely, diodes and thyristors.
Machines
Machine equations are solved by a dedicated machine solver using explicit integration methods whose execution is triggered by the discrete-event handlers either periodically every 1 µs or whenever there is a large enough change in electrical signals associated with the machine terminals.
Simulation Workflow
Figure 1 illustrates the basic workflow leveraged for running a simulation in TyphoonSim.
The circuit simulation workflow is comprised of an initialization phase and a main integration loop that can be broken down into several functional units described below.
- Initialize state variables and derivatives: This unit obtains consistent initial values for state variables and the time derivatives of differential variables.
- Calculate state variables and derivatives: Variable-step integration method calculates state variables and the time derivatives of differential variables using in-built error control schemes. The step size is adjusted to keep the state vector within an error tolerance.
- Evaluate outputs: Output signals corresponding to the measurement components are evaluated at a rate specified by the user.
- Evaluate inputs: This unit evaluates input signals for controllable sources and switching devices, e.g., gate signals for IGBTs, as well as for machine circuit interfaces.
- Discrete event detection and handling: This component is responsible for detecting and handling discrete switching events that introduce discontinuity to the system behavior. It locates the instants of zero-crossings for line-commutated switching devices, e.g., diodes, using a root finding algorithm and provides this information to the modeling and solver modules to update the model and complete the integration step. It also estimates the states of line-commutated devices, e.g., during the initialization phase.
References
- L. R. Petzold, Numerical methods for differential-algebraic equations: Current status and future directions, 1989, https://www.osti.gov/servlets/purl/5818293.
- F. N. Najm, Circuit Simulation, John Wiley & Sons, Ltd, 2010.