Analysis of Blind Frame Recognition and Synchronization Based on Sync Word Periodicity

Blind recognition of communication parameters has been studied for various applications including cognitive radios, non-cooperative communications, electronic warfare, etc. In this article, the identification of frame information, such as frame length and synchronization word (SW), and frame synchronization, is addressed over the wiretap channel, where no prior information of the frame structure is available, but only the existence of a repeated SW is known. Modifying the previous study, we propose two blind frame recognition and synchronization algorithms based on the correlation between two distinct windows of the received signal as well as the mean of periodic samples. The algorithms run in two steps. A multiple of frame length is estimated via the correlation and then other frame parameters are acquired using the mean of periodic samples with the estimate. Asymptotic analysis of the first algorithm shows that the error probability of estimation vanishes as the received data increases both in noiseless and noisy transmissions. The second algorithm improves the performance in the limited received data scenario. Simulation results as well as complexity analysis of the proposed algorithm are also shown.


I. INTRODUCTION
In digital communication systems, data are transmitted in units of frames, and they are recovered at the receiver through proper digital signal processing techniques. Among these techniques, frame synchronization is a process that identifies the time alignment of frames in the received signal stream [1]- [4]. Frame synchronization should be acquired before data recovery at the receiver. A usual assumption pertaining in most of the previous works on frame synchronization is that the receiver has the knowledge of frame information such as the frame length, the synchronization are transmitted in frames, it is necessary to identify the frame structure blindly above all else.
In this article, we deal with the signal intercepted from a communication source. Such a scenario can be modeled by a wiretap channel where a source and a destination are communicated while an eavesdropper tries to listen to ongoing transmission [16]. Various studies have considered the wiretap channel model for the eavesdropping attack scenario [16]- [25]. The secrecy capacity of wiretap channels were analyzed in [16]- [18]. Secrecy enhancement of transmitted signals in multiple antenna systems were developed in [19], [22], where the key idea is to increase the difference between the signal strength for the legitimate receiver and that for the eavesdropper using beamforming techniques. Cooperative jamming for the wireless medium by other helper nodes can increase the security [23]. Secure coding schemes also provide security and can achieve the secrecy capacity [24]. As opposed to the secrecy schemes, the pilot spoofing attack were presented in [25], where an eavesdropper recognizes the training sequence and transmits the estimated one for the purpose of signal leakage to the eavesdropper. In this article, the wiretap channel model is considered where the receiver and the eavesdropper receive the transmitted signal possibly corrupted by Gaussian noise.
Before addressing the blind setting, we review frame synchronization techniques under normal communication environment. Early studies on frame synchronization assumed that a frame consists of a single SW and data of a fixed length, and that the frame structure is known or provided beforehand via a control channel to the receiver [1]- [4]. Barker [1] showed that the optimal metric of frame synchronization over binary symmetric channel is the correlation between the SW and the received signal stream. Massey [2] found that the correlation rule is suboptimal for additive white Gaussian noise (AWGN) channels. He proposed the optimal maximum likelihood (ML) rule for the AWGN channel, which is a modification of the standard correlation rule with a nonlinear correction term that accounts for the presence of random data surrounding the SW. High and low signal-to-noise ratio (SNR) approximation rules were also proposed in [2]. Massey's frame synchronization rules [2] were extensively simulated by Nielsen [3], and it was shown that the high-SNR approximation rule exhibits a similar performance to the optimal rule over a wide range of SNR. It was also shown in [3] that the probability of frame synchronization error is lower-bounded by the probability of the occurrence of the SW pattern in the data region. The ML rule and the lower bound were generalized to M -ary phase-coherent and phasenoncoherent signalings [4].
In addition to the above works on generic frame synchronization, a number of frame synchronization techniques were developed for frames with some special features [26]- [33]. Specifically, frames with variable length were considered in [26]- [28], where sequential hypothesis tests were conducted to determine the presence of the SW pattern in the observation window. Especially, unknown and asymmetric data distributions were assumed in [27] and [28], respectively. Identification and location detection of SW by means of a predefined set of candidate SWs was addressed in [29]. Joint synchronization and channel decoding for the purpose of improving the synchronization performance was studied in [30], [31]. Frame synchronization with no SW but with only the decoding results was proposed in [32], [33].
The above frame synchronization techniques require a presharing of communication parameters such as the frame structure and transmission schemes by using a separate control channel. In contrast, there are various scenarios in which the communication parameters are not known at the receiver, and thus they should be blindly recognized [5]- [8]. For example, in cognitive radio systems, the receiver adapts to a specific transmission context and blindly estimates transmitter parameters for self-reconfiguration purposes [5], [6]. As another example, in adaptive modulation and coding schemes, the transmitter changes its modulation and coding schemes on the fly according to the state of the channel, and this can be conducted without explicit signaling of related parameters [7]. In non-cooperative applications such as electronic warfare, signal interception and processing via wiretap channels are key tasks for tactical operations [8].
Numerous studies have been conducted to blindly recognize communication parameters, where methodologies therein can readily be applied to the eavesdropping attack scenario. Methods for detecting the number of transmit antennas were studied in [34]. For blind modulation recognition, likelihood-based and feature-based modulation classification schemes were proposed in [6], [9], respectively. A comprehensive summary for blind modulation recognition was provided in [35]. On the other hand, the blind estimation of channel coding parameters have been studied for binary linear codes [36], convolutional codes [5], and Reed-Solomon codes [14]. Meanwhile, blind interleaver detection and blind equalization were also investigated in [38] and in [39], respectively.
Regarding frame synchronization, some blind frame recognition methods were devised in [10]- [12] where the unknown parameters of interest there in are only the frame length, SW, and delay. In [10], the blind recognition of frame length and SW pattern was first introduced. A two-step algorithm was proposed, in which the cross-correlation of two windows of the received signal was used to estimate the frame length first, and the SW was estimated from the mean of the received symbols that are sampled with the period of the estimated frame length. However, explicit rules for estimating the frame information and the analysis of the algorithm were missing. The algorithms proposed in [11], [12] are mainly based on the mean of periodically sampled symbols [10]. Their algorithms, however, assumed the knowledge of the minimum length of frame, which cannot be utilized in purely noncooperative communications, and analysis on the algorithms were also missing.
In this article, we present an extended work related to the algorithm proposed in [10]. Specifically, we mathematically analyze the correlation function and mean of periodic samples. We then propose a frame parameter estimation and frame synchronization algorithm. In contrast to the method proposed in [10], we estimate a multiple of frame length instead of the exact frame length, and estimate all frame parameters using the mean of periodically sampled symbols. The error performance of the proposed algorithm and its asymptotic behavior are also analyzed. We also present another frame parameter estimation algorithm, which is a practical modification of the first algorithm for the purpose of use in the limited received data scenario. The modified algorithm improves the estimation performance.
The remainder of this article is organized as follows. In Section II, some relevant notations and the system model are given. In Section III, we present our blind frame recognition algorithm (Algorithm 1) and two key functions, i.e., the correlation function and the mean of periodic samples. We then prove the asymptotic behavior of the proposed algorithm under the noiseless wiretap channel and provide complexity analysis of the algorithm in Section IV. Our theoretical results are extended to Gaussian wiretap channel in Section V. Subsequently, we propose a more practical algorithm for the limited data scenario (Algorithm 2) in Section VI. The simulation results are presented in Section VII, both for Algorithms 1 and 2. Section VIII concludes the study.

A. NOTATIONS
An italic letter indicates a scalar (e.g., a or A). A boldface lower-case letter represents a vector (e.g., a). A calligraphic letter shows a set of scalar values (e.g., A), and |·| denotes the set cardinality. The n-th smallest element of A is written as A (n) , satisfying A (1) ≤ A (2) ≤ . . . ≤ A (|A|) . For two vectors a = (a 0 , . . . , a N −1 ) and b = (b 0 , . . . , b N −1 ) of length N , the correlation between a and b is written as For 0 ≤ j ≤ N , the aperiodic correlation, or the partial correlation function, of a and b is given by For an integer i and a positive integer j, a modulo operation is defined as (i) j = (i + kj) mod j, where k is the smallest non-negative integer that satisfies i + kj ≥ 0. A binomial random variable with n trials and a probability of success 0.5 is denoted by B n . A sign function of a real number x is defined as

B. SYSTEM MODEL
We address the blind frame recognition problem in the Gaussian wiretap channel depicted in Fig. 1. The system model is shown in Figs. 1 and 2, where communication frames of the same size, each of which contains the same SW, are continuously transmitted from a source to the legitimate receiver. Meanwhile, the eavesdropper, who is aware of the existence of SW but does not know the frame length, SW, and its length, observes the transmitted signal passing through the wiretap channel. The eavesdropper estimates the frame parameters to acquire synchronization from the received data stream. The transmitted signal stream is denoted by x, and an eavesdropper and the legitimate receiver receive the signal stream y and z, respectively.  The frame structure, transmitted signal, and received signal are depicted in Fig. 2. A frame of length N consists of SW, denoted by s = (s 0 , s 1 , . . . , s L−1 ) ∈ {1, −1} L , of length L and the following data of length N − L. The ratio of SW is denoted by r = L/N . Assume that the data symbols are independent and identically distributed (i.i.d.) equiprobable binary random variables taken from {1, −1}.
It is assumed that x = (x 0 , x 1 , . . .) is transmitted continuously, where x i ∈ {1, −1}, and the eavesdropper takes a truncated signal of length M to process. Let the received signals at the eavesdropper, y = (y 0 , y 1 , . . . , y M −1 ), be where n = (n 0 , n 1 , . . . , n M −1 ) is a Gaussian noise vector with i.i.d. elements of zero mean and variance σ 2 , so that SNR is given by E s /N 0 = 1/(2σ 2 ), where N 0 /2 is the two-sided noise power spectral density. In (1), j is a positive integer, and T ∈ {0, 1, . . . , N − 1} is the delay, which corresponds to the time difference between the first received symbol and the earliest symbol in the next frame. We assume that the received signal length is much longer than the frame length; that is, M N . Our goal is to estimate the repetitive SW s and its length L, the frame length N , and the delay T from the received signal y at the eavesdropper side.

III. BLIND FRAME RECOGNITION AND SYNCHRONIZATION
In the past works on frame synchronization for the scenario where frame structures are known at the receiver [1]- [4], the cross-correlation of known SW and the received symbols is the key metric to acquire frame synchronization. However, in blind scenarios where the receiver has no information on the frame structure, the detection of the frame length and SW should precede the synchronization process.
In a previous work on blind frame recognition [10], a twostep blind frame recognition and synchronization technique was proposed. In the first step, the receiver exploits the crosscorrelation of two non-overlapping windows of the received signal stream to estimate the frame length. In the second step, the mean of symbols sampled with the period of the estimated frame length is used to locate and estimate the SW sequence, and finally to acquire frame synchronization.
In this section, we investigate the correlation function and the mean of periodic samples in the noise-free channel. Then, we propose a new blind frame recognition and synchronization method, which is a refined version of our previous scheme [13]. The analysis of the proposed algorithm and extension to noisy channel are presented in the following subsections.
Under the noise-free channel assumption, the received signal at the eavesdropper is represented as Let S and D be the sets of indices in y indicating the SW and data symbols, respectively. For i ∈ S, y i is an SW symbol, and for i ∈ D, y i is a data symbol. It is clear that S ∪ D = {0, 1, . . . , M − 1}, and S ∩ D = ∅. The received SW symbol can be expressed as = (y m , y m+1 , . . . , y m+W −1 ).
We define w 0 as the reference window. The received symbol stream and window structure are depicted in Fig. 3, where SW is shaded with stripes. Let S m and D m be the sets of indices in w m indicating SW and data symbols of w m , respectively. For i ∈ S m , w m,i is an SW symbol, and for i ∈ D m , w m,i is a data symbol. Clearly, We analyze the correlation between the reference window, w 0 , and sliding window, Assuming that window length is greater than frame length (i.e., W > N ), we first divide the reference window w 0 into two parts of complete frames and residual frames as depicted in Fig. 3(a), where W 0 , W −1 , and W +1 denote their index sets. Here, W 0 corresponds to the complete frame region (CFR), and W −1 and W +1 correspond to the parts of a frame, which we refer to as the residual frame region (RFR). As shown in Fig. 3(a), we have W = W −1 ∪ W 0 ∪ W +1 . Let k be the number of frames in CFR. Then, it can be shown that and |W 0 | = kN . For RFR, it is clear that 0 ≤ |W −1 |, |W +1 | ≤ N − 1 and |W −1 | = T . Although any sliding window can be divided into CFR and RFR, we use the terms only for the reference window. From |W 0 | = kN and 0 ≤ |W −1 |, Thus, the number of frames in CFR, k, is bounded as The cross-correlation between the reference window w 0 and a sliding window w m is given by and the aperiodic auto-correlation of the SW, s, is given by VOLUME 8, 2020 For m = 0, a sliding window is the same as the reference window, and thus we have C(w 0 , w 0 ) = 1. For m ≥ 1, C(w 0 , w m ) is a function of random variables as the data symbols are random. Theorem 1: For the received signal without any additive noise, given by (2), we have Proof: It is clear that for m = 0, we obtain C(w 0 , w 0 ) = 1. We next consider the case of 1 ≤ m ≤ M − W . The correlation (6) can be split as Note that the summand of the first sum is the product of two SW symbols. The first sum can be split into CFR and RFR parts: As the SW is repeated in y with a period N , it follows that w m,i = w (m) N ,i for i ∈ S (m) N . The first sum in the right hand side of (10) can be expressed in terms of the aperiodic autocorrelation of the SW given by (7): where the last line follows from the definition of H (s; j) given by (8). The second term in the right hand side of (10) is a sum within RFR, and the number of summands is smaller than 2L. We have −2L < i∈{S 0 ∩S m }\W 0 w 0,i w m,i < 2L. Now, we consider the second sum in (9) where at least one of w 0,i and w m,i is a data symbol. Each summand becomes an independent and equiprobable binary random variable and the number of summands is The sum can be represented in terms of a binomial random variable as 1 2 . Then, the cross-correlation is represented as where B W −|S 0 ∩S m | is the only random variable. By the law of large numbers, we have Finally, we obtain Note that C(w 0 , w m ) can be divided into a deterministic part and a random part as in (13). If m = 0, the correlation marks the inphase auto-correlation of the reference window and the random part is empty, indicating that C(w 0 , w 0 ) = 1, and we call this as the trivial peak. If m = 0, the correlation function remains a random variable being biased by the deterministic part. Some properties of H (s; j) are easily derived.
Proposition 1: Due to Proposition 1, H (s; j) has a unique peak at j = 0, irrelevant to the SW realization. Lemma 1 shows that the correlation of SW-matched windows is distinguishable with a high probability asymptotically.
Lemma 1: For nonzero integers m 1 and m 2 satisfying (m 1 ) N = 0 and (m 2 ) N = 0, we have Proof: From Theorem 1 and Proposition 1, it follows that 147520 VOLUME 8, 2020 Note that the properties hold for an arbitrary choice of s. The convergence of C(w 0 , w m ) to H (s; (m) N ) for m > 0 is shown in Fig. 4. The frame length and pseudo random SW are set as N = 50, s = (−1, 1, 1, 1, −1, 1, 1, −1, −1, −1), and L = 10. The size of the windows is set to W = 1000 for Fig. 4(a) and W = 5000 for Fig. 4(b). In the figures, both correlations have the trivial peak C(w 0 , w 0 ) = 1. The overall difference between C(w 0 , w m ) and H (s; (m) N ) becomes smaller as W increases. The peaks of H (s; (m) N ) appear periodically with a period of the frame length N . Hence, if W is sufficiently large, the index of the highest peak, or the most reliable peak, of C(w 0 , w m ) apart from the trivial one is the frame length or its multiple with high probability.
Corollary 1: For m > 0, the expectation and variance of the correlation are and Proof: The correlation can be split as (9). For i ∈ S 0 ∩ S m , both w 0,i and w m,i are SW symbols.
For i ∈ W\{S 0 ∩ S m }, at least one of w 0,i and w m,i is a data symbol, where we can exploit (12).
The following corollary presents a lower bound of the difference of expected the SW-matched correlation to the SW-mismatched correlation.

B. MEAN OF PERIODIC SAMPLES
In this subsection, we investigate the mean of periodic samples of the received signal y, which was used in [10] for VOLUME 8, 2020 detecting the values of the SW s and its length L. The mean of periodic samples is defined as where 0 ≤ l ≤ p − 1, p is the sampling period, and d = M p is the number of samples in the sum. The following theorem presents the asymptotic convergence of D p (l). Theorem 2: For the received signal without additive noise, given in (2) Proof: We first consider the case of (p) If l ∈ [0, p − 1] ∩ D, then y l+ip is an independent and equiprobable binary random variable. We can represent D p (l) as By the law of large numbers, Now, we consider the case of (p) N = 0. We are interested in the frame indices of the sampled symbols and the fraction of fixed SW symbols that contribute to the sample sum. Let b = (l − T ) N , which is the frame perspective bias of the sampling. If gcd (p, N ) = 1, as p is a generator of the cyclic group {0, 1, . . . , N − 1}, then for any b ∈ {0, 1, . . . , N − 1} (we can use the notation Z n instead). The sampler in (18) accesses all the symbol indices in the frame regularly with the period of N . More generally, assume g = gcd(p, N ) and let p = gp 1 and N = gN 1 , where p 1 and N 1 are coprime. We have where G = {0, g, . . . , N − g} is a subgroup of Z N of order N /g. Therefore, Hence, the sampler accesses only N 1 symbol indices of the frame regularly. The fraction of sampling of SW symbols is smaller than or equal to L/g /N 1 , which is smaller than one if L < N /2. It is apparent that It has been shown that, if the sampling period is a multiple of the frame length, the mean of periodic samples converges to the corresponding SW or zero. Assuming that we can obtain a sufficiently long signal and a small multiple of the frame length, this converging behavior guarantees the acquisition of the SW, its position, and interval, which is equal to the exact frame length.
The convergence behavior of |D p (l)|, which is related to Theorem 2, is exhibited in Fig. 5. We consider the same frame length and SW as those used in Fig. 4. Here, we set the sampling period p to 300 and 50, which are 5 times as large as and equal to the frame length, respectively. As the sampling periods p are multiples of the frame length (or frame length itself), if l ∈ S, then the periodically collected samples are all SW symbols with the same sign. In contrast, if l ∈ D, then the samples to be averaged are all randomly generated data symbols. Note that, a smaller p draws a larger d, which is the number of samples to be averaged out. Hence, a smaller p, being a multiple of the frame length, leads to a smaller average |D p (l ∈D )| and makes the discrimination between |D p (l ∈D )| and |D p (l ∈S )| easier.
Until now, we have discussed the asymptotic behavior of the correlation and the mean of periodic samples. In the following section, a blind frame recognition method will be proposed, which utilizes these results.

