Physics of the Flywheel Launcher

We’ve been to the competition this weekend and our flywheel accuracy was deteriorating through the day.

This is what happens if, instead of dropping the power to the motors as the ball goes through, you actually increase the power prematurely before the ball have been launched (see the graph few post above).

To make things even worse this was a gear in the motor whose IME was providing input to the speed control algorithm. Ouch…

Same thing happened to us, except in one of our catapult motors. Only half of it was worn down though, since we use a slip gear, and only load the motors part of each revolution.

we’ve done this about 10 times, we just have a stack of replacments

Wow, is it typically the gears on the IME side that get worn out, the side where the axle goes in, or both? I figure it would be a good idea to make these gears easily accessible during matches so that they can always be replaced before the elimination rounds to make sure it doesn’t break in the middle of one of those.

It is the surface that transfers the power from the motor/IME side to the power-gear side. In my experience this is always the first thing to break, but I never seen it being that bad. In fact, we were moving IME from one motor to another a week ago and took the opportunity to re-lubricate both motors. At that time the gears looked used but weren’t bad enough to be replaced.

Gear in the picture on the left is from another motor that was driving our flywheel. That sibling motor was driving 60T gear, which in turn was driving IME motor’s 60T gear, which in turn was driving 12T gear on the way to the flywheel. So there was a 60T:60T gear interface that must have been absorbing some of the shocks.

In any case, the final damage must have been done during a couple of hours of practice before and during the competition itself. I must admit that our speed control algorithm did more damage than good and we would have been better off just running motors at the constant speed.

However, we will try to fix it, such that it will protect motors from the shocks, in addition to providing power-boost to speed up the recovery time, after the ball is launched.

Today I’ve got permission from technik jr to post our latest video in the open forum. It is from our practice session this past weekend, which I partially described in the thread.

Various launcher types could win you a game if build with attention to details and well tested. I am not claiming that single flywheel launcher is the best. I just want to add another data-point showing that flywheels could be almost as accurate and power efficient as any other launcher type, while having an advantage of being able to score from any point on the field.

The following video shows our single flywheel launcher that is run by a single motor:

In this configuration a high-speed motor drives 60T:12T gears and then 48T:15T chain for a total ratio of 25.6:1. We run motor at about 85% of its nominal speed and commanded power level is 90-110.

The secret to the efficiency of transferring energy from flywheel to the ball is the shape and position of the backplate. Before you ask any questions: technik jr wins here - there will be no additional details disclosed at this time beyond of what you can see in the video. Silly secrets. :slight_smile:

As I said before, we have run a 100-ball test: 92 landed in the high goal, 5 bounced off the edge of the net, and 3 went into the low goal. Our longest streak of hitting high goal in a row was 31 balls. That’s lower than 56 for the puncher we were competing with.

In the posted video we launched 30 balls in 1m45s - 1 bounced, 2 went into the low goal, and 27 ended up in the high goal. The average fire rate was 3.5 sec. In this iteration we focused on efficiency and accuracy and were conservative with our fire rate. We could, probably, improve it to 3 sec with a single motor, but eventually we are going to use two more motors to drive the flywheel.

Despite my constant begging to learn about and use TBH or similar algorithm, technik jr was stubborn enough to create speed control from scratch. It end up having four separate control segments, each tuned with its own constant. All those constants somehow must relate to the moment of inertia of the flywheel and the friction losses associated with running it.

I am not advocating this particular speed control algorithm - I feel it could be improved. I am just proudly reporting what technik jr did by trial and error (and by finally agreeing to study the graph above and, at least, listen to me describing TBH).

The first segment is for initial flywheel acceleration. Every 50 msec there is a constant increment in the motor power. It is kind of slow, but doesn’t trip PTC by limiting max current that motor draws.

The second segment/mode is detected when ball enters the launcher. We detect sudden drop in the speed reported by IME’s getMotorVelocity() and reduce motor power to limit stress on the motor.

When flywheel starts accelerating again, the third constant is tuned to flywheel’s moment of inertia and we try to stay ahead of the angular velocity by about 25%.

