Go to Post ...never do something because it is comfortable, do something because you WANT to do it. - Andrew Schreiber [more]
Home
Go Back   Chief Delphi > ChiefDelphi.com Website > Extra Discussion
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
Thread Tools Rating: Thread Rating: 2 votes, 5.00 average. Display Modes
  #16   Spotlight this post!  
Unread 07-04-2013, 13:53
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,049
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: paper: Take-Back-Half Shooter Wheel Speed Control

Quote:
Originally Posted by tr6scott View Post
The code is labview, more info from this link. http://www.chiefdelphi.com/forums/sh...d.php?t=113954
Doh. I remember our conversation now. I am starting to show my age. Sorry 'bout that.


Reply With Quote
  #17   Spotlight this post!  
Unread 07-04-2013, 14:59
tr6scott's Avatar
tr6scott tr6scott is online now
Um, I smell Motor!
AKA: Scott McBride
FRC #2137 (TORC)
Team Role: Mentor
 
Join Date: Dec 2007
Rookie Year: 2005
Location: Oxford, MI
Posts: 510
tr6scott has a reputation beyond reputetr6scott has a reputation beyond reputetr6scott has a reputation beyond reputetr6scott has a reputation beyond reputetr6scott has a reputation beyond reputetr6scott has a reputation beyond reputetr6scott has a reputation beyond reputetr6scott has a reputation beyond reputetr6scott has a reputation beyond reputetr6scott has a reputation beyond reputetr6scott has a reputation beyond repute
Re: paper: Take-Back-Half Shooter Wheel Speed Control

Me too. NP.
__________________
The sooner we get behind schedule, the more time we have to catch up.

Reply With Quote
  #18   Spotlight this post!  
Unread 03-04-2014, 22:14
The Doctor's Avatar
The Doctor The Doctor is offline
Robotics is life
AKA: Hackson
FRC #3216 (MRT)
Team Role: Programmer
 
Join Date: Mar 2014
Rookie Year: 2013
Location: United States
Posts: 153
The Doctor is on a distinguished road
Re: paper: Take-Back-Half Shooter Wheel Speed Control

I have found this to be an acceptable take-back-half algorithm:

Code:
cval -= (cval - goodval) / 2;
Where cval is the current value of [whatever] and goodval is the ideal point (what you want it to be at)

Code:
cval += constrain(-(cval - goodval) / 2,-max,max);
This also works, but is constrains the value to within a maximum speed, the variable max. Function constrain below:

Code:
float constrain(val,min,max) {
          return val>max?max:val<min?min:val;
}
This seems a lot simpler than the previously posted code, and I was wondering if they are equivalent?
Reply With Quote
  #19   Spotlight this post!  
Unread 03-04-2014, 23:29
Ziv Ziv is offline
Has code to be writing...
FRC #0125 (Nutrons)
Team Role: Alumni
 
Join Date: Mar 2010
Rookie Year: 2009
Location: Boston
Posts: 39
Ziv is a glorious beacon of lightZiv is a glorious beacon of lightZiv is a glorious beacon of lightZiv is a glorious beacon of lightZiv is a glorious beacon of light
Re: paper: Take-Back-Half Shooter Wheel Speed Control

Quote:
Originally Posted by The Doctor View Post
I have found this to be an acceptable take-back-half algorithm:

Code:
cval -= (cval - goodval) / 2;
Where cval is the current value of [whatever] and goodval is the ideal point (what you want it to be at)
Where's the feedback here? How do you find goodval? The fact that you're setting cval suggests it's an output, and if you somehow knew the ideal output (namely goodval) then you wouldn't need closed loop control in the first place.

Now, if you instead have

Code:
cval -= (sensorval - goodval) / 2;
which seems to be what you were getting at, then what you secretly have is an integral controller (just the I from PID) with coefficient 1/2.
Reply With Quote
  #20   Spotlight this post!  
Unread 04-04-2014, 12:01
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,049
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: paper: Take-Back-Half Shooter Wheel Speed Control

Quote:
Originally Posted by Ziv View Post
Now, if you instead have

Code:
cval -= (sensorval - goodval) / 2;
which seems to be what you were getting at, then what you secretly have is an integral controller (just the I from PID) with coefficient 1/2.
Yes.

And, just because it's an integrator, and its gain is 1/2, does not make it a TBH algorithm. The hallmark of TBH is the unique way that the output is reset at each zero crossing.


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 19:35.

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