Vehicle longitudinal speed following control method
By introducing a joint optimization method of genetic algorithm and particle swarm optimization algorithm in traditional PID controllers, the control parameters are dynamically adjusted, and the problem of insufficient accuracy and stability of traditional PID control in complex environments is solved, thereby achieving higher accuracy and stable longitudinal speed following control.
Patent Information
- Application Number
- CN202510349509.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-24
- Publication Date
- 2025-06-20
AI Technical Summary
The traditional longitudinal speed following method based on PID controller cannot adaptively adjust parameters under complex and dynamically changing road conditions, resulting in a decrease in speed following accuracy, unstable dynamic response, and it is difficult to balance longitudinal acceleration and path tracking errors.
The parameters Kp, Ki and Kd of the PID controller are dynamically adjusted by using a joint optimization method based on the genetic algorithm GA and the particle swarm optimization algorithm PSO to achieve higher accuracy and smooth longitudinal speed following control.
Through the combination of global search and local optimization, longitudinal speed following accuracy and dynamic stability are improved, the robustness and adaptability of the system are enhanced, and the vehicle can follow the target speed stably and accurately in various complex environments.
Smart Images

Figure FT_1 
Figure FT_2 
Figure FT_3
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of autonomous driving control, and particularly relates to a vehicle longitudinal speed following control method. Technical Background
[0002] With the continuous development of autonomous driving technology, the vehicle longitudinal speed following control technology has become a crucial part of the autonomous driving system. Traditional longitudinal speed following control methods, especially the control strategies based on PID (Proportional-Integral-Derivative) controllers, have been widely applied in vehicle automation systems. The PID controller can dynamically adjust the vehicle's control inputs (such as throttle, brake, etc.) according to the deviation of the target longitudinal speed by adjusting the three control quantities of proportional, integral, and derivative, so as to achieve precise following of the target longitudinal speed by the vehicle.
[0003] However, the longitudinal speed following method based on traditional PID control faces multiple challenges in practical applications. Especially when facing complex and dynamically changing road conditions, the traditional PID controller cannot adaptively adjust its parameters, resulting in a decline in speed following accuracy.
[0004] Specifically, the existing technologies have the following defects: (1) Fixed parameter setting of the PID controller: The traditional PID controller relies on fixed parameters (K p 、K i 、K d ) set in advance. These parameters are usually obtained through manual adjustment. However, in different driving environments and driving conditions, the fixed parameters cannot meet the dynamically changing requirements. Therefore, when the PID controller faces complex scenarios (such as high-speed driving, rapid acceleration, braking, complex traffic environments, etc.), it often shows poor following accuracy and unstable dynamic response.
[0005] (2) Lack of global optimization ability: The traditional PID control method cannot be adaptively adjusted through global optimization. For complex longitudinal speed following problems, the PID controller often can only be adjusted by relying on empirical settings or trial-and-error methods, lacking an effective global search process, resulting in difficulty in finding the optimal control parameters in practical applications. Especially in the case where the vehicle needs to handle sudden changes (such as sudden stops, rapid accelerations, etc.), the traditional PID controller cannot automatically adapt to this change.
[0006] (3) Limitation on vehicle dynamic response: The PID controller mainly focuses on the error between the vehicle and the reference speed, but it fails to fully consider the vehicle's dynamic characteristics, acceleration changes, and the impact of control inputs on vehicle comfort and system stability. Due to the complexity of vehicle dynamic responses, the PID controller often cannot optimize longitudinal speed accuracy and driving comfort simultaneously, resulting in drastic changes during acceleration and deceleration processes.
[0007] (4) Adjusting the balance between longitudinal speed and acceleration: The longitudinal speed following control methods in the prior art fail to effectively balance the vehicle's longitudinal acceleration and path tracking error. For a vehicle traveling at high speed, overly rapid acceleration or braking may cause the speed to deviate from the target value, and may even trigger oscillations in the control system. For low-speed driving, the control strategy may not be able to quickly respond to the target speed, resulting in a decline in speed following accuracy and affecting the vehicle's stability and comfort.
[0008] 2. Defects and improvement points of the prior art These defects in the prior art limit the accuracy and dynamic response ability of vehicle longitudinal speed following control. In particular: (1) The inadequacy of fixed control parameters makes the performance of the PID controller unsatisfactory under different working conditions, especially under dynamically changing road conditions or driving requirements, and it cannot maintain stable longitudinal speed following.
[0009] (2) The lack of a global search mechanism makes the vehicle unable to automatically adjust control parameters according to real-time situations to adapt to complex and variable road conditions.
[0010] (3) Ignoring the vehicle's dynamic performance, especially the impact of acceleration changes, results in poor vehicle control smoothness and an inability to smoothly transition during acceleration and braking, affecting driving comfort. Summary of the Invention
[0011] The present invention aims to provide a vehicle longitudinal speed following control method, which dynamically adjusts the parameters of the PID controller through a method jointly optimized based on the genetic algorithm GA and the particle swarm algorithm PSO to achieve higher-precision and smoother longitudinal speed following control. By combining the global search ability and local optimization ability, it makes up for the deficiencies of traditional PID control methods, and by optimizing the parameters of the controller, it improves the longitudinal speed following accuracy and dynamic stability of the vehicle in various complex environments.
[0012] The technical solution of the present invention is as follows: The described vehicle longitudinal speed following control method includes the following steps: A. PID Controller Design: The longitudinal path tracking control uses a PID controller, and its output control variables are the throttle and brake. The output of the PID controller adjusts the longitudinal control input of the vehicle based on the longitudinal speed tracking error. The output formula of the PID controller is: (1) where e(t) is the longitudinal error, which can be represented by the difference between the actual vehicle speed and the target vehicle speed: e(t) = v target (t) - v actual (t), v target (t) is the target vehicle speed, and v actual (t) is the actual vehicle speed; K p, K i and K d are the proportional, integral, and derivative gains respectively. B. Optimize K p, K i and K d using the genetic algorithm GA and the particle swarm optimization algorithm PSO. In the genetic algorithm GA, the chromosome of each individual is represented by the binary encoding of K p , K i and K d . In the particle swarm optimization algorithm PSO, the position of each particle is represented by the real - valued numbers of K p , K i and K d . Initialize multiple populations of GA and PSO. Through fitness calculation, select the optimal particle. After continuous iteration until the change in the fitness value is less than the preset threshold, obtain the optimal K p, K i and K d parameters. C. Input the optimal K p, K i and K d parameters into the output formula of the PID controller. Based on this output formula, calculate the longitudinal driving force F long , and according to the new control input of the longitudinal target speed, adjust the longitudinal acceleration a x and speed v x , and at the same time continue the iterative calculation in step B to adjust the output of the PID controller to ensure that the vehicle can achieve the best longitudinal control effect during the path tracking process.
[0013] In the aforementioned step B, the process of optimizing K p , K i and K d using the genetic algorithm GA and the particle swarm optimization algorithm PSO is as follows: a. Based on the preset K p , K i and K d range, randomly form multiple initial populations, each population contains multiple particles, and each particle is composed of the values of K p , K i and K d . In the genetic algorithm GA, the K p , K i and K d of each individual needs to be encoded; after calculating the fitness value of each particle, the particles in each population are sorted according to the fitness value and divided into 50% of the particles with higher fitness and 50% of the particles with lower fitness; b. Perform the following operations on each divided initial population: Particle Swarm Optimization Algorithm PSO optimization: For 50% of the particles with higher fitness, update their velocities and positions, and the updated particles directly enter the next generation population; Genetic Algorithm GA optimization: For 50% of the particles with lower fitness, perform crossover and mutation operations to generate new offspring individuals, and replace the original 50% of the particles with lower fitness with the newly generated offspring individuals; Merge the particles optimized by the Particle Swarm Optimization Algorithm PSO and the particles optimized by the Genetic Algorithm GA to form a new generation population; c. Calculate the fitness value of each particle in each new generation population, and obtain the particles with the optimal fitness value in each new generation population to form the next generation population; d. Repeat the above steps until the change in the fitness value is less than the preset threshold to obtain the optimal K p , K i and K d parameters.
[0014] In the step b described above, the formula for updating the particle velocity in the Particle Swarm Optimization Algorithm PSO optimization is: (2) (3) where v i (t) is the particle velocity, x i (t) is the particle position, pbest i and gbest i are the individual optimal and global optimal positions respectively, c1 and c2 are learning factors, r1 and r2 are random numbers, is the inertia weight.
[0015] The inertia weight is updated using a linear decreasing strategy, and its formula is: *t (4) Wherein, w max and w min are the maximum and minimum values of the inertia weight respectively, and t max is the maximum number of iterations.
[0016] In the step c, the formula for calculating the fitness value of each particle in each new generation population is:[[]] (5) Wherein,[[]] and are the weight coefficients; ITAE is the integral time absolute error,[[]] ; Jerk is the longitudinal acceleration change rate[[]] .
[0017] In the step a, the preset K p , K i and K d ranges are respectively: K p ∈[0, 20], K i ∈[0, 1], K d ∈[0.01, 5], and these ranges can all be converted into actual parameters through binary coding and real number coding.
[0018] In the step a, the initial population size of the genetic algorithm is 20, and the initial number of particles of the particle swarm optimization algorithm is 20.
[0019] In the genetic algorithm, the binary coding length of each individual is 30 bits, among which the lengths of K p , K i and K d are respectively 10 bits, and are converted into actual parameter values through linear mapping, that is,[[]] ,[[]] 4.99; in the particle swarm optimization algorithm, the position of each particle is represented by the real numbers of K p , K i and K d .
[0020] The beneficial effects of the present invention are as follows:[[]] 1. Improve the longitudinal speed following accuracy[[]] By using the GA+PSO optimization algorithm, the present invention can automatically adjust the parameters K p , K i and K d of the PID controller according to the real-time speed error, and achieve more accurate longitudinal speed control. When the vehicle accelerates or decelerates, it can dynamically adjust the parameters according to the real-time error to ensure that the speed follows the target speed quickly and smoothly.
[0021] The GA+PSO algorithm of the present invention enables the longitudinal speed controller to automatically adapt to changing driving environments by automatically optimizing the PID parameters. By combining global search (GA) and local optimization (PSO), the algorithm can adapt to different driving requirements, ensuring that the vehicle always accurately follows the target speed, whether during constant-speed driving or acceleration and deceleration.
[0022] By combining GA and PSO, the system of the present invention can not only avoid the local optimum problem but also accelerate the convergence process and improve the optimization efficiency. PSO performs local optimization on the particle swarm, while GA performs global optimization on the entire population. The combination of the two effectively improves the optimization speed of the PID parameters, reduces the calculation time, and ensures real-time control requirements.
[0023] After the GA+PSO optimization of the present invention, the PID controller can adjust the control parameters in real time according to different dynamic changes, not only enhancing the robustness of the system but also ensuring stability and accuracy under various driving conditions. In scenarios with large speed changes, the optimized PID controller can quickly make adjustments to ensure that the vehicle always follows the predetermined longitudinal speed trajectory.
[0024] By combining the global search ability of GA and the local search ability of PSO, the system can fully explore the PID parameter space and avoid the local optimum problem in traditional optimization methods. GA is responsible for global search to find potential optimal parameter ranges, while PSO performs local refined optimization to improve the response accuracy and performance of the longitudinal speed controller.
[0025] The optimized PID controller of the present invention can quickly adapt to the dynamic changes of the vehicle and can quickly adjust according to the real-time longitudinal error, thus effectively avoiding the hysteresis phenomenon and improving the smoothness and response speed of speed following.
[0026] The application methods of the control method of the present invention include: 1. An autonomous driving control system One of the core tasks of an autonomous driving system is precise longitudinal speed following, and the accuracy of longitudinal speed following control directly affects the safety and driving experience of autonomous vehicles. Traditional PID controllers have poor adaptability in complex environments and unstable performance at high speeds or in complex road conditions. Through the optimization method of the present invention, the parameters (K p 、K i 、K d ) of the PID controller can be dynamically optimized according to the real-time environment to ensure that the vehicle can stably and accurately follow the predetermined speed.
[0027] Specific application method: The present invention provides a PID parameter adjustment method based on a GA+PSO hybrid optimization algorithm, which can optimize the controller parameters in real time in an autonomous driving control system, thereby improving the longitudinal speed following accuracy of autonomous vehicles in various complex scenarios such as highways, roads, and urban streets. Through this method, the vehicle can maintain a stable longitudinal speed under different driving conditions (such as sudden acceleration, deceleration, or driving on a slope), improving safety and driving comfort.
[0028] 2. Vehicle Navigation and Positioning System Accurate longitudinal speed following control is crucial for the stability and reliability of the vehicle navigation and positioning system. Traditional vehicle navigation systems rely on positioning technologies such as GPS and inertial measurement units (IMUs), but these technologies perform poorly in occluded areas such as urban high-rise buildings and tunnels. The PID control optimization method provided by the present invention can combine the longitudinal speed following and position calibration of the vehicle in the navigation system. By optimizing the dynamic response of the controller, the vehicle can achieve accurate longitudinal trajectory control in different road environments.
[0029] Specific application method: The present invention can be used as a longitudinal speed control module in the vehicle navigation system to optimize the longitudinal control process of the vehicle (such as speed, acceleration, etc.), ensuring that the vehicle can maintain a stable longitudinal speed in complex environments (such as tunnels and high-rise building areas), and improving the reliability and stability of the navigation system in occluded areas.
[0030] 3. Intelligent Vehicle System and Advanced Driver Assistance System (ADAS) Advanced Driver Assistance Systems (ADAS) greatly enhance the driving experience and safety by providing functions such as automatic parking, lane keeping, and adaptive cruise control. Longitudinal speed following control is one of the basic technologies in these systems. By optimizing the longitudinal speed following control, the ADAS system can provide more accurate control effects in different driving environments.
[0031] Specific application method: The present invention can be used as a longitudinal speed following control module in the ADAS system to optimize the parameters of the controller and improve the adaptive ability of the vehicle in complex road environments. In functions such as automatic parking, lane keeping, and adaptive cruise control, the optimized PID controller can ensure accurate longitudinal speed maintenance under various driving conditions (such as congested traffic, highways, etc.), providing a smoother, more comfortable, and safer driving experience. Brief Description of the Drawings
[0032] Figure 1 It is a graph showing the change trend between the fitness and the number of iterations of the method in Example 1 under different working conditions; Figure 2The speed tracking effect diagram of the PID controller optimized by the genetic algorithm and particle swarm algorithm (GA-PSO-PID) and the PID controller of Embodiment 1 compared with the traditional PID controller under the constant speed working condition; Figure 3 It is the tracking performance diagram of the PID controller optimized by the genetic algorithm and particle swarm algorithm (GA-PSO-PID) and the PID controller of Embodiment 1 compared with the traditional PID controller under the variable speed working condition. Specific implementation manners
[0033] The present invention will be specifically described below with reference to the accompanying drawings and embodiments. Embodiment 1
[0034] A vehicle longitudinal speed following control method in this embodiment includes the following steps: A. PID controller design: The longitudinal path tracking control adopts a PID controller, and its output control quantity is the throttle and brake; the output of the PID controller adjusts the longitudinal control input of the vehicle based on the longitudinal speed tracking error; The output formula of the PID controller is: (1) where e(t) is the longitudinal error, which can be represented by the difference between the actual vehicle speed and the target vehicle speed: e(t)=v target (t)-v actual (t), v target (t) is the target vehicle speed, v actual (t) is the actual vehicle speed;, K p, K i and K d are the proportional, integral and differential gains respectively; B. Optimize K p, K i and K d based on the genetic algorithm GA and the particle swarm optimization algorithm PSO. In the genetic algorithm GA, the chromosome of each individual is represented by the binary encoding of K p , K i and K d ; in the particle swarm optimization algorithm PSO, the position of each particle is represented by the real values of K p , K i and K d ; Initialize multiple populations GA and particle swarm PSO; Through fitness calculation, select the optimal particle; After continuous iteration until the change in the fitness value is less than the preset threshold, obtain the optimal K p, K i and K d parameters; Optimize K based on the genetic algorithm GA and the particle swarm optimization algorithm PSO p 、K i and K d The optimization process is as follows: a. Based on the preset ranges of K p 、K i and K d Randomly form multiple initial populations, each population contains multiple particles, and each particle is composed of the values of K p 、K i and K d In the genetic algorithm, the K p 、K i and K d of each individual needs to be encoded; after calculating the fitness value of each particle, the particles in each population are sorted according to the fitness value and divided into 50% of the particles with higher fitness and 50% of the particles with lower fitness; The preset ranges of K p 、K i and K d are respectively: K p ∈[0, 20], K i ∈[0, 1], K d ∈[0.01, 5], and these ranges are all converted into actual parameters through binary encoding in the genetic algorithm (GA).
[0035] The number of particles in each initial population is 20.
[0036] The binary encoding length of each particle is 30 bits, and the lengths of K p 、K i and K d are respectively 10 bits.
[0037] b. Perform the following operations on each divided initial population: Particle swarm optimization algorithm PSO optimization: For 50% of the particles with higher fitness, update their velocities and positions, and the updated particles directly enter the next generation population; Genetic algorithm GA optimization: For 50% of the particles with lower fitness, perform crossover and mutation operations to generate new offspring individuals, and replace the original 50% of the particles with lower fitness with the newly generated offspring individuals; Merge the particles optimized by the particle swarm optimization algorithm PSO and the particles optimized by the genetic algorithm GA to form a new generation population; c. Calculate the fitness value of each particle in each new generation population, and obtain the particles with the optimal fitness value in each new generation population to form the next generation population; d. Repeat the above steps until the change in the fitness value is less than the preset threshold. In this embodiment, the preset threshold is 0.01, and the optimal K is obtained. p , K i and K d parameters.
[0038] In step b, the formula for updating the particle velocity in the particle swarm optimization algorithm PSO is: (2) (3) where v i (t) is the particle velocity, x i (t) is the particle position, pbest i and gbest i are the individual best and global best positions respectively, c1 and c2 are learning factors, r1 and r2 are random numbers, is the inertia weight.
[0039] The inertia weight is updated using a linear decreasing strategy, and its formula is: *t (4) where w max and w min are the maximum and minimum values of the inertia weight respectively, and t max is the maximum number of iterations.
[0040] In step c, the formula for calculating the fitness value of each particle in each new generation of the population is: (5) where, and are the weight coefficients; ITAE is the integral time absolute error, ; Jerk is the longitudinal acceleration change rate .
[0041] C. Input the optimal K p, K i and K d parameters into the output formula of the PID controller. Based on this output formula, calculate the longitudinal driving force F long , and adjust the longitudinal acceleration a x and speed v x of the vehicle according to the new control input of the longitudinal target speed, and at the same time continue the iterative calculation in step B to adjust the output of the PID controller in real time to ensure the best longitudinal control effect of the vehicle during the path tracking process. Embodiment 2
[0042] Based on the existing technology simulation model, such as the model recorded in Qingliu Jun's blog: https: / / blog.51cto.com / u_16954161 / 12101078 https: / / blog.51cto.com / u_16954161 / 12209949 Based on the above model, the method of Example 1 is used for simulation operation, and the specific results are as follows: Figure 1 For the change trend diagram between fitness and iteration times under different working conditions using the method of Example 1, it reflects the iteration times to reach the optimal parameters and is presented based on the change trend of fitness and iteration times. Among them, (a) and (b) respectively show the change trends between fitness and iteration times under constant speed and variable speed working conditions. From Figure 1 it can be observed from (a) that under the constant speed working condition, when the initial speed of the algorithm is inconsistent with the reference speed, it approaches the optimal solution after 6 iterations. From Figure 1 it can be observed from (b) that under the variable speed working condition, the initial speed is consistent with the reference speed, and the algorithm approaches the optimal solution after 4 iterations. Under both working conditions, the genetic algorithm can achieve convergence within a small number of iterations, fully demonstrating the efficient optimization performance of the algorithm.
[0043] Figure 2 For the speed tracking effect diagrams of the PID controller optimized by the genetic algorithm and the particle swarm algorithm (GA-PSO-PID) and the PID controller of Example 1 compared with the traditional PID controller under the constant speed working condition, where (a) is the constant vehicle speed tracking diagram and (b) is the constant vehicle speed error diagram.
[0044] Figure 2 The set parameters are as follows: Under the constant speed working condition, the expected vehicle speed is set to 20 m / s, the initial speed of the Carsim vehicle model is set to 0, and the PID parameters adjusted manually are taken as K p = 2, K i = 0.5, K d = 1; The GA-PID parameters are K p = 3, K i = 0.5, K d = 3; The GA-PSO-PID parameters are K p = 3.5, K i = 0.2, K d = 2.5.
[0045] As Figure 2As shown in (a), the PID controller optimized based on genetic algorithm and particle swarm algorithm (GA-PSO-PID) tracks the desired vehicle speed at 3.5 s. The PID controller based on genetic algorithm and particle swarm optimization (GA-PSO-PID) in Embodiment 1 completes speed tracking within 2.5 s, and then travels stably at the desired vehicle speed; while the traditional PID controller tracks the desired vehicle speed at 5 s. It can be seen that the GA-PID controller can track the desired vehicle speed faster. Compared with the traditional PID control, the response time is improved by 30%; the GA-PSO-PID controller in Embodiment 1 is further optimized, and the response time is improved by about 50%. At the same time, from Figure 2 As shown in (b), compared with the classical PID control, the steady-state errors of GA-PID and GA-PSO-PID controls are smaller after reaching the desired vehicle speed. Among them, the steady-state error of GA-PSO-PID is the lowest, and the tracking process is smoother. The optimized controller not only improves the tracking speed but also significantly improves the tracking accuracy.
[0046] Figure 3 It is a tracking performance diagram of the PID controller optimized by genetic algorithm and particle swarm algorithm (GA-PSO-PID) and the PID controller in Embodiment 1 compared with the traditional PID controller under variable speed conditions. Among them, (a), (b) and (c) are the speed tracking diagram, speed error diagram and acceleration diagram under variable speed conditions respectively. The variable speed conditions of (a), (b) and (c) are as follows: at the beginning, the speed accelerates from 0 to 30 m / s within 10 s, travels at a constant speed for 5 s and then decelerates to 10 m / s, and then maintains a constant speed motion process. The PID parameters are manually adjusted to take K p = 10, K i = 0.2, K d = 1; the GA-PID parameters are K p = 11, K i = 0.5, K d = 2.5; the GA-PSO-PID parameters are K p = 12.5, K i = 0.1, K d = 2.
[0047] From Figure 3 As shown in (a), under a single speed condition, both the GA-PID and the GA-PSO-PID controller in Embodiment 1 can track the desired vehicle speed well. When the speed switches from one condition to another, compared with the single PID controller, the GA-PID and the GA-PSO-PID controller of this design follow the speed more smoothly. From Figure 3(b) It can be seen that during the entire speed following process, the maximum speed tracking error of a single PID controller exceeds 0.6 m / s, the speed tracking deviation of the GA-PID controller is controlled within 0.4 m / s, and the speed tracking deviation of the GA-PSO-PID controller in Embodiment 1 is controlled within 0.2 m / s. The GA-PSO-PID controller in Embodiment 1 reduces by 50% compared with the GA-PID controller and reduces the maximum speed error by 66.67% compared with the single PID controller, indicating that the optimized controller has higher tracking accuracy. From Figure 3 (c) It can be seen that the GA-PID and the GA-PSO-PID controller in Embodiment 1 can track the desired acceleration faster, and the acceleration curve changes more smoothly. In particular, the GA-PSO-PID in Embodiment 1 shows better smoothness during the entire acceleration and deceleration process, improving the comfort and stability of vehicle operation. Generally speaking, under both constant-speed and variable-speed conditions, the optimized controller can significantly reduce errors and shows a smoother dynamic response during the vehicle acceleration and deceleration process.
[0048] The above description is a detailed description of the preferred and feasible embodiments of the present invention, but the embodiments are not intended to limit the scope of the patent application of the present invention. Any equivalent changes or modifications made under the technical spirit disclosed by the present invention shall fall within the scope of the patent covered by the present invention.
Claims
1. A vehicle longitudinal speed following control method, characterized in that: The steps include: A. PID controller design: The longitudinal path tracking control uses a PID controller, whose output control quantities are the accelerator and brake. The output of the PID controller adjusts the longitudinal control input of the vehicle based on the longitudinal velocity tracking error. The output formula of the PID controller is: (1) Where e(t) is the longitudinal error, which can be expressed as the difference between the actual vehicle speed and the target vehicle speed: e(t)=v target (t)-v actual (t), v target (t) is the target vehicle speed, v actual (t) is the actual vehicle speed; K p, K i and K d They are proportional, integral and derivative gains respectively; B. Based on genetic algorithm GA and particle swarm optimization algorithm PSO p, K i and K d To optimize, in the genetic algorithm GA, the chromosome of each individual is composed of K p , K i and K d In the particle swarm optimization algorithm PSO, the position of each particle is represented by K p , K i and K d The real value representation; initialize multiple populations GA and particle swarm PSO; select the best particle through fitness calculation; after continuous iteration, until the change of fitness value is less than the preset threshold, the optimal K is obtained. p, K i and K d parameter; C. The optimal K p, K i and K d The parameter input PID controller output formula, based on which the longitudinal driving force F is calculated long , and adjust the vehicle's longitudinal acceleration a according to the new control input longitudinal target speed x and speed v x , and continue the iterative calculation of step B to adjust the output of the PID controller to ensure that the vehicle can achieve the best longitudinal control effect during the path tracking process.
2. The vehicle longitudinal speed following control method according to claim 1, characterized in that: In the step B, the genetic algorithm GA and the particle swarm optimization algorithm PSO are used to optimize K p , K i and K d The optimization process is as follows: a. Based on the preset K p , K i and K d range, randomly form multiple initial populations, each population contains multiple particles, each particle consists of K p , K i and K d The value of each individual is composed of p , K i and K d To encode and represent; after calculating the fitness value of each particle, sort the particles in each population according to the fitness value, dividing them into 50% particles with higher fitness and 50% particles with lower fitness; b. Perform the following operations on each initial population after division: Particle swarm optimization algorithm PSO optimization: For 50% of particles with higher fitness, their speed and position are updated, and the updated particles directly enter the next generation population; Genetic algorithm GA optimization: For the 50% particles with lower fitness, crossover and mutation operations are performed to generate new offspring individuals, and the newly generated offspring individuals are used to replace the original 50% particles with lower fitness; Merge the particles optimized by the particle swarm optimization algorithm PSO and the particles optimized by the genetic algorithm GA to form a new generation of population; c. Calculate the fitness value of each particle in each new generation population, and obtain the particles with the best fitness value in each new generation population to form the next generation population; d. Repeat the above steps until the change in fitness value is less than the preset threshold, and the optimal K is obtained. p , K i and K d parameter.
3. The vehicle longitudinal speed following control method according to claim 2, characterized in that: In the step b, the formula for updating the particle velocity in the particle swarm optimization algorithm PSO optimization is: (2) (3) Among them, v i (t) is the particle velocity, x i (t) is the particle position, pbest i and gbest i are the individual optimal and global optimal positions respectively, c1 and c2 are learning factors, r1 and r2 are random numbers, is the inertia weight.
4. The vehicle longitudinal speed following control method according to claim 3, characterized in that: The inertia weight The linear decreasing strategy is used for updating, and the formula is: *t (4) Among them, w max and w min are the maximum and minimum values of the inertia weight, t max is the maximum number of iterations.
5. The vehicle longitudinal speed following control method according to claim 2, characterized in that: In the step c, the formula for calculating the fitness value of each particle in each new generation population is: (5) in, and is the weight coefficient; ITAE is the absolute error of the integral time, ; Jerk is the rate of change of longitudinal acceleration .
6. The vehicle longitudinal speed following control method according to claim 2, characterized in that: In the step a, the preset K p , K i and K d The ranges are: K p ∈[0,20],K i ∈[0,1], K d ∈[0.01,5], these ranges can be converted into actual parameters through binary coding and real number coding.
7. The vehicle longitudinal speed following control method according to claim 2, characterized in that: In the step a, the initial population size of the genetic algorithm is 20, and the initial number of particles of the particle swarm optimization algorithm is 20.
8. The vehicle longitudinal speed following control method according to claim 7, characterized in that: In the genetic algorithm, the binary code length of each individual is 30 bits, where K p , K i and K d The length of each is 10 bits, and is converted into the actual parameter value through linear mapping, that is, , 4.99; In the particle swarm optimization algorithm, the position of each particle is determined by K p , K i and K d The real number representation of .