INTERFACE AND CONNECTION MODEL IN THE RAILWAY TRAFFIC CONTROL SYSTEM

The article presents a model of connection of ETCS application and classical base layer equipment. The model distinguishes three layers: physical, logic and data, which require different modelling techniques and at the same time must be consistent. The model will form the basis for the digital mapping in the Digital Twin of the ETCS application. Layer division is a natural way to represent the structure of a device and its operating rules. It allows a detailed and structured representation of the interfaces of a connection and then an analysis of the connection both with respect to the layer of interest and from the point of view of the interaction between features in the different layers. The S-interface of the LEU encoder of the ETCS is described, taking into account different solutions encountered in practice. The conditions of the connection between the LEU encoder and the environment form a description of one of the two boundaries between the ETCS application, i.e. the implemented ERTMS/ETCS on a specific area of the railway network, and the environment. A general connection model and definitions of a connection and an interface are presented. As an example, the electrical connection with signals transmitted through galvanic connections has been assumed to be typical for LEU encoder and track-side signalling control circuits found in base layer equipment. The physical layer is described in terms of physical parameters and their values. The parameters are divided into electrical (current, voltage and frequency) and mechanical ones (number of leads, conductor thickness, etc.). The values of the electrical parameters are expressed in terms of a uncountable set with defined limits. The logic layer was described in a vector-matrix form. Logic signals are assigned to electrical signals with specific physical parameters. The data layer contains information about the assignment of specific telegrams to specific electrical signals.


Introduction
The role of the LEU (Lineside Electronic Unit) encoder for Eurobalis is to send telegrams in the European Train Control System (ETCS) language, fed to the Eurobalise switchable inputs. LEU encoders are devices that read the status of trackside signalling devices and transmit it to switchable balises. The input signals of the LEU encoder are received from the base layer railway traffic control equipment. Their states and combination determine which of the telegrams stored in the encoder's memory will be sent to Eurobalise. It should be mentioned that the basic layer devices are those railway traffic control pieces of equipment that are outside the ETCS system and cooperate with it in order to perform the functions of the system, i.e.: interlocking systems, switch and control circuits for signalling devices and mobile elements of the track system, trackside vehicle detection systems. The signal transmission is via the non-standardised LEU encoder interface to the base layer railway traffic control equipment, designated in Subset 036 as S-interface [19] (the so-called Subsets are documents published by the European Union Agency for Railways describing the ERTMS/ETCS system). The information on the status of the base layer railway traffic control equipment, which refers to e.g. the signal aspects of the trackside signalling devices which allow determining the movement permission included in the telegram, can be derived from various sources at the side of the base layer railway traffic control equipment. They can be [10]: a. light circuit on the primary or secondary side of the signal transformerthe signal display information is acquired through a measuring resistor, current transformer or a measuring system included in this circuit, b. light control transmitters located in the circuits of signalling devices' lightssignal display information is collected through the transmitter contacts, c. interlocking signal receiving transmittersinformation about signal display is collected through transmitter contacts, d. interlocking devices that provide digital signals about their state. Each of the indicated solutions has its advantages and disadvantages, which are discussed in more detail in the study (Documents, 2019). These solutions can also be represented as a model.
The conditions of the connection between the LEU encoder and the environment form a description of one of the two boundaries between the ETCS application, i.e. the implemented ERTMS/ETCS on a specific area of the railway network, and the environment. This description is characteristic of the description of the connection presented in the works [11], [9], which consists of: − a description of the physical medium, − a list of signals or a data model with substantive meaning, − signal or data exchange logic in the form of combinations thereof or synchronous automata. The described connections concern the design boundary between the ERTMS/ETCS and the classic railway traffic control equipment forming the base layer. The aforementioned works define the interface term as an arrangement of inputs and outputs of a given device (system, subsystem) together with the signals transmitted by them and the corresponding logic and sequences of operation of the device, enabling connection and cooperation between this device and other devices. In contrast, a connection as an interconnection system using device interfaces, which may include additional elements, that allows for connection and cooperation between devices connected through it. Cooperation is understood as the transfer of energy and/or exchange of signals of a specific form. With reference to the above, this article focuses on the connecting of the basic layer railway traffic control equipment with the ERTMS/ETCS by means of the LEU encoder integrated into the switch and control circuits of the trackside signalling device. This solution makes it possible to incorporate the ETCS via the LEU encoder in virtually any switch and control circuit that is a subassembly of any type of basiclayer railway traffic control equipment, in particular those made in various older and newer technologies. It should be mentioned that different solutions are applied in Poland in this respect: − in the circuit on the primary side of the signal transformer two measuring resistors are used in series and the voltage drop is measured on them by the encoder (e.g. the Kozlow station) or − in the circuit on the primary side of the signal transformer a wattmeter system is used, which allows to determine the active power consumption by the signal box in four channels (e.g. Zgorzelec station). The purpose of the article is to present the connection model of the basic layer railway traffic control equipment with the ERTMS/ETCS by means of the LEU encoder integrated into the switch and control circuits of the trackside signalling device. The model presented in this paper is intended to enable simulations reproducing the processes occurring in the real connection and the devices involved in it. An accurate digital representation of the actual connection is intended to make available services that consistently support all the issues that occur in the full life cycle of the actual connection. The results obtained are to be an extension of the so-called digital twin of the ETCS application [9]. It is also an extension of the work on the description of interfaces in the railway traffic control system enabling the development of specifications necessary for the effective implementation of modern solutions. The article is divided into five parts. Part one is a literature analysis of the research problem addressed in the paper. In the second part, the concepts of the interface and the connection are introduced and it is determined what devices are involved in the connection as well as the layers of interface and the connection are defined. The next section is a description of the physical, logic, and data layers of the interface and the connection of the LEU encoder with the base layer devices. The last part contains the conclusions of the considerations carried out in the paper. Directions for further research were also indicated.

