Unit 7 / 11

Quality and Process Control Data: SPC, Anomaly and Sensor Data

Gains:

  • Ability to clean sensor data with artificial intelligence and mark anomalies and trends with SPC rules
  • Ability to distinguish between correlation and causality by using a reliability filter to distinguish whether a deviation is a real process event or a sensor/measurement problem
  • Understanding that artificial intelligence is a decision-support layer and that life and facility safety belongs to independent security systems (SIS).

As a plant operates, it silently produces a flood of data: temperature, pressure, flow, level, pH and product analysis results flow from dozens of sensors every second. This data is the “pulse” of the process; It contains both evidence of the health of the process and early signs of impending failure or quality deviation. In this unit, you will learn how to use artificial intelligence as an aid in monitoring this data, flagging anomalies, and interpreting quality trends; but we will learn why it is still up to the engineer to decide which deviation is real and what action to take.

Let's start with two basic concepts. SPC (Statistical Process Control; method that monitors the variability of a process with statistical limits and distinguishes normal fluctuation from real deviation) and control chart (control chart - a chart that shows a variable against time, with upper/lower control limits). The essence of SPC is the distinction between natural variability (common cause — the normal, inevitable fluctuation of the process) and special cause — a real deviation from outside that must be investigated. AI is powerful at making this distinction and finding patterns in big data; but the root cause of a deviation and the decision to intervene belong to the engineer.

Step-by-step AI support in quality and control data

1. Prepare and clean data. Missing values, jumps due to sensor failure, unit inconsistencies. AI produces Python code outline and checklist for cleanup. But you decide with process knowledge what counts as "invalid data".

2. Trend and anomaly marking. AI marks patterns such as slow drift, sudden jumps, or increased oscillations on a sensor. These are candidates to be examined, not results.

3. SPC comment. AI can recall control chart rules (e.g., when a point goes out of bounds, consecutive points go in one direction) and apply them to the data. Again, engineering judgment makes the decision.

4. Correlation discovery. AI flags relationships such as "purity seems to decrease as temperature increases." Correlation is not causation (correlation ≠ causation — the fact that two quantities vary together does not prove that one causes the other); You test this relationship with process knowledge.

5. Root cause hypotheses. The AI ​​lists possible reasons for a deviation (feed variation, catalyst aging, sensor failure). These are research topics, not diagnoses.

6. Action decision. To take the alarm seriously, to stop the process or to make adjustments – this safety and quality decision lies with the engineer.

Tip: When AI flags an anomaly in sensor data, the first question is “is this a real process event or sensor/measurement failure?” should be. Most “anomalies” are a broken sensor or calibration drift; Verify the measurement itself before intervention.

Sensor data: not every deviation is real

Sensors can lie: a calibration slips, a thermocouple comes loose, a transmission line picks up noise. The AI ​​may see a jump in the data and say “the process has changed”; However, it is not the process that changes, but the sensor. An anomaly signal is therefore first filtered for data reliability: is it consistent with another sensor, is it physically possible, does it match the maintenance record? Only after these are passed is it investigated as a real process event.

Caution: An AI-based anomaly/early warning system is not a replacement for a safety instrumented system (SIS — a standalone, certified safety protection layer). The AI ​​model is a monitoring and decision-support layer; They are protection, independent and verified security systems that ensure life and facility safety.

three mini cases

Case 1 — Early drift capture. In one reactor, AI marked a slow drift on a temperature sensor, increasing by an average of 0.3°C per day over 10 days. The team examined; Fouling had started in a heat exchanger. Early intervention prevented unplanned downtime. The signal came from the AI, the diagnosis and the decision came from the team.

Case 2 — False alarm eliminated. The AI ​​saw a sudden jump in a pressure sensor and flagged it as "possible leak." The engineer saw that the two neighboring sensors did not change and a calibration process was carried out at that moment; The signal was from the sensor. The data reliability filter prevented an unnecessary downtime.

Case 3 — Correlation trap. YZ marked the correlation "product purity decreases when the feed flow rate increases". The engineer found that the real cause was not the flow rate but the supply temperature, which varied during the same shift; flow rate and purity only went together. Mistaking correlation for causality would lead to a wrong setting.

