A Design Method of Code Correlation Reference Waveform in GNSS Based on Least-Squares Fitting

The multipath effect is one of the main error sources in the Global Satellite Navigation Systems (GNSSs). The code correlation reference waveform (CCRW) technique is an effective multipath mitigation algorithm for the binary phase shift keying (BPSK) signal. However, it encounters the false lock problem in code tracking, when applied to the binary offset carrier (BOC) signals. A least-squares approximation method of the CCRW design scheme is proposed, utilizing the truncated singular value decomposition method. This algorithm was performed for the BPSK signal, BOC(1,1) signal, BOC(2,1) signal, BOC(6,1) and BOC(7,1) signal. The approximation results of CCRWs were presented. Furthermore, the performances of the approximation results are analyzed in terms of the multipath error envelope and the tracking jitter. The results show that the proposed method can realize coherent and non-coherent CCRW discriminators without false lock points. Generally, there is performance degradation in the tracking jitter, if compared to the CCRW discriminator. However, the performance promotions in the multipath error envelope for the BOC(1,1) and BPSK signals makes the discriminator attractive, and it can be applied to high-order BOC signals.


Introduction
The binary offset carrier (BOC) signal, which is adopted by modernized GPS, GLONASS, Galileo and BeiDou satellite navigation systems [1][2][3], is designed for spectrum separation and ranging accuracy improvement. It can be considered as a pseudo-random noise (PRN) code multiplied by a 'square sine' subcarrier, which is a sinusoidal carrier with one-bit quantization, as shown in Figure 1. For the BOC(m,n) signal, the code chipping rate is f c = m f 0 , and the frequency of the sine-phased square-wave subcarrier is f sc = n f 0 , f 0 = 1.023 MHz. In particular, BOC(1,1) is commonly considered as the interoperability baseline for the modernized BeiDou B1C signal, the Galileo E1 signal and the GPS modernized L1C signal [4,5]. High-order BOC signals, like BOC (10,5), BOC (15,2.5) and BOC (14,2), are designed for providing defense and security services, such as the Galileo Public Regulated Service (PRS), BeiDou military signals and GPS military signals [4,6].
In modern Global Navigation Satellite Systems (GNSSs), the BOC signal is widely used for civil and military applications. These novel signals can improve the tracking accuracy and have better multipath mitigation performance with narrow correlators, when compared to the binary phase shift keying (BPSK) signal. However, two problems emerge in the application of BOC signals, which are the ambiguity in receiver tracking and the lack of multipath mitigation methods [7].
Better ranging accuracy can be achieved, since the BOC signal occupies a larger Gabor bandwidth than the binary phase shift keying (BPSK) signal with the same code frequency. However, the multi-peaked auto-correlation functions (ACF) of BOC signals lead to the possibility of receiver code tracking loop locking onto the side peaks [8], when applying traditional multipath mitigation techniques to the BOC signals. Many multipath mitigation techniques have been proposed and implemented for the BPSK signal in receiver processing. The narrow correlator technique is primarily proposed in [9] to narrow down the space between correlators in early and late branches. As the code noise variance and multipath error envelope are proportional to the chip spacing, it can enhance the performance of multipath mitigation and tracking precision. The double-delta correlator (∆∆) technique is a representative architecture for multipath mitigation techniques using a linear combination of four correlators [10]. By adding another set of early-minus-late correlators beyond the original narrow correlators, it further improves the multipath mitigation performance. The CCRW technique generates a unique local reference waveform instead of local code replicas [11,12], which is distinct from the narrow correlator and double-delta correlator technique. Its resulting cross-correlation function (CCF) of the incoming signal and the local reference waveform is directly a discriminator. By carefully choosing the local code reference waveform, the code multipath mitigation performance can be better, at the expense of the carrier-to-noise ratio (CNR). The W2 waveform in [12] is chosen as the representative CCRW discriminator.
The multipath mitigation techniques mentioned above are preferred in the receiver realizations, since they are implemented in the code delay lock loop (DLL) with acceptable hardware cost. However, they are less effective when dealing with BOC signals. Because the resulting DLL discriminator function may have more than one zero-crossing, i.e., they may be tracking on the wrong lock-points and have an intolerable bias in measurements. Furthermore, the filtering effect of the transmission channel is not considered in the CCRW design. Only the zero-crossing in the center of discriminator corresponds to the zero-code-phase error; the other ones would lead to biased pseudo-range measurements. Figure 2 shows the tracking error result for the CCRW W2 technique of BPSK(1) and BOC(1,1) signals. Interference is injected manually at the position of one second, and the tracking error is biased by 0.5 chips accordingly. Thus, the delay lock loop (DLL) of the BOC(1,1) signal would lock into the false steady states and cause biased tracking for the BOC(1,1) signal, but it returned to the correct positions for the BPSK(1) signal. This is due to the false lock point at the position of 0.5 chips of the W2 non-coherent discriminator for the BOC(1,1) signal in Figure 3.
When comparing different multipath mitigation techniques, the common thread can be concluded that they are using locally-generated code replicas in the correlations to shape the code discriminator function (i.e., S-curve). In [12], the optimized S-curve for multipath mitigation is discussed. As a conclusion, the S-curve should return to the zero value at the left side of linear region to restrict the area of the multipath error envelope (MEE).    In this sense, a least-squares approximation was performed by a linear combination of shifted code replicas to approach the ideal S-curve in [12]. Searching the suitable code correlation reference waveform was also performed, like the CCRW technique. However, the standard method of least-squares approximation used in [12] is not capable of handling the ill-conditioned problem brought by the band-limited effect on the coefficient matrix, which is composed of cross-correlation results. The ill-conditioned coefficient matrix could lead to an extremely large condition number in the least-squares approximation, which makes the solution computed with machine precision unreliable. Moreover, the length of the code tracking reference function is not restricted in the simulations, and only the simulations of the BPSK and BOC(n,n) signals coherent discriminator with infinite bandwidth are performed. The work in [13,14] provides an unambiguous non-coherent discriminator for BOC signals using the S-curve shaping method with local linearly-combined codes, based on the least-squares solutions. However, the method has poor tracking precision and requires mass data storage digits. This paper proposes a least-squares procedure for the code tracking reference function of CCRW, based on the truncated singular value decomposition (SVD) method. By introducing a measurement uncertainty in the low-rank approximation of the coefficient matrix, the condition number could be restrained to less than a preset value. The optimization results of CCRWs are presented and discussed over BPSK, BOC(1,1), BOC(2,1), BOC(6,1) and BOC(7,1) signals in narrow-band situations.

