MEMS device dynamic characteristic macro model modeling method based on long short-term memory neural network
By using a long short-term memory neural network-based approach, a macro model is directly constructed using the input and output data of MEMS devices. This solves the problem of low modeling efficiency caused by multi-physics coupling and cross-scale combination in existing technologies, and achieves the effects of simplified modeling and improved simulation speed.
Patent Information
- Application Number
- CN202510937967.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-05
- Publication Date
- 2026-01-20
AI Technical Summary
Existing macro-modeling methods for MEMS devices are inefficient when dealing with multi-physics coupling and cross-scale combinations, and require analysis of the device's physical mechanisms, resulting in a cumbersome modeling process.
A method based on long short-term memory neural networks is adopted to collect dynamic input and output data of MEMS devices, establish a direct relationship between input and output, construct a macro model of the dynamic characteristics of MEMS devices, simplify the modeling process, and utilize the nonlinear fitting capability of neural networks.
It improves the efficiency of macro-modeling for MEMS devices and simplifies the analysis process. In particular, for complex MEMS devices, it can efficiently handle multi-physics coupling and cross-scale combination problems, and improve the speed of system-level simulation.
Smart Images

Figure CN121365575A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The application belongs to the field of MEMS sensor simulation, and particularly relates to a MEMS device dynamic characteristic macro model modeling method based on a long short-term memory neural network. BACKGROUND
[0002] With the development of microfabrication process and MEMS design technology, the structure and function of MEMS devices become increasingly complex, and the characteristics of multi-physical field coupling and cross-scale combination lead to the need for a large amount of time for finite element simulation solving of MEMS devices. Moreover, since the design of MEMS devices and the design of interface circuits are usually separated, this situation leads to the fact that MEMS devices and interface circuits cannot efficiently exchange information. The macro model technology is proposed to overcome these adverse factors, and only the input and output characteristics of the device are concerned by simplifying the physical behavior of the device, so as to speed up the system-level simulation speed and improve the design and optimization efficiency of MEMS sensors.
[0003] At present, the macro model modeling methods mainly include analytic method, numerical method, model reduction method and the like. The analytic method is based on mathematical analytical expressions or physical laws to directly derive the macro behavior of the system, and usually adopts the forms of differential equation, integral equation or transfer function to describe the dynamic characteristics of the system to obtain the macro model of the MEMS device, such as the equivalent circuit method. The analytic method has clear physical meaning and high calculation efficiency, but is only suitable for simple structure, weakly coupled physical field, linear or low-order nonlinear devices; the numerical method is to convert the continuous system into a numerical calculation problem by a discretization method (such as finite element method FEM, finite difference method FDM, finite volume method FVM), and relies on a computer to obtain the macro model of the MEMS device, which has high accuracy but needs to consume a large amount of computing resources for each calculation, especially transient calculation. The model reduction method is a common method for system-level macro model modeling, and the modal superposition method is to use the inherent modal (eigenvector) of the system to reduce the order, and express the dynamic response as a linear superposition of each order modal, and the matrix reduction method is to compress the high-dimensional state space model into a low-dimensional model by mathematical projection (such as Krylov subspace method, balanced truncation method), and retain the key characteristics of the input-output behavior. Both of them are only suitable for linear systems, and additional processing is needed for nonlinear systems. The above modeling methods are usually only suitable for a certain device or a small part of the device, and when modeling, the physical mechanism of the device needs to be analyzed, different energy domains are decoupled or the physical process is linear or nonlinear, and the process is relatively cumbersome.
[0004] Data-driven method is to construct black box or gray box model (such as neural network, regression model, dynamic mode decomposition DMD) based on experimental or simulation data, which does not depend on first principle. With the development of artificial intelligence, neural network has been widely used in data fitting, model construction and other aspects. By using the excellent nonlinear fitting capability of neural network, the nonlinear problem caused by multi-physical field coupling can be well solved. SUMMARY
[0005] The application aims to provide a MEMS device dynamic characteristic macro model modeling method based on long short-term memory neural network, which only needs to collect MEMS device input and output dynamic data, without considering the internal physical mechanism, directly establishes the connection between input and output by using the excellent nonlinear fitting capability of neural network, and solves the problem of macro model modeling difficulty caused by multi-physical field coupling and cross-scale combination of MEMS device.
[0006] To solve the above technical problems, the specific technical scheme of the application is as follows:
[0007] A MEMS device dynamic characteristic macro model modeling method based on long short-term memory neural network comprises the following steps:
[0008] Step 1: analyzing the physical mechanism of MEMS device and determining the input signal required by dynamic characteristic;
[0009] Step 2: constructing the MEMS device model in the finite element software and applying physical constraint conditions, performing transient simulation research, and obtaining the transient response data under the input signal in step 1;
[0010] Step 3: performing feature engineering construction on the transient response data obtained in step 2, selecting appropriate feature parameters to form a data set;
[0011] Step 4: using the data set obtained in step 3, establishing a long short-term memory neural network and performing training;
[0012] Step 5: after the long short-term memory neural network training is completed, extracting part of the network hyperparameters from the input layer to the output layer;
[0013] Step 6: assembling the hyperparameters extracted in step 5, and requiring that the equation obtained by assembly should completely contain the forward propagation process of the long short-term memory neural network;
[0014] Step 7: using the hardware description language Verilog-A to describe and encapsulate the equation obtained in step 6, defining the input and output ports, and establishing a MEMS device dynamic characteristic macro model which completely contains the forward propagation process of the long short-term memory neural network. The MEMS device dynamic characteristic macro model is imported into the system-level circuit simulation software for MEMS-IC collaborative analysis.
[0015] Further, the dynamic characteristics in step 1 refer to the dynamic response behavior of the MEMS device under the action of a time-varying input signal (such as a step signal, a periodic signal or a random signal), reflecting its performance varying with time or frequency. Different MEMS sensors have different physical mechanisms when working, and the dynamic characteristics include step response, frequency response, response time, noise characteristics, etc. Taking the modeling of a MEMS thermal flow sensor as an example, the core structure of the sensor is a central heating resistor and symmetrically distributed temperature measuring resistors. The dynamic characteristics of interest of the sensor are the response to the change of gas flow rate. When the device is input with varying wind speed information, the temperature of the heating resistor and the temperature measuring resistor of the sensor will change, so the input of interest of the device is the flow rate information, and the output is the resistance temperature value.
[0016] Further, the step of constructing a MEMS device model in the finite element software in step 2 specifically includes the following steps: according to the geometric structure, material and physical working mechanism of the MEMS device, a finite element model of the MEMS device is constructed; according to the dynamic characteristics of interest, input signals are applied to the finite element model of the MEMS device, transient research calculation is carried out, and transient output signals are obtained. Taking the MEMS thermal flow sensor as an example, the core structure of the sensor is a suspended thin film structure, and a heating resistor is placed at the geometric center of the thin film. Two temperature measuring thermistors are symmetrically placed on both sides of the heating resistor. When the MEMS thermal flow sensor works, the central heating resistor is heated by the control circuit. In the absence of wind, the thermal field generated by the central heating resistor is symmetrically distributed, and the temperature difference between the left and right temperature measuring resistors is 0. In the presence of wind, the left and right temperature measuring resistors will produce a temperature difference. Therefore, when performing finite element simulation, the physical field is set as "solid and fluid heat transfer", the heat source is set on the surface of the heating center, the transient simulation time is 8000ms, the step is 1ms, the fluid flow rate is defined as a piecewise function to represent the change of the flow rate, 0-2000ms is 0m / s, 2000ms-4200ms is 3.6m / s, 4200ms-6800ms is 6.5m / s, 6800ms-8000ms is 9.4m / s, and the transient response data of the heating resistor temperature is obtained by simulation.
[0017] Further, the transient response data obtained in step 3 includes a transient input signal and a transient output signal; the feature engineering construction on the obtained transient response data includes interpolation and feature addition. The interpolation is to ensure the continuity of the original transient response data. The feature addition refers to increasing the feature dimension of the original transient response data. The features herein include but are not limited to the first-order change rate, the second-order change rate, the gradient, the peak value, the mean value and the standard value of the original data. The original transient input signal and the original transient output signal are respectively added with features, and the features that best reflect the change law of the original transient input signal and the original transient output signal are selected as input feature parameters and output feature parameters and merged into the original transient data to form a data set. Taking a MEMS thermal flow sensor as an example, the transient response data obtained includes an input segmented flow rate signal from 0 to 8000 ms and a heating resistance temperature output signal from 0 to 8000 ms, with a step of 1 ms, so each group of signals contains 8001 values. The feature engineering is established, the first-order change rate, the second-order change rate, the peak value, the mean value and other features of the input signal and the output signal are calculated, and finally it is found that the first-order change rate can describe the dynamic change law of the original signal, so the first-order change rate of the signal is selected as the feature parameter and merged into the original data to form a data set.
[0018] Further, in step 4, the long short-term memory neural network is constructed, the first step needs to determine the neural network structure. The long short-term memory neural network is composed of an input layer, a long short-term memory unit layer, a dropout layer, a full connection layer and an output layer, each network layer has different number of layers and different number of neurons, wherein the input layer and the output layer usually have only a single layer, and the number of neurons in the input layer is determined by the dimension of the input data, and the number of neurons in the output layer is determined by the dimension of the output data, the number of layers and the number of neurons of the long short-term memory unit layer, the dropout layer and the full connection layer can be randomly selected; the second step is to normalize the data set by Min-Max or Z-Score standardization and divide it into a training set and a test set; the third step is to set the initial value of the long short-term memory neural network hyperparameters, which include the number of layers of various network layers of the long short-term memory neural network, the number of neurons of each layer, the activation function, the weight and bias of each layer of neurons, the learning rate, the training batch size, the training round, the dropout rate, etc.
[0019] The fourth step is to train the long short-term memory neural network, including training the constructed long short-term memory neural network using the training set and testing the trained long short-term memory neural network using the test set. In the training process of the long short-term memory neural network, the input data will pass through the input layer, the long short-term memory unit layer, the dropout layer and the full connection layer in sequence to reach the output layer, which is called the forward propagation process of the neural network. The data reaching the output layer after the forward propagation is calculated with the error of the output data, the error is transmitted in the reverse direction along each layer, and the gradient descent method is used to update the weights and biases of the neurons in each layer of the network, which is called the back propagation process of the neural network. A complete forward propagation process and a back propagation process are defined as a round of training. Then the input data will repeatedly perform the above forward propagation process and back propagation process until the training round reaches the set value or the error is less than or equal to the set value, and the training of the neural network is completed. The input data for training the long short-term memory neural network is composed of the original transient input signal and the input characteristic parameter, and the output data is composed of the original transient output signal and the output characteristic parameter.
[0020] Taking the MEMS thermal flow sensor as an example, since it is necessary to predict the temperature output value at the current time, according to the constructed data set, the dimension of the input data is two, one is the original flow rate signal, and the other is the first order change rate of the flow rate, the dimension of the output data is two, one is the original resistance temperature, and the other is the first order change rate of the resistance temperature, therefore the input parameters of the long short-term memory neural network are selected as four, which are flow rate, first order change rate of flow rate, historical resistance temperature and first order change rate of historical resistance temperature, and the output parameter is one, which is the resistance temperature at the current time. A long short-term memory neural network with four inputs and single output is constructed, the long short-term memory unit layer is selected as 1 layer, containing 3 long short-term memory units, the dropout layer is 1 layer, the full connection layer is 2 layers, the number of neurons in each layer is 12 and 8 respectively, the time sequence length is 8 time steps, the data set is standardized by Z-Score, the first 80% of the data set is selected as the training set, and the remaining 20% is selected as the test set, the dropout rate of the long short-term memory neural network is set to 0.2, the initial learning rate is set to 0.1, the training round is set to 2000 rounds, and then the training is started. The long short-term memory neural network obtained by training can be used to predict the temperature value in real time by inputting the flow rate and the historical resistance temperature.
[0021] Further, each long short-term memory unit in the long short-term memory unit layer in step 4 contains an input gate, a forget gate, a cell state and an output gate:
[0022] The input gate is used to receive data from the input layer at the current time t, and combine the hidden state h t-1 The input gate signal i is formed toutput the cell state to the cell state output;
[0023] The forget gate is configured to receive data from the input layer at the current time t and combine the hidden state h at the previous time t-1 form a forget gate signal f t output the cell state to the cell state output;
[0024] The cell state is configured to receive the retain signal from the input gate at the current time t and the discard information from the forget gate at the current time t, and combine the cell state c at the previous time t-1 update the cell state c at the current time t ;
[0025] The output gate is configured to receive data from the input layer at the current time t and combine the hidden state h at the previous time t-1 form an output signal o at the current time t t ; combine the cell state c at the current time t update the hidden state h at the current time t .
[0026] Further, the part of the long short-term memory neural network required to be extracted in step 5 includes the number of layers of various network layers, the number of neurons of each layer, the activation function, the weight and bias of each layer of neurons, the training batch size, etc. Taking the MEMS thermal flow sensor as an example, the number of layers of various network layers extracted are as follows: the input layer is 1, the long short-term memory unit layer is 1, the dropout layer is 1, the fully connected layer is 2, and the output layer is 1; the number of neurons of each layer is as follows: the input layer is 4, the long short-term memory unit layer is 3, the first layer of the fully connected layer is 12, the second layer is 8, and the output layer is 1; then the weight matrix and bias matrix of each layer and the activation function are extracted. Specifically, it includes input layer parameters (standardization parameters), long short-term memory unit layer parameters (weight matrix W and U, bias matrix b, activation function f, and hidden state h of the loop unit), fully connected layer parameters (weight matrix W, bias matrix b, and activation function g), and output layer parameters (inverse standardization parameters).
[0027] Further, the equation assembled in step 6 needs to be expanded in the form of a polynomial:
[0028] f(x1,x2,x3,…,x t-1 )=g(a1x1+a2x2+a3x3+…+a t-1 x t-1 +b)
[0029] Where f(x1,x2,x3,…,x t-1 ) represents the output value of each layer of network neurons, x1,x2,x3,…,x t-1represent the input values input to the neurons of each layer network, a1, a2, a3, …, a t-1 represent the elements of the weight matrix of each layer network neuron, b represents the elements of the bias vector of each layer network neuron, and g(y) represents the activation function.
[0030] Taking the MEMS thermal flow sensor as an example, the hyperparameters extracted in step 5 are assembled, and it is required that the equation obtained by assembly must completely contain the forward propagation process of the long short-term memory neural network. Extract the network parameters of each layer and expand them in the form of a polynomial:
[0031] ① The standardization parameters of the input layer are: μ i ,σ i , and the display equation of the input layer can be represented as:
[0032]
[0033] where μ i represents the mean of the input data, and σ i is the standard deviation of the input data.
[0034] ② In the long short-term memory unit layer, all the weight and bias matrices of the input gate: W i , U i , b i , W c , U c , and b c , the constructed input gate equation can be represented as:
[0035]
[0036]
[0037] In formula (1), i t represents the output value of the input gate, σ is the sigmoid activation function, h t-1 is the hidden state at the previous moment, x t is the current input vector, W i and U i are the weight matrices connecting the hidden state at the previous moment and the current input to the input gate, and b i is the bias matrix of the input gate. In formula (2), c represents the new memory unit, which represents how the current input information affects long-term memory, where W c and U c are the weight matrices connecting the hidden state at the previous moment and the current input to the new memory unit, b c is the bias matrix, and tanh is the hyperbolic tangent activation function.
[0038] f f f The constructed input gate equation can be represented as:
[0039] t f t-1 f t f (5)
[0040] t f f f The bias matrix.
[0041] The constructed cell state equation can be represented as:
[0042]
[0043] In this formula, c t and c t-1 are the memory cell states at time step t and time step t-1, respectively.
[0044] o o o The constructed output gate equation can be represented as:
[0045] t o t-1 o t o (7)
[0046] t t t (8)
[0047] t o o o The bias matrix. In the formula, h t is the hidden state at time step t, * represents element-wise multiplication operation, and c t represents the memory cell state at time step t.
[0048] (6) The weight and bias matrix of the two full connection layers: W fc1 ,b fc1 ,W fc2 ,b fc2 The equation of the constructed full connection layer can be expressed as:
[0049] fc1 = sigma (W fc1 * X + b fc1 ) (9)
[0050] fc2 = sigma (W fc2 * X + b fc2 ) (10)
[0051] W fc1 and b fc1 are the weight matrix and bias matrix of the output gate of the long short-term memory neural network to the first full connection layer, respectively. fc2 and b fc2 are the weight matrix and bias matrix of the first full connection layer to the second full connection layer, respectively.
[0052] (7) The standardization parameters of the output layer are: mu o , sigma o The display equation of the output layer can be expressed as:
[0053] Temp_output yi = temp_norm yi * sigma o + mu o (11)
[0054] Where mu i represents the mean of the output data, and sigma i is the standard deviation of the output data.
[0055] Further, the input port of step 7 adds a clock signal port clk and a reset signal port reset to ensure that the excitation source provides excitation according to a specific time step.
[0056] The MEMS device dynamic characteristic macro model modeling method based on the long short-term memory neural network has the following advantages:
[0057] (1) The present application proposes a relatively general MEMS device macro model modeling process, which directly uses the transient data of the input and output characteristics to construct the macro model, and does not need to analyze the physical mechanism of the device during operation, especially for the characteristics of complex MEMS devices multi-physical field coupling and cross-scale combination, which simplifies the analysis process of modeling.
[0058] (2) The application utilizes the excellent nonlinear fitting capability of the neural network, does not need additional analysis of the nonlinear effect, directly establishes the dynamic characteristic model of the MEMS device, and improves the modeling efficiency.
[0059] (3) The long short-term memory neural network is described and packaged using the Verilog-A hardware description language in the application, forms an electronic IP unit that can be called at any time, and can provide a reference for the transplantation of the time series neural network.
[0060] (4) The application utilizes the long short-term memory neural network, directly utilizes the transient response data of the MEMS device to model the dynamic characteristics of the MEMS device, and finally encapsulates the IP unit in the circuit simulator through the VerilogA hardware description language, greatly improving the co-simulation efficiency of the MEMS device and the interface circuit. BRIEF DESCRIPTION OF DRAWINGS
[0061] Figure 1 It is a top view of the sensitive structure of the MEMS thermal flow sensor;
[0062] Figure 2 It is a side view of the sensitive structure of the MEMS thermal flow sensor;
[0063] Figure 3 It is a flow chart of the method proposed in the application;
[0064] Figure 4 It is a structure diagram of the long short-term memory neural network used in the application;
[0065] Figure 5 It is an interconnection schematic diagram of the macro model and the interface circuit;
[0066] Figure 6 It is a comparison of the system-level transient simulation result and the finite element transient simulation result of the macro model system. DETAILED DESCRIPTION
[0067] In order to better understand the purpose, structure and function of the application, the application of a MEMS device dynamic characteristic macro model modeling method based on a long short-term memory neural network is further described in detail below in combination with the drawings.
[0068] When the MEMS device needs to model the input and output dynamic characteristics, the MEMS device macro model modeling method based on the long short-term memory neural network proposed in the application can be used. The method of the application takes a typical MEMS thermal flow sensor as a specific application object, illustrates the actual implementation process of the method of the application, and other MEMS devices can also be modeled and analyzed according to the same method.
[0069] As Figure 3As shown, the MEMS device dynamic characteristic macro-modeling method based on a long short-term memory neural network includes the following 7 steps:
[0070] Step 1, analyze the physical mechanism of the MEMS device and determine the input signal required for dynamic characteristics. The basic structure of the MEMS thermal flow sensor is a central heating resistor and two symmetrically distributed thermistors. When the measured fluid flow rate is 0, the heating resistor generates a symmetrically distributed thermal field, and the temperature difference of the two side temperature measuring resistors is 0. When the gas flow rate is not 0, the change of the thermal field causes the temperature of the two side temperature measuring resistors to change, and the resistance of the circuit connected changes. By detecting the change of the current, the size of the fluid flow rate can be calculated. The dynamic characteristic concerned by the sensor is the response of the resistance temperature to the change of the gas flow rate. When the device is input with changing flow rate information, the temperature of the temperature measuring resistor will change.
[0071] Step 2, build a MEMS device model in finite element software and apply physical constraint conditions, and conduct transient simulation research to obtain transient response data under the input signal described in step 1. The sensitive structure of the MEMS thermal flow sensor is modeled in the finite element software. The core structure of the sensor is a central suspended membrane structure, with a heating resistor in the center, a pair of temperature measuring resistors symmetrically distributed on both sides of the heating resistor, and many hollow triangular structures distributed on the membrane. The design of the suspended membrane structure and the hollow structure can reduce the heat loss caused by the heat transfer of the substrate and improve the sensitivity of the flow sensor. Set the physical field and boundary conditions and conduct transient simulation analysis of the MEMS thermal flow sensor. First, apply a heat source to the central heating resistor, set the heat source power to 5[mW], and set the fluid flow rate for the air domain, then perform meshing, and solve to obtain the transient response data of the resistance temperature under different flow rate input conditions. The transient simulation time is 8000ms and the step is 1ms. The input wind speed is defined as a piecewise function, 0-2000ms is 0m / s, 2000ms-4200ms is 3.6m / s, 4200ms-6800ms is 6.5m / s, and 6800ms-8000ms is 9.4m / s. The transient response data of the heating resistor temperature is obtained by simulation.
[0072] Step 3, feature engineering construction is performed on the transient response data obtained in step 2, and appropriate feature parameters are selected to form a data set. The feature engineering construction on the obtained transient response data includes interpolation of the data and addition of features. The interpolation is to ensure the continuity of the original transient response data. The feature addition refers to increasing the feature dimension of the original transient response data. The features here include but are not limited to the first-order rate of change, the second-order rate of change, the gradient, the peak value, the mean value, and the standard value of the original data. The original transient input signal and the original transient output signal are respectively added with features, and the features that best reflect the change law of the original transient input signal and the original transient output signal are selected as input feature parameters and output feature parameters respectively and merged into the original transient data to form a data set. Here, the first-order rate of change, the second-order rate of change, the peak value, the mean value, etc. of the input flow rate signal and the output temperature signal are calculated, and finally it is found that the first-order rate of change can describe the dynamic change law of the original signal, so the first-order rate of change of the signal is selected as the feature parameter and merged into the original data to form a data set.
[0073] Step 4, using the data set obtained in step 3, a model is established as Figure 4The long short-term memory neural network is shown and trained. The first step needs to determine the neural network structure. The long short-term memory neural network is composed of an input layer, a long short-term memory unit layer, a dropout layer, a fully connected layer and an output layer, each network layer has different number of layers and different number of neurons; the second step is to normalize the data set by Min-Max or Z-Score standardization and divide it into training set and test set; the third step is to set the initial value of the long short-term memory neural network hyperparameters, the hyperparameters here include the number of layers of various network layers of the long short-term memory neural network, the number of neurons of each layer, the activation function, the weight and bias of each layer of neurons, the learning rate, the training batch size, the training round, the dropout rate, etc.; the fourth step is to train the long short-term memory neural network, including training the constructed long short-term memory neural network using the training set and testing the trained long short-term memory neural network using the test set. Since the temperature output value at the current time needs to be predicted, according to the constructed data set, the input data dimension is two, one is the original flow rate signal, and the other is the first order change rate of the flow rate, the output data dimension is two, one is the original resistance temperature, and the other is the first order change rate of the resistance temperature, therefore the input parameters of the long short-term memory neural network are selected as four, which are flow rate, first order change rate of flow rate, historical resistance temperature and first order change rate of historical resistance temperature, and the output parameter is one, which is the resistance temperature at the current time. The long short-term memory neural network with four inputs and single output is constructed, the long short-term memory unit layer is selected as 1 layer, containing 3 long short-term memory units, the dropout layer is 1 layer, the fully connected layer is 2 layers, the number of neurons of each layer is 12 and 8 respectively, the time sequence length is 8 time steps, the data set is Z-Score standardized, the first 80% of the data set is selected as the training set, and the remaining 20% is selected as the test set, the dropout rate of the long short-term memory neural network is set to 0.2, the initial learning rate is set to 0.1, the training round is set to 2000 rounds, and then the training is started. The long short-term memory neural network obtained by training can be used to predict the real-time temperature value by inputting the flow rate and the historical resistance temperature.
[0074] Step 5, after the long short-term memory neural network training is completed, the part of network hyperparameters from the input layer to the output layer is extracted. The number of layers of various network layers extracted here is respectively: the input layer is 1, the long short-term memory unit layer is 1, the dropout layer is 1, the fully connected layer is 2, and the output layer is 1; the number of neurons of each layer is respectively: the input layer is 4, the long short-term memory unit layer is 3, the first layer of the fully connected layer is 12, the second layer is 8, and the output layer is 1; then the weight matrix and the bias matrix of each layer and the activation function are extracted. Specifically, it includes the input layer parameters (standardization parameters), the long short-term memory unit layer parameters (weight matrix W and U, bias matrix b, activation function f, and the hidden state h of the recurrent unit), the fully connected layer parameters (weight matrix W, bias matrix b, and activation function g), and the output layer parameters (inverse standardization parameters).
[0075] Step 6, the hyperparameters extracted in step 5 are assembled, and it is required that the equation assembled needs to completely contain the forward propagation process of the long short-term memory neural network. The network parameters of each layer are extracted and expanded in the form of a polynomial:
[0076] The formula expansion is:
[0077] ①The standardization parameters of the input layer are: μ i ,σ i , and the display equation of the input layer can be represented as:
[0078]
[0079] Where μ i represents the mean of the input data, and σ i is the standard deviation of the input data.
[0080] ②In the long short-term memory unit layer, all the weight and bias matrices of the input gate: W i ,U i ,b i ,W c ,U c ,b c , the constructed input gate equation can be represented as:
[0081] i t =σ(W i ·h t-1 +U i ·x t +b i ) (3)
[0082]
[0083] In formula (1), i t represents the output value of the input gate, σ is the sigmoid activation function, h t-1is the hidden state at the previous time step, x t is the current input vector, W i and U i are the weight matrices connecting the hidden state at the previous time step and the current input to the input gate, b i is the bias matrix of the input gate. In equation (2) represents the new memory cell, which indicates how the current input information affects long-term memory, where W c and U c are the weight matrices connecting the hidden state at the previous time step and the current input to the new memory cell, b c is the bias matrix, and tanh is the hyperbolic tangent activation function.
[0084] 3. All weight and bias matrices of the forget gate: W f , U f , b f The constructed input gate equation can be expressed as:
[0085] f t = σ(W f · h t-1 + U f · x t + b f ) (5)
[0086] In this equation, f t represents the output value of the forget gate, W f and U f are the weight matrices connecting the hidden state at the previous time step and the current input to the forget gate, b f is the bias matrix.
[0087] 4. The constructed cell state equation can be expressed as:
[0088]
[0089] In this equation, c t and c t-1 are the memory cell states at time step t and time step t-1, respectively.
[0090] 5. All weight and bias matrices of the output gate: W o , U o , b o The constructed output gate equation can be expressed as:
[0091] o t = σ(W o · h t-1 + U o · x t + b o ) (7)
[0092] h t = o t * tanh(c t ) (8)
[0093] In this formula, o t represents the output value of the output gate, W o and U o are the weight matrices connecting the hidden state at the previous time and the current input to the forget gate, respectively, and b o is the bias matrix. In the formula, h t is the hidden state at time step t, * represents element-wise multiplication operation, and c t represents the memory cell state at time step t.
[0094] (6) The weight and bias matrices of the two-layer fully connected layer: W fc1 , b fc1 , W fc2 , and b fc2 The equation of the fully connected layer constructed can be expressed as:
[0095] fc1 = σ(W fc1 ·X + b fc1 ) (9)
[0096] fc2 = σ(W fc2 ·X + b fc2 ) (10)
[0097] W fc1 and b fc1 are the weight matrix and bias matrix of the output gate of the long short-term memory neural network to the first fully connected layer, respectively. W fc2 and b fc2 are the weight matrix and bias matrix of the first fully connected layer to the second fully connected layer, respectively.
[0098] (6) The standardization parameters of the output layer are: μ o , σ o , and the display equation of the output layer can be expressed as:
[0099] Temp_output yi = temp_norm yi * σ o + μ o (11)
[0100] Where μ i represents the mean of the output data, and σ i is the standard deviation of the output data.
[0101] Step 7, the equations (2)-(11) obtained in step 6 are described and packaged using the hardware description language Verilog-A, and the input and output ports are defined, the input ports are wind, wind_diff, temp1, temp_diff1, the output port is temp2, in addition to defining the resistance input and output ports Rp, Rn, and the clock clk and reset reset control time step input, a complete MEMS device dynamic characteristic macro model containing the forward propagation process of the long short-term memory neural network is established. Finally, the macro model of the MEMS thermal flow sensor is connected with the bias interface circuit for co-simulation, as shown in Figure 5 . Figure 6 The transient response results of the resistance temperature value under the change flow rate input condition of 0-8000 ms are shown, and the co-simulation results and the finite element results are compared.
[0102] The above is only a specific embodiment of the present application, but the protection scope of the present application is not limited thereto, any person skilled in the art can understand and think of the transformation or replacement within the technical range disclosed by the present application, for example, any long short-term memory neural network established according to the transient input and output data and the extracted hyperparameter structure for constructing the MEMS device dynamic characteristic macro model should be covered within the protection scope of the present application, the dynamic characteristics mentioned herein are generally different in different MEMS devices, which need to be set according to the specific circumstances, but the process of establishing the long short-term memory neural network according to the transient input and output data and the extracted hyperparameter structure are unchanged, therefore, the protection scope of the present application should be subject to the protection scope of the claims.
Claims
1. A method for modeling a macro model of dynamic characteristics of a MEMS device based on a long short-term memory neural network, characterized in that, The method comprises the following steps: Step 1, analyze the physical mechanism of the MEMS device, and determine the input signal required for dynamic characteristics; Step 2, build a MEMS device model in finite element software and apply physical constraint conditions, and perform transient simulation research to obtain transient response data under the input signal described in step 1; Step 3, perform feature engineering construction on the transient response data obtained in step 2, select feature parameters to form a data set; Step 4, use the data set obtained in step 3 to establish a long short-term memory neural network and perform training; Step 5, after the long short-term memory neural network is trained, extract part of the network hyperparameters from the input layer to the output layer; Step 6, assemble the hyperparameters extracted in step 5, and require that the equation assembled needs to completely include the forward propagation process of the long short-term memory neural network; Step 7, use the hardware description language Verilog-A to describe and encapsulate the equation obtained in step 6, and define the input and output ports, to establish a MEMS device dynamic characteristic macro model that completely includes the forward propagation process of the long short-term memory neural network; import the MEMS device dynamic characteristic macro model into a system-level circuit simulation software for MEMS-IC co-simulation.
2. The modeling method of claim 1, wherein, In step 1, the physical mechanism of different MEMS devices working is different, and the dynamic characteristics are the dynamic response of the MEMS device to the input signal, including step response, frequency response, response time, and noise characteristics.
3. The modeling method of claim 1, wherein, In step 2, building a MEMS device model in finite element software specifically includes the following steps: according to the geometric structure, material and physical working mechanism of the MEMS device, a finite element model of the MEMS device is constructed; according to the dynamic characteristics concerned, input signals are applied to the finite element model of the MEMS device, transient research calculation is performed, and transient output signals are obtained.
4. The modeling method of claim 1, wherein, The transient response data obtained in step 3 includes transient input signals and transient output signals; the feature engineering construction on the obtained transient response data includes interpolation and feature addition; interpolation is to ensure the continuity of the original transient response data; feature addition means increasing the feature dimension of the original transient response data; the original transient input signal and the original transient output signal are added with features respectively, and the features that best reflect the change law of the original transient input signal and the original transient output signal are selected as input feature parameters and output feature parameters respectively and merged into the original transient data to form a data set.
5. The modeling method of claim 4, wherein, In step 4, a long short-term memory neural network is established, the first step needs to determine the neural network structure; the long short-term memory neural network is composed of an input layer, a long short-term memory unit layer, a dropout layer, a fully connected layer and an output layer, each network layer has different number of layers and different number of neurons, among them, the input layer and the output layer have only single layer, and the number of neurons of the input layer is determined by the dimension of the input data, and the number of neurons of the output layer is determined by the dimension of the output data, the number of network layers and the number of neurons of the long short-term memory unit layer, the dropout layer and the fully connected layer are randomly selected; The second step is to normalize the data set by Min-Max or Z-Score standardization and divide it into a training set and a test set; The third step sets the initial values of the hyperparameters of the long short-term memory neural network, including the number of layers of various network layers of the long short-term memory neural network, the number of neurons of each layer, the activation function, the weights and biases of the neurons of each layer, the learning rate, the training batch size, the training round, and the dropout rate. The fourth step is to train the long short-term memory neural network, including training the constructed long short-term memory neural network using the training set and testing the trained long short-term memory neural network using the test set. In the training process of the long short-term memory neural network, the input data will sequentially pass through the input layer, the long short-term memory unit layer, the dropout layer, and the fully connected layer to reach the output layer, which is called the forward propagation process of the neural network. The data reaching the output layer after forward propagation will be calculated and the error of the output data will be calculated. The error will be transmitted in the reverse direction along each layer, and the gradient descent method will be used to update the weights and biases of the neurons of each layer of the network, which is called the backpropagation process of the neural network. A complete forward propagation process and backpropagation process are defined as a training round. Then the input data will repeatedly repeat the forward propagation process and the backpropagation process until the training round reaches the set value or the error is less than or equal to the set value, and the training of the neural network is completed. The input data for training the long short-term memory neural network is composed of the original transient input signal and the input feature parameters, and the output data is composed of the original transient output signal and the output feature parameters.
6. The modeling method of claim 5, wherein, Each long short-term memory unit in the long short-term memory unit layer in step 4 contains an input gate, a forget gate, a cell state, and an output gate. The input gate is used for receiving data from the input layer at the current time t and combining the hidden state h at the previous time t-1 forming the input gate signal i t outputting to the cell state; The forget gate is used to receive data from the input layer at the current time t, and combine the hidden state h at the previous time t-1 Forming a forget gate signal f t Output to the cell state; The cell state is used to receive the reserved signal from the input gate of the current time t and the discarded information of the forget gate, and combine the cell state c of the previous time t-1 Update the cell state c of the current time t ; The output gate is used for receiving data from the input layer at the current time t, and combining the hidden state h at the previous time t-1 forming the output signal o at the current time t t combining the cell state c at the current time t updating the hidden state h at the current time t .
7. The modeling method of claim 1, wherein, The part of the hyperparameters of the long short-term memory neural network that needs to be extracted in step 5 includes the number of layers of various network layers, the number of neurons of each layer, the activation function, the weights and biases of the neurons of each layer, and the training batch size.
8. The modeling method of claim 1, wherein, In step 6, the assembled equation needs to be expanded in the form of a polynomial: f(x1, x2, x3,..., x t-1 ) = g(a1x1+ a2x2+ a3x3+... + a t-1 x t-1 +b) (1) where f(x1, x2, x3, …, x t-1 represents the output value of each layer network neuron, x1, x2, x3, …, x t-1 represents the input value input to each layer network neuron, a1, a2, a3, …, a t-1 represents the elements of each layer network neuron weight matrix, b represents the elements of each layer network neuron bias vector, and g(y) represents the activation function.
9. The long short-term memory neural network-based MEMS device dynamic characteristic macro-modeling method of claim 1, characterized in that the input port of step 7 adds a clock signal port clk and a reset signal port reset to ensure that the excitation source provides excitation according to a specific time step.