MPC (Model Predictive Control)
Model Predictive Control. Instead of simple reactive behavior like 'deviate-correct', the controller predicts the future over several steps and chooses the best course of action.
How It Works
- Model — mathematical description of the system (e.g., how tilt and speed affect balance).
- Prediction Horizon — the controller models N steps ahead.
- Optimization — at each step, a task is solved: what engine commands will yield the desired behavior with minimal effort.
- The first step is applied, then everything is recalculated from scratch.
The cycle repeats hundreds of times per second, so MPC requires a fairly powerful controller.
How It Differs from a PID Regulator
| PID | MPC | |
|---|---|---|
| Looks Ahead | No | Yes, for N steps |
| Considers Constraints | Weakly | Yes (motor limits, angles) |
| Complexity | Low | High |
| Calculation Cost | Minimal | Requires a processor |
Where It Is Used
- Balancing robot dogs and humanoids;
- Autonomous pilots and drones;
- Manipulator and rocket control.
For balance, MPC receives data from IMU and sends commands to actuators.