Steady state error in DDPG control
Mostra commenti meno recenti
I am trying to make some modifications in Control Water Level in a Tank Using a DDPG Agent example. I want to reduce sample time from 1.0 to 0.5, so I set Ts = 0.5. Consequently, I had to make adjustment on StopTrainingValue, i.e., changed its value from 2000 to 4000. The training process was successfully completed as it can be seen below.

But there is something unexpected happened: this modifications introduce a steady state error (or something similar to) that wasn't there in the original example.

How to overcome this steady state error? Do I need to make additional adjustments, e.g. make changes to the structure of observations, reward function, actor/critic network, StopTrainingCriteria, etc?
Update:
This is the error I get using pre-trained agent (doTraining = false, no change on the original example)

This is the error I get using re-trained agent (doTraining = true, no change on the original example)

3 Commenti
Sam Chak
il 26 Dic 2024
When you trained the DDPG agent, what was the threshold that you allowed for the steady-state error?
The values of steady-state error less than the threshold should be rewarded, otherwise be penalised.
Sam Chak
il 26 Dic 2024
I see. This probably implies that changing the sampling time affects the learning efficiency of the RL algorithm in tuning the PI Controller gains.
You may manually adjust the tuning parameter, but night as well use an optimization algorithm like GA or PSO to auto-tune all other hyperparameters in RL.
Risposte (2)
Divyanshu
il 26 Dic 2024
0 voti
To get the same results and to avoid the error for sample time 0.5, you might have to change 'Tf' as well and set its value to '100'. This will ensure that the 'MaxStepsPerEpisode' parameter of 'rlTrainingOptions' still has the correct value which the example expects.
Since you only tried to modify the sample time, incorrect value of 'MaxStepsPerEpisode' was computed and maybe that can be a reason for the error.
I hope this helps. However, to find the exact root cause of the error, I might the snapshot of the error message and the reproduction steps.
1 Commento
Categorie
Scopri di più su Reinforcement Learning in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

