本文所用的参数组(M、m、b、l)以及选用该系统作为例题,均来自 Control Tutorials for MATLAB & Simulink(CTMS),作者为 Dawn Tilbury 教授(密歇根大学)和 Bill Messner 教授(卡内基梅隆大学),后由 Rick Hill 教授(底特律慈悲大学)、JD Taylor(CMU)和 Shuvra Das 教授(底特律慈悲大学)扩展,由美国国家科学基金会(资助号 DUE 9554819)和 MathWorks 资助。CTMS 采用 CC BY-SA 4.0 许可。
小车倒立摆的运动方程是标准内容,大多数控制教材中都有基本相同的形式,其中包括 Ogata 的 Modern Control Engineering、Nise 的 Control Systems Engineering,以及 Franklin、Powell 与 Emami-Naeini 的 Feedback Control of Dynamic Systems。
Q:How do you linearize the equations of motion for an inverted pendulum cart around theta = 0?
The coupled nonlinear equations derived via Euler-Lagrange are (M+m)x¨+mLθ¨cosθ−mLθ˙2sinθ=F and mLx¨cosθ+(I+mL2)θ¨−mgLsinθ=0. Linearizing around upright equilibrium x0=[0,0,0,0]T using small-angle approximations sinθ≈θ, cosθ≈1, and dropping second-order velocities θ˙2≈0 yields the linear state-space system x˙=Ax+Bu with states x=[p,p˙,θ,θ˙]T. Here, denominator Jt=(M+m)(I+mL2)−(mL)2, producing an unstable open-loop pole at s=+Jt(M+m)mgL.
Q:Why is Full-State Feedback (LQR) superior to dual-PID loops for cart-pendulum stabilization?
The inverted cart-pendulum is an underactuated system (1 control force F controls 2 degrees of freedom: cart position p and pole angle θ). Decentralized PID loops suffer from severe dynamic cross-talk: moving the cart forward requires accelerating backward first, introducing non-minimum phase right-half-plane zeros. Linear Quadratic Regulation (LQR) solves the continuous algebraic Riccati equation ATP+PA−PBR−1BTP+Q=0 to calculate optimal state gain matrix K=R−1BTP, coordinating cart positioning and balance simultaneously with guaranteed stability margins (≥60∘ phase margin).
Q:What happens when the cart actuator saturates, and how is this simulated in BlockWerk?
When required motor force exceeds physical limits ∣u∣>Fmax, the linear control law loses control authority. If ∣θ∣>θcrit, gravitational torque mgLsinθ exceeds the maximum recoverable horizontal torque FmaxLcosθ, causing the pole to fall open-loop. In BlockWerk, inserting a Saturation block between the state-gain matrix K and plant input B dynamically clamps u(t)=clamp(u,−Fmax,Fmax), enabling engineers to accurately verify the maximum impulse disturbance before destabilization.