Can a model from the machine learning app be turned into an FMU?
7 views (last 30 days)
Show older comments
Damon Delorenzis
on 9 Sep 2020
Commented: Hiro Yoshino
on 29 Sep 2022
I'm starting to learn to use the machine learning app and wondering if it's possible to turn a model created by that app into a FMU for use in ADAMS. Anyone have experience with this?
0 Comments
Accepted Answer
Hiro Yoshino
on 9 Sep 2020
I do not have any experiences but it sounds quite feasible.
Step1. train ML model
Step2. call the model from Simulink
Step3. Simulink --> FMU
You should note that not all of the ML models are compatible with Simulink. Looks like SVM can be used in Simulink.
3 Comments
sam l
on 28 Sep 2022
Hello I am working on similar project to create FMU from ML code.
But since the Mdl I created was Neural network - NARX and LSTM . How do I use above to export as FMU
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1139455/image.png)
Hiro Yoshino
on 29 Sep 2022
@sam l - May I know your MATLAB version?
As the error message said, the saved model is incompatible with the saveLearnerForCoder function.
The object you created is "network object" from shallow network. (https://www.mathworks.com/help/deeplearning/ref/network.train.html)
The simulink block that takes a LSTM neural network model is Stateful predict block. Unfortunately this does not take the one you created. You should trian LSTM models as seriesnetwork, dagnetwork, dlnetwork.
More Answers (0)
See Also
Categories
Find more on Modeling and Prediction with NARX and Time-Delay Networks in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!