Jump to content

[1.7.3] Real Battery v1.7


Blackline

Recommended Posts

4 hours ago, Blackline said:

@SyRiNx i updated RealBattery to v1.1.6, now you can set the low and high EC values via cfg. Might need some time for CKAN, but you can get it from Github now.

Thnx, I just tested it and changed the min value to 50% and it works, so for me this is a better value.

CKAN already has the new version, so that was easy :)

Link to comment
Share on other sites

I like the sound of this,  but to get any degree of realism we're at risk of drowning in battery parts unless we make them configurable somehow?  Eg. just have batteries for each size class then provide dialogs to set the type in VAB.

After all, if you add NiCad and NiMH as well as the various non-rechargable types used by nasa and the military (lithium thionyl chloride for very high energy density and long shelf life,  thermal batteries for high power/short duration) we'll end up with a lot of batteries !

BTW I think the way it currently handles charge/discharge rate ( Lead = slow, Lithium = fast ) isn't quite realistic since that has more to do with how the battery is constructed than cell chemistry.  Car batteries are capable of very high discharge rates when cranking an engine, whilst a laptop or phone battery is designed for steady power release.

High rate batteries use a large number of much thinner anode / cathode plates for a high surface area for reactions,   with a thinner layer of active materials on the anode/cathode.  The drawback is that a higher percentage of the battery's mass is made up of the base metal of these anodes and cathodes as well as the associated separator sheets, leaving less for the active materials that store energy.

Temperature/degradation

Lead acid loose capacity when stored at low states of charge.  The longer they are left there, and the deeper the discharge, the more  permanent capacity loss results.

Lithium Ion  loose capacity when stored at high states of charge (over 66%).  The higher the temperature and the closer to full, the worse this gets.  Also, they are damaged by charging them below freezing .     If you avoid these pitfalls however, current lithium ion cells accept an almost unlimited number of charge/discharge cycles.

 

Near future batteries 

Lithium Sulfur - more power to weight than lithium ion,  but have not yet made a commercial impact because degradation with cycling occurs much faster than with  current lithium ion.    A space agency might not care so much about that however..

Silicon Anode Lithium ion - Using silicon instead of carbon anodes gives an immediate boost of 33% to any lithium chemistry, but they also degrade rapidly with cycling.

 

 

 

 

Link to comment
Share on other sites

Damn, forum software ate my post..

In short, initially I wanted to make all possible relations between temperature, charge rate, self discharge and whatsoever, but it gets unplayable. The first thing I stumbled upon was warping. Warping at 10000 rate, and the whole electrical simulation goes haywire. It needs to be robust and reliable, no one would use my mod if it only works in real-time. The next thing is the stock temperature model. Just enable the advanced temperature Infos in the cheat menu and watch the core temp at different warp rates -> totally unpredictable behaviour. If you drop from the wrong warp rate back to real-time, you end up with a 100K battery. That's the reason why I ditched low charge rates at low temperatures.

Link to comment
Share on other sites

Exactly this.

The "overheating issue" that many people have in stock KSP - and other say they don't have any issues and tell me I have too many mods.
(Indeed, perhaps I have, but OTHER issues are made of mods, part temperature issues are made of KSP itself)

In short: KSP 1.2.2 is a beta.

Link to comment
Share on other sites

4 hours ago, Blackline said:

Damn, forum software ate my post..

In short, initially I wanted to make all possible relations between temperature, charge rate, self discharge and whatsoever, but it gets unplayable. The first thing I stumbled upon was warping. Warping at 10000 rate, and the whole electrical simulation goes haywire. It needs to be robust and reliable, no one would use my mod if it only works in real-time. The next thing is the stock temperature model. Just enable the advanced temperature Infos in the cheat menu and watch the core temp at different warp rates -> totally unpredictable behaviour. If you drop from the wrong warp rate back to real-time, you end up with a 100K battery. That's the reason why I ditched low charge rates at low temperatures.

I guess it could be possible to solve equations to have exact analytic solutions depending of time. So no problem in warp time :wink:

 

Little question : does your mod fit well with ampyear power management ?

I don' think so, but asking ^^

Link to comment
Share on other sites

1 hour ago, msnbcorp said:

I guess it could be possible to solve equations to have exact analytic solutions depending of time. So no problem in warp time :wink:

 

Little question : does your mod fit well with ampyear power management ?

I don' think so, but asking ^^

I agree, there are ways, and there might eventually be time do to all that stuff, but in the short amount of time I currently can spend, I can't handle it (alone). And btw, if EC rates get bigger than EC capacity, no analytical solution will help. Only a proper resource broker will do.

I've never used ampyear, but you are the second one mentioning it in this thread, so I'll consider looking at it.

Link to comment
Share on other sites

It's a managing system for power reserve that are kept from the primary network unless people activate it (but in a little amount). It's to avoid the terrible effect that occurs in warping when, for exemple, you need a little amount to deploy the thing that will get you the power :P .

 

Very usefull to avoid inatention problem to destroy a complete mission.

 

And a very common mod now.

 

For the analitical solutions you are mostly risght, as you can't guess the income and outcome of current (could depend on lightning etc...) it could be difficult to summarize that... 

But, you should not have a problem in warping, as all variable (income and outcome) are scaled, you should be able to just use your non simplified equations without error. (as for the current charge test in stock indeed).

Maybe you should also use Background processing for this too ^^.

 

 

 

 

 

Edited by msnbcorp
Link to comment
Share on other sites

35 minutes ago, msnbcorp said:

It's a managing system for power reserve that are kept from the primary network unless people activate it (but in a little amount). It's to avoid the terrible effect that occurs in warping when, for exemple, you need a little amount to deploy the thing that will get you the power :P .

 

