## 2 Processing Blocks in SDR Transmitter
### Sample-Wise Pulse Shaping
#### 2.3.1 Mixing  
The next step in generating the complex QAM signal is creating output waveforms by mixing signal with the sinusoidal carrier, represented as a complex exponential. One approach for implementation follows from [PERSON]'s representation, i.e., taking the product of the amplitudes and sum of the phases of the complex samples. Alternatively, as the SDR operates on time samples and as the transmitted signal is real, then the real part of the complex product signal representation can also be explicitly obtained as:  
Figure 6: (**a**) Sample stream view before filter; (**b**) sample stream after filter; (**c**) spectrum for \(\alpha=0.2\), \(L=32\); (**d**) spectrum for \(\alpha=0.2\), \(L=16\); (**e**) spectrum for \(\alpha=0.2\), \(L=8\). \[\mathfrak{R}\Big{(}\widetilde{v}_{QAM}(t)\cdot e^{-2\pi f_{C}t}\Big{)}=\underbrace{ I_{QAM}(t)}_{v_{l}(nT_{s})}\cdot\underbrace{I_{lo}(2\pi f_{C}t)}_{\cos}- \underbrace{Q_{QAM}(t)}_{v_{lo}(nT_{s})}\cdot\underbrace{Q_{lo}(2\pi f_{C}t)} _{\sin} \tag{6}\]  
Clearly, the real part of the complex product between the signal and the sinusoids carries all the modulated information. We note that transmission of the modulated information can be equivalently implemented via the imaginary part of the complex product:  
\[\mathfrak{I}\Big{(}\widetilde{v}_{QAM}(t)\cdot e^{-2\pi f_{C}t}\Big{)}= \underbrace{Q_{QAM}(t)}_{v_{lo}(nT_{s})}\cdot\underbrace{I_{lo}(2\pi f_{C}t)} _{\cos}-\underbrace{I_{QAM}(t)}_{v_{l}(nT_{s})}\cdot\underbrace{Q_{lo}(2\pi f _{C}t)}_{\sin} \tag{7}\]  
For this step we use a symbolic function for generating the analog single-tone local oscillator (LO) signal, \(\cos(2\pi f_{C}t)\), where \(f_{C}\) is the carrier frequency that satisfying \(f_{C}=\frac{f_{C}}{2}\). LO frequency stability is one of the most critical SDR hardware implementation details. Common SDR simulations for LOs usually engage discrete sinusoid form of this function, i.e., \(\cos[2\pi ki]\), where \(k=\frac{f_{C}}{f_{s}}\) is, the so-called, frequency of discrete sinusoid:  
\[\mathbf{k}=\frac{\mathbf{Fc}}{\mathbf{Fs}};\mathbf{lo}=\sqrt{2\times}\mathbf{ Table}[\mathbf{Cos}[2\pi\mathbf{ki}],\{\mathbf{i},\mathbf{0},\mathbf{Length}[ \mathbf{scInTs}]-\mathbf{1}\}];\]  
Following Equation (7), to create the negative sinusoid for the Q-branch, we rotate the sampled cosinusoid function by \(\pi/2\) radians, which is equivalent to k/4 samples. When multiplying lists, errors often come from unequal list lengths or alignment, so when transforming to the discrete, digital world, this issue must be carefully accounted for. According to Equation (6), the final addition yields a digital QAM waveform ready for transmission through the channel, as radiated emissions are represented by real signals. This is demonstrated in Figure 7. There are generally two options; one is given by Equation (6), depicted in Figure 1, where  
\[\mathbf{v4 Imod}=\mathbf{v4I\times lo};\] \[\mathbf{v4 Qmod}=\mathbf{v4Q\times lo90 deg};\] \[\mathbf{snTs}=\mathbf{v4 Imod}+\mathbf{v4 Qmod};\]  
and the second is given by Equation (7), resulting from the imaginary part of the complex product (signal and LO), that is  
\[\mathbf{v4 IQmodj}=\mathbf{v4Q\times lo};\] \[\mathbf{v4 QImodj}=\mathbf{v4I\times lo90 deg};\] \[\mathfrak{R}\Big{(}\widetilde{v}_{QAM}(t)\cdot e^{-2\pi f_{C}t}\Big{)}=\underbrace{ I_{QAM}(t)}_{v_{l}(nT_{s})}\cdot\underbrace{I_{lo}(2\pi f_{C}t)}_{\cos}- \underbrace{Q_{QAM}(t)}_{v_{lo}(nT_{s})}\cdot\underbrace{Q_{lo}(2\pi f_{C}t)} _{\sin} \tag{6}\]0  
Both **snTs** and **snTsj** are real physical signals (**snTsj** comes with imaginary number j) and carry all the information that is needed to reconstruct the symbols at the receiver. It is very convenient from the aspect of symbol and sample alignment to view the signal as shown in Figure 6b.