Reference books analysis
An analysis of the interface and connection issues in the railway traffic control system indicates a wide range of related areas. Major ones include: − Modelling of railway traffic systems, − Track-to-train information transmission systems and more specifically the ERTMS/ETCS, − Basic layer railway traffic control equipment, − Interfaces in the railway traffic control system. The issues of modelling railway traffic control systems are the subject of many publications in different approaches. For example, in the work [21], vector-matrix descriptions and a model in the form of a synchronous automaton are proposed. In contrast, in the paper [2] authors present a digital twin model on the issue of the number of people getting on and off the train at subway stations in Busan city based on discrete-event system specification DEVS. A great deal of literature is devoted to mathematical models for solving various problems in railway traffic systems. For example, in the paper [6] the authors present a multi-criteria decision model for the development of timetables. The authors use evolutionary heuristic algorithms to solve the model. Whereas in the paper [7] the authors present a rather interesting approach to the problem of decision-making in planning the movement of freight wagons on a railway network.
Other problems related to interface issues in railway traffic control systems are systems for the transmission of information from the track to the vehicle. There are many such systems in the world and in Europe. Particularly noteworthy are the complex and widely developed CBTC solutions [13] [15] and the ERTMS/ETCS [18], used both in rail transport and underground networks. As indicated in the paper [15] the base layer equipment used is varied. This applies to railways across Europe. Devices and systems that incorporate the interfaces discussed in this article must meet the requirements of national and European regulations [1]. The description of interfaces in railway traffic control systems is the subject of many scientific and research works. The EULYNX initiative is to be highlighted [8], which aims at defining and standardising the interfaces to future digital automation, transmission and railway traffic control systems, while significantly reducing life-cycle costs of railway traffic control systems. This initiative defines a dedicated standardization method. Input data from participants such as infrastructure managers or equipment manufacturers are collected, structured and classified. Experts in the relevant fields present the system architecture and system requirements so that the goals of cost reduction through digitization and compatibility with existing "Control" subsystems can be achieved through joint review and verification. EU-LYNX provides standard interfaces and defined categories of functions to integrate plug-and-play components into a motion control system [3], [12]. EULYNX was developed from DB Netz AG's NeuPro (Neue Produktionsverfahren) project. NeuPro has been working towards standardized interface specifications in domestic German applications since 2012. Many manufacturers of railway traffic control systems and infrastructure managers 140 Karolak, J., Archives of Transport, 58(2), [137][138][139][140][141][142][143][144][145][146][147]2021 from selected European countries participate in the EULYNX initiative. Poland is not participating in this initiative. As part of the National Centre for Research and Development project and the PKP PLK S.A. project entitled: "Standardization of selected computer interfaces of railway traffic control devices and systems" implemented by the Railway Institute and Rail-Mil Computers Sp. z o.o. sp. K., standards of interfaces, among which there is no discussed S interface between base layer devices and LEU encoder of ETCS, are being worked out [4]. The authors of the article [20] expand the definitions of interface and introduce the concept of digital interface. They also point out the need to adapt to the connection between two computer systems at the physical i.e. hardware level, which they consider relatively simple, and at the logic i.e. software level, which they consider more complicated. The authors also point to some classifications of interfaces and connections.
In conclusion, it should be noted that the development of rail transport and railways involves many modelling issues. Modern railway traffic control systems, including CBTC and ERTMS/ETCS, are particularly intensively developed. However, these advanced solutions are combined with existing, older generation systems. Such connections require solutions that are worth analysing and attempts to standardize them should be made. The development of a model for such a connection is in line with the interests of infrastructure managers.

Interface and connection model
As can be seen from the definitions presented in the introduction, a connection is a broader concept that always includes the interfaces of connected devices. An interface is not something that is obviously universal, because it is designed to be used to connect to a specific device or to transmit specific signals for use in connecting to a specific class of devices. A specific type of interface can be used for different connections, but this may result in the need for the use of optional intermediary circuits. Defining the aforementioned terms, it is possible to graphically present the general idea of cooperation of the railway traffic control devices by means of the connection including interfaces (Figure 1). With respect to the connection of the LEU encoder with the base layer devices, Device 1 will be the LEU encoder, Device 2 will be the base layer devices (interlocking or execution devices). Basically, the interactions 5 and 6 are used in the form of galvanic connections and the electrical signals transmitted therewith, the logic given to these signals and the associated data. There is no optional intermediate circuit.
Data are transmitted from the base layer devices to the LEU encoder which on that basis transmits telegrams stored in its memory to the switchable balise (via the interface C described in [19]). On the basis thereof, it is possible to focus on interaction 6 reflecting the influence of base layer railway traffic control devices on the LEU encoder. However, it is worth noting that there is also an interaction 5 representing the effect of the encoder action on the base layer railway traffic control devices. This influence may be important to describe in the model because of the proper design of the response of the base layer railway traffic control devices to possible interference from the LEU encoder and from the electrical connections themselves.

Layer model of the connection
The following layers can be distinguished when describing the interface and the connection: − physical, − logic, − data. Layer division is a natural way to represent the structure of a device and its operating rules. It allows a detailed and structured representation of the interfaces of a connection and then an analysis of the connection both with respect to the layer of interest and from the point of view of the interaction between features in the different layers. The physical layer is a description layer containing data about the physical propertieselectrical and mechanicalof the interface and the connection. The logic layer contains a list of signals with their description (signal meaning). Characteristics resulting from the physical layer are assigned to specific signals used in the logic layer. In addition, a representation in the form of an automaton is used. This automaton represents the device and its behaviour as observed from the interface side.
The data layer contains a description of the device behaviour as seen through the interface. A convenient way of describing it may be, similarly to the data layer, representation in the form of an automaton or a sequence diagram developed in the SysML language. The connection layers are shown graphically in Figure 2 and are discussed further in later sections of the paper.

Fig. 2. Connection layers and the document sets used
to define them. Source: own study.

