Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Programming (http://www.chiefdelphi.com/forums/forumdisplay.php?f=51)
-   -   Arm Position Control (http://www.chiefdelphi.com/forums/showthread.php?t=125981)

notmattlythgoe 07-02-2014 15:33

Re: Arm Position Control
 
Quote:

Originally Posted by Ether (Post 1339241)
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.

Alan Anderson 07-02-2014 15:36

Re: Arm Position Control
 
Quote:

Originally Posted by Ether (Post 1339241)
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.

Ether 07-02-2014 15:39

Re: Arm Position Control
 
Quote:

Originally Posted by notmattlythgoe (Post 1339262)
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).



Bpk9p4 07-02-2014 15:43

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.

notmattlythgoe 07-02-2014 15:44

Re: Arm Position Control
 
Quote:

Originally Posted by Ether (Post 1339265)
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.

notmattlythgoe 07-02-2014 15:49

Re: Arm Position Control
 
Quote:

Originally Posted by Alan Anderson (Post 1339263)
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.

apalrd 07-02-2014 15:51

Re: Arm Position Control
 
Quote:

Originally Posted by Bpk9p4 (Post 1339267)
-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.

Ether 07-02-2014 16:01

Re: Arm Position Control
 
Quote:

Originally Posted by notmattlythgoe (Post 1339274)
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).



notmattlythgoe 07-02-2014 16:06

Re: Arm Position Control
 
Quote:

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



Exactly.

notmattlythgoe 07-02-2014 16:11

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.

Bpk9p4 07-02-2014 16:13

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.

Ether 07-02-2014 16:17

Re: Arm Position Control
 
Quote:

Originally Posted by Bpk9p4 (Post 1339292)
Quote:

Originally Posted by apalrd (Post 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.

That depends on how the "D" in your PID is implemented.



apalrd 07-02-2014 17:25

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.

Jared 07-02-2014 17:48

Re: Arm Position Control
 
Quote:

Originally Posted by apalrd (Post 1339355)
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.

Ether 07-02-2014 17:57

Re: Arm Position Control
 
Quote:

Originally Posted by Jared (Post 1339367)
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 (Post 1339058)
-Gain Scheduling. You would have a no-gravity and peak-gravity gainset (kP,kI,kD) and blend them with the angle.




All times are GMT -5. The time now is 22:00.

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