# Clock Synchronization Algorithm for Structural Modal Measurement

Authors: Junliang Hu; Kai Li; Chaoxian Yan; Huawei Guo; Nannan Cui; Shiping Huang; Xiaoyan Ding
Journal: Advances in Civil Engineering
 (2022)

---

## Abstract

The modal of a structure is the natural vibration characteristic of the structure, which is very important for damage identification of the system. To accurately measure the structural modal, it is necessary to perform clock synchronization operations on the vibration sensors at each measuring point of the structure. This paper uses an improved TSPN algorithm for clock synchronization. It is assumed that the delay of the data in the transmission process obeys normal distribution. The fitting degree of a normal distribution is tested by fitting the delay distribution curve. Then, an interval estimation method is used to estimate the delay. The synchronization of multiple sensors and onsite structural modal testing verifies the correctness of the process after synchronization. The method in this paper is suitable for MCU-based vibration sensors to perform clock synchronization for structural modal measurements.


---

## Body

## 1. Introduction

A modal corresponds to the natural frequency of a structure [1], and the system will show different vibration characteristics under the excitation of an external force at different frequencies. Clock synchronization is a critical issue [2]. Structural modals are usually obtained through conventional experimental modal analysis and testing methods. Vibration measurement points are arranged at different structure positions to obtain vibration information [3]. To ensure that each measuring point collects data simultaneously, it is necessary to synchronize the clock of each measuring point sensor device [4]. If the clocks are not synchronized, the vibration data collected by the terminal will have clock errors. For structural modal measurements, millisecond-level clock errors will cause deviations in structure modal acquisition [5].To date, satellite navigation timing technology is the primary time synchronization scheme used in the new generation of wireless node instrument systems [6]. Due to the influence of machine error and too few tracking satellites [7], it is challenging to guarantee short-term accuracy and stability. In 2002, J. Elson and K. Romer [8] first proposed the concept of time synchronization in wireless sensor networks. Then, Elson designed a reference broadcast synchronization (RBS) algorithm. It is a receiver-receiver time synchronization algorithm for exchanging local time information for synchronizing a group of wireless sensors within the transmission range of a reference sensor node. MengYuan Chen et al. [9] proposed an improved RBS algorithm. Based on the RBS algorithm, the algorithm adopts broadcast grouping and the least-squares linear regression method to realize the time synchronization of the whole network. Yong-Heng et al. [10] proposed an energy-efficient wireless sensor network reference broadcast time synchronization algorithm. Noh et al. [11] offered a receiver-only synchronization (ROS) algorithm, which presupposes a Gaussian distribution of random network delays to estimate clock skew. Gang Xiong et al. [12] studied the asymptotic expectation and mean square synchronization error of the SO-DCTS algorithm when a Gaussian delay occurs between network nodes. Panigrahi N et al. [13] improved network lifetime and reduced network latency by applying various techniques, especially node-balanced sets. Ganeriwal et al. [14] proposed a pairwise timing-sync protocol for sensor networks (TPSN). It is a simple method based on traditional send-receive time synchronization that synchronizes the entire network by exchanging timing messages along each branch (edge) of the hierarchical tree. Shi-Kyu Bae et al. [15] proposed a polling-based TPSN scheme that not only shortens the synchronization time of the whole network of TPSN but also reduces the conflicting traffic that leads to unnecessary power consumption. But it considers that the transmission delay is constant. Maroti et al. [16] proposed the flooding time synchronization protocol (FTSP), a sender-receiver time synchronization algorithm that cleverly eliminates network delays. Liang Qingjian et al. [17] proposed an improved FTSP time synchronization to eliminate the interference algorithm of outliers. Hai-ping Huang et al. [18] calculated the relative time drift and phase offset of nodes using a linear programming method based on the collection and selection principle of multitime data point tuples and finally achieved time synchronization in the process of building a data aggregation tree. Yun Peng Zhang et al. [19] improved the routing integrated time synchronization (RITS) protocol by averaging multiple sets of data received by the target node and constructing a best-fit straight line with numerous receiving pairs. Feng Mei Liang et al. [20] proposed an improved time synchronization algorithm for wireless sensor networks based on cross-layer optimization. The stability of crystal oscillation and the linearity of crystal deviation at the physical layer are considered. Maes et al. [21] quantified the error between the modal mode shape identified after the acquisition error and the actual situation by systematically collecting the MP value between the structural displacement (out of synchronization) and the structural strain modal shape. Du Yong-wen et al. [22] combined the one-way broadcast and two-way pairing mechanisms and proposed a hierarchical wireless sensor network time synchronization algorithm. Dragos et al. [23] achieved acquisition data synchronization by imposing an expected relationship between the phase angles of the Fourier spectra of the acceleration response dataset at peaks corresponding to vibration modes.Based on the research above, this paper proposes an improved clock synchronization algorithm based on a TSPN, which is suitable for measuring the actual engineering structural modal using a sensor based on the MCU (microcontroller unit). This method assumes the random delay as Gaussian normal distribution. The fitting degree of the normal distribution of the delay is checked by combining the delay distribution curve, and then the local clock deviation between each sensor device and the terminal is estimated to perform time synchronization on the sensor devices at each measuring point. Finally, the method proposed in this paper is verified by onsite structural modal tests.


## 2. Wireless Sensor Clock Synchronization Algorithm

### 2.1. Wireless Sensor Time Synchronization Principle

In a structural modal measurement system, the terminal and vibration sensor devices are nodes, and each node is in the same network. Due to the different clock sources that each node obtains time information from, the starting timing point between nodes is different, and there is a time offset between the time the vibration sensor data of each node is sent and the time the terminal receives the data. This time offset consists of each node’s local clock skew (St) and the nonfixed transmission delay Δt.The local clock skew (St) is the deviation of the starting point of the travel time caused by the different starting timing of each node. St is an essential parameter of clock synchronization. Without considering the influence of the vibration error of the internal quartz crystal of the clock, each node has its own time after adding St to the local time. Therefore, each node will be at the same starting time point, which can achieve the purpose of primary clock synchronization.The nonfixed transmission delayΔt is the information transmission delay. When each node synchronizes the clock, it needs to obtain the timestamp information of other nodes. There will be a delay in the transmission of the timestamp between nodes. This delay is Δt.A wireless sensor network time synchronization scheme aims to provide a standard timestamp for the local clocks of the nodes in the network.


### 2.2. TSPN Clock Synchronization Algorithm

A sensor time synchronization protocol TPSN is a two-way time synchronization algorithm based on a sender and receiver, providing time synchronization between nodes in the whole network. A TSPN assumes that each sensor node in the network has a unique ID. The wireless communication link between nodes is bidirectional, which can realize the time synchronization of nodes via a bidirectional message exchange.The algorithm has two stages: grading and synchronization. The root node is set in the grading stage, the corresponding level of the root node is level 0, and the corresponding level is set for each node by using the root node. In the synchronization phase, thei-level node is synchronized with the (i−1)-level node, the (i−1)-level node with the (i−2)-level node, and the (i−2)-level node with the (i−3)-level node. Nodes are synchronized from bottom to top, and finally, all nodes are synchronized with the root node to achieve the time synchronization of the entire network.Figure1 shows the time synchronization process between adjacent level nodes exchanging two messages. Assume that, within a short period for single message exchange, there is no deviation in the internal quartz crystal vibration of the two node clocks and the transmission delay Δt is also constant in both directions. Node S belongs to the i-level node, and node R belongs to the (i−1)-level node. Node S sends a synchronization request to node R at time T1. The synchronization request includes the level of node S and timestamp T1. Node R receives the synchronization request at time T2 and then sends a response at time T3 to node S. The reply signal includes T2 and T3 time information. Node S receives the reply at time T4. Times T1 and T4 are recorded by node S with timestamps, and T2 and T3 are recorded by node R with timestamps.Figure 1
Time synchronization of adjacent level nodes.St is the local clock skew of the two nodes; then,(1)T2=T1+St+Δt,T4=T3−St+Δt.You can obtain(2)St=T2−T1−T4−T32,Δt=T2−T1+T4−T32.After nodeS calculates the time local clock skew St, it can synchronize it to node R.In the delay component of network information transmission, access time is often the most uncertain factor in the delay of wireless transmission of messages. To improve the event synchronization accuracy between two nodes, the TPSN protocol adds a label to the synchronization message when the MAC layer message starts to be sent to the wireless channel, which eliminates the time synchronization error caused by the access time.


### 2.3. Improved TSPN Clock Synchronization Algorithm

The improved TSPN algorithm is based on the TSPN synchronization phase synchronization method. It considers the transmission delay in the two directions of the TSPN algorithm to be variable and considers that the transmission delay obeys a Gaussian normal distribution. The method is suitable for MCU-based vibration MEMS (micro-electro-mechanical system) sensors for clock synchronization of structural modal measurements [24].Figure2 shows the timestamp information exchange between the vibration sensor and the terminal global clock device. The vibration sensor sends the value of timestamp T1 to the terminal. The terminal receives the data at time T2. At the same time, it obtains the data, sends an instruction to the vibration sensor at time T3, and records timestamp T3. Finally, the vibration sensor receives the instruction at time T4. It records the value of timestamp T4 (to record the value of timestamp T4, timestamp T4 needs to be sent to the terminal, as shown in Figure 2, and the vibration sensor sends timestamp T4 to the terminal at time T5 after receiving the terminal information). Such a model of exchanging timestamp information in one round is completed. At this time, four timestamps are recorded in one synchronization process between the vibration sensor and the terminal.Figure 2
A timestamp exchange between a sensor and the terminal.Assuming that the transmission delay from the sensor to the terminal isΔt1 and the transmission delay from the terminal to the sensor is Δt2, then(3)T2=T1+St+Δt1,T4=T3−St+Δt2.Δt1+Δt2 for a round trip can be obtained as(4)Δt1+Δt2=T2−T1+T4−T3.DelaysΔt1 and Δt2 obey a Gaussian normal distribution because the primary source of random noise in the hardware circuit is thermal noise, which has Gaussian distribution characteristics, and the random jitter of crystal vibration is independent of each other at each time point, and according to the central limit law, many independent and uncorrelated noise sources are superimposed and approach a Gaussian distribution [25].According to Gaussian normal distribution and statistical principles [26], when Δt1 and Δt2 obey a Gaussian normal distribution, Δt1+Δt2 and Δt1+Δt2/2 both obey a normal distribution. If Δt1∼Nμ1,σ12 and Δt2∼Nμ1,σ22, then Δt1+Δt2∼Nμ1+μ2,σ12+σ22 and Δt1+Δt2/2∼Nμ1+μ2/2,σ12+σ22/4∼Nμ1+μ2/2,σ12+σ22/4.On the premise of taking a sufficiently large sample of the transmission delay, aftern rounds of timestamp information exchange, the transmission delay Δt between a vibration sensor and the terminal can be estimated by the sample mean Δt12¯=Δt1+Δt2¯/2:(5)Δt12¯=12n∑i=1nΔt1i+Δt2i.The transmission delayΔt12¯ sample variance S2 is(6)S2=∑i=1nΔt1i+Δt2i/2−Δt2n−1.Δt1 and Δt2 are independent of each other, and another calculation method for the obtained sample variance S2Δt12¯ is(7)S2=S2Δt1+S2Δt24,=∑i=1nΔt1i−Δt1¯2+∑i=1nΔt2i−Δt2¯24n−1.Δt is estimated, and the clock deviation St of the sensor and the device is further obtained by(8)St=Ti−Ti−1−Δti=1,2,…,n.In engineering structural modal measurement, when the acquisition frequency is 250 Hz and the real-time clock deviation of a vibration sensor does not exceed± 2 ms, the data collected by the vibration sensor can be guaranteed at one point in time. When the vibration sensor and terminal exchange timestamp information, the terminal reads its own time and bounces an instruction to the vibration sensor while receiving the timestamp information of the vibration sensor. The time when the terminal readout corresponds to T2 in Figure 2 and when a command is bounced to the vibration sensor corresponds to T3 in Figure 2. It can be seen that the time difference between T3 and T2 is only the time required for terminal time operation. If the central frequency of a terminal CPU is 2.0 GHz, the oscillation period is 0.5 ns. It takes 12 oscillation periods to read an instruction in the memory, so the terminal reading time only takes tens of nanoseconds, which is the nanosecond level. Therefore, T3 can be equivalent to T2. Similarly, corresponding to the vibration sensor, the time difference between T5 and T4 is the time taken by the vibration sensor to read its clock. If the vibration frequency of the vibration sensor's CPU crystal oscillator is 32 MHz, the time required to read its clock is only a few microseconds, so T5 can be equated to T4.After ignoring the time when the terminal and the vibration sensor execute their reading time, then round-trip timestamp information interaction between the vibration sensor and the terminal is shown in Figure 3.Figure 3
Actual sensor and terminal timestamp exchange.From Figure3, the transmission time of one round trip can be obtained by only using the two adjacent time differences of the vibration sensor or the terminal. The transmission delay Δt1+Δt2 is(9)Δt1i+Δt2i=T2i−T2i−2i=1,2,…,n.In (9), Δt1i and Δt2i represent the delay of the i-th timestamp interaction.


## 2.1. Wireless Sensor Time Synchronization Principle

In a structural modal measurement system, the terminal and vibration sensor devices are nodes, and each node is in the same network. Due to the different clock sources that each node obtains time information from, the starting timing point between nodes is different, and there is a time offset between the time the vibration sensor data of each node is sent and the time the terminal receives the data. This time offset consists of each node’s local clock skew (St) and the nonfixed transmission delay Δt.The local clock skew (St) is the deviation of the starting point of the travel time caused by the different starting timing of each node. St is an essential parameter of clock synchronization. Without considering the influence of the vibration error of the internal quartz crystal of the clock, each node has its own time after adding St to the local time. Therefore, each node will be at the same starting time point, which can achieve the purpose of primary clock synchronization.The nonfixed transmission delayΔt is the information transmission delay. When each node synchronizes the clock, it needs to obtain the timestamp information of other nodes. There will be a delay in the transmission of the timestamp between nodes. This delay is Δt.A wireless sensor network time synchronization scheme aims to provide a standard timestamp for the local clocks of the nodes in the network.


## 2.2. TSPN Clock Synchronization Algorithm