When we are within 5% of the target speed we use fourth constant to reduce the power proportional to the error (target-current velocity). We try to be conservative there, because if it overshoots it takes our launcher very long to slow back down.

The target speed is, obviously, have several presets for various points on the field and could be adjusted by a couple of buttons on the joystick.

Notes: For each value of angular velocity of the motor there is a specific back EMF (voltage). If you apply only that much voltage to the rotating motor - there will be no current flowing through the coils and therefore no output torque. To do any work (like overcoming friction) you need to apply higher voltage.

If you try to apply about 25% more voltage than whatever back EMF corresponds to the current angular velocity, you are, in essence, limiting forces going through gears as well as operate the motor close to its optimal efficiency point:

I say that we are 25% ahead, but we just picked something that felt like 25% higher and tested it. For example, if we figured out that to rotate at 200 RPM motor needs commanded power level 85, then we would command 110 and hope that we are about 25% ahead.

In reality, relation between commanded motor power and MC29 output voltage is nonlinear and you should not confuse idle speed and motor pulling flywheel with some friction, but I didn’t want burden anyone on our team with those details just yet:


I love your videos. And I’m very impressed by the efficiency of your one-motor flywheel shooter. That’s really amazing.

Thank you. Other team’s videos are very important to us for getting ideas and inspiration, so I tried to make sure we are contributing back to the community as well. And all those smart phones that keep distracting kids during the meetings - we simply had to find some good use for them. :slight_smile:

Now that we have established some very good efficiency numbers - the next frontier is the recovery time. While we are at least a week away from posting another video, I would like to give people one more chance to earn some prizes by answering question: what recovery time depends on? (few people, who already got the prizes, could vouch that I kept my word)

Since it is obvious, I will start the list by mentioning that as you increase the number of motors you improve recovery time. However, doubling number of motors will not cut recovery time exactly by half. The tricky question would be how exactly it changes recovery time and why. But that is for extra credit.

So there will be two ways to earn the prizes: first by posting links of the relevant treads that talk about recovery times (there are several good ones on this forum), and second by figuring out what goes into the equation of the flywheel recovery time.

Then we could, hopefully, figure out the equation itself and outline how to find the values for the coefficients specific for each flywheel launcher design. Once you know them you will have much easier time understanding and tuning TBH or similar speed control code you may have.

I think that the angular mass of the flywheels play a significant part in the recovery time of the launcher.

Yes, that is correct. Moment of Inertia (sometimes called angular mass) will be in the recovery time equation.

The larger is flywheel’s moment of inertia the more kinetic energy flywheel stores and the less angular velocity it will loose launching the ball. This will improve accuracy of the launcher when it needs to launch balls of varying mass.

However, if flywheel is too heavy you could stall the motors because the PTCs will heat up faster than flywheel could accelerate. Could anyone guess which formula is appropriate to back up this statement?

Rate of recovery is dependent on moment of inertia and torque, as well as friction and air resistance (negligible). As far as increasing the number of motors vs. rate of recovery, I think that is due to the behavior of electric motors under load more than the actual effect of torque on acceleration. I think acceleration varies directly with torque, but torque does not vary directly with the number of motors.
The amount of recovery necessary between shots, or recoil, is dependent on moment of inertia as well, so that, as far as I can tell, cancels out, force to compress the ball, mass of the ball, and acceleration of the ball (speed/time).
Recovery time is the recoil divided by rate of recovery. I think friction reduces the rate of recovery, since too much friction results in no recovery, so the time of recovery would be undefined/infinite. We are at an equation of approximately

Tr = recovery time
m = ball mass
V = exit velocity of ball
Vo = initial (entering flywheel) velocity of ball
Fc = force required to compress ball
Tf = time ball in contact with flywheel
τ = torque
Ff = force of friction

I’m probably missing stuff, so feel free to add to it.

@lpieroni your quick response took me by surprise. I thought there was more time for me to type up formulas in LaTeX and make a couple of graphs. :slight_smile:

As far as the components that go into the equation you pretty much got everything. Except, instead of torque I would use number of motors and something else rather important. You can still try to score some points naming it.

You have correctly identified the correlation between growth of the input parameters and the recovery time with the exception of one. The formula is more complex than just division and multiplication, but nobody is expected to produce it without solving some differential equations.

That is correct if you are recovering speed from a known angular velocity to a known target velocity. In our case angular velocity after ball leaves the launcher depends on some of the launcher parameters and the ball itself. Also, we need to break up torque into more components, since those we could change and control. What would they be?

Yes, the way motors behave under load plays very important role in our equation. However, we will exclude some of the secondary effects like PTC heating to keep things as simple as possible.

The first statement is exactly correct and corresponds to the Newton’s law: F = ma or its angular equivalent: τ = Iα, where τ is torque produced by motors at flywheel axle, I is flywheel’s moment of inertia, and α is angular acceleration of the flywheel.

The second statement would not be correct if we consider an ideal system, where torque would indeed be proportional to the number of motors, but in the real systems where motors draw power from the single battery through PTCs and there is voltage drop over the internal resistance it would be correct. Since we don’t need to to have insanely accurate model, we will try to get away with assuming that torque is proportional to the number of motors. Only if launcher draws significant portion of battery power then modeling this non-lineriarity would become important.

Yes, that is correct, but with some limitations. Once I upload the graphs it will be more obvious why.

Yes, all those are correct, the more ball compression force there is, the heavier is the ball and the more friction is in the system the slower is the recovery.

So the remaining questions are: What parameters should we replace torque with?
What is the single input parameter that @lpieroni put on the wrong side of the equation?
And are there any other parameters unique to each launcher design that could go into the equation?

Torque should be replaced by the number of motors and the gear ratio, since we control those. We will also need to account for how much torque each motor puts out at various times, since these motors have torque-speed curves. I put friction on the wrong side of the equation. It should be in the numerator (although, as you said, it’s not just multiplication and division). I’m doing what I can with the math that I’ve learned (I’m only in geometry this year), and I will leave the differentiation to the higher educated folks who actually know what they’re talking about.
As for unique parameters, this would be the number of sides to the wheel (i.e. single vs. double flywheel) since a double flywheel ideally transfers 100% of its angular velocity on the ball, while a single flywheel transfers 50% of its angular velocity. By the same token, a single flywheel with 2 motors and the same gear ratio and wheel size and mass would experience only half of the recoil of a double flywheel with 4 motors (2 per side).
Does this equation look better?


Tr = recovery time
m = ball mass
V = exit velocity of ball
Vo = initial (entering flywheel) velocity of ball
Fc = force required to compress ball
Tfly = time ball in contact with flywheel
τ = torque
Ff = force of friction
Nf = number of sides to flywheel (1 vs 2)
Nm = number of motors
Rg = gear ratio (reduces torque, so increases recovery time)

Edit: @technik3k pointed out something in the above equation. Tfly (originally Tf) was terribly named, and was easily confused with Ff, force of friction. I looked back at the equation to see what Tf was, and I realized that the length of time that the ball is in contact with the flywheel has diminishing returns, and eventually becomes counterintuitive, increasing friction. Acceleration is based on force (primarily the flywheel’s moment of inertia, but also slightly the flywheel motors’ torque), rather than how long the ball can be in contact with the flywheel, so this becomes more difficult to account for. If someone else wants to give it a shot, feel free, but I think I’ve contributed about as much as I can to this thread, at least until I can start teaching myself calculus and physics formulas that I actually understand.

Yes it does, in a sense that you have identified most of the parameters that influence the recovery time.

Yes, that is correct and if you could elaborate what you mean by “puts out at various times” that would be great. (It is a tricky question with more than one answer).

That is also correct, but I am curious why you have Tf in the denominator. Ff and Tf go hand in hand and there could be several ways of counting them in.

