Skip to content
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

Compatibility to ModelingToolkit.jl? #122

Closed
dfabianus opened this issue Oct 24, 2023 · 4 comments
Closed

Compatibility to ModelingToolkit.jl? #122

dfabianus opened this issue Oct 24, 2023 · 4 comments

Comments

@dfabianus
Copy link

Hello Fredrik!

Thanks for the great package! :)

I want to icorporate the package for nonlinear state estimation. I have built an ODE model using MTK. Is there a straightforward way to use the estimators together with MTK models (ODESystem type)?

I assume I could try to convert my ODESystem to a ODEProblem from DifferentialEquations.jl and obtain the state transition function by the f-field. Or is there another way to automatically "de-modelingtoolkitize" the MTK model from symbolic to a numeric function in order to use it with the estimators?

Otherwise I would have to rewrite the model to a numeric function, right?

What is your thought on that?

@baggepinnen
Copy link
Owner

Hello! Yes, you can use this package with ModelingToolkit, there's a tutorial here
https://help.juliahub.com/juliasimcontrol/dev/examples/state_estimation/
It uses JuliaSimControl.jl, which is a proprietary package, but available for free for non-commercial use.

@baggepinnen
Copy link
Owner

You can also call the internal function ModelingToolkit.generate_control_function to build the $\dot x = f(x, u, p, t)$ function without using JuliaSimContorl, but with this approach, you'd have to write the output function manually.

@dfabianus
Copy link
Author

Thanks a lot! Exactly, what I was looking for. :)

@baggepinnen
Copy link
Owner

Cool, don't forget to discretize the continuous-time MTK dynamics.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants