Go to Post The future is being developed by FIRSTers! - Andy Baker [more]
Home
Go Back   Chief Delphi > Technical > Electrical > CAN
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 20-03-2011, 21:58
kamocat's Avatar
kamocat kamocat is offline
Test Engineer
AKA: Marshal Horn
FRC #3213 (Thunder Tech)
Team Role: Mentor
 
Join Date: May 2008
Rookie Year: 2008
Location: Tacoma
Posts: 894
kamocat is just really nicekamocat is just really nicekamocat is just really nicekamocat is just really nicekamocat is just really nice
Send a message via AIM to kamocat Send a message via MSN to kamocat
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.
__________________
-- Marshal Horn
Reply With Quote
  #2   Spotlight this post!  
Unread 04-04-2011, 10:46
Hugh Meyer's Avatar
Hugh Meyer Hugh Meyer is offline
Registered User
FRC #1741 (Red Alert Robotics)
Team Role: Mentor
 
Join Date: Feb 2009
Rookie Year: 2008
Location: Greenwood Indiana
Posts: 158
Hugh Meyer has much to be proud ofHugh Meyer has much to be proud ofHugh Meyer has much to be proud ofHugh Meyer has much to be proud ofHugh Meyer has much to be proud ofHugh Meyer has much to be proud ofHugh Meyer has much to be proud ofHugh Meyer has much to be proud of
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
Reply With Quote
  #3   Spotlight this post!  
Unread 07-04-2011, 22:20
drakesword drakesword is offline
Registered User
AKA: Bryant
FRC #0346 (Robohawks)
Team Role: Mentor
 
Join Date: Jan 2006
Rookie Year: 2004
Location: USA
Posts: 200
drakesword is on a distinguished road
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
Reply With Quote
  #4   Spotlight this post!  
Unread 07-04-2011, 23:22
kamocat's Avatar
kamocat kamocat is offline
Test Engineer
AKA: Marshal Horn
FRC #3213 (Thunder Tech)
Team Role: Mentor
 
Join Date: May 2008
Rookie Year: 2008
Location: Tacoma
Posts: 894
kamocat is just really nicekamocat is just really nicekamocat is just really nicekamocat is just really nicekamocat is just really nice
Send a message via AIM to kamocat Send a message via MSN to kamocat
Re: ramping in speed/position mode

Quote:
Originally Posted by drakesword View Post
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.
__________________
-- Marshal Horn
Reply With Quote
  #5   Spotlight this post!  
Unread 07-04-2011, 23:29
drakesword drakesword is offline
Registered User
AKA: Bryant
FRC #0346 (Robohawks)
Team Role: Mentor
 
Join Date: Jan 2006
Rookie Year: 2004
Location: USA
Posts: 200
drakesword is on a distinguished road
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.
Reply With Quote
  #6   Spotlight this post!  
Unread 26-08-2011, 00:24
drakesword drakesword is offline
Registered User
AKA: Bryant
FRC #0346 (Robohawks)
Team Role: Mentor
 
Join Date: Jan 2006
Rookie Year: 2004
Location: USA
Posts: 200
drakesword is on a distinguished road
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.
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 02:54.

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