Go to Post Although it is tempting, try not to toot your own horn in this thread. While you may have an awesome bot, the real compliment should come from other teams. - Andy Baker [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Closed Thread
Thread Tools Rating: Thread Rating: 2 votes, 5.00 average. Display Modes
  #1   Spotlight this post!  
Unread 03-08-2016, 10:47 AM
Ben Wolsieffer Ben Wolsieffer is offline
Dartmouth 2020
AKA: lopsided98
FRC #2084 (Robots by the C)
Team Role: Alumni
 
Join Date: Jan 2011
Rookie Year: 2011
Location: Manchester, MA (Hanover, NH)
Posts: 520
Ben Wolsieffer has much to be proud ofBen Wolsieffer has much to be proud ofBen Wolsieffer has much to be proud ofBen Wolsieffer has much to be proud ofBen Wolsieffer has much to be proud ofBen Wolsieffer has much to be proud ofBen Wolsieffer has much to be proud ofBen Wolsieffer has much to be proud of
Heading PID tips

Like many teams this year, we are using a PID controller and a gyro to aim our robot at the high goal (after acquiring the target heading using our vision system).

Our PID controller has been tuned so that it is pretty consistent, but I would like to try to eliminate the small amount of error that is present when the robot stops moving, which causes us to sometimes miss shots.

This problem seems to be mainly caused by the mechanical deadband of the drive system (ie. the amount of throttle that is required before the robot actually starts to rotate). If I increase the I term enough to eliminate the error, the robot starts oscillating for a long time before it finally settles.

As a lot of teams have had to deal with this same situation, I was wondering if anyone had any tips or tricks to improve the automated turning performance of the robot.
__________________



2016 North Shore District - Semifinalists and Excellence in Engineering Award
2015 Northeastern University District - Semifinalists and Creativity Award
2014 Granite State District - Semifinalists and Innovation in Control Award
2012 Boston Regional - Finalists
  #2   Spotlight this post!  
Unread 03-08-2016, 11:33 AM
Jared Russell's Avatar
Jared Russell Jared Russell is offline
Taking a year (mostly) off
FRC #0254 (The Cheesy Poofs), FRC #0341 (Miss Daisy)
Team Role: Engineer
 
Join Date: Nov 2002
Rookie Year: 2001
Location: San Francisco, CA
Posts: 3,069
Jared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond repute
Re: Heading PID tips

This is a constant source of annoyance for doing precise turning with high-friction wheels. Some solutions that have worked for us in the past:

1) Figure out what the minimum required output is to get the robot to turn at all. If the PID output is less than this magnitude, output this magnitude (with the same sign as the PID output).

2) Instead of using your heading PID loop to generate PWM commands directly, use it to generate velocity commands that a second PID loop on each side of the drive will attempt to follow. Note that good velocity control at low speeds requires a really fast control loop and accurate velocity measurement. The CAN Talon SRX and CTRE Mag Encoder have impressed us in this regard.

3) Motion profiling can help (a bit) to ensure that the robot smoothly glides to its final heading, but this method works best in conjunction with 1 and/or 2.

Last edited by Jared Russell : 03-08-2016 at 12:19 PM. Reason: I accidentally a word
  #3   Spotlight this post!  
Unread 03-08-2016, 01:32 PM
GreyingJay GreyingJay is offline
Robonut
AKA: Mr. Lam
FRC #2706 (Merge Robotics)
Team Role: Mentor
 
Join Date: Mar 2015
Rookie Year: 2015
Location: Ottawa, Canada
Posts: 738
GreyingJay has a reputation beyond reputeGreyingJay has a reputation beyond reputeGreyingJay has a reputation beyond reputeGreyingJay has a reputation beyond reputeGreyingJay has a reputation beyond reputeGreyingJay has a reputation beyond reputeGreyingJay has a reputation beyond reputeGreyingJay has a reputation beyond reputeGreyingJay has a reputation beyond reputeGreyingJay has a reputation beyond reputeGreyingJay has a reputation beyond repute
Re: Heading PID tips

Thanks for the tips!
  #4   Spotlight this post!  
Unread 03-08-2016, 02:06 PM
cjl2625's Avatar
cjl2625 cjl2625 is offline
apel py
AKA: Cory Lynch
FRC #2067 (Apple Pi)
Team Role: Programmer
 
Join Date: Jan 2013
Rookie Year: 2013
Location: Guilford, CT
Posts: 412
cjl2625 is a splendid one to beholdcjl2625 is a splendid one to beholdcjl2625 is a splendid one to beholdcjl2625 is a splendid one to beholdcjl2625 is a splendid one to beholdcjl2625 is a splendid one to beholdcjl2625 is a splendid one to beholdcjl2625 is a splendid one to behold
Re: Heading PID tips

Quote:
Originally Posted by Jared Russell View Post
1) Figure out what the minimum required output is to get the robot to turn at all. If the PID output is less than this magnitude, output this magnitude (with the same sign as the PID output).
Wouldn't this cause oscillations, if the output switches between positive and negative of this magnitude?

As a related idea that I had, I wonder if it would make sense to find some magnitude where the robot almost turns (but is still stopped) and add it to the PID output. Maybe it would simulate low friction or something.
__________________
Head Programmer / Driver
  #5   Spotlight this post!  
Unread 03-08-2016, 02:18 PM
Jared Russell's Avatar
Jared Russell Jared Russell is offline
Taking a year (mostly) off
FRC #0254 (The Cheesy Poofs), FRC #0341 (Miss Daisy)
Team Role: Engineer
 
Join Date: Nov 2002
Rookie Year: 2001
Location: San Francisco, CA
Posts: 3,069
Jared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond repute
Re: Heading PID tips

Quote:
Originally Posted by cjl2625 View Post
Wouldn't this cause oscillations, if the output switches between positive and negative of this magnitude?

As a related idea that I had, I wonder if it would make sense to find some magnitude where the robot almost turns (but is still stopped) and add it to the PID output. Maybe it would simulate low friction or something.
In practice you are typically moving so slowly at this minimum output that the oscillation shouldn't be a problem (you probably have a small deadband around the setpoint at which point you say "good enough" and cut power).

Adding a minimum term to the output is also a totally valid approach that accomplishes the same thing and only differs in the details.
Closed Thread


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 05:25 AM.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi