StructuralIdentifiability.jl for more complicated systems

Hi all, I am looking at StructuralIdentifiability.jl along with ModelingToolkit.jl to see what I can do with it. Ideally, I would use it to first find out which parameters in my models are actually identifiable, and then estimate the parameters by fitting to test data. Models in questions are of things like engines and thermal fluid systems.

It seems that only ODE where the right hand side of x_dot = f(x) can be written as a rational function of the variables are supported-- p(x) / q(x) where p and q are polynomials of the variables x.

So it seems like functions like sin(), cos() and so on are out. For example this toy model for the flight of a cannonball can’t be analyzed for identifiability, unless the dynamics are linearized, which kind of defeats the purpose.

using StructuralIdentifiability
using ModelingToolkit
using ModelingToolkit: t_nounits as t, D_nounits as D

vars = @variables begin
    x(t),
    y(t),
    v(t),
    γ(t),
    Drag(t)
end
pars = @parameters begin
    g = 9.80665
    ρ = 1.225
    m = 100
    Cd = 1.0
    A = 0.1
end

# Flight path equations of motion. Doesn't work
eqs = [
    Drag ~ -0.5 * ρ * v^2 * A * Cd,
    D(v) ~ Drag / m - g * sin(γ),
    D(γ) ~ -g * cos(γ) / v,
    D(y) ~ v * sin(γ),
    D(x) ~ v * cos(γ),
]

# # Works
# eqs = [
#     Drag ~ -0.5 * ρ * v^2 * A * Cd,
#     D(v) ~ Drag / m - g * γ,
#     D(γ) ~ -g * (1 - γ^2) / v,
#     D(y) ~ v * γ,
#     D(x) ~ v * (1 - γ^2),
# ]

@named _sys = System(eqs, t, vars, pars)
cannonball = mtkcompile(_sys)

u0 = [x => 0, y => 0, γ => deg2rad(45), v => 100]
prob = ODEProblem(cannonball, u0, (0, 10))

sol = solve(prob)
assess_identifiability(cannonball, known_ic=[x, y, γ, v])

The systems I would like to analyze are far more complicated than this, with plenty of thermodynamic state interpolations, square root functions, and conditional clauses, which all seem like things that wouldn’t be compatible with the rational function requirement.

I’m curious to know if there might be other approaches I am missing, or if what I am trying to do is beyond the state of the art.