Hybrid electric vehicle torque distribution optimization method based on ant colony algorithm and multilayer perceptron

By optimizing the neural network of a multilayer perceptron using the ant colony algorithm, the problems of local optima and training instability in torque distribution of hybrid electric vehicles are solved, achieving efficient and stable torque distribution and improved computational efficiency.

CN120986378APending Publication Date: 2025-11-21JILIN UNIVERSITY
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511462378.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-10-14
Publication Date
2025-11-21

AI Technical Summary

Technical Problem

Traditional methods for torque distribution in hybrid electric vehicles suffer from local optima and low optimization efficiency. In particular, under conditions of high-dimensional and complex data, neural network training is unstable, making it difficult to achieve high efficiency and energy saving.

Method used

Ant colony optimization is employed to optimize the neural network of a multilayer perceptron. The pheromone mechanism guides weight updates, avoiding local optima and improving training stability and global optimization capabilities. Torque distribution is optimized in conjunction with the backpropagation algorithm.

Benefits of technology

It significantly improves the accuracy of torque distribution and system computation efficiency, avoids local optima, enhances training stability and convergence speed, and is suitable for on-board real-time control environments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120986378A_ABST
    Figure CN120986378A_ABST
Patent Text Reader

Abstract

The invention discloses a hybrid vehicle torque distribution optimization method based on an ant colony algorithm and a multi-layer perceptron, and the method employs a vehicle demand torque and a power source rotating speed as the input of a neural network, and employs the ant colony algorithm to optimize the weight and bias of the multi-layer perceptron neural network, so as to achieve the precise control of a hybrid vehicle torque distribution system. The ant colony algorithm simulates the foraging behavior of ants, and through dynamic adjustment of pheromone concentration, global search is carried out in a complex nonlinear problem, and parameters of a neural network model are optimized, so that efficient torque distribution can be carried out in a hybrid power system according to real-time working conditions. According to the method, the challenges of multi-path weight updating and global optimization are solved by introducing a pheromone guiding mechanism, the trouble of a local optimal solution is avoided, and the training stability, the convergence speed and the generalization ability of the neural network are improved, so that the torque distribution precision and the calculation efficiency of the system are remarkably improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The application belongs to the technical field of hybrid vehicle torque distribution optimization methods, and particularly relates to a hybrid vehicle torque distribution optimization method based on an ant colony algorithm and a multilayer perceptron. BACKGROUND

[0002] Reasonable distribution of the power source torque of a hybrid vehicle is an important method for reducing vehicle energy loss. Using a learning algorithm for hybrid vehicle torque distribution is a new direction. Compared with a single power source vehicle, a hybrid vehicle can reduce overall energy consumption through torque distribution.

[0003] In traditional methods, torque distribution is usually achieved through rule-based algorithms. However, this method cannot explore the energy-saving potential of the vehicle. Later, scholars proposed an optimization-based strategy, which converts the equivalent minimum fuel consumption method into an optimization problem. This method still has problems that cannot be ignored. The ECU of the vehicle has limited computing power, and deploying an optimization algorithm with good solving effect requires a more powerful controller, which undoubtedly increases the cost of vehicle manufacturing.

[0004] Under the background of intelligent networking and autonomous driving, the computing power of the vehicle controller is more expected to be allocated to the perception decision layer, and a method that can balance the demand for lower computing power and better energy-saving effect is needed. Learning-based methods can effectively solve this problem. However, the training process of neural networks still has problems such as low optimization efficiency and unstable training process. Especially when facing high-dimensional complex data, traditional gradient optimization methods often have difficulty in effectively avoiding local optimal solutions, affecting the performance and generalization ability of the model.

[0005] Therefore, how to improve the optimization efficiency in the training process of neural networks and solve the local optimal problem existing in traditional methods has become one of the current research hotspots.

[0006] Ant colony optimization (ACO) is an optimization algorithm that simulates the foraging behavior of ants in nature. With its global search ability and self-adaptive adjustment mechanism, it has unique advantages in solving complex optimization problems. Through the spread and evaporation mechanism of pheromone, ant colony optimization can effectively explore the global space in multiple dimensions, thereby avoiding falling into local optimal solutions, and has strong global search ability and robustness.

[0007] Although the ant colony algorithm has been widely used in path planning, scheduling optimization and other fields, in the optimization training of neural networks, how to effectively combine the ant colony algorithm with the weight update mechanism of neural networks to improve the stability and global optimization ability of training is still a problem that has not been fully solved. SUMMARY

[0008] In order to solve the problems of easy falling into local optimal solution and low optimization efficiency of the neural network strategy of the traditional gradient descent method, the application provides a hybrid vehicle torque distribution optimization method based on an ant colony algorithm and a multilayer perceptron, uses vehicle demand torque and power source speed as inputs of the neural network, optimizes weights and biases of the multilayer perceptron (MLP) neural network by using an ant colony algorithm (ACO), so as to realize accurate control of a hybrid vehicle torque distribution system. The ant colony algorithm simulates foraging behavior of ants, performs global search in a complex nonlinear problem through dynamic adjustment of pheromone concentration, optimizes parameters of the neural network model, and enables the neural network model to perform efficient torque distribution in a hybrid power system according to real-time working conditions. The application introduces a pheromone guiding mechanism, solves the challenges of multi-path weight updating and global optimization, avoids the problem of local optimal solution, and improves training stability, convergence speed and generalization ability of the neural network, so that the accuracy of torque distribution and the calculation efficiency of the system are significantly improved.

[0009] The application aims to realize the following technical solutions:

[0010] A hybrid vehicle torque distribution optimization method based on an ant colony algorithm and a multilayer perceptron comprises the following steps:

[0011] Step one, training data preprocessing: collect vehicle operating state data as training data, define an input vector X as driving demand torque T r and motor speed N m , and define an output vector Y as engine torque T e and motor torque T m ;

[0012] Step two, construction of an ant colony-multilayer perceptron and parameter initialization:

[0013] S21. A four-layer multilayer perceptron model is established, which comprises:

[0014] an input layer, the input layer comprising two neurons for receiving demand torque and speed characteristics;

[0015] a first hidden layer comprising five neurons for preliminary feature extraction;

[0016] a second hidden layer comprising four neurons for further mining deep-level features;

[0017] an output layer comprising two neurons for outputting engine torque T e and motor torque T m ;

[0018] S22. Parameter initialization: uniformly distributed random initialization of the weights and biases of each layer, and initial pheromone concentration is assigned to the weights and biases of each layer;

[0019] Step three, forward propagation and loss calculation;

[0020] Step four, optimization of back propagation by ant colony algorithm: all ants perform gradient descent on their respective paths, leaving corresponding pheromones, calculating pheromone concentration, and determining specific parameters to be optimized in this iteration by roulette;

[0021] Step five, model evaluation and visualization: model optimization training, repeating steps three to four until the preset number of iterations is reached, saving the trained model parameters for actual torque distribution prediction.

[0022] Further, the step one comprises:

[0023] S11. Collect vehicle operating state data as training data, define the input vector X as the driving demand torque T r and motor speed N m , and the output vector Y as the engine torque T e and motor torque T m :

[0024] X = [T r , N m ]

[0025] Y = [T e , T m ]

[0026] Where T r represents the driving demand torque, N m represents the motor speed; T e is the engine torque, and T m is the motor torque;

[0027] S12. Perform training data normalization.

[0028] Further, in step S21, the hidden layer one and the hidden layer two use the Sigmoid activation function.

[0029] Further, the step S22 comprises:

[0030] Set the ant colony size num ant , pheromone evaporation rate eva rate ;

[0031] Uniformly distributed random initialization of the weights and biases of each layer of the multi-layer perceptron model, and initial pheromone concentration is assigned to the weights and biases of each layer;

[0032] Set learning rate learn rate and total iteration number;

[0033] Set the activation function σ(x) as:

[0034]

[0035] where x represents the input of the previous layer to the current layer.

[0036] Further, the step three comprises:

[0037] S31. Forward propagation calculation:

[0038] Hidden layer one: pass the input features to the hidden layer one, get the output H1 of the hidden layer one and input it into the activation function σ(x), the formula is as follows:

[0039] H1 = σ(XW1 + b1)

[0040] In the formula, W1 represents the weight matrix from the input layer to the hidden layer one, and b1 represents the bias matrix from the input layer to the hidden layer one.

[0041] Hidden layer two: pass the output of the hidden layer one to the hidden layer two, get the output H1 of the hidden layer two and input it into the activation function σ(x), the formula is as follows:

[0042] H2 = σ(H1 · W2 + b2),

[0043] In the formula, W2 represents the weight matrix from the hidden layer one to the hidden layer two, and b2 represents the bias matrix from the hidden layer one to the hidden layer two.

[0044] Output layer: pass the output of the hidden layer two to the output layer, get the final output Y of the forward propagation pred , the formula is as follows:

[0045] Y pred = H2 · W3 + b3,

[0046] In the formula, W3 represents the weight matrix from the hidden layer two to the output layer, and b3 represents the bias matrix from the hidden layer two to the output layer.

[0047] S32. Use mean square error as loss function, loss calculation, the loss value of the final output of the forward propagation and the actual output Y; the loss function MSE calculation formula is as follows:

[0048]

[0049] In the formula, k represents the kth output of the neural network, and n represents the number of outputs.

[0050] Further, in the step four, the gradient of each layer is calculated by back propagation through chain rule to guide the update of weights and biases, and the gradient update formula is as follows:

[0051] The gradient of the output layer: δ3=Y pred -Y;

[0052] The gradient of the output layer to the weight:

[0053] The gradient of the output layer to the bias:

[0054] The gradient of the second hidden layer: δ2=(δ3W3 T )⊙σ'(H1);

[0055] The gradient of the second hidden layer to the weight:

[0056] The gradient of the second hidden layer to the bias:

[0057] The gradient of the first hidden layer: δ1=(δ2W2 T )⊙σ'(XW1+b1);wherein σ' is the derivative of σ(x)=1 / (1+e-x) to x, and x is the input of the current layer from the previous layer network;

[0058] The gradient of the first hidden layer to the weight:

[0059] The gradient of the first hidden layer to the bias:

[0060] In the above formula, W1, W2, W3 are weight matrices of different layers, and b1, b2, b3 are bias matrices of different layers; the weight matrix W i and the bias matrix b i represent the weight and bias of the i-th layer:

[0061]

[0062] wherein m represents the number of iterations, learn rate is the learning rate.

[0063] Further, in the step four, each weight and bias has a corresponding pheromone concentration value, and each ant will leave information on the corresponding bias and weight of each layer after back propagation, and the pheromone decays with the distance;

[0064]

[0065] ​In the formula, w represents weight; b represents bias; tau represents pheromone concentration, i represents the i th input from the previous layer, j represents the j th output connected to the current layer, k represents the k th layer, and m represents the m th bias;

[0066] The optimal pheromone concentration point is calculated in the first iteration:

[0067]

[0068] In the formula, x j represents the position of the j th ant, that is, the weight and bias, x is the value of the weight or bias, and after accumulation, the position with the maximum pheromone density is found by taking the derivative of f (x).

[0069] Further, in step four, pheromone updating is performed after each iteration:

[0070] The overall information distribution f (x) is updated according to the loss value MSE generated in the current iteration last Case:

[0071]

[0072] In the formula, epsilon is a small constant to prevent division by zero; eva rate is the pheromone evaporation rate.

[0073] The present application has the following advantages:

[0074] A torque distribution model is constructed based on a multilayer perceptron (MLP) neural network. The MLP network realizes layer-by-layer processing of information through the structure of an input layer, multiple hidden layers and an output layer. In the network, the input layer is responsible for receiving relevant input features in the torque distribution problem. After processing by the first hidden layer, the feature data are subjected to deeper feature extraction by the second hidden layer, and finally the output layer generates a torque distribution result. In order to enable the network to capture complex nonlinear relationships, a Sigmoid activation function is used to introduce nonlinear mapping for each layer, so that the network can not only process linear problems, but also effectively learn highly complex function relationships. In addition, the connections between neurons in each layer are adjusted by weights, and these weights are gradually adjusted in the training process through the backpropagation algorithm. By taking known input data and expected output data as training samples, the network continuously adjusts parameters according to error values (such as mean square error MSE) to improve its prediction accuracy in the torque distribution problem.

[0075] An ant colony optimization (ACO) algorithm is introduced to optimize the training process of the MLP neural network. The ACO algorithm is a heuristic algorithm that simulates the foraging behavior of ants in nature and has strong global search capability. Through the guidance mechanism of pheromone, the ACO algorithm helps the neural network to achieve a more comprehensive search in the weight space, avoiding the problem of the traditional gradient descent method easily falling into a local optimal solution. Specifically, in each training, the ants decide which weights should be updated through a "roulette" selection mechanism, and the selection of each weight update path depends on the concentration of pheromone on the path. The path with a higher concentration of pheromone represents that the path has performed better in the past, and thus is selected with a higher probability, thereby speeding up the global optimization process.

[0076] During the execution of the algorithm, the ants update the weights and biases through iteration according to the current network weights and error information. Each ant generates a predicted value of torque allocation through local calculation, and calculates the error with the actual value. The error value affects the concentration of pheromone, and a lower error (i.e. a better solution) causes more pheromone to accumulate on the path, thereby causing more ants to tend to select the path. After multiple rounds of training, the distribution of pheromone concentration gradually tends to the optimal solution region, ultimately helping the network to find the optimal weight configuration in fewer iteration times. Through this mechanism, the stability of the training process can be improved, and the convergence speed can be significantly improved, while avoiding the overfitting problem that may occur in traditional methods. In addition, due to the global search capability of the ACO algorithm, better optimization results can be obtained when facing high-dimensional complex problems, thereby improving the accuracy and computational efficiency of the torque allocation task.

[0077] In summary, the present application combines the MLP neural network with the ACO algorithm to optimize the local optimal solution problem in the training of the traditional neural network, and greatly improves the optimization efficiency. This combination method not only improves the training stability, convergence speed and generalization ability of the torque allocation task, but also provides an effective solution for similar high-dimensional and complex optimization problems. BRIEF DESCRIPTION OF DRAWINGS

[0078] Figure 1 A flowchart of the hybrid vehicle torque distribution optimization method based on the ant colony algorithm and the multi-layer perceptron according to an embodiment of the present application is shown in FIG. 1.

[0079] Figure 2 A schematic diagram of the torque fitting effect of the electric motor using the conventional BP algorithm is shown in FIG. 2.

[0080] Figure 3 A schematic diagram of the torque fitting effect of the electric motor after using the method according to an embodiment of the present application is shown in FIG. 3.

[0081] Figure 4Fig. 2 is a schematic diagram of engine torque fitting effect using a conventional BP algorithm;

[0082] Figure 5 Fig. 3 is a schematic diagram of engine torque fitting effect after using the method of the embodiment of the present application;

[0083] Figure 6 Fig. 4 is a schematic diagram of loss value change curve using a conventional BP algorithm;

[0084] Figure 7 Fig. 5 is a schematic diagram of loss value change curve after using the method of the embodiment of the present application;

[0085] Figure 8 Fig. 6 is a schematic diagram of motor output curve of a hybrid vehicle simulation under NEDC condition using a conventional gradient descent method, the method of the embodiment of the present application, RULE and ECMS strategy respectively;

[0086] Figure 9 Fig. 7 is a schematic diagram of gear change output curve of a hybrid vehicle simulation under NEDC condition using a conventional gradient descent method, the method of the embodiment of the present application, RULE and ECMS strategy respectively;

[0087] Figure 10 Fig. 8 is a schematic diagram of engine torque curve of a hybrid vehicle simulation under NEDC condition using a conventional gradient descent method, the method of the embodiment of the present application, RULE and ECMS strategy respectively;

[0088] Figure 11 Fig. 9 is a schematic diagram of engine working point change of a hybrid vehicle simulation under NEDC condition using a conventional gradient descent method, the method of the embodiment of the present application, RULE and ECMS respectively;

[0089] Figure 12 Fig. 10 is a schematic diagram of speed curve of a hybrid vehicle simulation under NEDC condition using a conventional gradient descent method, the method of the embodiment of the present application, RULE and ECMS respectively;

[0090] Figure 13 Fig. 11 is a schematic diagram of displacement curve of a hybrid vehicle simulation under NEDC condition using a conventional gradient descent method, the method of the embodiment of the present application, RULE and ECMS respectively. DETAILED DESCRIPTION

[0091] The technical solutions of the present application are further illustrated below in combination with the drawings and embodiments:

[0092] As Figure 1As shown, the embodiment is a hybrid vehicle torque distribution optimization method based on ant colony optimization (ACO) and multi-layer perceptron (MLP), including the following steps:

[0093] Step one, training data preprocessing

[0094] S11. Collect vehicle operating state data as training data. The speed of the motor and engine is an important factor affecting the torque distribution of the hybrid electric vehicle, which relates to the efficiency and torque output of the motor and engine. The size of the required torque also affects the result of torque distribution. Define the input vector X as the driving demand torque T r and motor speed N m , and the output vector Y as the engine torque T e and motor torque T m .

[0095] X=[T r ,N m ]

[0096] Y=[T e ,T m ]

[0097] Where T r represents the driving demand torque, N m represents the motor speed; T e is the engine torque, and T m is the motor torque.

[0098] S12. Training data normalization: to avoid the influence of the dimension difference between different physical quantities on the training process, Min-Max normalization is used to map the training data to the [-1, 1] interval.

[0099] Step two, construct ant colony-multilayer perceptron and initialize parameters

[0100] S21. Establish a four-layer multi-layer perceptron model, including:

[0101] An input layer, the input layer contains 2 neurons, respectively for receiving demand torque and speed characteristics. In this embodiment, it is used to receive demand torque T r and motor speed N m , respectively.

[0102] Hidden layer one, containing 5 neurons, for preliminary feature extraction;

[0103] Hidden layer two, containing 4 neurons, for further mining deep features;

[0104] The output layer includes two neurons, representing the torque distribution results of the engine and the motor. In this embodiment, the engine torque T e and the motor torque T m are output respectively.

[0105] To enhance the nonlinear fitting ability of the network, the Sigmoid activation function is used in the hidden layer, so that the model can learn complex nonlinear mapping relationships.

[0106] S22. Parameter initialization:

[0107] In this embodiment, the ant colony parameters are set as follows: the ant colony size num ant is 20, and the pheromone evaporation rate eva rate is 0.01.

[0108] The weights and biases of each layer are initialized randomly with uniform distribution, and the initial pheromone concentration is assigned to the weights and biases of each layer:

[0109] W ij ~ U(-1, 1), b j ~ U(-1, 1)

[0110] τ0~ U(0, 1)

[0111] where i represents the i-th neuron (input end) from the previous layer, j represents the j-th neuron (output end) connected to the current layer, W ij represents the connection weight from the i-th neuron of the previous layer to the j-th neuron of the current layer, U represents uniform distribution, meaning that W ij is uniformly distributed, and τ0represents the initial pheromone concentration.

[0112] The learning rate learn rate is set to 0.005, and the total number of iterations is 500.

[0113] The activation function σ(x) is:

[0114]

[0115] e is a mathematical constant with a value of approximately 2.71828.

[0116] Here, x represents the input from the previous layer to the current layer, for example: the input x from the input layer to the first hidden layer is XW1+b1, and the input x from the first hidden layer to the second hidden layer is H1·W2+b2.

[0117] Step three, forward propagation and loss calculation

[0118] S31. Forward propagation calculation:

[0119] Hidden layer one: pass the input features to the hidden layer one, in the hidden layer one, the input matrix X is multiplied by the weight matrix W1, and then the bias term b1 is added to obtain the output H1 of the hidden layer one and input it into the activation function σ(x), the formula is as follows:

[0120] H1 = σ(XW1 + b1)

[0121] In the formula, W1 represents the weight matrix from the input layer to the hidden layer one, and b1 represents the bias matrix from the input layer to the hidden layer one;

[0122] Hidden layer two: pass the output of the hidden layer one to the hidden layer two, in the hidden layer two, the input matrix H1 is multiplied by the weight matrix W2, and then the bias term b2 is added to obtain the output H1 of the hidden layer two and input it into the activation function σ(x), the formula is as follows:

[0123] H2 = σ(H1 · W2 + b2),

[0124] In the formula, W2 represents the weight matrix from the hidden layer one to the hidden layer two, and b2 represents the bias matrix from the hidden layer one to the hidden layer two;

[0125] Output layer: pass the output of the hidden layer two to the output layer, in this layer, the input matrix H2 is multiplied by the weight matrix W3, and then the bias term b3 is added to obtain the final output Y pred , the formula is as follows:

[0126] Y pred = H2 · W3 + b3,

[0127] In the formula, W3 represents the weight matrix from the hidden layer two to the output layer, and b3 represents the bias matrix from the hidden layer two to the output layer;

[0128] S32. Use mean square error (MSE) as the loss function to calculate the loss:

[0129] The loss function MSE calculation formula is as follows:

[0130]

[0131] In the formula, k represents the kth output of the neural network, and n represents the number of outputs. The loss value of the final output (predicted value) and the actual output (true value) is calculated by the loss function.

[0132] Step four, optimize back propagation by ant colony algorithm: all ants perform gradient descent on their respective paths, leaving corresponding pheromones, calculating pheromone concentration, and determining the specific parameters to be optimized in this round of iteration by roulette.

[0133] S41. Set the back propagation mode: back propagation calculates the gradient of each layer by chain rule to guide the update of weights and biases, and the gradient update formula is as follows:

[0134] The gradient of the output layer: δ3=Y pred -Y;

[0135] The gradient of the output layer on the weight:

[0136] The gradient of the output layer on the bias:

[0137] The gradient of the second hidden layer: δ2=(δ3W3 T )⊙σ'(H1);

[0138] The gradient of the second hidden layer on the weight:

[0139] The gradient of the second hidden layer on the bias:

[0140] The gradient of the first hidden layer: δ1=(δ2W2 T )⊙σ'(XW1+b1); where σ' is the derivative of σ(x) = σ(x)(1-σ(x)), x is the input of the previous layer network to this layer.

[0141] The gradient of the first hidden layer on the weight:

[0142] The gradient of the first hidden layer on the bias:

[0143] In the above formula, W1, W2, W3 represent the dimension matrix of different layers containing many individual weights, b1, b2, b3 are weight matrices; the weight matrix W i and the bias matrix b i represent the weight and bias of the i-th layer:

[0144]

[0145] where m represents the number of iterations, learn rate is the learning rate.

[0146] Optimize the weights and biases of the neural network by ant colony algorithm:

[0147] According to the training process of back propagation, it depends on the gradient descent method, which may fall into local minimum or saddle point, resulting in the network unable to find the global optimal solution, especially in complex non-convex loss function, the training may stagnate at a poor solution, therefore, the ant colony algorithm is used to enhance the optimization ability of MLP. ​

[0148] Ant colony algorithm optimizes the weights and biases of neural network by simulating the path selection behavior of ants foraging. Each weight and bias has a corresponding pheromone concentration value, and the concentration of pheromone affects the selection of the path. Each ant leaves information on the corresponding bias and weight of each layer after backpropagation, and the pheromone decays with distance.

[0149]

[0150] In the formula, w represents the weight, i represents the i-th neuron from the previous layer (input end), j represents the j-th neuron connected to the current layer (output end), b represents the bias, k represents the k-th layer, and m represents the m-th bias; τ represents the pheromone concentration, and an ant leaves a pheromone, which decays with distance from this point.

[0151] The optimal pheromone concentration point is calculated in the first iteration:

[0152]

[0153] In the formula, j is the j-th ant, x j represents the position of the j-th ant, i.e. the weight and bias, x is the value of the weight or bias, and after accumulation, the derivative of f(x) is taken to find the position with the maximum pheromone density, i.e. the corresponding position and weight.

[0154] If it is not the first iteration, the past pheromone distribution needs to be added to f(x):

[0155]

[0156] In the formula, f(x) last is the pheromone concentration of the last time, and the derivative is taken to find the optimal path, i.e. the parameters of the neural network.

[0157] At this time, the optimal parameters of the network in the current iteration process can be obtained, and the MSE is calculated to update the information and evaluation.

[0158] S42. Pheromone concentration update:

[0159] After each iteration, the overall information distribution f(x) last is updated according to the loss value MSE generated in the current iteration.

[0160]

[0161] In order to prevent the pheromone from increasing indefinitely, ε is a small constant to prevent division by zero. Each update determines the updated path for two outputs, and the smaller the MSE, the more reasonable the parameters obtained in this iteration, so the corresponding pheromone concentration is larger.

[0162] Step five, model evaluation and visualization

[0163] S51. Model parameter saving and visualization:

[0164] Model optimization training, repeat steps three to four until the preset number of iterations is reached. During the iteration process, record the minimum loss value of each iteration and its corresponding weight and bias;

[0165] Draw the loss value curve with the number of iterations to monitor the model convergence;

[0166] Save the trained model parameters for actual torque distribution prediction.

[0167] S52. Result denormalization: use the inverse process of the mapminmax function to restore the prediction result to the original scale for actual application.

[0168] Simulation verification:

[0169] As shown in Figures 2 to 7 , it can be seen that after adding the ant colony algorithm, the loss function convergence speed is significantly accelerated, and the MLP loss function value after adding the ant colony algorithm is lower under five hundred iterations.

[0170] The simulation analysis of the hybrid electric vehicle under NEDC conditions is carried out by four methods respectively, the four methods are MLP under conventional gradient, MLP combined with ACO and BP (hereinafter referred to as MLP-ACO), rule energy distribution strategy as a comparison method, ECMS energy management strategy as a benchmark method to provide training set, the simulation output result is shown in Figures 8 to 13 . It can be seen that ECMS as a benchmark method has the most times in the high efficiency area, and ACO-MLP and MLP learn this energy distribution strategy, among which ACO-MLP is only second to ECMS.

[0171] The simulation test time consumption comparison results of MLP, MLP-ACO and ECMS methods are shown in Table 1, from the time consumption of the three methods, it can be seen that the operation speed of ACO-MLP is improved by 2 times compared with MLP, and by 10 times compared with ECMS.

[0172] Table 1 Time consumption comparison

[0173]

[0174] The simulation test energy consumption comparison results of MLP, MLP-ACO, RULE and ECMS methods are shown in Table 2, the minimum equivalent energy consumption is ECMS, and ACO-MLP is only second to ECMS to verify its energy saving.

[0175] Table 2 Energy consumption comparison

[0176] method Fuel (g) [SOCl2] <![CDATA[SOC1]]> equivalent fuel (100km / L) ECMS 397 0.6 0.598 4.178 MLP 403 0.6 0.5687 4.259 MLP-ACO 401 0.6 0.3688 4.220 RULE 460 0.6 0.543 6.215

[0177] The embodiment has the following implementation effects:

[0178] The method significantly improves the global search capability and convergence speed of neural network training;

[0179] Avoids the problem that the traditional gradient descent method is easy to fall into local optimization;

[0180] While ensuring the prediction accuracy, the calculation time is greatly reduced, and the method is suitable for vehicle real-time control environment;

[0181] Verification under NEDC working condition shows that the method is superior to the traditional BP method and rule strategy in energy saving and real-time performance.

Claims

1. A method for optimizing torque distribution in hybrid vehicles based on ant colony optimization and multilayer perceptron, characterized in that, Includes the following steps: Step 1: Training Data Preprocessing: Collect vehicle operating status data as training data, and define the input vector X as the driving torque demand T. r and motor speed N m The output vector Y represents the engine torque T. e and motor torque T m ; Step 2: Construct an ant colony-multilayer perceptron and initialize its parameters: S21. Establish a four-layer multilayer perceptron model, including: An input layer, containing two neurons, is used to receive the required torque and speed features respectively; Hidden layer 1, containing 5 neurons, is used for initial feature extraction; Hidden layer 2 contains 4 neurons and is used to further explore deeper features; The output layer contains two neurons, each outputting the engine torque T. e and motor torque T m ; S22. Parameter initialization: The weights and biases of each layer are initialized randomly using a uniform distribution, and an initial pheromone concentration is assigned to the weights and biases of each layer. Step 3: Forward propagation and loss calculation; Step 4: Optimize backpropagation using ant colony algorithm: All ants perform gradient descent on their respective paths, leaving behind corresponding pheromones, calculate the pheromone concentration, and determine the specific parameters to be optimized in this iteration by roulette wheel. Step 5, Model Evaluation and Visualization: Optimize and train the model, repeating steps 3 and 4 until the preset number of iterations is reached. Save the trained model parameters for actual torque distribution prediction.

2. The method for optimizing torque distribution in a hybrid vehicle based on ant colony optimization and multilayer perceptron as described in claim 1, characterized in that, Step one includes: S11. Collect vehicle operating status data as training data, and define the input vector X as the driving demand torque T. r and motor speed N m The output vector Y represents the engine torque T. e and motor torque T m : X=[T r ,N m ] Y=[T e ,T m ] Among them, T r Indicates the required torque, N m Indicates motor speed; T e T represents engine torque. m This refers to the motor torque; S12. Perform training data normalization processing.

3. The method for optimizing torque distribution in hybrid vehicles based on ant colony algorithm and multilayer perceptron as described in claim 1, characterized in that, In step S21, the first hidden layer and the second hidden layer use the Sigmoid activation function.

4. The method for optimizing torque distribution in hybrid vehicles based on ant colony algorithm and multilayer perceptron as described in claim 1, characterized in that, Step S22 includes: Set to ant colony size num ant pheromone evaporation rate (eva) rate ; The weights and biases of each layer of the multilayer perceptron model are initialized using a uniformly distributed random initialization, and an initial pheromone concentration is assigned to the weights and biases of each layer. Set the learning rate rate Total number of iterations; Let the excitation function σ(x) be: Here, x represents the input from the previous layer to this layer.

5. The method for optimizing torque distribution in hybrid vehicles based on ant colony algorithm and multilayer perceptron as described in claim 1, characterized in that, Step three includes: S31. Forward Propagation Calculation: Hidden Layer 1: The input features are passed to Hidden Layer 1 to obtain the output H1 of Hidden Layer 1, which is then input into the activation function σ(x), as shown in the following formula: H1 = σ(X·W1 + b1) In the formula, W1 represents the weight matrix from the input layer to the first hidden layer, and b1 represents the bias matrix from the input layer to the first hidden layer. Hidden Layer 2: The output of Hidden Layer 1 is passed to Hidden Layer 2 to obtain the output H1 of Hidden Layer 2, which is then input into the activation function σ(x) as follows: H2=σ(H1·W2+b2), In the formula, W2 represents the weight matrix of hidden layer 1 to hidden layer 2, and b2 represents the bias matrix of hidden layer 1 to hidden layer 2. Output layer: The output of hidden layer 2 is passed to the output layer to obtain the final output Y of the forward propagation. pred The formula is as follows: Y pred =H2·W3+b3, In the formula, W3 represents the weight matrix from the second hidden layer to the output layer, and b3 represents the bias matrix from the second hidden layer to the output layer. S32. Using mean squared error (MSE) as the loss function, calculate the loss between the final output and the actual output Y during forward propagation; the formula for calculating the loss function MSE is as follows: In the formula, k represents the k-th output of the neural network, and n represents the number of outputs.

6. The method for optimizing torque distribution in hybrid vehicles based on ant colony algorithm and multilayer perceptron as described in claim 1, characterized in that, In step four, backpropagation calculates the gradient of each layer using the chain rule to guide the update of weights and biases. The gradient update formula is as follows: Gradient of the output layer: δ3 = Y pred -Y; Gradient of the output layer with respect to the weights: Gradient of the output layer with respect to the bias: The gradient of hidden layer 2: δ2=(δ3W3) T )⊙σ'(H1); Gradient of the weights in hidden layer 2: Gradients of the second hidden layer for the bias: The gradient of hidden layer 1: δ1 = (δ2W2) T )⊙σ'(XW1+b1); where σ' is a pair of σ'(XW1+b1) ; The derivative is σ'(x) = σ(x)(1-σ(x)), where x is the input of the previous layer to this layer. The gradient of a pair of weights in the hidden layer: The gradient of a pair of biases in the hidden layer: In the above formula, W1, W2, W3 are weight matrices for different layers, and b1, b2, b3 are bias matrices for different layers; the weight matrix W i and bias matrix b i Represents the weights and biases of the i-th layer: Where m represents the number of iterations, learn rate This is the learning rate.

7. The method for optimizing torque distribution in hybrid vehicles based on ant colony algorithm and multilayer perceptron as described in claim 1, characterized in that, In step four, each weight and bias has a corresponding pheromone concentration value. After backpropagation, each ant will leave information on the corresponding bias and weight at each layer. The pheromone decreases with distance. In the formula, w represents the weight; b represents the bias. τ represents the pheromone concentration, i represents the i-th input from the previous layer, j represents the j-th output connected to the current layer, k represents the layer number, and m represents the bias number. The first iteration calculates the optimal pheromone concentration location: In the formula, x j The position of the j-th ant represents the weight and bias, and x is the value of the weight or bias. After summing them up, we find the position with the maximum pheromone density by taking the derivative of f(x).

8. The method for optimizing torque distribution in hybrid vehicles based on ant colony algorithm and multilayer perceptron as described in claim 1, characterized in that, In step four, pheromone updates are performed after each iteration: The overall information distribution f(x) is updated based on the loss value MSE generated in this iteration. last Condition: In the formula, ε is a small constant to prevent division by zero; eva rate This refers to the pheromone evaporation rate.