## 2 NB-IoT System Detailed Design and Implementation
### NPDSCH Receiver Chain Implementation
#### 2.2.1 Coarse Synchronization
\(\epsilon\) represents the frequency offset normalized to the subcarrier spacing and it has two components: the integer frequency offset, \(\epsilon_{i}\) and the fractional frequency offset, \(\epsilon_{f}\). * The resulting products will be stored in buffers that have, in total, the length of the auto-correlation window, but the separation is sign based. The aim is to keep all the products that have the same sign--resulting from the code cover--together in buffers so that each buffer contains products that have the same sign. As the operation progresses, new products will push old products down into the buffers chain, and accordingly, their sign will change at the transitions. This technique is complemented by creating an accumulator to each buffer to add all the incoming products minus the outgoing products. Thus, at each moment, these accumulators will contain the summations of their buffers and by adding them according to the sign pattern, the total summation of (18) can be defined. Figure 8 depicts this state. Figure 7: The coarse synchronization procedure. At each arriving sample, the buffers will be added accordingly, and the result of these additions will be reduced in number by adding them, then the resulting value will be a metric entry, as it will be added through the normalization filter as mentioned in (20) and (21). These values will be stored, and the maximum will be compared to the threshold until a peak is found. This will conclude the states of the buffers filling and the NPSS search. \[R_{r}(m)=\sum_{i=16m}^{16(m+1)-1}R(i),\ \ \ m=0,\ \ 1,\ \ 2,\ldots,\ \ 1199\] (20) \[A(m)=A(m)\ \ \bullet\ \ (1-\alpha)\ \ +\ R_{r}(m)\ \ \bullet\ \ \alpha,\ \ \ 0<\alpha<1\] (21) where \(R_{r}(m)\) is the reduced metric for one frame and \(A(m)\) is the final form of the metric as the values accumulated through previous frames are updated with new values using the normalization filter that has the factor \(\alpha\). * The last two steps in the procedure begin with loading compressed NPSS samples into a complete symbol to be used in the cross-correlation calculations. The operation will be implemented by alternating between the states \"IFO and Refinement Calculations\" and \"Cross-Corr\", as the first state captures all time hypotheses' samples, and sorts last iterations metric whereas, the second state performs the cross-calculation itself by using CORDIC phase rotators fed by phase accumulators to perform the calculation for all frequency hypotheses at a certain time hypothesis. Following that, the result is stored and compared to the threshold. To sum it up, the decision making and sample capturing are performed in the state \"IFO and Refinement Calculations\", and the actual calculation is done in the state \"Cross-Corr\". * In step two, if the cross-correlation maximum passes the threshold, the state machine will proceed as mentioned above through step three and into normal operation in the state \"Locked\", and if not, the state machine will return to the first state through an intermediate reset the state \"False Peak State\".