Least-Squares Method of S-Curve Shaping
The signal distortion by band-limited effects is mainly due to the channel filters in the signal generation and the receiver front-end. The received line-of-sight (LOS) signal in a band-limited receiver can be expressed in a continuous-time model as follows.
Here, r(t) is received with additive white Gaussian noise n(t) of an N 0 power spectrum density (PSD). A is the signal amplitude, and D(t) is the navigation message bit stream, which is ignored in the following. The path delay is given as τ 0 . The carrier frequency is f 0 , and the carrier phase offset is ϕ 0 .X(t) is the expression for the baseband BOC waveform X(t) after channel filtering. The baseband waveform X(t) = c(t) · sc(t), where c(t) is the PRN code and sc(t) = sign[sin(2π f sc t)] is the subcarrier with frequency f sc .X The channel impulse response during the whole signal transmission and receiving is detonated as h(t). Assuming perfect carrier frequency synchronization, the in-phase and quadrature-phase baseband signal after frequency down-conversion are given as follows.
Here,φ 0 is the local estimation of ϕ 0 , n I (t), and n Q (t) are the white Gaussian noise of a N 0 power spectrum density (PSD). For the receiver using the CCRW technique, the reference waveform W(t) is correlated with the baseband signal I(t) and Q(t) with a coherent integration time of T. The narrow correlator technique and double-delta technique can be fit into different reference waveforms, as well [7].
Here, ϕ e is the estimation error of carrier phase, and ε is the code phase estimation error. The correlation result ofX(t − ε) and W(t) is RX W (ε). N I and N Q are the noise part after integration with the variances of R WW (0)N 0 /T. Basically, there are two types of reference waveforms, i.e., 'transition-based' and 'per-chip' reference waveforms, as depicted in Figure 4.
For 'transition-based' reference waveforms, the reference waveform appears only at the original code transitions. They can be synthesized as a linear combination of multiple instances of time-shifted local code replicas, like the narrow correlator technique and double-delta technique. For 'per-code' reference waveforms, the reference waveform appear at a fixed position in each code chip, usually at the chip boundary, like the CCRW W2 technique and the BOC-gated-PRN (BGP) waveform [8]. Here, only the 'per-code' reference waveforms are studied, as the 'transition-based' reference waveforms were discussed in [12]. The expression of the 'per-code' reference waveform can be given as follows.
Here, g(t) is the element gate, and c j (t) is the j-th PRN code. The element gate occurs at the edge of each chip. By choosing g(t), the S-curve is shaped accordingly. However, the analytic expression of R XW is only resolved for the BPSK signal with infinite bandwidth. Here, a general method for the code tracking reference function design of the BPSK and BOC(m, n) signals with finite bandwidth is proposed.
W(t) can be described as a combination of series of base strobe waveform g 0 (t), as shown in Figure 5.

Reference Waveform g(t)
Base Strobe Waveform g 0 (t)  Here, d i is the time delay of the i-th base strobe waveform, and γ i is the weight of the i-th base strobe waveform. W 0 (t) is a CCRW with the strobe waveform placed at the start of each code chip. In this process, W(t) is manually constructed. Assume −LT c is the initial point of g(t); the base strobe waveform length is µ; and N is the number of base strobe waveforms in g(t). Notably, Nµ should not exceed the single code chip. The RX W can be considered as a convolution result betweenX(t) and W Σ (t).
The Fourier transform of RX W (ε) can be expressed as a linear combination of time-shifted RX W 0 (ε) filtered by h(t).
Here, FT{x} is the Fourier transform of x. The coherent and non-coherent discriminator can be expressed as follows.
As implied by Equation (9), the S-curve is shaped by setting γ i of W i (t). The ideal S-curve D ideal (ε) can be concluded with the following characteristics.
Here, T c is the width of the single code chip, and pT c (0 < p < 1) is the unilateral range of the linear region. To find the best W(t) that suits the ideal S-curve in band-limited situations, the least-squares method is utilized to fit D ideal (ε) by a finite amount of weights, as expressed in Equation (10).
Here, ±KT c is the fitting range of the S-curve for the optimization process, and the length of ε is M. Combing Equations (9) and (10), the problem can be simplified as finding the solution x LS to Ax = b for the coherent discriminator, and PAx = b for the non-coherent discriminator.
Here, diag(x 1 , x 2 , ..., x M ) stands for the diagonal matrix consisting of x 1 , x 2 , ..., x M . The coefficient matrix A ∈ C M×N is comprised of correlation functions RX W 0 , the observation matrix b ∈ R M and the unknowns' vector x ∈ R N , M ≥ N.
In the band-limited situations, A is often ill-conditioned or rank defected, as can be seen in Figure 6. The coefficient matrix A is ill-conditioned if the condition number κ(A) in Equation (12) is too large. Then, the error mean square for the regression coefficient will largely increase, and as a consequence, the regression fitting will have poor robustness and low precision. That is, for any tiny disturbances δA and δb, the resolution of (A + δA)x = b + δb is distinct from the solution of Ax = b. However, there are always some differences between the coefficient matrix A in the simulations and the actual coefficient matrix A for a real receiver, because of the non-ideal device characteristics or non-ideal channel impulse response. If A is ill-conditioned in the least-squares approximation, the solution would be quite different from the genuine solution. Therefore, the corresponding output in the receiver may not be what is expected. Furthermore, the computational accuracy is limited in the mathematical software; an ill-conditioned problem is probably inaccurate in the software calculation.
A truncated singular value decomposition (SVD) method is utilized to find x LS in this LS problem and to avoid the ill-conditioned problem of the coefficient matrix.
Here, A † k is the Moore-Penrose (MP) inverse of A k , and its SVD is U 1 , Σ 1 and V 1 . The process of the proposed method can be concluded in the following.
Step 2 Set the measurement of uncertainty of A to be tol = 1e −5 . Step .. ≥ σ r . U 1 and V 1 are the first k columns of U and V.
Step 4 According to the Equation (13), the approximated minimal norm solution x LS is acquired.
The measurement of uncertainty tol is employed to exclude the minimal singular value in the ill-conditioned matrix A. The approximate error A − A k = σ k+1 < σ 1 tol. Take the least-squares solution for the BPSK(1) signal with an 8.184-MHz bandwidth as an example. The resulting S-curve of proposed method is shown in Figure 7, compared to the resulting S-curve acquired by the traditional least-squares solution with the ill-conditioned coefficient matrix. The resulting S-curve of the proposed method can reproduce the target S-curve, but the result in the ill-conditioned case is inaccurate and unusable. Moreover, the proposed S-curves calculated with different data precisions are shown in Figure 8. This shows that there is little difference in the results when the coefficient matrix varies slightly. Therefore, the proposed method can overcome the ill-condition problem.
The simulation parameters are listed in Tables 1-5. The fitting range is the simulation range for the S-curve fitting. The CCRWs are constrained within the waveform range (less than one chip), with base strobe waveform gate width of µ. µ is selected according to the bandwidth. If there is a large front-end bandwidth, µ can be a rather small value, since the sampling rate is always greater than the bandwidth. The target S-curve has a linear region around the tracking point and a small offset in the right side to expand the pull-in region and avoid the possible false locking points.

