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:
- Devices — smart sensors, drives, PLCs with embedded diagnostics
- Edge — gateways and industrial PCs filter, aggregate and run local analytics with low latency
- Connectivity — OPC UA (information models, security), MQTT/Sparkplug (lightweight publish–subscribe), TSN, 5G
- Platform/cloud — historians, data lakes, dashboards, ML training
- Applications — OEE, energy monitoring, quality analytics, predictive maintenance, traceability
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
- Vibration RMS:
v_rms = √(Σ v²/N) - Trend extrapolation:
fit y = a + b·f(t), solve y(t*) = alarm → RUL = t* − t_now - Availability:
A = MTBF / (MTBF + MTTR) - Bearing defect frequency (BPFO):
BPFO = (n/2)·f_r·(1 − (d/D)cos φ) - Inspection interval:
≤ P-F interval / 2
Worked example: Availability
Given: MTBF 500 h, MTTR 8 h
Find: A.
- 500/508
Answer: 98.4%
Worked example: Bearing outer-race frequency
Given: 9 balls, shaft 25 Hz, d/D = 0.2, φ = 0
Find: BPFO.
- (9/2) × 25 × (1 − 0.2)
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.
- 60/2
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 thenFitting 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
- Wrong: Collecting data without a use case. — Right: Start from a business problem (downtime, scrap, energy).
- Wrong: Flat networks connecting OT to the internet. — Right: Segment networks and follow IEC 62443.
- Wrong: Time-based maintenance for random failures. — Right: Use condition-based strategies where failures give warning.
Applications
- Predictive maintenance: Motors, pumps, gearboxes, spindles.
- Virtual commissioning: Testing PLC/robot code on digital twins.
- Mass customisation: Flexible lines producing batch size one.
- Energy management: Metering and optimising plant energy use.
Key takeaways
- Industry 4.0 = connected cyber-physical production.
- Devices → edge → OPC UA/MQTT → cloud → apps.
- Condition monitoring + trending → RUL.
- Digital twins, cobots and cybersecurity by design.
Going further
- Physics-informed ML: Combining degradation physics with data-driven models.
- Asset administration shell: Standardised digital twin (RAMI 4.0).
- Edge AI: Running inference on gateways and smart sensors.