Dynamic system feature extraction method and device and electronic equipment
By establishing the dynamic equations of the dynamic system and using multi-head attention of a large language model to extract temporal features, the limitations of traditional methods in feature extraction in nonlinear systems are overcome, enabling intelligent control of the dynamic system and improving the system's adaptability and stability under random excitation.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-01-09
- Publication Date
- 2026-04-07
AI Technical Summary
Traditional time series feature extraction methods are unable to fully exploit key features such as transient response characteristics, periodic patterns, and nonlinear interactions when dealing with nonlinear and nonstationary systems.
The dynamic equations of the dynamic system with respect to displacement, velocity, external force, and random noise are established. The attention weights of the input features are calculated through multi-head attention of a large language model, the temporal features are extracted, and the external force gain coefficient and damping coefficient are solved based on these to control the dynamic system.
It can capture the transient motion characteristics of dynamic systems, identify periodic patterns, and extract nonlinear interactions, thereby improving the adaptability and stability of the system under random excitation environments. It is suitable for engineering and technical fields such as vibration control, energy harvesting, and signal detection.
Smart Images

Figure CN121808345A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of artificial intelligence, in particular to a dynamical system feature extraction method and device and electronic equipment. BACKGROUND
[0002] In the simulation service platform, intelligent control of dynamical systems has been an important research direction in the engineering field. Especially in the face of random excitation and complex working conditions, traditional control methods often show obvious limitations. In recent years, with the development of machine learning technology, data-driven control methods have begun to attract widespread attention. This kind of method analyzes historical data to learn the dynamic characteristics of the system, reducing the dependence on accurate physical models. In particular, the progress of time series feature extraction technology enables the system to better capture the dynamic rules contained in the historical state data.
[0003] However, traditional time series feature extraction methods still have limitations in dealing with nonlinear and non-stationary systems, and cannot fully extract key features such as transient response characteristics, periodic patterns, and nonlinear interactions. SUMMARY
[0004] To solve or partially solve the problems in the related art, the present application provides a dynamical system feature extraction method, device and electronic equipment, which can capture the transient motion characteristics of the dynamical system, identify the periodic pattern, and have the ability to extract nonlinear interactions.
[0005] The first aspect of the present application provides a dynamical system feature extraction method, comprising: establishing a dynamical equation of a dynamical system with respect to displacement, velocity, external force term and random noise, wherein the dynamical equation includes an external force gain coefficient and a damping coefficient; the external force term is calculated by the external force gain coefficient and random excitation; collecting input features of the dynamical system with respect to time; the input features at least include displacement sequence, velocity sequence, random excitation sequence and noise statistics of the random noise; calculating attention weights of input features at different time steps by multi-head attention of a large language model; extracting time series features of the input features based on the attention weights; the time series features are used to solve the external force gain coefficient and the damping coefficient by the large language model, and the external force gain coefficient and the damping coefficient are used to control the dynamical system.
[0006] In some embodiments, the calculation of the attention weights of the input features at different time steps by the multi-head attention of the large language model comprises: for each time step, calculating a current query based on the current input feature; Calculate historical keys based on historical input features from historical time periods; Attention weights are generated based on the current query and the historical keys.
[0007] In some implementations, generating attention weights based on the current query and the historical keys includes: Calculate the original attention based on the current query and the history key; The original attention is normalized using a normalization function to obtain the attention weights.
[0008] In some implementations, extracting the temporal features of the input features based on the attention weights includes: Weighted features are generated based on the attention weights and input features; The time-series features are obtained by fusing the weighted features.
[0009] In some implementations, fusing the weighted features to obtain the time-series features includes: The weighted features are combined to obtain the comprehensive features; The time-series features are generated by fusing the comprehensive features through a feedforward network.
[0010] In some implementations, the large language model is trained using the following method: Obtain a training dataset, input the training dataset into the large language model, and generate a first predicted value for the external force gain coefficient and a second predicted value for the damping coefficient; A loss function is constructed based on the first and second predicted values, and the loss function is used to adjust the large language model.
[0011] In some implementations, establishing the dynamic equations of the dynamic system with respect to displacement, velocity, external force terms, and random noise includes: The potential energy function is calculated based on the displacement; the velocity is calculated based on the displacement. The dynamic equations are established based on the displacement, the damping coefficient, the velocity, the potential energy function, the external force term, and the random excitation.
[0012] In some embodiments, the method further includes: A drift term is constructed based on the random stimulus and drift network, and a diffusion term is constructed based on the random stimulus and diffusion network. A differential equation concerning the stochastic excitation is established based on the drift term and the diffusion network.
[0013] A second aspect of this application provides a dynamic system feature extraction apparatus, the apparatus comprising: The dynamics module is used to establish the dynamic equations of the dynamic system regarding displacement, velocity, external force terms, and random noise. The dynamic equations include external force gain coefficients and damping coefficients. The external force terms are calculated using the external force gain coefficients and random excitation. The acquisition module is used to acquire the time-related input features of the dynamic system; the input features include at least the displacement sequence, velocity sequence, random excitation sequence, and noise statistics of the random noise; The attention weight module is used to calculate the attention weights of the input features at different time steps through the multi-head attention of the large language model; An extraction module is used to extract temporal features of the input features based on the attention weights; the temporal features are used to solve for the external force gain coefficient and the damping coefficient through the large language model, and the external force gain coefficient and the damping coefficient are used to control the dynamic system.
[0014] A third aspect of this application provides an electronic device, comprising: Processor; and A memory that stores executable code, which, when executed by the processor, causes the processor to perform the method described above.
[0015] The technical solution provided in this application may include the following beneficial results: it can capture the transient motion characteristics of a dynamic system, identify periodic patterns, and has the ability to extract nonlinear interactions; it can dynamically optimize system control parameters based on real-time monitored displacement, velocity, and excitation signal data, thereby improving the adaptability and stability of the dynamic system under random excitation environments, and can be widely applied in multiple engineering and technical fields such as vibration control, energy harvesting, and signal detection.
[0016] The technical solution of this application can also dynamically output the optimal control parameters based on the real-time monitored displacement, velocity and random excitation signal data, which improves the adaptability and robustness of the dynamic system to random excitation, and is applicable to fields such as vibration control, energy harvesting, mechanical fault diagnosis, signal detection and noise suppression.
[0017] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and do not limit this application. Attached Figure Description
[0018] The above and other objects, features and advantages of this application will become more apparent from the more detailed description of exemplary embodiments thereof in conjunction with the accompanying drawings, wherein the same reference numerals generally represent the same components in the exemplary embodiments thereof.
[0019] Figure 1 This is a schematic flowchart illustrating the feature extraction method for a dynamic system according to an embodiment of this application; Figure 2 This is another schematic flowchart illustrating the dynamic system feature extraction method shown in the embodiments of this application; Figure 3 This is a schematic diagram of the structure of the dynamic system feature extraction device shown in the embodiments of this application; Figure 4 This is a schematic diagram of the structure of an electronic device shown in an embodiment of this application. Detailed Implementation
[0020] Embodiments of this application will now be described in more detail with reference to the accompanying drawings. While embodiments of this application are shown in the drawings, it should be understood that this application may be implemented in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided to make this application more thorough and complete, and to fully convey the scope of this application to those skilled in the art.
[0021] The terminology used in this application is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. The singular forms “a,” “the,” and “the” used in this application and the appended claims are also intended to include the plural forms unless the context clearly indicates otherwise. It should also be understood that the term “and / or” as used herein refers to and includes any or all possible combinations of one or more of the associated listed items.
[0022] It should be understood that although the terms "first," "second," "third," etc., may be used in this application to describe various information, this information should not be limited to these terms. These terms are only used to distinguish information of the same type from one another. For example, without departing from the scope of this application, first information may also be referred to as second information, and similarly, second information may also be referred to as first information. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. In the description of this application, "multiple" means two or more, unless otherwise explicitly specified.
[0023] Intelligent control of dynamic systems has always been an important research direction in engineering, especially when facing stochastic excitations and complex operating conditions, where traditional control methods often exhibit significant limitations. In recent years, with the development of machine learning technology, data-driven control methods have begun to receive widespread attention. These methods learn the dynamic characteristics of a system by analyzing historical data, reducing the reliance on precise physical models. In particular, advancements in time-series feature extraction techniques enable systems to better capture the dynamic patterns inherent in historical state data. However, traditional time-series feature extraction methods still have limitations when dealing with nonlinear and nonstationary systems, failing to fully exploit key features such as transient response characteristics, periodic patterns, and nonlinear interactions.
[0024] To address the aforementioned issues, this application provides a method for extracting features from a dynamic system, which can capture transient motion features of a dynamic system, identify periodic patterns, and extract nonlinear interactions.
[0025] The technical solutions of the embodiments of this application are described in detail below with reference to the accompanying drawings.
[0026] Figure 1 This is a schematic flowchart illustrating the dynamic system feature extraction method shown in the embodiments of this application.
[0027] See Figure 1 The method includes: Step 110: Establish the dynamic equations of the dynamic system regarding displacement, velocity, external force terms, and random noise. The dynamic equations include the external force gain coefficient and damping coefficient. The external force terms are calculated using the external force gain coefficient and random excitation.
[0028] A dynamic system is a mathematical concept. Within a dynamic system, there exists a fixed set of rules describing the evolution of a point in geometric space over time. Taking a representative bistable oscillator system as an example, a bistable oscillator system may include a mechanical oscillator unit, an adjustable damping device, an excitation application mechanism, and a high-precision sensing and data acquisition system. The mechanical oscillator unit typically consists of a mass block and a nonlinear elastic element, such as a specially designed magnetoelastic structure or a geometrically nonlinear beam, to achieve a bistable potential energy function. The adjustable damping device can employ a magnetorheological damper or a electrorheological damper, changing the damping coefficient in real time by adjusting the input current or magnetic field strength. The excitation application mechanism may include a deterministic signal generator and a random noise generator, capable of generating a composite excitation signal that meets the requirements. For a bistable oscillator system, dynamic equations can be established regarding displacement, velocity, external force terms, and random noise. These equations include two parameters: the external force gain coefficient and the damping coefficient. The external force gain coefficient is an adjustable parameter. Through the external force gain coefficient and random excitation, deterministic external force terms can be established. The external force gain coefficient can be used to adjust the input intensity of the external random excitation of the bistable oscillator system, thereby changing the sensitivity of the bistable oscillator system to external excitations. The damping coefficient controls the energy dissipation rate of the bistable oscillator system and affects the transition probability of the oscillator between potential wells.
[0029] Step 120: Collect the time-related input features of the dynamic system; the input features include at least the displacement sequence, velocity sequence, random excitation sequence, and noise statistics of random noise.
[0030] Taking a bistable oscillator system as an example, displacement sensors can be installed on the moving parts of the bistable oscillator system to detect the state parameters of the bistable oscillator system in real time. The displacement sensors can be laser rangefinders or high-precision encoders. By continuously collecting displacement observations over the past k time steps at millisecond intervals, a displacement sequence can be obtained. By differentiating the displacement observations, the velocity sequence can be obtained. In one example, the five-point central difference method is used to ensure computational accuracy while suppressing noise interference; random excitation sequence Force sensors or accelerometers can be installed on the bistable oscillator system for synchronous data acquisition, ensuring time alignment with the steady-state oscillator response data; noise statistics. This is achieved by calculating the sliding variance and probability distribution characteristics of the excitation signal in real time. The input sequence can be generated based on the displacement sequence, velocity sequence, random excitation sequence, and noise statistics. Furthermore, mapping relationships can be established between the displacement sequence and system dynamic characteristics, the velocity sequence and instantaneous motion state, the random excitation sequence and external action characteristics, and the noise statistics and interference intensity assessment.
[0031] In an optional embodiment, the acquired raw data can be preprocessed to establish a standardized data pipeline. Specifically, the acquired raw displacement, velocity, random excitation, and noise statistics signals are first low-pass filtered, with the cutoff frequency set to 1.5 times the highest effective frequency of the bistable oscillator system to eliminate high-frequency measurement noise. Then, standardization is performed to convert each signal to a standard distribution with zero mean and unit variance, facilitating model training and inference. The standardized data is organized into a sample sequence according to a time window. The window length k is determined based on the dynamic characteristics of the bistable oscillator system and typically includes 2-3 complete motion cycles; in specific implementations, 100-500 sampling points can be used.
[0032] Step 130: Calculate the attention weights of the input features at different time steps using the multi-head attention of the large language model.
[0033] Multi-head attention in a large language model can calculate the attention weights of input features at different time steps. In practice, the large language model adopts a Transformer-based encoder structure. The input layer is designed with four independent embedding channels to process displacement sequences, velocity sequences, random excitation sequences, and noise statistics, respectively. Each channel contains a linear projection layer and a position encoding layer, mapping the original signal to a high-dimensional feature space. For displacement sequences, spatial position encoding is used to map the displacement value at each time point to a high-dimensional space, while sine and cosine position encoding is added to preserve temporal information. Velocity sequences are processed by a motion state encoder, considering not only the magnitude of the velocity but also the direction information. Random excitation sequences are processed by an external action encoder, focusing on capturing the amplitude and frequency features of the excitation signal. The attention mechanism adopts a multi-head self-attention structure, setting 4-8 independent attention heads, each with a dimension of 64-128, equipped with an independent learnable parameter matrix, including a query transformation matrix, a key transformation matrix, and a value transformation matrix. The dimensions of these matrices need to be configured appropriately based on the complexity of the input features and computational resources. The hidden layer dimension is typically set between 64 and 256, while the key vector dimension is set between 8 and 32 accordingly. When calculating the attention weights, a scaled dot product attention mechanism is used, which stabilizes the training process and prevents gradient explosion by dividing by the square root of the key vector dimension.
[0034] Step 140: Extract temporal features of the input features based on attention weights; the temporal features are used to solve the external force gain coefficient and damping coefficient through a large language model, and the external force gain coefficient and damping coefficient are used to control the dynamic system.
[0035] Based on attention weights, temporal features of the input characteristics can be extracted. These temporal features contain rich information about the dynamic characteristics of the dynamic system, effectively capturing transient motion features, identifying periodic patterns, and extracting nonlinear interactions. The large language model generates control parameters—external force gain coefficient and damping coefficient—based on the extracted temporal features. These coefficients are first limited to within the safe range allowed by the physical system. They are then output to the actuator via a digital-to-analog converter or digital interface. The damping coefficient γ is adjusted by regulating the drive current of the magnetorheological damper, and the external force gain coefficient η is adjusted by changing the gain setting of the power amplifier. The effect after execution is monitored in real time via sensor feedback, forming a closed-loop control. By analyzing the interaction between the system state parameters of the dynamic system and external random excitations, the following objectives are achieved: when strong random excitations are detected, the external force gain coefficient η is automatically increased to improve the system response; when the system oscillates violently, the damping coefficient γ is adjusted to enhance the damping effect; and based on noise statistics… To balance system sensitivity and stability.
[0036] The dynamic system also features a safety protection mechanism, allowing for the setting of parameter change rate limits to prevent system instability caused by sudden changes in control commands. An anomaly detection module can also be established, automatically switching to a backup traditional control strategy when sensor data is abnormal or model-generated control parameters exceed reasonable ranges. Simultaneously, all control decisions and system response data are recorded, providing data support for subsequent model optimization and fault analysis. The entire system adopts a modular design, facilitating deployment and adjustment in different application scenarios. In vibration energy harvesting, the focus is on optimizing energy conversion efficiency; in mechanical fault diagnosis, sensitivity to abnormal features is enhanced; and in weak signal detection, the signal-to-noise ratio is improved, achieving effective implementation of intelligent control strategies based on large language models in practical engineering systems.
[0037] This application provides a method for feature extraction from a dynamic system, comprising: establishing dynamic equations for the dynamic system regarding displacement, velocity, external force terms, and random noise, wherein the dynamic equations include external force gain coefficients and damping coefficients; calculating the external force terms using the external force gain coefficients and random excitations; acquiring time-related input features of the dynamic system; the input features at least including displacement sequences, velocity sequences, random excitation sequences, and noise statistics of random noise; calculating attention weights for the input features at different time steps using multi-head attention of a large language model; extracting temporal features based on the attention weights; the temporal features being used to solve for the external force gain coefficients and damping coefficients using a large language model, and the external force gain coefficients and damping coefficients being used to control the dynamic system. This method can capture transient motion features of a dynamic system, identify periodic patterns, and extract nonlinear interactions; it can dynamically optimize system control parameters based on real-time monitored displacement, velocity, and excitation signal data, improving the adaptability and stability of the dynamic system under random excitation environments, and can be widely applied in various engineering and technical fields such as vibration control, energy harvesting, and signal detection.
[0038] Figure 2 This is another schematic flowchart illustrating the dynamic system feature extraction method shown in the embodiments of this application.
[0039] See Figure 2 The method includes: Step 210: Establish the dynamic equations of the dynamic system regarding displacement, velocity, external force terms, and random noise. The dynamic equations include external force gain coefficients and damping coefficients. The external force terms are calculated using the external force gain coefficients and random excitation.
[0040] A dynamic system is a mathematical concept. Within a dynamic system, there exists a fixed set of rules describing the evolution of a point in geometric space over time. Taking a representative bistable oscillator system as an example, a bistable oscillator system should include a mechanical oscillator unit, an adjustable damping device, an excitation application mechanism, and a high-precision sensing and data acquisition system. The oscillator unit typically consists of a mass block and a nonlinear elastic element, such as a specially designed magnetoelastic structure or a geometrically nonlinear beam to achieve a bistable potential energy function. The adjustable damping device can employ a magnetorheological damper or a electrorheological damper, changing the damping coefficient in real time by adjusting the input current or magnetic field strength. The excitation application mechanism should include a deterministic signal generator and a random noise generator, capable of generating a composite excitation signal that meets the requirements. For a bistable oscillator system, dynamic equations can be established regarding displacement, velocity, external force terms, and random noise. These equations include two parameters: the external force gain coefficient η and the damping coefficient γ. The external force gain coefficient is an adjustable parameter. Through the external force gain coefficient and random excitation, deterministic external force terms can be established. The external force gain coefficient can be used to adjust the input intensity of the external random excitation of the bistable oscillator system, thereby changing the sensitivity of the bistable oscillator system to external excitations. The damping coefficient controls the energy dissipation rate of the bistable oscillator system and affects the transition probability of the oscillator between potential wells.
[0041] In an optional embodiment of this application, step 210 includes: Calculate the potential energy function based on displacement; calculate the velocity using displacement. The dynamic equations are established based on displacement, damping coefficient, velocity, potential energy function, external force term, and random excitation.
[0042] According to displacement A potential energy function can be established. Taking a bistable oscillator system as an example, the potential energy function This can be expressed by formula (1): (1) Where 'a' is a positive parameter controlling the potential well depth and 'b' is a positive parameter determining the potential well width, both needing to be determined based on the specific application scenario. Optimal values are typically determined through pre-experiments or numerical simulations. For general vibration energy harvesting systems, the value of 'a' can be between 0.5 and 2.0, and the value of 'b' between 0.1 and 0.5, to achieve a balance between stability and sensitivity. The locations of the two stable equilibrium points should be set within the allowable displacement range of the system's mechanical structure to avoid exceeding physical limits and causing damage. Based on the potential energy function, it can be concluded that the system has two stable equilibrium points, located at... The barrier height is .
[0043] The velocity v can be calculated from the displacement using differentiation, i.e. .
[0044] Taking a bistable oscillator system as an example, a dynamic equation (dynamic model) is established based on displacement, damping coefficient, velocity, potential energy function, external force term and random excitation. The dynamic equation can describe the motion characteristics of the bistable oscillator system. The dynamic equation is referenced in equation (2): (2) in, The inertial term describes the acceleration characteristics of the oscillator; This is the damping term, reflecting the energy dissipation process of the system; The potential gradient characterizes the nonlinear restoring force of the bistable oscillator system; the excitation term F + σξ(t) contains a composite excitation of a deterministic external force term F and random noise, where F , For random excitation, ξ(t) is Gaussian white noise, satisfying ( In order to achieve expectations, (where is the Dirac function), representing instantaneous correlated noise, and σ is the noise intensity parameter.
[0045] When constructing the dynamic model, the continuous second-order stochastic differential equations can be transformed into a discretized state-space model, which is easier for digital control systems to process. For example, numerical methods such as the Euler-Maruyama method or the Runge-Kutta method can be used for discretization. The time step should be carefully selected according to the system response characteristics. Taking a bistable oscillator system as an example, the time step is usually taken as 1 / 100 to 1 / 50 of the system characteristic time, which can ensure both calculation accuracy and meet real-time control requirements.
[0046] Furthermore, system characteristic tests can be performed on dynamic systems. Taking a bistable oscillator system as an example, frequency sweep experiments can be used to test the system's response characteristics under different frequency excitations, identifying the resonant frequency and bistable transition threshold of the bistable oscillator system. By changing the noise intensity parameter, the random resonance phenomenon of the system under different noise levels can be tested, and the system response signal-to-noise ratio as a function of noise intensity can be plotted. These experimental data provide important prior knowledge for subsequent intelligent control strategies.
[0047] In practical implementation, a complete system identification software can be developed based on the dynamic model provided in the embodiments of this application. This software can estimate the system state parameters (velocity, displacement) and noise statistical characteristics in real time. The software employs Kalman filtering or particle filtering algorithms, combined with the dynamic model and sensor measurement data, to estimate the system's displacement, velocity state variables, and noise intensity parameters in real time. This provides accurate system state information for intelligent control strategies and lays the foundation for subsequent intelligent control based on large language models.
[0048] In an optional embodiment of this application, the method further includes: Drift terms are constructed based on random stimulus and drift network, and diffusion terms are constructed based on random stimulus and diffusion network; Differential equations about stochastic excitations are constructed based on the drift term and the diffusion network.
[0049] Furthermore, differential equations for the dynamic system with respect to stochastic excitations can be established. Specifically, drift terms can be constructed based on stochastic excitations and drift networks. Establish diffusion terms based on random excitation and diffusion networks. .
[0050] According to the drift term and diffusion terms A differential equation can be established regarding the stochastic excitation, which can be expressed by equation (3): (3) Among them, the drift term The deterministic evolution trend of the excitation signal, the diffusion term Characterizing the random fluctuation properties of the excitation, Provide a noise driving source for the standard Wiener process (Brownian motion).
[0051] The use of dynamic equations and differential equations lays the foundation for intelligent control of dynamic systems.
[0052] Step 220: Collect the time-related input features of the dynamic system; the input features include at least the displacement sequence, velocity sequence, random excitation sequence, and noise statistics of random noise.
[0053] Taking a bistable oscillator system as an example, displacement sensors can be installed on the moving parts of the bistable oscillator system. The displacement sensors can be laser rangefinders or high-precision encoders. By continuously collecting displacement observations over the past k time steps at millisecond intervals using the displacement sensors, a displacement sequence can be obtained. By differentiating the displacement observations, the velocity sequence can be obtained. In one example, the five-point central difference method is used to ensure computational accuracy while suppressing noise interference. Random excitation sequence Force sensors or accelerometers can be installed on the bistable oscillator system for synchronous data acquisition, ensuring time alignment with the steady-state oscillator response data. Noise statistics. This is achieved by calculating the sliding variance and probability distribution characteristics of the excitation signal in real time. The input sequence can be generated based on the displacement sequence, velocity sequence, random excitation sequence, and noise statistics. Furthermore, mapping relationships can be established between the displacement sequence and system dynamic characteristics, the velocity sequence and instantaneous motion state, the random excitation sequence and external action characteristics, and the noise statistics and interference intensity assessment.
[0054] In an optional embodiment, the acquired raw data can be preprocessed to establish a standardized data pipeline. Specifically, the acquired raw displacement, velocity, and random excitation signals are first low-pass filtered, with the cutoff frequency set to 1.5 times the highest effective frequency of the bistable oscillator system to eliminate high-frequency measurement noise. Then, standardization is performed to convert each signal to a standard distribution with zero mean and unit variance, facilitating model training and inference. The processed data is organized into a sample sequence according to a time window. The window length k is determined based on the dynamic characteristics of the bistable oscillator system, typically containing 2-3 complete motion cycles, and in specific implementations, 100-500 sampling points can be used.
[0055] Step 230: For each time step, calculate the current query based on the current input features; calculate the historical key based on the historical input features of historical time.
[0056] In practical implementation, the large language model adopts a Transformer-based encoder structure. The input layer is designed with four independent embedding channels to process displacement sequences, velocity sequences, random excitation sequences, and noise statistics, respectively. Each channel contains a linear projection layer and a position encoding layer, mapping the original signal to a high-dimensional feature space. For the displacement sequence, spatial position encoding technology is used to map the displacement value at each time point to a high-dimensional space, while sine and cosine position encoding is added to preserve temporal information. The velocity sequence is processed by a motion state encoder, considering not only the magnitude of the velocity but also the direction information. The excitation sequence is processed by an external action encoder, focusing on capturing the amplitude and frequency characteristics of the excitation signal. During the inference stage of the large language model, a dedicated inference server or embedded computing device can be deployed. The inference engine adopts an optimized TensorRT (a deep learning inference engine) or ONNX Runtime (Open Neural Network Exchange Runtime, a high-performance, cross-platform inference engine) framework to ensure that real-time performance meets the timing requirements of the control system. Input features are managed through a double buffering mechanism to ensure uninterrupted processing of continuous data streams. The model inference frequency is kept consistent with the sampling rate of the control system, and is usually set between 100Hz and 1kHz, depending on the dynamic response speed of the system.
[0057] In the attention computation stage, a multi-head attention mechanism combined with a sliding window is used to perform computation, enabling multiple attention heads i (i=1,2,...,h) to operate in parallel. Each attention head has an independent query transformation matrix. Bond transformation matrix and the implicit value transformation matrix For each time step t of the input features, the current query can be calculated separately for the displacement, velocity, and random excitation of the current time step, using the displacement of the current time step as the basis. For example, the displacement of the current time step is calculated using the following formula (4). Current query : (4) in, The dimension is , For the hidden layer dimension of the model, The dimension of the key vector.
[0058] By combining all attention heads i and the current query at each time step, we can obtain the query matrix Q, which serves as a feature representation for the current attention time step.
[0059] Historical keys can be calculated based on historical input features from historical time periods, using the displacement at the current time step. For example, the displacement of the current time step is calculated using the following formula (5). History key : (5) in, For historical time steps relative to the current time step t, This represents the displacement corresponding to a historical time step.
[0060] By combining all attention heads i and the historical keys at each time step, we can obtain the key matrix K, which serves as an encoded representation of the historical states.
[0061] Furthermore, a value matrix V can be obtained based on the input features, which serves as the actual state features (implicit in the calculation).
[0062] Step 240: Calculate the raw attention based on the current query and the history key.
[0063] Based on the current query and history key The original attention can be calculated. The original attention is calculated using the following formula (6). : (6) in, This is a scaling factor to prevent the dot product from becoming too large. Original attention. This can represent the degree of matching between the current query and historical keys. The calculation methods for velocity and random excitation are similar to those for displacement.
[0064] Step 250: Normalize the original attention using a normalization function to obtain the attention weights.
[0065] The original attention at different time steps is normalized using a normalization function. Normalization is performed to obtain attention weights. In the specific calculation process, each attention head i can be determined according to the query matrix. and query transformation matrix Calculate query transformation Based on the key matrix K and the key transformation matrix Calculate bond transformation Query transformation Bond transformation Perform a dot product operation to obtain the attention weights. Attention weights of attention head i It can be calculated using formula (7): (7) The original attention is transformed by converting the original scores into a probability distribution using a softmax function (normalization function). This normalizes the numerical range to the (0,1) interval while maintaining a total weight sum of 1, highlighting the contribution of important time points. The multi-head attention mechanism can automatically identify key historical moments, adaptively adjust the time focus range, and handle non-uniform sampling sequences. In terms of feature extraction, it can capture transient motion features, identify periodic patterns, and extract nonlinear interactions.
[0066] Step 260: Generate weighted features based on attention weights and input features.
[0067] In each attention head, weighted features can be obtained based on the attention weights at each time step and the values in the input features.
[0068] Step 270: The weighted features are merged to obtain the comprehensive features; the comprehensive features are fused through a feedforward network to generate time-series features; the time-series features are used to solve the external force gain coefficient and damping coefficient through a large language model, and the external force gain coefficient and damping coefficient are used to control the dynamic system.
[0069] The weighted features of each attention head are merged and concatenated to obtain a comprehensive feature. This comprehensive feature is then input into a feedforward neural network for further fusion processing. The feedforward network typically contains two fully connected layers with a ReLU (Rectified Linear Unit) activation function in between. Finally, it outputs temporal features, which contain rich information about the dynamic characteristics of the system and can effectively capture transient motion features, identify periodic patterns, and extract nonlinear interactions.
[0070] Based on the extracted timing features, the large language model can generate external force gain and damping coefficients. These coefficients are first limited to within the safe range allowed by the physical system. Then, they are output to the actuator via a digital-to-analog converter or digital interface. The damping coefficient γ is adjusted by regulating the drive current of the magnetorheological damper, and the external force gain coefficient η is adjusted by changing the gain setting of the power amplifier. The execution effect is monitored in real time via sensor feedback, forming a closed-loop control.
[0071] The dynamic system also features a safety protection mechanism, allowing for the setting of parameter change rate limits to prevent system instability caused by sudden changes in control commands. An anomaly detection module can also be established, automatically switching to a backup traditional control strategy when sensor data is abnormal or model-generated parameters exceed reasonable ranges. Simultaneously, all control decisions and system response data are recorded, providing data support for subsequent model optimization and fault analysis. The entire system adopts a modular design, facilitating deployment and adjustment in different application scenarios. In vibration energy harvesting, the focus is on optimizing energy conversion efficiency; in mechanical fault diagnosis, sensitivity to abnormal features is enhanced; and in weak signal detection, signal-to-noise ratio enhancement is improved, achieving effective implementation of intelligent control strategies based on large language models in practical engineering systems.
[0072] To improve feature extraction performance, a series of optimization measures are needed. These include using residual connections to mitigate the vanishing gradient problem in deep networks and adding skip connections between each attention layer and feedforward layer. Layer normalization techniques are also used to stabilize the training process and improve model convergence. For non-uniformly sampled temporal data, an adaptive temporal encoding mechanism is implemented, using learnable temporal weights to adjust the level of attention at different time intervals.
[0073] The dynamic system feature extraction method provided in this application can be integrated into a real-time control system. By receiving real-time data streams from sensors, it outputs high-quality time-series features for subsequent control decisions. In this way, the system can automatically identify key historical moments, adaptively adjust the time focus range, effectively handle various complex dynamic system characteristics, and provide strong feature support for intelligent control.
[0074] In practical implementation, quantitative relationships can be established between the damping coefficient and control voltage, and between the external force gain coefficient and the drive signal. Calibration experiments can be used to determine the current-damping coefficient relationship curve of the damper and the random excitation input-output characteristic curve of the excitation device, thus establishing an accurate mapping relationship between control parameters and actuator commands. Simultaneously, protection mechanisms need to be designed to prevent system instability caused by control parameters exceeding safe ranges.
[0075] In an optional embodiment of this application, the large language model is trained using the following method: Obtain the training dataset, input the training dataset into the large language model, and generate the first predicted value of the external force gain coefficient and the second predicted value of the damping coefficient; A loss function is constructed based on the first and second predicted values, and this loss function is used to adjust the large language model.
[0076] In this embodiment, a supervised learning paradigm is used to train the large language model. First, an expert data generation system is constructed, and a high-precision model predictive controller (MPC) is used to calculate the optimal control parameters offline. The input data includes system state information (displacement x, velocity v) and external random excitation signals. The MPC controller calculates and generates the optimal control parameter pair for each time step, including the external force gain coefficient. and damping coefficient To improve data generation efficiency, parallel computing techniques can be employed to run simulation experiments with different parameters simultaneously on multiple computing nodes. The generated data undergoes a rigorous verification process to ensure the optimality of control parameters and physical realizability. Finally, the data is standardized to ensure that data with different physical dimensions are within the same numerical range, facilitating model training. The data acquisition process should cover all possible operating states of the system, including periodic excitations of different amplitudes, random noise excitations of various intensities, and composite excitations of multiple frequency combinations. Special attention should be paid to recording data during state transitions, as this data is crucial for training the model to handle dynamic changes.
[0077] The training dataset is constructed using a three-channel time-series data structure, where the displacement sequence channel... Record the system's position change history and velocity sequence channel. Random excitation sequence reflects the evolution of motion state. The channel captures external force characteristics. The output label consists of optimal control parameter pairs generated by the MPC controller, including the first predicted value of the external force gain coefficient. and the second predicted value of the damping coefficient The training dataset employs a sliding window technique to enhance temporal correlation, with each training sample containing observation data and control targets for consecutive time steps. To ensure balanced data distribution, a stratified sampling strategy is used to guarantee sufficient representative samples for various operating modes and stimulus conditions. Finally, the dataset is divided into training, validation, and test sets, and a data loading mechanism is designed to support mini-batch training.
[0078] Based on the first predicted value of the external force gain coefficient and the second predicted value of the damping coefficient Calculate the mean-square error (MSE) loss for each of the two parameters to establish the loss function. loss function This can be expressed by equation (8): (8) in, To achieve the desired operation, the loss function is minimized during training by adjusting the parameters of the large language model. .
[0079] During the forward propagation process, the input training set passes sequentially through the embedding layer, multi-head attention layer, and feedforward neural network layer of the large language model, ultimately outputting the first predicted value of the external force gain coefficient. and the second predicted value of the damping coefficient The feature representations of the intermediate layers need to be preserved for subsequent analysis and visualization. External force gain error and damping coefficient error are handled separately using loss functions, and an adaptive weighting mechanism is employed to balance loss terms with different dimensions. Simultaneously, the trend of loss function changes during training is recorded to guide hyperparameter adjustment and learning rate scheduling in large language models.
[0080] Backpropagation optimization employs an adaptive moment estimation algorithm and implements gradient pruning to prevent gradient explosion. During training, a mini-batch gradient descent method is used, with the batch size appropriately set based on computational resources and working memory capacity. To improve training stability, a learning rate decay strategy and an early stopping mechanism are also implemented. During training, performance on the validation set needs to be monitored in real time; when the validation loss no longer decreases, the learning rate is automatically adjusted or training is stopped.
[0081] The model validation phase comprises both offline and online evaluation processes. Offline evaluation uses an independent test set to statistically analyze the first predicted values of the external force gain coefficient. and the second predicted value of the damping coefficient Multiple performance metrics, including mean absolute error, root mean square error, and correlation coefficient, are analyzed to identify potential problem areas by assessing error distribution characteristics. Online performance monitoring displays the learning curve in real time, monitors resource consumption, and issues warnings when anomalies occur. Finally, the effectiveness and engineering application value of the imitation learning method are verified by comparing and analyzing the performance of the trained model and the MPC controller. The design of the entire training process ensures that the final control strategy (i.e., control parameters) is optimized. , It can reduce the reliance on accurate models, adapt to parameter changes, reduce the workload of system calibration, meet the computational efficiency requirements of real-time control, optimize the computational burden, deploy offline training online, reduce real-time computation, and support edge devices.
[0082] This application provides a method for feature extraction of dynamic systems, specifically a method for extracting time-series features of dynamic systems based on a multi-head attention mechanism. Through a neural network architecture, it achieves accurate modeling of the dynamic characteristics of the dynamic system, possessing the ability to automatically identify key historical moments and adaptively adjust the time focus range, effectively capturing transient motion characteristics and nonlinear interactions. Furthermore, it can perform in-depth analysis of historical state data of the dynamic system and accurately predict future responses. It can dynamically output optimal control parameters based on real-time monitored displacement, velocity, and random excitation signal data, improving the adaptability and robustness of the dynamic system to random excitations. This method is applicable to fields such as vibration control, energy harvesting, mechanical fault diagnosis, signal detection, and noise suppression.
[0083] Corresponding to the aforementioned application function implementation method embodiments, this application also provides a dynamic system feature extraction device, electronic device, and corresponding embodiments.
[0084] Figure 3 This is a schematic diagram of the structure of the dynamic system feature extraction device shown in the embodiments of this application.
[0085] See Figure 3 The device includes: The dynamics module 310 is used to establish the dynamic equations of the dynamic system regarding displacement, velocity, external force terms, and random noise. The dynamic equations include external force gain coefficients and damping coefficients; the external force terms are calculated using the external force gain coefficients and random excitation. The acquisition module 320 is used to acquire the time-related input features of the dynamic system; the input features include at least the displacement sequence, velocity sequence, random excitation sequence, and noise statistics of random noise; Attention weight module 330 is used to calculate the attention weights of input features at different time steps through multi-head attention of a large language model; The extraction module 340 is used to extract the temporal features of the input features based on attention weights; the temporal features are used to solve the external force gain coefficient and damping coefficient through a large language model, and the external force gain coefficient and damping coefficient are used to control the dynamic system.
[0086] In an optional embodiment of this application, the attention weighting module 330 includes: The query submodule is used to calculate the current query based on the current input features for each time step; The history key submodule is used to calculate history keys based on historical input features over historical time. The attention weight submodule is used to generate attention weights based on the current query and historical keys.
[0087] The attention weight submodule is also used for: Calculate the raw attention based on the current query and the history key; The original attention is normalized using a normalization function to obtain the attention weights.
[0088] In an optional embodiment of this application, the extraction module 340 includes: The weighted feature submodule is used to generate weighted features based on attention weights and input features; The fusion submodule is used to fuse weighted features to obtain temporal features.
[0089] The fusion submodule is also used for: The weighted features are combined to obtain the composite features; The comprehensive features are fused by a feedforward network to generate temporal features.
[0090] In an optional embodiment of this application, the device further includes: The acquisition module is used to acquire the training dataset, input the training dataset into the large language model, and generate the first predicted value of the external force gain coefficient and the second predicted value of the damping coefficient. The loss function module is used to construct a loss function based on the first and second predicted values. The loss function is used to adjust the large language model.
[0091] In an optional embodiment of this application, the dynamics module 310 includes: The calculation submodule is used to calculate the potential energy function based on displacement; and to calculate the velocity based on displacement. The dynamic equations submodule is used to establish dynamic equations based on displacement, damping coefficients and velocity, potential energy function, external force terms and random excitation.
[0092] In an optional embodiment of this application, the device further includes: The building module is used to construct drift terms based on random excitation and drift network, and to construct diffusion terms based on random excitation and diffusion network; The differential equation module is used to construct differential equations about stochastic excitations based on drift terms and diffusion networks.
[0093] This application provides a dynamic system feature extraction device that can capture transient motion features of a dynamic system, identify periodic patterns, and extract nonlinear interactions. It can dynamically optimize system control parameters based on real-time monitored displacement, velocity, and excitation signal data, thereby improving the adaptability and stability of the dynamic system under random excitation environments. It can be widely used in various engineering and technical fields such as vibration control, energy harvesting, and signal detection.
[0094] Regarding the apparatus in the above embodiments, the specific manner in which each module performs its operation has been described in detail in the embodiments related to the method, and will not be elaborated further here.
[0095] Figure 4 This is a schematic diagram of the structure of an electronic device shown in an embodiment of this application.
[0096] See Figure 4 The electronic device 400 includes a memory 410 and a processor 420.
[0097] The processor 420 can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor can be a microprocessor or any conventional processor. Memory 410 may include various types of storage units, such as system memory, read-only memory (ROM), and permanent storage devices. ROM may store static data or instructions required by processor 420 or other modules of the computer. Permanent storage devices may be read-write storage devices. Permanent storage devices may be non-volatile storage devices that retain stored instructions and data even when the computer is powered off. In some embodiments, permanent storage devices use mass storage devices (e.g., hard disks or optical disks, flash memory) as permanent storage devices. In other embodiments, permanent storage devices may be removable storage devices (e.g., floppy disks, optical drives). System memory may be a read-write storage device or a volatile read-write storage device, such as dynamic random access memory. System memory may store some or all of the instructions and data required by the processor during operation. Furthermore, memory 410 may include any combination of computer-readable storage media, including various types of semiconductor memory chips (e.g., DRAM, SRAM, SDRAM, flash memory, programmable read-only memory), and hard disks and / or optical disks may also be used. In some embodiments, memory 410 may include a removable storage device that is readable and / or writable, such as a laser disc (CD), a read-only digital multifunction optical disc (e.g., DVD-ROM, dual-layer DVD-ROM), a read-only Blu-ray disc, an ultra-high density optical disc, a flash memory card (e.g., SD card, mini SD card, Micro-SD card, etc.), a magnetic floppy disk, etc. Computer-readable storage media do not contain carrier waves or transient electronic signals transmitted wirelessly or via wired connections.
[0098] The memory 410 stores executable code, which, when processed by the processor 420, can cause the processor 420 to execute part or all of the methods described above.
[0099] Furthermore, the method according to this application can also be implemented as a computer program or computer program product, which includes computer program code instructions for performing some or all of the steps in the method described above.
[0100] Alternatively, this application may be implemented as a computer-readable storage medium (or a non-transitory machine-readable storage medium or a machine-readable storage medium) storing executable code (or computer program or computer instruction code) that, when executed by a processor of an electronic device (or server, etc.), causes the processor to perform part or all of the steps of the methods described above according to this application.
[0101] This application also provides a computer program product, which includes computer instructions that, when executed by a processor, implement the method described above.
[0102] The various embodiments of this application have been described above. These descriptions are exemplary and not exhaustive, nor are they limited to the disclosed embodiments. Many modifications and variations will be apparent to those skilled in the art without departing from the scope and spirit of the described embodiments. The terminology used herein is chosen to best explain the principles, practical application, or improvement of the technology in the market, or to enable others skilled in the art to understand the embodiments disclosed herein.
Claims
1. A method for feature extraction of a dynamic system, characterized in that, The method includes: A dynamic equation for the dynamic system is established, relating to displacement, velocity, external force terms, and random noise. The dynamic equation includes an external force gain coefficient and a damping coefficient. The external force terms are calculated using the external force gain coefficient and the random excitation. The dynamic system's time-related input features are collected; the input features include at least the displacement sequence, velocity sequence, random excitation sequence, and noise statistics of the random noise; The attention weights of the input features at different time steps are calculated using the multi-head attention mechanism of a large language model. Temporal features of the input features are extracted based on the attention weights; the temporal features are used to solve the external force gain coefficient and the damping coefficient through the large language model, and the external force gain coefficient and the damping coefficient are used to control the dynamic system.
2. The method according to claim 1, characterized in that, The calculation of attention weights for input features at different time steps using multi-head attention in a large language model includes: For each time step, calculate the current query based on the current input features; Calculate historical keys based on historical input features from historical time periods; Attention weights are generated based on the current query and the historical keys.
3. The method according to claim 2, characterized in that, The generation of attention weights based on the current query and the historical keys includes: Calculate the original attention based on the current query and the history key; The original attention is normalized using a normalization function to obtain the attention weights.
4. The method according to claim 1, characterized in that, The extraction of temporal features from the input features based on the attention weights includes: Weighted features are generated based on the attention weights and input features; The time-series features are obtained by fusing the weighted features.
5. The method according to claim 4, characterized in that, The process of fusing the weighted features to obtain the time-series features includes: The weighted features are combined to obtain the comprehensive features; The time-series features are generated by fusing the comprehensive features through a feedforward network.
6. The method according to claim 1, characterized in that, The large language model is trained using the following method: Obtain a training dataset, input the training dataset into the large language model, and generate a first predicted value for the external force gain coefficient and a second predicted value for the damping coefficient; A loss function is constructed based on the first and second predicted values, and the loss function is used to adjust the large language model.
7. The method according to claim 1, characterized in that, The establishment of the dynamic equations for the dynamic system regarding displacement, velocity, external force terms, and random noise includes: The potential energy function is calculated based on the displacement; the velocity is calculated based on the displacement. The dynamic equations are established based on the displacement, the damping coefficient, the velocity, the potential energy function, the external force term, and the random excitation.
8. The method according to claim 1, characterized in that, The method further includes: A drift term is constructed based on the random stimulus and drift network, and a diffusion term is constructed based on the random stimulus and diffusion network. A differential equation concerning the stochastic excitation is established based on the drift term and the diffusion network.
9. A feature extraction device for a dynamic system, characterized in that, The device includes: The dynamics module is used to establish the dynamic equations of the dynamic system regarding displacement, velocity, external force terms, and random noise. The dynamic equations include external force gain coefficients and damping coefficients. The external force terms are calculated using the external force gain coefficients and random excitation. The acquisition module is used to acquire the time-related input features of the dynamic system; the input features include at least the displacement sequence, velocity sequence, random excitation sequence, and noise statistics of the random noise; The attention weight module is used to calculate the attention weights of the input features at different time steps through the multi-head attention of the large language model; An extraction module is used to extract temporal features of the input features based on the attention weights; the temporal features are used to solve for the external force gain coefficient and the damping coefficient through the large language model, and the external force gain coefficient and the damping coefficient are used to control the dynamic system.
10. An electronic device, characterized in that, include: processor; as well as A memory having executable code stored thereon, which, when executed by the processor, causes the processor to perform the method as described in any one of claims 1-8.