gametechmods

Robot Arena => Tutorials and Tips => Other Tutorials => Topic started by: Clickbeetle on October 17, 2009, 11:14:59 PM

Title: How Power Consumption Works
Post by: Clickbeetle on October 17, 2009, 11:14:59 PM
So, we all know that power consumption in RA2 is really weird.  There's the old adage: "Battery output == motor input for burst motors, battery output == half motor input for spin motors."  But is that really true?  How exactly does power consumption work?

I did some research so I could balance the batteries better for DSL3, and I'm not sure I like what I found.  No, wait, I'm 100% certain I don't like what I found.

First, a list of abbreviations I'll be using here.

MEMIOR == motor elecMaxInOutRate
BEMIOR == battery elecmaxinoutrate
PU == power units

The first thing I did is find out how using multiple batteries vs. a single battery works.  Everyone has always assumed that total power and BEMIOR are additive, but no one has really tested it.

I found that total power and BEMIOR are indeed additive.  So 1 battery with 1000 total power and 100 BEMIOR is the same as 2 batteries with 500 total power and 50 BEMIOR.

Then I moved on to some power consumption tests.

The most important thing that I found is this:  Spin motor MEMIOR has no effect whatsoever on battery drain.  That's right, folks.  Doesn't matter if it's a reverse angle motor, an HP Z-tek, a Dual Perm, or even a custom "gasoline" motor with -0.0001 MEMIOR.  They all drain the same amount of electricity.

With infinite BEMIOR, the battery drain is equal to 100 PU/second per spin motor.  So if you have a bot with 2 motors and a battery with 2000 total power, your battery drain will be 200 PU/second and your batteries will last exactly 10 seconds.

With finite BEMIOR, things get more complicated.  Perhaps it is easiest if I just show a graph here.

(https://gametechmods.com/uploads/images/62248batterydrain.gif)

As you can see, with a lower BEMIOR, the battery drains more slowly, in a more exponential manner.  The bigger BEMIOR gets, the closer battery drain gets to a constant 100 PU/second.  This data is with a battery with 1000 total power.

Now you might look at this and say, "Whoa!  I should use batteries with as little BEMIOR as possible so my batteries last longer!"  While it's true that less BEMIOR means longer lasting batteries, there are advantages to having high BEMIOR as well.

The higher BEMIOR is, the longer your spin motors stay at full power.  Also, you need 100 BEMIOR per motor in order to achieve full power in the first place.  So if you have two spin motors, you need a minimum of 200 BEMIOR to get full power out of them.  However, at this minimum value, they will quickly start slowing down as your batteries drain.  Using overkill BEMIOR keeps your motors running at max speed for longer.

Practical example:  A typical HW HS with 6 HP Z-teks needs 600 BEMIOR for full power, and a typical LW HS with 2 angle motor drive and 1 HP Z-tek needs 300 BEMIOR for full power.  So in theory, you can power Absolute Chaos with 6 small battery packs.  The only problem is that they have low total power, so it's going to slow down very fast.

So what about burst motors?  We already know they're different from spin motors, but how exactly do they work?

For burst motors, I found that MEMIOR does have an effect on power consumption.  So unlike spin motors, a DDT is going to drain more power than a Snapper2.

I started off testing on a battery with infinite BEMIOR again.  With infinite BEMIOR, a burst motor will drain a number of power units equal to its MEMIOR/1.6 each time it is fired.  Why divide the MEMIOR by 1.6?  I have no clue, that's just how it works.  So a DDT with -500 MEMIOR will actually drain 312.5 PU each time it is fired.

With finite BEMIOR, burst motors behave much like spin motors.  The smaller BEMIOR is, the slower your batteries will drain, but the burst motors will stay at full power for less time.  Also, you need BEMIOR equal to MEMIOR/1.6 per burst motor to achieve full power.  Like spin motors, using more BEMIOR than necessary keeps the motors at full power for longer.

Practical example:  For a typical MW popup with 2 HP Z-tek drive and 3 DDT's, you need 100 (x2) + 312.5 (x3) = 1137.5 total BEMIOR for max power, which is about 1 Supervolt and 1 Nifty.  For a typical HW popup with 4 HP Z-tek drive and 4 DDT's, you need 100 (x4) + 312.5 (x4) = 1650 total BEMIOR, which is about 2 Supervolts.  Remember that these are minimum values, however, and your motors may start slowing down depending on how much total power you have.

So what does all this mean for DSL3?  It means it is impossible to balance spin motor battery drain fairly.  The Dual Perm will always drain the same amount of power as a Piglet.  This explains why the ant batteries are so effective in DSL2.

I don't know what I'm going to do as far as battery/motor balancing goes at this point.  It's going to take some thought.  I would have never expected power consumption to work like this.
Title: How Power Consumption Works
Post by: JoeBlo on October 17, 2009, 11:27:29 PM
wow great work click, this may prove useful info for my upcoming mod too
Title: How Power Consumption Works
Post by: Sage on October 17, 2009, 11:37:49 PM
Very nice work Click.


As for your problem with balancing batteries and motors, i think making a larger sized battery more powerful than its weight it smaller batteries would do the trick (like it is in stock. I mean, it works in stock. Even though small battery packs would last in a 36HS, they are not powerful enough to spin the motors fast enough.)
Title: How Power Consumption Works
Post by: 123savethewhales on October 17, 2009, 11:50:59 PM
Thanks a lot.  This explains why I seem to run my HW just fine with 5 ant batteries but nearly run out on a LW with just 3.  I know something was wrong but I can't pinpoint it exactly.

Quick question, so this works as some kind of breakpoint?  If I have 15 amp per motor it follows the 10 amp chart and use reduced consumption at 750?  Or would the line be somewhere between 10 and 20?
Title: How Power Consumption Works
Post by: Clickbeetle on October 18, 2009, 12:22:32 AM
Quote from: Sage;73543
As for your problem with balancing batteries and motors, i think making a larger sized battery more powerful than its weight it smaller batteries would do the trick (like it is in stock. I mean, it works in stock. Even though small battery packs would last in a 36HS, they are not powerful enough to spin the motors fast enough.)

Good idea.  Not a perfect solution, but it will do.

I'm thinking about incorporating size factors into some other component stats as well.

Quote from: 123savethewhales;73547
Now I just have to find the formula to solve for the least amount of batteries use per motor to remain at full power for 3 minutes.

Good luck with that... I spent maybe an hour or two in Excel playing with formulas, trying to make a model for power consumption.  I never did get one that works for all values of BEMIOR.

Quote from: 123savethewhales;73547
Quick question, so this works as some kind of breakpoint?  If I have 15 amp per motor it follows the 10 amp chart?  Or would the line be somewhere between 10 and 20?

The graph for battery consumption depends on total BEMIOR.  If you are supplying 15 amps per motor and you have 2 motors, then you have 30 total amps and your graph will be between the 200 BEMIOR line and the infinite BEMIOR line.

Of course, you'll have much more than 1000 total power on a real bot, so your graph might look more like the 50 BEMIOR line on a greater electotal scale.  I just used 1000 total power for my tests because I didn't want to sit for 3 minutes waiting for a regular battery to run out.
Title: How Power Consumption Works
Post by: trumpetguy on October 18, 2009, 12:46:12 AM
How do you find out how much battery do you need for a SNS, since
A. They don't move around a lot. and
B. Their motors constantly go the same way.
Title: How Power Consumption Works
Post by: Clickbeetle on October 18, 2009, 12:49:50 AM
Quote from: trumpetguy;73559
How do you find out how much battery do you need for a SNS, since
A. They don't move around a lot. and
B. Their motors constantly go the same way.

Same way as any other bot.  SnS's are actually easy because of those things you mentioned.

Each drive motor needs 100 power.  So a 4WD SnS needs 400 power, which is 1 Nifty.  2WD needs 200, or 2 small battery packs, and 6WD needs 600, or 1 Nifty plus 2 small battery packs (might as well use 1 Supervolt).
Title: How Power Consumption Works
Post by: 123savethewhales on October 18, 2009, 02:16:12 AM
Quote from: Clickbeetle;73555
Of course, you'll have much more than 1000 total power on a real bot, so your graph might look more like the 50 BEMIOR line on a greater electotal scale.  I just used 1000 total power for my tests because I didn't want to sit for 3 minutes waiting for a regular battery to run out.

Total bemior?  Okay for a moment I thought it was 20 amp per spin motor.

edit:  NM you are right.  It can slow down anywhere and has nothing to do with the scales on top.  As for exactly how much it is much more difficult to say.

I think this finding will really affect LW, and to some extend MW.  HW probably has way more than enough batteries as is.
Title: How Power Consumption Works
Post by: Naryar on October 18, 2009, 03:00:18 AM
Hey kids ! Time to spam ant batts on DSL popups as well !
Title: How Power Consumption Works
Post by: Avalanche on October 18, 2009, 03:22:19 AM
Good idea.
Title: How Power Consumption Works
Post by: 123savethewhales on October 18, 2009, 03:55:51 AM
Quote from: Naryar;73570
Hey kids ! Time to spam ant batts on DSL popups as well !


You are right, say goodbye to those silly redpacks.
Title: How Power Consumption Works
Post by: HurricaneAndrew on October 18, 2009, 04:30:33 AM
Woah... So, basically what this proves is that the battery function in RA2 is completely unrealistsic and that everyones previous hypotheses about it were wrong?
Title: How Power Consumption Works
Post by: Pwnator on October 18, 2009, 04:36:37 AM
Not really. Though misinterpreted, it does have its advantages. Our previous rules of thumb still applies when you want your bot to be fully powered.
Title: How Power Consumption Works
Post by: 123savethewhales on October 18, 2009, 04:55:10 AM
Well, the rules of thumb seem to have changed from "ant only" for everything except those with burst motor, to simply "ant only" for everything.  Unless you are talking about some other rules of thumb that I am unaware of.

| Edit: Lol thanks for clarifying.
V
Title: How Power Consumption Works
Post by: Pwnator on October 18, 2009, 04:59:04 AM
I'm talking about Stock. The '1 black for 4 HP-Zteks' thingy. XD
Title: How Power Consumption Works
Post by: Naryar on October 18, 2009, 05:41:51 AM
Quote from: 123savethewhales;73588
Well, the rules of thumb seem to have changed from "ant only" for everything except those with burst motor, to simply "ant only" for everything.


Not exactly. Ant batts would be better for bursts if the bursts are not too powerful, but you can bet PC645's are still a good choice on Beta burst bots.
Title: How Power Consumption Works
Post by: roboman2444 on October 18, 2009, 09:40:58 AM
wow, so thats why 8 rad weped bots suck.
Title: How Power Consumption Works
Post by: Scrap Daddy on October 18, 2009, 10:30:04 AM
Quote from: roboman2444;73612
wow, so thats why 8 rad weped bots suck.


Maybe for YOU.

Well done, Click.
Title: How Power Consumption Works
Post by: Madiaba on October 18, 2009, 11:36:03 AM
Because of the evidences I suspected something like this, but not to this magnitude.
Good research, CB. This info changes a few things....
Title: How Power Consumption Works
Post by: 123savethewhales on October 18, 2009, 12:21:55 PM
Quote from: Naryar;73590
Not exactly. Ant batts would be better for bursts if the bursts are not too powerful, but you can bet PC645's are still a good choice on Beta burst bots.


If I am interpreting Click's graph correctly, and if my field test is correct, 2 spring loaded beta with 2 drive will cost 282.5 amps, or 29 ant batteries.  Perhaps red can be use to deal with rounding issues as a replacement for 3 ants, but for every red you put in in replace of ants, it's going to hurt your max power duration.  I don't think it's worth it to go beyond 20 ants + 3 red.
Title: How Power Consumption Works
Post by: Trovaner on October 18, 2009, 04:02:37 PM
Wow, nice work Click. I'm glad someone but the time into figuring it out. Some of my notes about motors will definitely make more sense now...
Title: How Power Consumption Works
Post by: RedSawn on October 29, 2009, 03:53:50 PM
Quote from: Clickbeetle;73540
I found that total power and BEMIOR are indeed additive.  So 1 battery with 1000 total power and 100 BEMIOR is the same as 2 batteries with 500 total power and 50 BEMIOR.


Not sure if this'll be a 'duh' moment or not but...

I can challenge that statement - I made a bot that uses two custom battery packs - One that has 200,000 total power and no BEMIOR, the other with no power but 2750 BEMIOR. It was just an attempt to see if it was possible to have components that boost a certain aspect - say like, fitting your bot with a BEMIOR booster.

The bot was a LW with custom motors that drain as much, if not less then a RAD. Two Snappers as well. So assuming batteries are additive; 200000 total power and 2750 BEMIOR is WAY more then enough.

But in reality - the bot can't even move. It's like it didn't have any batteries at all. It seems the only thing that is additive about batteries is the HUD power meter.
Title: How Power Consumption Works
Post by: Sage on October 29, 2009, 04:44:07 PM
I believe they have to come from the same source, but are additive. The battery with no power has nothing to output (making it's BEMIOR useless), and the battery with the huge amount of power cant output it because it has no BEMIOR. But if they both have some of each then they are additive.
Title: How Power Consumption Works
Post by: RedSawn on October 29, 2009, 04:53:01 PM
Quote from: Sage;75660
I believe they have to come from the same source, but are additive. The battery with no power has nothing to output (making it's BEMIOR useless), and the battery with the huge amount of power cant output it because it has no BEMIOR. But if they both have some of each then they are additive.


Yeah, that's how I figured. Kinda. Either way you explained better then I would.
Title: How Power Consumption Works
Post by: Naryar on October 30, 2009, 03:33:06 AM
Might be because the output decreases proportionally to the remaining electotal ?
Title: How Power Consumption Works
Post by: RedSawn on October 30, 2009, 09:22:21 AM
Quote from: Naryar;75750
Might be because the output decreases proportionally to the remaining electotal ?

Statement doesn't mean so much by itself. Or I'm thinking too openly about it.

If all batteries were additive towards a total power value, my post and statement challenge wouldn't exist, for the two packs would of worked.

If you meant separate batteries, which seems to be the most logical option overall and in your own statement  - also makes the system interestingly deep, for as you know they could of just made the batteries add up to one grand total and be done with it.
Title: How Power Consumption Works
Post by: Clickbeetle on October 30, 2009, 10:20:27 PM
Quote from: RedlineM203;75653
Not sure if this'll be a 'duh' moment or not but...

I can challenge that statement


OK, I'll append it to say: total power and BEMIOR are additive as long as all batteries are working.
Title: How Power Consumption Works
Post by: Somebody on October 31, 2009, 07:57:53 AM
Quote from: Clickbeetle;73560
...2WD needs 200, or 2 small battery packs...


So I stacked a Black and a CB into nearly 0 Space on Bunsen Burner 5 for NOTHING?????
Title: How Power Consumption Works
Post by: Naryar on October 31, 2009, 10:25:29 AM
You just need a nifty for a 2WD SnS design SB.
Title: Re: How Power Consumption Works
Post by: Skiitzzox220 on January 08, 2011, 10:26:07 AM
Very good information  :laughing


EDIT: I'm not a Spambot, ^_^
Title: Re: How Power Consumption Works
Post by: G.K. on January 08, 2011, 10:26:48 AM
Welcome to GTM.

EDIT: It's a spambot lolz. :P
Title: Re: How Power Consumption Works
Post by: System32 on January 08, 2011, 11:43:07 PM
In theory you could use a set of batteries with different values to make a system of power that can be timed in stages?
Title: Re: How Power Consumption Works
Post by: Team Code Red Robotics on October 18, 2018, 05:15:05 AM
Very nice work Click.


As for your problem with balancing batteries and motors, i think making a larger sized battery more powerful than its weight it smaller batteries would do the trick (like it is in stock. I mean, it works in stock. Even though small battery packs would last in a 36HS, they are not powerful enough to spin the motors fast enough.)

Why don’t we just have voltages to the batteries ( ants have 6v, battle packs have 12, etc, and piglets, Copals take 6v as well, and if you give a piglet 24v the piglet would not work (it would burn out))
Title: Re: How Power Consumption Works
Post by: Badger on October 18, 2018, 05:23:03 AM
Very nice work Click.


As for your problem with balancing batteries and motors, i think making a larger sized battery more powerful than its weight it smaller batteries would do the trick (like it is in stock. I mean, it works in stock. Even though small battery packs would last in a 36HS, they are not powerful enough to spin the motors fast enough.)

Why don’t we just have voltages to the batteries ( ants have 6v, battle packs have 12, etc, and piglets, Copals take 6v as well, and if you give a piglet 24v the piglet would not work (it would burn out))
We are limited by what RA2 is capable of doing. RA2 doesn't measure battery output in voltages, and all spin motors are hard coded to have the same power draw as each other, so we cannot change that. Clickbeetle has been working on overvolting, but I don't think it's possible to get RA2 to just "burn out" a motor based on anything except damage from an opponent.
Title: Re: How Power Consumption Works
Post by: Billy5545 on October 18, 2018, 08:21:43 AM
Very nice work Click.


As for your problem with balancing batteries and motors, i think making a larger sized battery more powerful than its weight it smaller batteries would do the trick (like it is in stock. I mean, it works in stock. Even though small battery packs would last in a 36HS, they are not powerful enough to spin the motors fast enough.)

Why don’t we just have voltages to the batteries ( ants have 6v, battle packs have 12, etc, and piglets, Copals take 6v as well, and if you give a piglet 24v the piglet would not work (it would burn out))
We are limited by what RA2 is capable of doing. RA2 doesn't measure battery output in voltages, and all spin motors are hard coded to have the same power draw as each other, so we cannot change that. Clickbeetle has been working on overvolting, but I don't think it's possible to get RA2 to just "burn out" a motor based on anything except damage from an opponent.
To add to the power draw code statement, yeah. It was a developer's error, and it's exe hardcoded. And only one person knows how to break into the exe so the game can be fundamentally changed (he is not as active now, and didn't make any change though). Basically, like bursts and maybe servos, spin motors were supposed to consume different amount of power, but the aforementioned error meant they all consume the same power
Title: Re: How Power Consumption Works
Post by: kix on October 18, 2018, 09:47:28 AM
Nice bump there fam