Go to Post We have put our [robot] on a treadmill. It should shed those excessive pounds and be in shape to compete.:) - Seth Mallory [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
  #16   Spotlight this post!  
Unread 07-02-2014, 15:33
notmattlythgoe's Avatar
notmattlythgoe notmattlythgoe is offline
Flywheel Police
AKA: Matthew Lythgoe
FRC #2363 (Triple Helix)
Team Role: Mentor
 
Join Date: Feb 2010
Rookie Year: 2009
Location: Newport News, VA
Posts: 1,729
notmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond repute
Re: Arm Position Control

Quote:
Originally Posted by Ether View Post
If there were a stationary attachment point located vertically above the pivot, and of sufficient height, one could secure the tubing to that point and to the arm. That would provide minimum torque at noon and maximum torque (of opposite signs) at 3 and 9 o'clock.

Barring such an arrangement, what other options do you have in mind?


Instead of 1 right above it 2 on either side level with the rotation point. It wouldn't be as optimal as a point right above it but it would help a bit. As you move those points higher they help more and more.
  #17   Spotlight this post!  
Unread 07-02-2014, 15:36
Alan Anderson's Avatar
Alan Anderson Alan Anderson is offline
Software Architect
FRC #0045 (TechnoKats)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2004
Location: Kokomo, Indiana
Posts: 9,113
Alan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond repute
Re: Arm Position Control

Quote:
Originally Posted by Ether View Post
If there were a stationary attachment point located vertically above the pivot, and of sufficient height, one could secure the tubing to that point and to the arm. That would provide minimum torque at noon and maximum torque (of opposite signs) at 3 and 9 o'clock.

Barring such an arrangement, what other options do you have in mind?
I think we can assume a suitable attachment point vertically below the pivot. A short extension on the opposite side from the arm would provide a way to use a downward force to counterbalance it.

A sprocket-and-chain scheme can put a "virtual pivot point" anywhere convenient.
  #18   Spotlight this post!  
Unread 07-02-2014, 15:39
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,125
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: Arm Position Control

Quote:
Originally Posted by notmattlythgoe View Post
Instead of 1 right above it 2 on either side level with the rotation point. It wouldn't be as optimal as a point right above it but it would help a bit. As you move those points higher they help more and more.
If they are level with the rotation point (by this I assume you mean the arm pivot), they provide zero torque at the extremes (where it is most needed).


  #19   Spotlight this post!  
Unread 07-02-2014, 15:43
Bpk9p4's Avatar
Bpk9p4 Bpk9p4 is offline
Registered User
FRC #1756
Team Role: Mentor
 
Join Date: Jan 2013
Rookie Year: 2010
Location: Illinios
Posts: 274
Bpk9p4 has a brilliant futureBpk9p4 has a brilliant futureBpk9p4 has a brilliant futureBpk9p4 has a brilliant futureBpk9p4 has a brilliant futureBpk9p4 has a brilliant futureBpk9p4 has a brilliant futureBpk9p4 has a brilliant futureBpk9p4 has a brilliant futureBpk9p4 has a brilliant futureBpk9p4 has a brilliant future
Re: Arm Position Control

-In the context of an arm, velocity PID is useless. It would not provide the desired response at all.[/quote]

Maybe i read his question wrong but if you are wanting to move the arms from 0 deg to 180 deg and have your controller take into account the increased torque a velocity PID controller would be perfect for this.

This would allow the arms to move at a constant angular rate regardless of the torque needed.

However this would not allow the arm to stop right at 0 and 180 deg. To do this you would need to transition from the velocity control to a position control when you got close to your desired position.
  #20   Spotlight this post!  
Unread 07-02-2014, 15:44
notmattlythgoe's Avatar
notmattlythgoe notmattlythgoe is offline
Flywheel Police
AKA: Matthew Lythgoe
FRC #2363 (Triple Helix)
Team Role: Mentor
 
Join Date: Feb 2010
Rookie Year: 2009
Location: Newport News, VA
Posts: 1,729
notmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond repute
Re: Arm Position Control

Quote:
Originally Posted by Ether View Post
If they are level with the rotation point (by this I assume you mean the arm pivot), they provide zero torque at the extremes (where it is most needed).


Correct, it would be more optimal between the 45's but past that it would not help as much.
  #21   Spotlight this post!  
Unread 07-02-2014, 15:49
notmattlythgoe's Avatar
notmattlythgoe notmattlythgoe is offline
Flywheel Police
AKA: Matthew Lythgoe
FRC #2363 (Triple Helix)
Team Role: Mentor
 
Join Date: Feb 2010
Rookie Year: 2009
Location: Newport News, VA
Posts: 1,729
notmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond repute
Re: Arm Position Control

Quote:
Originally Posted by Alan Anderson View Post
I think we can assume a suitable attachment point vertically below the pivot. A short extension on the opposite side from the arm would provide a way to use a downward force to counterbalance it.

A sprocket-and-chain scheme can put a "virtual pivot point" anywhere convenient.
Or even extend the arm through the pivot point and attach the bungee to that point and directly below the pivot point.
  #22   Spotlight this post!  
Unread 07-02-2014, 15:51
apalrd's Avatar
apalrd apalrd is offline
More Torque!
AKA: Andrew Palardy (Most people call me Palardy)
VRC #3333
Team Role: College Student
 
Join Date: Mar 2009
Rookie Year: 2009
Location: Auburn Hills, MI
Posts: 1,347
apalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond repute
Re: Arm Position Control

Quote:
Originally Posted by Bpk9p4 View Post
-In the context of an arm, velocity PID is useless. It would not provide the desired response at all.

Maybe i read his question wrong but if you are wanting to move the arms from 0 deg to 180 deg and have your controller take into account the increased torque a velocity PID controller would be perfect for this.

This would allow the arms to move at a constant angular rate regardless of the torque needed.

However this would not allow the arm to stop right at 0 and 180 deg. To do this you would need to transition from the velocity control to a position control when you got close to your desired position.
Or you could rely on the derivative control to slow it down properly.

Stacking and switching PID controls is usually a lot more work than it's worth.



I agree Joe, the need for any gain scheduling or other controls is dependent on the arm. Some arms need adjustment, some do not. I have worked with both.
__________________
Kettering University - Computer Engineering
Kettering Motorsports
Williams International - Commercial Engines - Controls and Accessories
FRC 33 - The Killer Bees - 2009-2012 Student, 2013-2014 Advisor
VEX IQ 3333 - The Bumble Bees - 2014+ Mentor

"Sometimes, the elegant implementation is a function. Not a method. Not a class. Not a framework. Just a function." ~ John Carmack
  #23   Spotlight this post!  
Unread 07-02-2014, 16:01
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,125
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: Arm Position Control

Quote:
Originally Posted by notmattlythgoe View Post
Or even extend the arm through the pivot point and attach the bungee to that point and directly below the pivot point.
Yes, of course; that's a mirror image of the on-top approach... except with much higher forces (due to smaller distances).


  #24   Spotlight this post!  
Unread 07-02-2014, 16:06
notmattlythgoe's Avatar
notmattlythgoe notmattlythgoe is offline
Flywheel Police
AKA: Matthew Lythgoe
FRC #2363 (Triple Helix)
Team Role: Mentor
 
Join Date: Feb 2010
Rookie Year: 2009
Location: Newport News, VA
Posts: 1,729
notmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond repute
Re: Arm Position Control

Quote:
Originally Posted by Ether View Post
Yes, of course; that's a mirror image of the on-top approach... except with much higher forces (due to smaller distances).


Exactly.
  #25   Spotlight this post!  
Unread 07-02-2014, 16:11
notmattlythgoe's Avatar
notmattlythgoe notmattlythgoe is offline
Flywheel Police
AKA: Matthew Lythgoe
FRC #2363 (Triple Helix)
Team Role: Mentor
 
Join Date: Feb 2010
Rookie Year: 2009
Location: Newport News, VA
Posts: 1,729
notmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond repute
Re: Arm Position Control

You could also use a gas spring to limit the speed that the arm could move. Set up the same as my last suggestion. It would give you hard stops on both ends, it wouldn't help with the torque but it would help with the reaction time of the pid being different in different locations.
  #26   Spotlight this post!  
Unread 07-02-2014, 16:13
Bpk9p4's Avatar
Bpk9p4 Bpk9p4 is offline
Registered User
FRC #1756
Team Role: Mentor
 
Join Date: Jan 2013
Rookie Year: 2010
Location: Illinios
Posts: 274
Bpk9p4 has a brilliant futureBpk9p4 has a brilliant futureBpk9p4 has a brilliant futureBpk9p4 has a brilliant futureBpk9p4 has a brilliant futureBpk9p4 has a brilliant futureBpk9p4 has a brilliant futureBpk9p4 has a brilliant futureBpk9p4 has a brilliant futureBpk9p4 has a brilliant futureBpk9p4 has a brilliant future
Re: Arm Position Control

[quote=apalrd;1339275]Or you could rely on the derivative control to slow it down properly.

The D term just slows down the response of the system not the overall speed of the system at Steady State.


You are correct though that switching between two controllers needs to be done carefully.
  #27   Spotlight this post!  
Unread 07-02-2014, 16:17
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,125
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: Arm Position Control

Quote:
Originally Posted by Bpk9p4 View Post
Quote:
Originally Posted by apalrd View Post
Or you could rely on the derivative control to slow it down properly.
The D term just slows down the response of the system not the overall speed of the system at Steady State.
That depends on how the "D" in your PID is implemented.


  #28   Spotlight this post!  
Unread 07-02-2014, 17:25
apalrd's Avatar
apalrd apalrd is offline
More Torque!
AKA: Andrew Palardy (Most people call me Palardy)
VRC #3333
Team Role: College Student
 
Join Date: Mar 2009
Rookie Year: 2009
Location: Auburn Hills, MI
Posts: 1,347
apalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond repute
Re: Arm Position Control

In PID:

-P is the error of the position
-I is the accumulated error of position (steady state error)
-D is the velocity and often opposes the other two terms

A proper D gain will compensate for the velocity. With all of the gains set correctly, there will be a point where the error is so great that the sum of P, I, and D is larger than the motor's max output, so the negative D term will have no effect. As the arm slows down, the D term will compensate for the velocity (inertia) as the arm approaches the target.

When I calibrate PID loops by hand, I usually only end up with a PI controller. I have tried to add D manually with little success. When I calibrated automatically (using the ultimate stability method), I found that the D gains were many times what I was getting by hand, but the system worked beautifully.

On a side note, I autotuned a full PID loop on two VRC robots (relatively high intertia, fast gear ratio, more counterforce than gravity long arms) and found that a single PID gain set was adequate. On a cam driven linkage on our 2012 FRC robot, I needed to schedule the gains because the motion ratios changed significantly over the stroke.
__________________
Kettering University - Computer Engineering
Kettering Motorsports
Williams International - Commercial Engines - Controls and Accessories
FRC 33 - The Killer Bees - 2009-2012 Student, 2013-2014 Advisor
VEX IQ 3333 - The Bumble Bees - 2014+ Mentor

"Sometimes, the elegant implementation is a function. Not a method. Not a class. Not a framework. Just a function." ~ John Carmack
  #29   Spotlight this post!  
Unread 07-02-2014, 17:48
Jared's Avatar
Jared Jared is offline
Registered User
no team
Team Role: Programmer
 
Join Date: Aug 2013
Rookie Year: 2012
Location: Connecticut
Posts: 602
Jared has a reputation beyond reputeJared has a reputation beyond reputeJared has a reputation beyond reputeJared has a reputation beyond reputeJared has a reputation beyond reputeJared has a reputation beyond reputeJared has a reputation beyond reputeJared has a reputation beyond reputeJared has a reputation beyond reputeJared has a reputation beyond reputeJared has a reputation beyond repute
Re: Arm Position Control

Quote:
Originally Posted by apalrd View Post
In PID:

-P is the error of the position
-I is the accumulated error of position (steady state error)
-D is the velocity and often opposes the other two terms

A proper D gain will compensate for the velocity. With all of the gains set correctly, there will be a point where the error is so great that the sum of P, I, and D is larger than the motor's max output, so the negative D term will have no effect. As the arm slows down, the D term will compensate for the velocity (inertia) as the arm approaches the target.

When I calibrate PID loops by hand, I usually only end up with a PI controller. I have tried to add D manually with little success. When I calibrated automatically (using the ultimate stability method), I found that the D gains were many times what I was getting by hand, but the system worked beautifully.

On a side note, I autotuned a full PID loop on two VRC robots (relatively high intertia, fast gear ratio, more counterforce than gravity long arms) and found that a single PID gain set was adequate. On a cam driven linkage on our 2012 FRC robot, I needed to schedule the gains because the motion ratios changed significantly over the stroke.
It's really tough to get a D term to compensate for the inertia of an arm. In order for the D to really affect the system the way you want it to kD must be fairly large, which requires that kP and kI be pretty much perfect.

You could also adjust your gains based on where the arm is.

The way to tune this is to set up three or four different PID loops, each of which are tuned to make the arm respond nicely when going to a specific place. Then, you can take your kP/kI values that work for each of the locations and find a nice curve that fits them and use that curve to modify the gains based on where your arm is.

As for preventing integral wind-up, I just turn off the I term until we are withing 10 percent of the target.
  #30   Spotlight this post!  
Unread 07-02-2014, 17:57
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,125
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: Arm Position Control

Quote:
Originally Posted by Jared View Post
You could also adjust your gains based on where the arm is.

The way to tune this is to set up three or four different PID loops, each of which are tuned to make the arm respond nicely when going to a specific place. Then, you can take your kP/kI values that work for each of the locations and find a nice curve that fits them and use that curve to modify the gains based on where your arm is.
apalrd posted the same idea earlier in the thread.

Quote:
Originally Posted by apalrd View Post
-Gain Scheduling. You would have a no-gravity and peak-gravity gainset (kP,kI,kD) and blend them with the angle.

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 02:41.

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