View Single Post
  #6   Spotlight this post!  
Unread 21-01-2017, 13:58
TylerHarmon's Avatar
TylerHarmon TylerHarmon is offline
Registered User
no team
 
Join Date: Jan 2016
Rookie Year: 2014
Location: Westminster, CO
Posts: 25
TylerHarmon is an unknown quantity at this point
Re: PID loop speeds up as it gets closer to target?

Yes, I looked over your code, but I am unfamiliar with CPP.

Try printing out your PID error to the console. Knowing where the PID loop thinks it is can be very useful for debugging. If the PID loop is speeding up towards the setpoint, it could be that the PID does not correctly understand where it is, or the PID gain constants could be tuned poorly.

Seeing as you are only using a P term right now, I would suggest looking at the error that your PID loop sees. As I said earlier, the control system still needs to be in-phase. What you are seeing here could very likely be caused by a gyroscope and drive train that are out of phase.
Reply With Quote