Today, tremendous changes have been occurred in the transportation industry due to the expansion of the Internet of Things, big data, and wireless sensor networks. As a result, intelligent transportation systems have been developed. Considering the high importance of the railway transportation systems and their important role in passenger and cargo transportation, various methods have been presented to connect them to the intelligent transportation system. One of the systems that play an essential role in rail transport lines is the signalling system, which is responsible for ensuring the safety of train movement, and has undergone many changes with the introduction of the concepts of the Internet of Things, big data, and wireless sensor networks. The attention of the companies producing these systems and many researchers in this field has been directed to this concept. In the field of providing intelligent transportation systems, a definitive method has not been designed to guarantee the safety, security, and stability of these systems at the same time, and as a result, until these issues are resolved, these systems cannot be used in the rail industry. In this dissertation, firstly, a method of estimating the speed and position of the trains through Kalman and Consensus filters, as well as the design of speed and position profiles, is described and the stability of this method has been investigated. The concept of Lyapunov method is used for the stability analysis in normal conditions, and also, in the case of the loss of the information packets received from the wireless sensor networks have been investigated. In the following, a railway control and signalling system based on the Internet of Things has been proposed. By using the proposed system, all rail lines of a city or a country can be gathered in a centralized control center and all lines can be controlled by this center. Due to the access to the information on all the railway lines, it is possible to safely control the movement of trains on the lines, by optimizing the travel time of the passengers, operating costs, and wear and tear of the trains, and adopting the optimal strategy to determine the movement strategy and the number of the trains needed on each line at different times. In the following, to verify the proposed system, according to the safety standards related to signalling systems (CENELEC EN-5012x), the formal methods have been used. One of these methods recommended in the EN-50128 standard is the Event-B method, and as a result, this method is suitable to determine the accuracy of system’s performance. In this dissertation, the proposed IoT-based signalling system has been modeled and verified using the Event-B method. Also, the ProB model checker has been used to evaluate the modeling and verification process of the proposed system.