Jump to content

Make electricity make sense


Recommended Posts

Currently EC is in `units` which do not seem to relate logically when different uses are considered. Some parts use far too much, others not enough.

Generally in the game, the units used do not seem to relate to real world units, we use meters and meters per second for height and speed of course and Kg for the weight of your craft but what is the fuel unit? Kg,  Litre, pound?

What is the EC unit? Kwh? Ah?

Why use Earth units for some things but not others? It makes no sense when people are using equations to determine the rocket equation for example to not have the unit that fuel comes in be obvious to the user. In a similar way, EC usage needs either a mod or a spreadsheet just to know if your craft will have enough or not. It would be nice to have maximum EC usage reported to the user as a single number in the VAB at least.

It would really be nice for there to be some unit for EC which would make sense to someone familiar with electricity. A general pass through the code dealing with EC making all part's usage make sense relative to each other and having each part let the user know the EC usage, not just in the VAB but in flight as well would be most welcome.

I am sure some others have better things to say about sorting out the way KSP deals with EC. These are just some early morning random thoughts from me. Sorry if it should make more sense, might need another coffee :wink:

Link to comment
Share on other sites

I don't disagree,  but this seems maybe less important than the other units you mention.  In particular,  it's helpful to have meters, kg, etc. to be able to do conversions (i.e, acceleration from force and mass,  the rocket equation,  etc.).  Electricity,  though,  kind of stands on its own and does not interact with the other stats in the same way.   

For the record,  I think the official EC unit is Pirate-Ninjas.

Link to comment
Share on other sites

The sparks system was obviously implemented either by someone with a primary school understanding of how DC electric circuits work, or deliberately pitched to that level. Calling the units Electric Charge (i.e. voltage) is so cringeworthy it's funny. On the other hand, it is very simple to understand. There's a big difference in the efficiency dynamics and versatility of applications between energy stored in chemical fuels and energy stored in electrical charge. The most obvious is that batteries 'fade' as the stored energy is depleted in a way that gas tanks never do.

I think Squad were right to prioritise fun over realism where EC is concerned, because understanding the subtlties of a realistic battery operated spacecraft's power levels would be...hmmm.. daunting. Then again, as a consequence, we're denied the awesomeness of booting up our craft's re-entry systems in the right order to avoid critical mission failure, a la Apollo 13.

Link to comment
Share on other sites

I will add that, were you to tell me "in 1 hour you will take a test on basic electricity, and if you pass you'll get 1 MILLION dollars", I will fail.  I'm sorry, electricity just has never "stuck" with me, despite my high science hobbies.

I will say though, despite being happy with the elementary electricity analog system, that I am ALL for a flag in the VAB that will tell you if you've planned for enough power when all your electrical gadgets are on max draw.

Link to comment
Share on other sites

18 minutes ago, GarrisonChisholm said:

I will add that, were you to tell me "in 1 hour you will take a test on basic electricity, and if you pass you'll get 1 MILLION dollars", I will fail.  I'm sorry, electricity just has never "stuck" with me, despite my high science hobbies.

I will say though, despite being happy with the elementary electricity analog system, that I am ALL for a flag in the VAB that will tell you if you've planned for enough power when all your electrical gadgets are on max draw.

Fusebox is your friend

Link to comment
Share on other sites

It wouldn't be terribly difficult to convert ECs into something that behaves more like electricity.

The real problem is really that ECs are treated in a manner similar to physical finite units such as the fuel and air units for simplicity's sake.

 

But if we were willing for a moment to approach electrical power like power, one could equate it to a water hose.

 

Voltage is water pressure.

Current is how much is actually flowing through the hose.

Things like batteries are like water towers.

 

The_Rocketeer makes a valid point that there is 'fade' as power sources run down.  If you treat a battery like a water tower, then as the water in the tower runs out, pressure is reduced, reducing current.

 

Bringing EC up to a minimum standard to gauge electric power would likely require a little thought to keeping it simple enough for kids to work with, but realistic.

The hard part really comes from the crossplay of (V/IR) and (P/IV).  The problem is that in most domestic environments, the 'starting point' is defined by existing standards.  We pay attention to voltage.  That is to say, we pay attention to things like 'volts' on a 9-volt battery.  Not how many joules it has stored, or amps the wiring it's hooked up to can handle, or how much resistance the whole circuit has, or how much it will bleed off energy as it operates.  Thus, the problem is that for most casual people and those not educated in EE, there is a distinct lack of realization at how electricity isn't just a supply and an amount, but reliant on the 'shape of the pipe' to tell you how much is going to flow, how much energy will be delivered, and how long it will last.

