## 2 Processing Blocks in SDR Transmitter
### Sample-Wise Pulse Shaping  
The symbol sequence at the output of the upsampler has a very high bandwidth, giving rise to spurious degradations and interference. A well-known technique to limit the spectrum includes a pulse-shaping filter based on convolving the sequence with a given window function and incoming quazi-Dirac impulses. Practical SDR implementation of convolution operation requires some considerations. Examine the analytical expression for \(r[n]\), corresponding to the discrete convolution of two sequences, an input symbol sequence \(s[n]\) and the impulse response of the filter, denoted w[n] (window function):  
\[r[n]=\sum\
olimits_{m=-\infty}^{\infty}\!\!s[m]w[n-m] \tag{2}\]  
The impulse response of a filter or windowing function must be in sampled form, where in this transmitter it is implemented via two square-root raised cosine filters, one at the Tx size and one at the Rx side:  
\[w[n]=\frac{1}{\sqrt{L}}\frac{\sin\!\left[\pi\frac{(1-\alpha)n}{L}\right]+4 \alpha\frac{n}{L}\!\cos\!\left[\pi\frac{(1+\alpha)n}{L}\right]}{\pi\frac{n}{L \left(1-\left(4\alpha\frac{n}{L}\right)^{2}\right)}} \tag{3}\]  
where the expression in Equation (3) can be found in broad literature and is defined for each point except for \(n=0\), \(\pm\frac{L}{4\alpha}\),  
\[w[0]=\frac{1}{\sqrt{L}}(1-\alpha+4\frac{\alpha}{\pi}) \tag{4}\]  
\[w\!\left[\pm\frac{L}{4\alpha}\right]=\frac{\alpha}{\sqrt{2L}}\!\left\{\left(1 +\frac{2}{\pi}\right)\!\sin\frac{\pi}{4\alpha}+\left(1+\frac{2}{\pi}\right)\! \cos\frac{\pi}{4\alpha}\right\} \tag{5}\]  
Figure 4: Process of upsampling: (**a**) quadrature NOMA streams at TPI; (**b**) close look at upsampling process for \(L=10\).  
For simplicity, we replace Equations (4) and (5) in our symbolic framework, by setting a slight sample offset (0.999 instead of 1) defined by step of \(n\):  
\[\alpha\)=0.3;G=11; \[w\)=\(\frac{1}{\sqrt{L}}\)Table\([\frac{\sin[\pi(1-\alpha)n/L]+4\alpha\beta\cos[\pi(1+\alpha)n/L]}{\pi^{L}_{0} \left(1-(4\alpha\beta)^{2}\right)},\{n,-LG,LG,0.99\}]\) slidingWindow=RotateLeft\([\)PadRight\([\)w,Length\([\)ssumITs\(]\)\(]\),\(\frac{Length\([\)w\(]-1\(]\)  
In order to confirm our choice for window function implementation, in Figure 5 we plot the raised cosine (RC) and square-root RC (SQRC) pulse shapes using Wolfram's symbolic language:  
**Manipulate[**  
**Legended[**  
**Show[**  
**ListPlot[Table\([\frac{1}{\sqrt{L}}\)\(\frac{\sin[\pi(1-\alpha)n/L]+4\alpha\beta\cos[\pi(1+\alpha)n/L]}{\pi^{L}_{0} (1-4\alpha\beta)^{2})},\)  
**\(\{n,-LG,LG,0.99\}]\),Filling\(>\)Axis], ListPlot[Table\([\frac{\sin[\pi(k/L]\cos[\pi\alpha k/L]}{\pi k/L}\)\(1-2\alpha k/L)^{2},\)(k,-LG,LG,0.99]\), PlotStyle\(\rightarrow\)Orange,Filling\(>\)Axis], PlotRange\(\rightarrow\)Full,AxesLabel\(\rightarrow\)\([^{n}n^{\prime},\)\"p[n]\"],  
**Placed[LineLegend[\([\)Orange,Blue\(]\),\(\(\sqrt{\)RC\",\"RC\"\(]\),[Top,Right\(]\)], \(\{\alpha,0.01,1\}\),[L,10,100,1\(]\),(G,1,11,1),ControlPlacement\(>\)Top]**  
Implementation of the convolution in Equation (2) requires multiplications and summations. For element-wise multiplication, sequence lengths must be equal, so the sampled impulse response (sampled window function) is flipped (but because of symmetry, flipping has no impact), extended to the sum of lengths of both sequences and cyclically rotated:  
Figure 5: Sampled RC (orange) and SQRC (blue) window function.