finds.dev← search

// the find

AtsushiSakai/PyAdvancedControl

★ 553 · Python · MIT · updated Apr 2019

Python codes for advanced control

A collection of standalone Python scripts implementing classical control algorithms: LQR, finite-horizon optimal control, and MPC variants including path tracking and inverted pendulum. It's aimed at control engineering students or robotics developers who want readable reference implementations rather than a production library.

The MPC modeling section shows two approaches side by side — one using cvxpy as a modeling layer and one hitting cvxopt directly — which is genuinely useful for understanding what the abstraction buys you. The inverted pendulum example includes animated results, making it easy to verify correctness visually. Vehicle models (kinematic and dynamic bicycle) are included as separate modules, which is a practical addition for anyone doing mobile robot path tracking. There are actual tests for the core MPC modules, not just scripts.

Abandoned since April 2019 — Python 3.7, pinned to numpy 1.15 and matplotlib 2.2, which will conflict with anything modern. Each example is essentially a self-contained script with hardcoded parameters; there's no shared infrastructure, so extracting a controller for use in your own project means copy-pasting and manually wiring things up. No noise, disturbance rejection, or observer (Kalman filter) examples, which are the next thing anyone needs after getting LQR working. The MPC implementations don't handle infeasibility — if the solver fails, the code will just crash.

View on GitHub →

// want more like this?

We dig through GitHub every week and send a few repos picked for what you actually care about — each with an honest take like this one.

Get finds in your inbox → Search again →