필터 지우기
필터 지우기

Train neural network in Simulink

조회 수: 11 (최근 30일)
Tristan Behr
Tristan Behr 2024년 6월 7일
답변: Pavan Sahith 2024년 6월 17일
Hello everyone, is there a way to train a neural network in Simulink or alternatively import a Modelica/Dymola model into MATLAB and train the network in MATLAB?
I have a Dymola model for which I would like to train a neural network for decision making. Currently, I export my model from Dymola as an FMU and can also load it into Simulink, but I haven't found a function in Simulink to train a network with it. If there is a way to export the network differently from Dymola to solve my problems, that would also help me.
Does anybody know a solution for my problem?

채택된 답변

Pavan Sahith
Pavan Sahith 2024년 6월 17일
Hello Tristan,
I see that you are having a Dymola model and planning to export it as an FMU for use in Simulink. It sounds like your goal is to train your model.
I assume you have the training data, if not, you can prepare the data from your FMU to train the neural network. This involves running simulations with different inputs and collecting the corresponding outputs to create a dataset. Use the 'From Workspace' and 'To Workspace' blocks to handle input and output data between Simulink and MATLAB.
After you have the training data ,you can try the following below steps:
  • MATLAB functions such as trainnet along with trainingOptions can be used to define the training parameters and train the network.
  • Once the neural network is trained, you can use the GENSIM command from the Neural Network Toolbox to export the network to Simulink and simulate it.
  • After integrating the trained network, simulate your Simulink model to validate the performance of the neural network. Adjust the network and retrain as necessary based on the simulation results.
You can refer to the following MathWorks documentation links to know more about
Consider referring to these similar MATLAB answers which might help you
Hope this helps you get started.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Sequence and Numeric Feature Data Workflows에 대해 자세히 알아보기

제품


릴리스

R2023a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by