The one idea
A batch process is judged by its whole path, not its endpoint. Multivariate batch monitoring asks, at every hour, whether this batch is travelling the way good batches travelled, and points to which variables are off course.
Week 11 followed a continuous tablet line, where the question is whether this minute’s material is in control. A biologic fed-batch asks a different question: is this batch’s history so far normal? The tools from Week 11 reading 7, PCA scores, Hotelling’s T² and the Q residual, carry over. What changes is the shape of the data and the meaning of time. The aim is to understand and control the process while the product is being made, rather than depend entirely on tests after harvest.
This reading draws on tidy data, designed experiments and alignment and applies them to process analytical technology (PAT).
The case: a monoclonal antibody at day 6

A Chinese hamster ovary (CHO) cell line makes a monoclonal antibody in a 2,000 L fed-batch bioreactor over about 14 days. Feeds add nutrients during the run, without the continuous harvest of a perfusion process. The impeller and sparger provide mixing and gas transfer; pH, dissolved oxygen and temperature are controlled. The cells change their own environment as they grow, so the relationships among the variables shift over the batch.
| Data stream | Frequency | Examples |
|---|---|---|
| Process sensors | Every minute | pH, dissolved oxygen, temperature, agitation, gas flows, base addition |
| In-line Raman, through a PLS model | Every hour | Glucose, lactate, glutamine, ammonium, titer |
| Capacitance probe | Every minute | Viable biomass |
| Off-line samples | Daily | Viable cell density, viability, osmolality, metabolite checks |
These streams measure different things. A pH probe gives an electrochemical response. A Raman instrument gives a spectrum from which a concentration is inferred. A feed-pump record is an actuator setting, not a measure of metabolism. Treating them as interchangeable columns hides that difference.
A typical culture grows, shifts toward production as growth slows, keeps accumulating titer, and is harvested as viability falls. The exact profile depends on the cell line, medium and feeding strategy.
Batch 27 looks normal on every individual chart. Every variable is inside its own limits. At day 6, the multivariate monitoring screen flags it.
Teaching question: Is 2 g/L glucose acceptable? Before answering, ask about the product, the stage of the batch and the feeding strategy.
Raman as a soft sensor

Raman spectroscopy measures light scattered inelastically by molecular vibrations, through a probe in the vessel wall. Water is a weak Raman scatterer, which is why Raman suits aqueous culture better than NIR, although fluorescence and other matrix effects still matter. A culture spectrum holds contributions from many molecules, so a PLS model, built as in Week 11, converts each spectrum into metabolite concentrations, calibrated against off-line reference analysers. For one analyte the prediction is
where is the preprocessed spectrum, the fitted coefficients and the predicted concentration.
This is a soft sensor: the probe, acquisition settings, preprocessing and calibration together. A Raman glucose value is an inference from a model, with an applicability domain, not a direct glucose measurement. Abu-Absi and colleagues showed in-line Raman estimation of several culture parameters at 500 L1. That shows the approach is feasible; it does not show that a model calibrated for one process will work in another.
Designed calibration versus happenstance data
In ordinary batches glucose and lactate move together. A model trained on those batches can learn to predict glucose from lactate’s spectral bands. It will cross-validate well and then fail on the first batch where the metabolic relationship changes, which is exactly the batch you most need it for.
That is reading 3’s lesson applied to a calibration set. Build in designed variation, such as glucose spiked independently of lactate, so that each analyte has to be predicted from its own signal. Cover the media lots, cell lines, stages and scales the model will meet. Spiked samples improve chemical discrimination but do not replace representative process samples. When estimating performance, keep all samples from one batch in the same fold, for the reason given in reading 1.
From prediction to control
The prize is control, not just monitoring: hourly glucose predictions can drive the feed pump in a closed loop. The controller must then cope with prediction error, measurement delay, pump limits and an invalid prediction. An applicability-domain check, sensor health checks and a predefined fallback belong in the design. A failed soft sensor must not silently drive the process.
Under ICH Q14 and Q2(R2)2, the model and its preprocessing are part of an analytical procedure whose performance must be shown for its intended use. A model good enough for trending is not automatically good enough for closed-loop control.
Batch data is a cube

