Development and research of a model of a microprocessor device of a set-up control unit for paired points

. The use of electromagnetic relays in railway control systems is very problematic. The solution to this problem is based on process modelling and the use of microelectronic devices. The functional scheme for different modes of operation of twin switches control unit has been developed and investigated. Algorithms and functional scheme of microelectronic unit are given.


Introduction
The need to apply the latest scientific and technical developments, progressive labour methods, and thorough reform of the transport process management is motivated by the high intensity of train traffic and constantly increasing freight turnover, while unconditionally ensuring the safety of train traffic.
Modern automation and monitoring of the technical condition of railway automation devices help to meet these challenges.The current pace of development of microelectronics allows their free application for the development of automation tools, linking them by means of hardware and software complexes [1][2][3][4][5][6][7][8][9][10][11][12][13][14].This is justified by the response speed, reliability and multifunctional capabilities of microelectronic computing systems.The level of reliability of automation and telemechanics devices has a direct impact on train delays, which in turn results in economic losses.The use of microprocessor devices with higher reliability indicators in the control systems of the transport process is an urgent task.In the field of railway automatics and telemechanics, the priority in solving innovative technical problems is to refuse to use electromagnetic relays, in devices that are not responsible for the safety of trains [7,8].In the block route relay interlocking system there are blocks of set group, not directly responsible for train operation safety, made on relays of the second class of reliability of the KDR type.These include the unit responsible for controlling the twin switches, which consists of the plus control relays (PC) and the minus control relay (MC).A schematic diagram of the winding connection of these relays is shown in Fig. 1 [1].The main task of this article is to solve the problem of synthesis of microelectronic control unit for twin switches without using electromagnetic relays, contacts of which will be replaced by contactless switching devices of the type PVG-612, and the relay windings are replaced by an opto-pair element РС-817.

Method
The purpose of this article is to solve innovative problems on application of non-contact devices, in the existing relay system of block route interlocking, which will provide increase of transportation safety due to increase of reliability, technical condition of devices, and control.To achieve this goal, methods of refusal from hardware implementation of logic functions and transition to software solution of these dependencies, as well as refusal from mechanical contacts and transition to microelectronic non-contact switching devices were used [1,5,6,8,9,10,13].

Results and discussion
To this end, the task of synthesising a microelectronic control unit for twin switches is solved (NSS) block interlocking routing systems, replacing the used electromagnetic relays of the second reliability class of the KDR type.A single STM-32 type microcontroller is to be used to implement the logical operations performed by the block by means of software NSS.The schematic diagram of the twin-arm relay control unit is shown in Figure 1.The unit contains the first plus control relay PC1, second plus control starting relay PC2, minus control starting relay MC and an angle relay CR.Let us consider building a microelectronic control unit for twin switches by first developing and investigating its model, focusing on the triggering and de-energizing conditions of the starting switches and corner relays [6][7][8][9][10][11][12][13].Assuming that all logical operations will be performed at the software level of the microcontroller, we assign to each relay a corresponding variable, consonant with the name of the electromagnetic relay.The graph position of the first plus control relay is designated as 1 MC , for the excited state of this relay we have the following value of variables 1 = 1, 1 = 0, the de-energised state of this relay is reflected by the values of the variables 1 = 0, 1 = 1 .The graph position of the second plus control relay is marked as 2 MC , for the case where this relay is energised we have the following value of variables 2 = 1, 2 = 0, the de-energised state of this relay is reflected by the values of the variables 2 = 0, 2 = 1.Setting the route according to the minus position of the twin switches involves triggering a relay MC, in which case the state variables will have the following values  = 1,  = 0, otherwise we have  = 0,  = 1.At the start of the route setting procedure and assuming that it can be set by the minus position of the twin switches, a relay is provided in the relay unit CR, which is energised precisely at the moment the first button is pressed by the station attendant on duty.In the Petri net graph, the operation of this relay is simulated by the position CR .For the excited state case of this relay, there is a ratio of variables  = 1,  = 0, For its deenergised state we have  = 0,  = 1.Chip availability in positions 1, 2, ,  corresponds to the excited state of these relays.Presence of a chip in the inverse positions, i.e., 1, 2, , corresponds to the de-energised state of these relays.The column also contains variables reflecting the state of the unit's terminals, in the following relationship, for example the variable reflects the presence of potential on terminal1-3, the variable (1 − 3) reflects the absence of voltage on that terminal.These statements are also true for other variables reflecting the presence or absence of voltage at the same terminals.
In order to simulate and investigate the operation of the microprocessor-based control unit for twin switches, the Petri net graphs shown in Figs. 2, 3, 4 and 5 are constructed.The system of equations describing states of graph Fig. 2 for the first plus starting relay is given in (1), for the second plus control relay the system of equations of graph Fig. 3 is given in (2), for the minus control relay the system of equations of graph Fig. 4 is given in (3), for the corner relay the system of equations of graph Fig. 5 (1)  In the initial state, when there is no action on the task, the state graphs responsible for the state of the relay are PC1, PC2, МC and CR is shown in Figure 2-5.
Consider the operation of the micro-electronic control unit when setting a route that runs through the twin switches at the plus position of the first switch.In this case, according to the block interlocking algorithm, the plus switch of the first switches must be activated and the chip on the graph (Fig. 2) must be moved to the position of 1 MC .From the initial state of the relay graph PC1 it can be seen that the chip is in position 1 MC , i.e. the relay is de- energised, to move the terminal to a position reflecting the energised state of that relay, the conditions for starting the transition must be met 1 t , in accordance with (1) = { 1 } and ( 1 ) = {(1 − 13 ∧ 1 − 3 ∧ ), 1} position input functions 1 and transitions 1 t .To fulfil this condition, a logical function must be performed (1 − 13 ∧ 1 − 3 ∧ ), which corresponds to the voltage on the terminals, and the de-energised state of the relay at the same time CR, and check the de-energised state of the relay PC1 according to safety requirements and place the token in the same position, the status of the graph is shown in Figure 7. Starting a transition 1 t will move the chip to the position 1, which corresponds to the excited state of the relay PC.De-energising the relay PC1 occurs when the conditions for starting the transition are met 2 t according to its input function ( 2 ) = {( ∨ 1 − 3 ∨ 1 − 13), 1}, which, when started, will move the chip from position to position 1, according to the output function О( 2 ) = 1 and input function (1) = { 2 }.These conditions can be realised by performing a logical operation "OR", i.e. terminals 1-3, either 1-13 or the relay winding must be de-energised CR, as well as relays PC1 d.c.under current.As a result of the terminal transfer, the relay status graph PC1 will reset to its original state.
Analyse the behaviour of the Petri net graph for the relay PC2 and operation of the microcontroller when setting a route that passes through the twin switches at the plus position of the second switch.In this case, according to the block interlocking algorithm, the plus switch of the second point must be activated and the chip on the graph (fig.3) must be moved to the position of 2.In the initial state of the relay graph PC2 it can be seen that the chip  is in position 2, i.e. the relay is de-energised, to move the terminal to a position reflecting the energised state of that relay, the conditions for starting the transition must be met 1 t , according to the system of equations (3), i.e. (2) = { 1 } and input function ( 1 ) = {(2 − 3 ∧ 2 − 13 ∧ 2 ∧ ), } transition 1 t .This condition requires the implementation of a logic function (2 − 3 ∧ 2 − 13 ∧ 2 ∧ ), which should be reflected in the graph by the simultaneous presence of voltages on the terminals 2-3, 1-3, triggered relay CR, and check the de-energised state of the relay PC2 according to safety requirements and place the chip in the same position, the state of the graph is shown in fig.8. Starting a transition 1 t will move the chip to the position 2 MC , which corresponds to the excited state of the relay PC.De-energising the relay PC2 occurs when the conditions for starting the transition are met 2 t according to its input function ( 2 ) = {( ∨ 2 − 3 ∨ 2 − 13), 2}, which, when started, will move the chip from the position ПУ2 into position ПУ2, according to the output function О( 2 ) = 2 and the input function (2) = { 2 }.These conditions can be realised by performing a logical operation "OR", i.e. terminals 2-3 or 2-13 or relay winding must be de-energised MC, as well as relays PC2 d.c.under current.As a result of the terminal transfer, the relay status graph PC2 will reset to its original state.
Consider the operation of the microcontroller when setting a route that runs through the paired points at the minus position of both points.In this case, according to the block interlocking algorithm, the minus switch on the switches must be activated and the chip on the graph (Fig. 4) must be moved to the position of PC .From the initial state of the relay graph MC it can be seen that the chip is in position PC , i.e. the relay is de-energised, to move the terminal to a position reflecting the energised state of that relay, the conditions for starting the transition 1 t must be met in accordance with = { 1 } and ( 1 ) = {(2 − 3 ∧ 1 − 3 ∧ 2 ∧ ), } position input functions  and transitions 1 t .This condition requires the implementation of a logic function (2 − 3 ∧ 1 − 3 ∧ 2 ∧ ), , which corresponds to the simultaneous presence of voltages on terminals 1-3, 2-3, de-energised state of the relay PC2 and an excited relay CR, and check the de-energised state of the relay MC, according to safety requirements and place the chip at the same position, the status of the graph is shown in Figure 9. Starting a transition 1 t will move the chip to the position PC , which corresponds to the excited state of the relay MC.De-energising the relay MC occurs when the conditions for starting the transition are met 2 t according to its input function , }, which, when started, will move the chip from the position PC into position PC , according to the output function О( 2 ) = 1 and input function (1) = { 2 }.These conditions can be realised by performing a logical operation "OR", i.e. terminals 2-3, either 2-13 or the relay winding must be de-energised MC, as well as relays MC d.c.under current.As a result of the terminal transfer, the relay status graph MC will reset to its original state.Analyse the behaviour of the Petri net graph for the relay CR and operation of the microelectronic control unit when setting a route that passes through the twin switches at the minus position of the switches.According to the block interlocking algorithm, when the first button of the route to be set is pressed by the station attendant, the angle relay must activate CR and on the graph (Fig. 4) the chip must be moved to the position of CR .In the initial state of the relay graph CR it can be seen that the chip is in position CR , i.e. the relay is de-energised, to move the terminal to a position reflecting the energised state of that relay, the conditions  CR , i.e. voltages on terminals 1-5 , relay back contacts PC1, and also check that the relay is de-energised, with the pin in the position CR , according to safety requirements (Fig. 9).Second parallel relay excitation circuit CR is to perform a logical function {( ∧ 1 ∧ ), }, which should be reflected in the state of the graph by the presence of tokens in the positions PC , 1 MC , MG , and also check that the relay is de-energised, with the pin in the position CR according to safety requirements (Fig. 10).
If the above conditions are met, the chip can be placed in position CR is based on the execution of a logical expression 1 ∧ ( ∨ ), when the relay PC1 remains de-energised and it is fulfilled that the variable 1 PC  , or the condition that the variable  = 1 , i.e. there is no power on the busbar of the same name.If these conditions are fulfilled, the chip is placed in position 1 ∧ ( ∨ ) and the conditions for starting the transition are fulfilled 3 t .
The state of the graph in this situation is shown in Figure 11.Independent start of transitions 2 t and 3 t will reset the graph to its original state.
The algorithms for the operation of these relays are derived from the results of the model study, as shown in Fig. 11-14 [15]

Conclusion
The use of advances in modern systems engineering makes it possible to provide more efficient and safer control of the transport process in the situation of the increasing need to abandon electromagnetic relays.The solution innovative tasks on application of noncontact devices, in control systems of railway transport, will provide an increase of safety of transportation due to increase of reliability, technical condition of devices, control.To achieve this goal we used methods of digital information processing and modelling based on Petri theory, developed algorithms for switching on and off the control relays of the unit NSS, The model is based on the use of a microcontroller.As a result of the study and analysis of the model of the set group relay for twin switches control, the algorithms of their operation, tripping and de-energizing conditions with the safety requirements are obtained (Fig. 11-14).

14
and input functions ( 1 ) = {(1 − 5) ∧ 1), } Transition 1 t or( 4 ) = {( ∧ 1 ∧ ), } transition 4 t .These conditions require the implementation of a logic function {(1 − 5) ∧ 1), }, which should be reflected in the graph by the simultaneous presence of chips in positions 15  , 1 MC and CR , which corresponds to the excited state of the relay CR.De-energising the relay CR occurs when two conditions are fulfilled or the transition is triggered 2 t , or start a transition 3 t .According to the transition input function ( 2 ) = {1, }, which, when started, will move the chip from the position CR into position CR , according to the output function О( 2 ) =  and the input function () = { 2 ,  3 }.These conditions can be realised if the position 1 MC there is a chip, i.e. a relay PC1 excited, resulting in the start of the transition 2 t and moving the chip into position , the graph will take on its initial state.The second variant of a token from a position CR into position