PID Controller

A control system aims to keep the pendulum balanced using feedback.

Main Elements

  • Plant: The physical system to be controlled (e.g., pendulum)

  • Controller: Algorithm producing control signals

  • Sensor: Measures the system state

  • Actuator: Applies control input (motor)

  • Feedback: Uses sensor data to adjust behavior

Feedback Control

Continuously reduces error by adjusting inputs based on outputs.

  • Bang-bang: All-or-nothing control; fast but unstable.

  • PID: Combines:

\[u(t) = K_p e(t) + K_i \int e(t) \, dt + K_d \frac{de(t)}{dt}\]
  • LQR: Uses optimal gains to minimize cost function:

  • \[u = -Kx\]

    where \(x\) is the system state and \(K\) is the gain matrix.