Surface Water Wave Detector for Floating Devices with Capacitive Sensor

— Water wave monitoring is essential in collecting marine parameters for oceanography studies and early warning systems on security and safety, such as drowning detection, weather detection, and gas leakage from underwater pipeline detection, because these activities create different water wave patterns that can be further analyzed. The current wave detection methods, such as underwater pressure and resistive sensors, have lower durability as they require direct contact with the water. Monocular camera wave detection can detect the line where water waves propagate. However, a static platform is required to perform monitoring operations. This research aims to develop a continuous capacitive sensor system that a buoy can implement for contactless water surface wave detection and to develop a water wave direction detection algorithm by Principal Component Analysis (PCA) calculation. Capacitive sensors arranged in a circular shape and a compass module are implemented inside the prototype buoy. Each capacitive sensor detects the real-time wave height change by changing the capacitance value. The capacitance values from all the capacitive sensors and the North of the compass sensor are sent to the embedded server for further computations. Processes carried out in the embedded server are initial calibration, centroid calculation, PCA calculations for water wave detection, and data visualization on the webpage. The prototype buoy with a capacitive sensor system and compass sensor developed can detect the four positions tested in the experiment with a mean square error of 38.42° and a mean absolute error of 5.85°.


I. INTRODUCTION
Most actions that induce water surface variation produce water waves in the process.These activities can be caused by nature, such as gravity quakes beneath the water, or by individuals, such as swimming, chemical disposal, drowning, and other activities.Water waves produced by various activities will differ in amplitude, frequency, direction, and duration.As a result, numerous activities may be determined by recording and studying the water surface wave.An immediate reaction may also be provided to avoid future hazards and injury if abnormal actions occur in the regions under monitoring [1].
Oceanography has frequently implemented the water wave monitoring feature to study water wave characteristics.However, water wave monitoring can also be implemented in other fields to act as a detection system, such as drowning and chemical disposal, as the struggling movements and pouring action of chemical disposal will induce water surface waves, which can be further analyzed for identification purposes.
Remote areas such as dams, reservoirs, and lakes do not have continuous surveillance systems to ensure the safety and security of the area.Besides, monitoring activities around remote areas is challenging, but these regions are essential in providing water resources, generating hydroelectricity, and preserving biological diversity.Moreover, weather changes also induce different changes in water waves, allowing the water wave detection feature to be implemented into the weather detection tool.Gas leakage in underwater pipelines can also be detected via the changes in water wave patterns because gas fountains will be created on the water's surface due to the high pressure of gas leakage [2].Furthermore, underwater information can be analyzed and obtained using water surface waves [3].
A wider application and longer durability can be achieved by developing water wave monitoring devices that do not require a static platform and direct contact with water.Contactless sensing techniques that apply visual and light methods require a static platform and a specific distance from the water surface to perform the detection actions [4].Cameras and light reflection water wave detection usually must be fixed in a static position, and pre-calibration must be done for accurate measurement [5]- [8].Besides, the weather condition is also a major constraint for the light reflection detection method [9].Water wave detection methods such as the Kinect sensing method [10] and CCD camera sensing method [11] require the liquid to be dyed or other particles into the liquid to lower the water transparency so that the change in water surface waves can be captured.Another contactless sensing method, which is radar detection, such as [9], [12], [13], also requires static positioning and is vulnerable to constructive and destructive scattering as the detection is based on the backscattering method.However, pressure sensing methods [14] and [15] require exposure to the water.A single unit of pressure sensor can only detect the water level change at a specific point.Multiple pressure sensors need to be installed underwater to detect the direction of water waves [16].The changes in concentration of electrolyte will be affecting those pressure sensors that operate and detect based on the changes in chemical properties [17].The flexibility of static platform methods is low as once the setup of the system is completed, the system needs to be dismantled to change to another monitoring area.Besides, a larger monitoring area requires a higher number of monitoring devices and platforms to achieve full coverage.Static platform detection methods are also challenging when applied to areas in which a static platform is challenging to be created, such as oceans, dams, and lakes.
The non-static monitoring devices can be flexible in changes in the monitoring area.The structure of a buoy is suitable for wave detection because of the flexibility to be located at any point in the surveillance area.However, buoys commonly used nowadays, such as [18]- [20], implement gyroscopes and accelerometers for detection operations.The buoys with huge size and mass cause the deployment to be challenging and require special equipment [21].Furthermore, the fouling effect is also a significant problem buoy faces [22].Buoys that use three-axis accelerometers and gyroscopes for detection also have lower accuracy as these sensors are easily affected by inconsistency of the starting point and positions of accelerometers, gyroscope drift, lateral sensitivity, and lever-arm effect [18].Triboelectric nanogenerators (TENGs) can also perform detection on water waves by detecting the current changes due to friction [23], [24].However, the small current generated by TENGs requires high accuracy and precision devices to perform the measurement.
Most water wave detection methods cannot obtain the direction of water waves referred to as North.Monocular camera water wave detection in [25] can detect wave propagation lines of the water, but there is no reference to the North.The North referencing is important to provide an actual direction whenever the detection system is attached to a dynamic platform, where the orientation of the sensor will be facing a different direction from time to time.Capacitive sensors detect based on the fringing field [26], [27], which allows the water level sensing action to be carried out without any direct contact with water [28].
This project aims to propose a solution for water surface wave detection with contactless close monitoring features using capacitive sensors.In this project, a prototype buoy is developed, and the functionalities are experimented in an inflatable pool.The four cardinal positions can be detected by the buoy developed without being directly in contact with the water with capacitive sensors do not involve any moveable parts, which is advantageous compared to the pressure sensing methods.The structure of pressure sensors consists of moveable parts that will be worn and torn after a certain period of usage.The PCA calculations will be carried out based on the water wave patterns captured by the capacitive sensors system.The results will then be compared with the absolute North direction to identify the actual water wave direction.The results that refer to the North are more informative than wave detection using monocular vision because monocular vision can only calculate the propagation line of the water waves without knowing the actual direction referring to the North.This research aims to develop a continuous capacitive sensor system for water wave detection and develop a surface water wave direction detection algorithm.

A. Hardware Structure
The cross-sectional shapes with edges are inappropriate for the outer structure of buoys because these shapes contain a flat surface that allows the water waves to be reflected to the source of the wave generated.Construction and destruction of water waves will reduce the accuracy of the wave patterns captured.Besides, forces from water waves can be easily exerted onto the buoy with a flat surface, which will cause the buoy to be pushed towards the shore.The cylindrical buoy is selected because the cross-section of the buoy is an edgeless circle.The edgeless shape allows the water waves to propagate through the buoy without creating strong reflections and exerting much force on the buoy.The material used for the outer structure must also be an insulator, as capacitive sensors cannot operate whenever attached to a conductive material due to the short circuit between the electrodes.
A cylindrical buoy is designed with a height of 80 cm and a diameter of 15.24cm.The height of 80cm is separated into three portions, which are the components region (20cm), sensing region (30cm), and weight region (30cm).A UPVC pipe with 6 6-inch diameter, also known as 15.24cm diameter, is used for developing the buoy because it can provide an internal space of 14593cm³, sufficient to include all the components and circuitry of the system.Besides, UPVC pipe is selected instead of PVC because the wall thickness of UPVC is thinner than PVC, which decreases the gap between the capacitive sensor and the water to allow higher sensitivity for water level detection.Weights are also located at the bottom of the buoy to ensure that the buoy can sink in the water partially.Waterbased polymer is also applied to the outer surface of the buoy to increase its hydrophobicity [29].Fig. 1 shows the external structure of the buoy for this project.
The hardware for the detection system includes a Raspberry Pi 4B to function as the embedded server, an Arduino Uno microcontroller to function as the core of the data acquisition system, a TCA9548A multiplexer, 4 FDC1004 Capacitance-to-digital converters (CDCs) and 16 capacitive sensors.

B. Multi-Tier Architecture System
Multi-Tier architecture, also known as the n-tier architecture, is commonly used in software development [30].Three-tier architecture, which consists of data management, application, and client tier, is widely used.In this project, a multi-tier system is introduced, which consists of a data tier, logic tier, and presentation tier.The block diagram for the multi-tier system implemented in this project is shown in Fig. 3.

