53  OPC-UA Standard

53.1 Learning Objectives

After completing this chapter, you will be able to:

  • Explain OPC-UA architecture and its role in industrial integration
  • Analyze the OPC-UA information model and node structure
  • Compare client-server and publish-subscribe communication patterns
  • Implement OPC-UA security features including authentication and encryption
  • Design OPC-UA-based systems for IT/OT integration

OPC-UA is like a universal translator for factory machines. In most factories, different machines from different manufacturers speak their own “languages” and cannot talk to each other. OPC-UA gives them a common language so a robot arm, a temperature sensor, and a cloud computer can all share information securely. If you have ever used a USB cable that works with many different devices, OPC-UA does the same thing but for industrial communication.

53.2 Prerequisites

Before diving into this chapter, you should be familiar with:

53.3 Introduction

OPC Unified Architecture (OPC-UA) is the leading standard for industrial interoperability, designed to bridge IT and OT systems. Unlike proprietary protocols that lock users into specific vendor ecosystems, OPC-UA provides a vendor-neutral, platform-independent foundation for secure industrial communication.

Minimum Viable Understanding: OPC-UA Standard

Core Concept: OPC-UA (Open Platform Communications Unified Architecture) is a vendor-neutral, platform-independent standard for secure industrial communication that provides semantic data modeling, built-in security, and both client-server and publish-subscribe communication patterns for bridging IT and OT systems.

Why It Matters: Industrial environments contain equipment from dozens of vendors, each with proprietary protocols. Without OPC-UA, integrating a new machine into a production line can take weeks of custom coding. With OPC-UA and companion specifications, machines self-describe their capabilities, enabling plug-and-play integration that reduces commissioning time from weeks to hours. This translates to avoiding $50,000-500,000 per day in delayed production starts.

Key Takeaway: OPC-UA is the universal translator for industrial systems. Use client-server mode for traditional SCADA and HMI applications, and pub-sub mode for cloud connectivity and analytics. Always enable security (at minimum Basic256Sha256 policy) and leverage companion specifications for your specific industry to get standardized information models out of the box.

Hey there, young engineer! Bella the Bridge Builder has a big challenge at the Smart Factory!

The Problem: Imagine you have a classroom where some kids speak English, some speak Spanish, some speak French, and some speak Japanese. Nobody can understand each other! That is exactly what happens in factories – every machine speaks its own “language” (protocol).

Bella’s Solution – OPC-UA! Bella builds a Universal Translator that can talk to ALL the machines:

  • The robot arm speaks PROFINET (like German)
  • The temperature sensor speaks Modbus (like French)
  • The conveyor belt speaks EtherCAT (like Japanese)
  • The cloud computer speaks MQTT (like English)

OPC-UA is like a super-smart translator who speaks ALL these languages and helps everyone understand each other!

How It Works (Simply):

  1. Self-Describing: Each machine tells OPC-UA what it can do – like a kid introducing themselves: “Hi, I’m a temperature sensor. I can tell you how hot things are!”
  2. Secure: OPC-UA uses secret codes (encryption) so nobody can sneak in and give wrong instructions to the machines
  3. Flexible: It works whether you want to ask a machine a question (client-server) or have machines shout updates to everyone who is listening (pub-sub)

Sensor Squad Memory Trick:

  • OPC-UA = Universal Translator (speaks every factory language)
  • Client-Server = Asking a question and getting an answer
  • Pub-Sub = Shouting news so everyone hears it
  • Companion Specs = Phrase books for specific industries

53.4 Why OPC-UA?

Time: ~12 min | Difficulty: Advanced | Unit: P03.C06.U04

Key Concepts

  • IoT Architecture: Layered model comprising perception, network, and application tiers defining how sensors, gateways, and cloud services interact.
  • Edge Computing: Processing data close to the sensor source to reduce latency, bandwidth costs, and cloud dependency.
  • Telemetry: Time-stamped sensor readings transmitted from a device to a cloud or edge platform for storage, analysis, and visualisation.
  • Protocol Stack: Set of communication protocols layered from physical radio to application message format that devices must implement to interoperate.
  • Device Lifecycle: Stages from manufacture through provisioning, operation, maintenance, and decommissioning that IoT management platforms must support.
  • Security Hardening: Process of reducing attack surface by disabling unused services, applying least-privilege access, and enabling encrypted communications.
  • Scalability: System property ensuring performance and cost remain acceptable as the number of connected devices grows from prototype to mass deployment.

Traditional industrial protocols were designed for specific vendors or applications, creating integration challenges. OPC-UA provides:

  • Platform independence: Works on any OS, hardware, or programming language
  • Semantic data modeling: Self-describing data with context and relationships
  • Built-in security: Authentication, encryption, and audit logging
  • Scalable: From embedded devices to cloud servers
  • Service-oriented: Multiple communication patterns (client-server, pub-sub)

53.5 OPC-UA Architecture

OPC-UA architecture diagram showing client-server model with three main components: OPC-UA client containing application logic and SDK in orange, OPC-UA server with address space and node management, and the secure communication channel connecting them with authentication, encryption, and session management layers.

OPC-UA Client-Server Architecture
Figure 53.1: OPC-UA architecture showing client-server model with secure communication channel between application client and server.

53.6 Information Model

OPC-UA’s information model is object-oriented and hierarchical:

Core concepts:

  • Nodes: Objects, variables, methods, views
  • References: Relationships between nodes (HasComponent, HasProperty, etc.)
  • Attributes: Metadata (NodeId, BrowseName, DisplayName, Value, etc.)
  • Data types: Built-in and custom types

Example hierarchy:

Hierarchical tree diagram showing the OPC-UA information model structure with object nodes at the top connecting to variable nodes, method nodes, and property nodes through HasComponent and HasProperty references, illustrating the self-describing object-oriented data model.

OPC-UA Information Model Hierarchy

This self-describing model means clients can discover capabilities without prior knowledge of the device.

53.7 Communication Patterns

OPC UA client-server architecture diagram showing communication between nodes

OPC-UA supports two communication patterns: client-server for direct request-response interaction (ideal for SCADA and HMI), and publish-subscribe for scalable, decoupled cloud integration.

53.7.1 Client-Server (Request-Response)

The traditional OPC-UA communication pattern:

  • Client discovers server capabilities
  • Client reads/writes values
  • Client subscribes to data changes
  • Server notifies client of changes
  • Good for: SCADA systems, HMIs, configuration tools

Typical workflow:

  1. Connect: Client establishes secure session with server
  2. Browse: Client explores server’s address space to discover nodes
  3. Read: Client reads current values of variables
  4. Subscribe: Client creates subscriptions for data change notifications
  5. Monitor: Server sends notifications when subscribed values change
  6. Write: Client writes new values to writable nodes
  7. Call: Client invokes methods on the server

53.7.2 Publish-Subscribe (Pub-Sub)

Modern OPC-UA extension for scalable communication:

  • Publishers send data to broker (MQTT, AMQP)
  • Subscribers receive data from broker
  • Decoupled, scalable, firewall-friendly
  • Good for: Cloud connectivity, analytics, mobile monitoring

Pub-Sub advantages:

  • Scalability: One publisher, thousands of subscribers
  • Decoupling: Publishers don’t need to know subscribers
  • Firewall-friendly: Outbound connections only
  • Cloud integration: Native MQTT/AMQP transport

53.8 Security Features

OPC-UA has security built-in from the ground up:

OPC UA security model diagram showing authentication, encryption, and access control layers

OPC-UA security operates in layered defense: transport encryption protects the channel, application certificates authenticate endpoints, user tokens authorize access, and audit logging records all activity.

53.8.1 Application Authentication

  • X.509 certificates identify applications
  • Certificate exchange during connection establishment
  • Trust lists managed by administrators

53.8.2 Message Security

  • Sign: Detect tampering (HMAC-SHA256)
  • Sign and encrypt: Protect confidentiality (AES-256)

53.8.3 User Authentication

  • Username/password
  • X.509 user certificates
  • Kerberos tokens
  • SAML tokens

53.8.4 Audit Logging

  • All security events logged
  • Connection attempts, authentication failures
  • Read/write operations on critical data

53.8.5 Security Policies

Policy Signing Encryption Use Case
None No No Testing only
Basic128Rsa15 Yes Yes Legacy compatibility
Basic256Sha256 Yes Yes Current standard
Aes256-Sha256-RsaPss Yes Yes Highest security
Security Best Practice

Never use Security Policy “None” in production environments. This setting disables all authentication and encryption, exposing industrial systems to unauthorized access and data manipulation. Even in development environments, testing with security enabled helps identify integration issues early.

53.8.6 OPC-UA Security Policy Comparison

Compare security policies to understand the tradeoffs between performance and protection level.

Security Policy Selection Guidelines

For critical infrastructure (power plants, pharmaceuticals, water treatment): Use Aes256-Sha256-RsaPss. The 15-40% performance overhead is negligible compared to the consequences of a security breach.

For standard industrial applications (manufacturing, logistics): Basic256Sha256 is the minimum acceptable standard. It provides strong security with moderate overhead.

Never use Basic128Rsa15 unless absolutely required for legacy equipment that cannot be upgraded. RSA-1024 has known vulnerabilities and fails modern compliance standards.

Never use “None” in any production environment. The minimal CPU savings (10-25%) are not worth the complete absence of security controls.

53.9 Companion Specifications

OPC-UA foundation provides base specifications, but industry-specific companion specifications define standardized information models:

Key companion specifications:

Specification Industry Purpose
OPC UA for Machinery General manufacturing Base machine model
PackML Packaging State machine, counters
EUROMAP Plastics/rubber Injection molding machines
MTConnect Machine tools CNC and machining centers
ISA-95 Enterprise integration MES/ERP connectivity
PLCopen Motion control Coordinated motion

Benefits of companion specifications:

  • Plug-and-play: Machines from different vendors expose same interface
  • Reduced integration: No custom mapping per vendor
  • Best practices: Industry consensus on data organization
  • Certification: Conformance testing ensures interoperability

53.10 Implementation Considerations

53.10.1 Embedded vs. Server-Class

Embedded OPC-UA (PLCs, gateways):

  • Limited resources (MB of RAM, MHz processors)
  • Use nano or micro profiles
  • Subset of features (no complex subscriptions)
  • Focus on reliability over features

Server-class OPC-UA (historians, MES):

  • Full feature support
  • High-performance subscriptions
  • Complex information models
  • Integration with enterprise systems

53.10.2 Performance Tuning

Subscription parameters:

  • Publishing interval: How often server checks for changes (100ms-5s typical)
  • Sampling interval: How often server reads underlying value (can be faster than publishing)
  • Queue size: How many changes to buffer between publications
  • Lifetime count: How many publishing intervals before subscription expires

Optimization strategies:

  1. Batch reads: Read multiple nodes in single request
  2. Indexed range: For arrays, read only needed elements
  3. Dead-band filtering: Only report changes exceeding threshold
  4. Aggregated subscriptions: Combine related nodes

53.10.3 OPC-UA Subscription Performance Calculator

Use this interactive calculator to understand how subscription parameters affect bandwidth and data volume in your OPC-UA deployment.

Interpretation Guide

Dead-band filtering eliminates noise by only reporting changes exceeding a threshold (e.g., temperature \(> 0.5°C\) change). For process variables that fluctuate within tolerance, this can reduce notifications by 70-90% with no data loss.

Batching aggregates multiple variable updates into single messages, reducing per-message overhead. Instead of 24 bytes overhead per variable, batching 10 variables means \(24/10 = 2.4\) bytes overhead each.

Typical savings: Industrial deployments commonly achieve 60-80% bandwidth reduction through these optimizations while preserving all significant data points.

53.10.4 High Availability

Redundancy patterns:

  • Server redundancy: Multiple servers with same address space
  • Client failover: Automatic reconnection to backup server
  • Network redundancy: Dual Ethernet paths

Session recovery:

  • Transfer subscriptions: Move subscriptions to backup server
  • Sequence numbers: Detect and recover from lost notifications
  • Secure channel renewal: Automatic key rotation

53.11 OPC-UA in Practice

53.11.1 Typical Deployment Architecture

ISA-95 automation pyramid with OPC UA integration across all five levels

A typical OPC-UA deployment spans five levels: field devices communicate via native industrial protocols, edge gateways aggregate data as OPC-UA servers, SCADA systems consume data as OPC-UA clients, cloud platforms receive pub-sub data over MQTT, and enterprise applications access analytics via REST APIs.

53.11.2 Common Integration Patterns

Pattern 1: PLC to Cloud

  1. PLC runs embedded OPC-UA server
  2. Edge gateway subscribes to PLC data
  3. Gateway publishes to MQTT broker
  4. Cloud platform consumes MQTT messages

Pattern 2: Multi-vendor Integration

  1. Each vendor’s equipment exposes OPC-UA server
  2. Central OPC-UA aggregator collects from all servers
  3. SCADA connects to single aggregator endpoint
  4. Unified namespace across all equipment

Pattern 3: Legacy Integration

  1. Protocol gateway converts Modbus/PROFIBUS to OPC-UA
  2. Gateway exposes standardized information model
  3. Modern applications connect via OPC-UA
  4. Legacy equipment remains unchanged

53.11.3 OPC-UA Deployment ROI Calculator

Calculate the return on investment for migrating from custom point-to-point integration to OPC-UA unified architecture.

Understanding the ROI

The calculator shows typical OPC-UA deployment economics:

Year 1: May have higher costs due to gateway/software purchases, but reduced integration labor often compensates.

Year 2-3: Lower annual maintenance (\[{annualMaintenanceCustom.toLocaleString()} → \]{annualMaintenanceOpcua.toLocaleString()}) drives positive ROI.

Year 4-5: Savings accelerate as new equipment additions take h instead of h.

Real-world factors not modeled: Avoided downtime during integration (often $50k-500k/day), faster time-to-market for new products, and reduced vendor lock-in risk.

53.11.4 Worked Example: OPC-UA Migration for a Bottling Plant

Scenario: A beverage company operates a bottling line with 8 filling stations (Siemens S7-1500 PLCs, PROFINET), 4 labeling machines (Beckhoff CX series, EtherCAT), 6 inspection cameras (Cognex, proprietary Ethernet/IP), and 12 conveyor segments (legacy Modbus RTU). The plant runs 3 shifts, 7 days/week. Management wants real-time OPC-UA-based dashboards for Overall Equipment Effectiveness (OEE) and predictive maintenance alerts in the cloud.

Step 1: Inventory and protocol mapping

Equipment Count Native Protocol OPC-UA Support Integration Path
Siemens S7-1500 PLC 8 PROFINET Native (built-in OPC-UA server) Direct client-server
Beckhoff CX series 4 EtherCAT Native (TwinCAT OPC-UA) Direct client-server
Cognex cameras 6 Ethernet/IP None Gateway required
Conveyor controllers 12 Modbus RTU (RS-485) None Gateway required
Total variables ~2,400

Step 2: Architecture design

  • Direct OPC-UA (12 devices): S7-1500 and Beckhoff PLCs expose native OPC-UA servers. SCADA connects as client for real-time control. No additional hardware needed.
  • Protocol gateways (18 devices): Two Softing dataFEED OPC Suite gateways ($4,800 each) convert Modbus RTU and Ethernet/IP to OPC-UA. Each gateway handles up to 15 devices.
  • Cloud connectivity: One edge gateway (Kepware KEPServerEX, $7,500 license) aggregates all 30 OPC-UA endpoints and publishes to MQTT broker for Azure IoT Hub.

Step 3: Cost comparison

Cost Category Custom Point-to-Point OPC-UA Unified
Protocol gateways $0 (custom code) $9,600 (2x Softing)
Edge aggregator Custom SCADA scripts ($35,000) $7,500 (Kepware)
Integration labor 600 hours @ $120/hr = $72,000 120 hours @ $120/hr = $14,400
Adding new equipment ~$8,000 per machine (custom) ~$500 per machine (configure existing)
Annual maintenance $25,000 (custom code updates) $3,500 (license renewals)
Year 1 total $107,000 $31,500
3-year total $157,000 $38,500

Step 4: Subscription tuning for 2,400 variables

Not all variables need the same update rate. Categorizing by purpose reduces network load by 75%:

Category Variables Publishing Interval Queue Size Dead-band
Safety interlocks 80 100ms 5 None (every change)
Process control 320 500ms 3 0.5%
Quality metrics 200 2s 2 1%
OEE/dashboards 1,800 10s 1 2%

Without tuning, 2,400 variables at 100ms = 24,000 notifications/sec. With tuning: ~950 notifications/sec (96% reduction), well within a single gateway’s capacity.

Result: The plant achieved 99.2% OPC-UA uptime in the first year. Adding a new palletizing robot (Fanuc, EtherNet/IP) took 2 days of configuration versus the estimated 3 weeks with custom integration. The cloud dashboard reduced unplanned downtime by 18% through predictive maintenance alerts, saving an estimated $340,000/year in avoided production losses.

Concept Relationships: OPC-UA Standard
Concept Relates To Relationship
OPC-UA ISA-95 Levels 0-3 OPC-UA bridges control layer (PLC) to operations layer (MES/ERP)
OPC-UA Industrial Protocols Replaces proprietary Modbus/PROFINET with vendor-neutral standard
Client-Server SCADA Systems Direct request-response for HMI and configuration tools
Pub-Sub MQTT/AMQP Decoupled pattern for cloud connectivity and analytics

Cross-module connection: Real-Time Requirements and ISA-95 explains timing constraints that determine when to use OPC-UA client-server vs. pub-sub patterns.

Common Pitfalls

Adding too many features before validating core user needs wastes weeks of effort on a direction that user testing reveals is wrong. IoT projects frequently discover that users want simpler interactions than engineers assumed. Define and test a minimum viable version first, then add complexity only in response to validated user requirements.

Treating security as a phase-2 concern results in architectures (hardcoded credentials, unencrypted channels, no firmware signing) that are expensive to remediate after deployment. Include security requirements in the initial design review, even for prototypes, because prototype patterns become production patterns.

Designing only for the happy path leaves a system that cannot recover gracefully from sensor failures, connectivity outages, or cloud unavailability. Explicitly design and test the behaviour for each failure mode and ensure devices fall back to a safe, locally functional state during outages.

53.12 Summary

OPC-UA has emerged as the definitive standard for industrial interoperability. Here are the key takeaways from this chapter:

Key Takeaways:

  1. Platform Independence: OPC-UA works across operating systems, hardware platforms, and programming languages, eliminating vendor lock-in. From embedded PLCs with megabytes of RAM to enterprise cloud servers, OPC-UA scales across the entire automation hierarchy.

  2. Semantic Data Modeling: The self-describing, object-oriented information model (nodes, references, attributes) enables clients to discover and understand device capabilities without prior knowledge. This reduces integration effort from weeks to hours for new equipment commissioning.

  3. Built-in Security: Unlike legacy protocols (Modbus, PROFIBUS) that have no native security, OPC-UA provides layered defense: X.509 application authentication, message signing and encryption (up to AES-256), multiple user authentication methods, and mandatory audit logging for regulatory compliance.

  4. Dual Communication Patterns: Client-server mode supports traditional SCADA and HMI use cases requiring direct request-response interaction. Pub-sub mode (over MQTT/AMQP) enables scalable, firewall-friendly cloud connectivity for analytics and monitoring.

  5. Companion Specifications: Industry-specific extensions (PackML, EUROMAP, MTConnect, ISA-95) provide standardized information models, enabling true plug-and-play integration between equipment from different vendors within the same industry.

  6. Legacy Integration: Protocol gateways bridge legacy Modbus/PROFIBUS/PROFINET devices into OPC-UA, allowing modernization without replacing existing equipment – critical given 20-30 year industrial equipment lifespans.

Critical Design Decision

When designing an OPC-UA deployment, always use client-server for control and direct device interaction (SCADA, HMI), and pub-sub over MQTT for cloud connectivity and analytics. Never use Security Policy “None” in production. Start with companion specifications for your industry before creating custom information models.

53.13 See Also

  • Industrial Protocols — Comparison of Modbus, PROFINET, and EtherCAT to understand when OPC-UA bridges legacy systems
  • Predictive Maintenance — OPC-UA data collection enables ML-based failure prediction in IIoT
  • Real-Time Requirements — Timing constraints across ISA-95 levels determine client-server vs pub-sub choice
In 60 Seconds

This chapter covers opc-ua standard, explaining the core concepts, practical design decisions, and common pitfalls that IoT practitioners need to build effective, reliable connected systems.

53.14 What’s Next

Direction Chapter Description
Next Real-Time Requirements and ISA-95 Timing constraints and automation hierarchy
Related Predictive Maintenance Using IoT for condition monitoring
Related Industrial Protocols Modbus, PROFINET, EtherCAT comparison
Index Industrial IoT and Industry 4.0 Overview of all IIoT topics