Method for predicting machine tool structure dynamics based on step-by-step training physrnn

By using the step-by-step training method of PhysRNN, combined with linear dynamics networks and nonlinear residual compensation networks, the problems of nonlinear damping and high-frequency signal prediction in the dynamic modeling of complex structures in existing technologies are solved, and high-precision prediction and physical interpretability of machine tool structure dynamics are achieved.

CN121615283BActive Publication Date: 2026-04-21SHANGHAI JIAOTONG UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
SHANGHAI JIAOTONG UNIV
Filing Date
2026-02-02
Publication Date
2026-04-21

AI Technical Summary

Technical Problem

In existing models of complex structural dynamics, purely physical models are difficult to accurately describe nonlinear damping and nonlinear stiffness characteristics, while purely data-driven models lack physical interpretability and generalization ability to small sample data, and cannot effectively predict high-frequency small signals.

Method used

We employ a step-by-step training-based PhysRNN method to construct a model that includes a linear dynamics network and a nonlinear residual compensation network. By using a step-by-step decoupling training strategy and a multi-scale sliding window energy accumulation loss function, we reconstruct the physical parameters and optimize the model, ensuring the model's physical interpretability and high-precision prediction capability.

Benefits of technology

It achieves high-precision prediction of machine tool structural dynamics, solves gradient competition and numerical ill-conditioning problems, improves the physical interpretability of the model and its ability to capture high-frequency signals, and ensures generalization ability under different working conditions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121615283B_ABST
    Figure CN121615283B_ABST
Patent Text Reader

Abstract

This invention relates to the field of dynamic prediction technology, specifically disclosing a method for predicting the dynamics of machine tool structures based on step-by-step training of PhysRNN. The method includes: first, acquiring excitation-response signal pairs of the machine tool structure; constructing a physics-driven recurrent neural network (PhysRNN) model; reconstructing and constraining the physical parameters of the PhysRNN model; then, calculating the error between the predicted displacement and the measured displacement based on a multi-scale sliding window energy accumulation loss function; training the PhysRNN model using a step-by-step decoupled training strategy; and finally, inputting the machine tool excitation signal into the trained PhysRNN model to output the predicted dynamic displacement response of the machine tool structure. This invention requires only a small amount of excitation-response data to achieve high-precision prediction, effectively capturing the linear characteristics and nonlinear deviations of high-frequency machine tool vibrations, and providing a reliable basis for optimizing machine tool machining accuracy.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of dynamics prediction technology, and in particular to a machine tool structure dynamics prediction method based on step-by-step training of PhysRNN. Background Technology

[0002] Modeling the dynamics of complex structures is a key technology in mechanical engineering, aerospace, and precision manufacturing. Traditional modeling methods are mainly divided into analytical or numerical models based on physical principles (pure physical models) and machine learning models based on observational data (pure data-driven models). Pure physical models typically rely on simplified assumptions about the system structure and known physical laws, providing good interpretability. However, they often suffer from insufficient accuracy when describing complex characteristics such as nonlinear damping and nonlinear stiffness that are prevalent in real-world systems. Conversely, pure data-driven models (such as deep learning networks) possess powerful nonlinear fitting capabilities, but they lack physical interpretability. Their generalization performance drops significantly when training data samples are limited, and they struggle to reliably predict unseen high-frequency, minute signals.

[0003] The aforementioned contradictions are particularly prominent in systems with high stiffness and high frequency response characteristics, such as machine tools and spacecraft. In recent years, Physics-Based Neural Networks (PBNNs) have been proposed as a method that integrates physical knowledge and data-driven approaches, aiming to combine the advantages of both. However, existing PBNN methods face significant challenges when applied to such systems: due to the huge difference in numerical magnitude between the system's physical parameters (such as mass and stiffness) and the neural network weights, gradient competition easily occurs during training, leading to weak or even vanishing gradients in the physical branches. The result is often that the physical parameters fail to converge to their true values, and the model essentially degenerates into a pure black-box fitter, losing its physical interpretability.

[0004] Among the publicly available technologies, the method proposed by Liu and Altintas (Predicting the position-dependent dynamics of machine tools using progressive network, PrecisionEngineering, 2022, 73: 409-422) is somewhat representative. Although the technical solutions described in the aforementioned publications construct a reduced-order dynamic model based on substructure interface coupling, their fundamental flaw lies in the fact that this model is only used to generate the simulated training data required for progressive neural networks. The constructed neural network is still a "black box" structure based on traditional parameter matrices and activation functions. In essence, its ability to identify the dynamic characteristics of the system highly depends on the breadth of coverage of the simulated data and the performance of the pre-trained frozen layer, lacking physical interpretability and the ability to generalize to small sample data from the real world. Summary of the Invention

