Published July 26, 2026 | Version v0.24.0

PathSim - A System Simulation Framework

Authors/Creators

Description

Linearization is now a query that returns matrices instead of a mode the system is switched into, and it assembles across a whole diagram.

Highlights

to_statespace() at block, subsystem and system level. Simulation.to_statespace(inputs, outputs) eliminates the connections between the marked break and tap points and returns a StateSpace block carrying the labels control.StateSpace expects, so the model hands over to python-control without an adapter. An algebraic loop that survives the input break is eliminated rather than rejected. A Subsystem needs no break or tap points at all: its interface already designates them, and since a subsystem is a block, nested hierarchies linearize hierarchically.

Block.linearize(t) now returns the local (A, B, C, D) it computes anyway. The return value was None, so nothing breaks.

Subsystem implements the block interface recursively. state (getter and setter), get_all and derivative previously read the dummy engine, which is only a marker and never written, so a subsystem with two internal integrators reported a single placeholder state.

Behaviour change

Simulation.linearize() now raises LinearizationError on a system containing a block with no valid linear model: Comparator, Relay, Switch, RNG, Counter, the logic blocks, the discrete-time blocks, ADC/DAC and Delay. It previously succeeded silently. A "linearized" system with a relay in it was never linear, and a numerical Jacobian there produces a number that looks like a linearization but is not one.

Fixes

steadystate() no longer crashes with LinAlgError: SVD did not converge when a block has a singular Newton matrix, which happens whenever a state's derivative does not depend on that state. See #242 for the remaining non-convergence on loop-determined equilibria.

What's Changed

  • Fix FMU co-simulation test platform selection and step-size/tolerance typing by @miguelpi314 in https://github.com/pathsim/pathsim/pull/236
  • Make linearization a query and add system level to_statespace() by @milanofthe in https://github.com/pathsim/pathsim/pull/239
  • Fix Block.linearize() DynamicOperator crash, Register 0-d array bug, and duplicate TestLUT1D class by @miguelpi314 in https://github.com/pathsim/pathsim/pull/240
  • Handle singular Newton matrices in the Anderson solver by @milanofthe in https://github.com/pathsim/pathsim/pull/241

New Contributors

  • @miguelpi314 made their first contribution in https://github.com/pathsim/pathsim/pull/236

Full Changelog: https://github.com/pathsim/pathsim/compare/v0.23.2...v0.24.0

Notes

If you use this software, please cite our article in the Journal of Open Source Software.

Files

pathsim/pathsim-v0.24.0.zip

Files (7.8 MB)

Name Size Download all
md5:545c3dde8b0793bff2ed4322caf43539
7.8 MB Preview Download

Additional details

Related works

Is supplement to
Software: https://github.com/pathsim/pathsim/tree/v0.24.0 (URL)

Software