BPSK(1)
The code correlation reference waveform diagrams for the infinite bandwidth case are shown in Figures 9 and 10. There is little difference between the coherent and non-coherent cases. The coherent waveform is like the W2 waveform, and it presents at every boundary of the original code. The obtained waveform is also formed by four strobes with a symmetrical structure. The linear range of the corresponding S-curve is defined by the width of the center strobes. The strobes from both sides are much narrower, which makes the fitted S-curve quickly vanish to zero. The total area of the coherent waveform is zero. The non-coherent waveform, however, is different in the strobe values, which are not constant. The total area of the non-coherent waveform is also zero. The fitted S-curves for the infinite bandwidth case are presented in Figure 11, compared to the non-coherent W2 and double-delta correlator. Here, we show the S-curve of the coherent discriminator and the S-curve of the non-coherent discriminator. We also show the S-curve of non-coherent W2 and double-delta correlator, which are basically the same. It can be observed that the ideal S-curve is well reproduced by the resulting S-curve. The resulting S-curve returns more quickly to zero than the W2 and double-delta correlator, but slower to the ideal S-curve, which is determined by µ.    The results for the 4.092-MHz case are different from the infinite bandwidth case, because we had to increase µ and the size of the linear region. The resulting correlator diagrams for the 4.092-MHz case are shown in Figures 12 and 13. The corresponding S-curves are presented in Figure 14. Again, the resulting S-curve is more similar to the ideal S-curve with higher peak values and a sharper slope in the linear region, compared to W2 and the double-delta correlator. The ideal S-curve is well reproduced by the fitting result, except the nonzero values outside the linear region.

BOC(1,1)
The same procedures as for BPSK signal are repeated for the BOC(1,1) signal. The settings for BOC(1,1) signals are listed in Table 2. However, the type of CCRW in limited bandwidth situations is different from BPSK signals. The code correlation reference waveform for the infinite bandwidth case presents at each code transition, and its value is determined by the sign of the next code at transitions, like the W2 waveform. However, the code correlation reference waveforms for the finite bandwidth cases present at the center of each code, just like BGP waveforms. Its value is determined by the sign of the current code. The waveforms are demonstrated in Figure 4.
The code correlation reference waveform diagrams for the infinite bandwidth case are shown in Figures 15 and 16. The structures are quite similar to the BPSK signal with infinite bandwidth, except that an additional waveform appears at the position of −0.5 chips with twice the amplitudes.
The resulting S-curves for the infinite bandwidth case are presented in Figure 17, compared to non-coherent W2 and the double-delta correlator. The target S-curve is better reproduced by the coherent and non-coherent LS CCRWs than W2 and the double-delta correlator. Furthermore, they have no false lock points when W2 and the double-delta correlator have one at 0.5 chips.

