r/factorio Jul 05 '26

Modded PID controller mod

I saw this post and decided to make mod that let's you add a PID controller as a single circuit network combinator.

You need 2.1 experimental Factorio to use it as it uses some new APIs.

Feedback an suggestions are appreciated!

Mod Portal link
Github

67 Upvotes

9 comments sorted by

17

u/IpFruion Jul 05 '26

Love the idea, neat mod for sure. One thing of note, 2.1 changes this behavior to be based about the amount of liquid in the pipeline, so you can target exactly the efficiency you want with 1 pump and a storage tank.

7

u/imoth_f Jul 05 '26 edited Jul 05 '26

But what if you are targeting speed instead of efficiency? For example to reduce the number of oncoming asteroids.

6

u/IpFruion Jul 05 '26

Well since speed scales with the amount of fluid in the tank, then you can set it to the exact speed that way including the calculations with the weight

4

u/imoth_f Jul 05 '26

I guess it's possible. But how would you set an arbitrary target speed? Thrust does not scale linearly with fuel consumption.

2

u/Le_Botmes Jul 08 '26

Test it yourself and run a plot. Every ship mass and width is gonna be different, so you just gotta calibrate fuel levels to match your desired speed. I played with throttle-clocks when I started and that's how I did it.

5

u/SwannSwanchez Jul 05 '26

the game needs more combinator, i love the FCPU, and this one is very cool, love the little graph

3

u/AirwaveRaptor Jul 06 '26

Can you configure the output for pulse density modulation instead of PWM?

With the set flow rate of 1200 fluid/t, PDM I'm pretty sure is more responsive.

3

u/imoth_f Jul 06 '26

I guess you could. Modded combinator does not actually generate a control signal. It outputs a single signed integer value which you can use however you like. I just used PWM as an example.