@MASTERSTHESIS\{IMM2016-06953, author = "M. E. Kirchhoff", title = "Development and Visualisation of a Distributed Railway Control System", year = "2016", school = "Technical University of Denmark, Department of Applied Mathematics and Computer Science", address = "Richard Petersens Plads, Building 324, {DK-}2800 Kgs. Lyngby, Denmark, compute@compute.dtu.dk", type = "", note = "Supervised by Anne Haxthausen, aeha@dtu.dk, {DTU} Compute, and Alessandro Fantechi, afan@dtu.dk / alessandro.fantechi@unifi.it, University of Florence, {DINFO,} Italy", url = "http://www.compute.dtu.dk/English.aspx", abstract = "The goal of this thesis is to develop a distributed control system for railways, implement and visualize it using Lego Mindstorms hardware and Lego trains. The system should uphold the safety requirements of preventing trains from colliding and derailing. Railway control systems are traditionally centralised, but using a distributed approach could be more cost-effective. Through the model railway, issues when implementing such a system can be safely exposed and at low cost, and test whether it works and is viable. An analysis is made of the available Lego hardware components and what kinds of model railways can be made with them, before a specific design is chosen. An algorithm is proposed that can control the trains and ensure safety. It is then refined and formally verified through formal modelling in {UMC}. The algorithm is then implemented on the Mindstorms hardware in Java, along with a Lego {API} that allows it to control the Lego railway. The final system is shown to have some erroneous behaviour, but this is most likely stemming from errors in the {API} or imprecision in the Lego hardware. The control system itself is working. It is concluded that the distributed control system is viable and that visualizing an implementation using a model railway has merit, although the hardware is hard to work with." }