# Feature Extraction in 5G Wireless Systems: A Quantum Cat Swarm and Wavelet-Based Approach
## 3 Proposed work
### Quantum Cat Swarm Optimization
```
1:Step 1: Convert 5G signal to spectrogram
2:\(S\leftarrow\) Read 5G signal
3:\(Spectrogram\gets STFT(S)\)
4:Step 2: Extract features from the spectrogram
5:\(F\leftarrow\) Extract features from \(Spectrogram\)
6:Step 3: Initialize Quantum Cats
7:\(Q_{population}\leftarrow\) Initialize Q-bit individuals representing feature selection
8:Step 4: Optimize using QCSO
9:while not converged do
10:for each cat \(i\) in population do
11:if cat is in seeking mode (search mode) then
12: Generate \(j\) copies in existing location nodes, where \(j=(SMP-1)\)
13:for each copy do
14: Select CDC dimensions randomly
15: Modify selected dimensions by adding or subtracting a fraction of SRD:
16:\(X_{jd}(new)=X_{jd}(old)+rand\times SRD\times X_{jd}(old)\)
17: Compute new fitness values \(F_{i}\)
18: Compute selection probability:
19:\(P_{i}=\frac{|F_{i}-F_{j}|}{F_{max}-F_{min}}\)
20:endfor
21: Select best candidate solution
22:else\(\triangleright\) Tracing mode (tracking mode)
23:for each node \(k\) and dimension \(d\)do
24: Update velocity:
25:\(r_{1}\leftarrow\) Random value in \([0,1]\)
26:\(c_{1}\leftarrow\) Acceleration coefficient
27:\(V_{k,d}=V_{k,d}+r_{1}c_{1}(X_{best,d}-X_{k,d})\)
28: Update position:
29:\(X_{k,d}=X_{k,d}+V_{k,d}\)
30:endfor
31:endif
32:endfor
33: Update global best \(G_{best}\)
34:endwhile
35:Step 5: Return best features
36:\(Optimal\_Features\leftarrow\)\(G_{best}\)
```  
**Algorithm 1** Quantum Cat Swarm Optimization (QCSO) for 5G Spectrogram Feature ExtractionFrom these two processes, we update the cat's position in the search space. After this, both search mode and tracking mode can be observed. The combined nodes are redistributed across search mode and tracking mode. Finally, we check whether the stopping condition is met. If the condition is fulfilled, the best node features will be selected; otherwise, the loop will be run once again. However, more time will be required to compute the best node features, so we propose a new method called quantum cat swarm optimization. The optimization algorithm combines the principles of quantum computing and the behavior of cats. For example, it relies on qubits, which are also known as quantum bits [30]. In this method, information is represented as qubits, which can exist in multiple states simultaneously using the principle of superposition. Quantum estimation and quantum entanglement are then performed to compute the best node features. Quantum entanglement allows the states of qubits to be correlated; here, the qubit states are directly related to one another. The state of one qubit directly affects the states of other qubits. Cats observe the environment and seek food in the form of targets, so, as they explore the environment, they search for optimal solutions [29]. Cats are known for their ability to acutely focus on targets. Thus, using cat swarm optimization, it is possible to easily find the best nodes in a timely manner, as shown in Figure 2.  
The fitness function in QCSO evaluates the quality of the selected feature subsets by balancing classification accuracy and feature subset size. The function is defined as follows:  
\[F(X)=\frac{Accuracy(X)}{\lambda+|X|} \tag{6}\]  
where \(Accuracy(X)\) is the classification accuracy using the selected features \(X\), \(|X|\) is the number of selected features, and \(\lambda\) is a regularization parameter that penalizes larger subsets of features to promote feature selection efficiency. The goal is to maximize \(F(X)\), ensuring that the selected features provide high classification performance while minimizing redundancy. This function directly guides the optimization process by influencing the selection and updating of subsets of features throughout the algorithm. To ensure reproducibility, we set \(\lambda\) = 0.1 in our experiments, balancing classification accuracy and feature reduction. Figure 2: QCSO process for feature selections in 5G Signals. This work implements the quantum cat swarm optimization (QCSO) algorithm using a custom quantum simulation approach.