Principal Components on Plant Data
Open the Process Monitoring and Diagnostics Studio app
Advanced Control Exercise 5 of 30 in Dynamic Models · All exercises · Time: 15 minutes
A model of normal operation can be learned without any labels. Principal component analysis finds the few directions in which 50 plant signals move together, and two statistics measure how far a new sample departs from that model: along it (T²) and off it (Q). This exercise measures how often the limits are crossed on a normal day, and finds a fault that breaks the correlations without moving far.
Learning Outcomes
- Explain principal component analysis as an unsupervised model of normal operation.
- Distinguish the T² and Q statistics by what each one measures.
- Measure a monitoring model's false-alarm rate on normal data, and relate it to the training window.
Book Chapter
Process Dynamics, Modeling, and Identification (Volume 1), Chapter 13, Process Monitoring Workbench That Diagnoses Records From Declared Simulated Plants. Read the chapter, open the PDF, or watch the lecture slides.
Theory in Brief
Scale the `m` training signals to zero mean and unit variance, stack them as rows of `X`, and keep the `k` leading eigenvectors `P` of the covariance matrix, with eigenvalues `\lambda_i`:
$$X = T P^T + E, \qquad t = P^T x$$
A new scaled sample `x` has scores `t`. Hotelling's `T^2` measures the distance inside the model's plane, weighted by the variance of each direction, and `Q` (the squared prediction error) measures the distance off it:
$$T^2 = \sum_{i=1}^{k} \frac{t_i^2}{\lambda_i}, \qquad Q = \left\| x - P P^T x \right\|^2$$
Each statistic gets a limit at a chosen confidence, here 99 %, from an `F` distribution for `T^2` and the Jackson–Mudholkar approximation for `Q`. A detection is several samples in a row above a limit. The limits assume independent, normally distributed samples. Plant data are autocorrelated, so the real false-alarm rate on a normal day can be several times the nominal 1 %. Dynamic PCA augments each sample with lagged copies, `[x_k, x_{k-1}, \ldots]`, so the model can learn how signals move together over time.
Model: Data-driven and unsupervised. A linear subspace of normal operation learned from two days of plant data, 52 signals recorded and 50 used by the model.
Decision: Whether to raise an alarm, by comparing each new sample's T² and Q with limits.
Learning: Unsupervised learning; no fault labels are used. Classification with labels would need examples of every fault.
Exercise
Read 2 min · Predict 1 min · Run 7 min · Explain 3 min · Check your AI 2 min.
Predict. The 99 % limits promise that 1 % of normal samples lie above them. On a normal day the model has not seen, what share of samples do you expect above the Q limit? Which statistic will catch a fault that breaks correlations without moving far: T², Q, or both?
Run the Process Monitoring and Diagnostics Studio app. Each training takes about a second; there is no simulation clock.
- Choose the case 1 · Train on normal days: the false-alarm rate. With the training window from 0 to 48 h, press Train. Read the Q above limit and T² above limit tiles.
- Set Training window end to 24 and press Train again. Read the same tiles and whether Q or T² first detects anything.
- Choose 3 · A cooling water step: the two statistics disagree. Train on 0 to 48 h and read Q first detects and T² first detects.
Explain.
- Why is the share of normal samples above the Q limit larger than the 1 % the limit promises, and why does a one-day training window make it worse?
- Why does Q see the cooling-water step at once while T² does not?
Generative AI Learning
Check the answer against your run: A good answer says T² measures variation inside the model's subspace and Q the residual outside it, and that a fault breaking a correlation shows in Q first. Your step 3 detection times are the test. The assistant is your tutor and reviewer; you answer for every claim you turn in.
What to Turn In
A table with the Q and T² tiles for each of your three trainings, your written prediction, and three sentences that answer the two questions.

Trained on two days, the model keeps 11 of 50 components. On the unseen third day 5.0 % of the samples lie above the Q limit and 0.2 % above the T² limit, against a nominal 1 %. Plant signals are autocorrelated, so samples above a limit come in runs, and the limit, computed as if samples were independent, is too tight for Q. Trained on one day, the model has seen less of normal operation: 13.6 % of later samples lie above the Q limit and 5.0 % above the T² limit, and T² first detects a "fault" at 29.35 h and Q at 29.70 h, on a day with none.
On the cooling-water record Q first detects at 48.05 h while T² reports no detection. The plant's temperature loops answer the warmer cooling water, so no signal moves far, but the relation between the signals changes. That puts the samples off the model's plane, which only Q measures. Reading only T² misses faults that live in the residual space.
Measured with the app build of December 3, 2026 by a scripted replay of the steps above. Numbers that no tile shows come from the replay's record; your readings from the trends will be close. A later app release may move the last digit.
Classification trains supervised classifiers. Export the scenario 3 record (CSV), label samples after 48 h as faulty, and train a logistic regression on the first two days of normal data plus a few hours of fault. Compare its detection time with Q, and note what it needs that PCA did not: labeled examples of this fault.
Related
- Check yourself: three-question quiz
- Course pages: Classification, Data Sources, Machine Learning Introduction, Statistics
- Exercises: previous: 4 · A Multivariable Model From Records Alone; next: 6 · Dead Reckoning and the Extended Kalman Filter
References
- Hedengren, J. D. (ed.), Process Dynamics, Modeling, and Identification, Volume 1 of Interactive Control Engineering, Chapter 13, "Process Monitoring Workbench That Diagnoses Records From Declared Simulated Plants", pp. 315–337, Advanced Process Solutions, 2026. PDF (CC BY 4.0).
- Jackson, J. E., Mudholkar, G. S., Control procedures for residuals associated with principal component analysis, Technometrics 21(3), 341–349, 1979.
- Downs, J. J., Vogel, E. F., A plant-wide industrial process control problem, Computers & Chemical Engineering 17(3), 245–255, 1993.
