The safety of a railway station is a very important issue considered very labour-intensive. Different authors have developed different approaches in order to detect automatically the safety of small to midsize railway stations. Although these approaches are very simple to implement, they have the drawback of being unsuitable to large stations, since the algorithm takes large time to be run.The present PhD thesis has the objective of presenting a new logicalgebraic model able to: I) check the safety in large railway stations when trains are located in a one or more sections, and II) precalculate different states of the station (trains located in sections, colour of the semaphores, position of the switches, etc ...). Once a precalculation is made for certain state, the time to check the safety in large railway networks is reduced dramatically. As a case study we provide a comparision between several models in a real large railway station (Chamartín) showing that the time results are suitable to check the safety of such a station.