In the manufacturing landscape, casting remains an indispensable and sustainable process, distinguished by its unique characteristics as summarized below.
| Characteristic | Specific Content |
|---|---|
| Broad Applicability | Unrestricted by size, thickness, or shape. Mass can exceed 300t. |
| Material Variety | Applies to all meltable alloys, primarily cast iron, steel, and aluminum. |
| High Dimensional Accuracy | Superior to forging and welding processes. |
| High Economic Efficiency | Low-cost production. |
Among various casting methods, sand casting stands out for its short production cycle and exceptional forming flexibility, accounting for approximately 70% of casting production volume. It is widely utilized in aerospace, engineering machinery, automotive, and rail transportation sectors. A typical sand casting production line involves several key processes: sand preparation (mixing coal dust, bentonite, fine powder, new sand, and reclaimed sand to achieve desired properties like moisture, compactability, permeability, and green strength), molding (where sand is compacted into molds with complex cavities using pattern equipment), core making, metal melting (a critical process influencing final product properties), and pouring (where parameters like pouring temperature and time are meticulously recorded).

Despite controlled process parameters, complex castings like steering axles, slewing frames, and axle housings for engineering machinery remain prone to defects such as cold shuts, porosity, sand inclusions, and shrinkage cavities. The root cause is often the complex interplay of numerous factors. A significant challenge in quality analysis within sand casting is the difficulty in quantitatively characterizing the three-dimensional (3D) geometry of a casting. While process parameters significantly influence quality, the product’s 3D structure also profoundly impacts final forming quality. However, the non-structured nature of 3D model data has traditionally excluded morphological analysis from data-driven quality prediction methods. Consequently, understanding why defects preferentially occur at regions with specific geometric features has been elusive. Effectively mining morphological features is therefore crucial for exploring the relationship between casting geometry and forming quality, ultimately leading to improved product reliability.
1. Multi-Source Heterogeneous Data Acquisition for Sand Casting
Accurate prediction requires comprehensive data. In sand casting, relevant data originates from two primary, structurally different sources: structured process parameters and unstructured 3D geometric data. This constitutes a multi-source heterogeneous data environment.
1.1 Acquisition of Structured Process Data
Process data is inherently sequential and multi-factorial, tracing the journey of a specific casting. A per-casting quality tracing solution is designed, focusing on critical stages like metal melting and inspection. This involves correlating data from multiple modules in a Manufacturing Execution System (MES):
- Core Setting Records: Contains production date, core setting time, casting ID, heat number, and serial number.
- Spectrometry Records: Contains analysis time, casting ID, and sample ID.
- Nodularization Treatment Records: Documents spheroidization process parameters.
- Internal & External Scrap Records: Logs defect information for each casting.
By using combined indices like [Core Setting Time, Casting ID, Heat Number] to link with corresponding records in other modules (e.g., [Analysis Time, Casting ID, Sample ID]), a unique set of process data for each individual casting is reconstructed. This per-piece data traceability is foundational for building a precise prediction model.
1.2 Acquisition and Voxelization of 3D Geometric Data
The 3D CAD model of a casting represents its complete geometric information. To make this unstructured data computable for machine learning models, a voxelization process is employed. The 3D model is spatially discretized into a 3D grid of small volumetric pixels, or voxels. Each voxel is assigned a binary value indicating the presence (1) or absence (0) of material. This transforms the complex geometric model into a structured 3D tensor (a multidimensional array), serving as the digital representation of the casting’s morphology. The resolution of this voxel grid is a key parameter, balancing geometric detail with computational cost.
The characteristics of the two data sources are summarized below:
| Data Source | Data Type | Characteristics | Acquisition Method |
|---|---|---|---|
| Process Parameters | Structured (Tabular) | Time-series, multi-variate, numerical/categorical. | MES database query, sensor logs. |
| Casting Geometry | Unstructured (3D Model) | Spatial, topological, implicit feature relationships. | CAD files, converted to voxel tensors. |
2. Feature Extraction from Complex 3D Geometries
The core challenge is to extract meaningful, low-dimensional feature vectors from the high-dimensional voxelized 3D data that encapsulate the shape characteristics relevant to solidification and defect formation.
2.1 Principle of Auto-Encoder Based Feature Extraction
An Auto-Encoder (AE) is an unsupervised neural network designed to learn efficient representations of data. Its objective is to reconstruct its own input. The network consists of two parts:
1. Encoder: Maps the high-dimensional input data $\mathbf{x}$ to a lower-dimensional latent representation (or code) $\mathbf{h}$.
$$ \mathbf{h} = f_{\text{encoder}}(\mathbf{x}; \mathbf{W}_e) $$
2. Decoder: Attempts to reconstruct the original input from the latent code $\mathbf{h}$.
$$ \mathbf{\hat{x}} = g_{\text{decoder}}(\mathbf{h}; \mathbf{W}_d) $$
The model is trained by minimizing a reconstruction loss, such as the Mean Squared Error (MSE):
$$ L(\mathbf{x}, \mathbf{\hat{x}}) = \frac{1}{N} \sum_{i=1}^{N} (x_i – \hat{x}_i)^2 $$
where $N$ is the total number of voxels. Upon successful training, the latent vector $\mathbf{h}$ in the bottleneck layer serves as a compressed, informative feature representation of the input 3D shape. Compared to linear methods like Principal Component Analysis (PCA), AEs can learn non-linear transformations, making them suitable for complex geometric structures. The process is akin to shape clustering, where the model self-discerns geometric differences.
2.2 3D Deep Convolutional Auto-Encoder (3D-DCAE) Model
To process the 3D voxel tensors effectively, we constructed a 3D Deep Convolutional Auto-Encoder (3D-DCAE). This replaces the fully connected layers of a traditional AE with 3D convolutional and pooling layers, which are inherently suited for spatial data. The 3D convolutional kernels scan the volume, preserving spatial hierarchies and local connectivity patterns crucial for shape understanding.
The 3D-DCAE architecture follows a symmetric encoder-decoder structure:
| Layer (Encoder) | Type | Parameters / Output Shape |
|---|---|---|
| Input | 3D Voxel Grid | (Depth, Height, Width, 1) |
| Conv3D + Activation | 3D Convolution | e.g., 32 filters, kernel 3x3x3 |
| Pooling | 3D Max-Pooling | Pool size 2x2x2 |
| … (repeated) | … | … |
| Bottleneck (h) | Latent Vector | Flattened feature vector |
| … (decoder) | 3D UpSampling + Conv3D | … |
| Output | 3D Reconstruction | (Depth, Height, Width, 1) |
The decoder uses 3D transposed convolutions or upsampling layers to reconstruct the volume from the latent code $\mathbf{h}$. Training minimizes the voxel-wise reconstruction error.
2.3 Model Performance and Comparative Analysis
The effectiveness of the 3D-DCAE is evaluated by its reconstruction fidelity and its superiority over alternative methods. The model achieved a reconstruction accuracy of 99.76%. Visually, the point clouds rendered from the reconstructed voxel grids accurately restore the original geometry, including fine details like holes in slewing frames and curved plates on steering axles. This high-fidelity reconstruction confirms that the latent vector $\mathbf{h}$ effectively captures the essential 3D shape features.
A key comparison was made with a 2D-DCAE, a common approach that treats the 3D volume as a stack of 2D slices (channels). The 2D-DCAE reshapes the input to (Channels, Height, Width) and applies 2D convolutions, thus ignoring spatial correlations along the depth dimension. Under identical training conditions, the 3D-DCAE demonstrated significantly superior reconstruction performance and faster convergence, as shown in the loss curve comparison below. This is because the 3D convolutional kernels jointly learn features across all three spatial dimensions, leading to a more holistic and accurate shape representation, which is vital for predicting defects influenced by 3D geometry in sand casting.
3. Defect Prediction Model Driven by Heterogeneous Data
The final step integrates the extracted heterogeneous features—structured process parameters and the 3D geometric latent vector—into a unified defect prediction model.
3.1 Data Preprocessing and Fusion
Before fusion, both data streams are preprocessed:
1. Process Data: Numerical features are normalized to a [0, 1] range to ensure equal scaling and accelerate training. Categorical features are one-hot encoded.
2. 3D Geometric Features: The latent vector $\mathbf{h}$ from the trained 3D-DCAE is used directly as a set of numerical features.
These two preprocessed feature sets are then concatenated to form a single, comprehensive input vector representing both the process history and the shape of the casting for a specific production instance.
3.2 Network Architecture for Integrated Prediction
A hybrid neural network architecture, termed the Feature-Integrated & Cost-Sensitive Convolutional Neural Network (FR-CS-CNN), is constructed for classification. The model topology is designed as follows:
| Layer | Type | Function / Parameters |
|---|---|---|
| Input | Fused Feature Vector | Concatenated [Process Features, 3D Features] |
| Layer 1 & 2 | 1D Convolution + ReLU | Scans local feature correlations, kernel size=3. |
| Layer 3 | 1D Max Pooling | Reduces dimensionality, retains salient features. |
| Layer 4 | Flatten + Dense | Transforms data for final classification. |
| Layer 5 (Output) | Dense + Softmax | Outputs probabilities for 5 classes (4 defects + OK). |
The model is trained using the mini-batch gradient descent algorithm. A critical aspect is the loss function. Since defect classes are often imbalanced (fewer defective samples than OK samples), a standard cross-entropy loss can be biased. Therefore, a Cost-Sensitive Regularization term is added to the cross-entropy loss to penalize misclassifications of the minority (defect) classes more heavily, guiding the model to learn all classes effectively.
$$ L_{\text{total}} = L_{\text{CrossEntropy}} + \lambda \sum_{c \in \mathcal{C}_{\text{defect}}} w_c \cdot \mathbb{I}(y=c) $$
where $w_c$ is a weight for defect class $c$, $\lambda$ is a regularization parameter, and $\mathbb{I}$ is the indicator function.
3.3 Model Performance and Significance
The performance of the proposed FR-CS-CNN model was compared against traditional models using only process data. The results clearly demonstrate the value of integrating 3D geometric information.
| Prediction Model | Training Accuracy | Test Accuracy | Key Limitation |
|---|---|---|---|
| Multilayer Perceptron (Baseline) | 92.6% | 86.1% | Ignores 3D geometry and local feature relations. |
| Traditional CNN (Process-Only) | 93.9% | 90.7% | Learns from process data only. |
| FR-CS-CNN (Proposed) | 96.5% | 93.7% | Fuses process and 3D shape data. |
The superior accuracy of the FR-CS-CNN model on the test set confirms that the features extracted from the casting’s 3D geometry contain significant predictive information for defects like cold shuts and shrinkage, which are highly dependent on local geometry and thermal profiles. This model provides a powerful tool for sand casting enterprises, enabling proactive quality prediction and offering insights into the root causes of defects related to part design.
4. Conclusion
This research addresses the critical challenge of predicting quality in sand casting by developing a holistic, data-driven framework that integrates multi-source heterogeneous data. The main contributions are threefold:
1. A systematic approach for acquiring and aligning per-casting structured process data and unstructured 3D CAD model data was established, forming the essential data foundation.
2. A 3D Deep Convolutional Auto-Encoder was successfully constructed to overcome the difficulty of quantitatively characterizing complex casting geometries. This model effectively extracts compact, informative feature vectors that encode the 3D shape characteristics pertinent to solidification behavior.
3. A novel defect prediction model (FR-CS-CNN) was developed that fuses the extracted 3D shape features with traditional process parameters. By employing a cost-sensitive learning strategy, this model accurately predicts multiple defect types, demonstrating significantly higher accuracy than models based solely on process data.
The proposed methodology moves beyond traditional quality control in sand casting by explicitly linking product geometry to process outcomes. It provides a scalable solution for foundries to leverage their growing digital assets (CAD models, MES data) for predictive analytics, paving the way for more intelligent and proactive manufacturing systems that can optimize both process parameters and product design for superior quality.