C. PROPOSED BLIND FRAME RECOGNITION METHOD
We propose an algorithm that targets an asymptotic setting first. The algorithm is a two-step approach, which is a modified version of that proposed in [10]. In [10], the exact frame length was estimated by averaging the intervals of consecutive peaks through the correlation function. Other frame parameters, such as the SW and the length of a frame, and the delay were estimated using the absolute mean of periodic samples subsequently. However, while choosing the successive peaks of correlation, if some of the successive peaks are not selected or some improper peaks are included, the estimation of frame length may fail. Furthermore, as neither the number nor the minimum value of the proper peaks are provided to the eavesdropper, no explicit method to select helpful peaks from all the peaks for some frame information was provided. We claim through Algorithm 1 that setting a frame length multiple by choosing a single peak of the correlation first, and then estimating all other parameters with the mean of periodic samples is an effective approach.
The proposed blind frame recognition algorithm is described in Algorithm 1. The algorithm is designed for estimating the information of finite-length frames so that it is assumed that N ≤ N max for a finite N max . The algorithm takes the input of the received signal stream y and parameters N max and η, and outputs an estimation of the frame lengtĥ N , the delayT , the SWŝ and its lengthL. In the first step, the algorithm estimates a small multiple of the frame length p. The window length is set to M − N max in line 1. In line 2, p is set to the index of the largest peak of C(w 0 , w m ) excluding C(w 0 , w 0 ) = 1. This is one of differences from [10] in that we choose the single highest peak instead of multiple peaks from C(w 0 , w m ) for m > 0, which improves the performance of the first step of the algorithm.
In the second step, the frame parameters are estimated with D p (l). If the first step is successful, p is an integer multiple of N . Then, for l ∈ [0, p − 1] ∩ S, |D p (l)| = 1 because the summands of |D p (l)| are all the same SW symbols. For l ∈ [0, p − 1] ∩ D, |D p (l)| < 1 with a high probability as the summands of |D p (l)| are all random data. We detect the rising and falling edges of |D p (l)| to estimate the SW and frame length. In line 3, the index sets of the rising and falling edges, R and F, respectively, are determined with an edge detection threshold η: The above predicates provide the same number of rising and falling edges. The rising and falling edge instants provide the start and end indices of the SWs in the received signals, respectively. For p = N with proper η, there is a single rising edge and a single falling edge regarding SW. If p = iN where i > 1, there are more than one rising and falling edges. Hence, depending on the size of R, the frame length estimateN is obtained in lines 4-8. The delay is estimated by the value of the first rising edge instant in line 9. The length of the SW is estimated by the distance from the first rising edge to the nearest falling edge and the SW is estimated by corresponding signs of D p (l) in lines 10-13.

IV. ANALYSIS OF ALGORITHM 1
In this section, we analyze the estimation error probability of Algorithm 1. Subsequently, it is proved that the proposed algorithm works well asymptotically; the error probability approaches zero. Then the computational complexity of Algorithm 1 is given.
Let the estimation error probability of Algorithm 1 be P e and the probability of correct estimation be P c = 1 − P e . Then, P e is bounded as where (p) N = 0 is the desired condition for the output of the first step of Algorithm 1. An upper bound of (19) can be VOLUME 8, 2020 derived with Lemmas 2 and 3, whose proofs are provided in Appendices A and B, respectively. Lemma 2: The probability that p is a multiple of N is bounded as Lemma 3: Given (p) N = 0, the probability of correct estimation of N , L, s, and T is bounded as The following theorem confirms that the error probability of Algorithm 1 converges to zero as the received data increases.
Now the analysis of computational complexity of Algorithm 1 is given. The number of computations in Algorithm 1 is affected not only by the length of received signal M and the input parameters N max and η but also from p, which is determined by the realization of the received signals. Instead of providing the exact number of operations, we evaluate the complexity using O (·), the big omicron, to show the limiting behaviors.
The overall computational complexity of Algorithm 1 is O (MN max ), which is explained as follows. At first, the cor-

