Bachelor's Thesis

Smart Fault Detection and Monitoring System for an Automated Process using a PLC and Python

Final Thesis 3.88 MB Appendix 824.49 kB

Author of thesis: Bc. Nicholas Scott

Acad. year: 2025/2026

Supervisor: doc. Ing. Jakub Arm, Ph.D.

Reviewer: doc. Ing. Miroslav Jirgl, Ph.D.

Abstract:

For the thesis I will be developing a smart fault detection and monitoring system for an automated bottle-filling process. The system uses a Beckhoff TwinCAT 3 PLC for deterministic control and fault identification which includes positional timeouts and sensor condition monitoring. To enhance operational transparency. A communication bridge will be established through ADS protocol to a Python application. This application features a modern graphical user interface developed with CustomTkinter for real-time process visualization and a dedicated data logging part for historical reliability assessment. The results demonstrate that joining industrial control with modern data analytics improves problem-solving speed and supports maintenance plans, aligning with the core objectives of smart factory environments.

Keywords:

PLC, Smart Fault Detection and Monitoring System,TwinCAT 3, ADS protocol

Date of defence

19.06.2026

Result of the defence

Defended (thesis was successfully defended)

znamkaBznamka

Grading

B

Process of defence

The defense was completed successfully; the student responded to the questions from reviewer and committee members appropriately.

Language of thesis

English

Faculty

Department

Study programme

Electrical Engineering (BPA-ELE)

Specialization

Power Systems and Automation (BPA-PSA)

Composition of Committee

doc. Ing. Miloslav Steinbauer, Ph.D. (předseda)
Mgr. Přemysl Dohnal (člen)
prof. Ing. Eva Gescheidtová, CSc. (místopředseda)
doc. Ing. Jakub Arm, Ph.D. (člen)
doc. Ing. Petr Drexler, Ph.D. (člen)

Supervisor’s report
doc. Ing. Jakub Arm, Ph.D.

The student became familiar with PLC programming in the TwinCAT 3 environment together with HMI. Furthermore, he had to connect this environment with the Python environment through available libraries and the available communication implemented by the manufacturer.
He created a demonstration application for detecting faults on a simulated application of an automated bottle filling process. Then, the functionality was verified using the fault injection technique. The technical solution is processed at a good level. Testing has proven the functionality of the main system components. Reserves can be observed in the absence of a more detailed quantitative evaluation of the achieved parameters.
Regarding the formal side, the work is processed clearly. On the other hand, the text repeatedly contains grammatical, stylistic and terminological inaccuracies and sometimes informal formulations.
The outputs have practical utility primarily as a demonstration or teaching platform for the field of industrial automation and integration of PLC systems with higher analytical layers. The use of a simulated process and an approach inspired by Hardware-in-the-Loop represents a suitable way to verify control logic without the need of a physical device.
The student consulted the partial procedure and problems sporadically, but worked independently. Points proposed by supervisor: 78

Grade proposed by supervisor: C

The bachelor thesis focuses on the integration of a PLC-based control system in TwinCAT 3 with a Python supervisory layer. This integration enables the monitoring, fault handling and data logging in a simple simulation (bottle-filling) process. The topic is related to the concept of Industry 4.0, and the thesis demonstrates that the author has learned the fundamentals of cyber-physical manufacturing system architecture, among other things.
The thesis is divided into five chapters, covering three main parts: the theoretical background, the part dealing with the design and implementation of the task, and the validation of the implemented solution. The theoretical section provides the technological fundamentals necessary for understanding the work. However, in some places, it would be helpful to distinguish more clearly between the general theoretical introduction and the specifics of the related design. In terms of the practical aspect, the author successfully implemented modular PLC logic for simulation and control blocks covering the tank, conveyor, and filler modules, a Python HMI and fault logging system communicating through ADS communication. I have reviewed the concept and solution, and I believe that they are appropriate, but I do have some comments. Although the simulation process is formally described, the basic technological scheme and description, together with the reasoning behind the selected settings, are not included (e.g. why the initial water level is set to 25.0, etc.). It may be advisable to present the control logic using a state diagram or other graphical representation, as opposed to a text-based approach. The actual industrial HMI application should provide a more visual representation of the controlled process and follow the standards for the use of elements and colours. However, I understand that the objective was to develop a proof of concept rather than a practical industrial application for immediate implementation. The final part of the report summarises the achieved results of the testing based on the defined scenarios (see Tab. for details). 6.1. Further refinement of this section would be beneficial through the incorporation of a more precise methodology, quantitative data (e.g. communication latency), and a more detailed analysis, e.g. the response of the fault recovery logic to repeated failures.
From a formal perspective, I have a few comments regarding the readability of the figures and the presence of typos and incomplete sentences in some places (e.g. on p. 14).
Despite the aforementioned comments, the thesis demonstrates that the author is capable of building and integrating a functional automation prototype and understands the basic applied principles, which meets the bachelor study requirements. I therefore recommend the thesis for the final defence and propose an evaluation of 80 points / grade B. Topics for thesis defence:
  1. 1. What are the main limitations of ADS communication in the proposed solution, and how does the system respond to a connection failure?
  2. 2. On the page 11 you stated: “Unlike traditional PLCs TwinCAT runs a real-time kernel on an industrial PC allowing it to handle deterministic tasks such as conveyor speed control and valve actuation.” Do you mean that the PLC is not capable to perform reliable such tasks?
Points proposed by reviewer: 80

Grade proposed by reviewer: B

Responsibility: Mgr. et Mgr. Hana Odstrčilová