If by recoil you mean reduction in the angular velocity, then yes, it is a very good point. Since kinetic energy of flywheel Ek = (Iw^2)/2 then single flywheel (rotating at twice angular velocity w) will have 4 times as much energy as one of the double flywheels and 2 times more than pair of them. Then, since balls are expected to take specific amount of kinetic energy from launcher, a single flywheel launcher will experience smaller slowdown.

Electric motors can exert torque anywhere from almost no torque to stall torque. If a drive gets into a pushing battle with a wall, the motors exert stall torque until they stall, but if you just spin a motor without connecting anything to it, it will exert almost no torque. You will notice this in the speed of the motor, since

power = speed * torque

However, there is a third case, which is between stall torque and free speed, and this case is basically everything. With a 4 speed motor drive on 4" wheels, and 15 pounds of weight on the drive, you will notice that the drive motors are not spinning at 160 rpm, which is the free speed of speed motors, but the motors do spin. Motors only exert as much torque as they need to, (or are able to, in the case of the robot vs. brick wall pushing battle). I haven’t observed flywheel acceleration enough to confirm, but the motors most likely exert the most torque at the instant that the motors turn on, before the flywheel starts to spin, when it exerts stall torque, and as the flywheel accelerates, the motors exert less and less torque to compensate for the increased speed (power remains fairly constant). I have a sneaking suspicion that if someone graphs the velocity of a flywheel, it will be exponential, with the slope decreasing as time increases.

As for Tf, I wrote that part in a slight hurry, so I didn’t name my variables at all well. I will fix that particular in my original post. Tf is actually how long the ball is in contact with the flywheel. I’m not sure if it actually makes a difference because neither the ball nor the flywheel know when they will lose contact, so I don’t think acceleration is affected by the length of the hood. While it is important for acceleration, lengthening the hood past the point at which the ball’s and flywheel’s angular velocities match actually increases friction, and therefore recoil. I don’t know how to incorporate time of acceleration into this formula, but it’s not the way I did it before. I will change that variable name to Tfly, and make sure I mention in that post that I did a bad math thing, and I don’t know how to fix it. Now I see why schools do physics first. =)

As @lpieroni is doing an excellent job enumerating input parameters that we need to know to understand flywheel recovery time, I would like to deal with the first prerequisite: equation for flywheel’s angular velocity as it accelerates.

You don’t have to take theoretical mechanics or electric engineering class in college to be familiar or understand these exponential curves as they are very common.

Lets consider a single flywheel launcher driven by n motors:


I is the moment of inertia of the flywheel (and geartrain that leads up to it)
Im is the moment of inertia of an individual motor (it is almost negligible compared to I)
k is the gear ratio between motors and flywheel (for example 25:1)
w is angular velocity of the flywheel (it is k times larger than angular velocity of the motors)
α is angular acceleration of flywheel (same k multiplier over the acceleration of motor axle)
τfr is net torque of friction resistance in the geartrain as measured at the flywheel axle 
Vpwm is the voltage coming out of pwm controller and applied to the motor
Cmt is some coefficient which links input voltage and output stall torque coming out of the motor
Cemf is some other coefficient which links motor angular speed with reduction in its output torque

The first equation expresses Newton’s law for torques around flywheel’s axle. The sum of torques on the left side required to accelerate flywheel and geartrain components (including motor internal gears) and counteract friction in all bearings and gear-to-gear interfaces is coming out of motors’ output torque on the right side.

Since we have to link processes around flywheel’s and motor axles there is a number of (k) sprinkled around. If you think it is a bit confusing, you are in the same boat with me. Essentially, torques coming from motors to the flywheel axle and angular velocity and acceleration coming from flywheel to motor axle both need to be divided by k.

Solving differential equation for w(t) will yield the formulas and corresponding curves.

We don’t really care at this point about values of the specific coefficients. It is only important to find the shape of the curve for angular velocity as a function of time and see how it depends on various launcher parameters like moment of inertia of the flywheel.


The graph shows velocity in case when motors are disconnected from geartrain and are idling and the case where motors are accelerating flywheel. If you need the values for Cp, Cf, and Ct coefficients for your specific launcher you can conduct those two experiments and determine them from the logged data.

