# Sterowanie ze sprzężeniem zwrotnym (PID, MPC)

EN: **Feedback control for robots (PID, MPC)** · id `feedbackcontrol` · aliases: feedback control, PID, MPC, model predictive control, regulator PID, sterowanie predykcyjne

Path: [AI Atlas](https://aiatlasgraph.com/llms.txt) › [Robotyka i embodied AI](https://aiatlasgraph.com/t/robotics.md) › [Kinematyka i sterowanie robotem](https://aiatlasgraph.com/t/robotcontrol.md) › Sterowanie ze sprzężeniem zwrotnym (PID, MPC)

## Description

- PL: Regulatory w pętli zamkniętej – od klasycznego PID przez LQR po sterowanie predykcyjne z modelem – śledzące trajektorię mimo zakłóceń.
- EN: Closed-loop controllers—from classical PID through LQR to model predictive control—that track a trajectory despite disturbances.

## In one sentence

- PL: Sposób, w jaki robot stale mierzy, jak bardzo odbiega od planu, i od razu poprawia siłę swoich silników.
- EN: How a robot keeps measuring how far it strays from the plan and immediately adjusts its motor effort.

## Problem it solves

- PL: Nawet idealnie zaplanowany ruch rozjeżdża się przez ciężar ładunku, tarcie i pchnięcia, a robot zaczyna drgać lub zbaczać.
- EN: Even a perfectly planned motion drifts because of payload, friction and pushes, so the robot starts to shake or veer.

## What it does

- PL: Jak kierowca trzymający auto w pasie: widzi odchylenie, delikatnie kręci kierownicą, a bystrzejszy przewiduje też najbliższy zakręt.
- EN: Like a driver keeping a car in lane: seeing the drift, nudging the wheel, and a sharper one also anticipating the next bend.

## Everyday example

- PL: Dron utrzymuje się w miejscu mimo podmuchów wiatru, bo co ułamek sekundy koryguje obroty śmigieł.
- EN: A drone holds its position in gusty wind because it corrects its propeller speeds every fraction of a second.

## This concerns you if you…

- PL: twój robot lub dron drga, przestrzeliwuje albo dryfuje
- PL: łączysz polecenia z sieci neuronowej z prawdziwymi silnikami
- PL: chcesz wiedzieć, jak maszyny utrzymują równowagę
- EN: your robot or drone shakes, overshoots or drifts
- EN: connect neural-network commands to real motors
- EN: want to know how machines keep their balance

## Keywords

PID tuning · LQR · model predictive control · impedance control · operational space control · Drake · acados · ros2_control

## How it works

- PL: PID wylicza sygnał z bieżącego błędu, jego całki i pochodnej. LQR wyznacza optymalne wzmocnienia dla zlinearyzowanego modelu. MPC w każdym kroku rozwiązuje krótkie zadanie optymalizacji z ograniczeniami na modelu dynamiki i wykonuje tylko pierwszą akcję. Uczone polityki zwykle podają cele, które śledzi regulator niskiego poziomu.
- EN: PID computes the command from the current error, its integral and derivative. LQR derives optimal gains for a linearised model. MPC solves a short constrained optimisation over a dynamics model at every step and applies only the first action. Learned policies usually output targets tracked by a low-level controller.

## Limits

- PL: PID wymaga strojenia i słabo radzi sobie z silnie nieliniową dynamiką. MPC potrzebuje dobrego modelu i szybkiego solvera, bo musi zdążyć w każdym cyklu. Opóźnienia czujników mogą rozkołysać układ.
- EN: PID needs tuning and copes poorly with strongly nonlinear dynamics. MPC needs a good model and a fast solver to finish within each cycle. Sensor delays can destabilise the loop.

## Key terms

- PL: **PID**: Regulator reagujący na błąd, jego sumę w czasie i tempo zmian.
- PL: **MPC**: Sterowanie, które planuje kilka kroków naprzód i wykonuje tylko pierwszy.
- PL: **przeregulowanie**: Przekroczenie celu przed ustabilizowaniem się, widoczne jako kołysanie.
- EN: **PID**: A controller reacting to error, its accumulation over time and rate of change.
- EN: **MPC**: Control that plans a few steps ahead and executes only the first.
- EN: **overshoot**: Going past the target before settling, seen as oscillation.

## Know first

- [Rachunek różniczkowy i gradienty (Calculus and gradients)](https://aiatlasgraph.com/t/calculus.md)
- [Spadek gradientu i optymalizacja ciągła (Gradient descent and continuous optimisation)](https://aiatlasgraph.com/t/mathoptimization.md)

## Related topics

Untyped, symmetric "see also" links.

- [Optymalizacja i sterowanie procesów (Process optimization and control with machine learning)](https://aiatlasgraph.com/t/processcontrol.md)
- [Planowanie ruchu i sterowanie pojazdem (Motion planning and vehicle control)](https://aiatlasgraph.com/t/adplanning.md)
- [Sterowanie predykcyjne z modelem uczonym na danych (MPC) (Learning-based model predictive control)](https://aiatlasgraph.com/t/learningmpc.md)

## Sources

- [Modern Robotics: Mechanics, Planning, and Control](<https://hades.mech.northwestern.edu/index.php/Modern_Robotics>) `modern-robotics-2017` · by Kevin M. Lynch, Frank C. Park
- [MIT · Underactuated Robotics](<https://underactuated.mit.edu/>) `robotics` · reference: Sterowanie, dynamika i uczenie w robotyce.

---

AI Atlas revision 122 (2026-10-30) · HTML: https://aiatlasgraph.com/t/feedbackcontrol · index: https://aiatlasgraph.com/llms.txt · everything: https://aiatlasgraph.com/llms-full.txt · updated 2026-10-30
