Gathering Energy of the Stray Currents in Electrified Railways Environment for Power Supply

: The paper presents a new, unconventional energy harvesting (EH) method for supplying low-power devices on electrified railway lines that utilises stray currents and the non-zero potential of the rails to the ground. The EH device gathers the energy and stores it in batteries. It could even work in extremely unfavourable weather conditions and could be easily placed in almost any location. The presented real-life data show that the average available power is less than 250 mW and the average useful power is about 100 mW. This is enough to supply ultra-low power microcontrollers, which only occasionally use energy-consuming modules to perform measurements or communi-cate. The disadvantage of the EH method is the introduction of resistance between the rail and the earth, which increases stray currents and could increase the electrochemical corrosion of the rail. To reduce the impact of this resistance, a method for balancing the flowing charge is proposed. After balancing, the average of the flowing current is zero and electrochemical corrosion should be reduced. The proposed charge balancing algorithms could reduce the unbalanced charge to nearly zero at the expense of energy gathering efficiency, which decreases by 20–40%. and W.O.; supervision, G.W., Z.R., K.B., and W.O.; project administration, G.W., Z.R., K.B., and W.O.; funding acquisition, G.W., Z.R., K.B., and W.O. All authors have read and agreed to the published version of the manuscript.


Introduction
Modern railway infrastructure requires more and more complex safety, control, and supervision systems (peripheral systems), including remote sensors, telemetry systems, and wireless sensor networks (WSN). All these devices need a continuous, reliable, and maintenance-free power supply and they are usually low power devices. On the other hand, railway lines are often built without access to 110/230 VAC supply and the only available conventional power source is medium-voltage (e.g., 3 kV DC) used to supply electric locomotives. Converting medium-voltage to a low-voltage to supply low power peripheral systems (safety, control, and supervision systems) is expensive mainly because of the necessity to use high-voltage elements and protections.
The aforementioned devices are frequently powered by the off-grid installation of renewable energy sources. This solution allows for the generation of enough energy for the ongoing requirements of the supplied system as well as storage of the excess energy in batteries for use at night or in unfavourable weather conditions [1,2]. These installations usually use photovoltaic cells (PV) or wind turbines. Other less frequently used alternatives include fuel cells or a variety of other solutions of unconventional energy harvesting (EH), such as thermoelectric power, microbial fuel cells, enzymatic fuel cells [3], etc.
The importance of PV systems and small wind turbines as power sources, is hard to overestimate, but these kinds of power supplies are highly unpredictable, which necessitates the use of batteries, often with large capacities. In many cases, the use of large-sized PV panels or wind turbines is impossible for aesthetic or security reasons, the risk of vandalism, or a lack of required space. Another reason may be problematic location, e.g., under a bridge, in a tunnel, between tall trees, etc. Although it is possible to use non-rechargeable batteries as a supply, such devices require frequent servicing. In these cases, the usage of some kind of energy harvesting could be beneficial. For these reasons, there is an urgent need to devise power supplies with small dimensions and which are somehow "hidden". This paper presents two technical innovations. In Sections 3 and 4, a method of suppling low-power devices using the stray currents that flow in the earth near railroad was described. In principle, the device using this method will be able to supply low-power systems in even extremely unfavourable weather conditions (winter, long-lasting snow cover, windless weather, etc.). The presented example "energy harvesting" (EH) device is able to supply low energy-consuming railway sensors and the estimated available energy of the device is at the level of a few Wh (watt-hours) per day.
The main disadvantage of the proposed method of gathering energy is the introduction of resistance between the rail and the earth, which increases stray current, and as a consequence could increase the electrochemical corrosion of the rail [4]. The problem of electrochemical corrosion occurs if the current flows between the metal elements located in the ground, especially if the current flows only in one direction (it is discussed in more details in Section 5). The second novel idea of this paper largely eliminates this issue by introducing the charge balance concept. In Section 6, the algorithms of balancing the flowing charge are presented, which allow to minimize the corrosion induced by the current flow through the input resistance of EH device.
To the best of the authors' knowledge, no methods of supplying devices using the stray current or non-zero potential of the rails have been previously proposed. The novelty of the solution was confirmed by the patent granted by the Polish patent office.
There are different types of traction networks that use either direct or alternating currents of various voltages [5][6][7][8][9]. The described solution was intended for use with the 3 kV DC traction networks, but it is possible under certain conditions to use it with other networks.

Known Methods of Energy Harvesting
The most well-known methods for the unconventional generation of energy which is intended for railways use a piezoelectric generator [10][11][12][13][14][15][16][17]. Such solutions use many piezoelectric devices, which are embedded in railway sleepers (which should be anticipated when building a railroad). These solutions are based on the fact that the pressure exerted by a passing train is evenly distributed among all of the elements that are used to produce energy. The electrodes are configured and connected in such a way that the generated charge is summed up. However, the amount of energy that can be obtained in this way is quite small, e.g., in [18], the amount of the harvested energy during single pass of the train is assumed to be 395 μJ. An interesting solution is presented in [13,[19][20][21]. The proposed device for generating electricity uses input vibrations such as the ambient vibrations that are generated by a passing train. The device uses mechanical amplifiers that have a parametric resonator and the energy is generated by damping these vibrations. The mechanical energy from the vertical vibration of a sleeper induced by passing train is estimated to be about 1.1 J per 1 kg of the oscillating mass [22].
An alternative solution that uses the energy that is derived from vibrations is presented in [23]. In this solution, collecting the kinetic energy requires a transduction mechanism that converts the mechanical vibrations into electrical energy. The vibrations can be collected in various environments from bridges, buildings, industrial equipment, and household appliances to railways and cars, etc. [24]. The solution [25] that is used in the railway infrastructure utilizes kinetic energy obtained from the train movement. It is a generator that converts the kinetic energy of passing trains into the rotation of the turbine. A device is mounted in the railroad tracks, and it rotates under the weight of the passing train. Another solution uses the railway track deflection to generate energy [26]. The device is attached to two rail sleepers and the electrical energy is obtained by converting the up and down track movements into the rotary motion of the generator.
Another solution for railway applications is a variable reluctance harvester [27]. In this device, an open magnetic circuit with wire-wound coils is closed by the wheels of a passing train. It is able to produce 131 μJ per pulse (single wheel pass), which is equivalent to 5.9 mW mean power for a train with a passing velocity of 81.5 km/h. Electromagnetic vibration is also an interesting source of energy for railroad tracks. To design an effective energy recovery system, an electromagnetic vibration converter was previously developed. The vibration profiles of a train travelling between two cities were measured using a data acquisition system that was installed on a train car. The results showed that the measured profiles have multi-frequency signals that range from 10 to 50 Hz and an acceleration of up to 2 g. The prototype of the electromagnetic vibration converter was designed with respect to the actual vibration parameters, resistance, and integrity requirements. The basic device in this solution is a moving coil attached to a mechanical spring. The maximum obtained voltage was 1.7 Vpp, which corresponds to a maximum output power of 10 mW [28]. An extensively improved concept was the development of large-scale metamaterials that have over-normative functions for obtaining energy [29,30]. Metamaterials are able to increase the local energy density by limiting and focusing energy before harvesting it, which results in significant improvements in the power output and conversion efficiency. The use of large-scale metamaterials to obtain renewable energy is a new direction for energy production in the anthropogenic environment. However, the research is not yet advanced enough to enable the results to be implemented in industrial solutions. All the aforementioned harvesting methods are dedicated to low energy consuming devices.

New Unconventional Energy Acquisition System and Its Properties
The proposed solution for energy acquisition on electrified lines and the accompanying railway infrastructure is based on using the non-zero potential difference between the return network (rails with electrical connections) and the ground. Because of the undesirable phenomenon of stray currents, the return circuit is not earthed, and the rail does not come into contact with the ground. In real conditions, the phenomenon of stray currents cannot be fully eliminated due to the limited resistance of used insulation. The flow of the residual stray currents causes the difference of the rail potentials depending on the distance between the traction vehicle and the measurement site. The highest voltages occur in the area in which the current is consumed by the electric multiple unit (EMU) or electric locomotive, and they become particularly high during acceleration or regenerative braking. The value of this voltage depends not only on the intensity of the current consumption by the traction vehicle, but also on the natural variability of the resistance of the return network (rails) to the ground, which results from weather conditions (rainfall, snowfall), the seasons and the influence of any vegetation overgrowing a railway track. The resistance between the rails and the ground also depends on the technology of the return network (contactless installation of rails or rails that are connected with screwed connectors), the condition of the insulating pads, and the technical condition of the track (concrete or wooden sleepers).
It should be mentioned that due to safety requirements the rail potential must be limited and, in the EU, according to IEC 60364-4-41 [31], protection against indirect contact for nominal voltages up to 120 V DC must be provided unless the relevant requirements defined in IEC 60364-4-41:2007 [31] are met. Therefore, for the 3 kV DC supply, the permissible value of the rail potential [32] should not exceed 120 V [31][32][33][34][35]. This is ensured by dedicated thyristor earth-fault protection devices.
A basic model [36] to analyse the flow of the currents for electrified tracks is presented in Figure 1. The current from the traction flows through the overhead contact line with RT resistance through the drive systems of the traction vehicle with the equivalent resistance RL and the return network to the substation. The return network can be modelled as a set of series of connected resistances rS(i) that represent the elementary bus resistances and a set of resistances rP(i) that are connected from the individual nodes of the resistor string rS(i) to the far earth with a conventional 0 V potential. In practice, the equivalent resistance rp(i) ranges from 0.5 Ω·km to 15 Ω·km [32,37] and the equivalent value of the resistance rS(i) is between 20 and 30 mΩ/km [4].
The flow of a current causes the voltage drop along the rails. Because the substation is not grounded, the system tends to be balanced in a potentiometric manner due to the presence of the rp(i) resistances. Some of the rail potential will be positive in the anodic zone (Figure 1), negative in the cathodic zone and there will be a point with potential equal to the potential of the ground (denoted as B on Figure 1b).
The energy harvesting (EH) device that uses the phenomenon of stray currents is inserted at point (denoted as A on Figure 1b) in the return line. Because of non-zero potential of the rail, a current will flow through the internal resistance RIN and the grounding resistance RGND.   The resistance RSRC ( Figure 2) results from the network of resistors rS and rp between nodes A and B. The total current from point A to the ground branches and returns through the individual resistances rp to the return line on section A-B. RSRC depends mainly on the rail-ground transition resistance and the soil resistivity. The resistance RGND is the grounding resistance between earth rods and the earth. This is the only component that can be affected by installation conditions (material of the earth rods, burr depth etc.) and the smaller this resistance is, the greater the expected energy efficiency of the source. However, this resistance shouldn't be less than 20 Ω because of railway companies' requirements to reduce the maximum stray current. The variability of this resistance over time is due to the effect of atmospheric conditions on the soil resistivity. According to the Thevenin's theorem, the internal resistance of the source (ROUT) is the sum of RSRC and RGND.
The preliminary measurements (presented in the next Chapter) and analyses showed that the peak electromotive force E reaches approximately 30 V (no-load open-circuit voltage), however, these values only occur during a very short period of time. The source polarity changes depending on the position of the train unit in relation to the measurement point (see Figure 1c). The equivalent internal resistance of the source RSRC is more than 20 ohms (in one case, it was approximately 50 Ω and in another about 20-30 Ω).
The basic architecture of the dedicated EH device is shown in Figure 3. One input pole of the device is connected to the rail, while the second input pole is connected to the earth rod. The solution contains an overvoltage protection system, rectifier, and buckboost converter. It will be shown that, in real conditions (see Section 4), the input voltage of the converter should almost always be increased (assuming 12 V battery at the converter output), and therefore the DC/DC converter can be the boost type. The output voltage should be used to charge the battery, which in turn could be a supply for low-power devices. Battery capacity depends on the traffic volume on a given line and the energy demand of the powered devices but is much more independent of weather conditions than PV systems and wind turbines.

The Field Survey
To obtain real-life data, a field survey was carried out at two separate locations. The first one was on frequently used track between two cities, Zabrze and Gliwice, 2.7 km apart of the nearest railway station. The tracks there were with concrete sleepers and insulators were in good shape. The second one was located on a freight railway track with wooden sleepers. Based on the obtained empirical results, the first localization could be a potential site for using the presented device to utilise the stray currents in electrified railway lines.
A datalogger device (and other meters) was connected to the metal elements of the rail with a screw clamp (Figure 4a). The device was connected with a double insulated copper multi-wire with a cross-section of 1.5 mm 2 .
The value of the output impedance (ROUT = RSRC + RGND) of this virtual source depends, among others, on the atmospheric conditions. Before acquiring the data sets, the value of output resistance was measured to match the input resistance of the data logger in order to obtain maximum power from a source. Measurements were carried out in spring time, after a long period of drought, and the soil was dry. All resistance and soil resistivity measurements were made using a SONEL MRU-120 m. Here are the results of measurements: •   The first measurements set (shown in Figure 5a) was collected in first location for 988 s while three local trains (ELF type) passed by. This set of data is the most representative and further analyses will be based on this example. Train no. 1 was moving from the railway station to the test bed, train no. 2 was moving in the direction of the railway station, and train no. 3 was moving away from the railway station to the test bed. The hum 50 Hz mains, which had an amplitude of 2.5 V, was filtered out and the voltage and current waveforms presented in Figure 5a are without this distortion. The maximum instantaneous power was Pmax = 2.25 W, average power was Pav = 225 mW, and the utilised energy W = 222 J within the 988 s. It can be reasonably assumed that this is a representative value for this track for a longer period of time. Thus, we can expect that for the same intensity of train traffic, 809 J can be used within one hour, which is equivalent to 0.225 Wh. For a 12 V battery, this is equivalent to 18.75 mAh.
The second presented set of measurements (in Figure 6a) was also collected at the first location for 462 s with a higher datalogger's input resistance equal to 1000 Ω. We considered it as an actually open circuit (the input voltage increased but the efficiency of energy harvesting was reduced). While the series was acquired, one local train passed and the influence of some trains afar was noted. Despite the lack of a train in sight, the voltage changed because the far train must have moved the border between anodic and cathodic zone along the railway trace. The far train in Figure 5a that was moving toward the station has shifted the potential at the test bed location into the cathodic zone. The third set of measurements (shown in Figure 7a) was collected at the second location (freight railway track) for 2280 s for one heavy, slow-moving train (around 20 km/h) on the supplied section of track. During the first minute that the train was passing the measurement position, the maximum instantaneous power was Pmax = 564 mW. During the whole 38 min the average power was Pav = 76.3 mW and the utilised energy was W = 172 J. Figures 5b-7b present the instantaneous power, the utilised energy, and the charge balance for a simple converter. Utilised energy represents maximum available energy in this system and charge balance is uncontrolled.

Electrochemical Corrosion Caused by a Current Flow and How to Reduce It
The consequence of using the EH method proposed in previous sections is the introduction of a resistance between the rails and the earth (the input resistance of EH device; see Figure 2). This resistance increases stray current which causes electrochemical corrosion of the rail [38][39][40]. Typically, the rails are insulated from the ground rather then grounded [41] to minimalize stray current and galvanic corrosion, so increasing the stray current is an undesirable effect of proposed EH method. To assess the extent to which the higher current is unfavourable, let's compare it with the permissible maximum stray current values. The railway standard [32] states that there will be no damage of the tracks over a period of 25 years if the average stray current per unit length of a single railway track line is less than Imax' = 2.5 mA/m, which is equal to the current of 1 A for rails only 0.4 kilometre long. On the other hand, the maximum value of the input current in Figure 5 is about 150 mA and the average absolute value is about 35 mA, which is equivalent to 14 m of rails. Taking these numbers into account, it is reasonable to estimate that the implementation of the EH method would only cause a small overall increase of stray current. Nonetheless, it still could be used as an argument against the proposed EH method. Fortunately, there is a way to reduce the impact of input resistance of EH device on increasing the electrochemical corrosion, which will be presented below.
The electrochemical corrosion occurs when the current flows between the metal elements located in the ground. This phenomenon is much more intense for the current flowing in one direction only than for the alternating current. The AC is sometimes considered to be an insignificant factor contributing to electrochemical corrosion [4,37,42]. Importantly, the AC with a period of 10 min has about 10 times lower influence on electrochemical corrosion than DC, and even very long reversal periods of 1 h cause eight times less corrosion than DC [43].
As can be seen, e.g., in Figure 5b, the balance of the charge flowing (between rails and the earth) after the measurement cycle is positive, even though the current has flown in both directions. This is the starting point for research on current flow control in a stray current EH device. The idea is to balance the charge in a few up to teens minutes intervals. As a result, electrochemical corrosion will be significantly reduced at the expense of reducing the efficiency of energy harvesting.

The Flowing Charge Balance Algorithms
As mentioned above, the general idea of reducing the electrochemical corrosion caused by the current flow through the input resistance of the utilising energy device (see Figure 3) is to balance the charge flowing between the rails and the earth in the test bed position to zero at the end of the sufficiently long period of time. It can be expected that when a long time period is used to measure the rail potential, its waveform will be repeated because trains have a timetable.
Three different charge balancing algorithms are proposed below, two rather simple and one more complex. The results of applying these algorithms are presented using the data series from the first location (data series shown in Figure 5a).
The first algorithm is based on forcing the current to flow in the opposite directions in successive time periods. Let us call this algorithm the "Extremum Value and One Direction" (EVOD). After resetting the charge counters, the charge is calculated taking into account the sign of the current up to the set limit value, with positive maximum charge Qmax or negative minimum charge Qmin (it would be best if Qmax = −Qmin). If the charge reaches the first positive maximum value, only negative currents are utilised until the charge is zero. If the charge reaches the first negative minimum value, only the positive currents are used. After the charge reaches a zero value, the whole process begins once again. The ON/OFF signal is used to switch the input current on or off. The results of this algorithm of charge balancing are presented in Figure 8a. The maximum charge value is set to Qmax = 9.5 C, loss of the gathered energy is 33% (73 J), and the loss of the average power is 33% (74 mW). It should be noted that the charge balance reaches a nearly zero value at the end of the balancing period (see the blue line in Figure 8a). The second algorithm (limit only extreme value (LEV)) is used to set the limit values of unbalanced charges Qmax and Qmin, and allow the current to flow only when the charge balance is within these limits. If the stray current increases the charge over Qmax or decreases under Qmin, the input current would be blocked (ON/OFF = 0). All of the other currents are utilised. In Figure 8b the maximum charge is set to Qmax = 6 C, loss of the utilised energy is 38.3% (85 J) and loss of the average power is 38.3% (86 mW).
The third algorithm (energy grabbing reduction algorithm (EGRA)) is based on the histogram of the occurrence of the rail potential values. The shape of this histogram depends on the topology of the railway network and the timetable at a given point, because the topology and timetable determine how often a given point is in an anodic or cathodic zone (see Figure 1). By topology, we mean the distances to the nearest power substations (in both directions), railway stations, semaphores, and other railway signs. While the topology and the train timetable hardly change, there is one factor that can cause relatively quick changes to the model presented in Figure 1, i.e., soil moisture. It can quickly increase during rare periods of heavy rain, while it decreases slowly. Therefore, it is reasonable to expect for this histogram to be nearly constant over the course of a day or even several days. This means that instead of balancing the charge in the time domain it could be balanced using this histogram, but the histogram should be periodically recalculated. Figure 9 presents normalized histogram of the first data series (shown in Figure 5a). It is, in fact, the probability of rail potential values, so it will be denoted as p(Vi), where Vi is the middle value of the i-th histogram interval of potentials. However, it is the charge that is to be balanced so the charge vs potential values relationship must be calculated from the histogram of potentials: where Q(Vi) stands for the sum of charge during the measurement when the potential was in the i-th histogram interval of potentials, RIN is the input resistance of EH device, t is the time when the potential has value inside i-th histogram interval, and T is the period of measurements. The normalized charge (shown in Figure 10a) is calculated using the following formula: where Qtotal is the total absolute charge that would flow during the measurement without using any charge balancing algorithm. In Figure 10a the sum of the charge for all negative voltages Q(VIN ≤ 0) is lower than the sum for all the positive voltages Q (VIN > 0), where Q(R) is the sum of the flowing charge during the measurement when the potential was in the range R. Therefore, the utilisation of some positive voltages has to be disabled in order to reduce the positive charge and balance the charge. Because the energy is proportional to the square of voltage, it is advantageous to omit the lowest voltages, as the loss of energy will then be the smallest. Thus, charge balancing comes down to finding the value of the threshold voltage VTH, for which the below Equation (3) is satisfied: And for histogram, the Equation (8) takes the form: Due to the division of the entire range of voltages into histogram intervals of value 0.5 V, the Equation (4) will never be fulfilled exactly, so the value for which the difference is the smallest should be chosen. In Figure 10b, optimum value of VTH is equal to 8 V, the left side of (4) is equal to 36.1%, while the right is equal to 37.9%. For the other values of VTH, the inaccuracy of the charge balancing will be higher. Let us define a useful concept to visualize charge balancing, the normalized cumulative charge CQnorm(VN): The better the charge is balanced, the closer to zero is the value of cumulative charge for the maximum value CQnorm(Vmax). The normalized cumulative charge is presented in Figure 10a,b as the red line. As the result of disabling of the energy harvesting for lowest voltage values (0 < VIN < VTH) the unbalance of the charge flowing between the rail and the earth is reduced from 27.5% to 1.87%. It should be mentioned that for narrower intervals of the histogram, the unbalance of the charge will be lower.
The energy that could be obtained for a given rail potential value is described by the formula: This is presented in Figure 11a in the form of normalized energy as percentage of the total available energy. The normalized cumulative energy CWnorm(Vn), shown in Figure 11 as a red line, is defined similarly to the normalized cumulative charge by the equation: where Wtotal is the total available energy. As seen in Figure 11a,b the EGRA charge balancing algorithm decreases the utilised energy by about 20%. Figure 12 presents the time dependent waveforms of the charge and utilised energy for the EGRA charge balancing algorithm.  A comparison of the energy and average power losses in Table 1 shows that the EGRA algorithm ensures the lowest losses of energy and average power and seems to be the most efficient. The balancing of charge for the measured period is almost the same for all of the algorithms, but EGRA results in the highest utilised energy (the lowest energy losses due to balancing of the charge). Table 1. The comparison of three proposed algorithms for balancing the charge that flows between the rail and the ground (for the measurements shown in Figure 5a).

The Device for the Energy Harvesting System with Implemented Charge Balancing Algorithms
Taking into account the information contained in the previous sections, we designed a device for gathering energy from stray currents and reducing the electrochemical phenomena that are caused by the flow of the input current. Its schematic diagram is shown in the Figure 13 and the device is shown in the Figure 14. The energy harvesting from the rails is controlled by charge balancing algorithms. The input current IIN and input voltage VIN are measured. The polarity of input voltage S controls the synchronous rectifier. Based on the voltage value VIN and current value IIN, the control unit (CU) computes the instantaneous power P and the charge Q. The charge Q is an integral of input current. The CU generates the signal CLR, which resets the charge Q counter at the assumed start of calculations. The maximum power tracking algorithm is implemented, and the duty cycles D of the T pulses are calculated, which change the converter input impedance (as explained below). The DT pulses are used to switch the output step-up-step-down converter. However, from the presented measurements (see Figures 5a-7a), it is clear that only a step-up action is actually required.
As previously mentioned, the rail potential is limited to 120 V DC by a dedicated earth-fault protection (EFP). However, there is always a risk of failure of the EFP or a direct short circuit of the electric traction to the rail as the result of a break in the overhead line. That is why, in such an event, the appropriate overvoltage and overcurrent protection must be used to permanently disconnect EH devices from the traction network.
The implementation of the overcurrent and overvoltage protections, combined with the fact that the EH device should not be used in the area of operation of railway traffic control devices, means that the proposed power supply system will not cause a risk to the safety of the railway traffic. The output resistance of the source is equal to ROUT = RSRC+RGND (see Figure 2). In order to maximize obtainable energy, the input current and voltage of EH device must be adjusted to obtain the device input resistance RIN equal to the source output resistance ROUT. Thus, the converter should implement the function to seek the maximum power point by controlling the input current.
The problem of matching the converter input can be solved by changing the boost factor k of the converter that has efficiency η: In the approach from [44], the input resistance is calculated taken into account in the voltage boost factor k and the converter efficiency η: The boost factor k of the boost converter depends on whether it is working in the continuous current mode (CCM) or discontinuous current mode (DCM). For a relatively low input current, we can expect DCM. For CCM, the boost factor and the duty coefficient D of the converter are equal to [44]: Then, for DCM, they are equal to [44]: The KMB215S Schottky diode bridge rectifier in the input of the DC/DC converter was used in the prototype device ( Figure 14). There are also some serial protective devices. Altogether, there is an approximately 1 V voltage drop on the diodes and the protective devices. In the experiments, the input resistance of the "pure" boost converter was set to RIN = 130 Ω (or 150 Ω for the input of the whole device including the rectifier and protections) using D ≈ 0.06 in the DCM mode of the converter.
The cost of the experimental EH device, including printed circuit board, electronic components, battery, and case, is about 120 €. Additionally, about 240 € would need to be spend on external components like a surge protector, fuses, a wire, and grounding pins. Therefore, the estimated total cost of the EH power system would be 360 €.

Results and Discussion
This paper presents the concept of supplying low power components of the railway infrastructure by utilising stray currents. The waveforms of the rail potentials are the result of moving (to be more precise energy consuming or regenerating) one or more electric trains on the given rails section. As the positions of trains and their current consumptions change, the value of the rail potential and its polarization at a given point change irregularly. The absolute value of this potential on average is less than 10 V. The average available power is less than 250 mW because of the aforementioned low potentials and the relatively high output resistance (about a hundred ohms) of the virtual voltage source. After taking into account the losses of energy resulting from the application of charge balancing algorithm and related to energy conversion and storage, the average useful power is no more than 100mW. Fortunately, this is enough to power up modern devices, e.g., ultra-low power microcontrollers using sleep modes, which only occasionally communicate via more energy-consuming Bluetooth, Wi-Fi, or GSM modules.
As shown in Table 2, the proposed EH device can gather much more energy than other known unconventional energy harvesting devices. It should also be mentioned that almost all these methods (including piezoelectric methods [10][11][12][13][14][15][16][17][18][19][20][21], vibration methods [22,23], vertical-to-rotary converter methods [26], and reluctance harvesters [27]) can only gather energy when the train passes, whereas the proposed EH device gathers energy a few minutes before and after the train passing (see Figures 5a-7a). Moreover, many known EH solutions have to be placed under the rails during the construction or renovation of the railway track, while the proposed EH device can be easily installed without interfering with the structure of the existing railway track. Unlike photovoltaic panels or wind turbines, the proposed EH device could be placed almost anywhere, near the railway track in tunnels, under bridges, in the mountains, or in high woods. Nonetheless, because the EH device increases the stray current there are limitations where and when it could be used. The stray current is especially harmful if there is any metal infrastructure near the railway tracks, e.g., pipelines, metal bridges, or reinforced concrete foundations, because it causes electrochemical corrosion. To reduce this phenomenon the stray current protection and monitoring systems have recently been integrated into the track structure [45]. If installed in area of operation of such systems, the EH device could interact with them. However, it will probably not have a significant impact for two reasons. Firstly, the increase of stary current caused by EH device should have a value small in comparison to the value of the stay current itself (see next paragraph). Secondly, the lack of a conventional source of energy and the need to use the EH device usually means that there is no infrastructure near the railway track to be protected and there is no stray current protection system. Regardless of that, further research needs to be undertaken to determine whether the two systems can work together on one section of the railroad track.
The impact of increasing the stray current by 35 mA (see Section 5) is equivalent to only 14 m of the track. However, taking into account the parameters of the modern railways track, for which the initial insulation value above 50 Ω·km is often selected during the design process [46], this impact could be equivalent to hundreds of meters. This limits the number of EH devices that can be installed on a single railway track or, in other words, it introduces a minimum separation between the EH devices mounted on the same railway track. This separation mainly depends on the acceptable increase of stray current, the actual value of insulation of the track and the input resistance of the EH device. The last factor could be, to a limited extent, controlled by choosing the type and the number of earth rods, because it affects the grounding resistance (RGND) and the input impedance should be matched to the output resistance of virtual source (RIN = ROUT = RSRC + RGND). For example, assuming the acceptable increase of stray current equal to 10% and the input resistance of the EH device equal to 100 Ω, a minimum distance between two EH device could be roughly estimated as 5 km for a railway track with value of insulation equal to 50 Ω·km. It should be strongly emphasized that the insulation of value 50 Ω·km is unusually high value and the real, measured value is usually lower than 10 Ω·km [47]. In practice, it is reasonable to expect the average absolute input current of EH device to be less than 50 mA. This is much lower than the measured stray currents values, which can exceed 20 A [48]. Of course, the track insulation value changes as a result of changes in atmospheric conditions or track dust, but it is partially compensated by similarly changing grounding resistance. In terms of real application, on the one hand, the measured in the field values of insulation should be taken into account, and on the other hand, some safe margin must be introduced.
For safety reasons, it is not recommended to install the EH device close to the railway traffic control devices, especially on an insulated part of the rail used by the track circuits. In DC traction railways the track circuits use the signal frequency ranging from 80 Hz to 10 kHz [49] and it is absolutely forbidden to disturb this signal. Therefore, the EH device should possess, on its input, the low pass LC filter with an upper limit frequency lower than the working frequency of the track circuit. Such a filter does not affect the energy harvesting because the rail potential, and thus the input current of the EH, device changes slowly. On the other hand, this filter ensures that the distortions caused by a DC/DC converter (with frequency 10 kHz or more) do not penetrate from the EH device to the track. Additionally, it should be noted that the use of this system requires the consent of the institution or company managing the railway lines.
The presented energy utilising device has to be able to process and store energy in the battery in periods of time when the potential is relatively high, e.g., when the electric locomotive starts from the station, accelerates or brakes intensively (in the case of regenerative braking). The presented device adjusts its input resistance to match (RIN = ROUT) the time-varying output resistance ROUT of the virtual source (ROUT = RSRC + RGND). The fluctuations of this output resistance are a consequence of changing weather conditions. All of the aforementioned variabilities in the parameters of the virtual voltage source require the implementation of the algorithm for searching for the maximum utilising power point in the converter.
The phenomenon of stray currents is undesirable because it causes electrochemical corrosion and is reduced by adequate insulation of the return line (e.g., the joint of rails and sleepers), but the insulation of rails is never perfect. Because of the constant voltage of the traction supply, the continuous flow of current in only one direction promotes the electrochemical corrosion of the metal parts of the railway infrastructure. Basically, the rail to the earth voltage polarisation changes as the trains travel. It is possible to implement a charge balancing algorithm to control the charge flow, which would reduce undesirable electrochemical corrosion [43] at the cost of a low loss of the harvested energy. Such three algorithms were developed, tested using field measurements and compared taking into account the harvested energy loss ( Table 1). All of these control algorithms are able to reduce unbalanced charge and as a consequence the reduction of electrochemical corrosion could be expected. The most efficient of the tree charge balancing algorithms was the one that uses the histogram of rail potential. However, it is possible to combine this algorithm with either of the other two to obtain even better results.
The presented results show the suitability of this novel energy utilisation method and device for supplying the low power consumption off-grid components of the railway infrastructure.

Patent
The described above method for harvesting energy using stray currents was the subject of a patent application in the Patent Office of the Republic of Poland P.431518 "Sposób i urządzenie do zasilania urządzeń elektronicznych pracujących w środowisku infrastruktury Kolejowej". The patent was granted on the 2 July 2021. The patent term started on the 18 October 2019.