# A CNN-MPSK Demodulation Architecture with Ultra-Light Weight and Low-Complexity for Communications
## 3 The Proposed CNN-MPSK Architecture  
### Architecture Presentation  
In Figure 3, the proposed architecture takes the received signal as input and then applies one-dimensional (1D) convolution to extract features. Afterwards, the signal flows to the activation module to become unlinear. The flow continues to input a pooling component, followed by a full connection to act as a classifier on the features. Next, we present the components of the CNN architecture, which consist of 1D convolution, activation, pooling, and full connection. Among these modules, convolution is the most important one. From a mathematical standpoint, convolution can be regarded as an integral operation, or an accumulation. Convolution has the property that past data have an effect on future data, and adjacent data influence current data, which makes convolution convenient to extract features from data. Given a sequence \(r\) of length \(d\) as input and a vector \(w\) of length \(k\), the 1D convolution operation is given by  
\[y(m)=\sum_{k}r(m+k)w(k). \tag{7}\]  
The Equation (7) involves element-by-element multiplication and summation. In particular, the elements of vector \(w\) are called weights that the network needs to learn during training. Thus, the \(w\) is often interchangeably referred to as kernel. Typically, the kernels have small size. In this study, the size of kernel \(w\) is \(1\times 3\), and the 1D output vector \(z\) is given by  
\[z(j)=y+b=\sum_{i=0}^{2}r(j+i)w(i)+b,\,0\leq j\leq d-3, \tag{8}\]  
where \(z(j)\) is the \(j\)-th element of the output, the \(z\) is also referred as extracted feature, and \(b\) is called bias which represents the baseline when all the inputs have values of zero. Note that the length of \(z(j)\) is \(d-2\). In order to make \(z(j)\) to have the same size as the input \(r\), we add one zero to the first and last positions of \(r\), respectively, which produces a new input vector \(r^{\prime}=[\,0\ r\ 0]\). Thus, we can rewrite Equation (8) as  
\[z^{\prime}(j)=\sum_{i=0}^{2}r^{\prime}(j+i)w(i)+b,\,0\leq j\leq d-1. \tag{9}\]  
Figure 3: The architecture of a neural network for MPSK demodulation. The Equation (9) can be illustrated by Figure 4, which gives a visual explanation of how 1D convolution works. In Figure 4, the convolution multiplies the kernel \(w\) by the first three elements of \(r^{\prime}\), sums all the multiplications with \(b\), and yields the first output \(z^{\prime}(0)\). Following this, we shift the kernel \(w\) one element to the right and perform convolution to generate another output \(z^{\prime}(1)\). In particular, the \(r^{\prime}(0)\), \(r^{\prime}(1)\), \(r^{\prime}(d)\) and \(r^{\prime}(d+1)\) are equal to zero, \(r(0)\), \(r(d-1)\) and zero, respectively. Thus, the first two items \(z^{\prime}(0)\) and \(z^{\prime}(1)\), and the last item \(z^{\prime}(d-1)\) are computed as  
\[ \begin{split} z^{\prime}(0)&=r^{\prime}(0)w(0)+r^{ \prime}(1)w(1)+r^{\prime}(2)w(2)+b\\ &=r^{\prime}(1)w(1)+r^{\prime}(2)w(2)+b\\ &=r(0)w(1)+r(1)w(2)+b,\\ \end{split}  \tag{10}\]  
\[ \begin{split} z^{\prime}(1)&=r^{\prime}(1)w(0)+r^{ \prime}(2)w(1)+r^{\prime}(3)w(2)+b\\ &=r(0)w(0)+r(1)w(1)+r(2)w(2)+b,\\ \end{split}  \tag{11}\]  
and  
\[ \begin{split} z^{\prime}(d-1)&=r^{\prime}(d-1)w(0)+r ^{\prime}(d)w(1)+r^{\prime}(d+1)w(2)+b\\ &=r^{\prime}(d-1)w(0)+r^{\prime}(d)w(1)+b\\ &=r(d-2)w(0)+r(d-1)w(1)+b.\\ \end{split}  \tag{12}\]  
It is noted that when the input data change, these three parameters, \(w(0)\), \(w(1)\) and \(w(2)\), do not change. We need to repeat the movement \(d-1\) times. This 1D convolution costs \(3d\) multiplications and \(d\) additions in total. Following by 1D convolution, there is an activation function that performs nonlinear transformation and enables the neural network to learn nonlinear features. CNNs commonly use rectifier linear units (ReLUs) as activating functions. A ReLU can lead to rapid computation with a threshold value 0. When the input is smaller than 0, the output is 0. Otherwise, the output is unchanged.