Data processing method and system based on improved particle swarm optimization and applied to automatic driving longitudinal control
By improving the particle swarm algorithm and Newtonian mechanics force balance method, and optimizing the parameters of the PID controller, the shortcomings in accuracy and efficiency of the traditional autonomous driving control method are solved, and the longitudinal control of the vehicle with high accuracy and stability are achieved.
Patent Information
- Application Number
- CN202510259605.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-06
- Publication Date
- 2025-04-25
- Estimated Expiration
- 2045-03-06
AI Technical Summary
The traditional vehicle autonomous driving control method adopts simple control models and fixed parameters, and cannot accurately consider the complex forces during the vehicle driving, resulting in low speed and position control accuracy; at the same time, the traditional parameter optimization method is prone to fall into local optimization problems, resulting in low efficiency and poor performance of controller parameter adjustment.
The data processing method based on the improved particle swarm algorithm is adopted to construct the vehicle longitudinal dynamic motion model through the force balance method of Newtonian mechanics, and the model parameters are optimized; then the improved particle swarm algorithm is applied to the PID controller, and the parameters of the PID controller are optimized, and the current control instructions are obtained to control the real-time acceleration of the vehicle.
It realizes the fast and efficient search of the optimal PID parameter combination, avoids local optimal problems, improves the accuracy and stability of vehicle longitudinal control, expands the control function, and realizes accurate vehicle speed control.
Smart Images

