CN116341099A - Method for constructing LSTM neural network vehicle suspension system state observer based on attention mechanism - Google Patents

Method for constructing LSTM neural network vehicle suspension system state observer based on attention mechanism Download PDF

Info

Publication number
CN116341099A
CN116341099A CN202310124436.0A CN202310124436A CN116341099A CN 116341099 A CN116341099 A CN 116341099A CN 202310124436 A CN202310124436 A CN 202310124436A CN 116341099 A CN116341099 A CN 116341099A
Authority
CN
China
Prior art keywords
model
state
suspension system
data
input
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202310124436.0A
Other languages
Chinese (zh)
Inventor
刘善辉
庄晔
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Jilin University
Original Assignee
Jilin University
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Jilin University filed Critical Jilin University
Priority to CN202310124436.0A priority Critical patent/CN116341099A/en
Publication of CN116341099A publication Critical patent/CN116341099A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F30/00Computer-aided design [CAD]
    • G06F30/10Geometric CAD
    • G06F30/15Vehicle, aircraft or watercraft design
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F30/00Computer-aided design [CAD]
    • G06F30/20Design optimisation, verification or simulation
    • G06F30/27Design optimisation, verification or simulation using machine learning, e.g. artificial intelligence, neural networks, support vector machines [SVM] or training a model
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • G06N3/084Backpropagation, e.g. using gradient descent
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2111/00Details relating to CAD techniques
    • G06F2111/10Numerical modelling
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2119/00Details relating to the type or aim of the analysis or the optimisation
    • G06F2119/14Force analysis or force optimisation, e.g. static or dynamic forces

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Geometry (AREA)
  • General Physics & Mathematics (AREA)
  • Evolutionary Computation (AREA)
  • General Engineering & Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Software Systems (AREA)
  • Artificial Intelligence (AREA)
  • Mathematical Analysis (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Mathematical Optimization (AREA)
  • Computational Mathematics (AREA)
  • Aviation & Aerospace Engineering (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Medical Informatics (AREA)
  • Automation & Control Theory (AREA)
  • Health & Medical Sciences (AREA)
  • Pure & Applied Mathematics (AREA)
  • Biomedical Technology (AREA)
  • Biophysics (AREA)
  • Computational Linguistics (AREA)
  • Data Mining & Analysis (AREA)
  • General Health & Medical Sciences (AREA)
  • Molecular Biology (AREA)
  • Computing Systems (AREA)
  • Mathematical Physics (AREA)
  • Vehicle Body Suspensions (AREA)

Abstract

The invention relates to a method for constructing an LSTM neural network vehicle suspension system state observer based on an attention mechanism so as to observe unknown state information, and belongs to the field of vehicle chassis suspensions. The method comprises the following specific steps: building a dynamics model of a half-vehicle suspension system on simulation software, and obtaining suspension system state variables and pavement information through simulation; preprocessing data; designing an encoder-decoder neural network model based on an attention mechanism; randomly initializing parameters; selecting super parameters by using Bayesian optimization; optimizing a state observer model by utilizing small-batch random descent and momentum optimization; optimizing the model by using a dropout regularization and early stopping method, and preventing the state observer model from being over fitted; training and storing a suspension state observer model; and (5) verifying model accuracy. Based on the observer, the method solves the observation problems of unknown state variables of the nonlinear half-vehicle suspension system, road surface information, displacement input spectrum and force input spectrum, and has the advantages of higher precision and faster calculation speed.

Description

Method for constructing LSTM neural network vehicle suspension system state observer based on attention mechanism
Technical Field
The invention relates to the field of automobile chassis suspensions, and discloses a vehicle suspension system and a road surface information observer which are established based on an LSTM neural network with an attention mechanism, and the vehicle suspension system and the road surface information observer observe unknown state information and road surface information, so that the suspension dynamics control precision is improved, and the smoothness of a vehicle is conveniently evaluated.
Background
The automotive suspension system is an important part in the half-vehicle system, and not only determines the running smoothness of the vehicle, but also influences the steering stability of the vehicle. The research on suspension system control is always a research hotspot of students at home and abroad. In order to effectively achieve control of an automotive suspension, the state variables of the suspension system as well as the road surface information must be known. While sensors applied to vehicles can measure some of the suspension system state variables, it is currently only possible to estimate them by creating state observers for state variables that are difficult to measure, such as road surface state information and unsprung mass displacement.
The traditional method for constructing the state observer is mostly a model-based method, and the Kalman filtering algorithm is the most representative method, but the working principle of the Kalman filtering algorithm has some inherent defects. First, in the past, a linear quarter suspension model is mostly adopted, and strong nonlinearity caused by internal friction of a suspension system structure, viscoelastic properties of rubber materials and the like is ignored, so that the model is not accurate enough. Second, the pitch and roll motions of the vehicle are ignored. In addition, parameters identified by Kalman filtering under different driving conditions are different, so that the observation accuracy is affected. Some scholars propose an adaptive Kalman filtering algorithm aiming at the defects, but the calculation amount of the algorithm is large, so that the implementation of the algorithm on a real vehicle is limited.
Road spectrum acquisition is a necessary existence in vehicle dynamics control and vehicle chassis component fatigue life analysis. At present, a road spectrum acquisition method which is widely applied is mainly measured by a sensor, but the road spectrum acquisition method which has high precision and is easy to realize is always the research direction of domestic and foreign scholars because the sensor has limited precision and is limited to the influence of test conditions. A vehicle suspension system state observer is provided that can achieve efficient, reliable road spectrum acquisition, including road displacement input spectra as well as road force input spectra.
The dynamic load of the tire is a main cause of damage to the road surface caused by the tire, and is also one of factors affecting the running safety and smoothness of the vehicle. In vehicle vertical dynamics control, the tire dynamic load has always to be considered first. However, the dynamic load of the tire is difficult to be measured directly by the sensor and can only be predicted by the observer. The state observer provided by the invention can observe the dynamic load of the tire in real time with high precision, and is beneficial to the design of a vehicle dynamics control algorithm.
LSTM neural network based on attention mechanism is widely used in natural language processing and high-precision image recognition at present. The training object is a complex corresponding relation from sequence to sequence. The key characteristic information of the input sequence is extracted through the encoder network, the attention mechanism can screen out the information with strong correlation with the target output, and the characteristic information is converted into the output through the decoder network. Through continuous iterative optimization of data, a deep corresponding relation between an input sequence and an output sequence is established. For a vehicle state observer, the input sequence is a time sequence of measurable suspension system state variables and the output is a time sequence of unknown suspension system state variables and road surface information. The application applies the LSTM neural network based on the attention mechanism to the observation of suspension system state variables, establishes a state observer and performs parameter optimization, and is specifically described as follows:
disclosure of Invention
The invention aims to build a state variable and pavement information observer of a vehicle suspension system by using an LSTM neural network based on an attention mechanism, in particular to an LSTM vehicle suspension system state and pavement information observer based on an attention mechanism, and estimate unknown state and pavement information by using known state variables in real time. The vehicle suspension system state observer with high accuracy and high calculation speed based on data is obtained by dividing the state variable information acquired by simulation into a training set and a testing set and training a long-period memory neural network model.
And training the deep relation between the input sequence and the output sequence by using the encoder-decoder recurrent neural network, so as to improve the precision of the state observer.
With the attention mechanism, the similarity between the output of the encoder and the previous hidden state of the decoder is recorded, and the final weight of each encoder output is obtained. So as to optimize the neural network model, solve the problem of memory failure of long time series and accelerate the learning efficiency.
And (3) utilizing dropout regularization to stop optimizing the model in advance, so as to solve the problem of model overfitting.
And selecting the super parameters by using Bayesian optimization and initializing the super parameters by using Glorot. And the learning time is greatly reduced while the optimal model is obtained.
The model is trained and optimized by utilizing the momentum optimization and small-batch random gradient descent method, so that the convergence speed and effect of the model are accelerated.
Compared with the traditional state observer, the state observer of the suspension system established by utilizing the LSTM neural network model based on experimental simulation data has the advantages of high observation precision and high calculation speed.
The invention provides a method for constructing an LSTM neural network vehicle suspension system state observer based on an attention mechanism, which comprises the following steps:
step 1, building a dynamics model of a half-vehicle suspension system on simulation software, and obtaining suspension system state variables and pavement information through simulation;
step 2 includes, 2.1 data preprocessing: 2.1.1, dividing state variable data into input and output, wherein the state quantity which is convenient for the sensor to measure is input, and the state quantity which is difficult to measure and the road surface information are output; 2.1.2, converting the state variable into a time sequence with a fixed time step, and normalizing the data; 2.1.3 dividing all data into a training set, a verification set and a test set by random sampling, wherein the distribution ratio is 10:2:2;
the data of the training set are used for training the state observer model, the data of the verification set are used for cross-verifying the accuracy of the model in the training process, and the model is iterated and optimized; the data in the test set is used for finally testing the generalization capability of the model, and the estimation accuracy of the state observation model on the unknown state variable is checked;
2.2 design of state observer model: an encoder-decoder neural network model is built, and an attention mechanism layer is built between the encoder layer and the decoder layer. The encoder layer processes the information in the input sequence, each neuron accepts the input of that time step and the output of the last time step, and keeps the sequence information memory. The attention mechanism layer combines the output of the encoder layer with the decoder output of the last step and evaluates the correspondence, and can learn the data closely related to the target output. The decoder layer takes the output of the attention mechanism layer as input and outputs state variable information corresponding to each time step;
step 3, initializing super parameters by utilizing gloort: determining the distribution range of random initialization parameters according to the input number and the output number of each layer;
step 4, selecting super parameters by using Bayes optimization: learning rate, number of neurons in each layer; firstly, determining an objective function, then determining the distribution domain space of each super parameter, and carrying out algorithm design to optimize a state observer model to obtain an optimal model super parameter combination;
step 5, optimizing a state observer model by utilizing small-batch random descent and momentum optimization;
step 6, optimizing the model by using a dropout regularization and early stopping method, and preventing the state observer model from being over fitted;
step 7, model training and storage: the pitch angle theta and the acceleration of the vehicle body
Figure BDA0004081392490000041
Relative displacement of front suspension/>
Figure BDA0004081392490000042
Rear suspension relative displacement +.>
Figure BDA0004081392490000043
Front suspension unsprung mass acceleration +.>
Figure BDA0004081392490000044
Rear suspension unsprung mass acceleration->
Figure BDA0004081392490000045
A time series of state variables as inputs; displacement of unsprung mass of front suspension of vehicle>
Figure BDA0004081392490000046
Rear suspension unsprung mass displacement->
Figure BDA0004081392490000047
State variable and front wheel road displacement +.>
Figure BDA0004081392490000048
Rear wheel road surface displacement +.>
Figure BDA0004081392490000049
Front wheel tire dynamic load +.>
Figure BDA00040813924900000410
Rear wheel tyre dynamic load +.>
Figure BDA00040813924900000411
Front wheel road force input F l f Force input of rear wheel road surface>
Figure BDA00040813924900000412
As output. And importing data to perform state observer model training, and storing an observer model.
Step 8, model accuracy verification: and comparing the predicted unknown state variable with the output quantity in the verification set to obtain 96.35% of model precision, which is more accurate than the traditional modeling mode.
The invention has the following technical effects:
the LSTM neural network vehicle suspension system state observer based on the attention mechanism not only solves the observation problem of unknown state variables and road surface information of the nonlinear half vehicle suspension system, but also has the advantages of higher precision and faster calculation speed compared with the traditional state observer.
Drawings
FIG. 1 half-vehicle suspension model;
FIG. 2LSTM neural unit;
FIG. 3 is a schematic diagram of an attention-based encoder-decoder neural network;
FIG. 4LeakyReLU activation function;
FIG. 5 is a schematic diagram of a suspension state observer model;
FIG. 6 is a flow chart of suspension state observer model building;
FIG. 7a is a diagram showing the observation and actual comparison of the road surface information of the front wheels;
FIG. 7b is a diagram showing the observation and actual comparison of the road surface information of the rear wheels;
FIG. 7c is a diagram comparing the observation and actual displacement of the front suspension spring;
FIG. 7d is a graph comparing the observation and actual displacement of the suspension spring;
FIG. 7e is a diagram showing the observation and actual comparison of the dynamic load of the front tires;
FIG. 7f is a graph showing the observation and actual comparison of the dynamic load of the rear tires;
FIG. 7g is a diagram showing the observation and actual comparison of the road surface force input;
FIG. 7 is a diagram showing the comparison between the road surface force input observation and the actual road surface force input;
Detailed Description
1) Dynamics modeling and simulation of a half-vehicle suspension system:
half-vehicle suspension model referring to fig. 1
The half-vehicle suspension model adopted in the method is an air spring suspension model with higher modeling precision, the spring stiffness of the half-vehicle suspension model is obtained by polynomial fitting, and the damping force of the shock absorber is obtained by learning a neural network model and is a nonlinear model. The state observer can solve the problem of difficult nonlinear solution. The state observer described herein is not limited to use with the suspension model referred to herein.
The half-vehicle suspension system dynamics equation can be expressed as:
Figure BDA0004081392490000061
Figure BDA0004081392490000062
Figure BDA0004081392490000063
Figure BDA0004081392490000064
wherein:
m s is the mass of the car body
I s Is the rotational inertia of the vehicle body
Figure BDA0004081392490000065
Is the unsprung mass of the front wheel and the rear wheel
x s For displacing the vehicle body
θ is the pitch angle of the vehicle body
Figure BDA0004081392490000066
For the displacement of the front and rear wheel road surface>
Figure BDA0004081392490000067
For the displacement under the front and back springs->
Figure BDA0004081392490000068
For front and back sprung displacement->
Figure BDA0004081392490000069
For the rigidity of the front and rear tires->
Figure BDA00040813924900000610
For the front and rear suspension nonlinear air spring force +.>
Figure BDA00040813924900000611
The nonlinear damping force a of the front suspension and the rear suspension is the distance from the mass center of the vehicle body to the front axle
b is the distance from the mass center of the vehicle body to the rear axle
Wherein:
Figure BDA00040813924900000612
Figure BDA00040813924900000613
the fitted nonlinear air spring force is:
Figure BDA00040813924900000614
and adopting a time domain expression of filtering white noise as a pavement input model, wherein the pavement input equations of the front and rear wheels are respectively as follows:
Figure BDA0004081392490000071
Figure BDA0004081392490000072
f 0 for lower cut-off frequency
G 0 Is the road surface unevenness coefficient
u c For the speed of the vehicle
w 1 、w 2 Random white noise input for front and rear road surfaces
And (3) importing the parameters of the half-vehicle suspension model into matlab software, and creating a half-vehicle suspension dynamics model by using simulink software to simulate. And recording simulation data of suspension state variables and road surface displacement.
2) Building an LSTM neural network state observer model based on an attention mechanism:
LSTM nerve unit referring to fig. 2: LSTM cells are most popular among long-term memory cells in neural networks. It is used like a normal basic neural unit, but training converges faster and detects long-term dependencies in the data. It feeds the current input vector x (t) and the previous short-term state h (t-1) into four different fully connected layers. The main layer is the layer outputting g (t), the most important part of the input is stored in a long-term state, and the rest is discarded. The other three layers are door controllers, including: forget gate, input gate and output gate. Forget gates control which parts of the long-term state should be deleted; the input gate controls which parts of g (t) should be added to the long term state; the output gate controls which parts of the long-term state should be read at this time step and output h (t) and output y (t) to the next time step.
LSTM calculation equation:
Figure BDA0004081392490000073
Figure BDA0004081392490000074
Figure BDA0004081392490000075
Figure BDA0004081392490000076
Figure BDA0004081392490000081
Figure BDA0004081392490000082
in this equation:
W xi 、W xf 、W xo 、W xg is each of four layers and inputs a vector x (t) Connected weight matrix W hi 、W hf 、W ho 、W hg Is each of the four layers and the previous short-term state h (t-1) Weight matrix b of connections i 、b f 、b o 、b g Is a bias term for each of the four layers
2.1 data Pre-processing
2.1.1 splitting the sequential data into training set, validation set and test set: the first 80% of the data was used as training set, the middle 10% as validation set, and the last 10% as test set.
2.1.2 normalizing the data. Unifying the magnitude of the data prevents erroneous learning results due to the magnitude difference of the values.
Scaling the function:
Figure BDA0004081392490000083
f' is the data after normalization.
F text Is the data before normalization.
F max Is the maximum value of all the input data.
F min Is the maximum value of all the input data.
2.1.3 slicing the sequential dataset into time series: and determining the time step length of each state vector, and then segmenting all data into sequences with the same time step length in a staggered data acquisition mode.
2.1.4 random shuffle State vector sequence: the order is disordered, so that the learned model is more universal.
2.1.5 determining the input vector sequence and the output vector sequence: the training input of the model is a state variable which is easily measured by a sensor, and comprises the following steps: vehicle body pitch angle θ, vehicle body acceleration
Figure BDA0004081392490000084
Front suspension relative displacement +.>
Figure BDA0004081392490000085
Rear suspension relative displacement +.>
Figure BDA0004081392490000086
Front suspension unsprung mass acceleration +.>
Figure BDA0004081392490000087
Rear suspension unsprung mass acceleration->
Figure BDA0004081392490000088
The training output of the state variable and the road surface information which are difficult to measure as the model comprises the following steps: front suspension unsprung mass displacement->
Figure BDA0004081392490000089
Rear suspension unsprung mass displacement->
Figure BDA00040813924900000810
State variable and front wheel road displacement +.>
Figure BDA0004081392490000091
Rear wheel road surface displacement +.>
Figure BDA0004081392490000092
Front wheel tire dynamic load +.>
Figure BDA0004081392490000093
Rear wheel tyre dynamic load +.>
Figure BDA0004081392490000094
Front wheel road force input F l f Force input of rear wheel road surface>
Figure BDA0004081392490000095
2.2 design of attention-based encoder-decoder networks
Attention-based encoder-decoder neural network architecture referring to fig. 3.
2.2.1 encoder section: the basic unit of the encoder is an LSTM neural unit, which receives the state vector x (t) of the current step, and the hidden memory information h (t-1) of the last step. And obtaining the memory information h (t) of the current step length through nonlinear transformation, and outputting the memory information h (t) of the whole time sequence to a decoder by the last nerve unit of the encoder. The whole encoder section is the function of integrating the active features in the state vector of the whole time sequence and outputting the nonlinear transformation.
2.2.2 decoder part: the basic unit of the decoder is also an LSTM neural unit, and the two received parts are: the memory information h (t) output by the encoder and the output y (t-1) of the last time sequence. The method can sort the information of the input state variable of the current time sequence and the output structure of the last time sequence, learn the nonlinear mapping relation between the target output and the two information, and obtain the target output.
2.2.3 attentiveness mechanisms part: the attention mechanism part is essentially a small neural network that acts to focus the decoder on the information output by the appropriate encoder for each time step, filtering the useful information. The attention mechanism layer receives all the outputs from the encoder and all the concealment states from the decoder at the time of the last time series and evaluates its alignment using the weight coefficients e (i, j). Thus, the importance degree of each encoder information can be obtained, and the information is multiplied by the corresponding weight coefficient and then output. Finally all scores go through softmax layers to obtain the final weights α (i, j) for each encoder output.
2.2.4 selection of activation functions
The LeakyReLU is selected as the activation function for each layer, see FIG. 4.
LeakyReLU α (x)=max(αx,x)
The hyper-parameter α defines the degree of "leakage" of the function: it is the slope at x <0, typically set to 0.01. The variation of the ReLU function overcomes the defect that the ReLU function cannot output less than zero, and maintains the advantage of high convergence rate.
3) Glorot initialization hyper-parameters
Normal distribution with mean 0 and variance of
Figure BDA0004081392490000101
Or-r and +r, wherein
Figure BDA0004081392490000102
Wherein:
fan avg =(fan in +fan out )/2
fan in to input the neuron number
fan out To output the neuron number
Glorot initialization solves the problem of unstable gradient of the deep neural network, and can ensure normal forward prediction and reverse optimization of signals.
4) Selection of superparameters using bayesian optimization
The Bayesian optimization algorithm finds parameters that promote the objective function to the global optimum by learning the shape of the objective function. Firstly, according to prior distribution, a collection function is assumed; then, each time a new sampling point is used to test the objective function, the prior distribution of the objective function is updated by using the information; finally, the algorithm tests the points of the locations where the global maximum is most likely to occur given by the posterior distribution.
The pseudo code is as follows:
Figure BDA0004081392490000103
wherein:
f: the so-called black box, i.e. a set of hyper-parameters is input, resulting in an output value.
X: super parameter search space.
D: representing a data set consisting of several data.
S: is an acquisition function used to select x.
M: is a gaussian model obtained by fitting the dataset D.
Rather than searching every possible combination, bayesian optimization randomly selects the first few. The next best possible value is then selected based on the performance of these super parameters. The choice of each hyper-parameter is therefore dependent on previous attempts. The next set of hyper-parameters is selected and performance is evaluated based on the history until the best combination of hyper-parameters is found.
Advantages are: the Bayesian optimization not only can optimize the precision of the model, but also reduces the time cost compared with methods such as grid search, random search and the like.
5) Optimizing state observer model by using small batch random gradient descent method and momentum optimization
5.1 small batch random gradient descent method
For the neural network, the optimization process is a process of continuously updating the model weights. Gradient descent is one of the most common methods of updating model weights.
First, a loss function is determined:
Figure BDA0004081392490000111
wherein:
Figure BDA0004081392490000112
the goal is to let the loss function J (θ) The minimum value of (1) is determined by the gradient descent method, so J is used (θ) And (3) performing deviation guide on theta and updating weight:
Figure BDA0004081392490000113
θ k for the kth weight before updating
θ’ k For the k weight after updating
Eta is the learning rate
J (θ) As a loss function
m represents how many samples are taken each time for training, if a single-value random gradient descent method is adopted for training, a group of samples are randomly taken each time, and m=1; in the case of batch processing, m is equal to the number of samples extracted as training samples at a time.
Advantages are: because training of a single sample may introduce a lot of noise, so that the single value random gradient descent method does not go in the overall optimization direction for each iteration, it may converge very quickly at the beginning of training, but becomes very slow after a period of training. Using a small batch gradient descent method on this basis, a small batch may be randomly drawn from the sample at a time for training instead of a group. It is possible to avoid sinking to local optimum and to converge to global optimum faster.
5.2 momentum optimization
Conventional gradient descent methods multiply the learning rate by the gradient of the loss function of the subtracted weights
Figure BDA0004081392490000121
To update the weights. Only small, conventional steps are taken on the slope, so the algorithm will take more time to optimize to the bottom.
Momentum optimization is very concerned with what the previous gradient was: at each iteration, it subtracts the local gradient from the momentum vector g and updates the weights by adding the momentum vector. The formula is as follows:
Figure BDA0004081392490000122
θ k →θ k +g
wherein:
g is the momentum vector before update
g To update the momentum vector
Beta is a momentum parameter
The gradient in momentum optimization is for acceleration rather than velocity, and in order to simulate some friction mechanism and prevent the momentum from becoming too large, the algorithm introduces a new super parameter β, called momentum, typically set to 0.9.
Advantages are: the normal gradient descent method will descend quite rapidly along a larger slope, but when the slope is smaller, it takes too long. The corresponding momentum-optimized gradient descent method can descend faster and faster until the descent is optimal. Oscillation and overshoot problems at the optimum point can also be avoided due to the presence of the momentum parameter beta.
6) Method for preventing over fitting problem by using dropout regularization and early stopping method
6.1 regularization with dropout:
when the learning data sample is too few or the network is complex, the neural network focuses on the special features of the training sample, and the acquisition of the extensive features of the learning sample is lost. Such a model works well for data fitting of the training set, but does not have strong generalization ability and is poor for data fitting of the model "unknown". This phenomenon is called model overfitting and the method of preventing this is called regularization.
Dropout is one of the most popular regularization techniques for deep neural networks. The principle is very simple: in each training step, each neuron has a probability p of being "deleted" temporarily, which means that it is completely ignored in this training step, but may be in an active state in the next step. The super parameter p is called dropout rate and is usually set to 10% to 50%. Dropout-trained neurons cannot fit into their neighbors, they must exert their own maximum effect.
Advantages are: each dropout trained neuron cannot rely too much on a few input neurons, but must be concerned with all input neurons, and eventually is less sensitive to small changes in input. A more robust model can be obtained, also more generalizing.
6.2 preventing overfitting with an early stop method
The callback function may save the model periodically during model training and stop training when there is no optimization on the validation set, and may choose to roll back to the best model.
And at the end of each round of training, the callback function compares the error of the current verification set with the error stored before. Only when the model performance on the validation set reaches the current best is the model selected for saving. Therefore, the phenomenon of fitting caused by overlong training time is not needed to be worried about. To prevent time from being wasted by setting an excessive number of training cycles, a method of stopping in advance may be used. If there is no progress on the validation set for multiple rounds (10 selected herein), training will be discontinued and a rollback to the best model previously saved will be selected.
Advantages are: the method solves the problem of model overfitting caused by excessive training times, and saves training time by stopping training in advance.
7) Model training and preservation
The training set and the verification set in the preprocessed data are partially imported into a model for training, and the pitch angle theta and the acceleration of the vehicle body are achieved
Figure BDA0004081392490000141
Front suspension relative displacement +.>
Figure BDA0004081392490000142
Rear suspension relative displacement +.>
Figure BDA0004081392490000143
Front suspension unsprung mass acceleration +.>
Figure BDA0004081392490000144
Rear suspension unsprung mass acceleration->
Figure BDA0004081392490000145
As input; non-sprung mass displacement of front suspension of vehicle>
Figure BDA0004081392490000146
Rear suspension unsprung mass displacement
Figure BDA0004081392490000147
State variable and front wheel road displacement +.>
Figure BDA0004081392490000148
Rear wheel road surface displacement +.>
Figure BDA0004081392490000149
Front wheel tire dynamic load +.>
Figure BDA00040813924900001410
Rear wheel tyre dynamic load +.>
Figure BDA00040813924900001411
Front wheel road force input F l f Force input of rear wheel road surface>
Figure BDA00040813924900001412
As an output, the training number was 4000. And save the best model. A schematic of the state observer model is shown with reference to fig. 5.
8) State observer model prediction and accuracy verification
The pitch angle theta and the acceleration of the vehicle body in the test set part
Figure BDA00040813924900001413
Front suspension relative displacement +.>
Figure BDA00040813924900001414
Rear suspension relative displacement +.>
Figure BDA00040813924900001415
Front suspension unsprung mass acceleration +.>
Figure BDA00040813924900001416
Rear suspension unsprung mass acceleration->
Figure BDA00040813924900001417
And inputting the data into a model to make predictions. The state observer output is then compared with the output corresponding to the actual test set, and the test results indicate that the model accuracy is as high as 96.35%.

Claims (11)

1. A method for constructing an LSTM neural network vehicle suspension system state observer based on an attention mechanism comprises the following steps:
step 1, building a dynamics model of a half-vehicle suspension system on simulation software, and obtaining suspension system state variables and pavement information through simulation;
step 2, comprising: 2.1 data preprocessing and 2.2 design of state observer models,
2.1 the data preprocessing comprises:
2.1.1, dividing state variable data into input and output, wherein the state quantity which is convenient for the sensor to measure is input, and the state quantity which is difficult to measure and the road surface information are output;
2.1.2, converting the state variable into a time sequence with a fixed time step, and normalizing the data;
2.1.3 dividing all data into a training set, a verification set and a test set by random sampling, wherein the distribution ratio is 10:2:2;
the data of the training set are used for training the state observer model, the data of the verification set are used for cross-verifying the accuracy of the model in the training process, and the model is iterated and optimized; the data in the test set is used for finally testing the generalization capability of the model, and the estimation accuracy of the state observation model on the unknown state variable is checked;
2.2 the design State observer model: building an encoder-decoder neural network model, and building an attention mechanism layer between an encoder layer and a decoder layer; the encoder layer processes the information in the input sequence, each neuron receives the input of the time step and the output of the last time step, and memorizes and reserves the sequence information; the attention mechanism layer combines the output of the encoder layer with the output of the decoder of the last step length, evaluates the corresponding relation of the encoder layer and can learn the data closely related to the target output; the decoder layer takes the output of the attention mechanism layer as input and outputs state variable information corresponding to each time step;
step 3, initializing super parameters by utilizing gloort: determining the distribution range of random initialization parameters according to the input number and the output number of each layer;
step 4, selecting super parameters by using Bayes optimization: learning rate, number of neurons in each layer; firstly, determining an objective function, then determining the distribution domain space of each super-parameter, carrying out algorithm design to optimize a state observer model, and finally displaying all the super-parameters of the optimal model;
step 5, optimizing a state observer model by utilizing small-batch random descent and momentum optimization;
step 6, optimizing the model by using a dropout regularization and early stopping method, and preventing the state observer model from being over fitted;
step 7, model training and storage: the pitch angle theta and the acceleration of the vehicle body
Figure FDA0004081392480000021
Front suspension relative displacement +.>
Figure FDA0004081392480000022
Rear suspension relative displacement +.>
Figure FDA0004081392480000023
Front suspension unsprung mass acceleration +.>
Figure FDA0004081392480000024
Rear suspension unsprung mass acceleration->
Figure FDA0004081392480000025
A time series of state variables as inputs; displacement of unsprung mass of front suspension of vehicle>
Figure FDA0004081392480000026
Rear suspension unsprung mass displacement->
Figure FDA0004081392480000027
State variable and front wheel road displacement +.>
Figure FDA0004081392480000028
Rear wheel road surface displacement +.>
Figure FDA0004081392480000029
Front wheel tire dynamic load +.>
Figure FDA00040813924800000210
Rear wheel tyre dynamic load +.>
Figure FDA00040813924800000211
Front wheel road force input +.>
Figure FDA00040813924800000212
Rear wheel road force input->
Figure FDA00040813924800000213
The time sequence of (2) is used as output, data is imported to perform state observer model training, and an observer model is stored;
step 8, model accuracy verification: and comparing the predicted unknown state variable with the output quantity in the verification set to obtain 96.35% of model precision, which is more accurate than the traditional modeling mode.
2. The method for constructing the state observer of the LSTM neural network vehicle suspension system based on the attention mechanism as set forth in claim 1, wherein the steps of 1: the dynamics model of the half-vehicle suspension system is an air spring suspension model, the spring stiffness of the half-vehicle suspension system is obtained by polynomial fitting, the damping force of the shock absorber is obtained by learning a neural network model, and the half-vehicle suspension system is a nonlinear model; the state observer is used for solving the problem of difficult nonlinear solution; the state observer is not limited to the suspension model;
the half-vehicle suspension system dynamics equation can be expressed as:
Figure FDA00040813924800000214
Figure FDA00040813924800000215
Figure FDA00040813924800000216
Figure FDA00040813924800000217
wherein:
m s is the mass of the car body, I s Is the moment of inertia of the vehicle body,
Figure FDA0004081392480000031
is the unsprung mass of the front wheel and the rear wheel, x s For vehicle body displacement, θ is vehicle body pitch angle, +.>
Figure FDA0004081392480000032
For the displacement of the front and rear wheel road surface +.>
Figure FDA0004081392480000033
For the displacement of the front and back spring, the +.>
Figure FDA0004081392480000034
For front and back sprung displacement, +.>
Figure FDA0004081392480000035
For front and rear tyre stiffness->
Figure FDA0004081392480000036
For the nonlinear air spring force of front and rear suspensions, < >>
Figure FDA0004081392480000037
A is the distance from the mass center of the vehicle body to the front axle, b is the distance from the mass center of the vehicle body to the rear axle,
wherein:
Figure FDA0004081392480000038
Figure FDA0004081392480000039
the fitted nonlinear air spring force is:
Figure FDA00040813924800000310
and adopting a time domain expression of filtering white noise as a pavement input model, wherein the pavement input equations of the front and rear wheels are respectively as follows:
Figure FDA00040813924800000311
wherein:
f 0 for lower cut-off frequency, G 0 U is the road surface unevenness coefficient c Is the speed of a vehicle, w 1 、w 2 Random white noise is input for front and rear road surfaces.
3. The method for constructing an LSTM neural network vehicle suspension system state observer based on an attention mechanism according to claim 1, wherein step 2.2 further comprises: LSTM calculation equation:
Figure FDA00040813924800000312
Figure FDA00040813924800000313
Figure FDA00040813924800000314
Figure FDA00040813924800000315
Figure FDA00040813924800000316
Figure FDA0004081392480000041
in this equation:
W xi 、W xf 、W xo 、W xg is each of four layers and inputs a vector x (t) Connected weight matrix
W hi 、W hf 、W ho 、W hg Is each of the four layers and the previous short-term state h (t-1) Connected weight matrix
b i 、b f 、b o 、b g Is a bias term for each of the four layers
Step 2.1.3 further comprises: splitting the sequential data into a training set, a validation set and a test set: taking the first 80% of data as a training set, the middle 10% as a verification set and the last 10% as a test set;
step 2.1.2 further comprises: the data is normalized, the orders of magnitude of the data are unified, and erroneous learning results are prevented from being generated due to the size difference of the numerical values; slicing the sequential dataset into a plurality of time series: and determining the time step length of each state vector, and then segmenting all data into sequences with the same time step length in a staggered data acquisition mode.
4. The method for constructing an LSTM neural network vehicle suspension system state observer based on an attention mechanism according to claim 3, wherein step 2.1.2 further comprises:
scaling the function:
Figure FDA0004081392480000042
wherein:
f' is the normalized data, F text To normalize the previous data, F max For maximum value of all input data, F min Is the maximum value of all the input data.
5. The method for constructing an LSTM neural network vehicle suspension system state observer based on an attention mechanism according to claim 3, wherein the method comprises the following steps:
step 2.1.5 further comprises:
the training input of the model is a state variable which is easily measured by a sensor, and comprises the following steps: vehicle body pitch angle θ, vehicle body acceleration
Figure FDA0004081392480000043
Front suspension relative displacement +.>
Figure FDA0004081392480000044
Rear suspension relative displacement +.>
Figure FDA0004081392480000045
Front suspension unsprung mass acceleration +.>
Figure FDA0004081392480000046
Rear suspension unsprung mass acceleration->
Figure FDA0004081392480000047
The training output of the state variable and the road surface information which are difficult to measure as the model comprises the following steps: front suspension unsprung mass displacement->
Figure FDA0004081392480000048
Rear suspension unsprung mass displacement->
Figure FDA0004081392480000051
State variable and front wheel road displacement +.>
Figure FDA0004081392480000052
Rear wheel road surface displacement +.>
Figure FDA0004081392480000053
Front wheel tire dynamic load +.>
Figure FDA0004081392480000054
Rear wheel tyre dynamic load +.>
Figure FDA0004081392480000055
Front wheel road force input +.>
Figure FDA0004081392480000056
Rear wheel road force input->
Figure FDA0004081392480000057
6. The method for constructing the state observer of the LSTM neural network vehicle suspension system based on the attention mechanism of claim 1 is characterized by comprising the following steps:
step 2.2 comprises:
2.2.1 encoder section: the basic unit of the encoder is an LSTM nerve unit, which receives the state vector x (t) of the current step length and the hidden memory information h (t-1) of the previous step length, and obtains the memory information h (t) of the current step length through nonlinear transformation, and the last nerve unit of the encoder outputs the memory information h (t) of the whole time sequence to the decoder;
2.2.2 decoder part: the basic unit of the decoder is also an LSTM neural unit, and the two received parts are: the memory information h (t) output by the encoder and the output y (t-1) of the last time sequence can be used for finishing the information of the input state variable of the current time sequence and the output structure of the last time sequence, and learning the nonlinear mapping relation between the target output and the two information so as to obtain the target output;
2.2.3 attentiveness mechanisms part: the attention mechanism layer receives all the outputs from the encoder and all the hidden states from the decoder in the last time sequence, and evaluates the alignment degree by using the weight coefficient e (i, j), so that the importance degree of each encoder information can be obtained, the information is multiplied by the corresponding weight coefficient and then output, and finally all the scores pass through the softmax layer to obtain the final weight alpha (i, j) output by each encoder;
step 2.2.4: the activation function, leakyReLU, is:
LeakyReLU α (x)=max(αx,x)
the hyper-parameter α defines the degree of "leakage" of the function: it is the slope at x <0, typically set to 0.01.
7. The method for constructing the state observer of the LSTM neural network vehicle suspension system based on the attention mechanism of claim 1 is characterized by comprising the following steps:
in step 3, the distribution range of the random initialization parameter is:
normal distribution with mean 0 and variance of
Figure FDA0004081392480000061
Or-r and +r, wherein
Figure FDA0004081392480000062
Wherein:
fan avg =(fan in +fan out )/2
wherein:
fan in to input the neuron number, fan out To output the neuron number.
8. The method for constructing the state observer of the LSTM neural network vehicle suspension system based on the attention mechanism of claim 1 is characterized by comprising the following steps:
in step 4: the Bayesian optimization algorithm finds out the parameters which enable the objective function to be lifted to the global optimal value by learning the shape of the objective function, and firstly, a collection function is assumed according to prior distribution; then, each time a new sampling point is used to test the objective function, the prior distribution of the objective function is updated by using the information; finally, the algorithm tests the points of the locations where the global maximum given by the posterior distribution is most likely to occur;
rather than searching each possible combination, bayesian optimization randomly selects the first few; then selecting the next possible optimal value according to the performance of the super parameters; the choice of each hyper-parameter is therefore dependent on previous attempts; the next set of hyper-parameters is selected and performance is evaluated based on the history until the best combination of hyper-parameters is found.
9. The method for constructing the state observer of the LSTM neural network vehicle suspension system based on the attention mechanism of claim 8, which is characterized by comprising the following steps of:
the pseudo code is as follows:
Input:f,X,S,M
D←InitSamples(f,X)
for i←|D|to T do:
p(y|x,D)←FitModel(M,D)
x i ←argmax S(x,p(y|x,D))
y i ←f(x i )
D←D∪(x i ,y i )
end for
wherein:
f: the so-called black box, i.e. a set of hyper-parameters is input, resulting in an output value,
x: the super-parameter search space is used for searching,
d: representing a data set consisting of several data,
s: is an acquisition function, used to select x,
m: is a gaussian model obtained by fitting the dataset D.
10. The method for constructing the state observer of the LSTM neural network vehicle suspension system based on the attention mechanism of claim 1 is characterized by comprising the following steps:
the step 5 comprises the following steps:
5.1 first determine the loss function:
Figure FDA0004081392480000071
wherein:
Figure FDA0004081392480000072
and (5) carrying out weight updating:
Figure FDA0004081392480000073
θ k for the kth weight before updating
θ’ k For the k weight after updating
Eta is the learning rate
J (θ) As a loss function
5.2 at each iteration it subtracts the local gradient from the momentum vector g and updates the weights by adding the momentum vector as follows:
Figure FDA0004081392480000081
θ k →θ k +g
wherein:
g is the momentum vector before the update,
g in order to update the post-momentum vector,
beta is a momentum parameter, typically set to 0.9.
11. The method for constructing the state observer of the LSTM neural network vehicle suspension system based on the attention mechanism of claim 1 is characterized by comprising the following steps:
step 6.1: in each training step, each neuron has a probability p of being temporarily "deleted", which means that in this training step it is completely ignored, but in the next step it may be in an active state, the super-parameter p being called dropout rate, typically set to 10% to 50%;
step 6.2: only when the model performance on the validation set reaches the current best, the model is selected to be saved, so that the phenomenon of over fitting caused by overlong training time is not worried, training is interrupted and the best model saved before is selected to be rolled back in a plurality of rounds including that no progress is performed on the validation set which is selected for 10 times.
CN202310124436.0A 2023-02-16 2023-02-16 Method for constructing LSTM neural network vehicle suspension system state observer based on attention mechanism Pending CN116341099A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310124436.0A CN116341099A (en) 2023-02-16 2023-02-16 Method for constructing LSTM neural network vehicle suspension system state observer based on attention mechanism

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310124436.0A CN116341099A (en) 2023-02-16 2023-02-16 Method for constructing LSTM neural network vehicle suspension system state observer based on attention mechanism

