Rela AIRela AI Docs
Quality

Statistical Process Control (SPC)

Complete SPC guide — what it is, what it's for, how to interpret control charts, detection rules, and process capability indices in Rela AI.

What is SPC?

Statistical Process Control (SPC) is a methodology that uses statistical tools to monitor and control a production process. Its goal is to detect abnormal variations before they produce defective products.

Imagine a production line filling bottles with 500 ml of liquid. In practice, each bottle will have a slightly different amount: 499.8 ml, 500.3 ml, 500.1 ml. That's natural variation and it's inevitable. But if suddenly a bottle comes out with 495 ml, something changed in the process — a clogged nozzle, a misaligned pump, a raw material change. That's a special cause variation (or assignable cause), and SPC helps you detect it in real time.

Why does it matter?

  • Prevention vs. inspection: Instead of checking every finished product, SPC detects problems while the process is running
  • Cost savings: Catching a deviation in time prevents entire batches of out-of-spec product
  • Regulatory compliance: Industries like food (HACCP), automotive (IATF 16949), pharmaceutical (FDA/GMP), and general manufacturing (ISO 9001) require process control evidence
  • Continuous improvement: SPC data feeds evidence-based improvement decisions, not gut feelings

Fundamental concepts

Natural variation vs. special cause variation

Every process has two types of variation:

TypeDescriptionExampleAction
Natural (common cause)Inherent to the process, predictableSmall ambient temperature fluctuationsNo action needed — it's part of the process
Special (assignable cause)Something changed, unpredictableA new operator, a worn tool, different raw materialInvestigate and fix the root cause

SPC distinguishes between them using statistically calculated control limits.

Subgroups

A subgroup is a set of measurements taken at the same time (or within a very short period). For example, measuring the diameter of 5 consecutive parts every hour. In Rela AI, you record subgroups manually or receive them automatically from your sensors.

Control limits vs. specification limits

Understanding this difference is critical:

ConceptWho defines it?What does it mean?
Control limits (UCL/LCL)The process data (statistics)What the process actually does — its natural behavior
Specification limits (USL/LSL)The customer or standardWhat the process should do — product requirements

A process can be "in control" (within its control limits) but still produce out-of-spec parts if its capability is insufficient. That's why you need both control charts and capability indices.

Control charts

Control charts are the primary visual tool of SPC. They display process data over time with three reference lines:

  • UCL (Upper Control Limit): the statistical ceiling at 3 sigma
  • CL (Center Line): the process mean
  • LCL (Lower Control Limit): the statistical floor at 3 sigma

When a point falls outside these limits, or the points show a non-random pattern, the process is "out of control" (OOC — Out Of Control).

Chart types in Rela AI

ChartFull nameWhen to use it?Subgroup size
X-bar RMean and RangeContinuous data (weight, temperature, dimension) with small subgroups2–10 measurements
X-bar SMean and Standard DeviationContinuous data with large subgroups>10 measurements
I-MRIndividuals and Moving RangeSingle measurement per time (batches, destructive tests)1 measurement
pProportion defectivePercentage of defective units per batchVariable
npNumber defectiveCount of defective units (fixed sample size)Fixed
cCount of defectsTotal defects per unit (e.g., scratches per part)1 unit
uDefects per unitDefect rate when sample size variesVariable

How to choose the right chart?

  1. Are your data continuous (measurable) or attribute (pass/fail)?
    • Continuous → X-bar R, X-bar S, or I-MR
    • Attribute → p, np, c, or u
  2. If continuous, how many measurements per subgroup?
    • 1 measurement → I-MR
    • 2 to 10 → X-bar R
    • More than 10 → X-bar S
  3. If attribute, are you counting defectives or defects?
    • Defectives (pass/fail) → p or np
    • Defects (count) → c or u

Creating a chart in Rela AI

From the SPC dashboard, click "Create chart" and fill in:

  • Name: a descriptive identifier (e.g., "Main shaft diameter")
  • Chart type: select based on the guide above
  • Source: the data source (sensor, machine) that will feed the chart
  • Metric: the variable you want to monitor (e.g., temperature, pressure, diameter)

Control limit formulas

Limits are calculated automatically. Here are the reference formulas:

X-bar R

LimitFormulaDescription
UCLX̄̄ + A₂ × R̄Grand mean + factor × average range
CLX̄̄Grand mean of subgroup means
LCLX̄̄ − A₂ × R̄Grand mean − factor × average range

Where A₂ is a statistical factor that depends on subgroup size (tabulated in ASTM E2587).

X-bar S

LimitFormula
UCLX̄̄ + A₃ × S̄
CLX̄̄
LCLX̄̄ − A₃ × S̄

