Hysteresis modeling method based on lstm neural network
By adopting a hysteresis characteristic modeling method based on LSTM neural network, the problem of difficulty in modeling the hysteresis symmetry, asymmetry and rate correlation of piezoelectric ceramics is solved, and high-precision hysteresis characteristic description and compensation is achieved, laying the foundation for subsequent feedforward compensation.
Patent Information
- Application Number
- CN202310866869.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-07-14
- Publication Date
- 2026-01-06
- Estimated Expiration
- 2043-07-14
AI Technical Summary
Existing technologies struggle to simultaneously consider the symmetry, asymmetry, and rate dependence of piezoelectric ceramic hysteresis, leading to incomplete and inaccurate modeling.
A hysteresis characteristic modeling method based on LSTM neural network is adopted. By constructing a prediction model, the input voltage and input rate obtained by equal interval sampling are used. The model is combined with LSTM layer, fully connected layer and regression layer, and trained using gradient descent backpropagation algorithm to predict the difference between input voltage and output displacement, so as to achieve a high-precision description of hysteresis characteristics.
A comprehensive and accurate modeling of the hysteresis characteristics of piezoelectric ceramics was achieved, improving the accuracy of the modeling and demonstrating the feasibility and effectiveness of hysteresis modeling.
Smart Images

Figure CN116861246B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to a method for modeling hysteresis characteristics based on LSTM neural networks, belonging to the field of hysteresis nonlinear modeling. Background Technology
[0002] Hysteresis is a nonlinear phenomenon present in various systems, including ferromagnetic materials and intelligent actuators such as piezoelectric ceramics and shape memory alloys. Hysteresis often causes numerous adverse reactions in systems, making the input and output nonlinear, with the output displacement exhibiting a strong hysteresis effect. This can lead to inaccurate open-loop system responses and instability in closed-loop systems. Due to its advantages such as nanometer resolution, high strength, fast response, and radiation resistance, piezoelectric ceramics are widely used in micro-positioning, ultra-high precision applications, and aerospace. Therefore, modeling hysteresis and eliminating or weakening its effects is currently a hot research topic.
[0003] The hysteresis characteristics of piezoelectric ceramics are manifested in the following aspects: a) When the amplitude of the input voltage signal is small, the input and output of the piezoelectric ceramic exhibit symmetrical hysteresis characteristics, that is, the rising and falling curves of the hysteresis loop are centrally symmetrical about a certain point; b) When the amplitude of the input voltage signal is large, it exhibits asymmetry, and the rising and falling curves of the hysteresis loop are asymmetrical; c) When the frequency of the input signal increases, the hysteresis exhibits rate dependence, and the width of the hysteresis loop increases with the frequency or rate of the input signal.
[0004] To date, numerous hysteresis models have been proposed, primarily falling into two categories: hysteresis models based on physical mechanisms and hysteresis models based on phenomena. Hysteresis models based on physical mechanisms require analyzing the causes of hysteresis, which are fundamentally related to the correlation coefficient of the material; therefore, these methods lack universality. Hysteresis models based on phenomena, on the other hand, do not need to consider the causes; they directly use mathematical tools to model the hysteresis. These methods are simple to model and possess strong universality and portability. Furthermore, phenomenon-based modeling methods mainly include operator-based models and differential equation-based models. Typical operator-based hysteresis models include the Preisach model, PI model, and KP model, while differential equation-based hysteresis models include the Duhenm model, Bouc-Wen model, and Dahl model. In addition, there are many intelligent methods, such as neural network modeling, vector machine modeling, and polynomial modeling methods. Although many of these models have been proposed, most only model certain aspects of the hysteresis characteristics of piezoelectric ceramics, making it difficult to simultaneously consider the symmetry, asymmetry, and rate correlation of the hysteresis. Summary of the Invention
[0005] To address the challenge of simultaneously considering the symmetry, asymmetry, and rate dependence of piezoelectric ceramic hysteresis during modeling, this invention provides a hysteresis characteristic modeling method based on LSTM neural networks.
[0006] The present invention provides a hysteresis characteristic modeling method based on an LSTM neural network, comprising:
[0007] S1. Based on the LSTM neural network, a prediction model is constructed. The input of the prediction model is the input voltage and input rate at n equally spaced sampling times, and the output is the difference between the input voltage and the output displacement at the nth time, where n is a positive integer.
[0008] S2. Construct N training samples in the training set, train the prediction model, and obtain the optimized prediction model.
[0009] S3. Combine the input voltage and input rate at times tn, t-n+1…t-2, t-1, and t to obtain X(t), and input it into the prediction model. The prediction model outputs the predicted value y. a Input voltage u t Subtract the predicted value y a The obtained value is the predicted value y of the piezoelectric ceramic output displacement. d u t Let t be the input voltage to be predicted at time t.
[0010] Preferably, in S2, N training samples are constructed from the training set, and the method for constructing each training sample includes:
[0011] An input voltage signal is applied to the piezoelectric ceramic, and the input voltage and output displacement y at n time points are obtained by sampling at equal intervals. n The input rate at n times is obtained based on the input voltage at n times.
[0012] The input voltage and input rate at n time points are combined to obtain X(n), which is used as the input data for the training samples.
[0013] The input voltage u at time n n Subtract the output displacement y at time n n The difference Y is obtained. c (n) serves as the output data for the training samples.
[0014] Preferably, the prediction model in S1 includes an input layer, an LSTM layer, a fully connected layer, and a regression layer;
[0015] X(n) is input to the LSTM layer through the input layer. The output of the LSTM layer is then input to the regression layer through a fully connected layer. The regression layer outputs the predicted value y. a .
[0016] As a preferred option, in S2, select The parameters of the prediction model are trained using the gradient descent backpropagation algorithm as the loss function of the prediction model.
[0017] The beneficial effects of this invention are that it addresses the problem in existing technologies that cannot comprehensively model the symmetry, asymmetry, and rate dependence of hysteresis in piezoelectric ceramics. To achieve a more comprehensive and accurate model of piezoelectric ceramics, this invention proposes a method based on the similarity between the mechanism of LSTM and the hysteresis problem of piezoelectric ceramics, utilizing an LSTM neural network to model the hysteresis characteristics of piezoelectric ceramics. Experiments and simulations demonstrate the feasibility of hysteresis modeling. This invention employs a specific data processing method to train the LSTM neural network, achieving a high-precision description of symmetry, asymmetry, and rate dependence, laying the foundation for hysteresis compensation. Attached Figure Description
[0018] Figure 1 These are the input and output displacement signals for piezoelectric ceramics;
[0019] Figure 2 The curve represents the hysteresis characteristic.
[0020] Figure 3 This is a schematic diagram of the LSTM cell structure;
[0021] Figure 4 The method for modeling hysteresis characteristics based on LSTM neural network proposed in this invention patent;
[0022] Figure 5 A schematic diagram of the symmetric hysteresis modeling results;
[0023] Figure 6 A schematic diagram of the asymmetric hysteresis modeling results;
[0024] Figure 7 The modeling error diagram for rate-dependent hysteresis in the range of 0-50Hz. Detailed Implementation
[0025] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0026] It should be noted that, unless otherwise specified, the embodiments and features described in the present invention can be combined with each other.
[0027] The present invention will be further described below with reference to the accompanying drawings and specific embodiments, but this is not intended to limit the scope of the invention.
[0028] To address the problem that existing technologies cannot comprehensively model the symmetry, asymmetry, and rate correlation of piezoelectric ceramic hysteresis, this embodiment proposes to use an LSTM neural network to model the hysteresis characteristics of piezoelectric ceramics in order to achieve a more comprehensive and accurate model.
[0029] Due to the hysteresis effect, the output of piezoelectric ceramics is not only related to the current input, but also influenced by historical inputs from previous moments. This phenomenon can be described mathematically as follows:
[0030]
[0031] Where y(t) represents the output displacement at the current time, and y0 represents the output displacement at the initial zero time. It is a time series containing the input voltage signal and the rate, U(t)=[u0,u1,u2,…,u t ] T Let V(t) represent the input voltage signal sequence from time 0 to time t, where V(t) = [v0, v1, v2, ..., vt]. t ] T This represents the input rate from time 0 to time t. The above formula means that the dynamics of the piezoelectric ceramic is the response of the piezoelectric ceramic's output displacement to the sequence of input voltage and input rate under certain initial conditions. This embodiment further transforms equation (1) into equations (2) and (3), namely:
[0032] y(t)=Υ[x(t)|ζ(t)] (2)
[0033] ζ(t)=Θ[x(t)|ζ(t-1)] (3)
[0034] Here, y(t) also represents the output displacement at the current moment, and x(t) = [u t ,v t [] represents only the vector containing the input voltage signal and input rate at the current moment, and ζ(t) is the state vector at the current moment. Then, formula (2) defines the hysteresis output as the output determined by the input vector and the state vector at the current moment, and the hysteresis state is continuously updated with the input vector through formula (3).
[0035] This implementation extracts the hysteresis problem into a general case expressed by mathematical formulas (2) and (3), and combines it with the structural features of the LSTM neural network (such as...). Figure 3 As shown in the figure, this indirectly proves the feasibility of using LSTM neural networks to model hysteresis characteristics in theory. To improve modeling accuracy, this invention adopts... Figure 4The structure shown is used to obtain the predicted value y of the piezoelectric ceramic hysteresis output displacement. d That is, firstly, the difference y between the input voltage signal and the output displacement signal is predicted through the neural network. a Then, subtract this difference y from the input voltage signal. a Obtain the final predicted value y d The hysteresis characteristic modeling method based on LSTM neural network in this embodiment includes:
[0036] Step 1: Based on the LSTM neural network, construct a prediction model. The input of the prediction model is the input voltage and input rate at n equally spaced sampling times, and the output is the difference between the input voltage and the output displacement at the nth time, where n is a positive integer.
[0037] Step 2: Construct N training samples in the training set, train the prediction model, and obtain the optimized prediction model;
[0038] Step 3: Combine the input voltage and input rate at times tn, t-n+1…t-2, t-1, and t into the prediction model. The prediction model outputs the predicted value y. a Input voltage u t Subtract the predicted value y a The obtained value is the predicted value y of the piezoelectric ceramic output displacement. d u t Let t be the input voltage to be predicted at time t.
[0039] Long Short-Term Memory (LSTM) neural networks are a type of recurrent neural network that uses a single memory unit and multiple control gates to handle sequence learning problems with long lags. The mechanism of LSTM is similar to the hysteresis problem of piezoelectric ceramics; that is, the current output value depends not only on the current input value but also on the input sequence from previous time steps. This implementation proposes using an LSTM neural network to model the hysteresis characteristics of piezoelectric ceramics. Experiments and simulations demonstrate the feasibility of hysteresis modeling. Furthermore, the method of this invention utilizes a specific data processing approach to train the LSTM neural network, achieving a high-precision description of symmetry, asymmetry, and rate correlation.
[0040] In step 2 of this embodiment, N training samples are constructed in the training set. The method for constructing each training sample includes:
[0041] An input voltage signal is applied to the piezoelectric ceramic, and the input voltage and output displacement y at n time points are obtained by sampling at equal intervals. n The input rate at n times is obtained based on the input voltage at n times.
[0042] The input voltage and input rate at n time points are combined to obtain X(n), which is used as the input data for the training samples.
[0043] The input voltage u at time n n Subtract the output displacement y at time n n The difference Y is obtained. c (n) serves as the output data for the training samples.
[0044] Specifically:
[0045] An input voltage signal is applied to the piezoelectric ceramic, and the output displacement signal of the piezoelectric ceramic is acquired through a data acquisition card. The input voltage signal and the output displacement signal are normalized to [0,1] to obtain the input voltage vector U(n) = [u0,u1,u2,…,u n ] T And the output displacement vector Y(n) = [y0, y1, y2, ..., y n ] T Where u0, u1, u2, ..., u n y0,y1,y2,…,y n These represent the input voltage and output displacement at sampling times 1, 2, ..., n, respectively.
[0046] For the input voltage vector U(n)=[u0,u1,u2,…,u n ] T By performing forward subtraction on the elements in the vector, we obtain the input rate vector V(n) = [v0, v1, v2, ..., v n ] T .
[0047] The input voltage vector and input rate vector are combined to construct the input data X(n) for the neural network training set:
[0048]
[0049] Subtract the output displacement vector from the input voltage vector to construct the output data Y of the neural network training set. c (n):
[0050] Y c (n)=u n -y n
[0051] This implementation method utilizes a specific data processing approach to train an LSTM neural network, thereby completing a comprehensive description of the hysteresis characteristics of piezoelectric ceramics and further improving modeling accuracy, thus laying a solid foundation for subsequent feedforward compensation.
[0052] This implementation method utilizes software to build, such as Figure 4The prediction model shown includes an input layer, an LSTM layer, a fully connected layer, and a regression layer. X(n) is input to the LSTM layer through the input layer, the output of the LSTM layer is input to the regression layer through the fully connected layer, and the regression layer outputs the predicted value y. a This implementation uses data with a sequence length of 50 to predict the difference y between the input voltage signal and the output displacement signal. a That is, n = 49.
[0053] After constructing the training set of training samples
[0054] Select The training set Ω is input as the loss function of the prediction model. Figure 4 The network shown uses the gradient descent backpropagation algorithm to train the parameters of the prediction model, resulting in an optimized prediction model.
[0055] Step 2 of this embodiment also includes constructing a test set. The method for constructing test samples in the test set is the same as that for training samples. The optimized prediction model is tested using the test set to determine whether the prediction model has reached the set accuracy.
[0056] The modeling error results for symmetric hysteresis, asymmetric hysteresis, and rate-dependent hysteresis in the 0-50Hz range are as follows: Figure 5 , Figure 6 and Figure 7 As shown in the figure, the dashed line represents the actual output data of the piezoelectric ceramic, and the solid line represents the model result predicted using the LSTM neural network method proposed in this invention. Figures 5 to 7 As can be seen, the solid line and the dashed line match very well, indicating the effectiveness of the method in this implementation for modeling hysteresis that is symmetric, asymmetric, and rate-dependent.
[0057] While the invention has been described herein with reference to specific embodiments, it should be understood that these embodiments are merely examples of the principles and applications of the invention. Therefore, it should be understood that many modifications can be made to the exemplary embodiments, and other arrangements can be designed without departing from the spirit and scope of the invention as defined by the appended claims. It should be understood that different dependent claims and features described herein can be combined in ways different from those described in the original claims. It is also understood that features described in conjunction with individual embodiments can be used in other described embodiments.
Claims
1. A method for modeling hysteresis characteristics based on LSTM neural networks, characterized in that, The method comprises: S1, constructing a prediction model based on an LSTM neural network, the input of the prediction model being input voltages and input rates at n time points obtained through equal interval sampling, the output being a difference between the input voltage at the nth time point and output displacement, and n being a positive integer; S2, constructing N training samples in a training set, training the prediction model, and obtaining an optimized prediction model; S3, the input voltage and input rate at t-n, t-n+1…t-2, t-1, t moment are combined to obtain X(t), which is input into the prediction model, and the prediction model outputs the predicted value y a , the input voltage u t Subtract the predicted value y a The obtained value is the predicted value y of the piezoelectric ceramic output displacement d , u t is the input voltage at t moment to be predicted; The prediction model in S1 comprises an input layer, an LSTM layer, a full connection layer, and a regression layer; X(n) is input to the LSTM layer through the input layer, and the output of the LSTM layer is input to the regression layer through the full connection layer, and the regression layer outputs the predicted value y a ; In S2, an input voltage signal is applied to the piezoelectric ceramic, and an output displacement signal of the piezoelectric ceramic is obtained by interval sampling through a collection card or the like. The input voltage signal and the output displacement signal are normalized to [0, 1] to obtain an input voltage vector U(n) = [u0, u1, u2, …, u n ] T and an output displacement vector Y(n) = [y0, y1, y2, …, y n ] T , where u0, u1, u2, …, u n , y0, y1, y2, …, y n are the input voltage and the output displacement corresponding to the sampling time 1, 2, …, n respectively. The input voltage vector U(n) = [u0, u1, u2,..., un] is forward differenced with respect to the elements in the input rate vector V(n) = [v0, v1, v2,..., vn] obtained. n ] T ; and n ] T ; and 2.The hysteresis characteristic modeling method based on LSTM neural network according to claim 1, characterized in that, In S2, the N training samples in the training set are constructed, and the construction method of each training sample comprises: The input voltage signal is applied to the piezoelectric ceramic, and the input voltage at n time points and the output displacement y at the nth time point are obtained by equidistant sampling n The input velocity at n time points is obtained according to the input voltage at n time points; combining the input voltages at the n time points and the input rates at the n time points to obtain X(n) as input data of the training sample; The input voltage u at time n n Subtract the output displacement y at time n n The difference Y is obtained. c (n) serves as the output data for the training samples. 3.The hysteresis characteristic modeling method based on LSTM neural network according to claim 1, characterized in that, In S2, selecting As the loss function of the prediction model, the parameters of the prediction model are trained by using the gradient descent back propagation algorithm. 4.The hysteresis characteristic modeling method based on LSTM neural network according to claim 1, characterized in that, S2 further comprises constructing a test set, the method of constructing a test sample in the test set being the same as that of constructing a training sample; and the optimized prediction model is tested by using the test set.
5. The hysteresis characteristic modeling method based on LSTM neural network according to claim 4, characterized in that, n=49。 6. A storage device readable by a computer, the storage device storing a computer program, characterized in that, The computer program is executed to implement the hysteresis characteristic modeling method based on the LSTM neural network according to any one of claims 1 to 5.
7. A device for modeling hysteresis characteristics based on LSTM neural networks, comprising a storage device, a processor, and a computer program stored in the storage device and executable on the processor, characterized in that, The processor executes the computer program to implement the hysteresis characteristic modeling method based on the LSTM neural network according to any one of claims 1 to 5.
Citation Information
Patent Citations
Building energy consumption electric load prediction method and device based on CNN-LSTM hybrid network model
CN113537571A
Asymmetric rate-dependent hysteresis modeling method based on play operator
CN114970335A