If you want to bring that up to at least a certain level of slightly more electrical realism, a system will have to be created 'under the hood' that makes a mess of logical assumptions to dumb it down enough for it not to drown kids.  And that's... surprisingly easy.

The biggest assumption is to assume that the electrical engineering side of things never sees the light of day.  If you can do that, you can simplify the power system down to critical aspects.

 

1: Total energy in a source (battery/generator/solar panel*)  to have a unit assigned after hashing it out.

2: Maximum energy that can be delivered by a source per second (or game tick when you're mathing it under the hood).

3: Driving voltage sources provide per source

4: energy a device consumes per second while functional

5: driving voltage a device needs to be considered functional.

 

Driving voltage is the easiest to work with.  If the total driving voltage of all sources onboard is greater than the driving voltage required to operate devices, they run.  If it is below the requirement, they stop running.  The end.  ALL digital electronics work this way as that is how diodes and transistors operate.  This is then slightly complicated by the fact that all voltage sources are evaluated as a whole, while all voltage consumers are evaluated individually.

Thus, a rocket with two 12 volt batteries holds 24 volts (assuming batteries wired in series, but the EE itself is hidden), while it contains four consumer devices; two requiring 5 volts to operate, one that requires 9 volts, and one that requires 12 volts.  As the batteries run down their power curves, the 12 volt consumer stops working first. Then things continue on normally until the voltage drops below 9, then the 9 volt consumer dies.  And so on until the 5 volts run out, then those consumers die.  Note, that once the 5 volt consumers are down, there is still power in the batteries, but not enough voltage.  You could get away with setting up specialty items like 'tracking beacons' or other 'emergency low power devices' to take advantage of things like this.  But I digress.**

The interplay of the maximum energy that can be delivered by a source per second and voltage are next, and can also work on certain assumptions.  When looking at (V/IR), you can make V and I equal by equation I=V/R and setting R to 1.  If resistance is 1, then current IS voltage.  Once you've done this, the equation becomes simply "I-squared-R" to get power in Watts [SEE: (P/IV) converted to P=IV] .  If we're assuming R is '1' forever, then the equation for power is 'I-squared'.  Or "V-Squared"...  Because with R set to 1, again, V IS I.

 

Because of this, you run into an interesting situation.

Your deliverable power is a square of the total onboard battery voltage values.  1, twelve volt battery is 144 watts.  2, is 576 watts. 3 is 1,296 watts... etc.

In this manner, the player is actually required to consider  not so much for long power supplies, but for 'burst' power from high-end consumers. 

 

At this point, the only point left to consider is what the value of stored energy in a battery is and its relationship to consumers.  It's easy enough to assign a battery a maximum and minimum 'rate' based on its total stored energy, and that can be anything the programmer wants it to be with the only consequence really being how close to real-life storage and consumption values it is, and how many fires get started from the virtual amps that get pumped through invisible wires.  The behavior is pretty close to the same.  From here, it becomes a task to find the balance for how many discrete units of power each battery holds and how many discrete units of power a particular devices consumes per second or per tick.

 

*Solar Panels have no finite energy like a battery, but will have a driving voltage/deliverable energy per unit time value.

**Another point with the voltage involves analogue equipment like motors, which will operate into the dirt without a discrete switching voltage, but at ever reducing rates as power runs down to zero.  Might we worth considering for reaction wheels.

 

 

 

 

Link to comment
Share on other sites

You are making it too complicated.  Batteries store electrical charge, in real life called ampere-hours (or miliamp-hours).  Kilowatt-hours can also be used.

Voltage shouldn't be a thing in the game, that just makes it too complicated.

So really, it is pretty similar to the ither resources.  

I agree that some of the consumption rates need to be adjusted, bur the basic mechanic is fine

Link to comment
Share on other sites

No, CAPACITORS store electrical charge.  (And very briefly at that.)

Batteries store chemical energy in a configuration that easily converts that to electrical current and thus PROVIDE a constant DC source for electrical charge.

Electrical charge, otherwise referred to as electrical potential, or VOLTAGE is a vital factor of an electrical system.   It is the 'pressure' behind the flow of electrons through circuits, and different pieces of equipment do operate on different driving voltages throughout a system.   And as battery power dwindles, voltage drops, causing equipment with larger driving voltage requirements to shut down first.

Link to comment
Share on other sites

Batteries and capaciters both store energy.  You can quibble about the details, but the essence of what I wrote is still valid.

The average person doesn't know about voltsge, pressure, etc.  So the game has simplified it to what can be inderstood by everbody.

And while I do understand what goes on, I don't want to be forced to think about it in a game.

Link to comment
Share on other sites

Others have told me that one EC/s is often treated as one kW, interpreting the EC as a unit of energy and not one of actual electric charge.

Let's try doing some math... (is my high school electrical physics as good as my high school chemistry?) If one EC/s is like one kW, that's 1000 Joules/s (P = E/t) or 1000 Volt-Amperes. (P = IV.) A Volt is a measure of electrical potential, a difference of electric charge between positive and negative, assuming DC. It's expressed as potential energy per electric charge (V = E/C). An Ampere is a measure of current, or electric charge flow per time (I = C/t; High School used 'I' for identifying electric current.) 

Do we want to solve for electric charge, or energy? If we solve for energy: 1 EC = 1 kWs (kilowatt-second), or 1 kJ. Pretty simple. But what about real world electric charge in Coulombs or milli-ampere-hours? Luckily, a quick search turned up a simple table to convert energy in J to various values based on current, voltage and power. 1000 J is about 0.27 AVh (ampere-volt-hour) or exactly 1000 AVs (ampere-volt-second) but we can't solve for current or charge without knowing what voltage standard KSP devices use. Maybe we can guess though; a Z-100 battery pack's description is "two AAAA batteries," which would be three volts DC in series in real life. A Z-100 pack would then contain 100 kAVs / 3 V = 33.3 kilo-ampere-seconds or about 9.25 ampere-hours, or about 9259 milli-ampere-hours (mAh). By comparison, a real Li-ion AAA (not AAAA) battery holds about 400 mAh, or a pair of them 800 mAh. That makes the KSP batteries hold over ten times the charge while being smaller!

We can assume all KSP electronics use the same voltage value or they wouldn't work together, and I think we can assume direct current; even engines with alternators are generating DC charge as this is what 'alternators' do as opposed to 'generators.' Since KSP batteries are rechargeable, we can assume an improved chemistry is in use, in that charging and discharging are essentially perfect. Like a perfected lithium-ion chemistry. And since the smallest battery pack is "two AAAA batteries," we could assume all KSP devices use 3 V as their standard, like Year 2000-era desktop PCs and many modern low power devices. They'd also be tolerant of really high currents and probably have superconductor-like properties to avoid I2R losses to heat. And hopefully have built-in breakers to avoid unfortunate kerbals electrocuting themselves.

One EC/s or one kW at 3 V would mean currents exceeding 300 A. Modern arc welders carry that much current at 12 VDC.

My conclusions? Assuming one EC/s is one kW:

  • KSP batteries hold about ten times as much charge as real world batteries of comparable size
  • KSP electronics could be standardizing on 3 VDC based on the Z-100 battery pack's description
  • 3 VDC would mean ridiculous amounts of current for a lot of equipment; enough to kill a kerbal probably, though it'd depend on the kerbal's natural resistance to current
  • It's just a game; treat EC like energy and don't fret over how much electricity that is!
Edited by Gordon Fecyk
Superconductors, not semiconductors ya knob!
Link to comment
Share on other sites

I always think of electricity (and all resources) in the game as, you're the boss who doesn't know anything about this stuff, and the engineers are explaining to you how many batteries are needed. You ask why you can't have 3 batteries and instead need 8, and they start talking about voltage and amps and kilowatt-hours and your eyes glaze over. Then one particularly savvy engineer comes in and says "See, this battery here holds 200 electric charges. We need 20 electric charges to send a science data. We need enough energy to send 800 science datas at a time so we need to hold 1600 electric charges."

Then you feel all smart as you approve the extra batteries.

 

Link to comment
Share on other sites

48 minutes ago, 5thHorseman said:

I always think of electricity (and all resources) in the game as, you're the boss who doesn't know anything about this stuff, and the engineers are explaining to you how many batteries are needed. You ask why you can't have 3 batteries and instead need 8, and they start talking about voltage and amps and kilowatt-hours and your eyes glaze over. Then one particularly savvy engineer comes in and says "See, this battery here holds 200 electric charges. We need 20 electric charges to send a science data. We need enough energy to send 800 science datas at a time so we need to hold 1600 electric charges."

Then you feel all smart as you approve the extra batteries.

 

At which point you're Uncle Palmer.  (Kudos to anyone who gets that and chuckles.)

Have some rep.

Link to comment
Share on other sites

2 hours ago, 5thHorseman said:

I always think of electricity (and all resources) in the game as, you're the boss who doesn't know anything about this stuff, and the engineers are explaining to you how many batteries are needed. You ask why you can't have 3 batteries and instead need 8, and they start talking about voltage and amps and kilowatt-hours and your eyes glaze over. Then one particularly savvy engineer comes in and says "See, this battery here holds 200 electric charges. We need 20 electric charges to send a science data. We need enough energy to send 800 science datas at a time so we need to hold 1600 electric charges."

Then you feel all smart as you approve the extra batteries.

 

That would absolutely make sense ... if fuel tank capacity was measured in "m/s"...

Link to comment
Share on other sites

Even as an electronics technician I have to agree that the way electric "power", to avoid the word "charge" here, is implemented in the game is already quite good the way it is. Just needs some tweaking regarding the RIDICULOUS power consumptions of some parts.

Even as someone who has a brief understanding of electronics to the point where I could maybe even wire components together all by myself if the game went that far I think things should be kept as simple as they are. After all, there are probably even players who wouldn't even understand the most basic electric principles. Also, making sure to set up the staging correctly becomes quite a challenge in itself at a certain point, so there's no need to make things even MORE complicated.

Link to comment
Share on other sites

I think of Ec as Amp.s and therefore Ec/s as Amps, quite similar to the practical Amp.h and Amps in common DC setups. Sure the consumption & production rates as well as battery masses are far from realistic, but it doesn't matter from a gameplay perpective: after all, nobody cares that in most shooters, you can get shot dozens of time and still run the same!

Link to comment
Share on other sites

2 hours ago, DualDesertEagle said:

Even as an electronics technician I have to agree that the way electric "power", to avoid the word "charge" here, is implemented in the game is already quite good the way it is. Just needs some tweaking regarding the RIDICULOUS power consumptions of some parts.

Even as someone who has a brief understanding of electronics to the point where I could maybe even wire components together all by myself if the game went that far I think things should be kept as simple as they are. After all, there are probably even players who wouldn't even understand the most basic electric principles. Also, making sure to set up the staging correctly becomes quite a challenge in itself at a certain point, so there's no need to make things even MORE complicated.

I don't want things more complicated, the opposite in fact. Currently (ba-dum tish) you have to look at each part individually, add up the various consumptions and productions to see if you have enough power being generated or not. That is a pain.

I would like a readout showing the max power consumption for the whole craft and consumption per stage. It could be shown as a popup if you hover over the stage marker in the VAB. A similar display showing production would then mean that I have to think a LOT less about just EC.

In combination with a rationalisation of the power consumption of some parts I am of the opinion it would improve gameplay for the technically minded and the less technically minded. It would be one less thing that needs a spreadsheet...

EDIT :

I have tried Fusebox, also Ampyear and while they do a fair job, fusebox fails to note the usage and production from so many mod parts that if you run mods it is almost useless. Ampyear does a much better job with edge cases but has a conflict with other mods and it makes the root part unable to move. It hangs in the air and the whole craft just hangs from it. Nothing can make it move. Bit of a sticking point for a game based around going places.

It would be best to have a stock method of adding up EC usage and EC production. It would catch all the cases that use and make EC and suffer less interaction with mods.

Edited by John FX
Link to comment
Share on other sites

25 minutes ago, Vahal said:

John FX I think like any other data providers like the one with MechJeb2/Kerbal Engineer/VOID Squad will let this for mods, and you have AmpYear and Fusebox Continued for that role. :)