[0005] The purpose of this invention is to provide a machine tool structure dynamics prediction method based on step-by-step training of PhysRNN. This method solves the technical problems in existing complex structure dynamics modeling, where pure physical models are unable to accurately describe the characteristics of nonlinear damping and nonlinear stiffness in dynamics, while pure data-driven models lack physical interpretability, have poor generalization ability to small sample data, and cannot predict high-frequency small signals.

[0006] To achieve the above objectives, this invention provides a machine tool structure dynamics prediction method based on step-by-step training of PhysRNN, comprising the following steps:

[0007] S1. Obtain the excitation-response signal pairs of the machine tool structure;

[0008] S2. Construct the PhysRNN model, which is a physics-driven recurrent neural network.

[0009] S3. Reconstruct and constrain the physical parameters of the PhysRNN model;

[0010] S4. Calculate the error between the displacement predicted by the PhysRNN model and the measured displacement based on the multi-scale sliding window energy accumulation loss function;

[0011] S5. The PhysRNN model is trained using a step-by-step decoupling training strategy.

[0012] S6. Input the machine tool excitation signal into the trained PhysRNN model and output the predicted results of the dynamic displacement response of the machine tool structure.

[0013] In S2, the PhysRNN model, which is driven by physics, includes a linear dynamics network and a nonlinear network. The linear dynamics network includes a projection layer, a physical neuron layer, and a modal layer. The projection layer uses a projection matrix. One-dimensional force signal Projected to A 3D feature space serves as the input to the physical neuron layer;

[0014] Physical neuron layers include A set of dynamic equations, each representing a set of modes of the dynamic structure, when the one-dimensional force signal is projected as After the first dimension, each signal is used as input to the physical neuron layer. The set of dynamic equations were obtained by numerical calculation within the physical neuron layer using the fourth-order Runge-Kutta method. Group modal displacement;

[0015] Modal layers are used to obtain physical neuron layers The modal displacement projection is a one-dimensional displacement vector, and the linear part of the final predicted displacement is obtained. The calculation formula is as follows:

[0016] ;

[0017] in, This represents the linear displacement component output by the linear dynamics network. For the first Modal parameters corresponding to the group dynamic equations For the first Modal displacement output of the set of dynamic equations, This represents the number of modes in a linear dynamical network, i.e., the number of dynamical equations.

[0018] Preferably, in S1, for the same structural dynamics transmission chain of the same machine tool, the excitation signal in the excitation-response signal pair is the force signal generated by the hammer during the impact process. The response signal is the acceleration signal acquired by the accelerometer. Displacement signal obtained after integration processing .

[0019] Preferably, in S2, the numerical calculation is performed using the fourth-order Runge-Kutta method to obtain... The modal displacements are as follows:

[0020] Let the initial values ​​of initial velocity and initial displacement under any mode be respectively Then, together with the force from the first time step, the velocity and displacement of the next time step are calculated using the fourth-order Runge-Kutta method. The displacement sequence over the entire time series is obtained by iterative processing. Finally, the number was obtained. Group modal displacement The calculation formula for the fourth-order Runge-Kutta method is as follows:

[0021] ;

[0022] ;

[0023]

[0024] ;

[0025] ;

[0026] ;

[0027] ;

[0028] ;

[0029] ;

[0030] ;

[0031] ;

[0032] ;

[0033] in, Indicates the modal group, Indicates a time step. This represents the time interval between each step. Indicates the first Modal 1 The force of time step, , , They represent the first Modal mass, modal damping, and modal stiffness of a mode. This represents the second-order modal shift in the fourth-order Runge-Kutta method. This represents the third modal displacement of the fourth-order Runge-Kutta method. This represents the fourth modal displacement of the fourth-order Runge-Kutta method; This represents the first-order modal velocity of the fourth-order Runge-Kutta method. This represents the second-order modal velocity of the fourth-order Runge-Kutta method. This represents the third-order modal velocity of the fourth-order Runge-Kutta method. This represents the fourth-order modal velocity of the fourth-order Runge-Kutta method; This represents the second-order modal acceleration of the fourth-order Runge-Kutta method. This represents the third modal acceleration of the fourth-order Runge-Kutta method. This represents the fourth-order modal acceleration of the fourth-order Runge-Kutta method.