BOC(2,1)
The settings for BOC(2,1) signals are listed in Table 3. The code correlation reference waveform for each case also present at each code transition, and its value is determined by the sign of the next code at transitions.  Figure 24, compared to non-coherent W2 CCRW, the double-delta correlator and the results of the waveforms in [14]. It can be seen that the S-curve in [14] (named the HEU S-curve) has a half-size linear region with a doubled slope, compared to the others. The steeper slope in the linear region aims for the improvement of tracking precision. The S-curve proposed here has a slope and a linear region like the W2 waveform, and an offset in the right side and returns to zero in the left side. As a result, the LS S-curves have a better multipath mitigation capability then the Harbin Engineering University (HEU) S-curve for medium and long delayed multipath signals, but worse for the short delayed multipath signal. The HEU S-curve also has a wider pull-in region for the negative part. The resulting S-curves for the 8.184-MHz bandwidth case are presented in Figure 25, and the CCRW diagrams are shown in Figures 26 and 27. The gate width of the code correlation reference waveforms is 0.1 chips, indicating that the smaller bandwidth can increase µ. The ideal S-curve can be reproduced in the linear region, but the non-coherent S-curve has a sharper slope due to the ACF of the BOC(2,1) signal. Furthermore, the non-coherent S-curve returns to zero more quickly and has larger fluctuations in the left side of the linear region. The fitted S-curves still avoid the false lock points, compared to CCRW W2 and the double-delta correlator.

BOC(6,1)
The settings for BOC(6,1) signals are listed in Table 4. The code correlation reference waveform type is the same as the W2 waveform. The least-squares process is performed only for the coherent discriminator case, because the realizable linear region of the given non-coherent discriminator is rather small due to the multi-peaked ACF of the BOC(6,1) signal. The code correlation reference waveform diagram for the 24.552-MHz bandwidth case is shown in Figures 28 and 29. The strobe width is 0.05 chips, and the waveforms are distributed from −0.4-0.4 chips. The resulting S-curves can roughly follow the ideal S-curve, but the peak in the left side of the linear region is reduced to balance the linear regression error. There is also no false lock points in the fitted result.
For high-order BOC signals, the limited bandwidth and multi-peaked auto-correlation function cause a shift in the zero-crossing point of the fitted S-curve. The code correlation reference waveform diagrams of the BOC(7,1) signal for the 20.46-MHz bandwidth are shown in Figure 30. It is more difficult to find a suitable reference waveform for high-order BOC signals with a larger bandwidth, which is the opposite of the BOC(1,1) signal. The resulting S-curves for the 20.46-MHz bandwidth case are shown in Figure 31. Like the BOC(6,1) signal, the resulting S-curves can avoid the false lock points. However, the peak in the left side of linear region is reduced, and it is difficult to restrain the fluctuations outside the linear region.

Performance Analysis
There are some evaluation criteria for the GNSS code tracking discriminators, like sensitivity, precision, stability, etc. Here, the multipath error envelope and the tracking jitter of the proposed discriminators are evaluated, since they are mostly concerned during tracking. The multipath envelopes of these discriminators are analyzed and compared to the CCRW W2 and the double-delta correlator.

