# Architecting an Agent-Based Fault Diagnosis Engine for IEC 61499 Industrial Cyber-Physical Systems
###### Abstract  
IEC 61499 is a reference architecture for constructing Industrial Cyber-Physical Systems (ICPS). However, current function block development environments only provide limited fault-finding capabilities. There is a need for comprehensive diagnostic tools that help engineers identify faults, both during development and after deployment. This article presents the software architecture for an agent-based fault diagnostic engine that equips agents with domain-knowledge of IEC 61499. The engine encourages a Model-Driven Development with Diagnostics methodology where agents work alongside engineers during iterative cycles of design, development, diagnosis and refinement. Attribute-Driven Design (ADD) was used to propose the architecture to capture fault telemetry directly from the ICPS. A Views and Beyond Software Architecture Document presents the architecture. The Architecturally-Significant Requirement (ASRs) were used to design the views while an Architectural Trade-off Analysis Method (ATAM) evaluated critical parts of the architecture. The agents locate faults during both early-stage development and later provide long-term fault management. The architecture introduces dynamic, low-latency software-in-loop Diagnostic Points (DPs) that operate under the control of an agent to capture fault telemetry. Using sound architectural design approaches and documentation methods, coupled with rigorous evaluation and prototyping, the article demonstrates how quality attributes, risks and architectural trade-offs were identified and mitigated early before the construction of the engine commenced. industrial cyber-physical systems; IEC 61499; function blocks; quality-driven architectures; fault diagnostics; multi-agent systems +
Footnote †: journal: _Future Internet_  
is a stand-alone, multi-platform application that can identify and diagnose faults in applications created with IEC 61499 Function Blocks (FBs) [2]. The architecture employs software agents that are hosted within the GORITE (Goal ORIented TEams) Multi-Agent Framework [3; 4; 5]. The Belief-Desire-Intention (BDI) paradigm embodied in GORITE allows teams of agents to respond to changes in the FBs under examination, adopting a range of analysis strategies when faults are uncovered. Current IEC 61499 Integrated Development Environments (IDEs) have limited design-time fault-finding capabilities. While some IDEs allow single FBs to be exercised, sets of connected blocks cannot be diagnosed together [6; 7]. Engineers need to be able to quickly build semi-automated fault identification capabilities that can be reused throughout the life-cycle of an IEC 61499 Function Block application (FB application). The engine described here addresses that need by facilitating a Model-Driven Development with Diagnostics methodology that supports engineers while they are creating or reusing FBs to construct their ICPS with IEC 61499 [8]. This paper focuses primarily on the architectural design of the software agents and the way in which they have been provided with domain-specific knowledge of IEC 61499. This equips them with the abilities they need to interact with FB applications that are operating nominally, are failing, or have failed. GORITE provides a framework upon which to create new agent designs, but it does not include templates of pre-built agents. The architectural design of the agents, their skills and beliefs was therefore framed by four research questions:  
**RQ1:** _How do we equip an agent with the ability to distinguish between normal function block activities and misbehaviour that indicates that a fault may have occurred?_ A scoping survey on industrial-scale fault diagnostics for ICPS was published before the architectural design commenced [9]. This examined fault identification and diagnostic techniques across a range of domains where robust fault management has become critical. The findings that relate to the design of the engine are discussed in Section 2, including the underlying concepts of ICPS, function blocks, faults and agents.