explaingit

dmytro-dovg/pid-combinator

Analysis updated 2026-05-18

1LuaAudience · generalComplexity · 3/5Setup · moderate

TLDR

A Factorio mod that adds a PID controller combinator, letting players automatically hold a space platform's speed at a set target.

Mindmap

mindmap
  root((pid-combinator))
    What it does
      PID feedback control
      Space platform speed hold
      Auto-tune gains
    Tech stack
      Lua
      Factorio Mod API
    Use cases
      Pulse width modulation
      Two-pump fuel systems
      Manual gain tuning
    Audience
      Factorio players
      Circuit network builders

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Wire a space platform's speed into the combinator to keep it flying at a steady target speed.

USE CASE 2

Add pulse width modulation so a fuel pump delivers proportional flow instead of switching fully on or off.

USE CASE 3

Build a two-pump fuel system that can both add and remove fuel to react faster to speed changes.

USE CASE 4

Use the auto-tune feature to automatically calculate PID gain values instead of tuning them by hand.

What is it built with?

LuaFactorio Mod API

How does it compare?

dmytro-dovg/pid-combinatorasxelot/fastdict.koplugindaveshap/rtw2_world_resistance
Stars111
LanguageLuaLuaLua
Setup difficultymoderateeasyeasy
Complexity3/52/52/5
Audiencegeneralgeneralgeneral

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · moderate Time to first run · 30min

Requires Factorio and familiarity with the game's circuit network to wire the combinator correctly.

License is not stated in the project's documentation.

In plain English

PID Combinator is a mod for the game Factorio that adds a new type of combinator, a device Factorio players use to build in-game logic circuits. This combinator runs a PID controller, which is a standard feedback algorithm used to hold a measured value steady at a chosen target. In Factorio, the most common use is keeping a space platform flying at a set speed rather than letting it speed up or slow down unpredictably. To use it, you wire the space platform's reported speed into the combinator as the value you want to control, wire in a constant signal as the target speed, and wire the combinator's output to a pump that supplies fuel. You then open the combinator's interface, match up the input and output signals on the Variables tab, and start tuning gain values called Kp, Ki, and Kd on the Tuning tab. Because a basic setup only turns the pump fully on or fully off, the mod also explains how to add pulse width modulation, a technique that switches the pump on and off in short bursts so fuel delivery becomes proportional rather than all or nothing, which keeps the platform's speed much steadier. A further section describes an even more responsive two-pump setup that can both add and remove fuel from the thruster's buffer. For players who do not want to tune the three gain values by hand, the combinator includes an auto-tune feature. You let the platform settle near a target speed, choose a tuning rule such as Astrom-Hagglund AMIGO PID or Ziegler-Nichols No overshoot, and press Auto-tune, and the mod measures the platform's response and fills in Kp, Ki, and Kd automatically. The README also includes a detailed manual tuning guide, explaining what to look for on the combinator's live speed graph as you adjust each gain in turn.

Copy-paste prompts

Prompt 1
Help me wire a PID combinator to hold my Factorio space platform at a set speed.
Prompt 2
Explain how to set up pulse width modulation with the PID combinator's output and a pump.
Prompt 3
Walk me through the auto-tune feature to find good Kp, Ki, and Kd values for my platform.
Prompt 4
How do I build the two-pump fuel system described for the PID combinator mod?
Prompt 5
Give me manual tuning tips for Kp, Ki, and Kd if my platform's speed keeps overshooting.

Frequently asked questions

What is pid-combinator?

A Factorio mod that adds a PID controller combinator, letting players automatically hold a space platform's speed at a set target.

What language is pid-combinator written in?

Mainly Lua. The stack also includes Lua, Factorio Mod API.

What license does pid-combinator use?

License is not stated in the project's documentation.

How hard is pid-combinator to set up?

Setup difficulty is rated moderate, with roughly 30min to a first successful run.

Who is pid-combinator for?

Mainly general.

Open on GitHub → Explain another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.