Go to Post I know our driver is going to nats over the prom. I mean come on, who wouldnt? :D - karinka13 [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 Rate Thread Display Modes
  #61   Spotlight this post!  
Unread 19-04-2012, 22:45
kenavt's Avatar
kenavt kenavt is offline
Registered User
AKA: Colin S
no team
Team Role: Alumni
 
Join Date: Feb 2010
Rookie Year: 2010
Location: Ann Arbor
Posts: 253
kenavt has a reputation beyond reputekenavt has a reputation beyond reputekenavt has a reputation beyond reputekenavt has a reputation beyond reputekenavt has a reputation beyond reputekenavt has a reputation beyond reputekenavt has a reputation beyond reputekenavt has a reputation beyond reputekenavt has a reputation beyond reputekenavt has a reputation beyond reputekenavt has a reputation beyond repute
Re: paper: Shooter Wheel Speed Control

Quote:
Originally Posted by Ether View Post
What is "MS" time ?


Sorry, that is misleading. I meant milliseconds.

Specifically, we are using the WPI_CounterGet.vi, and the Period (sec) output, then dividing 60 by that output to obtain RPM. If you had more than one rising edge per wheel rotation, you could presumably multiply by that factor to obtain RPM.

It seems like the FPGA can track 38,000 pulses per second. (http://forums.usfirst.org/showthread.php?t=11589)
__________________
University of Michigan Computer Engineering '17

FRC 2337 student alumni (2010-2013)
Reply With Quote
  #62   Spotlight this post!  
Unread 19-04-2012, 23:13
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 7,995
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: Shooter Wheel Speed Control

Quote:
Originally Posted by kenavt View Post
Sorry, that is misleading. I meant milliseconds.
I don't have LabVIEW here. I hope you don't mean millisecond resolution. At 5000 RPM, millisecond resolution would give you an RPM resolution of ~+/-350 RPM

Also, with only one pulse per rev, at 2000 RPM you would be getting stale speed data half the time at 50Hz execution frequency (TeleOp).


Reply With Quote
  #63   Spotlight this post!  
Unread 21-04-2012, 17:09
Tom Line's Avatar
Tom Line Tom Line is offline
Raptors can't turn doorknobs.
FRC #1718 (The Fighting Pi)
Team Role: Mentor
 
Join Date: Jan 2007
Rookie Year: 1999
Location: Armada, Michigan
Posts: 2,509
Tom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond repute
Re: paper: Shooter Wheel Speed Control

Quote:
Originally Posted by Chris Hibner View Post
When you say +/- 100 RPM, do you mean that as: a) noise in the measured RPM, b) slow oscillations of 100 RPM, or c) your steady state (highly filtered) RPM settles at 100 RPM from your target?


We run the unfiltered encoder speed into the bang-bang controller and the speed noise is on the order of +/- 200 RPM at that stage. Once the shooter reaches it's target speed, our heavily filtered encoder speed reads about +/- 15 RPM of noise, but the unfiltered encoder speed going into the controller is still its usual +/- 200 RPM. We keep 2 versions of the speed in our software - one unfiltered to use for input to the controller, and one heavily filtered to use as the input to our "okay to shoot" logic.

Important note: we do NOT rate limit the PWM command to our Victor speed controller. We send it a steady stream of 1.0 or 0.0.
Another important note: our shooter wheel has a fair amount of inertia.
Chris, now you've got me really really curious. How are you filtering?

The only filtering I'm used to is floating average with X number of samples. However, that introduces significant lag. Are you using something more exotic?

I've read up on IIR and FIR, and frankly I haven't found a decent English-language explanation of what they DO.
Reply With Quote
  #64   Spotlight this post!  
Unread 21-04-2012, 17:26
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 7,995
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: Shooter Wheel Speed Control

Quote:
Originally Posted by Tom Line View Post
The only filtering I'm used to is floating average with X number of samples...

I've read up on IIR and FIR, and frankly I haven't found a decent English-language explanation of what they DO.
If what you're doing is saving X samples and averaging them, then that is an FIR filter.

