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 PDFInfo
- 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
Links
- 239000000725 suspension Substances 0.000 title claims abstract description 104
- 238000000034 method Methods 0.000 title claims abstract description 43
- 230000007246 mechanism Effects 0.000 title claims abstract description 37
- 238000013528 artificial neural network Methods 0.000 title claims abstract description 30
- 238000012549 training Methods 0.000 claims abstract description 54
- 238000006073 displacement reaction Methods 0.000 claims abstract description 38
- 238000005457 optimization Methods 0.000 claims abstract description 24
- 238000003062 neural network model Methods 0.000 claims abstract description 8
- 238000004364 calculation method Methods 0.000 claims abstract description 7
- 238000004088 simulation Methods 0.000 claims abstract description 7
- 238000007781 pre-processing Methods 0.000 claims abstract description 5
- 230000006870 function Effects 0.000 claims description 33
- 238000012360 testing method Methods 0.000 claims description 19
- 238000004422 calculation algorithm Methods 0.000 claims description 14
- 210000002569 neuron Anatomy 0.000 claims description 12
- 238000012795 verification Methods 0.000 claims description 12
- 230000001133 acceleration Effects 0.000 claims description 11
- 230000015654 memory Effects 0.000 claims description 11
- 238000010200 validation analysis Methods 0.000 claims description 8
- 238000013461 design Methods 0.000 claims description 7
- 238000001914 filtration Methods 0.000 claims description 7
- 230000008569 process Effects 0.000 claims description 6
- 230000001537 neural effect Effects 0.000 claims description 5
- 230000004913 activation Effects 0.000 claims description 4
- 239000011159 matrix material Substances 0.000 claims description 4
- 210000005036 nerve Anatomy 0.000 claims description 4
- 238000005070 sampling Methods 0.000 claims description 4
- 238000013016 damping Methods 0.000 claims description 3
- 230000009466 transformation Effects 0.000 claims description 3
- 239000006096 absorbing agent Substances 0.000 claims description 2
- 230000001419 dependent effect Effects 0.000 claims description 2
- 238000013507 mapping Methods 0.000 claims description 2
- 230000035939 shock Effects 0.000 claims description 2
- 230000008901 benefit Effects 0.000 abstract description 9
- 238000001228 spectrum Methods 0.000 abstract description 8
- 238000011478 gradient descent method Methods 0.000 description 10
- 238000010586 diagram Methods 0.000 description 8
- 230000007774 longterm Effects 0.000 description 5
- 230000007547 defect Effects 0.000 description 3
- 230000000694 effects Effects 0.000 description 3
- 238000011160 research Methods 0.000 description 3
- 210000004027 cell Anatomy 0.000 description 2
- 210000002364 input neuron Anatomy 0.000 description 2
- 238000010606 normalization Methods 0.000 description 2
- 230000003044 adaptive effect Effects 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 230000033001 locomotion Effects 0.000 description 1
- 230000007787 long-term memory Effects 0.000 description 1
- 239000000463 material Substances 0.000 description 1
- 238000003058 natural language processing Methods 0.000 description 1
- 230000010355 oscillation Effects 0.000 description 1
- 238000004321 preservation Methods 0.000 description 1
- 238000012545 processing Methods 0.000 description 1
- 230000000306 recurrent effect Effects 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F30/00—Computer-aided design [CAD]
- G06F30/10—Geometric CAD
- G06F30/15—Vehicle, aircraft or watercraft design
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F30/00—Computer-aided design [CAD]
- G06F30/20—Design optimisation, verification or simulation
- G06F30/27—Design optimisation, verification or simulation using machine learning, e.g. artificial intelligence, neural networks, support vector machines [SVM] or training a model
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/08—Learning methods
- G06N3/084—Backpropagation, e.g. using gradient descent
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F2111/00—Details relating to CAD techniques
- G06F2111/10—Numerical modelling
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F2119/00—Details relating to the type or aim of the analysis or the optimisation
- G06F2119/14—Force 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
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:
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;
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:
wherein:
m s is the mass of the car body
I s Is the rotational inertia of the vehicle bodyIs 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 bodyFor the displacement of the front and rear wheel road surface>For the displacement under the front and back springs->For front and back sprung displacement->For the rigidity of the front and rear tires->For the front and rear suspension nonlinear air spring force +.>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:
the fitted nonlinear air spring force is:
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:
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:
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.
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 accelerationFront suspension relative displacement +.>Rear suspension relative displacement +.>Front suspension unsprung mass acceleration +.>Rear suspension unsprung mass acceleration->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->Rear suspension unsprung mass displacement->State variable and front wheel road displacement +.>Rear wheel road surface displacement +.>Front wheel tire dynamic load +.>Rear wheel tyre dynamic load +.>Front wheel road force input F l f Force input of rear wheel road surface>
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
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:
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:
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:
θ 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 weightsTo 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:
θ 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 achievedFront suspension relative displacement +.>Rear suspension relative displacement +.>Front suspension unsprung mass acceleration +.>Rear suspension unsprung mass acceleration->As input; non-sprung mass displacement of front suspension of vehicle>Rear suspension unsprung mass displacementState variable and front wheel road displacement +.>Rear wheel road surface displacement +.>Front wheel tire dynamic load +.>Rear wheel tyre dynamic load +.>Front wheel road force input F l f Force input of rear wheel road surface>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 partFront suspension relative displacement +.>Rear suspension relative displacement +.>Front suspension unsprung mass acceleration +.>Rear suspension unsprung mass acceleration->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 bodyFront suspension relative displacement +.>Rear suspension relative displacement +.>Front suspension unsprung mass acceleration +.>Rear suspension unsprung mass acceleration->A time series of state variables as inputs; displacement of unsprung mass of front suspension of vehicle>Rear suspension unsprung mass displacement->State variable and front wheel road displacement +.>Rear wheel road surface displacement +.>Front wheel tire dynamic load +.>Rear wheel tyre dynamic load +.>Front wheel road force input +.>Rear wheel road force input->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:
wherein:
m s is the mass of the car body, I s Is the moment of inertia of the vehicle body,is the unsprung mass of the front wheel and the rear wheel, x s For vehicle body displacement, θ is vehicle body pitch angle, +.>For the displacement of the front and rear wheel road surface +.>For the displacement of the front and back spring, the +.>For front and back sprung displacement, +.>For front and rear tyre stiffness->For the nonlinear air spring force of front and rear suspensions, < >>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:
the fitted nonlinear air spring force is:
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:
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:
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:
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 accelerationFront suspension relative displacement +.>Rear suspension relative displacement +.>Front suspension unsprung mass acceleration +.>Rear suspension unsprung mass acceleration->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->Rear suspension unsprung mass displacement->State variable and front wheel road displacement +.>Rear wheel road surface displacement +.>Front wheel tire dynamic load +.>Rear wheel tyre dynamic load +.>Front wheel road force input +.>Rear wheel road force input->
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:
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:
and (5) carrying out weight updating:
θ 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:
θ 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.
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)
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 |
-
2023
- 2023-02-16 CN CN202310124436.0A patent/CN116341099A/en active Pending
Cited By (6)
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 |