Very usefull to avoid inatention problem to destroy a complete mission.

 

And a very common mod now.

 

For the analitical solutions you are mostly risght, as you can't guess the income and outcome of current (could depend on lightning etc...) it could be difficult to summarize that... 

But, you should not have a problem in warping, as all variable (income and outcome) are scaled, you should be able to just use your non simplified equations without error. (as for the current charge test in stock indeed).

Maybe you should also use Background processing for this too ^^.

 

 

 

 

 

They are scaled, yes, but for the following situation, only a dynamically increasing resource buffer would help (like @FreeThinker's KSP-interstellar ext does with it's heat resource):

Parts: an empty, 10EC battery; 100 EC/s Power generator; 100 EC/s consumer (could be a RealBattery).

At real-time, assume a step time of 20ms. So in one timestep, the power generator is first in queue, and commits 2 EC to the battery (100*0.02). Then the consumer part is called (it's onFixedUpdate tbh) and it tries to retrieve 2 EC for doing it's thingy (again, 100*0.02). All is fine.

At warp speed, assuming a timestep of 2s ( imho 100x time warp ), the power generator wants to commit 200EC to the empty EC storage. 190 EC can't be used and are thrown away, because the EC storage can only hold 10 EC. Next, the consuming part tries to retrieve 200 EC, but only gets 10, thus only working on 5% of whatever it is usually doing with the EC.

And that's the problem...

Link to comment
Share on other sites

And what about a simple solution like scaling the EC ?

Like, the battery capacity is also scaled and here have 1000Ec ? In fact, it is same thing as describing the battery not as EC capacity but as "which capacity by step i can eat assuming other processes eat it". 

 

It could work fine. Of course it's imprecise, and lot of case could be more easy to use in warp that not in warp (charge-discharge non linear phenomenon) ... but don't think it could be notice (we notice what is difficult and kill the mission in warp but not imprecision that make the thing more easy...

 

Link to comment
Share on other sites

5 hours ago, msnbcorp said:

And what about a simple solution like scaling the EC ?

Like, the battery capacity is also scaled and here have 1000Ec ? In fact, it is same thing as describing the battery not as EC capacity but as "which capacity by step i can eat assuming other processes eat it". 

 

It could work fine. Of course it's imprecise, and lot of case could be more easy to use in warp that not in warp (charge-discharge non linear phenomenon) ... but don't think it could be notice (we notice what is difficult and kill the mission in warp but not imprecision that make the thing more easy...

 

Yes, thats one possible solution for the missing resource broker. It is easier to do for a custom resource like wasteheat, but such a common used one like EC could bring tons of problems. I think about it, maybe I'll setup a test release :-)

Link to comment
Share on other sites

19 hours ago, Blackline said:

Yes, thats one possible solution for the missing resource broker. It is easier to do for a custom resource like wasteheat, but such a common used one like EC could bring tons of problems. I think about it, maybe I'll setup a test release :-)

It's just some ideas, no pressure ^^ :P

Link to comment
Share on other sites

No worries, but i thought about the dynamic EC storage and came across some problems. assume we went to 1000x warp and now have 1000EC instead of 10EC, if we go back to realtime:

a) do we discard all the excessive EC? This way we would eventually waste resources (think of a LFOx powered generator)

b) do we not exceed 10EC during warp, and limit our 1000EC storage to 10EC every call? Then the whole functionality wont be there...

c) many more issues arise if i think about it.

i dont think there is an easy solution...

Link to comment
Share on other sites

Cool idea with the batteries producing heat. I will try this out. Do they also produce heat when charging? I know that when the rechargeable things get hottest. (Now that the weather is getting hot where I live I suddenly notice how hot my laptop charger gets!).

Link to comment
Share on other sites

Yes they get hot whenever they are charging or discharging.

As for a formula, the heating power is this new configurable * current power^2 / max power.

I play with switched of heating, because of bugs during very fast warp.

Edited by Blackline
Link to comment
Share on other sites

Sadly not live on (my?) CKAN yet.
Should your .netkan in github not be updated to "ksp_version": "1.3"? Or is it submitted separately from the repo?

I quite enjoyed this mod on 1.2.2.

Main pain point were not being able to stop/start the charge/discharge manually. I had to send a lot of science over a very 'expensive' relay link. Battery alone could not handle it, but if the 'real' battery was discharging it was enough to send the last few packets while in sunlight.

Yip, bad planning :wink:

I wasn't expecting a specific experiment to need 800+ in a single burst and had several antennas that combine :P

Link to comment
Share on other sites

  • 3 weeks later...
  • 2 weeks later...
On 24.6.2017 at 4:11 PM, Gordon Dry said:

I don't find Real Battery anymore inside the Filter Extensions "Filter by manufacturer" ...

I don't use filter extensions, but they should appear in the normal electric tab though.

Link to comment
Share on other sites

Hey everyone, i am currently working on a support package for DynamicBatteryStorage from Nertea. This way you can warp as much as you'd like, without loosing any of that precious charge anymore!

See more at: 

EDIT: Done, the new release 1.3.1 now supports DynamicBatteryStorage, which hopefully will support RealBattery within the next release. Stay tuned!

Edited by Blackline
Link to comment
Share on other sites

10 minutes ago, Gordon Dry said:

Seems that 1.3.1 is the same .zip has the same contents than 1.3 ... :D

Damn me if I did something wrong, sorry... It showed me an updated build date tho. Unfortunately I'll be in Spain this week, so if there is something wrong, you have my blessing to post a link to a fresh compile.

Wait.. I forgot to update the version file! The DLL should be updated though!! 

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...