[0034] Preferably, in S2, the nonlinear network is a nonlinear residual compensation network, and the input of the nonlinear residual compensation network is the physical displacement output by the linear dynamics network. Physical speed Physical acceleration A linear state vector concatenated with the current excitation force signal;

[0035] A multilayer perceptron structure consisting of stacked fully connected layers is adopted, and ReLU (Rectified Linear Unit) is introduced as the activation function. The input linear state vector is mapped to a high-dimensional feature space through hidden layers. The increased number of neurons is used to capture high-order nonlinear feature interactions. Then, the dimensionality is reduced layer by layer, and finally a correction amount with the same dimension as the physical displacement, namely the displacement residual, is output. ;

[0036] The predicted total displacement output by the model is formed by superimposing the linear part calculated by the linear dynamics network and the residual part calculated by the nonlinear network, that is:

[0037] ;

[0038] in, This represents the physical displacement ultimately predicted by the model. The linear displacement components output by the linear dynamics network. This represents the displacement correction value output by the nonlinear residual compensation network.

[0039] Preferably, in S3, during parameter reconstruction, a model including modal mass is constructed. Natural frequency Damping ratio In the trainable parameter space of the physical neuron, the dynamic matrix is ​​reconstructed in real time through the following physical relationships:

[0040] ;

[0041] ;

[0042] in, For modal stiffness, Modal damping;

[0043] Initializing physical parameters The Softplus activation function was introduced at that time. It is approximately linear in the positive interval and smoothly approaches zero in the negative interval.

[0044] Preferably, the formula for calculating the multi-scale sliding window energy accumulation loss function in S4 is as follows:

[0045] ;

[0046] in, The length of the time window. The number of data points within the time window. To predict displacement for the model, The measured displacement of the model.

[0047] Preferably, in S5, a step-by-step decoupling training strategy is used to train the PhysRNN model, specifically as follows:

[0048] S51. In the early stages of training, all weights of the nonlinear residual compensation network are frozen, and the optimizer only updates the physical parameters, including the projection matrix. Modal parameters of each mode Modal quality Natural frequency Damping ratio The model quickly fits the main linear components of the response signal, including the main resonant frequencies and decay trends.

[0049] S52. After the physical parameters converge and stabilize, the nonlinear residual compensation network is unlocked for joint fine-tuning to learn the nonlinear stiffness softening and nonlinear friction damping of the interface, and finally the trained PhysRNN network is obtained.

[0050] Preferably, in S5, before training the PhysRNN model, the frequency response function (FRF) of the response points is obtained through force hammer excitation, and the main peaks of the FRF are analyzed and the natural frequencies are determined. Set to primary peak × 2 This provides initial constraints for the modal parameters.

[0051] Therefore, the present invention employs the above-mentioned machine tool structure dynamics prediction method based on step-by-step training of PhysRNN, and the beneficial effects are as follows:

[0052] (1) The neurons in the physical neural network (PhysRNN) constructed in this invention abandon the structure of traditional neurons. Instead, the main part of the neural network is composed of the dynamic differential equations of the system, namely the dynamic linear network and the residual network to correct the nonlinear part. The weights of the dynamic linear network are directly defined as modal parameters with clear physical meaning. Before training the network, the main peaks of the transfer function are obtained through excitation modal analysis, which provides a basis for the initial selection of the model modal parameters, rather than random or frozen values, thereby accelerating the convergence of the network to the optimal solution and giving the model a high degree of interpretability.

[0053] (2) This invention solves the numerical ill-conditioning problem encountered by the existing PBNN architecture when training high-stiffness systems: that is, the physical parameters such as mass and stiffness have huge differences in magnitude, resulting in gradient competition, gradient vanishing or numerical divergence, and the physical parameters cannot converge.

[0054] (3) This invention solves this optimization problem by introducing parameter reconstruction and soft constraints, ensuring the stability and positive definite convergence of physical parameters. At the same time, the step-by-step decoupled training strategy of "linear physical preheating-nonlinear residual fine-tuning" is adopted to ensure the accuracy of the physical skeleton, and combined with the sliding window energy accumulation loss function, the high-precision capture capability of transient response waveform and amplitude is enhanced, making up for the shortcomings of traditional methods in processing the phase sensitivity of high-frequency signals.