V. ANALYSIS OF BLIND FRAME RECOGNITION IN GAUSSIAN WIRETAP CHANNELS
In this section we consider Gaussian wiretap channel and analyze the blind frame recognition by showing the asymptotic behaviors of the correlation function and the mean of periodic samples. The wiretap channel is assumed to be an AWGN channel with σ = 0, and the received signal was given in (1). Let the noiseless component of the received signal y = (y 0 , y 1 , . . . , y M −1 ) and the sliding window w m =  (w m,0 , w m,1 , . . . , w m,W −1 ) be respectively. The following theorem shows the asymptotic behavior of C(w 0 , w m ) for increasing W .
Theorem 4: For the transmission over an AWGN channel as in (1) The rest of the proof is straightforward in regard to the proof of Theorem 2. From Theorems 4 and 5, it was proven that the convergence of C(w 0 , w m ) and D p (l) for a noisy signal is similar to that in the noiseless case, indicating that the channel noise does not affect their asymptotic behaviors. From these properties, the asymptotic error probability of Algorithm 1 over Gaussian channel is 0 with proof omitted.

VI. MODIFIED BLIND FRAME RECOGNITION AND SYNCHRONIZATION
From Theorem 3, we show that the SW and the frame length are estimated with diminishing error probability when the received symbol stream size increases. However, it is realistic to assume that the received signal is finite in length, which may result in estimation errors. In this section, we analyze the possible errors in the finitely long received signal case and we present Algorithm 2, a modified version of Algorithm 1, N max ← p − 1; 8: until |R| = 1 9:N ← p; 10:T ← R (1) ; 11:L ← F (1) − R (1) N ; 12: for l = 0, . . . ,L − 1 do 13:ŝ l ← sgn(D p ((T + l) p )); 14: end for which estimates the frame information with lower error probability.
In Algorithm 1, the estimate of frame length multiple p is set to the index of the maximum of C(w 0 , w m ) except the trivial peak C(w 0 , w 0 ) = 1, and all the frame information is estimated with |D p (l)|. The estimation is performed based on the rising and falling edges of |D p (l)|. To improve the estimation performance, we modify Algorithm 1 in three perspectives; optimization of edge detection threshold, stricter detection of edges, and minimization of an estimate of frame length multiple.
We first address the optimization of edge detection threshold, η, of |D p (l)| for maximizing the edge detection probability. For the correct estimate of a frame length multiple p, the probability of detection of all edges in |D p (l)| is given as where D p (l)'s for all l ∈ [0, p − 1] are independent to each other, the SW ratio is Although r is unknown, as C (w 0 , w m ) converges to r for (m) N = 0 by Theorem 1, we use C w 0 , w p as an estimate of r. The absolute mean of periodic samples in each factor of (21) is given as and is well approximated to Gaussian random variable by the central limit theorem. Let (η) denote an approximation of correct detection probability, given as where S (η) and D (η) denote approximations of correct detection probability in SW region and data region, respectively. They are the factors of (21) and given as VOLUME 8, 2020 and likewise, The optimized threshold is given as = arg max η S (η) D (η) .
As the frame length and SW are acquired by the edges of D p (l) , false edge detection may lead to estimation error. Hence a stricter criterion that can prevent such false edge detection is required. One way of achieving this is to observe more consecutive sampled values of D p (l) than the number of samples that observed in Algorithm 1 for detecting an edge.
Since the length of SW is more than a few symbols, a stricter condition is to check if there are J > 1 consecutive low or high samples after a high or low sample for determining rising or falling edges, respectively. We define an edge detecting function (J , η, l), which observes J + 1 symbols and outputs 1, -1, and 0, meaning l is an index of either rising or falling edges of D p (l) or neither of them, as The minimization of the randomness in |D p (l)| can be achieved by increasing the number of samples to be summed, d, or with a smaller p. Given that p is a multiple of N obtained from C(w 0 , w m ), |R| = 1 is a sufficient condition for p = N , which is the optimal p for detecting the edges of |D p (l)|. Therefore, we modify Algorithm 1 to choose p iteratively until |R| = 1.
Algorithm 2 starts by setting N max = N max where N max is an input argument to the algorithm. We set N max smaller as the inner loop of the algorithm iterates. An iterative search of W , p, η, R, and F is conducted in lines 2-8 where lines 3 and 4 are the same as Algorithm 1. In line 5, η is optimize with (25). The rising and falling edges are set by Algorithm 3 where the first edge is determined in line 1-6 and remaining edges are determined in line 7-13. At the end of each iteration, the cardinality of R for rising edges is checked in line 8 of Algorithm 2. If |R| = 1, N max is set to p − 1 for narrowing the search range for N and the subsequent iteration begins. The iteration proceeds until |R| = 1. After the iteration terminates, the frame information is estimated as in Algorithm 1 in lines 9-13. Note that, throughout the iteration, W increases gradually. This improves the accuracy of determining η with the approximations and p such that (p) N = 0, as C(w 0 , w m )

