Method for predicting angle of vehicle body and related device
By fitting the objective function relationship between the body angle and the vehicle driving parameters, the problem of insufficient calculation ability of body angle prediction during vehicle driving is solved, and the accuracy of body angle prediction with a small calculation amount is achieved to reduce the jitter of the HUD picture.
Patent Information
- Application Number
- CN202510329386.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-19
- Publication Date
- 2025-05-13
AI Technical Summary
During the vehicle's driving, the change in the body angle causes the HUD screen to shake. The prior art cannot effectively predict the body angle during the vehicle's driving, resulting in insufficient computing power.
By obtaining the angle values of multiple sets of driving parameter sets and body angles of the vehicle at the last multiple sampling moments, the objective function relationship between the vehicle body angle and the vehicle driving parameters is fitted, and the body angle is predicted with a small calculation amount.
It realizes accurate prediction of the vehicle's body angle under the premise of small calculation amount, reduces the jitter of the HUD picture, and is suitable for on-board equipment with relatively low computing power.
Smart Images

Figure CN119975380A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of vehicle control technology, and in particular to a method for predicting vehicle body angle and related devices. Background Art
[0002] Head-up-Display (HUD), also known as head-up display system, is a holographic half-mirror technology that projects important information onto the windshield in front of the driver. The head-up display allows the driver to obtain driving-related information directly in the front field of vision without having to look down at the dashboard while driving.
[0003] During vehicle driving, changes in the angle of the vehicle body will cause the HUD screen to shake. In order to reduce the shaking of the HUD screen, there is a need to predict the body angle in advance and adjust the HUD screen based on the predicted body angle. However, body angle prediction requires a large amount of training data for feature learning to learn a network model for predicting body angles, while the computing power of the vehicle's on-board equipment is limited and cannot support feature learning of a large amount of data, resulting in the inability to predict the body angle in advance during vehicle driving. Summary of the invention
[0004] In view of the above problems, the present application provides a method and related device for predicting the body angle of a vehicle, so as to predict the body angle of a vehicle with a relatively small amount of calculation.
[0005] In order to achieve the above purpose, the first aspect of the present application provides a method for predicting a vehicle body angle, comprising:
[0006] Obtaining multiple sets of driving parameter sets and multiple sets of angle values of vehicle body angles at multiple recent sampling moments, each set of the driving parameter sets including a parameter value of at least one driving parameter of the vehicle;
[0007] Fitting an objective function relationship between the vehicle body angle and the at least one vehicle driving parameter based on the parameter value of each vehicle driving parameter in each set of driving parameter sets and the angle values of multiple sets of vehicle body angles;
[0008] The predicted angle value of the vehicle body angle is determined based on the objective function relationship and the parameter value of each vehicle driving parameter in the driving parameter set acquired most recently.
[0009] In a possible implementation, the step of fitting the objective function relationship between the vehicle body angle and the at least one vehicle driving parameter based on the parameter value of each vehicle driving parameter in each set of driving parameter sets and the angle values of multiple sets of vehicle body angles includes:
[0010] Based on the parameter values of each vehicle driving parameter in each set of driving parameter sets and the angle values of multiple sets of vehicle body angles, a target function relationship between the vehicle body angle at a first reference time point and at least one vehicle driving parameter at a second reference time point is fitted, wherein the first reference time point is a time point after the second reference time point, and the time difference between the first reference time point and the second reference time point includes a target number of target sampling periods, wherein the target sampling period is a sampling period corresponding to the collection of the driving parameter set, and the target number is an integer not less than 1;
[0011] The step of determining the predicted angle value of the vehicle body angle based on the objective function relationship and the parameter value of each vehicle driving parameter in the driving parameter set acquired most recently includes:
[0012] Based on the objective function relationship and the parameter values of each vehicle driving parameter in the driving parameter set collected most recently, the predicted angle value of the vehicle body angle at the target sampling moment after the current moment is determined. The target sampling moment is the sampling moment corresponding to the target number of target sampling periods after the driving parameter set is sampled most recently.
[0013] In another possible implementation, the step of fitting the objective function relationship between the vehicle body angle and the at least one vehicle driving parameter based on the parameter value of each vehicle driving parameter in each set of driving parameter sets and the angle values of multiple sets of vehicle body angles includes:
[0014] Constructing an undetermined polynomial function for representing the functional relationship between the vehicle body angle and the at least one vehicle driving parameter, wherein coefficients in the undetermined polynomial function are unknown values;
[0015] Based on the parameter values of each vehicle driving parameter in each set of driving parameter sets and the angle values of multiple sets of vehicle body angles, the coefficient values of each coefficient in the undetermined polynomial function are fitted by using the least square method;
[0016] Substitute the coefficient value of each coefficient in the undetermined polynomial function into the undetermined polynomial function to obtain a target polynomial function for representing the functional relationship between the vehicle body angle and the at least one vehicle driving parameter.
[0017] In another possible implementation, each set of the driving parameter sets includes: a speed value of the vehicle speed, an opening value of the throttle opening, and an opening value of the brake opening;
[0018] The angle values of each set of vehicle body angles include: the angle value of the vehicle body pitch angle;
[0019] The step of fitting the objective function relationship between the vehicle body angle and the at least one vehicle driving parameter based on the parameter value of each vehicle driving parameter in each driving parameter set and the angle values of multiple sets of vehicle body angles comprises:
[0020] Based on the speed values of the vehicle speed, the opening values of the throttle opening and the brake opening in each set of driving parameter sets and multiple sets of angle values of the vehicle body pitch angle, an objective function relationship between the vehicle body pitch angle and the vehicle speed, the throttle opening and the brake opening is fitted.
[0021] In another possible implementation, the step of obtaining multiple sets of driving parameter sets and multiple sets of angle values of vehicle body angles at multiple recent sampling moments includes:
[0022] Obtaining multiple sets of driving parameter sets of the vehicle at multiple recent sampling moments, wherein the sampling moments are sampling time points corresponding to the collection of the driving parameter sets;
[0023] Obtaining at least one set of angle values of vehicle body angles collected by the vehicle within a time period corresponding to the plurality of sampling moments;
[0024] Based on the at least one set of angle values of the vehicle body angle, linear interpolation is used to construct multiple sets of angle values of the vehicle body angle at the multiple sampling moments.
[0025] In another possible implementation, before obtaining multiple sets of driving parameter sets of the vehicle at the latest multiple sampling moments, the method further includes:
[0026] Each time a set of driving parameter sets of a vehicle is collected, the currently collected driving parameter set is stored at the end of the target queue, wherein the target queue can store a maximum of a set number of driving parameter sets, and the target queue is a queue that supports first-in-first-out;
[0027] The step of obtaining multiple sets of driving parameter sets of the vehicle at the most recent multiple sampling moments includes:
[0028] When there is a newly added driving parameter set in the target queue and the number of driving parameter sets in the target queue reaches the set number, multiple sets of driving parameter sets stored in the target queue are obtained, and the multiple sets of driving parameter sets are multiple sets of driving parameter sets for the vehicle at the most recent multiple sampling moments.
[0029] In another aspect, the present application further provides a device for predicting a vehicle body angle, comprising:
[0030] A data acquisition unit, used to obtain multiple sets of driving parameter sets and multiple sets of angle values of vehicle body angles at multiple recent sampling moments, each set of the driving parameter sets including a parameter value of at least one driving parameter of the vehicle;
[0031] a function fitting unit, configured to fit an objective function relationship between the vehicle body angle and the at least one vehicle driving parameter based on the parameter value of each vehicle driving parameter in each set of driving parameter sets and the angle values of multiple sets of vehicle body angles;
[0032] The angle prediction unit is used to determine the predicted angle value of the vehicle body angle based on the objective function relationship and the parameter value of each vehicle driving parameter in the driving parameter set collected most recently.
[0033] On the other hand, the present application also provides a computer program product, including computer-readable instructions. When the computer-readable instructions are executed on a vehicle-mounted device, the vehicle-mounted device implements the method for predicting a vehicle body angle described in any embodiment of the present application.
[0034] On the other hand, the present application also provides a computer storage medium, which carries one or more computer programs. When the one or more computer programs are executed by a vehicle-mounted device, the vehicle-mounted device can perform the method for predicting the vehicle body angle described in any embodiment of the present application.
[0035] In another aspect, the present application further provides a vehicle-mounted device, comprising at least one vehicle-mounted controller and a memory connected to the vehicle-mounted controller, wherein:
[0036] The memory is used to store computer programs;
[0037] The vehicle-mounted controller is used to execute the computer program so that the vehicle-mounted device can implement the method for predicting the vehicle body angle described in any embodiment of the present application.
[0038] With the help of the above-mentioned technical scheme, the present application can fit the objective function relationship between the vehicle body angle and at least one vehicle driving parameter based on multiple sets of driving parameter sets and multiple sets of body angle values of the vehicle at the most recent multiple sampling moments. Under the premise that the relevant parameters of the vehicle are known, the amount of data calculation required to fit the functional relationship between different parameters is relatively small, so that the scheme of the present application can also be applied to vehicle-mounted equipment with relatively low computing power, so that the vehicle-mounted equipment can predict the vehicle body angle based on the fitted objective function relationship and the parameter values of each vehicle driving parameter collected most recently, thereby realizing the early prediction of the vehicle body angle. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] The above and other features, advantages and aspects of the embodiments of the present disclosure will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. Throughout the accompanying drawings, the same or similar reference numerals represent the same or similar elements. It should be understood that the drawings are schematic and the originals and elements are not necessarily drawn to scale.
[0040] Figure 1 A schematic diagram of a flow chart of a method for predicting vehicle body angle provided in this application;
[0041] Figure 2 A schematic diagram of another flow chart of the method for predicting the vehicle body angle provided in the present application;
[0042] Figure 3 A schematic diagram of another flow chart of the method for predicting the vehicle body angle provided in the present application;
[0043] Figure 4 An example diagram of an implementation framework of the method for predicting the vehicle body angle provided in this application;
[0044] Figure 5 An example diagram of a driving parameter set stored in a target queue provided by the present application;
[0045] Figure 6 A schematic diagram of another flow chart of the method for predicting the vehicle body angle provided in the present application;
[0046] Figure 7 A schematic diagram of the composition structure of the device for predicting the vehicle body angle provided in this application. DETAILED DESCRIPTION
[0047] The following describes the embodiments of the present application in conjunction with the drawings in the embodiments of the present application. The terms used in the implementation method section of the present application are only used to explain the specific embodiments of the present application, and are not intended to limit the present application.
[0048] The embodiments of the present application are described below in conjunction with the accompanying drawings. Those skilled in the art will appreciate that, with the development of technology and the emergence of new scenarios, the technical solutions provided in the embodiments of the present application are also applicable to similar technical problems.
[0049] The terms "first", "second" etc. in the specification of the application and the above-mentioned drawings are used to distinguish similar objects, and need not be used to describe a specific order or sequential order. It should be understood that the terms used in this way can be interchangeable in appropriate circumstances, and this is only to describe the distinction mode adopted by the objects of the same attributes when describing in the embodiments of the application. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, so that the process, method, system, product or equipment comprising a series of units need not be limited to those units, but may include other units that are not clearly listed or inherent to these processes, methods, products or equipment.
[0050] The solution of the present application can be applied to various vehicles to predict the body angle of the vehicle. For example, the solution of the present application can be applied to an on-board device of a vehicle, which can control the on-board head-up display of the vehicle and can realize the prediction of the body angle in the present application.
[0051] like Figure 1 , shows a schematic flow chart of a method for predicting a vehicle body angle provided by the present application. The method of this embodiment may include:
[0052] S101, obtaining multiple sets of driving parameter sets and multiple sets of angle values of vehicle body angles at multiple recent sampling moments.
[0053] Different groups of driving parameter sets correspond to different sampling moments among the multiple sampling moments, and correspondingly, different groups of vehicle body angle values also correspond to different sampling moments among the multiple sampling moments.
[0054] In the present application, each set of driving parameter sets includes at least one parameter value of a vehicle driving parameter. A vehicle driving parameter refers to a parameter related to the vehicle driving state. For example, the vehicle driving parameters involved in each set of formal parameter sets may include but are not limited to: vehicle speed, throttle opening, brake opening, etc.
[0055] Each set of body angles may include the body angles of the vehicle relative to one or more axes in the three-axis coordinate system corresponding to the vehicle. It is understandable that, considering that during the driving process of the vehicle, the pitch angle of the vehicle is greatly affected by the driver's driving behavior due to different driving habits of the driver, so that the jitter of the vehicle's head-up display is relatively large as the pitch angle of the vehicle changes, based on this, in the present application, each set of body angles at least includes the pitch angle of the vehicle.
[0056] S102, fitting an objective function relationship between a vehicle body angle and at least one vehicle driving parameter based on the parameter value of each vehicle driving parameter in each driving parameter set and the angle values of multiple groups of vehicle body angles.
[0057] It can be understood that, under the premise that each vehicle driving parameter and body angle have multiple sets of known values, the function fitting method can be used to fit the objective function relationship between the body angle and at least one vehicle driving parameter. The objective function relationship can reflect the change law of the body angle as the vehicle driving parameter changes.
[0058] In the present application, there may be many possible function fitting methods used to fit the objective function relationship between the vehicle body angle and at least one vehicle driving parameter, and the present application does not impose any limitation on this.
[0059] S103, determining a predicted angle value of the vehicle body angle based on the objective function relationship and the parameter value of each vehicle driving parameter in the most recently collected driving parameter set.
[0060] The predicted angle value of the vehicle body angle may be the predicted angle value of the vehicle body angle at the current moment, or may be the angle value of the vehicle body angle at a certain sampling moment after the current moment. The specific value may be set as required and is not limited thereto.
[0061] For example, the sampling period of the driving parameter set or each vehicle driving parameter is relatively short, while the body angle can be collected by using an inertial measurement unit (IMU). However, the sampling period of the inertial measurement unit to collect the body angle is relatively long. Therefore, after collecting multiple sets of driving parameter sets, it may take a while to collect the angle value of the body angle. Based on this, in order to determine the body angle of the vehicle in a timely manner, the present application can predict the predicted angle value of the body angle at the current moment or the moment when the vehicle driving parameters were collected most recently based on the objective function relationship and in combination with the parameter values of each vehicle driving parameter collected most recently at the current moment, so as to avoid the inability to determine the angle value of the body angle at the current moment in a timely manner due to the long collection period of the inertial measurement unit.
[0062] For example, since the objective function relationship can reflect the change of the body angle with the parameter value of each vehicle driving parameter, the present application can also determine the predicted angle value of the body angle at the next sampling moment of collecting the driving parameter set after the current moment based on the objective function relationship and the parameter value of each vehicle driving parameter in the most recently collected driving parameter set.
[0063] It can be understood that in the present application, the operations of steps S101 to S103 in the embodiment of the present application can be executed after the prediction instruction of the vehicle body angle is detected.
[0064] It is understandable that, during the driving process of the vehicle, in order to be able to reasonably control the image of the vehicle head-up display, it may be necessary to continuously obtain the body angle of the vehicle. Moreover, during the driving process of the vehicle, the body angle often has different changing trends as the parameter values of the vehicle driving parameters continue to change, so that the functional relationship between the body angle and each vehicle driving parameter at different times will also change dynamically. Based on this, in order to be able to predict the body angle of the vehicle more timely and accurately, in this application, it is necessary to execute steps S101 to S103 every time a set of driving parameter sets is collected, so that the functional relationship between the current suitable body angle and each vehicle driving parameter is re-fitted each time, and the functional relationship between the dynamic fitting body angle and the vehicle driving parameters is realized, so that the body angle of the vehicle can be predicted more accurately based on the currently fitted functional relationship.
[0065] It is understandable that after determining the predicted angle value of the vehicle body angle, the present application can also control the angle of the display screen of the vehicle head-up display projected by the vehicle-mounted device based on the predicted angle value of the vehicle body angle. The specific implementation process of controlling the display screen angle of the vehicle head-up display based on the predicted angle value of the vehicle body angle may not be limited.
[0066] It can be seen that the present application can fit the objective function relationship between the vehicle body angle and at least one vehicle driving parameter based on multiple sets of driving parameter sets and multiple sets of body angle values of the vehicle at the most recent multiple sampling moments. Under the premise that the relevant parameters of the vehicle are known, the amount of data calculation required to fit the functional relationship between different parameters is relatively small, so that the solution of the present application can also be applied to vehicle-mounted equipment with relatively low computing power, so that the vehicle-mounted equipment can predict the vehicle body angle based on the fitted objective function relationship and the parameter values of each vehicle driving parameter collected most recently, thereby realizing the early prediction of the vehicle body angle.
[0067] In addition, since it is not necessary to obtain a large amount of data for model training in the process of fitting the objective function relationship between the vehicle body angle and at least one vehicle driving parameter, the data processing amount of the vehicle-mounted equipment can also be reduced.
[0068] Moreover, when the solution of the present application is used to predict the angle value of the vehicle body angle, there is no need to use additional auxiliary equipment for data supplement and prediction, which naturally reduces the resource consumption required for predicting the vehicle body angle and reduces the cost of vehicle body angle prediction.
[0069] It is understandable that in the present application, there are multiple possible implementations for fitting the objective function relationship between the vehicle body angle and at least one vehicle driving parameter. In one possible implementation, in order to further reduce the complexity of function fitting, the least squares method can be used in the present application to fit the polynomial function to fit the objective function relationship. Figure 2 Provide explanation.
[0070] like Figure 2 , shows another implementation flow diagram of the method for predicting the vehicle body angle provided in an embodiment of the present application. The method of this embodiment may include:
[0071] S201, obtaining multiple sets of driving parameter sets and multiple sets of angle values of vehicle body angles at multiple recent sampling moments.
[0072] Each driving parameter set includes a parameter value of at least one vehicle driving parameter.
[0073] S202: constructing an undetermined polynomial function for representing a functional relationship between a vehicle body angle and at least one vehicle driving parameter.
[0074] The coefficients in the undetermined polynomial function are unknown values.
[0075] The order of the undetermined polynomial function can be set as required and there is no restriction on this.
[0076] S203, based on the parameter values of each vehicle driving parameter in each driving parameter set and the angle values of multiple groups of vehicle body angles, a least square method is used to fit the coefficient values of each coefficient in the undetermined polynomial function.
[0077] It can be understood that the process of fitting the coefficient values of each degree in the undetermined polynomial function by the least square method can be a conventional operation of fitting the coefficients in the polynomial function by the least square method, and the specific implementation is not limited.
[0078] In order to facilitate understanding, the process of fitting the coefficient values of each coefficient in the undetermined polynomial function using the least squares method is briefly introduced below:
[0079] First, Indicates that the vehicle is The driving parameter set at the sampling moment is Indicates that the vehicle is The body angle at the sampling moment is constructed as shown in the following formula 1 A polynomial function of degree, is a natural number greater than 1:
[0080] (Formula 1);
[0081] in, Indicated in The predicted value of the vehicle body angle at the sampling time, where are different coefficients of the polynomial function. In formulas 1 to 3, From 0 to A natural number.
[0082] The purpose of fitting a polynomial function using the least squares method is to find the best set of coefficients in the polynomial function so that the total error between the calculated value of the body angle calculated by the fitted polynomial function and the true value of the body angle is minimized. The problem of minimizing the total error can be converted into finding the sum of squares of the error between the calculated value and the true value. Minimum, as shown in the following formula 2:
[0083] (Formula 2);
[0084] In this application, From 1 to The natural number of is the total number of multiple driving parameter sets, that is, the total number of sampling moments.
[0085] right In Find the partial derivative and set it to 0, and we can get the following formula 3:
[0086] (Formula 3);
[0087] Expanding the above formula 3 gives the following formula 4:
[0088] (Formula 4);
[0089] in, .
[0090] Writing the above formula 4 into matrix form gives:
[0091]
[0092] On this basis, as long as we calculate (Here )and (Here ), and substitute it into the above formula, we can find the coefficient values of each coefficient in the unknown polynomial function.
[0093] S204: Substitute the coefficient value of each coefficient in the undetermined polynomial function into the undetermined polynomial function to obtain a target polynomial function for representing the functional relationship between the vehicle body angle and at least one vehicle driving parameter.
[0094] For example, after substituting the coefficient values of the coefficients fitted in the above example into Formula 1, Formula 1 can be a target polynomial function between the vehicle body angle and at least one vehicle driving parameter.
[0095] S205: Determine a predicted angle value of the vehicle body angle based on the target polynomial function and the parameter value of each vehicle driving parameter in the most recently collected driving parameter set.
[0096] For this step, please refer to the related introduction of the previous embodiment, which will not be repeated here.
[0097] It is understandable that in practical applications, in order to be able to timely predict the body angle of the vehicle after the current moment, the present application can also construct an objective function relationship between the body angle at the time to be predicted and the various vehicle driving parameters of the vehicle before the time to be predicted. Figure 3 illustrate.
[0098] like Figure 3 , shows another flow chart of the method for predicting the vehicle body angle provided by an embodiment of the present application. The method of this embodiment may include:
[0099] S301, obtaining multiple sets of driving parameter sets and multiple sets of angle values of vehicle body angles at recent multiple sampling moments.
[0100] Each driving parameter set includes a parameter value of at least one vehicle driving parameter.
[0101] For this step, please refer to the related introduction of the previous embodiment, which will not be repeated here.
[0102] S302, based on the parameter values of each vehicle driving parameter in each group of driving parameter sets and the angle values of multiple groups of vehicle body angles, fit the objective function relationship between the vehicle body angle at a first reference time point and at least one vehicle driving parameter at a second reference time point.
[0103] The first reference time point is a time point after the second reference time point, and the time difference between the first reference time point and the second reference time point includes a target number of target sampling periods, and the target sampling period is a sampling period for collecting the driving parameter set. The target number is an integer not less than 1, and can be set as needed.
[0104] For example, the first reference time point may be the next sampling time for collecting the driving parameter set after the second reference time point, on which basis, the target number is 1. Accordingly, the second reference time point may be based on the collection time of the driving parameter set for predicting the vehicle body angle.
[0105] It should be noted that the first reference time point and the second reference time point are not two actual time points, but two relative time points with a fixed time difference. On this basis, after determining the parameter values of each vehicle driving parameter at a certain time point, the objective function relationship is used to calculate the predicted angle value of the vehicle at a future time point after the time point and with a target number of target sampling cycles different from the time point.
[0106] For example:
[0107] Assuming that the sampling period of the vehicle form parameters is 20ms, and the sampling period of the vehicle body angle is 160ms, then the prediction period for predicting the vehicle body angle can be selected as needed within the time interval of 20ms to 160ms, and the first reference time point for predicting the vehicle angle can be determined according to the required prediction period. For example, assuming that the prediction period is 40ms, and the body angle 40ms after the current moment needs to be determined, then the first reference time point can be the current moment, and assuming that the target number is 2, therefore, the second reference time point can be 40ms before the current moment. Accordingly, it is necessary to fit the objective function relationship between the body angle at the current moment and at least one vehicle driving parameter based on the angle value of the body angle determined 40ms before the current moment.
[0108] S303: Determine a predicted angle value of the vehicle body angle at a target sampling time after the current time based on the objective function relationship and the parameter value of each vehicle driving parameter in the driving parameter set collected most recently.
[0109] The target sampling time is the sampling time corresponding to the target number of sampling cycles after the most recent sampling to obtain the driving parameter set, that is, the sampling time reached by the target number of sampling cycles after the most recent sampling to obtain the driving parameter set.
[0110] For example, assuming that the target number is 1, and assuming that the current moment is the moment when the driving parameter set is most recently collected, then based on the objective function relationship and the parameter values of each vehicle driving parameter in the currently collected driving parameter set, the parameter value of the vehicle body angle at the next moment when the driving parameter set is collected after the current moment can be predicted.
[0111] It is understandable that, considering that the sampling period of the driving parameter set is relatively short, while the sampling period of the IMU for collecting the body angle is relatively long, for example, the sampling period of the driving parameter set may be 20ms, while the sampling period of the IMU for measuring the body angle may be 160ms. On this basis, at certain time points, only the driving parameter set may be sampled instead of the body angle. Based on this, the present application can also perform linear interpolation on the angle value of the body angle based on multiple sampling moments corresponding to multiple sets of driving parameter sets.
[0112] Specifically, the present application can obtain multiple sets of driving parameter sets of the vehicle at the most recent multiple sampling moments. The sampling moments are sampling time points corresponding to the collection of driving parameter sets. Moreover, at least one set of angle values of the vehicle body angles collected by the vehicle in the time period corresponding to the multiple sampling moments can also be obtained. On this basis, the present application can construct multiple sets of angle values of the vehicle body angles at the multiple sampling moments by linear interpolation based on the angle values of the at least one set of vehicle body angles.
[0113] For example, taking the sampling period of the driving parameter set as 20ms, and the sampling period of the IMU measuring the body angle as 160ms, then for every 8 sets of driving parameter sets collected, a set of body angle values will be collected. Based on this, taking the sampling time of collecting the driving parameter set as the benchmark, there will be 7 sampling times every 160ms when there is no body angle value. Therefore, the body angle values at these 7 sampling times can be constructed by linear interpolation.
[0114] Of course, in actual applications, there may be a situation in which the parameter values of some vehicle driving parameters in the driving parameter set are 0. In order to avoid the vehicle driving parameters with a large number of parameter values of 0 affecting the function fitting, the present application can also perform data compensation for the vehicle driving parameters with a parameter value of 0. For example, linear interpolation can also be used to reconstruct the parameter value of the vehicle driving parameter when the parameter value of the vehicle driving parameter is 0.
[0115] like Figure 4 A framework diagram of an implementation principle of the method for predicting the vehicle body angle of the present application is shown.
[0116] Depend on Figure 4 It can be seen that after obtaining the vehicle's most recent multiple sets of driving parameter sets and at least one set of body angle values, the present application will pre-process the obtained data through linear interpolation and other methods, and then fit the functional relationship between the body angle and each vehicle driving parameter based on the pre-processed data. Finally, the fitted functional relationship is used to predict the angle value of the vehicle's body angle.
[0117] Furthermore, the present application may also pre-set a set number of driving parameter sets required for the objective function relationship, and the operation of fitting the objective function relationship will be performed only when the number of target driving parameter sets most recently collected before the current moment reaches the set number.
[0118] For example, in one implementation, the present application can store the currently collected driving parameter set at the end of the target queue each time a set of driving parameter sets of a vehicle is collected. The target queue can store a maximum of a set number of driving parameter sets, and the target queue is a queue that supports first-in-first-out. The set number can be set as needed, such as 60, or other values, without limitation.
[0119] On this basis, when there are newly added driving parameter sets in the target queue and the number of driving parameter sets in the target queue reaches the set number, the application will obtain multiple sets of driving parameter sets stored in the target queue and perform related operations such as obtaining multiple sets of angle values of vehicle body angles and fitting function relationships. Among them, the multiple sets of driving parameter sets in the target queue are multiple sets of driving parameter sets of the vehicle at the most recent multiple sampling moments.
[0120] It can be understood that since the target queue is a queue that supports first-in-first-out, and the target queue can only store a set number of driving parameter sets at most, if a set of driving parameter sets is collected at the current moment, the target queue already has a set number of driving parameter sets, then after the latest collected set of driving parameter sets is added to the end of the target queue, the driving parameter set that is at the front (i.e., the earliest collected time) in the target queue will be removed from the target queue.
[0121] For easier understanding, see Figure 5 , Figure 5 An example diagram showing a target queue storing a driving parameter set in the present application is shown.
[0122] exist Figure 5 In the example above, the target queue can store up to 50 sets of driving parameter sets. Figure 5 In the example, each set of driving parameter sets is stored in the form of a structure, so 50 structures can be stored in the target queue.
[0123] exist Figure 5 For ease of understanding, it is taken as an example that each driving parameter set includes the parameter values of the three vehicle driving parameters, namely, throttle opening, brake opening and vehicle speed. Figure 5 It can be seen that each time a set of driving parameter sets is collected, the latest collected driving parameter set will be stored from the end of the queue to the target queue. If there are more than 50 sets of driving parameter sets in the target queue, the latest stored driving parameter set will be removed from the head of the queue, so that the target queue always stores the 50 sets of driving parameter sets collected in the last 50 times.
[0124] Combined with the above introduction, it can be seen that the inventor of this application has found through research that the pitch angle of the vehicle body is most affected by the driver's driving habits. Therefore, among the body angles, the pitch angle of the vehicle body has a relatively large impact on the jitter of the display screen of the vehicle-mounted head-up display. Based on this, in this application, the body angle at least includes the pitch angle of the vehicle body. Moreover, after further research, the inventor found that when the driver is driving the vehicle, the relationship between the throttle opening, the brake opening and the vehicle speed is most closely related to the pitch angle of the vehicle body. Based on this, the following is an example in which each group of driving parameter sets includes parameter values of the throttle opening, the brake opening and the vehicle speed, and the body angle is the pitch angle of the vehicle body.
[0125] like Figure 6 Another schematic flow chart of the method for predicting the vehicle body angle provided by the present application is shown. The method of this embodiment may include:
[0126] S601, when there is a newly added driving parameter set in the target queue and the number of driving parameter sets in the target queue reaches a set number, obtain the set number of driving parameter sets stored in the target queue.
[0127] The set number of driving parameter sets in the target queue are driving parameter sets collected by the vehicles at the most recent set number of sampling moments.
[0128] The target queue is equivalent to a data pool, which is used to cache the most recently collected driving parameter set. The specific implementation of the target queue caching the driving parameter set can be referred to the previous related introduction, which will not be repeated here.
[0129] In this embodiment, the driving parameter set includes an opening value of an accelerator opening, an opening value of a brake opening, and a speed value of a vehicle speed.
[0130] S602, obtaining at least one set of vehicle body pitch angle values collected within a time period corresponding to the set number of sampling moments.
[0131] S603: Based on the at least one set of angle values of the vehicle body angle, a set number of groups of angle values of the vehicle body pitch angle corresponding to a set number of sampling moments are constructed using linear interpolation.
[0132] The above steps S601 to S603 are taken as an example of an implementation method for obtaining the most recently collected multiple sets of driving parameter sets and the angle values of the vehicle body pitch angle. The other implementation methods mentioned above are also applicable to this embodiment and are not limited thereto.
[0133] S604, based on the speed values of the vehicle speed, the opening values of the throttle opening and the opening values of the brake opening in each set of driving parameter sets and multiple sets of angle values of the vehicle body pitch angles, fit the objective function relationship between the vehicle body pitch angle and the vehicle speed, the throttle opening and the brake opening.
[0134] For example, the least square method is used to fit the polynomial function between the vehicle body pitch angle and the vehicle speed, throttle opening and brake opening, as described above, which will not be repeated here.
[0135] In particular, in order to predict the vehicle's body pitch angle after the current moment, the present application can also fit the objective function relationship between the vehicle body pitch angle at a first reference time point and the vehicle speed, throttle opening and brake opening at a second reference time point.
[0136] For example, in the process of fitting a polynomial function using the least squares method, when calculating the sum of squares of the error between the calculated value and the true value, it is necessary to use the vehicle speed, throttle opening, and brake opening at the t-th sampling moment to calculate the calculated value of the vehicle pitch angle, and calculate the sum of squares of the error between the calculated value of the vehicle pitch angle and the vehicle pitch angle at the t+s-th sampling moment, where t is a square from 1 to The other parts of the fitting process are similar and will not be described in detail.
[0137] S605, determining a predicted angle value of the vehicle body pitch angle based on the objective function relationship and the most recently acquired vehicle speed value, throttle opening value, and brake opening value.
[0138] For example, based on the latest collected speed value, throttle opening value, brake opening value and objective function relationship, the predicted angle value of the vehicle body pitch angle at the latest sampling time is predicted. Or, the predicted angle value of the vehicle body pitch angle at the next collection time after the current time is predicted, etc. The details are as described above and will not be repeated here.
[0139] A method for predicting a vehicle body angle provided in an embodiment of the present application is introduced above. A device for executing the above method for predicting a vehicle body angle will be introduced below.
[0140] See also Figure 7 , Figure 7 This is a schematic diagram of the structure of a device for predicting the vehicle body angle provided in an embodiment of the present application. Figure 7 As shown, the device for predicting the vehicle body angle includes:
[0141] The data acquisition unit 701 is used to obtain multiple sets of driving parameter sets and multiple sets of angle values of vehicle body angles at the latest multiple sampling moments, each set of the driving parameter sets including a parameter value of at least one driving parameter of the vehicle;
[0142] The function fitting unit 702 is used to fit the objective function relationship between the vehicle body angle and the at least one vehicle driving parameter based on the parameter value of each vehicle driving parameter in each set of driving parameter sets and the angle values of multiple sets of vehicle body angles;
[0143] The angle prediction unit 703 is used to determine the predicted angle value of the vehicle body angle based on the objective function relationship and the parameter value of each vehicle driving parameter in the driving parameter set collected most recently.
[0144] In a possible implementation, the function fitting unit includes:
[0145] a function fitting subunit, for fitting an objective function relationship between a vehicle body angle at a first reference time point and at least one vehicle driving parameter at a second reference time point based on parameter values of each vehicle driving parameter in each set of driving parameter sets and angle values of multiple sets of vehicle body angles, wherein the first reference time point is a time point after the second reference time point, and a time difference between the first reference time point and the second reference time point includes a target number of target sampling periods, wherein the target sampling period is a sampling period corresponding to the collection of the driving parameter sets, and the target number is an integer not less than 1;
[0146] The angle prediction unit comprises:
[0147] The angle prediction subunit is used to determine the predicted angle value of the vehicle body angle at a target sampling moment after the current moment based on the objective function relationship and the parameter values of each vehicle driving parameter in the driving parameter set collected most recently, wherein the target sampling moment is a sampling moment corresponding to a target number of target sampling periods after the driving parameter set is obtained by the most recent sampling.
[0148] In yet another possible implementation, the function fitting unit includes:
[0149] A polynomial construction subunit, used for constructing an undetermined polynomial function for representing the functional relationship between the vehicle body angle and the at least one vehicle driving parameter, wherein the coefficients in the undetermined polynomial function are unknown values;
[0150] A coefficient fitting subunit, for fitting the coefficient values of each coefficient in the undetermined polynomial function by using the least square method based on the parameter values of each vehicle driving parameter in each set of driving parameter sets and the angle values of multiple sets of vehicle body angles;
[0151] The polynomial determination subunit is used to substitute the coefficient value of each coefficient in the undetermined polynomial function into the undetermined polynomial function to obtain a target polynomial function for representing the functional relationship between the vehicle body angle and the at least one vehicle driving parameter.
[0152] In another possible implementation, each set of the driving parameter sets obtained by the data obtaining unit includes: a speed value of the vehicle speed, an opening value of the throttle opening, and an opening value of the brake opening; and each set of angle values of the vehicle body angle includes: an angle value of the vehicle body pitch angle;
[0153] The function fitting unit is specifically used to fit the objective function relationship between the vehicle pitch angle and the vehicle speed, throttle opening and brake opening based on the speed value of the vehicle speed, the opening value of the throttle opening and the opening value of the brake opening in each group of driving parameter sets and multiple groups of angle values of the vehicle pitch angle.
[0154] In yet another possible implementation, the data obtaining unit includes:
[0155] A parameter acquisition subunit, used to obtain multiple sets of driving parameter sets of the vehicle at multiple recent sampling moments, wherein the sampling moments are sampling time points corresponding to the collection of the driving parameter sets;
[0156] An angle obtaining subunit, used to obtain angle values of at least one set of vehicle body angles collected by the vehicle in a time period corresponding to the plurality of sampling moments;
[0157] The difference subunit is used to construct multiple groups of angle values of the vehicle body angle at the multiple sampling moments by linear interpolation based on the at least one group of angle values of the vehicle body angle.
[0158] In another possible implementation, the device for predicting the vehicle body angle further includes: a parameter cache unit, which is used to store the currently collected driving parameter set to the end of a target queue each time a set of driving parameter sets of the vehicle is collected before the parameter acquisition subunit obtains multiple sets of driving parameter sets of the vehicle at the latest multiple sampling moments, wherein the target queue can store a set number of driving parameter sets at most, and the target queue is a queue that supports first-in-first-out;
[0159] The parameter acquisition subunit is specifically used to obtain multiple sets of driving parameter sets stored in the target queue when there is a newly added driving parameter set in the target queue and the number of driving parameter sets in the target queue reaches the set number, and the multiple sets of driving parameter sets are multiple sets of driving parameter sets for the vehicle at the most recent multiple sampling moments.
[0160] On the other hand, the present application also provides a computer program product, including computer-readable instructions, which, when executed on a vehicle-mounted device, enable the vehicle-mounted device to implement the method for predicting a vehicle body angle as described in any one of the above embodiments.
[0161] On the other hand, the present application also provides a computer storage medium, which carries one or more computer programs. When the one or more computer programs are executed by a vehicle-mounted device, the vehicle-mounted device can implement the method for predicting the vehicle body angle as described in any of the above embodiments.
[0162] In another aspect, the present application further provides a vehicle-mounted device, comprising at least one vehicle-mounted controller and a memory connected to the vehicle-mounted controller, wherein:
[0163] The memory is used to store computer programs;
[0164] The vehicle-mounted controller is used to execute the computer program so that the vehicle-mounted device can implement the method for predicting the vehicle body angle as described in any one of the above embodiments.
[0165] It should also be noted that the device embodiments described above are merely schematic, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed over multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. In addition, in the drawings of the device embodiments provided by the present application, the connection relationship between the modules indicates that there is a communication connection between them, which may be specifically implemented as one or more communication buses or signal lines.
[0166] Through the description of the above implementation mode, the technicians in the field can clearly understand that the present application can be implemented by means of software plus necessary general hardware, and of course, it can also be implemented by special hardware including special integrated circuits, special CPUs, special memories, special components, etc. In general, all functions completed by computer programs can be easily implemented by corresponding hardware, and the specific hardware structure used to implement the same function can also be various, such as analog circuits, digital circuits or special circuits. However, for the present application, software program implementation is a better implementation mode in more cases. Based on such an understanding, the technical solution of the present application is essentially or the part that contributes to the prior art can be embodied in the form of a software product, which is stored in a readable storage medium, such as a computer floppy disk, a U disk, a mobile hard disk, a ROM, a RAM, a magnetic disk or an optical disk, etc., including a number of instructions to enable a computer device (which can be a personal computer, a training device, or a network device, etc.) to execute the methods described in each embodiment of the present application.
[0167] In the above embodiments, all or part of the embodiments may be implemented by software, hardware, firmware or any combination thereof. When implemented by software, all or part of the embodiments may be implemented in the form of a computer program product.
Claims
1. A method for predicting a vehicle body angle, characterized in that: include: Obtaining multiple sets of driving parameter sets and multiple sets of angle values of vehicle body angles at multiple recent sampling moments, each set of the driving parameter sets including a parameter value of at least one driving parameter of the vehicle; Fitting an objective function relationship between the vehicle body angle and the at least one vehicle driving parameter based on the parameter value of each vehicle driving parameter in each set of driving parameter sets and the angle values of multiple sets of vehicle body angles; The predicted angle value of the vehicle body angle is determined based on the objective function relationship and the parameter value of each vehicle driving parameter in the driving parameter set acquired most recently.
2. The method for predicting the vehicle body angle according to claim 1, characterized in that: The step of fitting the objective function relationship between the vehicle body angle and the at least one vehicle driving parameter based on the parameter value of each vehicle driving parameter in each set of driving parameter sets and the angle values of multiple sets of vehicle body angles comprises: Based on the parameter values of each vehicle driving parameter in each set of driving parameter sets and the angle values of multiple sets of vehicle body angles, a target function relationship between the vehicle body angle at a first reference time point and at least one vehicle driving parameter at a second reference time point is fitted, wherein the first reference time point is a time point after the second reference time point, and the time difference between the first reference time point and the second reference time point includes a target number of target sampling periods, wherein the target sampling period is a sampling period corresponding to the collection of the driving parameter set, and the target number is an integer not less than 1; The step of determining the predicted angle value of the vehicle body angle based on the objective function relationship and the parameter value of each vehicle driving parameter in the driving parameter set acquired most recently includes: Based on the objective function relationship and the parameter values of each vehicle driving parameter in the driving parameter set collected most recently, the predicted angle value of the vehicle body angle at the target sampling moment after the current moment is determined. The target sampling moment is the sampling moment corresponding to the target number of target sampling periods after the driving parameter set is sampled most recently.
3. The method for predicting vehicle body angle according to claim 1, characterized in that: The step of fitting the objective function relationship between the vehicle body angle and the at least one vehicle driving parameter based on the parameter value of each vehicle driving parameter in each set of driving parameter sets and the angle values of multiple sets of vehicle body angles comprises: Constructing an undetermined polynomial function for representing the functional relationship between the vehicle body angle and the at least one vehicle driving parameter, wherein coefficients in the undetermined polynomial function are unknown values; Based on the parameter values of each vehicle driving parameter in each set of driving parameter sets and the angle values of multiple sets of vehicle body angles, the coefficient values of each coefficient in the undetermined polynomial function are fitted by using the least square method; Substitute the coefficient value of each coefficient in the undetermined polynomial function into the undetermined polynomial function to obtain a target polynomial function for representing the functional relationship between the vehicle body angle and the at least one vehicle driving parameter.
4. The method for predicting vehicle body angle according to claim 1, characterized in that: Each set of the driving parameter sets includes: a speed value of the vehicle speed, an opening value of the throttle opening, and an opening value of the brake opening; The angle values of each set of vehicle body angles include: the angle value of the vehicle body pitch angle; The step of fitting the objective function relationship between the vehicle body angle and the at least one vehicle driving parameter based on the parameter value of each vehicle driving parameter in each set of driving parameter sets and the angle values of multiple sets of vehicle body angles comprises: Based on the speed values of the vehicle speed, the opening values of the throttle opening and the brake opening in each set of driving parameter sets and multiple sets of angle values of the vehicle body pitch angle, an objective function relationship between the vehicle body pitch angle and the vehicle speed, the throttle opening and the brake opening is fitted.
5. The method for predicting vehicle body angle according to claim 1, characterized in that: The step of obtaining multiple sets of driving parameter sets and multiple sets of angle values of vehicle body angles at the most recent multiple sampling moments includes: Obtaining multiple sets of driving parameter sets of the vehicle at multiple recent sampling moments, wherein the sampling moments are sampling time points corresponding to the collection of the driving parameter sets; Obtaining at least one set of angle values of vehicle body angles collected by the vehicle within a time period corresponding to the plurality of sampling moments; Based on the at least one set of angle values of the vehicle body angle, linear interpolation is used to construct multiple sets of angle values of the vehicle body angle at the multiple sampling moments.
6. The method for predicting the vehicle body angle according to claim 5, characterized in that: Before obtaining multiple sets of driving parameter sets of the vehicle at the latest multiple sampling moments, it also includes: Each time a set of driving parameter sets of a vehicle is collected, the currently collected driving parameter set is stored at the end of the target queue, wherein the target queue can store a maximum of a set number of driving parameter sets, and the target queue is a queue that supports first-in-first-out; The step of obtaining multiple sets of driving parameter sets of the vehicle at the most recent multiple sampling moments includes: When there is a newly added driving parameter set in the target queue and the number of driving parameter sets in the target queue reaches the set number, multiple sets of driving parameter sets stored in the target queue are obtained, and the multiple sets of driving parameter sets are multiple sets of driving parameter sets for the vehicle at the most recent multiple sampling moments.
7. A device for predicting vehicle body angle, characterized in that: include: A data acquisition unit, used to obtain multiple sets of driving parameter sets and multiple sets of angle values of vehicle body angles at multiple recent sampling moments, each set of the driving parameter sets including a parameter value of at least one driving parameter of the vehicle; a function fitting unit, configured to fit an objective function relationship between the vehicle body angle and the at least one vehicle driving parameter based on the parameter value of each vehicle driving parameter in each set of driving parameter sets and the angle values of multiple sets of vehicle body angles; The angle prediction unit is used to determine the predicted angle value of the vehicle body angle based on the objective function relationship and the parameter value of each vehicle driving parameter in the driving parameter set collected most recently.
8. A computer program product, characterized in that The method comprises computer-readable instructions, which, when executed on a vehicle-mounted device, enable the vehicle-mounted device to implement the method for predicting a vehicle body angle as claimed in any one of claims 1 to 6.
9. A computer storage medium, characterized in that The computer storage medium carries one or more computer programs, and when the one or more computer programs are executed by the vehicle-mounted device, the vehicle-mounted device can implement the method for predicting the vehicle body angle as described in any one of claims 1 to 6.
10. A vehicle-mounted device, characterized in that: The invention comprises at least one vehicle-mounted controller and a memory connected to the vehicle-mounted controller, wherein: The memory is used to store computer programs; The on-vehicle controller is used to execute the computer program so that the on-vehicle device can implement the method for predicting the vehicle body angle as described in any one of claims 1 to 6.