Introduction to Feedback Control Principles
Feedback control is essential for self-driving cars to maintain desired trajectories and speeds by continuously adjusting based on real-time sensor data. In this section, we introduce the core principles using PID controllers for simple regulation tasks and state-space models for more complex dynamics.
A PID (Proportional-Integral-Derivative) controller computes an error $e(t) = r(t) - y(t)$, where $r(t)$ is the setpoint (desired value) and $y(t)$ is the measured output. The control signal $u(t)$ is:
$$u(t) = K_p e(t) + K_i \int_0^t e(\tau) \, d\tau + K_d \frac{de(t)}{dt}$$
- Proportional (P): Responds to current error, providing quick correction but may cause overshoot.
- Integral (I): Accumulates past errors to eliminate steady-state offset.
- Derivative (D): Predicts future errors by looking at the rate of change, damping oscillations.
In self-driving cars, PID is ideal for speed regulation, where the setpoint is the target velocity from trajectory optimization (prerequisite). For instance, if the car is accelerating too slowly uphill, the controller increases throttle input proportionally to the speed deficit.
State-space models represent the system's dynamics as a set of first-order differential equations, useful for multi-variable control like steering, which couples lateral and longitudinal motion.
$$\dot{x} = A x + B u$$ $$y = C x + D u$$
Here, $x$ is the state vector (e.g., position, velocity), $u$ is input (e.g., steering angle), and $A, B, C, D$ are matrices defining the system.