get error runing TrainTD3AgentForPMSMControlExample.mlx
20 次查看(过去 30 天)
显示 更早的评论
win10 matlabR2024a
try to run TrainTD3AgentForPMSMControlExample.mlx example
only change :
106 doTraining = true; %false;
i'm trying to train the agent again.
got error:
'mcb_pmsm_foc_sim_RL/Current Control/Input Scaling/ Calculate Position and Speed/Speed Measurement' 中出错: 无法计算封装初始化命令。
out = nestedRunEpisode(policy);
result = run_internal_(this);
result = run_(this);
trainResult = run(trainer);
result = run_(this);
trainingResult = run(tm);
原因:
在仿真运行时,无法更改 'mcb_pmsm_foc_sim_RL/Current Control/Input Scaling/ Calculate Position and Speed/Speed Measurement' 的属性 'Enabled'
0 个评论
回答(2 个)
MULI
2024-11-14,11:06
编辑:MULI
2024-11-14,12:33
I understand that you are facing an issue in the "TrainTD3AgentForPMSMControl" example model when “doTraining” flag is set to “true”. I encountered a similiar issue and was able to resolve it through the following workaround:
- In the example model, navigate to the block located at"Current Control/Input Scaling/Calculate Position and Speed/Speed Measurement".
- Replace the parameter values in the "Speed Measurement" block with their respective numeric values and datatype:
Discrete step size (s):0.0002
Per unit speed (RPM):3476
Speed data type:'single'
For another potential workaround to the issue:
- In the example model find the "Speed Measurement" block at "Current Control/Input Scaling/Calculate Position and Speed".
- Replace this block with the Speed Measurement block from the "Motor Control Blockset HDL Support/Sensor Decoders" library.
- Set the block parameters to the same values as in the original block.
Hope this is helpful!
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Block Libraries 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!