Basic PDM controller utilizing integer overflow to achieve full 32-bit precision at 60 hz resolution. just replace the first shift combinator to get whatever input range you want.

Originally shared on the public FactorioPrints / Factorio School archive (factorioprints.com · factorio.school). Authorship preserved from the public catalog.
Basic PDM controller utilizing integer overflow to achieve full 32-bit precision at 60 hz resolution. just replace the first shift combinator to get whatever input range you want.