SlideShare a Scribd company logo
SOFTWARE DEVELOPMENT AND IMPLEMENTATION OF A WHISTLER RECOGNI-
TION SYSTEM
AUTHORS: TYRON AMORETTI AND MATTHEW BEZUIDENHOUT
School of Electrical & Information Engineering, University of the Witwatersrand, Private Bag 3, 2050, Johannesburg, South Africa
Abstract: Whistler Recognition Software was developed for automatically detecting whistlers in high volumes of Very Low
Frequency (VLF) sound-recorded spectrograms. The software was designed and implemented using MATLAB R2015a’s Image
Processing Toolbox. The design compromised accuracy for simplicity and processing speed. Testing was done on 100 different
spectrograms and the system achieved a whistler detection accuracy of 71 %. The design met all of its success criteria and satisfied
the imposed constraints. A system overview as well as an analysis of existing solutions is included. A Strengths, Weaknesses,
Advantages and Trade-offs (SWAT) analysis was carried out and future recommendations followed. These included using OpenCV
for image processing, owing to its faster processing time and higher accuracy when compared with MATLAB.
Key words: Whistler Recognition Software, VLF, Whistler, Image Processing
1. INTRODUCTION
Whistlers are created by lightning sources striking
the Earth at a specific point, deflecting and prop-
agating through the magnetosphere, traveling along
the Earth’s magnetic field lines and reaching receivers
at conjugate points on the Earth in the opposite
hemisphere. It is the aim of this project to develop
a Whistler Recognition System (WRS) that can lo-
cate whistlers in a Very Low Frequency (VLF) sound
recorded WAVE File (WF) and flag these files con-
taining whistlers as important. The WRS has the ob-
jective of processing a given 60 second WF in under 30
seconds with a minimum 70 % accuracy. The system
is required because it provides an alternative to the
time consuming task of manually viewing potentially
hundreds of spectrograms in order to detect whistlers.
The design was implemented and tested to determine
the viability and success of the whistler detecting so-
lution.
2. BACKGROUND
This section describes the requirements, assumptions,
constraints and success criteria involved with the de-
sign. Also included is a discussion on existing WRS
designs.
2.1 Requirements
The requirements for the WRS are as follows:
• The WRS is required to detect WF containing
whistlers with more than 70 % accuracy.
• The WRS must process and analyse a 60 second
WF in less than 30 seconds.
• The WRS must be able to process 100 WF’s at a
time.
• The WRS must output only the spectrograms of
the WF’s containing whistlers.
2.2 Assumptions
In order to simplify the design of the WRS the follow-
ing assumptions were made:
• The sound files to be processed will be of the
WAVE format.
• The WF will be 60 seconds long.
• A whistler only occurs between 450 Hz and 4500
Hz.
• Any method can be used to detect whistlers for
example image processing or number correlation.
2.3 Constraints
The constraints that affected the design of the WRS
are as follows:
• The system had to be designed and implemented
within six weeks.
• The system had to run on both Linux and Win-
dows operating systems.
2.4 Success Criteria
The design is deemed a success if the requirements
described in Section 2.1 are met and the constraints
described in Section 2.3 are not violated.
2.5 Existing Solutions
A spectrogram created from a VLF sound file recorded
at a ground station is affected by additional signals
(noise) that include power line harmonics and VLF
transmitter broadcasts [1]. This noise is easily dis-
tinguishable by a human and a whistler can still be
detected, but it is far less accurate for a computer to
detect a whistler within a noisy spectrogram, as it is
searching for a specific shape within the spectrogram,
and the noise can overpower the presence of a whistler
causing a missed whistler, or noise can be detected
as a whistler, leading to a false positive [1], [2]. An-
other issue with computerised whistler detection is the
1
fact that each whistler trace on a spectrogram is al-
ways a slightly varied decaying exponential, as well as
the potential presence of breaks in the whistler trace,
causing a discontinuous line (see Figure 2, Appendix
A), which implies attempting to match a true whistler
with a synthesized whistler would present a challeng-
ing task[1]. In order to make whistler detection pos-
sible, noise has to be removed. It can be seen in [2]
that an effective method of noise removal is the use
of a median filter, as it distinguishes whistlers within
a spectrogram by removing noise and enhancing the
whistler. MATLAB’s image processing toolbox was
used as a detection accuracy of more than 80 % was
achieved in [2]. Both [3] and [1] used a convolution
method, whereby a general ideal synthesized whistler
is convolved through a spectrogram in order to create
another plot where all whistlers will be represented
as straight lines, which are easier to search for us-
ing a Hough transform. However, using this method
to achieve an analysis time of less than 30 seconds
on a 60 second WAVE file would require the process-
ing power equivalent of 12-15 computers, cluster built
each with 2.8 GHz quad core. This solution was im-
proved by using a method that focuses on the shape
and features of a whistler, thereby requiring far less
processing power; this was achieved as instead of con-
volving one image through another (a computation-
ally expensive process), the developed solution sim-
ply tries to detect similarities in two separate images.
This method still achieves accuracy greater than 80%
(see [2], [4]). Another improvement to processing time
was found to be converting a colour image into black
and white, as this removes a third of the pixels and
therefore a third of the processing time [5].
3. METHODOLOGY
3.1 Problem Specification
The WRS is designed according to the success criteria
mentioned in Section 2.4.
3.2 Design Method
The starting point of the design was to look at the
existing solutions in Section 2.5 and find a method
for detecting whistlers using software. This method
was deemed to be image processing as it was the sim-
plest to implement, requiring no advanced mathemat-
ical methods, such as a Gabour or Hough Transform
etc. The solutions were then used to create a model
for the WRS system (see Figure 1, Appendix A). The
system begins with noise removal due to the advan-
tages described in Section 2.5. The second step is to
prepare the data so that only the frequency range that
contains whistlers is left. It can be seen in Figure 2,
Appendix A that this range is between 450 Hz and
4500 Hz. The third step is to create a black and white
spectrogram. The final step is to use a feature recog-
nition program and a separate recognised whister in
order to locate whistlers in the newly prepared spec-
trogram.
The first step in implementing the WRS system model
was to create a noise cancelling function. The method
used to remove noise was a second order median fil-
ter; the motivation for using a second order filter in
testing was the fact that a first order did not appear
to remove enough noise. As opposed to this, anything
higher than a second order filter wasn’t used, as it
started to impact all the data and not just the noise.
The second step was to create a band pass filter with
a range of 450 Hz to 4500 Hz. It was decided through
testing that the best order of the filter to be used was
tenth order because any order below did not remove
the unwanted frequencies accurately, and any order
above affected the desired frequency range. The third
step then takes the spectrogram created from the con-
ditioned data and converts it from colour to a black
and white. The spectrogram is created using the left
channel of the WAVE file because it contained less
noise, thereby making whistlers easier to detect. The
process described above of conditioning the spectro-
gram can be seen in Figure 3, Appendix A.
Implementing the feature recognition system first be-
gan with using a Hough Transform method that could
detect straight lines. This proved unsuccessful, as
it completely ignored the approximately straight line
contained within a whistler and only detected per-
fectly straight lines (impulses). The second attempt
involved creating a program that was able take an im-
age of a whistler as an input, and then use the im-
age to search for a whistler within a spectrogram.
This method proved nsuccessful during testing be-
cause there was too much variation in the shape of
the whistlers in a spectrogram; this implies that the
whistler it was given did not match all of the whistlers
in the spectrogram. This lead to a different ap-
proach in which features of whistlers are matched
with different whistlers, as opposed to attempting to
match entire whislters. This was done using a feature
comparison image that contains several variations of
whistlers(see Figure 4, Appendix A) which the pro-
gram uses to search a given spectrogram for any fea-
ture that matches with one of the whistlers in the
image. This was tested and the program was able
to detect a whistler within a spectrogram. A benefit
of using this image made up of different whistlers is
that if a unique whistler occurs in spectrogram that
can’t be detected this whistler can be added to the
image, and any whistler similar to it will be found in
the future. The feature matching output can be seen
in Figure 5, Appendix A.
4. IMPLEMENTATION
The WRS was formed by combining all the functions
seen in the system model (Figure 1, Appendix A) and
was tested with 100 different spectrograms. It cor-
2
rectly found 15 of the 16 spectrograms which con-
tained whistlers, yielding a 94% accuracy in locating
files which contain whistlers. The whistler that was
undetected was within a very noisy spectrogram (see
Figure 2, Appendix B). It correctly found no matches
in 34 of 38 spectrograms which contained no whistlers
or impulses, implying a 10.5 % chance to falsely detect
noise as a whistler. This occurs as a result of matching
an arbitrary pixel with one in the whistler feature file.
One issue with the feature matching program is that it
detects very strong impulses, as they display features
of a whistler (see Figure 3, Appendix B). This was seen
in testing, as the program matched 24 impulses with
the given whislters out of 46 spectrograms containing
impulses, yielding a potential 52 % chance to wrongly
identify a strong impulse as a whistler. Overall, it
was seen that out of the 100 files, 71 were correctly
identified for having or not having whistlers. As such,
program is 71 % accurate. The program was able to
process each 60 second WAVE file in approximately
10 seconds, and could process 100 WAVE files at a
time and only outputted the spectrograms of the files
containing whistlers. The WRS was written using the
image processing toolbox in MATLAB R2015a.
5. SWAT ANALYSIS
5.1 Strengths
The WRS achieved a detection accuracy of 71 % and
met the accuracy requirement of the project. It was
able to detect 15 of the 16 spectrograms containing
whistlers and was only unable to detect a whistler
within a very noisy spectrogram. The WRS was able
to process a 60 second WAVE file in approximately 10
seconds (20 seconds faster than the requirement for
processing time). The program met the requirement
of processing 100 files at a time and outputted only
the spectrograms deemed to contain whistlers. MAT-
LAB is available on both Linux and Windows oper-
ating systems meaning the WRS system can run on
both platforms. The project was implemented within
6 weeks. The above results show that the design was
a success according to the success criteria described in
Section 2.4.
5.2 Weaknesses
The detection program has a 10.5 % to falsely detect
a whistler in a spectrogram containing no whistlers or
impulses. The most significant weakness is the fact
that approximately 50 % of a whistler (see Figure 2
Appendix A) is made up of an impulse; thus, if a
strong impulse is recorded as in Figure Appendix, a
whistler will be wrongly identified by the WRS due
to the similarities between a whistler and a strong
impulse. This resulted in a 52 % chance of matching
a strong impulse as a whistler within a spectrograms
containing only strong impulses.
5.3 Advantages
The WRS can be improved by adding unique unde-
tected whistlers to its feature comparison image, so
that any similar whistler that comes about in the fu-
ture can be detected.
5.4 Trade-Off’s
In order to save time on implementing the WRS sys-
tem, potentially more accurate methods of whistler
detections were ignored due to the time it would take
to become proficient in those methods. The methods
referred to are ones utilizing C++ and OpenCV image
processing library to carry out the feature matching
functions and advanced mathematical methods (such
as correlation and Gabour Transforms) in order to de-
tect whistlers within the raw data. The MATLAB
Image Processing Toolbox was chosen because of its
simplicity to use its built-in functions to program the
required functions for the WRS. It also meant pro-
cessing time and efficiency was sacrificed, as using
OpenCV for image processing or manipulating the raw
data would be quicker.
5.5 Future Recommendations
It is recommended that either OpenCV or raw data
manipulation is used to detect whistlers because of its
increase in accuracy as well as processing time. The
feature comparison image can possibly be improved
by removing the straight lines contained in it by fur-
ther truncating the spectrogram (limiting the upper
frequency range further), so that the upper straight
part of the whistler is entirely removed; after the
data has been conditioned to these requirements, only
the curved part of a whistler can be used for feature
matching, as it would share no similarities with an im-
pulse, however strong. Further improvements include
finding a more effective noise removal method than a
median filter, in order to recognise whistlers contained
in very noisy spectrograms.
6. CONCLUSION
The aim of the project was to design and implement
a Whistler Recognition System that met the success
criteria mentioned in section 2.4,thus providing a vi-
able whistler detecting solution. The WRS was able
to correctly detect spectrograms containing whistlers
with 71 % accuracy. It was able to process a 60 second
WAVE file in 10 seconds, and process 100 WAVE files
at a time. It only outputted the appropriate spectro-
grams. The design was a success, as all success criteria
were met and all constraints satisfied. The design has
an advantage in which its feature comparison image
can be updated with unique whistlers so that they
can be detected in future searches. It had a weak-
ness in incorrect whistler detection, as it recorded a
29 % chance of falsely detecting spectrograms contain-
3
ing whistlers, which was largely due to the fact that
strong impulses share a similar trait to whistlers (as
both contain straight lines). The design traded off pro-
cessing time and accuracy for time taken to implement
the WRS. Future recommendations include finding a
better noise removal method, truncating the spectro-
gram further and matching only the curved part of the
whistler, and using OpenCV for the image processing
functions.[3]
REFERENCES
[1] J.Lichtenberger, C.Ferencz, D.Hamar et al., “Au-
tomatic whistler detector and analyzer sys-
tem: Implementation of the analyzer algo-
rithm,” in JOURNAL OF GEOPHYSICAL
RESEARCH, December 2010. [Online]. Avail-
able: http://onlinelibrary.wiley.com/doi/10.1029/
2008JA013467/full?scrollTo=references
[2] K.Dharma, I.Bayupati, and P.Buana, “Automatic
lightning whistler detection using connected com-
ponent labeling method,” in Journal of Theoretical
and Applied Information Technology, August 2014,
p. 638. [Online]. Available: http://www.jatit.org/
volumes/Vol66No2/34Vol66No2.pdf
[3] A.Singh, S.Singh, R.Singh et al., “Whistlers
detected and analyzed by automatic whistler
detector (awd) at low latitude indian sta-
tions,” pp. 221 – 228, February 2014. [On-
line]. Available: http://www.sciencedirect.com/
science/article/pii/S1364682614000601
[4] E.Jeng, “Detection of whistler waves,” in CS229
Machine Learning, December 2010. [Online].
Available: http://onlinelibrary.wiley.com/doi/10.
1029/2008JA013467/full?scrollTo=references
[5] Matlab 6.5 image processing toolbox tutorial.
[Online]. Available: http://www.cs.otago.ac.nz/
cosc451/Resources/matlab ipt tutorial.pdf
4
Appendix
A Figures
Figure 1 : System model of the WRS.
Figure 2 : Spectrogram identifying a whistler and the region a whistler can be located in.
5
Figure 3 : Spectrograms showing what happens when the given WAVE file is passed through a second order
median filter, then a tenth order band pass filter and finally converted to black and white.
6
Figure 4 : Feature comparison image made up of several different whistlers.
Figure 5 : The output of the feature comparison program with each line pointing to a match with the feature
comparison image and a spectrogram.
7

More Related Content

What's hot

Online Divergence Switching for Superresolution-Based Nonnegative Matrix Fa...
Online Divergence Switching for  Superresolution-Based  Nonnegative Matrix Fa...Online Divergence Switching for  Superresolution-Based  Nonnegative Matrix Fa...
Online Divergence Switching for Superresolution-Based Nonnegative Matrix Fa...
奈良先端大 情報科学研究科
 
Depth Estimation of Sound Images Using Directional Clustering and Activation...
Depth Estimation of Sound Images Using  Directional Clustering and Activation...Depth Estimation of Sound Images Using  Directional Clustering and Activation...
Depth Estimation of Sound Images Using Directional Clustering and Activation...
奈良先端大 情報科学研究科
 

What's hot (7)

I0925259
I0925259I0925259
I0925259
 
Error Recovery with Relaxed MAP Estimation for Massive MIMO Signal Detection
Error Recovery with Relaxed MAP Estimation for Massive MIMO Signal DetectionError Recovery with Relaxed MAP Estimation for Massive MIMO Signal Detection
Error Recovery with Relaxed MAP Estimation for Massive MIMO Signal Detection
 
Online Divergence Switching for Superresolution-Based Nonnegative Matrix Fa...
Online Divergence Switching for  Superresolution-Based  Nonnegative Matrix Fa...Online Divergence Switching for  Superresolution-Based  Nonnegative Matrix Fa...
Online Divergence Switching for Superresolution-Based Nonnegative Matrix Fa...
 
Depth Estimation of Sound Images Using Directional Clustering and Activation...
Depth Estimation of Sound Images Using  Directional Clustering and Activation...Depth Estimation of Sound Images Using  Directional Clustering and Activation...
Depth Estimation of Sound Images Using Directional Clustering and Activation...
 
Tearhertz Sub-Nanometer Sub-Surface Imaging of 2D Materials
Tearhertz Sub-Nanometer Sub-Surface Imaging of 2D MaterialsTearhertz Sub-Nanometer Sub-Surface Imaging of 2D Materials
Tearhertz Sub-Nanometer Sub-Surface Imaging of 2D Materials
 
Sersc 3.org (1)
Sersc 3.org (1)Sersc 3.org (1)
Sersc 3.org (1)
 
Method for Estimation of Total Nitrogen and fiber Contents in Tealeaves With ...
Method for Estimation of Total Nitrogen and fiber Contents in Tealeaves With ...Method for Estimation of Total Nitrogen and fiber Contents in Tealeaves With ...
Method for Estimation of Total Nitrogen and fiber Contents in Tealeaves With ...
 

Viewers also liked

Viewers also liked (6)

National Society of Collegiate Scholars Partners With GiftedHire
National Society of Collegiate Scholars Partners With GiftedHireNational Society of Collegiate Scholars Partners With GiftedHire
National Society of Collegiate Scholars Partners With GiftedHire
 
