## 3 Multilayer Detection Algorithm (Feature Extraction)
### Multilayer Processing (Feature Extraction)  
We introduced in-layer and cross-layer feature extractions as multilayer processing for extracting feature vectors. Considering the complexity of underwater environments and the variation of target return strength, it is necessary to extract enough features to cover and enrich the feature components in the echo area. In some previous studies, researchers have found that when the number of features is larger, the robustness of the recognition classifier is reduced [25]. The schematic of feature extraction is shown in Figure 2.  
Figure 2: Schematic of in-layer and cross-layer feature selection domain. (**a**) 3-D display of echo shape segmentation for in-layer and cross-layer domain. (**b**) 2-D display of data area for in-layer and cross-layer domain. First, for the in-layer feature extraction, the dispersed energy areas of echoes are segmented into several layers, like contours, from the center peak point to the edge area (normally the noise level). In Figure 2a, the SNR of the peak point is A and the layers are defined as B, C, and D; Figure 2b shows the top view of the echo shape. The number of layers is determined by having energy distributions of at least 3 dB per layer by considering the dynamic range of the target echo strength; this will depend on the underwater objects present, the range of the ambient noise level according to the sea state, the sea area, and the transmitting frequency [17]. In this paper, five layers are selected in consideration of the sonar system specifications. For each layer, three feature vectors are selected. We selected the median feature to have robust performance for impulsive noise signal and representative average value of echo SNR. Variance (second moment) feature vectors based on these median values are selected to represent energy distribution pattern variation. In addition to these features, we selected skewness feature vectors for the directional tendency of energy distribution in the bearing-range domain. Thus, 12 features for a single echo are extracted as in-layer feature vectors. Figure 3 shows examples of different target and clutter echo 3-D shapes. Figure 3a,b and d display the multiple peaks of the targets. In this case, only one peak point should be extracted for precise automatic target tracking and for sonar operator display so as not to obscure manual detection. Figure 3e shows a similar pattern as target-like clutter and Figure 3g displays multi peaks that should be classified as clutter. Figure 3c,h display target and clutter having low SNR respectively with less feature information. To avoid unfavorable situations, such as multiple peak patterns and missing target echoes, cross-layer feature extraction is applied to the system. In the second tier of processing, cross-layer feature vectors are developed from in-layer feature vectors between two adjacent in-layers, for example, the B and C areas in Figure 2. The ratio of adjacent in-layer median values is calculated, and these features show up-slope or down-slope patterns of physical characteristics. The second moment values on a log scale are calculated in the same procedure. In order for the weak target signal to be well classified, the relationship between the center peak point of the echo region and its surroundings should be well extracted by the feature vectors. When the SNR of the echo signal goes lower, the energy in the edge region disappears and the energy surrounding the center point remains. This means that the loss of signal feature components may occur, and less feature information may be extracted. Eight cross-layer feature vectors are considered; finally, the 12 in-layer features plus the 8 cross-layer features for a total of 20 feature vectors in the in-layer and cross-layer are applied. The dimension of feature vectors is not high, so the proposed algorithm can be computed in real time for an active sonar system.