A Method for Monitoring Process Parameters of Fused Deposition Modeling Based on Domain Adversarial Networks

By optimizing the monitoring of fused deposition modeling process parameters through domain adversarial networks, the adaptability of the FDM system in different environments was solved, achieving efficient parameter control and product quality assurance, and improving the quality and efficiency of FDM printing.

CN118887605BActive Publication Date: 2025-12-02XI AN JIAOTONG UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410906667.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-07-08
Publication Date
2025-12-02
Estimated Expiration
2044-07-08

AI Technical Summary

Technical Problem

Existing fused deposition modeling (FDM) process parameter monitoring systems struggle to maintain accuracy and consistency when faced with varying production environments and materials. They lack environmental adaptability and the flexibility of real-time data processing, which impacts product quality.

Method used

By combining Domain Adversarial Networks (DANs) with multi-head deep convolutional neural networks, and constructing a domain adaptive convolutional network, adversarial learning is performed using feature extractors, label classifiers, and domain discriminators to optimize feature distribution differences and achieve adaptive monitoring of different production environments.

Benefits of technology

It improves the adaptability and robustness of the monitoring system under various production conditions, ensures consistent product quality, reduces printing errors and maintenance costs, and enhances quality control and efficiency in the FDM printing process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118887605B_ABST
    Figure CN118887605B_ABST
Patent Text Reader

Abstract

A method for monitoring fused deposition modeling (FDM) process parameters based on domain adversarial networks is disclosed. The method involves configuring a camera on a fused deposition modeling (FDM) printing system to capture images of the FDM printing process in real time. Images of the printing system with unknown parameters are used as unlabeled target domain data. Images of the printing system with different known parameters are used as labeled source domain data. A domain adaptive convolutional network (DCNN) is constructed and trained using the source domain data and a portion of the target domain data as input raw image data. The DCNN processes the extracted features and optimizes the domain invariance of the features through adversarial learning to adapt to diverse production environments. Another portion of the target domain data is input into the trained DCNN to obtain predicted labels for the target domain data. The FDM process parameters are adjusted based on the features output by the DCNN.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of additive manufacturing technology, and in particular to a method for monitoring process parameters of fused deposition modeling based on domain adversarial networks. Background Technology

[0002] In existing technologies, fused deposition modeling (FDM) process parameter monitoring systems typically suffer from insufficient environmental adaptability, making it difficult for them to maintain accuracy and consistency under changing production conditions. Specifically, traditional monitoring systems often rely on fixed parameter settings and environmental conditions. When faced with different production environments or material variations, these systems cannot effectively adapt, thus affecting product quality. Furthermore, traditional systems often lack flexibility and intelligence in processing real-time data, limiting their application in complex production environments.

[0003] The information disclosed in the background section is only for enhancing the understanding of the background of this invention, and therefore may contain information that does not constitute prior art known to those skilled in the art. Summary of the Invention

[0004] To address the problems existing in the prior art, this invention proposes a method for monitoring FDM process parameters based on Domain Adversarial Networks (DANs). This method enhances the monitoring of FDM process parameters by utilizing a multi-head deep convolutional neural network to extract features from real-time captured image data, and then optimizes these features through the DAN, thereby reducing the feature distribution differences between the source and target domains. This not only improves the generalization ability of the monitoring system under different production environments but also enhances its flexibility and intelligence in real-time data processing, enabling the monitoring system to more accurately adapt to various changes in production conditions and ensuring the stability and consistency of product quality.

[0005] This invention is achieved through the following technical solution:

[0006] A method for monitoring fused deposition modeling process parameters based on domain adversarial networks includes:

[0007] S100: A camera is configured on a printing system used for fused deposition modeling to capture images of the fused deposition modeling printing process in real time. The images of the printing system with unknown parameters are used as unlabeled target domain data; the images of the printing system with different known parameters are used as labeled source domain data.

[0008] S200: Construct a domain-adaptive convolutional network. Train the domain-adaptive convolutional network using original image data with source domain data and partial target domain data as input. The domain-adaptive convolutional network processes the extracted features and optimizes the domain invariance of the features through adversarial learning to adapt to diverse production environments. The domain-adaptive convolutional network includes...

[0009] The feature extractor F consists of a convolutional layer composed of a ResNet structure, convolutional layers, batch normalization, and ReLU activation function for initial feature learning, followed by a max-pooling layer to reduce feature dimensions and a linear layer that transforms to form a consistent feature map.

[0010] The label classifier C, consisting of fully connected layers, interprets the feature maps generated by the feature extractor F and maps these features to the corresponding label categories. Label classifier C is trained on source domain data through supervised learning to classify known label types.

[0011] Domain discriminator D contains a series of convolutional network layers to analyze and distinguish the feature distribution differences between source domain data and target domain data. During adversarial training, domain discriminator D interacts with feature extractor F to create feature representations that can deceive label classifier C, prompting feature extractor F to produce feature representations that can resist domain differences.

[0012] S300: Input another part of the target domain data into the trained domain adaptive convolutional network to obtain the predicted label of the target domain data, and adjust the fused deposition modeling process parameters according to the features output by the domain adaptive convolutional network.

[0013] In the method for monitoring process parameters of fused deposition modeling based on domain adversarial networks, the acquired images are processed by random rotation, scaling, and random cropping.

[0014] In the aforementioned method for monitoring fused deposition modeling process parameters based on domain adversarial networks, the feature extractor F, which extracts features from the input data, includes a residual neural network, convolutional layers, normalization layers, and max pooling layers to sequentially extract features from the input data, learn local and global feature representations of the data, and finally maps the extracted features to a specific dimension through a linear layer to form the final feature representation. The expression of the feature extractor is: F = MaxPool(ReLU(BN(Conv(ResNet(X))))), where...

