I want to use Arduino to train RLAgent with run with IO mode.
10 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Cheng David
am 21 Dez. 2023
Bearbeitet: Venkat Siddarth Reddy
am 27 Dez. 2023
To create the environment, I used the provided DDPG'' water tank example.
When I execute the Run with IO mode in Simulink, it works normally, but an error occurs when I want to use the Train function in matlab.
Is there any other way I can train my experiment?
0 Kommentare
Akzeptierte Antwort
Venkat Siddarth Reddy
am 27 Dez. 2023
Bearbeitet: Venkat Siddarth Reddy
am 27 Dez. 2023
I understand that you are trying to train the RL (Reinforcement Learning) agent in MATLAB, but you are facing the error "External mode simulation is not supported for simulations started using the sim function."
Here, I am assuming that the sentence "use the train function in MATLAB" implies that the agent is to be trained independently of the Arduino board.
From the error provided,it seems that the model simulation mode is set to "external",as it was previously simulated using hardware by executing "Run with IO" option.
To resolve this issue, change the model simulation to non-hardware related mode (for example, "normal", "accelerator" etc.).
Refer to the following code snippet to change the simulation mode to "normal":
set_param(model,'SimulationMode','normal');
However if you want to simulate the model with simulation mode set to "external", you can change the simulation command to "start" and run it:
set_param(model,'SimulationCommand','start')
Refer to the following documentation to learn more about simulation in various modes:
I hope this help you in resolving the issue.
0 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Arduino Hardware finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!