Sari la conținut
aiqbenchInformații despre AI & calcul cuantic
ȘtiriAnalizeBenchmark-uriSkill-uriÎntreabă AIÎnvațăDespre
...Se încarcă sesiunea
ȘtiriAnalizeBenchmark-uriSkill-uriÎntreabă AIÎnvațăDespre

Română · beta. Traducerea a fost făcută automat și este încă în curs de revizuire. Citește pagina în engleză

  1. Joburile viitorului
  2. ›
  3. Robotics & Embodied AI Engineer
  4. ›
  5. Lecția 3 din 8

Lecțiile acestui traseu sunt publicate deocamdată doar în engleză, așa că lecția de mai jos apare în engleză. Restul — module, quiz și materiale — funcționează la fel.

State Estimation and Control: From PID to MPC

Avansat¶ Citire · 5 min⚑ Misiune · 40 min◆ Test · 5 întrebări✓ Verificată la 23 nov. 2026

Vei putea să:

You can tune a PID loop by hand and explain what each term does to a step response, describe what a Kalman filter adds when sensors are noisy, and say what model predictive control buys over PID and what it costs — and why learned policies still sit on top of these loops rather than replacing them.

The loops under the policy

Every robot you will ever work on has a feedback controller running at hundreds or thousands of hertz between the thing that decides where to go and the motors that go there. A learned policy issues targets at 10–50 Hz; a servo loop makes the joints follow them. Understanding that lower loop is what lets you tell whether a failure is the policy's fault or the controller's, and it is the vocabulary every robotics colleague will assume you share.

PID, term by term

The controller sees an error e = setpoint - measurement and outputs a command u:

u = Kp · e + Ki · ∫ e dt + Kd · de/dt
  • Proportional pushes harder the further you are from the target. Alone it is a spring: higher Kp means a stiffer, faster response, but a spring oscillates.
  • Derivative resists the rate of change: it is damping. It takes the ring out of the step response, at the price of amplifying sensor noise, since differentiating a noisy signal is noisy.
  • Integral accumulates error over time. It is the only term that can cancel a constant disturbance, because P alone settles where the spring force exactly balances the disturbance, leaving a steady-state error.

Worked example: tuning by the numbers

A 1 kg mass on a frictionless rail, commanded with a force u. With PD control the closed loop is m·ẍ = -Kp·x - Kd·ẋ, a damped oscillator with natural frequency ω = √(Kp/m) and damping ratio ζ = Kd / (2·√(Kp·m)). Choose Kp = 100 N/m: ω = 10 rad/s, so the response settles in a few tenths of a second. Critical damping (no overshoot) needs ζ = 1, so Kd = 2·√(100·1) = 20 N·s/m. For a slightly faster response with small overshoot, ζ ≈ 0.7 gives Kd ≈ 14. Now hang a 2 N constant load on the mass. With P only, the loop settles where Kp·x = 2, so x is 2 cm short of the target forever. Add Ki and the integral winds up until the integral term supplies the 2 N; the steady-state error goes to zero. Two cautions: integral windup, when the actuator saturates and the integral keeps growing, and the fact that Kd must act on a filtered velocity, because differencing raw encoder ticks at 1 kHz produces garbage. Steve Brunton's Control Bootcamp walks through these effects with the pictures that make them stick.

Try the same system yourself. Set Kd to 20, then to 2, then add the load and switch the integral on:

Laborator

Un regulator pe o șină

Masă 1 kg, țintă 1 m, trei secunde.

Frecvența naturală
10 rad/s
Factorul de amortizare
1
Depășire
0%
Se stabilizează în 2% după
0.59 s
Rămâne sub țintă la final cu
0 cm

Încearcă o întrebare

O masă de 2 kg este ținută de un regulator cu Kp = 25 N/m. Ce Kd, în N·s/m, dă amortizare critică (fără depășire)?

Numerele se schimbă de fiecare dată. Răspunsul este calculat de laborator.

Rulează în browserul tău. Nimic nu este trimis sau salvat.

State estimation: the Kalman filter in one paragraph

Your controller wants position and velocity; your sensors give noisy position. A Kalman filter keeps a Gaussian belief over the state and alternates two steps: predict (push the belief forward with the dynamics model, which widens it) and update (correct it with a measurement, which narrows it, weighted by how much you trust sensor versus model). The output is a smooth estimate of position and velocity with an honest covariance. It is also the standard way to fuse an IMU, encoders and a camera into a single pose estimate. Roger Labbe's free book builds the filter up from a one-dimensional example in Python; work through its first chapters and the matrices stop being frightening.

Model predictive control

