Professional Documents
Culture Documents
Acquisition and Analysis of Passive Acoustic Data
Acquisition and Analysis of Passive Acoustic Data
ON
NAME ID NO
Signature of student
Signature of PS faculty :
Date :
ACKNOWLEDGEMENTS
For the above, we would firstly like to thank Professor Sunil Kumar Singh,
Director, NIO Goa for the opportunity to work in CSIR-NIO.
We would also like to express our deepest gratitude and thank our mentor, Mr.
William A Fernandes, who, in spite of his busy schedule, took time out to hear
and guide us, and provide his full support in our project in any way possible.
Lastly, we would like to thank our PS instructor, Dr. Pravin Mane for providing
us his constant support and supervision, and for his valuable suggestions which
proved to be of great value for us to complete our project.
Special thanks to BITS PILANI for providing us this golden opportunity in the
form of Practice School.
FIGURES AND TABLES
FIGURES:
TABLES:
The institute has a sanctioned strength of 200 scientists and 100 technical support
staff. The major research areas include the four traditional branches of
oceanography - biological, chemical, geological/geophysical, and physical – as
well as ocean engineering, marine instrumentation and marine archaeology
The institute has numerous state-of-the-art laboratories at its headquarters in Goa
as well as the regional centres. It also operates two research vessels RV Sindhu
Sankalp (56 m) and RV Sindhu Sadhana (80 m) that are equipped for
multidisciplinary oceanographic observations. The institute has a library with
15,000 books and 20,000 back volumes of research journals, making it the best
collection of printed literature on ocean sciences in the country.
In addition to basic research, the institute also carries out applied research
sponsored by the industry. These studies include oceanographic data collection,
environmental impact assessment, and modelling to predict environmental
impact. The institute also provides consultancy on a number of issues including
marine environmental protection and coastal zone regulations.
With the largest collection of ocean scientists in the country, and equipped with
suitable ocean research infrastructure, CSIR-NIO serves as an advanced centre of
education in ocean sciences. It has a School of Oceanography under the Academy
of Scientific & Innovative Research (AcSIR). In addition, it is a recognized centre
for doctoral research by a large number of universities. There are at present over
100 Junior/Senior Research Fellows (qualified through CSIR/UGC eligibility
criterion) pursuing their doctoral studies in the institute. In addition, about 300
undergraduate and postgraduate students pursue their project research at this
institute every year.
INTRODUCTION
In this report, we are presenting a Single Channel Data Logger and the data
associated with it from laboratory tests. Further, we shall present the signal
processing system we have developed to analyse the data obtained from the
laboratory tests mentioned earlier.
DESIGN OF LOGGER
The Single Channel Data Logger designed was done so around a Teensy 3.6
cortex-M4F ARM(Advanced RISC Machine) processor board. The Teensyduino
software provides integrated support for Teensy microcontrollers within the
Arduino IDE software platform by adding microcontroller specific libraries and
the compiled program download utility that loads the program to the
microcontroller memory. While designing the circuit for the above, a signal
conditioning board(using an LM-324) was tested. However, owing to the fact that
better results were obtained without the latter, the LM-324 was scrapped. Hence,
the final circuit used in the logger was-
V1
Vibrations in
water
Hydrophone
Teensy 3.6
Junction Box
with battery
Further, the following pipettes were used to generate bubbles in the water.
25 mL Mohr-type
borosil pipette
10 mL Mohr-type
borosil pipette
1 mL Mohr-type
borosil pipette
At the same time, the teensy was instructed to log the hydrophone input received
upon generating the bubbles. This data will then be processed and analysed in
accordance to the signal processing system elaborated upon later in this report.
The laboratory log associated with the above data acquisition can be found on the
next page.
Sl. Date Time Filename Sampling Recording Event Remarks
no. (in hrs) Interval Interval
1 12/06/2019 1040 DATALOG1. 60s 15s Multiple bubbles generated at a wind, keyboard noises present,
dat time, small bubble, 1 mL Mohr- bubble generation also causes
type borosil pipette disturbances
2 12/06/2019 1041 DATALOG2. 60s 15s Multiple bubbles generated at a wind, keyboard noises present,
dat time, small bubble, 1 mL Mohr- bubble generation also causes
type borosil pipette disturbances
3 12/06/2019 1042 DATALOG3. 60s 15s Multiple bubbles generated at a wind, keyboard noises present,
dat time, small bubble, 1 mL Mohr- bubble generation also causes
type borosil pipette disturbances
4 12/06/2019 1043 DATALOG4. 60s 15s Multiple bubbles generated at a wind, keyboard noises present,
dat time, medium sized bubble, bubble generation also causes
10mL Mohr-type borosil pipette disturbances
5 12/06/2019 1045 DATALOG5. 60s 15s Multiple bubbles generated at a wind, keyboard noises present,
dat time, medium sized bubble, bubble generation also causes
10mL Mohr-type borosil pipette disturbances
6 12/06/2019 1046 DATALOG6. 60s 15s Multiple bubbles generated at a wind, keyboard noises present,
dat time, medium sized bubble, bubble generation also causes
10mL Mohr-type borosil pipette disturbances
7 12/06/2019 1047 DATALOG7. 60s 15s Multiple bubbles generated at a wind, keyboard, phone ringing
Signal processing of the acquired signal is done through apps and functions
available in the signal processing toolbox of MATLAB software.
Signal Enveloping:
Absolute pressure value of the signal is taken before calculating the SNR. This
causes redundancy in detections of the same signal. We, hence, want to allow
only the detection with highest SNR values. Hence, amplitude function, or
envelope A(t) is calculated.
The absolute pressure value of the main signal has an oscillating part as well-
which is to be excluded. So, the envelope is calculated using the absolute value
of a time series, called an 'analytic signal'. In the analytic signal, we get rid of the
oscillating part by introducing a complex term.
In the process of assigning the signal to different biological species, we extract
different signals in time domain. In such an extraction, signal enveloping is the
first step. This is because the pressure envelope is never less than the absolute
pressure.
There are 3 methods of finding the signal envelope- Peak, RMS and Hilbert
Transforms.
RMS Transforms:
In, RMS we create a zero mean signal, by squaring our signal. We use a moving
time window. The selected length of the window will impact how "smoothed" the
signal becomes. Small window lengths will lead to rugged envelope. Large
window lengths smoothens the envelope.
Fig 10 : RMS Envelope
Hilbert Transforms:
It is hard to generate an analytic signal for long time series. Analytic signal can
be generated easily with a digital filter called Hilbert transforms. It is based on
the principle that for an analytic, complex valued time signal, the imaginary part
is 90 degrees phase shifted relative to the real part. The analytic time series,
hence constructed, has original time series as the real part and the Hilbert-
transformed time series as the imaginary part of the analytical time series.
Hilbert transforms differ from ideal filters because they have a finite impulse
response; the filter is a causal filter and we apply an additional window function
to improve the gain characteristics. Also, the causality of the filter delays the
filter response by half the window length.
Fig 11 : Hilbert Envelope
Peak Transforms:
This envelope detection method involves squaring the input signal and applying
lowpass filter to this signal. Squaring the signal demodulates the input. You
then downsample this signal to reduce the sampling frequency. After this, pass
the signal through a minimum-phase, lowpass filter to eliminate the high
frequency energy.
This envelope detection method is easy to implement and can be done with a
low-order filter, which minimizes the lag of the output.
Fig 12 : Peak Envelope
EXPLORATION OF SIGNAL
Spectrogram:
It is a way to represent the Short time fourier transform (STFT). Magnitude of
STFT {X(w,t)} gives Spectrogram.
Periodogram:
PSD is a method to visualise what effects our window functions have had on
our spectrum, while constructing the spectrogram. If we construct a power
spectral density we can visualise in terms of spikes observed. Better the window
function, the sharper the peak that we obtain. Short windows which are used to
construct spectrograms, can result in low frequency resolution and that can be
further viewed in PSD.
There are two main methods of power spectral density estimation: non-parametric
and parametric.
Non-parametric methods: They have less computational cost. These include
methods like: periodograms and correlograms. Periodograms direct methods
include the sample spectrum, Bartlett's method, Welch's method, and the Daniell
Periodogram. Correlograms use the concept called as Wiener-Khinchin theorem.
Parametric methods model the signal before its power spectral density estimate
is done. There are two types of parametric methods: autoregressive methods and
subspace methods.
• PSD using Welch's method: Welch's method works upon the periodogram
by addressing the lack of the ensemble averaging which is present in the
true PSD formula.
• PSD using periodogram: It is a special case of Welch's method with a
single segment, rectangular or triangular windowing, and no overlap. It's
computationally cheap.
ANNEXURE A
#include <SD.h>
#include <Bounce.h>
#include <SPI.h>
#include <TimeLib.h>
time_t getTeensy3Time()
{
return Teensy3Clock.get();
}
void setup()
{
setSyncProvider(getTeensy3Time);
Serial.begin(115200);
while (!Serial) ;
if (timeStatus()!= timeSet) {
Serial.println("Unable to sync with the RTC");
} else {
Serial.println("RTC has set the system time");
}
if (Serial.available()) {
t=processSyncMessage();
if (t != 0) {
Teensy3Clock.set(t); // set the RTC
setTime(t);
}
}
if (!SD.begin(chipSelect)) {
Serial.println("Card failed, or not present");
return;
}
pinMode(33,INPUT);
sec=second();
minu=minute();
ho=hour();
x=&high;
y=&low;
}
void loop()
{
//Sampling frequency is 56kHz
File dataFile = SD.open(filename[a-1], FILE_WRITE);
time1=micros();
time4=micros();
if(a!=1)
{
micro=micro+time1-time3;
timeUpgrade();
}
writeTime();
Serial.print("Extra Time:");
Serial.println(time1-time3);
for(int i=1;i<=3360000;i++)
{
delayMicroseconds(1);
var=analogRead(33);
Serial.println(var);
high=highByte(var);
low=lowByte(var);
if ((dataFile)) {
dataFile.write(y,1);
dataFile.write(x,1);
}
else {
Serial.println("error opening datalogX.bin");
}
}
time2=micros();
time3=micros();
Serial.print("Time required to input and write the data:");
Serial.println(time2-time4);
micro=micro+time2-time4;
timeUpgrade();
writeTime();
dataFile.close();
a++;
delay(15000);
if(a>=11)
exit(1);
}
void timeUpgrade()
{
if(micro>=1000000)
{
sec=sec+(micro/1000000);
micro=micro%1000000;
}
if(sec>=60)
{
minu=minu+sec/60;
sec=sec%60;
}
if(minu>=60)
{
ho=ho+minu/60;
minu=minu%60;
}
}
void writeTime()
{
File timeFile = SD.open("timelog.txt", FILE_WRITE);
if(d%2==0)
{
timeFile.print("Run ");
timeFile.print(a);
}
timeFile.print(" ");
timeFile.print(day());
timeFile.print(" ");
timeFile.print(month());
timeFile.print(" ");
timeFile.print(year());
timeFile.print(" ");
timeFile.print(ho);
timeFile.print(":");
if(minu < 10)
{
timeFile.print('0');
timeFile.print(minu);
timeFile.print(":");
}
else
{
timeFile.print(minu);
timeFile.print(":");
}
if(sec< 10)
{
timeFile.print('0');
timeFile.print(sec);
}
else
{
timeFile.print(sec);
}
if(micro==0)
{
timeFile.print(":000000 ");
}
else if(micro<1000)
{
timeFile.print(":000");
timeFile.print(micro);
timeFile.print(" ");
}
else if(micro<10000)
{
timeFile.print(":00");
timeFile.print(micro);
timeFile.print(" ");
}
else if(micro<100000)
{
timeFile.print(":0");
timeFile.print(micro);
timeFile.print(" ");
}
else
{
timeFile.print(":");
timeFile.print(micro);
timeFile.print(" ");
}
if(d%2==1)
timeFile.println();
timeFile.close();
d++;
}
ANNEXURE B
#include<fstream>
#include<iostream>
#include<stdlib.h>
int main()
{
std::ifstream ifile;
std::ofstream ofile;
ifile.open("/Users/Prateek/Documents/nio/Bubble Data 3/Bubble Data 3
dat/DATALOG8.dat");
ofile.open("/Users/Prateek/Documents/nio/Bubble Data 3/Bubble data 3
txt/DATALOG8.txt");
int data=0,b=0;
int data1=0;
while(ifile)
{
if(b==0)
{
ifile.read((char*)&data,2);
b=1;
data1=data;
continue;
}
ofile<<data1<<','<<std::endl;
ifile.read((char*)&data,2);
std::cout<<data1<<'\n';
data1=data;
}
ifile.close();
ofile.close();
return 1;
}
REFERENCES
1. Zimmer, Walter M.X.(2011). Passive Acoustic Monitoring of Cetacean.
2.