[0055] The technical solution of the present invention will be further described in detail below with reference to the accompanying drawings and embodiments. Attached Figure Description

[0056] Figure 1 This is an overall flowchart of an embodiment of the machine tool structure dynamics prediction method based on step-by-step training of PhysRNN of the present invention;

[0057] Figure 2 This is a schematic diagram of the PhysRNN model training process in an embodiment of the machine tool structure dynamics prediction method based on step-by-step training of PhysRNN according to the present invention.

[0058] Figure 3 This is a schematic diagram of the numerical calculation process within each set of dynamic equations in the linear dynamics network of an embodiment of the machine tool structure dynamics prediction method based on step-by-step training PhysRNN of the present invention.

[0059] Figure 4 This is the frequency domain response diagram of the response signal after force hammer excitation in an embodiment of the machine tool structure dynamics prediction method based on step-by-step training PhysRNN of the present invention.

[0060] Figure 5This is a comparison diagram of predicted displacement and measured displacement in an embodiment of the machine tool structure dynamics prediction method based on step-by-step training PhysRNN of the present invention. Detailed Implementation

[0061] The technical solution of the present invention will be further described below with reference to the accompanying drawings and embodiments.

[0062] Unless otherwise defined, the technical or scientific terms used in this invention shall have the ordinary meaning understood by one of ordinary skill in the art to which this invention pertains. The terms "first," "second," and similar terms used in this invention do not indicate any order, quantity, or importance, but are merely used to distinguish different components. Terms such as "comprising" or "including" mean that the element or object preceding the word encompasses the elements or objects listed following the word and their equivalents, without excluding other elements or objects. Terms such as "connected" or "linked" are not limited to physical or mechanical connections, but can include electrical connections, whether direct or indirect. Terms such as "upper," "lower," "left," and "right" are used only to indicate relative positional relationships; when the absolute position of the described object changes, the relative positional relationship may also change accordingly.

[0063] like Figure 1 As shown, the machine tool structure dynamics prediction method based on step-by-step training of PhysRNN includes the following steps:

[0064] S1. Obtain the excitation-response signal pair of the machine tool structure.

[0065] like Figure 2 As shown, for the same structural dynamics transmission chain of the same machine tool, i.e. the same excitation point and the same response point, only one set of excitation-response signals generated by the hammer is needed to train the model.

[0066] The excitation signal in the excitation-response signal pair is the force signal generated by the hammer during the impact process. At the same time, the acceleration signal collected by the accelerometer Displacement signal obtained after integration processing That is, the displacement signal For response signals.

[0067] The entire network takes force signals as input and outputs displacement signals as output. Therefore, when training the network, the force signals are used as input, and the difference between the measured displacement signals and the displacement signals predicted by the model is used to construct the loss function to optimize the network parameters.

[0068] S2. Construct the PhysRNN model, which is a physics-driven recurrent neural network.

[0069] The Physics-based Recurrent Neural Network (PhysRNN) model consists of two parts: a linear dynamics network and a nonlinear network. The linear dynamics network has a three-layer structure: a projection layer, a physical neuron layer, and a modality layer. The projection layer uses a projection matrix. One-dimensional force signal Projected to The 3D feature space serves as the input to the second layer of physical neurons.

[0070] The second physical neuron layer is the most crucial layer in this network. The physical neuron layer includes... A set of dynamic equations, each representing a set of modes of the dynamic structure, is used to simulate the multimodal behavior in the structural dynamic response, thereby better reproducing multiple frequency bands in the response signal.

[0071] When the one-dimensional force signal is projected as After the first dimension, each signal is used as input to the physical neuron layer. The set of dynamic equations were obtained by numerical calculation within the physical neuron layer using the fourth-order Runge-Kutta method. Group modal displacement.

[0072] The third modal layer is used to process the data obtained from the previous physical neuron layer. The modal displacement projection is a one-dimensional displacement vector. The core idea of ​​this layer is to simulate the process of converting modal displacements into physical displacements using the modal matrix. After the force signal passes through the entire linear dynamics network, the linear component of the final predicted displacement is obtained, calculated as follows:

[0073] ;

[0074] in, This represents the linear displacement component output by the linear dynamics network. For the first Modal parameters corresponding to the group dynamic equations For the first Modal displacement output of the set of dynamic equations, This represents the number of modes in a linear dynamical network, i.e., the number of dynamical equations.

