blakemw Posted May 15, 2024 Share Posted May 15, 2024 Everyone is familiar with the concept of a Heaviwatt Backbone, and no doubt most have seen Battery Switcher builds, even if they don't use them. Today I'm introducing a third option, Pulsed Power Grid. First I want to explain the principles behind each option: Heavi-watt Backbone This relies on the high wattage of Heavi-watt wire to carry power produced by generators, heavy consumers like Metal Refineries can be built directly on the backbone, and Transformers can be used to split off lighter consumers on 2 kW subcircuits. Battery Switcher Circuit overload is calculated using only certain kinds of consumption, and consumption which goes to charging batteries does not count, hence unlimited amounts of power can go to charging batteries regardless of the wattage of the wire. Consumers are then split off from the backbone on independent circuits using Battery Switchers, a pair of batteries (or battery banks) take turns being charged from the backbone, and then discharging to the subcircuit, this way the backbone circuit never sees the consumers and can never take overload damage. Pulsed Power Grid The fundamental principle behind the Pulsed Power Grid is that a circuit will only take overload damage if it has been in a state of overload for an adequately long period of time. Specifically a circuit has to accumulate more than 6 seconds of overloaded time before it takes damage at which point the overloaded time resets to 0, so a continuously overloaded circuit will take damage every 6.2 seconds (as power ticks are 0.2 seconds and it needs to be more than 6 seconds). Also whenever a circuit is not overloaded the accumulated overloaded time decays but 5% more slowly than it accumulates, e.g. 1 second spent overloaded adds 1 second to be overloaded time, but 1 second not overloaded subtracts only 0.95 seconds from the overloaded time. I have no idea why the devs chose to make overloaded time decay 5% more slowly than it accumulates, possibly to frustrate people trying to figure out exactly how it works! So if a circuit is overloaded on a 1/1 or 2/2 frequency, then it wont overload for a while, but overloaded time will gradually accumulate. But if it is overloaded on a 1.9/2 frequency then there will be no net accumulation of overloaded time and the circuit will never take overload damage. It is important to note that the magnitude of the over-wattage does not matter, if you have a 2 kW circuit then 2.01 kW causes overload damage in 6.2 seconds, and 100 kW also causes overload damage in 6.2 seconds. pulsed_power_grid.mp4 A Pulsed Power Grid in Sandbox, delivering on average 15.36 kW over a 2 kW circuit, with no overloads, as all the Transformers are pulling power in unison. Engineering a Pulsed Power Grid So now that I've covered the basic principle, how is this turned into a functioning grid? So basically we are going to have a backbone made of any kind of wire you like. Heavy consumers pulling from this backbone then need to synchronized so they pull power together for 1.9 seconds then don't pull power for 2 seconds. Certain consumers deal with being pulsed quite well: Liquid Tepidizer, Aquatuner and Oxylite Refinery are all fine as long as you are tolerant of having a 47.5% duty cycle, and chances are very good that if you have a Liquid Tepidizer, you do not need it to be running it 100% of the time. But it wouldn't be very useful if we couldn't power things that don't tolerate interruption, like dupe operated machinery and machines with wind-up animations or sequences (e.g. pumps and water sieve lose much more than 52.5% throughput if toggled on and off). Large Transformer to the rescue Many players like to malign the Large Transformer but it turns out to be absolutely perfect for this use case because Transformers are also perfectly fine with being pulsed. The basic idea is to split off subcircuits using a combination of a Large Transformer which is pulsed on and off and a Battery which acts as a capacitor to buffer and smooth the power for consumers. The 4 kW Large Transformer delivers an average of 1.95 kW which is perfect for a 2 kW circuit. If you're starting to think "That sounds a lot like a real world AC to DC rectifier with capacitor" you'd be right, strictly speaking the pulsed power is not AC, it's pulsed DC. But we are basically taking a form of power which is unusable for certain devices but allows high wattages through thin conductors, and transforming it into a steady form of power. I like to think that at a spiritual level, it's AC power, because Edison drools and Telsa rules. Synchronization Circuit Naturally we need to synchronize all the Large Transformers (and any other heavy consumers on the backbone), there are actually many ways which this can be done, but one of the best is just running an automation circuit to every Large Transformer so they all receive exactly the same timer signal. The main alternative is manually synchronizing timers, but automation wires are very cheap, have only a very small decor penalty, and the circuit layer doesn't tend to be crowded. A real game example Now let's look at how I use this in a real game. An important thing to note is that this technique absolutely excels for decentralized power production where producers and consumers are all mixed up. That's because the backbone is very lightweight and you can run it everywhere. So in this case I have Generators, in this case Steam Turbines cooling a Metal Volcano and Metal Refinery (if you wonder where the Aquatuner is, the Steam Turbines are being cooled by a combination of self-cooling and geyser water if temperatures get above 99 C, a cold geyser can cool like 10 Steam Turbines or something, it's a lot) There's also a subcircuit, which is being used primarily for the Metal Refinery. Here are another couple of subcircuits: For this screenshot, I show the power consumption for the "cooling down" phase, when there's only 300 W on the backbone circuit, that's from random small consumers like Liquid Shutoffs, Lights, Deodorizers etc. This involves two subcircuits for powering my Recreation Room. You may note that on the second circuit there is an Arcade Cabinet and the Sauna's Aquatuner, for a total power of 2400 kW. However to prevent this being a problem, I pulse the Aquatuner, and in this case I'm pulsing the Aquatuner on a subcircuit not the backbone: it's fine to do this as long as the average power draw doesn't overwhelm the Transformer, in this case the Sauna Aquatuner has a 3% duty cycle so it's drawing only like 40 W on average. This also happens to be where the Timer Signal originates, like I could put that Timer anywhere, it just happens to be here. There's also actually no reason to have the Aquatuner on the same timer signal since it's isolated on a subcircuit, but I just do it anyway since I have the Timer right there. Now for a zoom out of the main area of my base: I circled generators (mostly Steam Turbines - this map is Baator so lots of geothermal and areas in need of cooling) in green, and rectifiers in orange. This base is still quite small, but I've used Pulsed Power Grids in much larger bases too, there is no limit. And hey, one more screenshot, this one of my Ethanol "peaker powerplant" which I put in space to direct vent the CO2. This build is not self-powered (except in the sense that it produces an excess of power), the Ethanol Distilleries are powered on a subcircuit off the backbone, so they can be powered by solar or geothermal if there's an excess (which there usually is). The Petroleum Generator which consumes the Ethanol puts power directly on the backbone. Overall the Pulsed Power Grid is very good for a chaotic and disorganized base as you can plug generators into the backbone anywhere, and split off new subcircuits anywhere, with no decor issues. Notes and Caveats Why instead of Heaviwatt Backbone? The Pulsed Power Grid is basically a drop in replacement for a Heaviwatt backbone, requiring only the introduction of the "synchronization signal", and using a Transformer+Battery combo. But it doesn't require a Heaviwatt backbone! You can run the a normal or conductive wire backbone anywhere! This makes it much easier to put every power generator (random Steam Turbines and stuff) on the backbone rather than trying to figure out how to export surplus power. Also, the Pulsed Power Grid evolves very easily from an early game 1 kW or 2kW main circuit, there is no transition!,when you want to add some heavy consumers you just put them behind the pulsed Transformer+Battery combo without changing your generators at all. There is also absolutely no limit to how much power can be delivered over a pulsed power backbone, the limit for Heaviwatt or Conductive Heaviwatt is high, but there is still a limit. It's cheaper overall because you're not spending the high cost of Heavi-watt wire, but you will however need slightly more transformers, as you can't power Metal Refineries etc directly from the backbone. You also need more batteries as each subcircuit needs a battery, and there's also a miniscule vampiric energy drain when Transformers are turned off, though the Transformers will produce less heat when pulsed (e.g. one Pulsed Large Transformer will produce only 0.45 kDTU/s of heat, while 2 Transformers would produce 2 kDTU/s of heat). Another difference is that because Pulsed Power requires a battery on every subcircuit, you can't use a pair of Transformers to limit wattage to 2 kW. Personally, I am extremely unfond of that strategy as if I am going to put excessive sustained load on a circuit, I'd prefer to take a little overload damage than have machines suffer interruptions. Overload damage always prefers to target bridges before wires, so you can choose where overload damage happens and doesn't happen, also bridges take 30 overloads to burn or 186 seconds of constant overload (wires only take 10 overloads), if overloads are infrequent then you have literally cycles to repair the bridge. But if you understand the 6 second rule then you can generally put quite a bit of extra interitment load (e.g. mechanical airlocks, sweepers, loaders etc) on a circuit with little chance of actually taking overload damage even without a strict guarantee provided by synchronized consumers, like I often have around 5 kW of potential load on a 2 kW circuit without many overloads with most that load being sweepers, airlocks etc, for the most part only heavy sustained loads actually matter towards circuit overloading. Why instead of Battery Switcher? Probably the main reason is that Battery Switchers do weird things with batteries which means you can't use batteries in a normal way. For example Battery Switcher grids often have always-on power generators (e.g. sustained by Petroleum or Natural Gas Boiler) rather than power generators automated by Smart Batteries, and they aren't good with Solar Panels or Plug Slugs unless you use Transformers anyway. In fact the most "newbie friendly" Battery Switchers I've seen actually do use transformers so the generators can still use Smart Batteries! The most meaningful advantage I can see of a Battery Switcher is it can deliver unlimited power to a Heavi-watt circuit, while with a Pulsed Power Grid you need to use multiple Transformers to power a Heavi-watt Circuit. A downside of Battery Switchers, besides "doing weird things with batteries", is that Power Shutoffs massively multiply the frequency of overload damage (this is because the disconnected wire fragment under the Power Shutoff remembers the old overload time as overloaded time only decays when a circuit is "powered", and when the three circuits are recombined the game uses the longest overload time, for more info refer to my "horrific burninator"), so a Battery Switcher build is not at all tolerant of the backbone or subcircuits being overloaded, you're not benefiting from the 6 second grace and basically must keep circuits underloaded. This also applies generally, Power Shutoffs can not be used on the Pulsed Power Backbone! Also to my ear toggling Power Shutoffs are more "hammery" than toggling Transformers, the Transformer simply starts/stops making its buzzing humm noise, and that's quite a lot like any other machine turning on or off, except Power Shutoffs have a click sound every time they open or close. Logic Gates and the Synchronization Signal Previously I noted that Tepidizer, Aquatuner etc can often be directly on the pulsed power backbone, however the astute player will notice that if you also want to automate the Tepidizer based on a condition like a Thermo Sensor, then you can't just plug the Synchronization Signal into the AND gate, because the AND gate delays the signal by 0.1 seconds relative to loads plugged directly in. This means that if the backbone is constantly overloaded that overloaded time will gradually accumulate as the backbone is now being overloaded for 2.0 out of every 3.9 seconds (note in practise if the backbone circuit is getting some extra breaks from being overloaded then it'll be fine anyway). The most obvious, intuitive and correct solution to this is to simply always delay the signal, put the synchronization signal through a do nothing OR gate or Ribbon Writer before it goes to Large Transformers. It's very easy to reason that this is a flawless solution. The other obvious way is making a new Timer Sensor that sends the signal 0.1 seconds earlier, basically duplicate a Timer Sensor (copy settings and reset both), then for the "advanced" Timer Sensor, set it to 1.8/2, let it spin around once, and then set it to 1.9/2, now it is sending a signal 0.1 seconds earlier. This should also produce correct behaviour, though the circuit update logic is a bit jank and I'd prefer to use literally the same signal to have utmost confidence. An obvious but wrong solution is using a Power Shutoff, as the Shutoff will cause overload damage on the backbone. Vampiric Power Drain It's reasonably well known that whenever a Transformer is turned off, it loses power. For this reason some players use Power Shutoffs to disconnect Transformers, but as noted Power Shutoffs can not be used on the pulsed power backbone. But how bad is this drain really? Both kinds of transformers lose roughly 3.33 W when disabled, if the Transformer is disabled 52% of the time, this is reduced to 1.7 W. Or basically, for the power consumption of a Liquid Shutoff, you could have 6 Large Transformers. I don't want to say that you shouldn't care about this little power consumption, but really, you shouldn't care about this little power consumption! There is also the drain and heat of the battery, this is 0,0 for a rocket Battery module, 0.66W, 0.5 kDTU/s for a Smart Battery, or 1.66 W, 1.25 kDTU/s for a Small Battery. Typically a Pulsed Power Grid involves the least heat, Heavi-watt backbone involves the least power drain (0), and Battery Switchers are in between unless they use rocket Batteries. But I will reiterate that in none of these cases is the power drain actually noticeable. Choice of Battery There are three main choices of battery: Small Battery (takes only one tile and is adequate) Smart Battery (less heat and drain than Small Battery) Rocket Battery (no heat, no drain, no floor needed, but a pain to build and 3 tiles wide) I normally prefer Smart Batteries, but will use a Small Battery if space is constrained. A larger battery like a Rocket or Jumbo battery can also be used if you want a larger buffer on a subcircuit. A Brief History and Conclusion You might wonder how someone comes up with whole new strategies. I first encountered the idea of deliberately overloading circuits watching some Monument speedruns, basically the speedrunner figured that it's quicker to just repair wire bridges than researching higher wattage wires, so basically the time taken to repair overload damage isn't that bad, and it can happen at a location of your choosing thanks to wire bridges: I call it the "fusebox exploit". Next I noticed that if an Aquatuner were toggled on and off at 1/1 frequency that it wouldn't overload even a normal wire. Actually turned out it technically can, but if the Aquatuner was running at like 30% uptime it wouldn't. I used this a lot on Aquatuners and Tepidizers to reduce the need for Transformers and conductive wire. My efforts to fully weaponize this and make the full Pulsed Power Grid were stymied by not understanding that overloaded time decays 5% more slowly than it accumulates. Also I labored under the delusion that a circuit would take overload damage if overloaded for more than 1 second and thought that overload damage also happened "randomly" due to the normal jankiness of ONI ticks. But with the fusebox exploit I didn't really care about "random" overloads. At some point I dived into the decompiled game code to figure out how exactly it works, and discovered the actual threshold is "more than 6 seconds", and this truly nefarious line: timeOverloaded = Mathf.Max(0f, timeOverloaded - dt * 0.95f); Next I came to understand that Power Shutoffs can cause overload damage, and again dived into the decompiled code to figure out what exactly was happening when Power Shutoffs split and joined circuits, with the critical bit of knowledge being that overloaded time does not decay for an unpowered circuit, such as the 1 wire fragment under the Shutoff. This knowledge of Shutoffs was important, because I was one of those players who would disconnect Transformers using a Power Shutoff to avoid the vampiric power drain, which absolutely ruined any attempt to make a Pulsed Power Grid: a great example of premature optimization making things harder and worse. Now I knew exactly what needed to be done to ensure no overload damage ever, I was okay with overload damage but it is nice to be able to completely trust a build to act predictably. So then for about 6 months I've played using the Pulsed Power Grid as outlined in this post and I love it, mainly for much the same reasons as Battery Switchers are great - not having to deal with Heavi-watt wire - but with much more natural usage of batteries and better compatibility with plug slugs and solar panels, and of course absolutely excelling for my disorganized and chaotic bases. Link to comment https://forums.kleientertainment.com/forums/topic/156065-introducing-the-pulsed-power-grid-and-everything-you-need-to-know-about-circuit-overloads/ Share on other sites More sharing options...
Gurgel Posted May 15, 2024 Share Posted May 15, 2024 Well, nice idea. Personally, I am back to conventional grids, after a battery-switched net got stuck and nearly killed my colony. All these tricks are nice, but you need to put in too much redundancy to make them reliable. Link to comment https://forums.kleientertainment.com/forums/topic/156065-introducing-the-pulsed-power-grid-and-everything-you-need-to-know-about-circuit-overloads/#findComment-1714099 Share on other sites More sharing options...
blakemw Posted May 16, 2024 Author Share Posted May 16, 2024 16 hours ago, Gurgel said: Well, nice idea. Personally, I am back to conventional grids, after a battery-switched net got stuck and nearly killed my colony. All these tricks are nice, but you need to put in too much redundancy to make them reliable. Power Shutoffs are quite buggy in my experience. On the other hand I've never experienced a single glitch with turning stuff on and off with automation. The issues I know of with power shutoffs: As mentioned in this post, the accounting of "overloaded time" is basically just completely bugged when splitting and merging circuits. The game doesn't correctly account for power usage when a circuit loses power, with machines being capable of continuing to run "Wile E. Coyote" style for a tick even after the power has been cut off before realizing the power has been cut off, resulting in machines doing work without consuming power. I don't think this should affect Battery Switcher builds because in principle the power is always connected but it's still a bug related to Power Shutoffs in usages such as cutting off power to a Tepidizer instead of automating the Tepidizer (this is not exclusively a Power Shutoff bug, it can take effect any time a machine loses power, such as the battery going flat, but it's easy to make it happen often with a Power Shutoff). It may just be purely a visual glitch, but Power Shutoffs can cause circuits to continuously pulsate as if they are overloaded, probably an issue with splitting and re-merging circuits, this glitch can even survive save-reload. Power Shutoffs can end up in the wrong state after save/reload, I don't use Battery Switchers but I think this only affects the variant which switches based on battery charge instead of forced switching on a particular frequency using a Timer Sensor. Basically Power Shutoffs are actually horrible and shouldn't ever be used if you want correct behaviour, I never use them now I know how many bugs they have. If you're willing to tolerate bugged behaviour they can be used of course. Automation though seems to always work correctly, any problem which can be solved by a Power Shutoff can also be solved by Automation and so I always use an Automation solution even if it's a little more expensive. Link to comment https://forums.kleientertainment.com/forums/topic/156065-introducing-the-pulsed-power-grid-and-everything-you-need-to-know-about-circuit-overloads/#findComment-1714218 Share on other sites More sharing options...
Gurgel Posted May 16, 2024 Share Posted May 16, 2024 I had a power shut-off stuck until I manually cycled it. May be due to a more general bug that causes some arbitrary behavior since one of the last updates. Anyways, I am now back to circuits that are more resilient. They are good enough for me. Not that I do not admire efforts like the one above, but I do run colonies overnight and sometimes longer without checking on them and that requires higher reliability. Link to comment https://forums.kleientertainment.com/forums/topic/156065-introducing-the-pulsed-power-grid-and-everything-you-need-to-know-about-circuit-overloads/#findComment-1714234 Share on other sites More sharing options...
Prince Mandor Posted May 17, 2024 Share Posted May 17, 2024 Thank you for new great idea and interesting reading! It looks like every description of Heavi-watt Backbone tells about connection of generators directly to backbone. But this is not necessary, backbone must only connects transformers and some batteries. If you set two turbines somewhere, connect it with conductive wire to transformer sitting on backbone and this wire never overloads (as there are only 1700 max power produced on it). If you set petroleum generator connect it with conductive wire again to transformer on backbone, with only 2kW generation wire will be okay. Single turbine or several self-cooled turbines may be connected by normal wire, they never produce more than 1 kW. Only thing we need to set on backbone is tuned petroleum generator, because we cannot handle 3kW on normal wires. But if we need fine-tuning for extra power, we are possibly don't want to skip 55% either Link to comment https://forums.kleientertainment.com/forums/topic/156065-introducing-the-pulsed-power-grid-and-everything-you-need-to-know-about-circuit-overloads/#findComment-1714707 Share on other sites More sharing options...
Gurgel Posted May 18, 2024 Share Posted May 18, 2024 10 hours ago, Prince Mandor said: It looks like every description of Heavi-watt Backbone tells about connection of generators directly to backbone. It does? I only do this for generator-farms or when it is convenient. All the rest gets connected with normal wires and transformers in reverse. Link to comment https://forums.kleientertainment.com/forums/topic/156065-introducing-the-pulsed-power-grid-and-everything-you-need-to-know-about-circuit-overloads/#findComment-1714987 Share on other sites More sharing options...
Saturnus Posted May 18, 2024 Share Posted May 18, 2024 Maybe this is just me not seeing the tl;dr but hasn't the pulsed power grid principle been in the wiki for several years? At least 4 years to my knowledge. It is nice to see someone finally expanding on the concept again and explaining some of the benefits and drawbacks to new players unfamiliar with it. Anyway, I briefly tested it and it seems that typing in 0.19/0.20s on the timer sensor works the same. Once you hit enter it shows 0.2s but as all other sensor settings the timer sensor uses one more decimal place than it can show. Link to comment https://forums.kleientertainment.com/forums/topic/156065-introducing-the-pulsed-power-grid-and-everything-you-need-to-know-about-circuit-overloads/#findComment-1715097 Share on other sites More sharing options...
blakemw Posted May 19, 2024 Author Share Posted May 19, 2024 On 5/18/2024 at 12:37 PM, Saturnus said: Maybe this is just me not seeing the tl;dr but hasn't the pulsed power grid principle been in the wiki for several years? At least 4 years to my knowledge. I actually added that entry to the wiki ("Power Supply Pulsing" not the previous entry on pulsing power saving), and also AFAIK discovered the principle, I wasn't the first to observe something funny going on with power consumption, but I'm pretty sure that observation was related to the pulsing power saving by not having a building enabled when it's not doing work (e.g. 80% reduced power consumption for 100% uptime), when I was investigating THAT exploit, I observed that buildings don't consume the correct amount of power when the power supply is being cut off, then I discovered that 0.2/0.2 Power Shutoff pulsing results in 99% reduced power usage for 50% uptime - but they are totally different mechanisms. But the Pulsed Power Grid is also entirely different, using neither of those exploits, and is completely honest and fair in terms of power accounting, it's an exploit in terms of distributing power, but not in terms of being a "something for nothing or less" exploit and it's not exploiting any bugs, the overload grace period is a very deliberately implemented feature. Overall it's a physics exploit not a bug exploit (like I consider a lot of things in real life could be considered physics exploits, like flight, steam power, electricity etc, nature doesn't just come along and hand humans those on a silver platter but we had to develop weird contraptions which would make a garden variety caveman go "WTF that shouldn't work"). On 5/18/2024 at 12:37 PM, Saturnus said: Anyway, I briefly tested it and it seems that typing in 0.19/0.20s on the timer sensor works the same. Once you hit enter it shows 0.2s but as all other sensor settings the timer sensor uses one more decimal place than it can show. Doesn't work for me, still burns after about 240 seconds. Also for me if I make two Timers, one set to 0.19/0.2 and the other to 0.2/0.2, they both remain in perfect sync rather than drifting apart over time. I know that many sensors accept more precision than they display (I often use it with Thermo Sensors set to like 99.5 or something) but doesn't seem to work with Timer Sensor. Even though you definitely can reset the Timer so it starts at any arbitrary fraction of a second. Also even if it did work, one of the reasons I use 1.9/2 is to minimize flickering (which is only aesthetic but aesthetics still matter to me) while still leaving plenty of overloaded "grace period", because I normally still overload my backbone with erratic power consumes (Mechanical Airlocks and stuff). Also even at 1.9/2 even a Small Battery provides plenty of buffer. The only advantage I'd see of going lower than 1.9/2 is you don't need as many batteries to minimize swings in Smart Battery charge level, like if you don't have many Batteries and are pulling a lot of power, the charge level can swing dramatically each down all the Transformers start sucking, that messes with using Smart Batteries for Generator priority. I just add more batteries. Link to comment https://forums.kleientertainment.com/forums/topic/156065-introducing-the-pulsed-power-grid-and-everything-you-need-to-know-about-circuit-overloads/#findComment-1715461 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.
Please be aware that the content of this thread may be outdated and no longer applicable.