The basic difference between FIR and IIR is that FIR uses only the sampled values, whereas IIR uses the sampled values and the previous filtered value(s).

A simple example of an IIR filter would be:

new_filtered_value = (new_sample_value + previous_filtered_value) / 2

The above is a special case (where K=1/2) of the
so-called "exponentially weighted" IIR filter (commonly used):

new_filtered_value = (1-K)*new_sample_value + K*previous_filtered_value

... where "K" is a tuning constant which varies from 0 to 1.

when K=0, there is no filtering. as you increase K towards 1, the filtering gets more aggressive.




Last edited by Ether : 21-04-2012 at 17:52.
Reply With Quote
  #65   Spotlight this post!  
Unread 21-04-2012, 22:51
Chris Hibner's Avatar Unsung FIRST Hero
Chris Hibner Chris Hibner is offline
Eschewing Obfuscation Since 1990
AKA: Lars Kamen's Roadie
FRC #0051 (Wings of Fire)
Team Role: Engineer
 
Join Date: May 2001
Rookie Year: 1997
Location: Canton, MI
Posts: 1,488
Chris Hibner has a reputation beyond reputeChris Hibner has a reputation beyond reputeChris Hibner has a reputation beyond reputeChris Hibner has a reputation beyond reputeChris Hibner has a reputation beyond reputeChris Hibner has a reputation beyond reputeChris Hibner has a reputation beyond reputeChris Hibner has a reputation beyond reputeChris Hibner has a reputation beyond reputeChris Hibner has a reputation beyond reputeChris Hibner has a reputation beyond repute
Re: paper: Shooter Wheel Speed Control

Quote:
Originally Posted by Tom Line View Post
Chris, now you've got me really really curious. How are you filtering?

The only filtering I'm used to is floating average with X number of samples. However, that introduces significant lag. Are you using something more exotic?

I've read up on IIR and FIR, and frankly I haven't found a decent English-language explanation of what they DO.
IIR filtering is related to one of my favorite jokes (explaining the difference between math/science and engineering):

There's a game show and the contestants are a mathematician and an engineer (both male).

The host explains the game as follows: There's a beautiful model on the other side of the room. For each question the contestants answer correctly, they get to move half way toward the beautiful model.

At that point the mathematician throws his hands up in the air in anger: "What's the point! If I move halfway there every time, I can never get to the model! This is pointless." Then he storms off the stage.

The host then turns to the engineer and says, "after hearing that, why are you sticking around? You can never get to the model!"

The engineer says, "while everything he said was theoretically correct, I can get close enough for practical purposes."

(rim shot and laugh track here)

How does this relate to IIR filtering? The part of "you move x-fraction of the way toward the goal" is what IIR filtering is about. It's called "infinite impulse response" because you can NEVER get to the goal because you always approach it at a fixed fraction of the way there.


FIR filtering (Finite Impulse Response) means you actually get to achieve your goal (hence the "finite"). If the game show were changed to: "the model is 100 feel away and you get to move 10 feet closer with each answer", that would be an FIR filter - in 10 answers you would get to the final result.

(my answer about how we're filtering is in a future post - I didn't want to clutter my joke with too much other stuff)
__________________
-
An ounce of perception is worth a pound of obscure.

Last edited by Chris Hibner : 21-04-2012 at 22:54.
Reply With Quote
  #66   Spotlight this post!  
Unread 22-04-2012, 16:49
Tom Line's Avatar
Tom Line Tom Line is offline
Raptors can't turn doorknobs.
FRC #1718 (The Fighting Pi)
Team Role: Mentor
 
Join Date: Jan 2007
Rookie Year: 1999
Location: Armada, Michigan
Posts: 2,509
Tom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond repute
Re: paper: Shooter Wheel Speed Control

We've settled on PID because we simply can't get the bang-bang method to give us better results. The real issue that I think I've hit is mechanical - we're at the limits of what our system can provide. No matter how we play with gains, filtering, etc, we're struggling to get the shooter more than +/- 40 to 60 rpm (actual RPM, not filtered much at all other than to remove big spikes that are obvious errors).

