Enhancing River Monitoring Embedded System using Time Redundancy Fault Tolerance to Resolve Transient Sensor Fault

. Reading data from sensors in the context of the Internet of Things (IoT) is one of the main parameters of a high-reliability system. Data reading by sensors is prone to errors due to various variables that the problem cannot accommodate. One method to overcome this problem is the time redundancy algorithm, where the sensor takes data and its best value several times. In this study, the sensors used to calculate the water levels are ultrasonic sensors and resistance. At the river monitoring point, data is sent using the UDP (User Datagram Protocol) protocol that previous studies have used. This research has been done as a prototype with a maximum distance between sensor nodes of one meter. The results of sending data using UDP were successful, with an average delay of 3293 microseconds. And the ultrasonic sensor that has been tested based on transient fault against time redundancy has an accuracy of 94.5% based on a sampling delay of 1000ms.


Introduction
The last decade has seen a rapid increase in the use of the Internet of Things (IoT) and Embedded System, which has been implemented in various aspects [1].One of them is to monitor river water canals which are used as a tool to prevent flooding [2,3,4].However, the reliability aspect of such a critical system has not been studied comprehensively.The most crucial element of the monitoring system is how the sensors read the data correctly [5].Because if it is wrong in reading the data, then the system's decision to control it will be wrong and cause unwanted things-for example, flooding and equipment damage.If the system has a significant error, it will not be trusted or used [6].
Various techniques have been applied to overcome the problem of reading data, ranging from expensive sensors to significant infrastructure changes [7,8,9].However, this does not guarantee a system is said to be successful or reliable, and it only takes considerable time.This research was motivated by previous research that was carried out, namely, developing a prototype of a water canal to prevent flooding in rivers [10,11].Fault tolerance is a system's ability to continue performing its duties when an error occurs.In creating a system considered high reliability, several methods can be used, the most common of which is to process the data received by the sensor with the concept of redundancy [12].This redundancy can be in the form of additional hardware or program code to verify the output value results [13].One of the errors that can occur in p-ISSN: 2540-9433; e-ISSN: 2540-9824 sensors in a system is a transient fault [14].The transient fault is a sensor reading error that appears at one time and then disappears [15].The transient fault problem can be solved by adding a time redundancy algorithm to the system [16].Time redundancy is the repetition of a task by computing, executing commands, or sending data two or more at different times [17].The results of the duplication will then be compared with the data that has been previously stored.If the data is different, an error occurs in the system [18].
Previous research detected floods using fuzzy logic using ultrasonic sensors with embedded systems using NRF24L01 which has an error of 4.64% [11].However, this study calculated errors based on manual calculations, so only the incoming data were assessed.This study has not included data that failed due to transient faults.The sensor's location and the monitoring point's location are different.So it is also necessary to send data from sensor readings.The UDP protocol was chosen because it has good reliability on embedded systems.
Based on the possibility of a fault in the system, in this study, time redundancy will be implemented to overcome the problem of transient faults.Adding time redundancy to sensor readings aims to overcome transient faults occurring when the sensor reads a value.So that the results of this study will be able to conclude the impact of system read errors and the success of time redundancy on the transient sensor.UDP is used as well as adding a data transmission protocol because the sensor points and monitoring locations are in different places.

Related Works
Another previous research conducted is water channel control using Fuzzy Logic [11] and Simple Additive Weighting (SAW) [10].The river must have a smooth flow and be free of obstructions.Floods in rivers are caused by clogged drains and fewer catchment areas of high rainfall in a location [19].However, under certain conditions, if it is in the highlands with high rainfall, it will impact the volume of Water in the lowlands.So often, floods occur in the lowlands [20,21].Figure 1 shows prior research that points A are upstream and B is downstream.Then on the prototype, there is a Flow Control System to control water flow to point B. The Flow Control System has sensors for the height and speed of the river water flow.Water moving at point B will flow naturally at first.However, if one downstream at point B experiences heavy rain and puddles, the Flow Control System will close so that Water will flow at another point B. The data is processed at the Control Station to determine the opening and closing of the door on the Flow Control System, which is the input for Fuzzy Logic and SAW.
In previous studies, ultrasonic sensors produced river water level data.The data is vital, so the data produced must be accurate.Ultrasonic sensors are hazardous to creating data reading errors due to various factors.These errors can occur at any time, but the data must be maintained because it affects the Flow Control System on other river segments.Therefore, a method is needed to overcome the fault on the ultrasonic sensor, which is the Fault Tolerance Computer System theory to support data accuracy in Flow Control.Sensor Node on each section of river B must send data to the Control Station very accurately.A suitable method for this problem is time redundancy.The time redundancy process is that the sensor retrieves data within a certain period, as much as the required amount.After data have been collected, the data will be processed by the Voter.The way the voter works is to choose one of the data considered the most appropriate to be sent to the Control Station.This process does not interfere with other operations and maintains data security.This research focuses on processing data on ultrasonic sensors with time redundancy and sending data to the Control Station.

Research Method
This study focuses on processing the input from the Water Height Sensor, which uses an ultrasonic sensor based on its voltage.Then the data is collected in Arduino on the Flow Control System as a Sensor Node so that the Time Redundancy method can process the data obtained.After that, the Voter will select the data to be issued/sent to the Control Station, as seen in Figure 2.
In this study, the variation of the delay in data collection and the amount of data is very influential.So the method of retrieval and the amount of data will be experimental.Data from the Ultrasonic Sensor will be taken at intervals of 100 milliseconds to 1000 milliseconds.Then the amount of data to be taken varies from two to five.
Figure 2 explains how Time Redundancy works.At time t0, the system will read the input and then process it.Then the output value will be stored and processed by the Voter.The system will perform the same process for t1, t2 to t-n.The value of n is the amount of data.In this study, experimental actions have been conducted.Every two to five data will be selected every 100 milliseconds to 1000 milliseconds.Data that have been collected will be compared in Voter.Voters will take the average data value.Then the Sensor Node sends data to the Control Station using the UDP Protocol.This protocol was chosen because it is considered the most reliable.

Results and Discussion
This research is a prototype, where the data units are compared with a scale of 1:10 for water levels.The height data on this prototype are 2 cm, 3 cm, 4 cm, 5 cm, and 6 cm.For sending data with UDP between Arduino (Flow Control System) and Node MCU (Control Station) is 1 meter.The test aims to determine how many delays and sampling are appropriate so that the system gets the best results from the sensors obtained against Time Redundancy.

Time Redundancy Testing Scenario
This data sampling test is used to determine how much data is appropriate to take in a specific period.This first test determines the next testing stage related to the data used.Each Sampling Delay from 100 milliseconds multiplied up to 1000 milliseconds against 2 cm to 6 cm (every 1 cm).Data retrieval for each delay starts from 2 data to 5 data.In Table 2, the trend of the data can be seen that time does not affect the accuracy of the data.The accuracy of the data obtained by each row of data varies significantly.It can be low or high.From the best accuracy, more detailed testing related to the Time Redundancy of this system was carried out in the next test.

Time Redundancy Testing Scenario Against Water Level
This test is to determine the level of sensor readings with various phases.The results of sensor readings are tested in the river prototype.In this prototype, a random water ripple has been made.Determination of the amount of data retrieval is based on the previous test, i.e., every 1 phase of data collection is carried out four times with a delay of 1000 milliseconds.In the testing scenario in Table 2, system results with Time Redundancy are compared with the Digital Ruler, and then the results are compared.The average accuracy of all testing phases in this test was 94.50%.This result can be said to be quite good and reliable enough to be implemented.

Data Delivery Testing Scenario
The final testing scenario of this research is the test of sending data.The data is generated by the Sensor Node using Arduino.The data is sent to the Control Center using the MCU Node.The system prototype's distance is 1 meter-protocol for sending data using UDP.The data is calculated from when Arduino sends it until the MCU Node receives it.
Based on this test, the success rate of data transmission is 100%, where the Flow Control System sends all data to the Control Node.However, as seen in Figure 3, the delay in sending data looks less stable.The fastest data transmission is 146 milliseconds, and the longest is 168 milliseconds.The average data transmission time of the 30 data sent is 157.1 milliseconds.It is also quite acceptable for a prototype.amount of data taken.From four to five data with a delay of 100 -1000 milliseconds, the overall average accuracy gets 84.20%.However, the best level of accuracy is by using a sampling delay of 1000 ms and a lot of data sampling as many as four data, which is 95.25%.The use of a sampling delay that is too small will have an impact on the increasing number of reading errors that occur.The amount of sampling data will affect the accuracy of the reading because if there is too little sampling, errors that occur when reading will be difficult to correct.Time redundancy significantly influences sensor readings because the rippling river water surface condition can be seen with tests with a lot of data sampling, and the slightest delay has the worst accuracy rate.
Delivery performance testing is done by measuring the success rate of delivery and delivery delay from the Sensor Node (Arduino) to the Control Center (Node MCU) using the UDP Protocol.The delivery rate test was carried out 30 times with a distance of 1 meter, and all were successful.This prototype shows that data can be sent using the UDP Protocol to two different hardware, and data integrity is well maintained.
Further research can be done by implementing Time Redundancy to sensors or other relevant systems.Delay sampling can be made with tighter intervals and longer times so that the accuracy is more detailed.The system can be integrated with cloudbased systems because it can be widely used.For example, data can be monitored on a website or mobile phone application.

Figure 3 .
Figure 3. Data Delivery Testing Result

Table 1 .
Time Redundancy Testing Result

Table 1 .
Sampling tests were carried out.The average accuracy obtained was 84.20%.But the best accuracy is on 4 data with a 1000 millisecond delay.

Table 2 .
Time Redundancy Accuracy Testing Result