Applied Mathematics

Chapter 15
Data-Driven Mathematics, AI and Digital Engineering

Bachelors Program in Machine Technology
Applied Mathematics   •   Bachelor

Data-Driven Mathematics, AI and Digital Engineering

Introduction

Modern machine technology is increasingly measured, connected and computational. A machine tool, robot, compressor or production line generates streams of temperatures, forces, vibration amplitudes, currents, positions and error codes. These data can support better design, condition monitoring, predictive maintenance, quality control and energy management. However, data alone do not create knowledge. Applied mathematics provides the language for transforming observations into models, predictions and defensible engineering decisions.

This chapter develops a practical mathematical framework for industrial data analysis. It introduces time-series analysis, machine-learning fundamentals, predictive maintenance, digital twins and simulation analytics. It also considers explainability, bias, privacy, cybersecurity and model governance. The central principle is that an industrial AI system must be not only accurate, but also physically meaningful, secure, auditable and useful to people responsible for machines and production.

Learning Objectives

After studying this chapter, you should be able to:

  1. Represent and analyse industrial sensor data as time series.
  2. Explain stationarity, autocorrelation, moving averages and forecasting error.
  3. Distinguish supervised, unsupervised and reinforcement learning.
  4. Formulate a predictive-maintenance problem and select suitable evaluation metrics.
  5. Explain the structure and purpose of a digital twin.
  6. Combine physics-based simulation with data-driven models.
  7. Evaluate model explainability, bias, privacy, cybersecurity and governance.
  8. Interpret an industrial case involving machine-failure prediction.

1. Industrial Data as a Mathematical Object

A sensor observation is commonly represented as a time-stamped value. For example, vibration measured every second may be written as a sequence:

x1, x2, x3, …, xt, …, xn

Here, xt is the measured value at time t, and n is the number of observations. A complete observation may contain several variables:

\mathbf{x}t = [Tt, Vt, It, Pt]T

where Tt is temperature, Vt vibration, It electrical current and Pt pressure. Variables must retain their units: °C, mm/s, A and kPa, respectively.

Before modelling, engineers should establish the sampling interval, sensor accuracy, calibration status, missing-value pattern, operating regime and measurement location. A model trained on data from one speed or material may fail when applied to another. Data quality is therefore an engineering issue, not merely a programming issue.

Descriptive statistics

For observations x1, …, xn, the sample mean is:

\bar{x} = (1/n) ∑t=1n xt

The sample variance is:

s2 = [1/(n−1)] ∑t=1n(xt − \bar{x})2

The mean has the same units as the measurement; variance has squared units, such as °C². The denominator n−1 is used when estimating population variance from a sample. Standard deviation is s = √s2 and returns to the original units.

Outliers should not be removed automatically. A high vibration value may indicate sensor error, a transient operating condition or genuine damage. The engineering explanation must precede any data-cleaning decision.

2. Time-Series Analysis

Time-series data differ from ordinary independent observations because order matters. A useful conceptual decomposition is:

xt = mt + st + rt

where mt is the long-term trend, st is a repeating seasonal or operating-cycle component, and rt is the residual. This additive form is appropriate when component magnitudes are approximately constant. A multiplicative form, xt = mt st rt, is more suitable when variation grows with the level of the signal.

Smoothing and moving averages

A moving average reduces short-term noise. A centred window of odd width 2k+1 is:

\tilde{x}t = [1/(2k+1)] ∑i=−kk xt+i

This formula requires observations on both sides of t, so it cannot be calculated at the ends without a boundary convention. A trailing average used for real-time monitoring is:

\tilde{x}t = (1/w) ∑i=0w−1 xt−i

where w is the window length. Larger windows smooth more strongly but introduce greater delay and may hide rapid faults.

An exponentially weighted moving average (EWMA) is:

zt = αxt + (1−α)zt−1, 0 < α ≤ 1

Here α controls responsiveness and z0 must be initialized, commonly with x1 or a historical mean. A high α reacts quickly; a low value is smoother.

Autocorrelation and stationarity

Autocorrelation measures the relationship between a signal and a lagged version of itself. The sample autocorrelation at lag k is commonly estimated by:

rk = [∑t=k+1n(xt−\bar{x})(xt−k−\bar{x})] / [∑t=1n(xt−\bar{x})2]

It is dimensionless and generally lies between −1 and 1. Strong autocorrelation means that nearby observations are not independent. Randomly splitting such data into training and test sets can cause leakage because future-like observations may appear in the training set.

A weakly stationary series has constant mean and variance over time, and autocovariance that depends on lag rather than absolute time. Industrial signals often become stationary only within a defined operating regime. Differencing can remove a trend:

∆xt = xt − xt−1

The resulting difference has the same units as xt and represents change per sampling interval, not necessarily a physical derivative. A derivative estimate requires division by the sampling interval ∆t:

dx/dt ≈ (xt − xt−1)/∆t

Forecasting and error measures

A simple autoregressive model predicts a value from previous values:

\hat{x}t = c + ∑i=1p φi xt−i

where p is the selected lag order, c is an intercept and φi are fitted coefficients. The model assumes that the relevant dependence is adequately represented by the chosen lags and that the operating regime is sufficiently stable.

Forecast quality can be measured by mean absolute error:

MAE = (1/n) ∑t=1n|xt − \hat{x}t|

and root mean squared error:

RMSE = √{(1/n) ∑t=1n(xt − \hat{x}t)2}

Both have the units of the response. RMSE penalizes large errors more strongly. For classification, such as failure/no failure, accuracy alone is often inadequate. Precision and recall are:

Precision = TP/(TP+FP)
Recall = TP/(TP+FN)

where TP, FP and FN denote true positives, false positives and false negatives. In maintenance, a false negative may be much more costly than a false positive, so the decision threshold should reflect safety and downtime costs.

Worked example: EWMA monitoring

Suppose measured temperatures are 70 °C, 74 °C and 76 °C. Let α = 0.25 and initialize z1 = 70. Then:

z2 = 0.25(74)+0.75(70)=71 °C

z3 = 0.25(76)+0.75(71)=72.25 °C

The EWMA is less sensitive to one observation than the raw sequence, while still moving upward. It is a monitoring indicator, not proof of a fault. Alarm limits must be established from historical healthy operation and validated against actual failure data.

3. Machine-Learning Fundamentals

Machine learning estimates a relationship from data rather than specifying every rule manually. In supervised learning, the training set contains inputs and known targets:

D = {(\mathbf{x}i,yi)}i=1n

A model f_θ with parameters θ is fitted by minimizing a loss function. For regression with squared loss:

J(θ) = (1/n) ∑i=1n[yi − f_θ(\mathbf{x}i)]2 + λR(θ)

The first term measures data error, while R(θ) penalizes complexity and λ ≥ 0 controls regularization. Regularization can reduce overfitting, but excessive regularization can cause underfitting.

For binary classification, a logistic model estimates a probability:

P(y=1|\mathbf{x}) = 1/[1+e^{−(β0+\mathbf{β}T\mathbf{x})}]

The output lies between 0 and 1. A threshold converts probability into an action, but the threshold should be selected using costs, safety requirements and available maintenance capacity.

Unsupervised learning uses inputs without labelled outcomes. Clustering can reveal operating modes or unusual groups. Principal component analysis (PCA) transforms correlated variables into orthogonal directions of decreasing variance. PCA is useful for dimensionality reduction and anomaly detection, but a high-variance direction is not automatically a fault direction.

A neural network composes weighted transformations. A simple layer is:

\mathbf{h} = g(W\mathbf{x}+\mathbf{b})

where W is a weight matrix, \mathbf{b} is a bias vector and g is a nonlinear activation function. Deep models can learn complex patterns, but they require representative data, careful validation and stronger governance.

Training, validation and test data

Training data fit parameters; validation data support model and threshold selection; test data provide a final estimate of performance. For time-dependent data, use chronological splits or rolling-origin evaluation rather than random shuffling. A model must be tested on machines, loads or periods not used during fitting.

Data leakage occurs when information unavailable at prediction time enters the features. For example, a feature calculated using the future post-failure period can create unrealistically high performance. Leakage is a methodological error, not a minor technical detail.

4. Predictive Maintenance

Preventive maintenance replaces or services equipment at scheduled intervals. Predictive maintenance estimates condition, failure probability or remaining useful life (RUL) from evidence. A condition-based policy can be represented as:

\text{Intervene if } P(Failure\ within\ H | \mathbf{x}1:t) ≥ τ

where H is the planning horizon and τ is a chosen probability threshold. The probability estimate must be calibrated: among cases assigned probability 0.8, approximately 80% should fail within the horizon over comparable conditions.

RUL is often written:

RULt = Tfailure − t

where Tfailure is the future failure time and t is the current time. In practice, Tfailure is uncertain, so a prediction interval or probability distribution is more informative than a single number.

A maintenance model should connect prediction to action. Relevant questions include: Is a spare available? How long does repair take? What is the consequence of an unnecessary shutdown? Can the model provide sufficient warning? A statistically accurate model may still be operationally poor if it produces alarms that cannot be acted upon.

5. Digital Twins and Simulation Analytics

A digital twin is a maintained digital representation of a physical asset or process, connected through data and used for monitoring, analysis, prediction or control. It differs from a static CAD model because it reflects changing state and operating conditions.

A practical twin contains:

  • a physical asset and its sensors;
  • a communication and data-ingestion layer;
  • a state or simulation model;
  • analytics for diagnosis and prediction;
  • interfaces for engineers and operators;
  • governance, access control and version history.

A physics-based model may express conservation laws. For a simplified lumped thermal system:

C(dT/dt) = Qin − hA(T−Ta)

Here C is thermal capacitance in J/K, T is component temperature in °C or K for temperature differences, Qin is heat input in W, h is heat-transfer coefficient in W/(m²·K), A is area in m² and Ta is ambient temperature. The equation assumes lumped temperature, approximately constant parameters and a defined heat-transfer mechanism. Both sides have units of watts.

A data-driven model may estimate unmeasured state or correct modelling error. Hybrid modelling combines both:

\hat{y}(t) = yphysics(t;\theta) + fdata(\mathbf{x}1:t)

The data term should not be allowed to violate essential physical constraints such as non-negative mass, conservation or safe temperature limits. Simulation analytics can test “what-if” cases, estimate sensitivity and identify control settings without experimenting directly on expensive equipment.

6. Explainability, Bias and Responsible Use

Explainability concerns whether users can understand why a model produced an output. A global explanation describes overall behaviour; a local explanation describes one prediction. Feature importance, partial-dependence analysis and local surrogate methods can help, but importance is not the same as causation. A feature correlated with failure may be a proxy for another variable.

Bias may enter through non-representative sampling, missing failure examples, sensor placement, maintenance-record practices or changes in production. Performance should be evaluated across relevant groups, such as machine types, shifts, sites, materials and operating loads. A model that performs well on one machine family may be unsafe on another.

Engineers should record model purpose, intended population, assumptions, training period, features, thresholds, known limitations and escalation procedures. Human review is especially important for safety-critical decisions. Automation should support competent operators rather than conceal uncertainty.

7. Privacy, Cybersecurity and Model Governance

Industrial data may reveal production rates, proprietary processes, worker behaviour or supplier information. Data minimization means collecting only what is required. Access should follow least privilege, and sensitive data should be protected in transit and at rest. Retention periods and deletion procedures should be defined.

Connected machines enlarge the attack surface. Important controls include asset inventories, network segmentation, strong authentication, secure patching, encrypted communication, backups, anomaly monitoring and incident-response plans. A manipulated sensor stream can cause either missed failures or unnecessary shutdowns. Cybersecurity is therefore part of mathematical-model reliability.

Model governance establishes accountability throughout the model life cycle:

  1. define the decision and risk level;
  2. document data lineage and consent or authorization;
  3. validate performance and physical plausibility;
  4. approve deployment and access rights;
  5. monitor drift, calibration and incidents;
  6. revalidate after equipment, software or process changes;
  7. retire the model when it is no longer trustworthy.

Concept drift occurs when the relationship between inputs and outcomes changes. Examples include a new lubricant, altered cutting speed, sensor replacement or redesigned component. A stable software pipeline does not guarantee a stable industrial model.

8. Illustrative Case: Predicting Spindle-Bearing Failure

Background

A machine shop operates ten CNC spindles. Each spindle records vibration RMS in mm/s, bearing temperature in °C, motor current in A and rotational speed in rpm every minute. Historical maintenance records identify 18 bearing failures over two years.

Problem

The maintenance team wants at least 24 hours of warning while limiting false alarms, because an unnecessary spindle stoppage costs production time. The data are imbalanced: healthy minutes greatly outnumber failure-period minutes.

Analysis

Engineers first synchronize sensors, remove impossible values using documented physical limits, retain a flag for missingness and create rolling features using only past observations. Examples include the trailing mean, standard deviation and slope. The data are divided chronologically: the first 18 months for development and the final 6 months for testing. Failure events from the same physical episode are kept together to avoid leakage.

A baseline threshold model is compared with logistic regression and a gradient-boosted model. Evaluation uses event-level recall, false alarms per operating day, warning time and calibration. Accuracy is not selected as the primary measure because a model predicting “healthy” almost always could achieve high accuracy while missing failures.

Approach and solution

The selected model estimates the probability of failure within 24 hours. An alarm is issued only when the probability exceeds a threshold chosen with maintenance personnel. A second rule requires either two consecutive alarms or one alarm accompanied by a rapid temperature rise. This reduces reactions to isolated sensor spikes.

A dashboard displays probability, recent trends, contributing features and data-quality status. The model cannot directly stop a machine. A qualified engineer confirms the condition, checks lubrication and schedules inspection. All predictions, overrides and outcomes are logged.

Outcome

In the illustrative evaluation, the system detects 16 of 18 failure events, with median warning time of 31 hours. It produces four false alarms per 100 operating days, compared with nine for the initial threshold system. These figures are illustrative rather than universal; they require confirmation during controlled deployment. The model is reviewed monthly for calibration and after any spindle refurbishment.

Learning points

The case demonstrates that successful industrial AI includes data engineering, event definitions, temporal validation, cost-sensitive thresholding, human procedures, cybersecurity and ongoing monitoring. The most complex algorithm is not necessarily the best engineering solution.

9. Emerging Industrial Mathematics and Best Practice

Contemporary industrial mathematics increasingly combines differential equations, statistical inference, optimization and learning. Important directions include:

  • Physics-informed learning: incorporating governing equations or constraints into model training.
  • Uncertainty quantification: reporting prediction distributions rather than unjustified certainty.
  • Bayesian updating: revising beliefs as new sensor evidence arrives.
  • Edge analytics: processing data near the machine to reduce latency and bandwidth.
  • Federated learning: training across sites while retaining data locally, although model updates still require security controls.
  • Survival analysis: modelling time-to-failure while accounting for censored observations.
  • Optimization and control: selecting actions that balance production, energy, quality and risk.

A strong implementation follows several principles: define the decision before choosing an algorithm; establish a simple baseline; preserve units and timestamps; separate training from evaluation; validate across operating regimes; quantify uncertainty; document assumptions; involve domain experts; secure the complete data path; and monitor performance after deployment.

Chapter Summary

Industrial data become useful when measurement, mathematical modelling and engineering judgment are connected. Time-series methods describe trend, seasonality, dependence and change. Moving averages and EWMA filters support monitoring, while autocorrelation and chronological validation prevent misleading conclusions. Supervised learning predicts labelled outcomes, unsupervised learning reveals structure and regularization helps control overfitting.

Predictive maintenance converts sensor evidence into maintenance decisions, but performance must be evaluated using operationally meaningful measures such as recall, false alarms, warning time and calibration. Digital twins combine physical assets, data connections, simulation and analytics. Hybrid models can exploit both physical laws and empirical patterns, provided that physical constraints and assumptions are respected.

Explainability, bias assessment, privacy, cybersecurity and governance are essential components of trustworthy industrial mathematics. Models require lifecycle monitoring because equipment, processes and data distributions change. The professional engineer therefore treats AI as an engineered socio-technical system rather than an isolated algorithm.

Key Terms

Time series: Ordered observations indexed by time.

Stationarity: A condition in which key statistical properties remain stable over time.

Autocorrelation: Correlation between a series and a lagged version of itself.

EWMA: Exponentially weighted moving average used to smooth and monitor data.

Data leakage: Use of information in model development that would not be available at prediction time.

Supervised learning: Learning from inputs paired with known target values.

Unsupervised learning: Learning structure from inputs without labelled targets.

Regularization: A complexity penalty used to reduce overfitting.

Classification: Prediction of categories such as healthy or failed.

Precision: The proportion of positive predictions that are correct.

Recall: The proportion of actual positive cases that are detected.

Remaining useful life: Estimated time until an asset reaches a defined failure or replacement condition.

Digital twin: A connected digital representation of a physical asset or process.

Hybrid model: A model combining physical equations and data-driven components.

Explainability: The extent to which model behaviour can be understood by users.

Bias: Systematic error associated with data, measurement or modelling.

Concept drift: Change over time in the relationship between inputs and outcomes.

Model governance: Processes for approval, monitoring, accountability and retirement of models.

Data minimization: Limiting collection and retention to what is necessary.

Edge analytics: Processing data near its source rather than only in a central system.

Review Questions

Short Answer Questions

  1. Why can random train-test splitting be inappropriate for industrial time-series data?
  2. Define autocorrelation and state one engineering use for it.
  3. Distinguish precision from recall.
  4. What is the purpose of regularization in machine learning?
  5. Name four major components of a digital twin.

Long Answer Questions

  1. Explain how an industrial engineer should prepare sensor data before building a predictive-maintenance model.
  2. Compare preventive maintenance and predictive maintenance, including their data and decision requirements.
  3. Explain the role of physics-based equations in a hybrid digital-twin model.
  4. Discuss why accuracy alone is a poor evaluation metric for rare machine failures.
  5. Describe a model-governance process from problem definition to model retirement.

Analytical / Application Questions

  1. A temperature sensor records 60, 64 and 68 °C. Using α = 0.5 and z1 = 60, calculate z2 and z3 for an EWMA. Interpret the result.
  2. A failure classifier produces TP = 18, FP = 6 and FN = 2. Calculate precision and recall, and explain which metric would be especially important when missed failures are dangerous.
  3. Design a validation plan for a digital-twin predictive-maintenance model used on three machine types operating at different loads. Identify possible leakage, drift and governance controls.

Multiple Choice Questions with Answers

Question 1

Which property distinguishes time-series observations from many ordinary independent observations?

A. Their order in time can contain information

B. They must always have normally distributed values

C. They cannot contain missing values

D. They must use temperature units

Correct Answer: A. Their order in time can contain information

Question 2

For an EWMA, what is the effect of increasing α toward 1?

A. The estimate reacts more strongly to recent observations

B. The estimate becomes independent of all observations

C. The estimate always becomes equal to zero

D. The sampling interval changes

Correct Answer: A. The estimate reacts more strongly to recent observations

Question 3

Which metric is TP/(TP+FN)?

A. Precision

B. Recall

C. Accuracy

D. Specificity

Correct Answer: B. Recall

Question 4

What is data leakage in model development?

A. Loss of data caused by a network outage

B. Use of information unavailable at prediction time

C. Compression of sensor files

D. Removal of duplicate rows

Correct Answer: B. Use of information unavailable at prediction time

Question 5

Which activity is most characteristic of unsupervised learning?

A. Predicting a labelled failure outcome

B. Estimating a known target temperature

C. Grouping observations without target labels

D. Calculating a maintenance invoice

Correct Answer: C. Grouping observations without target labels

Question 6

If a model has TP = 18 and FP = 6, what is its precision?

A. 0.50

B. 0.67

C. 0.75

D. 0.90

Correct Answer: C. 0.75

Question 7

Which statement best describes a digital twin?

A. A static drawing with no connection to an asset

B. A connected digital representation used to monitor or analyse a physical asset

C. A replacement for all physical sensors

D. A database containing only historical invoices

Correct Answer: B. A connected digital representation used to monitor or analyse a physical asset

Question 8

In the thermal equation C(dT/dt) = Q_in − hA(T−T_a), what are the units of Q_in?

A. Watt

B. Square metre

C. Degree Celsius per second

D. Kilogram per cubic metre

Correct Answer: A. Watt

Question 9

Why is chronological testing generally appropriate for forecasting models?

A. It guarantees zero prediction error

B. It reflects the direction in which future predictions are made

C. It removes the need for a validation set

D. It makes all observations independent

Correct Answer: B. It reflects the direction in which future predictions are made

Question 10

Which practice directly supports model governance?

A. Changing thresholds without recording the change

B. Deploying a model without defining its intended use

C. Monitoring drift and revalidating after major process changes

D. Deleting all prediction logs

Correct Answer: C. Monitoring drift and revalidating after major process changes

Applied Mathematics
Chapter 15 of 15