ModelingToolkit.jl
ModelingToolkit.jl copied to clipboard
Reduce system to DAE index 0 in the presence of unbound inputs
Following up on the discussion in https://github.com/SciML/ModelingToolkit.jl/issues/1303#issuecomment-960857224
It would be beneficial to have a version of dae_index_lowering/tearing
that is aware of unbound_inputs
in the sense of #1322
The motivation is detailed in the linked issue comment above, get a linear statespace system from a linearization function.
Most users would probably like to have this linearized system on the form
x' = Ax + Bu
y = Cx + Du
but advanced users could use the index 1 form below as well
Ex' = Ax + Bu
y = Cx + Du
The problem with the current version of dae_index_lowering/tearing
is that they do not distinguish between a state and a variable marked as [input = true]
and thus fail to simplify the system.
To clarify, we only need to reduce away the linear algebraic equations in the linearized model instead of trying to solve nonlinear algebraic equations.
This is now handled correctly by linearize