Character design 2016
Character design 2016Character design 2016
Character design 2016
 
Rassegna film
Rassegna filmRassegna film
Rassegna film
 
certificate
certificatecertificate
certificate
 
Законотворчество и нормативно-правовое обеспечение
Законотворчество и нормативно-правовое обеспечениеЗаконотворчество и нормативно-правовое обеспечение
Законотворчество и нормативно-правовое обеспечение
 
Machine Intelligence: An executive introduction (NL)
Machine Intelligence: An executive introduction (NL)Machine Intelligence: An executive introduction (NL)
Machine Intelligence: An executive introduction (NL)
 

Similar to PracticalDesign2015

Optical Flow Based Navigation
Optical Flow Based NavigationOptical Flow Based Navigation
Optical Flow Based Navigation
Vincent Kee
 
1Noiseprint a CNN-based camera model fingerprintDavide .docx
1Noiseprint a CNN-based camera model fingerprintDavide .docx1Noiseprint a CNN-based camera model fingerprintDavide .docx
1Noiseprint a CNN-based camera model fingerprintDavide .docx
herminaprocter
 
1Noiseprint a CNN-based camera model fingerprintDavide .docx
1Noiseprint a CNN-based camera model fingerprintDavide .docx1Noiseprint a CNN-based camera model fingerprintDavide .docx
1Noiseprint a CNN-based camera model fingerprintDavide .docx
hyacinthshackley2629
 
Analysis of Various Image De-Noising Techniques: A Perspective View
Analysis of Various Image De-Noising Techniques: A Perspective ViewAnalysis of Various Image De-Noising Techniques: A Perspective View
Analysis of Various Image De-Noising Techniques: A Perspective View
ijtsrd
 
Smqt Based Fingerprint Enhancement And Encryption For Border Crossing Securit...
Smqt Based Fingerprint Enhancement And Encryption For Border Crossing Securit...Smqt Based Fingerprint Enhancement And Encryption For Border Crossing Securit...
Smqt Based Fingerprint Enhancement And Encryption For Border Crossing Securit...
theijes
 

Similar to PracticalDesign2015 (20)

IRJET- A Novel Hybrid Image Denoising Technique based on Trilateral Filtering...
IRJET- A Novel Hybrid Image Denoising Technique based on Trilateral Filtering...IRJET- A Novel Hybrid Image Denoising Technique based on Trilateral Filtering...
IRJET- A Novel Hybrid Image Denoising Technique based on Trilateral Filtering...
 
Comparison of Wavelet Watermarking Method With & without Estimator Approach
Comparison of Wavelet Watermarking Method With & without Estimator ApproachComparison of Wavelet Watermarking Method With & without Estimator Approach
Comparison of Wavelet Watermarking Method With & without Estimator Approach
 
A computer vision approach to speech enhancement
A computer vision approach to speech enhancementA computer vision approach to speech enhancement
A computer vision approach to speech enhancement
 
Survey on Different Methods for Defect Detection
Survey on Different Methods for Defect DetectionSurvey on Different Methods for Defect Detection
Survey on Different Methods for Defect Detection
 
Optical Flow Based Navigation
Optical Flow Based NavigationOptical Flow Based Navigation
Optical Flow Based Navigation
 
1Noiseprint a CNN-based camera model fingerprintDavide .docx
1Noiseprint a CNN-based camera model fingerprintDavide .docx1Noiseprint a CNN-based camera model fingerprintDavide .docx
1Noiseprint a CNN-based camera model fingerprintDavide .docx
 
1Noiseprint a CNN-based camera model fingerprintDavide .docx
1Noiseprint a CNN-based camera model fingerprintDavide .docx1Noiseprint a CNN-based camera model fingerprintDavide .docx
1Noiseprint a CNN-based camera model fingerprintDavide .docx
 
Uncompressed Video Streaming in Wireless Channel without Interpolation using ...
Uncompressed Video Streaming in Wireless Channel without Interpolation using ...Uncompressed Video Streaming in Wireless Channel without Interpolation using ...
Uncompressed Video Streaming in Wireless Channel without Interpolation using ...
 
A Study of Motion Detection Method for Smart Home System
A Study of Motion Detection Method for Smart Home SystemA Study of Motion Detection Method for Smart Home System
A Study of Motion Detection Method for Smart Home System
 
Deblurring Image and Removing Noise from Medical Images for Cancerous Disease...
Deblurring Image and Removing Noise from Medical Images for Cancerous Disease...Deblurring Image and Removing Noise from Medical Images for Cancerous Disease...
Deblurring Image and Removing Noise from Medical Images for Cancerous Disease...
 
B045050812
B045050812B045050812
B045050812
 
SVM Based Saliency Map Technique for Reducing Time Complexity in HEVC
SVM Based Saliency Map Technique for Reducing Time Complexity in HEVCSVM Based Saliency Map Technique for Reducing Time Complexity in HEVC
SVM Based Saliency Map Technique for Reducing Time Complexity in HEVC
 
A novel approach to record sound
A novel approach to record soundA novel approach to record sound
A novel approach to record sound
 
IRJET- Object Detection in Underwater Images using Faster Region based Convol...
IRJET- Object Detection in Underwater Images using Faster Region based Convol...IRJET- Object Detection in Underwater Images using Faster Region based Convol...
IRJET- Object Detection in Underwater Images using Faster Region based Convol...
 
International Journal of Engineering Research and Development
International Journal of Engineering Research and DevelopmentInternational Journal of Engineering Research and Development
International Journal of Engineering Research and Development
 
Frame detection.pdf
Frame detection.pdfFrame detection.pdf
Frame detection.pdf
 
Development and Implementation of VLSI Reconfigurable Architecture for Gabor ...
Development and Implementation of VLSI Reconfigurable Architecture for Gabor ...Development and Implementation of VLSI Reconfigurable Architecture for Gabor ...
Development and Implementation of VLSI Reconfigurable Architecture for Gabor ...
 
F0164348
F0164348F0164348
F0164348
 
Analysis of Various Image De-Noising Techniques: A Perspective View
Analysis of Various Image De-Noising Techniques: A Perspective ViewAnalysis of Various Image De-Noising Techniques: A Perspective View
Analysis of Various Image De-Noising Techniques: A Perspective View
 
Smqt Based Fingerprint Enhancement And Encryption For Border Crossing Securit...
Smqt Based Fingerprint Enhancement And Encryption For Border Crossing Securit...Smqt Based Fingerprint Enhancement And Encryption For Border Crossing Securit...
Smqt Based Fingerprint Enhancement And Encryption For Border Crossing Securit...
 

PracticalDesign2015

  • 1. SOFTWARE DEVELOPMENT AND IMPLEMENTATION OF A WHISTLER RECOGNI- TION SYSTEM AUTHORS: TYRON AMORETTI AND MATTHEW BEZUIDENHOUT School of Electrical & Information Engineering, University of the Witwatersrand, Private Bag 3, 2050, Johannesburg, South Africa Abstract: Whistler Recognition Software was developed for automatically detecting whistlers in high volumes of Very Low Frequency (VLF) sound-recorded spectrograms. The software was designed and implemented using MATLAB R2015a’s Image Processing Toolbox. The design compromised accuracy for simplicity and processing speed. Testing was done on 100 different spectrograms and the system achieved a whistler detection accuracy of 71 %. The design met all of its success criteria and satisfied the imposed constraints. A system overview as well as an analysis of existing solutions is included. A Strengths, Weaknesses, Advantages and Trade-offs (SWAT) analysis was carried out and future recommendations followed. These included using OpenCV for image processing, owing to its faster processing time and higher accuracy when compared with MATLAB. Key words: Whistler Recognition Software, VLF, Whistler, Image Processing 1. INTRODUCTION Whistlers are created by lightning sources striking the Earth at a specific point, deflecting and prop- agating through the magnetosphere, traveling along the Earth’s magnetic field lines and reaching receivers at conjugate points on the Earth in the opposite hemisphere. It is the aim of this project to develop a Whistler Recognition System (WRS) that can lo- cate whistlers in a Very Low Frequency (VLF) sound recorded WAVE File (WF) and flag these files con- taining whistlers as important. The WRS has the ob- jective of processing a given 60 second WF in under 30 seconds with a minimum 70 % accuracy. The system is required because it provides an alternative to the time consuming task of manually viewing potentially hundreds of spectrograms in order to detect whistlers. The design was implemented and tested to determine the viability and success of the whistler detecting so- lution. 2. BACKGROUND This section describes the requirements, assumptions, constraints and success criteria involved with the de- sign. Also included is a discussion on existing WRS designs. 2.1 Requirements The requirements for the WRS are as follows: • The WRS is required to detect WF containing whistlers with more than 70 % accuracy. • The WRS must process and analyse a 60 second WF in less than 30 seconds. • The WRS must be able to process 100 WF’s at a time. • The WRS must output only the spectrograms of the WF’s containing whistlers. 2.2 Assumptions In order to simplify the design of the WRS the follow- ing assumptions were made: • The sound files to be processed will be of the WAVE format. • The WF will be 60 seconds long. • A whistler only occurs between 450 Hz and 4500 Hz. • Any method can be used to detect whistlers for example image processing or number correlation. 2.3 Constraints The constraints that affected the design of the WRS are as follows: • The system had to be designed and implemented within six weeks. • The system had to run on both Linux and Win- dows operating systems. 2.4 Success Criteria The design is deemed a success if the requirements described in Section 2.1 are met and the constraints described in Section 2.3 are not violated. 2.5 Existing Solutions A spectrogram created from a VLF sound file recorded at a ground station is affected by additional signals (noise) that include power line harmonics and VLF transmitter broadcasts [1]. This noise is easily dis- tinguishable by a human and a whistler can still be detected, but it is far less accurate for a computer to detect a whistler within a noisy spectrogram, as it is searching for a specific shape within the spectrogram, and the noise can overpower the presence of a whistler causing a missed whistler, or noise can be detected as a whistler, leading to a false positive [1], [2]. An- other issue with computerised whistler detection is the 1
  • 2. fact that each whistler trace on a spectrogram is al- ways a slightly varied decaying exponential, as well as the potential presence of breaks in the whistler trace, causing a discontinuous line (see Figure 2, Appendix A), which implies attempting to match a true whistler with a synthesized whistler would present a challeng- ing task[1]. In order to make whistler detection pos- sible, noise has to be removed. It can be seen in [2] that an effective method of noise removal is the use of a median filter, as it distinguishes whistlers within a spectrogram by removing noise and enhancing the whistler. MATLAB’s image processing toolbox was used as a detection accuracy of more than 80 % was achieved in [2]. Both [3] and [1] used a convolution method, whereby a general ideal synthesized whistler is convolved through a spectrogram in order to create another plot where all whistlers will be represented as straight lines, which are easier to search for us- ing a Hough transform. However, using this method to achieve an analysis time of less than 30 seconds on a 60 second WAVE file would require the process- ing power equivalent of 12-15 computers, cluster built each with 2.8 GHz quad core. This solution was im- proved by using a method that focuses on the shape and features of a whistler, thereby requiring far less processing power; this was achieved as instead of con- volving one image through another (a computation- ally expensive process), the developed solution sim- ply tries to detect similarities in two separate images. This method still achieves accuracy greater than 80% (see [2], [4]). Another improvement to processing time was found to be converting a colour image into black and white, as this removes a third of the pixels and therefore a third of the processing time [5]. 3. METHODOLOGY 3.1 Problem Specification The WRS is designed according to the success criteria mentioned in Section 2.4. 3.2 Design Method The starting point of the design was to look at the existing solutions in Section 2.5 and find a method for detecting whistlers using software. This method was deemed to be image processing as it was the sim- plest to implement, requiring no advanced mathemat- ical methods, such as a Gabour or Hough Transform etc. The solutions were then used to create a model for the WRS system (see Figure 1, Appendix A). The system begins with noise removal due to the advan- tages described in Section 2.5. The second step is to prepare the data so that only the frequency range that contains whistlers is left. It can be seen in Figure 2, Appendix A that this range is between 450 Hz and 4500 Hz. The third step is to create a black and white spectrogram. The final step is to use a feature recog- nition program and a separate recognised whister in order to locate whistlers in the newly prepared spec- trogram. The first step in implementing the WRS system model was to create a noise cancelling function. The method used to remove noise was a second order median fil- ter; the motivation for using a second order filter in testing was the fact that a first order did not appear to remove enough noise. As opposed to this, anything higher than a second order filter wasn’t used, as it started to impact all the data and not just the noise. The second step was to create a band pass filter with a range of 450 Hz to 4500 Hz. It was decided through testing that the best order of the filter to be used was tenth order because any order below did not remove the unwanted frequencies accurately, and any order above affected the desired frequency range. The third step then takes the spectrogram created from the con- ditioned data and converts it from colour to a black and white. The spectrogram is created using the left channel of the WAVE file because it contained less noise, thereby making whistlers easier to detect. The process described above of conditioning the spectro- gram can be seen in Figure 3, Appendix A. Implementing the feature recognition system first be- gan with using a Hough Transform method that could detect straight lines. This proved unsuccessful, as it completely ignored the approximately straight line contained within a whistler and only detected per- fectly straight lines (impulses). The second attempt involved creating a program that was able take an im- age of a whistler as an input, and then use the im- age to search for a whistler within a spectrogram. This method proved nsuccessful during testing be- cause there was too much variation in the shape of the whistlers in a spectrogram; this implies that the whistler it was given did not match all of the whistlers in the spectrogram. This lead to a different ap- proach in which features of whistlers are matched with different whistlers, as opposed to attempting to match entire whislters. This was done using a feature comparison image that contains several variations of whistlers(see Figure 4, Appendix A) which the pro- gram uses to search a given spectrogram for any fea- ture that matches with one of the whistlers in the image. This was tested and the program was able to detect a whistler within a spectrogram. A benefit of using this image made up of different whistlers is that if a unique whistler occurs in spectrogram that can’t be detected this whistler can be added to the image, and any whistler similar to it will be found in the future. The feature matching output can be seen in Figure 5, Appendix A. 4. IMPLEMENTATION The WRS was formed by combining all the functions seen in the system model (Figure 1, Appendix A) and was tested with 100 different spectrograms. It cor- 2
  • 3. rectly found 15 of the 16 spectrograms which con- tained whistlers, yielding a 94% accuracy in locating files which contain whistlers. The whistler that was undetected was within a very noisy spectrogram (see Figure 2, Appendix B). It correctly found no matches in 34 of 38 spectrograms which contained no whistlers or impulses, implying a 10.5 % chance to falsely detect noise as a whistler. This occurs as a result of matching an arbitrary pixel with one in the whistler feature file. One issue with the feature matching program is that it detects very strong impulses, as they display features of a whistler (see Figure 3, Appendix B). This was seen in testing, as the program matched 24 impulses with the given whislters out of 46 spectrograms containing impulses, yielding a potential 52 % chance to wrongly identify a strong impulse as a whistler. Overall, it was seen that out of the 100 files, 71 were correctly identified for having or not having whistlers. As such, program is 71 % accurate. The program was able to process each 60 second WAVE file in approximately 10 seconds, and could process 100 WAVE files at a time and only outputted the spectrograms of the files containing whistlers. The WRS was written using the image processing toolbox in MATLAB R2015a. 5. SWAT ANALYSIS 5.1 Strengths The WRS achieved a detection accuracy of 71 % and met the accuracy requirement of the project. It was able to detect 15 of the 16 spectrograms containing whistlers and was only unable to detect a whistler within a very noisy spectrogram. The WRS was able to process a 60 second WAVE file in approximately 10 seconds (20 seconds faster than the requirement for processing time). The program met the requirement of processing 100 files at a time and outputted only the spectrograms deemed to contain whistlers. MAT- LAB is available on both Linux and Windows oper- ating systems meaning the WRS system can run on both platforms. The project was implemented within 6 weeks. The above results show that the design was a success according to the success criteria described in Section 2.4. 5.2 Weaknesses The detection program has a 10.5 % to falsely detect a whistler in a spectrogram containing no whistlers or impulses. The most significant weakness is the fact that approximately 50 % of a whistler (see Figure 2 Appendix A) is made up of an impulse; thus, if a strong impulse is recorded as in Figure Appendix, a whistler will be wrongly identified by the WRS due to the similarities between a whistler and a strong impulse. This resulted in a 52 % chance of matching a strong impulse as a whistler within a spectrograms containing only strong impulses. 5.3 Advantages The WRS can be improved by adding unique unde- tected whistlers to its feature comparison image, so that any similar whistler that comes about in the fu- ture can be detected. 5.4 Trade-Off’s In order to save time on implementing the WRS sys- tem, potentially more accurate methods of whistler detections were ignored due to the time it would take to become proficient in those methods. The methods referred to are ones utilizing C++ and OpenCV image processing library to carry out the feature matching functions and advanced mathematical methods (such as correlation and Gabour Transforms) in order to de- tect whistlers within the raw data. The MATLAB Image Processing Toolbox was chosen because of its simplicity to use its built-in functions to program the required functions for the WRS. It also meant pro- cessing time and efficiency was sacrificed, as using OpenCV for image processing or manipulating the raw data would be quicker. 5.5 Future Recommendations It is recommended that either OpenCV or raw data manipulation is used to detect whistlers because of its increase in accuracy as well as processing time. The feature comparison image can possibly be improved by removing the straight lines contained in it by fur- ther truncating the spectrogram (limiting the upper frequency range further), so that the upper straight part of the whistler is entirely removed; after the data has been conditioned to these requirements, only the curved part of a whistler can be used for feature matching, as it would share no similarities with an im- pulse, however strong. Further improvements include finding a more effective noise removal method than a median filter, in order to recognise whistlers contained in very noisy spectrograms. 6. CONCLUSION The aim of the project was to design and implement a Whistler Recognition System that met the success criteria mentioned in section 2.4,thus providing a vi- able whistler detecting solution. The WRS was able to correctly detect spectrograms containing whistlers with 71 % accuracy. It was able to process a 60 second WAVE file in 10 seconds, and process 100 WAVE files at a time. It only outputted the appropriate spectro- grams. The design was a success, as all success criteria were met and all constraints satisfied. The design has an advantage in which its feature comparison image can be updated with unique whistlers so that they can be detected in future searches. It had a weak- ness in incorrect whistler detection, as it recorded a 29 % chance of falsely detecting spectrograms contain- 3
  • 4. ing whistlers, which was largely due to the fact that strong impulses share a similar trait to whistlers (as both contain straight lines). The design traded off pro- cessing time and accuracy for time taken to implement the WRS. Future recommendations include finding a better noise removal method, truncating the spectro- gram further and matching only the curved part of the whistler, and using OpenCV for the image processing functions.[3] REFERENCES [1] J.Lichtenberger, C.Ferencz, D.Hamar et al., “Au- tomatic whistler detector and analyzer sys- tem: Implementation of the analyzer algo- rithm,” in JOURNAL OF GEOPHYSICAL RESEARCH, December 2010. [Online]. Avail- able: http://onlinelibrary.wiley.com/doi/10.1029/ 2008JA013467/full?scrollTo=references [2] K.Dharma, I.Bayupati, and P.Buana, “Automatic lightning whistler detection using connected com- ponent labeling method,” in Journal of Theoretical and Applied Information Technology, August 2014, p. 638. [Online]. Available: http://www.jatit.org/ volumes/Vol66No2/34Vol66No2.pdf [3] A.Singh, S.Singh, R.Singh et al., “Whistlers detected and analyzed by automatic whistler detector (awd) at low latitude indian sta- tions,” pp. 221 – 228, February 2014. [On- line]. Available: http://www.sciencedirect.com/ science/article/pii/S1364682614000601 [4] E.Jeng, “Detection of whistler waves,” in CS229 Machine Learning, December 2010. [Online]. Available: http://onlinelibrary.wiley.com/doi/10. 1029/2008JA013467/full?scrollTo=references [5] Matlab 6.5 image processing toolbox tutorial. [Online]. Available: http://www.cs.otago.ac.nz/ cosc451/Resources/matlab ipt tutorial.pdf 4
  • 5. Appendix A Figures Figure 1 : System model of the WRS. Figure 2 : Spectrogram identifying a whistler and the region a whistler can be located in. 5
  • 6. Figure 3 : Spectrograms showing what happens when the given WAVE file is passed through a second order median filter, then a tenth order band pass filter and finally converted to black and white. 6
  • 7. Figure 4 : Feature comparison image made up of several different whistlers. Figure 5 : The output of the feature comparison program with each line pointing to a match with the feature comparison image and a spectrogram. 7