Multipath Error Envelope
The signal multipath error envelope is defined as the minimum and maximum code tracking errors caused by the multipath interference as a function of the multipath delay, when only one multipath signal exists [15]. The amplitude of the multipath signal is often assumed to be half of the amplitude of the direct signal. The multipath error envelope is usually plotted within one chip, because the multipath delays larger than one chip are rare and their errors usually negligibly small. Figure 32 shows the multipath error envelope for the BPSK(1) signal with infinite bandwidth. Comparisons are made between the coherent discriminator of the LS method, the non-coherent discriminator of the LS method, the discriminator of W2 and the discriminator of the double-delta correlator. It can been seen that the two discriminators of the LS method have almost the same area. Furthermore, the multipath error envelope of CCRW W2 is about the same as the envelope of the double-delta correlator, while it does not have an embossment in the 0.9 chips. The area of each multipath error envelope is shown in Table 6, the coherent LS discriminator has a minimum envelope area, which is 95.6% of the non-coherent LS discriminator envelope, 47.3% of the W2 envelope and 44.9% of the double-delta correlator envelope.  The multipath error envelops of the BPSK(1) signal with the 4.092-MHz bandwidth are shown in Figure 33. Each discriminator has a zero-crossing point offset at different levels. The LS coherent discriminator has a zero-crossing point shift of 0.01 chips, and the CCRW W2 discriminator has a shift of about 0.075 chips. However, the zero-crossing points of the other two discriminators are not affected by the limited bandwidth. In all, the coherent LS discriminator has a minimum envelope area, which is 88.2% of the non-coherent LS discriminator envelope, 92.7% of the W2 envelope and 83.8% of the double-delta correlator envelope.  The area of BOC(1,1) signal multipath error envelope is shown in Table 7. Figure 34 shows the multipath error envelope for the BOC(1,1) signal of infinite bandwidth. It is interesting that the envelopes of the coherent and non-coherent discriminator of the LS method are the same, like the BPSK(1) signal case. The W2 and double-delta correlator multipath error envelope are about the same, as well, but the double-delta correlator has two additional side lobes at 0.5 chips due to the false lock points at that position. In all, the coherent LS discriminator has a minimum envelope area, which is the same as the non-coherent LS discriminator envelope, 60.5% of the W2 envelope and 38.7% of the double-delta correlator envelope.

BPSK(1)
The multipath error envelopes of the BOC(1,1) signal with the 6.138-MHz bandwidth are shown in Figure 35. The CCRW W2 discriminator has a zero-crossing point offset of 0.02 chips. The double-delta correlator has a minimum envelope area. The LS discriminators have side lobes at the position of 0.5 chips, due to the fluctuations of the S-curves in the left side to the linear region. However, the non-coherent discriminator still has a smaller area of the multipath error envelope than the BGP discriminator. In all, the double-delta correlator discriminator has a minimum envelope area, which is 17.0% of the coherent LS discriminator envelope, 46.8% of the non-coherent LS discriminator envelope, 75.7% of the W2 envelope and 41.1% of the BGP envelope.   Figure 36 shows the multipath error envelope for the BOC(2,1) signal of infinite bandwidth. The LS non-coherent discriminator and W2 have a comparable multipath error envelope because their S-curve is flat in the left side to the linear region. The HEU S-curve has a smaller MEE, because of the narrower operation range. However, the proposed LS S-curve here appears to be much better at mitigating multipath effects where there are medium and long multipath delays, as a result of the narrower negative pull-in region.
The area of each multipath error envelope is shown in Table 8. In all, the W2 discriminator has a minimum envelope area, which is 68.4% of the coherent LS discriminator envelope, 68.4% of the non-coherent LS discriminator envelope, 33.1% of the double-delta correlator envelope and 86.7% of the HEU discriminator envelope. A similar conclusion can be drawn from the 8.184-MHz bandwidth case in Figure 37. The CCRW W2 discriminator is shifted in the zero-crossing point about 0.005 chips, but it still has a minimum envelope. The LS coherent and non-coherent discriminators have a shift about −0.005 chips. In all, the CCRW W2 discriminator has a minimum envelope area, which is 32.4% of the coherent LS discriminator envelope, 57.6% of the non-coherent LS discriminator envelope, 34.6% of the double-delta correlator envelope and 60.7% of the HEU discriminator envelope.    Figure 38 shows the multipath error envelope for the BOC(6,1) signal of the 24.552-MHz bandwidth, compared to the multipath error envelope of the ideal S-curve. The LS coherent discriminator has a zero-crossing point offset of 0.02 chips because of the imperfect fitting.  The results are similar to the BOC(6,1) signal. The LS coherent discriminator has a zero-crossing point offset of −0.005 chips. The area of each multipath error envelope for BOC(6,1) and BOC(7,1) signals is shown in Table 9.  In all, the LS coherent discriminator outperforms other techniques in the area of MEE for the BPSK signal and the BOC(1,1) signal with infinite bandwidth. The LS non-coherent discriminator has a similar performance as the W2 technique for the BPSK signal. For band-limited BOC(1,1) and BOC(2,1) signals, the W2 discriminator has the least MEE area.

