67 research outputs found

    LLM4PLC: Harnessing Large Language Models for Verifiable Programming of PLCs in Industrial Control Systems

    Full text link
    Although Large Language Models (LLMs) have established pre-dominance in automated code generation, they are not devoid of shortcomings. The pertinent issues primarily relate to the absence of execution guarantees for generated code, a lack of explainability, and suboptimal support for essential but niche programming languages. State-of-the-art LLMs such as GPT-4 and LLaMa2 fail to produce valid programs for Industrial Control Systems (ICS) operated by Programmable Logic Controllers (PLCs). We propose LLM4PLC, a user-guided iterative pipeline leveraging user feedback and external verification tools including grammar checkers, compilers and SMV verifiers to guide the LLM's generation. We further enhance the generation potential of LLM by employing Prompt Engineering and model fine-tuning through the creation and usage of LoRAs. We validate this system using a FischerTechnik Manufacturing TestBed (MFTB), illustrating how LLMs can evolve from generating structurally flawed code to producing verifiably correct programs for industrial applications. We run a complete test suite on GPT-3.5, GPT-4, Code Llama-7B, a fine-tuned Code Llama-7B model, Code Llama-34B, and a fine-tuned Code Llama-34B model. The proposed pipeline improved the generation success rate from 47% to 72%, and the Survey-of-Experts code quality from 2.25/10 to 7.75/10. To promote open research, we share the complete experimental setup, the LLM Fine-Tuning Weights, and the video demonstrations of the different programs on our dedicated webpage.Comment: 12 pages; 8 figures; Appearing in the 46th International Conference on Software Engineering: Software Engineering in Practice; for demo website, see https://sites.google.com/uci.edu/llm4plc/hom

    Formal Specification and Verification for Automated Production Systems

    Get PDF
    Complex industrial control software often drives safety- and mission-critical systems, like automated production plants or control units embedded into devices in automotive systems. Such controllers have in common that they are reactive systems, i.e., that they periodically read sensor stimuli and cyclically execute the same program to produce actuator signals. The correctness of software for automated production is rarely verified using formal techniques. Although, due to the Industrial Revolution 4.0 (IR4.0), the impact and importance of software have become an important role in industrial automation. What is used instead in industrial practice today is testing and simulation, where individual test cases are used to validate an automated production system. Three reasons why formal methods are not popular are: (a) It is difficult to adequately formulate the desired temporal properties. (b) There is a lack of specification languages for reactive systems that are both sufficiently expressive and comprehensible for practitioners. (c) Due to the lack of an environment model the obtained results are imprecise. Nonetheless, formal methods for automated production systems are well studied academically---mainly on the verification of safety properties via model checking. In this doctoral thesis we present the concept of (1) generalized test tables (GTTs), a new specification language for functional properties, and their extension (2) relational test tables (RTTs) for relational properties. The concept includes the syntactical notion, designed for the intuition of engineers, and the semantics, which are based on game theory. We use RTTs for a novel confidential property on reactive systems, the provably forgetting of information. Moreover, for regression verification, an important relational property, we are able to achieve performance improvements by (3) creating a decomposing rule which splits large proofs into small sub-task. We implemented the verification procedures and evaluated them against realistic case studies, e.g., the Pick-and-Place-Unit from the Technical University of Munich. The presented contribution follows the idea of lowering the obstacle of verifying the dependability of reactive systems in general, and automated production systems in particular for the engineer either by introducing a new specification language (GTTs), by exploiting existing programs for the specification (RTTs, regression verification), or by improving the verification performance

    Automatic translation from FBD-PLC-programs to NuSMV for model checking safety-critical control systems

    Get PDF
    Programmable logic controllers (PLCs) are digital control systems, commonly used in industrial automation and safety-critical applications. Control systems used in safety-critical areas must undergo an extensive and thorough certification and verification process. In safety-critical applications, the PLC programming standard IEC 61131-3 is widely accepted in industry. PLC programmers who develop control systems for safety-critical systems are often required to verify the logic of PLCs by using formal methods such as model checking. Translating manually from a PLC program to the input language of a model checker takes times and is often error-prone. We develop a compiler to automatically translate PLC programs in the function block diagram (FBD) language, one of five industry standard PLC programming notations, to the input language of the model checker NuSMV. We have evaluated correctness, robustness, and performance of the PLC-NuSMV compiler using a case study. Evaluation results show that the compiler can translate the PLC programs correctly. The compiler can also identify several input errors and can scale to relative large PLC programs

    Multi-Agent Modelling of Industrial Cyber-Physical Systems for IEC 61499 Based Distributed Intelligent Automation

    Get PDF
    Traditional industrial automation systems developed under IEC 61131-3 in centralized architectures are statically programmed with determined procedures to perform predefined tasks in structured environments. Major challenges are that these systems designed under traditional engineering techniques and running on legacy automation platforms are unable to automatically discover alternative solutions, flexibly coordinate reconfigurable modules, and actively deploy corresponding functions, to quickly respond to frequent changes and intelligently adapt to evolving requirements in dynamic environments. The core objective of this research is to explore the design of multi-layer automation architectures to enable real-time adaptation at the device level and run-time intelligence throughout the whole system under a well-integrated modelling framework. Central to this goal is the research on the integration of multi-agent modelling and IEC 61499 function block modelling to form a new automation infrastructure for industrial cyber-physical systems. Multi-agent modelling uses autonomous and cooperative agents to achieve run-time intelligence in system design and module reconfiguration. IEC 61499 function block modelling applies object-oriented and event-driven function blocks to realize real-time adaption of automation logic and control algorithms. In this thesis, the design focuses on a two-layer self-manageable architecture modelling: a) the high-level cyber module designed as multi-agent computing model consisting of Monitoring Agent, Analysis Agent, Self-Learning Agent, Planning Agent, Execution Agent, and Knowledge Agent; and b) the low-level physical module designed as agent-embedded IEC 61499 function block model with Self-Manageable Service Execution Agent, Self-Configuration Agent, Self-Healing Agent, Self-Optimization Agent, and Self-Protection Agent. The design results in a new computing module for high-level multi-agent based automation architectures and a new design pattern for low-level function block modelled control solutions. The architecture modelling framework is demonstrated through various tests on the multi-agent simulation model developed in the agent modelling environment NetLogo and the experimental testbed designed on the Jetson Nano and Raspberry Pi platforms. The performance evaluation of regular execution time and adaptation time in two typical conditions for systems designed under three different architectures are also analyzed. The results demonstrate the ability of the proposed architecture to respond to major challenges in Industry 4.0

    An approach to task coordination for hyperflexible robotic workcells

    Get PDF
    2014 - 2015The manufacturing industry is very diverse and covers a wide range of specific processes ranging from extracting minerals to assembly of very complex products such as planes or computers, with all intermediate processing steps in a long chain of industrial suppliers and customers. It is well know that the introduction of robots in manufacturing industries has many advantages. Basically, in relation to human labor, robots work to a constant level of quality. For example, waste, scrap and rework are minimized. Furthermore they can work in areas that are hazardous or unpleasant to humans. Robots are advantageous where strength is required, and in many applications they are also faster than humans. Also, in relation to special-purpose dedicated equipment, robots are more easily reprogrammed to cope with new products or changes in the design of existing ones. In the last 30-40 years, large enterprises in high-volume markets have managed to remain competitive and maintain qualified jobs by increasing their productivity with the incremental adoption and use of advanced ICT and robotics technologies. In the 70s, robots have been introduced for the automation of a wide spectrum of tasks such as: assembly of cars, white goods, electronic devices, machining of metal and plastic parts, and handling of workpieces and objects of all kinds. Robotics has thus soon become a synonym for competitive manufacturing and a key contributing technology for strengthening the economic base of Europe . So far, the automotive and electronics industries and their supply chains are the main users of robot systems and are accounting for more than 60% of the total annual robot sales. Robotic technologies have thus mainly been driven by the needs of these high-volume market industries. The degree of automation in the automotive industries is expected to increase in the future as robots will push the limits towards flexibility regarding faster change-over-times of different product types (through rapid programming generation schemes), capabilities to deal with tolerances (through an extensive use of sensors) and costs (by reducing customized work-cell installations and reuse of manufacturing equipment). There are numerous new fields of applications in which robot technology is not widespread today due to its lack of flexibility and high costs involved when dealing with varying lot sizes and variable product geometries. In such cases, hyper-flexible robotic work cells can help in providing flexibility to the system and making it adaptable to the different dynamic production requirements. Hyper-flexible robotic work cells, in fact, can be composed of sets of industrial robotic manipulators that cooperate to achieve the production step that characterize the work cell; they can be programmed and re-programmed to achieve a wide class of operations and they may result versatile to perform different kind of tasks Related key technology challenges for pursuing successful long-term industrial robot automation are introduced at three levels: basic technologies, robot components and systems integration. On a systems integration level, the main challenges lie in the development of methods and tools for instructing and synchronising the operation of a group of cooperative robots at the shop-floor. Furthermore, the development of the concept of hyper flexible manufacturing systems implies soon the availability of: consistent middleware for automation modules to seamlessly connect robots, peripheral devices and industrial IT systems without reprogramming everything (”plug-and-play”) . In this thesis both innovative and traditional industrial robot applications will be analyzed from the point of view of task coordination. In the modeling environment, contribution of this dissertation consists in presenting a new methodology to obtain a model oriented to the control the sequencing of the activities of a robotic hyperflexible cell. First a formal model using the Colored Modified Hybrid Petri Nets (CMHPN) is presented. An algorithm is provided to obtain an automatic synthesis of the CMHPN of a robotic cell with detail attention to aircraft industry. It is important to notice that the CMHPN is used to model the cell behaviour at a high level of abstraction. It models the activities of each cell component and its coordination by a supervisory system. As more, an object oriented approach and supervisory control are proposed to implement industrial automation control systems (based on Programmable Logic Controllers) to meet the new challenges of this field capability to implement applications involving widely distributed devices and high reuse of software components. Hence a method is proposed to implement both controllers and supervisors designed by Petri Nets on Programmable Logic Controllers (PLCs) using Object Oriented Programming (OOP). Finally preliminary results about a novel cyber-physical approach to the design of automated warehouse systems is presented. [edited by author]XIV n.s
    • …
    corecore