Disclosure of Invention
An object of the embodiments of the present invention is to provide a method for debugging PID parameters of a vehicle and a vehicle, which are used for solving the technical defects existing in the prior art.
In a first aspect, an embodiment of the present invention provides a method for debugging a PID parameter of a vehicle, including:
acquiring a speed response curve of the speed PID architecture running under each group of speed PID parameters;
selecting a target speed response curve according to a plurality of groups of speed response curves, recording PID parameters corresponding to the target speed response curve as optimal speed PID parameters, and converging the speed errors of the own vehicle speed and the target vehicle speed of the target speed response curve in a speed steady-state error range;
when the speed error converges in a speed steady-state error range, acquiring a distance response curve of the distance PID architecture running under each group of distance PID parameters;
and selecting a target distance response curve according to a plurality of groups of the distance response curves, recording PID parameters corresponding to the target distance response curve as optimal distance PID parameters, and converging the distance errors of the own vehicle distance and the target distance of the target distance response curve in a distance steady-state error range.
Optionally, the acquiring a speed response curve of the speed PID architecture operating at each set of speed PID parameters includes:
configuring the distance PID architecture to output a specified speed compensation value;
the specified speed compensation value and the speed error are used as input, and the speed PID architecture is controlled to run under each group of speed PID parameters so as to adjust the speed of the vehicle;
and generating a speed response curve according to the adjusted speed and the target speed.
Optionally, the specified speed compensation value is 0.
Optionally, the selecting a target speed response curve according to the plurality of sets of speed response curves includes:
determining a speed peak value, a speed peak value response time and a speed stabilizing time of each group of speed response curves;
respectively carrying out normalization processing on each group of the speed peak value, the speed peak value response time and the speed stabilization time to sequentially obtain a first normalization value, a second normalization value and a third normalization value;
calculating a speed weighted sum of the speed response curve according to the first normalization value and the first weight coefficient, the second normalization value and the second weight coefficient and the third normalization value and the third weight coefficient;
a target speed response curve is selected based on a plurality of the speed weighted sums.
Optionally, normalizing each set of the speed peaks to obtain a first normalized value includes:
determining a peak speed difference value between the speed peak and the target vehicle speed and an absolute value of the peak speed difference value;
and carrying out normalization processing on the absolute value of the peak speed difference value according to the hyperbolic tangent function to obtain a first normalization value, wherein the first normalization value and the absolute value of the peak speed difference value are in a negative correlation.
Optionally, said selecting a target speed response curve based on a plurality of said speed weighted sums comprises:
searching a maximum speed weighted sum from a plurality of the speed weighted sums;
and selecting the speed response curve corresponding to the maximum speed weighted sum as a target speed response curve.
Optionally, the acquiring a distance response curve of the distance PID architecture running under each set of distance PID parameters includes:
determining a safety distance, and adding the distance error and the safety distance to obtain a distance input value;
taking the distance input value as input, controlling the distance PID architecture to run under each group of the distance PID parameters so as to enable the distance PID architecture to output a speed compensation value;
the speed compensation value and the speed error are used as input, and the speed PID architecture is controlled to run under the optimal speed PID parameters so as to adjust the distance between the vehicle and the vehicle;
and generating a distance response curve according to the adjusted distance between the vehicle and the target distance.
Optionally, the selecting a target distance response curve according to the plurality of sets of distance response curves includes:
determining a distance peak value, a distance peak value response time and a distance stabilization time of each group of the distance response curves;
respectively carrying out normalization processing on each group of distance peak value, distance peak value response time and distance stabilization time to sequentially obtain a fourth normalization value, a fifth normalization value and a sixth normalization value;
calculating a distance weighted sum of each group of distance response curves according to each group of fourth normalization value and fourth weight coefficient, the fifth normalization value and fifth weight coefficient and the sixth normalization value and sixth weight coefficient;
and selecting a target distance response curve according to a plurality of the distance weighted sums.
Optionally, the selecting a target distance response curve according to a plurality of the distance weighted sums includes:
searching a maximum distance weighted sum from a plurality of distance weighted sums;
and selecting the distance response curve corresponding to the maximum distance weighted sum as a target distance response curve.
In a second aspect, an embodiment of the present invention provides a vehicle including:
at least one processor; the method comprises the steps of,
a memory communicatively coupled to the at least one processor; wherein,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method of debugging the vehicle PID parameters described above.
In the method for debugging the vehicle PID parameters provided by the embodiment of the invention, a speed response curve of the speed PID architecture running under each group of speed PID parameters is obtained, a target speed response curve is selected according to a plurality of groups of speed response curves, PID parameters corresponding to the target speed response curve are recorded as optimal speed PID parameters, the speed error of the own vehicle speed and the target speed of the target speed response curve is converged in a speed steady-state error range, when the speed error is converged in the speed steady-state error range, a distance response curve of the distance PID architecture running under each group of distance PID parameters is obtained, the target distance response curve is selected according to the plurality of groups of distance response curves, and the PID parameters corresponding to the target distance response curve are recorded as optimal distance PID parameters. On the other hand, the embodiment can quantitatively represent the debugging result of the PID architecture under each set of PID parameters according to the speed/distance response curve, which is beneficial to improving the reliability and accuracy of the PID algorithm.
Detailed Description
The present invention will be described in further detail with reference to the drawings and examples, in order to make the objects, technical solutions and advantages of the present invention more apparent. It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of the invention. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
It should be noted that, if not in conflict, the features of the embodiments of the present invention may be combined with each other, which is within the protection scope of the present invention. In addition, while functional block division is performed in a device diagram and logical order is shown in a flowchart, in some cases, the steps shown or described may be performed in a different order than the block division in the device, or in the flowchart. Furthermore, the words "first," "second," "third," and the like as used herein do not limit the order of data and execution, but merely distinguish between identical or similar items that have substantially the same function and effect.
The vehicle provided by the embodiment of the invention can be applicable to any suitable driving scene, such as an unmanned scene or an adaptive cruise scene, etc., wherein the vehicle can be configured with any suitable PID debugging system to execute the debugging method of the PID parameters of the vehicle, which is referred to below.
Referring to fig. 1, the PID debug system 100 is used to debug the speed and distance between the own vehicle 200 and the front vehicle 300. In some embodiments, the PID debug system 100 can debug the own vehicle speed V1 of the own vehicle 200 to be the same as the front vehicle speed V2 of the front vehicle 300. In addition, the PID debug system 100 can debug the own vehicle 200 to maintain a safe distance from the front vehicle 300 all the time when the own vehicle speed V1 is synchronous with the front vehicle speed V2.
Referring to fig. 2, the PID debug system 100 includes a distance PID architecture 11, a velocity PID architecture 12, and an actuator 13.
The distance PID architecture 11 is configured to cause the host vehicle 200 to maintain a safe distance relative to the preceding vehicle 300, where the distance PID architecture 11 takes a distance error Δsw and a safe distance Δsa as inputs, where the distance error Δsw and the safe distance Δsa are added to obtain a distance input value Δsz, the distance PID architecture 11 is input with the distance input value Δsz, and the distance PID architecture 11 outputs a speed compensation value Δvb according to a given distance PID parameter. Wherein the distance error Δsw=s ta -S(t),S ta The target distance S (t) is the own vehicle distance at the time t.
The speed PID architecture 12 is configured to cause the vehicle speed V1 of the vehicle 200 to be the same as the front vehicle speed V2 of the front vehicle 300, wherein the speed PID architecture 12 takes as input a speed compensation value Δvb and a speed error Δvw, wherein the speed compensation value Δvb and the speed error Δvw are added to obtain a speed input value Δvz, the speed PID architecture 12 is input with the speed input value Δvz, and the speed PID architecture 12 outputs an acceleration compensation value Δa according to a given speed PID parameter, and the speed error Δvw is the vehicle speed minus a target vehicle speed, wherein the target vehicle speed may be regarded as the front vehicle speed of the front vehicle in some embodiments.
The actuator 13 adjusts the own vehicle speed of the own vehicle, for example, increases the accelerator or performs braking operation, based on the acceleration compensation value Δa.
The working principle of the PID debugging system 100 provided in this embodiment is as follows:
in order to make the two vehicles keep the same speed and the safe distance, the present embodiment can debug the own vehicle 200 and the front vehicle 300 at the same speed before the own vehicle 200 and the front vehicle 300 keep the safe distance, that is, the present embodiment first debug the speed PID architecture 12 and then debug the distance PID architecture 11.
Before the speed PID architecture 12 is debugged, the speed compensation value Δvb output by the distance PID architecture 11 is configured to be 0, and then a given plurality of sets of speed PID parameters are sequentially input into the speed PID architecture 12 to obtain a plurality of sets of speed response curves. And then, selecting a target speed response curve from a plurality of groups of speed response curves according to the speed peak value, the speed peak value response time and the speed stabilizing time, and recording the speed PID parameters corresponding to the target speed response curve, thereby completing the debugging work of the speed PID architecture.
For example, let us assume that the own vehicle speed v1=5 m/s, the preceding vehicle speed v2=10 m/s, and the safe distance Δsa=5 m. The speed PID architecture 12 is tuned in the manner described above, which eventually converges V2-v1=Δvw to 0, i.e., V1 is approximately equal to V2. When V1 is adjusted to be equal to V2, the host vehicle 200 has been 20 meters away from the lead vehicle 300, and then the distance PID architecture is commissioned.
When the distance PID architecture is debugged, the present embodiment sequentially inputs a given plurality of sets of distance PID parameters into the distance PID architecture 11, so as to obtain a plurality of sets of distance response curves. And then, selecting a target distance response curve from a plurality of groups of distance response curves according to the distance peak value, the distance peak value response time and the distance stabilizing time, and recording the distance PID parameters corresponding to the target distance response curve, thereby completing the debugging work of the distance PID architecture.
For example, as described above, the present embodiment configures the speed PID parameters corresponding to the target speed response curve for the speed PID architecture 12. And, under the combined action of the distance PID architecture 11 and the speed PID architecture 12, when the own vehicle speed of the own vehicle 200 accelerates from 10m/s to 15m/s, the acceleration process compensates the distance between the own vehicle 200 and the preceding vehicle 300, so that the own vehicle 200 continuously approaches the safe distance.
Then, under the combined action of the distance PID architecture 11 and the speed PID architecture 12, the own vehicle 200 starts to slow down from 15m/s to 10m/s, and similarly, the distance between the own vehicle 200 and the front vehicle 300 is compensated in the slow down process.
Then, under the combined action of the distance PID architecture 11 and the speed PID architecture 12, when the own vehicle speed of the own vehicle 200 is accelerated from 10m/s to 15m/s, the acceleration process compensates the distance between the own vehicle 200 and the preceding vehicle 300.
Up to this point, the own vehicle continuously follows the '10 m/s-15 m/s-10 m/s-15 m/s … …' to wave back and forth, and during each wave, the own vehicle 200 continuously shortens the distance from the preceding vehicle 300, and finally, the own vehicle 200 and the preceding vehicle 300 maintain the safety distance Δsa at the same speed. As shown in fig. 1, the own vehicle 200 and the preceding vehicle 300 are kept at the same vehicle speed at both times t1 and t2, and always at a safe distance Δsa.
As another aspect of the embodiment of the invention, the embodiment of the invention provides a method for debugging the PID parameters of a vehicle. Referring to fig. 3, the method S300 for debugging the PID parameters of the vehicle includes:
s31, acquiring a speed response curve of a speed PID architecture running under each group of speed PID parameters;
by way of example and not limitation, the speed response curve is used to represent the change in the speed of the host vehicle over time relative to a target speed, which may be the front vehicle speed of the preceding vehicle or a user-defined speed.
When the speed PID architecture operates under each set of speed PID parameters, the PID debugging system generates a corresponding speed response curve according to the operation result, for example, given four sets of speed PID parameters including [ PV1, IV1, DV1], [ PV2, IV2, DV2], [ PV3, IV3, DV3] and [ PV4, IV4, DV4], the speed PID architecture obtains a speed response curve LV1, a speed response curve LV2, a speed response curve LV3 and a speed response curve LV4 when operating under the speed PID parameters [ PV1, IV1, DV1], [ PV2, IV2, DV2], [ PV3, IV3, DV3] and [ PV4, IV4, DV4], respectively.
S32, selecting a target speed response curve according to a plurality of groups of speed response curves, recording PID parameters corresponding to the target speed response curve as optimal speed PID parameters, and converging the speed errors of the own vehicle speed and the target vehicle speed of the target speed response curve in a speed steady-state error range;
in this embodiment, the speed error is the difference of the target vehicle speed minus the vehicle speed, and the speed steady-state error range can be customized by the user, for example, the speed steady-state error range is 0 or [ -1,1] or the like, and when the speed error falls within the speed steady-state error range, the visible vehicle speed is equal to the target vehicle speed, thereby meeting the debugging purpose.
Generally, different speed response curves may have differences in speed peak value, speed peak value response time and speed stability time, and a designer may configure different weights for the speed peak value, the speed peak value response time and the speed stability time according to service requirements, so as to select a target speed response curve which is more reliable and accurate and meets the service requirements from multiple groups of speed response curves. For example, as described above, assuming that the speed response curve LV3 of the speed PID architecture under the third set of speed PID parameters is the target speed response curve, the speed PID parameters [ PV3, IV3, DV3] are the optimal speed PID parameters.
S33, when the speed error converges in the speed steady-state error range, acquiring a distance response curve of the distance PID architecture running under each group of distance PID parameters;
as described above, the present embodiment can debug the speed synchronization of the own vehicle and the preceding vehicle before debugging the distance PID architecture. When the speed error is converged in the speed steady-state error range, the speed of the own vehicle and the speed of the front vehicle are synchronous, and then the PID debugging system sequentially configures each group of distance PID parameters for the distance PID framework, so that the distance PID framework operates under each group of distance PID parameters, and the PID debugging system generates a corresponding distance response curve according to the operation result.
For example, given the following four sets of distance PID parameters, [ PS1, IS1, DS1], [ PS2, IS2, DS2], [ PS3, IS3, DS3] and [ PS4, IS4, DS4], the speed PID architecture IS operated under the speed PID parameters [ PS1, IS1, DS1], [ PS2, IS2, DS2], [ PS3, IS3, DS3] and [ PS4, IS4, DS4] to obtain a speed response curve LS1, a speed response curve LS2, a speed response curve LS3 and a speed response curve LS4, respectively.
S34, selecting a target distance response curve according to a plurality of groups of distance response curves, recording PID parameters corresponding to the target distance response curve as optimal distance PID parameters, and converging the distance errors of the vehicle distance and the target distance of the target distance response curve in a distance steady-state error range.
In this embodiment, the distance error is the difference of the target distance minus the vehicle distance, and the distance steady state error range can be customized by the user, for example, the distance steady state error range is 0 or [ -1,1] or the like, and when the distance error falls within the distance steady state error range, the distance between the visible vehicle and the preceding vehicle remains as the safe distance, thereby meeting the debugging purpose.
Generally, different distance response curves may have differences in distance peak value, distance peak value response time and distance stability time, and a designer may configure different weights for the distance peak value, the distance peak value response time and the distance stability time according to service requirements, so as to select a target distance response curve which is more reliable and accurate and meets the service requirements from multiple groups of distance response curves. For example, as described above, assuming that the distance response curve LS3 of the distance PID architecture under the third set of distance PID parameters IS the target distance response curve, the distance PID parameters [ PS3, IS3, DS3] are the optimal distance PID parameters.
In general, on one hand, the embodiment can automatically input given multiple sets of PID parameters without manual combination and input of PID parameters, evaluate the debugging result under each set of PID parameters according to the speed/distance response curve, and automatically select and record the optimal PID parameters according to the debugging result, so that the whole process is automatic in the debugging process, manual participation is not needed, and the debugging efficiency is improved. On the other hand, the embodiment can quantitatively represent the debugging result of the PID architecture under each set of PID parameters according to the speed/distance response curve, which is beneficial to improving the reliability and accuracy of the PID algorithm.
In some embodiments, referring to fig. 4, S31 includes:
s311, a distance PID architecture is configured to output a specified speed compensation value;
s312, taking the designated speed compensation value and the speed error as inputs, controlling the speed PID architecture to run under each group of speed PID parameters so as to adjust the speed of the vehicle;
s313, generating a speed response curve according to the adjusted vehicle speed and the target vehicle speed.
In some embodiments, the specified speed compensation value is 0, for example, please refer to fig. 2, when the speed PID architecture is debugged, the PID debugging system configures the specified speed compensation value output from the speed PID architecture to be 0, so that the speed PID architecture can continuously take the specified speed compensation value 0 and the speed error Δvw as inputs, and run under each set of speed PID parameters to adjust the speed PID architecture, so that the present embodiment can effectively and rapidly adjust the speed PID architecture.
In some embodiments, referring to fig. 5, S32 includes:
s321, determining a speed peak value, a speed peak value response time and a speed stabilizing time of each group of speed response curves;
s322, respectively carrying out normalization processing on each group of speed peak value, speed peak value response time and speed stabilization time to sequentially obtain a first normalization value, a second normalization value and a third normalization value;
s323, calculating a speed weighted sum of the speed response curve according to the first normalization value and the first weight coefficient, the second normalization value and the second weight coefficient and the third normalization value and the third weight coefficient;
s324, selecting a target speed response curve according to the weighted sum of the plurality of speeds.
By way of example and not limitation, the speed peak is the vehicle speed of the host vehicle at the highest vehicle speed point when the speed PID architecture is operating at each set of speed PID parameters, the speed peak response time is the time to reach the speed peak, and the speed settling time is the time at which the speed error first converges to the speed steady state error range.
In S321, the PID debugging system compares the own vehicle speed at each time point by point, thereby traversing the speed peak Vf, and records the time of the speed peak Vf as the speed peak response time Vt. In addition, the PID debugging system subtracts the own vehicle speed from the target vehicle speed at each time point to obtain a speed error, judges whether the speed error falls in a speed steady-state error range, and records a time point Vh corresponding to the own vehicle speed at the moment if the speed error falls in the speed steady-state error range.
In S322, in order to include the three of the speed peak value, the speed peak value response time and the speed stabilization time as the evaluation factors and select the target speed response curve, the present embodiment needs to normalize each group of the speed peak value, the speed peak value response time and the speed stabilization time, so as to obtain a first normalized value η1, a second normalized value η2 and a third normalized value η3.
In S323, to be able to select a more reliable and accurate speed PID parameter, the present embodiment may select a target speed response curve according to a weighting algorithm, for example, the PID debug system calculates a speed weighted sum of each speed response curve according to the following equation:
φ=α*η1+β*η2+γ*η3
1=α+β+γ
wherein alpha is a first weight coefficient, beta is a second weight coefficient, gamma is a third weight coefficient, and phi is a speed weighted sum.
In S324, the PID debugging system sequentially executes S323 to obtain a plurality of velocity weighted sums [ Φ1, Φ2, Φ3, Φ4], searches the velocity weighted sums [ Φ1, Φ2, Φ3, Φ4], selects a velocity response curve corresponding to the velocity weighted sum as a target velocity response curve, and, for example, selects a velocity response curve LV3 corresponding to the velocity weighted sum Φ3 as a target velocity response curve assuming that the velocity weighted sum Φ3 is the velocity weighted sum.
The speed peak value, the speed peak value response time and the speed stabilizing time have corresponding effects on the speed regulation, for example, the speed peak value can influence whether the speed of the vehicle can effectively approximate to the target speed, the speed peak value response time can influence the speed of the vehicle approaching to the target speed, the speed stabilizing time can influence the time required by the speed of the vehicle converging to the target speed, the speed peak value response time and the speed stabilizing time can be fully considered, and corresponding weight coefficients are respectively matched with the three elements according to service requirements, so that the PID debugging system can reliably, efficiently and accurately obtain the optimal speed PID parameters.
In some embodiments, when a first normalization value is obtained by normalizing each group of speed peaks, the PID debugging system determines a peak speed difference value between the speed peak and a target vehicle speed and an absolute value of the peak speed difference value, and normalizes the absolute value of the peak speed difference value according to a hyperbolic tangent function to obtain the first normalization value, where the first normalization value and the absolute value of the peak speed difference value are in a negative correlation.
Since the greater the peak speed difference value obtained by subtracting the target vehicle speed from the speed peak value, the less the corresponding speed response curve is, and the more the corresponding speed response curve is, the greater the peak speed difference value is, the smaller the first normalization value is, the smaller the peak speed difference value is, and the greater the first normalization value is, therefore, in some embodiments, the PID debugging system normalizes the absolute value of the peak speed difference value according to the following formula:
ρ=Vf-Vm
η1=tanh(-|ρ|)+1
where Vm is the target vehicle speed, ρ is the peak speed difference.
In some embodiments, when normalizing each set of the speed peak response time and the speed stability time, the PID debug system normalizes each set of the speed peak response time and the speed stability time according to a hyperbolic tangent function, and sequentially obtains a second normalized value and a third normalized value, where the second normalized value has a positive correlation with the speed peak response time, and the third normalized value has a positive correlation with the speed stability time, for example,
η2=tanh(Vt)
η3=tanh(Vh)
by adopting the above method, the first normalization value, the second normalization value and the third normalization value can be obtained effectively.
In some embodiments, when obtaining a distance response curve for the distance PID architecture running under each set of distance PID parameters, referring to fig. 6, S33 includes:
s331, determining a safe distance, and adding the distance error and the safe distance to obtain a distance input value;
s332, taking a distance input value as input, and controlling the distance PID architecture to run under each group of distance PID parameters so as to enable the distance PID architecture to output a speed compensation value;
s333, taking the speed compensation value and the speed error as inputs, controlling the speed PID architecture to run under the optimal speed PID parameters so as to adjust the distance between the vehicle and the vehicle;
s334, generating a distance response curve according to the adjusted distance between the vehicle and the target distance.
By adopting the method, the embodiment can effectively obtain the distance response curve.
In some embodiments, when selecting the target distance response curve according to the multiple sets of distance response curves, referring to fig. 7, S34 includes:
s341, determining a distance peak value, a distance peak value response time and a distance stabilization time of each group of distance response curves;
s342, respectively carrying out normalization processing on each group of distance peak value, distance peak value response time and distance stabilization time to sequentially obtain a fourth normalization value, a fifth normalization value and a sixth normalization value;
s343, calculating the distance weighted sum of each group of distance response curves according to the fourth normalization value and the fourth weight coefficient, the fifth normalization value and the fifth weight coefficient, and the sixth normalization value and the sixth weight coefficient;
s344, selecting a target distance response curve according to the weighted sum of the distances.
By way of example and not limitation, the distance peak is the distance of the vehicle when the distance PID architecture is operating at each set of distance PID parameters with the smallest difference from the safe distance, the distance peak response time is the time to reach the distance peak, and the distance settling time is the time when the distance error first converges to the distance steady state error range.
In S341, the PID debugging system compares the own vehicle distance at each time point by point, thereby traversing the distance peak Sf, and records the time of the distance peak Sf as the distance peak response time St. In addition, the PID debugging system subtracts the own vehicle distance from the target distance at each time point to obtain a distance error, judges whether the distance error falls in a distance steady-state error range, and records a time point Sh corresponding to the own vehicle distance at the moment if the distance error falls in the distance steady-state error range.
In S342, in order to include the distance peak value, the distance peak value response time and the distance stabilization time as evaluation factors to select the target distance response curve, the present embodiment needs to normalize each group of the distance peak value, the distance peak value response time and the distance stabilization time, so as to obtain a fourth normalized value η4, a fifth normalized value η5 and a sixth normalized value η6, respectively.
In S343, to be able to select a more reliable and accurate distance PID parameter, the present embodiment may select a target distance response curve according to a weighting algorithm, for example, the PID debug system calculates a distance weighted sum of each distance response curve according to the following equation:
λ=δ*η4+ψ*η5+τ*η6
1=δ+ψ+τ
wherein δ is the fourth weight coefficient, ψ is the fifth weight coefficient, τ is the sixth weight coefficient, λ is the distance weighted sum.
In S344, the PID debugging system sequentially executes S343 to obtain a plurality of distance weighted sums [ λ1, λ2, λ3, λ4], searches for a maximum distance weighted sum in the plurality of distance weighted sums [ λ1, λ2, λ3, λ4], selects a distance response curve corresponding to the maximum distance weighted sum as a target distance response curve, and, for example, selects a distance response curve LS3 corresponding to the distance weighted sum λ3 as the target distance response curve assuming that the distance weighted sum λ3 is the maximum distance weighted sum.
Because the distance peak value, the distance peak value response time and the distance stabilization time all play a corresponding role in adjusting the distance between vehicles, for example, whether the distance between vehicles can effectively approach the safe distance can be influenced by the distance peak value, the speed of approaching the safe distance by the distance peak value response time can be influenced by the distance between vehicles, the time required for converging the distance between vehicles to the safe distance can be influenced by the distance stabilization time, the distance peak value response time and the distance stabilization time can be fully considered, and corresponding weight coefficients are respectively matched for the three elements according to service requirements, so that the PID debugging system can reliably, efficiently and accurately obtain the optimal distance PID parameters.
In some embodiments, when the fourth normalized value is obtained by normalizing each group of distance peaks, the PID debugging system determines the distance peak difference between the distance peak and the safety distance and the absolute value of the distance peak difference, and normalizes the absolute value of the distance peak difference according to the hyperbolic tangent function to obtain a first normalized value, where the first normalized value and the absolute value of the distance peak difference have a negative correlation.
Because the larger the distance peak difference obtained by subtracting the safety distance from the distance peak value, the less the corresponding distance response curve is, and the more the corresponding distance peak difference is, the more the corresponding distance response curve is, therefore, the larger the distance peak difference is hoped to be, the smaller the fourth normalization value is, the smaller the distance peak difference is, and the larger the fourth normalization value is, therefore, in some embodiments, the PID debugging system normalizes the absolute value of the distance peak difference according to the following formula:
χ=Sf-ΔSa
η4=tanh(-|χ|)+1
wherein χ is the distance peak difference.
In some embodiments, when normalizing each set of distance peak response time and speed stability time, the PI debugging system normalizes each set of distance peak response time and distance stability time according to a hyperbolic tangent function, sequentially obtaining a fifth normalized value and a sixth normalized value, where the fifth normalized value has a positive correlation with the distance peak response time, and the sixth normalized value has a positive correlation with the distance stability time, for example,
η5=tanh(St)
η6=tanh(Sh)
by adopting the above method, the fifth normalization value, the sixth normalization value and the third normalization value can be obtained effectively.
It should be noted that, in the foregoing embodiments, there is not necessarily a certain sequence between the steps, and those skilled in the art will understand that, according to the description of the embodiments of the present invention, the steps may be performed in different orders in different embodiments, that is, may be performed in parallel, may be performed interchangeably, or the like.
Referring to fig. 8, fig. 8 is a schematic circuit diagram of a vehicle according to an embodiment of the invention. As shown in fig. 8, a vehicle 800 includes one or more processors 81 and memory 82. In fig. 8, a processor 81 is taken as an example.
The processor 81 and the memory 82 may be connected by a bus or otherwise, for example in fig. 8.
The memory 82 is used as a non-volatile computer readable storage medium for storing non-volatile software programs, non-volatile computer executable programs and modules, such as program instructions/modules corresponding to the method for debugging the PID parameters of the vehicle in the embodiments of the present invention. The processor 81 implements the functions of the debugging method for the PID parameters of the vehicle provided by the above-described method embodiment by running the nonvolatile software programs, instructions and modules stored in the memory 82.
The memory 82 may include high-speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other non-volatile solid-state storage device. In some embodiments, memory 82 may optionally include memory located remotely from processor 81, such remote memory being connectable to processor 81 through a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The program instructions/modules are stored in the memory 82, which when executed by the one or more processors 81, perform the method of debugging the vehicle PID parameters in any of the method embodiments described above.
Embodiments of the present invention also provide a non-volatile computer storage medium storing computer-executable instructions that are executed by one or more processors, such as the one processor 81 of fig. 8, to cause the one or more processors to perform the method of debugging the PID parameters of a vehicle in any of the method embodiments described above.
Embodiments of the present invention also provide a computer program product comprising a computer program stored on a non-transitory computer readable storage medium, the computer program comprising program instructions which, when executed by a vehicle, cause the vehicle to perform the method of debugging a vehicle PID parameter of any one of the claims.
The above-described embodiments of the apparatus or device are merely illustrative, in which the unit modules illustrated as separate components may or may not be physically separate, and the components shown as unit modules may or may not be physical units, may be located in one place, or may be distributed over multiple network module units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
From the above description of embodiments, it will be apparent to those skilled in the art that the embodiments may be implemented by means of software plus a general purpose hardware platform, or may be implemented by hardware. Based on such understanding, the foregoing technical solution may be embodied essentially or in a part contributing to the related art in the form of a software product, which may be stored in a computer readable storage medium, such as ROM/RAM, a magnetic disk, an optical disk, etc., including several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to perform the method described in the respective embodiments or some parts of the embodiments.
Finally, it should be noted that: the above embodiments are only for illustrating the technical solution of the present invention, and are not limiting; the technical features of the above embodiments or in the different embodiments may also be combined within the idea of the invention, the steps may be implemented in any order, and there are many other variations of the different aspects of the invention as described above, which are not provided in detail for the sake of brevity; although the invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit of the invention.