The manufacturing of complex sand casting parts, a cornerstone in industries such as automotive, aerospace, and heavy machinery, faces persistent challenges in ensuring consistent quality. Defects like cold shuts, porosity, sand inclusions, and shrinkage cavities frequently emerge, leading to significant scrap rates, increased costs, and delivery delays. While process parameters from stages like sand mixing, melting, and pouring are known to be critical, the complex three-dimensional (3D) geometry of the sand casting parts themselves is an equally crucial yet underexplored factor. In many foundries, the analysis of defect root causes is hampered by limited digital capabilities, particularly the inability to quantitatively characterize the non-structured 3D model data of sand casting parts. Consequently, traditional data-driven quality analyses often neglect the influence of part morphology, making it difficult to understand why defects consistently appear in specific, geometrically complex regions of a sand casting part. This work aims to bridge this gap by developing a holistic framework that integrates multi-source heterogeneous data—structured process parameters and unstructured 3D geometric features—to accurately predict defects in complex sand casting parts.
The core challenge lies in transforming the intricate 3D shape of a sand casting part into a quantifiable set of features that a predictive model can process. Traditional linear dimensionality reduction techniques like Principal Component Analysis (PCA) are insufficient for capturing the non-linear relationships and spatial hierarchies present in 3D geometries. Recent advancements in deep learning, specifically autoencoders (AEs), offer a powerful solution. An AE is an unsupervised neural network trained to reconstruct its input, learning a compressed, meaningful representation (the latent code) in its bottleneck layer. To effectively handle 3D volumetric data, we construct a 3D Deep Convolutional Autoencoder (3D-DCAE). This model uses 3D convolutional and pooling layers to efficiently scan and encode the spatial features of a voxelized sand casting part. The network’s topology is designed to progressively reduce spatial dimensions while expanding feature channels, ultimately producing a compact latent vector h that encapsulates the essential geometric characteristics of the sand casting part.
The architecture of our proposed 3D-DCAE consists of symmetric encoder and decoder paths. The encoder uses consecutive blocks of 3D convolutional layers (with ReLU activation) and 3D max-pooling layers to compress the input voxel grid X (e.g., of dimension 64x64x64) into the latent space representation h. The decoder mirrors this process using 3D transposed convolutional layers (or upsampling followed by convolution) to reconstruct the original input X’ from h. The model is trained by minimizing the reconstruction error between X and X’. The loss function, typically Mean Squared Error (MSE), is defined as:
$$ L_{recon} = \frac{1}{N} \sum_{i=1}^{N} || X_i – X’_i ||^2 $$
where N is the number of training samples. A high reconstruction accuracy signifies that the latent vector h has successfully learned the defining features of the sand casting part’s geometry.
To validate the feature extraction capability of our 3D-DCAE, we compare its performance against a 2D-DCAE baseline. The 2D-DCAE treats the 3D volume as a stack of 2D slices along one axis, thereby losing inter-slice spatial correlations. The 3D-DCAE, with its true volumetric processing, demonstrates superior performance. The quantitative comparison is summarized below:
| Model | Reconstruction Accuracy | Key Advantage |
|---|---|---|
| 2D-DCAE | ~95.2% | Simpler architecture, faster training. |
| 3D-DCAE (Proposed) | ~99.76% | Preserves full 3D spatial context, leading to more accurate feature encoding for sand casting parts. |
The high-fidelity reconstruction visually confirmed that even fine details like thin walls, internal passages, and complex curvature of sand casting parts were well-preserved in the decoded output, proving the efficacy of the extracted latent features h.
The foundation of any data-driven model is robust data acquisition. For this study, we focus on a green sand casting process for heavy-duty machinery components. The data collection strategy is twofold: capturing structured process parameters and unstructured 3D models.
1. Structured Process Data Acquisition: A key requirement for precise analysis is traceability at the single-casting level. We implement a data lineage solution that links each individual sand casting part to its specific production conditions. This is achieved by correlating records across different manufacturing execution system (MES) modules using unique identifiers like casting ID, heat number, and time stamps. The critical process parameters collected for each sand casting part are categorized below:
| Process Stage | Collected Parameters (Examples) | Impact on Quality |
|---|---|---|
| Sand Preparation | Moisture content, compactability, green strength, permeability (measured per batch). | Directly affects mold stability, gas evolution, and metal-mold interaction. |
| Melting & Treatment | Chemical composition (C, Si, Mn, etc., from spectrometry), inoculation amount, treatment temperature. | Determines final metallurgical properties and shrinkage behavior. |
| Pouring | Pouring temperature, pouring time, ladle ID. | Critical for fluidity, feeding efficiency, and thermal gradients. |
| Inspection | Defect type (label: cold shut, porosity, etc.), location, severity. | Forms the target variable for the predictive model. |
2. Unstructured 3D Data Acquisition: The CAD models of the sand casting parts, such as steering axles, slewing frames, and axle housings, are collected. These models are pre-processed by aligning them to a standard coordinate system and converting them into a binary voxel grid representation (where 1 indicates metal and 0 indicates air). This volumetric representation serves as the direct input to the 3D-DCAE for feature extraction.
With the heterogeneous data sources prepared, the next step is to build the integrated quality prediction model. The process involves two main streams that converge into a unified predictive classifier.
Stream 1: Geometric Feature Extraction. The voxelized 3D model of a sand casting part is fed into the pre-trained 3D-DCAE. The encoder part of the network processes the input and outputs the latent vector h. This vector, typically of length 128 or 256, is the distilled numerical representation of the sand casting part’s shape complexity, including features related to wall thickness variations, thermal modulus, and geometric constraints that influence solidification and flow. This vector is extracted and saved for each sand casting part in the dataset.
Stream 2: Process Data Preprocessing. The structured process parameters for each sand casting part are assembled into a feature vector p. This vector undergoes normalization to scale all parameters to a common range [0, 1], ensuring stable and efficient model training. The defect label (e.g., “porosity,” “sound”) is encoded using one-hot encoding, creating the target vector y.
Model Fusion and Architecture. The geometric feature vector h and the process parameter vector p are concatenated to form a comprehensive input feature vector [h; p] for the final classifier. We construct a hybrid neural network classifier, which we term the Feature-Enhanced Cost-Sensitive Convolutional Neural Network (FR-CS-CNN).
The architecture of the FR-CS-CNN is as follows:
- Input Layer: Receives the concatenated feature vector [h; p].
- 1D Convolutional Blocks (x2): Two layers of 1D convolutional filters scan the combined feature set. This allows the model to learn local correlations and interactions between geometric and process features, which is more powerful than simple concatenation followed by fully connected layers. The operation for a single filter is:
$$ z_{l} = \sigma(W_{l} * a_{l-1} + b_{l}) $$
where $*$ denotes the 1D convolution operation, $W$ and $b$ are weights and biases, $a$ is the activation from the previous layer, and $\sigma$ is the ReLU activation function. - Max Pooling Layer: Reduces dimensionality and provides translational invariance for the learned local patterns.
- Flatten Layer: Converts the output of the convolutional/pooling layers into a one-dimensional vector.
- Output Layer: A fully connected layer with a softmax activation function that outputs the probability distribution over the possible defect classes (including a “sound/no defect” class).
A critical aspect of training for imbalanced defect data is the loss function. We employ a Cross-Entropy Loss with a Cost-Sensitive Regularization term. This penalizes misclassifications of rare but critical defects more heavily, improving the model’s sensitivity to minority classes.
$$ L_{total} = -\frac{1}{N} \sum_{i=1}^{N} \sum_{c=1}^{C} w_{c} \cdot y_{i,c} \log(\hat{y}_{i,c}) $$
where $C$ is the number of defect classes, $y_{i,c}$ is the true label, $\hat{y}_{i,c}$ is the predicted probability, and $w_{c}$ is a class-weight inversely proportional to the frequency of class $c$ in the training data.
The model is trained using the Adam optimizer with a mini-batch gradient descent strategy. The key hyperparameters are summarized below:
| Parameter | Value/Rule |
|---|---|
| Training/Test Split | 80% / 20% |
| Initial Learning Rate | 0.01 (with decay) |
| Batch Size | 64 |
| Epochs | 80 |
| Optimizer | Adam |
| Loss Function | Weighted Categorical Cross-Entropy |
To evaluate the contribution of integrating 3D geometric features, we compare our proposed FR-CS-CNN model against two baseline models trained solely on process parameters: a standard Multi-Layer Perceptron (MLP) and a traditional 1D-CNN. The performance is evaluated on a held-out test set comprising unseen sand casting parts.
| Model | Training Accuracy | Test Accuracy | Key Limitation |
|---|---|---|---|
| MLP (Baseline) | 92.6% | 86.1% | Cannot model complex feature interactions; prone to overfitting. |
| 1D-CNN (Baseline) | 93.9% | 90.7% | Learns local patterns in process data but lacks shape context. |
| FR-CS-CNN (Proposed) | 96.5% | 93.7% | Integrates shape and process data, achieving superior generalization for complex sand casting parts. |
The significant improvement in test accuracy (from 90.7% to 93.7%) demonstrates the vital information encoded in the 3D geometry of sand casting parts. The model successfully learns relationships such as how specific thermal profiles (from process data) interact with localized thick sections or isolated geometries (from 3D features) to promote shrinkage, or how metal fluidity interacts with complex thin-walled networks to cause cold shuts.
The confusion matrix analysis for the FR-CS-CNN model on the test set further reveals its strong performance across different defect types for sand casting parts. The model shows particularly high precision and recall for ‘Porosity’ and ‘Shrinkage’ defects, which are often closely tied to the geometric features it extracts. This confirms that the framework effectively addresses the initial problem of determining the relationship between part morphology and the formation of quality defects in sand casting parts.
This research presents a comprehensive framework for quality prediction in complex sand casting parts by integrating multi-source heterogeneous data. The main contributions are threefold. First, we established a methodology for acquiring and fusing traceable, single-casting-level process data with the unstructured 3D CAD models of sand casting parts. Second, we developed a 3D Deep Convolutional Autoencoder that effectively quantifies the complex 3D geometry of sand casting parts into a compact, meaningful feature vector, solving the long-standing problem of characterizing part morphology in a data-driven context. Finally, we constructed and validated a hybrid neural network model (FR-CS-CNN) that leverages both process parameters and extracted 3D shape features to achieve high-accuracy defect prediction. The model’s superior performance compared to process-only baselines unequivocally proves that the 3D structure of a sand casting part is a critical determinant of its quality outcome. This integrated approach provides foundries with a powerful tool for proactive quality control, enabling the prediction and potential mitigation of defects based on both the design of the sand casting part and its planned production route.

