Run an exectuable (deployed from a differential eq system in Simulink) for one timestep, then give new input (iteratively)
2 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Felix Schönig
le 30 Nov 2021
Réponse apportée : Kshitij Chhabra
le 12 Jan 2022
I have modeled a vehicle dynamics problem with a few differential equations in Simulink. I want to export this to C-code and call it from a python script to make it part of an environment in a reinforcement learning project. In the python routine, I want to call the model with some inputs, read the output and give new inputs to the model for the next timestep. So it is like I want to iterate w.r.t. time through the model and provide new inputs from the RL agent each time.
Can you point me to the Mathworks documentation resource that is gonna be most helpful? Since I have zero experience in C code exporting from Simulink, I am having trouble finding the correct approach to do this.
0 commentaires
Réponse acceptée
Kshitij Chhabra
le 12 Jan 2022
Hi,
You can look at the documentation to get insights of exporting Simulink Model as C code. Further you can use this C code as modules in your Python Script.
Hope it helps!
0 commentaires
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Classical Control Design dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!