Systems of interval control of train movement Signaling systems, which are currently in service in Russian railways, use the electric track circuit as the main data channel between signals and locomotives. Code-modulated electric signals transferred through that channel are frequently get corrupted which leads to railway traffic delays.
 Decoding of the electric signal received from a track circuit can be represented as an image classification problem, and thus the stability of the data channel could be significantly improved.
 However, to build such a classifier based on some machine learning algorithm, one needs a large dataset. In this article, a simulation model to synthesize this dataset is proposed.
 The structure of the computer model matches the main stages of the electric code-modulated signal generation in a track circuit: code signal generator, rails, locomotive receiver.
 Based on code signal generator schematic and waveform diagrams, a generator algorithm is developed. At this stage, we modeled timings of electric code signals according to the specification as well as their random deviations caused by various factors.
 The analysis of substitution circuits of the rail line revealed that it has the properties of a low-pass filter. So, the rail line using the Butterworth digital filter with corresponding parameters is modeled. Additionally, at this stage, random noise during transmission was taken into account.
 A similar technique is applied for modeling of a locomotive receiver which has a band-pass filter as the first signal processing block.
 Thus, the proposed simulation model consists of a set of algorithms which run in series. By varying the parameters of the model, one can synthesize waveform diagrams of the electric code-modulated signal received by the locomotive equipment from a track circuit working in various modes and conditions.