## 2 Processing Blocks in SDR Transmitter
### Quadrature Complex Signal Generation  
First, we define a list of ones and zeros that represents the initial (input) bit stream, processed either on a bit-by-bit basis or on a vector basis, buffer, etc. Wolfram has many options for creating lists, and we choose the function **Table[]**:  
\[\textbf{inputbitStream}=\textbf{Table[RandomInteger[1],[n,0,numSymb-1]]}\]  
Here, **numSymb** is the number of bits in a list. These bits can be generated either as a random bit train or as a predefined training sequence. For every channel, every \(T_{b}\) seconds, a new bit is introduced at the input of the S/P block, which groups \(\log_{2}M\) bits every \(T_{m}=T_{b}\cdot\log_{2}M\) seconds. These groups of bits are used as addresses for accessing content in LUTs at both quadrature branches. In this realization, the quadrature branches are separated after superposition coding, which simplifies further processing. The LUTs contain symbol values according to selected modulation scheme. In the following illustration, we used 4-QAM, which for a single user channel can be expressed with the following Wolfram's syntax:  
\[\textbf{M}=\textbf{4}\]  
\[\textbf{spKonv}=\textbf{Partition[inputbitStream,Log2[M]]}\textbf{(*S/P converter^{*})}\]  
\[\textbf{lut41}=\textbf{AssociationThread[([0,0],0,1],[1,0],[1,1])}\textbf{(} \textbf{l,-1,-1,-1]}\textbf{(*LUTs definition^{*})}\]  
\[\textbf{lut4Q}=\textbf{AssociationThread[([0,0],[0,1],[1,0],[1])}\textbf{(} \textbf{l-1,-1,1]}\textbf{(*LUTs definition^{*})}\]  
\[\textbf{a4I}=\textbf{Lookup[lut4I,spKonv]}\textbf{(*Process of mapping bits to symbols^{*})}\]  
\[\textbf{a4Q}=\textbf{Lookup[lut4Q,spKonv]}\textbf{;}\]  
One can recognize the symbolic intuitiveness that such coding carries and the ease of following the schematic transmitter's operations. Here, the so-called antipodal mapping is applied at each branch, where \(\log_{2}M\)-tuples of bits are replaced with symbols (1 and \(-1\) in the case of 4-QAM). Wolfram offers functions that are useful for visualizing the blocks' outcomes, as demonstrated in Figure 2, which clearly shows how, for \(M=4\), each pair of bits maps to the corresponding parts of the complex symbol \(a_{1}+ja_{Q}\) (case (b)) via the following statement:  
\[\textbf{ListStepPlot[[a4I1,a4Q1],Center,Mesh->Full,PlotRange>[(1,10],[-2,2]],}\]  
\[  
Other mapping rules could be used, but the same mapping must be applied both at the transmitter and at the receiver. Here, every two bits are mapped in parallel to one symbol, so the symbol period (new elementary information time) is longer, \(T_{symb}=2T_{b}\). Note that the two generated lists \(a_{I}\), \(a_{Q}\) are shorter than input bit list with a new symbol rate of \(R_{\text{symb}}=1/T_{\text{symb}}=1/2\ T_{\text{b}}=R_{\text{b}}/2\).  
After generating the complex-quadrature symbols, the superposition coding processing block is applied. At the output of this block there is an adder that sums the weighted mapped symbols with weights corresponding to the square-root of the power coefficient, according to Equation (1); see Figure 3:  
\[\text{sc}[n]=\sqrt{p_{1}}a_{(1)}+\sqrt{p_{2}}a_{(2)}+\ldots+\sqrt{p_{n}}a_{(n)} \tag{1}\]  
Figure 3: Single superposition coder. \[\textbf{M}=\textbf{4}\]0 (a) Input bit stream; (b) \(a_{I}\) and \(a_{Q}\) symbols at the output of the LUTs. We note that computation of the power coefficients (represented here as a vector) depends on channel conditions, and will not be addressed in this work. It is important to note here that while input signals to the superposition coder have regular constellations based on the selected MCS, the output signal constellation of this block may be irregular, as will be shown later. Next, the information waveform is generated.