Juliacon 2024

QSS: a solver for a large sparse stiff discontinuous system
2024-07-12 , Else (1.3)

Quantized State System (QSS) solver is an alternative method to classic numerical integration methods in solving sparse systems of Ordinary Differential Equations (ODE), which exhibits stiffness and discontinuities. I will explain the internals of a package that implements these methods, and I will provide its results in the simulation of some well-known systems in comparison to the DifferentialEquations.jl package.


In classic methods, the difference between tk (the current time) and tk+1 (the next time) is called the step size. In QSS, the difference between xk (the current value of one variable) and xk+1 (the next value) is called the quantum ∆. The step size is determined by the smallest time that is needed for a variable to exceed the threshold ∆. Since in QSS algorithms, variables of the system do not necessarily get updated at the same time, they can outperform classic solvers in large sparse stiff discontinuous systems such as switched power converter circuits. I built a family of explicit and implicit QSS algorithms of orders 1,2, and 3 in Julia. The package is in the testing phase, and many systems of ODEs are successfully tested as well as well-known problems such as the Tyson model and the Advection Diffusion Reaction problem. While the package is optimized to be fast, extensibility is not compromised. It is divided into 3 modules that can be extended separately: Problem, Algorithm, and Solution. The package uses other packages such as MacroTools.jl for user-code parsing, SymEngine.jl for Jacobian computation, and a modified TaylorSeries.jl that uses caching to obtain free Taylor variables. The approximation through Taylor variables transforms any complicated equations to polynomials, which makes root finding cheaper. The general form of the QSS algorithm is as follows:
- Find the variable ‘i’ with the fastest dynamics and compute the elapsed time ‘e’ since the last update.
- update its value using a Taylor expansion and compute the time of next change.
- update any variable ‘j’ that depends on ‘i’ and compute its next time of change.
- update any zero-crossing function that depends on ‘i’.
Even though, the QSS algorithms are significantly different from conventional methods implemented in the DifferentialEquations.jl, they can be incorporated in this ecosystem.
Repository: https://github.com/mongibellili/QuantizedSystemSolver.jl
issue in DifferentialEquation.jl where QSS was tested: https://github.com/SciML/DifferentialEquations.jl/issues/998

See also:

I am a PhD student in computer science at KU Leuven. My research involves cycles detection in quantized state methods. I am also interested in numerical integration, differential equations, and simulation.