Go to Post Rules arent built around robots. Robots are built around the rules. - dodar [more]
Home
Go Back   Chief Delphi > Technical > Programming > NI LabVIEW
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 16-02-2014, 23:25
xXhunter47Xx's Avatar
xXhunter47Xx xXhunter47Xx is offline
Lord of Lazy
AKA: Austin $wagmaster1337
FRC #4738 (Patribots)
Team Role: College Student
 
Join Date: Jan 2014
Rookie Year: 2013
Location: San Diego
Posts: 305
xXhunter47Xx will become famous soon enough
Information on PID Control

Currently, we are running CANBus mode on the jags without PID Speed control.
I've set up the PID Speed control and would like to know exactly what values to put where. I've heard that the "P" value is the only one that needs to be edited.
So my question is;
How are "P" values considered? Is it values between -1 and 1 or something else?
Reply With Quote
  #2   Spotlight this post!  
Unread 17-02-2014, 11:17
ShaneDugas ShaneDugas is offline
Registered User
FRC #4053
 
Join Date: Feb 2014
Location: Prairieville La
Posts: 1
ShaneDugas is an unknown quantity at this point
Re: Information on PID Control

(P)roportional, (I)ntegral, (D)erivative. These are all terms of gain in the PID equation. Without getting into the math, I would try a .25 or .5 to start with with and then gradually increase (to speed up) or decrease (to slow down) from there.
Reply With Quote
  #3   Spotlight this post!  
Unread 17-02-2014, 11:31
gpetilli gpetilli is offline
Registered User
FRC #1559
 
Join Date: Jan 2009
Location: Victor, NY
Posts: 285
gpetilli is a name known to allgpetilli is a name known to allgpetilli is a name known to allgpetilli is a name known to allgpetilli is a name known to allgpetilli is a name known to all
Re: Information on PID Control

For positional control, yes start with P and raise till unstable - back off and add some I to achieve closer final value.

For Velocity (Speed) control, many teams have had better success starting with I and adding P. The issue is with velocity, a negative proportional error will try to drive the motor backwards. The other way to solve this is to use a feed-forward term, which is not available on the Jaguar.
Reply With Quote
  #4   Spotlight this post!  
Unread 17-02-2014, 11:39
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,034
Ether has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond repute
Re: Information on PID Control

Quote:
Originally Posted by ShaneDugas View Post
(P)roportional, (I)ntegral, (D)erivative. These are all terms of gain in the PID equation. Without getting into the math, I would try a .25 or .5 to start with with and then gradually increase (to speed up) or decrease (to slow down) from there.
Hi Shane. Welcome to ChiefDelphi.

Have you successfully implemented speed control using the PID algorithm in the Jaguars? Was it for the drivetrain, or some other mechanism?


Reply With Quote
  #5   Spotlight this post!  
Unread 17-02-2014, 13:39
xXhunter47Xx's Avatar
xXhunter47Xx xXhunter47Xx is offline
Lord of Lazy
AKA: Austin $wagmaster1337
FRC #4738 (Patribots)
Team Role: College Student
 
Join Date: Jan 2014
Rookie Year: 2013
Location: San Diego
Posts: 305
xXhunter47Xx will become famous soon enough
Re: Information on PID Control

Quote:
Originally Posted by Ether View Post
Hi Shane. Welcome to ChiefDelphi.

Have you successfully implemented speed control using the PID algorithm in the Jaguars? Was it for the drivetrain, or some other mechanism?


Well I made this:


It's just missing PID values.
Reply With Quote
  #6   Spotlight this post!  
Unread 17-02-2014, 14:10
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,034
Ether has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond repute
Re: Information on PID Control

Quote:
Originally Posted by xXhunter47Xx View Post
It's just missing PID values.
When you've actually successfully tuned a Jag PID for drivetrain speed control please post your experience here. This topic is of interest to many here on CD.


Reply With Quote
  #7   Spotlight this post!  
Unread 17-02-2014, 14:22
xXhunter47Xx's Avatar
xXhunter47Xx xXhunter47Xx is offline
Lord of Lazy
AKA: Austin $wagmaster1337
FRC #4738 (Patribots)
Team Role: College Student
 
Join Date: Jan 2014
Rookie Year: 2013
Location: San Diego
Posts: 305
xXhunter47Xx will become famous soon enough
Re: Information on PID Control

Quote:
Originally Posted by Ether View Post
When you've actually successfully tuned a Jag PID for drivetrain speed control please post your experience here. This topic is of interest to many here on CD.


Oh... Okay so I guess I'm pioneering the way for speed control PID? Because I really don't know what I'm doing with it.
Reply With Quote
  #8   Spotlight this post!  
Unread 17-02-2014, 14:27
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,034
Ether has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond repute
Re: Information on PID Control

Quote:
Originally Posted by xXhunter47Xx View Post
Oh... Okay so I guess I'm pioneering the way for speed control PID? Because I really don't know what I'm doing with it.
Sorry, I read your post too quickly. I thought I was responding to the person posted
"Without getting into the math, I would try a .25 or .5 to start with with and then gradually increase (to speed up) or decrease (to slow down) from there."
But when you are successful, please do share your experience.

There are several threads on CD about tuning the Jag PID for speed control. If the built-in search in CD doesn't find them, try using Google with ... site:chiefdelphi.com Jaguar PID



Last edited by Ether : 17-02-2014 at 16:08. Reason: i before e except after c...
Reply With Quote
  #9   Spotlight this post!  
