Go to Post Note to self: Before turning 30, remember to remove the birthdate year from Delphi. - Jessica Boucher [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

 
 
 
Thread Tools Rating: Thread Rating: 2 votes, 5.00 average. Display Modes
Prev Previous Post   Next Post Next
  #10   Spotlight this post!  
Unread 20-01-2015, 01:22
josesantos's Avatar
josesantos josesantos is offline
Mentor; Former Design Chairman
FRC #0687 (Nerd Herd) (VRC #687z) & FRC #5499 (BHS Robotics)
Team Role: Mentor
 
Join Date: Jan 2012
Rookie Year: 2011
Location: Carson, CA/Berkeley, CA
Posts: 42
josesantos has a reputation beyond reputejosesantos has a reputation beyond reputejosesantos has a reputation beyond reputejosesantos has a reputation beyond reputejosesantos has a reputation beyond reputejosesantos has a reputation beyond reputejosesantos has a reputation beyond reputejosesantos has a reputation beyond reputejosesantos has a reputation beyond reputejosesantos has a reputation beyond reputejosesantos has a reputation beyond repute
Re: Drive System Control Compensation

I've implemented ramping speed filters in RobotC using this example from one of our old programming leads. Essentially, the filter adds to the current speed the different between the current speed and the desired speed divided by some "alpha". This "smooths out" any motor speed changes.

So basically:
speed = speed + (joystick - speed)/alpha

Note that in his example, he multiplies then divides by an arbitrarily large value. I'm told he did this because the controller either didn't support floats or did floating point calculations much more slowly.
__________________
CAMS Robotics, FIRST Team 687 The Nerd Herd 2010-Present
College Mentor 2013-Present // Design Chairman 2012-2013
Berkeley High Robotics, FIRST Team 5499 2014-Present
College Mentor 2014-Present

Last edited by josesantos : 20-01-2015 at 01:24. Reason: clarity
 


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

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