Figure CN119872611A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of vehicle autonomous driving technology, and in particular to a data processing method and system for autonomous driving longitudinal control based on an improved particle swarm algorithm. Background Art
[0002] Traditional vehicle autonomous driving control methods often use relatively simple control models and fixed parameters, which cannot accurately consider the various complex forces acting on the vehicle during driving, and have relatively low accuracy when controlling the vehicle's speed and position. Traditional parameter optimization methods are prone to falling into local optimal problems during the controller parameter optimization process, resulting in inefficient controller parameter adjustment process and poor performance.
[0003] For example, a Chinese patent with authorization announcement number CN108733955B discloses a smart electric vehicle longitudinal motion control system and method, including: designing a reference model that characterizes the longitudinal behavior characteristics of the smart electric vehicle, so that the reference model and the object have the same order; designing a smart electric vehicle longitudinal motion fuzzy optimal feedback controller based on particle swarm optimization, whose task is to determine the expected control torque of the motor according to the expected acceleration according to the fuzzy optimal feedback control strategy; designing a BP neural network identifier for the longitudinal motion of the smart electric vehicle, so that the predicted acceleration can be dynamically output.
[0004] The above patents have the problems raised by this background technology: the use of relatively simple control models and fixed parameters cannot accurately consider the various complex forces during the vehicle's driving process, and the accuracy of vehicle speed and position control is relatively low; traditional parameter optimization methods are prone to fall into local optimal problems during the controller parameter optimization process, resulting in inefficient controller parameter adjustment process and poor performance; in order to solve at least one of the above problems, the present application proposes a data processing method and system based on an improved particle swarm algorithm for autonomous driving longitudinal control. Summary of the invention
[0005] In view of the shortcomings of the prior art, the main purpose of this application is to provide a data processing method and system for autonomous driving longitudinal control based on an improved particle swarm algorithm, which can effectively solve the problems in the background technology. The specific technical solutions of this application are as follows:
[0006] The data processing method for autonomous driving longitudinal control based on the improved particle swarm algorithm includes:
[0007] A vehicle longitudinal dynamics motion model is obtained based on a force balance method of Newtonian mechanics, wherein model parameters of the vehicle longitudinal dynamics motion model are optimized according to the real-time state and vehicle parameters of the vehicle;
[0008] According to the longitudinal dynamics motion model of the vehicle and the preset target speed, the improved particle swarm algorithm acts on the PID controller to obtain the current control instruction;
[0009] The current control instruction is used to control the real-time acceleration of the vehicle to perform longitudinal control on the automatic driving of the vehicle.
[0010] Specifically, the force balance method based on Newtonian mechanics obtains a vehicle longitudinal dynamics motion model, wherein the model parameters of the vehicle longitudinal dynamics motion model are optimized according to the real-time state and vehicle parameters of the vehicle, including:
[0011] According to the real-time status of the vehicle, analyze the force of the vehicle and obtain the total external force of the vehicle;
[0012] The resultant external force is combined with the acceleration of the vehicle to obtain a longitudinal dynamic motion model of the vehicle.
[0013] Specifically, the method of obtaining the current control instruction by acting on the PID controller based on the improved particle swarm algorithm according to the longitudinal dynamics motion model of the vehicle and the preset target speed includes:
[0014] According to the vehicle longitudinal dynamics motion model, the initial PID controller is constructed;
[0015] Perform chaos mapping on the inertia weight in the particle swarm algorithm and construct nonlinear inertia weight;
[0016] The particle swarm algorithm is combined with nonlinear inertia weight to obtain an improved particle swarm algorithm;
[0017] Based on the improved particle swarm algorithm, the initial PID controller is optimized according to the preset target speed to obtain the PID controller;
[0018] According to the real-time speed of the vehicle, the current control instruction of the PID controller is obtained.
[0019] Specifically, the inertia weight in the particle swarm algorithm is subjected to chaotic mapping to construct a nonlinear inertia weight, including:
[0020] Initialize the chaotic variables according to the preset chaotic mapping function;
[0021] According to the mapping relationship between the chaotic variables and the inertia weights, a mapping formula is constructed;
[0022] In each calculation process of the particle swarm algorithm, an updated chaotic variable is obtained according to the chaotic mapping function;
[0023] According to the updated chaotic variables and the mapping formula, the updated inertia weight is calculated to obtain the nonlinear inertia weight.
[0024] Specifically, the improved particle swarm algorithm is used to optimize the initial PID controller according to the preset target speed to obtain the PID controller, including:
[0025] Calculate the speed difference according to the real-time speed of the vehicle and the preset target speed;
[0026] Construct the objective function according to the longitudinal control requirements of the vehicle;
[0027] According to the speed difference and the objective function, based on the improved particle swarm algorithm, multiple parameter change values of the initial PID controller are calculated;
[0028] The multiple parameter change values are superimposed on the corresponding initial PID controller parameters to obtain a PID controller.
[0029] Specifically, the using the current control instruction to control the real-time acceleration of the vehicle to perform longitudinal control on the automatic driving of the vehicle includes:
[0030] Using the current control instruction, the acceleration of the vehicle is controlled according to the preset position of the vehicle to obtain an acceleration control instruction;
[0031] According to the acceleration control instruction, the throttle or brake of the vehicle is controlled to perform longitudinal control on the automatic driving of the vehicle.
[0032] Specifically, the use of the current control instruction to control the acceleration of the vehicle according to the preset position of the vehicle to obtain the acceleration control instruction includes:
[0033] According to the preset moving trajectory, the desired speed of the vehicle is calculated through the position controller in the PID controller;
[0034] According to the desired speed and the real-time speed of the vehicle, an acceleration control instruction is obtained through a speed controller in a PID controller.
[0035] Specifically, the method of calculating the expected speed of the vehicle according to the preset moving trajectory through the position controller in the PID controller includes:
[0036] According to the preset moving trajectory, the target position sequence of the vehicle is obtained;
[0037] According to the target position sequence and the real-time position of the vehicle, the desired speed corresponding to each target position is obtained through the position controller in the PID controller.
[0038] Specifically, obtaining the acceleration control instruction through the speed controller in the PID controller according to the expected speed and the real-time speed of the vehicle includes:
[0039] Calculate the speed error based on the expected speed and the real-time speed of the vehicle;
[0040] According to the speed error, a speed control amount is obtained through a speed controller in a PID controller;
[0041] An acceleration control instruction is generated according to the speed control amount.
[0042] A data processing system for autonomous driving longitudinal control based on an improved particle swarm algorithm, used to implement the data processing method for autonomous driving longitudinal control based on an improved particle swarm algorithm, comprising:
[0043] A vehicle model building module, which obtains a vehicle longitudinal dynamics motion model based on a force balance method of Newtonian mechanics, wherein model parameters of the vehicle longitudinal dynamics motion model are optimized according to the real-time state and vehicle parameters of the vehicle;
[0044] A controller building module, which acts on the PID controller based on the improved particle swarm algorithm according to the longitudinal dynamics motion model of the vehicle and the preset target speed to obtain the current control instruction;
[0045] The vehicle control module uses the current control instruction to control the real-time acceleration of the vehicle to perform longitudinal control on the automatic driving of the vehicle.
[0046] Compared with the prior art, this application has the following beneficial effects:
[0047] This application is based on the vehicle longitudinal dynamics motion model and combines the improved particle swarm algorithm to optimize the parameters of the PID controller, which can quickly and effectively search for the optimal PID parameter combination and solve the problems of low efficiency and poor performance of the traditional particle swarm optimization algorithm in the parameter adjustment process; compared with the traditional particle swarm algorithm, the improved particle swarm algorithm improves the global search and local search capabilities and can effectively avoid falling into the problem of local optimality; based on the optimized PID controller, the position and speed of the vehicle's longitudinal motion are hierarchically controlled, which expands the control function and realizes precise vehicle speed control. BRIEF DESCRIPTION OF THE DRAWINGS
[0048] Figure 1 This is a workflow diagram of a data processing method for autonomous driving longitudinal control based on an improved particle swarm algorithm in Example 1 of the present application;
[0049] Figure 2 A schematic diagram of the vehicle force analysis in Example 1 of the present application;
[0050] Figure 3 A workflow diagram for constructing the nonlinear inertia weight in Example 1 of the present application;
[0051] Figure 4 This is a workflow diagram of the PID controller optimization process in Example 1 of the present application;
[0052] Figure 5 This is a flowchart of the control process of the PID controller in Example 1 of the present application;
[0053] Figure 6 This is a structural diagram of a data processing system for longitudinal control of autonomous driving based on an improved particle swarm algorithm in Example 2 of the present application. DETAILED DESCRIPTION
[0054] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the specific implementation methods of the present invention are described in detail below in conjunction with the accompanying drawings.
[0055] In the following description, many specific details are set forth to facilitate a full understanding of the present invention, but the present invention may also be implemented in other ways different from those described herein, and those skilled in the art may make similar generalizations without violating the connotation of the present invention. Therefore, the present invention is not limited to the specific embodiments disclosed below.
[0056] Secondly, the term "one embodiment" or "embodiment" as used herein refers to a specific feature, structure, or characteristic that may be included in at least one implementation of the present invention. The term "in one embodiment" that appears in different places in this specification does not necessarily refer to the same embodiment, nor does it refer to a separate or selective embodiment that is mutually exclusive with other embodiments.
[0057] Example 1
[0058] This embodiment provides a data processing method for autonomous driving longitudinal control based on an improved particle swarm algorithm. Figure 1 , the data processing method for autonomous driving longitudinal control based on the improved particle swarm algorithm comprises:
[0059] S101, obtaining a longitudinal dynamics motion model of the vehicle based on a force balance method of Newtonian mechanics, wherein model parameters of the longitudinal dynamics motion model of the vehicle are optimized according to a real-time state and vehicle parameters of the vehicle;
[0060] S102, according to the longitudinal dynamics motion model of the vehicle and the preset target speed, based on the improved particle swarm algorithm acting on the PID controller, to obtain the current control instruction;
[0061] S103. Using the current control instruction to control the real-time acceleration of the vehicle, so as to perform longitudinal control on the automatic driving of the vehicle.
[0062] In order to solve the problems of low parameter adjustment efficiency and poor performance of traditional PID controllers in the process of vehicle autonomous driving longitudinal control, and the problem that the classic particle swarm algorithm is prone to fall into local optimality when optimizing PID controller parameters, the present application proposes a data processing method for autonomous driving longitudinal control based on an improved particle swarm algorithm. By improving the classic particle swarm algorithm, the algorithm can be effectively prevented from falling into local optimality and the search capability of the algorithm can be improved. The PID controller is optimized based on the improved particle swarm algorithm to achieve longitudinal control of the vehicle motion, which can improve the accuracy and stability of the vehicle longitudinal control.
[0063] In this embodiment, the longitudinal motion of the vehicle is determined by the resultant force acting on the vehicle. During the motion of the vehicle, multiple forces such as tire force, aerodynamic force, rolling resistance, etc. are exerted together. By using Newton's second law to analyze the force conditions of the vehicle, a dynamic model of the longitudinal motion of the vehicle can be constructed. By constructing the longitudinal dynamic motion model of the vehicle, the motion characteristics of the vehicle under different driving conditions can be reflected, providing a basis for the longitudinal control of the vehicle.
[0064] Specifically, the longitudinal motion of the vehicle is controlled by a PID controller, the speed is controlled by controlling the system error, and the parameters of the PID controller are optimized by combining with an improved particle swarm algorithm. The optimal solution is continuously iterated to obtain the optimal PID parameter combination. Compared with the traditional parameter setting method, the improved particle swarm algorithm can search for the optimal PID parameter combination more quickly and effectively, and avoid falling into the local optimal solution, thereby improving the robustness of the algorithm. Based on the optimal PID parameter combination, an optimized PID controller is obtained. The PID controller outputs a control amount according to the error between the real-time speed of the vehicle and the preset target speed through the calculation of the proportional, integral, and differential links, and controls the acceleration of the vehicle, thereby controlling the real-time speed of the vehicle. For example, when the vehicle speed is lower than the preset target speed, the PID controller outputs a positive control amount to accelerate the vehicle; when the vehicle speed is higher than the preset target speed, a negative control amount is output to decelerate the vehicle. The hierarchical control of the longitudinal motion of the vehicle can further expand the control function, realize accurate vehicle speed control, enable the vehicle to travel at the preset target speed, and improve the comfort and safety of automatic driving.
[0065] This application is based on the vehicle longitudinal dynamics motion model and combines the improved particle swarm algorithm to optimize the parameters of the PID controller, which can quickly and effectively search for the optimal PID parameter combination and solve the problems of low efficiency and poor performance of the traditional particle swarm optimization algorithm in the parameter adjustment process; compared with the traditional particle swarm algorithm, the improved particle swarm algorithm improves the global search and local search capabilities and can effectively avoid falling into the problem of local optimality; based on the optimized PID controller, the position and speed of the vehicle's longitudinal motion are hierarchically controlled, which expands the control function and realizes precise vehicle speed control.
[0066] Furthermore, the vehicle longitudinal dynamics motion model is obtained according to the real-time state of the vehicle, including:
[0067] S201, analyzing the force applied to the vehicle according to the real-time state of the vehicle to obtain the resultant external force of the vehicle;
[0068] S202: Combine the resultant external force with the acceleration of the vehicle to obtain a longitudinal dynamic motion model of the vehicle.
[0069] In this embodiment, if Figure 2 According to the longitudinal control target of this application, the lateral and vertical movements of the vehicle are ignored, and only the longitudinal movement of the vehicle is considered. According to the real-time state of the vehicle, including the real-time speed, mass, tire force, rolling resistance and other state parameters of the vehicle, the force condition of the vehicle is analyzed by Newton's second law, and the longitudinal force balance equation of the vehicle is obtained:
[0070] F t =F f +F w +F j +F b ;
[0071] In the formula, F t Indicates the vehicle driving force, F b Indicates the vehicle braking force (the force generated when the vehicle brakes), F j Indicates the acceleration resistance, F w Indicates the air resistance generated by the vehicle during driving, F f Represents the rolling resistance of the vehicle during driving. Combining the force balance equation with the real-time state parameters of the vehicle, the vehicle longitudinal dynamics motion model can be obtained:
[0072]
[0073] Where a represents the acceleration of the vehicle, m represents the mass of the vehicle, T0 represents the vehicle engine torque, i0 represents the transmission ratio of the engine main reducer, η t represents the transmission power transmission efficiency, R represents the wheel radius, k bIndicates the brake pressure proportionality coefficient, p b represents the brake pressure, g represents the acceleration of gravity, f represents the rolling resistance coefficient, θ represents the slope angle, C D represents the air resistance coefficient, A represents the frontal area of the vehicle, ρ represents the air density, and u represents the relative speed of the vehicle. The vehicle longitudinal dynamics motion model can accurately describe the longitudinal motion state of the vehicle and accurately reflect the motion characteristics of the vehicle under different driving conditions, providing a solid theoretical basis for the subsequent control strategy formulation and improving the accuracy and stability of control.
[0074] Furthermore, the current control instruction of the PID controller is obtained based on the improved particle swarm algorithm according to the longitudinal dynamics motion model of the vehicle and the preset target speed, including:
[0075] S301, constructing an initial PID controller according to a longitudinal dynamics motion model of the vehicle;
[0076] S302, performing chaos mapping on the inertia weight in the particle swarm algorithm to construct a nonlinear inertia weight;
[0077] S303, combining the particle swarm algorithm with nonlinear inertia weight to obtain an improved particle swarm algorithm;
[0078] S304, based on the improved particle swarm algorithm, optimizing the initial PID controller according to the preset target speed to obtain a PID controller;
[0079] S305: Obtain the current control instruction of the PID controller according to the real-time speed of the vehicle.
[0080] In this embodiment, the motion characteristics of the vehicle can be obtained according to the longitudinal dynamics motion model of the vehicle. In combination with the motion characteristics of the vehicle, an initial PID controller is set, and the parameter values of the initial proportional coefficient, initial integral coefficient and initial differential coefficient of the initial PID controller are set to construct an initial PID controller and provide a basic controller framework. In the particle swarm algorithm, the inertia weight determines the degree to which the particle inherits the previous speed when updating the speed. In the embodiment of the present application, the inertia weight in the particle swarm algorithm is subjected to chaotic mapping, and a nonlinear inertia weight can be obtained to make the inertia weight change dynamically. In the traditional particle swarm algorithm, the inertia weight is a fixed value, which makes it difficult for the algorithm to balance the global search and local search capabilities during the search process, and it is easy to fall into the optimal solution locally. This embodiment utilizes the characteristics of chaotic mapping to make the inertia weight change dynamically, so that the movement of particles in the search space is more random and diverse, thereby improving the global search capability of the particle swarm algorithm and avoiding premature convergence to the local optimal solution.
[0081] Specifically, in the process of optimizing the PID controller parameters, the nonlinear inertia weight calculated in the previous step is used to update the particle velocity, and the particle position is further updated according to the updated particle velocity. In each iteration, the nonlinear inertia weight of the previous step is repeatedly used to update the particle velocity and position. Through the dynamic nonlinear inertia weight, the particle swarm can better balance the global and local search, improve the search efficiency and accuracy, and can more effectively search for the optimal solution, providing the optimal parameter combination for the PID controller.
[0082] Specifically, the performance optimization problem of the PID controller is transformed into an optimal parameter solving problem, and the improved particle swarm algorithm is used to find the optimal PID controller parameters. The proportional coefficient, integral coefficient and differential coefficient of the PID controller are used as the particle positions in the particle swarm algorithm. The performance indicators of the vehicle at the preset target speed (such as speed tracking error, overshoot, stabilization time, etc.) are used as the input of the fitness function. The fitness function is used to evaluate the quality of each group of PID parameters, and the optimal particle position, that is, the optimal PID controller parameter combination, is continuously searched. By optimizing the PID controller through the improved particle swarm optimization algorithm, the parameters of the PID controller can be automatically optimized, a better PID parameter combination can be found, the performance of the controller can be improved, and the accuracy and stability of the vehicle speed control can be improved.
[0083] Furthermore, the method of performing chaotic mapping on the inertia weight in the particle swarm algorithm to construct a nonlinear inertia weight includes:
[0084] S401, initializing chaotic variables according to a preset chaotic mapping function;
[0085] S402, constructing a mapping formula according to the mapping relationship between the chaotic variables and the inertia weights;
[0086] S403, in each calculation process of the particle swarm algorithm, obtaining an updated chaotic variable according to the chaotic mapping function;
[0087] S404: Calculate the updated inertia weight according to the updated chaotic variable and the mapping formula to obtain the nonlinear inertia weight.
[0088] In this embodiment, if Figure 3 , use the preset chaos mapping function to initialize the chaotic variables, specifically use the Logistic chaos mapping function, after the chaotic variables are initialized, it provides a basis for generating chaotic sequences. The specific formula is as follows:
[0089] r(1+t)=-4r(t)(r(t)-1),r(0)≠{0,0.25,0.5,0.75,1}
[0090] ω=r(t)ω min -t(ω max -ω min ) / T max
[0091] In the formula, r(t) is the chaotic variable of the t-th calculation process, r(1+t) is the chaotic variable of the t+1-th calculation process, ω is the inertia weight, ω min and ω max are the minimum and maximum values of the inertia weight, T max For the maximum number of iterations, a chaotic mapping function is used. In each iteration, a new chaotic variable is calculated based on the previous chaotic variable to ensure the continuity of the chaotic mapping. This allows the inertia weight to be affected by the chaotic characteristics throughout the algorithm, avoiding falling into the local optimal solution and enhancing the algorithm's global search capability and efficiency.
[0092] Specifically, the new inertia weight is calculated using the updated chaotic variables and mapping formula. By substituting the updated chaotic variables into the mapping formula, the nonlinear characteristics of the chaotic mapping can be transferred to the inertia weight, so that the inertia weight presents a nonlinear change with the increase of the number of iterations; for example, in the early stage of the particle swarm algorithm, the inertia weight can be large, so that the particles have a larger search step, which is beneficial to the global search; as the algorithm progresses, the inertia weight gradually decreases, and the search step of the particles also decreases, which is beneficial to the local search, thereby achieving a balance between the global search and the local search; through the nonlinear change of the inertia weight, the search behavior of the particle swarm algorithm is optimized, making the search of particles in the search space more intelligent, and improving the probability of finding the global optimal solution.
[0093] Furthermore, the improved particle swarm algorithm is used to optimize the initial PID controller according to the preset target speed to obtain the PID controller, including:
[0094] S501, calculating a speed difference according to the real-time speed of the vehicle and a preset target speed;
[0095] S502, constructing an objective function according to the longitudinal control requirements of the vehicle;
[0096] S503, calculating multiple parameter change values of the initial PID controller based on the speed difference and the objective function and based on the improved particle swarm algorithm;
[0097] S504: Superimpose the multiple parameter change values with corresponding initial PID controller parameters to obtain a PID controller.
[0098] In this embodiment, if Figure 4, according to the deviation between the current real-time speed of the vehicle and the preset target speed, the speed difference is calculated. The speed difference can provide the most direct feedback information for the optimization of the controller, so as to make adjustments according to the actual movement of the vehicle; according to the longitudinal control requirements of the vehicle, reducing the speed error of the PID controller is used as the objective function. The specific formula is as follows:
[0099]
[0100] In the formula, I is the integral absolute error of the PID controller, T is the total driving time of the vehicle, Δv(t) is the speed difference, and the objective function provides a clear optimization goal for the optimization process, so that the improved particle swarm algorithm can evaluate the advantages and disadvantages of different PID controller parameter combinations according to the size of the objective function. Combined with the objective function, the learning factor is introduced to update the particle position and speed of the improved particle swarm algorithm. The update formula is as follows:
[0101]
[0102]
[0103] In the formula, is the particle velocity of the ith particle in the t+1th calculation process, is the particle velocity of the ith particle in the tth calculation process, c1 is the cognitive learning factor, c2 is the social learning factor, r1 and r2 are random values between 0 and 1, and are the individual optimal fitness value and the global optimal fitness value of the ith particle in the tth calculation process, respectively. is the particle position of the ith particle in the t+1th calculation process, is the particle position of the i-th particle in the t-th calculation process, and n is the number of particles. The individual optimal solution and the global optimal solution of the generated particles are continuously updated until the maximum number of iterations is reached, and the optimal solution is obtained. The PID controller parameter change value corresponding to the optimal solution is superimposed with the corresponding initial PID controller parameters to obtain the optimized PID controller, and the PID controller parameters are optimized and adjusted, so that the PID controller can better adapt to the longitudinal control requirements of the vehicle.
[0104] Furthermore, the using the current control instruction to control the real-time acceleration of the vehicle to perform longitudinal control on the automatic driving of the vehicle includes:
[0105] S601, using the current control instruction, controlling the acceleration of the vehicle according to the preset position of the vehicle to obtain an acceleration control instruction;
[0106] S602: According to the acceleration control instruction, control the throttle or brake of the vehicle to perform longitudinal control on the automatic driving of the vehicle.
[0107] In this embodiment, if Figure 5 , the longitudinal motion of the vehicle is controlled according to the PID controller optimized by the improved particle swarm algorithm. The PID controller is divided into a position controller and a speed controller. The position controller and the speed controller are used to control the position and speed of the vehicle respectively to achieve hierarchical control, which can improve the performance and stability of the longitudinal control of the vehicle. The position control layer mainly focuses on the position deviation of the vehicle on the driving path, and provides the target speed for the speed control layer by converting the expected position into the expected speed. The speed control layer uses the PID controller to generate acceleration control instructions according to the deviation between the expected speed and the actual speed to adjust the speed of the vehicle. The hierarchical control decomposes the complex control problem into relatively simple sub-problems, which improves the control accuracy. The position control layer can ensure that the vehicle moves along the expected driving path, and the speed control layer ensures that the vehicle travels at the expected speed. The combination of the two can achieve more accurate longitudinal control of autonomous driving.
[0108] Specifically, the throttle or brake of the vehicle is controlled according to the acceleration control instruction. When the acceleration control instruction is positive, it indicates that acceleration is needed, which is achieved by increasing the throttle opening or increasing the motor torque. When the acceleration control instruction is negative, it indicates that deceleration is needed, which is achieved by applying the brakes. The conversion from control instructions to actual vehicle actions is realized, so that the vehicle can make actual speed adjustments according to the output of the control algorithm, complete the longitudinal control of automatic driving, ensure the rationality and safety of the control action, avoid unreasonable acceleration or braking operations, and improve the reliability and comfort of automatic driving.
[0109] Further, the use of the current control instruction to control the acceleration of the vehicle according to the preset position of the vehicle to obtain the acceleration control instruction includes:
[0110] S701, calculating the expected speed of the vehicle through the position controller in the PID controller according to the preset moving trajectory;
[0111] S702: Obtain an acceleration control instruction through a speed controller in a PID controller according to the expected speed and the real-time speed of the vehicle.
[0112] In this embodiment, in the longitudinal control of the vehicle's automatic driving, the vehicle needs to travel along a preset moving trajectory. The position controller can adjust the vehicle's desired speed according to the deviation between the vehicle's current position and the preset moving trajectory. When the vehicle deviates from the preset trajectory, the desired speed is adjusted to guide the vehicle back to the correct trajectory. The position controller in the PID controller is adjusted according to the position deviation. Based on the combination of proportional, integral and differential parts, the proportional part directly affects the adjustment amount of the desired speed according to the size of the current position deviation, so that the vehicle can respond quickly to the position deviation; the integral part accumulates the position deviation to ensure that the steady-state position deviation is eventually eliminated; the differential part considers the rate of change of the position deviation, predicts the development trend of the deviation in advance, and prevents excessive adjustment; adjusting the vehicle's desired speed through the position controller can help the vehicle better track the preset moving trajectory and ensure the accuracy of the vehicle's driving path.
[0113] Specifically, based on the expected speed of the vehicle, the speed controller is used to generate an acceleration control instruction according to the deviation between the expected speed and the real-time speed of the vehicle to adjust the acceleration or deceleration of the vehicle. The speed controller is also based on the PID control principle. Through proportional, integral and differential links, it comprehensively considers the immediate impact, cumulative impact and change trend of the speed deviation to generate appropriate control instructions. The proportional part outputs the control amount proportionally according to the size of the current speed deviation and responds to the speed deviation quickly; the integral part integrates the speed deviation to eliminate the steady-state speed deviation so that the vehicle is finally stabilized at the expected speed; the differential part adjusts the control amount in advance according to the rate of change of the speed deviation to avoid speed overshoot and ensure the smoothness of the vehicle speed adjustment; the speed controller can accurately control the speed of the vehicle so that the actual speed of the vehicle closely follows the expected speed, ensuring the stability and comfort of the vehicle's driving. By utilizing the characteristics of the PID controller, the speed of the vehicle can be effectively adjusted under different driving conditions, such as different road conditions, different loads, etc., thereby improving the robustness of the vehicle's longitudinal control.
[0114] Furthermore, the method of calculating the desired speed of the vehicle according to the preset moving trajectory through the position controller in the PID controller includes:
[0115] S801, obtaining a target position sequence of the vehicle according to a preset moving trajectory;
[0116] S802: According to the target position sequence and the real-time position of the vehicle, a desired speed corresponding to each target position is obtained by a position controller in a PID controller.
[0117] In this embodiment, the preset moving trajectory is the path that the vehicle should follow, which is composed of a series of discrete target position points. By obtaining the target position sequence of the vehicle at each moment, the vehicle can plan its driving path to ensure that it travels along the predetermined route; the discrete points are used as the target position sequence, and these points are set at different distance intervals. For example, on a long straight road in a mine, a target point is set every 1 meter to ensure that the vehicle travels along the predetermined route; by setting the target position, a clear path is provided for the vehicle's travel, which can effectively avoid path deviation during vehicle travel.
[0118] Specifically, the position controller calculates the desired speed based on the deviation between the vehicle's real-time position and the target position sequence, and converts the position deviation into the adjustment amount of the desired speed. The proportional part in the PID controller directly affects the adjustment amount of the desired speed according to the size of the current position deviation, so that the vehicle can respond quickly to the position deviation; the integral part accumulates the position deviation, eliminates the steady-state position deviation, and ensures that the vehicle eventually reaches the target position; the differential part considers the rate of change of the position deviation, predicts the development trend of the deviation in advance, avoids excessive speed adjustment of the vehicle, and makes the vehicle travel more smoothly; the desired speed of the vehicle is dynamically adjusted according to the position deviation to ensure that the vehicle can travel along the preset moving trajectory, thereby improving the accuracy of path tracking.
[0119] Further, the acceleration control instruction is obtained by a speed controller in a PID controller according to the expected speed and the real-time speed of the vehicle, including:
[0120] S901, calculating a speed error according to a desired speed and a real-time speed of the vehicle;
[0121] S902, obtaining a speed control amount through a speed controller in a PID controller according to the speed error;
[0122] S903: Generate an acceleration control instruction according to the speed control amount.
[0123] In this embodiment, the speed error of the vehicle is calculated according to the expected speed and the real-time speed of the vehicle. According to the speed error to the vehicle speed, it can be determined whether the vehicle needs to accelerate or decelerate, and the degree of acceleration or deceleration. The speed error provides the most direct feedback information for the subsequent speed control, so that the speed controller can be adjusted according to the speed deviation of the vehicle. The speed control formula is as follows:
[0124] err(t)=v * (t)-v 0 (t);
[0125]
[0126] Where err(t) is the velocity error, v * (t) is the expected speed, v 0 (t) is the real-time speed, th(t) is the throttle control input, k p , k i and k d They are the proportional, integral and differential gains of the PID controller, and the vehicle's brakes and throttle are controlled through the throttle control input; the comprehensive use of proportional, integral and differential links can effectively handle different types of speed errors, making the vehicle's speed control more stable and accurate. The control amount can be flexibly adjusted according to the different characteristics of the speed error (size, change trend), thereby improving the vehicle's adaptability to different speed deviations, avoiding speed instability, overshoot and other phenomena in the vehicle, and improving the comfort and safety of autonomous driving; based on the speed control amount, the corresponding acceleration control command is generated. For the vehicle, the acceleration control command can be a specific value of the throttle opening or brake pressure to control the acceleration or deceleration of the vehicle.
[0127] Example 2
[0128] In this embodiment, if Figure 6 , providing a data processing system for autonomous driving longitudinal control based on an improved particle swarm algorithm, for implementing the data processing method for autonomous driving longitudinal control based on an improved particle swarm algorithm, including:
[0129] A vehicle model building module, which obtains a vehicle longitudinal dynamics motion model based on a force balance method of Newtonian mechanics, wherein model parameters of the vehicle longitudinal dynamics motion model are optimized according to the real-time state and vehicle parameters of the vehicle;
[0130] A controller building module, which acts on the PID controller based on the improved particle swarm algorithm according to the longitudinal dynamics motion model of the vehicle and the preset target speed to obtain the current control instruction;
[0131] The vehicle control module uses the current control instruction to control the real-time acceleration of the vehicle to perform longitudinal control on the automatic driving of the vehicle.
[0132] In this embodiment, the vehicle model building module includes a sensor interface, a data processing unit, a parameter storage unit and a dynamic model calculation unit. By collecting various state information of the vehicle in real time, a dynamic model describing the longitudinal motion state of the vehicle is established, which provides a theoretical basis for subsequent controller design and control strategy formulation, and helps to simulate and predict the motion behavior of the vehicle under different working conditions; the controller building module includes an initial PID controller unit, an improved particle swarm algorithm unit and an optimization result output unit. The parameters of the initial PID controller are optimized by the improved particle swarm algorithm, and the nonlinear inertia weight and adaptive learning factor of the chaotic map are introduced to improve the particle swarm algorithm. The improved algorithm can better balance the global search and local search capabilities when searching for the optimal PID parameters, avoid falling into the local optimal solution, and enable the optimized PID controller to better control the longitudinal motion of the vehicle.
[0133] Specifically, the vehicle control module includes a hierarchical control unit, an execution unit and a feedback unit. The optimized PID controller is used to perform hierarchical control on the position and speed of the vehicle. The position control subunit ensures that the vehicle travels along a preset trajectory, and the speed control subunit ensures that the vehicle speed meets the expected speed. The control quantity is converted into specific throttle or brake control instructions to implement acceleration or deceleration operations on the vehicle, ensure the longitudinal control of the vehicle's automatic driving, and implement closed-loop control through the feedback unit, so that the speed and position of the vehicle can be adjusted in real time according to actual conditions, thereby improving the accuracy, stability and reliability of the vehicle's longitudinal control.
[0134] Example 3
[0135] In this embodiment, in a mining environment, the vehicle needs to travel on slopes of different slopes and achieve stable tracking of the vehicle speed. For example, a mining truck transporting ore needs to automatically travel along a predetermined route on a mine road. The road has uphill, downhill and horizontal sections, and the road conditions are relatively complex, with potholes and bumps. The longitudinal control of the vehicle allows the vehicle to travel stably at the set target speed to ensure the safety of the vehicle and transportation efficiency.
[0136] Specifically, after the vehicle is started, it travels along the preset mine transportation route, and each module starts to work. The sensor collects the initial state information of the vehicle, including speed, acceleration, etc. According to the vehicle state and dynamic model, the improved particle swarm algorithm is used to optimize the PID controller parameters. The parameters in the improved particle swarm algorithm are set, and the minimum inertia weight value is set to 0.4, the maximum inertia weight value is set to 0.9, the cognitive learning factor and the social learning factor are both set to 2, the particle speed upper limit value is 6, the particle swarm size is 20, and the maximum number of iterations is 100. The improved particle swarm algorithm is used to obtain the optimal solution, and the optimal solution is applied to the PID controller so that it works together with the PID controller benchmark PID parameter value.
[0137] Specifically, the optimized PID controller is used to control the longitudinal motion of the vehicle, and the vehicle's motion performance is measured. The results show that the PID controller optimized by the improved particle swarm algorithm is superior to the PID controller based on the particle swarm algorithm in tracking the desired signal. In terms of the optimal controller coefficient and the minimum performance index value that the particle swarm algorithm and the improved particle swarm algorithm must provide, the improved particle swarm algorithm effectively improves the performance by 2.5%, and the effectiveness of the improved particle swarm algorithm technology is proved in the comparison of standard requirements such as rise time, settling time, overshoot and steady-state error.
[0138] The above shows and describes the basic principles and main features of the present invention and the advantages of the present invention. It should be understood by those skilled in the art that the present invention is not limited to the above embodiments. The above embodiments and descriptions are only for explaining the principles of the present invention. Without departing from the spirit and scope of the present invention, the present invention may have various changes and improvements, which fall within the scope of the present invention to be protected. The scope of protection of the present invention is defined by the attached claims and their equivalents.
Claims
1. A data processing method for longitudinal control of autonomous driving based on an improved particle swarm algorithm, characterized in that: include: A vehicle longitudinal dynamics motion model is obtained based on a force balance method of Newtonian mechanics, wherein model parameters of the vehicle longitudinal dynamics motion model are optimized according to the real-time state and vehicle parameters of the vehicle; According to the longitudinal dynamics motion model of the vehicle and the preset target speed, the improved particle swarm algorithm acts on the PID controller to obtain the current control instruction; The current control instruction is used to control the real-time acceleration of the vehicle to perform longitudinal control on the automatic driving of the vehicle.
2. The data processing method for autonomous driving longitudinal control based on improved particle swarm algorithm according to claim 1, characterized in that: The force balance method based on Newtonian mechanics obtains a vehicle longitudinal dynamics motion model, wherein the model parameters of the vehicle longitudinal dynamics motion model are optimized according to the real-time state and vehicle parameters of the vehicle, including: According to the real-time status of the vehicle, analyze the force of the vehicle and obtain the total external force of the vehicle; The resultant external force is combined with the acceleration of the vehicle to obtain a longitudinal dynamic motion model of the vehicle.
3. The data processing method for autonomous driving longitudinal control based on improved particle swarm algorithm according to claim 1, characterized in that: The method of obtaining the current control instruction based on the vehicle longitudinal dynamics motion model and the preset target speed and acting on the PID controller based on the improved particle swarm algorithm includes: According to the vehicle longitudinal dynamics motion model, the initial PID controller is constructed; Perform chaos mapping on the inertia weight in the particle swarm algorithm and construct nonlinear inertia weight; The particle swarm algorithm is combined with nonlinear inertia weight to obtain an improved particle swarm algorithm; Based on the improved particle swarm algorithm, the initial PID controller is optimized according to the preset target speed to obtain the PID controller; According to the real-time speed of the vehicle, the current control instruction of the PID controller is obtained.
4. The data processing method for autonomous driving longitudinal control based on improved particle swarm algorithm according to claim 3 is characterized in that: The method of performing chaotic mapping on the inertia weight in the particle swarm algorithm to construct a nonlinear inertia weight includes: Initialize the chaotic variables according to the preset chaotic mapping function; According to the mapping relationship between the chaotic variables and the inertia weights, a mapping formula is constructed; In each calculation process of the particle swarm algorithm, an updated chaotic variable is obtained according to the chaotic mapping function; According to the updated chaotic variables and the mapping formula, the updated inertia weight is calculated to obtain the nonlinear inertia weight.
5. The data processing method for autonomous driving longitudinal control based on improved particle swarm algorithm according to claim 3, characterized in that: The improved particle swarm algorithm is used to optimize the initial PID controller according to the preset target speed to obtain the PID controller, including: Calculate the speed difference according to the real-time speed of the vehicle and the preset target speed; Construct the objective function according to the longitudinal control requirements of the vehicle; According to the speed difference and the objective function, multiple parameter change values of the initial PID controller are calculated based on an improved particle swarm algorithm; The multiple parameter change values are superimposed on the corresponding initial PID controller parameters to obtain a PID controller.
6. The data processing method for autonomous driving longitudinal control based on improved particle swarm algorithm according to claim 1, characterized in that: The method of controlling the real-time acceleration of the vehicle by using the current control instruction to perform longitudinal control on the automatic driving of the vehicle includes: Using the current control instruction, the acceleration of the vehicle is controlled according to the preset position of the vehicle to obtain an acceleration control instruction; According to the acceleration control instruction, the throttle or brake of the vehicle is controlled to perform longitudinal control on the automatic driving of the vehicle.
7. The data processing method for autonomous driving longitudinal control based on improved particle swarm algorithm according to claim 6, characterized in that: The method of using the current control instruction to control the acceleration of the vehicle according to the preset position of the vehicle to obtain the acceleration control instruction includes: According to the preset moving trajectory, the desired speed of the vehicle is calculated through the position controller in the PID controller; According to the desired speed and the real-time speed of the vehicle, an acceleration control instruction is obtained through a speed controller in a PID controller.
8. The data processing method for autonomous driving longitudinal control based on improved particle swarm algorithm according to claim 7, characterized in that: The method of calculating the desired speed of the vehicle according to the preset moving trajectory through the position controller in the PID controller includes: According to the preset moving trajectory, the target position sequence of the vehicle is obtained; According to the target position sequence and the real-time position of the vehicle, the desired speed corresponding to each target position is obtained through the position controller in the PID controller.
9. The data processing method for autonomous driving longitudinal control based on improved particle swarm algorithm according to claim 7, characterized in that: The method of obtaining an acceleration control instruction according to the desired speed and the real-time speed of the vehicle through a speed controller in a PID controller includes: Calculate the speed error based on the expected speed and the real-time speed of the vehicle; According to the speed error, a speed control amount is obtained through a speed controller in a PID controller; An acceleration control instruction is generated according to the speed control amount.
10. A data processing system for autonomous driving longitudinal control based on an improved particle swarm algorithm, characterized in that: A data processing method for realizing longitudinal control of autonomous driving based on an improved particle swarm algorithm as claimed in any one of claims 1 to 9, comprising: A vehicle model building module, which obtains a vehicle longitudinal dynamics motion model based on a force balance method of Newtonian mechanics, wherein model parameters of the vehicle longitudinal dynamics motion model are optimized according to the real-time state and vehicle parameters of the vehicle; A controller building module, which acts on the PID controller based on the improved particle swarm algorithm according to the longitudinal dynamics motion model of the vehicle and the preset target speed to obtain the current control instruction; The vehicle control module uses the current control instruction to control the real-time acceleration of the vehicle to perform longitudinal control on the automatic driving of the vehicle.
Citation Information
Patent Citations
A Smart Electric Vehicle Longitudinal Motion Control System and Method
CN108733955B
Servo motor control method and device
CN108931918A
Parameter self-learning method for electric vehicle driving robot controller
CN109521674A
Method for automatically setting vehicle speed corresponding PID control parameters
CN110588654A
Real-time optimization method and device for a rare earth extraction process and computer readable storage medium
CN113377075A