Shot-to-Defect Traceability in HPDC: The Data Link Foundry AI Needs
- Castella

- Aug 24
- 5 min read
Short answer: Foundry AI should not learn from process data until each inspected part can be linked to its exact casting shot, cavity, material context and inspection result. The essential chain is shot ID → part or cavity ID → downstream route → quality event. If any link is ambiguous, that record should be quarantined rather than treated as evidence.
A model can be mathematically sophisticated and still learn the wrong process relationship. In HPDC, the first model is therefore not the machine-learning algorithm. It is the traceability model that defines which physical part belongs to which process history.
Why shot-level data alone is not enough
A cold-chamber machine may record plunger velocity, changeover positions, intensification pressure, final pressure, cycle time and alarm states for every shot. Peripheral systems may add vacuum, spray, thermal-control-unit and furnace data. Quality appears later: after trimming, machining, washing, leak testing, X-ray, dimensional inspection or metallographic review.
The AI training row is valid only when those two sides describe the same physical unit.
This becomes critical with multi-cavity dies. One shot can create two or more parts, yet a leak or X-ray result may apply to only one cavity. If a shot receives one shared label, the model can punish a sound cavity for a defect in its neighbour—or learn a diluted average that corresponds to neither part.
A recent industrial HPDC study linked downstream leak-test and end-of-line results to individual castings with a data-matrix code applied immediately after casting. The authors also exposed an important limitation: parts automatically rejected by machine tolerance rules often never reached downstream inspection, leaving missing quality labels exactly where abnormal process conditions occurred. That is a traceability and sampling problem before it is a modelling problem.
The minimum evidence chain
For each learning unit, retain these linked records:
Production identity: immutable shot ID, machine or cell ID, die ID, die revision, part number, cavity number and production order.
Part identity: data-matrix, serial or carrier ID assigned as early as practical; record any split, merge or re-identification event.
Time context: source timestamp, time zone, clock source and synchronization status. Preserve raw times; do not silently rewrite them.
Material context: alloy specification, furnace or crucible, melt and dosing temperatures where measured, ingot or return-metal lot, treatment events and sampling time.
Process evidence: setpoints and measured values, shot curves when available, vacuum, spray, cooling-circuit and thermal-control data, plus units and signal definitions.
Operating state: start-up, steady production, restart, maintenance trial, sensor replacement, recipe revision and known abnormal event.
Quality event: inspection method, measured value, pass/fail rule, defect taxonomy, location, severity, inspector or system, gauge or program revision and calibration status.
Disposition: accepted, reworked, scrapped, diverted, not inspected or result unknown. “Not inspected” is not the same as “good.”
This extends Castella’s minimum data model for HPDC and LPDC from collection to evidence lineage.
Seven steps to build a reliable shot-to-defect link
1. Define the learning grain
Decide whether the row represents a shot, cavity-specific casting, machined component, sample coupon or batch. For multi-cavity HPDC, part or cavity level is usually the minimum grain for part-level quality prediction.
2. Create identifiers at the source
Generate the shot ID in one authoritative system. Attach the part ID before buffers, trimming or manual handling can change sequence. Never reconstruct identity later from row order alone.
3. Synchronize clocks and keep uncertainty
Machine, robot, furnace, leak tester and MES clocks can drift. Record synchronization status and an acceptable matching window. If identity relies partly on time, calculate match confidence and reject ambiguous joins.
4. Preserve cavity and route
Record which cavity produced the part and every routing event. Rework loops, offline inspection, skipped operations and buffer accumulation must remain visible. Sequence-based joins fail when even one part is diverted.
5. Append quality events
Do not overwrite an early visual result with a later leak or X-ray decision. Store quality as an event history with method, time and rule revision. This lets engineers distinguish surface, internal, dimensional and machining outcomes.
6. Reconcile before training
For every training extract, report matched, unmatched, duplicate and conflicting records. Sample the joins manually. Quarantine uncertain rows. A smaller verified dataset is more useful than a larger dataset with unknown identities.
7. Validate on future production
Split evaluation data by time, die campaign or operating state—not only by random rows. Freeze the identifier rules, feature definitions and quality taxonomy with the model version. When the data contract changes, apply the model-drift and retraining gate.
Three failure modes that create false confidence
Cavity collapse: cavity A and cavity B receive the same shot-level label although only one part failed.
Clock-and-buffer mismatch: the leak tester result is joined to the nearest machine timestamp after a line stop, but the conveyor buffer changed the sequence.
Inspected-survivor bias: machine-rejected parts are absent from end-of-line inspection. The model sees verified labels mainly inside the old tolerance window and becomes least informed outside it.
The repair is not automatic imputation. First make the missingness explicit, identify why a label is absent and decide whether a controlled inspection plan is needed.
Modelled HPDC example—not a customer result
Consider a two-cavity aluminum housing. The machine stores one shot curve, the robot creates two part records, and leak testing occurs after machining. The team initially joins by production order and minute-level timestamp. After a restart, four castings wait in a buffer and the join shifts by one part.
A trustworthy redesign assigns one immutable shot ID, derives two cavity-specific part IDs, scans each part at machining and leak testing, and stores unmatched results in quarantine. The AI is trained only after reconciliation shows that identity, cavity and inspection rule are complete. This is a modelled workflow, not a reported Castella deployment or performance claim.
Evidence boundaries and engineering judgment
Traceability proves data lineage; it does not prove causality. A correct link can still contain a subjective visual label, a changed leak threshold, an uncalibrated gauge or a defect introduced during machining. Research in magnesium HPDC explicitly notes that later visual inspection may contain subjective errors, while also demonstrating the value of cycle-based machine, die, peripheral and alloy records.
NIST’s 2026 smart-manufacturing roadmap likewise treats data management, heterogeneous-system integration and trustworthy operation as continuing deployment challenges. OPC UA can support interoperable machine information exchange, but a protocol does not decide the foundry’s part identity, defect taxonomy or approval rules.
My practical rule is simple: no recommendation should become more confident than the evidence chain that produced its label. Castella’s role is to organize that chain, expose gaps and support bounded engineering decisions—not to convert uncertain records into false certainty. Parameter changes should still remain inside a validated HPDC process window.
Frequently asked questions
Can timestamps replace a part identifier?
Only in tightly controlled flows with verified clock synchronization, known buffer behaviour and explicit match-confidence rules. A direct part or carrier identifier is safer.
Should every casting be X-rayed?
Not necessarily. Inspection plans depend on risk, specification and economics. But sampled or delayed results must be linked without ambiguity, and uninspected parts must not be labelled as good.
How should reworked parts be labelled?
Keep the original quality event, the rework event and the final result. Do not overwrite history. The model target must state whether it predicts as-cast quality, final disposition or another defined outcome.
When is a dataset ready for AI training?
When identity coverage, cavity coverage, timestamp integrity, unit consistency, label definitions, missingness and conflict rates have been measured and accepted by responsible process and quality engineers.




Comments