-
-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Structural Analysis for algebraic difference equations (DiscreteSystem) #175
Comments
@RodrigoZepeda |
@pogudingleb
I am happy to generate more toy models to test the algorithms and help any way I can within my limited expertise on the subject. |
@RodrigoZepeda using ModelingToolkit
using StructuralIdentifiability
@parameters α β
@variables t S(t) I(t) R(t) y(t)
D = Difference(t; dt = 1.0)
eqs = [D(S) ~ S - β * S * I, D(I) ~ I + β * S * I - α * I, D(R) ~ R + α * I]
@named sir = DiscreteSystem(eqs)
println(assess_local_identifiability(sir; measured_quantities = [y ~ I])) which will print a dictionary from parameters and states to their identifiability (under assumption that the |
Woow. I'll take a look during the week for feedback and trying additional systems. Thanks! |
Quick clarification: the algorithm check identifiability for generic initial conditions and exciting enough inputs, if the algorithm reports identifiability there may be still some singular solutions from which the parameters/states of interest cannot be identified. |
There seems to be an issue when the parameter is a denominator as the following example shows:
which throws an error:
Of course, as a temporal solution I can always change variables and do |
@RodrigoZepeda using ModelingToolkit, StructuralIdentifiability
@parameters α β
@variables t x(t) y1(t) y2(t)
D = Difference(t; dt=1.0)
eqs = [D(x) ~ α + (1/β)*x] #Doesn't work
@named eqs = DiscreteSystem(eqs)
assess_local_identifiability(eqs; measured_quantities = [y1 ~ x, y2 ~ β]) Let me know if this makes sense. |
Ohhhhh ok this solves many of the weird isues I was having |
@RodrigoZepeda using ModelingToolkit
using StructuralIdentifiability
@parameters α β
@variables t S(t) I(t) R(t) y(t)
D = Difference(t; dt = 1.0)
eqs = [D(S) ~ S - β * S * I, D(I) ~ I + β * S * I - α * I, D(R) ~ R + α * I]
@named sir = DiscreteSystem(eqs)
println(assess_local_identifiability(sir; measured_quantities = [I])) |
Awesome! I'll try and add a tutorial on this to the documentation during the following week (June 20-something) |
@RodrigoZepeda |
It looks great! Thank you. I'm out of the office for a while but will definitley come back here in ~ a month. Last time I completely forgot about my comment but feel free to ping me if I don't come back. |
Thanks! Note that I have misinterpreted |
Some biological models are represented via difference equations of the form:$x(t + 1) = f\big( x(t), \theta \big)$ . According to Chris Rackauckas on Twitter, an extension of the identifiability functions could be made for those systems using the
DiscreteSystem
fromModelingToolkit
.Some references on the subject are:
Nõmm, Sven, and C. H. Moog. "Identifiability of discrete-time nonlinear systems." IFAC Proceedings Volumes 37.13 (2004): 333-338.
Nõmm, Sven, and Claude H. Moog. "Further results on identifiability of discrete-time nonlinear systems." Automatica 68 (2016): 69-74.
The text was updated successfully, but these errors were encountered: