简体   繁体   中英

Training an agent as a motor's controller using reinforcement learning in Matlab, but it doesn't train at all?

I'm trying to use reinforcement learning to train an agent as a controller of a motor.

After reading this example , I only made some minor modifications:

  1. Replace the watertank model with my motor's transfer function 69.4/(s+69.4), like this: 屏幕截图 .
  2. Set the sample time Ts and simulation time Tf to 1/8000 and 10, respectively. 屏幕截图2

However, the result is: 结果

It didn't do training at all :( The reward is always zero.

Could anybody give me advices on how to deal with this problem?

Very thankful in advance.

You maybe should check the output values that your transfer-function generates.

In the watertank-example you have the "stop simulation"-block, which stops the simulation if your "height"-value exeeds 20 or is lower than 0.

This would explain that your step-per-episode count is 0, because no step was taken due to incompatible values.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM