You are on page 1of 12

Article

Journal of Vibration and Control


2022, Vol. 28(23-24) 3664–3675

A feature extraction method of © The Author(s) 2021


Article reuse guidelines:
sagepub.com/journals-permissions
ship-radiated noise based on mathematical DOI: 10.1177/10775463211038123

morphological filtering
journals.sagepub.com/home/jvc

Zhao-xi Li1, Ya-an Li1 and Kai Zhang2

Abstract
In order to extract feature of ship signal more effectively, we propose a new approach for mathematical morphological
filtering based on the morphological features. Mathematical morphological filter is a new nonlinear filter, which can
effectively extract the edge contour and shape characteristics. The stimulation signal is processed by mathematical
morphological filtering of different structure elements, which confirms the effect of morphological filtering on suppressing
noise and preserving the nonlinear characteristics. Using flat structure element, the measured ship-radiated noise signals
are processed by average filter, and the filtered signals are analyzed on the frequency spectrum. Compared with other
filters, the result shows that the mathematical morphological filtering can successfully extract the effective information
from the ship-radiated noise signals.

Keywords
Feature extraction, mathematical morphological filtering, structure element, particle swarm optimization, envelope
spectrum entropy

1. Introduction
transformation. Mathematical morphological transformation
In the current development of underwater acoustic target decomposes a complex signal into various parts with
detection technology, ship target detection has always been physical meaning and separates it from the background while
a key research direction. Because ship-radiated noise in- maintaining its main morphological characteristics. It first
cludes physical laws of the ship’s navigational state, self- appeared and developed in image processing field (Haralick
vibration, and the interaction between the hull and the water et al., 1987). In the last few years, some scholars have in-
body, therefore the effective extraction characteristic of ship troduced it into the field of one-dimensional signal pro-
signal has become a problem worthy of study. cessing (Maragos, 1987; Maragos and Schafer, 2003) and
Ship signal has characteristic of nonlinear, non- have begun application in the preprocessing method for the
Gaussian, and non-stationary. So, the linear algorithm transient waveform in power system (Liu et al., 2004), fault
has some limitations in the feature extraction of ship signal diagnosis (Yu et al., 2018; Zhang et al., 2007), denoising of
(Wang and Zeng, 2014; Zhang, 2009). Many research EEG and ECG signals (Nishida et al., 1999; Yan et al., 2002),
studies have discussed the application of nonlinear ap- and underwater acoustic detection (Li et al., 2021a; Li et al.,
proaches including the application of wavelet transform 2021b; Wang et al., 2019).
(Zhang et al., 1997), Hilbert–Huang transform (Huang According to the characteristics of ship signal and the
et al., 1998), independent component analysis (Hyvarinen principle of mathematical morphology, a method for
and Oja, 2000), etc.(Li, 2020; Li et al., 2019a; Li et al.,
2019b; Wu and Huang, 2004) and have achieved certain 1
School of Marine Science and Technology, Northwestern Polytechnical
results in recent years. However, the computation of non- University, Xi’an, China
linear feature is relatively complicated. So, it is necessary to 2
Department of Computer & Information of Science & Engineering,
simplify the computation on the basis of ensuring the University of Florida, Gainesville, FL, USA
stability of the extracted feature and adopt a more concise Received: 26 March 2021; accepted: 21 July 2021
method to extract the nonlinear characteristic of ship signal,
Corresponding author:
so as to reduce the computation time. Li Yaan, School of Marine Science and Technology, Northwestern
Mathematical morphological filtering is an important Polytechnical University, Xi’an 710072, China.
nonlinear filter based on mathematical morphological Email: liyaan@nwpu.edu.cn
Li et al. 3665

extracting ship signal features based on mathematical operation to process the signal can also achieve the purpose
morphological filtering is proposed. First, according to the of simultaneously suppressing noise. According to the
different effects of different structure elements in signal different cascading order, morphological opening–closing
suppression and feature extraction, the optimal structure and closing–opening filter can be constructed. The OC and
element is selected for further analysis. Then, according to CO filter are, respectively, defined as follows
the filtering performance of different mathematical mor-
phological filters, the appropriate filter is selected, and OCFðf ðnÞÞ ¼ ðf +g•gÞðnÞ (5)
particle swarm optimization is introduced to determine the
optimal structure element length. Finally, by analyzing the COFðf ðnÞÞ ¼ ðf •g+gÞðnÞ (6)
measured signal and comparative experiments with other
filters, the signal-to-noise ratio (SNR) and fluctuation-based
dispersion entropy are used as evaluation index to verify the 2.2.2. Average filter. It can be seen from the effects of the
feasibility and superiority of this filter. opening and the closing operation, these two methods are
used to filter the signal, and then results are averaged re-
spectively. So, AVG filter plays a smoothing role that can be
2. Methods used to suppress the noise and defined as follows

2.1. Mathematical morphology AVGðf ðnÞÞ ¼ ½OCFðf ðnÞÞ þ COFðf ðnÞÞ


(7)
2
Let f ¼ 0; 1; 2,/, N  1 and g ¼ 0; 1; 2,/, M  1, re-
spectively, denote the discrete function f ðnÞ and gðmÞ, where
N ≥ M , f ðnÞ is one-dimensional discrete signal. gðmÞ is 2.3. Particle swarm optimization
structure element. The dilation of f ðnÞ by gðmÞ is defined by
Particle swarm optimization (Eberhart and Kennedy, 2002)
f Å gðnÞ ¼ max½f ðn  mÞ þ gðmÞ (1) is an intelligent swarm-optimized method with good global
optimization ability of parameters, which can avoid low
The effect of dilation is that the signal rises as a whole, and
efficiency and local optimum. Therefore, we adopt particle
the sharp angle is eliminated from the above signal, which
swarm optimization (PSO) to adaptively optimize the
can play a unilateral filtering role.
structure element parameters to improve the effect of feature
The erosion of f ðnÞ by gðmÞ is defined by
extraction. The flowchart for optimizing structure element
f Θ gðnÞ ¼ min½f ðn þ mÞ  gðmÞ (2) parameter is shown in Figure 1. The detailed process is
defined as follows:
The effect of erosion is the overall decline of the signal, the
sharp angle is eliminated from the signal, and the filtering 1. Initialize PSO parameters and determine fitness
effect is produced. function. The larger the number of particles and
In practice, opening and closing, like erosion and dilation, are evolution generations are, the more accurate the op-
dual transformations. The opening of f ðnÞ by gðmÞ is defined by timized parameters are. But it takes more time, so the
evolution generation and the number of particles are
ðf +gÞðnÞ ¼ ðf ΘgÅgÞðnÞ (3)
usually selected as 50–100. In this step, acceleration
and the closing of f ðnÞ by gðmÞ is defined by factors c1 and c2 are set as 2, random factor λ 2 ½0, 1,
weight coefficient ω is set as 0.6, evolutionary gen-
ðf •gÞðnÞ ¼ ðf ÅgΘgÞðnÞ (4) eration is 50, population size is 100, and particle
update velocity and particle swarm optimization range
are ½20, 20 and ½1, 10, respectively. Since the
2.2. Morphological filter envelope spectrum entropy can effectively measure
the periodic transient sequence, the envelope spec-
Morphological filter is a nonlinear transformation tech-
trum entropy is used as the fitness function to assess
nology, which is mainly used to locally modify the geo-
the separation characteristics. The basic principle is as
metric characteristics of the signal. It performs feature
follows:
extraction on shape information of input signal through
structure element of appropriate size. Morphological filter is
Hilbert transformation of input signal xðtÞ is defined by
combination of the four basic operations. The specific
Z
definition is as follows: 1 ∞ xðτÞ
hðtÞ ¼ HðxðtÞÞ ¼ dτ (8)
π ∞ t  τ
2.2.1. Morphological opening–closing (OC) and closing–
opening (CO) filter. Cascading opening and closing xðtÞ and hðtÞ formed the new complex signal
3666 Journal of Vibration and Control 28(23-24)

results are used as the initial particles to continue


updating.
3 Continue the iterative process, the individual local
extremum pio and the population global extremum goi
are updated by comparing the particle of fitness
values.
4 According to equation (12), update particle position xi ðtÞ
and velocity vi ðtÞ
(    
vi ðt þ 1Þ ¼ ωvi ðtÞ þ c1 λ pio  xi ðtÞ þ c2 λ goi  xi ðtÞ
xi ðt þ 1Þ ¼ xi ðtÞ þ vi ðt þ 1Þ
(12)

where i is ith particle in the population, t is the current


iteration number, ω is the inertia weight, c1 and c2 are ac-
celeration factors, and λ is random factor. vi 2 ½vmax ,vmax  is
the speed of particle movement and pi and pg are, re-
spectively, the historical optimal position of individual
particle and whole particle.

5 When the maximum evolutionary generation is calcu-


lated, the iteration stops, and the optimal structure ele-
ment length L and the minimum envelope entropy are
output. Otherwise, return step (2) continues the loop until
the stop condition is satisfied.
Figure 1. Particle swarm optimization flowchart.
3. Performance analysis of morphological
zðtÞ ¼ xðtÞ þ jhðtÞ (9) filter
Envelope signal is defined as In order to verify the morphological filter, we use Lorenz
pffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffi signal as input signal for the following simulation ex-
EðtÞ ¼ jzðtÞj ¼ x2 ðtÞ þ h2 ðtÞ (10) periment. Figure 2, respectively, shows Lorenz signal and
noisy Lorenz signal. The SNR of noisy Lorenz signal
Then, the obtained envelope signal is transformed by FFT, is 10 db.
namely, the envelope spectrum. Combining envelope
spectrum analysis with Shannon entropy, namely, envelope
spectrum entropy and defined as
3.1. Analyze the impact of the different structure
element shapes
8 XN
>
> He ¼  i¼1 pi •In pi We commonly used structure element shapes including
<
triangular type, semi-circular type, and flat type and
HX ðiÞ (11)
>
> compare the filtered results of four basic morphological
: pi ¼ PN
j¼1 HX ðjÞ
operations on the same noisy Lorenz signal under the same
length, same height, and different shapes of structure ele-
where HX ðiÞ is the envelope spectrum of xðtÞ and He is ment. Figure 3 shows the filtering results of flat structure
envelope spectrum entropy. According to the knowledge of element. Figure 4 reveals the filtering results of semi-
information theory, the stronger the sparse feature of the circular structure element. Figure 5 illustrates the filtering
signal is, the smaller the envelope entropy is. Specifically, results of triangular structure element.
the filtering result preferably obtains the boundary in- From the description of Figures 3–5, four basic oper-
formation of ship signal, so that extracted ship signal ations of morphology for processing input signal with three
features are more obvious. types of structure elements, and the results, are basically the
same. The difference is that processed signals are close to
2 Generated a random initial particle and velocity, the the original signal with different details. For example,
particle is corresponding to the parameter L of structure Figure 3(a) described dilation result of flat structure ele-
element, and calculated the fitness value. The calculation ment. The filtered signal has flat geometric characteristics,
Li et al. 3667

Figure 2. The input signal. (a) Lorenz signal and (b) the noisy Lorenz signal.

Figure 3. Flat structure element. (a) Dilation operation; (b) erosion operation; (c) opening operation; and (d) closing operation.

which is close to the original signal. It can be seen from 3.2. Analyze the filtering characteristics of
Figure 4(a) that dilation result of semi-circular structure morphological filters
element, the filtered signal is close to the original signal with
semi-circular geometric feature, and in the process of di- To research the filtering characteristics of different morpho-
lation with triangular structure element, the smoothing of logical filter, flat structure element with height of H ¼ 0 and
signal is approximate to the original signal based on the width of L ¼ 5 is used to calculate the amplitude–frequency
triangular geometric feature in Figure 5(a). Because the flat responses of OCF, COF, and AVG. The results are shown in
structure element has the characteristics of simple structure Figure 6. It can be found from Figure 6 that three moro-
and higher calculation efficiency, so we use flat structure phological filters have low-pass characteristics, which are
element for further analysis. suitable for the noise reduction of low-frequency noise.
3668 Journal of Vibration and Control 28(23-24)

Figure 4. Semi-circular structure element. (a) Dilation operation; (b) erosion operation; (c) opening operation; and (d) closing
operation.

Figure 5. Triangular structure element. (a) Dilation operation; (b) erosion operation; (c) opening operation; and (d) closing operation.
Li et al. 3669

Figure 7 is the amplitude–frequency response of OCF, use PSO to determine the length of structural element.
COF, and AVG at different structure element length. From Figure 8(a) is the curve of envelope spectrum entropy of
Figure 7, with the increase of structure element length, the input signal obtained by PSO with evolutionary generation.
normalized frequency will gradually decrease, that is, when the From Figure 8(a), when the envelope spectrum entropy
length L ¼ 32, normalized frequency is minimum. Figure 7(c) reaches 0.001311, it tends to be stable, and the corresponding
shows that the frequency response amplitude of AVG is close optimal structure element length is 10. Figure 8(b) is the
to the input signal. So, we use AVG for further research. result of AVG filtering of input signal by selecting the length
of structure element. Figure 8(c) is the amplitude spectrum of
3.3. Analyze the impact on the length of structure filtered signal. Figure 8(d) describes the envelope spectrum
analysis result of filtered signal. By observing Figure 8(c) and
element Figure 8(d), we found that the noise is weakened.
Structure element length is the main factor affecting the
morphological filter. If the selected length is too long, it may
cause the impact signal to be filtered as noise. If the selected 4. Experiment application
length is too short, a lot of noise will remain and the de-
4.1. Feature extraction using AVG filter
modulation of signal is difficult. According to Section 2.3, we
To demonstrate the validity of the proposed filter, four types
of measured ship signals (National Park Service, 2020)
(expressed by S-1, S-2, S-3, and S-4, respectively) are
analyzed by AVG filter. The size of each ship signal is 4500.
The sampling rate of each ship signal is 44100 Hz. The four
types of ship signals are normalized, and obtained results
are described in Figure 9. Figure 9 depicts the large am-
plitude distribution of ship signals at different frequencies.
Therefore, it is difficult to identify the ship characteristic.
We use flat structure element to conduct AVG filtering on
four kinds of ship signals. The filtered results are shown in
Figure 10. From Figure 10, amplitude of four types of ship
signals after AVG filter is reduced. Figure 11 displays the
frequency spectrum. As can be seen from Figure 11, low
frequencies are highlighted after the four types of ship
signals pass through the AVG filter.

4.2. Comparison experiment


Figure 6. Amplitude–frequency characteristics of three mor- In order to show the superiority of AVG filter, we made a
phological filters. comparison between median filter and Hilbert demodulation.

Figure 7. Amplitude–frequency characteristics. (a) OCF; (b) COF; and (c) AVG. Note: AVG: average filter.
3670 Journal of Vibration and Control 28(23-24)

Figure 8. Analyze results. (a) Variation curve of envelope spectrum entropy to evolutionary generation; (b) filtered signal; (c) amplitude
spectrum; and (d) envelope spectrum.

Figure 9. Four types of ship signals.


Li et al. 3671

Figure 10. Average filter filtering results.

Figure 11. The frequency spectrum.


3672 Journal of Vibration and Control 28(23-24)

Figure 12. Hilbert demodulation.

Figure 13. Median filter.


Li et al. 3673

Table 1. Comparison result.


Input signals SNR of input signals/(db) SNR of AVG filter/(db) SNR of Hilbert demodulation/(db) SNR of median filter/(db)
S-1 30.386 17.8202 4.7042 2.1134
S-2 13.6043 6.3534 4.2301 2.1671
S-3 30.6322 10.1071 4.7792 4.8683
S-4 8.9562 8.8226 4.0623 0.3690
Notes: SNR: Signal-to-noise ratio; AVG: average filter..

Figure 14. FDE. (a) The original result; (b) the result of AVG filter; (c) the result of Hilbert demodulation; and (d) the result of median
filter. Notes: FDE: fluctuation-based dispersion entropy; AVG: average filter.

Figure 12 illustrates the filtering results of Hilbert de- 5. The evaluation index of AVG filter
modulation. From Figure 12, the results of Hilbert de-
modulation are not real. The filtering results of median 5.1. Signal-to-noise ratio
filter are described in Figure 13. From the filtering results, The SNR (Chen et al., 2012) of ship signal is an indicator to
the waveform after median filter is relatively sharp, the evaluate the quality of AVG filter. The larger SNR, the better
amplitudes of four types of ship signals are very small, and the effect of filter. Table 1 compares SNR of four types of
the influence of noise still exits. So, AVG has the best ship signals and SNR of ship signal after AVG filter, Hilbert
effect of filter. demodulation, and median filter. The results indicated that
3674 Journal of Vibration and Control 28(23-24)

the SNR after AVG filtering is improved, which verifies the Author contributions
effectiveness of the AVG filter. Zhaoxi Li designed the project and wrote the manuscript; Yaan Li
and Kai Zhang help to revise the manuscript. All co-authors re-
5.2. Fluctuation-based dispersion entropy viewed and approved the final manuscript.

The original the signal with higher noise level, the higher
the entropy value. It shows that the signal has a higher Declaration of conflicting interests
complexity due to the influence of noise. After noise re- The author(s) declared no potential conflicts of interest with re-
duction processing, the complexity of the signal is reduced spect to the research, authorship, and/or publication of this article.
due to the filter, and its entropy value will also be reduced.
We randomly selected 72 sample data for each ship signal to Funding
calculate fluctuation-based dispersion entropy (FDE)
The author(s) disclosed receipt of the following financial support
(Rostaghi and Azami, 2016). The FDE of four types of ship for the research, authorship, and/or publication of this article:
signals, FDE of AVG filtering results, FDE of Hilbert de- Authors gratefully acknowledge the supported by National Natural
modulation results, and FDE of median filtering results are Science Foundation of China (No. 11874302, No.11574250 and
shown in Figure 14. Figure 14(a) indicated that the FDE of No.51179157).
S-2, S-3, and S-4 cannot distinguish directly. From
Figure 14(c), the FDE of S-3 and S-4 fluctuated from 0.4 to
ORCID iD
0.5. In Figure 14(d), the FDE of S-2 and S-3 fluctuated from
0.35 to 0.4. The FDE value in Figure 14(b) is the smallest after Zhao-xi Li  https://orcid.org/0000-0002-3480-0722
AVG filtering. In summary, FDE of four types of ship signals
after AVG filter can be distinguished.
References
Chen C, Xu C, Wang Y, et al. (2012) Research on an improved
6. Conclusions algorithm for SNR estimation. Radio Engineering 42(02):
For purpose of eliminating noise and extracting valuable 62–64.
Eberhart R and Kennedy J (2002) A new optimizer using particle
characteristics of ship signals, we use four basic morpho-
swarm theory. In: Mhs95 sixth international symposium on
logical operations to construct the AVG filter, which can use
micro machine & human science, Nagoya, Japan, 4–6 October
predetermined structure elements to match ship signals. 1995. IEEE.
Through the stimulation experiment, we analyzed the in- Haralick RM, Sternberg SR and Zhuang X (1987) Image analysis
fluence of structure element shape, structure element length, using mathematical morphology. IEEE Transactions on Pat-
and the selection of morphological operations on the filter tern Analysis and Machine Intelligence 9(4): 532–550.
performance. Then, a new method of ship signals based on Huang N, Long SR, Shen Z, et al. (1998) The empirical mode
mathematical morphological filtering is proposed in this decomposition and the hilbert spectrum for nonlinear and non-
article. The conclusion can be drawn as follows: stationary time series analysis. Proceedings Mathematical
Physical & Engineering Sciences, 454(1971), 903–995.
1. We introduce the mathematical morphological filter- Hyvärinen A and Oja E (2000) Independent component analysis:
algorithms and applications. Neural Networks: The Official
ing into the feature extraction of ship signal and prove
Journal of the International Neural Network Society 13(4):
AVG filters out interference noise better than Hilbert 411–430.
demodulation and median filter. Li Yx and Wang L (2020) A novel noise reduction technique for
2. Compared the effect of different shapes of structure el- underwater acoustic signals based on complete ensemble
ements on the stimulation signal; the experimental results empirical mode decomposition with adaptive noise, minimum
show the flat structure element effectively extracts the mean square variance criterion and least mean square adaptive
characteristics of ship signal than other structure element. filter. Defence Technology 16(3): 543–554.
3. The PSO algorithm is used to adaptively optimize the Li Z, Li Yand Zhang K (2019a) A feature extraction method of ship-
structure element parameters of AVG filter in order to radiated noise based on fluctuation-based dispersion entropy and
improve the feature extraction effect. intrinsic time-scale decomposition. Entropy 21(7): 693.
4. Evaluate the pros and cons of the filtering effect by Li Z, Li Y, Zhang K, et al. (2019b) A novel improved feature
extraction technique for ship-radiated noise based on IITD and
SNR and FDE of input signals and filtered signals. The
MDE. Entropy 21: 1215.
SNR of the proposed filtering results presented sig-
Li Y, Geng B and Jiao S (2021a) Refined composite multi-scale
nificant improvement. The complexity of ship signals reverse weighted permutation entropy and its applications in
is reduced due to the filtering of noise, and FDE value is ship-radiated noise. Entropy 23(4): 476.
also reduced accordingly. Therefore, the AVG filter can Li Y, Jiao S, Geng B, et al. (2021b) Research on feature extraction
better extract the effective characteristics of ship signals of ship-radiated noise based on multi-scale reverse dispersion
from complex marine background noise. entropy. Applied Acoustics 173: 107737.
Li et al. 3675

Liu Y, Lu F and Li C (2004) Research of periodic narrow- Wang X, Shiyuan MU, Jin LI, et al. (2019) An underwater acoustic
band interference suppression PD based on morphological signal detection algorithm based on morphological filtering.
filters. Chinese Society for Electrical Engineering 24(3): Radio Engineering 49(7): 611–616.
169–173. Wu Z and Huang NE (2004) A study of the characteristics of white
Maragos P and Schafer R (1987) Morphological filters–part II: noise using the empirical mode decomposition method. Pro-
their relations to median, order-statistic, and stack filters. IEEE ceedings of the Royal Society of London. Series A: Mathematical
Transactions on Acoustics, Speech, and Signal Processing 35: Physical and Engineering Sciences 460(2046): 1597–1611.
1170–1184. Yan S, Chan KL and Krishnan SM (2002) Ecg signal conditioning
Maragos P and Schafer RW (2003) Morphological filters part ii: by morphological filtering. Computers in Biology & Medicine
their relations to median, order- statistic, and stack filters. IEEE 32(6): 465–479.
Transactions on Acoustics, Speech, and Signal Processing Yu J, Li C and Lv J (2018) Average combination difference
35(8): 1170–1184. morphological filter analysis on fault signals of rolling bearing.
National Park Service (2020) Underwater Sounds Record. Available Journal of Zhejiang University (Engineering Science) 52(10):
at: https://www.nps.gov/glba/learn/nature/soundclips.htm. 1845–1853.
Nishida S, Nakamura M, Ikeda A, et al. (1999) Signal separation of Zhang Y (2009) Application of principal component analysis to
background eeg and spike by using morphological filter. ship-radiated noise classification and recognition. Applied
Medical Engineering & Physics 21(9): 601–608. Acoustics 28(1): 20–26.
Rostaghi M and Azami H (2016) Dispersion entropy: a measure Zhang X, Wang J and June R (1997) Feature extraction of ship
for time-series analysis. IEEE Signal Processing Letters 23: radited noises based on wavelet transform. Acta Acustica
610–614. 22(02): 139–144.
Wang S and Zeng X (2014) Robust underwater noise targets Zhang L, Yang D, Xu J, et al. (2007) Approach to extracting gear
classification using auditory inspired time-frequency analysis. fault feature based on mathematical morphological filtering.
Applied Acoustics 78(apr): 68–76. Chinese Journal of Mechanical Engineering 43(02): 71–75.

You might also like