[0075] The numerical calculation process within each set of dynamic equations inside the second layer of physical neurons is as follows: Figure 3 As shown, the initial values ​​of initial velocity and initial displacement under any mode are first set as follows: (Default is 0), and then, together with the force from the first time step, it is used as input to calculate the velocity and displacement of the next time step using the fourth-order Runge-Kutta method. The displacement sequence over the entire time series is obtained by iterative processing. Finally, the number was obtained. Group modal displacement The calculation formula for the fourth-order Runge-Kutta method is as follows:

[0076] ;

[0077] ;

[0078]

[0079] ;

[0080] ;

[0081] ;

[0082] ;

[0083] ;

[0084] ;

[0085] ;

[0086] ;

[0087] ;

[0088] in, Indicates the modal group, Indicates a time step. This represents the time interval between each step. Indicates the first Modal 1 The force of time step, , , They represent the first Modal mass, modal damping, and modal stiffness of a mode. This represents the second-order modal shift in the fourth-order Runge-Kutta method. This represents the third modal displacement of the fourth-order Runge-Kutta method. This represents the fourth modal displacement of the fourth-order Runge-Kutta method; This represents the second-order modal velocity of the fourth-order Runge-Kutta method. This represents the third-order modal velocity of the fourth-order Runge-Kutta method. This represents the fourth-order modal velocity of the fourth-order Runge-Kutta method; This represents the first-order modal acceleration of the fourth-order Runge-Kutta method. This represents the second-order modal acceleration of the fourth-order Runge-Kutta method. This represents the third modal acceleration of the fourth-order Runge-Kutta method. This represents the fourth-order modal acceleration of the fourth-order Runge-Kutta method.

[0089] The nonlinear network is constructed as a nonlinear residual compensation network, aiming to capture complex nonlinear behaviors in machine tool dynamics that cannot be explained by the principle of linear modal superposition, such as nonlinear stiffness softening, nonlinear damping, and high-frequency transient disturbances at the interface. The input to the nonlinear residual compensation network is the physical displacement output by the linear dynamics network. Physical speed Physical acceleration The complete linear state vector of the system at the current moment is formed by splicing it with the current excitation force signal.

[0090] The nonlinear network employs a multilayer perceptron structure composed of stacked fully connected layers, and introduces ReLU (Rectified Linear Unit) as the activation function to endow the model with nonlinear mapping capabilities. The specific network structure design adopts a "bottleneck-expansion-contraction" architecture: first, the input linear state vector is mapped to a high-dimensional feature space through hidden layers, utilizing the increased number of neurons to capture higher-order nonlinear feature interactions; then, dimensionality is reduced layer by layer, ultimately outputting a correction amount with the same dimension as the physical displacement, i.e., the displacement residual. .

[0091] Ultimately, the predicted total displacement output by the model of this invention is formed by superimposing the linear part calculated by the linear dynamics network and the residual part calculated by the nonlinear network, that is:

[0092] ;

[0093] in, This represents the physical displacement ultimately predicted by the model. The linear displacement components output by the linear dynamics network. This represents the displacement correction output by the nonlinear residual compensation network. In this way, the model retains both the physical interpretability framework of linear theory and the ability of data-driven methods to accurately correct small nonlinear deviations.

[0094] S3. Reconstruct and constrain the physical parameters of the PhysRNN model.

[0095] To address the "high rigidity" characteristic of machine tool dynamics systems—namely, the significant numerical difference between stiffness and mass parameters that hinders convergence of gradient-based optimization algorithms—this invention implements a parameter space reconstruction and constraint strategy. During parameter reconstruction, this invention abandons the direct... Instead of the traditional approach of using independent training variables, a model incorporating modal quality has been constructed. Natural frequency Damping ratio In the trainable parameter space of the physical neuron, the dynamic matrix is ​​reconstructed in real time through the following physical relationships:

[0096] ;

[0097] ;

[0098] in, For modal stiffness, Modal damping; this reconstruction shifts the optimization objective from a range spanning a huge order of magnitude. The value is transformed into a frequency with a relatively concentrated set of optimized values ​​and a clear physical meaning. Damping ratio This not only balances the gradient magnitudes of the parameters, but also allows the optimizer to descend along a smoother error surface.