VII. NUMERICAL RESULTS
The simulation results for the proposed blind frame recognition algorithms are provided in this section to evaluate their validness. Throughout the simulations, the recognition error performance of the algorithms is of interest. It is regarded as a recognition error event if any of the outputs of the algorithms, N ,T , andŝ, are not correct.
The simulation setting is as follows. The frame length N is set to 50. Practically used SWs usually have a good aperiodic correlation property to avoid synchronization errors [1]- [4]. As the proposed algorithms are designed for arbitrary realization of a SW, we try two types of SWs of length L = 15; one from the m-sequence and the other randomly generated. Throughout the comparisons, the maximum length of the frame to be estimated is set as N max = 100. We consider the transmission of BPSK modulated signals through noiseless or Gaussian wiretap channels with high or low-SNR.
We first present the sensitivity of the edge detection probability of D p (l) to the detection threshold by showing (η), the closed form approximation of edge detection probability, for various η's and E s /N 0 's in Fig. 6. Then in Figs. 7, 8, and 9, Algorithms 1 and 2 are evaluated for different values  of η and J in the noiseless wiretap channel, Gaussian wiretap channels of E s /N 0 = 10 dB and E s /N 0 = 0 dB, respectively. The recognition error performance as well as the estimation error performance for each frame information, such as frame length, SW, and delay, over a Gaussian wiretap channel of E s /N 0 = 10 dB is shown in Fig. 10. Then, the simulation results for a wider search space for the frame length, N max = 200, is shown in Fig. 11. In Fig. 12, the recognition error rate for Algorithms 1 and 2 are presented for various E s /N 0 's. We also present the error performance of a modified version of Algorithm 1 in which the optimization step of η is inserted as Algorithm 2, and these cases are labeled by Alg1(η opt ). In fact, the recognition error rate of Alg1(η opt ) is the performance limit of Algorithm 1 with constant η's.

1) EDGE DETECTION THRESHOLD η OF ALGORITHM 2
In Algorithm 2, the edge detection threshold η is optimized. Fig. 6 shows (η) for various η's and channel SNRs with the same realization of the received signal and simulation parameters, such as d and N max . In the figure, as E s /N 0 increases, η maximizing (η) converges to 1. The recognition error rate of Algorithm 1 for various η's confirms this observation. In Figs 7,8,and 9, as channel SNR increases, η minimizing the error rate of Algorithm 1 also increases.

2) PERFORMANCE FOR THE SWs OF M-SEQUENCE AND RANDOM GENERATION
In this subsection, we discuss the performances of the proposed algorithms for the SW of the m-sequence and the random sequence. For the random SW, the rate of (p) N = 0, the error performance of the first step only, is also drawn for Algorithm 1 for comparison purpose. The recognition error  performance of Algorithm 1 cannot surpass the error rate of the first step because if (p) N = 0, the edge detection step fails. Hence, the performance of the first step is the algorithmic limit of Algorithm 1. In general, the recognition error rates monotonically decrease as the length of the received signal increases in all cases. This observation is consistent with the result of Theorem 3.
When the SW is the m-sequence, the error rate decreases at a constant rate in the semilog plot. The error rate of the first  step is found to be extremely low for the m-sequence SW, indicating that the recognition error rate is dominated by the incorrect edge detection of the mean of periodic samples in the second step of the algorithms. In contrast, in the random SW case, there appears to be an error floor as M increases due to poor SW patterns. In Fig. 7(b), for example, the error rate of Algorithm 1 decreases quickly for a small M whereas the slope of the error rate curve becomes modest for a larger M . As the edge detection in |D p (l)| is irrelevant of the SW pattern, the edge detection performs equivalently for both m-sequence and random SW given the same p. In contrast, the performance of the first step is largely dependent on SW's aperiodic correlation. Although the performance is poorer for the random SW, the error rates still gradually decrease as M increases.

