{'fraction_non_alphanumeric': 0.029115719786529756, 'fraction_numerical': 0.010605958251705735, 'mean_word_length': 4.567506581421587, 'pattern_counts': {'":': 0, '<': 1, '<?xml version=': 0, '>': 2, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Resolving velocity ambiguity of two coded pulse in broad-band acoustic Doppler current profiler

Broad-band Acoustic Doppler Current Profiler (BBADCP) adopts short-sequence coded pulse to measure high velocity. Short-sequence coded pulse has large measurable velocity, so it is not easy to have velocity ambiguity. But short coded pulse deteriorates the accuracy of the velocity. To obtain more accurate velocity, we adopt two coded pulse with a time lag. This paper analyzes the ambiguity velocity and velocity standard deviation of two coded pulse and single coded pulse, and gives a solution to resolve velocity ambiguity: single coded pulse which has a large ambiguity velocity due to the short time lag is used to establish a coarse estimate of the velocity, two coded pulsewhich has a long time lag is used to have a high accuracy velocity, then we combine the two velocities in a way to provide an accurate velocity. It has been demonstrated that the two coded pulse can reduce variance of velocity through analyzing numerous experimental data of pool. Meanwhile, the efficiency of method to solve ambiguity has been proved in accordance with multiple sets of data. Compared with the traditional methods, this method has good anti-noise performance and high single measurement accuracy.


Introduction
Acoustic Doppler Current Profiler is currently the most important velocity measuring devicein the world. It is widely used in marine and river engineering. The ADCPs can be divided into three types: incoherent, pulse-to-pulse coherent, and broad-band ADCP. Broad-band ADCP transmits repeat-sequence coded signals [1][2][3][4], which have a large time bandwidth product that satisfies the requirements of high resolution, high accuracy, and large measurement velocity. After transmitting, it receives echoes formed by the scattering of the scatters. Due to the Doppler shift caused by the relative motion between the transducer and the scatters, the velocity can be estimated by detecting the phase change of the correlated pulse-pairs. The commonly used estimation method is complex autocorrelation method [5,6]. It estimates the phase change according to the autocorrelation property of the echoes. For the phase change is limited to [-π,π], it will have velocity ambiguity at high velocity. The length of the subsequence of the repeat-sequence coded signal affects the velocity ambiguity and measurement accuracy [7,8], which makes a contradiction between the measurable velocity and velocity accuracy.
People have been paying attention to solvingvelocity ambiguityfor many years. The simplest and most straightforward ambiguity resolution scheme used a short-lag long-lag approach [9]: the short-lag pulse-pair is used to establish a coarse estimate of the velocity, the short-lag pulse-pair provides more precise phase shift information. In 2008, A. E. Hay and L. Zedelproposed a method to extend the velocity ambiguity by transmitting multi-frequency signals, which was possible to extend the maximum measurable velocity, and analyzed the performance of the method [10,11]. In 2014, P. Liu and N. Kouguchi proposed a combined methodof incoherent and coherent Doppler sonar to avoid velocity ambiguity [12]. The incoherent method can completely eliminate the velocity ambiguity, but it is necessary to perform multiple measurements and average to obtain satisfactory measurement results.
To this end, this paper proposes a combination method to provide accurate and precise velocity of two coded pulsewith atime lag. Compared with the traditional method, this method has good anti-noise performance and high single measurement accuracy. It can obtain good velocity result without multiple measurements.

Repeat-sequence coded signal
BBADCP adopts repeat-sequence codedpulse. The subsequence is selected to have a small autocorrelation when the lag time is not zero. Commonly used codes are Barker codes and M-sequence codes. They have been shown to have small autocorrelation values when the codes are not completely aligned. Fig.1 shows the autocorrelation function of the 7-bit and 31-bit M-sequence codes, respectively. The number of repetition is 2. The M-sequence codes have small and stable correlations when the measurement lag is not a subsequence multiple. When the subsequence is determined, increasing the number of sequence repetitions can increase the signal-to-noise ratioand the autocorrelation propertyof the echo. Fig.2 shows the autocorrelation function of the 31-bit M-sequence with repetitions of 2 and 6, respectively. The theoretical autocorrelation value of the repetition of 2 is 0.50, and the repetition of 6 is 0.83. However, increasing the repetitions leads to correlation peaks at the multiples of the subsequence, which reduces the statistical independence of the individual echo samples, and provides some undesired correlation of self-noise. Different subsequence length has different effect on the system measurement variance. When the length of subsequenceis shorter, the phase variance is smaller due to the shorter time lag of the sample pair. But phase noise will have a larger influence on the final velocity measurement, so the larger the subsequence length, the higher the velocity accuracy. However, longer subsequence decreases the measurement range. It's easy to have velocity ambiguity. To avoid velocity ambiguity, BBADCP typically adopts short-sequence coded pulse at high velocity, but its measurement accuracy is not good enough. In order to meet the requirements of large measurable velocity and high velocity accuracy, we propose two coded pulse, as shown in Fig.3. This coded signal consists of two identical repeat-sequence coded pulse with a time lag in between. By performing different process on the signals, an ideal velocity result can be obtained.

Pulse-pair method and velocity ambiguity
The pulse-pair method estimates the Doppler shift by comparing the phase of the echo. The change in phase is proportional to the velocity. The code bit of a repeat-sequence encoded pulse is given by where a(t) represents the code bit of the baseband coded signal, f 0 is the carrier frequency. The repeat-sequence coded pulse can be expressed as where Lis the number of code bits in a subsequence, M ' represents the repetitions of the subsequence, and T is the length of bit. The two coded pulseof a time lag can be written as where ∆T is the time interval between two coded pulse. The received echo signal is superimposed by a large number of scattered signals. Assuming that the relativevelocity between the transducer and the scatters is v, and the scattered signals are independent of each other. For v≪c, the Doppler shift of the echo can be expressed as ≈ 2 0 / , where c is the sound speed in seawater. The received echo can be expressed as where b i is the amplitude of the ith scattered signal and τ i represents time delay. The influence of external noise is not considered here. The echo signal which is demodulated and filtered can be given as Doppler shift can be estimated by complex autocorrelation method where T L =M ' LT+∆T , R 0 (T L ) is the autocorrelation function of the echo signal with the measurement lag T L . Fig.4 shows the autocorrelation process of the two coded pulse.
When the true velocity exceeds the range[-V m ,V m ], velocity ambiguity occurs.

Measurement deviation analysis
Regardless of the influence of the environmental noise, the main source of the standard deviation is the self-noise of the signal itself. The self-noise is the non-overlapping part of the echo. As shown in Figure 4, the signal of the dotted line frame is not used in estimating the Doppler shift, which is equivalent to noise introduced by the signal. So it is called self-noise. But it does not ultimately have effect on the overlap of the signal.
When the interval between the two coded pulse is very small, it can be regarded as a repeat-sequence coded pulse signal, and the repetition M=2M ' . The received echo is sampled at a sampling interval of T, assuming that the sampling rate is equal to the system bandwidth, so that each sample is independent. At time t 0 , the received echo is The received echo at time t n (t n =t 0 +nτ) can be expressed as Assuming that the scatters in the water are uniformly distributed, the echo strength of different bits is the same, and the samples of the received echo are sufficient. For ideal coded signal, the expected value of the autocorrelation can be expressed as (the time lag is T L ) 0 0 here B≡<|b m |> 2 is the expected intensity of each cell and| | 2 ≡ 1. The main cause of the velocity estimation error is the phase error of the autocorrelation function.
To facilitate the analysis, the Doppler shift is set to 0, that is, the error introduced by the self-noise in the static condition is considered. The phase error term can be represented by the imaginary part of the signal autocorrelation function The phase variance σ φ 2 is the ratio of E 2 ��� to the expected autocorrelation therefore, the velocity standard deviation is where N≤M/2. It can be seen from equation(15) that thetwo coded pulse has increased self-noise due to the increased measurement lag, which increases the phase variance. But the longer lag time eventually reduces the velocity variance.
The interval between the two coded pulse can increase the length of the time lag and does not introduce self-noise, so the final velocity variance can be reduced. But too long a time lag will decrease the echo correlation, increasing the velocity variance. Since the scatters are constantly moving, after a certain time interval, some of the scatters will leave the area ensonified by the acoustic beam, and some of new scatters will enter. The scatters in the ensonified area change more as the interval increases, so the residence time becomes shorter and the correlation of the pulse pairs is decreased. The residence time is proportional to the velocity. When the measure velocity is low, the decorrelation caused by the scatters change is small, and the pulse interval can be appropriately increased to improve the accuracy. However, when higher velocity is measured, a shorter time lag is advisable.

Method
To obtain more precise velocity information and avoid velocity ambiguity, this paper proposes a method to realize ambiguity interval determination of the two coded pulse. The basic method is: the single coded pulse which has a large ambiguity velocity due to the short time lag is used to establish a coarse estimate of the velocity, and the two coded pulse which have a long time lag is used to have a high accuracy velocity, then we combine the two velocities in a way to provide an accurate and precise velocity.
According to equation (7), the ambiguity velocity is inversely proportional to the measurement lag. The single coded pulse has a large measurable velocity range [-V M ,V M ] due to the short time lag, which is the T L1 /T L2 Times of the range of the two coded signal (T L1 /T L2 is an integer). The velocity range of the single coded signal is equally divided into T L1 /T L2 cells, as shown in Fig.5. First, the average velocity (v 1 � )of the single coded pulse signals is estimated by the complex autocorrelation method, the velocity standard deviation σ 1 is calculated, so the true velocity range [v 1 � -3σ 1 ,v 1 � +3σ 1 ] is determined. Second, the more accurate velocity v 2 is obtained by the two coded pulse. Since the velocity of the two coded pulse may be limited to the range[-V M ,V M ], the real velocity should bev 2 +2n×V m , where n is 0, ±1, ±2, ⋯± T L1 /T L2 . And it is in the true velocity range Finally, the integer factor n can be determined by (16), so the accurate and precise velocity is calculated.

Boundary
When v 2 is close to the ambiguity boundary±V M , the true velocity range �v 1 � -3σ 1 ,v 1 � +3σ 1 � is related to two ambiguity intervals, but n is unique. It should be determined by the symbol of v 2 . When

Conditions
In order to prevent the interval misjudgment, the condition must be satisfied: V m >3σ 1 , otherwise the factor n is not unique. This method uses single coded pulse to establish a coarse estimate of the velocity. To ensure a large ambiguity velocity, the measurement lag should be short, so a short-sequence coded signal is advisable.

Experimental results
To verify the feasibility of the algorithm, we carried out the pool test. The pool test site is shown in Fig.6. The depth of water is 1.8 meters. Loading an ADCP onto the driving vehicle, the transducer is heading vertically to the bottom of the water. When the vehicle is driving at a constant speed, the ADCP transmits two coded pulseand receives echo signals. The velocity is estimated by the complex autocorrelation function, and the ambiguity velocity is corrected by the combined method. Among them, the length of the two coded pulse is 1.3584ms, the carrier frequency is 600kHz, the code length is 7, the repetition is 4, the interval between the two coded pulse is 1ms, and the average velocity of the vehicle is about 180.8cm/s. The single beam ambiguity velocity of the two coded pulse calculated by the actual parameters is 145.93cm/s. The actual velocity exceeds the ambiguity velocity. The measurement velocities of the single coded pulse and the two coded pulse are shown in Fig.7.   Fig. 8. Amendment of velocity ambiguity.  The variance of the velocity measured by two coded pulse is significantly smaller than single coded pulse. But the two coded pulse has velocity ambiguity. The method of resolving velocity ambiguity is used to correct the velocity. The result is shown in Fig.8. The accuracy of the algorithm can be verified by observing the velocity results. The correct rate of the velocity is so high that no misjudgments occur. Fig.9 shows the velocity at the boundary of the ambiguity velocity. It can be seen that the correct rate of the algorithm is very high at the ambiguity boundaryfrom Fig.10. The length of the two coded pulsein Fig.9 and Fig.10 is 1.4728ms, the carrier frequency is 600kHz, the code length is 19, the repetition is 2, the interval between the two coded pulse is 0.5ms. The average velocity of the vehicle is about 181cm/s.

Conclusions
To avoid velocity ambiguity, this paper proposes a combination method to obtain accurate and precise velocity. Experiments are carried out to verify the accuracy of the method. Compared with the traditional methods, this method has good anti-noise performance and high single measurement accuracy. It can obtain good velocity results without multiple measurements. It does not change the original signal coded mechanism and system structure, having good applicability. This work is supported by the Chinese Marine Environment and Security Special Project (2017YFC1403404).