How this calculation works
Compare two deterministic continuous-time state models through an output-preserving relation between their state spaces.
R*=⋂ₖ ker([C1,−C2] diag(A1,A2)ᵏ); im[B1;B2]⊆R*.A worked example
The default first system has one state with A1=−1,B1=C1=1. The second adds an unobserved state with eigenvalue −2. The relation x1=x2,first leaves that extra state free and covers both state spaces.
Good to know
Deterministic rational continuous-time linear systems with combined state dimension at most 8 and matching input/output dimensions at most 2. Equal feedthrough matrices required. Compute maximal diag(A1,A2)-invariant relation in ker[C1,−C2], require im[B1;B2] inclusion and report both projection ranks. Optional initial-pair membership. Exclude independent nondeterministic disturbance channels.
Reference: van der Schaft, Equivalence of dynamical systems by bisimulation (opens in a new tab) ↗
Compare states rather than only transfer fractions
Two models may have different state dimensions while describing the same observable behavior under a common input. A relation pairs a state from the first model with a state from the second. Bisimulation requires the pair to continue producing matching outputs as both systems evolve with that same input.
This page accepts deterministic continuous-time state-space matrices. It does not handle separate unknown disturbance inputs whose trajectories could be chosen differently in the two systems. That broader nondeterministic notion requires additional geometric conditions. The distinction matters because equality of transfer functions from zero initial conditions is weaker than an all-state relation covering both systems.
Compare this with the Transfer function to minimal state space realization calculator. Compare two supplied state-space systems by constructing their maximal common-input output-preserving state relation, including nonminimal states and projection coverage. Existing realization constructs a single model from a transfer function rather than comparing state relations.
Build the joint state-space conditions
Stack the states as z=[x1;x2]. Their autonomous joint matrix is block diagonal diag(A1,A2), and their output difference is [C1,−C2]z. A valid relation must lie inside the kernel of that output-difference matrix. It must also remain invariant under the joint autonomous dynamics.
Equal direct-feedthrough matrices D1=D2 are checked separately. Otherwise a common input can create an immediate output difference, regardless of the paired state. The input image [B1;B2] must lie inside the relation as well, ensuring that applying an arbitrary shared input does not drive a related pair outside it.
Compute the maximal invariant relation
The calculator stacks [C1,−C2] and its products with successive powers of the block-diagonal matrix. Its kernel contains exactly the pairs whose autonomous output difference and successive derivatives vanish. Powers through the combined state dimension minus one suffice by Cayley–Hamilton, so this is a finite exact construction.
The resulting basis spans the largest autonomous output-equality relation. The code then checks common-input inclusion. If that inclusion fails, no invariant output-equality subspace can contain the required input image, so the full bisimulation test fails. These are rational rank and containment tests, not comparisons of approximately sampled response curves.
Understand the two projection requirements
A relation can match a few special states without covering every state of either system. To claim full bisimilarity here, projection onto the first state space must have rank n1 and projection onto the second must have rank n2. These tests ensure each state can be paired with at least one state in the other model.
The paired state need not be unique. Extra unobservable coordinates may remain free, making the relation higher-dimensional than a graph of an invertible coordinate transform. Conversely, a zero-dimensional relation may correctly match only the zero states while failing full state coverage. The output lists both projection ranks so those situations are not hidden behind a single yes/no answer.
Inspect the nonminimal default
The first model obeys xdot=−x+u and y=x. The second has states z1,z2 with z1dot=−z1+u, z2dot=−2z2 and y=z1. Pair x with z1 by imposing x=z1; place no restriction on z2. The extra coordinate is unobservable and cannot alter the measured output.
This relation has dimension two. Its first projection has rank one and its second rank two, so both full state spaces are covered. The common input vector [1,1,0] respects x=z1, and both feedthrough matrices are zero. Thus the models pass the stated deterministic bisimulation test even though their state dimensions differ.
Use failures to identify the mismatch
A feedthrough mismatch means the systems respond differently to the instantaneous input term. An input-inclusion failure means the chosen common input directions violate the maximal output-equality relation. Insufficient projection rank means some states cannot be matched, even if the relation is valid on a smaller subset of state pairs.
A dynamics change can also break invariance. If one visible state decays at −1 and the other at −2, equal current outputs need not remain equal. This test detects that mismatch through the stacked derivative conditions. It does not attribute the mismatch to measurement noise or estimate better model parameters; it compares the entered exact systems.
Keep stability and numerical modeling separate
Bisimilarity is an equivalence question, not a stability guarantee. The default extra state happens to be stable, but an unobservable unstable coordinate can also remain invisible at the output while the algebraic relation passes. If internal safety matters, inspect the full dynamics of each model rather than only the shared output behavior.
The implementation uses bounded exact rational arithmetic and a combined state limit of eight. Rational decimals are interpreted as entered, with no near-cancellation tolerance. In measured models, tiny unequal coefficients may therefore change the exact result. Treat that outcome as a reason to study approximation or identification error separately, not to silently round until an equivalence claim appears.
A few questions, answered
Can models of different dimension pass?
Yes. A relation may cover both state spaces while leaving additional unobservable coordinates free, as in the default nonminimal example.
Is matching a transfer function enough?
Not for this full-state test. The relation must also cover both state spaces and be invariant under dynamics and the common input.
Does bisimilar mean stable?
No. Equivalence of observable behavior does not rule out hidden unstable state directions.
Are unknown disturbances supported?
No. This implementation compares deterministic systems under the same input. Independent nondeterministic disturbance channels are outside its scope.