Each batch gives a table of variables over time. Stack the batches and you get a three-way array,
with batches, variables and aligned time points. Twenty batches, ten variables and 336 hourly records give entries.
The choice of observational unit matters as much here as in reading 1, where a dissolution vessel was not a batch. An hour of a bioreactor run is not an independent run either. Instruments also report at different rates, so before building the cube, set rules for sampling or aggregating, handle missing values, and keep the batch and time stamp on every row. A daily lab result copied into 24 hourly rows is still one result.
Classical PCA needs a matrix, so the cube is unfolded. Unfolding rearranges the data; it creates no new observations. The two ways of doing it answer different questions3,4.
| Unfolding | Shape | Example | One row is | Question it answers |
|---|---|---|---|---|
| Batch-wise | 20 × 3,360 | A whole batch | Was this batch, taken as a whole, like the good ones? How does its trajectory relate to final quality (titer, glycan profile)? | |
| Observation-wise | 6,720 × 10 | One time point of one batch | Is this batch, right now, where good batches were at this stage? This is the batch evolution model |
Nomikos and MacGregor introduced batch-wise multiway PCA for batch monitoring in 19943. Wold and colleagues developed the observation-wise batch evolution approach in 19984. A batch-wise model can be used on a running batch only with an established method for filling in the hours that have not happened yet; feeding it the batch’s real future values would be leakage.
In R: an observation-wise control chart
In tidy terms, the stored data are one long table with one row per batch, hour and variable. Unfolding is a choice of how to pivot it. The sketch assumes every batch, Batch 27 included, has already been aligned to a common time axis and is complete, and that good_batches was chosen in advance.
library(tidyverse)
ref <- runs |> # long, tidy: batch, hour, variable, value
filter(batch %in% good_batches) |>
pivot_wider(names_from = variable, # observation-wise: one row per batch-hour
values_from = value)
variables <- setdiff(names(ref), c("batch", "hour"))
pca <- prcomp(select(ref, all_of(variables)), # fit on reference batches only
center = TRUE, scale. = TRUE, rank. = 3)
envelope <- ref |>
mutate(t1 = pca$x[, 1]) |>
group_by(hour) |>
summarise(mid = mean(t1),
lo = mid - 3 * sd(t1),
hi = mid + 3 * sd(t1)) # the normal path of PC1, with limits
batch27 <- runs |>
filter(batch == 27) |>
pivot_wider(names_from = variable, values_from = value)
chart <- batch27 |>
mutate(t1 = predict(pca, select(batch27, all_of(variables)))[, 1]) |> # frozen centring, scaling, loadings
left_join(envelope, by = "hour")
Plot t1 hour by hour against lo, mid and hi, and you have a batch control chart. Batch 27 is projected with the reference model’s centring, scaling and loadings; it never influences them. The mean ± 3 SD band is a teaching choice, not a validated limit. A full batch evolution model regresses on batch maturity with PLS rather than plain PCA, and adds T² and Q at every time point. In practice you would also remove constant variables before scaling, choose the number of components deliberately, and check the false-alarm rate on batches the model has not seen.
Teaching question: Are the 6,720 rows 6,720 independent observations? No. Rows from the same batch share a history, and neighbouring hours are correlated.
Batches are not the same length

Batch 27 was inoculated at a slightly lower cell density and is running about 10 hours behind. Comparing hour 140 with hour 140 compares different stages of growth. Two fixes:
- Align on a maturity variable that tracks progress better than clock time, such as cumulative glucose consumed or integrated viable cell density (IVCD), the area under the viable cell density curve. Either works only if it suits the process and is measured reliably.
- Align by dynamic time warping, the same algorithm used for chromatograms, applied to whole batch trajectories to match equivalent stages of growth rather than equivalent peaks. Kassidas, MacGregor and Taylor showed this for batch monitoring in 19985.
The caution from chromatography applies with more force: a warp flexible enough can make an abnormal batch look normal. The warping path itself is a diagnostic. A batch that needed severe warping is unusual, and a 10-hour delay may deserve investigation in its own right. Look at the original time axis, the aligned trajectory and the mapping together, and constrain the warp on scientific grounds. For online monitoring, compute the mapping only from data available so far, never from the batch’s future.
Teaching question: A batch lines up perfectly, but only after a large warp. Is it normal? Why might the delay itself matter for quality or for the manufacturing schedule?
The “golden batch” and why one is not enough

The phrase golden batch means a reference trajectory to compare against. Taken literally, one best batch, it is a weak standard: a single batch has no variance, so it cannot say how far from it is still normal. The working version is a set of good batches, which defines both the normal path and the normal spread around it. That spread is the control limit. Twenty is an example, not a required minimum; what matters is that the set covers acceptable operation.
For a new biologic this is hard. A commercial product may make only a handful of batches a year, and development batches often come from smaller vessels where mixing, gas transfer and sensor response differ. Which batches count as reference needs written inclusion criteria and a scientific judgment, not whatever historical records are convenient.
Scores, T² and Q
For a centred and scaled observation , let hold the retained PCA loadings. Then
The scores locate the observation in the model; the residual is what the model cannot reconstruct. With the diagonal matrix of score variances,
| Statistic | Asks |
|---|---|
| Scores | Where is this observation in the modelled space? |
| T² | Is it extreme along directions the reference batches vary in? |
| Q (SPE) | How much of it does the model fail to explain? |
High T² with modest Q is an extreme case of a familiar pattern. High Q with modest T² is a combination the reference batches never showed. A change of equipment, calibration or stage can move either.
Control limits are not product specifications. Checking hundreds of correlated time points per batch produces false alarms, so the alarm rate has to be evaluated and every alarm needs a defined response.
What the day-6 alarm meant

