Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Programming (http://www.chiefdelphi.com/forums/forumdisplay.php?f=51)
-   -   How do you shoot so fast? (http://www.chiefdelphi.com/forums/showthread.php?t=154712)

Alex Chamberlin 04-02-2017 11:31

How do you shoot so fast?
 
I'm seeing a lot of shooters shooting faster than ours, so the question is how did they get PID to return so fast ( >4 balls per second).
Our team is using an 8in pneumatic wheel direct drive to a cim, and we are getting about 1.5 balls per second when waiting for PID.

Tottanka 04-02-2017 11:32

Re: How do you shoot so fast?
 
Try adding mass to the rotational axis of the flywheel. It will take more time to reach your required speed, but once reached - it will decrease far less between balls fired.

Brian Maher 04-02-2017 11:54

Re: How do you shoot so fast?
 
Quote:

Originally Posted by Tottanka (Post 1640276)
Try adding mass to the rotational axis of the flywheel. It will take more time to reach your required speed, but once reached - it will decrease far less between balls fired.

+1. More rotational momentum (by adding more mass to the flywheel) makes a world of difference. In addition, some teams will have multiple shooters on their robots.

Alex Chamberlin 04-02-2017 12:45

Re: How do you shoot so fast?
 
Quote:

Originally Posted by Tottanka (Post 1640276)
Try adding mass to the rotational axis of the flywheel. It will take more time to reach your required speed, but once reached - it will decrease far less between balls fired.

How would the amount of momentum taken by the ball or added by the motor change?

s_forbes 04-02-2017 12:51

Re: How do you shoot so fast?
 
The gist I get from the programming team is that the Talon SRXs only feedback velocity information from the encoders on a 100ms timeframe, so making a control loop respond to multiple balls per second is extremely difficult with that route. Running the encoder into the digital I/O ports on the rio lets you make your own control system that is more responsive.

Bryce2471 04-02-2017 13:06

Re: How do you shoot so fast?
 
Quote:

Originally Posted by Alex Chamberlin (Post 1640312)
How would the amount of momentum taken by the ball or added by the motor change?

This is a good question, and most likely the answer is "It won't."
However, it will have a positive effect on your shooting characteristics. It will help the PID get back up to speed and stabilized, because it will increase the dampening in the system. Also if your shooter's RPM is off by some given amount of energy when a ball is fired, it will have a smaller impact on the shot.

On the other hand, the best advice I can give you is to increase the cycle rate of your PID and give the shooter more available power.
There are many ways to increase cycle rate, but only two ways to increase available power. Either gear the shooter to the power band of the motor you are using, or increase the amount of motors.

Hope that helps! (When in doubt, focus on gears and climbing)

Adnewhouse 04-02-2017 13:14

Re: How do you shoot so fast?
 
Quote:

Originally Posted by s_forbes (Post 1640313)
The gist I get from the programming team is that the Talon SRXs only feedback velocity information from the encoders on a 100ms timeframe, so making a control loop respond to multiple balls per second is extremely difficult with that route. Running the encoder into the digital I/O ports on the rio lets you make your own control system that is more responsive.

If you use the built in pidf control on the talons themselves, your motor loop runs really fast. This is probably a better route than running it on your roborio. The software manual for the talons also suggests that you can change this 100ms can bus encoder update rate to be faster (can be set to 20ms), but you shouldn't need to use this at all. My recommendation is to add more mass on to your flywheel, and experiment with a feed forward gain term if you are using talonSRXs.

Donut 04-02-2017 20:27

Re: How do you shoot so fast?
 
PID sampling rate can affect your responsiveness as mentioned above, but physical setup is more likely your issue. More mass to the flywheel means it will have more inertia at speed. You need more energy to get to that inertia, so a longer ramp up, but the energy each ball takes from the shooter will be a lower percentage of the available inertia with the higher mass. I'd also look at your gearing, compression, and wheel contact time. A 1:1 ratio on an 8" wheel seems fast to me, since some Ri3D robots were shooting at the high goal with wheels half that size. I didn't look at their gearing, but direct drive CIM on a 4 inch wheel would give you double the available torque, which should decrease your time to spin back up to speed. More motors is also an option.

The rule in industry is, you don't fix mechanical problems with programming.

rich2202 04-02-2017 20:42

Re: How do you shoot so fast?
 
Quote:

Originally Posted by Alex Chamberlin (Post 1640312)
How would the amount of momentum taken by the ball or added by the motor change?

The motor stays the same. It is the addition of the flywheel that matters.

Let's say that the wheel is spinning at 600 rpms, and declines to 550 rpms after a shot. You have to wait for the wheel to spin back up to speed.

After adding the flywheel, the 600 rpms delines to 590 rpms after a shot. The motor then goes to 100% to speed back up to 600 rpms. You can then shoot as fast as the motor can deliver energy to the system.

Kevin Sevcik 04-02-2017 21:45

Re: How do you shoot so fast?
 
How fast is your motor spinning when you're at during speed? If the motor is spinning near its free speed, there isn't much torque available to soon the motor back up to speed. You should have the gearing set up so when your wheel is at target speed, the motor is spinning at about 60% free speed. Then when your PID kicks the motor output up to 100%, it will dump the most power it can into the wheel to get it back up to speed.

gbear605 05-02-2017 12:16

Re: How do you shoot so fast?
 
Quote:

Originally Posted by Adnewhouse (Post 1640329)
If you use the built in pidf control on the talons themselves, your motor loop runs really fast. This is probably a better route than running it on your roborio. The software manual for the talons also suggests that you can change this 100ms can bus encoder update rate to be faster (can be set to 20ms), but you shouldn't need to use this at all. My recommendation is to add more mass on to your flywheel, and experiment with a feed forward gain term if you are using talonSRXs.

You can actually drop it all the way down to a single millisecond.

That said, I suggest using the TalonSRX Speed Control Mode. You can set FPID values that should be able to get it up to speed very quickly and very consistently. While all mechanical systems are different, we had a two-wheeled shooter without any flywheel that was speeding up after shooting a ball in less than a tenth of a second.

wireties 05-02-2017 12:50

Re: How do you shoot so fast?
 
Quote:

Originally Posted by s_forbes (Post 1640313)
The gist I get from the programming team is that the Talon SRXs only feedback velocity information from the encoders on a 100ms timeframe, so making a control loop respond to multiple balls per second is extremely difficult with that route. Running the encoder into the digital I/O ports on the rio lets you make your own control system that is more responsive.

The Talon closes the loop much faster than the roboRio WPI classes (by default). I think the Talon is nearly 10X faster. The 100ms comes up because the Talon counts pulses per 100ms instead of pulses per second - my guess is they do it to make the internal integer math easier. But, for sure, the 100ms thing has zero to do with how fast the Talon's close the loop.

HTH

JCharlton 05-02-2017 13:04

Re: How do you shoot so fast?
 
Another thing to consider is reducing the amount of energy lost per ball. If your system compresses the ball a lot during a launch, more energy will be lost - which needs to be replaced.

Fuel weighs about 0.0707 kg, launched at 6 m/s will have an energy of 12.73 J
(https://www.wolframalpha.com/input/?...elling+6+m%2Fs)

Shooting five of these per second is only 64W - ignoring other loses. Those other loses could be hampering your shooting rate.

gbear605 05-02-2017 13:46

Re: How do you shoot so fast?
 
Quote:

Originally Posted by wireties (Post 1640686)
The Talon closes the loop much faster than the roboRio WPI classes (by default). I think the Talon is nearly 10X faster. The 100ms comes up because the Talon counts pulses per 100ms instead of pulses per second - my guess is they do it to make the internal integer math easier. But, for sure, the 100ms thing has zero to do with how fast the Talon's close the loop.

HTH

According to both the documentation and CTRE, the Talon control loop runs every millisecond. It is very possible to use the Talon for closed-loop code. I think you can apply the Cheesy Poof rule here: 254 uses closed loop velocity control on the Talons, so you can too.

DonRotolo 05-02-2017 16:16

Re: How do you shoot so fast?
 
Quote:

Originally Posted by Alex Chamberlin (Post 1640275)
I'm seeing a lot of shooters shooting faster than ours, so the question is how did they get PID to return so fast ( >4 balls per second).
Our team is using an 8in pneumatic wheel direct drive to a cim, and we are getting about 1.5 balls per second when waiting for PID.

Direct drive may be sub-optimal, depending on your target wheel speed. Try to have the CIM running at about 50% speed when your wheel is at full speed.

This allows the motor to have sufficient "headroom" to pour in the power when needed.

We are running a 775 at 5:1 reduction, wheel speed is about 1000 RPM* on an 8" solid wheel. Our shot doesn't go much higher than the fuel inlet (by design).

*(I may be mistaken on this value, but I don't think it is higher than 2000 RPM)


All times are GMT -5. The time now is 18:28.

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