First trains were pulled by horses or mules so they were slow and only a few ones. At that time, the first conventional signal appeared:  a signalman mounted on a horse preceded some early trains. Hand and arm signals were used to direct the "train drivers." Foggy conditions and poor visibility later gave rise to flags and lanterns. The first form of blocks was created using a raised flag or ball signal that could be seen from a distance.

Train station

Some evolutions have occurred which led trains to run at a higher speed, approximately up to 60 km/h, which complicated its stop in case of emergency due for example to the low adhesion between rail and wheel in addition to serious problems to notice another train passing in front or in the other direction. It was, therefore, more and more a need to warn the driver of a train early enough of the presence of an obstacle to its route to prevent accidents and collisions. 

Accidents were common in the early days of railroading. The first switchmans stood at intervals, which we called today blocks, along the line with stopwatches and manual signals to inform train drivers that a train has passed more or less than a certain number of minutes before. This process required considerable staff resources. This solution was not very effective as they had no way of knowing if a train had crossed the line ahead, so if a preceding train stopped for any reason, the crew of a following train would have no way of knowing unless it was clearly visible. 

Then mechanical signals appeared to replace manual signals and they became later controlled by levers grouped in a signal box to control the correspondent blocks. Then they were followed by the signals that we know today.

Today, railway signalling is based on fully automatic blocks, with no need for manual intervention. A line equipped with automatic blocks is divided into several sections whose length is greater than the greatest train braking distance.

Detection of the train is used usually by a track circuit or axle counter and the continuous check of the speed of a train, if it is compatible with the permitted speed allowed by the signalling system, is done by the Automatic Train Protection (ATP)

Train Detection Systems

Automatic Train Protection (ATP)

Fixed Block

The track is divided into portions, called block sections or blocks, which normally admit only one train. Each block is protected by a signal placed at its entrance. Line and train speed, gradient, braking characteristics of trains, and other information should be provided to identify the length of the block.

The animation below illustrates well the principle of a fixed block but it needs some improvements for the distance of the block compared to the length of the train in addition to the speed.

Illustration of Fixed Block
Illustration of Fixed Block
Source: Murat Yukselir / The Globe and Mail

A disadvantage of fixed blocks is that if faster trains are allowed to run, they require longer stopping distances, which requires longer blocks, which decreases the capacity of the line. Fixed blocks must be sized for the worst-case stopping distance, regardless of the actual speed of the trains.

Moving Block

In a moving block system, computers calculate a "safety zone" around each moving train into which no other train is allowed to enter. The system depends on knowledge of the precise location, speed and direction of each train, which is determined by a combination of several sensors: active and passive markers along the track and on-board speedometers; (GPS systems cannot be relied upon because they do not work in tunnels). With a moving block configuration, line-side signals are unnecessary and instructions are transmitted directly to the trains. This has the advantage of increasing track capacity by allowing trains to run closer together while maintaining the required safety margins.

The animation below illustrates the principle of a moving block.

Illustration of Moving Block
Illustration of Moving Block
Source: Murat Yukselir / The Globe and Mail

Unfortunately, the technology is not mature enough for mainline, given the variety of traffic, such as freight and local trains as well as expresses. It's part of the European Rail Traffic Management System (ERTMS) Level 3 specification for future installation in the European Train Control System (ETCS), which will feature moving blocks.Up to date, ERTMS/ETCS Level 3 Hybrid is the most mature and is developed using existing technology solutions augmented for optimisation 

What's Next? Train to Train communication

You may have asked yourself, "What's beyond? What are the improvements that could happen?".
In 2016, a paper titled "ERTMS Level 4, Train Convoys or Virtual Coupling" was published in IRSE NEWS February 2016, and reissued in May of the same year in the Rail Engineer Magazine.

The latter was informally mentioned to be Virtual coupling that enables vehicle-to-vehicle communication allowing a very short headway. where the first train ('lead train') sends speed and braking curve data to the two other trains ('following train') creating a 'train convoy'. In other words, a sort of platooning. 

Concept of Virtual Coupling

A combination of technologies to enable digital automated train operation: moving block, virtual coupling, advanced interlocking, TMS, and ATO.