Training an agent of reinforcement learning as a motor's controller, but Matlab doesn't not do training at all?
Afficher commentaires plus anciens
Hi, I'm trying to use reinforcement learning to train an agent as a controller of a motor.
My motor's transfer function is:
% The input and output of this transfer function are current and speed, respectively.
69.4/(s+69.4)
1. Replace the watertank model with my motor's transfer function like below:

2. Set the sample time Ts and simulation time Tf to 1/8000 and 10, respectively.

However, the result is:

It doesn't work :(
The reward is always zero, and I don't know why.
Could anybody give me advices on how to deal with this problem?
Very thankful in advance.
Réponses (2)
Emmanouil Tzorakoleftherakis
le 16 Sep 2019
Modifié(e) : Emmanouil Tzorakoleftherakis
le 16 Sep 2019
1 vote
Hello,
It is hard to pinpoint the problem exactly without a repro model, but sounds like training stops prematurely. Can you remove the "Stop Simulation" subsystem from your model? I suspect that this flag is always set to true for the new plant.
Smita Sadhukhan
le 14 Juil 2022
Modifié(e) : Smita Sadhukhan
le 14 Juil 2022
1 vote
I have tried removing the stop simulation block but the it is not giving proper reward to train the model.After traing the output is not even going close to the set point. Can you please look into this problem and help me.
1 commentaire
Shengyi
le 23 Oct 2024
I also encountered the same problem. After replacing the original system with a new system and resetting the limits and reward function, the reward was always 0. Have you solved this problem?
Catégories
En savoir plus sur Reinforcement Learning dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!