CN113076583A - Cantilever beam structure design method based on self-attention mechanism neural network - Google Patents

Cantilever beam structure design method based on self-attention mechanism neural network Download PDF

Info

Publication number
CN113076583A
CN113076583A CN202110385261.XA CN202110385261A CN113076583A CN 113076583 A CN113076583 A CN 113076583A CN 202110385261 A CN202110385261 A CN 202110385261A CN 113076583 A CN113076583 A CN 113076583A
Authority
CN
China
Prior art keywords
model
cantilever beam
beam structure
data
neural network
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202110385261.XA
Other languages
Chinese (zh)
Other versions
CN113076583B (en
Inventor
郑帅
栗阳阳
范浩杰
洪军
李宝童
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Xian Jiaotong University
Original Assignee
Xian Jiaotong University
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Xian Jiaotong University filed Critical Xian Jiaotong University
Priority to CN202110385261.XA priority Critical patent/CN113076583B/en
Publication of CN113076583A publication Critical patent/CN113076583A/en
Application granted granted Critical
Publication of CN113076583B publication Critical patent/CN113076583B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F30/00Computer-aided design [CAD]
    • G06F30/10Geometric CAD
    • G06F30/13Architectural design, e.g. computer-aided architectural design [CAAD] related to design of buildings, bridges, landscapes, production plants or roads
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F30/00Computer-aided design [CAD]
    • G06F30/20Design optimisation, verification or simulation
    • G06F30/23Design optimisation, verification or simulation using finite element methods [FEM] or finite difference methods [FDM]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F30/00Computer-aided design [CAD]
    • G06F30/20Design optimisation, verification or simulation
    • G06F30/27Design optimisation, verification or simulation using machine learning, e.g. artificial intelligence, neural networks, support vector machines [SVM] or training a model
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/045Combinations of networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • G06N3/084Backpropagation, e.g. using gradient descent

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Evolutionary Computation (AREA)
  • General Engineering & Computer Science (AREA)
  • Geometry (AREA)
  • Computer Hardware Design (AREA)
  • Artificial Intelligence (AREA)
  • Software Systems (AREA)
  • Computational Linguistics (AREA)
  • Molecular Biology (AREA)
  • Computing Systems (AREA)
  • General Health & Medical Sciences (AREA)
  • Data Mining & Analysis (AREA)
  • Mathematical Physics (AREA)
  • Biophysics (AREA)
  • Biomedical Technology (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Health & Medical Sciences (AREA)
  • Medical Informatics (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Architecture (AREA)
  • Civil Engineering (AREA)
  • Structural Engineering (AREA)
  • Computational Mathematics (AREA)
  • Mathematical Analysis (AREA)
  • Mathematical Optimization (AREA)
  • Pure & Applied Mathematics (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)
  • Feedback Control In General (AREA)

Abstract

The invention discloses a cantilever beam structure design method based on a self-attention mechanism neural network. The design method can solve the problem that the calculation iteration time is high in the process of generating the cantilever beam structure by using the traditional MMC algorithm, and comprises two parts of model acquisition and model use, wherein the main flow of the model acquisition is as follows: 1. generating a training set and a test set by using an MMC method in advance; 2. performing data cleaning on the generated data; 3. constructing a word-like vector model by using a multi-perceptron model; 4. final output generated using the improved Transformer model; 5. training by using the model; 6. the final result was obtained using the model. When the final model is used for carrying out structure optimization design, the model output is obtained by inputting the boundary condition vector into the model, and then the output is input into the MMC drawing function, so that the rapid calculation of the final optimization structure is realized.

Description

Cantilever beam structure design method based on self-attention mechanism neural network
Technical Field
The invention belongs to the field of artificial intelligence and structural design optimization, and particularly relates to a cantilever beam structure design method based on a self-attention mechanism neural network.
Background
In order to design an optimal cantilever beam structure under given load conditions, constraint conditions and performance indexes, researchers at home and abroad apply a topological optimization method to carry out optimization design. The basic idea of topology optimization is to convert the optimal topology problem of seeking a structure into the distribution problem of seeking an optimal material in a given design area, the current topology optimization method mainly comprises a SIMP algorithm, an ESO algorithm, a level set method, an MMC algorithm and the like, the calculated amount of the method depends on the scale of the design area, and the calculated amount is multiplied along with the continuous increase of the design area, so that the time for obtaining the optimal design result is long.
With the continuous development of deep learning, the effect of the deep learning in various fields is also greater and greater; deep learning is a new field in machine learning research, and the motivation is to establish and simulate a neural network for human brain to analyze and learn, which simulates the mechanism of human brain to interpret data. Based on a neural network model in deep learning, a constraint condition matrix can be defined, the constraint condition matrix is input into a neural network, and a well-converged neural network model is trained, so that the problems that the calculation amount is too large when a cantilever beam structure is generated, and the time for generating a result is long are solved.
Disclosure of Invention
The invention provides a cantilever beam structure design method based on a self-attention mechanism neural network, which can greatly reduce the calculation complexity when a cantilever beam structure is generated and reduce the calculation overhead.
The invention is realized by adopting the following technical scheme:
a cantilever beam structure design method based on a self-attention mechanism neural network comprises the following steps:
1) preparing cantilever beam structure data by using an MMC algorithm;
2) carrying out data cleaning on the generated cantilever beam structure data;
3) constructing a word-like vector model by using a multi-perceptron model;
4) final output generated using the improved Transformer model;
5) training a model by using a K-fold cross validation method;
6) and outputting a final result by using the final model.
The further improvement of the invention is that the specific implementation method of the step 1) is as follows:
101) generating input vectors and output vectors by using an MMC algorithm to construct a cantilever beam structure data set;
102) according to the following steps of 8:1: the proportion of 1 divides the generated cantilever beam structure data set into a training set, a test set and a verification set.
The further improvement of the invention is that the specific implementation method of the step 2) is as follows:
and (2) acquiring cantilever beam structure data of the data set in the step 1), screening the cantilever beam structure data, and selecting data with an unsatisfactory generation effect from the cantilever beam structure data set for deletion.
The further improvement of the invention is that the specific implementation method of the step 3) is as follows:
and (3) carrying out size change on the original data by using a multi-perceptron algorithm, converting the input one-dimensional vector of the boundary condition into a two-dimensional vector conforming to the data format of the MMC algorithm, and transmitting the two-dimensional vector into a next-layer model as the input of the next-layer model.
The further improvement of the invention is that the specific implementation method of the step 4) is as follows:
401) taking the two-dimensional vector generated in the step 3) as the input of a Transformer model, and performing vector combination by using a positionEncoding method;
402) a multi-layer network with a self-attention mechanism is used for feature extraction and combination to generate a two-dimensional vector which can be recognized by an MMC algorithm.
The further improvement of the invention is that the specific implementation method of the step 5) is as follows:
501) taking part 1 in the training data as a test set, and taking the rest as a training set;
502) training a model, and calculating the loss of the model on a test set;
503) using different parts as test sets each time, repeating the steps for a plurality of times until the neural network converges;
504) the average accuracy is taken as the final loss of the model.
The further improvement of the invention is that the specific implementation method of the step 6) is as follows:
601) training the improved Transformer model, improving the feature extraction capability of the model and the capability of generating the model, and when the loss of the test set is converged, the capability of the model reaches the limit;
602) using the model for verification, randomly selecting a part of data from the verification set as input, and inputting the data into the trained model to obtain output;
603) and inputting the output result into an MMC drawing function for processing to finally obtain the generated cantilever beam structure diagram.
The invention has at least the following beneficial technical effects:
according to the cantilever beam structure design method based on the self-attention mechanism neural network, the improved transform model is used, so that the model can be trained under the condition of a data set generated by an MMC algorithm, a two-dimensional vector capable of being identified by an MMC drawing function is obtained by inputting a boundary condition vector through the trained model, and a cantilever beam structure diagram is obtained through the MMC drawing function. According to the invention, the data set is generated by using the MMC method, so that the training of the neural network model can be carried out under the condition of separating from the MMC algorithm, and meanwhile, the output format of the trained neural network is consistent with that of the MMC algorithm, so that the model calculation complexity is reduced and the applicability of the model is improved.
Furthermore, the invention uses the positionEncoding method to carry out vector combination, and adds position information to the calculated vector, thereby ensuring that the model distributes different weights to the vectors at different positions in the prediction process, and improving the learning capability and the prediction accuracy of the model.
Drawings
FIG. 1 is a schematic flow chart of the present invention.
FIG. 2 is a schematic diagram of the construction of a multiple perceptron in an embodiment.
FIG. 3 is a schematic diagram of an improved Transformer model constructed in the example.
Detailed Description
The invention is explained in detail below with reference to the drawings and the embodiments;
as shown in fig. 1, the method for designing a cantilever beam structure based on a neural network of a self-attention mechanism provided by the invention comprises the following steps: the method comprises the following steps: preparing cantilever beam structure data by using an MMC algorithm; step two: carrying out data cleaning on the generated cantilever beam structure data; step three: constructing a word-like vector model by using a multi-perceptron model; step four: final output generated using the improved Transformer model; step five: training by using the model; step six: using the final model; the method has the advantages of accurately generating an optimized structure, greatly reducing the calculation complexity and reducing the calculation overhead.
The method for the structural optimization design of the acceleration of the deep neural network of the self-attention mechanism comprises the following steps:
firstly, cantilever beam structure data are prepared by using an MMC algorithm: in all topology optimization methods, a traditional MMC algorithm is selected to generate 1000 groups of data, each group of data comprises an input vector, an output vector and a result graph, and the input vector, the output vector and the result graph are respectively stored in a txt format, a txt format and a jpg format. The data set is generated as follows: under the design domain of 2 x 1, a 200 x 100 grid is used for finite element analysis, the value range of Poisson ratio is taken as [0.1-0.8], the position of a load point is [0-100] at the rightmost side of the grid, the volume fraction is 0.4, and the Young modulus is 1. Simultaneously dividing the 800 groups of data into a training set (640 groups), a testing set (80 groups) and a verifying set (80 groups) according to the proportion of 8:1:1 in the data set;
secondly, carrying out data cleaning on the generated cantilever beam structure data: and (3) data of the data set obtained in the step one is subjected to data screening, and the difference between the result possibly generated randomly in the step one and the data used in normal engineering is overlarge, so that the final result of the iteration of the MMC algorithm loses physical significance. And selecting data with unsatisfactory generation effect from the data set for deletion.
Thirdly, constructing a word-like vector model by using a multiple perceptron model:
as shown in FIG. 2, the second step is performed to obtain the data set that can be used as input, and we input the data with 64 sets as a batch. The input data size is [ batch, 7], and the data is mapped to a higher dimension [ batch,112] by a multiple perceptron. A residual module is added to each layer of the multiple perceptron at the same time, and the residual block is divided into two parts, namely a direct mapping part and a residual part. In the model, two layers of full-connection layer networks are used as residual mapping, so that the degree of freedom of the network model can be increased, a function can be better fitted in a high-dimensional space, and the problem of gradient explosion caused by a deep network can be relieved; and a batch standardization technology is used after the fully-connected output of each layer, so that the data distribution output by each layer is re-concentrated in the range with the maximum gradient, and the convergence speed of the model is accelerated. Finally, the data dimension [ batch,112] is readjusted to [ batch,16,7] to be input into the next model.
Fourth, final output generated using the improved Transformer model:
as shown in fig. 3, the data output in step three is input into a Transformer model for transformation to calculate the self-attention matrix. In the Transformer model, each set of vectors is input into the network at the same time, and position information needs to be added to distinguish different components. Before data is input into the network, sine and cosine position codes are added to the data, and position information is added to the input matrix. Data with position information is input into the self-attitude layer. In self-integration layer, each 16-7 dimensional input is used as input sequence x1,K,x16Respectively multiplied by a conversion matrix W, calculated by ai=WxiTo obtain a1,K,a16Then each aiMultiplying by conversion matrixes Wq, Wk and Wv to obtain qi,ki,vi. Then q and k are used for the calculation of the Attention to obtain
Figure BDA0003014485480000051
Where d is the dimension of q and k. Alpha to be obtainedi,jThe corresponding result is obtained through calculation of a softmax layer
Figure BDA0003014485480000052
Is calculated by the formula
Figure BDA0003014485480000061
Each will be
Figure BDA0003014485480000062
And each viMultiplication to obtain biThe calculation formula is
Figure BDA0003014485480000063
Finally, an output sequence b can be obtainedi
Fifthly, training by using the model:
as shown in fig. 3, after the networks of the two modules are connected to each other and the training word vector training model network and the improved Transformer network model are defined respectively, the two modules need to be connected to each other for training; inputting an input vector in the input data set into a word vector training model to obtain a two-dimensional vector, and inputting the two-dimensional vector into a next network model; in the secondary process, the vector generated by the positionEncoding layer needs to be combined, so that the vector has position information. And inputting the combined vector into an improved Transformer model for training to obtain an output value. We use the MAE method to calculate the loss value loss, which is the difference between the output from the model and the output in the dataset. The updating of the model parameters is performed by a back propagation algorithm.
Sixth, using the final model:
when the improved Transformer model is trained, the feature extraction capability and the model generation capability of the model are improved, and when the loss of the test set is converged, the capability of the model reaches the limit. At this time, the model is used for verification, a part of data is randomly selected from the test set to be used as input, and the input is input into the trained model to obtain an output result. And inputting the output result into an MMC drawing function for processing to finally obtain a generated result graph, thereby realizing the quick calculation of the final optimization result.

