Creating Graphics For The Channel Impulse Response in Underwater Acoustics With MATLAB
Creating Graphics For The Channel Impulse Response in Underwater Acoustics With MATLAB
Creating Graphics For The Channel Impulse Response in Underwater Acoustics With MATLAB
35.25
10
46.5
50.25
15
54
57.75
61.5
20
65.25
69
25
72.75
76.5
80.25
45
50
55
60
65
Time Delay (ms)
70
75
80
30
39
42.75
Introduction
The channel impulse response (CIR) is an important measure for any medium
of communication. From LTI theory, an impulse response allows for a system output to be predicted based on the system input. Because many
channels for communication are time-varying, having frequent updates of
the CIR (known as channel probing) is key to being able to interpret communications sequences. This is a brief tutorial that goes over the process of
creating CIR plots via MATLAB 2014a.
We will use the Shallow-water Acoustic Variability EXperiment 2015 (SAVEX15)
dataset obtained by the Marine Physical Laboratory. The SAVEX15 experiment carried out research to explore the use of underwater acoustics as a
means of communication. Being able to communicate underwater would
allow for autonomous underwater vehicles (AUVs) to perform environmental monitoring and ocean exploration while continuously sending data back
to research labsthis would eliminate the need for expensive sea trips and
would allow for higher-frequency data collection.
Experiment Background
SAVEX15 took place in shallow waters of 100 m depth from May 1428,
2015 in an area 100 km southwest of Jeju Island, Korea in the Northern
East China Sea.
The the method for the channel probing experiments from SAVEX15 can
be simply stated: play a channel probing sound signal from a transducer
and record it with a receiver positioned some kilometers away from the
transducer. There were two main sets of experiments: the first involved
a stationary source and a stationary receiver, and the second involved a
moving source and a stationary receiver. In the former, the source was a
vertical array of 8 elements with 7.5 m of spacing in between, and the first
transducer was positioned at a depth of 20 m. Each transducer is played
one-at-a-time in a round-robin format to observe the effect of source depth
on acoustic propagation. In the latter, the source was attached to a vessel
at a depth of around 4050 m while the vessel was towed by the ship at
a speed of about 1.52 m/s. In both cases, the receiver recorded audio at
100 kHz and it consisted of a vertical array of 16 elements with 3.75 m of
spacing in between, where the first receiver was positioned at a depth of 24
m. The receiver also high-pass filtered the signal with a cutoff frequency of
500 Hz to remove low frequency ship noise.
For the stationary source experiments, the transmission schedule repeated
every hour, and each minute consisted of a transmission. There were 16
minutes from the hour devoted to channel probing source signals. For the
moving source experiments, the transmission schedule repeated every 4 minutes, with the first minute being devoted to channel probing. The source
signals consisted of variations of linear frequency modulated (LFM) chirps
and maximal length sequences (MLS), also known as m-sequences. The
LFM chirp was 60 ms long, and it was appended with 60 ms of silence to repeat periodically every 120 ms. The MLS period ranged from 25.5127 ms,
and they were repeated periodically without any silence in between. Both
source signals were repeated to fill up about 55 seconds of the minute.
Recipe
3.1
First, we want to save one period of our source sequences into a .mat file
so we can easily call load() in our MATLAB script. If we are given the
whole 1 minute source file, we only want to extract one period of the source
signal. For the LFM chirp, it is only necessary to save the 60 ms of the chirp
sounding. For extracting one period of a MLS, it is useful to know parameters such as the symbol rate or duration (which tell us how many samples it
3
takes to convey one digit, or symbol, of the MLS), the degree of generating
polynomial (which tells us how many symbols there are in one period), the
sequence duration (which is derived from the previous two measures to tell
us the length of one period), and the group delay of the filter used to pulse
shape the MLS (which tells us when the source sequence begins). It might
be useful to call plot() and cross-reference the waveform with the MLS
symbols to confirm that the extracted period is correct.
Second, to read the received signal, we need to use the proprietary sioread()
function to decode the recorded signals. It is possible to read all of the receiver channels at once, which will create an n m matrix with n being the
amount of samples in the recording and m being the number of channels.
As such, the matrix is organized column-wise, where each column represents
the recording of a specific channel.
If processing is to be done in the baseband, frequency shift the spectral components of the signal to zero frequency (baseband) by point-wise multiplying
the time signal with
exp(1i*2*pi*carrierFrequency*timeIndex(1:numel(signal))).
Note that in the moving source experiments, an additional frequency shift
is needed to account for the Doppler frequency shift (detailed in the next
section) in the received signal. Afterwards, low-pass filter the baseband
signal and downsample() to take advantage of the bandwidth. If filtering is
done with an IIR filter higher than the second order, create a more accurate
filter by splitting the filter up into a cascade of biquadratic filters, or secondorder sections. This is preferable because quantization from computational
precision errors in calculating transfer function coefficients can change the
location of finely-placed poles and zeros, potentially causing an unstable
filter. To implement, request the zeros, poles, and gain form of the filter,
e.g. [z,p,k] = butter(n,Wn). Then call [sos,g] = zp2sos(z,p,k) to
get the second-order section form of the filter along with the gain, and filter
via sosfilt(sos,signal)*g. If filtering is done with an FIR filter, then
an efficient polyphase filter can be implemented with consideration of the
downsampling factor to achieve lower-order FIR filters.
3.2
To undo the time compression or dilation associated with the Doppler effect
in the moving source experiments, we need to resample the received signal
[1]. This can be done with interp1(x,v,xq,linear), where x is the
original time index according to the sampling frequency, and v is the signal
to be interpolated to the new time index xq. If
x = (0:numberOfSamples - 1)/samplingFrequency,
then
xq = (0:numberOfSamples*(1 - beta) - 1)/(samplingFrequency*(1 beta)).
The Doppler parameter beta = radialVelocity/c tells us the resampling
rate as a function of the radial velocity component and the speed of sound,
where the radial velocity is defined positive for motion away from the receiver (time dilation) and negative for motion towards the receiver (time
compression). Be sure to use a rounding function such as ceil() to ensure
that the final time index in xq is an integer.
To find the right radial velocity value, it may be useful to create a separate
function that performs matched filtering (detailed in the next section) on a
signal that has been Doppler compensated for a wide range of radial velocity
values. This allows us to see which radial velocity value returns the greatest
matched filter output and gives us a good approximation for the correct
Doppler compensation. Since our moving source is moving around 1.52
m/s, we can test various values in steps of 0.01 m/s between 2.5 and 2.5
m/s. This clearly means that a lot of resampling and matched filtering will
be done, so we can expedite the process by resampling the shorter source
signal instead of the longer received signal and matched filtering to only
the first 3 periods of the received signal. We can go even further to reduce
the source signal by only considering, for example, half of its MLS symbols.
Because the source signal will be short, the resampling may not actually
change the signal because the resampling rate is very close to unity for our
range of Doppler parameters. Therefore, we can interpolate our source signal with interp(), perform the resampling, and interpolating the 3 period
portion of the received signal before matched filtering.
3.3
Matched filtering
To perform matched filtering, simply flip the source signal with flipud()
and use fftfilt() to do a frequency-domain matched filtering. If processing is done in the baseband, take the complex conjugate of the source signal
with conj() in addition to flipping, and take the complex magnitude of the
matched filter output via abs() to avoid complex arithmetic in subsequent
steps.
To detect the first matched filter output peak, set up a threshold to create
a binary vector, e.g. output > threshold. It might be more tractable to
compare the threshold to the derivative of the matched filter output via
diff(), then take max() of the resulting binary vector to get the time index
that corresponds to the first matched filter output that clears the threshold.
Because we are working with multiple channels, through [~,indices] =
max(thresholdDetections == 1,[],1), we will get a row vector of time
indices that correspond to the first matched filter peak of each channel column vector. To find a suitable time index to represent all of the channels,
throw away any time indices that fail to meet the threshold or are not within
a reasonable time range where the first peak would appear. Then take the
time index that is closest to the median of the remaining time indicesthis
should give a robust starting time period for all of the receiving channels
and even for subsequent transmissions in the stationary source experiments.
Once the time index of the first matched filter peak is known, we can use
our knowledge of how many repetitions of the period there are to truncate
the matched filter output from a half-period before the first peak and a
half-period after the last peak.
3.4
The envelope creates a smooth waveform of the matched filter output, which
oscillates to the carrier frequency. Simply use abs(hilbert())note that
hilbert() calculates the analytic signal instead of the Hilbert transform,
so we are in fact taking the real part of the analytic signal. If processing
is done in the baseband, the envelope was already attained by taking the
complex magnitude of the matched filter output.
3.5
55
50
Rx Channel Depth (m)
45
Geotime (s)
40
35
30
25
20
15
10
5
0 2 4 6 8 10 12 14 16 18
Time Delay (ms)
24
27.75
31.5
35.25
39
42.75
46.5
50.25
54
57.75
61.5
65.25
69
72.75
76.5
80.25
0 2 4 6 8 10 12 14 16 18
Time Delay (ms)
Figure 1: The single CIR on the left represents the fifth receiver element at
42.75 m on the right. These color plots show a 30 dB range.
3.6
Creating an animation
Postface
Hopefully, in future versions, Ill get to refine the prose, include more graphics, add an appendix that contains background material for the signal processing concepts employed, and compare the IIR filters created in MATLAB
via transfer function coefficients versus a series of biquadratic filters represented by a second-order section.
References
[1] H. C. Song. Time reversal communication with a mobile source. The
Journal of the Acoustical Society of America, 134(4):26232626, 2013.