Perfectly optimal solar network

Post all other topics which do not belong to any other category.
Post Reply
Fraktal
Burner Inserter
Burner Inserter
Posts: 6
Joined: Mon Aug 04, 2014 8:30 am
Contact:

Perfectly optimal solar network

Post by Fraktal »

So I was bothered by not knowing the right amount of solar panels and accumulators that I needed to keep my factory running, so I did some math to figure out the optimal number for any electrical network.

The only input you need is the standard consumption of an electrical network (Watts) when not charging accumulators, henceforth referred to as P.

For a perfectly optimal network, you need:

23.8*P / MW solar panels (or 23800*P / GW)
20*P / MW accumulators (or 20000*P / GW)

This will generate and store exactly the amount of power needed by an electrical network for every day. The accumulators will completely empty at exactly the time that the solar panels are able to run the network on their own. For the math, check below.
Physics
You'll probably still want a few more solar panels and accumulators if you're using laser turrets or expanding your factories. If you're making a remote radar or outpost that isn't expecting any power spikes, this system should be perfect. If a power spike does occur, the accumulators will run out of power before the solar panels can fully support the network, but the network will effectively reset every day at 79 seconds after midnight (when the solar panels can support the network independently), so there should be no long term effects.

Edit: Thanks to Khyron for catching some of my mistakes. This should all be correct now and usable for most electrical networks, though I'd recommend using the equation I posted later on this page if you really want to be perfectly accurate.
Last edited by Fraktal on Tue Aug 05, 2014 11:03 am, edited 3 times in total.

Zequez
Long Handed Inserter
Long Handed Inserter
Posts: 64
Joined: Sat May 03, 2014 2:59 am
Contact:

Re: Perfectly optimal solar network

Post by Zequez »

Very cool. So the proportion is around 6 solar panels - 7 accumulator.

Fraktal
Burner Inserter
Burner Inserter
Posts: 6
Joined: Mon Aug 04, 2014 8:30 am
Contact:

Re: Perfectly optimal solar network

Post by Fraktal »

I just made a perfect radar array. In practice, the numbers a bit off, especially for small networks.

A radar requires 300 kW of power (0.3 MW). Using the mentioned equations, it needs 7.14 solar panels and 8.4 accumulators to function.
7.14 is an absolute minimum, so I had to round up to 8 solar panels. This has the effect of powering the radar later into the night, reducing the number of accumulators required.
In the end, this design worked flawlessly, using 8 solar panels, 6 accumulators, a radar, and a substation.
Optimal radar
Network info when solar reaches P

Rahjital
Filter Inserter
Filter Inserter
Posts: 435
Joined: Thu May 29, 2014 10:44 am
Contact:

Re: Perfectly optimal solar network

Post by Rahjital »

Wait a minute, your numbers don't seem to match there. You need 7.14 solars and 8.4 accumulators, yet you only built six accus? Is there something I am missing?

Fraktal
Burner Inserter
Burner Inserter
Posts: 6
Joined: Mon Aug 04, 2014 8:30 am
Contact:

Re: Perfectly optimal solar network

Post by Fraktal »

Last set of mathematics. I've solved for the exact optimal number of solar arrays and accumulators for any network.

The only input needed is still P. The units of P are MW.

Start with the equation for the number of solar panels n_s

Code: Select all

n_s=23.8*P
Round n_s up to the nearest whole number, since n_s is the minimum number of solar panels.

Now, use this equation to find the number of accumulators n_a

Code: Select all

n_a=8.33*P*(3-2((0.06*n_s - P)/(0.06*n_s)))
Round this up too, since it is the minimum number of accumulators.

And there you go, an optimal real system of solar panels and accumulators for any network. For a radar, n_s is calculated at 7.14, which rounds up to 8. Using n_s=8 in the second equation, n_a is calculated at 5.62, which rounds up to 6. That is why that electrical grid uses 8 solar panels and 6 accumulators.

If anyone wants an explanation for that last equation, I can provide it.

Edit: One thing I just found out is that radars do not use 300 kW of power, they use 309 kW (?). This isn't significant enough to change the blueprints, but it might be worth noting.
Last edited by Fraktal on Mon Aug 04, 2014 11:24 pm, edited 1 time in total.

Rahjital
Filter Inserter
Filter Inserter
Posts: 435
Joined: Thu May 29, 2014 10:44 am
Contact:

Re: Perfectly optimal solar network

Post by Rahjital »

Ah, I wasn't doubting your math, I was just wondering why did you say that it <i>needs</i> 8.4 accumulators to function. Now that I'm reading it again, it appears to be for a perfect solar network, not for the needs of a radar station.

User avatar
micomico
Long Handed Inserter
Long Handed Inserter
Posts: 94
Joined: Thu Jul 24, 2014 10:55 pm
Contact:

Re: Perfectly optimal solar network

Post by micomico »

Nice math. I tried it and the accumulators hit 443kJ minimum before starting to charge again. But... the symmetry!
Radar Outposts

User avatar
Khyron
Fast Inserter
Fast Inserter
Posts: 178
Joined: Fri May 30, 2014 5:47 pm
Contact:

Re: Perfectly optimal solar network

Post by Khyron »

Fraktal wrote:...0.43P*0.7*416.66 = 140*P seconds.
I think there's a small mistake here. I get 125.4P second.

Which I guess is how you got to 158.6s:
Fraktal wrote:This is mirrored for the evening, so accumulators are actually being used for 158.6s
and you lost me here:
Fraktal wrote:though they are at full power for only 52s during the night.
The only time accumulators provide P is for the entire duration of night, which is 41.66 seconds, no?

I'd just do the following math:

night = 41.66
dawn, dusk = 83.33
How long into dusk do solar panels provide 100% or more of P: 83.33 - 83.33/1.43 = 25s
(= the point at which accumulators start to provide power)

Duration of part of dusk where accumulators provide some power, ramping up to 100% of P: 83.33 - 25 = 58.33s
Divide by two since they linearly ramp from zero to 1
Multiply by two since they also do this at dawn.
=58.33 * 2 / 2

So accumulators need to provide P for 41.66+58.33 = 100s

Which if we plug in to your formula is 100 * P / (5 MJ) = 100 * P / (5 MW) = 20P / MW.

My current solar-accumulator layout is 6 panels per 4 accumulators which I've found to be slightly solar panel heavy, but not excessively so. That's why I investigated your numbers to start with - it seemed too far off the ratio I had been using in game. My solar-accumulator layout happens to be easy to implement prior to logistics bots and with just medium poles, but that's beside the point. Looks like I could be aiming for closer to 1.2:1 if I want to minimize the number of solar panels...

... Interestingly if you have more solar panels than this ratio requires you actually require fewer accumulators since they will kick in later during dusk and stop providing power earlier in dawn.

User avatar
DaveMcW
Smart Inserter
Smart Inserter
Posts: 3699
Joined: Tue May 13, 2014 11:06 am
Contact:

Re: Perfectly optimal solar network

Post by DaveMcW »

Khyron wrote:So accumulators need to provide P for 41.66+58.33 = 100s
Forget P, just use 42 kW, the average daily production of one solar panel.

42 kW * 100s / 5 MJ = 0.84 accumulators per solar panel.

User avatar
Khyron
Fast Inserter
Fast Inserter
Posts: 178
Joined: Fri May 30, 2014 5:47 pm
Contact:

Re: Perfectly optimal solar network

Post by Khyron »

DaveMcW wrote:Forget P, just use 42 kW, the average daily production of one solar panel.

42 kW * 100s / 5 MJ = 0.84 accumulators per solar panel.
That's fine if you know how many solar panels you need, but you need P for that anyway so I guess it doesn't really matter.

I guess there's two ways to approach it from a construction point of view. One is to build N cookie-cutter panel-accumulator sets which implies a certain ratio. If you know the ratio you can design the cookie-cutter template, and your way is the easiest way to calculate the ratio. Alternatively you could build a stand-alone bank of N solar panels and M accumulators independently, in which case P is useful to calculate M or N from scratch.

User avatar
micomico
Long Handed Inserter
Long Handed Inserter
Posts: 94
Joined: Thu Jul 24, 2014 10:55 pm
Contact:

Re: Perfectly optimal solar network

Post by micomico »

DaveMcW wrote:Forget P, just use 42 kW, the average daily production of one solar panel.

42 kW * 100s / 5 MJ = 0.84 accumulators per solar panel.
Using the radar example, with 8 solar panels needed, this gives 7 accumulators. One more than what is really needed.

User avatar
DaveMcW
Smart Inserter
Smart Inserter
Posts: 3699
Joined: Tue May 13, 2014 11:06 am
Contact:

Re: Perfectly optimal solar network

Post by DaveMcW »

7.14 solar panels times 0.84 equals 6 accumulators.

Fraktal
Burner Inserter
Burner Inserter
Posts: 6
Joined: Mon Aug 04, 2014 8:30 am
Contact:

Re: Perfectly optimal solar network

Post by Fraktal »

Khyron wrote:
Fraktal wrote:...0.43P*0.7*416.66 = 140*P seconds.
I think there's a small mistake here. I get 125.4P second.
You're right, I'll fix that right away.
and you lost me here:
Fraktal wrote:though they are at full power for only 52s during the night.
The only time accumulators provide P is for the entire duration of night, which is 41.66 seconds, no?
That was actually supposed to say 42 (rounded from 41.66). I'll also correct it in my opening post.
I'd just do the following math:

night = 41.66
dawn, dusk = 83.33
How long into dusk do solar panels provide 100% or more of P: 83.33 - 83.33/1.43 = 25s
(= the point at which accumulators start to provide power)

Duration of part of dusk where accumulators provide some power, ramping up to 100% of P: 83.33 - 25 = 58.33s
Divide by two since they linearly ramp from zero to 1
Multiply by two since they also do this at dawn.
=58.33 * 2 / 2

So accumulators need to provide P for 41.66+58.33 = 100s

Which if we plug in to your formula is 100 * P / (5 MJ) = 100 * P / (5 MW) = 20P / MW.
This also all seems correct. This was actually the method I used to find the equation I put into my last post. I did find it a bit odd that it was so far off from the previously calculated ratio.

uthul1
Manual Inserter
Manual Inserter
Posts: 1
Joined: Sun Apr 10, 2016 8:55 am
Contact:

Re: Perfectly optimal solar network

Post by uthul1 »

Not sure if the calculations are right.

60 ticks = 1 sec in Factorio
Daytime = day + half dusk + half dawn = 12500 + 5000 / 2 + 5000 / 2 = 17500 ticks => 17500 / 60 = 291,6666 secs
Nighttime = night + half dusk + half dawn = 2500 + 5000 / 2 + 5000 / 2 = 7500 ticks => 7500 / 60 = 125 secs

I use 21 Accumulators to show it where the ratio give both sides the smallest integer for the outcome.
21 Accu's produces 840 kW in the night time (21x5000 kJ/125 secs) = 840 kW.
This needs to be filled during the day which in 291,666 secs => 21x5000 kJ / 291,666 secs = 360 kW

To maintain the 840 kW AND filling the Accumulators (360 kW) during the day you need 840+360 kW = 1200 kW
1 Panel = 60 kW, so 1200 kW = 20 Panels

Ratio Solar Panels : Accumulators = 20 : 21

This is what i get.

bobucles
Smart Inserter
Smart Inserter
Posts: 1666
Joined: Wed Jun 10, 2015 10:37 pm
Contact:

Re: Perfectly optimal solar network

Post by bobucles »

There's no such thing as a perfect accumulator ratio thanks to Laser Turrets. Biters can attack at any time. If they attack during the day you can absorb it with solar power, but a night raid can only be survived with extra accumulators.

In short, build extra accumulators.

Koub
Global Moderator
Global Moderator
Posts: 7173
Joined: Fri May 30, 2014 8:54 am
Contact:

Re: Perfectly optimal solar network

Post by Koub »

Sorry, but your calculation has false hypotheses, which lead you to wrong result :)
This is the correct way to do it : viewtopic.php?f=5&t=5594.
Koub - Please consider English is not my native language.

Fraktal
Burner Inserter
Burner Inserter
Posts: 6
Joined: Mon Aug 04, 2014 8:30 am
Contact:

Re: Perfectly optimal solar network

Post by Fraktal »

Koub wrote:Sorry, but your calculation has false hypotheses, which lead you to wrong result :)
This is the correct way to do it : viewtopic.php?f=5&t=5594.
This is a bit of an archived topic. Cilya and I have essentially the same results approached from different directions. His final ratio was 100 solar panels to 84 accumulators, or 1.19 solar panels per accumulator. My ratio was 23.8*P solar panels per 20*P accumulators, or 1.19 solar panels per accumulator. We're either both correct or both wrong.

Koub
Global Moderator
Global Moderator
Posts: 7173
Joined: Fri May 30, 2014 8:54 am
Contact:

Re: Perfectly optimal solar network

Post by Koub »

Sorry Fraktal, I should have been more specific. I was answering uthul1 :
uthul1 wrote:Ratio Solar Panels : Accumulators = 20 : 21
This is the false result.

Just tu make sure nothing changed, I did a test this afternoon with 1000 solar panels, 840 accus, and 140 radars, and the 84 accus for 100 solar panels showed to be as accurate as it has been for as long as I can remember.
Koub - Please consider English is not my native language.

Fraktal
Burner Inserter
Burner Inserter
Posts: 6
Joined: Mon Aug 04, 2014 8:30 am
Contact:

Re: Perfectly optimal solar network

Post by Fraktal »

Koub wrote:Sorry Fraktal, I should have been more specific. I was answering uthul1 :
uthul1 wrote:Ratio Solar Panels : Accumulators = 20 : 21
This is the false result.

Just tu make sure nothing changed, I did a test this afternoon with 1000 solar panels, 840 accus, and 140 radars, and the 84 accus for 100 solar panels showed to be as accurate as it has been for as long as I can remember.
Cool, thanks for testing that. Maybe I should edit the wiki with this info.

Post Reply

Return to “General discussion”