Four copyable templates

1) Data cleaning code draft:

Write me a cleanup Python script for a process sensor dataset.Input: timestamped CSV, columns [list]. (1) flag missing values ​​(delete, fill options), (2) flag physically impossible values ​​(negative flow rate, out-of-range temperature), (3) check unit consistency, (4) report cleaning decisions but DO NOT auto-delete; I will confirm. State assumptions.

2) SPC / control chart interpretation:

Your role: quality engineer. I will give you the time series and control limits (UCL/LCL) of a variable. Apply standard SPC rules (out of bounds, sequential trend, cluster on one side) and mark which points are "special cause" candidates. For each sign, also indicate whether it is an actual process event or a possible measurement problem. The decision is up to me; You present the candidate and the justification. Data: [paste]

3) Anomaly reliability filter:

You have flagged the following anomaly: [description]. Apply a reliability checklist before making a decision: (1) is it consistent with adjacent/associated sensors, (2) is it physically possible, (3) does it match the maintenance/calibration record, (4) is it a single point or continuity? Evaluate whether it is a "real process event" or a "possible sensor problem". Making a definitive diagnosis; Give research title.

4) Root cause hypothesis (not diagnosis):

The following quality/process deviation was observed: [description, numbers]. List possible root causes in order of POSSIBILITY (feed, catalyst, sensor, operating condition, maintenance). For each hypothesis, write down what data or test I should look at to confirm/disprove it. This is NOT a diagnosis, it is an investigation plan; Do not declare a definitive reason.

Weak prompt / Strong prompt

Weak prompt:

Is there a problem with this sensor data?

The "problem" is undefined, there is no context. AI may exaggerate random jumps or miss actual drift.

Powerful prompt:

Your role: process control engineer. I'm giving you 14 days and 1 minute of reactor temperature data. Normal range 78-82°C, UCL 84, LCL 76. Task: (1) mark slow drift, sudden jump, oscillation increase patterns, (2) indicate for each sign whether it could be a real event or a sensor, (3) list which should be examined first. Making a definitive diagnosis; Just based on real data, not made up. Data: [paste]

The difference is clear: the variable, normal range, limits, and "candidate, not diagnosis" framework make the output usable.

Role distribution in quality/control data

business

Role of AI

man's decision

data cleaning

code, flag

Invalid data decision

Anomaly

marking

Real/sensor distinction

SPC

rule enforcement

Intervention decision

correlation

Relationship marking

Causality testing

root cause

Hypothesis list

diagnosis, action

security protection

— (out of scope)

Independent SIS

Common mistakes

  • Mistaking every anomaly for a real process event. Most of it is a sensor/calibration issue; Data reliability is filtered first.
  • Considering correlation as causation. Variables acting together may not cause each other.
  • Using AI as a security system. Life/facility safety is the responsibility of an independent, certified SIS.
  • Allow automatic data deletion. The engineer decides what is invalid with his process knowledge.
  • Mistaking the AI ​​root cause hypothesis for a diagnosis. Hypotheses are research topics until they are confirmed, not conclusions.

In summary

AI in quality and process control data; It is a powerful assistant that cleans data, flags anomalies and trends, applies SPC rules, and generates correlations and root cause hypotheses. But it is up to the engineer to decide whether a deviation is real or sensor, whether correlation is causation, the root cause and intervention. AI is a monitoring and decision-support layer; They are protection, independent and verified security systems that ensure life and facility safety.

Application task

Take a sensor data set (or sample time series). Have the AI ​​flag special cause candidates with the "SPC / control chart interpretation" template. For each sign, apply the "anomaly reliability filter" template to evaluate whether it is a real event or a sensor problem. Test at least one correlation for causality with your process knowledge.

checklist

  • [ ] I first filtered the anomaly signals for data reliability (sensor/calibration).
  • [ ] I tested the correlations for causality with process information.
  • [ ] I transformed the SPC signals into an intervention decision, I did not leave it to the AI.
  • [ ] In data cleaning, I applied the approved decision, not automatic deletion.
  • [ ] I left security protection to the independent system, not the AI.