Disclosure of Invention
In view of the above, in order to solve the technical problem that the calculation time is high in the modal analysis method, the application provides a modal analysis method based on an expansion residual error width network, which comprises the following steps:
collecting multi-category modal analysis cases and constructing a data set;
based on a DRN network frame, combining an expansion residual convolution module and a width learning module to construct an analysis model;
setting a loss function, and training the analysis model based on the data set to obtain a trained analysis model;
and inputting the data to be tested into the analysis model after training is completed, and obtaining the frequency corresponding to each mode.
Wherein no data set containing a large number of CAE is disclosed as being available, since collecting data for a large number of modal analysis cases, which require a large number of different categories of data, is computationally and labor intensive.
In this embodiment, the mode analysis result is specifically the frequency corresponding to each mode of the first to tenth orders.
In some embodiments, further comprising:
and verifying the trained analysis model based on the evaluation index.
Through the preferred steps, error checking is performed on the trained analytical model, and the evaluation index is determined by a user, including but not limited to MAE, and a determination coefficient R 2 。
In some embodiments, the step of collecting multi-class modal analysis cases and constructing a dataset specifically includes:
acquiring corresponding parameter data according to the CAE simulation case;
the parameter data comprise points, lines, nodes, grid units, loads, constraints and simulation results of the simulation module;
and cleaning the parameter data to construct a tensor-form data set.
Through the preferred step, the input of the data set exists in a parameterized form, for example, in a specific uniform straight rod modal analysis task, the input of a single uniform straight rod is the coordinate position of a point, the line is the information formed by the points with specific serial numbers, the coordinate positions of the nodes and units, and the related information such as materials, loads, boundary constraints and the like; in addition, the source parameter data contains a large amount of unnecessary information, such as version information of simulation software, simulation completion time and other redundant contents, and the redundant contents in the data set are deleted in batches by using Python, so that the required result is reserved.
In some embodiments, the step of constructing an analysis model based on the DRN network framework in combination with the expansion residual convolution module and the width learning module specifically includes:
based on the DRN network frame, the system comprises a plurality of groups of convolution layers;
replacing convolution operators of the last two groups of convolution layers with expansion convolution;
the output of the last group of convolution layers is accessed to a width learning module;
and integrating to obtain an analysis model.
By this preferred procedure, the information on the feature matrix can be learned more excellently by utilizing the expansion of the expansion residual convolution receptive field and the high scalability of the width network, and the loss can be reduced continuously.
In some embodiments, the loss function is expressed as follows:
in the above formula, y is a true value, f (x) is a predicted value, and δ is a preset parameter of the loss function.
In the preferred step, the tolerance degree to abnormal values can be flexibly weighed by adjusting the value of delta; when δ is small, the loss function is close to MSE; when δ is large, the loss function is close to MAE.
In some embodiments, the step of inputting the data to be tested into the trained analysis model to obtain a modal analysis result specifically includes:
inputting data to be tested into the analysis model after training is completed;
inputting the data to be tested into a plurality of layers of Conv-BN-ReLU groups, and extracting the characteristics of the data to be tested by each layer of Conv-BN-ReLU groups;
extracting features corresponding to ten-order modal frequencies of data to be detected to obtain output features of preset dimensions;
and inputting the output characteristics of the preset dimension into a characteristic group with k groups of nodes being q and an enhancement group with m groups of nodes being r to carry out regression, so as to obtain a modal analysis result of the preset data type.
In some embodiments, the width learning module is represented as follows:
Z i =σ(XW zi +β zi )∈R N×q ,i=1,2,…,k
in the above formula, X represents a mapping vector, sigma (·) is a linear activation function, W zi And beta zi The weight matrix and the bias matrix of the feature layer are respectively represented, and N represents the number of samples.
The application also provides a modal analysis system based on the expansion residual error width network, which comprises:
the data set construction module is used for collecting multi-category modal analysis cases and constructing a data set;
the model construction module is used for constructing an analysis model based on a DRN network frame and combining the expansion residual convolution module and the width learning module;
the model training module is used for setting a loss function, training the analysis model based on the data set and obtaining a trained analysis model;
and the modal analysis module is used for inputting the data to be tested into the analysis model after training is completed, and obtaining a modal analysis result.
The application also provides a modal analysis device based on the expansion residual error width network, which comprises:
at least one processor;
at least one memory for storing at least one program;
the at least one program, when executed by the at least one processor, causes the at least one processor to implement a method of modal analysis based on an expanded residual width network as described above.
Based on the scheme, the application provides a modal analysis method, a system and a device based on an expansion residual error width network, which are characterized in that firstly, a parameterized data set is constructed, case parameterized information is used as input data, and therefore the operation cost is reduced; an analysis model is constructed, and the model utilizes expansion of an expansion residual convolution receptive field and high expandability of a width network, so that the relevant information of a feature matrix can be learned more excellently, the loss is reduced continuously, and the analysis prediction precision is improved.
Detailed Description
The modal analysis is used for knowing the characteristics of each order of main modes of the structure in a certain susceptible frequency range, and further can be used for predicting the actual vibration response of the structure under the action of various vibration sources outside or inside the frequency band.
Aiming at the technical problem of long calculation time in the background technology, along with the development of machine learning/deep learning, the application realizes the reduction of calculation time under the condition of ensuring prediction precision by constructing a parameterized data set and improving the existing modal analysis model.
The following description of the embodiments of the present application will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present application, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the application without making any inventive effort, are intended to be within the scope of the application.
For convenience of description, only a portion related to the present application is shown in the drawings. Embodiments of the application and features of the embodiments may be combined with each other without conflict.
It is to be understood that the terms "system," "apparatus," "unit," and/or "module" as used herein are one means for distinguishing between different components, elements, parts, portions, or assemblies at different levels. However, if other words can achieve the same purpose, the word can be replaced by other expressions.
As used in the specification and in the claims, the terms "a," "an," "the," and/or "the" are not specific to a singular, but may include a plurality, unless the context clearly dictates otherwise. In general, the terms "comprises" and "comprising" merely indicate that the steps and elements are explicitly identified, and they do not constitute an exclusive list, as other steps or elements may be included in a method or apparatus. The inclusion of an element defined by the phrase "comprising one … …" does not exclude the presence of additional identical elements in a process, method, article, or apparatus that comprises an element.
In the description of embodiments of the application, "plurality" means two or more than two. The following terms "first", "second" are used for descriptive purposes only and are not to be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defining "a first" or "a second" may explicitly or implicitly include one or more such feature.
In addition, flowcharts are used in the present application to illustrate the operations performed by systems according to embodiments of the present application. It should be appreciated that the preceding or following operations are not necessarily performed in order precisely. Rather, the steps may be processed in reverse order or simultaneously. Also, other operations may be added to or removed from these processes.
Referring to fig. 1, a flow chart of an alternative example of a method for modal analysis in an expanded residual width network according to the present application, which may be applied to a computer device, the method for modal analysis according to the present embodiment may include, but is not limited to, the following steps:
step S1, collecting multi-class modal analysis cases and constructing a data set;
s2, based on a DRN network framework, combining an expansion residual convolution module and a width learning module to construct an analysis model;
s3, setting a loss function, and training the analysis model based on the data set to obtain a trained analysis model;
and S4, inputting the data to be tested into the analysis model after training to obtain a modal analysis result.
Specifically, data fitting is achieved through a large number of data samples, and a model for predicting the maximum stress unit and the stress of the engineering case through inputting engineering three-dimensional data, working conditions and other information is trained.
In this embodiment, the mode analysis result is specifically the frequency corresponding to each mode of the first to tenth orders.
In some possible embodiments, further comprising:
and step S5, verifying the trained analysis model based on the evaluation index.
In the present embodiment, MAE and the determination coefficient R are used 2 As an evaluation index.
MAE: MAE is a commonly used regression model evaluation index for measuring the average absolute error between the model predicted result and the actual observed value.
For a regression model, its predictive value is y pred The actual observed value is y true Then MAE can be calculated by the following formula:
where n is the number of samples, Σ represents summing all samples, and i represents taking the absolute value.
MAE measures the magnitude of the average prediction error of the model, with smaller values indicating more accurate prediction of the model. MAE is less sensitive to outliers than other regression assessment indicators (e.g., MSE, RMSE, etc.), because it uses absolute values rather than squares.
R 2 : determining coefficient (R) 2 ) Is a common index for evaluating the goodness of fit of a regression model. R is R 2 The value range of the determined coefficient is between 0 and 1, the closer to 1 is the better the fitting degree of the model to the observed data, and the closer to 0 is the worse the fitting degree. This results in R 2 The decision coefficients are very intuitive and easy to understand and interpret. R is R 2 The decision coefficients provide a way to evaluate the overall performance of the regression model. It reflects the variance ratio of dependent variables that the model can interpret by comparing the ratio of the sum of squares to the sum of squares of the residuals. R is R 2 The decision coefficients may be used to compare goodness of fit between different models. By comparing R of different models 2 Values, it can be determined which model fits the data better. In multiple linear regression:
wherein y is i Is the i-th observation (true value) in the dataset.Is the model predicted value of the dependent variable corresponding to the i-th independent variable.Is the average of the dependent variable (or target variable).
Time-the Time spent in the CAE (computer aided engineering) simulation process is an important indicator. The time consumption has important significance in CAE simulation, and can be used for computing resource evaluation, workflow planning, model complexity evaluation, feasibility research and result verification and verification. For efficient management and optimization of simulation processes, knowledge and rational utilization of time consumption is critical. The time consumption may be used to plan the simulation workflow and schedule. Knowing the time requirements of each simulation step can help to determine the priority of the task, adjust the work plan, and ensure that the time at which the simulation is completed meets project requirements. The time consumption may be used to evaluate the accuracy and stability of the simulation results. If the simulation time is short, further verification and validation of the results may be required to ensure its reliability and accuracy.
In some possible embodiments, the step of collecting multi-class modal analysis cases and constructing a data set specifically includes:
s1.1, acquiring corresponding parameter data according to a CAE simulation case;
s1.2, the parameter data comprise points, lines, nodes, grid units, loads, constraints and simulation results of a simulation module;
and S1.3, cleaning the parameter data to construct a tensor-form data set.
In particular, since collecting data for a large number of modal analysis cases is computationally and labor intensive, no useful dataset containing a large number of CAE is disclosed. To support our study and provide a potential direction of study, we constructed a dataset for modal analysis of multiple case categories.
In this example, ansys APDL Command is converted to Python programming language supported by Pyansys. The advantages of Pyansys are fully developed, and CAE simulation of corresponding tasks is completed on the basis of engineering application and parts related to modal analysis in daily life. Finally, the data of points, lines, nodes, grid cells, loads, constraints and simulation results of each model are obtained respectively, and in the subsequent work, the data are cleaned, so that the data set in the form of tensors which are wanted by us is obtained.
It should be noted that the present application does not limit the source of the case, and the case may be uploaded to the computer device by the user, or crawled from a third party application platform by the computer device, etc., and may be determined according to the actual scene requirement.
In some possible embodiments, the step of collecting multi-class modal analysis cases and constructing a data set specifically includes:
step S2.1, based on a DRN network frame, comprising a plurality of groups of convolution layers;
in particular, the starting point we construct is a DRN network framework. These architectures consist of 5 sets of convolutional layers. The first layer in each group is obtained by downsampling across rows: i.e. the convolution filter evaluates only in even rows and even columns. Set each group of layers to use M l Expressed as l=1, …,5, usingThe ith layer of the first group is shown. For simplicity, consider an idealized model in which each layer consists of a single feature matrix: it is simple to extend to multiple feature matrices. Is provided with->Is a layer->And the related filters. In the model, < >>The outputs of (2) are:
wherein: definition field of p isIs included in the feature matrix.
S2.2, replacing convolution operators of the last two groups of convolution layers with expansion convolution;
one relatively straightforward way to increase resolution at higher layers of the network in this step is to simply remove sub-samples from some of the internal layers. This does increase the resolution downstream, but has a detrimental side effect that counteracts the benefit: removing sub-samples correspondingly reduces the receptive field of the subsequent layers. { Dilated Residual Networks } to this end, we use a hole convolution { Multi-scale context aggregationby dilated convolutions } to increase the receptive field at higher layers to compensate for the decrease in receptive field caused by the removal of sub-samples. The effect is that the cells in the dilating layer have the same receptive field as the corresponding cells in the original model.
We focus on the last two sets of convolutional layers: m is M 4 And M 5 . In the process that we just wantThe output resolution of (a) is doubled without affecting the receptive field of its cell. However, the subsequent layers are all affected: their receptive fields are reduced by a factor of 2 in each dimension. Therefore, we replace the convolution operators in these layers with 2-dilation convolution { Multi-scale context aggregationby dilated convolutions }:
for all i is more than or equal to 2. ForThe same transformations apply:
M 5 follow two already eliminated cross-layers. The elimination of stride reduced their receptive field by a factor of 4 in each dimension. Their convolution needs to be extended by a factor of 4 to compensate for the loss:
for all i.gtoreq.2. Finally, as with the original architecture, M 5 Then global averaging pooling is performed, the output features are mapped into one vector, and 1×1 convolution is performed, and the vector is mapped into a vector containing all class prediction scores.
The ModAL-DRN downsamples the input by a factor of 8. For example, when the input resolution is 108×16, the output of M5 in one MODIAL-DRN is 1×10. Thus, global average pooling would be 2 out 4 The multiple value, which can help the model-DRN predict those of the MODAL analysis data that have less parameterized information present and take these objects into account in the prediction.
S2.3, the output of the last group of convolution layers is accessed to a width learning module;
in particular, width learning has high scalability. By increasing the number of BLUs, a width model with large-scale nodes can be constructed, thereby increasing the learning and expression capabilities of the model. Meanwhile, the width learning can also effectively process high-dimensional sparse data, and is suitable for various tasks including classification, regression, clustering and the like.
After training the feature matrix by the MODAL-DRN, inputting the result into a network with width learning, and outputting a data type with the result requirement of 1×10 in a regression task of the MODAL analysis. Inputting the output result of the MODAL-DRN into the k groups of characteristic groups with q node numbers can be converted into:
Z i =σ(XW zi +β zi )∈R N×q ,i=1,2,…,k
wherein X is the output of the expansion convolution network, sigma (·) is the linear activation function, W zi And beta zi The weight matrix and the bias matrix of the feature layer are respectively represented, and N is the number of samples. Will k groups Z i Spliced Z k Enhancement group E via non-linear mapping of enhancement layers j Can be expressed as:
E j =τ(Z k W ej +β ej )∈R N×r ,j=1,2,…,m
where τ (·) is a nonlinear activation function, r is the number of nodes per enhancement group, W ej And beta ej Respectively representing the weight matrix and the bias matrix of the enhancement layer. The output results of m groups of enhancement nodes are spliced into E m The final output of BL can be described as:
due toAnd->Is a fixed parameter after random generation, the optimization problem of the model is converted into an optimization matrix W, and the optimization target is to enable the predicted value +.>Closer to the actual value Y, the Loss of the optimization problem is solved by Huber Loss.
And S2.4, integrating to obtain an analysis model.
Specifically, the structure of the analytical model and the data flow are schematically shown in fig. 2.
In some possible embodiments, the loss function is expressed as follows:
in the above formula, y is a true value, f (x) is a predicted value, and δ is a preset parameter of the loss function.
In some possible embodiments, the step of inputting the data to be tested into the trained analysis model to obtain a modal analysis result specifically includes:
inputting data to be tested into the analysis model after training is completed;
the data to be measured is input into a plurality of layers of Conv-BN-ReLU groups, each layer of Conv-BN-ReLU group performs characteristic extraction on the data to be measured, taking MODAL-DRN-D-BL-38 as an example,
the shape of the data output through the first layer is 1610816;
the shape of the data output through the second layer is 32548;
the shape of the data output through the third layer is 64274;
the shape of the data output through the fourth layer is 128142;
the shape of the data output through the fifth layer is 256142;
the shape of the data output through the sixth layer is 512142;
the shape of the data output through the seventh layer is 512142;
the shape of the data output through the eighth layer is 512142;
extracting the characteristics corresponding to the tenth-order modal frequency of the data to be detected through the convolution kernel with the size of 11 and Fc10, wherein the data dimension is 1 multiplied by 10, and obtaining the output characteristics with the data dimension of 11 multiplied by 0;
inputting the output characteristics with the data dimension of 1 multiplied by 10 into k groups of characteristic groups with the node number of q and m groups of enhancement groups with the node number of r for regression; and obtaining a modal analysis result of the preset data type.
The application also provides a comparative simulation experiment, and the experimental result is as follows:
the behavior of the different models on this dataset, including model name, and time spent (in minutes), FEM, is listed in table 1: the row represents the experimental results of the baseline model FEM, which is a traditional modal analysis method, which we take approximately tens of thousands of minutes to solve the simulation model on the dataset. Assuming that we use the result of the FEM algorithm solution as a true value, but comparing the sum of other model-DRN models and model-DRN-BL models with the FEM algorithm, we consider that it is reasonable that the model-DRN model and model-DRN-BL model perform much better than the FEM algorithm in the MODAL analysis dataset. In the CAE simulation process, the time consumed is an important indicator. The time consumption has important significance in CAE simulation, and can be used for computing resource evaluation, workflow planning, model complexity evaluation, feasibility research and result verification and verification. Further, as can be seen from tables 1, 4 and 5, the performance of the model-DRN-A-BL-50 is optimal among the numerous models-the result may be that the design of the number of network layers in the model-DRN-A-BL-50 is not separated, and we can see that the optimal model is model-DRN-D-38 in the model-DRN series, however, all experimental datA after adding BL modules are compared to the optimal model-DRN-A-BL-50.
Table 1: experimental results on modal analysis dataset
The application also provides an ablation experiment:
from the experimental results in table 2, it can be seen that the removal of the dilation convolution has an effect on the performance of the model. The error of Resnet-26 versus MODAL-DRN-C-26 increased by a dramatic increase in 845.9, with a concomitant increase in forecast time of 25.44. And comprehensively comparing the model with the expansion receptive field removed with the MODAL-DRN model, and increasing the expansion convolution module improves the prediction accuracy of the model and reduces the training time. This shows that the dilation convolution removes some error in these experiments and that removing the dilation convolution reduces the performance of the model.
Table 2: results of Modal analysis experiments after removal of the swelling receptive field
| Model
|
MAE
|
Time(s)
|
R 2 |
| Resnet-26
|
850.82
|
29.70
|
0.85747
|
| MODAL-DRN-C-26
|
4.92(-845.9)
|
4.26(-25.44)
|
1.0
|
| Resnet-38
|
15.78
|
9.19
|
0.99999
|
| MODAL-DRN-D-38
|
1.68(-14.1)
|
5.74(-3.45)
|
0.99999 |
According to the experimental results in table 3 and table 1, it can be seen that the model uses 50 layers as boundary, in the shallow network and the deep network, the improvement of the BL module on the prediction result does not play A great role, and in the network around 50 layers, the network prediction result of the BL module is better than the optimal prediction result of the modified al-DRN series, which is 1.49 of the modified al-DRN-A-BL-50. Comparing the results of table 2 we can also conclude that adding a network of BL modules certainly outperforms the Resnet network architecture. In summary, we can find that adding BL modules plays a role in improving the experimental results of modal analysis.
Table 3: modal analysis experimental result after removing width learning module
| Model
|
MAE
|
Time(s)
|
R 2 |
| MODAL-DRN-C-42
|
4.46(-6.98)
|
5.60(-0.31)
|
0.99961
|
| MODAL-DRN-C-BL-42
|
11.44
|
5.91
|
-
|
| MODAL-DRN-A-50
|
7.11
|
5.05(-0.74)
|
0.98318
|
| MODAL-DRN-A-BL-50
|
1.49(-5.62)
|
5.79
|
-
|
| MODAL-DRN-D-54
|
32.91
|
7.68(-0.61)
|
0.99945
|
| MODAL-DRN-D-BL-54
|
24.88(-8.03)
|
8.29
|
- |
As shown in fig. 3, a modal analysis system based on an expanded residual width network includes:
the data set construction module is used for collecting multi-category modal analysis cases and constructing a data set;
the model construction module is used for constructing an analysis model based on a DRN network frame and combining the expansion residual convolution module and the width learning module;
the model training module is used for setting a loss function, training the analysis model based on the data set and obtaining a trained analysis model;
and the modal analysis module is used for inputting the data to be tested into the analysis model after training is completed, and obtaining a modal analysis result.
The content in the method embodiment is applicable to the system embodiment, the functions specifically realized by the system embodiment are the same as those of the method embodiment, and the achieved beneficial effects are the same as those of the method embodiment.
A modal analysis device based on an expansion residual width network:
at least one processor;
at least one memory for storing at least one program;
the at least one program, when executed by the at least one processor, causes the at least one processor to implement a method of modal analysis based on an expanded residual width network as described above.
The content in the method embodiment is applicable to the embodiment of the device, and the functions specifically realized by the embodiment of the device are the same as those of the method embodiment, and the obtained beneficial effects are the same as those of the method embodiment.
While the preferred embodiment of the present application has been described in detail, the application is not limited to the embodiment, and various equivalent modifications and substitutions can be made by those skilled in the art without departing from the spirit of the application, and these equivalent modifications and substitutions are intended to be included in the scope of the present application as defined in the appended claims.