$25
0. Install a tone generator on your phone. Make sure your computer has matlab on it. READ THE
FULL DOCUMENT BELOW AND NOTE ANY QUESTIONS.
1. Find the resistor values for first-order filters for the following frequencies and capacitor values:
fc = 1/(2*pi*R*C) R = 1/(2*pi*C*fc)
1a) fc = 2000 Hz, C = 0.1 uF, R= ?
1b) fc = 3000 Hz, C = 0.1 uF, R=?
2. Define the following terms that apply to data collection using a DAQ (data acquisition system). For reference, here is a link to the manual of the DAQ we will use in this class: https://www.mccdaq.com/pdfs/manuals/USB-1608FS-Plus.pdf Sample rate:
Bit depth:
Gain:
Number of channels:
Number of samples:
Equipment (Part A):
Station 1: Analog filtering
Oscilloscope
Breadboard w/ resistors and capacitors
Audio connector
Station 2: Hydrophone
Oscilloscope
Breadboard w/ resistors and capacitors
Hydrophone
9V battery and harness
Station 3: DAQ data collection
Breadboard w/ resistors and capacitors
Audio connector
DAQ Raspberry pi
Equipment (Part 2):
8-element hydrophone array
Raspberry pi data collection system
Sound source
Students bring:
Laptop computer w/ matlab
Smartphone w/ audio tone generator installed
Lab objective
Introduce the concept of acoustic data collection, anti-aliasing/passive analog filtering, and array data processing.
Lab 1, part 1 Tools of the trade: Analog filtering, antialiasing and hydrophones
A hydrophone is an underwater microphone, and is what we use to collect sound data underwater. For this lab, we have HTI-96MIN hydrophones. Each contains a piezoelectric transducer, which converts deflection of a piezoelectric crystal into voltage. These elements also contain pre-amplifiers, which provide some amplification of that voltage so that the elements are easier to use.
These are current mode hydrophones: that means that instead of having ground, power and a signal line, they only have two leads: power and return. We put a voltage divider between return and ground, and use that output as the signal. Because the return line is DC biased, there is a VBATT offset on the return output: this requires a highpass filter to get rid of the DC bias so we don't blow up the DAQ. We may also choose to use lowpass filters to take out high frequency noise.
Complete the following 3 stations of the lab:
Station 1: Analog filtering
Assemble the breadboard circuit indicated at the lab station. Using tone generator on your phone, vary the frequency from 500 Hz up to 3 kHz and observe the results at the tone input to the circuit (scope 1) after the lowpass filter (scope 2) and after the highpass filter (scope 3). Fill in the below table:
Frequency
Scope 1 Amplitude
Scope 2 Amplitude
Scope 3 Amplitude
500 Hz
1500 Hz
2500 Hz
3500 Hz
10000 Hz
Next, swap the two resistors. What happens to the signal?
1.1.1: Provide the amplitude v. frequency for the above table, and plot. Compare the result to the expected first-order bandpass filter, and describe any differences. What might cause these differences?
1.1.2: What happened when you swapped the resistors in the 2 filters?
1.1.3: Does the filter order matter?
Station 2: Hydrophone
Assemble the breadboard circuit indicated at the lab station to connect the hydrophone. Tap the hydrophone on the desk, and capture what it looks like at the input to the circuit (scope 1) after the lowpass filter (scope 2) and after the highpass filter (scope 3). Plug in a hydrophone to the hydrophone inputs (red and white as indicated above). To make sure the hydrophone is working, bang it on the desktop while connected to the scope. You should see a corresponding spike on the scope. Capture the oscillation that results using a trigger on the scope, and take a picture with your phone for the 3 scope points.
Change the resistor values to lower the frequency of the bandpass filter to have a passband between 100 and 200 Hz.
1.2.1 Why would we include a voltage dividers in the circuit?
1.2.2 Why would we include a highpass filter in the circuit?
1.2.3 Why would we include a lowpass filter in the circuit?
1.2.4 What are the cutoffs for the highpass and lowpass filters in the circuit? What dictates these frequencies?
1.2.5 What are examples of high frequency and low frequency signals we may want to exclude?
1.2.6 What is the effect of the filter on the oscillation?
1.2.7 What is the impact of the lower-frequency bandpass? Compare to the previous filter.
Station 3: DAQ and anti-aliasing
We generally collect data on a data acquisition system, or DAQ. A DAQ performs the analog-to-digital conversion, plus sometimes other functions like anti-aliasing, filtering, simultaneous sampling of channels, triggered data collection, etc. The reasons to use a DAQ instead of, say, the audio input into a computer include simultaneous sampling of channels (required for array processing), higher sample rates, more bit depth, time-sync data collection, and larger numbers of channels. The DAQ we are using is a Measurement Computing 1608FS-Plus DAQ (16 bit, 8 channel).
Hook up the DAQ to the computer over USB. Open a command line, and type the following:
> cd ~/6456_lab2/
This directory contains a script to start data collection. We will be doing continuous data collection at a sample rate of 4000 Hz.
Set up with continuous data collection. Remove all old data:
> cd ~/6456_lab2/data/ > rm *
We will log data for four inputs so that we get multi-channel information:
1) audio jack from phone (no filtering)
2) audio jack from phone with filtering (lowpass)
3) audio jack from phone with filtering (bandpass)
Plug the audio plug into your phone and start your tone app. Plug the pre-filter into pin 1, and the black wire into pin 2 of the DAQ and so on. Then start data collection:
> cd ~/6456_lab2/
> ./get_data.sh
Press enter at the prompt. This will begin logging data. Vary the tone on your phone: start at a low frequency (500 Hz), and sweep up past 5 khz and then back down to 500 Hz. After sweeping, play the signal for a while at 3.5 kHz.
When you have finished, ctrl-C. Copy data to your computer using a thumb drive, and open matlab.
Load in the data from a file, and look at the output to make sure it makes sense.
1.3.1 Plot the spectrogram for all of the data.
1.3.2 Plot the FFT and spectrogram. Observe the effects of aliasing below Nyquist frequency. What is the effect of aliasing on the data? How could aliasing change what you thought you were observing if you didn't know it was happening?
1.3.3 Observe the effects of aliasing with and without the anti-aliasing filter. What do you see?
1.3.4: For the part of the data where the tone was fixed at 3.5 kHz, how would you process the data if you knew your signal was between 2.5 and 4 kHz to eliminate the effects of aliasing?
Lab 1, Part B: Array data collection
We will collect data on a hydrophone array. The instructor will set up the data collection, then we will take the following equipment out to the test well:
1) Hydrophone array + data collection bottle
2) PFDs
3) Measuring tape, compass, rope
4) Acoustic source (1) playing 4000 Hz waveform from a phone/computer (signal source)
5) Acoustic source (2) playing either 4000 Hz or 6000 Hz waveform from a phone/computer (noise source)
Objectives:
Collect 1D array data, demonstrate spatial aliasing and beam steering.
The objective of this lab is to demonstrate how to use the array data collection setup we will be using for this class, and to process the collected data using beamforming. Two array spacings will be used: uniform and random.
Array Information:
N = 8
Fs = 10000 Hz samples per channel per file = 100000 (10 s per file)
Array data collection: uniform array
Measure spacing of array elements, reposition if necessary for uniform spacing.
Tie the array at a depth of 1 m off of the float. Use a compass to note the heading of array.
Collect ambient noise data
Leave the array in the water (no sound source) recording for 2 minutes. Note start and stop times.
Deploy array and source(1) to endfire
Deploy the source near endfire. Note the time, and the heading from the array to the source. Collect 2 minutes of data.
Move source(1) to about 45 degrees
Deploy the source to a location between broadside and endfire. Note the time, and the heading from the array to the source. Collect 2 minutes of data.
Move source(1) to broadside
Deploy the source to broadside. Note the time, and the heading from the array to the source. Collect 2 minutes of data.
With signal source at broadside, add an interfering noise source:
Deploy the noise source to about 45 degrees. Collect 2 minutes of data with signal source off, 2 minutes with the signal source on at 6 kHz and 4 kHz. Repeat with the noise source at 60 degrees for 6
kHz and 4 kHz. Repeat at broadside at 6 kHz.
Array data collection: Part 2- random array (if there is time)
Recover the array and reposition the array elements randomly, noting their locations using measuring tape without changing overall aperture. Record 2 minutes of data at broadside, 45 degrees and endfire.
Lab 1, Part 3: Matched filtering
Download 6456_lab2.zip from stellar and unzip the folder. Inside, you will find two .mat files and a code template. This includes a “mystery tone” that you will need to identify, and that you will use a matched filter to characterize within the overall signal. This data is “bistatic”: the source and receiver are seperated by some distance, and the returns observed in the data correspond to:
1) Direct path from the source to the receivers
2) Multipath
3) Scattering from the environment
Use the code template to write a matched filter with each of the three replicas. Add whatever code you want to plot different signal characteristics that will help you (e.g. use spectrograms and FFTs to help answer the question of which replica).