cc-mek-scada icon indicating copy to clipboard operation
cc-mek-scada copied to clipboard

Burn Rate Ramping and PID Control Adjustments

Open RaeveNoir opened this issue 11 months ago • 3 comments

Loving this project. Currently running a quad reactor setup in Enigmatica 8 SMP with variable burn limits of 50mb/t water cooled, 375mb/t sodium cooled, and two 195mb/t that must be limited to 187mb/t to ride the thermal limit of water cooling. I found that the charge keeping mode needed some fine tuning, especially for how it would power-cycle reactors at low load. This lead me down a bit of a rabbit hole as you might tell.

The first commit adds proportional ramping to the fission PLC. It currently retains the original 5mb/t/s as a maximum while doing a 1/10th step per second. I later changed this to a 1/5th step as it seemed safe for small reactors. Maximum ramp rate should be added as a configurable value for the user, as I found that my largest reactor would temperature trip if ramped faster than the original 5mb/t/s, but my other reactors could ramp faster. Adding this to the configurator or UI is slightly beyond me for now. Minimum ramp rate was hardcoded to 0.1mb/t/s and I also changed the 'clamp to target' window of 2.5mb/t to 0.5mb/t and later 0.1mb/t to match. This allows much deeper throttling of reactors, into the sub-millibucket regime. The ensuing taper of ramp rate at very high loads should be beneficial to reactors that run very near limits and should make them a bit safer, while also improving fine control and smoothing in automatic control. With configurable maximum ramp rate for edge cases, this should address #346.

The second commit is a little messier. I found that even with windup prevention at saturated output, outside of saturation the accumulator was too sensitive to continuous power drain to be very useful while trying to hand-tune the PID to incorporate it. I added a 10% per second decay to the accumulator and it settled down nicely, and now the PID values look very sensible. This accumulator decay results in a slight droop of the charge level with load, but this also avoids overshoot on load reduction or other transients and zeroing the burn rate which then requires a full re-ramp, resulting in much better transient load response. The droop amount appears to be roughly one second of the current load but I work in big numbers (toggling 0.5-10 MRF heaters while tuning this) so I've not teased out charge keeping performance on minimal setups. I believe this addresses the intent of #366 when combined with the burn rate ramping changes.

RaeveNoir avatar Mar 30 '24 18:03 RaeveNoir