In the production of sand casting parts, process parameters significantly influence the final quality. Simultaneously, the three-dimensional (3D) geometric structure of the product also critically impacts its formation quality. However, due to limitations in enterprise information systems, defect root cause analysis often lacks a quantitative analysis of 3D morphology. Non-structured data like 3D CAD models are difficult to characterize quantitatively. Consequently, data-driven quality analysis methods within the sand casting industry typically exclude morphological analysis, making it impossible to investigate why defects tend to occur in regions with complex geometries. Fully mining morphological features is instrumental in exploring the relationship between part geometry and formation quality, thereby enhancing product quality.
Regarding the quantitative characterization of 3D shapes, scholars have conducted extensive research. To address the classification of processing techniques in EDM for stamping dies, one approach involves calculating the surface moment and central moment of the electrode radius to derive a shape feature vector for the 3D electrode model, which is then used for classification, significantly reducing manufacturing cycles. For process recommendation of risers in casting, statistical feature recognition algorithms have been employed to obtain feature descriptors of different castings. Based on these descriptors, similarity between castings is computed, ultimately enabling the recommendation of identical riser designs for similar parts through process database matching. A 3D shape impact descriptor based on the gravitational phenomenon around objects has been proposed, which indirectly captures geometric features and effectively improves 3D object retrieval. Unsupervised clustering algorithms like DBSCAN and spectral clustering have been used to remove outliers and reconstruct 3D features in datasets, solving 3D reconstruction problems for cultural heritage artifacts. By introducing an intelligent process skeleton model to structure data, a similarity analysis model for workpiece objects has been established, mapping machining features to existing macro-processes in a statistical probability manner. Methods converting spatially uneven 3D models into 2D manifold descriptions, followed by geometric rough alignment and precise alignment algorithms, have demonstrated superior performance in describing and retrieving 3D point cloud model shape features. To tackle the difficulty of process reuse for complex castings, an algorithm combining six operators (N2, D2, NaN, Mod, Sym, Env) has been successfully applied to extract feature information from typical complex casting 3D models, with significant improvements in extracting features like hot spots and concavity-convexity compared to single-operator methods. For 3D object feature recognition, methods involving voxelization of 3D models into matrices, followed by convolution and pooling for dimensionality reduction via Convolutional Neural Networks (CNNs), have been developed. Techniques performing SYMPAN pose normalization on different 2D views of a 3D model, then training CNNs on three panoramic views, enable models to quickly capture the feature continuity of 3D models and have been applied across different datasets. Network models like PBP-Net first obtain features of 3D point clouds through 2D convolution on projections, then fuse nine sub-features from the 2D convolutional network via back-projection to achieve 3D feature extraction. A defect prediction system for typical sand casting defects has been developed, combining enterprise data for testing. Based on defect evolution patterns, control ranges for key process parameters were determined, proving the system’s capability for complex 3D structure characterization and defect prediction.
Addressing the challenges that the 3D structure of sand casting parts is complex, difficult to characterize, and the relationship between morphology and casting quality remains unclear, this research conducts a study on quality prediction for complex sand casting parts driven by multi-source heterogeneous data. A deep convolutional autoencoder is constructed to achieve feature extraction from complex 3D casting structures. Subsequently, a quality prediction model driven by both process parameters and 3D heterogeneous data is built to accurately forecast casting defects, holding significant guiding importance for foundry production.
1. Sand Casting Process Analysis and Data Acquisition
1.1 Sand Casting Process Analysis
In today’s global context, casting technology remains irreplaceable as a sustainable manufacturing process. The fundamental characteristics of casting are summarized in Table 1.
| Characteristic | Specific Content |
|---|---|
| Wide Application Range | Not limited by size, thickness, or shape. Mass can exceed 300t. |
| Rich Material Variety | All meltable alloy materials, primarily cast iron, cast steel, and aluminum alloys. |
| High Dimensional Accuracy | Compared to forging and welding. |
| High Economic Benefit | Low cost. |
Casting processes are broadly categorized into sand casting, investment casting, lost foam casting, pressure die casting, low-pressure die casting, centrifugal casting, and permanent mold casting. Among these, sand casting offers the shortest production cycle and the most flexible forming capability. It constitutes approximately 70% of the casting industry and is extensively used in aerospace, engineering machinery, automotive, and rail transportation.
Taking a KW high-pressure molding line in an enterprise as an example, the specific production flow for sand casting parts is as follows: The first step is sand mixing, where green sand for molding is produced by blending coal dust, bentonite, fine powder, new sand, and recycled old sand. The properties of the molding sand (moisture content, compactability, permeability, and green compression strength) are tested batch by batch. Next is molding, where the mixed sand is fed into the molding machine. Through pattern squeezing, specifically using air-flow pre-compaction and squeeze head compaction, the sand is formed into molds with complex cavities. The third step is core making, where sand cores are manufactured according to the designed internal cavity shapes of different 3D castings. Metal melting is one of the core processes in sand casting, as charge composition greatly influences the final product’s performance. The final step is pouring, where sensors record the pouring temperature, pouring time, and inoculant addition amount for each ladle of molten iron in real-time, ensuring consistent pouring quality.
1.2 Defect Analysis in Sand Casting Parts
This study focuses on typical defects in engineering machinery components such as steering axles, slewing frames, and axle housings. The specific morphological structures of these sand casting parts are illustrated below. The steering axle primarily connects the forklift wheel to the frame, transmitting driving force and bearing vehicle loads. The axle housing is a metal shell enclosing gears, protecting them and sealing components, while also bearing loads and providing support. The slewing frame is commonly used for steering and rotation in machinery, needing to withstand equipment weight and external forces to ensure proper steering. All three types of sand casting parts feature complex geometries, and significant 3D structural differences exist between different models of the same type.

During the production of these sand casting parts, four common defects occur: cold shuts, porosity, sand inclusions, and shrinkage cavities. Despite process parameters being controlled within specified ranges, the coupled effects of multiple factors still lead to quality issues, posing challenges for quality management.
1.3 Per-Piece Process Data Acquisition
A per-piece quality traceability solution was designed. Taking steering axle castings as an example, data acquisition focused on metal melting and inspection stages. To achieve per-piece process data collection, modules from the enterprise MES system were referenced, including the core setting record module, spectrometric record module, nodularizing treatment module, internal scrap record module, and external scrap record module. The core setting record module contains key production fields such as production date, core setting time, part number, heat number, and serial number. By using a joint index [core setting time, part number, heat number] from this module to match with [analysis time, part number, sample number] in the spectrometric record module, unique traceability of melting process data for a single sand casting part is achieved. Similarly, associative queries are performed in the nodularizing module and the internal/external scrap record modules to obtain per-piece data information. The key data fields collected for per-piece traceability are summarized in Table 2.
| Process Stage | Key Data Fields Acquired |
|---|---|
| Core Setting | Production Date, Core Setting Time, Part Number, Heat Number, Serial Number |
| Metal Melting & Analysis | Chemical Composition (C, Si, Mn, etc.), Pouring Temperature, Heat Number |
| Nodularizing Treatment | Treatment Time, Inoculant Type & Amount, Magnesium Residual |
| Quality Inspection | Defect Type (Cold Shut, Porosity, etc.), Defect Location, Inspection Result (Pass/Scrap) |
2. Feature Extraction from Complex 3D Structures
2.1 Principle of Feature Extraction Using Autoencoders
The quantitative characterization of 3D information is essentially a method of data dimensionality reduction. The Autoencoder (AE) used in this research, compared to algorithms like Principal Component Analysis (PCA), possesses stronger data processing capabilities. PCA can only handle linear transformations, whereas an autoencoder can manage non-linear transformations, meaning it can reduce the dimensionality of more complex relationships. Furthermore, unlike traditional supervised label-based learning, autoencoders often learn in an unsupervised manner, aiming for self-reconstruction. As shown in Figure 2, when quantifying non-structured data, this form of clustering learning is necessary to automatically discern differences between 3D models, thereby extracting feature data suitable for characterizing the 3D structure.
The autoencoder is introduced for the quantitative characterization of sand casting parts. Leveraging the dimensionality reduction function of the autoencoder, 3D structural features of the casting are obtained. However, traditional linear fully-connected autoencoders cannot handle computations on the voxel grids of 3D castings. Therefore, a 3D Deep Convolutional Autoencoder (3D-DCAE) is employed to replace the fully-connected autoencoder. This model uses 3D convolutional kernels to scan the 3D casting, facilitating the transfer of 3D feature information to the next network layer.
The core operation of a 3D convolutional layer can be represented as:
$$ y_{i,j,k} = \sigma(\sum_{m}\sum_{n}\sum_{p} w_{m,n,p} \cdot x_{i+m,j+n,k+p} + b) $$
where \(x\) is the input voxel grid, \(w\) is the 3D convolutional kernel weight, \(b\) is the bias, \(\sigma\) is the activation function, and \(y\) is the output feature map at position \((i,j,k)\).
2.2 Construction of the Deep Convolutional Autoencoder Model
To address the challenge of quantifying features from 3D models, a deep learning-based autoencoder serves as the model foundation. Convolutional Neural Networks are incorporated to simplify parameter design, constructing the 3D-DCAE model. The voxelized 3D casting data serves as the model’s input. Through processing by 3D convolutional layers, pooling layers, and deconvolutional layers, the model reconstructs the original 3D casting geometry. The difference between the reconstructed object and the original morphology is used as the model’s loss function, and the model is trained using backpropagation. Ultimately, the hidden variable \(h\) from the intermediate layer represents the feature extraction result of the 3D casting morphology, encapsulating the key shape characteristics of the 3D structure. The encoding and decoding process of the 3D-DCAE can be conceptually described as:
$$ h = f(W_e * X + b_e) $$
$$ \hat{X} = g(W_d * h + b_d) $$
where \(X\) is the input voxel grid, \(f\) is the encoder function with weights \(W_e\) and bias \(b_e\), \(h\) is the latent feature vector, \(g\) is the decoder function with weights \(W_d\) and bias \(b_d\), and \(\hat{X}\) is the reconstructed voxel grid. The model is trained to minimize the reconstruction loss \(L\), such as Mean Squared Error: \(L = \frac{1}{N} \|X – \hat{X}\|^2\).
2.3 Model Performance Comparison
Analysis was conducted through intuitive comparison of 3D morphology reconstruction and comparison of 3D feature extraction effectiveness with other autoencoder models. The intuitive reconstruction results are presented via 3D point clouds. The constructed 3D-DCAE model achieved a reconstruction accuracy of 99.76% for 3D morphology. From the generated point clouds, it is evident that the reconstruction of the 3D casting form is excellent, with high-fidelity restoration of both the overall 3D shape and fine details like the hole structures in slewing frames or the curved plates of steering axles. According to autoencoder principles, a higher similarity between the decoded reconstruction from the latent variables and the original data indicates more successful feature extraction from the 3D casting morphology. Therefore, using 3D-DCAE for extracting 3D process features of sand casting parts is feasible.
To further demonstrate the model’s reconstruction capability and feature extraction power, a comparison was made between 3D-DCAE and the 2D Deep Convolutional Autoencoder (2D-DCAE) commonly used in many classic cases. Their difference in network structure is: 2D-DCAE replaces the original 3D casting’s dimensions [depth, height, width] with [channels, height, width], essentially converting depth information directly into convolution channels. This is equivalent to slicing the 3D casting along the first dimension, turning the 3D casting map into a stack of 2D images along the third dimension. Under identical conditions of iteration count, initial learning rate, and number of convolutional/pooling layers, both models were trained on the same 3D data. The training results, specifically the convergence of the reconstruction loss, are summarized in Table 3.
| Model | Final Training Loss | Final Validation Loss | Key Architectural Difference |
|---|---|---|---|
| 3D-DCAE | 0.0024 | 0.0028 | Uses 3D convolutions operating on [depth, height, width]. |
| 2D-DCAE | 0.0157 | 0.0183 | Uses 2D convolutions on slices stacked as channels [channels, height, width]. |
The comparison clearly shows that the 3D-DCAE’s reconstruction effectiveness for 3D castings is significantly superior to that of 2D-DCAE. Analysis indicates that 3D-DCAE’s more powerful 3D reconstruction capability stems from its full consideration of information across all three original dimensions [depth, height, width]. The convolutional kernels scan the entire 3D space of the casting, involving a greater number of network parameters compared to 2D-DCAE. Since 2D-DCAE does not account for information correlations along the depth dimension, 3D-DCAE exhibits a more outstanding fitting performance for the geometry of sand casting parts.
3. Construction of a Defect Prediction Model Driven by Multi-Source Heterogeneous Data
3.1 Topology Construction of the Defect Prediction Model
The first step in the defect prediction model for typical sand casting defects is data preprocessing. This stage involves normalizing the redistributed data and performing label encoding. Normalization scales data into a uniform range, typically [0, 1], for three main purposes: firstly, to accelerate model convergence speed by reducing differences between features and shortening training time; secondly, to improve model accuracy, as inconsistent feature scales can cause the model to lose sensitivity to parameter variations; and thirdly, to prevent issues like gradient explosion or vanishing gradients. The sole textual representation in all sample data is the final defect label description. For this variable, one-hot encoding is used to convert it into numerical data.
The preprocessed data then enters the input layer for convolutional and pooling operations, with specific computations determined by the model topology. This model employs a convolutional neural network combined with a fully connected network, constructing a five-layer framework. Its topology is shown in Figure 6. The first and second layers use a 1D convolutional neural network to perform convolutional scans with a length of 3 on the redistributed data. This process performs weighted summation on data in “local regions” with low correlation while expanding data channels, enriching features for the next layer. The third layer involves max-pooling, which extracts the maximum value from the pooling region and passes it forward, preserving the most salient features while reducing data size to accelerate model convergence. The fourth layer flattens the results from the previous layer into a one-dimensional vector. The fifth layer is the output layer, reducing the one-dimensional vector information to five output values (corresponding to defect classes).
The operation for a 1D convolutional layer in this context can be expressed as:
$$ z^{(l)}_j = \sigma( \sum_{i=1}^{N^{(l-1)}} \text{conv1D}(w^{(l)}_{ij}, a^{(l-1)}_i ) + b^{(l)}_j ) $$
where \(a^{(l-1)}_i\) is the \(i\)-th feature map from layer \(l-1\), \(w^{(l)}_{ij}\) is the 1D kernel connecting it to the \(j\)-th feature map \(z^{(l)}_j\) in layer \(l\), \(b^{(l)}_j\) is the bias, and \(\sigma\) is the activation function.
3.2 Summary of Prediction Model Parameters and Comparative Analysis
The algorithm for model training iteration is also crucial. To accelerate iteration speed and ensure training stability, the mini-batch gradient descent algorithm was selected. During training, the training and test set data are divided into mini-batches of 64 samples each. Optimization is performed using the gradient computed from these 64 samples, which speeds up iteration while retaining most of the common features of the samples. The data split ratios, learning rate, iteration count, and other construction parameters involved in model training are summarized in Table 4.
| Parameter Name | Setting / Content |
|---|---|
| Training Set Ratio | 0.8 |
| Test Set Ratio | 0.2 |
| Initial Learning Rate | 0.01 |
| Number of Epochs | 80 |
| Loss Function | Cross-Entropy Loss + Cost-Sensitive Regularization Term |
| Training Optimization Algorithm | Mini-Batch Gradient Descent |
The constructed defect prediction model was compared with a traditional Multi-Layer Perceptron (MLP) fully-connected network and a traditional Convolutional Neural Network (CNN). The MLP achieved defect prediction accuracies of 92.6% on the training set and 86.1% on the test set. The traditional CNN achieved 93.9% on the training set and 90.7% on the test set. The model developed in this research achieved defect prediction accuracies of 96.5% on the training set and 93.7% on the test set, demonstrating superior predictive performance on both sets compared to the two traditional networks. The performance comparison is detailed in Table 5.
| Model Type | Training Accuracy (%) | Test Accuracy (%) |
|---|---|---|
| Traditional MLP | 92.6 | 86.1 |
| Traditional CNN | 93.9 | 90.7 |
| Proposed Model (FR-CS-CNN) | 96.5 | 93.7 |
This demonstrates that the constructed Feature-Integrated & Cost-Sensitive CNN (FR-CS-CNN) can accurately predict defects in sand casting parts based on both process parameters and 3D structural features, possessing practical application value for quality control in sand casting production.
4. Conclusion
This research addresses the challenges posed by the complex 3D structures of sand casting parts, including characterization difficulties and the unclear relationship between morphology and casting quality. A study on quality prediction for complex sand casting parts driven by multi-source heterogeneous data was conducted, yielding the following outcomes:
- The sand casting process was analyzed, and structured process parameter data from stages like sand mixing, molding, melting, and pouring, along with product 3D structural data, were collected, enabling per-piece quality traceability.
- A deep convolutional autoencoder (3D-DCAE) was constructed, achieving effective feature extraction from the complex 3D structures of sand casting parts and obtaining representative feature data that quantifies geometric morphology.
- A quality prediction model for complex sand casting parts, driven by heterogeneous data integrating both process parameters and 3D structural features, was built. This model accurately predicts defects such as cold shuts, porosity, and shrinkage in sand casting parts, demonstrating superior performance compared to traditional prediction networks.
This integrated data-driven approach provides a powerful tool for understanding and controlling the quality of complex sand casting parts, bridging the gap between geometric design, process execution, and final product integrity.
