-
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
I have figured it out. It requires me to design the loss function to account for the discrepancy between my nominal dynamics prediction and real states. And I can save the trained model using torch.save() and then use it later in Casadi. |
Beta Was this translation helpful? Give feedback.
-
Just an update: I have successfully trained the model for \phi using a toy example. First, I created a state space model based on nominal dynamics (defined by A, B matrix)
Then, I feed the state space model into the integrators
Note that this is a bit different from my formulation above as I am learning the continuous dynamics using \phi, instead of the discrete dynamics. The final result is pretty good on the testing data: |
Beta Was this translation helpful? Give feedback.
Hi @gy2256 . Yes this problem is feasible in Neuromancer.
The system identification of unmodeled dynamics conceptually falls in the gray-box modeling task with few continuous-time example in our library:
https://github.com/pnnl/neuromancer/blob/master/examples/ODEs/Part_2_param_estim_ODE.ipynb
https://github.com/pnnl/neuromancer/blob/master/examples/ODEs/Part_3_UDE.ipynb
Modification of these in the context of state space models with neural components should be straightforward.
See this example on neural state space models, where instead of black-box models for A, B, you can use pre-defined matrices as inputs to the model and learn only the unknown part \phi(u,x).
https://github.com/pnnl/…