{'fraction_non_alphanumeric': 0.03225408825704659, 'fraction_numerical': 0.016599556249486398, 'mean_word_length': 4.821334608945229, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Visualization of Renewable Energy Powered Automatic Rail- way Crossing Systems in Bangladesh

Bangladesh's railway system mostly uses typical manual railway crossing technique or boom gates through its 2,955.53 km rail route all over the country. The accidents are frequently happening in the railway crossings due to not having obstacle detectable and quickly operating gate systems, and also for fewer safety measures in the railway crossing. Currently, there are very few automatic railway crossing systems (without obstacle detectors) available, however, all of them are dependent on the national power grid without a backup plan for any emergency cases. Bangladesh is still running a bit behind in the power generation of its consumption, hence it is not possible to have a continuous power supply at all times all over the countryside. We aim to design and develop a smart railway crossing system with an obstacle detector to prevent common types of accidents in the railway crossing points. We design to use two infrared (IR) sensors to operate the railway crossing systems which will be controlled by the Arduino Uno. This newly designed level crossing system will be run with the help of sustainable renewable energy which is cost-effective, eco-friendly, and apply under the national green energy policy towards achieving sustainable development in Bangladesh as a part of the global sustainable goal to face climate change challenges. We have summarized the simulated results of several renewable energy sources including a hybrid system and optimized the Levelized Cost of Energy (LCOE), and the payback periods.


Introduction
The railway system is one of the largest parts of the transportation network in Bangladesh since it has been established by the British ruler in undivided India. Bangladesh is a small country that has 1,47,570 square kilometers of land areas in total, where the railway department has covered more than 2,955.53 kilometers route of the railway [1][2][3][4][5][6][7][8]. Like other developed countries, Bangladesh is continuing infrastructures development where roads and high-way is one of the priorities sections that include the development of new rail routes as well. The total length of the train track is going to be increased, once the development of the multi-purpose Padma Bridge (the longest bridge ever in Bangladesh and 11 th in the world) on the Padma River will be completed by 2022 as per the news reports. This bridge contains a modern train track that will connect the southwest part of Bangladesh to the Bangladesh railway main streamline. Also, the Bangladesh railway department is currently going through the under-construction of some other railway tracks such as Chattogram (which is the business capital of Bangladesh) to Cox's Bazar (the longest sea beach in the world), and others more in the north-part of Bangladesh. Currently, the railway network needs to maintain 1,540 level crossings (where over 207 level crossings are on the highways) to confirm the safe operation of mass transport. There are 2,541 level crossings across the country of which only 1,400 are well-designed. Out of those 1,400 level crossings around 500 are operated with help of a properly trained operator. More than 70% of authorized level crossings do not have any dedicated operator/manpower. Besides, there are 1,141 unauthorized level crossings as well which can be considered as open death traps. However, there are electronically controlled level crossings (i.e., available mostly in the city areas) but all of them are dependent on the national power grid and there is no alternative backup for any kind of power disruption. Above 85% of the level crossings in Bangladesh are not safe and about 89% of the casualties of rail accidents are mainly happening due to the unprotected rail crossings and the rate is increasing day by day [1,2]. Figure 1 shows a foretaste of different types of level crossings available in Bangladesh and the results of casualties as reported in Refs. [3][4][5][6][7]. Railway level crossings traffic is maintained by a trained person. Busy level crossings are operated by lifting barriers [9]. Railway safety becomes one of the most crucial aspects in Bangladesh and the government is also very active and taking on new projects to reduce the number of unwanted accidents. To develop a secure transportation system, train tracks are sometimes built over the roads called level crossings. The level crossing is an intersection point between railway tracks and conventional roads. Many people had died in level crossing accidents of various types that are happening frequently in Bangladesh as it is not possible to stop the train instantly due to the mechanism of the train engine [10]. Many engineers had been reconstructed the train engine to increase its performance after its invention [11]. Nowadays, diesel Locomotive electric engine is widely used in railway transportation systems [12][13][14]. So, an automatic railway level crossing technology system is much needed to reduce accidents. There are many types of Internet of Things (IoT) based such as ultrasonic sensor, vibration sensor, programmable logic control, Infrared sensor automatic railway crossing system have been reported in the Refs [15][16][17][18][19][20][21][22][23][24][25]. Though some of them consider using solar energy, however, most of them do not care about power source management to confirm continuous power supply to the level crossing points. Currently, most of the world's energy comes from fossil fuels and natural gas. Around 16% of global energy and 36.7% of global electricity is generated from low carbon sources [26]. The production of electricity in Bangladesh is mainly dependent on fossil fuels. To resolve the power supply issue, people are trying to depend on more renewable energy resources because fossil fuels are responsible for the greenhouse effect, climate change, and global warming [27][28][29]. Bangladesh is one the most affected countries in the world by climate change. According to the World Bank statement, Bangladesh is standing at the seventh position at the high level of the long-term climate risk index (CRI) in the world. Carbon dioxide emission in Bangladesh was about 220.75 metric tons in the year 2018 [30], however, it is increasing every day. As per the report, fossil fuel energy consumption in Bangladesh is about 73.77% [31]. To reduce carbon dioxide emissions in recent years, United Nations (UN) has taken some actions to reduce carbon emissions. All countries in the world are set a goal to limit global warming and signed in an agreement named "The Paris Agreement". Its goal is to reduce the global temperature below 2 to 1.5 0 C compared to the pre-industrial period [32]. At the United Nations Climate Change Conference (COP 26), (recently held at the SEC Centre in Glasgow, Scotland, United Kingdom, from 31 October to 13 November 2021), the next vision for the global community has been declared to achieve an ambitious goal of net-zero carbon emissions by 2050 to limit the global temperature rise to 1.5 0 C. Several countries have already introduced their policies to reach the targets of achieving net-zero emissions by that time frame, while others have agreed to think seriously to help the global community to achieve a sustainable position towards COP 26's target [33]. However, it is a bit challenging task to achieve that goal, but not impossible either. New invention and innovation in the area of renewable energy generation and energy management can lead to a dream for a future sustainable green global towards meeting up the global incredible climate challenge. Eco-friendly energy generation sources like renewable or recyclable or long-lasting (with the minimal impact on food and water supplies) should be prioritized to face the global challenge.
Bangladesh Power Development Board reported in 2019-2020 that installed power plants are 0.19% renewable energy (solar), Hydro (1.13%), Gas (53.86%), Furnace oil (27.18%), Diesel (6.33%), Coal (5.62%), and Power Import (5.69%). Total net energy generation in the fiscal year 2019-2020 from renewable energy was about only 0.07%. Also, Bangladesh had a shortage of 9.34% in that year [34]. At the moment not only Bangladesh but also many other developing countries of the world are suffering from the power shortage issue in every sector [35][36][37]. In this current circumstance, renewable energy sources are needed most to overcome both the global warming issue and worldwide power shortage problem. It is time to develop self-sustained, smart, advanced, and automatic railway crossing systems as currently renewable power generation either solar or hybrid systems. In this research, we have designed an automatic railway crossing system to be operated by the energy which will be generated from a combination of multiple energy resources such as solar, generator, and wind turbine. As it is a 24-hour running system, we use the battery as the main power source of the control system. The generator will be used for the non-sunny winter season or on a rainy day or also in natural disasters while no option to use solar and wind energy. We have used an infrared (IR) sensor for fast detecting response to the main circuit board to operate the functionality of railway level crossings gates. The article puts in order as section 2 presents the methodology part that describes circuit simulation where a microcontroller has been used to control boom barrier ups and downs system through programming. Section 3 describes the energy generation system components and results in a different combination system (hybrid power generation). Section 4 presents the cost analysis followed by a conclusion in Section 5.

Automatic Level Crossing System Architecture and Components
We have designed an automatic level crossing system to prevent the accident which will be operated by renewable energy sources or a combination of renewable energy sources and the required energy to operate the system can be produced design on-site (i.e. close to crossing level based on the landscape). Figure 2, shows a schematic diagram of the proposed obstacle detectable automatic railway crossing level along with the circuit diagram of the automatic boom barrier. It can be seen that (Fig. 2) the infrared proximity (IR) sensor is placed near the train track at a certain distance from the level crossing. The lithium-ion battery is used as the power source for the IR sensor and boom barrier. The required power to recharge the battery will be sourced out from renewable energy sources (either single or a combination of multiple sources). We have used an IR proximity sensor to detect the entry and exit of trains while and an Arduino Uno microcontroller has been used to automate the process by using input code. The light-emitting diode (LED) and buzzer were added to the system to provide an indication and activate the alarm while the train incoming and passing to the level crossing as can be seen in Figure 2(b). In Bangladesh, the maximum speed limit for the train is approximately 83 m/s. Based on the fastest speed limit the distance between the boom gate to IR sensor should be around 50m as the IR sensor output is in a millisecond. Here, there are two IR sensors for incoming and outgoing were considered for the single track while for two tracks line four IR systems can be implemented. Figure 3 shows the flowchart of the algorithms that control the indication of trains' arrival and departure, and this process is continuous. The detailed information about the size of the motor required (how to determine the required motor size) to operate the level crossing systems is provided in the Supplementary file. In this work, we have used Proteus circuit simulation-based software to complete the main circuit design, Hybrid Optimization of Multiple Energy Resources (HOMER, developed by National Renewable Energy Limited (NREL, Boulder, CO, USA) pro software for renewable energy, load consumption, etc., and Arduino IDE software for microcontroller coding. We have performed the simulation process using the Homer pro software with a Photovoltaic (PV) panel, Wind turbine, and Generator. The battery is kept as a power source for the automatic boom barrier and IR sensor because that is necessary to be running for 24 hours continuously. The load consumption of IR sensors is 0.0036 kWh/day, and the Boom barrier is 7.2 kWh/day (i.e. 0.300 Kw per hour). So it is very important to keep a power backup plane for 24 hours to run the system continuously.

Sensor
The sensor is the most important part of this project. At present many proximity sensors are available in the market and infrared proximity (IR) sensor or IR obstacle sensor is one of them. There are two types of infrared (IR) sensors like active and passive sensors [38]. Active IR sensors act as proximity sensors, and they are commonly used in obstacle detection systems while the passive infrared (PIR) sensors only detect infrared radiation [39]. The infrared sensors mainly work according to three different laws like Planck's radiation law, Stephan Boltzmann Law, and Wein's Displacement Law [40]. Planck's radiation law is stated that all objects with a temperature above absolute zero emit energy in the form of electromagnetic radiation. IR radiant energy is determined by the temperature and surface condition of an object [41]. Here, = energy radiated per unit volume, ℎ = Plank's constant, = speed of light in vacuum, k = Boltzmann's constant.
Stephen Boltzmann's equation is stated that the radiation energy per unit time from a black body is proportional to the fourth power of the absolute temperature [42].
= ……………………………….. (2) Here, H = Irradiance existence from the surface, = Stefan Boltzmann constant, T = temperature Wein's Displacement Law is stated that the wavelength of thermal radiation most copiously emitted by a blackbody is inversely proportional to the absolute temperature of the body [43].
Here, λ = maximum wavelength, k = constant, T = temperature. IR sensor is used infrared radiation of 0.75 to 1000 micrometers. Infrared radiation wavelength is divided into three regions Near Infrared (NIR) 0.74-1.4 m, Mid Infrared (MID) 1.4-3 m, Far Infrared (FIR) 3-1000 m [44]. The detection procedure of this technology follows the concept of the blackbody theories to collect the emitting infrared spectrum [45]. The concept of an IR sensor which is used as a proximity sensor or obstacle detector is presented schematically together with the basic operational circuit diagram of the IR proximity sensor (as shown in Figure 4). In the IR proximity sensor, laser or LED is used as an infrared source and the photodiode is used as an IR receiver (also known as optocoupler). The signal processing is done by the operational amplifier. There is an analog to digital (ADC) converter used to convert the signal [46]. The potentiometer is used to calibrate the output of the sensor according to requirements. We have selected the SHARP IR sensor from the Acroname Preprints (www.preprints.org) | NOT PEER-REVIEWED | Posted: 3 February 2022 doi:10.20944/preprints202202.0060.v1 sensor manufacturer company. As per manufacturer information, the total input and output time are about 25 to 30 ms to perform the objective detection by the sensor. More details about the SHARP sensor are also available in Ref. [47].

Battery
Lithium-ion batteries are used as a power source for the sensor and boom barrier throughout the project work. The capital and replacement cost of the battery is $550 (USD) with a lifetime of 15 years. Operating and maintenance cost is $10 per year and the throughput of the battery is 3000 Kwh. The lifetime throughput calculation of the battery is given below [48][49][50][51][52].

PV-Panel
Homer Pro is collected solar radiation data from the National Aeronautics and Space Administration (NASA). Figure 5 shows the monthly average solar radiation data and clearness index profile in Dhaka city of Bangladesh. Solar radiation data is combined with daily radiation data and clearness index. The Homer pro software is used the below-given equations to calculate average solar radiation data and power output [53][54][55][56][57]: Monthly average clearness index:

Wind Turbine
Nowadays, many developed countries like China, USA, Germany are producing wind energy. In Bangladesh, there is also a possibility to produce wind power, however, it is needed to take proper action including investment and policymaking to establish wind energy production sites on a large scale. Wind speed resources are downloaded from the National Aeronautics and Space Administration (NASA) by resources option in the Homer pro software automatically. For this study, we have selected Bangladesh's average wind speed as shown in Figure 7. The ideal month for wind speed in Bangladesh for the maximum power output is April to September. In the simulation process, we considered a 3-kW wind turbine with a lifetime of 20 years, with a hub height of 17m. The capital and replacement cost of the 3-kW generic wind turbine is USD 18,000 and operating and maintenance costs $180/year. There are many calculation steps Homer pro is followed to produce output. Generally, an anemometer is placed at 10m height for meteorological measurements.

Generator
Normally, the generator is used mainly for backup like a natural disaster or in the winter season or cloudy days. The initial capital and replacement cost of the generator is USD $500 while the fuel price is $USD 0.760 per liter according to the Bangladesh market. Lifetime is 15,000 hours with a minimum load ratio of 25%. Emissions and fuel properties are given in Error! Reference source not found.. Homer pro software calculates fuel consumption according to the following calculations: F = F × Y + F × P ……………………………….. systems is provided in the Supplementary section. As the generator is a backup for our proposed system, it is fully optional and can be used only if it is necessary. However, there is a drawback of running a generator as the generator produces pollutant gas to the environment mainly carbon dioxide, and also the cause of sound pollution. Carbon dioxide is emitted by burning fossil fuels. It is the main cause of greenhouse gas that affects the Earth's radiative balance.

Converter:
The converter consists of an inverter and rectifier. The inverter converts Direct Current (DC) to Alternating Current (AC) electricity and the rectifier converts AC to DC electricity. Inverter maximum possible power output in AC and rectifier is in DC. In this project, we run both AC and DC components like PV and Battery are connected to the load, and Wind and Generator are connected to the AC circuit of the load. Both installation and replacement cost of the converter is $USD 300/kW with 95% efficiency.

Hybrid power generation systems
The PV systems are commonly used as the best renewable energy resource worldwide, though power generation is fully dependent on the availability of sunlight. The PV module can be used only during the daytime with a clear sunny sky. In this fact, a storage device such as the battery can help to provide power to the operating system from its saved power during any emergency case. However, it is always welcome to find alternatives, how to be more sustainable depending on only the possible renewable energy sources. We have used Homer pro software, to investigate different hybrid power systems. We have performed techno-economic analyses for different energy systems including a suitable combination of a hybrid energy system to understand the feasibility of developing sustainable off-grid or grid-tied energy generation system that can provide uninterrupted power supply to maintain the level-crossing operation. Figure 8 presents an example of the Homer pro software that scopes the components through an optimization process for different types of systems. A summary of the system components requirements is given in Table 2. As shown in the table component items are expressed in power (kW). Most PV used in PV, Battery system (8.61 kW) whether Li-ion Batteries are 12 for both PV and Wind, PV systems. It is noticeable that in the winter season, Bangladesh is experienced having foggy days (less sunlight) and sometimes natural disasters like cold-waves (Soitto Probaho) and rain, where PV or Wind power will not enough to run any electrical equipment. In these cases, like when the generator is the only option that needs to be in action. We have done some sensitivity analysis for December to March (winter season in Bangladesh), which is given in Table 3, and the rest of the month generator remains to turn off.

Cost Analysis
We have performed a cost analysis for different systems architecture as shown in Figure 9. From the cost analysis, it is seen that operation and maintenance cost is very low in every system. Capital cost is highest in Generator and wind systems because wind turbine cost is very high where PV, generator cost is the lowest.  We also performed Levelized Cost of Energy (LCOE) for the different systems. The LCOE is the lowest for the PV, Generator system and highest for the Generator, Wind. Though PV, Generator, and Generator are almost the same PV, Generator is more feasible than Generator system. Other systems are also feasible in different circumstances. We categorized every system according to years and cost by the Homer pro sensitivity optimization. We conducted this sensitivity to examine each system's feasibility in different years i.e., to find the pay-back time of the investment. It can be seen that PV, Generator system has the lowest payback time (5, 10, and 15) years. However, the PV panel has a lifetime of 25 years which should be considered by the decision-maker or the policymakers.

Discussion and Conclusions
From the simulation results, it is clear that renewable energy (i.e., either single power generation component or hybrid energy generation systems) -based automatic railway crossing systems are feasible and will reduce accidents in level crossing. As it is a 24-hour continuous system generator or battery backup has been considered as an alternating source of power during national or environmental disasters. The obtained result shows the possibility of using renewable energy in this type of project in both economic and environmental views. Also, in this project automation system reduce accidents in level crossing. Importantly, the off-grid power generation systems have low transmission losses (i.e., almost zero loss) which can provide electricity continuously anywhere including remote areas as well. Therefore, we recommend for either PV or a suitable combination of hybrid power generation systems to be made for major contributors in the energy supply line to operate the automatic railway level crossings and help to reduce the number of accidents in Bangladesh. Now, the question could come to mind if renewable energy source or any hybrid system is considered for this kind of work, where to and how to install those power generation components as in Bangladesh we are very limited to have enough open space. To the best of our knowledge, our recommendations are to use only PV systems with battery backup in the developed or urban areas and to use a hybrid (i.e., PV, wind) system where there is open space available close to those boom-gates. The advantage of using wind turbines besides the PV panels is that the wind turbines can generate power at any time when it is windy (either day or night). Again it can bring the question in mind that the wind turbines require large open space, however, a miniature version of wind turbine (as shown in Figure 10) can be used together with the PV panels for this type of project, where a minimum but continuous power supply is required. However, the installation of a large-scale wind power generation, where it is possible (like in the coastal areas in Bangladesh or like Cox's Bazar, Kuakata, and Vashanchor, etc.) would be beneficial not only for Bangladesh railway but also for the national power grid as well.
Supplementary Materials: The following supporting information can be downloaded at: www.mdpi.com/xxx/s1,that contains Figures S1-S8.