Go to Post This is far more then any little school extracurricular, this is a FIRST Robotics Team. - onecoolc [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

 
Reply
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 07-02-2017, 21:24
Hitchhiker 42's Avatar
Hitchhiker 42 Hitchhiker 42 is offline
Roboter
AKA: Mark Lavrentyev
FRC #4557 (FullMetal Falcons)
Team Role: Programmer
 
Join Date: Oct 2015
Rookie Year: 2015
Location: Cromwell, CT
Posts: 532
Hitchhiker 42 has a reputation beyond reputeHitchhiker 42 has a reputation beyond reputeHitchhiker 42 has a reputation beyond reputeHitchhiker 42 has a reputation beyond reputeHitchhiker 42 has a reputation beyond reputeHitchhiker 42 has a reputation beyond reputeHitchhiker 42 has a reputation beyond reputeHitchhiker 42 has a reputation beyond reputeHitchhiker 42 has a reputation beyond reputeHitchhiker 42 has a reputation beyond reputeHitchhiker 42 has a reputation beyond repute
PID I value tuning issues

Hey y'all,

So we've been tuning an auto-alignment feature for aligning with the goal (using vision). We're successfully filtering the image, and calculating the image and distance. In tele-op, we're using the built-in LabVIEW PID loop (see attached image). When we are tuning the PID constants, though, the I constant seems to have no effect. Our robot gets close to the needed angle, but even an extremely large (10^4) value for I seems to not change the robot's motion at all. Advice? We're relatively new to using PID control.

Set-up:
NavX
6WD Tank
Attached Thumbnails
Click image for larger version

Name:	snipsnip.png
Views:	81
Size:	53.0 KB
ID:	21740  
__________________



2016 - NE District Championship Entrepreneurship Award
2016 - Hartford District Industrial Design Award
2016 - Waterbury District Engineering Inspiration Award
Reply With Quote
  #2   Spotlight this post!  
Unread 07-02-2017, 23:12
Eryl2000's Avatar
Eryl2000 Eryl2000 is offline
Registered User
FRC #3024 ("My Favorite Team")
Team Role: Programmer
 
Join Date: Jan 2015
Rookie Year: 2014
Location: Ashland, OR
Posts: 9
Eryl2000 is on a distinguished road
Re: PID I value tuning issues

What PID gains are you using?

Also, it is important to note that the way LabView sets up their PID is different than you might expect. Changing the Kp gain actually effects Ki and Kd gains. This is because LabVIEW uses Kp, Ti, and Td, which is because of the different control setup they use.

Also, I believe that Ti is inversely proportional to Ki, so try decreasing it? I might be wrong, but I am pretty sure that is how it works.
Reply With Quote
  #3   Spotlight this post!  
Unread 07-02-2017, 23:19
Hitchhiker 42's Avatar
Hitchhiker 42 Hitchhiker 42 is offline
Roboter
AKA: Mark Lavrentyev
FRC #4557 (FullMetal Falcons)
Team Role: Programmer
 
Join Date: Oct 2015
Rookie Year: 2015
Location: Cromwell, CT
Posts: 532
Hitchhiker 42 has a reputation beyond reputeHitchhiker 42 has a reputation beyond reputeHitchhiker 42 has a reputation beyond reputeHitchhiker 42 has a reputation beyond reputeHitchhiker 42 has a reputation beyond reputeHitchhiker 42 has a reputation beyond reputeHitchhiker 42 has a reputation beyond reputeHitchhiker 42 has a reputation beyond reputeHitchhiker 42 has a reputation beyond reputeHitchhiker 42 has a reputation beyond reputeHitchhiker 42 has a reputation beyond repute
Re: PID I value tuning issues

Quote:
Originally Posted by Eryl2000 View Post
What PID gains are you using?
We got to a Kp = 0.025 which would make the robot oscillate around the target. Didn't tune the other values. I'll try what you suggested.
__________________



2016 - NE District Championship Entrepreneurship Award
2016 - Hartford District Industrial Design Award
2016 - Waterbury District Engineering Inspiration Award
Reply With Quote
  #4   Spotlight this post!  
Unread 07-02-2017, 23:22
Eryl2000's Avatar
Eryl2000 Eryl2000 is offline
Registered User
FRC #3024 ("My Favorite Team")
Team Role: Programmer
 
Join Date: Jan 2015
Rookie Year: 2014
Location: Ashland, OR
Posts: 9
Eryl2000 is on a distinguished road
Re: PID I value tuning issues

If you got the robot to oscillate you might consider increasing Kd. The derivative term is supposed to control damping.
Reply With Quote
  #5   Spotlight this post!  
Unread 07-02-2017, 23:25
Hitchhiker 42's Avatar
Hitchhiker 42 Hitchhiker 42 is offline
Roboter
AKA: Mark Lavrentyev
FRC #4557 (FullMetal Falcons)
Team Role: Programmer
 
Join Date: Oct 2015
Rookie Year: 2015
Location: Cromwell, CT
Posts: 532
Hitchhiker 42 has a reputation beyond reputeHitchhiker 42 has a reputation beyond reputeHitchhiker 42 has a reputation beyond reputeHitchhiker 42 has a reputation beyond reputeHitchhiker 42 has a reputation beyond reputeHitchhiker 42 has a reputation beyond reputeHitchhiker 42 has a reputation beyond reputeHitchhiker 42 has a reputation beyond reputeHitchhiker 42 has a reputation beyond reputeHitchhiker 42 has a reputation beyond reputeHitchhiker 42 has a reputation beyond repute
Re: PID I value tuning issues

Quote:
Originally Posted by Eryl2000 View Post
If you got the robot to oscillate you might consider increasing Kd. The derivative term is supposed to control damping.
Is Kd straightforward in LabVIEW, or does it depend on Kp and such as well?
__________________



2016 - NE District Championship Entrepreneurship Award
2016 - Hartford District Industrial Design Award
2016 - Waterbury District Engineering Inspiration Award
Reply With Quote
  #6   Spotlight this post!  
Unread 08-02-2017, 01:41
Eryl2000's Avatar
Eryl2000 Eryl2000 is offline
Registered User
FRC #3024 ("My Favorite Team")
Team Role: Programmer
 
Join Date: Jan 2015
Rookie Year: 2014
Location: Ashland, OR
Posts: 9
Eryl2000 is on a distinguished road
Re: PID I value tuning issues

Unfortunately, Kd is also dependent the proportional gain. LabVIEW uses Kp, Ti, and Td.

However, this does not mean you need to throw PID rules of thumb out the window. Generally, I find an oscillating Kp like you did, add Td until I achieve a step response that fully dampens after 1-2 small overshoots (or less depending on the application), and then add in Ti if necessary to reduce steady-state error.

Hope this helps
Reply With Quote
  #7   Spotlight this post!  
Unread 08-02-2017, 08:57
blturner blturner is offline
Registered User
FRC #5013 (Trobots)
Team Role: Mentor
 
Join Date: Nov 2011
Rookie Year: 2006
Location: Kansas City
Posts: 30
blturner is on a distinguished road
Re: PID I value tuning issues

I believe that Labview has Integral windup prevention. When the I gets above a certain value it sets it back to zero.
So if you set it super high it will think it is winding up and set it to zero all the time.
Integral would typically be rather small values. I don't have enough experience to tell you what range to expect. In my previous applications it would be from .0001 to .25
Reply With Quote
Reply


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 12:58.

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