A sensor time synchronization protocol TPSN is a two-way time synchronization algorithm based on a sender and receiver, providing time synchronization between nodes in the whole network. A TSPN assumes that each sensor node in the network has a unique ID. The wireless communication link between nodes is bidirectional, which can realize the time synchronization of nodes via a bidirectional message exchange.The algorithm has two stages: grading and synchronization. The root node is set in the grading stage, the corresponding level of the root node is level 0, and the corresponding level is set for each node by using the root node. In the synchronization phase, thei-level node is synchronized with the (i−1)-level node, the (i−1)-level node with the (i−2)-level node, and the (i−2)-level node with the (i−3)-level node. Nodes are synchronized from bottom to top, and finally, all nodes are synchronized with the root node to achieve the time synchronization of the entire network.Figure1 shows the time synchronization process between adjacent level nodes exchanging two messages. Assume that, within a short period for single message exchange, there is no deviation in the internal quartz crystal vibration of the two node clocks and the transmission delay Δt is also constant in both directions. Node S belongs to the i-level node, and node R belongs to the (i−1)-level node. Node S sends a synchronization request to node R at time T1. The synchronization request includes the level of node S and timestamp T1. Node R receives the synchronization request at time T2 and then sends a response at time T3 to node S. The reply signal includes T2 and T3 time information. Node S receives the reply at time T4. Times T1 and T4 are recorded by node S with timestamps, and T2 and T3 are recorded by node R with timestamps.Figure 1
Time synchronization of adjacent level nodes.St is the local clock skew of the two nodes; then,(1)T2=T1+St+Δt,T4=T3−St+Δt.You can obtain(2)St=T2−T1−T4−T32,Δt=T2−T1+T4−T32.After nodeS calculates the time local clock skew St, it can synchronize it to node R.In the delay component of network information transmission, access time is often the most uncertain factor in the delay of wireless transmission of messages. To improve the event synchronization accuracy between two nodes, the TPSN protocol adds a label to the synchronization message when the MAC layer message starts to be sent to the wireless channel, which eliminates the time synchronization error caused by the access time.


## 2.3. Improved TSPN Clock Synchronization Algorithm

The improved TSPN algorithm is based on the TSPN synchronization phase synchronization method. It considers the transmission delay in the two directions of the TSPN algorithm to be variable and considers that the transmission delay obeys a Gaussian normal distribution. The method is suitable for MCU-based vibration MEMS (micro-electro-mechanical system) sensors for clock synchronization of structural modal measurements [24].Figure2 shows the timestamp information exchange between the vibration sensor and the terminal global clock device. The vibration sensor sends the value of timestamp T1 to the terminal. The terminal receives the data at time T2. At the same time, it obtains the data, sends an instruction to the vibration sensor at time T3, and records timestamp T3. Finally, the vibration sensor receives the instruction at time T4. It records the value of timestamp T4 (to record the value of timestamp T4, timestamp T4 needs to be sent to the terminal, as shown in Figure 2, and the vibration sensor sends timestamp T4 to the terminal at time T5 after receiving the terminal information). Such a model of exchanging timestamp information in one round is completed. At this time, four timestamps are recorded in one synchronization process between the vibration sensor and the terminal.Figure 2
A timestamp exchange between a sensor and the terminal.Assuming that the transmission delay from the sensor to the terminal isΔt1 and the transmission delay from the terminal to the sensor is Δt2, then(3)T2=T1+St+Δt1,T4=T3−St+Δt2.Δt1+Δt2 for a round trip can be obtained as(4)Δt1+Δt2=T2−T1+T4−T3.DelaysΔt1 and Δt2 obey a Gaussian normal distribution because the primary source of random noise in the hardware circuit is thermal noise, which has Gaussian distribution characteristics, and the random jitter of crystal vibration is independent of each other at each time point, and according to the central limit law, many independent and uncorrelated noise sources are superimposed and approach a Gaussian distribution [25].According to Gaussian normal distribution and statistical principles [26], when Δt1 and Δt2 obey a Gaussian normal distribution, Δt1+Δt2 and Δt1+Δt2/2 both obey a normal distribution. If Δt1∼Nμ1,σ12 and Δt2∼Nμ1,σ22, then Δt1+Δt2∼Nμ1+μ2,σ12+σ22 and Δt1+Δt2/2∼Nμ1+μ2/2,σ12+σ22/4∼Nμ1+μ2/2,σ12+σ22/4.On the premise of taking a sufficiently large sample of the transmission delay, aftern rounds of timestamp information exchange, the transmission delay Δt between a vibration sensor and the terminal can be estimated by the sample mean Δt12¯=Δt1+Δt2¯/2:(5)Δt12¯=12n∑i=1nΔt1i+Δt2i.The transmission delayΔt12¯ sample variance S2 is(6)S2=∑i=1nΔt1i+Δt2i/2−Δt2n−1.Δt1 and Δt2 are independent of each other, and another calculation method for the obtained sample variance S2Δt12¯ is(7)S2=S2Δt1+S2Δt24,=∑i=1nΔt1i−Δt1¯2+∑i=1nΔt2i−Δt2¯24n−1.Δt is estimated, and the clock deviation St of the sensor and the device is further obtained by(8)St=Ti−Ti−1−Δti=1,2,…,n.In engineering structural modal measurement, when the acquisition frequency is 250 Hz and the real-time clock deviation of a vibration sensor does not exceed± 2 ms, the data collected by the vibration sensor can be guaranteed at one point in time. When the vibration sensor and terminal exchange timestamp information, the terminal reads its own time and bounces an instruction to the vibration sensor while receiving the timestamp information of the vibration sensor. The time when the terminal readout corresponds to T2 in Figure 2 and when a command is bounced to the vibration sensor corresponds to T3 in Figure 2. It can be seen that the time difference between T3 and T2 is only the time required for terminal time operation. If the central frequency of a terminal CPU is 2.0 GHz, the oscillation period is 0.5 ns. It takes 12 oscillation periods to read an instruction in the memory, so the terminal reading time only takes tens of nanoseconds, which is the nanosecond level. Therefore, T3 can be equivalent to T2. Similarly, corresponding to the vibration sensor, the time difference between T5 and T4 is the time taken by the vibration sensor to read its clock. If the vibration frequency of the vibration sensor's CPU crystal oscillator is 32 MHz, the time required to read its clock is only a few microseconds, so T5 can be equated to T4.After ignoring the time when the terminal and the vibration sensor execute their reading time, then round-trip timestamp information interaction between the vibration sensor and the terminal is shown in Figure 3.Figure 3
Actual sensor and terminal timestamp exchange.From Figure3, the transmission time of one round trip can be obtained by only using the two adjacent time differences of the vibration sensor or the terminal. The transmission delay Δt1+Δt2 is(9)Δt1i+Δt2i=T2i−T2i−2i=1,2,…,n.In (9), Δt1i and Δt2i represent the delay of the i-th timestamp interaction.


## 3. Clock Synchronization Experiment

### 3.1. Random Delay Distribution Fitting Verification

The author's self-developed vibration sensor is used in the clock synchronization experiment. The sensor MCU integrates a real-time clock, and its central clock vibration frequency is 32 MHz. The terminal is an HP EliteDesk 880 G5 TWR, and the internal PC processor is an Intel(R) Core(TM) i7-9700 CPU @ 3.00 GHz.This experiment collects four sets of data, approximately 10,000 data transmissions for the first and second times and approximately 20,000 data transmissions for the third and fourth times to verify that the round-trip transmission delayΔt1+Δt2 distribution obeys a normal distribution and fits a normal distribution curve using MATLAB to fit the normal distribution curve. The results of the four sets of randomly selected data are shown in Figure 4 and 5.Figure 4
Distribution of 10,000 random data delays. (a) The first set. (b) The second set.
(a)(b)Figure 5
Distribution of 20,000 random data delays. (a) The third set. (b) The fourth set.
(a)(b)Figures4 and 5 show that the round-trip transmission delay Δt1+Δt2 distributions of the four sets of data are fitted by MATLAB and fit normal distribution very well.Through formulas (5) and (6), the sample mean Δt12¯ and sample standard deviation (S) of the transmission delay of the four sets of data are further obtained, as shown in Figures 6 and 7, respectively.Figure 6
Distribution of the random delay sample meanΔt12¯.Figure 7
Distribution of the random delay sample standard deviation (S).As seen from the above figures, the sample meanΔt12¯ and standard deviation (S) are very stable, and the random delay data are highly stable and obey the same normal distribution.The sample meanΔt12¯ and standard deviation (S) of the delay distribution in the above four sets of experiments are shown in Table 1.Table 1
Random transmission delay sample meanΔt12¯ and sample standard deviation (S).
Transmission delay setΔt12¯ (ms)S (ms)Set 15.24360.4130Set 25.25300.4268Set 35.22650.4241Set 45.22900.4211


### 3.2. Random Delay Credibility Validation

It can be seen from the above normal fitting that the transmission delayΔt conforms to a normal distribution, and when a sample is used to replace the population, that is, Δt∼NΔt12¯,S2, the probability that the transmission delay is in a specific interval range can be calculated from four sets of experimental data as shown in Table 2.Table 2
Distribution probability of random delay (Δt).
SetDistribution probability ofΔt (ms)3.2<Δt<7.24.2<Δt<6.24.7<Δt<5.7Δt12¯−S<Δt<Δt12¯+SΔt12¯−2S<Δt<Δt12¯+2SSet 10.99990.98340.77130.68260.9544Set 20.99990.98010.75540.68260.9544Set 30.99990.98120.76060.68260.9544Set 40.99990.98220.76360.68260.9544When the above four sets of samples are used to replace the population, when4.2<Δt<6.2, that is, the interval probability that the mean distance Δt12¯ is ±1 ms which is approximately 0.98, the requirements of the actual engineering structural modal measurement of 500 Hz are met.


### 3.3. Random Delay Value

Section3.2 verified that the random delay sample has a high degree of convergence near the sample mean, which meets the requirements of the clock synchronization error for modal measurement of an actual engineering structure.According to the principle of a normal distribution, when the random variables are inX∼Nμ,σ2, X1,X2…,Xn are the samples of population X and X¯ and S2 are the sample mean and sample variance, respectively; then,(10)T=X¯−uS/n∼tn−1.In formula (10), tn−1 is the t distribution with n−1 degrees of freedom, and tn−1 is a standard normal distribution N0,1 when n⟶∞.In the above transmission delay experiment, the sample value is large enough, and ifμz is the population mean, the random delay value is(11)Δt−μzS/n∼N0,1ℤ.Furthermore, the confidence interval of the population meanμ is obtained using an interval estimation method. Interval estimation is a strict interval estimation theory created by statistician Neiman in 1934. According to the samples drawn and the requirements of certain correctness and precision, an appropriate interval is constructed as an estimate of the range of the actual value of the unknown parameter of a population distribution or a function of the parameter. For example, it is often said that a particular value is guaranteed to be within a specific range by a certain percentage, which is the most straightforward application of interval estimation.LetFx,θ be the distribution function of population X, θ is the unknown parameter to be determined, and X1,X2,…,Xn are the samples of the population X. For a given parameter 1−α⋅0<α<1, if there is a statistic, θ2=θ2X1,X2,...,Xn,(12)Pθ<θ1=Pθ>θ2,=α2.Therefore,Pθ1<θ<θ2=1−α, θ1,θ2 is called the two-sided confidence interval of 1−α of θ, 1−α is called the confidence degree, and θ1 and θ2 are the lower line and upper limit of the two-sided confidence interval of θ, respectively.The confidence interval of each confidence level for the population meanμz of the four sets of data is as follows.Table3 shows that when the confidence levels of μz are guaranteed to be 0.95, 0.98, and 0.99 for each set of data, the value range of μz is within the scope of a gap of 0.6 ms, and the total capacity is 5.21∼5.27 ms.Table 3
The population meanμz takes the two-sided confidence interval of each confidence level.
Interval confidence set0.950.980.99Set 1(5.2355, 5.2517)(5.2339, 5.2532)(5.2330, 5.2542)Set 2(5.2446, 5.2613)(5.2431, 5.2629)(5.2420, 5.2639)Set 3(5.2206, 5.2324)(5.2195, 5.2335)(5.2187, 5.2342)Set 4(5.2232, 5.2348)(5.2221, 5.2359)(5.2213, 5.2367)μz is obtained when the highest confidence of 0.99 is used. The overlapping part of each sample (excluding the second set) ranges from 5.2330 ms to 5.2342 ms, and the mean value of 5.2336 ms is taken as the overall mean μz, that is, the delay Δt between the vibration sensor and the terminal is measured at this time.


## 3.1. Random Delay Distribution Fitting Verification

The author's self-developed vibration sensor is used in the clock synchronization experiment. The sensor MCU integrates a real-time clock, and its central clock vibration frequency is 32 MHz. The terminal is an HP EliteDesk 880 G5 TWR, and the internal PC processor is an Intel(R) Core(TM) i7-9700 CPU @ 3.00 GHz.This experiment collects four sets of data, approximately 10,000 data transmissions for the first and second times and approximately 20,000 data transmissions for the third and fourth times to verify that the round-trip transmission delayΔt1+Δt2 distribution obeys a normal distribution and fits a normal distribution curve using MATLAB to fit the normal distribution curve. The results of the four sets of randomly selected data are shown in Figure 4 and 5.Figure 4
Distribution of 10,000 random data delays. (a) The first set. (b) The second set.
(a)(b)Figure 5
Distribution of 20,000 random data delays. (a) The third set. (b) The fourth set.
(a)(b)Figures4 and 5 show that the round-trip transmission delay Δt1+Δt2 distributions of the four sets of data are fitted by MATLAB and fit normal distribution very well.Through formulas (5) and (6), the sample mean Δt12¯ and sample standard deviation (S) of the transmission delay of the four sets of data are further obtained, as shown in Figures 6 and 7, respectively.Figure 6
Distribution of the random delay sample meanΔt12¯.Figure 7
Distribution of the random delay sample standard deviation (S).As seen from the above figures, the sample meanΔt12¯ and standard deviation (S) are very stable, and the random delay data are highly stable and obey the same normal distribution.The sample meanΔt12¯ and standard deviation (S) of the delay distribution in the above four sets of experiments are shown in Table 1.Table 1
Random transmission delay sample meanΔt12¯ and sample standard deviation (S).
Transmission delay setΔt12¯ (ms)S (ms)Set 15.24360.4130Set 25.25300.4268Set 35.22650.4241Set 45.22900.4211


## 3.2. Random Delay Credibility Validation

It can be seen from the above normal fitting that the transmission delayΔt conforms to a normal distribution, and when a sample is used to replace the population, that is, Δt∼NΔt12¯,S2, the probability that the transmission delay is in a specific interval range can be calculated from four sets of experimental data as shown in Table 2.Table 2
Distribution probability of random delay (Δt).
SetDistribution probability ofΔt (ms)3.2<Δt<7.24.2<Δt<6.24.7<Δt<5.7Δt12¯−S<Δt<Δt12¯+SΔt12¯−2S<Δt<Δt12¯+2SSet 10.99990.98340.77130.68260.9544Set 20.99990.98010.75540.68260.9544Set 30.99990.98120.76060.68260.9544Set 40.99990.98220.76360.68260.9544When the above four sets of samples are used to replace the population, when4.2<Δt<6.2, that is, the interval probability that the mean distance Δt12¯ is ±1 ms which is approximately 0.98, the requirements of the actual engineering structural modal measurement of 500 Hz are met.


## 3.3. Random Delay Value

Section3.2 verified that the random delay sample has a high degree of convergence near the sample mean, which meets the requirements of the clock synchronization error for modal measurement of an actual engineering structure.According to the principle of a normal distribution, when the random variables are inX∼Nμ,σ2, X1,X2…,Xn are the samples of population X and X¯ and S2 are the sample mean and sample variance, respectively; then,(10)T=X¯−uS/n∼tn−1.In formula (10), tn−1 is the t distribution with n−1 degrees of freedom, and tn−1 is a standard normal distribution N0,1 when n⟶∞.In the above transmission delay experiment, the sample value is large enough, and ifμz is the population mean, the random delay value is(11)Δt−μzS/n∼N0,1ℤ.Furthermore, the confidence interval of the population meanμ is obtained using an interval estimation method. Interval estimation is a strict interval estimation theory created by statistician Neiman in 1934. According to the samples drawn and the requirements of certain correctness and precision, an appropriate interval is constructed as an estimate of the range of the actual value of the unknown parameter of a population distribution or a function of the parameter. For example, it is often said that a particular value is guaranteed to be within a specific range by a certain percentage, which is the most straightforward application of interval estimation.LetFx,θ be the distribution function of population X, θ is the unknown parameter to be determined, and X1,X2,…,Xn are the samples of the population X. For a given parameter 1−α⋅0<α<1, if there is a statistic, θ2=θ2X1,X2,...,Xn,(12)Pθ<θ1=Pθ>θ2,=α2.Therefore,Pθ1<θ<θ2=1−α, θ1,θ2 is called the two-sided confidence interval of 1−α of θ, 1−α is called the confidence degree, and θ1 and θ2 are the lower line and upper limit of the two-sided confidence interval of θ, respectively.The confidence interval of each confidence level for the population meanμz of the four sets of data is as follows.Table3 shows that when the confidence levels of μz are guaranteed to be 0.95, 0.98, and 0.99 for each set of data, the value range of μz is within the scope of a gap of 0.6 ms, and the total capacity is 5.21∼5.27 ms.Table 3
The population meanμz takes the two-sided confidence interval of each confidence level.
Interval confidence set0.950.980.99Set 1(5.2355, 5.2517)(5.2339, 5.2532)(5.2330, 5.2542)Set 2(5.2446, 5.2613)(5.2431, 5.2629)(5.2420, 5.2639)Set 3(5.2206, 5.2324)(5.2195, 5.2335)(5.2187, 5.2342)Set 4(5.2232, 5.2348)(5.2221, 5.2359)(5.2213, 5.2367)μz is obtained when the highest confidence of 0.99 is used. The overlapping part of each sample (excluding the second set) ranges from 5.2330 ms to 5.2342 ms, and the mean value of 5.2336 ms is taken as the overall mean μz, that is, the delay Δt between the vibration sensor and the terminal is measured at this time.


## 4. Clock Synchronization Experimental Verification

### 4.1. Clock Synchronization Verification

Δt between the vibration sensor and the terminal is obtained using Gaussian normal distribution statistical theory to obtain St from formula (8), and this St is added to the local sensor clock to synchronize with the terminal global time.To further verify the correctness of the method, the clock of another vibration sensor is synchronized with the terminal according to the above process, and its timestamp is sent to the terminal device every 10 ms after synchronization is completed to verify whether the real-time clocks of the two sensors are consistent.Table4 shows the real-time clock times of the two sensors after clock synchronization.From Table4, the transmission delay is approximately 5 ms. After the clock is synchronized, the real-time clocks of the two sensors are consistent, and clock synchronization has been completed accurately.Table 4
Sensor real-time clock times.
Sensor 1Sensor 2Terminal reception time17 : 24 : 01.87217 : 24 : 01.87217 : 24 : 01.87817 : 24 : 01.88217 : 24 : 01.88217 : 24 : 01.88717 : 24 : 01.89217 : 24 : 01.89217 : 24 : 01.89717 : 24 : 01.90217 : 24 : 01.90217 : 24 : 01.90717 : 24 : 01.91217 : 24 : 01.91217 : 24 : 01.91717 : 24 : 01.92217 : 24 : 01.92217 : 24 : 01.92717 : 24 : 01.93217 : 24 : 01.93217 : 24 : 01.937


### 4.2. Onsite Modal Measurement Experiment

