Documente Academic
Documente Profesional
Documente Cultură
Revision A
Y Axis
X Axis
Z Axis
Computer
The computer is a Dell T7500 Workstation with a 1.6 GHz Quad Core Intel Xeon Processor , 4GB of
RAM, and a 1 TB hard drive. The operating system is 64-bit Windows 7. The 32-bit version of MATLAB
2012a has been installed on the computer and is the only application necessary to use the hydroacoustic
fixture. Note that only the 32-bit version of MATLAB is compatible with the data acquisition card used by
the computer. The 64-bit version of MATLAB will not work.
The Dell T7500 does not have a serial port, so a USB to serial adapter must be used to communicate
with the VXM controller. Drivers for the USB to serial adapter must be installed prior to use, and can be
downloaded through the Windows Device Manager.
Transducer
There are two immersion transducers that can be used with the hydroacoustic fixture. The transducers,
produced by Olympus Corporation, are specifically designed for underwater use, and include gasket
seals to keep water away from their electrical components. The smaller of the two transducers (part
Waveform Generator
An Agilent 33250A waveform generator is used to create the signal for the immersion transducer. Only
the sine waveform should be used with the transducers and the frequency should be set to the resonant
frequency of the transducer (1 MHz for the V314-SU and 0.5 MHZ for the A389S-SU). The waveform
generator does not have sufficient power output to drive the transducers directly. Instead, its signal is
first sent to a power amplifier that, in turn, drives the transducer.
The waveform generator also has a sync BNC port and the ability to output a trigger. This port can be
connected to the trigger input port of the DAQ card to trigger data capture. This is particularly useful for
measuring the delay between the emission of the acoustic signal from the transducer and its arrival at
the hydrophone.
Hydrophone
An Onda HNC-0200 hydrophone measures the acoustic output of the immersion transducer. The
frequency range of the hydrophone is 1 to 10 MHz, with a sensitivity of 45 nV/Pa. This sensitivity results
in a signal too small to be accurately read by the GaGe data acquisition card, and a preamplifier is
required.
Preamplifier
SMC to BNC
Pole Mount Cable
AC Adapter
DC Block
Hydrophone
Preamplifier
Aquarium
The aquarium has a 40 gallon capacity. Its dimensions are 36 x 18 x 16.
Setup
Computer Setup
Prior to use, the GaGe Oscar CompuScope data acquisition card drivers must be installed, and the card
itself must be physically installed in the computer. The drivers are included on the GaGe CompuScope
CD included in the attachments of this manual. The CompuScope card requires a full length PCI Express
slot with either 8 or 16 lanes.
The computer will also need a 32-bit version of MATLAB installed to run the GUI. Only the 32-bit version
is compatible with the CompuScope. To be controlled by MATLAB, the CompuScope also requires that
the MATLAB SDK be installed. The MATLAB SDK can be found on the GaGe CompuScope CD in the
attachments section. Note that the MATLAB SDK has a separate serial number that must be entered at
the time of installation. When the SDK is installed, it will attempt to link the SDK file locations to
MATLABs searchable path. If it is unsuccessful, the user will have to set the path in MATLAB manually:
1. Open MATLAB
2. Under the File Menu select Set Path
3. Click the Add with Subfolders button and browse to the location of the GaGe MATLAB SDK. By
default, the SDK is located at:
C:\Program Files (x86)\Gage\CompuScope\CompuScope MATLAB SDK
4. Click OK.
5. Check that the new file path appears in the window along with subfolders entitled Main,
CsMl, and Adv.
6. Click the Save button.
Setting this search path may be required for each Windows user on the computer.
Each limit switch is attached to a thin rod that spans the length of the axis by two set screws. These set
screws accept a 0.050 hex key, which can be found taped to each of the three linear axis motors.
Loosening both set screws will allow the user to slide the limit switch along the rod to the desired
position. The limit switch is then set in place by tightening both set screws.
At the time this manual was written, all limit switches had been properly set. They should be checked
periodically for tightness and position, as the aquarium may move slightly in relation to the axes.
Connect Hydrophone
First, the hydrophone must be connected to the preamplifier by threading the hydrophone itself into
the preamplifier.
The preamplifier then connects to the DC Block via the included SMC to BNC adapter cable. The DC Block
must be connected to AC power using the included power adapter. Ensure the gain switch on the DC
block is set to the High position.
The hydrophone is connected to the Velmex positioning system using the pole mount included in the
Onda preamplifier kit. The silver knob on the pole mount is loosened to accept the hydrophone and
preamplifier. Slide the hydrophone into the mount, being careful not to contact the sensitive tip of the
hydrophone against the mount. Tighten the silver knob to secure the hydrophone in place.
Next raise the pole connected to the X axis of the Velmex positioning system so it is completely out of
the water. The pole is connected to the X axis via a clamp (shown in Figure 12), that can be loosened by
the two socket head cap screws on its front face. With the pole out of the water, connect the
preamplifier pole mount by inserting the pole into the top of the pole mount and tightening the black
thumb screw. Then lower the pole into the water somewhat near the position of intended use. The only
components of the hydrophone-preamplifier system that will withstand immersion are the hydrophone,
preamplifier, and pole mount block. It is critical that the DC block and AC adapter be securely positioned
outside the aquarium to avoid permanent damage.
Finally, connect the DC block to the computer data acquisition card using a male-male BNC adapter and
an SMC to BNC cable. The DC block should connect to the Channel 1 Input of the data acquisition card
(the leftmost port), as shown below.
Channel 1 Input
0.75 Immersion
Transducer Clamp
Pole Adjust
Set Screws
1.5 Immersion
Transducer Clamp
To attach the transducer, remove the clamping fixture from the aquarium, slide the transducer into the
appropriate clamp, and tighten. With the transducer clamped, place the fixture on the aquarium by
lining up the notches in the main arm with the top of the aquarium side walls.
Next use a BNC cable to connect the output port of the waveform generator to the power amplifier
signal input, the left port on the front face of the power amplifier. Set the waveform generator to output
a sinusoidal wave at the resonant frequency of the immersion transducer (1.0 MHz for the 0.75
transducer or 0.5 MHz for the 1.5 transducer).
Waveform Generator
Output Port
To Transducer
To measure the amplitude and period of the waveform at the hydrophone, a continuously generated
waveform can be used. To measure the arrival time of the signal, however, a trigger must be sent from
the waveform generator to the data acquisition card. Connect the Sync port of the waveform
generator to the trigger input port (labeled TI) of the CompuScope using an SMC to BNC cable.
Turn on Burst Mode on the waveform generator by pressing the Burst button, and setting the number
of cycles and burst period. Then set the trigger to internal and the type to rising edge (denoted by the
upward pointing arrow). There is no need to press the Trigger button on the face of the waveform
generator, and doing so will reset the trigger to manual.
Note that the hydroacoustic_capture.m application has a trigger timeout set to 50 ms by default. Be
sure to set the burst period to 50 ms or less or the application may force a trigger before the waveform
generator has sent on. If a burst period longer than 50 ms is required, the default trigger timeout setting
can be changed by loading the default_values.mat file into MATLAB. This will load a structure called
default_values into the MATLAB workspace. The structure contains a field called trigger_timeout, used
to set the trigger timeout in microseconds when the capture function is called. To adjust the trigger
timeout, change the value of the trigger_timeout field, then save the default_values structure to the
default_values.mat file. For example, to change the trigger timeout to 100 ms enter the following:
>> load(default_values.mat)
>> default_values.trigger_timeout = 100000;
>> save(default_values.mat,default_values)
Finally, press the Output button on the front face of the waveform generator to transmit the waveform
signal to the power amplifier. Power on the power amplifier using the switch located on the back panel
to transmit the amplified waveform to the immersion transducer.
Launch hydroacoustic_capture.m
All components are now connected and the GUI can be launched. Open MATLAB and set the Current
Folder to the folder containing hydroacoustic_capture.m. Type hydroacoustic_capture in the Command
Window. The program will launch and connect to the VXM controller and initialize the data acquisition
card. When the VXM is connected and online, the yellow LEDs on the front panels of the controllers will
illuminate. A GUI window will open, and the fixture is ready to use.
Figure 19. Fixture for mounting partial ring array and rotary table to the aquarium.
The ring array housing consists of two Delrin shells which firmly clamp the ring array(s) in place without
causing damage. To attach the ring array(s), turn the fixture upside down and remove the bottom half of
the ring array holder. Then place the ring array(s) in the top half of the shell.
Replace the bottom half of the shell and tighten the two connecting screw to clamp the ring array(s) in
place. The rotary axis can be controlled using the same MATLAB GUI used for the three linear axes that
control the hydrophone position. The ring array requires special hardware for transmitting signals and
capturing data, however, and must be controlled through other means.
Operation
The MATLAB GUI provides simple control of the four Velmex servo axes and the CompuScope data
acquitision card. It may be used to manually position the hydrophone within the aquarium or to perform
one- and two-dimensional scans. All important data acquisitions can be set through the GUI, including
sample rate, sample length, number of samples averaged, and trigger delay. In addition, the voltage
range (and resolution) and trigger timeout can be set by modifying the default_values.mat file offline.
Figure 21 below shows the main GUI screen.
The top left window in the screen is a graph in which data obtained from the CompuScope is
automatically plotted every time it is captured. The graph axes automatically scale with each data
capture, and all captured data will fit on the graph. If manual zooming is desired, it can be accessed by
clicking on the View menu and selecting the Figure Toolbar. This will enable a toolbar at the top of the
screen with the usual MATLAB figure controls.
Manual axes controls are situated below the graph, and allow the user to move each axis incrementally
or to move to an absolute position. Each axis can also be zeroed, resetting the current position as zero
and rescaling the rest of the axis around the new zero position.
To the right of the data graph are controls for capturing and saving data. Below those controls are inputs
for initiating automated one-dimensional line scans or two-dimensional grid scans. These automated
functions systematically move the axes to points along a line or grid, stopping at each point to capture
and save data from the hydrophone.
Unit Selection
The first object to consider before moving the axes manually is the unit selection radio buttons, located
with the save and capture data. The unit selection (either inches or millimeters) affects the units in
which the move increment and position for each linear axis is displayed. The rotary axis (R axis) is always
displayed in degrees.
Speed Selection
Each axis has a % Speed text box that sets the speed at which the axis moves as a percentage of the
maximum speed the axis is capable of moving. The speed for each of the linear axes is set to 20 percent
of maximum by default, while the speed of the rotary axis is set to 15 percent. Changing the speed of an
axis changes the speed for any time of axis move incremental, absolute, grid scan, or line scan. The
default speeds were selected based on empirically determining the fastest speed each axis could handle.
If the axes are driven at higher speeds, they may not have enough torque to move without the stepper
motor slipping. If the motor slips, its encoder will think the axis has moved farther than it actually has,
and the position data reported by the GUI will be wrong. For this reason, it is strongly advised that you
do not increase any of the motor speeds above their default settings.
Incremental Move
The move increment (abbreviated as Move Inc in the GUI) sets the distance that an axis moves each
time one of the incremental move buttons is pressed. There are two incremental move buttons for each
axis, one button to move the axis one increment in the positive direction and one button to move the
axis one increment in the negative direction. The top row of incremental move buttons (Move Right,
Move Up, Move Back, and Rotate CW) all move their respective axes in the positive direction. The
bottom row (Move Left, Move Down, Move Forward, and Rotate CCW) move their axes in the
The position text box associated with each axis is updated before and after every move and will reflect
the absolute position of that axis.
Absolute Move
In addition to displaying position data every time an axis is move, the Position text boxes are editable.
The user can manually enter a desired position, then press the Goto Position button to drive the axis
to that position. All four Goto Position buttons call the same function, and the user can enter new
positions for multiple axes and click any of the four Goto Position buttons to drive all updated axes to
their new positions. Pressing the Zero Axis button will set the absolute position for that axis to zero,
creating a new reference point for absolute axis positions.
Capture Data
Figure 23. Capture and Save Data section of main GUI screen.
There are five inputs on the GUI screen that affect data capture. First, the Capture Length text box
determines the number of data points to be captured in a sample segment. The Sample Rate pulldown
menu allows the user to select the sample rate, ranging from 1 kHz to 50 MHz. The sample length, in
time, will be equal to the capture length divided by the sample rate, and the time axis will automatically
scale to display the entire sample.
The Samples to be Averaged text box tells the data acquisition card how many sample segments to
capture. The sample segments are then automatically averaged to reduce noise. Only the averaged data
set will be displayed on the graph and can be saved to disk. If averaging is not desired, set the Samples
to be Averaged text box to 1.
Every time data is captured, the first data point is based on a trigger. If the Internal trigger selection
radio button is selected, the data acquisition card looks for a rising edge greater than 10 percent of the
>> load(default_values.mat)
>> default_values.input_range = 400;
>> save(default_values.mat,default_values)
There are only six valid input ranges accepted by the data acquisition card: 100 mV, 200 mV, 500 mV,
1 V, 2 V, and 5 V. Setting the input range to a value that is not one of these six will cause an error
message when the card is initialized.
When the Capture Data button is pressed, a signal is sent to the CompuScope to configure the
acquisition parameters based on the values set in the GUI and to begin the acquisition as soon as a
trigger is observed. When the data is plotted on the graph, the trigger event will always be located at
zero on the time axis.
Data capture can begin before or after the trigger based on the value entered in the Trigger-Capture
Offset text box. By default, this value is set to zero, and data capture begins at the trigger event. To
start data capture before the trigger, enter, as a negative number, the time in microseconds prior to the
trigger to start data capture. For example, to start data capture 20 microseconds before the trigger
event, enter -20 as the trigger-capture offset. When the capture button is pressed, the graph will now
begin at -20 s. The trigger event will still correspond to zero on the time axis, and the entire graph will
be filled with data. Similarly, to begin data capture after the trigger event, enter the positive number of
microseconds after the trigger that data capture should begin.
Save Data
Captured data can be saved to file by pressing the Save Data button. Data will be saved as a .mat file in
the location specified on the Save File Location button. The file will be titled with the text in the Save
Filename Prefix text box followed by a .mat extension. The GUI save function looks for an existing file
before saving, and will append an underscore followed by an integer to avoid accidentally overwriting
data. For example, if the user attempted to save acoustic_data.mat but the file already existed, the
GUI would save the file as acoustic_data_1.mat instead.
The raw data is saved as a vector named data with units in Volts. Also contained in the .mat file are
the axis positions at the time of capture (x_axis_pos, y_axis_pos, z_axis_pos, and r_axis_pos) in
either inches or millimeters as specified in the GUI. The sample rate (in samples/second) is also saved
Line Scan
The line scan function automatically performs a series of incremental moves along an axis. At each point
on the axis, data is acquired and saved to file. The line scan axis (X, Y, or Z) can be selected using the
radio buttons in the Line Scan section of the GUI screen. A line scan always begins at the current location
when the line scan button is clicked, and always moves in the positive direction of the specified axis (left
to right for the X axis, bottom to top for the Y axis, away from the transducer for the Z axis). The first
capture occurs at the current position. The hydrophone then moves one increment (as specified by the
Move Increment text box), and another measurement is taken. The number of axis moves is equal to
the value in the Number of Steps text box, and the number of measurements taken is one more than
this value since a measurement is taken at the start and end point.
As data is captured at each acquisition point, the data graph in the GUI screen automatically updates. All
captured data is automatically saved. When the line scan finishes, a .mat file is produced using the
filepath and filename prefix specified in the GUI. The .mat file contains a two-dimensional matrix entiled
line_data in which all data is stored. The first row of the matrix includes the data, in volts, for the first
acquisition point. The second row has the data for the second acquisition point, and so forth. A vector is
saved with the time, in microseconds, corresponding to each data point in the capture. The axis
positions of the starting point are contained in a vector called line_start. The axis used for the scan (X,
Y, or Z) is saved as scan_axis_string. The move increment is saved as line_scan_inc. Sample rate is
saved, in samples/second, in the sample_rate variable.
Data can also be automatically captured and saved using a grid scan along two dimensions. The first step
in executing a grid scan is selecting the plane dimensions for the scan. For example, selecting an XY grid
plane will create a scan along the X and Y axes. The move increment and number of steps in the grid can
be set independently for each axis. The move increment and grid size boxes will be grayed out for the
axis not used in the grid plane. The grid scan always uses the current point as the center of the grid, and
will return to that point upon finishing the grid scan.
Data captured during a grid scan will be automatically displayed on the GUI graph and saved in a .mat
file according to the filepath and filename prefix provided. The .mat file includes all of the grid scan data
in a three-dimensional matrix called grid_data. The first dimension of the grid_data matrix
corresponds to the first dimension of the grid plane (X axis for XY or XZ grid scans and Y axis for YZ grid
scans). The second dimension corresponds to the second dimension of the grid plane. Data is arranged
chronologically along the third dimension of the grid_data matrix.
Other data saved in the .mat file includes time data (time_vector) in microseconds that corresponds to
each point along the third dimension of the grid_data matrix. The axes positions at the center point of
the grid scan are included in a vector entitled grid_center. Other variables saved in the .mat file
include the grid size and increment for each linear axis, and the sample rate of the data capture.
Troubleshooting
The solutions to some common problems are included in this section. The list of errors in this section is
by no means exhaustive. For additional help, see the Velmex VXM Controller Users Manual and GaGe
CompuScope MATLAB SDK Manual included in the attachments section.
If the application cannot find a function for the data acquisition card (likely beginning with a CsMl
prefix), first check that the MATLAB SDK has been installed. By default, the SDK is installed in:
If the MATLAB SDK is not installed, use the CD included in the attachments section to install the MATLAB
SDK. If the MATLAB SDK is installed, it may not be included in the MATLAB search path. To add it to the
search path, perform the following tasks:
1. Open MATLAB
2. Under the File Menu select Set Path
3. Click the Add with Subfolders button and browse to the location of the GaGe MATLAB SDK. By
default, the SDK is located at:
C:\Program Files (x86)\Gage\CompuScope\CompuScope MATLAB SDK
4. Click OK.
5. Check that the new file path appears in the window along with subfolders entitled Main,
CsMl, and Adv.
6. Click the Save button.
If the problem persists, use Windows Device Manager to check that the CompuScope drivers are
correctly installed. If not, use the included CD to install them.
First, ensure that the VXM controller is correctly connected to the computer and that both VXM
controllers are powered on. Access the Windows Device Manager and locate the COM port used for
serial communication. Ensure that the correct drivers are installed for USB to serial communication; if
not, click Update Drivers to download and install the latest drivers.
Check that MATLAB has not already opened the serial communications port using the instrfind function.
If any serial ports are open, close them using the fclose function. If the problem persists, try power
cycling the VXM controllers, turning on the right (slave) controller before the left. Once the green LEDs
illuminate on each controller, try launching hydroacoustic_capture.m.
If communications still cannot be established with the VXM controllers, try manually updating the COM
port in the default_values.mat file. First, use Windows Device Manager to identify the COM port used
for serial communication with the VXM controllers. Load default_values.mat into the MATLAB
workspace. Use the serial function to create a new COM port and save it to the velmex_controller field.
For example, to set the communications port to COM1, type the following into the MATLAB Command
Window:
>> load(default_values.mat)
>> s = serial(COM1);
The lead screws on the linear axes may make excessive noise if they are driven too rapidly. For this
reason, it is recommended that the user keep the speed of the linear axes at 20 percent or lower. The
periodic application of a generic low temperature lubricant directly to the lead screw may also help
reduce torque to the motor and cut noise from the axes.
The Z axis may also make noise if the screws connecting it to the base plate are overtightened. This may
cause a slight bending of the lead screw. Try loosening the mounting screws to reduce noise.
Every time the GUI is closed, it saves a number of current GUI values to a file called
default_values.mat located at the save filepath as hydroacoustic_capture.m. If this file is
accidentally deleted, a new one will be generate the next time the program is launched. Default values
will be reset to the first time the program was launched, and the program should operate normally.
Each linear axis has two limit switches governing the range of motion. If these switches are not correctly
set or the aquarium is moved in relation to the motion control system, it may become possible for the
user to crash the axes into the aquarium. Carefully check the location of the limit switches periodically
and adjust them as necessary, by loosening the set screws, sliding them along the positioning rod, and
retightening the set screws.