I-MR (Individuals)

LimitFormula
UCLX̄ + E₂ × MR̄
CL
LCLX̄ − E₂ × MR̄

Where E₂ = 2.660 and MR̄ is the average moving range.

You don't need to calculate these manually. Rela AI computes them automatically once you record enough subgroups (20-25 subgroups recommended for stable limits).

Out-of-control detection rules

Rela AI implements two standardized rule sets to detect abnormal patterns.

Western Electric rules (WE)

RulePattern detectedSeverity
WE11 point beyond 3σHigh — immediate alarm
WE22 of 3 consecutive points beyond 2σ (same side)Medium — warning
WE34 of 5 consecutive points beyond 1σ (same side)Medium — warning
WE48 consecutive points on the same side of center lineLow — investigate trend

Nelson rules (NR)

RulePattern detectedInterpretation
NR11 point beyond 3σOut-of-control point (equivalent to WE1)
NR29 consecutive points on the same side of CLProcess mean shift
NR36 consecutive points trending (up or down)Trend or progressive wear
NR414 consecutive points alternating up/downOver-adjustment or two mixed processes

What to do when a rule triggers?

  1. Don't adjust the process automatically — investigate first
  2. Check if the point is a measurement error or incorrect data
  3. Look for the root cause: did an operator change? Did a raw material batch run out? Was there a recent adjustment?
  4. If the cause is real, correct it and document the action
  5. If it was a false alarm, document why and continue

Rule violations do not necessarily indicate a defect. Each violation must be investigated to determine whether it represents a real assignable cause or a false alarm.

Process capability indices

Capability indices answer the question: Is my process capable of meeting specifications?

Main indices

IndexWhat does it measure?Simplified formulaTarget
CpPotential capability (ignores whether the process is centered)(USL − LSL) / 6σ≥ 1.33
CpkActual capability (considers process centering)Min of (USL − μ) / 3σ and (μ − LSL) / 3σ≥ 1.33
PpPotential performance (uses total standard deviation, long-term)(USL − LSL) / 6s≥ 1.33
PpkActual performance (long-term, considers centering)Min of (USL − μ) / 3s and (μ − LSL) / 3s≥ 1.33
Sigma levelHow many standard deviations fit between the mean and the nearest limit3 × Cpk≥ 4.0

How to interpret the values?

Cpk valueMeaningEquivalent quality
< 1.00Incapable process — frequent defectsMore than 2,700 defects per million (PPM)
1.00–1.33Marginal process — meets spec but with little margin64–2,700 PPM
1.33–1.67Capable process — acceptable margin0.6–64 PPM
> 1.67Excellent process — wide safety marginLess than 0.6 PPM

Cp and Cpk use the within-subgroup standard deviation (short-term). Pp and Ppk use the total standard deviation (long-term). If Cp ≈ Pp, the process is stable. If Cp >> Pp, there's between-batch variation not visible within each subgroup.

Process drift detection

Rela AI automatically detects when a process is drifting from its target:

  • Mean shift: the process mean moves more than 1.5σ from target
  • Capability drop: Cpk indices fall below the configured threshold
  • Sustained trend: linear regression detects a significant slope in recent subgroups

When drift is detected, the system generates a notification for the quality team to investigate before the process goes out of specification.

Typical workflow

  1. Configure: Create a control chart by selecting the data source, chart type, and metric
  2. Collect data: Record subgroups manually or connect your sensors for automatic ingestion
  3. Calculate limits: With 20-25 subgroups, Rela AI calculates control limits automatically
  4. Monitor: Check the SPC dashboard to see each chart's status, active violations, and capability indices
  5. Act: When a violation is detected, investigate the root cause and take corrective action
  6. Improve: Use historical data to identify process improvement opportunities

SPC dashboard

The Rela AI dashboard shows:

  • Summary: count of active charts and total OOC violations
  • Charts table: name, type, source, metric, status, and last subgroup for each chart
  • Detail view: visual control chart with the last 30 subgroups, capability indices (Cp, Cpk, Pp, Ppk), rule violations table, and a form to record new subgroups
  • Deletion: from the detail view, you can delete a chart and all its associated subgroups

Quick SPC glossary

TermMeaning
OOCOut Of Control — point or pattern outside statistical control
UCL / LCLUpper/Lower Control Limit — limits calculated at ±3σ
USL / LSLUpper/Lower Specification Limit — customer or standard requirements
CLCenter Line — process mean
Cp / CpkShort-term capability indices
Pp / PpkLong-term performance indices
SubgroupSet of measurements taken at the same time or short period
Assignable causeIdentifiable and correctable variation (≠ natural variation)
Sigma (σ)Standard deviation — measures process spread

On this page