Industry 4.0, IIoT, Digital Twins & Predictive Maintenance

The connected, intelligent factory. Learn the industrial revolutions, cyber-physical systems, IIoT architecture (sensors → edge → cloud), protocols (OPC UA, MQTT), data and analytics, digital twins and virtual commissioning, condition monitoring and predictive maintenance (vibration, thermal, oil analysis, remaining useful life), collaborative robots, additive manufacturing, AR, cybersecurity and business impact — with Python predicting a bearing's time to failure from vibration trends.

Industry 4.0 describes the fourth industrial revolution: machines, products and people connected through data, with software and AI making production flexible, efficient and self-optimising. Mechatronic systems are its building blocks — now networked, instrumented and modelled.

The practical value comes from specific use cases: predicting failures before they happen, running virtual versions of machines to test changes, tracking every product through production, and adapting lines to batch size one.

An analogy

A factory with Industry 4.0 is like a hospital with continuous patient monitoring: instead of waiting for machines to 'get sick' (break down) or checking them on a fixed calendar, sensors watch vital signs and doctors (analytics) intervene just in time.

From Industry 1.0 to 4.0

1.0 — steam-powered mechanisation (late 18th c.); 2.0 — electricity and mass production (assembly lines); 3.0 — electronics, PLCs and IT automation (1970s); 4.0 — cyber-physical systems, IIoT, cloud, AI. Industry 5.0 adds human-centric, sustainable and resilient production.

IIoT architecture

Data flows through layers:

Maintenance strategies

Reactive (run to failure), preventive (time-based), condition-based (act when indicators exceed limits), predictive (forecast RUL), prescriptive (recommend actions). Condition-monitoring techniques: vibration analysis (ISO 10816/20816 severity, FFT, envelope), thermography, oil/debris analysis, motor current signature analysis, ultrasound. Choose with RCM (reliability-centred maintenance) based on failure modes and consequences.

Digital twins, cobots and security

Digital twins are synchronised virtual models of machines or lines, used for virtual commissioning (testing PLC code on a simulated machine), what-if optimisation and predictive maintenance. Collaborative robots work beside people with force/speed limiting (ISO/TS 15066). Additive manufacturing and AR support flexible production and maintenance. Security is critical: segmentation, IEC 62443, secure remote access, patching and monitoring — connected machines are attack surfaces.

Formulas

Worked example: Availability

Given: MTBF 500 h, MTTR 8 h

Find: A.

Answer: 98.4%

Worked example: Bearing outer-race frequency

Given: 9 balls, shaft 25 Hz, d/D = 0.2, φ = 0

Find: BPFO.

Answer: 90 Hz — a peak here signals outer-race damage

Worked example: Inspection interval

Given: P-F interval for bearing vibration ≈ 60 days

Find: Maximum inspection interval.

Answer: 30 days (or continuous online monitoring)

Predicting time to a vibration alarm

import math, random
random.seed(5)
# Predictive maintenance: vibration RMS trend and time-to-threshold extrapolation
days = list(range(0, 60, 5))
rms = [1.0 + 0.002 * d * d / 5 + random.gauss(0, 0.05) for d in days]   # mm/s, slowly degrading bearing
n = len(days)
# fit rms = a + b*d^2 by least squares on x = d^2
xs = [d * d for d in days]
mx, my = sum(xs) / n, sum(rms) / n
b = sum((x - mx) * (y - my) for x, y in zip(xs, rms)) / sum((x - mx) ** 2 for x in xs)
a = my - b * mx
alarm = 4.5                                   # ISO 10816 zone C/D boundary for a medium machine (mm/s)
d_alarm = math.sqrt((alarm - a) / b)
print(f"latest RMS {rms[-1]:.2f} mm/s; fitted a={a:.2f}, b={b:.5f}")
print(f"predicted to reach {alarm} mm/s at day {d_alarm:.0f} -> schedule maintenance before then")
# latest RMS 2.20 mm/s; fitted a=0.96, b=0.00042
# predicted to reach 4.5 mm/s at day 92 -> schedule maintenance before then

Fitting a degradation model to trended vibration and extrapolating to an alarm level gives a remaining-useful-life estimate (~37 days after day 55 here), so the bearing can be replaced during a planned stop. Real systems use spectral features (bearing defect frequencies, envelope analysis), temperature and ML models, and report uncertainty bounds.

Common mistakes

Applications

Key takeaways

Going further