hero_common icon indicating copy to clipboard operation
hero_common copied to clipboard

PID Controller Issue

Open Khaled3ly opened this issue 10 months ago • 1 comments

Hello @rezeck,

I can't understand how does the PID controller work as the input signal is velocity (cm/s) and encoder reading is also velocity (cm/s) while the output is PWM.... is there a transfer function that takes output (cm/s) and transfers it to PWM ?

Thanks in advance.

Screenshot 2024-04-21 at 2 14 21 AM

Khaled3ly avatar Apr 21 '24 00:04 Khaled3ly

Hi @Khaled3ly , I have been working on Hero robots for a while now. Talking about the PID controller, I believe that it takes in the desired and the current velocity and outputs adjusted velocity. This is then summed with the MotorDeadZone value. If you are looking at raw values of the adjusted velocity, then you might notice that it can go up to +250 or -250. The code below under VelocityControl.ino might give you a better explanation: Screenshot 2024-06-29 at 7 08 11 PM

I hope this helps.

-Varun Raveendra

varunraveendra avatar Jun 30 '24 01:06 varunraveendra