PID reacts to the current error. MPC, at every control step, solves a small optimisation: given a model of the dynamics, find the sequence of controls over the next N steps that minimises a cost (tracking error plus effort) subject to constraints (joint limits, torque limits, obstacles). Apply only the first control, then re-solve from the new measurement. That receding-horizon trick makes it a feedback controller, and the explicit constraints are what PID cannot offer: an MPC controller will not command a torque it knows is out of range or a path through a wall.

The costs are real. MPC needs a model, and a bad model produces confident bad plans. It needs compute at loop rate; a quadratic program for a 7-joint arm at 1 kHz is feasible, a nonlinear one for a humanoid is a research problem. Tedrake's Underactuated Robotics explains why systems that cannot apply force in every direction, like a walking robot mid-stride, need this kind of planning rather than simple servoing.

Why learned policies still need all this

Three reasons. Rate: a neural policy at 10 Hz cannot stabilise a joint that needs 1 kHz. Safety: the low-level loop is where limits and stops live, and it is simple enough to verify. Abstraction: a policy that outputs end-effector targets or joint velocity targets, with a well-tuned controller underneath, learns faster than one that must also discover how to servo. Most published learned-manipulation systems, including the VLAs in module 6, output targets that an engineered controller tracks. What is unsettled is where the boundary should sit: some groups learn torque-level policies for locomotion and swear by it; nobody yet does that for precision manipulation on hardware.

What to remember

  • P is a spring, D is damping, I is the only term that cancels constant disturbances.
  • ω = √(Kp/m) and ζ = Kd/(2√(Kp·m)) let you pick gains instead of guessing.
  • Filter before you differentiate; guard the integral against windup.
  • A Kalman filter is predict-then-update, and gives you velocity and uncertainty, not just position.
  • MPC trades compute and a model for explicit constraints; PID trades those away for simplicity.
  • Learned policies issue targets; engineered loops track them, at a higher rate and with the safety limits.

Materiale selectate

2.8h

Munca de profunzime se întâmplă aici — lecția este briefingul tău.

  • Steve Brunton — Control Bootcamp (lecture series)Video· 60 min
  • Roger Labbe — Kalman and Bayesian Filters in Python (free book)Tutorial· 60 min
  • Russ Tedrake — Underactuated Robotics (MIT course notes)Documentație· 45 min

În direct pe aiqbench

Subiectul acestei lecții în restul site-ului, astăzi.

În știri, ultimele 30 de zile

  • Cenotian raises $48M to underwrite robotics deployments and cut factory riskDealroom.co · 1 dec.
  • DeepSeek Officially Posts Job for Talent in Embodied Intelligence36Kr · 1 dec.
  • NVIDIA Expands US Technology Initiatives Across Energy, Robotics and Quantum ComputingThe Quantum Insider · 1 dec.
Mai multe știri pe acest subiect →

Mergi mai departe

  • Frontiera capabilității în timpCât de repede crește cel mai bun scor la fiecare benchmark.
  • Întreabă AI despre această lecțieDeschide Întreabă AI cu o întrebare despre această lecție, cu răspuns din arhiva de știri, cu surse.

Testează-ți cunoștințele

5 întrebări în 100 de secunde, pe o pagină separată. Citește mai întâi tot ce este mai sus.

Testează-ți cunoștințele →

Misiunea modulului

35–45 min

Simulate a 1 kg mass on a frictionless rail driven by a force you choose, 100 Hz, with Gaussian noise on the position sensor. Implement a PID position controller and tune it to reach a 1 m setpoint with under 10% overshoot. Then add a 2 N constant disturbance (a sagging cable) and show that P-only control leaves a steady-state error while adding I removes it. Deliver the two plots and the final gains.

Se încarcă lucrarea ta…

← Lecția anterioară2. Perception: Cameras, Depth and Foundation Vision ModelsLecția următoare →4. Learning for Control: Imitation, RL and Sim-to-Real
aiqbench
Informații despre AI & calcul cuantic© aiqbench. Toate drepturile rezervate.

Fluxuri:RSS·JSON Feed

LimbăEnglish·Românăbeta
ȘtiriAI & tehnologieCuanticAnalize
ExploreazăBenchmark-uriÎnvață
CompanieDespreÎncredereInformații legaleTermeni și condițiiPolitica de confidențialitateNotificări privind drepturile de autorȘtergerea datelorRaportează conținut

Perspectiva aiqbench, analizele, rezumatul zilnic și răspunsurile din Întreabă sunt scrise de modele AI din sursele afișate, fără revizuire editorială înainte de publicare. Pot conține erori — verifică sursa. Cum este folosit modelul →

  • Știri
  • Analize
  • Întreabă
  • Topuri
  • Cont