Not quite sure what you mean but I have outlined the reasons why Fusebox and Ampyear are not suitable and why a stock implementation would be best above your post.

Link to comment
Share on other sites

@John FX My post was aimed at those who were talking about stuff like more consumers requiring a higher current / voltage whoch to achieve requires some knowledge of how to connect multiple batteries together to achieve either goal.

And no one can expect anyone who doesn't know the slightest bit of electrical principles to know that batteries connected in series put out a higher voltage and batteries connected in parallel put out a higher current. Having that implemented would only add to the struggle of some who don't know these things. Or there would have to be an according hint added to every battery pack in the game.

For me? Sure, add that and more, I'm sure I could handle most, if not all of it, with ease. Not saying that I'd like the extra work that much but it wouldn't pose much of a challenge to me.

Link to comment
Share on other sites

14 hours ago, 5thHorseman said:

I always think of electricity (and all resources) in the game as, you're the boss who doesn't know anything about this stuff, and the engineers are explaining to you how many batteries are needed. You ask why you can't have 3 batteries and instead need 8, and they start talking about voltage and amps and kilowatt-hours and your eyes glaze over. Then one particularly savvy engineer comes in and says "See, this battery here holds 200 electric charges. We need 20 electric charges to send a science data. We need enough energy to send 800 science datas at a time so we need to hold 1600 electric charges."

Then you feel all smart as you approve the extra batteries.

 

This is so me lol. 

Link to comment
Share on other sites

This thread is quite old. Please consider starting a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...