The onsite modal measurement structure is a 60 m aerial corridor in the Guangzhou Financial City. The corridor structure is a simply supported truss beam structure. The modal measurement points are arranged as shown in Figures8 and 9.Figure 8
60 m aerial corridor structure vibration test point layout (front view).Figure 9
60 m aerial corridor structure vibration test point layout (top view).Vibration sensors are arranged at each measuring point after clock synchronization is completed. Using the resonance method [27], the corridor is continuously excited using a fundamental frequency load, and the data of measurement point 2 (the right 1/4 span of the corridor), measurement point 3 (the middle side of the span), and measurement point 4 (the left 1/4 span of the corridor) are obtained. The displacements of the right 1/4 span at 50 ms, 100 ms, 150 ms, 200 ms, 250 ms, and 300 ms are as follows (Table 5).Table 5
Displacement of measuring points at each time.
Time (ms)Displacement of each position (mm)1/4 span (left)Midspan1/4 span (right)40−0.4189−0.6184−0.401280−0.6322−0.9742−0.6787120−0.0316−0.0511−0.02971600.39190.56390.38162000.66340.92810.67112400.48120.67340.4796The fitting diagram of the displacement of the measuring points at each time is shown in Figure10).Figure 10
Real-time displacement curve of the corridor.In Figure10, It can be seen from the displacement data of each measuring point that, in the case of fundamental frequency excitation, the first-order modal of the corridor structure conforms to a sine function, and no time synchronization occurs, indicating that the clock synchronization is successful.


## 4.1. Clock Synchronization Verification

Δt between the vibration sensor and the terminal is obtained using Gaussian normal distribution statistical theory to obtain St from formula (8), and this St is added to the local sensor clock to synchronize with the terminal global time.To further verify the correctness of the method, the clock of another vibration sensor is synchronized with the terminal according to the above process, and its timestamp is sent to the terminal device every 10 ms after synchronization is completed to verify whether the real-time clocks of the two sensors are consistent.Table4 shows the real-time clock times of the two sensors after clock synchronization.From Table4, the transmission delay is approximately 5 ms. After the clock is synchronized, the real-time clocks of the two sensors are consistent, and clock synchronization has been completed accurately.Table 4
Sensor real-time clock times.
Sensor 1Sensor 2Terminal reception time17 : 24 : 01.87217 : 24 : 01.87217 : 24 : 01.87817 : 24 : 01.88217 : 24 : 01.88217 : 24 : 01.88717 : 24 : 01.89217 : 24 : 01.89217 : 24 : 01.89717 : 24 : 01.90217 : 24 : 01.90217 : 24 : 01.90717 : 24 : 01.91217 : 24 : 01.91217 : 24 : 01.91717 : 24 : 01.92217 : 24 : 01.92217 : 24 : 01.92717 : 24 : 01.93217 : 24 : 01.93217 : 24 : 01.937


## 4.2. Onsite Modal Measurement Experiment

The onsite modal measurement structure is a 60 m aerial corridor in the Guangzhou Financial City. The corridor structure is a simply supported truss beam structure. The modal measurement points are arranged as shown in Figures8 and 9.Figure 8
60 m aerial corridor structure vibration test point layout (front view).Figure 9
60 m aerial corridor structure vibration test point layout (top view).Vibration sensors are arranged at each measuring point after clock synchronization is completed. Using the resonance method [27], the corridor is continuously excited using a fundamental frequency load, and the data of measurement point 2 (the right 1/4 span of the corridor), measurement point 3 (the middle side of the span), and measurement point 4 (the left 1/4 span of the corridor) are obtained. The displacements of the right 1/4 span at 50 ms, 100 ms, 150 ms, 200 ms, 250 ms, and 300 ms are as follows (Table 5).Table 5
Displacement of measuring points at each time.
Time (ms)Displacement of each position (mm)1/4 span (left)Midspan1/4 span (right)40−0.4189−0.6184−0.401280−0.6322−0.9742−0.6787120−0.0316−0.0511−0.02971600.39190.56390.38162000.66340.92810.67112400.48120.67340.4796The fitting diagram of the displacement of the measuring points at each time is shown in Figure10).Figure 10
Real-time displacement curve of the corridor.In Figure10, It can be seen from the displacement data of each measuring point that, in the case of fundamental frequency excitation, the first-order modal of the corridor structure conforms to a sine function, and no time synchronization occurs, indicating that the clock synchronization is successful.


## 5. Conclusions

The clock synchronization algorithm for structural modal measurement proposed in this paper improves the TSPN algorithm. It is assumed that the random delay of the data in the transmission process obeys Gaussian normal distribution, and the correctness of the random delay following a Gaussian normal distribution is verified experimentally.(1)
Various hierarchical classifications of delay in the transmission process are simplified. The entire transmission delayΔt is considered as a whole, and it is statistically verified that Δt obeys normal distribution.(2)
Based on the structural modal measurement, data receiving timeT2 and data sending time T3 in the TSPN transmission process are reduced to one time, simplifying the delay calculation method.(3)
When considering the error range of random delayΔt, this method can be combined with statistical knowledge to probabilistically verify the degree of convergence of the random uncertainty to its mean.(4)
When selecting the value of the random delayΔt, the interval estimation of the random delay Δt can be carried out according to the method in this paper to meet the confidence level of the modal measurement requirements. The most accurate statistical value of Δt can be obtained.(5)
In the modal measurement of an actual engineering structure, the method of this paper is combined with a vibration sensor based on MCU, the programming is simple and convenient, and it is suitable for user development.(6)
To verify the correctness of the clock synchronization algorithm, the feasibility of modal measurement using the clock synchronization algorithm for an actual engineering structure is demonstrated through an example analysis.



---

*Source: 7864160-2022-04-22.xml*