[0099] Soft constraint activation: To ensure that the physical parameters always satisfy the physically realizable nonnegativity constraint during the update process, this invention initializes the physical parameters... The Softplus activation function was introduced at that time. The model exhibits approximately linearity in the positive interval and smoothly approaches zero in the negative interval. This not only avoids the divergence of the dynamic equations caused by negative parameters but also guarantees global differentiability, thus solving the numerical stability problem of high-stiffness systems in the Runge-Kutta numerical integration process. In summary, the parameters to be optimized in the entire network are the projection matrices in the linear dynamics network. Modal parameters of each mode Modal quality Natural frequency Damping ratio And the weight matrix and bias parameters of all fully connected neurons in the nonlinear network.

[0100] S4. Calculate the error between the displacement predicted by the PhysRNN model and the measured displacement based on the multi-scale sliding window energy accumulation loss function.

[0101] In experimental scenarios, a small time synchronization error between the triggering time of the hammer excitation signal and the acquisition time of the accelerometer response leads to significant spurious errors in the calculation of the point-to-point mean squared error (MSE) of high-frequency transient signals. Therefore, this invention designs a multi-scale sliding window energy accumulation loss function. This method no longer requires absolute alignment between the predicted and measured signals at every discrete time point, but instead introduces a time window. When calculating the loss, the algorithm slides the window on the time axis, calculating the cumulative amplitude of the predicted signal sequence and the true signal sequence within the window. For each sliding step, the calculation formula is as follows:

[0102] ;

[0103] in, The length of the time window. The number of data points within the time window. To predict displacement for the model, The measured displacement of the model.

[0104] The multi-scale sliding window energy accumulation loss function comprises two parts: a cumulative sum error, used to capture the consistency of the energy envelope of local waveforms; and a peak error, used to force the model to capture the maximum amplitude in the impact response. By aggregating within the window, small left or right phase shifts do not significantly alter the total energy or peak characteristics within the window. This design introduces a low-pass filtering mechanism at the loss function level, enabling the model to ignore phase noise from high-frequency sampling and focus on learning the correct frequency components and damping attenuation characteristics of the system, significantly improving the ability to capture transient high-frequency peaks such as those caused by hammer strikes.

[0105] S5. To address the issue of "gradient preemption" occurring in nonlinear neural networks within hybrid models due to their powerful fitting capabilities, which prevents physical layer parameters from converging to true physical values, this invention employs a step-by-step decoupled training strategy to train the PhysRNN model. The specific process is as follows:

[0106] S51. Linear Physics Warm-up Phase: In the early stages of training, all weights of the nonlinear residual compensation network are frozen. At this point, the model degenerates into a pure physics model, and the optimizer only updates the physical parameters, including the projection matrix. Modal parameters of each mode Modal quality Natural frequency Damping ratio This stage utilizes a high learning rate to force the model to quickly fit the main linear components of the response signal, including the main resonant frequencies and decay trends, thus constructing an accurate "linear dynamic skeleton" of the system. This process is based on... Figure 2 In As a loss function used in training, its expression is as follows:

[0107] .

[0108] S52. In the nonlinear residual fine-tuning stage, after the physical parameters converge and stabilize, the nonlinear residual compensation network is unlocked, and the overall model is jointly fine-tuned using a small learning rate. At this point, since the linear part has already explained most of the data variations, the residual network is forced to focus on learning the residual parts that the linear model cannot explain, such as the nonlinear stiffness softening and nonlinear friction damping of the interface, ultimately resulting in the trained PhysRNN network. This process... Figure 2 In As a loss function used in training, its expression is as follows:

[0109] .

[0110] This strategy effectively decomposes the signal into an "interpretable linear entity" and a "black-box nonlinear correction," ensuring the model's generalization ability under different operating conditions and giving the model parameters a clear physical meaning.

[0111] Furthermore, to improve training effectiveness and accelerate convergence, before training the PhysRNN model, the frequency response function (FRF) of the response points was obtained through force hammer excitation, and the main peaks of the FRF were analyzed. This provided a basis for the initial selection of model modal parameters, rather than random or frozen values, thereby accelerating the network's convergence to the optimal solution and giving the model a high degree of interpretability.

[0112] by Figure 4 For example, the figure shows the frequency domain response function of the response signal after a hammer excitation. Three peaks are clearly visible in the image: [700, 840, 1340]. Therefore, before model training begins, the inherent frequencies... Set to [700, 840, 1340] × 2 Providing initial constraints for modal parameters can accelerate the convergence process and optimize training results.

