View Single Post
  #1   Spotlight this post!  
Unread 18-02-2016, 23:33
JABot67 JABot67 is offline
Unregistered User
AKA: John Bottenberg
FRC #2930 (Sonic Squirrels)
Team Role: Engineer
 
Join Date: Feb 2009
Rookie Year: 2007
Location: Redmond, WA
Posts: 328
JABot67 has a reputation beyond reputeJABot67 has a reputation beyond reputeJABot67 has a reputation beyond reputeJABot67 has a reputation beyond reputeJABot67 has a reputation beyond reputeJABot67 has a reputation beyond reputeJABot67 has a reputation beyond reputeJABot67 has a reputation beyond reputeJABot67 has a reputation beyond reputeJABot67 has a reputation beyond reputeJABot67 has a reputation beyond repute
PID turning using gyro in LabVIEW

Hi LabVIEW Helpers,

My team is having a problem when trying to tune a PID algorithm for turning the drivebase to a specified relative angle.

The following autonomous code (using only P control) will work as intended, turning the robot approximately 180 degrees and staying there until the robot is disabled:

https://onedrive.live.com/redir?resi...nt=photo%2cPNG

What we find strange is that any non-zero kI will cause the robot to turn toward the setpoint (as expected) and then oscillate vigorously around the setpoint for eternity. This works with kI as low as 1e-12, i.e., nothing.

We would like to use PI control for our autonomous turning VI, but are perplexed by this behavior. As we decrease kI down to zero, we expect that the program's behavior should approach that of pure P control. Perhaps this is a floating point issue?

I remember in high school when programming in LabVIEW we ran into the same problem, but worked around it. Since we only needed to vary the robot's heading by a few degrees in 2010, we opted to set a very high kP and only use P control. This year is different, and we would like to have a turn VI that can reliably turn the robot any amount.

Besides providing us with a solution to this specific problem, what would really help us is some very good example code for turning to a specified relative angle autonomously. Any pointers, advice, or examples are appreciated!
__________________
John Bottenberg - University of Michigan '14 - Microsoft
FLL Team "Dark Matter": 2003-2005
Robofest Team "Dark Matter": 2005-2008
Team 67 Programmer: 2007-2010
Team 3322 Programming Mentor: 2012-2014
Team 2930 Engineering Mentor: 2015-????
Reply With Quote