Publications (1)

Publication Number Publication Date
CN116341099A true CN116341099A (en) 2023-06-27

Family

ID=86881350

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310124436.0A Pending CN116341099A (en) 2023-02-16 2023-02-16 Method for constructing LSTM neural network vehicle suspension system state observer based on attention mechanism

Country Status (1)

Country Link
CN (1) CN116341099A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116663434A (en) * 2023-07-31 2023-08-29 江铃汽车股份有限公司 Whole vehicle load decomposition method based on LSTM deep neural network
CN117217101A (en) * 2023-11-09 2023-12-12 中国标准化研究院 Experiment simulation method based on virtual reality technology
CN117333847A (en) * 2023-12-01 2024-01-02 山东科技大学 Track prediction method and system based on vehicle behavior recognition

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116663434A (en) * 2023-07-31 2023-08-29 江铃汽车股份有限公司 Whole vehicle load decomposition method based on LSTM deep neural network
CN116663434B (en) * 2023-07-31 2023-12-05 江铃汽车股份有限公司 Whole vehicle load decomposition method based on LSTM deep neural network
CN117217101A (en) * 2023-11-09 2023-12-12 中国标准化研究院 Experiment simulation method based on virtual reality technology
CN117217101B (en) * 2023-11-09 2024-01-23 中国标准化研究院 Experiment simulation method based on virtual reality technology
CN117333847A (en) * 2023-12-01 2024-01-02 山东科技大学 Track prediction method and system based on vehicle behavior recognition
CN117333847B (en) * 2023-12-01 2024-03-15 山东科技大学 Track prediction method and system based on vehicle behavior recognition

