
Start with the decision that the model should improve
The first question is not which software can be connected. It is which decision is currently made too late, with too much uncertainty or with unnecessary effort. Is the objective to estimate an unavailable measurement, identify a deviation earlier, select an experiment or forecast utility demand? These tasks need different data and different demonstrations. A forecast of remaining run time might be adequate for staff planning while being insufficiently accurate for an automatic harvest decision.
Describe the task as an agreement between the user and the model: target variable, unit, prediction horizon, available inputs, acceptable delay and consequences of an incorrect answer. “Predict product concentration” is incomplete. “At a defined process time, estimate the later amount of usable product, with an uncertainty range and an indication of missing inputs” is much easier to assess. Product amount and concentration remain separate quantities throughout that description.
A model can explain past batches retrospectively, estimate the present state or calculate future behaviour under assumed actions. Retrospective analysis may use information that became available later. A model supporting a live decision may not. This distinction changes the dataset itself, long before a mathematical method is selected. It also changes what an apparently accurate historical comparison can establish.
The simplest alternative belongs in the task description too. How well would the latest valid measurement, an average of comparable runs or an inventory balance perform? A complex model should demonstrate an additional benefit that matters to the decision. Assessment includes the effort needed for data maintenance, reference analysis and troubleshooting. A small, well-understood calculation can be a better operational solution than a comprehensive system whose conclusions nobody can adequately check.
Understand the measurement chain all the way to the historian
Several steps separate a physical quantity from a stored number. A sensor responds to its surroundings; electronics convert its signal; an instrument may filter or compensate the result; the equipment controller receives a value; an interface transports it; and a historian stores the time series. Each stage may change units, resolution, delay or status information. A signal map that makes this processing traceable therefore belongs alongside data collection.
A historian, as used here, is a system for storing and querying operational data against time. It is not automatically a complete batch record. A table of measurements does not necessarily identify the associated medium lot, calibration, sample identity or manual intervention. These details may reside in other systems. What matters is a reliable connection through stable identifiers, rather than placing every piece of information in one file.
For each measurement, users should be able to find its location, engineering meaning, unit, measurement range, time basis, quality status and origin. Derived variables also need their equation, input signals and software version. A tag called “Flow” is inadequate: gas or liquid, actual or reference volume flow, setpoint or measured value? Even identically labelled signals may concern different balance boundaries. The underlying distinctions are explained in principles and balances.
The OPC UA specification distinguishes, among other fields, the source timestamp, server timestamp and quality status associated with a value. These fields need to survive export and be interpreted appropriately. Successful technical transmission does not make a value metrologically suitable for every task. The particular instrument may provide less status information than a downstream application expects.
A shared information model supports communication between instruments and applications. LADS, based on OPC UA, addresses laboratory devices, results, programmes and other higher-level functions. This does not establish automatic interchangeability between two systems. Supported functions, units, states, permissions and versions still need checking for the actual connection. NIST's work on biomanufacturing data infrastructure likewise distinguishes data structures from clearly specified meaning. In practice, an integration trial should therefore follow a complete example record together with its metadata.
Teaching example: an incorrect clock creates incorrect dynamics
Time series require at least three separate questions: when did the sample or measurement relate to the process, when was the result generated, and when did it become available to the consuming system? Transport time and sensor response add further delays. A time shift can create a plausible but incorrect relationship between an intervention and a response. More observations do not solve this problem when every point carries the same incorrect time basis.
In a hypothetical example, an engineering test action actually occurs at 10:00:00. The associated event logger's clock is 90 seconds slow, so it records 09:58:30. A response is actually detected 40 seconds after the action. The measurement logger's clock is 30 seconds fast and records 10:01:10. Subtracting the two stored times gives 160 seconds. The actual observed delay is 40 seconds. The apparent interval is four times as large solely because of the difference between the clock errors.
The relationship is Δtstored = Δtactual + εmeasurement − εevent. All intervals and clock offsets ε are expressed in seconds here: 40 + 30 − (−90) = 160. This calculation still does not identify a pure process time constant. The 40 seconds may include equipment dynamics, transport and sensor response. Correcting the clocks first simply prevents an additional timing error from entering the process model.
A laboratory sample creates a different problem. It is collected at 11:00, but its result becomes available after analysis and checking at 11:40. In a later reconstruction, the result describes the sample collected at 11:00. In an honest replay of a decision made at 11:10, however, it must not appear as an input available at that time. An export retaining only the sampling time can encourage this inadvertent use of future information. Sampling time and availability time therefore need separate fields.
Time zone, daylight saving and time normalisation also need documentation. A common UTC time basis helps comparison but replaces neither verified clock synchronisation nor elapsed process time from a defined event. Comparisons between runs also need an explicit alignment rule: inoculation, feed initiation or another phase boundary. Alignment using an event identified only later must not silently enter a real-time prediction.
Further worked cases: Assess time points as dependent observations
Data quality means more than complete tables
Missing values are visible; incorrect but plausible values are often less obvious. Repeating an old value can resemble a stable process phase. An undocumented unit change can produce a step. Smoothing can remove the disturbance being investigated. Data quality must therefore be judged against intended use: aggregation that is adequate for a daily balance may conceal a brief operational event.
Consider a hypothetical pump test using water. The pump delivers 0.6 L/min for ten seconds and nothing during the rest of that minute. The delivered volume is 0.6 × 10/60 = 0.10 L. A correct time-weighted average over the minute is 0.10 L/min, which also integrates to 0.10 L for that interval. A single instantaneous reading each minute, however, might fall entirely within the stopped period and report zero. A minute average and a once-per-minute observation are different data types.
The following table helps check the data chain before seeking a biological explanation. The proposed evidence concerns the particular equipment; it does not define universal alarm limits.
| Observation | Possible data explanation | Discriminating check |
|---|---|---|
| Long sequence of identical numbers | Repeated old value or genuine constancy | Compare status, update logic and an independent event |
| Step after instrument replacement | Different unit, calibration or measurement position | Check metadata and a shared reference measurement |
| Balance agrees only after smoothing | Brief additions or removals were lost | Reconcile raw signals, events and cumulative quantities |
| Model detects disturbances only after laboratory import | Result availability confused with sampling time | Replay predictions using inputs available at the time |
| Export contains more rows than expected | Repeated import or multiple result versions | Compare unique record and version identifiers |
Cleaning should not obscure original data. A processed analysis dataset needs rules for exclusion, conversion and replacement values, plus a connection to the unchanged source. An interpolated point receives its own flag; interpolation does not turn it into a measurement. Large gaps should not be filled simply because the modelling software expects a complete matrix. The gap itself may represent a relevant event.
Choose between mechanistic, data-driven and hybrid models
A mechanistic model expresses selected relationships through equations, such as inventory balances, heat transfer or transport. It is particularly useful when the question can be answered using known flows and justified assumptions. Nevertheless, it remains a simplification. Ideal mixing, constant material properties or time-invariant rates must suit the intended domain. Physical equations do not automatically give every fitted parameter a unique biological interpretation.
A data-driven model learns relationships from examples. It may be a linear regression or a complex neural network. Its suitability depends on the variation represented in the data and the question asked of new observations. If every historical run changed dosing strategy and raw material simultaneously, a good fit cannot uniquely distinguish their effects. Recording more variables does not replace informative variation.
A hybrid model combines an explicitly described structure with a learned component. Volume changes might be calculated from measured flows while an unknown net rate is estimated from data. This keeps the part explained by material transport distinguishable from the part requiring a learned relationship. An incomplete balance boundary can nevertheless cause the learned component to absorb systematic measurement or bookkeeping errors.
An original study by Hutter and colleagues combines dynamic balances with Gaussian-process models and examines the use of historical process data. Its relevant comparison uses simulated processes. It establishes a particular modelling strategy and its assessment, rather than a general guarantee of fewer real experiments. This distinction matters in practical selection: the model class can inform a new approach, while the reported performance remains tied to the conditions investigated.
Choose the smallest structure that represents the decision adequately. First check units, conservation relationships and limiting cases. Then ask whether parameters can be determined separately. Two parameters may compensate for one another and produce the same curve. An additional decimal place in their estimates does not resolve this lack of identifiability. It requires a different measurement, a targeted experiment or a more modest modelling objective. An apparently detailed parameter table should not conceal an underdetermined engineering question.
Teaching example: what a balance-based soft sensor can establish
A soft sensor estimates a quantity that is not directly available using other measurements and a model. Its output is an estimate with assumptions. The user interface should identify it explicitly as estimated and make its inputs, freshness and validity visible. Otherwise an extra decimal place can suggest an accuracy supported by neither the measurement chain nor the model.
In a hypothetical balance example, the initial liquid inventory is 2.0 L containing 10 g/L of a dissolved component. During the interval, 0.5 L containing 40 g/L is added. A 0.1 L sample contains 8 g/L at the time of withdrawal. Evaporation and other volume flows are excluded from this calculation. The final volume is therefore 2.4 L. The final measured concentration is assumed to be 12 g/L.
The initial component mass is 20 g, the addition is also 20 g, the sample removes 0.8 g and the final inventory is 28.8 g. The net disappearance unexplained by known flows is R = V0C0 + VFCF − VSCS − V1C1 = 10.4 g. V is entered in litres and C in g/L; R is a mass over the whole interval, rather than a rate.
This number alone establishes neither a metabolic pathway nor a particular amount of biomass formation. It may include actual conversion, an unrecorded separation or incorrect input data. The soft sensor should initially describe its output as “net disappearance from the balance”. A narrower interpretation requires additional evidence. Dividing by elapsed time gives an average rate; it does not reconstruct the profile within that interval.
Sensitivity can also be examined transparently. If only the final concentration is uncertain by 0.5 g/L, R changes by 2.4 × 0.5 = 1.2 g with all other quantities held constant. This is approximately 11.5% of the calculated R. It is not a complete uncertainty calculation: volume uncertainty, sample representativeness and shared calibration errors have not been included. The example shows why a residual calculated from several large quantities can be more sensitive than its smooth display suggests. The next useful measurement should address the dominant uncertainty rather than simply provide more frequent versions of the same uncertain inputs.
When a model becomes a digital twin
Terminology varies. For an engineering assessment, an explicit working definition is helpful: a digital twin is a digital representation associated with a real system, synchronised using suitable data from that system and serving a defined purpose. NIST likewise describes digital twins as synchronised virtual models and emphasises testable requirements, validation and quantified uncertainty. Whether updates occur each second or after a laboratory analysis must suit the particular task.
A simulation with manually selected initial conditions remains a simulation. A dashboard can display measurements without containing a predictive model. A soft sensor may form part of a twin without constituting its complete architecture. Automatic feedback to actuators is also not necessary evidence of a twin's quality. An observing system can provide sufficient value for planning and diagnosis.
For a hypothetical twin of a cooling system, users would need to know which physical installation it represents, which valve and temperature data it receives, how the current state is estimated and how far ahead it predicts. Equipment modifications may change the model structure. A different cooling-medium condition may change parameters or validity limits. The stored equipment relationship must reflect such changes; otherwise the system may reliably simulate a configuration that no longer exists.
Ask for a traceable description of the connection: physical object identifier, data sources, state update, model version, permitted applications and known exclusions. This includes the response to lost synchronisation. A paused twin must not be mistaken for the current equipment state. The appropriate maturity level follows from demonstrated usefulness and control of these transitions, rather than the name used on a presentation slide. The same principle applies when several smaller models are combined into a larger representation.
Test predictions beyond the training data
Model assessment starts before training by considering later use. If the model should support future runs on the same equipment, holding back complete runs is a natural part of testing. If it will be applied to another installation or scale, that particular transfer needs assessment. Randomly splitting timestamps from the same runs answers a much narrower question and may exploit the similarity of neighbouring observations.
Suppose twelve hypothetical runs each provide 100 timestamps. That makes 1,200 rows, not 1,200 independent cultivations. Dividing them into eight training runs, two development runs and two final test runs illustrates the separation of tasks. It is not a recommendation for an adequate sample size. Decisions about scaling, feature selection and model complexity must be made without knowledge of final test results. Small datasets imply additional uncertainty and correspondingly limited claims.
A small calculation illustrates different error measures. Four independent hypothetical reference values are 10, 12, 14 and 16 g/L. Predictions are 11, 11, 15 and 13 g/L. Defining e = prediction − reference gives errors of +1, −1, +1 and −3 g/L. The mean error is −0.5 g/L, the mean absolute error is 1.5 g/L, and RMSE = √[(1² + 1² + 1² + 3²)/4] = √3 ≈ 1.73 g/L. The small mean error hides the larger discrepancy at the final point.
Prediction minus reference is an explicit convention here. Reversing it changes the sign of mean error, but not MAE or RMSE. Also examine errors against time, concentration range, equipment state and process phase. An attractive overall score can conceal an unusable part of the operating domain. The NIST methods handbook similarly explains why a high R² alone is insufficient evidence of model adequacy.
Prediction intervals need to match new observations and the intended decision. A narrow interval for an estimated mean is not the same as a range for the next individual run. If a stated 90% prediction interval includes only 12 of 20 reference values in a hypothetical independent test set, its observed coverage is 60%. This warrants investigation; it does not by itself statistically establish a particular cause. With 20 cases, estimated coverage is itself uncertain. Record which observations were eligible for the assessment instead of quietly excluding difficult cases after seeing their errors.
Further worked cases: Distinguish mean estimation from prediction of a new run
Connect experimental design, soft sensors and optimisation
A model can support selection of the next experiment when the uncertainty that the experiment should reduce is clear. Conventional design of experiments deliberately varies factors to distinguish effects and interactions. Model-assisted planning can additionally ask where competing models predict different outcomes or where particular parameters become more identifiable within permitted conditions. The foundations and a worked factorial example appear in process development.
Information gain is not identical to immediate product improvement. An experiment near a poorly explored boundary may be mathematically informative but unsuitable because of equipment condition, analytical capability or material demand. The permissible experimental domain is therefore established through scientific and engineering judgement first. The model selects candidates within it; it does not authorise an extension of that domain. Measurements must also be capable of resolving the differences that the experiment is intended to reveal.
Optimisation needs an unambiguous objective function. A high final concentration can coincide with a smaller usable total amount, longer equipment occupancy or greater downstream loss. Constraints on quality, utilities and permissible operating states therefore belong explicitly in the calculation. Weighting different objectives represents a user's decision; the learning algorithm does not make that weighting automatically objective.
Using a soft sensor as an optimisation objective deserves particular scrutiny. If the same model error both estimates the target and evaluates the proposed improvement, it creates an apparently successful circular argument. A selected candidate therefore needs independent confirmation of the decisive quantity. This may involve suitable reference analysis and checking whether the inventory balance and product function have actually improved. An optimiser's proposal is a testable candidate, not an experimental result. The distinction should remain visible when reporting outcomes to colleagues who did not build the model.
Further worked cases: Why a perfect three-point fit can miss a process effect
Manage transfer, drift and uncertainty during use
Successful initial testing is followed by observation under actual operating conditions. Model performance may deteriorate because inputs change, a measurement method responds differently or the relationship between inputs and the target is unstable. Instrument replacement and process change require different investigations. Both may initially appear as increasing prediction error.
Monitor data availability, units, timing offsets and the position of new inputs relative to the tested domain as well as model error. Without timely reference measurements, a shift in inputs can be detected, but actual predictive performance cannot be determined immediately. Conversely, an unchanged input distribution does not guarantee an unchanged relationship with the target. The two kinds of observation complement one another rather than substituting for each other.
A different scale can contain different local gradients despite similar average measurements. The model may then lack a relevant state variable. Rescaling the dataset is not a general solution. Comparison runs should cover the new configuration, the analytical method and the process phases in which the model will be used. The engineering causes of transfer limits are discussed further in scale-up and scale-down.
Updating a model is a change requiring its own assessment. Old and new versions are compared using appropriate separate data, while changes to preprocessing and reference methods remain traceable. Automatic learning without assessed references can reinforce erroneous results. For every deployed version, users should therefore be able to reconstruct which data it knew, which test justified its use and when its application must be restricted or suspended. Historical predictions should retain the identity of the version that produced them.
Integrate models with equipment in controlled stages
The connection to equipment control determines the possible consequences of a model error. A retrospective report, an operator recommendation and an automatically accepted command proposal are different applications. Start with the smallest necessary effect. For many tasks, read-only access to checked data is sufficient. A later ability to write is treated as a separate function with its own requirements, permissions and demonstrations.
A useful workflow moves from versioned offline analysis through observational parallel operation to an assessed recommendation. Limited automatic use follows only when the actual task requires it. In parallel operation, the model calculates outputs while the established operating method continues; this allows availability, delay and error to be observed during real work. Assessment includes phase transitions, communication interruptions and invalid inputs rather than only uninterrupted nominal operation.
For an automatically used proposal, the receiving controller must be able to check whether it belongs to the correct equipment and phase, remains current and falls within approved limits. Accepting a value is not the same as physically implementing it. The proposal, acceptance, applied value and feedback are therefore recorded separately. Existing protective functions remain effective; an analysis model does not acquire incidental authority to alter them.
The response to failure also needs an equipment-specific definition. Holding the last value may suit one task and be unacceptable for another. The fallback response is defined with the responsible process and automation specialists and assessed under suitable engineering test conditions. NIST emphasises the distinctive reliability, performance and safety requirements of operational technology. A general IT availability test therefore does not fully cover the consequences for physical equipment.
For pharmaceutical CGMP applications, FDA guidance explains the importance of metadata, traceable changes and assessment of the intended computerised workflow. Qualifying a platform alone does not establish that every calculation generated through it is correct. Scope and responsibility must be established for the actual application; this guidance is not a universal set of obligations for every research reactor. Technical model assessment, computerised workflow assessment and process validation remain different demonstrations. Their relationship is discussed in quality, qualification and validation.
Frequently asked questions
Is a soft sensor an additional independent measurement?
It is initially a model-based estimate from existing inputs. If two displays use the same input data or calibration assumptions, their errors may be shared. Independent confirmation needs an appropriate reference whose own uncertainty is understood.
Does a digital twin have to control the equipment automatically?
No. A synchronised digital representation can serve a defined observation or planning purpose. Automatic feedback extends its intended use and requires additional engineering demonstrations. The essentials are its connection to real equipment, suitable updating and an assessed output.
When is a model accurate enough?
When its errors, uncertainties, delay and response to failure adequately support the actual decision within the tested domain. A universal RMSE or R² threshold is not useful for that purpose. Comparison with a simple reference method and the consequence of an incorrect decision belong in the assessment.
Terms in this chapter
36 terms explained in the glossary
- Biomass
- Calibration
- Cleaning
- Coefficient of determination
- Data-driven model
- Design of experiments
- Digital twin
- Downstream processing (DSP)
- Equipment maintenance
- Equipment occupancy time
- Evaporation
- Forecast
- Harvest
- Heat transfer
- Hybrid model
- Information model
- Laboratory & Analytical Device Standard (LADS)
- Linear regression
- Mean absolute error
- Mechanistic model
- Metadata
- OPC Unified Architecture (OPC UA)
- Parameter identifiability
- Prediction interval
- Process historian
- Qualification
- Response variable
- Root mean squared error
- Scale-down
- Scale-up
- Setpoint
- Soft sensor
- Statistical residual
- Time constant
- Timestamp and UTC
- Validation