OPC UA · IEC 62541 · Information model · Security · Sessions · 10 min read

OPC UA Architecture: Information Model, Security, Sessions and Transport

OPC UA (IEC 62541) is a 13-part standard that defines a platform-independent, service-oriented architecture for industrial and building automation communication. Unlike its predecessor OPC Classic (which was Windows COM/DCOM-only), OPC UA runs on any OS, embeds a full security model, and provides a unified information model that makes every server self-describing — eliminating the need for out-of-band data dictionaries when integrating BMS, SCADA, and IoT platforms.

IEC 62541 standard structure

IEC 62541 consists of 13 numbered parts. Parts 1–7 define the core architecture; parts 8–14 cover mappings, security, and profiles. For building automation integrators, the most relevant parts are 1 (Concepts), 3 (Address Space Model), 4 (Services), 6 (Mappings — encoding and transport), 7 (Profiles), and the companion specification IEC 62541-100 (OPC UA for Buildings).

PartTitleRelevance
IEC 62541-1Concepts and OverviewFoundational architecture, service model, information model concept
IEC 62541-3Address Space ModelNodeClass types, References, attributes — the data model backbone
IEC 62541-4ServicesRead, Write, Browse, Subscribe, Call service sets — all server APIs
IEC 62541-6MappingsBinary encoding (UA Binary), XML encoding, opc.tcp transport, HTTPS, WebSockets
IEC 62541-7ProfilesServer, Client, Transport profiles for conformance testing
IEC 62541-12Discovery and Global ServicesLocal Discovery Server (LDS), Global Discovery Server (GDS) for cert management
IEC 62541-100OPC UA for BuildingsIFC-mapped information model for spaces, zones, HVAC, energy metering

Information model: NodeClass types and References

Every piece of data in an OPC UA server is represented as a Node in the address space. Nodes have a NodeClass attribute that defines their role. Nodes are linked to each other by typed References — for example, HasComponent, HasProperty, Organizes, HasSubtype. This creates a directed graph that clients can browse to discover server content without prior knowledge of the data structure.

NodeClassPurposeExample in BMS
ObjectContainer grouping related nodes; no value itselfAHU_01 object grouping all AHU variables
VariableHolds a typed value; readable and optionally writableSupplyAirTemp (Float, °C), FanSpeed (UInt16, RPM)
MethodCallable function; input and output argumentsResetAlarm(), SetOperatingMode(mode: Int32)
ViewNamed subset of the address space for filtered browsingEnergyMeteringView showing only kWh nodes
DataTypeDefines scalar or structured type used by VariablesEnumHvacMode {Auto=0, Heating=1, Cooling=2}
ObjectTypeTemplate for Object nodes (like a class definition)HVACUnitType with standard components
VariableTypeTemplate for Variable nodes with default attributesAnalogItemType with EngineeringUnits property
ReferenceTypeDefines semantics of a reference between nodesHasComponent, HasProperty, Organizes

Address space: namespaces and browsable tree

The address space is structured as a browsable tree. Every node is identified by a NodeId consisting of a namespace index and an identifier (numeric, string, or GUID). Namespace 0 (ns=0) is always the OPC UA standard namespace containing built-in types and standard nodes. Namespace 1+ are assigned by the server for vendor or application-specific content. Clients discover the namespace table via the GetNamespaceArray service call.

OPC UA address space — BMS example