Tracking Jitter
The tracking jitter [9] quantifies the amount of noise transferred by a tracking loop from the input signal to the final delay estimate. If the thermal noise is only considered, the output of the non-coherent discriminator is given by: Here, C stands for the signal power. N IX and N QX are the noise items of the in-phase and quadrature-phase branch during the prompt code correlation, with the variance of R XX (0)N 0 /T. When the phase lock loop (PLL) is stable, ϕ e ≈ 0. Then, the discriminator can be simplified as follows.
Using the linear model at ε = 0 for the code discriminator, it can be shown that the discriminator is as follows.
Here, g 0 represents the gain of the discriminator, and N means the Gaussian white noise with zero mean. Then, Equation (16) can be transformed into Equation (17).
Here, we assume that the channel impulse response is undistorted and that the correlation function of the received signal between the local replica is symmetric, i.e., R X X (0) = 0. Furthermore, the designed reference waveform W(t) ensures RX W (0) = 0. The variance of N can be calculated as follows.
From the above, the steady state normalized code error variance is given by [16]: The output of coherent discriminator is given by: Similarly, the corresponding steady state normalized code error variance can be given by: In this case, the tracking jitters of the proposed discriminators are compared to that of the W2 and double-delta technique, assuming B L = 1 Hz and T = 1 ms. Figure 40 shows the tracking jitters of simulated S-curve of BPSK(1) signal with infinite bandwidth. The coherent and non-coherent S-curves are worse than that of the W2 and double-delta technique. This is mainly due to the greater amplitudes of their code reference waveforms, which decide the value of R WW (0), when there is little difference in R X W (0) of different waveforms. Specifically, the CCRW W2 and double-delta correlator waveforms constitute strobes with amplitudes of one and −1, while there is no amplitude constraint on the LS reference waveforms. The R WW (0) of the double-delta correlator is half the value of W2's, since the double-delta correlator waveform occurs at the transitions of each code, while the W2 waveform occurs at the edge of each code. Therefore, the double-delta correlator discriminator outperforms the W2 discriminator. Similar results are shown in Figure 41 for the 4.092-MHz bandwidth case.    Figure 42 shows the tracking jitters of simulated S-curves for the BOC(1,1) signal of infinite bandwidth. The performance of the LS coherent S-curve discriminator is basically the same as the LS non-coherent S-curve, but both are still worse than that of the CCRW W2 discriminator and the double-delta correlator discriminator. The reason is the same as for the BPSK signal. The results of the 6.138-MHz bandwidth case are shown in Figure 43. The performances of the fitted S-curves are even better than the W2 discriminator. This implies that the LS method can keep its performance for the band-limited situation, whereas the W2 discriminator experiences the worst loss.   Figure 45. The code tracking error variance of the proposed S-curve is much better than the HEU S-curve, because of the closely-spaced correlator positions and large correlator weights in the [14] discriminator. By contrast, the amplitudes of the local reference waveform in our manuscript are relatively low, and it has a narrower distribution.  The tracking jitters of the resulting S-curves for the BOC(6,1) signal are shown in Figure 46. It is shown that better results are acquired with a smaller bandwidth, which implies that the amplitude of the reference waveform is generally smaller with a narrower bandwidth. Further, this means that the resulting S-curve for the narrower bandwidth case is more easily realized. The simulation result is shown in Figure 47 for the BOC(7,1) signal.  In all, the W2 non-coherent discriminator outperforms the simulated LS discriminators in the tracking jitters, except for the case of the BOC(1,1) signal with the 6.138-MHz bandwidth. This is because the complexity of LS waveforms has impacted the tracking precision, which is the same for the HEU S-curve.

Discussion
Firstly, the simulation results proved the realizability of the proposed method, given the accordance between the resulting S-curves and target S-curves. Apparently, better consistency can be acquired if the strobe width is smaller and the waveform length is larger. However, a smaller strobe width means a higher sampling frequency in the receiver, which would increase the hardware cost. Therefore, the results in the infinite bandwidth cases are not practical, as it demands a sampling frequency above 100 MHz. However, it shows the capability of the LS method in finding suitable CCRWs with a given pre-correlation bandwidth and strobe width. For example, the acquired LS coherent CCRW for the BPSK signal infinite bandwidth case is similar to the W2 waveform, which is designed theoretically. Furthermore, the non-coherent CCRW of the BPSK signal with infinite bandwidth produces an S-curve more similar to the ideal S-curve than the non-coherent W2 discriminator.
Secondly, the optimization process of the LS method is a balance between the multipath error envelope, linear region length and the false lock points. The multipath error envelope of the S-curve is determined by the left side of the linear region, while the false lock points occur at the right side of the linear region. Thus, the whole area of the S-curve is constrained during the approximation. A close confinement on one aspect may deteriorate another aspect, e.g., a strictly restricted S-curve for the smallest MEE area could lead to the very existence of false lock points. Therefore, the resulting non-coherent S-curve without false lock points usually has larger MEE than W2, which is designed without considering the false lock points. However, the multipath mitigation capability of LS coherent discriminators is better than W2 for the BPSK signal. Furthermore, they are all capable of resisting the multipath signals with medium or large time delays and perform worse with multipath signals arriving within 0.1 chips than the direct signal.
Thirdly, the ideal S-curve may not be the best approximation target, because the restrictions of the right side to the linear region can be relaxed to be just above zero, rather than a positive constant. In a similar manner, this relaxed restriction of the S-curve can also avoid false lock points. However, this vague description is difficult to realize in the LS process and can be studied in future research. The reason to relax the restriction is that it is difficult to find a perfect reference waveform that meets the demands of being a non-coherent discriminator with a small MEE area, high tracking precision, no false lock points and narrow bandwidth simultaneously, especially for the high-order BOC signals. Thus, a relaxed restriction may improve the performance.

Conclusions
An LS technique is proposed for the design of CCRW for BPSK and BOC signals in GNSS, using the truncated SVD method. The purpose of this technique is to find an appropriate receiving discriminator for unambiguous and anti-multipath tracking in band-limited situations. The results show that this technique is capable of generating relatively simple local reference waveforms for coherent and non-coherent discriminators in different bandwidth cases, except that the BOC(6,1) and BOC(7,1) only have coherent results. The corresponding S-curves are capable of avoiding the false lock points. Their multipath error envelopes of the coherent discriminator are about 60% of the W2 CCRW for the BPSK signal, about twice for the BOC(1,1) signal and about three times for the BOC(2,1) signal. Their multipath error envelopes of the non-coherent discriminator are about the same as the W2 CCRW for the BPSK signal, except that it is half of W2 CCRW with infinite bandwidth, about 150% for the BOC(1,1) signal and about twice for the BOC(2,1) signal. The standard tracking errors of acquired S-curves are usually larger than W2 CCRW, except for the cases of the BOC(1,1) signal. Therefore, the LS method can acquire S-curves without false lock points at the cost of MEE area and tracking precision.
Author Contributions: In this study, Chengtao Xu, Zhe Liu and Xiaomei Tang conceived of and designed the experiments. Chengtao Xu performed the experiments, compiled the program codes, analyzed the data and wrote the paper. Feixue Wang contributed analysis tools and modified English errors.

Conflicts of Interest:
The authors declare no conflict of interest. The founding sponsors had no role in the design of the study; in the collection, analyses or interpretation of data; in the writing of the manuscript; nor in the decision to publish the results.

Abbreviations
The following abbreviations are used in this manuscript: