Before requesting an SPC anomaly detection AI system, can your team say which process is measured, what constitutes one observation, and who acts on a signal? Replacing a control limit with an AI threshold can produce alert fatigue or missed product risk. This guide explains how a Thailand factory can establish a statistical process control (SPC) baseline and add a carefully evaluated secondary signal. Its focus is process drift and action after an alert, rather than a broad AI quality program or camera based pass/fail inspection.
Define what “anomaly” means before deploying SPC anomaly detection AI
A control chart plots measurements over time against a center line and upper and lower control limits. ASQ explains that those lines come from historical data; the NIST/SEMATECH handbook describes SPC as comparing current conditions with the earlier process so that corrective action can be signaled. An out of control signal is not the same as an out of specification product. The process can change while measurements still meet customer specifications. A process can also be statistically stable yet have insufficient capability relative to a specification. An AI project fails at the first step if it treats all these events as one label.
Separate at least three kinds of anomaly. Measurement anomalies include a failed sensor, missing record, wrong unit or stale calibration. Process anomalies include a shift in center or spread caused by tool wear, temperature or material. Product anomalies concern the acceptance specification and possible shipment. Adjusting a machine in response to a broken sensor may worsen a sound process. Waiting for a product defect before investigating drift loses the opportunity for early action. Product anomalies require clear containment and release authority, not only a colored dashboard.
AI should not replace a well defined single variable chart. It may provide a secondary warning when, for example, temperature and pressure together depart from the normal combination although each alone stays inside its control limits. First establish the process unit, measurement system and reaction plan. A model score without a proposed check cannot tell the operator what to do.
Keep control limits and specification limits distinct
Control limits describe variation derived from the process history. Specification limits express design or customer requirements. Suppose, only as an illustrative hypothetical, that a dimension is specified as 9.90–10.10 mm while control limits estimated from a stable period are 9.96–10.04 mm. A 10.05 mm observation may satisfy the specification but signal a change in the process. Neither range is a universal threshold. Show the two sets of limits with separate labels and colors and record whether a message means “control chart signal” or “specification breach.”
An alert begins a quality decision
Before linking a signal to equipment shutdown, scrap or automatic quarantine, assess process and product risk. A supervisor may need to verify the measurement, hold identified products, inspect the equipment and authorize restart. If a high risk process requires automatic stopping, define the boundary with existing safety circuits and interlocks; a probability score alone is not a safety design. Name the person who reads a notification, the person who makes the disposition and the person who may release the hold.
Fix the process unit and rational subgroup
SPC control chart anomaly detection depends on explaining what each observation represents. Five consecutive pieces from one machine, cavity and recipe are different from an average assembled across shifts. The data definition should include the measured characteristic, position, unit, sampling interval, subgroup rule, missing data treatment and instrument ID. NIST treats monitoring and capability as related but separate questions.
For injection molded part weight, review cavity distributions before pooling cavities. For a furnace, distinguish heat up, soak and cool down rather than applying one baseline to every phase. For seal strength, note head number, film lot and line speed. Pooling unlike operating conditions can widen limits and hide change. Splitting into too many tiny groups can make baseline estimation unreliable. Production and quality specialists must approve the physical rationale for subgrouping.

| Definition | Field question | Illustrative entry only |
|---|---|---|
| Process unit | Which machine, cavity and recipe share a baseline? | Line A, Cavity 2, Recipe R1 |
| Subgroup | How many items and how often? | Five consecutive items every 30 minutes |
| Measurement | Who measures where with which device? | Gauge G-02 at the exit |
| Data quality | How are missing and repeated readings distinguished? | Preserve original and reason code |
| Change trigger | When is the baseline reconsidered? | Approved material, tool or recipe change |
Every value in the example column is hypothetical, not a prescribed sample size or frequency. Set the actual approach by considering process speed, measurement independence, inspection cost and the effect of a hold.
Verify the measurement system first
Clock drift, inadequate sensor resolution, expired calibration and operator differences can look like process variation. Before training a model, inspect missing data, repeat measurements and instrument replacement records. Do not automatically delete extreme values: they may be the special causes the project is supposed to find. Preserve the raw reading, corrected reading, accepted reading and the reason for any exclusion. Paper records also require checks for rounding, units, date format and shifts that cross midnight.
Across PLCs and inspection systems, time synchronization becomes an implementation requirement. The link between process and quality observations may need order, lot, machine, recipe and time window together. Headquarters and a Thai plant also need agreement on time zone, permissions, language and approval history. Our three layer quality data management guide covers the broader record, link and analyze architecture. This article concentrates on the SPC decision placed on that foundation.
Select the baseline period and calculate control limits
“Most recent” is not enough to qualify a baseline. Including start up, known breakdowns or mixed recipes teaches a model that problems are normal. Picking only an unusually good day makes alerts too sensitive for routine operation. Save the period, exclusions, approval and source data snapshot. Investigate special causes and assess statistical stability before treating a baseline as normal. NIST’s process stability discussion places this check before capability assessment.
Choose the chart for the data and subgroup: individual continuous readings, short subgroups and attribute counts do not belong on the same chart. ASQ describes paired charts for the center and range of variable data. Ask a vendor to document the chosen chart, formula, assumptions, recalculation trigger and outlier treatment. “The AI chooses automatically” is insufficient for operator training or an audit.
Cpk cannot substitute for an alert
Process capability Cpk summarizes a relationship between a process distribution and specification limits over a defined period. It is not an instantaneous alarm. NIST links meaningful capability assessment to a stable process. A single Cpk from an unstable period does not assure tomorrow’s performance. Record the specification, distribution assumption, measurement quality, stability and calculation period. Do not adopt a universal Cpk pass mark such as 1.33 without the customer contract and process risk; that number is an example of a commonly discussed threshold, not this article’s recommendation. Keep chart signals, specification breaches, capability and customer reporting conditions in separate dashboard fields. ISO 22514-1:2014 describes general principles of capability and performance; it does not supply a site specific acceptance criterion here.
Freeze and revise the baseline under change control
An approved improvement may shift the process center and increase alerts under an old baseline. Yet widening limits merely because alerts are inconvenient can conceal deterioration. Require a change request, before and after quality comparison, recipe scope, quality approval and rollback. Apply the same discipline to retraining. Run old and proposed decisions side by side for a period justified by the process cycle and frequency of relevant events. Examine alert volume and possible misses before replacing the active version.
Use process drift AI monitoring as a secondary layer
The useful question for AI is whether a combination or time pattern reveals something the simple chart does not. Select temperature, pressure, current, vibration, speed and lot signals based on a physical relationship to the quality characteristic. Check availability at decision time: a final inspection result cannot be a legitimate input to a prediction that supposedly happened earlier. Leakage from future information can make an offline demonstration look excellent while the deployed system cannot reproduce it.
Show more than a score. A secondary alert should include its comparison condition, influential readings, model version, alert time and recommended checks. An influence display is not proof of causation. Investigators compare the signal with maintenance, material, equipment and measurement records and record their conclusion. Our broader AI quality management PoC and RFP guide covers the entire quality loop. This article narrows the design to SPC signals and field response.

Compare AI with a simple baseline
Evaluate three arrangements over the same evaluation period: existing charts, charts plus explainable combined rules, and charts with a candidate AI layer. Compare time to detection, useful investigations, false alerts, misses and operator effort. If the additional benefit is small, a maintainable rules approach can be the better procurement choice. Split training and evaluation by time and keep pieces of the same lot or event together. Evaluate later operating conditions using only information that was available earlier.
Rare events may be too scarce to estimate detection performance reliably during a short pilot. Distinguish replayed historical events, simulated faults and shadow operation. An interval with no actual anomalies does not prove zero missed anomalies. The acceptance record should state what was observed and what remains untested.
Record recipe, equipment and model versions together
Recipe revisions, tool changes, machine modifications and sensor upgrades can change normal behavior. For every decision, store product, process, machine, recipe revision, control limit revision, model revision, instrument revision and data processing revision. Acceptance should require reproduction of an old alert from those records. Preserve the dataset selection rule for retraining. If an operating condition falls outside the validated model scope, an “unassessed” result with human review can be safer than a forced normal/abnormal label.
Do not hide false alarms and misses inside one accuracy score
Alert value depends on investigation capacity, consequence of a miss and time available to act. Too many false alarms teach staff to ignore all messages. A threshold tuned only to suppress alerts can miss early drift. Measure unnecessary alerts per shift, investigation minutes, ability to identify affected lots, and misses for known events. Agree these measures against product risk and process speed.
Consider a wholly hypothetical example: 1,000 measurement windows per day, 10 truly requiring investigation, eight of these detected, and 20 normal windows also flagged. Detection of eight out of ten is only part of the story; staff receive 28 investigations. At a hypothetical ten minutes each, that is 280 minutes of work. The two missed windows may also affect different lots and carry very different consequences. These numbers are examples, not site results or recommended thresholds.
Tie alert levels to actions
A “watch” level may request a repeat measurement at the next planned check; an “investigate” level may notify a supervisor immediately; a “hold” level may quarantine affected products until quality approval. These are illustrative actions, not universal stop rules. Use clear verbs and affected product IDs rather than color alone. Map Japanese, Thai and English wording to one controlled notification code. Define fallback action when the network or terminal is unavailable.

Write SPC alert acceptance into the RFP
“Detect anomalies accurately” does not define success. State monitored process, products, points, ingestion interval, subgrouping, language, permissions and interfaces to MES, ERP and equipment. Separate the control chart calculation from the optional model evaluation. Specify missing data, unknown recipe, duplicate timestamps and invalid units. Verify access to equipment signals before pricing. Require the vendor to provide reproducible data and tests, not screenshots alone.
| RFP topic | Vendor deliverable | Buyer check |
|---|---|---|
| Data definition | Signal, time, unit and recipe map | Are unlike process units mixed? |
| SPC calculation | Chart type, formula and baseline | Can quality staff recalculate? |
| Secondary layer | Inputs, score, scope and version | Any future information leakage? |
| Response | Priority, recipient, approval and release | Does responsibility survive shift change? |
| Audit | Raw values, changes and dispositions | Can an old decision be reproduced? |
| Support | Incident, retraining and rollback plan | Can data be exported at contract end? |
This is a scope template. Contractual performance and regulatory duties depend on the actual process and customer agreement.
FAT and SAT are different tests
At factory acceptance testing (FAT), use prepared datasets to check chart calculations, threshold behavior, missing values, duplicate times, invalid units, recipe changes, permissions and message history. Compare results with independently computed expected values. At site acceptance testing (SAT), verify Thai plant signals, time and lot linkage, shift notifications, product hold and release, and approval history. Exercise network loss, machine restart and repeated transmissions locally.
Agree performance measures before testing: permitted display latency, unnecessary alerts per shift, and which known events count as misses. A batch process and a high speed assembly line cannot share an unexplained fixed threshold. When historical anomalies are scarce, define the verifiable test scope and residual risk rather than claiming a statistically unsupported detection guarantee.
Include a shadow period
Record new system alerts alongside the existing quality procedure before giving the system authority to quarantine or stop. Compare timing, false alerts, possible misses and operator decisions against plant records. Enabling automatic actions requires separate process approval. Include quality, production, maintenance and IT/OT in the go live decision; involve customer quality staff where required. Continue version controlled comparison after cutover.
Assign responsibilities and data boundaries in the Thai plant
Quality owns characteristic definitions and reaction plans; production owns sampling and first response; maintenance owns sensors and machine context; IT/OT owns interfaces and access; management owns escalation and investment. A vendor must explain and reproduce its logic but does not assume the plant’s quality responsibility. Document night shift escalation, change requests and incident support.
Translate actions, not merely terms. “Remeasure,” “hold product,” “stop equipment” and “quality release” must mean the same action on the display, work instruction and training card. If quality staff are absent at night, define the first contact and where held goods are physically placed. A warning without a way to find affected products has limited containment value.
Define ownership, retention and export of raw data, processed data, features, model and alert logs. For a cloud design, test network outages, replay and preservation of time order. CSV export without recipe revision or time zone may not support migration. Quality needs a visible approval record for model changes.
Break down scope before comparing cost
Model development is only one cost. Measurement points, calibration, clock synchronization, legacy PLC access, interfaces, dashboards, training and support can dominate. Give all bidders the same process unit and acceptance tests. A price for “AI pilot” may mean offline CSV analysis for one bidder and production shift notification plus hold integration for another.
An initial scope might be one machine, one or two quality characteristics and one major recipe; those quantities are illustrative, not recommended for every plant. At pilot exit, list what expansion will require in sensors, interfaces, people and model maintenance. For an ROI estimate, distinguish measured scrap reduction from assumptions and include investigation effort and false alert cost. Do not turn a hypothetical prevented loss into a claimed customer result.
Questions for vendor comparison
Ask whether staff can verify control limit calculations, how recipe changes are handled, who receives an alert when the assigned person is absent, what happens outside the validated model scope, who authorizes retraining, and how old decisions are replayed. Ask what data and metadata are returned when the contract ends. A claim that “AI optimizes everything automatically” should prompt a request for explicit inputs, outputs and approval points.
Frequently asked questions
Should a plant introduce SPC charts or AI anomaly detection first?
First define measurement and response and use an appropriate chart to explain the present process. Test AI only for a specific gap such as combinations of signals. A model cannot fix erroneous subgrouping or an obsolete baseline.
Does a high Cpk remove the need for drift monitoring?
No. Cpk summarizes a defined period and specification relationship; it does not eliminate future special causes. Monitor stability with charts and record capability and specification breaches separately under the customer definition.
Can a high AI anomaly score stop a machine automatically?
Stop conditions come from process risk, existing safety engineering and containment procedure. Validate misses and false alerts, and name who authorizes remeasurement, hold and restart. A safety relevant stop needs its own engineering and verification.
What is essential in an SPC alert acceptance test?
Reproduce chart calculations; exercise missing data, duplicate records and recipe change; verify notification, product tracing, hold and release authority, versions and raw readings. Use known data for FAT and actual plant operations for SAT.
Can a pilot start when anomaly examples are scarce?
Yes, but do not claim measured high detection of real anomalies. Evaluate measurement quality, baselines, replayable events, simulated tests and shadow operation, then state untested event types and remaining risk.
Conclusion: reaction plan before secondary detection
An SPC anomaly detection AI program joins reliable measurement, a stable baseline and a human reaction plan. Separate control limits from specifications, preserve machine, recipe, gauge and model versions, and assess both false alerts and misses in terms of plant effort and product risk. In the RFP and FAT/SAT, prioritize replaying the path from signal through containment, approval and release.
If your Thai plant is still choosing a process and measurement point, bring the existing chart, recipe and notification procedure to TOMAS TECH. We can help define a feasible data connection and acceptance scope before a larger rollout.
In a monthly operating review, do not judge success from alert counts alone. A fall in alerts can reflect failed connectivity, missing measurements or an unauthorized baseline change. Quality and production owners should jointly review acquisition rate, instrument status, open alerts, repeated special causes, time from containment to release, and approval history for recipe or model changes. If the comparison period or evaluation method changed, note that month-to-month figures are not directly comparable. Keep raw evidence for times when no alert fired: was the process running, was data received, and was the active model valid for that recipe? Show the last received timestamp, last processed measurement window and active baseline/model revisions; issue a separate monitoring-failure alert when acquisition stops.
Sources
- NIST/SEMATECH Engineering Statistics Handbook, Chapter 6 (published 2003)
- ASQ, Control Chart
- NIST, What is Process Capability?
- NIST, Assessing Process Stability
- ISO 22514-1:2014
- NIST, Process or Product Monitoring and Control
- NIST, 2026 Roadmap on AI and ML for Smart Manufacturing (industrial data, heterogeneous sensing and trustworthy operation)
*All numerical examples, equipment names, intervals and labor calculations in this article are hypothetical illustrations, not customer cases or measured performance.*