Test method, device and equipment of rotor hub based on model predictive controller and medium
By using a model predictive controller-based hub testing method, the control sequence is optimized using a simulation platform and a model predictive controller to automatically obtain hub test results. This solves the problems of cumbersome testing process and manual intervention in existing technologies, and achieves efficient and reliable hub testing.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- GUANGXI UNIV
- Filing Date
- 2025-04-09
- Publication Date
- 2026-07-21
AI Technical Summary
The process of obtaining the results of the existing target vehicle's wheel rotation test is cumbersome, consumes a lot of human resources and time, and is easily affected by human intervention, resulting in low efficiency.
A model predictive controller-based hub test method is adopted. The road files and vehicle dynamics models are processed through a simulation platform, and the model predictive controller is used to process the speed sequence and torque control values. The control sequence is optimized by combining the conjugate gradient method, and the hub test results are automatically obtained.
It reduces the time required to obtain test results, improves the efficiency and reliability of test results, avoids the influence of human intervention, and makes the results more accurate.
Smart Images

Figure CN120469208B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of hub testing technology, and in particular to hub testing methods, apparatus, equipment and media based on model predictive controllers. Background Technology
[0002] In the automotive manufacturing industry, wheel rotation testing is an essential step in ensuring that vehicle performance and quality meet standards. The results of wheel rotation testing, simply referred to as wheel rotation test results, help automakers improve any existing problems.
[0003] However, the current process for obtaining the wheel rotation test results of target vehicles is cumbersome, which is not conducive to improving the efficiency of obtaining wheel rotation test results. This is because existing technologies mainly use manual methods to obtain the wheel rotation test results of target vehicles. Manual methods consume a lot of human and time resources, increase the time required to obtain the wheel rotation test results of target vehicles, and are easily affected by human intervention. Therefore, they are not conducive to improving the efficiency of obtaining wheel rotation test results. Summary of the Invention
[0004] This invention provides a model predictive controller-based method, apparatus, computer device, and storage medium for hub testing, in order to solve the technical problem that the process of obtaining hub test results for existing target vehicles is cumbersome and not conducive to improving the efficiency of hub test result acquisition.
[0005] Firstly, a hub testing method based on a model predictive controller is provided, including: Obtain the road files corresponding to the test conditions, import the road files into the simulation platform, process the road files through the simulation platform, and obtain the simulation environment; Import the vehicle dynamics model corresponding to the target vehicle into the simulation environment, and run the vehicle dynamics model in the simulation environment; Read the speed sensor data of the vehicle dynamics model at the current moment; Obtain the current speed value from the speed sensor data at the current moment, obtain the target speed sequence from the operating condition file, and input the target speed sequence and the current speed value into the model predictive controller; The model predictive controller processes the target velocity sequence and the current velocity value to obtain the control sequence for the next moment. The conjugate gradient method is used to update the control sequence based on the gradient information to obtain the updated control sequence. The updated control sequence is input into the cost function to obtain the cost value. When the cost value is minimized, the updated control sequence is selected as the optimal control sequence. In the optimal control sequence, the torque control value corresponding to each time point is read, the torque control value corresponding to each time point is processed, the vehicle speed corresponding to each time point is obtained, the current speed curve is plotted based on each time point and the vehicle speed corresponding to each time point, the target speed curve is plotted based on the target speed sequence, and the average error and maximum error value between the current speed curve and the target speed curve are obtained. When the average error is less than the first preset value and the maximum error value is less than the second preset value, the driving range corresponding to the current speed curve is selected as the target vehicle's wheel rotation test result.
[0006] Furthermore, the step of importing the vehicle dynamics model corresponding to the target vehicle into the simulation environment and running the vehicle dynamics model in the simulation environment includes: Obtain the model file, and from the model file, obtain the vehicle dynamics model corresponding to the target vehicle; Import the vehicle dynamics model corresponding to the target vehicle into the simulation environment, and run the vehicle dynamics model in the simulation environment.
[0007] Furthermore, the reading of the vehicle dynamics model's speed sensor data at the current moment includes: Obtain operational information from the vehicle dynamics model; Obtain and execute the read command, and read the speed sensor data of the vehicle dynamics model at the current moment from the running information.
[0008] Further, the step of obtaining the current speed value from the current speed sensor data, obtaining the target speed sequence from the operating condition file, and inputting the target speed sequence and the current speed value into the model prediction controller includes: Obtain the current speed value from the current speed sensor data, obtain the operating condition file, and obtain the target speed sequence from the operating condition file; Obtain input instructions, execute input instructions, and input the target velocity sequence and current velocity value into the model prediction controller.
[0009] Further, the process of using a model-predictive controller to process the target velocity sequence and the current velocity value to obtain the control sequence for the next time step, employing the conjugate gradient method to update the control sequence based on gradient information, and inputting the updated control sequence into a cost function to obtain the cost value, wherein when the cost value is minimized, the updated control sequence is selected as the optimal control sequence, including: The model predicts the controller to process the target velocity sequence and the current velocity value, obtains the control sequence for the next time step, and acquires the gradient information of the cost function with respect to the control sequence. The conjugate gradient method is used to update the control sequence based on the gradient information, and the updated control sequence is then input into the cost function to obtain the cost value. When the cost value is minimized, the updated control sequence is selected as the optimal control sequence.
[0010] Further, in the optimal control sequence, the torque control value corresponding to each time point is read, processed, and the vehicle speed corresponding to each time point is obtained. Based on each time point and the vehicle speed corresponding to each time point, the current speed curve is plotted, and the target speed curve is plotted based on the target speed sequence. The average error and maximum error value between the current speed curve and the target speed curve are obtained. When the average error is less than a first preset value and the maximum error value is less than a second preset value, the driving range corresponding to the current speed curve is selected as the target vehicle's wheel rotation test result, including: In the optimal control sequence, the torque control value corresponding to each time point is read and transmitted to the control system of the vehicle dynamics model. The control system of the vehicle dynamics model processes the torque control value corresponding to each time point to obtain the vehicle speed corresponding to each time point. Based on each time point and the vehicle speed corresponding to each time point, the current speed curve is plotted. Plot the target speed curve based on the target speed sequence, obtain the error value between the current speed curve and the target speed curve at each sampling point, add the absolute values of the error values at each sampling point to obtain the total error, divide the total error by the number of sampling points to obtain the average error between the current speed curve and the target speed curve, obtain the maximum value among the absolute values of the error values at each sampling point, select the maximum value as the maximum error value between the current speed curve and the target speed curve, when the average error is less than the first preset value and the maximum error value is less than the second preset value, select the driving range corresponding to the current speed curve as the target vehicle's wheel rotation test result.
[0011] Further, in the optimal control sequence, the torque control value corresponding to each time point is read, the torque control value corresponding to each time point is processed to obtain the vehicle speed corresponding to each time point, and the current speed curve is plotted based on each time point and the vehicle speed corresponding to each time point. The target speed curve is plotted based on the target speed sequence, and the average error and maximum error value between the current speed curve and the target speed curve are obtained. When the average error is less than a first preset value and the maximum error value is less than a second preset value, the driving range corresponding to the current speed curve is selected as the target vehicle's wheel rotation test result. The wheel rotation test method includes: Create a display window to show the hub test results.
[0012] Secondly, a hub testing device based on a model predictive controller is provided, comprising: The acquisition module is used to acquire the road files corresponding to the test conditions, import the road files into the simulation platform, and process the road files through the simulation platform to obtain the simulation environment. The runtime module is used to import the vehicle dynamics model corresponding to the target vehicle into the simulation environment and run the vehicle dynamics model in the simulation environment. The reading module is used to read the speed sensor data of the vehicle dynamics model at the current moment; The module is used to obtain the current speed value from the speed sensor data at the current moment, obtain the target speed sequence from the working condition file, and input the target speed sequence and the current speed value into the model prediction controller; The selection module is used to process the target velocity sequence and the current velocity value through the model predictive controller to obtain the control sequence of the next moment. The conjugate gradient method is used to update the control sequence according to the gradient information to obtain the updated control sequence. The updated control sequence is input into the cost function to obtain the cost value. When the cost value is minimized, the updated control sequence is selected as the optimal control sequence. The testing module is used to read the torque control value corresponding to each time point in the optimal control sequence, process the torque control value corresponding to each time point to obtain the vehicle speed corresponding to each time point, draw the current speed curve based on each time point and the vehicle speed corresponding to each time point, draw the target speed curve based on the target speed sequence, and obtain the average error and maximum error value between the current speed curve and the target speed curve. When the average error is less than the first preset value and the maximum error value is less than the second preset value, the driving range corresponding to the current speed curve is selected as the wheel rotation test result of the target vehicle.
[0013] Thirdly, a computer device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps of the above-described hub test method.
[0014] Fourthly, a computer-readable storage medium is provided, which stores a computer program that, when executed by a processor, implements the steps of the above-described hub test method.
[0015] This application provides a model predictive controller-based hub testing method, apparatus, computer device, and storage medium. The advantages are twofold: First, in the optimal control sequence, the torque control value corresponding to each time point is read and processed to obtain the vehicle speed at each time point. Based on each time point and its corresponding vehicle speed, a current speed curve is plotted, and a target speed curve is plotted based on the target speed sequence. The average error and maximum error between the current speed curve and the target speed curve are obtained. When the average error is less than a first preset value and the maximum error is less than a second preset value, the driving range corresponding to the current speed curve is selected as the hub test result of the target vehicle. Since no manual acquisition is required, the acquisition time of the target vehicle's hub test results is reduced, which is beneficial to improving the acquisition efficiency of the target vehicle's hub test results. Second, since the hub test results are automatically acquired, they are not affected by manual intervention, which is beneficial to improving the reliability of the acquired target vehicle's hub test results. Attached Figure Description
[0016] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the description of the embodiments of the present invention will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0017] Figure 1 This is a schematic diagram of an application environment for a hub testing method according to an embodiment of the present invention; Figure 2 This is a schematic flowchart of a hub testing method provided in an embodiment of the present invention; Figure 3 yes Figure 2 A flowchart illustrating a specific implementation of step S23; Figure 4 yes Figure 2 A schematic diagram of a specific implementation method for step S25; Figure 5 yes Figure 2 A schematic diagram of a specific implementation method for step S26; Figure 6 This is a schematic diagram of the structure of a hub testing device in one embodiment of the present invention; Figure 7 This is a schematic diagram of the structure of a computer device according to an embodiment of the present invention; Figure 8 This is an example diagram of the target vehicle provided in one embodiment of the present invention. Detailed Implementation
[0018] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0019] Please see Figure 1 , Figure 1 This is a schematic diagram illustrating an application environment of the hub testing method according to an embodiment of the present invention. The hub testing method provided in this embodiment of the present invention can be applied to, for example... Figure 1 In this application environment, the client communicates with the server via a network.
[0020] The server obtains the road files corresponding to the test conditions through the client, imports the road files into the simulation platform, processes the road files through the simulation platform, and obtains the simulation environment. Import the vehicle dynamics model corresponding to the target vehicle into the simulation environment, and run the vehicle dynamics model in the simulation environment; Read the speed sensor data of the vehicle dynamics model at the current moment; Obtain the current speed value from the speed sensor data at the current moment, obtain the target speed sequence from the operating condition file, and input the target speed sequence and the current speed value into the model predictive controller; The model predictive controller processes the target velocity sequence and the current velocity value to obtain the control sequence for the next moment. The conjugate gradient method is used to update the control sequence based on the gradient information to obtain the updated control sequence. The updated control sequence is input into the cost function to obtain the cost value. When the cost value is minimized, the updated control sequence is selected as the optimal control sequence. In the optimal control sequence, the torque control value corresponding to each time point is read, the torque control value corresponding to each time point is processed, the vehicle speed corresponding to each time point is obtained, the current speed curve is plotted based on each time point and the vehicle speed corresponding to each time point, the target speed curve is plotted based on the target speed sequence, and the average error and maximum error value between the current speed curve and the target speed curve are obtained. When the average error is less than the first preset value and the maximum error value is less than the second preset value, the driving range corresponding to the current speed curve is selected as the target vehicle's wheel rotation test result.
[0021] The beneficial effects of the above-mentioned hub test method, apparatus, equipment, and medium are twofold. Firstly, in the optimal control sequence, the torque control value corresponding to each time point is read, processed, and the vehicle speed corresponding to each time point is obtained. Based on each time point and the corresponding vehicle speed, the current speed curve is plotted, and the target speed curve is plotted based on the target speed sequence. The average error and maximum error value between the current speed curve and the target speed curve are obtained. When the average error is less than a first preset value and the maximum error value is less than a second preset value, the driving range corresponding to the current speed curve is selected as the hub test result of the target vehicle. Since no manual acquisition is required, the acquisition time of the hub test result of the target vehicle is reduced, which is conducive to improving the acquisition efficiency of the hub test result of the target vehicle. Secondly, since the hub test result is automatically acquired, it is not affected by human intervention, which is conducive to improving the reliability of the acquired hub test result of the target vehicle.
[0022] The device running the client is referred to as the client device.
[0023] Among them, the equipment that runs the server is referred to as: server equipment.
[0024] Client devices include, but are not limited to, smartphones, personal computers, vehicle networking terminals, tablets, and portable wearable devices.
[0025] The server-side equipment can be implemented using a standalone server or a server cluster consisting of multiple servers. The invention will now be described in detail through specific embodiments.
[0026] Please see Figure 2 , Figure 2 A schematic flowchart of a hub testing method provided in an embodiment of the present invention includes the following steps: S21. Obtain the road file corresponding to the test condition, import the road file into the simulation platform, process the road file through the simulation platform, and obtain the simulation environment. For example, the road file corresponding to the test condition is obtained, the road file is imported into the simulation platform, and the simulation platform processes the road file to obtain the simulation environment, including: The Chinese light vehicle driving cycle or the world light vehicle test cycle was selected as the test condition. Obtain the road files corresponding to the test conditions, import the road files into the simulation platform, process the road files through the simulation platform, and obtain the simulation environment.
[0027] The China Light Vehicle Test Cycle is a testing standard developed in China specifically for light-duty vehicles. The China Light Vehicle Test Cycle mainly includes the following components: Urban Driving Conditions: Simulates driving conditions on urban roads, with a speed limit of 50km / h, covering frequent acceleration and deceleration processes to reflect the characteristics of urban congestion and frequent starts and stops.
[0028] Suburban driving conditions: Simulate driving conditions on suburban roads, with a speed limit of 80km / h, and test the performance of the target vehicle under suburban conditions.
[0029] High-speed driving conditions: Simulate driving conditions on a highway with a speed limit of 100km / h, and test the target vehicle's range performance under high-speed conditions.
[0030] The World Light Vehicles Test Cycle (WLC) is an international automotive evaluation standard. It aims to provide a unified testing benchmark for light vehicles worldwide to measure their fuel consumption, emissions levels, and all-electric driving range. The WLC comprises the following components: Low-speed driving conditions: Simulates urban congestion and low-speed driving, covering frequent start-stop and acceleration / deceleration processes.
[0031] Medium-speed driving mode: Simulates driving conditions on suburban or rural roads, with moderate speeds and covering a certain amount of acceleration, deceleration, and turning processes.
[0032] High-speed driving mode: Simulates driving conditions on highways, with higher vehicle speeds, including stable cruising and a small amount of acceleration and deceleration.
[0033] Ultra-high speed condition: Simulates the extreme driving conditions of the target vehicle on the highway.
[0034] S22, Import the vehicle dynamics model corresponding to the target vehicle into the simulation environment, and run the vehicle dynamics model in the simulation environment; The step of importing the vehicle dynamics model corresponding to the target vehicle into the simulation environment and running the vehicle dynamics model in the simulation environment includes: Obtain the model file, and from the model file, obtain the vehicle dynamics model corresponding to the target vehicle; Import the vehicle dynamics model corresponding to the target vehicle into the simulation environment, and run the vehicle dynamics model in the simulation environment.
[0035] For example, the vehicle dynamics model is as follows: in, For traction force; For air resistance, It is an inertial force; For slope force, For rolling resistance; in, air density; This is the drag coefficient; The projected area of the vehicle in the direction of motion; Real-time vehicle speed; For acceleration; For vehicle quality; This is the gravity coefficient; Slope; This is the rolling resistance coefficient.
[0036] Here, "aero" refers to the air quality level, and "grade" refers to the slope, i.e., the degree of inclination of the terrain.
[0037] Here, tr is the identifier for traction control system. Traction control system is an abbreviation of Traction Control.
[0038] Where rr is the identifier for scrolling. Where i is the identifier for inertia.
[0039] Here, sin represents the sine function.
[0040] refer to Figure 8 , Figure 8 This is an example diagram of the target vehicle provided in one embodiment of the present invention.
[0041] Figure 8 This shows the force situation of the target vehicle when the vehicle dynamics model is applied to it.
[0042] exist Figure 8 middle, For slope, For traction force, For slope force, For rolling resistance, It is an inertial force. This refers to air resistance.
[0043] Gradient force is the force acting on a target vehicle when it travels on a slope. When the target vehicle is climbing a slope, the gradient force acts as a resistance to its motion, causing it to slow down. When the target vehicle is going downhill, the gradient force will push it to accelerate.
[0044] S23, Read the speed sensor data of the vehicle dynamics model at the current moment; S24, obtain the current speed value from the speed sensor data at the current moment, obtain the target speed sequence from the operating condition file, and input the target speed sequence and the current speed value into the model predictive controller; The step of obtaining the current speed value from the current speed sensor data, obtaining the target speed sequence from the operating condition file, and inputting the target speed sequence and the current speed value into the model prediction controller includes: Obtain the current speed value from the current speed sensor data, obtain the operating condition file, and obtain the target speed sequence from the operating condition file; Obtain input instructions, execute input instructions, and input the target velocity sequence and current velocity value into the model prediction controller.
[0045] S25, the target velocity sequence and the current velocity value are processed by the model predictive controller to obtain the control sequence for the next moment of the current moment. The conjugate gradient method is used to update the control sequence according to the gradient information to obtain the updated control sequence. The updated control sequence is input into the cost function to obtain the cost value. When the cost value is minimized, the updated control sequence is selected as the optimal control sequence. Specifically, the model predictive controller processes the target velocity sequence and the current velocity value, and can predict the control sequence for the next moment after the current moment. The next moment after the current moment refers to the point in time immediately following the current moment on the timeline.
[0046] For ease of explanation, let's take a 1-minute interval between the current moment and the next moment as an example, as follows: For example, if the current time is 9:00 AM, the next time will be 9:01 AM.
[0047] For example, if the current time is 3 PM, the next time will be 3:01 PM.
[0048] For ease of explanation, let's take a 30-second interval between the current moment and the next moment as an example, as follows: For example, if the current time is 5 p.m., the next time will be 5:30 p.m.
[0049] For example, if the current time is 6 PM, the next time will be 6:30 PM.
[0050] The conjugate gradient method is used to update the control sequence based on the gradient information, resulting in the updated control sequence, which includes: By combining Newton's method with the conjugate gradient method, the control sequence is updated based on the gradient information, resulting in the updated control sequence.
[0051] The conjugate gradient method is an iterative algorithm used to solve linear equation systems or optimization problems. Its core idea is to utilize the gradient information of the cost function to progressively generate a set of conjugate directions, and then search along these directions to find the optimal control sequence.
[0052] Model Predictive Controller (MPC) is a control algorithm. During target velocity sequence tracking, MPC predicts future system states and outputs in real time and optimizes control inputs to achieve optimal trajectory tracking. However, MPC has high computational complexity. Combining Newton's method with the conjugate gradient method can significantly improve the accuracy of MPC in tracking target velocity sequences. This is because Newton's method uses the second derivative of the objective function to construct the search direction, resulting in fast convergence, especially when approaching the optimal solution. The conjugate gradient method combines the simplicity of the steepest descent method with the fast convergence of Newton's method. By using the first derivative information to construct conjugate directions, it avoids repeated searches in the same direction and eliminates the need to directly calculate and store the Hessian matrix, reducing computational load. Therefore, combining Newton's method with the conjugate gradient method maintains computational efficiency and quickly finds the optimal control sequence. The optimal control sequence makes the vehicle's control input more accurate, improving the accuracy of tracking the target velocity sequence and thus enhancing speed tracking precision.
[0053] The optimization algorithm employed by the Model Predictive Controller (MMC) combines Newton's method with the conjugate gradient method. Newton's method utilizes second-order derivative information, enabling faster convergence to the vicinity of the optimal solution. The conjugate gradient method demonstrates excellent performance when solving large-scale linear equation systems. Compared to the computationally intensive nature of traditional quadratic programming optimization algorithms in each control cycle, the MMC's combination of Newton's method and the conjugate gradient method significantly reduces computational load and increases computational speed, thus better meeting the demands of real-time control.
[0054] Furthermore, traditional quadratic programming optimization algorithms, such as those used in traditional model predictive controllers (MMDCs), are primarily designed for processor platforms and are unsuitable for embedded systems. In contrast, MDCs employ a combination of Newton's method and the conjugate gradient method, making them suitable for embedded systems. Newton's method, with its rapid convergence, significantly improves the solution efficiency of MDCs, while the conjugate gradient method avoids directly calculating and storing large matrices, thereby reducing the computational complexity and memory footprint of MDCs. This combination enables MDCs to operate more efficiently and in real-time on resource-constrained embedded systems, while maintaining their performance and robustness.
[0055] The cost function serves as an indicator for evaluating the quality of the control strategy, guiding the conjugate gradient method to find the optimal control sequence. The cost function includes a state error term and a control input term. The state error term represents the error between the target value and the actual value, while the control input term represents the cost of executing the control sequence.
[0056] The specific form of the cost function is usually designed based on the characteristics of the system and the control objective. The specific form of the cost function can be adjusted on its own, so there is no restriction on the specific form of the cost function here.
[0057] S26, in the optimal control sequence, read the torque control value corresponding to each time point, process the torque control value corresponding to each time point to obtain the vehicle speed corresponding to each time point, draw the current speed curve based on each time point and the vehicle speed corresponding to each time point, draw the target speed curve based on the target speed sequence, obtain the average error and maximum error value between the current speed curve and the target speed curve, when the average error is less than the first preset value and the maximum error value is less than the second preset value, select the driving range corresponding to the current speed curve as the target vehicle's wheel rotation test result.
[0058] Specifically, when the average error is less than the first preset value and the maximum error is less than the second preset value, it indicates that the speed tracking error is effectively controlled within the preset range, the speed tracking accuracy is high, and the requirements of the wheel-turning test are met. This also indicates that the target vehicle can very accurately follow the target speed curve during driving, reducing the additional energy consumption that may be caused by speed fluctuations. This precise speed control makes the energy consumption of the target vehicle in the wheel-turning test closer to the actual driving state, thus the tested range is more accurate and reliable, and can more realistically reflect the target vehicle's range performance in actual use. Selecting the range corresponding to the current speed curve as the wheel-turning test result of the target vehicle can intuitively reflect the target vehicle's range capability under simulated real road conditions. In the optimal control sequence, the torque control value corresponding to each time point is read to improve the operating efficiency and stability of the target vehicle. By precisely controlling the torque, it can be ensured that the target vehicle maintains its optimal working state during operation, reducing unnecessary energy loss and thus improving operating efficiency.
[0059] The current speed curve clearly shows the target vehicle's acceleration, deceleration, and constant speed driving capabilities under different operating conditions. This is crucial for evaluating and optimizing the target vehicle's power performance, fuel economy, and driving comfort.
[0060] In the optimal control sequence, the torque control value corresponding to each time point is read, processed, and the vehicle speed corresponding to each time point is obtained. Based on each time point and the vehicle speed corresponding to each time point, a current speed curve is plotted. Based on the target speed sequence, a target speed curve is plotted. The average error and maximum error value between the current speed curve and the target speed curve are obtained. When the average error is less than a first preset value and the maximum error value is less than a second preset value, the driving range corresponding to the current speed curve is selected as the target vehicle's wheel rotation test result. The wheel rotation test method includes: Create a display window to show the hub test results.
[0061] The results of the hub test show that researchers can identify potential performance bottlenecks and make targeted optimizations to improve the driving experience and safety of the target vehicle.
[0062] In this embodiment of the invention, the beneficial effects are twofold. Firstly, in the optimal control sequence, the torque control value corresponding to each time point is read, processed, and the vehicle speed corresponding to each time point is obtained. Based on each time point and the vehicle speed corresponding to each time point, the current speed curve is plotted, and the target speed curve is plotted based on the target speed sequence. The average error and maximum error value between the current speed curve and the target speed curve are obtained. When the average error is less than a first preset value and the maximum error value is less than a second preset value, the driving range corresponding to the current speed curve is selected as the target vehicle's wheel rotation test result. Since no manual acquisition is required, the acquisition time of the target vehicle's wheel rotation test result is reduced, which is beneficial to improving the acquisition efficiency of the target vehicle's wheel rotation test result. Secondly, since the wheel rotation test result is automatically acquired, it is not affected by manual intervention, which is beneficial to improving the reliability of the acquired target vehicle's wheel rotation test result.
[0063] Please see Figure 3 , Figure 3 yes Figure 2 A detailed flowchart of a specific implementation method for step S23 is described below: S31, Obtain the operational information of the vehicle dynamics model; S32, Obtain and execute the read command, and read the speed sensor data of the vehicle dynamics model at the current moment from the running information.
[0064] In this embodiment of the invention, reading the speed sensor data of the vehicle dynamics model at the current moment is beneficial for a comprehensive understanding of the operating status of the vehicle dynamics model.
[0065] Please see Figure 4 , Figure 4 yes Figure 2 A detailed flowchart of a specific implementation method for step S25 is described below: S41, by using the model to predict the controller to process the target velocity sequence and the current velocity value, the control sequence for the next moment is obtained, and the gradient information of the cost function with respect to the control sequence is obtained; S42, using the conjugate gradient method, the control sequence is updated based on the gradient information to obtain the updated control sequence. The updated control sequence is then input into the cost function to obtain the cost value. When the cost value is minimized, the updated control sequence is selected as the optimal control sequence.
[0066] In this embodiment of the invention, when the cost value is at its minimum, it indicates that the performance of the updated control sequence is the best. Selecting the updated control sequence as the optimal control sequence can ensure the stability and reliability of the optimal control sequence.
[0067] Please see Figure 5 , Figure 5 yes Figure 2 A detailed flowchart of a specific implementation method for step S26 is described below: S51, in the optimal control sequence, read the torque control value corresponding to each time point, transmit the torque control value corresponding to each time point to the control system of the vehicle dynamics model, process the torque control value corresponding to each time point through the control system of the vehicle dynamics model, obtain the vehicle speed corresponding to each time point, and draw the current speed curve based on each time point and the vehicle speed corresponding to each time point; S52, draw the target speed curve according to the target speed sequence, obtain the error value of the current speed curve and the target speed curve at each sampling point, add the absolute values of the error values at each sampling point to obtain the total error, divide the total error by the number of sampling points to obtain the average error between the current speed curve and the target speed curve, obtain the maximum value among the absolute values of the error values at each sampling point, select the maximum value as the maximum error value between the current speed curve and the target speed curve, when the average error is less than the first preset value and the maximum error value is less than the second preset value, select the driving range corresponding to the current speed curve as the target vehicle's wheel rotation test result.
[0068] For ease of explanation, the following example is provided: For example, there are multiple sampling points, namely sampling point 1, sampling point 2, and sampling point 3; The current velocity curve has a value of A1 at sampling point 1, a value of A2 at sampling point 2, and a value of A3 at sampling point 2. The value of the target velocity curve at sampling point 1 is B1, the value of the target velocity curve at sampling point 2 is B2, and the value of the target velocity curve at sampling point 2 is B3. The absolute value of the error values between A1 and B1 is C1, the absolute value of the error values between A2 and B2 is C2, and the absolute value of the error values between A3 and B3 is C3. Adding C1, C2, and C3 together gives the total error. Dividing this total error by the number of sampling points gives the average error between the current speed curve and the target speed curve. The maximum value among C1, C2, and C3 is selected as the maximum error value between the current speed curve and the target speed curve.
[0069] In this embodiment of the invention, since there is no need to manually obtain the wheel rotation test results, the time required to obtain the wheel rotation test results of the target vehicle is reduced, which is beneficial to improving the efficiency of obtaining the wheel rotation test results of the target vehicle.
[0070] Please see Figure 6 , Figure 6 This is a schematic diagram of the structure of a hub testing device according to an embodiment of the present invention, as shown below. Figure 6 As shown, the hub testing device includes an acquisition module 101, an operation module 102, a reading module 103, a composition module 104, a selection module 105, and a testing module 106. Detailed descriptions of each functional module are as follows: The acquisition module 101 is used to acquire the road file corresponding to the test condition, import the road file into the simulation platform, process the road file through the simulation platform, and obtain the simulation environment. The running module 102 is used to import the vehicle dynamics model corresponding to the target vehicle into the simulation environment and run the vehicle dynamics model in the simulation environment. The reading module 103 is used to read the speed sensor data of the vehicle dynamics model at the current moment; Module 104 is used to obtain the current speed value from the speed sensor data at the current moment, obtain the target speed sequence from the working condition file, and input the target speed sequence and the current speed value into the model prediction controller; Module 105 is selected to process the target velocity sequence and the current velocity value through the model prediction controller to obtain the control sequence of the next moment. The conjugate gradient method is used to update the control sequence according to the gradient information to obtain the updated control sequence. The updated control sequence is input into the cost function to obtain the cost value. When the cost value is minimized, the updated control sequence is selected as the optimal control sequence. The test module 106 is used to read the torque control value corresponding to each time point in the optimal control sequence, process the torque control value corresponding to each time point to obtain the vehicle speed corresponding to each time point, draw the current speed curve based on each time point and the vehicle speed corresponding to each time point, draw the target speed curve based on the target speed sequence, obtain the average error and maximum error value between the current speed curve and the target speed curve, and when the average error is less than the first preset value and the maximum error value is less than the second preset value, the driving range corresponding to the current speed curve is selected as the wheel rotation test result of the target vehicle.
[0071] In this embodiment of the invention, the beneficial effects are twofold. Firstly, in the optimal control sequence, the torque control value corresponding to each time point is read, processed, and the vehicle speed corresponding to each time point is obtained. Based on each time point and the vehicle speed corresponding to each time point, the current speed curve is plotted, and the target speed curve is plotted based on the target speed sequence. The average error and maximum error value between the current speed curve and the target speed curve are obtained. When the average error is less than a first preset value and the maximum error value is less than a second preset value, the driving range corresponding to the current speed curve is selected as the target vehicle's wheel rotation test result. Since no manual acquisition is required, the acquisition time of the target vehicle's wheel rotation test result is reduced, which is beneficial to improving the acquisition efficiency of the target vehicle's wheel rotation test result. Secondly, since the wheel rotation test result is automatically acquired, it is not affected by manual intervention, which is beneficial to improving the reliability of the acquired target vehicle's wheel rotation test result.
[0072] For specific limitations on the hub testing device, please refer to the limitations on the hub testing method mentioned above, which will not be repeated here.
[0073] Each module in the aforementioned hub testing device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in the processor of a computer device in hardware form or independent of it, or stored in the memory of a computer device in software form, so that the processor can call and execute the corresponding operations of each module.
[0074] Please see Figure 7 , Figure 7 This is a schematic diagram of the structure of a computer device according to one embodiment of the present invention. In one embodiment, a computer device is provided, which is a server device or a client device, and its internal structure diagram can be as follows. Figure 7As shown, the computer device includes a processor, memory, network interface, display screen, and input devices connected via a system bus. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The network interface is used for communication with external devices. When the computer program is executed by the processor, it can implement the functions or steps of a model predictive controller-based hub testing method.
[0075] In one embodiment, a computer device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor.
[0076] It should be noted that the functions or steps that can be implemented by the computer-readable storage medium or computer device described above can be referred to the relevant descriptions of the foregoing method embodiments. To avoid repetition, they will not be described one by one here.
[0077] The processors mentioned above can be general-purpose processors, including central processing units (CPUs), graphics processing units (GPUs), and network processors (NPs); they can also be digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components.
[0078] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software may depend on the specific application and design constraints of the technical solution. Those skilled in the art may use different methods for each specific application to implement the described functions, but such implementation should not be considered beyond the scope of the embodiments of this disclosure.
Claims
1. A hub testing method based on a model predictive controller, characterized in that, include: Obtain the road files corresponding to the test conditions, import the road files into the simulation platform, process the road files through the simulation platform, and obtain the simulation environment; Import the vehicle dynamics model corresponding to the target vehicle into the simulation environment, and run the vehicle dynamics model in the simulation environment; Read the speed sensor data of the vehicle dynamics model at the current moment; Obtain the current speed value from the speed sensor data at the current moment, obtain the target speed sequence from the operating condition file, and input the target speed sequence and the current speed value into the model predictive controller; The model predictive controller processes the target velocity sequence and the current velocity value to obtain the control sequence for the next moment. The conjugate gradient method is used to update the control sequence based on the gradient information to obtain the updated control sequence. The updated control sequence is input into the cost function to obtain the cost value. When the cost value is minimized, the updated control sequence is selected as the optimal control sequence. In the optimal control sequence, the torque control value corresponding to each time point is read, the torque control value corresponding to each time point is processed, the vehicle speed corresponding to each time point is obtained, the current speed curve is plotted based on each time point and the vehicle speed corresponding to each time point, the target speed curve is plotted based on the target speed sequence, and the average error and maximum error value between the current speed curve and the target speed curve are obtained. When the average error is less than the first preset value and the maximum error value is less than the second preset value, the driving range corresponding to the current speed curve is selected as the target vehicle's wheel rotation test result.
2. The hub testing method according to claim 1, characterized in that, The step of importing the vehicle dynamics model corresponding to the target vehicle into the simulation environment and running the vehicle dynamics model in the simulation environment includes: Obtain the model file, and from the model file, obtain the vehicle dynamics model corresponding to the target vehicle; Import the vehicle dynamics model corresponding to the target vehicle into the simulation environment, and run the vehicle dynamics model in the simulation environment.
3. The hub testing method according to claim 1, characterized in that, The reading of the vehicle dynamics model's speed sensor data at the current moment includes: Obtain operational information from the vehicle dynamics model; Obtain and execute the read command, and read the speed sensor data of the vehicle dynamics model at the current moment from the running information.
4. The hub testing method according to claim 1, characterized in that, The step of obtaining the current speed value from the current speed sensor data, obtaining the target speed sequence from the operating condition file, and inputting the target speed sequence and the current speed value into the model prediction controller includes: Obtain the current speed value from the current speed sensor data, obtain the operating condition file, and obtain the target speed sequence from the operating condition file; Obtain input instructions, execute input instructions, and input the target velocity sequence and current velocity value into the model prediction controller.
5. The hub testing method according to claim 1, characterized in that, The process involves using a model predictive controller to process the target velocity sequence and the current velocity value to obtain the control sequence for the next time step. The conjugate gradient method is then used to update the control sequence based on gradient information, resulting in an updated control sequence. This updated control sequence is input into a cost function to obtain a cost value. When the cost value is minimized, the updated control sequence is selected as the optimal control sequence. This includes: The model predicts the controller to process the target velocity sequence and the current velocity value, obtains the control sequence for the next time step, and acquires the gradient information of the cost function with respect to the control sequence. The conjugate gradient method is used to update the control sequence based on the gradient information, and the updated control sequence is then input into the cost function to obtain the cost value. When the cost value is minimized, the updated control sequence is selected as the optimal control sequence.
6. The hub testing method according to claim 1, characterized in that, In the optimal control sequence, the torque control value corresponding to each time point is read, processed, and the vehicle speed corresponding to each time point is obtained. Based on each time point and the corresponding vehicle speed, the current speed curve is plotted, and the target speed curve is plotted based on the target speed sequence. The average error and maximum error value between the current speed curve and the target speed curve are obtained. When the average error is less than a first preset value and the maximum error value is less than a second preset value, the driving range corresponding to the current speed curve is selected as the target vehicle's wheel rotation test result, including: In the optimal control sequence, the torque control value corresponding to each time point is read and transmitted to the control system of the vehicle dynamics model. The control system of the vehicle dynamics model processes the torque control value corresponding to each time point to obtain the vehicle speed corresponding to each time point. Based on each time point and the vehicle speed corresponding to each time point, the current speed curve is plotted. Plot the target speed curve based on the target speed sequence, obtain the error value between the current speed curve and the target speed curve at each sampling point, add the absolute values of the error values at each sampling point to obtain the total error, divide the total error by the number of sampling points to obtain the average error between the current speed curve and the target speed curve, obtain the maximum value among the absolute values of the error values at each sampling point, select the maximum value as the maximum error value between the current speed curve and the target speed curve, when the average error is less than the first preset value and the maximum error value is less than the second preset value, select the driving range corresponding to the current speed curve as the target vehicle's wheel rotation test result.
7. The hub testing method according to claim 1, characterized in that, In the optimal control sequence, the torque control value corresponding to each time point is read, processed, and the vehicle speed corresponding to each time point is obtained. Based on each time point and the vehicle speed corresponding to each time point, the current speed curve is plotted. Based on the target speed sequence, the target speed curve is plotted. The average error and maximum error value between the current speed curve and the target speed curve are obtained. When the average error is less than a first preset value and the maximum error value is less than a second preset value, the driving range corresponding to the current speed curve is selected as the target vehicle's wheel rotation test result. The wheel rotation test method includes: Create a display window to show the hub test results.
8. A hub testing device based on a model predictive controller, characterized in that, include: The acquisition module is used to acquire the road files corresponding to the test conditions, import the road files into the simulation platform, and process the road files through the simulation platform to obtain the simulation environment. The runtime module is used to import the vehicle dynamics model corresponding to the target vehicle into the simulation environment and run the vehicle dynamics model in the simulation environment. The reading module is used to read the speed sensor data of the vehicle dynamics model at the current moment; The module is used to obtain the current speed value from the speed sensor data at the current moment, obtain the target speed sequence from the working condition file, and input the target speed sequence and the current speed value into the model prediction controller; The selection module is used to process the target velocity sequence and the current velocity value through the model predictive controller to obtain the control sequence of the next moment. The conjugate gradient method is used to update the control sequence according to the gradient information to obtain the updated control sequence. The updated control sequence is input into the cost function to obtain the cost value. When the cost value is minimized, the updated control sequence is selected as the optimal control sequence. The testing module is used to read the torque control value corresponding to each time point in the optimal control sequence, process the torque control value corresponding to each time point to obtain the vehicle speed corresponding to each time point, draw the current speed curve based on each time point and the vehicle speed corresponding to each time point, draw the target speed curve based on the target speed sequence, and obtain the average error and maximum error value between the current speed curve and the target speed curve. When the average error is less than the first preset value and the maximum error value is less than the second preset value, the driving range corresponding to the current speed curve is selected as the wheel rotation test result of the target vehicle.
9. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the steps of the hub testing method as described in any one of claims 1 to 7.
10. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by the processor, it implements the steps of the hub testing method as described in any one of claims 1 to 7.