## 2 System Design
### Data Flow Demodulation of Q Branch in Downlink  
The joint Costas loop and Gardner timing loop [20] is adopted to recover carrier and timing information. The local carrier is duplicated by a coherent demodulation method, for example, quadratic loop, decision feedback loop, and Costas loop [21]. The Costas loop is a tracking loop widely used in engineering practices, and the detailed principle is in shown Figure 5.  
According to the parameters outlined in the previous subsection, the equivalent CNR of the I branch will increase by approximately 40 dB after despreading, in other words, the spreading gain of the I branch is 40 dB. Thus, more power should be allotted to the Q branch to guarantee the successful demodulation of communication data. Therefore, the input signal in Figure 5 can be expressed as:  
\[s(t)=\sqrt{2P_{Q}}d_{Q}(t)sin2\pi ft+n(t), \tag{9}\]  
where all parameters are identical to those in Equation (2). Then the outputs of two mixers are  
\[s_{I}(t)=-sin2\pi\hat{f}t\cdot s(t)=\sqrt{\frac{P_{Q}}{2}}d_{Q}(t)\cdot\left[ cos2\pi\left(f-\hat{f}\right)\hat{t}-cos2\pi\left(f+\hat{f}\right)\hat{t} \right]-n(t)sin2\pi\hat{f}t, \tag{10}\]  
and  
\[s_{Q}(t)=cos2\pi\hat{f}t\cdot s(t)=\sqrt{\frac{P_{Q}}{2}}d_{Q}(t)\cdot\left[ sin2\pi\left(f-\hat{f}\right)\hat{t}+sin2\pi\left(f+\hat{f}\right)\hat{t} \right]+n(t)cos2\pi\hat{f}t, \tag{11}\]  
where the parameter \(\hat{f}\) is the duplicated carrier through the Costas loop. By using two low pass filters, the noises and high-frequency components can be mitigated to a substantial extent, or even be eliminated, and we have  
\[\tilde{s}_{I}(t)=-sin2\pi\hat{f}t\cdot s(t)=\sqrt{\frac{P_{Q}}{2}}d_{Q}(t)cos2 \pi\left(f-\hat{f}\right)\hat{t}, \tag{12}\]  
\[\tilde{s}_{Q}(t)=cos2\pi\hat{f}t\cdot s(t)=\sqrt{\frac{P_{Q}}{2}}d_{Q}(t)sin2 \pi\left(f-\hat{f}\right)\hat{t}. \tag{13}\]  
The phase discrimination in the Costas loop adopts a two-quadrant arctangent phase detector [22], which is the most accurate detector for the Costas loop, and the result of phase discrimination is  
\[\Delta\varphi=\arctan\frac{\tilde{s}_{Q}(t)}{\tilde{s}_{I}(t)}, \tag{14}\]  
Figure 5: Principle of joint Costas loop and Gardner loop. where \(\Delta\varphi\) represents the difference between the local carrier frequency and the duplicated carrier frequency, which is used to adjust the frequency of the duplicated carrier until the duplicated frequency is almost identical to that of the local carrier. Then, the situation of the tracking loop can be viewed as entering a steady state. Only in this circumstance can the duplicated carrier be regarded as the counterpart of the local carrier, so \(\Delta\varphi\) will step into an extremely small value, on the verge of 0 rad, resulting in the Equations (12) and (13) as  
\[\dot{s}_{I}(t)\approx\sqrt{\frac{P_{Q}}{2}}d_{Q}(t), \tag{15}\]  
\[\dot{s}_{Q}(t)\approx 0. \tag{16}\]  
We note that \(\dot{s}_{I}(t)\) in Equation (15) provides us with an opportunity to realize the data demodulation. In other words, by using the Costas loop, we can not only attain the recovered carrier, but also obtain the demodulated data as a by-product. Because the sampling rate is higher than the data rate, optimal sample points should be chosen from the down-sampling procedure, which aims to obtain the recovered data flow transmitted in every time interval. The symbol timing synchronization loop contains the interpolation filter, numerically controlled oscillator (NCO), timing error detector, loop filter, and decision part [23]. In our proposed system, each transmission time interval has sufficient samples, so that the operation of interpolation is not required to simplify the loop structure. Due to the reasons noted above, the interpolation can be replaced by an iterative shifting linear searching scheme in every transmission time interval. Furthermore, the timing error detector is used to detect the time error from every symbol, and the jitter can be mitigated by the loop filter.