Hey there, so basically I made a PID loop for our autonomous (it’s more of a P loop but yeah), and it is working like it should it’s going to the actual value but the only problem is that at the end it slows down a lot and it takes a lot of time to get to the right value. At the start, it goes fast and then slows down when it gets closer to the set value
I was wondering what value I should change/add to make the end go faster but still go at the right value
P says “the further I am away from where I want to be,the harder I try.” So as you get close it doesn’t try very hard. Think about a robot that needs to work hard to turn. As it gets close to where it is going, P isn’t going to try very hard. Think about your robot when you drive it. Is it a quick turner? I’m guessing no.
A proprtional controller is just this. Effort proportions to error. You can turn up the P until you get overshoot. You can then tone it down a little or go to a PD controller to help with stopping. The P controller doesn’t care much about sample rate, but once you add D or I, sample rates matter.
I don’t use the PD until i get 5 inches or 10 degrees from my desired value (error decides which direction to go) and I use the abs(error) to figure that out. I recommend not using PD or PID for all of your distance just for the last bit as I have found this faster and still accurate and if you are still having issues