Filtering the speed before our 'enable shooting' vi really doesn't help shooter run any more consistently - it just makes it easier for us to check the limits.

I did put a 4 sample moving average in to filter the pid input. That helped with some of the oscillation. We also turned down our proportional gain (we wrote a velocity PID, we're not using the position PID) to help some of the oscillation. The shooter still spins up in around 2 seconds, but that helped the oscillation as well.

I had hoped to manage a major improvement before nationals. We've improved our velocity control probably 50%, but other folks are reporting numbers that are still close to 100% better than ours. That means that in real time ball shooting, we're seeing something like +/- 1 foot in height when hitting the backboard.
Reply With Quote
  #67   Spotlight this post!  
Unread 22-04-2012, 17:10
NeatNit's Avatar
NeatNit NeatNit is offline
Alumni Programmer
FRC #1577 (Steampunk)
Team Role: Teacher
 
Join Date: Sep 2011
Rookie Year: 2011
Location: Israel
Posts: 60
NeatNit is an unknown quantity at this point
Re: paper: Shooter Wheel Speed Control

Hey, I didn't read the whole thread but just wanted to mention that this will not work with a Spike. I haven't tested, but a while ago I read into how the Spike works and it cannot coast, it either powers the motor or breaks.
Reply With Quote
  #68   Spotlight this post!  
Unread 22-04-2012, 17:16
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 7,995
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: Shooter Wheel Speed Control

Quote:
Originally Posted by NeatNit View Post
Hey, I didn't read the whole thread but just wanted to mention that this will not work with a Spike. I haven't tested, but a while ago I read into how the Spike works and it cannot coast, it either powers the motor or breaks.
Not true for this application, since motor is being driven in one direction only.

Connect one lead of the motor to the PDB(-), and run the other lead through one relay in the Spike to the PDB(+).

anyone: Is this FRC legal?


See ensuing posts. Doh!



Last edited by Ether : 22-04-2012 at 18:11.
Reply With Quote
  #69   Spotlight this post!  
Unread 22-04-2012, 17:29
NeatNit's Avatar
NeatNit NeatNit is offline
Alumni Programmer
FRC #1577 (Steampunk)
Team Role: Teacher
 
Join Date: Sep 2011
Rookie Year: 2011
Location: Israel
Posts: 60
NeatNit is an unknown quantity at this point
Re: paper: Shooter Wheel Speed Control

Quote:
Originally Posted by Ether View Post
Not true for this application, since motor is being driven in one direction only.

Connect one lead of the motor to the PDB(-), and run the other lead through one relay in the Spike to the PDB(+).

anyone: Is this FRC legal?

Either way, the SPIKE can connect that side of the motor to either + or -, so wouldn't it still break when both sides are connected to -? (regardless of one passing through a SPIKE and whatnot)

I could of course be very wrong
Reply With Quote
  #70   Spotlight this post!  
Unread 22-04-2012, 17:32
nighterfighter nighterfighter is offline
1771 Alum, 1771 Mentor
AKA: Matt B
FRC #1771 (1771)
Team Role: Mentor
 
Join Date: Sep 2009
Rookie Year: 2007
Location: Suwanee/Kennesaw, GA
Posts: 835
nighterfighter has a brilliant futurenighterfighter has a brilliant futurenighterfighter has a brilliant futurenighterfighter has a brilliant futurenighterfighter has a brilliant futurenighterfighter has a brilliant futurenighterfighter has a brilliant futurenighterfighter has a brilliant futurenighterfighter has a brilliant futurenighterfighter has a brilliant futurenighterfighter has a brilliant future
Re: paper: Shooter Wheel Speed Control

Quote:
Originally Posted by Ether View Post
Not true for this application, since motor is being driven in one direction only.

Connect one lead of the motor to the PDB(-), and run the other lead through one relay in the Spike to the PDB(+).

anyone: Is this FRC legal?


It wouldn't be FRC legal.

Also, because a Spike is a mechanical relay, don't they have a limit as to how quickly they can switch to ON/OFF?
Reply With Quote
  #71   Spotlight this post!  
Unread 22-04-2012, 18:02
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 7,995
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: Shooter Wheel Speed Control

Quote:
Originally Posted by nighterfighter View Post
It wouldn't be FRC legal.
When you make such a statement, you should reference the rule you have in mind.


Reply With Quote
  #72   Spotlight this post!  
Unread 22-04-2012, 18:04
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 7,995
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: Shooter Wheel Speed Control

Quote:
Originally Posted by nighterfighter View Post
Spike is a mechanical relay
I'm not saying you're wrong, but what is your source for this information?


Reply With Quote
  #73   Spotlight this post!  
Unread 22-04-2012, 18:06
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 7,995
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: Shooter Wheel Speed Control

Quote:
Originally Posted by NeatNit View Post
Either way, the SPIKE can connect that side of the motor to either + or -, so wouldn't it still break when both sides are connected to -? (regardless of one passing through a SPIKE and whatnot)

I could of course be very wrong
No, you're right.
Reply With Quote
  #74   Spotlight this post!  
Unread 22-04-2012, 18:10
nighterfighter nighterfighter is offline
1771 Alum, 1771 Mentor
AKA: Matt B
FRC #1771 (1771)
Team Role: Mentor
 
Join Date: Sep 2009
Rookie Year: 2007
Location: Suwanee/Kennesaw, GA
Posts: 835
nighterfighter has a brilliant futurenighterfighter has a brilliant futurenighterfighter has a brilliant futurenighterfighter has a brilliant futurenighterfighter has a brilliant futurenighterfighter has a brilliant futurenighterfighter has a brilliant futurenighterfighter has a brilliant futurenighterfighter has a brilliant futurenighterfighter has a brilliant futurenighterfighter has a brilliant future
Re: paper: Shooter Wheel Speed Control

I think the rule violation would either be:

Quote:
[R47]

Custom circuits shall not directly alter the power pathways between the battery, PD Board, speed controllers, relays, motors, or other elements of the Robot control system (including the power pathways to other sensors or circuits). Custom high impedance voltage monitoring or low impedance current monitoring circuitry connected to the Robot’s electrical system is acceptable, if the effect on the Robot outputs is inconsequential.
Or, more likely this one:

Quote:
[R50]

All electrical loads (motors, actuators, compressors, electric solenoids) must be supplied by an approved power regulating device (speed controller, relay module, or Digital Sidecar PWM port) that is controlled by the cRIO on the Robot.

Each CIM motor and Fisher-Price motor must be connected to one and only one approved speed controller. These motors must not be connected to relay modules.
Servos must be directly connected to the PWM ports on the Digital Sidecar. They must not be connected to speed controllers or relay modules.
If used, the compressor must be connected to one and only one approved relay module.
Each other electrical load (motor or actuator) must be supplied by one and only one approved speed controller, or one and only one relay module.
Electric solenoids may alternatively be supplied by a Solenoid Breakout Board connected to the NI 9472 cRIO module, which is powered by 12V.
As for the Spike, I'm not sure.

I remember hearing/reading about it being one, and it seems to behave like any electro-mechanical relay I've used also. (Mainly, the clicking sound when it switches)
Reply With Quote
  #75   Spotlight this post!  
Unread 22-04-2012, 18:16
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 7,995
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: Shooter Wheel Speed Control

Quote:
Originally Posted by nighterfighter View Post
I think the rule violation would either be... Or, more likely this one...
Neither of those rules seem to apply unambiguously in this case. The first rule you cited arguably doesn't apply ("custom circuit") and the second rule explicitly allows a Spike to be used to control certain motors.


Quote:
(Mainly, the clicking sound when it switches)
Well that seems like a dead giveaway. I've never listened to one. (And if I had, I probably couldn't hear it anyway).



Last edited by Ether : 22-04-2012 at 18:36.
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 17:12.

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