3) PERFORMANCE COMPARISON BETWEEN ALGORITHMS 1 AND 2
The recognition performances of the two proposed algorithms can be compared. Algorithm 2 outperforms Algorithm 1 by following reasons. First, the iterative update of p leads to a smaller integer multiple of N which is better for the second step performance. The strict condition on detecting the rising and falling edges by observing J instants, which can be more than one, also keeps the algorithm from detecting wrong edges. The use of optimal η as a threshold in each iteration also improves the edge detecting performance. In Figs. 7(a), 8(a), 9(a), 11, and 12, Algorithm 2 significantly outperforms Algorithm 1 for all values of M . When the m-sequence is used, proper peaks of correlation are easily distinguishable from other correlation values. This makes Algorithm 2 get p = N with high probability. The estimation error performance of Algorithms 1 and 2 for all frame parameters are compared in Fig. 10. In contrast, in the random SW case, there is a performance crossover between the two algorithms in high-SNR environments as shown in Figs. 7(b) and 8(b). For SWs with a poor aperiodic correlation property, the proper correlation peaks are possibly be indistinguishable from others. In this case, iterative estimations of p can degrade the performance because there are multiple large side lobes in the aperiodic correlation function of the SW resulting in strong false candidates for peak detection.

4) IMPACT OF NOISE
For the noiseless wiretap channel, if p is a multiple of N , |D p (l)| = 1 in the SW region, l ∈ S. Hence, for edge detection, a higher η provides a better performance generally. In contrast, for a noisy channel, |D p (l)| in the SW region can be smaller than 1 due to the channel noise and the variance is larger when the SNR is lower. Therefore, a high η does not guarantee a good edge detection performance in the noisy channel and should be set lower for more margin to avoid false edge detection. The simulation results show the performance sensitivity to η as in Figs. 7, 8, and 9. The optimization of η in Algorithm 2 can be explained with Fig. 6, presenting the approximated edge detection probability for various η's and E s /N 0 's.
The recognition error rates of Algorithms 1 and 2 for various E s /N 0 's are shown in Fig. 12. The iterative estimation of frame information in Algorithm 2 gives SNR gain over Algorithm 1 more than 6dB, which can be shown by comparing Alg2(J = 1) to Alg1(η opt ). And also the strict condition on detecting the rising and falling edges of |D p (l)| by observing J > 1 instants gives additional SNR gain, which can be shown by comparing Alg2(J = 3) to Alg2(J = 1).

5) PERFORMANCE VERSUS MAXIMUM FRAME LENGTH
As the maximum frame length N max , that can be estimated by the proposed algorithm, is a preset value and also affects the frame recognition performance. The performance in terms of N max is given in Fig. 11. An increase in N max causes a significant performance degradation in Algorithm 1 whereas Algorithm 2 shows little or no loss of performance. For Algorithm 1, if N max is doubled, then the average of p is almost doubled, too. Doubling of M is required to get a similar accuracy in the edge detection of |D p (l)|. In contrast, in Algorithm 2, p gets smaller through iterations and the optimal η for given C(w 0 , w m ) and p is also obtained. For a similar edge detection performance, M does not need to increase as much as needed in Algorithm 1. Therefore, Algorithm 2 works better for a wider search space of frame length.

VIII. CONCLUSION
In this article, we have studied a blind frame recognition and synchronization problem. It has been shown that, under no prior information other than the existence of unknown SW, reliable blind frame recognition is possible. We proposed an asymptotically good correlation-based algorithm that is designed to determine the frame length and SW. The validness of the algorithm was theoretically proven -the error rate vanishes as the received data size increases. Although this approach originated from [10], we presented an explicit modified algorithm and analyzed the asymptotic behaviors. In fact, this is the first study that conducted the theoretical analysis on the performance of fully blind frame recognition to the authors' knowledge.
We also presented another algorithm, which performs better under the limited data scenario, for practical use. The simulation results showed that regardless of channel impairments or SW pattern, the proposed algorithms estimate the frame parameters consistently improves as the amount of the received signal increases. It is also shown that our algorithms perform better when an SW with a better aperiodic autocorrelation is used. The complexity analysis was also conducted and the iterative estimation of frame information in the improved algorithm results in the complexity increase from O (M N max ) to O M N max 2 .

APPENDIX A
In this section, we prove Lemma 2. From line 2 of Algorithm 1, the following hold: where the last inequality follows from the union bound on probabilities. Since M N , we can assume that W = M − N max > 2N . From Corollary 1, By the Chebyshev inequality, we conclude the proof as P (p) N = 0

APPENDIX B
In this section, we first introduce the Chernoff bound [40] and prove Lemma 3.
Lemma 4 (Chernoff Bound [40]): Let B n ∼ B n, 1 2 . For any 0 < < 1, Using Lemma 4, we now derive the lower bound in Lemma 3. In line 3 of Algorithm 1, if all the rising and falling edges that discriminate the SW and data are set correctly, all the frame information is estimated without errors: Furthermore, a lower bound for the second term of (28) is obtained as follows: where (a) follows from the independence of D p (l)'s, l ∈ [0, p−1]∩D, (b) follows from (17), (c) follows from N max ≥ p, and (d) is due to Lemma 4 and d = M p .