## 2 Train Detection System and Component Selection Method  
Currently, train detection systems involving wheel detectors are most commonly used to control train movements. Such a system generates safe information in an evaluator that defines the status of a section (free or occupied) on the basis of the information transmitted from the individual wheel detectors, which is the basis for the operation of the supervisory systems that manage the train movements in an automatic or manual way. A diagram of a train detection system with wheel detectors using a digital CAN communication interface is shown in Figure 3.  
The CAN interface allows for the connection of multiple devices to the bus and thus contributes to lower installation costs. However, it requires an adequate degree of protection against disturbances occurring in the railway environment. In addition, due to the limited space in the trackside area, the surge arrester must have small dimensions, so there is a justified need to design a dedicated method to meet all requirements. The following test environment (Figure 4) was proposed to verify the performance of the surge arrester. Figure 3: Diagram of a train detection system based on wheel detectors. Figure 2: Settings of the experiment proposed to verify the effect of cable degradation on the performance of the surge arrester. The wheel detector power supply components are also shown in Figure 4 but are not the subject matter of this paper. The shape of the input voltage waveform (surge) 1.2/50 \(\upmu\)s is described in ref. [2] and shown in Figure 5.  
A detailed discussion of the signal shape in the time domain and the required response time of the analyzed circuit is presented in ref. [23]. Based on this, the time of surge arrester behavior verification was set to 300 \(\upmu\)s.  
Surge implementation in LT Spice XVII software is presented in ref. [28]. A diagram of the surge arrester under consideration is shown in Figure 6.  
Figure 4: Test environment with the equipment (surge arrester module) under test. Figure 5: Surge waveform of an open circuit voltage [2] used for simulation process. Figure 6: A schematic diagram of the surge arrester module for CAN bus protection. The surge module consists of two groups of elements. For reasons of maintenance cost optimization, it is expected that the probability of failure of Group A components (cheaper part of the wheel detector, easily replaceable) is higher than that of Group B components (main unit, high replacement cost). This requirement is implemented in the goal function. The filter module is fixed and will not be subject to the selection process. The research process used the Matlab R2021A environment:  
* For the implementation of the method (method flow);
* For the determination of component parameters (voltages, powers, currents, etc. );
* With respect to the Global Optimization Toolbox module (Matlab environment), an appropriate function (namely GA() function) was used to configure and start the optimization process using the genetic algorithm. In addition, the LT Spice XVII software was integrated into Matlab to simulate the electrical parameters of the circuit under test. The method flow chart is presented in Figure 7.  
It was necessary to modify the method presented in [23] due to the fact that the GDT was responsible for dissipating a significant part of the energy during exposure to an input surge above the spark gap ignition voltage. However, voltages below the ignition voltage threshold also occur in the real railway environment and can damage components, because the GDT is not involved in the power dissipation. Based on the above, two test cases were selected:  
* \(U_{\text{WEI}}=6\) kV-GDT is active in energy dissipation, and the surge amplitude value 6 kV was calculated based on EN-50121-4 [2] standard, which required 2 kV. However, based on the experience gained (i.e., harsh railway conditions [13; 29; 30; 31]), the voltage must be doubled or tripled in order to meet high reliability requirements.