Similar Documents

Publication Publication Date Title
CN116341099A (en) Method for constructing LSTM neural network vehicle suspension system state observer based on attention mechanism
Qin et al. Road excitation classification for semi-active suspension system with deep neural networks
CN111709549B (en) SVD-PSO-LSTM-based short-term traffic flow prediction navigation reminding method
CN114556248A (en) Method for determining a sensor configuration
CN111967308A (en) Online road surface unevenness identification method and system
Kim et al. Deep learning-based estimation of the unknown road profile and state variables for the vehicle suspension system
CN114547963A (en) Tire modeling method and medium based on data driving
CN114166509A (en) Motor bearing fault prediction method
Sieberg et al. Hybrid state estimation combining artificial neural network and physical model
Ziaukas et al. Estimation of Vehicle Side-Slip Angle at Varying Road Friction Coefficients Using a Recurrent Artificial Neural Network
Singh et al. Application of machine learning & deep learning techniques in the context of use cases relevant for the tire industry
CN116310542A (en) Image classification method based on improved cross entropy loss function
CN112967420B (en) Interval two-type based heavy-duty train operation process monitoring method and system
İşbitirici et al. LSTM-Based Virtual Load Sensor for Heavy-Duty Vehicles
CN113837443A (en) Transformer substation line load prediction method based on depth BilSTM
Da Lio et al. Robust and sample-efficient estimation of vehicle lateral velocity using neural networks with explainable structure informed by kinematic principles
Li et al. A Road Roughness Estimation Method based on PSO-LSTM Neural Network
Herz et al. Estimation of load-time curves using recurrent neural networks based on can bus signals
CN111709140B (en) Ship motion forecasting method based on intrinsic plasticity echo state network
CN117786328A (en) Method and system for identifying transverse vibration state of railway vehicle based on BO-CNN-LSTM
De Abreu Model-Free Intelligent Control for Anti-Lock Braking Systems on Rough Terrain
CN116340766B (en) Sliding window-based lithium battery SOC online prediction method and related equipment
Gräber Vehicle State Perception: Novel State Estimation Schemes with a Combination of Physics-based Approaches and Machine Learning in Application to Horizontal Vehicle Dynamics
Doruk et al. Predicting Vehicle Fuel Efficiency: A Comparative Analysis of Machine Learning Models on the Auto MPG Dataset
CN117407672A (en) Hub motor performance prediction method and device based on support vector machine

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination