Physical Address
304 North Cardinal St.
Dorchester Center, MA 02124
Physical Address
304 North Cardinal St.
Dorchester Center, MA 02124
Modern industrial automation systems increasingly rely on function blocks as the fundamental building blocks of control logic. Standards such as IEC 61499 (distributed control systems) and IEC 61131-3 (programmable controllers) have established function block diagrams as a primary programming paradigm. However, when these function blocks are deployed in safety-related applications governed by IEC 61508 (functional safety), the need for unambiguous, mathematically rigorous specification becomes paramount. IEC TR 63158 addresses this gap by providing a formal description framework for function blocks used in safety-related systems.
The core problem that IEC TR 63158 solves is semantic ambiguity. Informal function block specifications — described in natural language or with incomplete execution semantics — can lead to subtle implementation errors that are difficult to detect through testing alone. Consider a simple safety function that monitors a pressure sensor and triggers an emergency shutdown when pressure exceeds a threshold. In an informal specification, questions arise: What is the exact timing relationship between sensor input sampling and output actuation? How does the function block behave during initialization or after a communication fault? What are the precise conditions under which the safety function degrades or fails? IEC TR 63158’s formal description addresses these questions with mathematical precision.
| Semantic Aspect | Informal Description | Formal Description (IEC TR 63158) | Benefit |
|---|---|---|---|
| Execution order | “Process inputs then update outputs” | Clocked synchronous data-flow with explicit firing rules | Deterministic behavior across platforms |
| Timing behavior | “Respond within 100 ms” | Timed automaton with worst-case execution time bounds | Verifiable latency guarantees |
| Error handling | “Detect faults appropriately” | Explicit fault states with transition conditions and recovery paths | Complete coverage of failure modes |
| Data dependencies | “Uses sensor value X” | Directed data-flow graph with type constraints and range checks | Automatic consistency verification |
| Composability | “Blocks can be combined” | Algebraic composition rules with interface contracts | Safe composition without side effects |
IEC TR 63158 defines three formal execution models for safety-related function blocks: the synchronous model, where all blocks execute in lockstep on a common clock (suitable for time-triggered safety systems); the asynchronous model, where blocks execute independently and communicate via buffered channels (suitable for distributed safety systems); and the hybrid model, which combines synchronous clusters with asynchronous inter-cluster communication (suitable for multi-rate safety systems). The choice of execution model has profound implications for the safety case — particularly for the systematic capability (SC) rating in IEC 61508 context.
The formalization uses two complementary mathematical frameworks: Timed Automata for modeling temporal behavior and Data-Flow Equations for modeling functional behavior. A safety-related function block is described as a tuple (States, Inputs, Outputs, Clock, Transitions, Invariants), where Transitions are guarded by input events and timing constraints, and Invariants define safety properties that must hold in each state. This dual formalism enables both model checking (exhaustive verification of safety properties) and runtime monitoring (detecting property violations during operation).
| Execution Model | Timing Determinism | Hardware Requirements | Max Achievable SIL | Typical Applications |
|---|---|---|---|---|
| Synchronous | Fully deterministic | Single controller or synchronized multicore | SIL 4 | Turbine control, reactor protection |
| Asynchronous (bounded delay) | Bounded nondeterminism | Distributed controllers with time-triggered network | SIL 3 | Conveyor systems, process plants |
| Asynchronous (unbounded) | Nondeterministic | Standard fieldbus or Ethernet | SIL 2 | Material handling, packaging |
| Hybrid | Cluster-deterministic | Mixed architecture with sync domains | SIL 3 | Automotive manufacturing, robotics cells |
One of the most valuable contributions of IEC TR 63158 is its guidance on formal verification techniques for function block safety cases. The report describes three verification approaches: model checking (exhaustive state-space exploration to verify safety properties such as “output Q is never asserted when input S is false”), theorem proving (mathematical proof of functional correctness for data-flow equations), and abstract interpretation (static analysis to compute safe approximations of function block behavior). The standard provides detailed criteria for selecting the appropriate verification technique based on the complexity of the function block and the required SIL level.
From a practical engineering standpoint, the report offers concrete guidance on implementing the formal description in existing development workflows. It defines a mapping between the formal function block specification and commonly used implementation languages (structured text, ladder logic, C++ with safety restrictions), including the specific coding rules that must be followed to preserve semantic equivalence between the formal model and the deployed code. The report also addresses the critical topic of function block composition — when two formally verified function blocks are composed, the resulting composite may or may not preserve the original safety properties. IEC TR 63158 defines a composition contract methodology where each block exposes its assumptions and guarantees, enabling compositional verification.