Objects (ns=0;i=85)  ← OPC UA standard root
├── Server (ns=0;i=2253)  ← always present, server diagnostics
└── Building_01 (ns=1;s=Building_01)  ← application namespace
    ├── Floor_02 (ns=1;s=Building_01/Floor_02)
    │   ├── AHU_01 (ns=1;s=AHU_01)  [Object]
    │   │   ├── SupplyAirTemperature (ns=1;s=AHU_01.SAT)  [Variable, Float]
    │   │   │   ├── EngineeringUnits  [Property: "°C"]
    │   │   │   ├── EURange  [Property: Low=0, High=60]
    │   │   │   └── StatusCode  [Property: Good/Bad/Uncertain]
    │   │   ├── FanSpeed (ns=1;s=AHU_01.FanRPM)  [Variable, UInt16]
    │   │   ├── DamperPosition (ns=1;s=AHU_01.Damper)  [Variable, Byte, 0–100%]
    │   │   └── ResetAlarm (ns=1;s=AHU_01.ResetAlarm)  [Method]
    │   └── VAV_Zone_2A (ns=1;s=VAV_2A)  [Object]
    │       ├── RoomTemperature (ns=1;s=VAV_2A.RoomTemp)  [Variable, Float]
    │       └── Setpoint (ns=1;s=VAV_2A.SP)  [Variable, Float, writable]
    └── Meters (ns=1;s=Meters)
        └── Main_kWh (ns=1;s=Meter.kWh)  [Variable, Double]

Clients navigate from the Objects root using the Browse service, following HierarchicalReferences (HasComponent, Organizes, HasProperty) to discover nodes. The TranslateBrowsePathsToNodeIds service allows clients to jump directly to a known path without traversing the entire tree — useful for performance-sensitive polling of known variables.

Transport options

OPC UA defines three transport bindings. The choice affects latency, firewall traversal, and protocol overhead. OPC UA Binary over TCP is the default for plant-floor BMS integration; HTTPS and WebSockets are used for cloud or browser-accessible interfaces.

TransportURI prefixDefault portOverheadNotes
OPC UA TCPopc.tcp://4840Lowest — binary framingBest for plant-floor; persistent TCP connection; not firewall-friendly
OPC UA HTTPSopc.https://443Medium — HTTP/1.1 + TLSFirewall-friendly; can traverse proxies; higher latency per request
OPC UA WebSocketsopc.wss://443Low — WebSocket framingBrowser-compatible; persistent; used for web SCADA and cloud gateways

Plant-floor recommendation: Always use opc.tcp:// within a building LAN or OT VLAN. The persistent TCP connection eliminates per-request TLS handshake overhead and gives the lowest subscription notification latency. Reserve HTTPS for cross-site or cloud integrations where firewall port 4840 cannot be opened.

Security modes and security policies

OPC UA security is negotiated at the Secure Channel level before any application messages are exchanged. The server advertises its supported EndpointDescriptions (combinations of MessageSecurityMode and SecurityPolicyUri). The client selects one when opening a connection. Never use None in a production environment — it transmits all data in plaintext with no integrity protection.

MessageSecurityModeProtectionUse case
NoneNo signing, no encryptionLab / development only — never production
SignHMAC integrity on messages; no payload encryptionPerformance-critical SCADA on trusted closed LAN
SignAndEncryptHMAC + AES encryption of all message payloadsStandard for all BMS and cloud integration

The SecurityPolicyUri selects the cryptographic algorithms. Current recommended policies (as of IEC 62541-7:2022) are:

SecurityPolicyUriAsymmetric (key exchange)Symmetric (data)Status
Basic128Rsa15RSA-PKCS1-v1.5 / 1024-bitAES-128-CBCDeprecated — do not use
Basic256RSA-OAEP / 1024-bitAES-256-CBCDeprecated — do not use
Basic256Sha256RSA-OAEP / 2048-bit + SHA-256AES-256-CBC + SHA-256 HMACCurrent — widely supported
Aes128Sha256RsaOaepRSA-OAEP / 2048-bit + SHA-256AES-128-CBC + SHA-256 HMACCurrent — lower CPU overhead
Aes256Sha256RsaPssRSA-PSS / 2048-bit + SHA-256AES-256-CBC + SHA-256 HMACRecommended — strongest, use where supported

Deprecation notice: Basic128Rsa15 and Basic256 use 1024-bit RSA keys and SHA-1, both considered cryptographically weak. IEC 62541-7:2022 marks them deprecated. Kepware KEPServerEX 6.x and Siemens DESIGO CC support Basic256Sha256 and Aes256Sha256RsaPss. Disable deprecated policies in production server configuration to prevent downgrade attacks.

Authentication methods

Authentication is performed at the Session layer (above the Secure Channel). OPC UA defines three ActivateSession identity token types. Certificate-based authentication is the most secure and is required for industrial security standards such as IEC 62443-3-3 Security Level 2.

Token typeDescriptionRecommendation
AnonymousIdentityTokenNo credentials — any client can create a sessionDisable in production; acceptable only for read-only public dashboards
UserNameIdentityTokenUsername and password; password encrypted using server public keyAcceptable for operator access; use with Sign+Encrypt transport
X509IdentityTokenClient presents a valid X.509 certificate; server validates against trust listRequired for machine-to-machine integration and IEC 62443 SL-2 compliance

Sessions and subscriptions

A Session is established on top of the Secure Channel after authentication. Sessions have a RequestedSessionTimeout (typically 60–3600 seconds); if the client does not send a keep-alive before timeout, the server deletes the session and all its subscriptions. Clients should handle reconnection with session re-establishment or transfer.

Subscriptions are the primary mechanism for efficient data monitoring. Instead of polling variables repeatedly (which generates unnecessary traffic), clients create a subscription with a PublishingInterval and add MonitoredItems to it. The server samples each MonitoredItem at the SamplingInterval and queues value changes; when the PublishingInterval fires, all queued notifications are sent in a single PublishResponse message.

Subscription parameters — key fields

CreateSubscription request:
  RequestedPublishingInterval: 1000  // ms — how often server sends Publish
  RequestedMaxKeepAliveCount: 10     // Publish cycles before keep-alive sent
  RequestedLifetimeCount: 30         // LifetimeCount × PublishingInterval = session timeout
  MaxNotificationsPerPublish: 1000   // cap notifications per PublishResponse
  PublishingEnabled: true

MonitoredItem parameters:
  SamplingInterval: 500              // ms — server samples item at this rate
                                     // must be ≥ server MinSupportedSampleRate
  QueueSize: 10                      // buffer for overrun; 1 = last value only
  DiscardOldest: true                // discard oldest on queue overflow
  DeadbandType: None / Absolute / Percent
  DeadbandValue: 0.5                 // Absolute: only report if change > 0.5 units
                                     // Percent: only report if change > 0.5% of EURange

Deadband filtering for HVAC sensors: Setting an absolute deadband of 0.2–0.5°C on temperature variables prevents the server from flooding the subscription with trivial noise-driven updates. For energy meters, a percent deadband of 1% on kWh counters is typical. Deadband filtering happens server-side, reducing both CPU load and network traffic.

OPC UA companion specifications

Companion specifications extend the base OPC UA standard with domain-specific information models. They define standard ObjectTypes, VariableTypes, and namespace URIs so that devices from different vendors expose data in a consistent, interoperable structure. Building automation engineers should be aware of the following companion specifications:

SpecificationScopeKey ObjectTypes
IEC 62541-100 (OPC UA for Buildings)Building automation: spaces, zones, equipment, energy meteringBuildingType, SpaceType, HVACSystemType, EnergyMeterType
OPC UA for FDI (Field Device Integration)Field devices: sensors, actuators, process instrumentsDeviceType, FunctionBlockType, ParameterType
OPC UA for PLCopenPLC program elements: function blocks, alarms, tasksFunctionBlockType, AlarmType, TaskType
OPC UA for I4.0 Asset Administration ShellDigital twin: asset metadata, submodels, propertiesAssetAdministrationShellType, SubmodelType
OPC UA for Devices (DI)Hardware device information baselineDeviceType, ComponentType, SoftwareType

Need OPC UA server configuration for your BMS project?

We configure and secure OPC UA servers on Siemens DESIGO CC, Beckhoff TwinCAT, and Kepware KEPServerEX — including certificate management, security policy hardening, and subscription tuning for high-density sensor deployments.

Request a quote →
Loading...
Back to top