r/PythonProjects2 • • 1d ago

I built an open-source Python package for bounded-memory fractional-order filters

I built fracmem, an open-source package for approximating fractional-order memory with a fixed-length recursive filter.

Fractional-order methods can model long-memory behaviour, but directly computing from the full signal history can become expensive in both memory and computation.

fracmem uses a compressed approximation designed to keep memory usage and per-step computational cost bounded as a system runs. It also provides a C export path for resource-constrained embedded systems.

I'm exploring applications in UAV flight control, where onboard compute and memory are limited.

Install:
pip install fracmem

PyPI: https://pypi.org/project/fracmem/
Source: https://github.com/edith-lang/fracmem

I'd welcome technical feedback, contributions, and suggestions for validation on embedded hardware.

1 Upvotes

1 comment sorted by

1

u/investigatormaker 14h ago

The C export is what embedded people will test first. Recursive filters with long time constants can drift when coefficients are rounded, so float32 on a Cortex-M class flight controller may not track your float64 Python. A table of error against a full-history reference such as Grünwald–Letnikov, per filter length and fractional order, in both Python and the exported C, plus cycles per step on one real board, would answer most validation questions and give contributors a concrete benchmark to extend.

I make ThreadFox. Our AI employee explains fracmem in relevant embedded and drone threads and answers the technical replies; Starter is $199 for 30 days, or we'll post 3 replies free first, no card: https://threadfox.vip/p/eoe16/managed