# Hamming Distance Optimized Underwater Acoustic OTFS-IM Systems
## 3 Hamming Distance Optimized Index Mapping Model
### Hamming Distance Optimization Model  
In the use of combined model method and table lookup table method, when \(C_{n}^{k}>2^{p_{1}}\), no matter which mapping method is used, there will be a problem as the number of generated index combination sequences is greater than the number of required index combination sequences. We call the extra index combination sequence a redundant index combination sequence. By encoding the index combination sequence according to the state of its corresponding position sub-grid, we can obtain the hamming distance between each index combination sequence and the average Hamming distance of the index combination sequence set because the larger the hamming distance is, the lower the probability of errors caused by the channel and noise in the detection of the receiver is. The existence of redundant sequences makes the average hamming distance of the index combination sequence set smaller which interferes with the BER performance of the system. We design a Hamming distance optimization model to solve the redundancy problem in index combination sequences. This model maximizes the average Hamming distance of the set by identifying and deleting redundant index combination sequences in the set. In other words, the redundant index combination sequences are deleted from the directly generated set containing \(C_{n}^{k}\) index combination sequences, and an index combination sequence set consisting of \(2^{p_{1}}\) required index combination sequences is obtained, and the index combination sequence set has the maximum average hamming distance. At \((n,k)=(8,3)\),\(p_{1}=\left\lfloor\log_{2}C_{n}^{k}\right\rfloor=\left\lfloor\log_{2}C_{8}^{3} \right\rfloor=5\),\(2^{p_{1}}=32\); therefore, only 32 different combinations of index sequences are needed, whereas there are \(C_{n}^{k}=56\) in the index combination method, and there is considerable redundancy in the index combination sequences. This redundancy is always present when \(C_{n}^{k}>2^{p_{1}}\). To further improve the performance of the system BER, a maximum Hamming distance optimization index combination model is used to eliminate redundant combinations in the index combination sequence before index modulation is performed, as shown in the Figure 2.  
The selection of the maximum Hamming distance index combination sequence set is shown in Figure 3. First, the index combinations of the sub-grid groups are coded, with active sub-grids coded as 1 and inactive sub-grids coded as 0. Second, an index sequence is randomly selected from all the index combination sequences. The selected sequence is denoted as \(C_{1}\). Then, the encoded hamming distance between the encoded \(C_{1}\) and all the remaining index combination sequences is calculated, and the index combination sequence \(C_{2}\) with the largest hamming distance from \(C_{1}\) is selected. When calculating the maximum hamming distance, there may be several groups of index combination sequences with the same maximum Hamming distance as \(C_{1}\). In this case, one group of index combination sequences with the maximum Hamming distance is randomly selected as \(C_{2}\). Since the purpose of the Hamming distance optimization model is to remove the performance interference caused by the redundant combinations in the index combination sequence, the purpose of deleting the redundant combinations and selecting the maximum Hamming distance index combination can be achieved by this method. After determining \(C_{2}\), the index combination sequence set is updated to \(\{C_{1},C_{2}\}\). Then, the average hamming distance between the remaining unselected index combination sequence and the selected index combination sequence set is calculated, and the index combination sequence with the largest hamming distance from the selected index combination sequence set is selected to be added to the set. The above steps are repeated until the number of index combination sequences in the selected set is \(2^{P_{1}}\); then, the set of index combination sequences with the largest Hamming distance can be obtained.