Cp corresponds to the max idle angular velocity your motors could deliver and depend on motor’s electrical characteristic minus internal friction and electrical losses. (Another extra credit question: what are the units for Cp?)

Cf corresponds to the friction losses in your geartrain when it is waiting for launching balls. (Cf is measured in the units of angular velocity).

Ct corresponds to the inverse of the max flywheel acceleration your launcher could deliver - it depends on power your motor could output and flywheel’s moment of inertia that it needs to counteract. (Ct is measured in the units of time)

If you find this familiar it is because I have recycled most of the names and the graph from the position estimation thread which, while not very readable after the forum upgrade, has some additional informaion. For example, backstory about Cemf and interesting details about VEX motors.

Please, keep those great answers coming, while I work on my next posts.


I agree that it is a difficult subject. Depending on the launcher design you may or may not want to let the ball go before its velocity matches tangential velocity of the flywheel.

My preference would be to keep the ball in touch long enough for the velocities to match. Otherwise you will need to run flywheels at much higher RPMs than necessary and, I think, it is the main cause of some launchers shredding the balls more than others.

This is actually very important point and one of the last puzzle pieces I was looking for. Let say we designed the launcher’s backplate to minimize any unnecessary time interacting with the ball.

Then what would be the energy losses due to friction as a result of ball going through the launcher? Where would those losses occur and what is the formula for that?

For simplicity we will not consider any losses due to ball’s surface sliding off the flywheel’s surface before their velocities match.

During the short time when when flywheel launches the ball most of the energy to do that is coming out of flywheel’s kinetic energy. After ball is launched flywheel’s angular velocity will decrease from initial ω_1 to some ω_2 corresponding to the change in the kinetic energy.

That energy will be used to accelerate the ball, spin it (in case of a single flywheel), compress it, and the rest will be converted into heat via friction. For simplicity I will omit the spin component and friction losses between surfaces of the ball and flywheel before their velocity match.

The energy (work) used to compress the ball will be product of compression force Fc and compression distance Hc. In reality, it is some complex integral depending on ball’s density and shape, but for this exercise we will represent it as a product of some mean values.

Similarly, extra friction in the flywheel’s bearing, when ball is compressed, will be a product of extra torque due to friction τfr and some angle theta that flywheel rotates while it compresses the ball. τfr itself is the product of Fc and some coefficients corresponding to bearing’s material and geometry. Instead of angle of flywheel interaction with a ball, you can use the product of flywheel’s angular velocity and the time of interaction, which may be easier to understand.


Now lets assume that ω_1 corresponds to the 80% of the max speed that the motors could deliver for our launcher design. Then as launcher waits for the ball, motors will be commanded to stay at power level corresponding to ω_1 and, after the ball is launched, and speed drops to ω_2, we will command motors with the max power for the best recovery time.

We are interested in finding the difference between times t2 and t1 when speed curve corresponding to max power crosses ω_2 and ω_1 respectively:


Finally substituting Ct with some launcher parameters from the previous post we get the final equation for the recovery time:


So the question would be: is there any practical use in expressing recovery time in terms of a bunch of an obscure coefficients, which nobody knows anyway?

First of all, lets note that the gear ratio (k) and percentage of maximum power your launcher runs at § are not independent.

When you design the launcher you will know some minimum ratio (Ko) that is necessary to make full court shots at max power and then you have a choice to increase (k) for increased power margin and therefore a better flywheel recovery time. Here is an updated formula that reflects it:


Then we use an online graphing calculator to plot how recovery time would change as a function of one of the input parameters when everything else remains unchanged. There are two constants that appear in the equations: 0.25 assumes that as we launch the ball flywheel loses a quarter of its kinetic energy, and 0.55 is the percentage of nominal speed that I would run my launcher for the best recovery time.


