# Optimization of Signal Detection Using Deep CNN in Ultra-Massive MIMO
## 2 Materials and Methods
### Proposed Method  
Architecture of The Proposed Convolutional Neural Network for Signal Detection (CNN-SD)  
A model of a serial data processing system known as a convolutional neural network (CNN) was developed to recognize and manipulate widely connected data. The basic equation is as follows:  
\[O(t)=\sum_{z=0}^{L-1}I(z)\cdot w(t-z)+b \tag{19}\]  
\(O(t)\) represents the output of the 1D convolution at position t on the output signal \(O\), \(I(z)\) denotes the value of the input data signal \(I\) at position z, \(w(t-z)\) corresponds to the value of the filter \(w\) at position \((t-z)\), and b is the bias term added to the result after the convolution operation if bias is used. \(L\) is the length of the input signal \(I\) and the length of the filter w, which is also the size of the filter. This equation shows how to perform 1D Convolution using the input signal \(I\) and filter, and including the bias term b if given. To obtain \(O(t)\) in the output signal \(I\), which multiplies and adds values from all positions in \(I\), we use the filter w, shifted by \(I\) positions on \(I\). To process the fully connected layer, it receives data from the previous layer as a vector of variable values or feature values. The importance of each feature can be adjusted by multiplying it by a weight and adding a bias value to allow the system to learn how the data looks and create connections between features. The linear layer  
\[y=Wx+b \tag{20}\]  
\(y\) is the output vector of the linear layer with dimensions \((m,1)\), where \(m\) is the number of output layers we need. \(W\) is a weight matrix with dimensions \((m,n)\) and is used to multiply the input \(x\). \(x\) is an input data vector with dimensions \((n,1)\), where n is the number of data features. \(b\) is a bias vector with dimension \((m,1)\) and is added to the result after multiplication by \(W\). The rectified linear unit (ReLU) is a mathematical function commonly used in neural networks and deep learning as an activation function to process data within a layer. The results obtained by multiplying the feature values by weights and adding bias values are sent to an activation function to generate the output values of this layer. The ReLU activation function sets each layer value to zero if it is less than zero and retains the same value if it is greater than or equal to zero. The ReLU enables neural networks to learn effectively and accelerates their computations. The functional representation of the neural network ReLU function is as follows:  
\[f(x)=max(0,x) \tag{21}\]  
where if the value \(x\) is positive or equal to 0, then the value \(f(x)\) will be \(x\) itself. If the value of \(x\) is less than 0, then \(f(x)\) will be zero. In the initial phase of data preparation, the role of information is critical. This phase is methodically divided into two primary categories, as delineated in Figure 4. The first category, designated as 'training data', consists of variably prepared data from ultra-massive MIMO systems, intended to facilitate the algorithm's capabilities in computation and memory retention. The second category, named 'teaching data', is structured to enable the algorithm to assimilate and accurately reproduce the desired outputs. The differentiation between these data types is established based on their channel response attributes within the ultra-massive MIMO communication system after the data preparation stage. The sequential procedures of the CNN-SD algorithms are comprehensively outlined in Algorithm 2, providing a clear framework for the algorithmic workflow. ```
1:Input: Real and Imaginary number \(X\in\mathbb{R}^{n\times l}\), \(Y\in\mathbb{R}^{n\times l}\)
2:Output:\(\widetilde{\mathbf{X}}\). 3:Initialization: Randomly assign input weight \(W_{i}\) and bias \(b_{i}\) for each hidden neuron \(i\), where \(i=1,2,\ldots,L\).