Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   CAN (http://www.chiefdelphi.com/forums/forumdisplay.php?f=185)
-   -   ramping in speed/position mode (http://www.chiefdelphi.com/forums/showthread.php?t=93832)

kamocat 20-03-2011 21:58

ramping in speed/position mode
 
This is more of a request than a question.

Often on an arm (controlled in position mode), sudden acceleration and deceleration (jerk) can be dangerous. If I were using voltage mode, my solution would be to set the ramp rate. However, in position mode that feature is not available. I've tried approximating the effect using the Integral term, but this simply creates oscillation if used without significant Proportional. (When using significant proportional, large changes in position cause large jerk.

In Speed mode there is a similar issue. Here it is not as urgent; I can put a ramping feature in my software, or tune using integral-only. However, a ramping feature would still be appreciated.

Hugh Meyer 04-04-2011 10:46

Re: ramping in speed/position mode
 
Marshal,

One solution is to create a motion profile. This is just a series of points that defines all of the positions between the current position and the target position. When you create these points you include the ramp up and down. The more points and the shorter the time between points will create the smoothest motion.

The periodic rate that the code runs at will limit the resolution of points in the time domain. The smaller the step between points gives a smoother motion.

I agree with you that a nice ramp up and down while traveling to the next point would be nice. As best we could tell this is not in the firmware of the Jaguars. The position mode simply tries to go full blast to the next point. Using the motion profile is how we worked around it. We didn't get really smooth motion while traveling slowly because our periodic rate was 100 milliseconds. It worked well on fast moves.

-Hugh

drakesword 07-04-2011 22:20

Re: ramping in speed/position mode
 
Another Idea we are going to test is to use 2 PID loops.

Use an I based loop to ramp up then a PD loop to ramp down. The fun part is the interchange between the loops. And witht the current can issues WOOWEE

kamocat 07-04-2011 23:22

Re: ramping in speed/position mode
 
Quote:

Originally Posted by drakesword (Post 1050617)
Another Idea we are going to test is to use 2 PID loops.

Use an I based loop to ramp up then a PD loop to ramp down. The fun part is the interchange between the loops. And witht the current can issues WOOWEE

Are you suggesting changing the PID gains on the Jaguar while the arm is moving?
That doesn't sound like a good idea.

drakesword 07-04-2011 23:29

Re: ramping in speed/position mode
 
with all of the problems with can this year no but it can be done.

We are doing what Hugh said sort of ...

We have the PID set with a low P a slight I and a high D

We first set to 2/3s of our travel then when we pass 1/2 (yes 1/2 not 2/3) we set to the full distance but this was over a larger distance, with the smaller distances we jut go for it.

drakesword 26-08-2011 00:24

Re: ramping in speed/position mode
 
Hate to res an old thread but here it goes.

First idea involves some static coding. Basically you set up the jag in speed mode. then you monitor position slowly adding for the first 1/3 of travel. then staying the same the second 1/3 then coasting down for the final leg.

Another idea would to have the Jag running a speed PID and the cRIO running the position PID. Then you have 2 PIDs to tune but you can ramp.

Another idea would be to have the pid strictly on the cRio but that sucks.

the final idea (Hey Jag programming guys this is for you!) is to have the jag position control mode to also have a target velocity and or acceleration. Many other control systems utilize it why not us. . . I will probably add the feature to the non-frc firmware in a month or so. Ill let you know how it goes.


All times are GMT -5. The time now is 02:54.

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