View Single Post
  #10   Spotlight this post!  
Unread 09-04-2016, 12:22
Pault's Avatar
Pault Pault is offline
Registered User
FRC #0246 (Overclocked)
Team Role: College Student
 
Join Date: Jan 2013
Rookie Year: 2012
Location: Boston
Posts: 618
Pault has a reputation beyond reputePault has a reputation beyond reputePault has a reputation beyond reputePault has a reputation beyond reputePault has a reputation beyond reputePault has a reputation beyond reputePault has a reputation beyond reputePault has a reputation beyond reputePault has a reputation beyond reputePault has a reputation beyond reputePault has a reputation beyond repute
Re: PIDController + Latency - related issues

Quote:
Originally Posted by Alan Anderson View Post
You can't just use RPM as the input and motor speed as the output. If you do that, then when the speed reaches the set point, the motor output will be zero. You either have to post-integrate the controller's output, or you have to reinterpret the PID as DPX. Among other things, that means the I constant in a velocity controller will have the same effect as the P constant in a position controller.
I'm not sure what options are available in LABVIEW, but the simplest way to do this in Java, C++, and onboard PID with a Talon SRX is to just add a feedforward term.

To add feedforward (kF): remove all other constants, set the setpoint to a specific speed (I've heard 3/4 of max speed is usually pretty good). Then increase the kF until the actual speed matches the setpoint. From there, you can start to play with small values of P and I to get your controller more accurate.
Reply With Quote