[0015] X is the input raw image data;

[0016] ResNet(X) represents the process of extracting initial features and learning representations from input data X using a residual neural network. The residual neural network extracts features by introducing identity mappings and cross-layer connections.

[0017] Conv(ResNet(X)) represents applying a convolution operation to the output features of a residual neural network to further extract local features. The convolutional layer performs convolution calculations on the input features through sliding convolution kernels to extract feature patterns at different scales and directions.

[0018] BN(Conv(ResNet(X))) indicates that batch normalization is applied to the output of the convolutional layer. Batch normalization normalizes the data in each batch.

[0019] ReLU(BN(Conv(ResNet(X)))) indicates that the ReLU activation function is applied to the batch-normalized output. The ReLU function performs a non-linear transformation on the input.

[0020] MaxPool(ReLU(BN(Conv(ResNet(X))))) applies max pooling to the feature map after ReLU activation. Max pooling downsamples the feature map by selecting the maximum value in a local region, thus reducing the size of the feature map.

[0021] Ultimately, the output of the feature extractor F is a compact feature representation that extracts multi-level, multi-scale features.

[0022] In the aforementioned method for monitoring fused deposition modeling process parameters based on domain adversarial networks, a label classifier C receives features output by a feature extractor and classifies these features through a fully connected layer. Based on the learned features, the label classifier predicts the labels of the data. The loss function Lc of the label classifier is used to measure the accuracy of the classification prediction. The expression for the label classifier C is: C(F(X)) = softmax(W c ·F(X)+b c )in:

[0023] F(X) represents the features obtained by the feature extractor from the original input; W c and b c These represent the weight matrix and bias vector of the classifier, respectively. The softmax function is used to transform the classifier's output into a probability distribution. The loss function Lc of the label classifier uses cross-entropy loss, and the formula is:

[0024]

[0025] Where N represents the number of samples in the source domain data, y i Indicates sample x i Real labels, C(F(x) i )) indicates that the classifier classifies sample x i The predicted probability distribution.

[0026] In the aforementioned method for monitoring fused deposition modeling process parameters based on domain adversarial networks, the domain discriminator D is used to distinguish the feature distribution differences between source domain data and target domain data. It receives the output features from the feature extractor and performs domain discrimination on the features through multiple fully connected layers. The purpose of the domain discriminator is to determine as accurately as possible whether a feature originates from the source domain or the target domain. Its loss function L... d Used to measure the effectiveness of domain discrimination

[0027] The expression for the domain discriminator D is: D(F(X)) = sigmoid(W d ·F(X)+b d ), where W d and b d Let represent the weight matrix and bias vector of the domain discriminator D, respectively; the sigmoid function is used to convert the output of the domain discriminator into probability values, representing the probability that a feature comes from the source domain or the target domain.

[0028] The goal of a domain discriminator is to maximize the discriminative power of features from the source and target domains, enabling it to determine as accurately as possible which domain a feature originates from. To achieve this goal, the domain discriminator's loss function L... D Using binary cross-entropy loss, the formula is:

[0029]

[0030] in:

[0031] N s N represents the number of samples in the source domain. t This represents the total number of samples in the target domain. Represents source domain samples, Represents the target domain sample.

[0032] The representation domain discriminator D represents the source domain sample features. The predicted probability, i.e. the probability that the feature comes from the source domain. The domain discriminator D represents the features of the target domain samples. The predicted probability,

[0033] By minimizing the loss function, L d The domain discriminator D learns the optimal parameters to distinguish features between the source and target domains, enabling it to accurately determine the domain attributes of the features.

[0034] The method for monitoring fused deposition modeling process parameters based on domain adversarial networks includes the following steps in training the domain adaptive convolutional network:

[0035] S201: Collect source domain data from a standard operating printing system, where each data entry consists of corresponding operating parameters and a known printout label. Collect target domain data from an actual production environment that does not contain explicit label information. Use feature extractor F to extract features from the data to obtain source domain features. and target domain features

[0036] S202: Use feature extractor F to process the input data X to extract features. Feature extractor F is expressed by the following formula:

[0037] F=MaxPool(ReLU(BN(Conv(ResNet(X))))),

[0038] S203: The source domain features The label classifier C receives the predicted values ​​of the label categories of the source domain data from the input label classifier C. The label classifier C first receives the feature vector output by the feature extractor F. in Let i represent a sample of source domain data, where i is the index of the sample; apply a set of learned weights W to each feature vector. c and bias b c The softmax function is applied for activation and normalization, transforming the linear output after weighting into a probability distribution, as shown in the following formula:

[0039]

[0040] Using the cross-entropy loss function L C To evaluate the prediction performance of the label classifier C on the source domain labels, the loss function is calculated as follows:

[0041]

[0042] in, Source domain data sample The unique hot encoding of the true label,

[0043] S204: Domain discriminator D uses loss function L D To measure its performance, the loss function L D The expression is as follows:

[0044]

[0045] Here, N s N represents the number of samples in the source domain. t Let D(F(x)) represent the total number of samples in the target domain, and let D(F(x)) be the domain classification prediction of the domain discriminator D for the output of the feature extractor F. During the adversarial training phase, this prediction is achieved by maximizing the domain loss function L. DTo achieve,

[0046] S205: In adversarial training, the feature extractor F and the domain discriminator D are optimized simultaneously to encourage F to produce features that are difficult to distinguish between domains. Its optimization is achieved by minimizing the total loss function L. total To achieve:

[0047] L total =L C +λL D

[0048] Here, λ is a hyperparameter that weighs the importance of the two types of loss.

[0049] S206: Parameter updates employ the gradient descent principle, where the learning rate η determines the step size of parameter changes during each update. The update formula is expressed as:

[0050]

