How can I conduct a Neural Network online training within simulink?

6 Ansichten (letzte 30 Tage)
Yang Chen
Yang Chen am 17 Jul. 2022
Beantwortet: Vinayak am 6 Feb. 2024
I have a UAV simulink framework, where I need to design a new control algorithm by deep learning. However, the deep learning toolbox can only support offline training. The design of control algorithm need to be based on feedback data, so I have to implement online training in simulink. Is there any method to achieve that?

Antworten (1)

Vinayak
Vinayak am 6 Feb. 2024
Hi Yang Chen,
I believe you would like to implement online training using Simulink. Since the deep learning toolbox for Simulink supports only offline training, I suggest a workaround to achieve the requirement. The challenge is to transfer your feedback data from Simulink environment to the internet where you are performing the training.
Utilize Simulink blocks for data collection from your UAV simulation, capturing the necessary feedback data for training. Save this data within your model.
Create a MATLAB function block or script to load the saved data and implement the online training loop. Ensure the loop updates your model based on the training data for subsequent simulations.
Establish a feedback loop within your Simulink model to continuously repeat the online training steps during the simulation. This approach ensures your model evolves in real-time based on feedback.
The pseudocode for the script/function block would look something like:
currentData = load(feedback.mat);
trainingData = appendData(trainingData, currentData);
% Perform functions/updates
updatedAlgorithm(setpoint, trainingData);
You may refer to the following documentation for further reading:
I hope this helps!

Kategorien

Mehr zu Sequence and Numeric Feature Data Workflows finden Sie in Help Center und File Exchange

Produkte


Version

R2022a

Community Treasure Hunt

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

Start Hunting!

Translated by