Towards the safe-IOCOS relation -- On testing and correction of errors in an implementation to ensure safety
Doktorsavhandling, 2021

The technological advancement that has occurred at a blistering pace in the past decades has enabled manufacturing companies to conceive innovative products. However, to meet growing demands of consumers, manufacturing companies are expected to maintain a steady production rate without compromising product quality. To meet these requirements, the industrial sector is increasingly using robots and other automated machinery.

Automated machines are predominantly controlled via programmable logic controllers (PLCs) to carry out the nominal tasks. For safety critical tasks, though, special devices in conjunction with safety PLCs are used to prevent material damage and accidents leading to human injuries.

Before physical commissioning of a manufacturing system, the nominal PLC code is tested to uncover faults. This can be done either by running tests on the physical system or using a simulation model via virtual commissioning. However, the safety code is usually tested during the factory acceptance test phase on the actual physical system. The faults found in the safety code are corrected manually, which is time consuming and error prone.

The formal methods community has developed testing relations and approaches that can be used to automatically test and amend faults in the implementation. The work presented in this thesis is based on such a testing relation and formal approach.

The safe input-output conformance simulation relation (safe-IOCOS) is a testing relation that requires equality for traces composed of safety behaviors. However, in practical settings, many safety behaviors in a production system are implemented for each nominal operation. And these behaviors get tested multiple times during testing, which increases the testing time unnecessarily. To counter this problem, an approach to minimize testing time is proposed.

Furthermore, an approach to automatically amend a faulty implementation to ensure safety properties with respect to a safety specification is presented. This approach uses the procedure of synthesis, from the framework of supervisory control theory, based on the infimial controllable superlanguage, which not only removes the faults from the implementation but also guarantees to make it safe-IOCOS.


Supervisory control theory

Model-based testing


Input-output conformance simulation relation

Opponent: Professor Robert Harrison, The University of Warwick


Adnan Khan

Chalmers, Elektroteknik, System- och reglerteknik

Testing and validation of safety logic in the virtual environment

CIRP Journal of Manufacturing Science and Technology,; Vol. 26(2019)p. 1-9

Artikel i vetenskaplig tidskrift

Khan, Adnan. Fabian, Martin- On testing and automatic mending of safety PLC code-

Khan, Adnan. Mohajerani, Sahar. Fabian, Martin- On test case reduction for testing safety properties of manufacturing systems

This research is about identification and correction of errors in manufacturing systems and the control programs that are implemented to keep the machines and humans safe. In the industrial arena, several machines and robots are used nowadays to increase production to meet customer demands in a timely and efficient manner. These machines are typically commanded by programmable logic controllers (PLCs), so that they perform programmed nominal tasks in an orderly manner.

Now, to make sure that the manufacturing systems do the required job in a safe manner, a dedicated PLC called safety PLC is used. The safety PLC can supersede commands given by other PLCs that are usually busy controlling nominal tasks of the manufacturing systems. The safety PLC works in combination with safety-sensors and actuators to keep the machines and humans safe in case of unforeseen circumstances.

After the implementation of the physical system along with the PLC, a test engineer checks the code implemented for the nominal tasks as well as the safety tasks for possible errors. This procedure is carried out before starting up the manufacturing systems. If any errors are uncovered, then the engineers manually correct the PLC code. Now, this whole activity of manual testing and correction of PLC code is time consuming and itself error prone.

In this thesis, first an approach to test safety PLC code based on a simulation model to identify errors and reduce testing time is presented. Secondly, it is shown how a mathematical approach can be used to reduce test cases and hence time spent in testing without compromising the quality of the test procedure. Finally, it is shown how an automatic approach can help in removing errors in the safety PLC code.

Systematisk testning av cyberfysiska system (SyTeC)

Vetenskapsrådet (VR) (2016-06204), 2017-01-01 -- 2022-12-31.




Elektroteknik och elektronik



Doktorsavhandlingar vid Chalmers tekniska högskola. Ny serie: 4934





Opponent: Professor Robert Harrison, The University of Warwick

Mer information

Senast uppdaterat