A method for controlling vehicle climbing hills and the vehicle
By predicting the trend of changes in vehicle torque margin and controlling the vehicle to stand still when necessary, the problem of power interruption in traditional vehicle hill-climbing control is solved, improving hill-climbing safety and reliability, and ensuring driving safety.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- GREAT WALL MOTOR CO LTD
- Filing Date
- 2026-05-12
- Publication Date
- 2026-06-30
AI Technical Summary
Traditional vehicle hill-climbing control cannot promptly identify torque margin on long slopes, leading to a sudden interruption of power, which may cause the vehicle to roll back and affect driving safety and the driving experience.
By acquiring the target time-series data of the vehicle, the structured state-space sequence model and neural basis extended analysis model are used to predict the trend of torque margin change, determine whether the climbing requirements are met, and control the vehicle to stop when it is unable to continue climbing, so as to avoid power interruption.
It improves the safety and reliability of vehicles climbing hills, ensures the personal safety of drivers and passengers, and avoids passive vehicle slippage.
Smart Images

Figure CN122300501A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of vehicle control technology, and more specifically, to a method and vehicle for controlling a vehicle to climb a hill within the field of vehicle control technology. Background Technology
[0002] Currently, in the process of vehicle climbing, traditional vehicle climbing control, during the initial stage, controls the vehicle to start using a default torque control strategy. During the climbing process, related technologies generally employ fixed torque control. The problem with this climbing method is that when the current incline is long, the vehicle cannot promptly recognize the torque margin, which may lead to the rapid depletion of the torque margin during the climb, a sudden interruption of vehicle power, and even the vehicle rolling backwards under the influence of gravity. Summary of the Invention
[0003] This application provides a method and a vehicle for controlling vehicle climbing. The method can predict in advance whether the torque margin meets the vehicle's climbing requirements, thus identifying future power trends from the source. When the vehicle can no longer climb, controlling the vehicle to stand still avoids passive rolling caused by a sudden power interruption, improves the safety and reliability of the climbing process, and ensures the personal safety of the driver and passengers.
[0004] Firstly, a method for controlling a vehicle to climb a slope is provided. The method includes: when the vehicle is in a climbing condition, acquiring target time-series data of the vehicle, the target time-series data representing characteristic data related to the slope segment where the vehicle is located at multiple consecutive times including the current time; determining, based on the target time-series data, a torque margin score of the vehicle at the current time, and multiple margin change trends of the vehicle's torque within a predicted time window; determining, based on the margin score and the multiple margin change trends, whether the vehicle meets a preset climbing interruption condition; and controlling the vehicle to remain stationary when the vehicle meets the preset climbing interruption condition.
[0005] In the aforementioned technical solution, this application provides a method for controlling vehicle climbing. This method, during implementation, models the temporal data of slope characteristics within a historical time window to determine the vehicle's torque margin at the current moment and predict its future trend. It then determines whether the torque margin meets the vehicle's climbing requirements, thus identifying the future power change trend of the vehicle from the source. Furthermore, when the vehicle can no longer climb, it is immediately controlled to remain stationary, preventing the vehicle from passively rolling away due to a sudden interruption of power. This improves the safety and reliability of the vehicle's climbing process and ensures the personal safety of the driver and passengers.
[0006] Secondly, an apparatus for controlling vehicle climbing is provided. The apparatus includes: an acquisition module, configured to acquire target time-series data of the vehicle when the vehicle is in a climbing condition, the target time-series data representing characteristic data related to the slope segment where the vehicle is located at multiple consecutive time points including the current time; a determination module, configured to determine, based on the target time-series data, the torque margin score of the vehicle at the current time, and multiple margin change trends of the vehicle's torque within a prediction time window; the determination module is further configured to determine, based on the margin score and the multiple margin change trends, whether the vehicle meets a preset climbing interruption condition; and a control module, configured to control the vehicle to be stationary when the vehicle meets the preset climbing interruption condition.
[0007] Thirdly, a vehicle is provided, including a memory and a processor. The memory is used to store executable program code, and the processor is used to call and run the executable program code from the memory, causing the electronic device to perform the methods of the first aspect or any possible implementation thereof.
[0008] Fourthly, a computer program product is provided, comprising: computer program code, which, when run on a computer, causes the computer to perform the methods described in the first aspect or any possible implementation thereof.
[0009] Fifthly, a computer-readable storage medium is provided that stores computer program code, which, when executed on a computer, causes the computer to perform the methods described in the first aspect or any possible implementation thereof. Attached Figure Description
[0010] Figure 1 This is a schematic diagram of a vehicle climbing a hill, provided in an embodiment of this application. Figure 2 This is a schematic flowchart illustrating a method for controlling a vehicle to climb a hill, as provided in an embodiment of this application. Figure 3 This is a timing diagram illustrating a method for controlling a vehicle to climb a hill, as provided in an embodiment of this application. Figure 4 This is a schematic diagram of the structure of a slope feature determination model provided in an embodiment of this application; Figure 5 This is a schematic diagram of the structure of a slope prediction model provided in an embodiment of this application; Figure 6 This is a schematic diagram of the structure of a torque prediction model provided in an embodiment of this application; Figure 7This is a schematic flowchart illustrating another method for controlling a vehicle to climb a hill, as provided in an embodiment of this application. Figure 8 This is a schematic diagram of a device for controlling a vehicle to climb a slope, provided in an embodiment of this application. Figure 9 This is a schematic diagram of the structure of a vehicle provided in an embodiment of this application. Detailed Implementation
[0011] The technical solutions in this application will be clearly and thoroughly described below with reference to the accompanying drawings. In the description of the embodiments of this application, unless otherwise stated, " / " means "or," for example, A / B can mean A or B. "And / or" in the text is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, and B existing alone. Furthermore, in the description of the embodiments of this application, "multiple" refers to two or more than two.
[0012] Hereinafter, the terms "first" and "second" are used for descriptive purposes only and should not be construed as implying or suggesting relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature.
[0013] Before introducing the methods of the embodiments of this application, the following is a definition of the technical terms that may be involved in the embodiments of this application.
[0014] The Structured State Space Sequence Model (S4 model) is a deep learning architecture designed for efficient modeling of long sequences. Essentially, it is an improved long sequence modeling model based on the State Space Model (SSM). By imposing structured constraints on the state matrix, it discretizes and models continuous temporal features, capturing long-distance dependencies of ultra-long temporal sequences with low computational complexity. It also has the dual capabilities of global parallel training and serial real-time inference.
[0015] The Neural Basis Expansion Analysis for Interpretable Time Series Forecasting (N-BEATS) model is a pure deep learning time series forecasting model based on a fully connected multi-layer perceptron (MLP). By stacking residual blocks and forward and backward residual links, it decomposes the time series signal into an interpretable combination of basis functions, and the prediction result is the weighted sum of all basis functions.
[0016] The Neural Ordinary Differential Equation (Neural ODE) model is a type of model that combines deep learning with the theory of ordinary differential equations. Its core idea is to use ordinary differential equations to describe the hidden state of a neural network and model the time evolution of the hidden state as a continuous differential equation.
[0017] Margin: refers to the degree to which a certain margin is left in the design or measurement to allow for errors or uncertainties.
[0018] After explaining the technical terms used in the embodiments of this application, the application scenarios of these embodiments are described below. It should be understood that the embodiments of this application are mainly applied to hill-climbing scenarios, and the following will illustrate... Figure 1 Explain the application scenarios.
[0019] Figure 1 This is a schematic diagram of a vehicle climbing a hill, provided in an embodiment of this application.
[0020] For example, such as Figure 1 The diagram shows a scenario where vehicle 101 is in a climbing condition. When vehicle 101 is traveling on a road with continuous undulating slopes, the road surface gradient dynamically fluctuates with the terrain. Vehicle 101 needs to overcome the gravitational component and rolling resistance to maintain normal driving. At this time, vehicle 101 is determined to have entered a climbing condition.
[0021] Currently, during vehicle hill climbing, traditional hill climbing control, at the vehicle's initial stage, controls the vehicle to start using a default torque control strategy. During the hill climbing process, related technologies typically employ a fixed torque output strategy, which determines a fixed torque output based on the current instantaneous gradient to maintain the vehicle's current climbing state.
[0022] The problem with the climbing methods of related technologies is that the solutions only respond to the current instantaneous slope and cannot predict the vehicle's torque margin by considering the continuous changing trend of the slope. When the slope is long, the above methods may cause the vehicle's torque margin to be consumed prematurely, resulting in a sudden interruption of vehicle power and the risk of the vehicle rolling backward under the influence of gravity, which affects vehicle driving safety and driving experience.
[0023] In view of this, embodiments of this application provide a method for controlling a vehicle to climb a hill. This method can predict the trend of torque margin changes in the vehicle in advance and determine the current torque margin of the vehicle, and determine whether the torque margin meets the vehicle's climbing requirements, thus realizing the identification of the future power change trend of the vehicle from the source. Furthermore, when the vehicle can no longer climb the hill, it is immediately controlled to be stationary, which can avoid the vehicle's passive rolling caused by a sudden interruption of power, improve the safety and reliability of the vehicle's climbing process, and ensure the personal safety of the driver and passengers.
[0024] After introducing the application scenarios of the embodiments of this application, the following will be conducted through... Figure 2 The implementation process of the method in the embodiments of this application will be described in detail.
[0025] Figure 2 This is a schematic flowchart illustrating a method for controlling a vehicle to climb a hill, as provided in an embodiment of this application. It should be understood that this method is applied to any electronic control unit (ECU, or controller) in the vehicle. For example, the ECU can be a vehicle control unit (VCU), a body control module (BCM), etc. No specific limitation is made here regarding the ECU used to execute the embodiments of this application.
[0026] For example, such as Figure 2 As shown, the method 200 includes the following steps S201 to S204.
[0027] S201, when the vehicle is climbing, acquire the target time series data of the vehicle. The target time series data is used to represent the feature data related to the slope segment where the vehicle is located at multiple consecutive times including the current time.
[0028] It should be understood that the core of this application's embodiments lies in timely identifying the vehicle's torque margin during hill climbing and predicting whether the vehicle's power output is sufficient. To achieve this, the ECU can determine this through target timing data from the vehicle.
[0029] Torque margin at a given moment refers to the difference between the maximum torque that the vehicle's powertrain can output at that moment and the torque that the powertrain actually outputs at that moment. It reflects the remaining torque reserve of the vehicle at that moment. The larger the torque margin, the more additional torque the vehicle can utilize at that moment; conversely, the smaller the torque margin, the less additional torque the vehicle can utilize at that moment.
[0030] The target time series data mainly represents the feature data related to the slope segment where the vehicle is located at multiple consecutive moments, including the current moment. In other words, the target time series data essentially covers the feature data related to the slope segment at multiple consecutive moments within a fixed time window, specifically a historical time window. Optionally, the length of the fixed time window can be 30 seconds, or the time length corresponding to 100 sampling points. This application embodiment does not limit the length of the fixed time window.
[0031] For example, if the fixed time window is 30 seconds long, and the current time is t, then the target time series data is the feature data related to the slope section where the vehicle is located at multiple sampling times (i.e., multiple consecutive times) from t-30 to t, with the current time t as the endpoint.
[0032] A slope section refers to a continuous uphill section of road with a relatively uniform gradient or continuous undulations. The starting point of a slope section is where the road surface transitions from a flat or downhill slope to a continuous uphill slope, and the ending point is where the road surface reaches the crest of the slope and transitions back to a flat or downhill slope. The continuous road between the starting and ending points of a slope section constitutes one slope section. During a complete uphill journey, a vehicle may traverse multiple consecutive or intermittently distributed slope sections.
[0033] Optionally, the slope-related feature data included in the target time series data includes the cumulative slope distance, the estimated remaining distance from the current point to the top of the slope, the historical slope length distribution, the slope angle, the first-order rate of change of slope, the local maximum / minimum slope, the local slope fluctuation rate, the standard deviation of slope length, and the maximum slope change rate. The meaning and acquisition method of each feature data are explained below.
[0034] The cumulative slope distance refers to the total mileage of the slopes (i.e., slope segments) that the vehicle has traveled since the start of the current climbing operation. It represents the distance traveled by the vehicle during the current continuous climbing process. The controller can accumulate the mileage data of the vehicle in real time from the start time of the climbing operation to obtain the cumulative slope distance at each sampling time.
[0035] The estimated remaining distance from the current point to the top of the slope refers to the remaining travel distance from the vehicle's current position to the end of the slope (i.e., the top of the slope). The controller can calculate the difference in straight-line distance between the vehicle's current location and the coordinates of the slope's end point.
[0036] Historical slope length distribution refers to the statistical information on the lengths of continuous slope segments that the vehicle has already traversed during this climb, such as the mean, variance, and distribution range of the lengths of each slope segment already climbed. The controller can obtain the above-mentioned historical slope length distribution by recording the length of each slope segment in real time during the climb and calculating the statistical information.
[0037] The slope angle refers to the longitudinal slope of the road surface where the vehicle is located, that is, the angle between the road surface and the horizontal plane. The controller can obtain this information directly from a high-precision map. For example, the controller can obtain it directly from the Global Positioning System (GPS) or the Global Navigation Satellite System (GNSS).
[0038] The first-order rate of change of slope refers to the rate of change of slope with driving distance or time, and is used to reflect the steepness of the slope. The controller can obtain it by differential calculation using slope values and distances at multiple sampling times.
[0039] The maximum / minimum local slope values refer to the maximum and minimum slope values within a preset local slope segment window, reflecting the severity of the slope's undulation. The controller can calculate the extreme slope values within a fixed window by collecting local slope sequences in real time from sensors.
[0040] The standard deviation of slope length refers to the standard deviation calculated from the statistically analyzed samples of slope lengths. It characterizes the differences in length and dispersion of slope segments. After obtaining the actual length of each slope segment, the controller can perform standard deviation calculations to obtain the standard deviation of slope length.
[0041] The maximum gradient rate refers to the maximum value of the first-order rate of change of slope with driving distance or time. It is used to characterize the severity of sudden changes in road slope and reflects the degree of steep ascent and rapid slope change. After calculating the first-order rate of change of slope, the controller can select the maximum value of the first-order rate of change of slope as the maximum gradient rate.
[0042] Local slope volatility refers to the degree of slope undulation, used to characterize whether a road surface is a smooth, long slope or a bumpy slope with frequent ups and downs. The controller can use the mean square error of the slope sequence within a window as the local volatility.
[0043] For any given moment within a historical time window, the controller can synchronously calculate the characteristic data of each slope segment, thereby acquiring the target time series data composed of the characteristic data of each slope segment from multiple consecutive moments at the current moment.
[0044] It should be understood that the aforementioned slope-related feature data may come from different sensors or controllers, and the sampling frequencies and clock sources of different sensors or controllers may differ. To avoid data offset along the time axis, this embodiment aligns the collected data across various dimensions with timestamps, resamples the data across all dimensions to the same sampling frequency, and uses linear interpolation or spline interpolation methods to fill in missing points, ensuring complete alignment of all slope-related feature data at each moment. Furthermore, to ensure good prediction results, this embodiment ensures that each slope segment has no fewer than 20 data points when setting the sampling frequency. Based on this, the target time-series data covers sufficient historical information in the time dimension and encompasses various slope-related feature data in the spatial dimension, providing a reliable data foundation for accurate perception and prediction of torque margin.
[0045] S202, based on the target time series data, determines the torque margin score of the vehicle at the current moment, as well as the multiple margin change trends of the vehicle's torque within the prediction time window.
[0046] After obtaining the target time-series data for prediction, the controller can make predictions based on this data. Specifically, the predictions include the torque margin score of the vehicle at the current moment, as well as the multiple margin change trends of the vehicle's torque within the prediction time window.
[0047] The torque margin score at the current moment refers to a quantitative assessment of the remaining torque reserve of the vehicle's powertrain at the current moment. It reflects the safe margin level of available torque remaining after the vehicle's powertrain meets the current hill-climbing requirements. The higher the margin score, the greater the safe margin of available torque at the current moment; conversely, the lower the margin score, the smaller the safe margin of available torque at the current moment.
[0048] Multiple torque margin variation trends within a prediction time window refer to a set of dynamic patterns or prediction sequences showing how vehicle torque margin changes with time or driving distance within the prediction time window. It reflects the future trend of torque margin, such as an upward or downward trend.
[0049] It should be understood that multiple margin change trends mean that the forecast time window includes multiple time steps, and the number of margin change trends is the same as the number of time steps; that is, each time step corresponds to one margin change trend. Based on this, the margin change trends corresponding to multiple time steps constitute multiple margin change trends.
[0050] It should also be understood that for any time step within the forecast time window, the trend of margin change at that time step can be interpreted as the margin change rate at that time step, which can be calculated by comparing the margin at that time step with the margin at the previous time step. When the margin change rate at that time step is positive, it indicates that the margin at that time step has increased compared to the margin at the previous time step, therefore the margin change trend at that time step is upward; when the margin change rate at that time step is negative, it indicates that the margin at that time step has decreased compared to the margin at the previous time step, therefore the margin change trend at that time step is downward.
[0051] The prediction time window is specifically a future time window, that is, the time period corresponding to the prediction result. Optionally, the future time window can be set to the same length as the historical time window corresponding to the target time series data, or it can be flexibly set according to actual application needs. The starting point of the prediction time window is after the current moment, specifically including multiple future moments after the current moment.
[0052] Figure 3 This is a timing diagram illustrating a method for controlling a vehicle to climb a hill, as provided in an embodiment of this application.
[0053] For example, such as Figure 3 As shown, the current time is t3, the historical time window covers multiple consecutive times including t0 to t3, and the future time window covers multiple times including t4 to t7.
[0054] Specifically, the determination process for determining the torque margin score at the current moment and predicting the multiple margin change trends of torque within the predicted time window can be divided into three stages, which will be introduced one by one below.
[0055] In one possible implementation, based on target time-series data, the torque margin score of the vehicle at the current moment, and multiple margin change trends of the vehicle's torque within the prediction time window are determined, including: The target time series data is input into the slope feature determination model to obtain the slope feature vector. The slope feature vector is used to represent the pattern of change of the features of each driven slope over time, as well as the correlation between each slope feature and the energy consumption and torque margin of the vehicle. Input the target time series data into the slope prediction model to obtain multiple slope values for the vehicle within the prediction time window; Based on the slope feature vector and multiple slope values, the margin score and multiple margin change trends are determined.
[0056] The determination process consists of three stages: determining the slope feature vector, predicting multiple slope values, and determining the margin score and multiple margin change trends.
[0057] In the first stage, the controller inputs the target time-series data into the slope feature determination model to obtain the slope feature vector. In the second stage, the controller can input the target time-series data into the slope prediction model to obtain multiple slope values within the prediction time window. In the third stage, using the slope feature vector and multiple slope values obtained in the first two stages, the margin score and multiple margin change trends are determined.
[0058] It should be understood that the reason for determining the slope feature vector and multiple future slope values in stages when determining the margin score and multiple margin change trends is that the slope feature vector can reflect the continuous change pattern of slope characteristics over a period of time and the impact of slope characteristics on energy consumption and torque margin, thereby capturing the cumulative effect of energy consumption and torque margin and the slope fluctuation pattern of long slopes. Multiple future slope values can reflect the slope characteristics of the road segment to be traveled. By combining historical slope characteristics and future slope trends, the controller can comprehensively and accurately grasp the complete information of the objective road environment and the change pattern of torque margin during past climbing processes. As mentioned above, the slope characteristics of the road where the vehicle is located directly determine the required torque under climbing conditions, and thus determine the consumption rate and remaining reserve level of the vehicle's torque margin. Therefore, in this embodiment, the hierarchical modeling of historical and future slope characteristics before determining the torque margin can fundamentally improve the accuracy of the margin score and the reliability of the margin change trend prediction.
[0059] In the aforementioned technical solution, when determining the current margin score and multiple future margin change trends, the slope feature vector and multiple future slope values are first determined. The slope feature vector reflects the continuous change pattern of slope characteristics over a past period, while the multiple slope values reflect the slope characteristics of the upcoming road segment. By combining historical slope characteristics and future slope trends, the vehicle can obtain complete information about the objective road environment, providing reliable road data for torque margin assessment.
[0060] It should be understood that the implementation of the methods described below in the embodiments of this application involves the processing of different models.
[0061] The following section describes the detailed processing procedure for each stage.
[0062] Phase 1: Obtain the slope feature vector by using the slope feature determination model.
[0063] Optionally, the slope feature determination model can be the S4 model, whose core advantage is handling long, continuous time-series signals. Using the S4 model to process the target time-series data to obtain the slope feature vector ensures that the slope feature vector fully preserves the accumulated slope feature variation patterns across multiple consecutive time points. Of course, the slope feature model in this embodiment is not limited to the S4 model; other models capable of achieving the same purpose can be substituted. The following example, using the S4 model for slope feature determination, illustrates the specific implementation process of the first stage.
[0064] Specifically, the process by which the controller outputs the slope feature vector using the S4 model is as follows.
[0065] In one possible implementation, the target time-series data is input into the slope segment feature determination model to obtain the slope segment feature vector, including: The target time series data is divided into blocks according to a preset time window to obtain M consecutive data blocks, where M is a positive integer greater than 1; For the m-th data block out of M data blocks, the global hidden state corresponding to the m-th data block is obtained based on the local time series data corresponding to the target time series data and the global hidden state corresponding to the (m-1)-th data block. m is greater than or equal to 1 and less than or equal to M. When m=1, the global hidden state of the (m-1)-th data block is the preset hidden state. The global hidden state of the m-th data block is used to represent the characteristic information of each slope segment up to the m-th data block and the correlation between slope segment characteristics and energy consumption and torque margin. The global hidden state corresponding to the m-th data block is output-mapped to obtain the local feature representation of the m-th data block; Given the local feature representations of M data blocks, the local feature representations of the M data blocks are aggregated to obtain the slope segment feature vector.
[0066] It should be understood that during the climbing process, the slope length plays a decisive role in the energy consumption accumulation and torque margin changes of the power system. To capture the profound impact of slope length on system behavior, a long-sequence modeling network based on S4 is constructed. Target time-series data is input into the model. Specifically, the input data to the S4 model consists of six types of slope segment feature data from the target time-series data: cumulative slope distance, estimated remaining distance from the current point to the top of the slope, historical slope length distribution, local slope fluctuation rate, slope length standard deviation, and maximum slope change rate. The cumulative slope distance and the estimated remaining distance from the current point to the top of the slope can be understood as basic slope data, directly obtained from sensor data collection; the historical slope length distribution, local slope fluctuation rate, slope length standard deviation, and maximum slope change rate can be understood as statistically based slope data, referring to derived data obtained through secondary calculations using the basic data.
[0067] The cumulative value of slope distance at multiple consecutive moments within the historical time window, the estimated remaining distance from the current point to the top of the slope, the historical slope length distribution, the local slope fluctuation rate, the standard deviation of slope length, and the maximum slope change rate together constitute the input sequence of the S4 model.
[0068] For example, such as Figure 3 As shown, the input sequence of the S4 model can be {A} t0 B t0 C t0 D t0 E t0 F t0 A t1 B t1 C t1 D t1 E t1 F t1 A t2 B t2 C t2 D t2 E t2 F t2 A t3 B t3 C t3 D t3 E t3 F t3}. Among them, A ti This refers to the cumulative slope distance at time ti, B ti This refers to the estimated remaining distance from the current point to the top of the slope at time ti and the historical distribution of slope lengths, C ti This refers to the historical slope length distribution at time ti, D ti This refers to the local slope fluctuation rate at time ti, E ti This refers to the standard deviation of the slope length at time ti, F ti This refers to the maximum slope change rate at time ti.
[0069] The S4 model employs a block-based state-space update mechanism, encoding the input sequence into structured state variables, enabling it to capture the non-local dependencies of input features over time.
[0070] It should be understood that the reason why inputting the above six types of data into the S4 model can yield slope feature vectors is that, during the training process, the S4 model uses these six types of slope feature data as its sample input data, uses the torque margin sequence over a future time period as the supervision label, and uses the weighted cumulative value of the slope torque margin error as the loss function of the S4 model. Inputting the sample input data into the S4 model allows it to encode the sample input sequence and generate slope feature vectors through a block-based state space update mechanism. Furthermore, the slope feature vectors are mapped to a torque margin prediction sequence, and the S4 model calculates the prediction error based on the torque margin prediction sequence and the supervision label. Thus, during model training, by minimizing the error, the S4 model can learn the mapping relationship between slope features, energy consumption trends, and torque margin decay. For example, the mapping relationship learned by the S4 model could be: the longer the slope, the greater the cumulative energy consumption and the faster the torque margin decreases; or the higher the local slope volatility, the more significant the energy consumption fluctuations and the larger the torque margin amplitude.
[0071] To make it easier to understand, let's first go through... Figure 4 The architecture of the S4 model will be introduced.
[0072] Figure 4 This is a schematic diagram of the structure of a slope feature determination model provided in an embodiment of this application.
[0073] For example, such as Figure 4 As shown, the slope feature determination model is the S4 model. The S4 model includes an input module, a block state update module, and an output module. The input module receives the input sequence of the S4 model, and the block state update module updates the input sequence in blocks using a structured state matrix. The output module generates the slope feature vector.
[0074] Specifically, after receiving the input sequence consisting of the above six types of data, the S4 model uses its own block state space update mechanism. In order to reduce the computational complexity of long sequence processing and maintain temporal continuity, the S4 model divides the input sequence into M consecutive data blocks according to a fixed-length time window.
[0075] For example, if the length of the historical time window corresponding to the input sequence is 30 seconds, the sampling frequency is 1Hz, and the preset block window (i.e., the preset time window) is 5 seconds, then M=6 data blocks can be obtained, and each data block contains six types of slope feature data at 5 sampling times.
[0076] The local time-series data for each data block includes the cumulative slope distance at 5 sampling times, the estimated remaining distance from the current point to the top of the slope, the historical slope length distribution, the local slope fluctuation rate, the standard deviation of slope length, and the maximum slope change rate.
[0077] Based on the update principle of the S4 model, the S4 model can update the global hidden state sequentially according to the time sequence of the data blocks. The specific update principle can be expressed by the following formula (1).
[0078] Formula (1) In formula (1): h m-1 : This represents the global hidden state corresponding to the (m-1)th data block; x m : Local time-series data of the m-th data block; A , B The learnable structured state transition matrix and input matrix in the S4 model; h m : The global hidden state corresponding to the m-th data block; y m : Local feature representation of the m-th data block; C , D The learnable output matrix and bias matrix in the S4 model.
[0079] For any given data block, the global hidden state corresponding to that data block refers to the feature information of each slope segment up to the m-th data block after the S4 model has processed the m-th data block, as well as the correlation between the slope segment features and energy consumption and torque margin.
[0080] Specifically, when m=1, the global hidden state of the (m-1)th data block can be preset to a pre-defined hidden state. Optionally, the preset hidden state is usually the zero vector or an initial hidden state obtained based on the training data; this embodiment does not limit this.
[0081] For the m-th data block, the S4 model receives the local time-series data corresponding to the m-th data block and inputs it into the state space module. Using the structured state transition matrix of the S4 model in formula (1) and combined with the global hidden state of the (m-1)-th data block, the global hidden state of the current m-th data block is calculated. h m ∈ H The global hidden state is a one-dimensional vector with dimension H, where H is the dimension of the state space.
[0082] With the global hidden state having dimension H, the structured state transition matrix A is an H×H square matrix, and the input matrix B is an H×I matrix. I is... x m The number of features, that is, the total number of slope segment data at each sampling time, is 6, i.e., I=6.
[0083] By sequentially performing the above global hidden state update operation on each of the M data blocks, the global hidden state of all M data blocks can be obtained.
[0084] Furthermore, by employing the local feature representation calculation method in formula (1), the S4 model can output and map the global hidden state of each data block. Combining the output matrix and the bias matrix, the local slope feature representation of each data block is obtained. y m ∈ Y (That is, local feature representation or local feature vector), local slope features are used to reflect the slope change pattern within the data block, and integrate the cumulative effect of slope feature data from all previous historical data blocks.
[0085] in, y m For the local feature representation after output mapping , It is also a one-dimensional vector with dimension Y. Y is determined by the dimension of the output matrix C, which is a Y×H matrix, and the bias matrix D is a Y×I matrix.
[0086] After obtaining the local feature representations of M data blocks y 1. y 2. ... y M Then, the S4 model aggregates the local feature representations of all M data blocks to obtain the final slope feature vector.
[0087] Optionally, the aggregation method includes, but is not limited to, concatenation, weighted summation, pooling, or attention mechanisms, to fuse multiple local feature representations into a global vector. Taking average pooling as an example, the aggregation process of multiple local feature representations is described below, which can be represented by the following formula (2).
[0088] Formula (2) Based on the above formula (2), the average value of the M local feature vectors is calculated according to the elements to obtain the final slope feature vector.
[0089] In the above technical solution, when processing target time-series data through slope feature determination model, the target time-series data is first processed by dividing it into blocks to avoid the computational complexity caused by processing the entire input sequence. The global hidden state is updated sequentially according to the data blocks, and the local features of the current data block and the historical information of historical slope segments are fused with the recursively updated global hidden state. This effectively captures the local dependencies between previous slope changes and energy consumption and torque margin in long slope segments, so that the final generated slope feature vector can directly reflect the trend of the slope shape's influence on the power system, providing reference input data for subsequent slope prediction and torque dynamic modeling.
[0090] The second stage involves using a slope prediction model to obtain multiple slope values within the prediction time window.
[0091] Optionally, the slope prediction model is the N-BEATS model. Its core advantage lies in decomposing and predicting the trend of discrete time series data. Furthermore, the model has a simple structure and fast inference speed. By processing the target time series data using the N-BEATS model, multiple slope values are obtained, enabling precise control over the future trend of slope changes. Of course, the slope prediction model in this embodiment is not limited to the N-BEATS model; other models that can achieve the same purpose can be substituted. The following example, using the N-BEATS model for slope prediction, illustrates the specific implementation process of the second stage.
[0092] Specifically, the controller uses the N-BEATS model to predict multiple slope values as follows.
[0093] In one possible implementation, the slope prediction model includes N stacked fully connected feedforward modules. Each fully connected feedforward module includes a trend block, a residual block, and a post-processing module. The target time-series data is input into the slope prediction model to obtain multiple slope values for the vehicle within the prediction time window, including: The target input data is input into the nth fully connected feedforward module, where n is greater than or equal to 1 and less than or equal to N. When n=1, the target input data is the target time series data. When n>1, the target input data is the unfitted residual output by the (n-1)th fully connected feedforward module. Through the trend block of the nth fully connected feedforward module, historical trend fitting data and future trend prediction components are generated based on the target input data. The historical trend fitting data is used to reconstruct the long-term trend component in the target input data, and the future trend prediction component is used to represent the slope base value contributed by the long-term trend component within the prediction time window. Through the residual block of the nth fully connected feedforward module, historical residual fitting data and future residual prediction components are generated based on the target input data. The historical residual fitting data is used to reconstruct the local disturbance components in the target input data, and the future residual prediction components are used to represent the slope correction value contributed by the local disturbance components within the prediction time window. The post-processing module of the nth fully connected feedforward module adds the historical trend fitting data and the historical residual fitting data to obtain the total historical fitting data. The future trend prediction component and the future residual prediction component are added to obtain the prediction components of multiple slope values corresponding to the nth fully connected feedforward module. Based on the difference between the target input data and the total historical fitting data, the unfitted residual output by the nth fully connected feedforward module is obtained. Given the predicted components of multiple slope values corresponding to N fully connected feedforward modules, the predicted components of multiple slope values corresponding to N fully connected feedforward modules are accumulated and fused to obtain multiple slope values.
[0094] It should be understood that in complex long-slope driving environments, the changing trend of the slope has a significant impact on the load fluctuation and torque consumption rate of the drive system. The N-BEATS model adopts a feedforward neural network structure and uses residual connections and fundamental function expansion to decouple and model the implicit trend and periodic information in complex time series, possessing the ability to accurately extrapolate future series without prior assumptions.
[0095] Input the target time series data into the model input. The specific input data to the N-BEATS model here are five types of slope feature data from the target time series data, namely, the first-order rate of change of slope, slope angle, local maximum slope, local minimum slope, and local slope fluctuation rate.
[0096] The first-order rate of change of slope, slope angle, local maximum slope, local minimum slope, and local slope fluctuation rate at multiple consecutive moments within the historical time window together constitute the input sequence of the N-BEATS model.
[0097] In the internal structure, the trend module (i.e., the trend block) in the feedforward neural network structure fits the overall slope change direction by learning a set of trainable basic function coefficients, while the residual module (i.e., the residual block) in the feedforward neural network structure focuses on capturing nonlinear disturbances caused by sudden terrain changes. The outputs of the two are weighted and superimposed to obtain the final predicted future slope sequence, which is used to assist in subsequent margin risk assessment.
[0098] It should also be understood that the reason why inputting the above five types of slope data into the N-BEATS model can output multiple slope values within multiple prediction time windows is that during the training process of the N-BEATS model, the sequence of the above five types of slope data is used as the sample input data, and multiple real slope values within future time windows are used as supervision labels. After receiving the sample input data, the N-BEATS model can learn the long-term direction of slope change through the trend block. For example, whether the slope is continuously becoming steeper or gentler, the overall slope of the slope segment, and the overall trend of slope change in each segment of a long slope. In addition, the residual block of the N-BEATS model can capture nonlinear perturbation changes beyond the long-term trend, such as the local fluctuations of the slope. Therefore, by adding the outputs of the trend block and the residual block, the N-BEATS model can obtain multiple continuous slope values that consider both the overall slope change and local perturbations. By minimizing the prediction error between the predicted value and the supervision label, the N-BEATS model can learn the mapping relationship between historical slope patterns and future slope changes during training, and finally obtain multiple reliable slope values in the inference stage.
[0099] Let's proceed first. Figure 5 The structure of the slope prediction model is introduced.
[0100] Figure 5 This is a schematic diagram of the structure of a slope prediction model provided in an embodiment of this application.
[0101] For example, such as Figure 5 As shown, the slope prediction model includes N fully connected feedforward modules, each of which includes a trend block, a residual block, and a post-processing module. Based on this, the target time-series data is input into the slope prediction model, and the target time-series data is processed by the N stacked fully connected feedforward modules to obtain the predicted slope values for multiple moments within the prediction time window for each fully connected feedforward module.
[0102] In a stack of N fully connected feedforward modules, the input to the first fully connected feedforward module is an input sequence composed of the five types of slope segment feature data mentioned above. The input to subsequent fully connected feedforward modules is the unfitted residual output of the previous fully connected feedforward module. The unfitted residual output of the previous fully connected feedforward module represents the signal components that the previous fully connected feedforward module failed to capture or interpret. Using it as the input to the next fully connected feedforward module allows subsequent fully connected feedforward modules to focus on learning the residual information left over from the previous stage, thereby achieving step-by-step stripping and fine-fitting of different frequency components (such as long-term trends and local disturbances) in the input sequence, and achieving more precise predictions.
[0103] The trend block is a sub-network within the fully connected feedforward module, specifically designed to capture the long-term trend component in the input sequence, i.e., the target input data. After performing a nonlinear transformation on the target input data, the trend block outputs a set of trend coefficients, denoted as θ_trend∈ K , where K is the preset order of the basis functions (usually taken as 2 to 4). The trend coefficient is a K-dimensional real vector.
[0104] The trend block internally stores two fixed basis matrices: the first historical basis matrix B_back_trend∈ L*K and the first future basis matrix B_fore_trend∈ H*K The first historical basis matrix can be a polynomial basis matrix with dimensions L*K, where each row corresponds to the normalized coordinates of L historical moments. Each column corresponds to a basis function in The power value of [ The first future basis matrix can be a multinomial basis matrix with dimensions H*K, where each row corresponds to the normalized coordinates of H future time points. The columns correspond to the same basis function in The power value of [ ].
[0105] Multiplying the trend coefficient θ_trend by the first historical basis matrix B_back_trend yields the historical trend fitting data b_trend = θ_trend * B_back_trend, where b_trend ∈ L The dimension of the historical trend fitting data is the same as the dimension of the target input data, and it is used to reconstruct the part of the target input data contributed by the long-term trend.
[0106] Multiplying the trend coefficient θ_trend by the first future basis matrix B_fore_trend yields the future trend prediction component f_trend = θ_trend * B_fore_trend, where f_trend ∈ H The dimension of this future trend prediction component is equal to the length H of the prediction time window, representing the slope baseline value determined by the long-term trend at H future moments. In other words, the future trend prediction component includes the slope baseline value contributed by the long-term trend component at each moment within the prediction time window. This future trend prediction component is an H-dimensional vector, where each element represents the slope baseline value contributed by the long-term trend component at a given moment within the prediction time window.
[0107] The residual block is another sub-network within the fully connected feedforward module. It processes the same target input data in parallel with the trend block and is specifically designed to capture local perturbation components (including periodic fluctuations and short-term random changes) in the input sequence, i.e., the target input data. After performing a nonlinear transformation on the target input data, the residual block outputs a set of residual coefficients, denoted as θ_res∈ 2K' , where K' is the preset order of the Fourier basis functions (usually taken as 2 to 8). The residual coefficients are a 2K'-dimensional real vector.
[0108] The residual block pre-stores two fixed basis matrices: the second history basis matrix B_back_res∈ L*2K' The second future basis matrix B_fore_res∈ H*2K' The second historical basis matrix can be a Fourier basis matrix with dimensions L×2K', where each row corresponds to the normalized coordinates of L historical moments. The columns are as follows: , , , , ], , For a preset frequency sequence, Let K be the K′-th frequency, where K′ is the order of the Fourier basis.
[0109] Multiplying the residual coefficients θ_res by the second historical basis matrix B_back_res yields the historical residual fitting data b_res = θ_res * B_back_res, where b_res ∈ L The dimension of the historical residual fitting data is the same as that of the target input data, and it is used to reconstruct the part of the target input data contributed by the local perturbation component.
[0110] Multiplying the residual coefficients θ_res by the second future basis matrix B_fore_res yields the future residual prediction component f_res = θ_res * B_fore_res, where f_res ∈ H The dimension of the future residual prediction component is equal to the length H of the prediction window, representing the slope correction value determined by local disturbances at the next H time points. In other words, the future residual prediction component includes the slope correction value contributed by local disturbances at each time point within the prediction time window. This future residual prediction component is an H-dimensional vector, where each element represents the slope correction value contributed by local disturbances at a given time point within the prediction time window.
[0111] In each fully connected feedforward module, the post-processing module is responsible for fusing the outputs of the trend block and the residual block to generate the slope prediction component (i.e., the prediction component of multiple slope values) of the fully connected feedforward module and the unfitted residuals passed to the next fully connected feedforward module.
[0112] Add the historical trend fitting data b_trend and the historical residual fitting data b_res element by element to obtain the total historical fitting data b_total = b_trend + b_res, where b_total ∈ L The total historical fitting data b_total represents the complete reconstruction of the target time series data by the nth fully connected feedforward module, which includes both long-term trends and local perturbations.
[0113] As mentioned earlier, the future trend prediction component f_trend is an H-dimensional vector, where each element represents the base slope value contributed by the long-term trend component at a given moment within the prediction time window. The future residual prediction component f_res is also an H-dimensional vector, where each element represents the slope correction value contributed by the local disturbance component at a given moment within the prediction time window. Based on this, the future trend prediction component f_trend and the future residual prediction component f_res are added element-wise to obtain the slope prediction component f_total = f_trend + f_res at H moments within the prediction time window, where f_total ∈ H In other words, the slope prediction component at each moment within the prediction time window is equal to the sum of the base slope value and the slope correction value at that moment.
[0114] Subtracting the total historical fitted data b_total from the target input data X yields the unfitted residual r = X - b_total, where r ∈ [0, 1]. L .
[0115] The unfitted residual *r* represents the signal component that the nth fully connected feedforward module failed to remove from the input. If the nth fully connected feedforward module is not the last fully connected feedforward module, i.e., n is less than N, Then r will be used as the target input data for the next fully connected feedforward module; if the nth fully connected feedforward module is the last fully connected feedforward module, i.e., n=N, then it will not be passed on.
[0116] After the outputs of the N fully connected feedforward modules, each fully connected feedforward module has output a standard energy consumption prediction component for H time points within the prediction time window. Let the slope prediction component output by the nth fully connected feedforward module be f_total_n∈ HFor n=1,2,…,N, the slope prediction components of all fully connected feedforward modules are summed element-wise using the following formula to obtain the final slope prediction sequence composed of multiple slope values. As shown in formula (3) below.
[0117] Formula (3) Slope prediction sequence in formula (3) Let be an H-dimensional vector, where the j-th (j=1,...,H) element represents the slope value at the j-th time within the prediction time window. The slope value at the j-th time is the sum of the slope prediction components of all fully connected feedforward modules at that j-th time.
[0118] This accumulation and fusion operation integrates the prediction contributions of N fully connected feedforward modules. Since each fully connected feedforward module focuses on fitting different frequencies or different levels of components (long-term trends, local perturbations and their successive residuals) in its own input data, the accumulation can completely reconstruct the dynamic changes of the original slope sequence.
[0119] In the above technical solution, unfitted residuals are passed through N stacked fully connected feedforward modules, allowing each module to focus on signal components not explained by the previous stage. Long-term trend components and local disturbance components are extracted based on trend blocks and residual blocks, respectively, and each outputs historical fitted data and future predicted components. The historical fitted data from the two branches within the same fully connected feedforward module are superimposed to form the total historical fitted data, while the future predicted components from the two branches are superimposed to obtain the slope prediction components for multiple moments within the prediction time window. Finally, the predicted components from all fully connected feedforward modules are accumulated and fused to generate the final slope value. These steps work together to not only achieve automated separation and hierarchical fitting of different frequency components in the target time series data, but also avoid gradient vanishing or feature confusion through a dual mechanism of backward residuals and forward prediction. This improves the prediction accuracy and interpretability of the time series prediction model under nonlinear and non-stationary conditions, providing an accurate and dynamic baseline for subsequent margin assessment.
[0120] The aforementioned backward residual refers to the unfitted residual obtained by subtracting the total historical fitted data generated by the current fully connected feedforward module from the target input data of that module. This unfitted residual serves as the input to the next fully connected feedforward module, aiming to allow subsequent modules to focus on fitting signal components that the previous module failed to explain, thus achieving a progressively refined decomposition. In other words, each fully connected feedforward module "looks backward," removing the portion it can fit from the input and passing the rest to the next module; hence the term backward residual.
[0121] The aforementioned forward prediction refers to the fact that the prediction components of each fully connected feedforward module's output for the future prediction window are accumulated to form the final prediction result. In other words, each fully connected feedforward module is "looking forward" and contributing its own prediction of the future, hence the term forward prediction.
[0122] The third stage involves using multiple slope values and slope segment feature vectors to determine the margin score and predict multiple margin change trends within the time window.
[0123] This stage, if further subdivided, can specifically include the following two steps.
[0124] One possible implementation involves determining the margin score and multiple margin change trends based on the slope feature vector and multiple slope values, including: Obtain the vehicle's actual power parameters at the current moment. The actual power parameters are used to represent the operating status of the vehicle's power system. By inputting actual power parameters, slope feature vectors, and multiple slope values into the torque prediction model, multiple torque values of the vehicle within the prediction time window are obtained. By inputting multiple torque values, slope feature vectors, and multiple slope values into the margin assessment model, margin scores and multiple margin change trends are obtained.
[0125] It should be understood that the final result of the third stage is the torque margin score and multiple margin variation trends of torque within the prediction time window. To achieve this, the controller first needs to predict the vehicle's torque within the prediction time window based on the current power state, historical slope characteristics, and future slope variation patterns, obtain the torque variation pattern in the future period, and then evaluate the torque margin space of the powertrain system based on this. The actual power parameters at the current moment are used to represent the operating state of the vehicle's powertrain system at the current moment.
[0126] The torque within the predicted time window obtained above refers to the available torque that the vehicle powertrain system can provide or output, which is used to characterize the instantaneous torque output capability of the vehicle powertrain system.
[0127] Optionally, the actual power parameters include the current output torque, the output current of the power battery system, the output voltage, the remaining charge, and the operating temperature.
[0128] The process of determining multiple torque values within the prediction time window described above can be implemented using a torque prediction model, specifically a Neural ODE model. The core advantage of the Neural ODE model is that it uses ordinary differential equations to describe the hidden states of the neural network, modeling the temporal evolution of the hidden states as continuous differential equations. Of course, the torque prediction model in this embodiment is not limited to the Neural ODE model; other models capable of achieving the same purpose can be substituted. The following example using a Neural ODE model to illustrate the specific implementation process of the third stage.
[0129] In the above technical solution, before determining the margin score and the margin change trend, the torque value sequence within the prediction time window is first determined based on the slope feature vector, multiple slope values and actual power parameters. This can capture the torque change pattern in a timely manner and identify the load change of the power system during the vehicle's climbing process in advance, thereby providing reliable data support for the torque margin assessment of the vehicle in the future.
[0130] The specific process by which the Neural ODE model predicts multiple torque values is as follows.
[0131] In one possible implementation, the torque prediction model includes a solution module and a differentiation module. Actual power parameters, slope feature vectors, and multiple slope values are input into the torque prediction model to obtain multiple torque values for the vehicle within the prediction time window, including: The hidden state of the t-th time step within the prediction time window is input into the derivative module to obtain the rate of change of the hidden state of the t-th time step. t is greater than or equal to 1 and less than or equal to the total number of time steps within the prediction time window. When t=1, the hidden state of the t-th time step is encoded by the actual dynamic parameters, the slope feature vector, and multiple slope values. The hidden state of the t-th time step is used to represent the combined influence of the dynamic system state and the slope feature on the torque at the t-th time step. The rate of change of the hidden state of the t-th time step is used to represent the trend of the combined influence of the dynamic system state and the slope feature on the torque at the t-th time step. Input the rate of change of the hidden state at time step t and the hidden state at time step t into the solution module to obtain the hidden state at time step t+1 within the prediction time window. Given the hidden states of all time steps within the prediction time window, the hidden states of all time steps are decoded to obtain multiple torque values.
[0132] It should be understood that, considering the characteristic of the power system's output torque continuously changing over time during hill climbing, this application's embodiments construct a Neural ODE model to simulate and predict the trajectory of the vehicle's actual available torque over time on a slope. The Neural ODE model treats the power system as a continuous-time dynamic system modeling object, describing the internal state change process in the form of differential equations, possessing the advantage of modeling the system's continuity and cumulativeity. The Neural ODE model input consists of three parts: the actual power parameters at the current moment, the slope feature vector from the S4 model output, and multiple future slope values predicted by the N-BEATS model. This input information is mapped to the initial system state space through a joint embedding network, serving as the starting conditions for the Neural ODE solver. During internal modeling, the Neural ODE uses the derivative function defined by a parametric neural network to describe the evolution of state variables over time, simulating the torque change trajectory over several seconds in continuous time using the ODE solver.
[0133] It should also be understood that the reason why the Neural ODE solver can be used to obtain multiple torque values within the predicted future time window in the embodiments of this application is that: during the training process, after the Neural ODE model receives sample data consisting of several types of data, including actual dynamic parameters, slope feature vectors, and multiple slope values, it will use a dynamic simulator of the dynamic system based on neural network modeling to deduce the state changes of the dynamic system in continuous time and learn the combined influence of the dynamic system state changes and the future slope state on the torque.
[0134] Specifically, the aforementioned power system simulator comprises the two core components of the Neural ODE model: the derivative function and the solver. Upon receiving sample data, the derivative function learns the dynamic changes of the power system. For example, it determines how much torque needs to increase with increasing gradient, or how to adjust or limit output torque in response to changes in the power system's operating temperature. Furthermore, the derivative function transmits this learned dynamic change pattern to the solver. Based on this pattern, the solver derives the torque changes step-by-step over continuous time, generating a complete torque sequence.
[0135] Let's proceed first. Figure 6 The overall structure of the Neural ODE model is explained.
[0136] Figure 6 This is a schematic diagram of the structure of a torque prediction model provided in an embodiment of this application.
[0137] For example, such as Figure 6As shown, the torque prediction model is a Neural ODE model, whose core components mainly include an encoder, an ODE derivative network (i.e., a derivative module), a numerical solver (i.e., a solver or a solution module), and a decoder.
[0138] The encoder typically consists of multiple fully connected layers to generate the initial hidden state, which refers to the hidden state at the first time step within the prediction time window. ODE derivative networks are used to model the rate of change of hidden states based on derivative functions; The numerical solver is used to iteratively update the hidden state in consecutive time steps; The decoder is used to decode the hidden states of all time steps into a sequence of torque values. The decoder is typically a multi-layer fully connected layer.
[0139] Based on the above model structure, the output process of multiple torque values will be described in detail below.
[0140] After receiving the actual dynamic parameters, slope feature vectors, and multiple slope values, the Neural ODE model first fuses the input data from different dimensions through an encoder, mapping it into a high-dimensional vector. This high-dimensional vector is the hidden state (or initial hidden state) of the first time step within the prediction time window, serving as the starting condition for the entire solution process.
[0141] The Neural ODE model is based on a solver that starts from the initial hidden state and calculates the hidden state step by step for each time step within the prediction time window.
[0142] Specifically, the Neural ODE model internally defines a derivative function implemented by a neural network (i.e., the ODE derivative network), the expression of which is shown in the following formula (4).
[0143] Formula (4) In formula (4): h The hidden state at the current time step; t : Current time step; θ The parameters of the neural network are obtained through model training; dh / dt : The rate of change of the hidden state at the current time step.
[0144] The aforementioned derivative function can predict the rate of change of the hidden state based on the hidden state at the current time step and the time step, and thus output the rate of change of the hidden state at the current time step.
[0145] For example, if the current time step is specifically the t-th time step within the prediction time window, based on the above formula (4), the differentiation module can perform time differentiation on the hidden state of the t-th time step to obtain the rate of change of the hidden state of the t-th time step. Wherein, when t=1, the hidden state of the t-th time step is obtained by the encoder encoding the actual dynamic parameters, slope feature vector, and multiple slope values, i.e., the initial hidden state, which integrates the dynamic system state and slope features. When t is greater than 1, based on the dynamic mapping relationship learned by the Neural ODE model during training, the hidden state of the t-th time step, updated step by step, can characterize the combined influence of the dynamic system state and slope features on the torque at the current time step. Correspondingly, the rate of change of the hidden state of the t-th time step can characterize the trend of the combined influence of the dynamic system state and slope features on the torque at the current time step, reflecting the potential trend of future torque changes.
[0146] Optionally, the differentiation module is usually an MLP in a neural network, with the input being the hidden state at time step t, and the output being the rate of change of the hidden state at time step t based on the learned dynamic change law.
[0147] After obtaining the rate of change of the hidden state at time step t, the Neural ODE model inputs both the hidden state at time step t and the rate of change of the hidden state at time step t into the solution module to obtain the hidden state at the next time step t+1.
[0148] Specifically, the solution module uses a numerical algorithm to update the hidden state at the (t+1)th time step.
[0149] Optionally, numerical algorithms include, but are not limited to, the Euler method and the Runge-Kutta method. The Euler method is used as an example below to illustrate the update process of the hidden state. The expression of the Euler method is shown in the following formula (5).
[0150] Formula (5) In formula (5): Δt : The time step difference between two adjacent time steps, in seconds (s); h t : The hidden state at time step t; h t+1 : The hidden state at time step t+1.
[0151] Therefore, based on the differentiation module and the solution module, the Neural ODE model can obtain the hidden states of all time steps within the prediction time window step by step.
[0152] Furthermore, the Neural ODE model decodes the hidden state of each time step one by one through the decoder, mapping it to the torque value at each time step, thereby obtaining the torque values of all time steps within the prediction time window. Multiple torque values form a predicted torque sequence.
[0153] It should be noted that the above process of using the Neural ODE model to process three types of feature data and obtain multiple torque values is only an exemplary description. This application does not limit the use of the Neural ODE model, and any model that can achieve the same purpose can be used instead.
[0154] In the above technical solution, when solving the torque sequence within a future time window, the hidden state, which integrates the power system state and slope characteristics at the current time step, is used as input, and the hidden state change rate is output. This hidden state change rate can characterize the combined influence trend of the power system and slope characteristics on the torque. Therefore, based on the time step, the dynamic change trajectory of torque under the influence of operating temperature and slope changes over a future period can be calculated one by one. This effectively captures the cumulative change trend of torque under long slope conditions and provides a reference data basis for torque margin assessment.
[0155] After obtaining multiple torque values, the process of further determining the margin score and the trend of multiple margin changes is as follows.
[0156] In one possible implementation, multiple torque values, slope feature vectors, and multiple slope values are input into the margin assessment model to obtain margin scores and multiple margin change trends, including: Multiple torque values, slope feature vectors, and multiple slope values are projected onto the same dimension to obtain torque embedding vector, slope feature embedding vector, and slope value embedding vector; The slope feature embedding vector is compressed to obtain the compressed slope feature embedding vector. The number of time steps corresponding to the compressed slope feature embedding vector is the same as the number of time steps corresponding to the prediction time window. A joint feature matrix is constructed based on the torque embedding vector, the compressed slope feature embedding vector, and the slope value embedding vector. Based on the joint feature matrix, the margin score and multiple margin change trends are determined.
[0157] The aforementioned margin assessment model can be understood as the final fusion model, which integrates the output data of the previous three models to obtain the final margin score and multiple margin change trends.
[0158] It should be understood that, to address the heterogeneity of slope length, gradient, and torque information in terms of physical attributes, time scale, and data format during the climbing process, a unified multi-model fusion strategy is constructed. This strategy structurally fuses the slope feature vector generated by the S4 model, the gradient sequence predicted by the N-BEATS model, and the torque sequence output by the Neural ODE model, generating a unified margin representation space to support subsequent critical point judgment and strategy control. The fusion strategy employs a time-aligned feature-level embedding mechanism. First, the outputs of the three models are dimensionality-reduced and encoded separately through a feature projection network, mapping them uniformly to an embedding space with consistent dimensions. Using the current vehicle position on the slope as the main reference frame, the slope feature vector output by the S4 model is projected onto the corresponding slope segment. Combined with the gradient sequence predicted by the N-BEATS model and the torque sequence output by the Neural ODE model, a joint feature matrix organized by time windows is formed. This matrix is then processed using a two-layer gated residual structure to output the torque margin score at the current moment and the multiple margin change trends within the predicted time window.
[0159] The specific meaning of the aforementioned embedding space refers to mapping the outputs of the three models to a unified embedding space with the same dimension, since the output data of the three models are different. This means performing dimensionality reduction, transformation, and feature reconstruction on the heterogeneous original outputs of the three types of models respectively, and mapping and transforming the heterogeneous features with different semantics to a shared feature space with the same dimension, consistent feature representation rules, and semantic space alignment.
[0160] The above process uses the current location of the vehicle on the slope as the main reference frame, projecting the slope feature vector output by S4 onto the corresponding slope segment. Specifically, as previously explained, the slope feature vector is a structured representation of the accumulated information from the various slope segments the vehicle has already traveled. Both the N-BEATS and Neural ODE models output predicted sequences within the prediction time window. Generally, the number of time steps in the historical time window may exceed the number of time steps in the prediction time window. To eliminate the inconsistency between the time steps of long-term historical features and the time steps of future features, the above process involves using the current location of the vehicle on the slope as a reference point to extract and aggregate the historical slope feature vector output by the S4 model up to the current moment, ensuring consistency with the N-BEATS and Neural ODE models in terms of time reference and number of time steps, thus eliminating the misalignment in the time dimension among the three models.
[0161] Specifically, after obtaining the three types of input data, the margin assessment model first performs embedding projection on each of the three types of input data separately, mapping all three types of input data with different feature dimensions to the same fixed-dimensional embedding space, thus obtaining the torque embedding vector, slope feature embedding vector, and slope value embedding vector. The feature vector dimensions and output representation rules of the above three embedding vectors are the same at each time step, but the number of time steps differs. The slope feature embedding vector corresponding to the S4 model has a greater number of time steps than the number of time steps in the prediction time window. The margin assessment model compresses the entire slope feature embedding vector, thereby keeping the number of time steps corresponding to the slope feature embedding vector consistent with the number of prediction time steps, resulting in the compressed slope feature embedding vector.
[0162] The compressed slope feature embedding vector has the same number of time steps as the slope value embedding vector and the torque embedding vector. The margin assessment model uses time steps as the row dimension and feature embedding as the column dimension; the compressed slope feature embedding vector, slope value embedding vector, and torque embedding vector are concatenated in the column direction. Each row of the matrix corresponds to one time series step, and the features in each row are divided into three segments according to the columns, corresponding to the slope feature embedding, slope value embedding, and torque embedding, respectively, thus obtaining the final joint feature matrix.
[0163] Furthermore, based on the three types of embedding vectors and the joint feature matrix mentioned above, the margin assessment model can solve for the final margin score and multiple margin change trends.
[0164] In the above technical solution, by uniformly projecting the output data of the three types of models into an embedding space of the same dimension, heterogeneous features are transformed into feature vectors with consistent dimensions and unified representation rules, providing a foundation for subsequent joint modeling. In addition, by temporally compressing the slope feature embedding vectors to keep the number of time steps consistent with the prediction time window, synchronization of historical working condition features and future prediction features in the temporal dimension is achieved.
[0165] The specific process for determining the margin score and the trends of multiple margin changes is as follows.
[0166] In one possible implementation, the margin assessment model includes U gated residual modules, a fully connected module, and an encoding module, where U is a positive integer greater than or equal to 1. Based on the joint feature matrix, it determines the margin score and multiple margin change trends, including: Obtain the first attention weight corresponding to the torque embedding vector, the second attention weight corresponding to the slope value embedding vector, and the third attention weight corresponding to the compressed slope feature embedding vector; Based on the first attention weight, the second attention weight, and the third attention weight, the joint feature matrix is weighted to obtain the weighted joint feature matrix. Input the output feature matrix of the (u-1)th gated residual module into the u-th gated residual module to obtain the output feature matrix of the u-th gated residual module. u is greater than or equal to 2 and less than or equal to U. When u=2, the output feature matrix of the (u-1)th gated residual module is obtained by the weighted joint feature matrix. Given the output feature matrix of the U-th gated residual module, the output feature matrix of the U-th gated residual module is mapped through a fully connected module to obtain the margin score, and the output feature matrix of the U-th gated residual module is encoded through an encoding module to obtain multiple margin change trends.
[0167] It should be understood that in the embodiments of this application, the margin assessment model uses a multi-layer gated residual module for processing. Specifically, in this embodiment, there are two gated residual modules, i.e., U=2. The first gated residual module is used to initially fuse multi-dimensional information and filter out useless noise information; the second gated residual module is used to mine deeper temporal dependencies and finally output the margin score at the current moment and multiple future margin trends.
[0168] It should also be understood that the margin assessment model can output the current margin score and multiple future margin trends because, during model training, the current margin score and multiple margin change trends within future time windows serve as supervision labels. The model learns the impact of long-term uphill accumulation on margin through slope feature vectors, thus gaining the ability to assess the current margin score. Based on future slope and torque sequences, the model can learn the correlation between changes in slope and output torque over future time periods and margin change trends within future time windows.
[0169] During model processing, for the torque embedding vector, the compressed slope feature embedding vector, and the slope value embedding vector mentioned above, the margin assessment model can first determine the attention weights corresponding to each vector and then weight the joint feature matrix.
[0170] The initial attention weights for each vector can be pre-set. If a sudden change signal is found in the slope value sequence predicted by N-BEATS, the attention weight of that part of the vector is appropriately increased based on the pre-set attention weights, thus obtaining the second attention weight. Similarly, if a rapid decreasing trend is found in the torque sequence output by Neural ODE, the attention weight of that part of the vector is automatically increased, thus obtaining the first attention weight. Conversely, if there is no sudden change trend in the above two types of prediction data, it means that the prediction process needs to rely more on the historical slope features output by the S4 model. In this case, the attention weight of the compressed slope feature embedding vector can be appropriately increased, thus obtaining the third attention weight.
[0171] Based on the first attention weight, the second attention weight, and the third attention weight, the margin assessment model can weight the joint feature matrix to obtain the weighted joint feature matrix.
[0172] Specifically, the weighted joint matrix can be input into the first gated residual module for processing. This module performs a linear transformation on the weighted joint features, obtaining a linearly transformed feature matrix. This transformed feature matrix is then further processed by a sigmoid activation function to generate a gating value, which is then weighted and filtered to obtain a weighted filtered feature matrix. Finally, the residuals of the weighted filtered feature matrix and the original weighted joint matrix are summed to obtain the output feature matrix of the first gated residual module.
[0173] The output feature matrix of the first gated residual module is used as the input of the second gated residual module. The above process is repeated to obtain the output feature matrix of the second gated residual module.
[0174] Based on the output feature matrix of the second gated residual module, the margin assessment module can process this output feature matrix through a dual-branch structure to output the current margin score and the future margin change trend. Specifically, the first branch is the margin score branch, which extracts the feature vector corresponding to the current time step from the output feature matrix of the second gated residual module, inputs it into the fully connected module, and processes it through linear mapping and activation function to obtain the torque margin consumption score at the current time step. The second branch is the margin trend branch, which inputs the entire output feature matrix of the second gated residual module into the temporal encoding module (i.e., the encoding module). By capturing the temporal dependencies of each time step in the feature matrix, the deep fusion features of each step within the future time window are encoded and mapped to generate a temporal vector consistent with the number of future time steps, thus obtaining multiple margin change trends to reflect the potential margin decay or change direction within the future time window.
[0175] S203 determines whether the vehicle meets the preset climbing interruption conditions based on the margin score and multiple margin change trends.
[0176] After obtaining the torque margin score at the current moment and the multiple margin change trends within the predicted time window through step S202, the controller can determine whether the vehicle meets the preset hill-climbing interruption conditions.
[0177] In one possible implementation, based on the margin score and multiple margin change trends, it is determined whether the vehicle meets the preset hill-climbing interruption conditions, including: If the margin score is less than or equal to the preset score, and multiple margin change trends are all downward, the vehicle is determined to meet the preset hill-climbing interruption condition. If the margin score is greater than the preset score, or if at least one of the multiple margin change trends is an upward trend, it is determined that the vehicle does not meet the preset hill-climbing interruption condition.
[0178] Specifically, when the margin score is less than or equal to the preset score and multiple margin trends are all decreasing, it indicates that the vehicle's torque margin is insufficient at the current moment, and the torque margin may continue to decrease over a period of time, making it unable to support the vehicle to continue climbing. At this point, the controller determines that the vehicle is approaching the critical power failure boundary and immediately triggers the climb interruption protection logic, controlling the vehicle to exit the current climb driving state and executing the climb interruption logic. The preset score is specifically the critical margin score for the vehicle's climb interruption.
[0179] Conversely, if the margin score is greater than the preset score, or if at least one of the multiple margin trends is upward, it indicates that the current torque margin is sufficient, or that the future torque margin will show an upward trend, meaning the vehicle's power reserve can meet the torque requirements of subsequent climbing conditions. Therefore, the controller determines that the vehicle does not meet the preset climbing interruption condition and allows the vehicle to continue its current climbing driving state without triggering the climbing interruption logic.
[0180] S204: When the vehicle meets the preset climbing interruption conditions, control the vehicle to remain stationary.
[0181] Specifically, when it is determined in step S203 that the vehicle meets the preset hill-climbing interruption conditions, the hill-climbing interruption logic is as follows: the vehicle is kept stationary through the electric drive torque holding mechanism or the pre-tensioning mechanism of the electronic parking brake (EPB) system to prevent reverse roll due to power interruption. The electric drive torque holding mechanism refers to the motor re-outputting support torque to prevent the vehicle from rolling backward. The pre-tensioning mechanism refers to the EPB system pre-establishing braking force to prevent the vehicle from rolling backward.
[0182] To facilitate understanding of the overall implementation process, we will now proceed with... Figure 7 The overall implementation process of the method in the embodiments of this application will be described.
[0183] Figure 7 This is a schematic flowchart illustrating another method for controlling a vehicle to climb a slope, as provided in an embodiment of this application.
[0184] For example, such as Figure 7 As shown, the method 700 includes the following steps 701 to 708.
[0185] 701. Acquire the target time series data of the vehicle when it is climbing a hill.
[0186] 702. Input the target time series data into the slope feature determination model to obtain the slope feature vector.
[0187] 703. Input the target time series data into the slope prediction model to obtain multiple slope values for the vehicle within the prediction time window.
[0188] 704, obtain the vehicle's actual power parameters at the current moment.
[0189] 705. Input the actual power parameters, slope feature vector and multiple slope values into the torque prediction model to obtain multiple torque values of the vehicle within the prediction time window.
[0190] 706. Input multiple torque values, slope feature vectors, and multiple slope values into the margin assessment model to obtain margin scores and multiple margin change trends.
[0191] 707. Determine whether the margin score is greater than the preset score, or whether there is a downward trend in the margin.
[0192] If the margin score is greater than the preset score, or if at least one of the multiple margin change trends is an upward trend, the vehicle is determined not to meet the preset hill-climbing interruption condition, and the process ends. If the margin score is less than or equal to the preset score, and multiple margin change trends are all downward, it is determined that the vehicle does not meet the preset hill-climbing interruption condition, and step 708 is executed.
[0193] 708. When the vehicle meets the preset climbing interruption conditions, control the vehicle to remain stationary.
[0194] Steps 701 to 708 in method 700 have the same inventive concept as steps 201 to 204 in method 200, as detailed above, and will not be repeated here.
[0195] In summary, this application provides a method for controlling vehicle climbing. During implementation, this method models the temporal data of slope characteristics within a historical time window, determines the vehicle's torque margin at the current moment, predicts the trend of torque margin changes in advance, and judges whether the torque margin meets the vehicle's climbing requirements. This achieves the identification of the vehicle's future power change trend from the source. Furthermore, when the vehicle can no longer climb, it is immediately controlled to remain stationary, avoiding passive rolling caused by a sudden interruption of vehicle power, improving the safety and reliability of the vehicle's climbing process, and ensuring the personal safety of the driver and passengers.
[0196] Figure 8 This is a schematic diagram of a device for controlling vehicle climbing hills provided in an embodiment of this application.
[0197] For example, such as Figure 8 As shown, the device 800 includes: The acquisition module 801 is used to acquire the target time series data of the vehicle when the vehicle is climbing. The target time series data is used to represent the feature data related to the slope segment where the vehicle is located at multiple consecutive times including the current time. The determination module 802 is used to determine the torque margin score of the vehicle at the current moment, and the multiple margin change trends of the vehicle's torque within the prediction time window, based on the target time series data. The determining module 802 is further configured to determine whether the vehicle meets the preset hill-climbing interruption condition based on the margin score and the multiple margin change trends; the control module is configured to control the vehicle to remain stationary when the vehicle meets the preset hill-climbing interruption condition.
[0198] In one possible implementation, the determining module 802 is specifically used to: input the target time series data into the slope feature determination model to obtain a slope feature vector, which represents the pattern of change of the features of each driven slope over time, and the correlation between the features of each slope and the energy consumption and torque margin of the vehicle; input the target time series data into the slope prediction model to obtain multiple slope values of the vehicle within the prediction time window; and determine the margin score and the multiple margin change trends based on the slope feature vector and the multiple slope values.
[0199] In one possible implementation, the determining module 802 is specifically used to: divide the target time series data into blocks according to a preset time window to obtain M consecutive data blocks, where M is a positive integer greater than 1; for the m-th data block among the M data blocks, obtain the global hidden state corresponding to the m-th data block based on the local time series data corresponding to the target time series data and the global hidden state corresponding to the (m-1)-th data block, where m is greater than or equal to 1 and less than or equal to M. When m=1, the global hidden state of the (m-1)-th data block is a preset hidden state. The global hidden state of the m-th data block is used to represent the feature information of each slope segment up to the m-th data block and the correlation between slope segment features and energy consumption and torque margin; perform output mapping on the global hidden state corresponding to the m-th data block to obtain the local feature representation of the m-th data block; and, given the local feature representations of the M data blocks, aggregate the local feature representations of the M data blocks to obtain the slope segment feature vector.
[0200] In one possible implementation, the slope prediction model includes N stacked fully connected feedforward modules. Each fully connected feedforward module includes a trend block, a residual block, and a post-processing module. The determining module 802 is specifically used to: input target input data into the nth fully connected feedforward module, where n is greater than or equal to 1 and less than or equal to N; when n=1, the target input data is the target time series data; when n>1, the target input data is the unfitted residual output by the (n-1)th fully connected feedforward module; generate historical trend fitting data and future trend prediction components based on the target input data using the trend block of the nth fully connected feedforward module; the historical trend fitting data is used to reconstruct the long-term trend component in the target input data, and the future trend prediction component is used to represent the slope baseline value contributed by the long-term trend component within the prediction time window; and generate... The system generates historical residual fitting data and future residual prediction components. The historical residual fitting data is used to reconstruct the local disturbance components in the target input data, and the future residual prediction components are used to represent the slope correction value contributed by the local disturbance components within the prediction time window. Through the post-processing module of the nth fully connected feedforward module, the historical trend fitting data and the historical residual fitting data are added to obtain the total historical fitting data. The future trend prediction components and the future residual prediction components are added to obtain the prediction components of the multiple slope values corresponding to the nth fully connected feedforward module. Based on the difference between the target input data and the total historical fitting data, the unfitted residual output by the nth fully connected feedforward module is obtained. When the prediction components of the multiple slope values corresponding to N fully connected feedforward modules are obtained, the prediction components of the multiple slope values corresponding to N fully connected feedforward modules are accumulated and fused to obtain the multiple slope values.
[0201] In one possible implementation, the determining module 802 is specifically used to: obtain the actual power parameters of the vehicle at the current moment, the actual power parameters being used to represent the operating state of the vehicle's power system; input the actual power parameters, the slope feature vector, and the multiple slope values into a torque prediction model to obtain multiple torque values of the vehicle within the prediction time window; input the multiple torque values, the slope feature vector, and the multiple slope values into a margin assessment model to obtain the margin score and the multiple margin change trends.
[0202] In one possible implementation, the torque prediction model includes a solution module and a derivative module. The determining module 802 is specifically used to: input the hidden state of the t-th time step within the prediction time window into the derivative module to obtain the rate of change of the hidden state at the t-th time step, where t is greater than or equal to 1 and less than or equal to the total number of time steps within the prediction time window. When t=1, the hidden state of the t-th time step is obtained by encoding the actual dynamic parameters, the slope feature vector, and the multiple slope values. The hidden state of the t-th time step is used to represent the t-th... The influence of the dynamic system state and slope characteristics on torque at each time step is represented by the rate of change of the latent state at the t-th time step. The rate of change of the latent state at the t-th time step and the latent state at the t-th time step are input into the solution module to obtain the latent state at the (t+1)-th time step within the prediction time window. After obtaining the latent states of all time steps within the prediction time window, the latent states of all time steps are decoded to obtain the multiple torque values.
[0203] In one possible implementation, the determining module 802 is specifically used to: project the multiple torque values, the slope feature vector, and the multiple slope values onto the same dimension to obtain a torque embedding vector, a slope feature embedding vector, and a slope value embedding vector; compress the slope feature embedding vector to obtain a compressed slope feature embedding vector, wherein the number of time steps corresponding to the compressed slope feature embedding vector is the same as the number of time steps corresponding to the prediction time window; construct a joint feature matrix based on the torque embedding vector, the compressed slope feature embedding vector, and the slope value embedding vector; and determine the margin score and the multiple margin change trends based on the joint feature matrix.
[0204] In one possible implementation, the margin evaluation model includes U gated residual modules, a fully connected module, and an encoding module, where U is a positive integer greater than or equal to 1. The determining module 802 is specifically used to: obtain the first attention weight corresponding to the torque embedding vector, the second attention weight corresponding to the slope value embedding vector, and the third attention weight corresponding to the compressed slope feature embedding vector; weight the joint feature matrix based on the first attention weight, the second attention weight, and the third attention weight to obtain a weighted joint feature matrix; and assign the (u-1)th gated residual module... The output feature matrix is input to the u-th gated residual module to obtain the output feature matrix of the u-th gated residual module, where u is greater than or equal to 2 and less than or equal to U. When u=2, the output feature matrix of the (u-1)-th gated residual module is obtained from the weighted joint feature matrix. Given the output feature matrix of the U-th gated residual module, the fully connected module maps the output feature matrix of the U-th gated residual module to obtain the margin score, and the encoding module encodes the output feature matrix of the U-th gated residual module to obtain the multiple margin change trends.
[0205] In one possible implementation, the determining module 802 is specifically used to: determine that the vehicle meets the preset hill-climb interruption condition when the margin score is less than or equal to the preset score and the multiple margin change trends are all downward trends; and determine that the vehicle does not meet the preset hill-climb interruption condition when the margin score is greater than the preset score, or when at least one of the multiple margin change trends is an upward trend.
[0206] Figure 9 This is a schematic diagram of the structure of a vehicle provided in an embodiment of this application.
[0207] For example, such as Figure 9 As shown, the vehicle 900 includes a memory 901 and a processor 902. The memory 901 stores executable program code 9011, and the processor 902 is used to call and execute the executable program code 9011 to perform a method for controlling the vehicle to climb a hill.
[0208] Furthermore, embodiments of this application also protect an apparatus that may include a memory and a processor, wherein the memory stores executable program code, and the processor is used to call and execute the executable program code to perform a method for controlling a vehicle to climb a hill provided in embodiments of this application.
[0209] This embodiment can divide the device into functional modules based on the above method example. For example, each module can correspond to a separate function, or two or more functions can be integrated into one processing module. The integrated module can be implemented in hardware. It should be noted that the module division in this embodiment is illustrative and only represents one logical functional division. In actual implementation, there may be other division methods.
[0210] When the functional modules are divided according to their respective functions, the device may further include an acquisition module, a determination module, and a control module. It should be noted that all relevant content regarding the steps involved in the above method embodiments can be referenced to the functional descriptions of the corresponding functional modules, and will not be repeated here.
[0211] It should be understood that the device provided in this embodiment is used to execute the above-described method for controlling a vehicle to climb a slope, and therefore can achieve the same effect as the above-described implementation method.
[0212] When using an integrated unit, the device may include a processing module and a storage module. When the device is applied to a vehicle, the processing module can be used to control and manage the vehicle's movements. The storage module can be used to support the vehicle in executing relevant program code.
[0213] The processing module may be a processor or a controller, which can implement or execute various exemplary logic blocks, modules, and circuits shown in conjunction with the disclosure of this application. The processor may also be a combination of functions that implement computing capabilities, such as a combination of one or more microprocessors, a combination of digital signal processing (DSP) and a microprocessor, etc., and the storage module may be a memory.
[0214] In addition, the device provided in the embodiments of this application may specifically be a chip, component or module. The chip may include a connected processor and a memory. The memory is used to store instructions. When the processor calls and executes the instructions, the chip can execute a method for controlling a vehicle to climb a hill provided in the above embodiments.
[0215] This embodiment also provides a computer-readable storage medium storing computer program code. When the computer program code is run on a computer, the computer executes the above-described method steps to implement the method for controlling a vehicle to climb a hill provided in the above embodiment.
[0216] This embodiment also provides a computer program product that, when run on a computer, causes the computer to perform the aforementioned steps to implement the method for controlling a vehicle to climb a hill provided in the above embodiment.
[0217] In this embodiment, the device, computer-readable storage medium, computer program product, or chip are all used to execute the corresponding methods provided above. Therefore, the beneficial effects they can achieve can be referred to the beneficial effects in the corresponding methods provided above, and will not be repeated here.
[0218] Through the above description of the embodiments, those skilled in the art will understand that, for the sake of convenience and brevity, only the division of the above functional modules is used as an example. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above.
[0219] In the embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative. For instance, the division of modules or units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another device, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between devices or units may be electrical, mechanical, or other forms.
[0220] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
Claims
1. A method of controlling a vehicle to climb a slope, characterized by, The method includes: When the vehicle is climbing, the target time series data of the vehicle is acquired. The target time series data is used to represent the feature data related to the slope segment where the vehicle is located at multiple consecutive times including the current time. Based on the target time series data, determine the torque margin score of the vehicle at the current moment, as well as the multiple margin change trends of the vehicle's torque within the prediction time window. Based on the margin score and the multiple margin change trends, determine whether the vehicle meets the preset hill-climbing interruption condition; When the vehicle meets the preset hill-climbing interruption condition, the vehicle is controlled to remain stationary.
2. The method of claim 1, wherein, The step of determining the torque margin score of the vehicle at the current moment, and the multiple margin change trends of the vehicle's torque within the prediction time window, based on the target time series data, includes: The target time series data is input into the slope feature determination model to obtain the slope feature vector. The slope feature vector is used to represent the pattern of change of the features of each driven slope over time, as well as the correlation between each slope feature and the energy consumption and torque margin of the vehicle. The target time series data is input into the slope prediction model to obtain multiple slope values for the vehicle within the prediction time window; Based on the slope feature vector and the multiple slope values, the margin score and the multiple margin change trends are determined.
3. The method according to claim 2, characterized in that, The step of inputting the target time-series data into the slope feature determination model to obtain the slope feature vector includes: The target time series data is divided into blocks according to a preset time window to obtain M consecutive data blocks, where M is a positive integer greater than 1; For the m-th data block among the M data blocks, the global hidden state corresponding to the m-th data block is obtained based on the local time series data corresponding to the target time series data and the global hidden state corresponding to the (m-1)-th data block. m is greater than or equal to 1 and less than or equal to M. When m=1, the global hidden state of the (m-1)-th data block is a preset hidden state. The global hidden state of the m-th data block is used to represent the characteristic information of each slope segment up to the m-th data block and the correlation between slope segment characteristics and energy consumption and torque margin. The global hidden state corresponding to the m-th data block is output-mapped to obtain the local feature representation of the m-th data block; Having obtained the local feature representations of the M data blocks, the local feature representations of the M data blocks are aggregated to obtain the slope segment feature vector.
4. The method according to claim 2, characterized in that, The slope prediction model comprises N stacked fully connected feedforward modules. Each fully connected feedforward module includes a trend block, a residual block, and a post-processing module. The target time-series data is input into the slope prediction model to obtain multiple slope values for the vehicle within the prediction time window, including: The target input data is input into the nth fully connected feedforward module, where n is greater than or equal to 1 and less than or equal to N. When n=1, the target input data is the target time series data. When n>1, the target input data is the unfitted residual output by the (n-1)th fully connected feedforward module. Through the trend block of the nth fully connected feedforward module, historical trend fitting data and future trend prediction components are generated based on the target input data. The historical trend fitting data is used to reconstruct the long-term trend component in the target input data, and the future trend prediction component is used to represent the slope base value contributed by the long-term trend component within the prediction time window. Through the residual block of the nth fully connected feedforward module, historical residual fitting data and future residual prediction components are generated based on the target input data. The historical residual fitting data is used to reconstruct the local disturbance components in the target input data, and the future residual prediction components are used to represent the slope correction value contributed by the local disturbance components within the prediction time window. The post-processing module of the nth fully connected feedforward module adds the historical trend fitting data and the historical residual fitting data to obtain the total historical fitting data. The future trend prediction component and the future residual prediction component are added to obtain the prediction components of the multiple slope values corresponding to the nth fully connected feedforward module. Based on the difference between the target input data and the total historical fitting data, the unfitted residual output by the nth fully connected feedforward module is obtained. Given the predicted components of the multiple slope values corresponding to N fully connected feedforward modules, the predicted components of the multiple slope values corresponding to the N fully connected feedforward modules are accumulated and fused to obtain the multiple slope values.
5. The method according to claim 2, characterized in that, The step of determining the margin score and the multiple margin change trends based on the slope feature vector and the multiple slope values includes: The actual power parameters of the vehicle at the current moment are obtained, and the actual power parameters are used to represent the operating state of the vehicle's power system; The actual power parameters, the slope feature vector, and the multiple slope values are input into the torque prediction model to obtain multiple torque values of the vehicle within the prediction time window. The multiple torque values, the slope feature vector, and the multiple slope values are input into the margin assessment model to obtain the margin score and the multiple margin change trends.
6. The method according to claim 5, characterized in that, The torque prediction model includes a solution module and a derivative module. The actual power parameters, the slope feature vector, and the multiple slope values are input into the torque prediction model to obtain multiple torque values for the vehicle within the prediction time window, including: The hidden state of the t-th time step within the prediction time window is input into the differentiation module to obtain the rate of change of the hidden state of the t-th time step. t is greater than or equal to 1 and less than or equal to the total number of time steps within the prediction time window. When t=1, the hidden state of the t-th time step is encoded by the actual dynamic parameters, the slope feature vector, and the multiple slope values. The hidden state of the t-th time step is used to represent the combined influence of the dynamic system state and slope features on the torque at the t-th time step. The rate of change of the hidden state of the t-th time step is used to represent the trend of the combined influence of the dynamic system state and slope features on the torque at the t-th time step. The rate of change of the hidden state at the t-th time step and the hidden state at the t-th time step are input into the solution module to obtain the hidden state at the (t+1)-th time step within the prediction time window. Having obtained the hidden states of all time steps within the prediction time window, the hidden states of all time steps are decoded to obtain the multiple torque values.
7. The method according to claim 6, characterized in that, The step of inputting the multiple torque values, the slope feature vector, and the multiple slope values into the margin assessment model to obtain the margin score and the multiple margin change trends includes: The multiple torque values, the slope feature vector, and the multiple slope values are projected onto the same dimension to obtain the torque embedding vector, the slope feature embedding vector, and the slope value embedding vector; The slope feature embedding vector is compressed to obtain a compressed slope feature embedding vector. The number of time steps corresponding to the compressed slope feature embedding vector is the same as the number of time steps corresponding to the prediction time window. Based on the torque embedding vector, the compressed slope feature embedding vector, and the slope value embedding vector, a joint feature matrix is constructed; Based on the joint feature matrix, the margin score and the multiple margin change trends are determined.
8. The method according to claim 7, characterized in that, The margin assessment model includes U gated residual modules, a fully connected module, and an encoding module, where U is a positive integer greater than or equal to 1. The determination of the margin score and the multiple margin change trends based on the joint feature matrix includes: Obtain the first attention weight corresponding to the torque embedding vector, the second attention weight corresponding to the slope value embedding vector, and the third attention weight corresponding to the compressed slope feature embedding vector; The joint feature matrix is weighted based on the first attention weight, the second attention weight, and the third attention weight to obtain a weighted joint feature matrix. The output feature matrix of the (u-1)th gated residual module is input into the u-th gated residual module to obtain the output feature matrix of the u-th gated residual module, where u is greater than or equal to 2 and less than or equal to U. When u=2, the output feature matrix of the (u-1)th gated residual module is obtained from the weighted joint feature matrix. Given the output feature matrix of the U-th gated residual module, the margin score is obtained by mapping the output feature matrix of the U-th gated residual module through the fully connected module, and the multiple margin change trends are obtained by encoding the output feature matrix of the U-th gated residual module through the encoding module.
9. The method according to claim 1, characterized in that, The step of determining whether the vehicle meets the preset hill-climb interruption condition based on the margin score and the multiple margin change trends includes: If the margin score is less than or equal to the preset score, and the multiple margin change trends are all downward trends, then the vehicle is determined to meet the preset hill-climbing interruption condition. If the margin score is greater than the preset score, or if at least one of the multiple margin change trends is an upward trend, it is determined that the vehicle does not meet the preset hill-climb interruption condition.
10. A vehicle, characterized in that, The vehicles include: Memory, used to store executable program code; A processor for calling and running the executable program code from the memory, causing the vehicle to perform the method as described in any one of claims 1 to 9.