Re:PID Control Challenges
by pbazarnik on Tuesday September 26, 2023 @07:26AM
(#37657689)
Can't get better than 0.88sec?
[ Parent
| on HN ]
The best you can do is 0.42, see a subcomment I made below. max force is limited to +-50
I got 0.4 sec with this:
function controlFunction(block)
{
const maxforce = 100.;
if (block.x < -1.01)
return maxforce;
else if (block.x < -0.01)
return -maxforce;
else
return -block.x - 2 * block.dx;
}