[0113] S6. Input the machine tool excitation signal into the trained PhysRNN model and output the predicted results of the dynamic displacement response of the machine tool structure.

[0114] like Figure 5As shown, the PhysRNN model constructed in this invention exhibits a high degree of consistency between the predicted and measured results of the machine tool displacement response on the test data, verifying the model's excellent performance. Although there may be a small phase deviation of about half a cycle between the predicted and measured signals in the initial stage of the impact response, this precisely reflects the advantage of the loss function based on sliding window energy accumulation designed in this invention. Due to the significant phase robustness of this loss function, it can effectively ignore the time-domain synchronization error introduced by the measurement equipment, forcing the model to focus on the intrinsic physical characteristics of the signal, thereby ensuring that the predicted curve is highly aligned with the measured data in terms of dominant frequency, attenuation characteristics, and transient peak amplitude.

[0115] Of particular note is that, during the final stage of the vibration response and its tendency to come to rest, both the predicted and measured results show a significant amplitude rebound or non-monotonic decay before reaching rest. This amplitude rebound characteristic is impossible to achieve when using only linear dynamic equations for prediction, because linear damping dictates that the vibration amplitude must monotonically and continuously decay to zero. The fact that the predicted results can accurately reproduce this non-monotonic decay characteristic of the measurements indicates that the nonlinear network successfully captures and compensates for the unmodeled nonlinear dynamic behavior of the machine tool under small amplitudes, strongly demonstrating the effectiveness of the nonlinear compensation network.

[0116] Therefore, the machine tool structure dynamics prediction method based on step-by-step training PhysRNN adopted in this invention can still accurately capture the peak amplitude and attenuation trend; at the end of the vibration response, the amplitude recovery phenomenon that cannot be explained by the linear model was successfully reproduced, verifying the effectiveness of the nonlinear residual network.

[0117] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and not to limit them. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can still be made to the technical solutions of the present invention, and these modifications or equivalent substitutions cannot cause the modified technical solutions to deviate from the spirit and scope of the technical solutions of the present invention.

Claims

1. A machine tool structure dynamics prediction method based on step-by-step trained PhysRNN, characterized in that, Includes the following steps: S1. Obtain the excitation-response signal pairs of the machine tool structure; S2. Construct the PhysRNN model, which is a physics-driven recurrent neural network. S3. Reconstruct and constrain the physical parameters of the PhysRNN model; S4. Calculate the error between the displacement predicted by the PhysRNN model and the measured displacement based on the multi-scale sliding window energy accumulation loss function; S5. The PhysRNN model is trained using a step-by-step decoupling training strategy. S6. Input the machine tool excitation signal into the trained PhysRNN model and output the predicted results of the dynamic displacement response of the machine tool structure. In S2, the PhysRNN model, which is driven by physics, includes a linear dynamics network and a nonlinear network. The linear dynamics network includes a projection layer, a physical neuron layer, and a modal layer. The projection layer uses a projection matrix. One-dimensional force signal Projected to A 3D feature space serves as the input to the physical neuron layer; Physical neuron layers include A set of dynamic equations, each representing a set of modes of the dynamic structure, when the one-dimensional force signal is projected as After the first dimension, each signal is used as input to the physical neuron layer. The set of dynamic equations were obtained by numerical calculation within the physical neuron layer using the fourth-order Runge-Kutta method. Group modal displacement; Modal layers are used to obtain physical neuron layers The modal displacement projection is a one-dimensional displacement vector, and the linear part of the final predicted displacement is obtained. The calculation formula is as follows: ; in, This represents the linear displacement component output by the linear dynamics network. For the first Modal parameters corresponding to the group dynamic equations For the first Modal displacement output of the set of dynamic equations, This represents the number of modes in a linear dynamical network, i.e., the number of dynamical equations.

2. The machine tool structure dynamics prediction method based on step-by-step trained PhysRNN according to claim 1, characterized in that, In S1, for the same structural dynamics transmission chain of the same machine tool, the excitation signal in the excitation-response signal pair is the force signal generated by the hammer during the impact process. The response signal is the acceleration signal acquired by the accelerometer. Displacement signal obtained after integration processing .

