Hello,
I am tuning my PD loop and I have a question about tuning. Should the consistent oscillations caused by increasing the kP be a steady back and forth motion for a long period of time, or should the robot only oscillate once or twice and then stop?
I would suggest trying to understand what is happening at a conceptual level as it varies between how ppl code it. My pid class uses decimal places and caps between 1 and -1, but yours might different. Understanding what P and D are doing and how it is implemented in your program you should be able to figure out how much you need to change the kp and kd values.
Another completely valid way to work on this is to just pick “random” numbers and see if there is less oscillations.
And to tell if your close is to observe if the drive is oscillation less. But there isn’t any definitive way to say that you are close as it depends on many factors.
You would start at 0.0000 and you tune the decimal places one by one like weighing a scale:
Except think of it as the big weight is the tenths place for kP, the medium weight is the hundredths place for kP, and the small weight is the thousandths place for kP.