Unread 20-02-2014, 20:25
xXhunter47Xx's Avatar
xXhunter47Xx xXhunter47Xx is offline
Lord of Lazy
AKA: Austin $wagmaster1337
FRC #4738 (Patribots)
Team Role: College Student
 
Join Date: Jan 2014
Rookie Year: 2013
Location: San Diego
Posts: 305
xXhunter47Xx will become famous soon enough
Re: Information on PID Control

Quote:
Originally Posted by Ether View Post
Sorry, I read your post too quickly. I thought I was responding to the person posted
"Without getting into the math, I would try a .25 or .5 to start with with and then gradually increase (to speed up) or decrease (to slow down) from there."
But when you are successful, please do share your experience.

There are several threads on CD about tuning the Jag PID for speed control. If the built-in search in CD doesn't find them, try using Google with ... site:chiefdelphi.com Jaguar PID


Thanks!
we actually couldn't tweak it because we were busy rushing to finish the bot before midnight on bag day. I'll let you know after practice day at the San Diego Regional.
Reply With Quote
  #10   Spotlight this post!  
Unread 09-03-2014, 19:56
xXhunter47Xx's Avatar
xXhunter47Xx xXhunter47Xx is offline
Lord of Lazy
AKA: Austin $wagmaster1337
FRC #4738 (Patribots)
Team Role: College Student
 
Join Date: Jan 2014
Rookie Year: 2013
Location: San Diego
Posts: 305
xXhunter47Xx will become famous soon enough
Re: Information on PID Control

It proved way too glitchy for us to use.
We just said "screw it" and scrapped CANBus, because no other teams were dealing with CANBus and Labview, so we went back to PWM.
Reminder to self, no more Mecanum drive.
Reply With Quote
  #11   Spotlight this post!  
Unread 10-03-2014, 00:08
Levansic's Avatar
Levansic Levansic is offline
Registered User
AKA: Len Evansic
FRC #0585 (Cyber Penguins)
Team Role: Mentor
 
Join Date: Jan 2012
Rookie Year: 2008
Location: Tehachapi, CA
Posts: 185
Levansic has much to be proud ofLevansic has much to be proud ofLevansic has much to be proud ofLevansic has much to be proud ofLevansic has much to be proud ofLevansic has much to be proud ofLevansic has much to be proud ofLevansic has much to be proud ofLevansic has much to be proud ofLevansic has much to be proud of
Re: Information on PID Control

That's unfortunate. We're using CAN and LabView and omni-wheels, but not with closed loop speed (yet). So far, we have not had problems, but we are using additional surrounding loops and filters on driver inputs and rotations to limit commanded speed changes.

In past years, we tried to start from the wheels up, and hit many frustrations. This year, we are starting from the top (driver) down, and doing better, although we have not closed the last loop at the jaguar to wheel.

We noticed in the past that the Jaguars cut out when they seem to predict that they will exceed a limit, under PID control. We decided to filter the driver input by limiting the maximum acceleration allowed, both linear and rotational. Further, we implemented a PID in LabView to compare a modeled rotation to our gyro reading, and use that to drive the holonomic.vi rotational input. So far, this is the best control we've ever had for mechanum or omni-wheel.

We would like to do the one last step of closing the loop at the wheel, now that we have more restrained inputs. That will have to wait until our bag gets opened later this week. In the end, we are good enough now, and have no issues with CAN Jaguars.
Reply With Quote
  #12   Spotlight this post!  
Unread 10-03-2014, 00:11
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,034
Ether has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond repute
Re: Information on PID Control


Len,

Have you guys considered writing and posting a paper explaining what you've done?


Reply With Quote
  #13   Spotlight this post!  
Unread 10-03-2014, 00:58
Levansic's Avatar
Levansic Levansic is offline
Registered User
AKA: Len Evansic
FRC #0585 (Cyber Penguins)
Team Role: Mentor
 
Join Date: Jan 2012
Rookie Year: 2008
Location: Tehachapi, CA
Posts: 185
Levansic has much to be proud ofLevansic has much to be proud ofLevansic has much to be proud ofLevansic has much to be proud ofLevansic has much to be proud ofLevansic has much to be proud ofLevansic has much to be proud ofLevansic has much to be proud ofLevansic has much to be proud ofLevansic has much to be proud of
Re: Information on PID Control

Yes, but we'd like to have some on-field time to really tune it up and prove that it is good enough to share. It was worked out on a white-board and ground into code, which remains the only documentation that we have at this point. Our students glaze over when I talk about accelerations and velocities being derivatives of position. We've kept it simple by limiting rates of velocity change (effective max. acceleration), and generalizing by using finite time slices given by periodic task loops. We've been working with our base from our old Logo-motion robot as a stand-in for our current one, so we know that the code is working well.

Our goal this year was to make the best field-centric control that we could, where anyone on the team could drive well. We do not have dedicated drivers, due to historical events and precedents in our team. Some students could do OK if we left it open-loop and scaled down the inputs (.5 for linear, .25 for rotational). Other students had difficulty with this, and would cause the robot to lurch about, losing the ball.

A friend of the team remarked that the open-loop control reminded him of the helicopters he flew in Vietnam, requiring very slight movements of the stick. Reduced gains limited the top-end performance of the robot, and we just don't have enough time for everyone to become skilled drivers with the typical open-loop system. That gave birth to our "bad driver filter" which was driven by physical limits of wheel friction and gyro rate.

Overall, it took a lot of work. We had to go to a new gyro that had a higher rate (posting code for this in a moment), and had to make an intermediate model for rotation. In the end, we want to share all of this, but we don't want to lead others down a blind alley of thought process that seems valid now, before being fully vetted.
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 04:31.

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