[0051] Here, θ represents the model parameters, which include θ F θ C θ D ; It is the gradient of the total loss function with respect to the parameters.

[0052] For the feature extractor F, the parameter update formula is:

[0053]

[0054] For the label classifier C, the parameter update formula is:

[0055]

[0056] For the domain discriminator D, the parameter update formula is:

[0057]

[0058] in, Let η represent the differential operator, η represent the learning rate, and θ represent the learning rate. F θ C θ D Let θ' represent the learnable parameters of the feature extractor, fault classifier, and domain discriminator, respectively. F ,θ' C ,θ' D L represents the parameters after learning and updating. total L C and L D S207: Test the trained domain adaptive convolutional network using test samples.

[0059] In the method for monitoring process parameters of fused deposition modeling based on domain adversarial networks, the parameters corresponding to the tags include nozzle Z-axis height, nozzle temperature, nozzle moving speed, and nozzle material extrusion rate.

[0060] Compared with the prior art, the present invention has the following advantages:

[0061] This invention utilizes the advanced mechanism of domain adaptation networks to effectively improve the model's adaptability and robustness under various production conditions by reducing the distributional differences between the monitoring model and the actual production environment. Leveraging the deep feature understanding of complex data through domain adaptation networks, this method ensures precise control of process parameters and maintains consistent print quality even when production conditions change. By applying domain adaptation networks, this method significantly reduces printing errors caused by environmental changes, thereby reducing waste, improving material and resource utilization efficiency, lowering maintenance and adjustment costs, and bringing greater economic benefits to users. This invention combines domain adversarial networks and multi-head neural networks to deeply analyze image data collected during FDM printing, monitor and optimize process parameters in real time, ensuring reliable print quality. This method improves the adaptability and flexibility of the monitoring system, significantly enhancing quality control and efficiency in the FDM printing process. It not only enhances the performance of the monitoring system but also provides a solid technical foundation for the widespread application of FDM technology. Attached Figure Description

[0062] Various other advantages and benefits of the present invention will become apparent to those skilled in the art upon reading the detailed description of the preferred embodiments below. The accompanying drawings are for illustrative purposes only and are not intended to limit the invention. It is obvious that the drawings described below are merely some embodiments of the invention, and those skilled in the art can obtain other drawings based on these drawings without any inventive effort. Furthermore, the same reference numerals denote the same parts throughout the drawings.

[0063] In the attached diagram:

[0064] Figure 1 This is a flowchart illustrating a method for monitoring fused deposition modeling process parameters based on domain adversarial networks provided by the present invention.

[0065] Figure 2 This is a schematic diagram of a domain-adaptive convolutional network provided in one embodiment of the present invention.

[0066] The present invention will be further explained below with reference to the accompanying drawings and embodiments. Detailed Implementation

[0067] Specific embodiments of the invention will now be described in more detail with reference to the accompanying drawings. While specific embodiments of the invention are shown in the drawings, it should be understood that the invention may be implemented in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this invention will be thorough and complete, and will fully convey the scope of the invention to those skilled in the art.

[0068] It should be noted that certain terms are used in the specification and claims to refer to specific components. Those skilled in the art will understand that different terms may be used to refer to the same component. This specification and claims do not distinguish components based on differences in terminology, but rather on differences in function. The terms "comprising" or "including" used throughout the specification and claims are open-ended and should be interpreted as "comprising but not limited to." The following descriptions are preferred embodiments for carrying out the invention; however, these descriptions are for the purpose of understanding the general principles of the specification and are not intended to limit the scope of the invention. The scope of protection of this invention is determined by the appended claims.

[0069] To facilitate understanding of the embodiments of the present invention, further explanations and descriptions will be provided below with reference to the accompanying drawings and specific embodiments. The accompanying drawings do not constitute a limitation on the embodiments of the present invention.

[0070] like Figures 1 to 2 As shown, the method for monitoring fused deposition modeling process parameters based on domain adversarial networks includes the following steps:

[0071] S100: A camera is configured on a printing system used for fused deposition modeling to capture images of the fused deposition modeling printing process in real time. The images of the printing system with unknown parameters are used as unlabeled target domain data; the images of the printing system with different known parameters are used as labeled source domain data.

[0072] S200: Construct a domain-adaptive convolutional network. Train the domain-adaptive convolutional network using original image data with source domain data and partial target domain data as input. The domain-adaptive convolutional network processes the extracted features and optimizes the domain invariance of the features through adversarial learning to adapt to diverse production environments. The domain-adaptive convolutional network includes...

[0073] The feature extractor F consists of a convolutional layer composed of a ResNet structure, convolutional layers, batch normalization, and ReLU activation function for initial feature learning, followed by a max-pooling layer to reduce feature dimensions and a linear layer that transforms to form a consistent feature map.

[0074] The label classifier C, consisting of fully connected layers, interprets the feature maps generated by the feature extractor F and maps these features to the corresponding label categories. Label classifier C is trained on source domain data through supervised learning to classify known label types.

[0075] Domain discriminator D contains a series of convolutional network layers to analyze and distinguish the feature distribution differences between source domain data and target domain data. During adversarial training, domain discriminator D interacts with feature extractor F to create feature representations that can deceive label classifier C, prompting feature extractor F to produce feature representations that can resist domain differences.

[0076] S300: Input another part of the target domain data into the trained domain adaptive convolutional network to obtain the predicted label of the target domain data, and adjust the fused deposition modeling process parameters according to the features output by the domain adaptive convolutional network.

[0077] In a preferred embodiment of the method for monitoring fused deposition modeling process parameters based on domain adversarial networks, the acquired images are processed by random rotation, scaling, and random cropping.

