Composite material microstructure reverse design method and system based on generative model
Through the reverse design method of generative models, the problems of long design cycles and uncontrollable effects in traditional methods are solved, and fast and low-cost realistic microstructure generation is achieved to meet the needs of rapid updates and iterations in the fields of aerospace and other fields.
Patent Information
- Application Number
- CN202510567200.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-30
- Publication Date
- 2025-08-15
AI Technical Summary
The design method of the traditional continuous fiber composite material relies on forward correlation modeling, resulting in long design cycles, uncontrollable effects and high costs, which cannot meet the needs of rapid updates and iterations in the fields of aerospace and other fields.
Using the reverse design method based on the generative model, the unconditional generative model is conditionally embedded and enhanced by constructing a sample data set of microstructure image-attribute parameters. The U-Transformer network architecture and fiber segmentation enhancement CNN model are used to achieve rapid generation from target attributes to realistic microstructures.
It significantly reduces the design cycle and cost, and the generated microstructure is more realistic and reliable, improving design efficiency and effect, providing an end-to-end reverse design solution.
Smart Images

Figure CN120496704A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field related to composite material additive manufacturing, and more specifically, relates to a method and system for reverse design of composite material microstructures based on a generative model. Background Art
[0002] Continuous fiber composite 3D printing technology, with its ability to form components with high specific strength and stiffness, and its strong designability, has become a key technology for reducing weight, increasing efficiency, and driving performance improvements. It is widely used in high-end manufacturing fields such as aerospace. Numerous experimental results have demonstrated that continuous fiber composite tows with high fiber volume fractions and low porosity can significantly improve the mechanical properties of printed components. Therefore, optimizing the microstructure of continuous fiber composites is crucial in the field of continuous fiber composite 3D printing technology.
[0003] Traditional continuous fiber composite microstructure design methods typically establish a forward mapping relationship from microstructure to macroscopic performance based on extensive empirical experiments or finite element simulation analysis. However, this method requires continuous trial-and-error experiments, making it difficult to quickly and accurately design a microstructure that meets specified performance requirements. Consequently, traditional forward modeling design methods suffer from high data acquisition costs, limited design freedom, and long design cycles, making them unable to meet the application needs of fields such as aerospace for rapid updates and iterations of continuous fiber composite components.
[0004] With the development of artificial intelligence technology, relevant researchers have used deep learning models such as convolutional neural networks to establish performance prediction models for continuous fiber composites, and have used intelligent algorithms such as fiber random generation algorithms to achieve the generation of their microstructures, which to a certain extent has solved the high cost and long cycle of traditional experimental simulation-forward modeling microstructure design methods. However, among the above methods, the former still focuses on forward correlation modeling from microstructure to macro performance, and fails to effectively solve the core challenge of reverse design from performance requirements to microstructure; the latter generates relatively regular fiber shapes and the distribution still has a certain regularity, which cannot simulate the actual fiber distribution state and cannot provide an effective reference for the microstructure design of continuous fiber composites. Therefore, there is an urgent need for a reverse design method that can realize the generation of realistic microstructures from target property input to continuous fiber composites under low-cost and short-cycle conditions. Summary of the Invention
[0005] In response to the above-mentioned defects or improvement needs of the prior art, the present invention provides a method and system for reverse design of composite material microstructures based on a generative model, which is used to solve the problems that traditional continuous fiber composite material microstructure design methods are highly dependent on forward correlation modeling from microstructure to macroscopic performance, resulting in long design cycles, uncontrollable effects and high costs.
[0006] To achieve the above objectives, according to one aspect of the present invention, a method for inverse design of composite material microstructure based on a generative model is provided, comprising:
[0007] Construct a sample data set corresponding to the microstructure image and property parameters of the composite material;
[0008] The unconditional generative model is enhanced with conditional embedding to construct a generative model with conditional embedding. The generative model with conditional embedding is trained using a sample dataset corresponding to microstructure images and attribute parameters, where the attribute parameters are the embedding conditions when generating the microstructure images. The trained model is then used as the reverse design model.
[0009] The reverse design model is used to generate a designed microstructure image according to expected property parameters.
[0010] According to the generative model-based composite material microstructure inverse design method provided by the present invention, a sample data set corresponding to the composite material microstructure image and property parameters is constructed, specifically including:
[0011] Construct a sample dataset of microstructure images of composite materials;
[0012] Selecting some image samples from the microstructure image sample data set to perform simulation analysis using the finite element method to obtain corresponding finite element analysis results; constructing a sample data set corresponding to the microstructure image-finite element analysis results based on the partial image samples and the corresponding finite element analysis results;
[0013] The performance prediction model is trained using a sample data set corresponding to the microstructure image-finite element analysis results, and the trained performance prediction model is used to perform performance prediction on the remaining image samples in the microstructure image sample data set to obtain predicted finite element analysis results for the remaining image samples;
[0014] According to the finite element analysis results of all image samples in the microstructure image sample data set, the attribute parameters corresponding to all image samples are obtained, and a sample data set corresponding to the microstructure image and attribute parameters is constructed.
[0015] According to the generative model-based composite material microstructure reverse design method provided by the present invention, a composite material microstructure image sample dataset is constructed, specifically comprising:
[0016] Acquiring actual microstructure images of the composite material by micro-computed tomography technology and performing post-processing operations on the actual microstructure images to construct an original microstructure image set;
[0017] The unconditional generative model is trained using the original microstructure image set, and the trained unconditional generative model is obtained as the image generative model;
[0018] Expanding the original microstructure image set through the image generation model to form a microstructure image sample data set;
[0019] The post-processing operation includes rotating and expanding samples of the actual microstructure image and performing at least one of binarization, Gaussian filtering, contrast adjustment, feature extraction, and morphological operations on the actual microstructure image.
[0020] According to the generative model-based composite material microstructure reverse design method provided by the present invention, the composite material is a continuous fiber composite material; the performance prediction model adopts a CNN network architecture, and a fiber segmentation enhancement convolution layer is embedded in the convolution layer of the performance prediction model. The fiber segmentation enhancement convolution layer includes a dynamic edge detection module and a fiber resin segmentation module. The dynamic edge detection module is used to extract fiber edge features through fiber edge detection, and the fiber resin segmentation module is used to perform fiber resin segmentation and fiber feature enhancement according to the fiber edge features.
[0021] According to the composite material microstructure reverse design method based on the generative model provided by the present invention, the convolution kernel K of the dynamic edge detection module edge The design is as follows:
[0022] K edge =Softmax(W e )∈R 3×3 ;
[0023] Among them, W e ∈R 3×3 is a variable learning parameter, R 3×3 is the set of all 3×3 matrices of real numbers;
[0024] Input the feature map F to the dynamic edge detection module in ∈R H×W×C , extract the fiber edge features and obtain the dynamic edge response map E; and fuse the dynamic edge response with the original features to enhance the fiber boundary as follows:
[0025] F edge =F in ⊙σ(E);
[0026] Among them, F edge represents the characteristic result after enhancing the fiber boundary, ⊙ represents channel-by-channel multiplication, and σ() is the Sigmoid function, which compresses the edge response to the interval [0, 1];
[0027] The fiber-resin segmentation module implements the segmentation of fiber and resin based on the fiber edge feature extraction as follows:
[0028] M=Softmax(W s *F edge );
[0029] Among them, W s ∈R 1×1×C×2 is the segmentation convolution kernel parameter, which means that the segmentation mask M∈R is generated by 1×1 convolution H×W×2 , channel 0 represents resin, channel 1 represents fiber;
[0030] Then, the fiber feature enhancement dynamic modulation and feature fusion are performed on the feature channel according to the fiber resin segmentation mask as follows:
[0031] F fiber =F edge ⊙M (1) ;
[0032] F resin =F edge ⊙M (0) ;
[0033] F out =Conv 1×1 ([F fiber ; F resin ]);
[0034] Among them, F fiber It represents the characteristic result after the fiber area is enhanced, F resin It represents the characteristic result after suppressing the resin area, F out Indicates the final feature result after the fusion of the two, Conv 1×1 () function is a one-dimensional convolution operation function, [F fiber ; F resin ] indicates channel splicing.
[0035] According to the inverse design method of composite material microstructure based on the generative model provided by the present invention, a fiber segmentation enhancement convolution layer is also embedded in the convolution layer of the U-Net network of the conditionally embedded generative model; and / or, a fiber segmentation enhancement convolution layer is also embedded in the convolution layer of the U-Net network of the unconditional generative model.
[0036] According to the generative model-based inverse design method for composite material microstructures provided by the present invention, the conditionally embedded generative model is a U-Transformer network architecture, specifically: the self-attention mechanism and cross-attention mechanism in the Transformer model are introduced into the U-Net network of DDPM, wherein the self-attention mechanism is used to positionally embed the input features in the convolution downsampling stage to convert the input attribute parameter information into information that can be received by the subsequent noise diffusion process, thereby embedding the conditional information in the time step; the cross-attention mechanism acts on the skip connection layer to filter irrelevant noise information to enhance the features of the fiber area.
[0037] According to the composite material microstructure inverse design method based on the generative model provided by the present invention, the Markov chain of the forward noise addition process after conditional embedding in the U-Transformer network architecture is as follows:
[0038]
[0039] After conditional embedding, the step-by-step noise addition process is as follows:
[0040]
[0041] β t (E,V f )=β t +γ·f φ (E,V f );
[0042] Among them, q() is the probability distribution symbol in the forward noise addition process; x 1:T Represents the process from adding noise data x1 in step 1 to the final noise data x T sequence; x t represents the data of step t in the diffusion process; I represents the unit matrix; β t (E,V f ) is the consideration of two conditions: elastic modulus E, fiber volume fraction V f The diffusion rate hyperparameter after embedding; γ is a hyperparameter used to balance the contribution of the condition to the noise modulation; f φ (E,V f ) is the joint function of conditional embedding, and its parameters are
[0043] In view of the complex characteristics of continuous fiber composite materials, a cosine scheduling strategy is adopted as shown below:
[0044]
[0045] in, is the cumulative noise scheduling parameter, setting s = 0.008, then the initial β1 ≈ 0.0001;
[0046] After conditional embedding, the Markov chain of the inverse denoising process is as follows:
[0047]
[0048] After conditional embedding, the step-by-step denoising process is as follows:
[0049] p θ (x t-1 |x t ,E,V f )=N(x t-1 ;μ θ (x t ,t,E,V f ),∑ θ (x t ,t,E,V f ));
[0050] Among them, p θ () is used as the probability distribution symbol in the inverse denoising process; elastic modulus E and fiber volume fraction V f Embedded into mean μ through U-Transformer network θ (x t ,t) and variance ∑ θ (x t ,t).
[0051] According to the composite material microstructure inverse design method based on the generative model provided by the present invention, the U-Transformer network architecture considers the influence of conditional information on the loss function, and the elastic modulus E and fiber volume fraction V f The loss under the constraints is as follows:
[0052]
[0053] Where N represents the total number of pixels in the input image data, i and j represent the coordinate values of the pixels; x0 is the original input data; σ() is the Sigmoid function, which maps pixel values to fiber probabilities;
[0054] The hybrid loss function of the U-Transformer network architecture is as follows:
[0055]
[0056] Among them, λ is the weight of the constraint loss to coordinate the contradiction between the quality of the generated image and the accuracy of the condition satisfaction; L simpleis the loss function of the original DDPM.
[0057] According to another aspect of the present invention, a generative model-based composite material microstructure reverse design system is provided, comprising an X-ray emission source, a rotary table, a workpiece fixture, a slide platform, a flat-panel detector, and a host computer; the rotary table is fixed to a surface of the slide platform, the workpiece fixture is mounted on the rotary table, the X-ray emission source is located in front of the rotary table, the flat-panel detector is movably mounted on a surface of the slide platform and located behind the rotary table, and the host computer is connected to the X-ray emission source and the flat-panel detector, respectively;
[0058] The flat-panel detector is used to receive the collected composite material microstructure image and transmit it to the host computer for storage; the host computer includes a memory and a processor, the memory stores a computer program, and when the processor executes the computer program, it executes any of the above-mentioned generative model-based composite material microstructure reverse design methods.
[0059] In general, compared with the prior art, the above technical solutions conceived by the present invention provide a method and system for reverse design of composite material microstructures based on generative models:
[0060] 1. This invention boldly overturns the traditional approach of forward design from microstructure to macroscopic performance, proposing the concept of reverse material design. Leveraging the powerful image generation and conditional embedding capabilities of generative models, this method enables a reverse design process that rapidly and accurately generates realistic microstructures based on desired properties. This provides an end-to-end solution for microstructure design, significantly reducing the uncertainty of traditional continuous fiber composite microstructure design and resolving the challenges of long design cycles and uncontrollable results. Furthermore, compared to traditional methods, the resulting microstructures are more realistic and reliable, effectively improving the efficiency and effectiveness of traditional material design methods.
[0061] 2. The synergistic mechanism between the image generation model and the performance prediction model proposed in this invention can construct a high-quality microstructure image-attribute parameter dataset at low image acquisition and simulation computation costs. First, the image generation model can randomly generate a large number of microstructure images based on a small number of original image datasets. Second, a portion of the generated images is selected for RVE modeling analysis to obtain finite element analysis results, which are used to train the performance prediction model. Finally, the performance prediction model predicts the finite element analysis results of the remaining generated images, thereby constructing a complete microstructure image-attribute parameter dataset, enabling low-cost, high-quality reverse design model training.
[0062] 3. This paper proposes a fiber segmentation-enhanced CNN model and a DDPM model based on the U-Transformer architecture to address the characteristics of continuous fiber composites. This method enhances the traditional CNN model by incorporating a fiber segmentation enhancement module, enabling it to accurately extract the characteristic information of irregularly shaped fibers. Furthermore, it enhances the traditional denoising diffusion probability model (DDPM) by employing a cosine noise scheduling strategy tailored to the complex microstructural features of continuous fiber composites. Furthermore, during the denoising image generation process, a self-attention mechanism, a cross-attention mechanism, and a deformable convolution kernel are embedded in the U-Net network used, enabling high-quality generation of microstructural features closely related to the performance of continuous fiber composites, such as irregularly shaped fibers, resin-rich regions, and pores.
[0063] 4. The present invention embeds the aforementioned composite material microstructure reverse design method based on a generative model into a continuous fiber composite material microstructure image acquisition platform based on micro-computed tomography (Micro-CT), forming an online design system platform that integrates original image acquisition and processing with microstructure reverse generation. BRIEF DESCRIPTION OF THE DRAWINGS
[0064] Figure 1 Schematic diagram of the composition of a composite material microstructure image acquisition platform based on micro-computed tomography (Micro-CT) provided by the present invention;
[0065] Figure 2 It is a schematic flow chart of a method for reverse design of composite material microstructure based on a generative model provided by the present invention;
[0066] Figure 3 1 is a schematic diagram of the steps of using Python to post-process the original image collected by micro-computed tomography (Micro-CT) in a specific embodiment provided by the present invention;
[0067] Figure 4 This is a diagram of the principle of image generation based on a Markov chain-based denoising diffusion probability model (DDPM) in a specific embodiment provided by the present invention;
[0068] Figure 5 This is an image generation effect diagram of the continuous fiber composite material microstructure of the image generation model established in the specific embodiment provided by the present invention;
[0069] Figure 6 Schematic diagram of the network architecture of the fiber segmentation enhancement CNN model for the structural characteristics of continuous fiber composite materials described in the specific embodiments provided by the present invention;
[0070] Figure 7Schematic diagram of the conditional embedding principle of the U-Transformer architecture DDPM model for the structural characteristics of continuous fiber composite materials described in the specific embodiment provided by the present invention;
[0071] Throughout the drawings, the same reference numerals are used to denote the same elements or structures, wherein:
[0072] 1-X-ray emission source; 2-rotating table; 3-workpiece fixture; 4-slide platform; 5-flat panel detector; 6-host computer. DETAILED DESCRIPTION
[0073] In order to make the objectives, technical solutions and advantages of the present invention more clearly understood, the present invention is further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely for the purpose of explaining the present invention and are not intended to limit the present invention. In addition, the technical features involved in the various embodiments of the present invention described below may be combined with each other as long as they do not conflict with each other.
[0074] A specific embodiment of the present invention provides a composite material microstructure reverse design method and system based on a generative model, comprising a composite material microstructure image acquisition platform based on micro-computed tomography (Micro-CT) technology and a composite material microstructure reverse design method based on a generative model.
[0075] like Figure 1 As shown, this embodiment provides a composite material microstructure image acquisition platform based on micro-computed tomography (Micro-CT), including an X-ray emission source 1, a rotating table 2, a workpiece fixture 3, a slide platform 4, a flat-panel detector 5 and a host computer 6; the rotating table 2 is fixed on the surface of the slide platform 4, the workpiece fixture 3 is installed in the center of the rotating table 2, the X-ray emission source 1 is located in front of the rotating table 2, the flat-panel detector 5 is movably installed on the surface of the slide platform 4 and is located behind the rotating table 2, and the host computer 6 is connected to the X-ray emission source 1 and the flat-panel detector 5 respectively; the rotating table 2 is only fixed on the slide platform 4 and does not move along the slide rail, and the slide platform 4 can drive the flat-panel detector 5 to move to adjust the distance.
[0076] The flat panel detector 5 is used to receive the collected composite material microstructure image and transmit it to the host computer 6 for storage; the host computer 6 includes a memory and a processor, the memory stores a computer program, and when the processor executes the computer program, it executes the composite material microstructure reverse design method based on the generative model described in this embodiment.
[0077] Furthermore, this embodiment provides a method for reverse design of composite material microstructure based on a generative model, the design method comprising:
[0078] Construct a sample data set corresponding to the microstructure image and property parameters of the composite material;
[0079] The unconditional generative model is enhanced with conditional embedding to construct a generative model with conditional embedding. The generative model with conditional embedding is trained using a sample dataset corresponding to microstructure images and attribute parameters, where the attribute parameters are the embedding conditions when generating the microstructure images. The trained model is then used as the reverse design model.
[0080] The reverse design model is used to generate a designed microstructure image according to expected property parameters.
[0081] In some embodiments, the composite material is a continuous fiber composite material, such as Figure 2 As shown, this embodiment provides a method for reverse design of a continuous fiber composite microstructure based on a generative model, comprising the following steps:
[0082] (1) Constructing a first sample set: obtaining actual microstructure images of the continuous fiber composite material by micro-computed tomography (Micro-CT) and performing post-processing operations on the actual microstructure images by Python, etc., thereby constructing an original microstructure image set, which is the first sample set;
[0083] The original images collected by CT here are of the same material, that is, the target material to be reverse-engineered, which is targeted; however, the images collected of the same material have many different microstructures, such as fiber volume fraction, elastic modulus, porosity and other properties, so the data set is rich in samples.
[0084] (2) establishing an image generation model: using the first sample set constructed in step (1) to train an unconditional generation model, such as a denoised diffusion probability model (DDPM), to obtain the image generation model that can generate a realistic continuous fiber composite material microstructure;
[0085] (3) Constructing a second sample set: First, a large number of microstructure images are randomly generated by the image generation model established in step (2), and the original microstructure image set is expanded to form a microstructure image sample data set of the composite material; secondly, a portion of the images in the microstructure image sample data set, such as 1 / 4, is selected and simulated and analyzed using the finite element method in the Abaqus software to obtain corresponding finite element analysis results, such as a stress field distribution cloud map; finally, based on the partial image samples and the corresponding finite element analysis results, a sample data set corresponding to the microstructure image-finite element analysis results, such as a microstructure-stress field distribution image data set, is constructed, which is the second sample set;
[0086] (4) Establishing a performance prediction model: using a sample data set corresponding to the microstructure image-finite element analysis result to train the performance prediction model, specifically, using the second sample set constructed in step (3) to train the fiber segmentation enhancement CNN model proposed in the present invention, to obtain the performance prediction model that can predict the stress field distribution cloud map of the remaining generated images;
[0087] The performance prediction model, i.e., the improved CNN model, outputs finite element analysis result images rather than numerical values. This is because the information expressed by the output finite element analysis result images is more comprehensive. The most important thing is that the finite element analysis images are output first, and then the numerical information (elastic modulus) is extracted from them, so that the results are more reliable.
[0088] (5) Constructing a third sample set, i.e., constructing a sample data set corresponding to the microstructure image and property parameters of the composite material, specifically comprising: first, using the trained performance prediction model to perform performance prediction on the remaining image samples in the microstructure image sample data set, and obtaining the predicted finite element analysis results of the remaining image samples, i.e., inputting the remaining 3 / 4 generated images in step (3) into the performance prediction model established in step (4) so that it predicts the corresponding stress field distribution cloud maps one by one;
[0089] Secondly, according to the finite element analysis results of all image samples in the microstructure image sample data set, the attribute parameters corresponding to all image samples are obtained, and a sample data set corresponding to the microstructure image-attribute parameters is constructed, that is, the parameter information of all microstructure images and their stress field distribution cloud maps including step (3) is extracted and corresponds to the generated microstructure image; finally, a microstructure-attribute parameter data set is constructed, which is the third sample set;
[0090] The samples in the first sample set are the actual collected microstructure images of continuous fiber composite materials; the samples in the second sample set are some microstructure images randomly generated by the above image generation model and the corresponding finite element analysis results; the samples in the third sample set are all the microstructure images generated above and the corresponding property parameters;
[0091] (6) Establishing a reverse design model: First, the present invention proposes a DDPM model with a U-Transformer architecture based on a denoising diffusion probability model (DDPM); secondly, retraining the model using the third sample set constructed in step (5); finally, obtaining the reverse design model that can generate corresponding microstructure images according to desired properties;
[0092] The final reverse design model can achieve the following effects: it can realize the generation of continuous fiber composite material microstructure images under conditional control, that is, by inputting the desired property parameters into the reverse design model, a continuous fiber composite material microstructure with corresponding performance can be generated, thereby achieving an end-to-end reverse material design effect from the target property parameters to the corresponding microstructure.
[0093] The post-processing operations include rotating and expanding the sample of the actual microstructure image and performing at least one of binarization, Gaussian filtering, contrast adjustment, feature extraction, and morphological operations on the actual microstructure image. The post-processing operations are used to enhance and expand the collected original image, and include but are not limited to performing binarization, Gaussian filtering, contrast adjustment, feature extraction, and morphological operations using image processing tools such as Avizo, ImageJ, and Python.
[0094] The unconditional generative model is used to randomly generate a large number of microstructure images to expand the data set, including but not limited to generative deep learning models such as variational autoencoders (VAE), generative adversarial networks (GAN), denoising diffusion probability models (DDPM), and denoising diffusion implicit models (DDIM). Finite element methods include but are not limited to RVE modeling and analysis in finite element analysis software such as ADINA, ABAQUS, ANSYS, and MSC. Finite element analysis results include but are not limited to distribution images of physical fields such as stress fields, temperature fields, and electromagnetic fields. Attribute parameters include but are not limited to parameters such as fiber volume fraction, elastic modulus, and porosity. The expected attribute parameters include at least one of fiber volume fraction, elastic modulus, and porosity. The expected attribute parameters should be at least one of the attribute parameters in the sample data set corresponding to the microstructure image-attribute parameter. The performance prediction model is used to predict the finite element analysis results of the remaining generated images, including but not limited to deep learning models such as Transformer, CNN, and U-Net.
[0095] Furthermore, in this specific embodiment, the continuous fiber composite material is a continuous carbon fiber / PEEK composite material. First, a microstructure image of the cross section of the continuous carbon fiber / PEEK composite material tow is obtained by micro-computed tomography (Micro-CT), and then the collected images are batch processed using Python, first cropped to 128×128 pixel images and then subjected to post-processing operations such as Gaussian filtering, binarization, and morphological operations. The specific steps are as follows: Figure 3 As shown, each image is finally rotated 90°, 180°, and 270° clockwise, and the three-rotated images and the original image are used as samples to construct the first sample set.
[0096] Furthermore, the denoising diffusion probability model (DDPM) is one of the deep learning models that can be implemented for image generation. First, Gaussian noise is gradually added to the original image through a forward Markov chain to make it pure Gaussian noise (standard normal distribution), and then the noise is gradually removed through an inverse Markov chain. In the process of restoring the original image, the data distribution law is learned; the forward denoising and inverse denoising processes are used for DDPM training. After the training is completed, DDPM can perform inverse denoising from pure Gaussian distribution noise when generating images. The above steps are as follows: Figure 4 This embodiment implements the establishment of an image generation model based on the denoising diffusion probability model (DDPM), and its specific principles are as follows:
[0097] First, after inputting the original image, it is converted into the original data distribution q(x0), and then the forward noise addition process is defined as the Markov chain shown below:
[0098]
[0099] Among them, x represents the input data (the input image is converted into a numerical form after being read by the deep learning model), the logo in the lower right corner represents the input data at different times or steps; q() is the probability distribution symbol in the forward noise addition process; q(x 1:T |x0) is the expression of conditional probability, which means that under the condition x0, x 1:T The probability of occurrence. 1:T Represents the process from adding noise data x1 in step 1 to the final noise data x T sequence; x t Represents the data of step t, i.e. time t, in the diffusion process;
[0100] Then gradually add Gaussian noise as follows:
[0101]
[0102] Among them, N is the symbol of normal distribution, t is time, β t∈(0,1) is the diffusion rate hyperparameter, which usually increases with t; I is the identity matrix.
[0103] By recursively expanding and applying parameterization techniques, the noise data x at any time t can be directly sampled from x0 t , as shown below:
[0104]
[0105] Among them, α t =1-β t , ∈~N(0,I). This shows that x t is a linear combination of x0 and Gaussian noise ∈.
[0106] Second, the inverse denoising process is defined as a Markov chain as shown below:
[0107]
[0108] Same as above, using p θ () is used as the probability distribution symbol in the inverse denoising process; x 0:T It means starting from the initial real data x0, after T steps of noise addition to the completely noisy data x T The complete sequence of all possible noise trajectories, covering all time steps including t = 0; x 1:T Indicates the process from the noise state x1 in step 1 to the final noise x T The sequence does not contain the initial data x0;
[0109] The step-by-step denoising process is as follows:
[0110] p θ (x t-1 |x t )=N(x t-1 ;μ θ (x t ,t),∑ θ (x t ,t));
[0111] Among them, the mean μ θ (x t ,t) and variance ∑ θ (x t ,t) requires DDPM to learn during the training process through the U-Net neural network in the model architecture.
[0112] Finally, the key lies in how to determine the loss function for training. As a probabilistic model, DDPM aims to learn the distribution parameter θ through the method of maximum likelihood estimation. More specifically, its goal is to determine a value of the distribution parameter θ so that the log-likelihood function log p of the generated data is θ (x0) is maximized. But directly calculating log p θ (x0) is not feasible because the process involves latent variables x 1:T The integral of is as follows:
[0113] logp θ (x0)=log∫p θ (x 0:T )dx 1:T ;
[0114] Therefore, by introducing the variational inference method, the above log-likelihood function log p is obtained θ The variational lower bound (VLB) of (x0) is as follows:
[0115]
[0116] E q The symbol represents the expectation of the content in () under the probability distribution q of the forward noise process.
[0117] Next, the optimization objective is transformed, that is, the negative value of the variational lower bound VLB is used as the loss function L VLB , which is minimized to fit into the gradient descent framework as follows:
[0118]
[0119] The loss function L VLB The derivation is decomposed as follows:
[0120]
[0121] Among them, D KL Indicates divergence calculation; L T Regardless of the distribution parameter θ, its gradient calculation result must be 0, so it is not used as a training target; therefore, to make the loss function L VLB Minimum, just make L t =L t-1 +L0 is the smallest, and the combined result of the two is as follows:
[0122] L t =E q [D KL (q(x t-1 |xt ,x0)||p θ (x t-1 |x t ))];
[0123] After using the parameterization technique to derive the above L t The posterior distribution in is as follows:
[0124]
[0125] in,
[0126] If the data itself is directly predicted in the inverse denoising process, the modeling calculation will be very complicated. Therefore, the U-Net neural network in the DDPM model architecture is used to predict the noise ∈ θ , and thus indirectly obtain the data itself, as shown below:
[0127]
[0128] The optimized loss function is as follows:
[0129]
[0130] The loss function can be further simplified as follows:
[0131]
[0132] Loss function L simple Contains x t and t are two variables, E represents the expectation of the latter part; in summary, the training steps in the inverse denoising process are as follows: sample a noise ∈~N(0,I) from the standard Gaussian distribution; minimize the loss function L by gradient descent simple ; Train until convergence.
[0133] The unconditional DDPM is trained using the first sample set, and the size of the generated image is also set to 128×128 pixels. The DDPM after training is the image generation model. The denoising process and generation effect of the image generation are shown in FIG. Figure 5 shown.
[0134] Furthermore, 1 / 4 of the binary images generated above were randomly selected, and 3D reconstruction was performed in Avizo, a 3D visualization analysis software, according to its fiber distribution, and then exported to Abaqus for finite element analysis. The specific steps are as follows: the elastic modulus of the carbon fiber is specified to be 200 GPa, the transverse Poisson's ratio is 0.4 (the transverse Poisson's ratio is used because it is necessary to describe the transverse force behavior perpendicular to the fiber direction), and the density is 1.75 g / cm 3The elastic modulus of PEEK resin is 3.6GPa, the isotropic Poisson's ratio is 0.38, and the density is 1.32g / cm 3 Apply a transverse strain (along the positive X-axis and perpendicular to the fiber) of 0.1%; appropriately divide the mesh into 16,384 unit nodes (because the generated image has 128×128 pixels); set periodic boundary conditions to ensure the continuity of the RVE model; perform a finite element solution; and obtain a stress distribution cloud map. A quarter of the generated binary image and its corresponding stress distribution cloud map are combined to form the second sample set.
[0135] Furthermore, the performance prediction model adopts a CNN network architecture, and a fiber segmentation enhancement convolution layer is embedded in the convolution layer of the performance prediction model. The fiber segmentation enhancement convolution layer includes a dynamic edge detection module and a fiber resin segmentation module. The dynamic edge detection module is used to extract fiber edge features through fiber edge detection, and the fiber resin segmentation module is used to perform fiber resin segmentation and fiber feature enhancement according to the fiber edge features.
[0136] The CNN network architecture extracts features through multi-layer convolution and is very competitive in image processing and performance prediction. However, the application scenario of this embodiment is a composite material composed of continuous carbon fiber and PEEK resin. The fiber shape is irregular and the fiber volume fraction of each image is different. The convolution layer of the traditional CNN model is difficult to achieve accurate feature extraction. Based on the above problems, the present invention proposes a fiber segmentation enhancement CNN model for continuous fiber composite materials. A fiber segmentation enhancement module is embedded in its convolution layer, which includes two functions: dynamic edge detection and fiber resin segmentation. Figure 6 The specific process is as follows:
[0137] The first step is to design the dynamic edge detection module as follows:
[0138] Embedded is a deformable parameterized edge convolution kernel for irregularly shaped fibers, namely the convolution kernel K of the dynamic edge detection module. edge as follows:
[0139] K edge =Softmax(W e )∈R 3×3 ;
[0140] Among them, W e ∈R 3×3 is a variable learning parameter, R 3×3 is a set of 3×3 matrices consisting of all real numbers (R represents the set of real numbers, and a 3×3 matrix is a matrix with three rows and three columns). Softmax() normalizes along the kernel elements to ensure that the weight sum is 1; K edgeThe proposed deformable parameterized edge convolution kernel is represented; through the design of the deformable parameterized edge convolution kernel, a theoretical basis can be provided for dynamically extracting the features of irregularly shaped fibers.
[0141] Input the feature map F to the dynamic edge detection module in ∈R H×W×C , fiber edge feature extraction is performed, and the dynamic edge response graph E is as follows:
[0142]
[0143] Among them, * is the convolution operation, and ReLU suppresses negative responses.
[0144] The dynamic edge response is fused with the original features to enhance the fiber boundary as follows:
[0145] F edge =F in ⊙σ(E) (channel-by-channel multiplication);
[0146] Among them, F edge represents the characteristic result after enhancing the fiber boundary, ⊙ represents channel-by-channel multiplication, σ() is the Sigmoid function (activation function), which compresses the edge response to the interval [0, 1]; F in The input feature map is usually a multi-channel feature map, for example, the shape is H×W×C, where C is the number of channels, H×W is the spatial dimension, and E is the edge response map, which is usually also multi-channel. The two are multiplied element by element for each channel.
[0147] The second step is to design the fiber-resin splitting module as follows:
[0148] The fiber-resin segmentation module implements the segmentation of fiber and resin based on the fiber edge feature extraction as follows:
[0149] M=Softmax(W s *F edge );
[0150] Among them, W s ∈R 1×1×C×2 is the segmentation convolution kernel parameter. The segmentation mask M∈R is generated by 1×1 convolution H×w×2 , channel 0 represents the resin and channel 1 represents the fiber.
[0151] The fiber feature enhancement dynamic modulation of the feature channel is then performed according to the fiber resin segmentation mask:
[0152] F fiber =F edge ⊙M (1) (reinforced fiber area);
[0153] F resin =F edge ⊙M (0) (resin inhibition area);
[0154] Finally, the two features are fused as shown below:
[0155] F out =Conv 1×1 ([F fiber ; F resin ]);
[0156] Among them, F fiber Indicates the characteristic result after strengthening the fiber area; F resin Indicates the characteristic result after suppressing the resin area; F out It represents the final feature result after the fusion of the two, that is, the final feature extraction result of the entire convolution layer including the fiber reinforcement segmentation module; Conv 1×1 () function is a one-dimensional convolution operation function, which is used to reduce the dimension of the output feature. fiber ; F resin ] indicates channel splicing.
[0157] The two-step design achieves separation of irregularly shaped fibers in continuous fiber composite materials and extraction of feature information through four stages: fiber edge detection, feature extraction, fiber-resin segmentation, and fiber reinforcement, namely the fiber segmentation and reinforcement module.
[0158] The fiber segmentation enhanced CNN model is trained using the second sample set so that it can predict the stress field distribution of the remaining 3 / 4 generated images.
[0159] Furthermore, the stress distribution cloud diagrams of all the above generated images are obtained, and the stress σ along the positive direction of the X axis and perpendicular to the fiber direction is obtained. x , and ε is known x , ε x is the strain along the positive direction of the X-axis and perpendicular to the fiber direction; its elastic modulus can be calculated as:
[0160]
[0161] Furthermore, by counting the number of pixels of all generated binary images using Python, the fiber volume fraction can be calculated in batches as follows:
[0162]
[0163] Get two property parameters: elastic modulus E, fiber volume fraction V f , together with all microstructure images, construct the third sample set.
[0164] Furthermore, a fiber segmentation enhancement convolution layer is also embedded in the convolution layer of the U-Net network of the conditionally embedded generative model; and / or a fiber segmentation enhancement convolution layer is also embedded in the convolution layer of the U-Net network of the unconditional generative model.
[0165] Specifically, in order to realize the conditional embedding of DDPM and thus achieve the purpose of reverse design of the microstructure of continuous fiber composite materials, the generative model of conditional embedding is the U-Transformer network architecture, specifically: the self-attention mechanism and cross-attention mechanism in the Transformer model are introduced into the U-Net network in DDPM. Among them, the self-attention mechanism is used to positionally embed the input features in the convolution downsampling stage, and the input attribute parameter information can be converted into information that can be received by the subsequent noise diffusion process, thereby embedding the conditional information in the time step; the cross-attention mechanism acts on the skip connection layer to filter irrelevant noise information, and can enhance the features of the fiber area, thereby improving the learning ability for microstructural features such as irregularly shaped fibers, resin-rich areas, and pores. In addition, the traditional convolution kernel is replaced by a deformable convolution kernel, namely the fiber segmentation enhancement convolution layer, to adapt to the dynamic changes of the fiber volume fraction. The improved U-Transformer network architecture is as follows: Figure 7 shown.
[0166] Furthermore, the elastic modulus E, fiber volume fraction V f The desired attribute parameters can be embedded into the time step of DDPM through the U-Transformer network to achieve the reverse generation of microstructure images under conditional control. The specific formula is as follows:
[0167] After conditional embedding in the U-Transformer network architecture, the Markov chain of the forward noise addition process is as follows:
[0168]
[0169] After conditional embedding, the step-by-step noise addition process is as follows:
[0170]
[0171] β t (E,V f )=β t +γ·f φ (E,V f );
[0172] Among them, β t is the diffusion rate hyperparameter in the unconditional DDPM model, on this basis, β t (E,Vf ) is the diffusion rate hyperparameter after considering the two conditional embeddings, γ is a hyperparameter used to balance the contribution of the condition to the noise modulation; f φ (E,V f ) is the joint function of conditional embedding, and its parameters are
[0173] In view of the complex characteristics of continuous fiber composite materials, a cosine scheduling strategy is adopted as shown below:
[0174]
[0175] in, is the cumulative noise scheduling parameter used to control the overall noise intensity; if s = 0.008, the initial β1 ≈ 0.0001 to avoid premature data corruption.
[0176] After conditional embedding, the Markov chain of the inverse denoising process is as follows:
[0177]
[0178] After conditional embedding, the step-by-step denoising process is as follows:
[0179] p θ (x t-1 |x t ,E,V f )=N(x t-1 ;μ θ (x t ,t,E,V f ),∑ θ (x t ,t,E,V f ));
[0180] Among them, the elastic modulus E and fiber volume fraction V f Embedded into mean μ through U-Transformer network θ (x t ,t) and variance ∑ θ (x t ,t).
[0181] The U-Transformer network architecture also needs to consider the impact of conditional information on the loss function, in terms of elastic modulus E and fiber volume fraction V f The loss under the constraints is as follows:
[0182]
[0183] Among them, N represents the total number of pixels of the input image data, i and j represent the coordinate values of the pixel points, Represents the pixel point in the input data x0; σ() is the Sigmoid function, which maps the pixel value to the fiber probability.
[0184] The hybrid loss function of the U-Transformer network architecture is as follows:
[0185]
[0186] Where λ is the weight of the constraint loss, and λ = 0.1 is recommended to coordinate the contradiction between the generated image quality and the accuracy of the condition satisfaction; L simple is the loss function of DDPM.
[0187] The present invention provides a method and system for reverse design of continuous fiber composite microstructures based on a generative model, wherein the method includes key steps such as constructing a first sample set, establishing an image generation model, constructing a second sample set, establishing a performance prediction model, constructing a third sample set, and establishing a reverse design model. The above method is embedded in a continuous fiber composite microstructure image acquisition platform based on micro-computed tomography (Micro-CT) provided by the present invention, constituting a method and system for reverse design of continuous fiber composite microstructures based on a generative model according to the present invention. The present invention enhances existing deep learning models based on the structural characteristics of continuous fiber composite materials and establishes a reverse design framework. The reverse material design method can achieve the random generation of realistic continuous fiber composite microstructures with specified attribute parameters under the conditions of low image acquisition cost and low simulation calculation cost.
[0188] It will be easily understood by those skilled in the art that the above description is merely a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention should be included in the scope of protection of the present invention.
Claims
1. A method for reverse design of composite material microstructure based on generative model, characterized in that: include: Construct a sample data set corresponding to the microstructure image and property parameters of the composite material; The unconditional generative model is enhanced with conditional embedding to construct a generative model with conditional embedding. The generative model with conditional embedding is trained using a sample dataset corresponding to microstructure images and attribute parameters, where the attribute parameters are the embedding conditions when generating the microstructure images. The trained model is then used as the reverse design model. The reverse design model is used to generate a designed microstructure image according to expected property parameters.
2. The method for reverse design of composite material microstructure based on generative model according to claim 1, characterized in that: Construct a sample data set corresponding to the microstructure image and property parameters of the composite material, including: Construct a sample dataset of microstructure images of composite materials; Selecting some image samples from the microstructure image sample data set to perform simulation analysis using the finite element method to obtain corresponding finite element analysis results; constructing a sample data set corresponding to the microstructure image-finite element analysis results based on the partial image samples and the corresponding finite element analysis results; The performance prediction model is trained using a sample data set corresponding to the microstructure image-finite element analysis results, and the trained performance prediction model is used to perform performance prediction on the remaining image samples in the microstructure image sample data set to obtain predicted finite element analysis results for the remaining image samples; According to the finite element analysis results of all image samples in the microstructure image sample data set, the attribute parameters corresponding to all image samples are obtained, and a sample data set corresponding to the microstructure image and attribute parameters is constructed.
3. The method for reverse design of composite material microstructure based on generative model according to claim 2, characterized in that: Construct a sample dataset of microstructure images of composite materials, including: Acquiring actual microstructure images of the composite material by micro-computed tomography technology and performing post-processing operations on the actual microstructure images to construct an original microstructure image set; The unconditional generative model is trained using the original microstructure image set, and the trained unconditional generative model is obtained as the image generative model; Expanding the original microstructure image set through the image generation model to form a microstructure image sample data set; The post-processing operation includes rotating and expanding samples of the actual microstructure image and performing at least one of binarization, Gaussian filtering, contrast adjustment, feature extraction, and morphological operations on the actual microstructure image.
4. The method for reverse design of composite material microstructure based on generative model according to claim 3, characterized in that: The composite material is a continuous fiber composite material; the performance prediction model adopts a CNN network architecture, and a fiber segmentation enhancement convolution layer is embedded in the convolution layer of the performance prediction model. The fiber segmentation enhancement convolution layer includes a dynamic edge detection module and a fiber resin segmentation module. The dynamic edge detection module is used to extract fiber edge features through fiber edge detection, and the fiber resin segmentation module is used to perform fiber resin segmentation and fiber feature enhancement based on fiber edge features.
5. The method for reverse design of composite material microstructure based on generative model according to claim 4, characterized in that: The convolution kernel K of the dynamic edge detection module edge The design is as follows: K edge =Softmax(W e )∈R 3×3 ; Among them, W e ∈R 3×3 is a variable learning parameter, R 3×3 is the set of all 3×3 matrices of real numbers; Input the feature map F to the dynamic edge detection module in ∈R H×W×C , extract the fiber edge features and obtain the dynamic edge response map E; and fuse the dynamic edge response with the original features to enhance the fiber boundary as follows: F edge =F in ⊙σ(E); Among them, F edge represents the characteristic result after enhancing the fiber boundary, ⊙ represents channel-by-channel multiplication, and σ() is the Sigmoid function, which compresses the edge response to the interval [0, 1]; The fiber-resin segmentation module implements the segmentation of fiber and resin based on the fiber edge feature extraction as follows: M=Softmax(W s *F edge ); Among them, W s ∈R 1×1×C×2 is the segmentation convolution kernel parameter, which means that the segmentation mask M∈R is generated by 1×1 convolution H×W×2 , channel 0 represents resin, channel 1 represents fiber; Then, the fiber feature enhancement dynamic modulation and feature fusion are performed on the feature channel according to the fiber resin segmentation mask as follows: F fiber =F edge ⊙M (1) ; F resin =F edge ⊙M (0) ; F out =Conv 1×1 ([F fiber ;F resin ]); Among them, F fiber It represents the characteristic result after the fiber area is enhanced, F resin It represents the characteristic result after suppressing the resin area, F out Indicates the final feature result after the fusion of the two, Conv 1×1 () function is a one-dimensional convolution operation function, [F fiber ; F resin ] indicates channel splicing.
6. The method for reverse design of composite material microstructure based on generative model according to claim 4, characterized in that: A fiber segmentation enhancement convolution layer is also embedded in the convolution layer of the U-Net network of the conditionally embedded generative model; and / or a fiber segmentation enhancement convolution layer is also embedded in the convolution layer of the U-Net network of the unconditional generative model.
7. The method for reverse design of composite material microstructure based on generative model according to any one of claims 1 to 6, characterized in that: The generative model of the conditional embedding is a U-Transformer network architecture. Specifically, the self-attention mechanism and cross-attention mechanism in the Transformer model are introduced into the U-Net network of DDPM. The self-attention mechanism is used to positionally embed the input features in the convolution downsampling stage to convert the input attribute parameter information into information that can be received by the subsequent noise diffusion process, thereby embedding the conditional information into the time step; the cross-attention mechanism acts on the skip connection layer to filter irrelevant noise information to enhance the features of the fiber area.
8. The method for reverse design of composite material microstructure based on generative model according to claim 7, characterized in that: The Markov chain of the forward noise addition process after conditional embedding in the U-Transformer network architecture is as follows: After conditional embedding, the step-by-step noise addition process is as follows: b t (E,V f )=β t +γ·f φ (E,V f ); Among them, q() is the probability distribution symbol in the forward noise addition process; x 1:T Represents the process from adding noise data x1 in step 1 to the final noise data x T sequence; x t represents the data of step t in the diffusion process; I represents the unit matrix; β t (E,V f ) is the consideration of two conditions: elastic modulus E, fiber volume fraction V f The diffusion rate hyperparameter after embedding; γ is a hyperparameter used to balance the contribution of the condition to the noise modulation; f φ (E,V f ) is the joint function of conditional embedding, with parameter φ; In view of the complex characteristics of continuous fiber composite materials, a cosine scheduling strategy is adopted as shown below: in, is the cumulative noise scheduling parameter, setting s = 0.008, then the initial β1 ≈ 0.0001; After conditional embedding, the Markov chain of the inverse denoising process is as follows: After conditional embedding, the step-by-step denoising process is as follows: p θ (x t-1 |x t ,E,V f )=N(x t-1 ;μ θ (x t ,t,E,V f ),∑ θ (x t ,t,E,V f )); Among them, p θ () is used as the probability distribution symbol in the inverse denoising process; elastic modulus E and fiber volume fraction V f Embedded into mean μ through U-Transformer network θ (x t ,t) and variance ∑ θ (x t ,t).
9. The method for reverse design of composite material microstructure based on generative model according to claim 7, characterized in that: The U-Transformer network architecture considers the influence of conditional information on the loss function, and f The loss under the constraints is as follows: Where N represents the total number of pixels in the input image data, i and j represent the coordinate values of the pixels; x0 is the original input data; σ() is the Sigmoid function, which maps pixel values to fiber probabilities; The hybrid loss function of the U-Transformer network architecture is as follows: Among them, λ is the weight of the constraint loss to coordinate the contradiction between the quality of the generated image and the accuracy of the condition satisfaction; L simple is the loss function of the original DDPM.
10. A composite material microstructure reverse design system based on generative model, characterized in that: The apparatus comprises an X-ray emission source, a rotating table, a workpiece fixture, a slide platform, a flat panel detector, and a host computer; the rotating table is fixed to the surface of the slide platform, the workpiece fixture is mounted on the rotating table, the X-ray emission source is located in front of the rotating table, the flat panel detector is movably mounted on the surface of the slide platform and located behind the rotating table, and the host computer is connected to the X-ray emission source and the flat panel detector, respectively; The flat-panel detector is used to receive the collected composite material microstructure image and transmit it to the host computer for storage; the host computer includes a memory and a processor, the memory stores a computer program, and when the processor executes the computer program, it executes the composite material microstructure reverse design method based on the generative model described in any one of claims 1 to 9.
Citation Information
Cited By
Main body structure design model training method and main body structure generation method
CN121256359A
Reverse design method, device and equipment of material structure and storage medium
CN121565342A
A reverse design method, apparatus, device, and storage medium for material structures
CN121565342B