Research on Event-B based modelling and verification of PLC system

He Zhao, Bin Fang, Huijie Li, Pu WangAdvances 2015 · DOI

Abstract: In order to ensure the safety of equipment and persons, the rigorous requirements on the correctness and reliability of control program are always needed in industrial control system. The traditional program design methods are based on the realization of the functions and verified by the simulations and tests. Errors can only be founded during the simulation and test phase. And some vital errors cannot be tested, because these errors may cause damages to the equipment and persons. So the correctness and reliability of control program cannot be ensured. For these problems, the formal design methods emerged as the times require. The errors can be found in design level by the formalized-model. In other word, formal methods could detect the errors earlier, reduce the cost of development, and are suitable for the occasions that require rigorous requirements on the correctness and reliability. This paper discussed a kind of Event-B based formal method, using Rodin Platform, to model, refine and verify the automated production line control system.

Introduction

In the world of industrial automation, Programmable Logic Controllers (PLCs) serve as the critical control centers for complex machinery. Traditionally, engineers have relied on a "test-after-build" approach, where PLC code is written and then verified through simulations and physical testing. However, this method has a dangerous flaw: in high-stakes environments—such as the production of radioactive pharmaceuticals—some logic errors are too risky to test physically. An error discovered during a live test could lead to catastrophic equipment failure or human exposure to hazardous materials.

To address these challenges, this research explores a "correct-by-construction" methodology using formal methods. By mathematically proving a system's correctness during the design phase, engineers can identify and rectify untestable errors before a single line of executable code is deployed.

Methods

The researchers utilized Event-B, a formal method based on predicate calculus and theorem proving. Unlike traditional imperative programming, Event-B focuses on modeling the system's state and the events that transition it from one state to another.

The structural relationship between Machines and Contexts in Event-B.

As shown in the figure above, the Event-B model is strictly partitioned into two components:

  • Contexts: These contain the static elements of the model, such as constants, sets, and axioms that define the environment.
  • Machines: These handle the dynamic behavior, including variables, invariants (safety properties that must always hold), and events.

The development process is driven by Incremental Refinement. The authors began with a highly abstract model (mac0) defining basic control signals like start, pause, and reset. Through 13 successive refinements, they gradually introduced complexity, including 11 major operational steps, error handling routines, timers, and retry counters. The final refinements integrated physical sensor data and environmental constraints, bridging the gap between mathematical abstraction and real-world hardware.

All modeling and verification were performed on the Rodin Platform, an Eclipse-based IDE. The platform generates Proof Obligations (POs)—mathematical hurdles that must be "discharged" (proven true) to ensure the model is consistent and safe.

Case Study and Requirements

The methodology was applied to an automated production line used for radiopharmaceuticals. This system involves five classes of pneumatic cylinders, conveyors, and electromagnets. The "data" for this study consisted of the functional and environmental requirements of this specific line. For example, a critical safety invariant (ENV-2) ensured that two specific cylinders could never extend simultaneously due to physical interference.

Key Insights and Ideas

A primary contribution of this research is the adaptation of the traditional V-model of software development. By introducing formal verification at the specification and design levels, the authors suggest a paradigm shift in how industrial systems are validated.

The modified V-model where formal proof replaces traditional testing phases.

In this modified V-model, the "Proof" phase acts as a rigorous filter. Because the logic is proven correct by construction, traditional module and integration testing can be significantly streamlined or even bypassed. This proactive approach ensures that the system adheres to safety invariants from the outset.

Furthermore, the authors utilized variants—mathematical expressions that must decrease with each event—to prove convergence and reachability. This guarantees that the control program will not get stuck in infinite loops and will always reach its intended completion state.

Key Results

The researchers successfully modeled the entire delivery system through a total of 14 machines and 4 contexts. The verification process yielded the following metrics:

  • Total Proof Obligations: 2,124
  • Automatic Proofs: 1,060 (approximately 50%) were solved automatically by the Rodin Platform's provers.
  • Manual Proofs: 1,064 required manual intervention by the researchers to complete the logic.
  • Undischarged Obligations: 0

The achievement of zero undischarged obligations confirms that the final model is mathematically consistent and strictly adheres to all defined safety and functional requirements.

Limitations and Future Work

While the study demonstrates the power of formal methods, it also highlights practical challenges. The fact that nearly 50% of proofs required manual intervention indicates a steep learning curve and a requirement for high-level expertise in formal logic. Additionally, while the model is verified, the paper does not detail the automated translation of Event-B models into executable PLC code (e.g., Structured Text). Future research will focus on scaling this refinement strategy to larger, factory-wide systems and automating the code generation process to further reduce human error.

Summary updated

Abstract

In order to ensure the safety of equipment and persons, the rigorous requirements on the correctness and reliability of control program are always needed in industrial control system. The traditional program design methods are based on the realization of the functions and verified by the simulations and tests. Errors can only be founded during the simulation and test phase. And some vital errors cannot be tested, because these errors may cause damages to the equipment and persons. So the correctness and reliability of control program cannot be ensured. For these problems, the formal design methods emerged as the times require. The errors can be found in design level by the formalized-model. In other word, formal methods could detect the errors earlier, reduce the cost of development, and are suitable for the occasions that require rigorous requirements on the correctness and reliability. This paper discussed a kind of Event-B based formal method, using Rodin Platform, to model, refine and verify the automated production line control system.
BibTeX
@inproceedings{zhao2015research,
  author = {He Zhao and Bin Fang and Huijie Li and Pu Wang},
  title = {{Research on Event-B based modelling and verification of PLC system}},
  booktitle = {Advances},
  year = {2015},
  doi = {10.2991/icismme-15.2015.288},
}
Figure