[0078] In a preferred embodiment of the method for monitoring fused deposition modeling process parameters based on domain adversarial networks, the feature extractor F extracts features from the input data. This feature extractor includes a residual neural network, convolutional layers, normalization layers, and max pooling layers to sequentially extract features from the input data, learn local and global feature representations of the data, and finally maps the extracted features to a specific dimension through a linear layer to form the final feature representation. The expression for the feature extractor is: F = MaxPool(ReLU(BN(Conv(ResNet(X))))), where...

[0079] X is the input raw image data;

[0080] ResNet(X) represents the process of extracting initial features and learning representations from input data X using a residual neural network. The residual neural network extracts features by introducing identity mappings and cross-layer connections.

[0081] Conv(ResNet(X)) represents applying a convolution operation to the output features of a residual neural network to further extract local features. The convolutional layer performs convolution calculations on the input features through sliding convolution kernels to extract feature patterns at different scales and directions.

[0082] BN(Conv(ResNet(X))) indicates that batch normalization is applied to the output of the convolutional layer. Batch normalization normalizes the data in each batch.

[0083] ReLU(BN(Conv(ResNet(X)))) indicates that the ReLU activation function is applied to the batch-normalized output. The ReLU function performs a non-linear transformation on the input.

[0084] MaxPool(ReLU(BN(Conv(ResNet(X))))) applies max pooling to the feature map after ReLU activation. Max pooling downsamples the feature map by selecting the maximum value in a local region, thus reducing the size of the feature map.

[0085] Ultimately, the output of the feature extractor F is a compact feature representation that extracts multi-level, multi-scale features.

[0086] In a preferred embodiment of the method for monitoring fused deposition modeling process parameters based on domain adversarial networks, the label classifier C receives features output by the feature extractor and classifies the features through a fully connected layer to predict the labels of the data based on the learned features. The loss function Lc of the label classifier is used to measure the accuracy of the classification prediction. The expression of the label classifier C is: C(F(X)) = softmax(W c ·F(X)+b c )in:

[0087] F(X) represents the features obtained by the feature extractor from the original input; W c and b c These represent the weight matrix and bias vector of the classifier, respectively. The softmax function is used to transform the classifier's output into a probability distribution. The loss function Lc of the label classifier uses cross-entropy loss, and the formula is:

[0088]

[0089] Where N represents the number of samples in the source domain data, y i Indicates sample x i Real labels, C(F(x) i )) indicates that the classifier classifies sample x i The predicted probability distribution.

[0090] In a preferred embodiment of the fused deposition modeling process parameter monitoring method based on domain adversarial networks, the domain discriminator D is used to distinguish the feature distribution differences between source domain data and target domain data. It receives the output features from the feature extractor and performs domain discrimination on the features through multiple fully connected layers. The purpose of the domain discriminator is to determine as accurately as possible whether the feature originates from the source domain or the target domain. Its loss function L... d Used to measure the effectiveness of domain discrimination

[0091] The expression for the domain discriminator D is: D(F(X)) = sigmoid(W d ·F(X)+b d ), where W d and b d Let represent the weight matrix and bias vector of the domain discriminator D, respectively; the sigmoid function is used to convert the output of the domain discriminator into probability values, representing the probability that a feature comes from the source domain or the target domain.

[0092] The goal of a domain discriminator is to maximize the discriminative power of features from the source and target domains, enabling it to determine as accurately as possible which domain a feature originates from. To achieve this goal, the domain discriminator's loss function L... D Using binary cross-entropy loss, the formula is:

[0093]

[0094] in:

[0095] N s N represents the number of samples in the source domain. t This represents the total number of samples in the target domain. Represents source domain samples,

[0096] Represents the target domain sample.

[0097] The representation domain discriminator D represents the source domain sample features. The predicted probability, i.e. the probability that the feature comes from the source domain. The domain discriminator D represents the features of the target domain samples. The predicted probability,

[0098] By minimizing the loss function, L d The domain discriminator D learns the optimal parameters to distinguish features between the source and target domains, enabling it to accurately determine the domain attributes of the features.

[0099] In a preferred embodiment of the method for monitoring fused deposition modeling process parameters based on domain adversarial networks, training the domain adaptive convolutional network includes the following steps:

[0100] S201: Collect source domain data from a standard operating printing system, where each data entry consists of corresponding operating parameters and a known printout label. Collect target domain data from an actual production environment that does not contain explicit label information. Use feature extractor F to extract features from the data to obtain source domain features. and target domain features

[0101] S202: Use feature extractor F to process the input data X to extract features. Feature extractor F is expressed by the following formula:

[0102] F=MaxPool(ReLU(BN(Conv(ResNet(X))))),

[0103] S203: The source domain features The label classifier C receives the predicted values ​​of the label categories of the source domain data from the input label classifier C. The label classifier C first receives the feature vector output by the feature extractor F. in Let i represent a sample of source domain data, where i is the index of the sample; apply a set of learned weights W to each feature vector. c and bias b c The softmax function is applied for activation and normalization, transforming the linear output after weighting into a probability distribution, as shown in the following formula:

[0104]

[0105] Using the cross-entropy loss function L C To evaluate the prediction performance of the label classifier C on the source domain labels, the loss function is calculated as follows:

[0106]

[0107] in, Source domain data sample The unique hot encoding of the true label,

[0108] S204: Domain discriminator D uses loss function L D To measure its performance, the loss function L D The expression is as follows:

[0109]

[0110] Here, N s N represents the number of samples in the source domain. t Let D(F(x)) represent the total number of samples in the target domain, and let D(F(x)) be the domain classification prediction of the domain discriminator D for the output of the feature extractor F. During the adversarial training phase, this prediction is achieved by maximizing the domain loss function L. D To achieve,

[0111] S205: In adversarial training, the feature extractor F and the domain discriminator D are optimized simultaneously to encourage F to produce features that are difficult to distinguish between domains. Its optimization is achieved by minimizing the total loss function L. total To achieve:

[0112] L total =L C+λL D

[0113] Here, λ is a hyperparameter that weighs the importance of the two types of loss.

[0114] S206: Parameter updates employ the gradient descent principle, where the learning rate η determines the step size of parameter changes during each update. The update formula is expressed as:

[0115]

[0116] Here, θ represents the model parameters, which include θ F θ C θ D ; It is the gradient of the total loss function with respect to the parameters.

[0117] For the feature extractor F, the parameter update formula is:

[0118]

[0119] For the label classifier C, the parameter update formula is:

[0120]

[0121] For the domain discriminator D, the parameter update formula is:

[0122]

[0123] in, Let η represent the differential operator, η represent the learning rate, and θ represent the learning rate. F θ C θ D Let θ' represent the learnable parameters of the feature extractor, fault classifier, and domain discriminator, respectively. F ,θ' C ,θ' D L represents the parameters after learning and updating. total L C and L D S207: Test the trained domain adaptive convolutional network using test samples.

[0124] In a preferred embodiment of the method for monitoring fused deposition modeling process parameters based on domain adversarial networks, the parameters corresponding to the tags include nozzle Z-axis height, nozzle temperature, nozzle moving speed, and nozzle material extrusion rate.

[0125] In one embodiment, such as Figure 1As shown, a method for monitoring process parameters of fused deposition modeling (FDM) based on domain adaptive convolutional networks includes the following steps:

[0126] S100: A high-definition camera is configured on the FDM printing equipment to capture image data of the printing process in real time. This data is divided into two parts: one part is source domain data obtained under known parameter conditions, which serves as a training set with labeled information. These labels correspond to specific printing parameter indicators—nozzle Z-axis height, nozzle temperature, nozzle movement speed, and nozzle material extrusion rate. These labels are then internally divided, with 0 representing "low value," 1 representing "good value," and 2 representing "high value." The other part is target domain data obtained under unknown parameter conditions. This data is usually unlabeled and is used to simulate parameter changes in actual production.

[0127] After obtaining the corresponding training samples, the domain adaptive convolutional network described in this disclosure is trained. Finally, the test samples are input into the trained network, and the prediction result of the label classifier C is output: if the output is (0,1,2,1), it means that the current nozzle Z-axis height is too low, the nozzle temperature is good, the nozzle moving speed is high, and the nozzle material extrusion rate is good.

[0128] S200: Constructs a Domain Adaptive Convolutional Network (DAGCN), which learns the ability to transform between different domains by training with source domain data and partially labeled target domain data. The network's domain-invariant feature learning mechanism is processed through convolutional layers and graph generation layers, which can handle complex data structures and extract key features representative of the printing process. Through domain-adaptive learning, the network optimizes the feature representations of source and target domain data, enhancing the model's robustness to different production conditions.

[0129] S300: Input the unlabeled target domain data into the trained DAGCN to obtain predicted labels. These predicted labels are directly related to printing parameters, representing the quality of nozzle Z-axis height, nozzle temperature, nozzle travel speed, and nozzle material extrusion rate, enabling monitoring of equipment parameters under different working environments. By analyzing the characteristics of the domain adaptation network output and the corresponding predicted labels, the parameters of the FDM printing equipment can be adjusted to ensure that the quality of the printed products meets or remains at the required standards.

[0130] This technical solution effectively integrates class labels, domain labels, and data structure information into a comprehensive model, ensuring the integrity and representational power of the extracted features. By introducing adversarial learning, it not only reduces the difference between the source and target domains but also improves the accuracy of feature application in new or changing production environments. By combining complex domain-invariant feature learning with convolutional networks, this invention is applicable not only to known printing conditions but also to new, unknown, or changing printing environments, providing a more efficient and accurate method for parameter optimization and quality assurance in FDM printing technology.

[0131] In another embodiment, in step S200, as Figure 2 As shown, the domain-adaptive convolutional network includes:

[0132] Feature extractor F: This includes a convolutional layer for initial feature learning, consisting of a ResNet structure, standard convolutions, batch normalization, and ReLU activation functions, followed by a max-pooling layer to reduce feature dimensionality. Features are then transformed by linear layers to form a consistent feature map, providing a standardized feature representation for subsequent domain-adaptive training.

[0133] Label classifier C: Consists of fully connected layers, used to interpret the feature maps generated by the feature extractor F and map these features to the corresponding label categories. This classifier is trained in the source domain through supervised learning to accurately classify known label types.

[0134] Domain Discriminator D: This consists of a series of convolutional network layers specifically designed to analyze and distinguish the differences in feature distributions between the source and target domains, thereby training the model to recognize and adapt to new environments. During adversarial training, this discriminator interacts with the feature extractor F, creating feature representations that can deceive the domain classifier. This prompts F to produce feature representations resistant to domain differences, thus reducing the discrepancies between the source and target domains, enhancing the generalization ability of features, and improving the model's adaptability to new environments.

[0135] Preferably, the expression for the feature extractor F is:

[0136] F = MaxPool(ReLU(BN(Conv(ResNet(X)))))), where,

[0137] X is the input raw image data;

[0138] ResNet(X) represents the process of extracting initial features and learning representations from input data X using a residual neural network. By introducing identity mappings and cross-layer connections, residual neural networks help address the challenges of training deep networks and extract more effective features.

[0139] Conv(ResNet(X)) represents applying a convolution operation to the output features of a residual neural network to further extract local features. The convolutional layer performs convolution calculations on the input features through sliding convolution kernels to extract feature patterns at different scales and directions.

[0140] BN(Conv(ResNet(X))) represents applying batch normalization to the output of the convolutional layer. Batch normalization, by normalizing the data in each batch, helps to accelerate network convergence and improve training stability.

[0141] ReLU(BN(Conv(ResNet(X)))) indicates that the ReLU activation function is applied to the batch-normalized output. The ReLU function performs a nonlinear transformation on the input, introducing nonlinear characteristics and improving the network's expressive power.

[0142] MaxPool(ReLU(BN(Conv(ResNet(X))))) applies max pooling to the feature map after ReLU activation. Max pooling downsamples the feature map by selecting the maximum value in a local region, reducing the size of the feature map while retaining important feature information.

[0143] Ultimately, the output of the feature extractor F is a compact feature representation that extracts multi-level, multi-scale features.

[0144] Preferably, the expression for the label classifier C is:

[0145] The expression for the label classifier C is: C(F(X)) = softmax(W c ·F(X)+b c ),in:

[0146] F(X) represents the features obtained by the feature extractor from the original input; W c and b c These represent the weight matrix and bias vector of the classifier, respectively. The softmax function is used to transform the output of the classifier into a probability distribution.

[0147] Preferably, the expression for the domain discriminator D is:

[0148] D(F(X))=sigmoid(W d ·F(X)+b d ), where W d and b d These represent the weight matrix and bias vector of the domain discriminator D, respectively; the sigmoid function is used to convert the output of the domain discriminator into probability values, representing the probability that a feature comes from the source domain or the target domain.

[0149] In another embodiment, step S200, training the domain-adaptive convolutional network includes the following steps:

[0150] S201 Data Preparation: Source domain data is collected from a standard operating FDM machine, where each data point consists of corresponding operating parameters and known printout labels. Target domain data is collected from a real-world production environment; this data does not carry explicit label information. For image data, image enhancement techniques, including rotation, scaling, and random cropping, are applied to increase data diversity and richness. Noise injection data augmentation is then employed to further improve the model's robustness.

[0151] The image enhancement technology is as follows:

[0152] The acquired full-size image is randomly rotated 10° in any direction, and then a small perspective transformation with a probability of 0.1 is applied. Using the nozzle tip coordinates saved during data acquisition, the image is automatically cropped to a 320×320 pixel square area focused on the nozzle tip.

[0153] Cropping random square portions with an area ratio between 0.9 and 1.0 from a 320×320 image and resizing them to 224×224 pixels is used as the input size for the neural network. Then, a horizontal flip with a probability of 0.5 can be applied to the image, and then color dithering of ±10% can be applied to the image's brightness, contrast, hue, and saturation.

[0154] The channels in the transformed image are normalized using the pixel mean and standard deviation of each channel of all images in the dataset.

[0155] Feature assimilation: Feature assimilation is performed on the source and target domain data to standardize their features and reduce statistical differences between the two domains. Feature extractor F is then used to extract features from the assimilated data to obtain the source domain features. and target domain features Ensure that the model can capture key feature information even in different domains.

[0156] S202: Feature extraction training steps: Use the feature extractor F to process the input data X to extract key features, where F consists of multiple convolutional layers.

[0157] The feature extractor F is expressed by the following formula:

[0158] F=MaxPool(ReLU(BN(Conv(ResNet(X)))))

[0159] S203: Label Classification Training Steps:

[0160] The source domain features The label classifier C receives the predicted values ​​of the label categories of the source domain data from the input label classifier C. The label classifier C first receives the feature vector output by the feature extractor F. in Let i represent a sample of source domain data, where i is the index of the sample; apply a set of learned weights W to each feature vector. c and bias b c The softmax function is applied for activation and normalization, transforming the linear output after weighting into a probability distribution, as shown in the following formula:

[0161]

[0162] Using the cross-entropy loss function L C To evaluate the prediction performance of the label classifier C on the source domain labels, the loss function is calculated as follows:

[0163]

[0164] in, Source domain data sample The true labels are encoded using one-hot encoding, and the cross-entropy loss function measures the difference between the predicted probability distribution and the true labels. Iterative optimization: Repeat the above steps, iterating the entire process until the label classifier C achieves satisfactory performance on the source domain data, realizing accurate identification of various fault types.

[0165] S204: Domain Discrimination Training Steps:

[0166] Construction of Domain Discriminator D: Domain discriminator D consists of a series of convolutional layers designed to process the features output by feature extractor F and determine whether the data represented by these features belongs to the source domain or the target domain. The convolutional layers learn how to distinguish feature representations from different domains by considering the relationships between nodes and their neighbors.

[0167] Calculation of the domain loss function: The domain discriminator D uses a loss function L D To measure its performance, the function is expressed as follows:

[0168]

[0169] Here, N s N represents the number of samples in the source domain. t This represents the total number of samples in the target domain. D(F(x)) is the domain classification prediction of the domain discriminator D based on the output of the feature extractor F.

[0170] Application of adversarial training: In the adversarial training phase, the goal of the feature extractor F is to generate features that are difficult for the domain discriminator D to distinguish, thereby achieving feature alignment between the source and target domains. This process maximizes the domain loss function L. D This is achieved so that the domain discriminator D cannot easily determine its domain affiliation based on features.

[0171] Parameter update rule formulation: During training, the parameters θ of the feature extractor F and the domain discriminator D are... F and θ D Based on the loss function L D The gradients are updated. In this step, the feature extractor F adopts a gradient ascent strategy, while the domain discriminator D adopts a gradient descent strategy to optimize their respective objectives.

[0172] Iterative optimization and model evaluation: The training of the domain discriminator D will be carried out in multiple iterations until the model achieves stable performance on the validation set, that is, it can highly accurately distinguish the features of the source domain and the target domain.

[0173] S205: Adversarial Training Steps: In adversarial training, the feature extractor F and the domain discriminator D are simultaneously optimized to encourage F to produce features that are difficult to distinguish between domains. This optimization is achieved by minimizing a total loss function L. total To achieve:

[0174] L total =L C +λL D

[0175] Here, λ is a hyperparameter that weighs the importance of the two types of loss.

[0176] Classification loss L C Impact: L C This is directly related to the model's performance on source domain data, guiding F and C in extracting and identifying fault features. By minimizing L... C The model learns to distinguish different fault types, improving its accuracy in the source domain.

[0177] Domain loss L D Role: L D The purpose of F is to evaluate whether it produces domain-indistinguishable features, such that D cannot accurately distinguish whether the features come from the source domain or the target domain. Optimizing F is essentially maximizing L. D This process is part of adversarial training to achieve domain generalization.

[0178] Adjusting the hyperparameter λ: λ, as a hyperparameter, determines the relative importance of classification loss and domain loss in the total loss function. Adjusting λ can balance the trade-off between the model's accuracy in the source domain and its generalization ability in the target domain.

[0179] S206: Parameter Update Steps: Parameter updates employ the gradient descent principle, where the learning rate η determines the step size of parameter changes during each update. The update formula is expressed as:

[0180]

[0181] Here, θ represents the model parameters, which can be θ F θ C θ D ; It is the gradient of the total loss function with respect to the parameters.

[0182] Parameter update of feature extractor F: Parameter θ of feature extractor F F By reducing the total loss function L total To update, where the total loss function is the classification loss L C Sum domain loss L D The weighted sum. The update rule uses gradient descent, that is, by calculating L... total Relative to θ F The gradient is multiplied by a negative learning rate η, and then from the current θ... F Subtract this value from the input to adjust the parameter.

[0183] Parameter update of label classifier C: Label classifier C aims to minimize classification loss L C This is a standard supervised learning objective used to improve the model's predictive performance on source domain data. Its parameter θ C The update also follows the gradient descent rule, but only depends on the classification loss function L. C The gradient.

[0184] Parameter update of domain discriminator D: The goal of domain discriminator D is to maximize its ability to distinguish source and target domain data, and its parameter θ D The update is to minimize the domain loss L D This approach employs the idea of ​​adversarial training, which involves updating the feature extractor F to deceive the domain discriminator D while simultaneously updating the domain discriminator D to better perform its discrimination task.

[0185] For the feature extractor F, the parameter update formula is:

[0186]

[0187] For the label classifier C, the parameter update formula is:

[0188]

[0189] For the domain discriminator D, the parameter update formula is:

[0190]

[0191] in, Let η represent the differential operator, η represent the learning rate, and θ represent the learning rate. F θ C θ D Let θ' represent the learnable parameters of the feature extractor, fault classifier, and domain discriminator, respectively. F ,θ' C ,θ' D L represents the parameters after learning and updating. total L C and L D Let represent the overall objective function, the fault classification loss, and the domain classification loss, respectively.

[0192] S207: Test the trained domain adaptive convolutional network using test samples.

[0193] This method, through real-time captured image data and corresponding machine learning models, can maintain high-precision monitoring and adjustment capabilities in changing production environments.

[0194] Although embodiments of the present invention have been described above in conjunction with the accompanying drawings, the present invention is not limited to the specific embodiments and application fields described above. The specific embodiments described above are merely illustrative and instructive, and not restrictive. Those skilled in the art can make many other forms based on the guidance of this specification and without departing from the scope of protection of the claims of the present invention, and all of these are within the scope of protection of the present invention.

Claims

1. A method for monitoring fused deposition modeling process parameters based on domain adversarial networks, characterized in that, Includes the following steps: S100: A camera is configured on a printing system used for fused deposition modeling to capture images of the fused deposition modeling printing process in real time. The images of the printing system with unknown parameters are used as unlabeled target domain data; the images of the printing system with different known parameters are used as labeled source domain data. S200: Construct a domain-adaptive convolutional network. Train the domain-adaptive convolutional network using original image data with source domain data and partial target domain data as input. The domain-adaptive convolutional network processes the extracted features and optimizes the domain invariance of the features through adversarial learning to adapt to diverse production environments. The domain-adaptive convolutional network includes... The feature extractor F consists of a convolutional layer composed of a ResNet structure, convolutional layers, batch normalization, and ReLU activation function for initial feature learning, followed by a max-pooling layer to reduce feature dimensions and a linear layer that transforms to form a consistent feature map. The label classifier C, consisting of fully connected layers, interprets the feature maps generated by the feature extractor F and maps these features to the corresponding label categories. Label classifier C is trained on source domain data through supervised learning to classify known label types. Domain discriminator D contains a series of convolutional network layers to analyze and distinguish the feature distribution differences between source domain data and target domain data. During adversarial training, domain discriminator D interacts with feature extractor F to create feature representations that can deceive label classifier C, prompting feature extractor F to produce feature representations that can resist domain differences. S300: Input another part of the target domain data into the trained domain adaptive convolutional network to obtain the predicted label of the target domain data, and adjust the fused deposition modeling process parameters according to the features output by the domain adaptive convolutional network.

2. The method for monitoring fused deposition modeling process parameters based on domain adversarial networks according to claim 1, characterized in that, The acquired images are processed through random rotation, scaling, and random cropping.

3. The method for monitoring fused deposition modeling process parameters based on domain adversarial networks according to claim 1, characterized in that, The feature extractor F, which extracts features from the input data, includes a residual neural network, convolutional layers, normalization layers, and max pooling layers to sequentially extract features from the input data, learn local and global feature representations of the data, and finally maps the extracted features to a specific dimension through a linear layer to form the final feature representation. The expression of the feature extractor is: ,in, It is the input raw image data; ResNet(X) represents the process of extracting initial features and learning representations from input data X using a residual neural network. The residual neural network extracts features by introducing identity mappings and cross-layer connections. Conv(ResNet(X)) represents applying a convolution operation to the output features of a residual neural network to further extract local features. The convolutional layer performs convolution calculations on the input features through sliding convolution kernels to extract feature patterns at different scales and directions. BN(Conv(ResNet(X))) indicates that batch normalization is applied to the output of the convolutional layer. Batch normalization normalizes the data in each batch. ReLU(BN(Conv(ResNet(X)))) indicates that the ReLU activation function is applied to the batch-normalized output. The ReLU function performs a non-linear transformation on the input. MaxPool(ReLU(BN(Conv(ResNet(X))))) indicates that max pooling is applied to the feature map after ReLU activation. Max pooling reduces the size of the feature map by downsampling the feature map by selecting the maximum value in a local region. Ultimately, the output of the feature extractor F is a compact feature representation that extracts multi-level, multi-scale features.

4. The method for monitoring fused deposition modeling process parameters based on domain adversarial networks according to claim 1, characterized in that, The label classifier C receives features output from the feature extractor and classifies these features through a fully connected layer to predict the labels of the data based on the learned features. The loss function of the label classifier is... The label classifier is used to measure the accuracy of classification predictions. The expression is: in: This represents the features obtained by the feature extractor from the original input; and These represent the weight matrix and bias vector of the classifier, respectively. The function is used to transform the output of a classifier into a probability distribution form; the loss function of a label classifier. Cross-entropy loss is used, and the formula is as follows: , in, This represents the number of samples in the source domain data. Indicates sample Authentic labels This indicates that the classifier is effective for the samples. The predicted probability distribution.

5. The method for monitoring fused deposition modeling process parameters based on domain adversarial networks according to claim 1, characterized in that, Domain Discriminator This is used to distinguish the feature distribution differences between source and target domain data. It receives the output features from the feature extractor and performs domain discrimination on the features through multiple fully connected layers. The purpose of the domain discriminator is to determine as accurately as possible whether a feature comes from the source or target domain. Its loss function is... Used to measure the effectiveness of domain discrimination The domain discriminator The expression is: ,in, and Representing the domain discriminator The weight matrix and bias vector; The function is used to convert the output of the domain discriminator into probability values, representing the probability that a feature comes from the source domain or the target domain. The goal of a domain discriminator is to maximize the discriminative power of features from the source and target domains, enabling it to determine as accurately as possible which domain a feature originates from. To achieve this goal, the loss function of the domain discriminator... Using binary cross-entropy loss, the formula is: , in: Indicates the number of samples in the source domain. This represents the total number of samples in the target domain. Represents source domain samples, Represents the target domain sample. Representation domain discriminator Features of source domain samples The predicted probability, i.e. the probability that the feature comes from the source domain. Representation domain discriminator Features of target domain samples The predicted probability, By minimizing the loss function, Domain Discriminator It learns the optimal parameters to distinguish features between the source and target domains, enabling it to accurately determine the domain attributes of features.

6. The method for monitoring fused deposition modeling process parameters based on domain adversarial networks according to claim 1, characterized in that, Training the domain-adaptive convolutional network includes the following steps: S201: Collect source domain data from a standard operating printing system, where each data entry consists of corresponding operating parameters and a known printout label; collect target domain data from an actual production environment that does not contain explicit label information, using a feature extractor. Feature extraction is performed on the data to obtain source domain features. and target domain features , S202: Using a Feature Extractor For input data Processing is performed to extract features; feature extractor This can be expressed by the following formula: , S203: The source domain features Input label classifier In the process, the predicted values ​​of the label categories of the source domain data are obtained; this is the label classifier. First, receive the feature extractor. Output feature vector ,in This represents a sample of source domain data. It is the index of the sample; a set of learned weights is applied to each feature vector. and bias ;application The function is activated and normalized, transforming the linear output after weighting into a probability distribution, as shown in the following formula: , Using the cross-entropy loss function To evaluate the label classifier The prediction performance on the source domain label is calculated using the following loss function: , in, Source domain data sample The unique hot encoding of the true label, S204: Domain Discriminator Using loss function To measure its performance, the loss function The expression is as follows: , here, Indicates the number of samples in the source domain. This represents the total number of samples in the target domain. Domain discriminator For feature extractors The output domain classification prediction is obtained by maximizing the domain loss function during the adversarial training phase. To achieve, S205: Feature extractor in adversarial training Domain Discriminator Simultaneously optimize to encourage Features that generate indistinguishable domains are optimized by minimizing the total loss function. To achieve: , in, It is a hyperparameter that weighs the importance of two types of loss. S206: Parameter updates employ the gradient descent algorithm, where the learning rate... This determines the step size of parameter changes during each update, and the update formula is expressed as: , Here, Representative model parameters, which include , , ; It is the gradient of the total loss function with respect to the parameters. For feature extractors The parameter update formula is: , For label classifiers The parameter update formula is: , For domain discriminators The parameter update formula is: , in, Describes the differential operator. Indicates the learning rate. , , Let represent the learnable parameters of the feature extractor, fault classifier, and domain discriminator, respectively. , , These represent the parameters after learning and updating. , and Let these represent the overall objective function, the fault classification loss, and the domain classification loss, respectively. S207: Test the trained domain adaptive convolutional network using test samples.

7. The method for monitoring fused deposition modeling process parameters based on domain adversarial networks according to claim 1, characterized in that, The parameters corresponding to the label include nozzle Z-axis height, nozzle temperature, nozzle movement speed, and nozzle material extrusion rate.

Citation Information

Patent Citations

  • Intelligent fault diagnosis method based on deep adversarial domain self-adaption

    CN111898634A

  • Semiconductor processing technology anomaly detection method based on domain self-adaption

    CN117096070A