Skip to main content

Spectral line extraction based on ant-colony algorithm

Abstract

A spectral-line-extraction algorithm based on the ant-colony algorithm is proposed to address the difficulty of extracting spectral lines in low signal-to-noise ratio conditions, and the problem that results from the optimal path algorithm falls into local optimization. The algorithm applies the ant-colony path-optimization strategy to detect a spectral line and constructs a corresponding mathematical model using the grid method. A new cost function is proposed to replace path length as the optimization standard in the conventional ant-colony algorithm. At the same time, the roulette rule is used to determine the direction of the next step. This algorithm improves the traditional heuristic function, increases the attraction of the target spectral line to the route search, and improves the convergence rate. Sea-trial data show that the algorithm performs better in extracting spectral lines with a low signal-to-noise ratio than the optimal path algorithm.

Introduction

Narrow-band signals generated by the mechanical reciprocating vibration and the rotation of propellers play an essential role in the signal processing of underwater signals received by passive sonar. In lofargrams, composed of a multi-frame power spectrum, the narrow-band signal usually forms a bright line, called the line spectrum. In the fields of acoustic detection [1,2,3] and recognition [4] of underwater targets, the line spectra of signals are highly sought because they have high signal-to-noise ratios and carry characteristic information of targets. Therefore, line-spectrum extraction in lofargrams is crucial for target detection, tracking, and recognition.

The commonly used line-spectrum-extraction methods often make use of the fact that the spectral level of a line spectrum is higher than that of a continuous spectrum by 10 dB or more. However, the line-spectrum power of some targets is relatively weak, and these methods perform poorly. In Ref. [5], a line-spectrum-extraction method based on ensemble empirical mode decomposition (EEMD) was proposed, which decomposes the signals and selects the proper low intrinsic mode function (IMF) to realize spectral reconstruction.

The criteria for selecting the number of IMF components are not given in this paper. The screening of each IMF component plays an essential role in whether the signal can be fully expressed. In Ref. [6], a method based on instantaneous phase-difference variance weighting was proposed. The fluctuation of the phase difference between sound pressure and velocity is different from that between noise signals, which improves the output signal-to-noise ratio and is beneficial for line-spectrum extraction. In Ref. [7], the cochlear advantage was used for frequency division and sharp filtering, and a line-spectrum-extraction method based on the Gammatone auditory filter bank was provided. However, the author only provided the simulation results of a single line spectrum and did not analyze the situation of multiple line spectra. In Ref. [8], a space–time joint detection method by space–time domain processing was proposed in which spatiotemporal filtering can be performed on unknown line-spectrum signals in the minimum mean-square-error sense. In Refs. [10,11,12,13], the signal-to-noise ratio of the line spectrum was improved by constructing various adaptive line enhancers, which facilitate the extraction of line spectra. The results of these methods are not satisfactory when the signal-to-noise ratio is low. Other methods for extracting spectral lines include the discrete-Fourier-transformation (DFT) spectral-line-detection method, parametric modeling method, class of adaptive spectral line enhancer method [10,11,12,13], and higher-order spectral methods. Di Martino et al. [14] proposed a spectral-line-extraction method based on path optimization. The algorithm achieved the goal of extracting a spectral line by constructing a line-spectrum characteristic function such that the value of the characteristic function was a minimum for the path leading to the spectral line. The algorithm can only extract a single line spectrum, and multiple line spectra can be extracted by adding a frequency-domain sliding window. In the route-searching process for the algorithm based on path optimization, a multi-step decision method is adopted in which a local optimum replaces a global optimal solution, so the final solution might not be the global optimum. In addition, the performance of the algorithm is unsatisfactory in relatively low-signal-to-noise-ratio conditions.

Attention is paid herein to the ant-colony algorithm to find an optimal global algorithm and improve the performance in low-signal-to-noise-ratio conditions. The ant-colony algorithm is an optimization method originally designed by Dorigo et al. [15], inspired by the foraging behavior of an ant colony in nature. It is widely used in cloud computing, data mining, robot path planning, and other fields [16,17,18,19,20,21,22]. It is a relatively mature global optimization algorithm with the benefits of positive feedback, parallel computing, and good robustness. In Ref. [16], \(\alpha\) and \(\beta\) were dynamically adaptively adjusted by establishing an interlock between \(\alpha\) and \(\beta\) in the route-searching process of an ant colony, which overcomes the demerits of low convergence speed. In Ref. [18], a method based on particle swarm optimization and an ant-colony algorithm was proposed, which uses the particle-swarm-optimization method to optimize the parameters of the ant colony. This method can improve the comprehensive performance of the ant-colony algorithm and realize the rapid path planning of a robot. In Ref. [19], obstacle repulsion weights and a new heuristic factor to path-selection probability were introduced, which improve the ability of obstacle avoidance and increase the strength of the diversity. In Ref. [22], an improved ant-colony optimization algorithm was proposed to reduce the partial cross-paths and number of lost ants in the process of the general ant-colony algorithm in a blind search. The algorithm can accelerate the optimization process, has strong searchability, and nearly double the convergence speed.

Most of the ant-colony algorithms are used for path planning, and no methods for line-spectrum extraction exist. Because a path is different from a line spectrum, a specific transformation is required. In a lofargram, the line spectrum is usually a bright line that can be transformed into a path by several methods. Based on the above considerations, a spectral-line-extraction algorithm based on the optimal path and ant-colony algorithms is proposed to improve the line-spectrum-extraction ability.

Methods

Classical ant-colony-algorithm framework

The principle of the ant-colony algorithm originates from simulating the foraging behavior of ants. Foraging ants may secrete a pheromone along the search route. The more ants that travel a route, the higher the pheromone concentration becomes. The pheromone serves as a positive attraction for arriving additional ants; the higher the pheromone concentration, the greater the probability for the arriving ant to choose a particular route. At the same time, the pheromone will also evaporate, which allows the ants search for other routes, improves the global search capability, and avoids falling into a local optimum.

To fully describe the ant-colony algorithm, several elements must be defined:

\(m\) is the number of ant colonies; \(i\) and \(j\) represent the nodes that the ant passes through; \(\tau_{ij} \left( t \right)\) represents the pheromone concentration between nodes \(i\) and \(j\) at time t, which reflects the importance of moving from node \(i\) to node \(j\); \(\alpha\) represents the significance of the pheromone; \(\eta_{ij} \left( t \right)\) is the expected heuristic function, which represents the inverse of the distance from node i to node j at time t; \(\beta\) is the expectation factor; \(p_{ij}^{k} \left( t \right)\) is the state-transition probability formula, representing the possibility of ants moving from node \(i\) to node \(j\) in the kth iteration; \(\rho\) is the pheromone evaporation rate, which avoids the infinite accumulation of pheromones that is usually set to be less than 1. Taboo records the nodes each ant passes through to prevent the ant from passing through the node again. When the ant passes through all of the specified nodes, it completes an iteration.

The state-transition probability formula of the ant-colony algorithm is then

$$p_{ij}^{k} \left( t \right) = \left\{ {\begin{array}{*{20}c} {\frac{{\left[ {\tau_{ij} \left( t \right)} \right]^{\alpha } \left[ {\eta_{ij} \left( t \right)} \right]^{\beta } }}{{\sum\limits_{{s \in {\text{allow}}}} {\left[ {\tau_{is} \left( t \right)} \right]^{\alpha } \left[ {\eta_{is} \left( t \right)} \right]^{\beta } } }},s \in {\text{allow}}} \\ {0{\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} ,{\kern 1pt} s \notin {\text{allow}}} \\ \end{array} } \right.,$$
(1)

where allow represents the next node for the ant to go to next. Hence,

$$\eta_{ij} \left( t \right) = \frac{1}{{d_{ij} }}$$
(2)

where dij is the distance from node i to node j.

After the completion of each cycle by the ant, the path pheromone is updated to

$$\tau_{ij} (t + 1) = (1 - \rho )\tau_{ij} (t) + \Delta \tau_{ij} (t)$$
(3)
$$\Delta \tau_{ij} \left( t \right) = \sum\limits_{k = 1}^{m} {\Delta \tau_{{_{ij} }}^{k} \left( t \right)}$$
(4)

where \(\tau_{ij} \left( {t + 1} \right)\) is the updated intensity of the pheromone from node i to node j, and \(\Delta \tau_{ij} \left( t \right)\) is the pheromone increment from node i to node j. Three models are used to compute \(\Delta \tau_{ij} \left( t \right)\), i.e., the ant-density, ant-quantity, and ant-cycle models, as shown in Eqs. (5), (6), and (7), respectively,

$$\Delta \tau_{{_{ij} }}^{k} \left( t \right) = \left\{ {\begin{array}{*{20}c} Q & {{\text{Ant passed}}(i,j)} \\ 0 & {{\text{Ant did not pass}}(i,j)} \\ \end{array} ,} \right.$$
(5)
$$\Delta \tau_{{_{ij} }}^{k} \left( t \right) = \left\{ {\begin{array}{*{20}c} {\frac{Q}{{d_{ij} }}} & {{\text{Ant passed}}(i,j)} \\ 0 & {{\text{Ant did not pass}}(i,j)} \\ \end{array} } \right.,$$
(6)
$$\Delta \tau_{{_{ij} }}^{k} \left( t \right) = \left\{ {\begin{array}{*{20}c} {\frac{Q}{{L_{k} }}} & {{\text{Ant passed}}(i,j)} \\ 0 & {{\text{Ant did not pass}}(i,j)} \\ \end{array} } \right.$$
(7)

Here, Q is the intensity coefficient of the pheromone increase, and Lk is the path length traversed by the ant after the cycle ends. In the ant-density and ant-quantity models, updates are based on local information, while updates are based on global information in the ant-cycle model. Experimental results have also shown that the best performance is obtained from the update method of the ant-cycle model.

Spectral-line-extraction algorithm based on ant-colony algorithm

When extracting the signal of a spectral line, the lofargram of the signal is often obtained first. According to the description in Sect. 2, the spectral lines in a lofargram may be regarded as the various paths to apply the ant-colony algorithm to extract spectral lines.

Issues when applying ant-colony algorithm to line-spectrum extraction

First, the grid method is applied to divide the lofargram into small squares. The ants are then randomly placed in the small squares to begin a search over the entire lofargram. The following issues are considered when applying the ant-colony algorithm.

  1. 1.

    In the classical ant-colony algorithm, the search is conducted with the ants randomly selecting any of the eight surrounding directions, as shown in Fig. 1. In the figure, a five-pointed star represents an ant. In the lofargram, the line spectrum is usually a relatively straight, bright line, which means each spectral line has a unique frequency at any given time; that is, an ant can only forage along the directions of increasing or decreasing time and cannot forage laterally. If the ants forage laterally, the calculation overhead of the algorithm will increase, and there may be more than one frequency point at a time that is unreasonable.

  2. 2.

    In the classical ant-colony algorithm, the starting point and destination of the ants are generally fixed. However, in the lofargram, they are unknown.

  3. 3.

    In the classical ant-colony algorithm, updates of the heuristic function and pheromone are determined by the distance of the ant from the destination. However, the destination is unknown in the lofargram, so this distance cannot be used as a standard for updates.

Fig. 1
figure1

Available search directions for ants

Algorithm improvements

A spectral-line-extraction method based on the ant-colony and optimal path algorithms is proposed, and the following improvements are made to address the problems described above:

  1. 1.

    The search area of the ants is limited; that is, each ant can only search in the direction of the time axis, and an ant cannot search horizontally. As shown in Fig. 2, the ordinate represents time, and the abscissa represents frequency.

  2. 2.

    Inspired by the characteristic function advanced by Di Martino et al. [14], a new cost function is proposed as a standard for determining the updates of the heuristic function and the pheromone:

    $$P\_\cos \left( \xi \right) = \sum\limits_{i \in \xi } {\frac{d(i)}{{A(i) + G(i) + {\text{eps}}}}} ,$$
    (8)
Fig. 2
figure2

Available search directions for ants in lofargram

where \(\xi\) represents the path of the spectral line; d (i) represents the frequency continuity of the line spectrum, which reflects the frequency fluctuation of the line spectrum; G (i) represents the trajectory continuity of the line spectrum, which reflects whether the line spectrum is broken; A (i) represents the intensity of the line spectrum, namely the amplitude at each frequency point on the line-spectrum path; and eps represents the accuracy of the algorithm that prevents the occurrence of zeros in the denominator. Equation (8) shows that the greater the intensity of the line spectrum, the greater A (i), the better the frequency continuity, the smaller d (i), and the better the continuity of the path, the greater G (i). Alternatively, the smaller the cost function of the line spectrum, the smaller \(P\_\cos (\xi )\). In the processing of underwater acoustic signals, a spectral line is often a straight line with a certain energy. Therefore, the definition of the cost function in Eq. (8) is consistent with the characteristics of the line spectrum. The definitions of d (i), G (i), and A (i) are

$$d\left( i \right) = \left| {f(P_{i} ) - f(P_{i + 1} )} \right| + {\text{eps,}}$$
(9)
$$G\left( i \right) = \sum\limits_{i \in \xi } {g\left( {P_{i} } \right)} ,$$
(10)
$$g\left( {P_{i} } \right) = \left\{ {\begin{array}{*{20}c} {1,{\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} A(i) > {\text{count}}} \\ {0,{\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} A(i) < {\text{count}}{\kern 1pt} {\kern 1pt} } \\ \end{array} } \right.$$
(11)

In Eq. (9), f (Pi) represents the value of the frequency of spectral line Pi at point i. In Eq. (10), g (Pi) is a flag variable defined in Eq. (11). That is to say, when g (Pi) is less than the threshold count, a break is considered to have occurred at this point; otherwise, g (Pi) is set to 1. Usually, count is set to the mean value of background noise in the frequency domain.

The new heuristic function is then

$$\eta_{ij} = \frac{1}{P\_\cos (\xi )},$$
(12)

which shows that the smaller \(P\_\cos (\xi )\), or rather, the closer the search path is to the spectral line, the greater the value of the heuristic function, which is consistent with the design principles of the heuristic function. With the progress of the ant search process, the value of \(P\_\cos (\xi )\) is constantly changing, so the heuristic function is continuously updated.

  1. 3.

    A considerable amount of calculation is required if all the frequency states in the lofargram are simultaneously detected. A block-processing framework is introduced to reduce the computational complexity of line-spectrum extraction and improve calculation speed. As shown in Fig. 3, the lofargram is divided into four parts, and there is a certain degree of overlap between adjacent blocks in the frequency dimension.

In Fig. 3, the abscissa represents frequency and the ordinate represents time. It is supposed that there are 17 N frequency points and K time points. The lofargram is divided into four parts in the frequency direction, i.e., 1 N–5 N, 4 N–9 N, 8 N–13 N, and 12 N–17 N, and the length of the overlapping part is N. Five-line spectra in the lofargram are represented by different colors. The function of the overlap is to prevent the loss of line-spectrum extraction. For example, the red line spectrum is incomplete in the first part (1 N–5 N in the frequency direction), which is difficult to extract successfully. However, the red line spectrum is complete and easily extracted in the second part (4 N–9 N in the frequency direction).

Fig. 3
figure3

Segmentation of lofargram

Algorithm processing flow

Figure 4 shows the algorithm processing flow, where C represents the set number of iterations.

Fig. 4
figure4

Flowchart of algorithm processing

The algorithm processing steps are as follows.

  1. 1.

    A fast Fourier transformation is performed for the acquired signal to obtain the lofargram spectrum and subject it to a grid process.

  2. 2.

    The taboo table is used to record the nodes visited by the ants. The taboo table is initialized to 1, and the node of the taboo table is set to 0 when the ant passes through the node.

  3. 3.

    M ants are placed randomly in the lofargram at the starting time, and the cost function \(P\_\cos (\xi )\) for each ant to proceed to the next node is calculated according to (8).

  4. 4.

    The heuristic factor \(\eta_{ij} \left( t \right)\) is calculated from the cost function \(P\_\cos (\xi )\) according to Eq. (12).

  5. 5.

    The state-transition function \(p_{ij}^{k} \left( t \right)\) for each ant to proceed to the next node is calculated, and the direction of each ant is determined using the roulette rule.

  6. 6.

    The taboo table is updated, and the node passed by the ant is set to 0. The path taken by each ant in each generation is recorded.

  7. 7.

    When the ants traverse the time axis of the entire lofargram, it marks the end of one iteration, and the above process is repeated.

  8. 8.

    The n paths with the minimum cost function are recorded, and a second threshold determination is performed to remove the false line spectra. Finally, the desired spectral line is obtained.

Results and discussion

The algorithm's feasibility is verified by simulation and sea-trial data, and the proposed algorithm is compared with the optimal path algorithm.

Simulation experiment

Single-frequency signals of 30, 70, and 150 Hz and a sampling frequency of 400 Hz are used in the simulation. The frequency resolution is 1 Hz, and the total signal duration is 50 s.

The parameters of the algorithm selected are as follows: \(\alpha = 7\), \(\beta = 7\),\(Rho = 0.1\), \(Q = 100\), \(m = 400\), and \(L = 100\). \(\alpha\) is the significance of the pheromone, \(\beta\) is the expectation factor, \(Rho\) is the pheromone volatilization coefficient, \(Q\) is the pheromone intensity coefficient, m is the ant number, and L is the number of iterations. The starting point of the ant is randomly placed at the start time of the LOFAR spectrum, and the ant reaches the destination when it finds the end time of the LOFAR spectrum.

As shown in Figs. 5, 6, 7, 8, the signal-to-noise ratios of the three spectral lines are all − 14 dB. Figure 5 shows that the signal-to-noise ratios of the spectral lines are low and the energies weak. Figure 6 shows the spectral lines extracted using the optimal path algorithm. The three spectral lines are numbered and marked with red lines. They are successfully extracted, but the performance for line (3) at 150 Hz is unsatisfactory, as the extracted line does not coincide well with the real line. For a more intuitive observation of the extracted spectral lines, the following error of the extracted spectral line with respect to the real spectral line is defined:

$$e = \sum\limits_{i = 1}^{N} {\left| {f_{t} \left( i \right) - f\left( i \right)} \right|} /N$$
(13)

where \(f_{t} \left( i \right)\) represents the extracted spectral line and \(f_{t} \left( i \right)\) the real spectral line. Based on Eq. (13), the average error of the three spectral lines is 0.78. Figure 7 shows the results of the extracted spectral lines using the proposed algorithm. The lines are numbered and marked with red lines. The three spectral lines are successfully extracted, and the average error of the three spectral lines is 0.06, indicating that the performance is better than that of the optimal path algorithm. Figure 8 shows the iteration curve of the algorithm, where the algorithm converges after approximately 44 iterations, which is rapid convergence.

Fig. 5
figure5

Original lofargram at signal-to-noise ratio of − 14 dB

Fig. 6
figure6

Line-spectrum-extraction results of proposed algorithm at − 14 dB

Fig. 7
figure7

Line-spectrum-extraction results of optimal path algorithm at − 14 dB

Fig. 8
figure8

Algorithm iteration curve at signal-to-noise ratio of − 14 dB

The variable detection probability \(P_{D}\) is defined in Eq. (14) to compare the performance of the two algorithms. Figure 9 shows the \(P_{D}\) of different line spectra using the two methods at a signal-to-noise ratio of − 14 dB. It can be seen that the \(P_{D}\) of different line spectra using the two methods are both high, and that of different line spectra using the proposed method is higher than that using the optimal path algorithm:

$$P_{D} = \frac{{{\text{Number}}\;{\text{of}}\;{\text{frequency}}\;{\text{points}}\;{\text{correctly}}\;{\text{detected}}}}{{{\text{Number}}\;{\text{of}}\;{\text{real}}\;{\text{line}}\;{\text{spectrum}}\;{\text{points}}\;}} \times 100\%$$
(14)
Fig. 9
figure9

PD of different line spectra using two methods studied at − 14 dB

The signal-to-noise ratio of all three spectral lines is set to − 16 dB to verify the algorithm's performance at an even lower signal-to-noise ratio, as shown in Fig. 10. As seen in the figure, the spectral lines' energy is weak, and parts are almost buried in the noise. Figure 11 shows the spectral lines extracted using the optimal path algorithm. They are numbered and marked with red lines. The three spectral lines are extracted, but the performance is unsatisfactory. The average error is 4.35. Figure 12 shows the spectral lines extracted using the proposed algorithm. As the figure shows, the spectral lines are generally well extracted. The average error of the three spectral lines is 0.11, showing good algorithm performance. Figure 13 shows the iteration curve of the algorithm and that the algorithm quickly converges after approximately 45 iterations.

Fig. 10
figure10

Original lofargram at signal-to-noise ratio of − 16 dB

Fig. 11
figure11

Line-spectrum-extraction results of optimal path algorithm at − 16 dB

Fig. 12
figure12

Line-spectrum-extraction results of proposed algorithm at − 16 dB

Fig. 13
figure13

Algorithm iteration curve at signal-to-noise ratio of − 16 dB

Figure 14 shows the \(P_{D}\) values of different line spectra using the two methods at a signal-to-noise ratio of − 16 dB. It can be seen that the performance of the optimal path algorithm is unsatisfactory at a relatively low signal-to-noise ratio. The \(P_{D}\) of line (3) is only 8%, indicating that only 8% of the frequency points of line (3) are successfully extracted, which is a poor result. However, the \(P_{D}\) of line (3) using the proposed algorithm is relatively good, reaching 70%, indicating that most of the frequency points can be successfully extracted. The other two lines can also be extracted completely, which is a satisfactory result.

Fig. 14
figure14

PD of different line spectra using two methods studied at − 16 dB

Figure 15 is a comparison of the detection probabilities of the two algorithms under different signal-to-noise ratios. The three lines' detection probabilities are averaged for comparison convenience, as shown in Eq. (15). The red line represents the average detection probability obtained using the optimal path algorithm, and the black line represents the average probability obtained using the algorithm proposed in this paper. The results under each signal-to-noise ratio are obtained after 200 Monte Carlo simulation tests. It can be seen from the figure that the detection probability of the proposed algorithm is always higher than that of the optimal path algorithm. Moreover, when the signal-to-noise ratio of the optimal path algorithm is lower than − 17 dB, the detection probability is already less than 50%, while the algorithm proposed in this paper has a detection probability of higher than 80% when the signal-to-noise ratio is − 19 dB, and the performance is better:

$$P_{D} \_{\text{average}} = \sum\limits_{i = 1}^{3} {P_{D} \left( i \right)} /3$$
(15)
Fig. 15
figure15

\(P_{D} \_average\) of the two algorithms under different signal-to-noise ratios

In Eq. (15), \(P_{D} \left( i \right)\) represents the three above-mentioned line spectra.

Sea-trial data verification

The effectiveness of the algorithm is then verified with the following two sets of sea-trial data.

Figure 16 shows the first set of sea-trial data for a merchant ship. These data are acquired at a sampling frequency of 10,240 Hz. Considering the actual processing needs, only the frequency band below 600 Hz is processed. The frequency resolution is 1 Hz, and the data length is 100 s. It can be seen from the figure that the original lofargram has more spectral lines, and several of them have weak energy. Figure 17 shows the line-spectrum-extraction results of the optimal path algorithm. As shown in the figure, most of the strong lines are extracted, but some weak lines are not, such as those at 381 and 400 Hz. Moreover, several false line spectra are shown, such as those at 91 Hz, and the performance is unsatisfactory. Figure 18 shows the results obtained after processing with the proposed algorithm. The figure shows that the spectral-line extraction is more complete and that the weak spectral lines, such as those at 140 and 150 Hz, are extracted more completely.

Fig. 16
figure16

Original lofargram of first set of data

Fig. 17
figure17

Extraction results of optimal path algorithm for first set of sea-trial data

Fig. 18
figure18

Extraction results of proposed algorithm for first set of sea-trial data

Figure 19 shows the second set of sea-trial data for another merchant ship, with more spectral lines with weaker energy. The data are processed under the same conditions as those described above. Figure 20 shows the line-spectrum-extraction results of the optimal path algorithm. The figure shows that most of the lines are extracted, but some weak lines are not, such as those at 403 and 448 Hz. In addition, several false line spectra are shown, such as those at 100 Hz. The results of the spectral lines extracted with the proposed algorithm are shown in Fig. 21. All the spectral lines are essentially entirely extracted, including the weak lines at 186 and 448 Hz.

Fig. 19
figure19

Original lofargram of second set of sea-trial data

Fig. 20
figure20

Extraction results of optimal path algorithm of second set of sea-trial data

Fig. 21
figure21

Extraction results of proposed algorithm of second set of sea-trial data

Conclusions

This research proposes a spectral-line-extraction algorithm based on the ant-colony and optimal path algorithms to address the difficulty of extracting spectral lines with a low signal-to-noise ratio. By designing a new ant search method and a heuristic function, the proposed algorithm combines the proposed cost functions and successfully applies the ant-colony algorithm to spectral line extraction. Simulation and sea-trial data show that the proposed algorithm possesses good spectral-line-extraction capability even at a low signal-to-noise ratio.

Availability of data and materials

Not applicable.

Abbreviations

EEMD:

Ensemble empirical mode decomposition

IMF:

Intrinsic mode function

References

  1. 1.

    J.C. Chen, K. Yao, R.E. Hudson, Acoustic source localization and beamforming: theory and practice. EURASIP J. Adv. Signal Process. (2003). https://doi.org/10.1155/S1110865703212038

    Article  MATH  Google Scholar 

  2. 2.

    D. Nie, K. Xie, F. Zhou, G. Qiao, A correlation detection method of low SNR based on multi-channelization. IEEE Signal Process. Lett. 27, 1375–1379 (2020). https://doi.org/10.1109/lsp.2020.3013769

    Article  Google Scholar 

  3. 3.

    P.C. Mignerey, A. Turgut, J.A. Schindall, D.J. Goldstein, Evaluation of relative entropy for distributed passive detection of weak acoustic signals. IEEE J. Oceanic Eng. 42(1), 219–230 (2016). https://doi.org/10.1109/joe.2016.2546388

    Article  Google Scholar 

  4. 4.

    H. Li, J. Gao, W. Du, T. Zhou, C. Xu, B. Chen, Object representation for multi-beam sonar image using local higher-order statistics. EURASIP J. Adv. Signal Process. (2017). https://doi.org/10.1186/s13634-017-0471-2

    Article  Google Scholar 

  5. 5.

    Q. Liu, A line spectrum extraction method based on ensemble empirical mode decomposition. Ship Electr. Eng. 40(6), 40–42 (2020). https://doi.org/10.3969/j.issn.1672-9730.2020.06.011

    Article  Google Scholar 

  6. 6.

    X. Zhu, C. Qiao, Q. Yang, A low-frequency line spectrum detection algorithm based on vector hydrophone instantaneous phase difference variance weighting. Audio Eng. 44(1), 24–27 (2020). https://doi.org/10.16311/j.audioe.2020.01.006

    Article  Google Scholar 

  7. 7.

    X. Han, S. Piao, S. Sheng, J. Guo, J. Xing, Line spectrum detection method of underwater target based on Gammatone autitory filter bank. Ship Electr. Eng. 10, 150–153 (2020). https://doi.org/10.13873/j.1000-9787(2020)10-0145-04

    Article  Google Scholar 

  8. 8.

    Y. Wang, S. Ma, N. Zou, G. Liang, Detection of unknown line-spectrum underwater target using space-time processing. J. Electron. Inf. Technol. 41(7), 1682–1689 (2019). https://doi.org/10.11999/JEIT180796

    Article  Google Scholar 

  9. 9.

    S. Suvorova, A. Melatos, R.J. Evans, W. Moran, P. Clearwater, L. Sun, Phase-continuous frequency line track-before-detect of a tone with slow frequency variation. IEEE Trans. Signal Process. 66(24), 6434–6442 (2018). https://doi.org/10.1109/tsp.2018.2877176

    MathSciNet  Article  MATH  Google Scholar 

  10. 10.

    J. Taghia, R. Martin, A frequency-domain adaptive line enhancer with step-size control based on mutual information for harmonic noise reduction. IEEE/ACM Trans. Audio Speech Lang. Process. 24(6), 1140–1154 (2016). https://doi.org/10.1109/taslp.2016.2545920

    Article  Google Scholar 

  11. 11.

    C.-Y. Ho, K.-K. Shyu, C.-Y. Chang, S.M. Kuo, Efficient narrowband noise cancellation system using adaptive line enhancer. IEEE/ACM Trans. Audio Speech Lang. Process. 28, 1094–1103 (2020). https://doi.org/10.1109/taslp.2020.2982578

    Article  Google Scholar 

  12. 12.

    S. Rajkumar, K. Sathesh, N.K. Goyal, Neural network-based design and evaluation of performance metrics using adaptive line enhancer with adaptive algorithms for auscultation analysis. Neural Comput Appl 32, 15131–15153 (2020). https://doi.org/10.1007/s00521-020-04864-0

    Article  Google Scholar 

  13. 13.

    N.J. Bershad, E. Eweda, J.C.M. Bermudez, Stochastic analysis of an adaptive line enhancer/canceler with a cyclostationary input. IEEE Trans. Signal Process. 64(1), 104–119 (2016). https://doi.org/10.1109/tsp.2015.2486745

    MathSciNet  Article  MATH  Google Scholar 

  14. 14.

    J. C. Di Martino, J. P. Haton, A. Laporte, Lofargram line tracking by multistage decision process, in 1993 IEEE International Conference on Acoustics, Speech, and Signal Processing. Pp. 317–320 (1993). https://doi.org/10.1109/ICASSP.1993.319119.

  15. 15.

    M. Dorigo, V. Maniezzo, A. Colorni, Ant system: optimization by a colony of cooperating agents. IEEE Trans. Syst. Man Cybern. B Cybern. 26(1), 29–41 (2002). https://doi.org/10.1109/3477.484436

    Article  Google Scholar 

  16. 16.

    Z. Pei, X. Chen, Improved ant colony algorithm and its application in obstacle avoidance for robot. CAAI Trans. Intell. Syst. 10(1), 90–96 (2015). https://doi.org/10.3969/j.issn.1673-4785.201311018

    Article  Google Scholar 

  17. 17.

    W. Wang, G. Tong, Multi-path unequal clustering protocol based on ant colony algorithm in wireless sensor networks. IET Netw. 9(2), 56–63 (2020). https://doi.org/10.1049/iet-net.2019.0096

    Article  Google Scholar 

  18. 18.

    C. Lei, H. Zhao, N. Jiang, Robot path planning based on particle swarm optimization and ant colony fusion algorithm. J. Chongqing Inst. Technol. 34(1), 235–241 (2020). https://doi.org/10.3969/j.issn.1674-8425(z).2020.01.031

    Article  Google Scholar 

  19. 19.

    C. Zhang, Y. Ling, M. Chen, Path planning of mobile robot based on an improved ant colony algorithm. J. Electron. Meas. Instrum. 30(11), 1758–1764 (2016). https://doi.org/10.13382/j.jemi.2016.11.018

    Article  Google Scholar 

  20. 20.

    Y. Xu, S. Bao, Energy consumption fuzzy control of robot motion path based on ant colony optimization. Chin. J. Constr. Mach. 18(2), 113–118 (2020)

    Google Scholar 

  21. 21.

    B. Wu, Z. Shi, An ant colony algorithm based partition algorithm for TSP. Chin. J. Comput. 24(12), 1328–1333 (2001). https://doi.org/10.3321/j.issn:0254-4164.2001.12.014

    MathSciNet  Article  Google Scholar 

  22. 22.

    J. Liu, J. Yang, H. Liu, P. Geng, M. Gao, Robot global path planning based on ant colony optimization with artificial potential field. Trans. Chin. Soc. Agric. Mach. 46(9), 18–27 (2015). https://doi.org/10.6041/j.issn.1000-1298.2015.09.003

    Article  Google Scholar 

Download references

Acknowledgements

The authors thank the participants who volunteered for this project, Weiguo Dai (Naval Submarine Academy) for technical support, and Yuan Zheng for technical help.

Funding

Not applicable.

Author information

Affiliations

Authors

Contributions

Author contributions were as follows: Yusheng Cheng contributed to conceptualization; Yusheng Cheng contributed to methodology; Yusheng Cheng and Kai Ma contributed to validation; Yusheng Cheng and Kai Ma contributed to formal analysis; Yusheng Cheng and Kai Ma contributed to investigation; Yusheng Cheng and Kai Ma contributed to data acquisition; Yusheng Cheng and Shilin Sun contributed to writing—original draft preparation; Yichuan Wang contributed to visualization; Haitao Li contributed to supervision. All authors approved the final, submitted version of the manuscript.

Corresponding author

Correspondence to Kai Ma.

Ethics declarations

Competing interests

The authors declare that they have no competing interests.

Additional information

Publisher's Note

Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Rights and permissions

Open Access This article is licensed under a Creative Commons Attribution 4.0 International License, which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and indicate if changes were made. The images or other third party material in this article are included in the article's Creative Commons licence, unless indicated otherwise in a credit line to the material. If material is not included in the article's Creative Commons licence and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this licence, visit http://creativecommons.org/licenses/by/4.0/.

Reprints and Permissions

About this article

Verify currency and authenticity via CrossMark

Cite this article

Cheng, Y., Ma, K., Li, H. et al. Spectral line extraction based on ant-colony algorithm. EURASIP J. Adv. Signal Process. 2021, 113 (2021). https://doi.org/10.1186/s13634-021-00823-6

Download citation

Keywords

  • Signal processing algorithms
  • Line-spectrum extraction
  • Sonar detection
  • Optimal algorithm