Claims (7)

1. A cantilever beam structure design method based on a self-attention mechanism neural network is characterized by comprising the following steps:
1) preparing cantilever beam structure data by using an MMC algorithm;
2) carrying out data cleaning on the generated cantilever beam structure data;
3) constructing a word-like vector model by using a multi-perceptron model;
4) final output generated using the improved Transformer model;
5) training a model by using a K-fold cross validation method;
6) and outputting a final result by using the final model.
2. The cantilever beam structure design method based on the self-attention mechanism neural network as claimed in claim 1, wherein the specific implementation method of step 1) is as follows:
101) generating input vectors and output vectors by using an MMC algorithm to construct a cantilever beam structure data set;
102) according to the following steps of 8:1: the proportion of 1 divides the generated cantilever beam structure data set into a training set, a test set and a verification set.
3. The cantilever beam structure design method based on the self-attention mechanism neural network as claimed in claim 2, wherein the specific implementation method of step 2) is as follows:
and (2) acquiring cantilever beam structure data of the data set in the step 1), screening the cantilever beam structure data, and selecting data with an unsatisfactory generation effect from the cantilever beam structure data set for deletion.
4. The cantilever beam structure design method based on the self-attention mechanism neural network as claimed in claim 3, wherein the specific implementation method of step 3) is as follows:
and (3) carrying out size change on the original data by using a multi-perceptron algorithm, converting the input one-dimensional vector of the boundary condition into a two-dimensional vector conforming to the data format of the MMC algorithm, and transmitting the two-dimensional vector into a next-layer model as the input of the next-layer model.
5. The cantilever beam structure design method based on the self-attention mechanism neural network as claimed in claim 4, wherein the specific implementation method of step 4) is as follows:
401) taking the two-dimensional vector generated in the step 3) as the input of a Transformer model, and performing vector combination by using a positionEncoding method;
402) a multi-layer network with a self-attention mechanism is used for feature extraction and combination to generate a two-dimensional vector which can be recognized by an MMC algorithm.
6. The cantilever beam structure design method based on the self-attention mechanism neural network as claimed in claim 5, wherein the specific implementation method of step 5) is as follows:
501) taking part 1 in the training data as a test set, and taking the rest as a training set;
502) training a model, and calculating the loss of the model on a test set;
503) using different parts as test sets each time, repeating the steps for a plurality of times until the neural network converges;
504) the average accuracy is taken as the final loss of the model.
7. The cantilever beam structure design method based on the self-attention mechanism neural network as claimed in claim 6, wherein the specific implementation method of step 6) is as follows:
601) training the improved Transformer model, improving the feature extraction capability of the model and the capability of generating the model, and when the loss of the test set is converged, the capability of the model reaches the limit;
602) using the model for verification, randomly selecting a part of data from the verification set as input, and inputting the data into the trained model to obtain output;
603) and inputting the output result into an MMC drawing function for processing to finally obtain the generated cantilever beam structure diagram.
CN202110385261.XA 2021-04-09 2021-04-09 Cantilever beam structure design method based on self-attention mechanism neural network Active CN113076583B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110385261.XA CN113076583B (en) 2021-04-09 2021-04-09 Cantilever beam structure design method based on self-attention mechanism neural network

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110385261.XA CN113076583B (en) 2021-04-09 2021-04-09 Cantilever beam structure design method based on self-attention mechanism neural network

Publications (2)

Publication Number Publication Date
CN113076583A true CN113076583A (en) 2021-07-06
CN113076583B CN113076583B (en) 2024-04-02

Family

ID=76617561

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110385261.XA Active CN113076583B (en) 2021-04-09 2021-04-09 Cantilever beam structure design method based on self-attention mechanism neural network

Country Status (1)

Country Link
CN (1) CN113076583B (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050051515A1 (en) * 2003-09-08 2005-03-10 Lg Electronics Inc. Cantilever microstructure and fabrication method thereof
CN109783910A (en) * 2018-12-29 2019-05-21 西安交通大学 It is a kind of to utilize the optimum structure design method for generating confrontation network acceleration
CN110069800A (en) * 2018-11-17 2019-07-30 华中科技大学 Three-dimensional structure method of topological optimization design and equipment with smooth boundary expression

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050051515A1 (en) * 2003-09-08 2005-03-10 Lg Electronics Inc. Cantilever microstructure and fabrication method thereof
CN110069800A (en) * 2018-11-17 2019-07-30 华中科技大学 Three-dimensional structure method of topological optimization design and equipment with smooth boundary expression
CN109783910A (en) * 2018-12-29 2019-05-21 西安交通大学 It is a kind of to utilize the optimum structure design method for generating confrontation network acceleration

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
张淼;孟庆丰;王宏金;: "考虑疲劳寿命的压电悬臂梁结构优化设计方法", 压电与声光, no. 01 *

Also Published As

Publication number Publication date
CN113076583B (en) 2024-04-02

Similar Documents

Publication Publication Date Title
CN109871995B (en) Quantum optimization parameter adjusting method for distributed deep learning under Spark framework
Liu et al. A fault diagnosis intelligent algorithm based on improved BP neural network
CN114781435B (en) Power electronic circuit fault diagnosis method based on improved Harris eagle optimization algorithm optimization variation modal decomposition
CN104200096A (en) Lightning arrester grading ring optimization method based on differential evolutionary algorithm and BP neural network
CN112560603B (en) Underwater sound data set expansion method based on wavelet image
CN112414715B (en) Bearing fault diagnosis method based on mixed feature and improved gray level symbiosis algorithm
CN107566383A (en) A kind of Higher Dimensional Space Time field data live transmission method under limited network bandwidth constraint
Chen et al. An efficient proximal-gradient method for single and multi-task regression with structured sparsity
CN111898316A (en) Construction method and application of super-surface structure design model
CN110619364B (en) Wavelet neural network three-dimensional model classification method based on cloud model
CN114282646B (en) Optical power prediction method and system based on two-stage feature extraction and BiLSTM improvement
CN115470889A (en) Network-on-chip autonomous optimal mapping exploration system and method based on reinforcement learning
CN116451584A (en) Thermal stress prediction method and system based on neural network
Dehuri et al. Genetic feature selection for optimal functional link artificial neural network in classification
Zhang et al. A method based on Lorenz disturbance and variational mode decomposition for wind speed prediction
CN116151135B (en) Electromagnetic simulation method and system for electric large-size target
CN113076583A (en) Cantilever beam structure design method based on self-attention mechanism neural network
CN111598236A (en) Width learning system network model compression method
CN109459609B (en) Distributed power supply frequency detection method based on artificial neural network
Lim et al. Evolutionary optimization with dynamic fidelity computational models
CN115169235A (en) Super surface unit structure inverse design method based on improved generation of countermeasure network
CN111639463B (en) XGboost algorithm-based frequency characteristic prediction method for power system after disturbance
CN113066172A (en) Three-dimensional model classification method based on cloud model and neural network
CN113987924A (en) Complex electromagnetic signal simulation generation method based on target feature self-learning
CN111797564A (en) Method and system for obtaining correlation sample of high-dimensional distributed photovoltaic output

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant