Active Thermometry Based DS18B20 Temperature Sensor Network for Offshore Pipeline Scour Monitoring Using K-Means Clustering Algorithm

This work presents an offshore pipeline scour monitoring sensor network system based on active thermometry. The system consists of thermal cables, data acquisition unit, and data processing unit. As the thermal cables emit heats, the distributed DS18B20 digital temperature sensors record temperature information over time. The scour-induced exposure and free spanning can be identified by analyzing the temperature curves. Pipeline exposure and free-spanning experiments were carried out in laboratory, whose results show that the system is able to give overall information about the development of pipeline scour. Difference values analysis reveals the changing patterns of heat transfer behavior for line heat source in sediment and water scenarios. Two features, magnitude and temporal instability, are extracted from temperature curves to better differentiate sediment and water scenarios. Based on these two features, K-means clustering algorithm is adopted for pattern classification of the system, which was implemented in MATLAB and facilitated the automatic detection of the scour monitoring sensor network system. The proposed sensor network has the advantages of low cost, high precision and construction flexiblility, providing a promising approach for offshore pipeline scour monitoring, especially suitable for nearshore environment.


Introduction
Oil and gas provide more than 60% of the world's primary fuel and most of this oil and gas is transported in pipelines. Pipeline transportation has lots of advantages such as low price, resource saving, energy efficieny and stable supply. With the growing global demand for energy, pipeline transportation has been widely applied in offshore environment and plays an important role in the development of oil and gas industry. Offshore pipelines operate in a physically and technically demanding environment. In all cases, a pipeline must cross the surf zone before getting into deeper water. In most cases, pipelines are in the areas of intense dynamic action caused by waves during storms, appreciable movement of sediment, onshore currents, and littoral currents [1]. Also, some pipelines must share waters with some of the busiest ports and most productive fisheries, were subject to impacts of anchors, nets, trawl boards, and hulls of cargo, fishing, and mobile drilling rigs [2]. In such nearshore waters, the best protection for pipeline is burial of pipelines.
Buried pipelines, however, become exposed when currents and storms introduce scour around pipelines. With the development of pipeline scour, some sections of pipelines become unsupported, leading to the span of pipelines. Both pipeline exposures and pipeline spans pose a great threat to the integrity of pipelines, environment, and even human lives. According to National Research Council's statistical analysis, vessel grounding or damage by dropping anchors, nets, and trawl boards produced the vast majority of pollution, which accounted for more than 95 percent of the pipelinerelated pollution on the OCS (outer continental shelf) [2]. In 1987, the Sea Chief accident killed two crew members due to vessel struck and ruptured an operating pipeline without adequate cover of sediments. October 1989 saw a strikingly 2 International Journal of Distributed Sensor Networks similar accident, with even greater consequences. The vessel Northumberland struck a gas pipeline in shallow water near Sabine Pass, Texas; the resulting fire killed 11 crew members. Initially with 10 feet of cover, the pipeline was found to be lying on the bottom without cover at all. Apart from human interferences, pipeline scour may give rise to pipeline fatigue and structural failure due to high stress from exceeding freespanning length and vortex-induced vibration (VIV) [3]. Therefore, pipeline in shallow water and those near the shore must be inspected regularly to ensure that they do not lose cover and become exposed or even free spanned.
In recent years, structural health monitoring (SHM) has gained worldwide acceptance, which serves as an economical way to obtain real-time data on the health and, subsequently, the safety and serviceability of infrastructure systems. Aiming to achieve real-time health monitoring of offshore pipelines, substantial methods have been proposed to monitor or detect scour state of offshore pipelines during past years. Jin et al. introduced a basic strategy of real-time monitoring system for long distance submarine pipelines [4]. Distributed optical fiber sensors were deployed in the system to monitor the strain along the pipeline. The system has the function of autoalarm and detection of accurate damage position by using random decrement technique and discrete fourier transform method based signal processing system. Feng et al. proposed a novel methodology to identify the structural condition with the help of vibration responses of the free spanning submarine pipelines, which are capable of identifying free span as well as online monitoring of the submarine pipelines [5]. Yan et al. outlined a damage indicator based on mode shape curvature to localize free-spanning damage of submarine pipeline systems. With considering the real subsea environment, numerical simulations showed that the approach is simple and effective [6]. Bao et al. developed an integrated autoregressive moving average (ARMA) model algorithm for the SHM of offshore pipelines [7]. Most of the previous researches have been mainly focused on indirectly measuring free spans vibration. These vibration-based free span detection methods have their inherent limitations. When the VIV is small, they will not be applicable. What is more, when it comes to field application, they are inevitably confronted with construction difficulties. During the pipelines construction, the pipes are welded together on a ship and then placed into seabed. It is quite difficult to install distributed sensors along the pipes.
Active thermometry, which works on the principle of the transient line source method, is found to be quite effective in measuring thermal properties of materials, namely, thermal conductivity, thermal resistivity, specific heat, and soil water content. Bristow demonstrated the ability of thermal probe to measure thermal properties as well as water content of unsaturated sandy soil [8]. Coté et al. designed a water leakage monitoring system of a dam based on the heat pulse method using distributed optical fiber temperature sensors [9]. Local analysis of the heat transfer showed that the system can detect, locate, and roughly quantify the seepage flow. Sayde et al. demonstrated that the feasibility of the heat pulse method was implemented with Raman fiber optical temperature sensors to obtain accurate distributed measurement of soil water content [10]. For pipelines that buried in the seabed, when scour exposes some sections to water, it will be surrounded by different ambient medium at different locations. On account of the different heat transfer behaviors between water medium and sediment medium, the proposed scour monitoring sensor network system is able to distinguish ambient environment and detect the scour state along pipelines. The sensor network system is made up of three modules: thermal cables, data acquisition unit (DAU), and data processing unit (DPU). The thermal cables consist of a heating cable, DS18B20 digital temperature sensors, and packaging elements. First, the system uses the heating cable to emit heat along the thermal cable and the distributed sensors record temperatures over time. The DPU then analyzes the temperature information to discern whether the pipelines were exposed to water or remain buried and reports the scour state along pipelines. The armored cable can be placed in the vicinity along the pipes, which prevents many construction problems and makes the system highly applicable.
In our first study [11], the feasibility of this method was well proved by adopting distributed Brillouin optical sensors. In the second study [12], a three-index estimator was proposed to identify ambient medium along pipelines. The latest one [13] is a further study which discussed the development of scour and was based on Brillouin optical sensing technique. In the present study, we further investigate the scour monitoring system based on DS18B20 digital sensing technique, which is designed for nearshore environment. As pipeline scour occurs, the upper surface of pipeline was firstly exposed to water flow, and the pipeline was free-spanned as scour continues. To monitor the overall development of pipeline scour, thermal cables are placed to both upper surface and lower surface of pipeline. The one placed to upper surface is capable of detecting exposure condition of pipeline whereas the lower surface one provides free-spanning information. Both upper surface exposure and free-spanning experiments are conducted under varied scour lengths to test the sensitivity of the sensor network. Also, to pick a preferable thermal cable for the monitoring system from selfregulating and constant power thermal cables, performances of these two kinds of heating belts are compared. In final, we examine the application of K-means clustering algorithm as classifier for the proposed system with the aim of realizing the automatic detection of pipeline scour.

Theoretical Background
Typically, there are two patterns for heat transfer in solids and in liquids, namely, conduction and convection. For sections buried in sediment, heat transfer is by way of conduction. The thermal cable approximates a line source of heat input of per unit length, of constant magnitude, in an infinite, homogeneous, and isotropic medium maintained initially at uniform temperature. Temperature at any point in the medium depends on the duration of heating and the sediment thermal conductivity. According to "transient heat method" [14], during heating period, for large value of ( ≫ 2 /(4 )), International Journal of Distributed Sensor Networks 3 the excess temperature Δ as a function of time at a radial distance from the line source is given by [14] Δ = 4 (ln + ln where Δ = − 0 ; 0 is the initial temperature; is the Euler's constant ( = 0.5772); is the heat input per unit length of the line source during heating; is the thermal diffusivity of the solid ( = / ); , , and are the thermal conductivity, the density, and the specific heat of the solid, respectively; and is the radial distance from the line source. When the heat source discontinues operating at time 1 , for − 1 ≫ 2 /(4 ), the relation becomes From (1) Δ is linear with logarithm of time with a slope of /4 . The thermal conductivity can be determined from experiment data by plotting Δ against ln for ≤ 1 and also by plotting ( /4 )(ln 4 / 2 ) − Δ against ln ( − 1 ) for > 1 . For sections exposed to water, heat transfer is by means of convection; in this study, the thermal resistance of the thermal cable can be neglected due to the small cross section of the thermal cable. The lumped parameter method [15] is adopted by assuming the inner temperature is uniform within any given cross section of the thermal cable. The problem is simplified to where ℎ is the convective heat transfer coefficient; and are the density and the specific heat; and and are the convective area and volume per unit length of the sensor, respectively. For ≤ 1 , the solution is [15] where the time constant = /ℎ . For > 1 , the solution becomes [15] It should also be noted that the excess temperature ln Δ is linear with time and the time constant can be determined.

Setup of Scour Monitoring Sensor Network
System. The scour monitoring sensor network system was made up of several thermal cables, data acquisition unit (DAU), and data processing unit (DPU), as shown in Figure 1. The thermal Offshore pipeline DAU DPU DS18B20 Thermal cable DS18B20 Heating cable   1  2  3  14  15  16   21  22  23  34  35  36 Heat-shrinkable tube · · · · · · Figure 1: Schematic diagram of the DS18B20 sensor network for offshore pipeline scour monitoring.
cable was composed of a heating cable, DS18B20 digital temperature sensors, and heat-shrinkable tubes. Two types of thermal cable were designed. The first type was constant power thermal cable with a constant power heating cable equipped inside, and the other was self-regulating thermal cable with a self-regulating heating cable equipped inside. The constant power heating cable was 21 m in length with a crosssection dimension of 9 mm × 6 mm, whose maximum output power was 15 W/m. The power source for the heating cable was supplied by an explosion-proof temperature controller; thus, the heating temperature was controllable, ranging from 0 ∘ C to 120 ∘ C, which was set to 80 ∘ C in the experiment. The self-regulating heating cable was 21 m in length and with a cross section of 2 mm × 10 mm, whose maximum surface temperature was 110 ∘ C. The digital temperature sensors were attached to the heating cable using insulating tape. To make them waterproof, they were carefully capsulated in heatshrinkable tubes. There were three thermal cables in total and were positioned in the following configuration: constant power thermal cables were put on the upper surface and lower surface of the pipeline, and a self-regulating thermal cable was put on the right side of the pipeline as illustrated in Figure 1. For temperature measurement, digital temperature sensor DS18B20 was employed in this study. The DS18B20s (5 mm W × 30 mm L) had a wide operating temperature range of −50 ∘ C to 125 ∘ C and an accuracy of ±0.1 ∘ C. Temperatures were sampled nearly every 10 s. Each thermal cable had sixteen DS18B20s and the spacing for them was one meter. DS18B20s for each thermal were connected one by one and then all the thermal cables were connected to the DAU, which was STA-D Series DS18B20 remote digital temperature acquisition unit developed by Beijing Sailing Technology Company. Such DAU had the function of reading temperature signals from DS18B20s and exporting them to a computer by RS485/USB converters. The connected computer, which acted as DPU, stored and analyzed the real-time temperature signals. The DAU had ten channels and the maximum number of DS18B20 sensors for each channel was sixteen. In this study, three channels were used. Each DS18B20 sensor was labeled as follows: those placed under the lower surface of pipeline were labeled from 1 to 16, those put on the upper surface were labeled from 21 to 36 and 41 to 56 were marked for the right thermal cable, as shown in Figure 1. Such arrangements facilitated identification of exposure or span locations and their lengths.
To serve as references, Number 16 and Number 36, sensors were intentionally placed in the water flow while others were buried in the sediment initially.

Scour Monitoring System
Experiments. Experiments were conducted in the laboratory of hydraulic engineering at Dalian University of Technology to examine the proposed scour monitoring system. A 21 m long section was selected from a 48 m long indoor experimental flume (1 m W × 1.5 m H) whose ends were blocked by brick walls. There was a water inlet and a water outlet in each end of the flume. The brick walls were 0.6 m high and could let water flow through. A controllable water cycle was created by a pump so that the experiments were conducted in a running water environment. Three 6 m long steel tubes were welded end-toend to form an 18 m long steel tube. Each tube had a diameter of 100 mm and a thickness of 2.5 mm. Ends and joints of the welded tube were shielded from water. The welded tube was then placed in the middle of the selected flume section with a distance of 20 cm from the bottom, which acted as an offshore pipeline, as shown in Figure 2. The thermal cables were placed parallel to the tube with each end of the cable extending 1.5 m from the end of the tube. Cables were secured to the tube with iron wires. The selected 21 m flume was further divided into three sections by shorter brick walls. The outer two sections were about 7 m long and the middle one was approximately 6 m long. Initially, all of the three sections were filled with sand of 0.5 m high which served as sediment.
To monitor the development of scour state of offshore pipelines, experiments were fallen into two sections. The first section was exposure experiments, the early stage of pipeline scour, as shown in Figure 3. The upper surface of pipeline was exposing to water with consideration of different exposure length, including 2 m, 4 m, and 6 m. The second sections of the experiments, the free-spanning experiments, as shown in Figure 3, were conducted afterwards to simulate scourinduced free span by removing the sediment. Also, free span lengths were varied, namely, 2 m, 4 m, and 6 m, as shown in Figure 3.
Before the experiments, the sediment was fully saturated by continuously pumping water to the flume with a constant level of 0.7 m for 2 hours. And then, experiments were conducted as follows. First, the DAU and DPU were activated for 6 minutes to obtain initial temperature information along pipeline. Second, the heating cables were connected to power supply for 3 hours to generate heat. Lastly, after 3 hours of heating, the heating cables were turned off to allow a cool down and the DAU continued reading temperatures for 2 hours. The measurements were repeated three times. Room temperature was recorded before performing every experiment.

Results from Upper Surface Exposure Experiments.
As the upper surface of the pipeline was exposed to water, exposure conditions were detected by the thermal cable placed on the upper surface. Figure 4 shows the temperature profiles for each sensor in an exposure experiment, with exposed length of 2 m. As can be seen from the figure, sensors placed on the upper surface of pipeline (Number 21 to Number 36) show two different profiles while others show the same changing behavior except for No. 16 and No. 36 because they were intentionally placed in the water flow. In this case, No. 25 and No. 26 sensors were found to be exposed to water because of their temperature curves took the form of reference sensors (No. 16   section of pipeline is over several hundred meters, this detection error is insignificant. Also, we can increase the accuracy in system design by reducing the spacing between DS18B20 sensors. Figure 5 shows the temperature curves in 4 m and 6 m exposure experiments; No. 25 to No. 28 sensors and No. 24 to No. 29 sensors were exposed to water, respectively. Their spacing plus 1 m resolution is the detected length. Therefore, 4 m and 6 m are the detected exposure lengths, which agree with experimental setup. Temperature curves for the DS18B20 sensors fall into two groups due to the different heat transfer behavior in sediment and water scenarios. As the heating started temperatures in both sediment and water scenarios rose quickly and took different increasing forms after some time, as described by (1) and (4). Temperatures continued growing in a falling rate in sediment whilst those in water scenario reached a plateau and remain stable throughout heating stage. During cooling stage, temperatures in water scenario dropped exponentially, reaching to ambient temperature and experiencing little change, as described by (5). Those in sediment scenario, however, decreased in a decaying rate, as expressed by (2). The different heat transfer behavior between sediment and water scenarios contributed to discriminate whether the pipeline was buried in sediment or exposed to water.
To further investigate the differences in temperature curves between sediment and water scenarios, difference values were calculated for every interval of 2,000 s for the temperature curves of sensors from 21 to 36 in 6 m upper surface exposure experiment, as shown in Figure 6. The calculations were performed for both heating and cooling stage. As expected, difference values for Number 21 to Number 36 sensors were separated into two groups due to the different changing pattern in temperature curves. Those in red color were sediment group and those in blue were water group. Difference value for Number 24 to Number 29 and Number 36 sensors dropped to zero and remain unchanged in the heating stage; others declined quickly at first but still above zero though decreased slowly. The cooling stage was the reverse version of heating stage. The difference values worked similar to derivative, revealing the changing patterns of temperature curves for line heat source in sediment and water scenarios.
Based on the different characteristics between in-water and in-sediment scenarios discussed above, two features were extracted for analysis, namely, the magnitude and the temporal instability. Temperatures in sediment were higher than those in water in both heating and cooling stages. The first feature, magnitude, was quantified by calculating the average excess temperature for each sensor, as expressed by where denotes magnitude and is the sampling number. Temperatures in sediment continued rising though in a decreasing rate throughout the heating stage while those in water were stabilized most of the time. Thus, the second feature, temporal instability, was obtained by calculating the variance for each sensor, as described by.
where TI denotes temporal instability.
To avoid the impact of dramatically changing temperature, these two features were calculated for the interval from = 2,000 s to = 10,000 s. Also, to eliminate the effect of uneven initial temperatures, excess temperatures Δ were calculated for the two features analysis. Figure 7 shows two features for Number 21 to Number 36 sensors in the 6 m exposure experiment. In general, magnitudes in water were lower than that in sediment. With regard to temporal instability, however, an obvious difference could be found between the water and sediment scenarios. Temporal instabilities for water scenario were comparatively small in comparison to those in sediment scenario, indicating that temperatures were constant with time in water. In light of these two features, identification of water and sediment scenarios should be much easier.

Results from Free-Spanning Experiments.
Once the free span problem occurred, the scour state can be directly monitored by all the thermal cables because sections of them were exposed to water flow. Figure 8 shows the temperature profiles for each sensor in a free-spanning experiment, with free-spanning length of 2 m. As can be seen, all three thermal cables detected the free span length of the pipeline; each had two sensors exposed to water. Adopting the same method mentioned earlier, the detected length was 2 m, in agreement with experimental setup.  In free-spanning experiments, Number 21 to Number 36 sensors worked the same as the exposure experiments. We therefore pay more attention to the discussion of results acquired from other two thermal cables. Figure 9 shows the temperature curves in 4 m and 6 m free-spanning experiments for sensors from 1 to 16; Number 5 to Number 8 sensors and Number 4 to Number 9 sensors were detected to be emerged into water flow, respectively. Subsequently, the detected free span lengths were obtained, 4 m and 6 m, respectively. Compared with thermal cable settled on the upper surface of the pipeline (whose sensors were labeled from 21 to 36), the one settled on the lower surface (whose sensors were labeled from 1 to 16) was able to clearly distinguish sediment and water scenarios because its temperature curves were more concentrated for each scenario and more separate between sediment and water. Temperature curves of upper cable are distributed along vertical axis, as depicted in Figure 5  those for lower cable are centralized for each case and some of them even overlapped, as illustrated in Figure 9. Primary reason for such differences is the formation of air gaps within the thermal cable. Spatial unevenness of sediment properties can also contribute to such issues.
Difference values of Number 1 to Number 16 sensors were also calculated for the 6 m free-spanning experiment, as shown in Figure 10. They were fall into two groups owing to their different heat transfer behavior in sediment and water surroundings. Number 4 to Number 9 and Number 16 sensors matched the characteristics of water scenario and the rest matched sediment scenario.
By adopting the same analyzing method mentioned above, two features, magnitude and temporal instability, were computed for the 6 m free-spanning experiment, as shown in Figure 11. A gap over 10 ∘ C in magnitude can be found between sediment and water scenarios. As mentioned earlier, temporal instabilities of water scenario were relatively small. In this case, two features were more concentrated for each scenario while more divided between sediment and water. These can make sediment and water scenarios more distinguishable.
Thermal cable settled on the upper surface was able to detect the exposure length of pipeline, but incapable of identifying the free-spanning state. Thermal cable settled on the lower surface can monitor free spanning of pipeline but incapable of providing information about exposure, the precursor of pipeline free spanning. Combination of both can provide overall information about the development of pipeline scour.

Differences between Constant Power and Self-Regulating
Thermal Cables. Two different types of heating cable were used in these experiments, namely, constant temperature heating cable and constant power heating cable, and both can serve the same purpose. They have different heating mechanism due to their different design principle. Constant power heating cable has the same power output per lineal meter, throughout its entire length. This heating cable is generally not affected by the changing ambient temperatures, thus providing a constant heat output. Self-regulating heating cable, however, can automatically vary its heat output with changing surrounding temperatures, increasing power as temperatures fall and decreasing it as temperatures rise. Figure 12 shows the temperature curves from selfregulating cable in 6 m free-spanning experiment. Compared with results from constant power cables, those of selfregulating rose more dramatically the moment power was connected. In addition, temperature curves were more fluctuant in water scenario.
As expressed by (1), Δ is linear with logarithm of time with a slope of /4 in sediment ambient during heating stage. Data of Number 1 and Number 41 sensors in heating stage was selected to perform linear curve fitting by using Least Square Method, with Number 1 representing the constant power group and Number 41 representing the selfregulating group. As can be seen from Figure 13, Number 1 sensor was of good linear performance, with an 2 of 0.9972. However, Number 41 had slightly worse linear performance, with an 2 of 0.9533. The deviation mainly came from the beginning of heating. The initial temperatures of heating cables were close to room temperature before heating. As the power connected, the self-regulating heating cable would increase its heat output since it was in cold ambient conditions, resulting in drastic rise of temperatures. As the ambient got warmer, the self-regulating cable would decrease its heat output. The constant power heating cable was of constant heat output during heating stage, thus having a good agreement with theoretical study where heat input is constant magnitude. Assuming that thermal conductivity was constant in slope /4 , qualitative analysis showed that constant power cable had steady power input in heating stage since it had constant slope in logarithm of time fitted curve. Self-regulating cable had bigger slope at the beginning of heating, requiring large power input. Then it slowly descended and finally stabilized with a lower power input.
Besides, the self-regulating heating cable was powered by a direct alternating current. The active operating time and maximum length of the belt were limited. However, since power was supplied by explosion-proof temperature controller, the constant power heating cable can work continuously with low energy consumption. The constant power heating cable is preferred in field application for its low energy consumption and steady performance.

Pattern Classification Based on K-Means Clustering
Algorithm. Cluster analysis is a typical unsupervised learning method for grouping similar data points according to some measure of similarity. The aim of this method is to make the data more similar within a group and more diverse among groups [16]. The clustering techniques have been widely applied in a variety of scientific areas such as pattern recognition, medicine, and image processing. One of the most widely used clustering methods is the K-means (or hard -means) algorithm which confines each point of the data set to exactly one cluster. K-means was proposed by MacQueen in 1967 [17]. Its basic idea is that the clustering number is fixed, firstly creating an initial partition randomly, then using iteration method to improve the partition by moving the clustering center continually until the best partition is obtained.
The K-means clustering algorithm is relied on finding data groups in a data set by trying to minimize the objective function of dissimilarity measure. In most cases, the Euclidean distance is chosen as the dissimilarity measure [18]. A set of vectors x ( = 1, . . . , ) are to be classified into groups ( = 1, . . . , ) fixed a priori. The objective function, based on the Euclidean distance between a vector x in group and the corresponding cluster center c , is defined as follows: where J = ∑ ,x ∈ ‖x − c ‖ 2 is the objective function within group .
The classified groups are defined by a × binary membership matrix U, where the element is 1 if the th data point x belongs to group , and 0 otherwise. Once the cluster centers c are fixed, the minimizing for (8) can be derived as follows: which means that x belongs to group if c is the closest center among all centers.
On the other hand, if the membership matrix is fixed, that is, if is fixed, then the optimal center c that minimizes (8) is the mean of all vectors in group : where | | is the size of , or | | = ∑ =1 . The algorithm is presented with a data set x ( = 1, . . . , ); it then determines the cluster centers c and the membership matrix U iteratively using the following steps.
Step 1. Initialize the cluster center c ( = 1, . . . , ). This is typically done by randomly selecting points from all of the data points.
Step 2. Determine the membership matrix U by (9).
Step 3. Compute the objective function according to (8).
Stop if either it is below a certain tolerance value or its improvement over previous iteration is below a certain threshold.
Step 4. Update the cluster centers according to (10). Go to Step 2.
The K-means clustering algorithm was selected as the pattern classification method for the active thermometrybased offshore pipeline scour monitoring sensor network system. The two features mentioned earlier, namely, magnitude and temporal instability, were extracted to implement Kmeans clustering analysis. There are exactly two groups in this case, in-sediment group and in-water group, respectively; therefore was set to 2. The algorithm was tested in MATLAB. Figure 14 shows the clustering results in 6 m exposure and 6 m free-spanning experiments. Sensors were partitioned into two groups for each case, in-sediment group and inwater group, respectively. The in-sediment group had larger center while the in-water group had smaller one. In 6 m exposure experiment, sensors 24-29 and 36 were classified into inwater group and the rest were in-sediment group. In 6 m freespanning experiment, sensors 4-9 and 16 were partitioned into in-water group while others were in-sediment group. These clustering results were in agreement with experimental setup. The overall performance of sensors 1-16 was better than that of sensors 21-36, which were more similar within a group and more diverse between groups.
K-means algorithm is simple yet efficient in this case. This is a simple test though. In practice, there are several hundred or even up to several thousand sampling points. Sampling points that have close distance to each group center should be treated with special attention. By employing K-means clustering algorithm, the automatic detection of offshore pipeline scour condition is easy to implement.

Conclusions
Based on the different heat transfer behavior of a line heat source in sediment and water scenarios, an offshore pipeline scour monitor sensor network system is proposed in this paper. The temperature reading is based on DS18B20 digital temperature sensing technique. Results from pipeline upper surface exposure experiments show that the sensor network is able to monitoring pipeline exposure, the precursor of free spanning, by providing discernable temperature profiles of both sediment and water scenarios. In free-spanning experiments, the sensor network is capable of detecting freespanned pipelines. These two series experiments confirm that the sensor network is able to monitor the development of pipeline sour. The monitoring system is quite sensitive to pipeline scour, as experiments are conducted under the varied exposure or free-spanning lengths. In field application, the constant power thermal cable is preferable over the self-regulating one by providing advantages of low energy consumption and steady heating performance. In this system, K-means clustering algorithm is employed as the classifier to realize automatic detection of offshore pipeline scour condition. In this case, the classifier classifies data points into two groups without any misclassified data points. The algorithm is simple yet efficient and highly precise.
The proposed sensor network has shown considerable advantages over traditional pipeline scour monitoring method such as low cost, high precision, and flexible construction. It provides a promising approach for offshore pipeline scour monitoring, which is especially suitable for nearshore environment.