Heavy electric vehicle online gear shifting method and device based on enhanced graph learning framework
By employing an augmented graph learning framework, this method utilizes an edge-feature-enhanced graph attention network to learn the deep relationship between vehicle state and shifting logic. This addresses the energy consumption and real-time performance issues of shifting strategies in heavy-duty electric commercial vehicles, achieving low-energy and stable online shifting control.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- GUANGXI UNIV
- Filing Date
- 2026-02-02
- Publication Date
- 2026-05-08
AI Technical Summary
Existing rule-based shifting strategies are insufficient to maintain the excellent energy consumption performance of heavy-duty electric commercial vehicles, and traditional dynamic programming methods have high computational overhead and cannot meet the real-time requirements of online control.
A method based on an augmented graph learning framework is adopted. By encoding the key physical coupling relationships in the powertrain, the edge features are used to augment the graph attention network to learn the deep association between the vehicle's operating state and the optimal shift logic. A graph time series dataset is constructed and encoded and time series aggregated to output the gear decision for the next moment.
It achieves reliable and low-energy shifting under unknown operating conditions, improves the accuracy and stability of shifting decisions, and meets the real-time control requirements of multi-gear electric drive systems under complex road conditions.
Smart Images

Figure CN121993591A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of bearing remaining service life prediction technology, and in particular to a method and apparatus for online gear shifting of heavy-duty electric vehicles based on an enhanced graph learning framework. Background Technology
[0002] In the road transportation system, heavy-duty commercial vehicles occupy an extremely important position as the main equipment for logistics transportation. Currently, heavy-duty commercial vehicles account for 54.3% of the total carbon emissions of the automotive industry, but their electrification penetration rate is only 0.7%. This means that promoting the transformation of heavy-duty commercial vehicles from traditional fuel power to electric drive not only has significant potential for energy conservation and emission reduction, but is also a key link in achieving the goal of carbon neutrality in the transportation sector.
[0003] To balance traction performance and energy efficiency, most heavy-duty electric commercial vehicles employ multi-speed electric drive axles or multi-speed automatic transmissions to ensure the motor maintains high efficiency across a wider speed range. However, current rule-based shifting strategies struggle to consistently maintain excellent energy efficiency. While optimization methods can achieve globally optimal shifting and torque distribution through dynamic programming, they rely on pre-defined operating conditions and incur significant computational overhead, failing to meet the real-time requirements of online control. Summary of the Invention
[0004] The purpose of this invention is to address the aforementioned problems by providing an online gear shifting method and device for heavy-duty electric vehicles based on an enhanced graph learning framework. By encoding key physical coupling relationships in the powertrain within a graph structure, the edge feature enhanced graph attention network can learn the deep correlation between vehicle operating state and optimal gear shifting logic at the system level, enabling the model to have stronger generalization ability and decision stability for unseen operating conditions.
[0005] To achieve the above-mentioned objectives, the technical solution adopted by this invention is as follows: According to one aspect of the present invention, a method and apparatus for online gear shifting of a heavy-duty electric vehicle based on an augmented graph learning framework are provided, comprising the following steps: S1. Based on the known driving conditions and vehicle dynamics model, the optimal shift trajectory for the entire journey is solved using dynamic programming algorithm, and the time-series optimal solution of the vehicle state variables is obtained. S2. Discretize the vehicle state variables into a series of graph-structured samples according to time steps, and use the optimal middle and rear axle gears output by dynamic programming as labels to construct graph time-series data oriented towards gear shifting decisions. S3. Use a sliding window to process the graph time series data to obtain a graph dataset, and introduce edge features to enhance the graph attention network. Encode and time series aggregate the graph dataset, and output the middle and rear axle gear decisions for the next moment. Train the network by minimizing the difference between the optimal gear and dynamic programming. S4. Construct a graph dataset using the vehicle states sampled from the test conditions, and input the graph dataset into the trained model to quickly infer the gear command.
[0006] Preferably, step S1 specifically includes the following steps: S101. Discretize the driving conditions into several stages according to time, and take the step size as... At every moment Define the discrete-time state variables as: in, The longitudinal speed of the vehicle; The battery is in its state of charge. , These represent the current gear values for the middle and rear axles, respectively. S102. The control variable for dynamic programming is selected as the absolute gear position at the next moment. All possible combinations of rear axle gear positions at the next moment are enumerated, and the control variable is defined as: in, and They represent The gear positions of the middle and rear axles at any given time; S103. Under the above definition, the discrete-time state equation of the system can be expressed as: in, express The time state quantity at a given moment. express The amount of control at any given moment; S104. Expanding the components of the discrete-time state variables, we can express them as follows: in, for The longitudinal acceleration of the vehicle at any given moment is determined by the resultant force and resultant resistance at the wheel ends; The battery current is obtained from the battery power balance equation; Indicates battery capacity; , Indicates the gear update result; express The time state quantity at a given moment. express The amount of control at any given moment; S105, Cost function for the construction phase: in, This indicates the battery energy consumption at the current step. Indicates the energy equivalent of the shift penalty; S106. Given the initial state x0 and the terminal time... Minimize the cumulative cost under the condition of , let From time The minimum cumulative cost to the destination can be derived from the recurrence relation of Bellman's optimality principle: in, Indicates the control feasible region; express The temporal state quantity at any given moment; express The amount of control at any given moment; S107. The optimal control law obtained through optimization is: in, express The cost function at time step.
[0007] Preferably, step S2 specifically includes the following steps: S201, Time The vehicle status is represented as a graph sample, which can be expressed as: in, Represents a set of nodes; Represents the set of edges; Represents the node feature matrix; Represents the edge feature matrix; S202, the vehicle at the time The running status information is represented by 6 nodes, and each node has a 3-dimensional feature vector constructed to form a node feature matrix: in, This represents the feature vector of the current node; S203. The edge feature matrix formed by constructing edge features can be expressed as: in, Indicates from node Pointing to node The strength of the association.
[0008] Preferably, the nodes include a middle axle motor node, a rear axle motor node, a middle axle gearbox node, a rear axle gearbox node, a battery node, and an environmental node.
[0009] Preferably, step S3 specifically includes the following steps: S301. Encode the constructed graph samples using a graph attention layer with edge features. The graph attention operation can be expressed as: in, Represents a node In the Hidden features of the layer, when When =1, ; Represents a trainable linear transformation matrix; For nodes ; Attention weights; S302, Attention weight, defined as: in, Represents a node Pointing to node Edge features; This is the transpose of the attention parameter vector; Indicates a splicing operation; Represents a trainable linear transformation matrix; For nodes ; S303. After the graph attention operation, an edge feature enhancement function is introduced, which can be expressed as: in, This represents a 2-layer feedforward network; Represents a node Hidden features in layer l; Represents a node Pointing to node Edge features; S304. The graph-level embedding vector is obtained through global average pooling, and is represented as follows: in, This represents the final state matrix of all nodes; S305. Dynamic modeling of graph embedding sequences using gated cyclic units can be represented as follows: in, The time window length, Indicates time The temporal hidden state; S306, Based on timing state We construct gear classifiers for the middle axle and the rear axle respectively, represented as: in, , , , These are trainable parameters; S307, the final output shift decision, can be expressed as: S308: By comparing with the optimal shift sequence of dynamic programming, the loss is obtained and backpropagation is performed to iteratively update the model.
[0010] Preferably, step S4 specifically includes the following steps: S401. Under test conditions, vehicle state quantities are collected at a preset sampling period, and graph time series data is constructed. S402. Input the graph time series data into the trained enhanced graph attention network model to obtain the target gear at the current time. S403. Send the gear position command to the vehicle control unit to perform gear shifting, update the vehicle operating status and enter the next sampling cycle, and repeat steps S401 to S402.
[0011] Preferably, an online gear shifting device for heavy-duty electric commercial vehicles based on an enhanced graph learning framework includes a data acquisition module, a data processing module, a graph data construction module, a model inference module, a parameter update module, and a gear shifting output module; The data acquisition module is used to collect real-time operating status data of heavy-duty electric commercial vehicles; The data processing module is used to preprocess the collected operating status data to obtain vehicle status data; The graph data construction module is used to generate graph data containing node feature matrices and edge feature matrices to characterize the energy flow and coupling logic within the dynamic system. The model inference module is used to input the constructed graph data into the shift decision model that combines the graph attention network based on edge feature enhancement with the temporal model. The module extracts the high-dimensional correlation features between the powertrain components through the multi-layer graph attention encoder and models the dynamic evolution relationship of the vehicle state at different time steps in the temporal dimension. Given the current vehicle operating state, the module infers the optimal gear command and corresponding torque distribution strategy of the middle axle and the rear axle online. The parameter update module is used to update the trainable parameters in the graph neural network and time series model based on historical running data, simulation comparison results or offline calibration data, so as to adapt to the changes in state distribution under different vehicle configurations, different road conditions and different driving behaviors. The shift output module receives the gear position command and torque distribution result output by the model inference module, performs safety and feasibility checks on them, and sends shift commands to the AMT transmission actuator and torque control unit through the vehicle controller's communication interface.
[0012] In summary, due to the adoption of the above technical solution, the beneficial effects of the present invention are: 1. This invention firstly, in the offline stage, uses dynamic programming to solve for the optimal shift trajectory throughout the entire journey based on known driving conditions and vehicle dynamics models, obtaining the temporal optimal solution for vehicle state variables. Secondly, this optimal trajectory is discretized into a series of graph structure samples by time step, constructing an energy flow-driven graph structure representation, improving the system state representation capability, and using the optimal middle and rear axle gears output by dynamic programming as labels to construct a graph time-series dataset for shift decision-making. Finally, EE-GAT is designed to encode and temporally aggregate the graph sequence data within a sliding time window, outputting the middle and rear axle gear decisions for the next moment. In the training phase, dynamic programming uses graph data generated under various typical driving conditions as input, and supervised learning is performed by minimizing the difference between the input and the optimal gear from dynamic programming. In the online application phase, a graph sequence is constructed using vehicle states sampled from test conditions, and the graph data is input into the trained model for rapid forward inference to obtain gear commands. This achieves deep physical logic learning, establishes an online shift method jointly modeled by dynamic programming and neural networks, and realizes reliable, low-energy shifting under unknown conditions.
[0013] 2. This invention possesses significant advantages such as high accuracy in gear shifting decisions, strong operational stability, and excellent generalization ability under various operating conditions, enabling it to meet the engineering application requirements of real-time gear shifting control in multi-gear electric drive systems under complex road conditions. Furthermore, this method exhibits strong versatility and can be extended to decision-making and prediction tasks in other vehicle control optimization, intelligent energy management, and multi-component coupled systems, demonstrating broad technological application potential. Attached Figure Description
[0014] Figure 1 This is a flowchart of the method of the present invention.
[0015] Figure 2 This is a schematic diagram of the vehicle structure of the present invention.
[0016] Figure 3 This is the dynamic programming flowchart of the present invention.
[0017] Figure 4 This is a schematic diagram of the enhanced edge feature map attention network of the present invention.
[0018] Figure 5 This is a comparative diagram of the shift sequences of dynamic programming and reinforcement learning in this invention.
[0019] Figure 6 This is a schematic diagram comparing the shift sequences of the present invention with those of a greedy online shifting method.
[0020] Figure 7 This is a schematic diagram of the online gear shifting device of the present invention. Detailed Implementation
[0021] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and preferred embodiments. However, it should be noted that many details listed in the specification are merely to provide the reader with a thorough understanding of one or more aspects of the invention, and these aspects of the invention can be achieved even without these specific details.
[0022] Please see Figures 1 to 7 This invention provides a method and apparatus for online gear shifting in heavy-duty electric vehicles based on an enhanced graph learning framework. The technical solution is as follows: like Figure 1 As shown, an online gear shifting method for heavy-duty electric commercial vehicles based on an augmented graph learning framework includes the following steps: S1. Based on the known driving conditions and vehicle dynamics model, the optimal shift trajectory for the entire journey is solved using dynamic programming algorithm, and the time-series optimal solution of the vehicle state variables is obtained.
[0023] Specifically, the following steps are included: S101. Discretize the driving conditions into several stages according to time, and take the step size as... At every moment Define the discrete-time state variables as: in, The longitudinal speed of the vehicle; The battery is in its state of charge. , These represent the current gear values for the middle and rear axles, respectively.
[0024] S102. The control variable for dynamic programming is selected as the "absolute gear position at the next moment," that is, all possible combinations of rear axle gear positions are enumerated at the next moment. The control variable is defined as follows: in, and They represent The gear values of the middle and rear axles at any given time.
[0025] S103. Under the above definition, the discrete-time state equation of the system can be expressed as: in, express The time state quantity at a given moment. express The amount of control at any given moment.
[0026] S104. Expanding the components of the discrete-time state variables, we can express them as follows: in, for The longitudinal acceleration of the vehicle at any given moment is determined by the resultant force and resultant resistance at the wheel ends; The battery current is obtained from the battery power balance equation; Indicates battery capacity; , Indicates the gear update result; express The time state quantity at a given moment. express The amount of control at any given moment.
[0027] S105. To balance energy consumption and shift frequency, construct the stage cost function: in, This indicates the battery energy consumption at the current step. This indicates the energy equivalent of the shift penalty. express The time state quantity at a given moment. express The amount of control at any given moment.
[0028] S106. The goal of dynamic programming is to solve problems given an initial state x0 and a terminal time. Minimize the cumulative cost under the given conditions. Let... From time The minimum cumulative cost to the destination can be derived from the recurrence relation of Bellman's optimality principle: in, Indicates the control feasible region; express The temporal state quantity at any given moment; express The amount of control at any given moment.
[0029] S107. The optimal control law obtained through optimization is: in, express The cost function at time step; express The temporal state quantity at any given moment; express The amount of control at any given moment.
[0030] S2. Discretize the vehicle state variables into a series of graph-structured samples by time step, and use the optimal middle / rear axle gear output by dynamic programming as the label to construct graph time-series data oriented towards gear shifting decisions.
[0031] S201, Time The vehicle status is represented as a graph sample, which can be expressed as: in, Represents a set of nodes; Represents the set of edges; Represents the node feature matrix; Represents the edge feature matrix.
[0032] S202, the vehicle at the time The operational status information is represented by six nodes: the middle axle motor, the rear axle motor, the middle axle gearbox, the rear axle gearbox, the battery node, and the environment node. Each node has a 3D feature vector constructed, forming a node feature matrix. in, This represents the feature vector of the current node.
[0033] S203. The node characteristics of all nodes are shown in the table below: in, , This refers to the motor speed; , This refers to the motor torque; , For motor efficiency; , This is the current transmission ratio; , To achieve the optimal transmission ratio; For battery health; For total torque, This represents the total resistance.
[0034] S204. The edge feature matrix formed by constructing edge features can be expressed as: in, Indicates from node Pointing to node The strength of the association.
[0035] S205. All edge feature descriptions are shown in the table below: in, , For transmission system efficiency; , These are the minimum and maximum values for battery health, respectively. The normalized total torque; , The normalized torque margin can be expressed as .
[0036] S3. The graph time series data is processed using a sliding window to obtain a graph dataset. An edge feature enhancement graph attention network is introduced to encode and time series aggregate the graph dataset and output the gear decision for the middle and rear axles at the next moment. The network is trained by minimizing the difference between the optimal gear and dynamic programming.
[0037] Specifically, S301. Encode the constructed graph samples using a graph attention layer with edge features. The graph attention operation can be expressed as: in, Represents a node In the Hidden features of the layer, when When =1, ; Represents a trainable linear transformation matrix; For nodes ; This represents the attention weight.
[0038] S302, Attention weight, defined as: in, Represents a node Pointing to node Edge features; This is the transpose of the attention parameter vector; Indicates a splicing operation; Represents a trainable linear transformation matrix; For nodes The neighborhood of.
[0039] S303. To further enhance the expressive power of edge features, an edge feature enhancement function is introduced after the graph attention operation, which can be expressed as: in, This represents a 2-layer feedforward network; Represents a node Hidden features in layer l; Represents a node Pointing to node Edge features.
[0040] S304. The graph-level embedding vector is obtained through global average pooling, and is represented as follows: in, This represents the final state matrix of all nodes.
[0041] S305. Dynamic modeling of graph embedding sequences using gated cyclic units can be represented as follows: in, The time window length, Indicates time The temporal hidden state.
[0042] S306, Based on timing state We construct gear classifiers for the middle axle and the rear axle respectively, represented as: in, , , , These are trainable parameters.
[0043] S307, the final output shift decision, can be expressed as: S308: By comparing with the optimal shift sequence of dynamic programming, the loss is obtained and backpropagation is performed to iteratively update the model.
[0044] S4. Construct a graph dataset using the vehicle states sampled from the test conditions, and input the graph dataset into the trained model to quickly infer the gear command.
[0045] Specifically, the steps include the following: S401. Under test conditions, vehicle state quantities are collected at a preset sampling period, and graph time series data is constructed.
[0046] S402. Input the graph time series data into the trained enhanced graph attention network model to obtain the target gear at the current time.
[0047] S403. Send the gear position command to the vehicle control unit to perform gear shifting, update the vehicle operating status and enter the next sampling cycle, and repeat steps S401 to S402.
[0048] This invention first uses a dynamic programming algorithm to solve for the optimal shift trajectory throughout the entire journey, obtaining the time-series optimal solution for the vehicle state variables. Second, this optimal trajectory is discretized into a series of graph-structured samples by time step, and the optimal middle / rear axle gears output by the dynamic programming are used as labels to construct a graph-time-series dataset oriented towards shift decisions. Finally, the graph sequence data within the sliding time window is encoded and time-series aggregated to output the middle and rear axle gear decisions for the next time step.
[0049] It should be noted that, Figure 2 This is a schematic diagram of the vehicle structure of the present invention. The vehicle adopts a front-axle steering and dual-drive layout with a middle axle and a rear axle. The high-voltage system consists of components such as a power battery, a high-voltage distribution box, and a DC / AC converter, which provides energy and control commands to two traction motors and their controllers through high-voltage electrical connections. The middle axle and the rear axle are each driven by a centralized traction motor. Each traction motor is connected to the final drive and differential through its own three-speed automatic transmission, and the output torque is transmitted to the left and right wheels through the half-shafts, realizing independent drive of the two drive axles.
[0050] The following is a further explanation with reference to specific embodiments: The test conditions selected are the two most representative heavy-duty vehicle test conditions in the industry: WTVC and CHTC-HT. Detailed information about the conditions is shown in the table below: Figure 3This is a schematic diagram of the dynamic programming process of this invention. First, based on the known operating conditions and system parameters, the vehicle speed, SOC, and middle / rear axle gears are discretized to construct a state grid and set terminal conditions. Then, a Bellman recursion is performed from the end forward, enumerating all feasible gear combinations for each state and selecting the optimal control. Finally, the process is backtracked from the initial state along the time axis to obtain the optimal shift trajectory for the entire operating condition.
[0051] Figure 4 This is a schematic diagram of the enhanced edge feature graph attention network of the present invention. It consists of graph information aggregation, edge feature enhancement, and temporal information capture. By performing graph-level encoding on the constructed graph structure at each time step, it captures the structural dependencies within the vehicle powertrain system and finally outputs the gear categories of the middle axle and the rear axle.
[0052] Figure 5 This diagram illustrates a comparison of shift sequences obtained through dynamic programming and reinforcement learning, as presented in this invention. It can be seen that the shift curve obtained by the dynamic programming method is smoother overall, and its shift behavior exhibits a relatively uniform and regular distribution throughout the entire operating cycle. Specifically, the dynamic programming method results in 71 and 70 shifts for the middle and rear axles, respectively, while the reinforcement learning strategy results in 194 and 142 shifts. This demonstrates that dynamic programming effectively suppresses redundant shifting behavior through global search while ensuring vehicle speed tracking and overall vehicle energy consumption. Furthermore, when entering the high-speed phase later in the operating cycle, dynamic programming simultaneously switches both the middle and rear axles to 3rd gear, achieving coordinated operation of the two axles in high gear. Reinforcement learning, limited by short-field optimization, struggles to balance the overall benefits in the later high-speed range. In summary, the global optimality of dynamic programming makes it more conducive to obtaining smooth and economical shift sequences under complex operating conditions.
[0053] Figure 6 This diagram illustrates a comparison of shift sequences between the online shifting method for heavy-duty electric commercial vehicles based on an enhanced graph learning framework and a greedy online shifting method, as presented in this invention. It can be observed that the method of this invention effectively captures the correlation between the vehicle's operating state and the optimal shifting logic, and its generated online shifting sequence maintains a high degree of consistency with the optimal result of dynamic programming for most of the time period. In contrast, the rule-based method, due to its reliance on preset thresholds, struggles to adapt to rapidly changing operating conditions and is prone to unnecessary shifts during acceleration peaks or sudden changes in gradient. While the greedy method possesses a certain degree of adaptability, its decision sequence still deviates significantly from the optimal trajectory because it only optimizes the instantaneous power demand at the current moment. The table below shows the results; the proposed method achieves the lowest total number of shifts and total energy consumption in both test conditions, significantly suppressing the impact and comfort degradation caused by frequent shifting.
[0054] This invention also provides an online gear shifting device for heavy-duty electric commercial vehicles based on an enhanced graph learning framework. This device is used to load and execute the online gear shifting program based on the enhanced graph learning framework of this invention. The online gear shifting device includes a data acquisition module, a data processing module, a graph data construction module, a model inference module, a parameter update module, and a gear shifting output module. The data acquisition module is used to collect real-time operating status data of the heavy-duty electric commercial vehicle, including powertrain-related signals such as vehicle speed, acceleration, drive motor speed and torque, battery state of charge (SOC), current gear information, road gradient, and environmental resistance. The data processing module performs preprocessing operations such as denoising, normalization, outlier removal, and time series reconstruction on the collected raw operating data to obtain vehicle status data that meets the requirements of graph structure modeling. The graph data construction module abstracts components such as the drive motor, transmission, battery, drive axle, and environment in the vehicle powertrain as graph nodes. It constructs edge features based on information such as power transfer relationships, torque coupling relationships, battery margin constraints, torque distribution balance, and speed synchronization between components, thus forming graph data containing node feature matrices and edge feature matrices to characterize the energy flow and coupling logic within the powertrain system. The model inference module inputs the constructed graph data into a shift decision model combining a graph attention network with edge feature enhancement and a temporal model. A multi-layer graph attention encoder extracts high-dimensional correlation features between powertrain components and models the dynamic evolution of vehicle states at different time steps in the temporal dimension. Given the current vehicle operating state, it infers online the optimal gear command and corresponding torque distribution strategy for the middle and rear axles. The parameter update module updates the trainable parameters in the graph neural network and time-series model based on historical operating data, simulation comparison results, or offline calibration data. This adapts to changes in state distribution under different vehicle configurations, road conditions, and driving behaviors, thereby continuously improving the robustness and generalization ability of the online shifting strategy. The shift output module receives the gear commands and torque distribution results output by the model inference module, performs safety and feasibility checks on them, and sends shift commands to the AMT transmission actuator and torque control unit through the vehicle controller's communication interface (such as the CAN bus), realizing online shifting control of the multi-gear electric drive system of heavy-duty electric commercial vehicles.
[0055] In the specific implementation of this invention, the data acquisition module acquires the vehicle dynamics and electrical system operating status in real time through the vehicle bus and outputs it to the data processing module for preprocessing. The data processing module transmits the processed data to the graph data construction module. The graph data construction module constructs a graph structure sample reflecting the current powertrain coupling relationship in each sampling period and inputs the graph structure sample to the model inference module. The model inference module performs forward inference on the graph structure data based on the enhanced graph learning framework and outputs a gear decision result that meets the requirements of energy economy and shift smoothness. The shift output module transmits the gear command to the VCU and drives the AMT actuator to complete the actual shift process. At the same time, it feeds back the shift result and energy consumption information to the parameter update module to realize continuous optimization of model parameters.
[0056] The above description is only a preferred embodiment of the present invention. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the principle of the present invention, and these improvements and modifications should also be considered within the scope of protection of the present invention.
Claims
1. A method for online gear shifting in heavy-duty electric vehicles based on an augmented graph learning framework, characterized in that, Includes the following steps: S1. Based on the known driving conditions and vehicle dynamics model, the optimal shift trajectory for the entire journey is solved using dynamic programming algorithm, and the time-series optimal solution of the vehicle state variables is obtained. S2. Discretize the vehicle state variables into a series of graph-structured samples according to time steps, and use the optimal middle and rear axle gears output by dynamic programming as labels to construct graph time-series data oriented towards gear shifting decisions. S3. Use a sliding window to process the graph time series data to obtain a graph dataset, and introduce edge features to enhance the graph attention network. Encode and time series aggregate the graph dataset, and output the middle and rear axle gear decisions for the next moment. Train the network by minimizing the difference between the optimal gear and dynamic programming. S4. Construct a graph dataset using the vehicle states sampled from the test conditions, and input the graph dataset into the trained model to quickly infer the gear command.
2. The online gear shifting method for heavy-duty electric vehicles based on an augmented graph learning framework according to claim 1, characterized in that: Step S1 specifically includes the following steps: S101. Discretize the driving conditions into several stages according to time, and take the step size as... At every moment Define the discrete-time state variables as: in, The longitudinal speed of the vehicle; The battery is in its state of charge. , These represent the current gear values for the middle and rear axles, respectively. S102. The control variable for dynamic programming is selected as the absolute gear position at the next moment. All possible combinations of rear axle gear positions at the next moment are enumerated, and the control variable is defined as: in, and They represent The gear positions of the middle and rear axles at any given time; S103. Under the above definition, the discrete-time state equation of the system can be expressed as: in, express The time state quantity at a given moment. express The amount of control at any given moment; S104. Expanding the components of the discrete-time state variables, we can express them as follows: in, for The longitudinal acceleration of the vehicle at any given moment is determined by the resultant force and resultant resistance at the wheel ends; The battery current is obtained from the battery power balance equation; Indicates battery capacity; , Indicates the gear update result; express The time state quantity at a given moment. express The amount of control at any given moment; S105, Cost function for the construction phase: in, This indicates the battery energy consumption at the current step. Indicates the energy equivalent of the shift penalty; S106. Given the initial state x0 and the terminal time... Minimize the cumulative cost under the condition of , let From time The minimum cumulative cost to the destination can be derived from the recurrence relation of Bellman's optimality principle: in, Indicates the control feasible region; express The temporal state quantity at any given moment; express The amount of control at any given moment; S107. The optimal control law obtained through optimization is: in, express The cost function at time step.
3. The online gear shifting method for heavy-duty electric vehicles based on an augmented graph learning framework according to claim 1, characterized in that: Step S2 specifically includes the following steps: S201, Time The vehicle status is represented as a graph sample, which can be expressed as: in, Represents a set of nodes; Represents the set of edges; Represents the node feature matrix; Represents the edge feature matrix; S202, the vehicle at the time The running status information is represented by 6 nodes, and each node has a 3-dimensional feature vector constructed to form a node feature matrix: in, This represents the feature vector of the current node; S203. The edge feature matrix formed by constructing edge features can be expressed as: in, Indicates from node Pointing to node The strength of the association.
4. The online gear shifting method for heavy-duty electric vehicles based on an augmented graph learning framework according to claim 3, characterized in that: The nodes include the middle axle motor node, the rear axle motor node, the middle axle gearbox node, the rear axle gearbox node, the battery node, and the environment node.
5. The method and apparatus for online gear shifting of heavy-duty electric vehicles based on an augmented graph learning framework according to claim 1, characterized in that: Step S3 specifically includes the following steps: S301. Encode the constructed graph samples using a graph attention layer with edge features. The graph attention operation can be expressed as: in, Represents a node In the Hidden features of the layer, when When =1, ; Represents a trainable linear transformation matrix; For nodes ; Attention weights; S302, Attention weight, defined as: in, Represents a node Pointing to node Edge features; This is the transpose of the attention parameter vector; Indicates a splicing operation; Represents a trainable linear transformation matrix; For nodes ; S303. After the graph attention operation, an edge feature enhancement function is introduced, which can be expressed as: in, This represents a 2-layer feedforward network; Represents a node Hidden features in layer l; Represents a node Pointing to node Edge features; S304. The graph-level embedding vector is obtained through global average pooling, and is represented as follows: in, This represents the final state matrix of all nodes; S305. Dynamic modeling of graph embedding sequences using gated cyclic units can be represented as follows: in, The time window length, Indicates time The temporal hidden state; S306, Based on timing state We construct gear classifiers for the middle axle and the rear axle respectively, represented as: in, , , , These are trainable parameters; S307, the final output shift decision, can be expressed as: S308: By comparing with the optimal shift sequence of dynamic programming, the loss is obtained and backpropagation is performed to iteratively update the model.
6. The online gear shifting method for heavy-duty electric vehicles based on an augmented graph learning framework according to claim 1, characterized in that: Step S4 specifically includes the following steps: S401. Under test conditions, vehicle state quantities are collected at a preset sampling period, and graph time series data is constructed. S402. Input the graph time series data into the trained enhanced graph attention network model to obtain the target gear at the current time. S403. Send the target gear command to the vehicle control unit to execute the gear shift, update the vehicle operating status and enter the next sampling cycle, and repeat steps S401 to S402.
7. A heavy-duty electric commercial vehicle online gear shifting device based on an augmented graph learning framework, characterized in that: It includes a data acquisition module, a data processing module, a graph data construction module, a model inference module, a parameter update module, and a shift output module; The data acquisition module is used to collect real-time operating status data of heavy-duty electric commercial vehicles; The data processing module is used to preprocess the collected operating status data to obtain vehicle status data; The graph data construction module is used to generate graph data containing node feature matrices and edge feature matrices to characterize the energy flow and coupling logic within the dynamic system. The model inference module is used to input the constructed graph data into the shift decision model that combines the graph attention network based on edge feature enhancement with the temporal model. The module extracts the high-dimensional correlation features between the powertrain components through the multi-layer graph attention encoder and models the dynamic evolution relationship of the vehicle state at different time steps in the temporal dimension. Given the current vehicle operating state, the module infers the optimal gear command and corresponding torque distribution strategy of the middle axle and the rear axle online. The parameter update module is used to update the trainable parameters in the graph neural network and time series model based on historical running data, simulation comparison results or offline calibration data, so as to adapt to the changes in state distribution under different vehicle configurations, different road conditions and different driving behaviors. The shift output module receives the gear position command and torque distribution result output by the model inference module, performs safety and feasibility checks on them, and sends shift commands to the AMT transmission actuator and torque control unit through the vehicle controller's communication interface.