How to train a Reinforcement Learning agent from 0.02s of simulation

I wondered if the training of the RL agent can start from 0.02s of the simulation as I want to use THD of the signal as the reward. And I can only get a stable value of THD after a cycle which is 0.02s. Or are there any suggestions? Thank you.

 Réponse acceptée

I believe you can put the RL Agent block in an enabled subsystem and set the enable time to be 0.02 seconds.
Hope that helps

7 commentaires

Thank you for the reply. I tried but it failed and during the first cycle (0.02s), the agent has no action output which will lead to error as the action will be output to the system controller for normal operation.
Here is the error. Do you have suggestions for this? Thank you very much.
If an action is expected from t=0 then the error makes sense. If you want the action during this short initial window to not come from the agent, then set it to a value tha makes sense for your example
Yes. I have set a suitable value during the short period while it still leads to the error attached in the reply above. I think it is due to the m file starts the training of agent anyway while it cannot get access to the agent in the simulink block as I put it into a external enabled subsystem.
That may require further investigation (and unfortunately we do not have any relevant examples I can point you to). Can you please create a technical support request? Thank you
Sure. Thank you very much for your reply.

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Reinforcement Learning Toolbox dans Centre d'aide et File Exchange

Produits

Version

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by