View Single Post
  #12   Spotlight this post!  
Unread 11-03-2016, 01:58
AustinSchuh AustinSchuh is offline
Registered User
FRC #0971 (Spartan Robotics) #254 (The Cheesy Poofs)
Team Role: Engineer
 
Join Date: Feb 2005
Rookie Year: 1999
Location: Los Altos, CA
Posts: 802
AustinSchuh has a reputation beyond reputeAustinSchuh has a reputation beyond reputeAustinSchuh has a reputation beyond reputeAustinSchuh has a reputation beyond reputeAustinSchuh has a reputation beyond reputeAustinSchuh has a reputation beyond reputeAustinSchuh has a reputation beyond reputeAustinSchuh has a reputation beyond reputeAustinSchuh has a reputation beyond reputeAustinSchuh has a reputation beyond reputeAustinSchuh has a reputation beyond repute
Re: PID with encoder

Quote:
Originally Posted by cpapplefamily View Post
We are using a CANTalon and have tested the "setVoltageRampRate" but it seems to play badly with position overshoot.
This is one of the classic problems that people run into with controls. The math behind most control loops assumes that the loops and system are linear and time-invariant. That can essentially be boiled down to meaning that your system can be simply modeled as an ordinary differential equation. You can't model taking the output of your PID loop and doing a voltage ramp on it as an ODE. I'd recommend only doing operations that can be modeled with differential equations (or constant coefficient difference equations since we are actually operating in discrete time) in your control loops.

In this case, that would be doing a current loop and limiting the current, or feeding a motion profile into the talon (or from outside the talon). There are other methods that also work, but they won't work without being able to modify the firmware on the talon.