Physical layer
As noted in the previous section, the physical layer contains a description of physical properties. These properties can be divided into: − electrical and − mechanical. It is worth noting that due to the subject of this study, which is the connection between ETCS application and the environment, electrical signals transmitted via galvanic connections are commonly used. Other physically known ways of transmitting information would also be possible, but are not commonly encountered (transmission by waves, especially radio waves, movement of mechanical elements, transmission by optical connections such as fibre optic cables or optocoupler elements, etc.). Hence, the emphasis in the paper is on the electrical connection.
The electrical properties of the connection require the determination of acceptable ranges of basic parameters such as: − voltage and current and its maximum values, − the type of electrical signal (constant, alternating) and its characteristics such as frequency, type of modulation adopted. The electrical signals should be selected, among other things, taking into account potential interference and will therefore depend on the characteristics of the connection environment. Some interference can be eliminated or suppressed by proper selection of electrical and physical properties of connections, while others require additional protection (shielding, modulation, surge and overcurrent protection measures). The mechanical characteristics of the connection require that the type of socket, plug, clamp, or other mechanical component that makes the connection possible be determined. They also specify the characteristics of the materials used as conductors and insulators. The mechanical properties will be affected by what mechanical, chemical, biological exposures the connection is to resist. The materials used must also meet a number of other requirements relating to their environmental impact at the stage of production, operation and disposal. Predicting the ease of disconnecting and connecting the connection using specific toolsergonomics-related featuresis important. It is worth noting that mechanical and electrical properties are dependent on each other within certain ranges. For example, maximum current will affect the cross section of the conductor used to make the connection, while maximum voltage will affect the thickness and material of the insulators used or the air and surface clearances between elements of different potential. The physical impossibility of using a particular material or connection dimensions may therefore influence the limitations that will be imposed on the values of the electrical signals. An example of the importance of the discussed features can be the WT UZ system, where standard industrial computer cassettes were used. These cassettes contain cards narrow enough to accommodate D-SUB50 sockets. These sockets are not suitable for direct wiring (standard 1mm 2 wires). It became necessary to use so called transition boardsprinted circuit boards containing a D-SUB plug on one side and terminals soldered on the surface, allowing to connect single wires of different cross-sections, including 1mm 2 . When LEU encoders are connected to base layer equipment (via the S interface of the encoder to the control circuits of track-side signalling equipment), the physical layer consists of the electrical terminals to which the wires to the track-side signalling equipment and its switch and control circuit have to be connected. Inside the encoder, the terminals are connected in pairs by electrical elements that enable the measurement of electrical values in circuits (measuring resistor, current transformer or other measuring system such as Hall sensor). The above considerations can be presented as the following list of features and parameters: tween voltage and current in the receiver circuit. The above parameters apply to both the S interface of the LEU encoder and the interface of the base layer railway traffic control devices. In case of the base layer railway traffic control devices the acceptable range of values of the circuit impedance of a given signalling device chamber and the impedance of the circuit wires in relation to each other and to the ground are also important. The determination of these parameters is due to the nature of the electrical signals and the circuits used to transmit them. In order for the energy of an electrical signal to be utilized in a receiver such as a light source in a chamber, the said impedance of the circuit wires relative to each other and to the ground must be sufficiently large. Too low values of impedance will cause increase of the current flowing between wires and between wires and the ground and along with thisan increase of energy losses causing a decrease or disappearance of luminous flux intensity. Too low a value of the circuit impedance of a certain chamber of the signalling device will cause excessive increase of the current, the intensity of the light stream emitted by the light source and, after exceeding a certain value, activation of a fuse interrupting the circuit. An increase in impedance will cause the opposite effecta decrease in current and luminous flux, and detection of this fact by the control system, which will cause the chamber to shut down and respond safely (switching of a safer signal). The values of the electrical parameters may be expressed in terms of a uncountable set with defined limits presented for the example of interface S of the LEU encoder in the form of a table (Table 1 columns 2-6).

Logic layer
The logic layer contains the description of the signals and their purpose. It also assigns the properties specified in the physical layer to signals.
It is possible to store information about the signal pattern but it is more common to program the encoder to ignore changes in input signals that deviate from the pattern persisting over some fairly short range of time. Logic (binary) states are assigned to specific values of electrical signals. An example for the S interface of the LEU encoder is shown in Table  1.
Based on this, the assignment of logic states to chamber states can be determined in the form of formulas 4, 5 and 6. where: the state of the n-th chamber ( )time function of the logic signal of the nth input.
The assignment of signalling device indicator display to combinations of chamber states can be presented in the form of a truth table developed on the basis of formal documents describing signalling device indicator display [14], [15]. An example table for the LEU encoder is shown in Table 2. The above assignment can also be represented by formula 7.
The logic layer also contains (as long as the device described by the interface works in such a way) a description of permissible transitions between states, e.g. in a form of graph or transition table. This is a representation of Moore's automaton. An example of a graph for the S interface of the LEU encoder is shown in Figure 3.
= { 1 ⟺ 1 = "ON" ∧ 2 = "OFF" ∧ 3 = "OFF" ∧ 4 = "OFF" ∧ 5 = "OFF" ∧ 6 = "OFF" ∧ … 2 ⟺ 1 = "OFF" ∧ 2 = "ON" ∧ 3 = "OFF" ∧ 4 = "OFF" ∧ 5 = "OFF" ∧ 6 = "OFF" ∧ … … 7 ⟺ 1 = "ON" ∧ 2 = "OFF" ∧ 3 = "OFF" ∧ 4 = "OFF" ∧ 5 = "OFF" ∧ 6 = "OFF" ∧ … … where: S signalling device indicator display S1, S2, ...possible signal images. The states and possible transitions between them, shown in Fig. 3, represent the operation of exemplary devices at the station controlling the indications of one signalling device. It is worth noting that this graph can represent the interface performance of base layer devices and the encoder's expected performance of those devices. The encoder, because of the way it assigns telegrams to signals, as described in the next section, may not analyse the correctness of transitions between signal states. This solution is also used in other connections (e.g. WT UZ devices with Eac line block). The graph shown in Fig. 3 is also suitable for describing the interface of the base layer railway traffic control devices. Transitions between states shall be supplemented by conditions resulting from the operation of the switch and control system (switching commands and response to changes in electrical parameters such as voltage, current and impedance of circuit elements controlled by the system). For example, detection of current below a defined range may indicate an interruption in the circuit or a bulb fault. Detection of current above the defined range may indicate a short circuit in the circuit. In the case of signal S12, this will set the signal S1, i.e. the signals assigned to the states and the transition ( fig. 3).

Data layer
The switch and control circuit of an alarm device is used to set the proper signal on the signalling device after fulfilling appropriate dependence conditions and possibly giving orders by the personnel. This signal relates to the operation conditions and depends on whether this is to be a train or shunting operation, and on the type of signal. A general division can be made into: − signals allowing for the operation, − signals prohibiting the operation, − signals warning of the above. The detailed meaning of signals is described at national level in the Regulation [14] and further specified in the instructions of infrastructure managers (e.g [15], [16]). This description is a verbal description explaining the possibilities of making a movement based on a particular signal indication. The socalled doubtful signal, i.e. one whose image does not correspond to the other described signals, was also distinguished. Such a signal must be recognised by the recipient (in particular by the driver) as a signal prohibiting the operation. The switch and control system also enables the control of the correctness of the indications of the signalling device in relation to forcing the setting of a certain preset signal by the switch and control system and the systems cooperating with it. In case of non-conformity of the obtained indications in relation to the enforced ones resulting from possible defects (e.g. bulb burnout in the chamber), these systems are to set a safer signal (limiting speed) which, in particular, may be a signal prohibiting operations.
In addition to the conformity of the signal with the image presented in the formal documents cited, there must be compliance with the conditions for performing the movement. Therefore, at the stage of designing railway equipment applications each traffic signal device is assigned a limited set of permissible indications which is a subset of the set of all possible indications, which can be presented in the form of dependence 8. This is reflected in the functions performed by the control system and cooperating systems. As part of the development of the ETCS system application, software containing constant information about the set of permissible indications of a specific signalling device with which the LEU encoder is to cooperate, is loaded into the LEU encoder. One telegram to be sent to the switching balise is uniquely assigned to each indication detected by the LEU encoder corresponding to a specific indication from the set. These telegrams shall be elaborated in accordance with the principles adopted for ETCS and on the basis of the features which characterise the conditions for a particular run or group of runs. They include the speed profile.
In addition to these telegrams, there are telegrams transmitted when a signal indicated by a signalling device is detected which does not correspond to the signals in the set of signals permitted for a given signalling device, a failure of part or all of the encoder. These telegrams are telegrams ordering to stop the vehicle. It should be emphasized that the selection of telegrams on the basis of indications is: − Determined during the ETCS application design phase, − It is due to a larger number of variables than the degrees of speed described in the formal documents that are transmitted by the signalling device on successive operation routes.

Conclusions
The development of rail transport requires the introduction of modern traffic control systems. The ERTMS/ETCS that requires a connection to the base layer equipment is such a system. A non-standardised S-interface is involved in the connection. The issue of interface standardisation is an important issue for the efficient integration of railway traffic control equipment.
The paper presents a model of the connection between the LEU encoder and the switch and control systems of the basic layer railway traffic control devices and their interfaces involved in the connection. The model considers the operation of the encoder and the operation of the signalling device light circuit. The presented model containing a three-layer description of the LEU encoder interface will be extended by the application of parameters that characterize different actual types of encoders and signalling devices' switch and control systems. On this basis, the model will also be generalized accordingly. After further generalization, the presented layered interface model can be applied to describe various interfaces in railway traffic control systems, both those defined within the EULYNX initiative, those indicated to be standardized within works commissioned by PKP PLK S.A. and also other not yet standardized ones.