Fig. 3 Block diagram for multi-tier system
The data tier functions to perform data collection from all the sensors.The logic tier performs arithmetic calculations to process the raw data to the desired output, while the presentation tier functions to visualize and display the processed data.When the prototype buoy is powered, the buoy will be deployed into the water in the environment under surveillance.The calibration setup for the capacitive sensors is also included in the system to reduce the offset for all the capacitive sensors.From Fig. 3 above, whenever the capacitive sensor detects changes in capacitance due to the changes in water wave height, the capacitance changes measured will be converted to digital input by FDC1004 converters.The data are then captured and stored in an array in the data acquisition system by sequentially obtaining the data from all the FDC1004 converters implemented through a multiplexer.Besides, the direction of the North will be detected and stored in the array.All data collected from the capacitive sensors and the direction of the North measured from the compass sensor are converted into a single string and then sent to the embedded system through serial communication.
The embedded system then converts the received data into float values.The capacitance sensor data are then used to calculate the centroid value.The sliding window technique is used to store 100 data of centroids in a buffer for calculating water wave direction using Principal Component Analysis (PCA).The selection of PCA algorithm is based on the advantages of lower time consumption [31].The PCAdetected water wave direction is displayed in the polar graph once the buffer collects 100 centroid values.The difference angle between the compass North direction and PCA detected wave direction is also calculated for analysis.A webpage shown in Fig. 4 is developed to visualize the processed data through two graphs, which are cartesian and polar graphs.The measurement from each capacitive sensor is used as radians for each 22.5° in the polar graph.The centroid value, capacitive sensor values, compass data, and water wave direction are plotted on both graphs.A CSV file is used to act as a data storage for all the data, which will be used as references for future analysis.The average water wave direction and compass direction for the data obtained from Table 1 are 173.82°and 136.65°, respectively.The average clockwise angle from the water wave direction to the compass is 322.83°, which has an error value of 7.83° when compared to the expected clockwise angle from the water wave direction to the compass, which is 315°.Four positions are tested, and the results in Table 2 and 3 show that all the directions can be detected.The error is calculated by taking the average clockwise angle from the wave direction to the compass and then subtracting it from the expected clockwise angle from the wave direction to the compass, which is 315°.Table 4 shows the measurements of errors from the experiment carried out.The mean square errors for the wave direction detection are 38.42°.The mean absolute error is 5.85°.Several possible sources of error contributed to the inaccuracy of water wave detection.The first possible source is that the human-generated water waves are inconsistent and irregular because there are different amplitudes and frequencies for each wave generated.Another possible source of error is that noise water waves are reflected from the wall of the inflatable pool to the buoy, which affects the generated wave due to wave constructions and destructions.
The results obtained and shown in Table 2 indicate that four directions can be detected using a capacitive sensor system with PCA calculations without being directly in contact with the water, which is advantageous compared to the pressure sensing methods [15], [16].The water wave direction detection implemented using a capacitive sensor system is not required to keep a distance away from water, which is much more flexible than the light and visual detection methods proposed [4], [10].The wave direction detected using a capacitive sensors system with PCA calculations is more informative than wave detection using monocular vision proposed in [25] because monocular vision can only calculate a line where the water waves are propagating without knowing the actual direction referring to the North.

IV. CONCLUSION
Water wave detection is commonly used in oceanography, early warning systems in remote areas, and weather detection.This project aims to develop a real-time capacitive sensor system for water wave pattern acquisition and a surface water wave direction detection algorithm.Previous works on contactless water wave detection methods show lower flexibility in the field of applications.On the other hand, most non-contactless methods have lower durability as corrosion caused by the water will occur on the sensors after a certain period of usage.Besides, most previous works studied do not have the water wave direction detection with the North referencing feature.
This project requires Hardware and software designs to develop a prototype capacitive sensor system for floating devices.The development of hardware consists of outer structure and internal structure.The outer structure is an enclosed container to isolate the internal structure from the water.The internal structure consists of the electronic circuit of the system.Three parts are involved in software development: development of a data acquisition system, embedded server, and visualization webpage.
Four positions are tested in the inflatable pool, showing that the prototype buoy can detect all the positions.However, the results obtained still contain errors mainly contributed by the randomness of water waves, noises from the construction and destruction of water waves, self-rotation of the buoy, and uneven weight distribution.
The prototype buoy with a capacitive sensor system developed in this project can detect water wave directions with North referencing without any direct contact between the sensor and water.A static platform is not required for the buoy to operate.The prototype developed is much more advantageous than the previous works included because the previous works studied do not contain a contactless sensing method that can operate without the need for a static platform and, simultaneously, provide water wave direction that refers to the North.The area of the proposed solution can also be implemented further in the detection of water activities such as drowning and underwater gas pipeline leakage detection.However, detection algorithms must be proposed and analyzed to achieve accurate activity detection.

Fig. 1
Fig. 1 External structure Fig. 2 shows the internal system of the buoy.CDCs are introduced in the prototype to convert the capacitance changes into digital signals, which are more stable to transmit within the system.

Fig. 4
Fig. 4 Webpage for the water wave pattern visualization

TABLE I WAVEFORM
CHANGES FOR WAVES GENERATED FROM POSITION 1 Fig. 5 Top view of capacitive sensors structure