Internet of Things in Mechatronics

Chapter 11
Digital Twins and Smart Manufacturing Integration

Bachelor Program in Mechatronics Engineering
Internet of Things in Mechatronics   •   Bachelor

Digital Twins and Smart Manufacturing Integration

Introduction

Modern manufacturing systems are no longer isolated machines. A production line may contain programmable logic controllers (PLCs), industrial robots, sensors, supervisory control and data acquisition (SCADA) systems, manufacturing execution systems (MES), enterprise resource planning (ERP) software, simulation models, and cloud or edge-computing platforms. The value of these technologies increases substantially when they are connected through a consistent representation of the physical process.

A digital twin is a digital representation of a physical asset, process, system, or facility that is connected to its physical counterpart through data. Unlike a static computer-aided design model, a digital twin is intended to reflect operational conditions, status, history, and—where appropriate—predicted future behavior. In mechatronics engineering, digital twins provide a bridge between mechanical equipment, electrical control, software, production planning, and business decisions.

This chapter explains how digital twins are designed and integrated into smart manufacturing. It considers the relationship between IoT devices and industrial control systems, the roles of PLC, SCADA, MES, ERP, robotics, simulation, and asset management, and the use of operational data for closed-loop improvement.

Learning Objectives

By the end of this chapter, a student should be able to:

  1. Distinguish a digital model, digital shadow, and digital twin.
  2. Describe the architecture of an IoT-enabled smart manufacturing system.
  3. Explain how PLC, SCADA, MES, ERP, robotics, simulation, and asset-management systems interact.
  4. Select suitable data, communication, and synchronization strategies for a digital twin.
  5. Calculate and interpret basic manufacturing performance measures.
  6. Analyze a digital-twin implementation, including its benefits, risks, governance, and limitations.
  7. Design a closed-loop improvement cycle using operational data and engineering models.

1. From Physical Equipment to Digital Twin

A manufacturing asset has several kinds of information associated with it:

  • Design information: geometry, materials, ratings, tolerances, and bills of materials.
  • Control information: sequences, set points, interlocks, alarms, and control logic.
  • Operational information: temperatures, currents, positions, pressures, cycle times, and states.
  • Maintenance information: inspection records, work orders, failures, spare parts, and remaining useful life estimates.
  • Contextual information: product type, operator action, production order, environmental conditions, and quality results.

A digital representation becomes more useful as these information classes are connected to a common asset identity and time reference.

1.1 Model, shadow, and twin

The terms below describe increasing levels of connection:

ConceptData relationshipTypical example
Digital modelNo automatic connection is requiredA CAD or simulation model of a robot cell
Digital shadowPhysical operation updates the digital representationA dashboard showing motor temperature
Digital twinData flows between physical and digital systems, potentially influencing decisions or controlA validated cell model that predicts collision risk and updates maintenance or scheduling decisions

The distinction is useful but not absolute. In industry, “digital twin” is sometimes used broadly for any connected digital representation. A technically rigorous implementation should specify the asset boundary, data sources, update rate, model purpose, validation method, and permitted actions.

A digital twin is not necessarily a perfect copy. It is a purpose-built engineering system. A high-fidelity model may be appropriate for robot collision analysis, while a simpler state model may be more useful for production scheduling.

1.2 Core properties

An effective digital twin generally has:

  1. Identity: a unique relationship between the digital record and physical asset.
  2. Synchronization: defined rules for when and how data are updated.
  3. Context: metadata such as units, location, product, and operating mode.
  4. Model behavior: equations, rules, simulation logic, machine-learning models, or combinations of these.
  5. History: time-stamped events and measurements for diagnosis and traceability.
  6. Validation: evidence that the representation is sufficiently accurate for its intended use.
  7. Actionability: outputs that support a decision, such as maintenance, parameter adjustment, or schedule revision.
Digital twin architecture for smart manufacturing Physical systemMachines, robots,sensors, products Digital twinIdentity and contextLive data and historySimulation and analyticsPredictions and decisions SCADA / MESOperations ERPBusiness planning MaintenanceQuality and assets measurementscommands / decisions
Architecture connecting a physical manufacturing system to a digital twin and enterprise systems
Figure: Architecture connecting a physical manufacturing system to a digital twin and enterprise systems

Figure: A digital twin connects physical assets, operational data, analytical models, and manufacturing information systems.

2. Architecture of IoT-Enabled Manufacturing

A practical architecture is usually layered rather than organized around a single software product.

2.1 Physical and sensing layer

The physical layer includes motors, drives, valves, conveyors, robots, tooling, workpieces, and inspection equipment. Sensors measure variables such as vibration, temperature, force, position, energy, pressure, and vision features. Actuators change the process. Sensor selection must consider range, accuracy, response time, installation, calibration, environmental protection, and failure modes.

Not every variable must be sampled at the same rate. A servo position loop may operate in milliseconds, while energy consumption or production counts may be sampled once per second or once per minute. Excessive sampling creates storage and network costs without necessarily improving decisions.

2.2 Control layer: PLC and robot controllers

PLCs execute deterministic logic, sequence control, interlocking, and safety-related functions where appropriately certified. A robot controller manages motion programs, coordinate frames, tool data, and motion supervision. These controllers must remain capable of safe local operation even if a higher-level network or cloud service is unavailable.

A digital twin should not bypass safety systems. Emergency stops, safety-rated monitored speed, guard interlocks, and other protective functions require suitable hardware, software, validation, and applicable regulatory compliance. A cloud prediction may recommend an action; it should not be treated as a substitute for a safety-rated control function.

2.3 Supervisory and edge layer

SCADA systems provide visualization, alarms, trends, operator interaction, and supervisory commands. Edge gateways collect data from industrial protocols, normalize tags, buffer data during network interruptions, and perform local calculations. Edge processing is valuable when latency, bandwidth, privacy, or system availability is important.

A gateway should preserve source timestamps, quality codes, engineering units, and device identity. Converting every value into an unlabeled numerical stream destroys the context needed for engineering analysis.

2.4 Manufacturing and enterprise layers

The MES coordinates production execution. It commonly manages dispatch lists, work instructions, genealogy, quality records, labor reporting, and equipment status. ERP systems manage orders, purchasing, inventory, finance, and broader resource planning. The digital twin links these systems to the actual behavior of assets and processes.

A useful division of responsibility is:

SystemMain question
PLC or robot controllerHow should the machine execute its immediate task?
SCADAWhat is happening now, and what requires operator attention?
MESWhich product, route, recipe, and quality record apply to this operation?
ERPWhat should be purchased, produced, delivered, or financially planned?
Digital twinWhat does the asset or process represent, how is it behaving, and what may happen next?
Asset-management systemWhat maintenance, lifecycle, and reliability action is required?

The boundaries vary by company, but explicit responsibility prevents duplicated logic and conflicting commands.

2.5 Data interoperability

Interoperability has at least four dimensions:

  • Technical: systems can exchange messages.
  • Syntactic: data structures and formats are understood.
  • Semantic: terms such as “cycle time,” “reject,” and “available” have shared meanings.
  • Organizational: processes and responsibilities support the exchange.

Industrial communication may involve fieldbus technologies, industrial Ethernet, OPC UA, MQTT, REST interfaces, or vendor-specific APIs. The choice should be based on timing, determinism, security, device support, information modeling, and lifecycle cost—not fashion alone.

An asset information model should define tag names, units, data types, allowed values, timestamp meaning, quality status, and ownership. For example, Motor_07.Temperature is incomplete unless the system specifies whether the value is winding temperature or bearing temperature, whether it is in °C, and how sensor failure is represented.

3. Modeling and Synchronization

3.1 Model types

Digital twins often combine several model types:

  • Physics-based models: derive behavior from mechanics, thermodynamics, electrical theory, or process balances.
  • Discrete-event models: represent queues, routing, machine states, and production flows.
  • Data-driven models: learn relationships from historical measurements.
  • Hybrid models: combine physical constraints with statistical or machine-learning components.
  • Rule-based models: encode expert logic, thresholds, and operating procedures.

Model choice depends on the decision. A physics model may explain why a bearing heats, while a statistical model may provide a fast anomaly score. A model that predicts accurately in one product mix may fail when tooling, material, or operating conditions change.

3.2 State estimation

Measurements are imperfect and may be incomplete. A twin can estimate unmeasured state variables using a process model and sensor observations. In a simple discrete-time state-space representation:

xₖ₊₁ = f(xₖ, uₖ, wₖ)
yₖ = h(xₖ) + vₖ

Here, xₖ is the system state at sample k, uₖ is the input or control action, yₖ is the measured output, f is the state-transition model, h is the measurement model, and wₖ and vₖ represent process and measurement errors. The equations apply when the system can reasonably be represented in discrete time and the variables have been defined consistently. Kalman filtering and related observers are examples of methods that combine these equations with measurements; their assumptions must be checked rather than applied automatically.

3.3 Synchronization and time

Synchronization is more than copying values. The twin must know when a value was measured, when it arrived, and which production context applied. Important issues include:

  • clock synchronization across controllers and gateways;
  • sampling and aggregation intervals;
  • event ordering and duplicate messages;
  • missing, delayed, or out-of-sequence data;
  • recipe and product identity;
  • model version and parameter version.

For a high-speed control loop, network latency and jitter may make a centralized twin unsuitable. The control loop should remain local, while the twin supports supervision, optimization, diagnosis, and planning.

4. Manufacturing Performance and Closed-Loop Improvement

A digital twin is valuable when it supports measurable improvement. Common indicators include availability, performance, quality, throughput, energy intensity, mean time between failures, and mean time to repair.

A widely used form of overall equipment effectiveness (OEE) is:

OEE = Availability × Performance × Quality

where each factor is expressed as a fraction between 0 and 1. One common definition is:

Availability = Operating time ÷ Planned production time
Performance = (Ideal cycle time × Total count) ÷ Operating time
Quality = Good count ÷ Total count

Time units must be consistent, and the definitions of planned time, operating time, ideal cycle time, and count must be agreed. OEE is useful for diagnosing losses but is not a complete measure of factory productivity; it can encourage local optimization if considered without demand, labor, energy, quality cost, or bottleneck context.

Worked example: interpreting OEE

An automated cell has 480 minutes of planned production time. It operates for 420 minutes, produces 800 parts, has an ideal cycle time of 0.5 minutes per part, and produces 760 good parts.

Availability is:

420 ÷ 480 = 0.875 = 87.5%

Performance is:

(0.5 × 800) ÷ 420 = 0.9524 ≈ 95.2%

Quality is:

760 ÷ 800 = 0.95 = 95.0%

Therefore:

OEE = 0.875 × 0.9524 × 0.95 ≈ 0.791 = 79.1%

The result does not by itself identify the best intervention. The twin should connect downtime events, speed losses, reject causes, product type, and maintenance records so that improvement teams can investigate the loss mechanism.

Closed-loop improvement cycle

A closed-loop manufacturing system follows a disciplined sequence:

  1. Observe: collect contextualized machine, process, quality, and maintenance data.
  2. Represent: update asset states and process models.
  3. Analyze: detect anomalies, estimate causes, simulate alternatives, or forecast outcomes.
  4. Decide: select an action subject to safety, quality, production, and business constraints.
  5. Act: adjust a recipe, dispatch maintenance, change a schedule, or improve a work instruction.
  6. Verify: compare the outcome with a baseline and record the result.
  7. Learn: update parameters, rules, or models under change control.

The loop should include human approval where consequences are significant. Automatic adaptation without validation can turn a sensor fault or biased model into a production failure.

5. Applications in Mechatronics

Predictive maintenance

A twin can combine vibration, temperature, current, lubrication history, operating load, and maintenance records. It may identify abnormal behavior, estimate a probability of failure, or recommend inspection. Predictive maintenance is not simply “install sensors and use AI.” It requires failure-mode knowledge, labeled or interpretable evidence, appropriate alarm thresholds, and a maintenance process capable of acting on predictions.

Robotics and virtual commissioning

A robot-cell twin can represent robot geometry, reachability, tooling, collision envelopes, cycle paths, PLC sequences, and material flow. Engineers can test programs and interlocks before installing equipment. Virtual commissioning reduces commissioning time and exposes integration problems, but model fidelity, controller differences, sensor behavior, and human interaction must be validated.

Quality and traceability

A twin can associate each product with machine states, process parameters, tool identity, inspection results, and operator or order context. This genealogy supports root-cause analysis and selective containment rather than indiscriminate product recall. Data retention and access policies must reflect contractual, safety, and regulatory requirements.

Energy and sustainability

Energy data can be related to production quantity, product type, idle time, and machine state. A useful metric is energy intensity:

Energy intensity = Energy consumed ÷ Good output

For example, if a line consumes 1,200 kWh while producing 3,000 good units, its energy intensity is 0.4 kWh per good unit. The denominator and system boundary must be stated: the result differs if it includes only machine electricity or also compressed air, heating, and auxiliary equipment.

Production scheduling

A simulation twin can evaluate alternative sequences, buffers, maintenance windows, and product mixes. It can expose bottlenecks and estimate the effect of downtime. However, a simulation is only as credible as its assumptions about routing, processing-time distributions, changeovers, failures, and resource constraints.

6. Illustrative Case: Digital Twin for an Assembly Cell

Background

The following is a fictional illustrative case. A manufacturer operates a robotic assembly cell containing a six-axis robot, electric screwdriver, conveyor, vision inspection, PLC, and SCADA system. The cell produces two product variants. Management observes frequent minor stops and intermittent screw-fastening defects.

Problem

The existing system records total production and major alarms but does not link each product to torque data, robot program, tool identity, or micro-stoppage events. Maintenance replaces the screwdriver on a fixed calendar schedule, while operators manually classify many stops.

Analysis

The engineering team defines a twin boundary around the cell. The asset model includes the robot, tool, conveyor, fastener feeder, camera, PLC, and product genealogy. Each product receives a unique identifier. The gateway collects cycle state, torque and angle, motor current, alarm code, program number, tool serial number, and inspection result. Timestamps are synchronized, and data quality flags identify missing or invalid measurements.

A rules-based model first identifies states such as running, blocked, starved, faulted, setup, and planned maintenance. A statistical baseline then compares fastening torque by product variant, tool age, and cycle position. The team deliberately avoids immediate automatic parameter changes because incorrect torque could create a safety or reliability issue.

Approach and solution

The MES supplies the production order and variant. The PLC supplies sequence and state transitions. The robot controller supplies program and position events. The tool controller supplies torque and angle. Vision supplies inspection results. The twin stores contextualized events and presents a cell-level dashboard. A simulation model evaluates whether planned tool changes can occur during existing product changeovers.

The team introduces a review workflow:

  • anomaly detected by the twin;
  • engineer checks raw data and sensor quality;
  • maintenance inspects the tool or feeder;
  • corrective action is recorded;
  • post-action performance is compared with the baseline.

Outcome

After a pilot period, the team reports fewer unexplained stops and faster diagnosis. The most important improvement is not a particular algorithm; it is the association of production context, tool condition, and quality results. The organization also discovers that some apparent tool failures are caused by feeder alignment and that a single OEE value had hidden variant-specific losses.

Learning points

  1. A digital twin requires an asset model and semantics, not only a dashboard.
  2. Data quality and genealogy are as important as analytics.
  3. Safety-critical and quality-critical actions require controlled approval.
  4. A staged deployment—observe, analyze, assist, then cautiously automate—is safer than immediate autonomy.
  5. Benefits should be evaluated using operational outcomes such as reduced diagnosis time, fewer defects, and improved schedule adherence.

7. Governance, Cybersecurity, and Limitations

Data governance

Governance defines who owns data, who may access it, how long it is retained, how it is corrected, and which version is authoritative. Asset identifiers should remain stable across engineering, maintenance, MES, and ERP records. Model changes require version control, testing, approval, and rollback capability.

Cybersecurity

Connecting operational technology to enterprise or cloud systems expands the attack surface. Good practice includes network segmentation, least-privilege access, strong authentication, secure remote access, patch and vulnerability management, asset inventories, backups, logging, anomaly monitoring, and incident-response plans. Availability and safety are especially important in industrial environments; a security control that disrupts a validated process may introduce another risk if poorly engineered.

Privacy and workforce implications

Operator identifiers, performance records, video, and location data may constitute personal information. Collection should have a legitimate purpose, transparent notice, access controls, and appropriate retention. Digital twins should improve work and safety rather than become a mechanism for unjustified surveillance. Human expertise remains necessary for interpreting unusual conditions and managing exceptions.

Technical limitations

Important limitations include sensor drift, missing data, changing product mix, model uncertainty, vendor lock-in, inconsistent semantics, network outages, inadequate computational resources, and false alarms. Machine-learning models may be biased toward common operating conditions and fail during rare faults. A prediction should therefore communicate confidence, evidence, applicable operating range, and recommended verification.

8. Contemporary Developments and Best Practices

Current developments include industrial edge AI, standardized asset information models, semantic interoperability, augmented-reality work instructions, federated data architectures, and the use of generative AI for engineering assistance. These technologies are useful only when their outputs are traceable, constrained by engineering knowledge, and reviewed according to risk.

Recommended implementation practice is to:

  1. Start with a specific business or engineering decision.
  2. Define the physical boundary, stakeholders, and success measures.
  3. Establish asset identity, data ownership, units, timestamps, and quality codes.
  4. Keep deterministic control and safety functions local and validated.
  5. Use a minimum viable twin before adding high-fidelity simulation.
  6. Validate models against independent operational data.
  7. Separate monitoring, recommendation, and automatic control permissions.
  8. Integrate maintenance and work processes, not only dashboards.
  9. Measure benefits against a baseline and account for lifecycle cost.
  10. Treat cybersecurity, privacy, and model governance as design requirements.

Chapter Summary

Digital twins are connected, purpose-built digital representations of physical assets, processes, or systems. They differ from static digital models because they use operational data and may support decisions or controlled actions. Smart manufacturing integration requires cooperation among sensors, actuators, PLCs, robot controllers, SCADA, edge gateways, MES, ERP, simulation, asset management, and quality systems.

A robust twin depends on identity, context, synchronization, semantic interoperability, suitable models, data quality, validation, and governance. Physics-based, discrete-event, data-driven, hybrid, and rule-based models serve different purposes. Performance measures such as OEE and energy intensity can support analysis, but they must be defined consistently and interpreted in context.

The central engineering pattern is a closed loop: observe, represent, analyze, decide, act, verify, and learn. Predictive maintenance, virtual commissioning, traceability, energy management, quality improvement, and production scheduling are important applications. Nevertheless, digital twins have limitations involving uncertainty, cybersecurity, privacy, integration cost, model drift, and human factors. Safe implementation proceeds incrementally and preserves validated local control and human accountability.

Key Terms

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

Digital model: A digital representation without a required automatic data connection to the physical system.

Digital shadow: A representation updated by data from the physical system, usually without a reciprocal action path.

Asset identity: The unique relationship between a physical asset and its digital record.

Synchronization: The process of keeping physical observations, digital states, and timestamps aligned.

PLC: A programmable logic controller used for industrial control and sequencing.

SCADA: Supervisory control and data acquisition for monitoring, alarms, trends, and supervisory operation.

MES: Manufacturing execution system coordinating production operations and genealogy.

ERP: Enterprise resource planning system managing business resources, orders, purchasing, and inventory.

Edge computing: Processing data near the source to reduce latency, bandwidth use, or dependence on remote services.

Interoperability: The ability of systems to exchange and correctly use information.

Semantic model: A formal description of the meaning, relationships, units, and context of data.

Virtual commissioning: Testing automation logic and equipment behavior in a virtual environment before or alongside physical commissioning.

Predictive maintenance: Maintenance supported by condition information and predictions of degradation or failure.

OEE: Overall equipment effectiveness, commonly calculated as availability × performance × quality.

Genealogy: The traceable relationship between a product and its materials, processes, equipment, and results.

State estimation: Inferring system conditions from models and imperfect measurements.

Closed-loop improvement: A cycle in which measured outcomes inform decisions and subsequent process changes.

Model drift: Decline in model validity as equipment, products, data, or operating conditions change.

Review Questions

Short Answer Questions

  1. Distinguish a digital model, digital shadow, and digital twin.
  2. State four properties required for a useful digital twin.
  3. What are the principal responsibilities of a PLC, SCADA system, MES, and ERP system?
  4. Why are timestamps, units, and quality codes important in industrial data?
  5. Identify two cybersecurity risks created by connecting operational technology to enterprise systems.

Long Answer Questions

  1. Explain a layered architecture for integrating IoT devices, PLCs, SCADA, MES, ERP, and a digital twin.
  2. Compare physics-based, discrete-event, data-driven, and hybrid models, including suitable manufacturing applications.
  3. Explain how a digital twin can support predictive maintenance while preserving safety and human accountability.
  4. Discuss the role of semantic interoperability and asset identity in manufacturing integration.
  5. Evaluate the benefits and limitations of virtual commissioning for a robotic assembly cell.

Analytical / Application Questions

  1. A cell has 450 minutes of planned production time, operates for 405 minutes, produces 720 parts, has an ideal cycle time of 0.5 minutes per part, and produces 684 good parts. Calculate availability, performance, quality, and OEE. State the assumptions behind your calculation.
  2. Design a closed-loop digital-twin workflow for a conveyor system experiencing intermittent jams. Specify data sources, model or analysis method, human decisions, control boundaries, and verification metrics.
  3. An AI model flags abnormal motor vibration, but the vibration sensor has recently failed calibration. Analyze the appropriate engineering response, including data validation, operational risk, maintenance action, and model-governance requirements.

Multiple Choice Questions with Answers

Question 1

Which characteristic most clearly distinguishes a digital twin from a static digital model?

A. It contains a three-dimensional drawing.

B. It is always hosted in the cloud.

C. It is connected to the physical system through operational data and defined synchronization.

D. It uses artificial intelligence in every application.

Correct Answer: C. It is connected to the physical system through operational data and defined synchronization.

Question 2

Which system is primarily responsible for deterministic machine sequencing and interlocking?

A. ERP

B. PLC

C. MES

D. Business intelligence dashboard

Correct Answer: B. PLC

Question 3

A cell operates for 360 minutes during 400 minutes of planned production time. What is its availability?

A. 10%

B. 40%

C. 90%

D. 111%

Correct Answer: C. 90%

Question 4

Which information is essential for giving a sensor value engineering meaning?

A. A decorative dashboard color

B. Unit, timestamp, asset identity, and quality status

C. The name of the software vendor only

D. The number of cloud servers used

Correct Answer: B. Unit, timestamp, asset identity, and quality status

Question 5

Which activity is an example of virtual commissioning?

A. Replacing a failed bearing after a breakdown

B. Testing robot programs and PLC sequences against a simulated cell before physical startup

C. Purchasing raw material through an ERP system

D. Manually recording an operator's lunch break

Correct Answer: B. Testing robot programs and PLC sequences against a simulated cell before physical startup

Question 6

A line produces 1,000 total units, of which 950 are good. What is the quality factor under the chapter definition?

A. 5%

B. 50%

C. 95%

D. 105.3%

Correct Answer: C. 95%

Question 7

Why should safety-rated protective functions generally remain independent of a cloud-based digital twin?

A. Cloud systems cannot store historical data.

B. Safety functions require validated, dependable behavior with suitable timing and fault handling.

C. Digital twins cannot represent machines.

D. PLCs are used only for accounting.

Correct Answer: B. Safety functions require validated, dependable behavior with suitable timing and fault handling.

Question 8

Which sequence best represents a closed-loop improvement cycle?

A. Act, ignore, delete, repeat

B. Observe, represent, analyze, decide, act, verify, and learn

C. Purchase, advertise, ship, and invoice

D. Simulate, disconnect, and archive

Correct Answer: B. Observe, represent, analyze, decide, act, verify, and learn

Question 9

What is the principal purpose of product genealogy in a digital-twin system?

A. To increase screen brightness

B. To associate a product with its materials, process conditions, equipment, and inspection results

C. To replace all maintenance personnel

D. To eliminate the need for timestamps

Correct Answer: B. To associate a product with its materials, process conditions, equipment, and inspection results

Question 10

Which situation is a likely limitation of a data-driven manufacturing model?

A. It may perform poorly when product mix or operating conditions differ from its training data.

B. It always explains physical causation perfectly.

C. It cannot use sensor measurements.

D. It does not require validation.

Correct Answer: A. It may perform poorly when product mix or operating conditions differ from its training data.

Internet of Things in Mechatronics
Chapter 11 of 15