Batch 27’s T² is inside its limit; its Q residual is not. In Week 11 terms, the batch is not extreme along the familiar directions of variation. It is moving in a direction the reference batches never moved. A contribution plot breaks the Q value into variables. Each is non-negative and together they sum to Q; the sign of the residual then tells you which way the variable is off.
| Variable | Contribution |
|---|---|
| Lactate (Raman) | Large; residual positive: still rising |
| Base addition | Large; residual positive: more base to hold pH |
| Ammonium (Raman) | Moderate; residual positive |
| All others | Small |
In the reference batches, the cells switch from producing lactate to consuming it around day 4 to 6. That timing is process-specific, but here Batch 27 has not switched. Each variable alone is within range, because lactate at day 6 is normal in absolute terms. The combination, still rising alongside high base addition at this stage, is not. It suggests a metabolic or culture-environment difference; it does not prove a cause.
The monitoring system has detected that the batch is unusual. It has not shown that the product is bad. The next steps are the ones Week 11 practised:
- Rule out the sensor. Is the Raman prediction in its applicability domain? Check against the off-line lactate result.
- Investigate the cause. Inoculum, media and feed lots, a gas-transfer issue raising dissolved CO₂, and the alignment itself. Decide whether experiments are needed.
- Connect to quality. Lactate accumulation and the changes that accompany it can affect quality attributes such as glycosylation. Characterization and release testing of the relevant critical quality attribute (CQA)s, such as glycan profile by liquid chromatography–mass spectrometry (LC–MS), aggregates by size-exclusion chromatography (SEC), charge variants and potency, decide the batch, not the control chart. The right panel depends on the product’s control strategy.
- Feed the knowledge back. Update the risk assessment and decide whether the control strategy or the model should change. The model learns a new normal only through controlled change, as a model has a lifecycle.
The learning organization
Reading 3 followed knowledge from R&D’s designed experiments into manufacturing controls. Batch 27 runs the loop the other way: commercial manufacturing raises a new question about the biology, which may lead to targeted experiments, a better calibration set or a better control strategy.
Across many batches, the same scores and limits support continued process verification, Stage 3 of the US Food and Drug Administration (FDA)’s process validation lifecycle6. Monitoring results, investigations, CAPA and change management feed back into risk assessments through the pharmaceutical quality system (PQS). Before that knowledge is reused for another cell line, scale or site, it has to be checked there. A new reference population or model is a controlled change, never a quick response to an inconvenient alarm.
PAT makes process information available while it can still change a decision. The quality system turns that information into reliable action and knowledge that transfers.
Where the analyst sits
The analyst owns the soft-sensor calibrations and their applicability domain, and decides which batches count as reference and how time and missing data are handled. They judge whether alignment has hidden an anomaly, and read a contribution plot as a lead to investigate rather than a root cause. They decide which lessons from a batch are robust enough to inform future development. Above all, they keep two statements apart: “this batch is unusual” and “this batch’s product is unacceptable”.
For discussion
- Why does a single golden batch make a poor control limit?
- How could a batch-wise model monitor an incomplete batch without leaking future data?
- Batch 27 is unusual on Q but normal on T². Explain the difference to a manufacturing supervisor in two sentences.
- A Raman glucose model was calibrated at 200 L. What evidence would you need before trusting it at 2,000 L?
- When could alignment hide a real difference in the biology, and how would you detect it?
- How would you tell a Raman sensor problem from a real metabolic change?
- What should be captured from Batch 27 for future development, and how would you decide whether it applies to other products?
Bridge back to the week
Next: Cells as Data: Flow Cytometry for CAR-T Release. Return to Week 12.
Sources
Batch 27, its alarm, its contribution values and all trajectories, spectra and calibration plots in the figures are constructed for teaching.
N. R. Abu-Absi et al., “Real time monitoring of multiple parameters in mammalian cell culture bioreactors using an in-line Raman spectroscopy probe,” Biotechnology and Bioengineering 108(5) (2011) 1215–1221. DOI. ↩︎
ICH, Q14 Analytical Procedure Development (2023) and Q2(R2) Validation of Analytical Procedures (2023). ICH quality guidelines. ↩︎
P. Nomikos and J. F. MacGregor, “Monitoring batch processes using multiway principal component analysis,” AIChE Journal 40(8) (1994) 1361–1375. DOI. ↩︎ ↩︎
S. Wold, N. Kettaneh, H. Fridén and A. Holmberg, “Modelling and diagnostics of batch processes and analogous kinetic experiments,” Chemometrics and Intelligent Laboratory Systems 44 (1998) 331–340. DOI. ↩︎ ↩︎
A. Kassidas, J. F. MacGregor and P. A. Taylor, “Synchronization of batch trajectories using dynamic time warping,” AIChE Journal 44(4) (1998) 864–875. DOI. ↩︎
US Food and Drug Administration (FDA), Process Validation: General Principles and Practices (guidance, 2011). Stage 3, continued process verification. Guidance. ↩︎