BBBernhard Bachmann

Bernhard Bachmann

*This is an algorithmically generated author record based on publicly available information.

Current Organizations / Institutes

The organizations/institutes from the scholar's latest article


Bernhard Bachmann has a total of 13 co-authors. Here are the top co-authors by number of shared publications:


Latest Publications

  • Open Access

    Diagnosing Newton’s Solver Convergence Failures in the Initialization of Modelica Models

    by Francesco Casella, Bernhard Bachmann, Karim Abdelhak, Philip Hannebohm, Teus Van der Stelt

    The convergence failure of iterative Newton solvers duringthe initialization of Modelica models is a seriousshow-stopper, particularly for inexperienced users. Thispaper presents the implementation in the OpenModelica toolof methods presented by two of the authors in a previouspaper, to help diagnosing and resolving these convergencefailure by providing ranked lists of potentially criticalstart attributes that might need to be fixed in order tosuccessfully achieve convergence. The method also provideslibrary developers with useful information about criticalnonlinear equations, that could be replaced by equivalent,less nonlinear ones, or approximated by homotopy for morerobust initialization.


  • Open Access

    Selective Evaluation of RHS during Multi-Rate Simulation

    by Philip Hannebohm, Bernhard Bachmann

    Modeling across physical domains can lead to coupledsystems that operate on different time scales.Moreover, spatially discretized models can have dynamicbehavior on only a small portion of the whole system, whilethat portion might move over time.With a single rate solver like DASSL, the step size isrestricted to fast dynamics of a few states while theothers could do much larger time steps, degrading theoverall simulation speed.Recent development of the Generic Bi-rate ODE (GBODE)solver within the OpenModelica simulation environmentaddresses these models.It allows for adaptive partitioning of slow and fast statesand progresses these partitions with different time steps.However, substantial performance improvements were not yetobserved, in part because of the rigid evaluation structureof the generated code.During each small step only the derivatives of fast statesare required, but all derivatives are computed.This paper demonstrates the use of selective equationevaluation to reduce the computational cost of multi-rateintegration as shown on a scalable example of a distributedheating system.Further uses for selective evaluation during the simulationprocess are discussed and a complexity analysis is given.


  • Open Access

    Constant Time Causalization using Resizable Arrays

    by Karim Abdelhak, Bernhard Bachmann

    Equation-based modeling that utilizes reusable componentsto represent real-world systems can result in excessivelylarge models. This, in turn, significantly increasescompilation time and code size, even when employingstate-of-the-art scalarization and causalizationtechniques. This paper presents an algorithm that leveragesrepeating patterns and uniform causalization to enablearray-size-independent constant time processing. Allowingstructural parameters that govern array sizes to remainresizable during and after the causalization processenables the formulation of an integer-valued nonlinearoptimization problem. This approach identifies the minimalmodel configuration that preserves the required structuralintegrity, which can subsequently be resized as needed forsimulation. The proposed method has been implemented inOpenModelica and builds upon preliminary work aimed atpreserving array structures during causalization, whilestill resolving the underlying problem in a scalarizedmanner.

  • Open Access

    Residual-Informed Learning of Solutions to Algebraic Loops

    by Felix Brandt, Andreas Heuermann, Philip Hannebohm, Bernhard Bachmann

    This paper presents a residual-informed machine learning approach for replacing algebraic loops in equation-based Modelica models with neural network surrogates. A feedforward neural network is trained using the residual (error) of the algebraic loop directly in its loss function, eliminating the need for a supervised dataset. This training strategy also resolves the issue of ambiguous solutions, allowing the surrogate to converge to a consistent solution rather than averaging multiple valid ones. Applied to the large-scale IEEE 14-Bus system, our method achieves a 60% reduction in simulation time compared to conventional simulations, while maintaining the same level of accuracy through error control mechanisms.

  • Open Access

    Self-Adjusting Multi-Rate Runge-Kutta Methods: Analysis and Efficient Implementation in An Open Source Framework

    by Bernhard Bachmann, Luca Bonaventura, Francesco Casella, Soledad Fernández-García, Macarena Gómez-Mármol, Philip Hannebohm

    We present an approach for the efficient implementation of self-adjusting multi-rate Runge-Kutta methods and we introduce a novel stability analysis, that covers the multi-rate extensions of all standard Runge-Kutta methods and allows to assess the impact of different interpolation methods for the latent variables and of the use of an arbitrary number of sub-steps for the active variables. The stability analysis applies successfully to the model problem typically used in the literature for multi-rate methods. Furthermore, we also propose a physically motivated model problem that can be used to assess stability to problems with purely imaginary eigenvalues and in situations closer to those arising in applications. Finally, we present an efficient implementation of multi-rate Runge-Kutta methods in the framework of the OpenModelica open-source modelling and simulation software. Results of several numerical experiments, performed with this implementation of the proposed methods, demonstrate the efficiency gains deriving from the use of the proposed multi-rate approach for physical modelling problems with multiple time scales.


  • Open Access

    Pseudo Array Causalization

    by Karim Abdelhak, Francesco Casella, Bernhard Bachmann

    In the current state-of-the-art modeling tools for simulation, it is common to describe system behavior symbolically using mixed continuous and discrete differential-algebraic equations, so called hybrid DAEs. To correctly resolve higher index problems, hybrid systems and to efficiently use ODE solvers, a matching and sorting problem has to be solved, commonly referred to as causalization. Typically multidimensional equations and variables are scalarized, which leads to excessive build time and generated code size in the case of large systems. An algorithm will be presented, that preserves array structures as much as possible while still solving the problem of causalization in scalar fashion. Test results carried out in the OpenModelica tool show a reduction in build time of one/two orders of magnitude and of a factor two/three in the simulation run time for models of the ScalableTestSuite library.


  • Open Access

    Efficient Implementation of Collocation Methods for Optimization using OpenModelica and ADOL-C

    by Vitalij Ruge, Willi Braun, Bernhard Bachmann, Andrea Walther, Kshitij Kulshreshtha