The blue curve (1) shows almost linear relation between ball’s mass, compression force, or bearing friction and resulting increases in the recovery times. Essentially, (x) stands there for the percentage of kinetic energy of the flywheel that it takes to launch a ball. For example, the heavier the ball is the longer it will take to recover.

The red curve (2) shows how recovery time would change if we vary flywheel’s moment of inertia while everything else remain the same. Evidently once moment of inertia is large enough it doesn’t affect recovery time, because we are replacing energy lost by the ball. Larger moment of inertia only affects flywheel startup time and targeting accuracy in respect to varying balls.

The orange curve (3) shows how recovery time depends on the amount of power margin you have in your launcher. It is kind of obvious even without this graph that with better power margin you get faster recovery time, but it is nice to see the shape of the curve to make your design decisions. On one hand you may want to make p = 0.55 for the fastest recovery, on the other hand you may set p=0.8 and save a motor or two while not being that much slower. Just note that exact placement of the curve depends on percentage of kinetic energy loss and you may want to test both of your options experimentally.

Edit: I did this post in a hurry yesterday and missed an important point about connection of k and p. This has been fixed.

We know the formula for the recovery time and how it depends on various launcher parameters. But how would it apply to your specific launcher configuration?

Lets look at the example of our test launcher. We have a speed motor driving 5" flywheel with 16:1 external = 25.6:1 total gear ratio.

We have this little program which logs some vital statistics to the Debug Stream every 5 msec:

task main()
  float w=0, w2=0;
  motor[fw1] = 127;
	int wIME = getMotorVelocity(fw1);
	w = (3*w + wIME)/4; // smooth velocity estimate
	w2 = w;

The first test we run with the motor disconnected from the flywheel geratrain and it settled at ~161 RPM which is about 100.6% of its nominal speed at Vbat = 7.5v.

The second test was run with motor driving flywheel and, after several seconds, velocity settled at 143 RPM. This is 18 RPM below the max idle speed and represents friction losses in our launcher (see Cf coefficient few posts above). We need about 137 RPM to shoot full court, so this means there is very tight power margin and long recovery time, but it is perfect for this type of testing.

This is the graph from the data collected in the Debug Stream with velocity in red and acceleration in green:


First of all, notice a big spike at the beginning - it is not an instrumentation error or a flux. It is a very real thing due to the slack in the gear train. The exponential curve accelerating heavy flywheel starts a bit later and you can see battery voltage drop as the motor draws lots of current. When you program your speed control you may want to increase power gradually to protect gears from the shock.

Second interesting point is that readings out of getMotorVelocity() are noisy. Whether due to electromechanical properties of IME, round off errors in the firmware, or something else you are getting values that keep jumping inside ~10 RPM band while you expect your flywheel to run smoothly. The code above applies exponential smoothing with 3/4 coefficient to filter out some of the noise.

Even with the smoothed velocity the acceleration values are still noisy. This is expected with a very small sampling interval we have, but it is good enough to detect “abnormal” events. By looking at the speed curve you can, probably, guess that there was a ball launched around 8 sec. Programmatically we do this determination by testing if acceleration value drops below some negative threshold.

The second graph zooms in on the ball launching event:


You could see two distinct acceleration spikes as the ball interacts with the first and second flywheel stages of our launcher. First, around 7.876 sec velocity drops from 139 to 128 RPM, then around 7.946 sec from 141 to 127, and then to 123 a bit later. Note that it is speed as measured at motor’s IME and not the actual velocity of the flywheel. The spike you see at 7.921 is likely due to the funny way slack travels in the chain connecting flywheel stages.

The important numbers from this experiment is that our flywheel took about 0.175 sec to launch a ball and had decelerated from ~14116 = 2256 RPM to ~12316 = 1968 RPM, which corresponds to about 24% of flywheel’s kinetic energy.

If you would like to improve your launchers recovery time, I would suggest you to conduct similar experiment and find out: friction coefficient (Cf), time to launch a ball, and velocity drop after the launch. This way you can assess how your launcher stacks up against others and what you will need to work on. Also, if anybody would like to post their numbers to this thread, please, feel free to do so.