3. The machine tool structure dynamics prediction method based on step-by-step trained PhysRNN according to claim 2, characterized in that, In S2, numerical calculations were performed using the fourth-order Runge-Kutta method to obtain... The modal displacements are as follows: Let the initial values ​​of initial velocity and initial displacement under any mode be respectively Then, together with the force from the first time step, the velocity and displacement of the next time step are calculated using the fourth-order Runge-Kutta method. The displacement sequence over the entire time series is obtained by iterative processing. Finally, the number was obtained. Group modal displacement The calculation formula for the fourth-order Runge-Kutta method is as follows: ; ; ; ; ; ; ; ; ; ; ; in, Indicates the modal group, Indicates a time step. This represents the time interval between each step. Indicates the first Modal 1 The force of time step, , , They represent the first Modal mass, modal damping, and modal stiffness of a mode. This represents the second-order modal shift in the fourth-order Runge-Kutta method. This represents the third modal displacement of the fourth-order Runge-Kutta method. This represents the fourth modal displacement of the fourth-order Runge-Kutta method; This represents the second-order modal velocity of the fourth-order Runge-Kutta method. This represents the third-order modal velocity of the fourth-order Runge-Kutta method. This represents the fourth-order modal velocity of the fourth-order Runge-Kutta method; This represents the first-order modal acceleration of the fourth-order Runge-Kutta method. This represents the second-order modal acceleration of the fourth-order Runge-Kutta method. This represents the third modal acceleration of the fourth-order Runge-Kutta method. This represents the fourth-order modal acceleration of the fourth-order Runge-Kutta method.

4. The machine tool structure dynamics prediction method based on step-by-step trained PhysRNN according to claim 1, characterized in that, In S2, the nonlinear network is a nonlinear residual compensation network, and the input of the nonlinear residual compensation network is the physical displacement output by the linear dynamics network. Physical speed Physical acceleration A linear state vector concatenated with the current excitation force signal; A multilayer perceptron structure consisting of stacked fully connected layers is adopted, and ReLU (Rectified Linear Unit) is introduced as the activation function. The input linear state vector is mapped to a high-dimensional feature space through hidden layers. The increased number of neurons is used to capture high-order nonlinear feature interactions. Then, the dimensionality is reduced layer by layer, and finally a correction amount with the same dimension as the physical displacement, namely the displacement residual, is output. ; The predicted total displacement output by the model is formed by superimposing the linear part calculated by the linear dynamics network and the residual part calculated by the nonlinear network, that is: ; in, This represents the physical displacement ultimately predicted by the model. The linear displacement components output by the linear dynamics network. This represents the displacement correction value output by the nonlinear residual compensation network.

5. The machine tool structure dynamics prediction method based on step-by-step trained PhysRNN according to claim 4, characterized in that, In S3, during parameter reconstruction, a model including modal mass is constructed. Natural frequency Damping ratio In the trainable parameter space of the physical neuron, the dynamic matrix is ​​reconstructed in real time through the following physical relationships: ; ; in, For modal stiffness, Modal damping; Initializing physical parameters The Softplus activation function was introduced at that time. It is approximately linear in the positive interval and smoothly approaches zero in the negative interval.

6. The machine tool structure dynamics prediction method based on step-by-step trained PhysRNN according to claim 5, characterized in that, The formula for calculating the energy accumulation loss function of the multi-scale sliding window in S4 is as follows: ; in, The length of the time window. The number of data points within the time window. To predict displacement for the model, The measured displacement of the model.

7. The machine tool structure dynamics prediction method based on step-by-step trained PhysRNN according to claim 6, characterized in that, In S5, a step-by-step decoupled training strategy is used to train the PhysRNN model, which is driven by physics. The specific process is as follows: S51. In the early stages of training, all weights of the nonlinear residual compensation network are frozen, and the optimizer only updates the physical parameters, including the projection matrix. Modal parameters of each mode Modal quality Natural frequency Damping ratio The model quickly fits the main linear components of the response signal, including the main resonant frequencies and decay trends. S52. After the physical parameters converge and stabilize, the nonlinear residual compensation network is unlocked for joint fine-tuning to learn the nonlinear stiffness softening and nonlinear friction damping of the interface, and finally the trained PhysRNN network is obtained.

8. The machine tool structure dynamics prediction method based on step-by-step trained PhysRNN according to claim 7, characterized in that, In S5, before training the PhysRNN model driven by a physical process, the frequency response function (FRF) of the response points is obtained through force hammer excitation. The main peaks of the FRF are analyzed, and the natural frequencies are determined. Set to primary peak × 2 This provides initial constraints for the modal parameters.