Quality Control
SPC, Six Sigma & AI-Powered Defect Detection
The Cost of a Bad Part
A single defective turbocharger housing leaves a Tier 1 automotive supplier's plant in Michigan. It passes through assembly at the OEM and makes it into a production vehicle. Three months later, a field failure. The recall costs the supplier $4.2 million — inspection, replacement, logistics, warranty claims, and the hardest cost to quantify: customer confidence. The root cause? A machining parameter drifted 0.015 mm over two shifts, and the control chart was only reviewed at end of shift. An AI system monitoring in real time would have flagged the drift within 20 parts.
Quality is not just about catching defects — it is about preventing them. This chapter covers the foundational tools of quality engineering (SPC, FMEA, Six Sigma) and shows how AI amplifies each one, turning reactive quality inspection into proactive quality assurance.
Statistical Process Control (SPC)
SPC is the practice of using control charts to monitor process stability. Developed by Walter Shewhart at Bell Labs in the 1920s, it remains the backbone of manufacturing quality worldwide. Every IATF 16949 (automotive) and AS9100 (aerospace) certified facility runs SPC on critical characteristics.
Control Chart Basics
A control chart plots individual measurements (or subgroup averages) over time against three reference lines:
As long as points fall randomly between UCL and LCL with no patterns, the process is "in statistical control." When points fall outside the limits or show non-random patterns (trends, runs, clusters), something has changed — and it needs investigation.
Western Electric Rules
Beyond simple limit violations, SPC uses pattern rules to detect subtle shifts:
| Rule | Pattern | Indicates |
|---|---|---|
| Rule 1 | One point beyond 3-sigma | Obvious special cause |
| Rule 2 | Two of three points beyond 2-sigma (same side) | Process shift beginning |
| Rule 3 | Four of five points beyond 1-sigma (same side) | Small sustained shift |
| Rule 4 | Eight consecutive points on same side of centre | Process mean has shifted |
| Rule 5 | Six points in a row steadily increasing or decreasing | Trend (tool wear, drift) |
AI Enhancement of SPC
Traditional SPC requires a human to review charts, spot patterns, and investigate. AI automates this entirely:
Process Capability: Cp and Cpk
Control charts tell you if the process is stable. Capability indices tell you if it is good enough.
Cp (Process Capability)
Cp measures the spread of the process relative to the specification width:
Cp = (USL - LSL) / (6 x sigma)
A Cp of 1.0 means the process spread exactly fills the specification. A Cp of 1.33 (the minimum for most automotive and aerospace requirements) means the specification is 33% wider than the process spread — providing a safety margin.
Cpk (Process Capability Index)
Cpk accounts for how centred the process is within the specification:
Cpk = minimum of [(USL - mean) / (3 x sigma), (mean - LSL) / (3 x sigma)]
A process can have a high Cp (narrow spread) but low Cpk (off-centre). Cpk is always the number customers and auditors want to see.
| Cpk Value | Meaning | Defect Rate |
|---|---|---|
| 0.67 | Marginal | ~4.6% (46,000 ppm) |
| 1.00 | Minimum acceptable | ~0.27% (2,700 ppm) |
| 1.33 | Automotive standard | ~63 ppm |
| 1.67 | Aerospace / safety critical | ~0.6 ppm |
| 2.00 | Six Sigma target | ~0.002 ppm |
Open data/production-log.csv in the code panel. You will find 500 measurements from a CNC turning operation — bore diameter on a hydraulic valve body. Calculate the Cp and Cpk yourself, or ask AI to do it. Notice how the process drifts after measurement 350 — that is when the tool insert was wearing. AI would have flagged the trend at measurement 310 and recommended tool change.
Six Sigma DMAIC
Six Sigma is a structured methodology for process improvement, used extensively at GE, Honeywell, 3M, Caterpillar, and across the Fortune 500. DMAIC provides a five-phase framework:
| Phase | Purpose | AI Role |
|---|---|---|
| Define | Define the problem, scope, and goals | AI analyses historical data to quantify the problem and set data-driven targets |
| Measure | Establish baseline capability (Cpk) | AI automates gauge R&R, capability studies, and measurement system analysis |
| Analyse | Identify root causes | AI runs multi-variable correlation, DOE analysis, and pattern detection across process data |
| Improve | Implement and validate solutions | AI models predict the effect of parameter changes before implementation |
| Control | Sustain the improvement | AI monitors control charts and alerts on regression — the "autopilot" phase |
FMEA: Failure Mode and Effects Analysis
FMEA is a systematic method for identifying potential failure modes, their effects, and their causes — then prioritizing them for action. Required by IATF 16949 and widely used in aerospace (AS9100), medical devices (ISO 13485), and process industries.
Risk Priority Number (RPN)
Each potential failure mode is scored on three dimensions:
RPN = S x O x D (range 1-1000, higher = more critical)
AI enhances FMEA by:
OEE: Overall Equipment Effectiveness
OEE is the gold standard metric for manufacturing productivity. It combines three factors:
OEE = Availability x Performance x Quality
| Factor | Calculation | World-Class Target |
|---|---|---|
| Availability | (Run time) / (Planned production time) | > 90% |
| Performance | (Actual output) / (Theoretical max output at run speed) | > 95% |
| Quality | (Good parts) / (Total parts produced) | > 99.9% |
World-class OEE is considered to be 85% or higher. The average across US manufacturing is closer to 60%. AI identifies the specific losses dragging OEE down — whether it is changeover time (availability), minor stoppages (performance), or scrap (quality) — and prioritises improvement efforts by financial impact.
Open data/defect-catalog.json in the code panel to explore a catalog of 40 common manufacturing defect types across machining, welding, casting, and assembly — each with typical root causes, detection methods, and AI-recommended prevention strategies.
Key Takeaways
This is chapter 4 of AI for Engineers (Global).
Get the full hands-on course — free during early access. Build the complete system. Your projects become your portfolio.
View course details