# A Tuning Method for Speed Tracking Controller Parameters of Autonomous Vehicles
## 2 Construction of Longitudinal PID Controller for a Vehicle
### PID Control  
The PID controller is a control algorithm that is widely used in automatic control systems, adjusting the output of the controlled object to ensure that the system reaches the desired target value. The core concept of the PID controller is feedback control based on the control error (i.e., the difference between the setpoint and the actual value), ensuring both fast response speed and high accuracy of the system. This algorithm is recognized for its simplicity and effectiveness, making it suitable for a wide range of industrial processes and control scenarios. PID controllers can be classified into multiple types based on different criteria. According to the implementation method, they can be divided into analog and digital PID controllers: analog PID controllers rely on electronic circuits, while digital PID controllers use discrete computations and digital signal processing. Based on the form of the control algorithm, they can be categorized as positional or incremental controllers: positional controllers calculate a target position based on the current error, while incremental controllers make adjustments based on changes in the error. From the structural perspective, there are parallel and series controllers: parallel controllers compute contributions independently, while series controllers handle them sequentially. In terms of parameter adjustment methods, they can be classified into fixed-parameter and adaptive PID controllers: fixed-parameter controllers use constant values, while adaptive controllers adjust parameters in response to system changes. Depending on the number of control loops, they can be classified as single-loop or multi-loop controllers, where multi-loop controllers manage multiple variables simultaneously. Based on application fields, PID controllers can be divided into general purpose and specialized PID controllers, tailored to meet the needs of specific industries. Regarding the implementation platform, PID controllers can be classified as hardware- or software-based controllers, where hardware controllers are implemented via physical devices and software controllers through computer programs. Lastly, based on control action, there are P (proportional), PI (proportional-integral), PD (proportional-derivative), and PID (proportional-integral-derivative) controllers. These classifications help users select the most suitable PID controller according to specific control requirements, aiming to achieve optimal performance. The PID controller used in this study is composed of three parts: proportional (P), integral (I), and derivative (D), each contributing differently to the controller's output. The proportional component provides a basic response by reacting instantly to the error signal; the integral component works to eliminate the steady-state error, ensuring that the system eventually reaches the target value; and the derivative component predicts the change in the error trend, enhancing the dynamic response and minimizing overshoot. The basic principle of the PID controller is illustrated in Figure 2, which visually explains how each part cooperates to improve the system's control performance. In this study, a PID control method is used to manage the longitudinal speed tracking of a vehicle. Proportional control (P) adjusts based on the current error value (i.e., the difference between the target speed and the actual speed). The output of the proportional controller is directly proportional to the error, meaning that the larger the error, the stronger the controller's response, which enables a quick reaction to speed deviations. The control rule is as follows:  
\[P=k_{p}e(t)+k_{i}\int e(t)dt+k_{d}\frac{de(t)}{d(t)} \tag{8}\]  
where \(k_{p}\) is the proportional coefficient, and \(e(t)\) represents the speed error (the difference between the target speed and the actual speed). The advantage of proportional control is its ability to respond quickly to speed changes.