Answers are grounded in this paper and cite their sources.
The cart–inverted pendulum is a standard benchmark for unstable, underactuated dynamics, yet published comparisons of PID and LQR control often stop at a single nominal case. This study compares the two controllers on a linearised cart–pendulum model (cart 2 kg, pendulum 0.1 kg, rod 0.25 m) built in MATLAB/Simulink, and asks how each copes when the plant itself changes. The model was derived from Newton’s laws, confirmed to be controllable and observable, and written in state-space form. PID gains were obtained by auto-tuning and by trial and error over eleven combinations, and LQR weights were explored over ten Q and R settings. Every design had to keep cart velocity below 1 m/s, pendulum angle below 10° and angle settling time under 20 s. The best PID controller (Kp = 100, Ki = 90, Kd = 40) settled in 9.48 s with a 0.92° peak angle, whereas the best LQR controller (Q = diag[100, 1, 10, 1], R = 0.008) settled in 3.69 s with a 0.44° peak. Across nine variations in cart mass, pendulum mass and rod length, LQR settled in 3.8–5.4 s every time, while PID needed 9.2–10.7 s and failed to settle when the cart mass rose to 10 kg. All results come from simulation and should be confirmed on hardware.
No takes yet. Share an insight, caveat, or question.
Nor et al. (2026) studied this question.
Synapse has enriched 10 related papers. Consider them for comparative context: