Citation
Untrasound pulse-receive tracking system for a chaos and control experiment

Material Information

Title:
Untrasound pulse-receive tracking system for a chaos and control experiment
Creator:
Ramos, Kenneth H
Place of Publication:
Denver, CO
Publisher:
University of Colorado Denver
Publication Date:
Language:
English
Physical Description:
ix, 97 leaves : illustrations ; 29 cm

Subjects

Subjects / Keywords:
Chaotic behavior in systems ( lcsh )
Nonlinear theories ( lcsh )
Ultrasonic imaging ( lcsh )
Chaotic behavior in systems ( fast )
Nonlinear theories ( fast )
Ultrasonic imaging ( fast )
Genre:
bibliography ( marcgt )
theses ( marcgt )
non-fiction ( marcgt )

Notes

Bibliography:
Includes bibliographical references (leaves 94-97).
Thesis:
Submitted in partial fulfillment of the requirements for the degree, Master of Science, Basic Science
Statement of Responsibility:
by Kenneth H. Ramos.

Record Information

Source Institution:
|University of Colorado Denver
Holding Location:
|Auraria Library
Rights Management:
All applicable rights reserved by the source institution and holding location.
Resource Identifier:
37306917 ( OCLC )
ocm37306917
Classification:
LD1190.L44 1996m .R36 ( lcc )

Downloads

This item has the following downloads:


Full Text
ULTRASOUND PULSE-RECEIVE TRACKING SYSTEM FOR A CHAOS
AND CONTROL EXPERIMENT
By
Kenneth H. Ramos
BS., California State University, 1985
A thesis submitted to the
University of Colorado at Denver
in partial fulfillment
of the requirements for the degree of
Master of Basic Science
1996


This thesis for the Master of Basic Science
degree by
Kenneth H. Ramos
has been approved
by
Date


Ramos, Kenneth Henry (M.B.S., Liberal Arts and Science)
Ultrasound Pulse-Receive Tracking System for a Chaos and
Control Experiment
Thesis directed by Professor Randall P. Tagg
ABSTRACT
The center of mass of a pendulum able to move in
three dimensions can be located via ultrasound waves with
an accuracy of less than one millimeter using a pulse-
receive ultrasound system. The pulsing is done from the
center of mass of the pendulum and reception is performed
by receivers strategically placed in different planes.
The time it takes for the sound waves to travel from the
pulsing unit (on the pendulum) to the receivers can be
measured quite accurately, thereby enabling a computer
program to calculate the distance between the center of
mass of the pendulum and each receiver. The pulsing,
reception, and distance calculations are performed via
specially designed hardware (digital and analog) and are
controlled and integrated via a single C++ program. This
iii


system is valid for distances from one half meter to one
and a half meters which allows fairly large models of
realistic systems to be built.
This abstract accurately represents the content of
the candidate's thesis. I recommend its publication.


DEDICATION
This thesis is dedicated to the two most important
individuals in my life. My God and my wife. Building
scientific apparatus that enables mere mortals to learn
and understand more about His creation and thus God's
very nature is of the highest calling. May He find glory
in this work. My wife, Colleen Nanette, is the most
precious gift God has ever given me. Without her
constant support and encouragement, I would not have had
the will to pursue this master's degree or thesis. I
love you Hun.
** c ~ ' 11 ' )A v
Asysi o papxupov xauia, Nai, epxopai xayu. Apr|v, spxou,
I L ~ L, ' ~ ' l
Kupie rqooo. H xaPls "tou Kupiou Irjaou psxa mvxov.
AnOKAAY'FIE IHANNOY 22.20-21


CONTENTS
Figures................................. viii
Acknowledgements..........................ix
CHAPTER
1. INTRODUCTION........................... 1
2. COMPONENT OVERVIEW....................10'
Pulser................................11
Analog Receivers......................11
Digital Hardware Interface Board......13
Computer..............................14
Circuitry Case........................16
Summary...............................17
3. SOFTWARE OVERVIEW......................19
4. USER INTERFACE, MENUS, AND WINDOWS.....2 6
5. SOFTWARE HARDWARE INTERFACE..........35
6. PULSER HARDWARE........................39
7 . RECEIVER HARDWARE......................48
Transducer.............................48
Analog Electronics.....................50
Physical Housing.......................56
vi


CONTENTS (Cont.)
CHAPTER (Cont.)
8. DIGITAL HARDWARE INTERFACE BOARD........59
9. STATE VECTOR DETERMINATION..............67
10. OUTPUT METHODS..........................74
11. CONCLUSION.....................f........80
APPENDIX
A. PENDULUM.H..............................83
B. INLOG. C................................86
C. OUTLOG.C................................88
D. CONVERT. C..............................89
E. RS232STF.C..............................91
BIBLIOGRAPHY..................................94
VI1


FIGURES
Figure
1.1. Overview of Naval Crane Experiment.......3
2.1. Component Interaction...................10
2.2 Electronic Hardware.....................17
3.1. Event Creation, Priority, and Location..21
3.2. getevent and evhandle Interactions......25
5.1. Real-Time Flow Diagram..................38
6.1. Pulse Hardware..........................42
7.1. Polaroid 7000 Series Specifications.....49
7.2. Analog Amplification Circuitry..........50
7.3. First Stage Output......................53
7.4. Receiver Hardware.......................57
8.1. Signal Lines............................61
8.2 Receiver Line...........................62
8.3 555 Oscillator Configuration............63
8.4 Delay-Go Circuit........................64
8.5 Main Board Digital Electronics..........65
vm


ACKNOWLEDGEMENTS
I thank Aerojet Electronic Systems Division a
subsidiary of GenCorp for their financial help. My
company has unceasingly paid all tuition and half of my
books throughout this master's program. Another source
of financial aid is the ONR (Navy) Grant N00014-95-1-
0185: "Nonlinear dynamic approaches to control of crane
load pendulation during transfer between ships at sea"; a
portion of this grant has paid for all the electronics
and software that was necessary to build the ultrasound
tracking system.
Secondly, I thank Dr. Randall Tagg for his long
hours of help and the use of a portion of his fluids lab
at the University of Colorado at Denver. Dr. Leonard
Bond, University of Colorado Boulder, for his help and
suggestions as to what path to take with this ultrasound
system. My father, Henry Ramos, an electrical engineer
by trade whose insights helped shaped the design of the
analog circuits.
IX


CHAPTER 1
INTRODUCTION
Forced two-dimensional pendulums have proven to be
good subjects for nonlinear dynamical research due to the
low cost of apparatus for experimentation purposes and
the underlying equations of motion being fairly simple
and easy to understand (Baker & Gollub 1990). The
simplification to two dimensions is achieved by creating
a fixed boom that is only allowed to rotate around the
origin of the system and only in one plane.
Experiments with such planar pendula (Starret & Tagg
1995) have shown them to be good prototypes for testing
new techniques for controlling nonlinear and chaotic
motions in mechanical systems. Meanwhile, some
experiments have also been performed with spherical
pendulums (Tritton 1985; Kana and Fox 1994), but have
employed limited methods for tracking position as the
pendulum mass moves in three dimensions.
1


The US Navy has recently undertaken renewed efforts
to better control the motion of payloads on cranes aboard
ships at sea. The ONR grant N00014-95-1-0185 is
concerned with controlling the swinging load of a crane
at sea. A naval crane is used to move cargo from the
ship of origin to and from other ships moored offshore
and subject to significant wave-induced motions. The
cargo crane system can be modeled via a three dimensional
pendulum system. As an additional complication the ship
is subject to sea swells; these can be modeled by having
a platform that moves with three degrees of freedom.
What concerns the navy is that even in moderately
active seas, cranes become inoperable due to excessive
and dangerous swinging of the cargo. Our research has
been funded in order to determine ways of controlling
this nonlinear behavior in order to allow transfers of
cargo at higher sea conditions.
The research being performed under this grant has
been broken into three segments: the first concerns the
development of a model crane that rides on a platform
which simulates wave-induced motions; the second deals
with continually determining the location of the
pendulum's center of mass (cargo load); and the third
2


deals with using this position tracking data as input to
control algorithms designed to manipulate crane rigging
in order to suppress undesired motions. This thesis is
concerned with the second portion of the overall
experimental system, which is the tracking of the
pendulum payload in three dimensional space (Figure 1.1).
Overview of Naval Crane Experiment
Figure 1.1
3


The requirements of the tracking system consisted of
having a resolution of less than one millimeter, sampling
rates to exceed twenty-per-second, small space, costs not
to exceed $5,000 (computer and specialty hardware), and
ease of integration with the other components. The
spatial resolution requirement is based on the need to
measure motions to within 0.1% of the expected dynamic
range (.5 meters in any direction). This level of detail
is necessary to resolve fractal structure in the dynamics
of chaotic systems and forms the basis of control
strategies that succeed by making tiny perturbations
(Starret and Tagg 1995). Similarly, the time resolution
is necessary to resolve all frequencies of interest in
the complex motions and to avoid problems of aliasing
that occur when sampling is done at less than twice the
highest significant frequency present in the dynamics
(the "Nyquist Criteria").
There are many methods for tracking objects in three
dimensions. However the requirements narrowed the
choices to two major categories: optical and acoustical
based systems.
The first tracking system category considered deals
with optical instrumentation. A photodiode-photodetector
4


pair sensed deflections of a spherical reflector attached
near the pivot of the cable supporting the load.
Unfortunately, the voltage variation on these devices
lead to resolutions that were less than desirable. In
addition, due to these devices being installed near the
top of the cable, the flexing of the cable could not be
accounted for. Charged Coupled Device (CCD) arrays were
considered; however the resolution for the desired range
of motion is not satisfactory for the allowable costs.
The space that the pendulum is scheduled to swing freely
in is over .5 meters per side. To have a CCD device with
the desired accuracy would require two imaging systems
(for stereo sensing) at 1500 x 1500 minimum pixel
resolution.
The second system explored was ultrasonic acoustical
techniques. Ultrasound components have less resolution
capability than optical devices but are considerably
cheaper (Hickling and Marin 1985). Primarily this is due
to the difference in the speed of the two types of waves.
Sound travels at 3xl02 m/s verses 3xl08 m/s for photons.
This means that by using sound waves, the measuring
system is over a million times slower than for an
equivalent optical system. The digital sampling hardware
5


for ultrasound systems can be found in any local
electronics store at a reasonable cost whereas an optical
system would need devices that have state changes on the
order of nano-seconds.
There are two main ultrasonic categories; pulse-echo
and transmit-receive. Most ultrasound systems are of a
pulse-echo design; the main advantage is that the
transmitter and receiver are the same component thereby
reducing cost and being able to directionally transmit
ultrasound waves so that the drop off in signal is
reduced. These systems are employed commercially by all
major camera companies for the purpose of auto-focusing.
Pulse-echo designs primarily determine distance by timing
the return signal (Giarcia 1984).
Pulse-echo systems are very cost effective. A
complete unit capable of being computer integrated was
purchased from Polaroid Corporation for $300.00. Sonic
rangers used in the lower division laboratories are
another example of successful pulse-echo systems.
However pulse-echo systems suffer from the requirement of
the tight beam angle. The pendulum due to its mobility
would have either caused the payload to swing out of the
field of view or to be so small as to be undetectable.
6


In addition, pulse-echo systems give ambiguous results
for targets whose shape and orientation vary (Hickling
and Marin 1985). A possible solution would have been to
have the sensors mounted on servos and to physically
track the pendulum as it moved; the disadvantage is that
if the tracking lost 'lock1 the whole system would need
to be restarted.
Transmit-receive phase comparison ultrasound systems
have achieved accuracies that are 10.6 fim (Sabbagh and
Gaydecki 1995) These systems are also simple and cost
effective. The main drawback is that the reflecting
surface mgst be perfectly flat and normal to the
transmitting device. The range of valid measurements is
only about a quarter wavelength (about 3.7 mm). Both of
these conditions made this system impractical for this
application.
A hybrid of the two systems might be known as a
pulse-receive system. The concept is to have a
transmitting transducer that is separate from the
receiver(s). The transmitting transducer sends
ultrasound pulses at regular intervals and the distance
between the pulser and each receiver is timed. Pulse-
receive has the advantage of the pendulum being the
7


source for the ultrasound waves and the receivers being
merely passive devices. This ensures that the receivers
could be set farther back enabling them to cover the
entire field of view. The disadvantage is that the
simulated crane load had to be capable of twisting,
swaying, and many other types of motion. As such, an
omni-directional source had to be employed. With this
additional criteria, the ultrasound waves needed to be
broadcast in a spherical wave pattern; this results in
the flux decreasing at a rate proportional to 1/r2.
The flux dissipation rate of 1/r2 results in a dual
problem: finding a material that will transmit ultrasound
waves in a spherical pattern and building a receiver that
is sensitive enough to detect the signal from a
sufficient distance. Although many articles reference
ultrasound systems and their various uses, very little
was written concerning such a system.
These problems were overcome by buying two surplus
hemispherical piezoelectric transducers from EDO
Corporation and building receiver circuits centered on
Polaroid 7000 series electrostatic transducers. The
piezoelectric transducers have a measured center
frequency of (about) 50 KHz; this frequency falls in the
8


optimum range of the 7000 series transducer. Please
refer to chapter 6 for a detailed analysis of the pulser
(transmitter) hardware and chapter 7 for a detailed
analysis of the analog (receiver) hardware.
The overall system that was built consists of the
pulser and 5 receivers as described above, a custom built
digital board, a Computer Boards (CB) digital I/O board
that plugs into an 8 MHz ISA bus slot, a Gateway 2000 PS-
90 computer running a C++ program with library routines
to interface all of these components into the tracking
system and allowing this tracking system to communicate
with the analysis machine.
9


CHAPTER 2
COMPONENT OVERVIEW
The ultrasound tracking system, as mentioned in the
first chapter, divides into four main units: pulser,
receivers, digital hardware, and the computer. The
following figure illustrates the interaction between
these varied components:
Component: Interaction
Analog
Figure 2.1
10


Pulser
The Pulser Hardware consists of two hemispheric
piezoelectric transducers and electronic components to
drive them. The electronics jolt them with over 800
volts and cause the transducers to resonate. This
results in acoustical signals that are broadcast in a
spherical pattern.
The electronic components primarily consists of a
capacitor, Silicon Control Rectifier (SCR), 24 volt power
supply, audio transformer and the transducers. The
computer sets a TTL (Go!) line to five volts and when
this occurs, the capacitor discharges resulting in a
pulse. The capacitor is promptly recharged by the power
supply until the next pulse.
The transducers are the simulated cargo that is
attached to the boom (refer to figure 1.1). The essence
of the tracking system is to determine the precise
location of the center of the transducers.
Analog Receivers
There are five analog receivers. Each receiver is
designed to jump from zero to 12 volts when a signal is
11


detected from the pulser. The jump in voltage is passed
to the digital hardware interface board for further
processing and use. These receivers have turned out to
be the most difficult portion of this thesis.
Each analog receiver consists primarily of four Op
Amps and a Polaroid 7000 series electrostatic transducer.
The Op Amps increase the tiny signal that the transducers
produce when receiving ultrasound waves to the 5 volts
that the CMOS circuits on the digital hardware interface
board require.
The time it takes for the ultrasound waves to travel
from the pulser to the receivers increases linearly with
distance. This distance is timed by a combination of
custom built digital hardware and a Computer Boards (CB)
CIO-CTR05 digital I/O card inside the computer. The time
is converted back into a distance by software.
The analog receivers are tuned with variable trim
resistors to optimize the gain from the transducers.
This ensures optimized performance because each
transducer has unique characteristics.
12


Digital Hardware Interface Board
The digital hardware interface board is a custom
built board that takes the analog receiver information
and converts it into a digital signal that can be
interpreted by a computer.
The digital interface board has a 2.5 MHz oscillator.
There are five separate counters on the CIO-CTR05 card
and the pulses from the oscillator are accumulated by
each counter independently. In addition, the board
interfaces a different analog receiver to each counter.
The interface board commences transmission of
oscillations to each counter at the start of a data
gathering cycle. When a receiver detects ultrasound
waves from the piezoelectric transducer, the interface
board will stop sending oscillations to the given
counter. After a data gathering session, the software
can determine the distance between the pulser and each
receiver by examining the number of oscillations that
each counter contains. The distance sound travels in one
period (343m/s) at 2.5 MHz is .14 mm. Therfore, the
higher a count value the larger the distance between the
pulser and a receiver.
13


Digital computer chips generate tremendous noise
which the sensitive analog hardware responds to. The
initial design had the analog boards containing much of
this digital logic. However, when digital chips were
placed on the same circuit board in the same shielded
box, the receivers ceased to respond. The solution was
to completely isolate the digital circuitry by using
independent power and ground lines and by shielding
everything. Hence, the physical separation of the analog
hardware and digital hardware was done not just for
esthetic purposes but for practical reasons.
Figure 2.1 has a small box labeled 'Delay-Go
Circuit'. This small electronics package was added late
in the design to prevent the hardware from responding to
the electro-magnetic surge that occurs when the pulser
fires. Due to this circuit being purely digital, its
description is placed with chapter 8 (digital hardware
interface board).
Computer
The Computer is the most complex portion of the
entire tracking system. It is a Gateway 2000 P5-90 and
has a CB CIO-CTR05 digital I/O Card to interface with the
14


digital hardware board. The computer uses an RS232
device for communications and it has a hard disk for data
storage. A keyboard and monitor are used for human-
machine communications. Finally, the software which runs
the tracking system is coded in C++.
The CB card sends out the Init./Go! signals. Between
data gathering sessions, the Init. signal toggles to five
volts. This resets all of digital electronics and
readies it for the next data gathering session. The Go!
line toggling to five volts starts the next data
gathering session.
The CB card also has an AM9513 (Advanced Micro
devices) counter chip which contains five counters as
explained in the previous section. Between each data
gathering session, the C++ program reads the count values
from each counter and then resets the counters back to
zero.
Each clock cycle corresponds to roughly .14 mm so the
higher the count value, the farther away a receiver is
from the Pulser unit. The C++ program gathers the raw
count values and processes them. The result of
processing the count information from several receivers
15


is the location of the Pulser unit. The location is in
the form of a vector with X, Y, Z, and time; the units
are meters and seconds.
The C++ program communicates with the console, RS232
port, and disk files. The location of the pulser can be
displayed on the console, logged to disk, and/or
transmitted to the analysis computer for further
processing. The program also has options of playing back
an old session or receiving data via RS232 for logging or
display.
Circuitry Case
The Digital Hardware Interface Board, Pulser Circuit,
and Delay-Go Circuit all reside in the same shielded box.
It also has the proper (power and signal) connections to
the five analog receiver units and there are the posts to
the piezoelectric pulsing unit. Lastly, a 37 pin D type
connector links all of the electronics encased in the box
to the CIO-CTR05 card in the computer (Figure 2.2).
16


Electronic Hardware
Pulser and Digital
Pulsar
Electronics
(Chapter 6)
Delay-Go
Circuit
(Chapter 8)
ii
iItttDl
Receiver
Power Cables
(Chapter 7)
iS
R&
i
'm
\/
Pulser
Cables
(Chapter 6)
Digital
Hardware
Board
(Chapter 8)
#0*
nv v
CIO-CTR05
Cable Connect
(Chapter 5)
0^ - V
Ml//
Receiver
Signal lines
(Chapter 7)
Figure 2.2
Summary
The development process started with the C++ core
system. Next came the merging of the Polaroid
developer's kit as a pulsing unit and the building of the
first receiver design. The digital hardware board was
built next. The Polaroid developer's kit was replaced
with the piezoelectric pulsing unit. The final pulsing
design forced the receivers to be modified to their
17


current version in a quest for greater sensitivity.
Throughout this entire process, the software was in a
continuous state of adaptation and improvement.
The following chapters attempt to give a detailed
accounting of all aspects of the ultrasound tracking
system. The order in which these things are presented
was driven by an approach starting with what a user
interfaces with (computer software), proceeding to the
hardware that this software is controlling, getting back
to how the software analyzes the raw data the hardware is
presenting to it, and lastly how other computers and/or
programs can utilize the data this system is producing.
18


CHAPTER 3
SOFTWARE OVERVIEW
The software had a number of requirements. First, it
needed to be fast enough so that real-time processing
could be achieved. Second, there was a demand for it to
interface with third party hardware. Third, the software
was required to display diagnostics to the user so that
system performance could be monitored. Lastly, it needed
to be able to pass data on to other computer programs.
The software for this entire system is coded in
Borland 4.5 C++. This package compiles C++ code in a
manner that is efficient enough to allow real-time
processing. In addition, the Borland TurboVision 2.0
(TV2) package drives the human-machine interaction. The
Computer Boards Universal Library routines interface the
digital hardware to the software system and the RS232.C
vl.6 package allows the tracking system to communicate
with other computers. All of these diverse products link
together under the Borland 4.5 C++ package.
19


The TV2 system is a windowing system similar in
concept to xwindows. All of the user interface is done
via pull down menus. As menus are pulled down, screens,
will appear. The user requests and actions are thus done
via these menus and screens.
At the core of TV2 there is a major procedure that
creates events called getevent. Essentially, any
keyboard or mouse action is processed by TV2' s getevent.
The advantage is that the tracking software doesnt have
to program any low level keyboard or mouse checking
software. When the user clicks on any of the menus or
fills in data from a window, TV2's getevent determines
what has been pushed or entered and creates an event that
can be processed by the tracking software. In addition,
the tracking software has its own events; these are the
real-time events and deal with the ultrasound hardware.
They are prioritized over TV2's processing of the user
actions.
C++ is an object-oriented language which allows a
programmer to define the same procedure more than once.
In this case, the TV2 package comes with getevent. The
tracking system software (known internally as ProjectApp)
has its own instance of getevent. When TV2 calls
20


getevent, ProjectApp's version is invoked. The
priorities and what is processed are determined by
ProjectApp's version of getevent; if ProjectApp so
desires, it will invoke TV2's version of this routine.
C++ allows ProjectApp's version of getevent to handle all
of TV2's getevent features through inheritance and it
allows ProjectApp's version to have additional features.
Inheritance is part of a concept known as object-oriented
programming (OOP). Refer to Figure 3.1 to see how some
of the key processes within the tracking software are
prioritized (top to bottom) and which instance of
getevent processes them:
Event Creation, Priority, and Location
ProjectApp::getevent
-Data gathering event
RS232 Input data event
i TV2::getevent
i -Menu Item selected event
-Window Text entered event
! Exit from program event
Other event se1ected
Simulate Input data event
Playback Input data event
Figure 3.1
21


ProjectApp is the main construct of the tracking
software. It inherits the TV2 constructs and builds with
them. As can be seen, ProjectApps instance of getevent
adds four events. The Data gathering event is the core
event that interfaces the tracking system custom hardware
to the tracking system software. The RS232, Simulate,
and Playback are other modes of data input used primarily
for software checkout or data analysis.
The four events all create the same product. This
product is an internal software construction known as the
state vector and it is the central commodity of the
tracking system. The state vector is the position,
velocity, and acceleration of the pendulum's center of
mass in Cartesian coordinates at a specified point in
time. Please refer to chapter 9 for detailed analysis of
state vector determination and chapter 10 for the actual
bit representation of this data.
The Playback mode reads in old state vectors from a
file and the RS232 input mode receives state vectors via
the RS232 port. The Simulate mode creates state vectors
using a simple algorithm for computing the motion of a
swinging pendulum in spherical coordinates. The Data
gathering mode creates state vectors based upon the
22


tracking system's hardware and software. Please refer to
the following chapters for details on different hardware
and software aspects of the Data gathering mode.
Due to the commonality of the state vector,
processing of the four different modes is done exactly
the same. When getevent successfully determines that an
event has occurred, it sets variables that the processing
events procedure (evhandle) can interpret. After the
getevent routine completes, TV2 will invoke a routine
called evhandle. Any keyboard input, menu selection,
button selection, or the data mode events are processed
by evhandle. Thus, evhandle is the main routine in the
tracking software. All actions, except the real-time
data gathering, are performed by calls from evhandle.
The advantage of the getevent-evhandle TV2 system is
the ability to queue up events. Two or more events may
be generated simultaneously and the TV2 system will
patiently queue them up and send them to evhandle one at
a time. The determination of which event is processed
first is done in getevent. The name of the routine
derives from what it does; it gets events. Essentially,
getevent is the portion of the TV2 system where events
are prioritized and selected for processing.
23


The events are actually processed in evhandle.
Again, the name evhandle derives from its function; it
handles events. Essentially, evhandle is a giant switch-
case structure which is an efficient implementation of a
series of if-then statements. Based upon what event
getevent says needs to be processed, evhandle will invoke
a procedure to do it.
The reason that TV2 can do real-time processing is
that while getevent is processing an event, other events
(or other instances of the same event) may be occurring.
This is not a problem; getevent, when it is next invoked,
will check to see what new events have occurred and re-
prioritize. In addition, the tracking software was set
up so that the Data gathering event has the highest
priority and other events will be processed after Data
gathering needs are satisfied.
TV2 is designed with the interaction between getevent
and evhandle as the basic building blocks. The
programmer merely adds to the list of generic events that
come with TV2 through overloading of getevent and
evhandle. The ability to enhance TV2's versions of
getevent and evhandle through overloading is a basic C++
capability. To create this structure in a conventional
24


language would be very difficult. Figure 3.2 should aid
in the understanding of the getevent and evhandle
interaction:
getevent and evhandle interactions
getevent evhandle
If it is A then
Any events? do A
Yes If it is B then
tell evhandle \ do B
what event TV2 Magic ;>
has occurred. -
No If it is 2 then
do nothing. do Z
Figure 3.2
25


CHAPTER 4
USER INTERFACE, MENUS, AND WINDOWS
To start the tracking software, one types (from a DOS
prompt) "preproc". The following window will
appear:
Display Input Output
Alt-X Exit Alt-H Halt Alt-R Resume
This is the raw canvas that the user will fill in.
Starting with the bottom of the display, the Exit
performs exactly what it means; it will terminate the
program. However it is a graceful orderly exit with
files properly closed, etc. The Halt and Resume are
necessary due to the real-time nature of the tracking
software. When Data gathering is occurring, real-time
events occur so fast that the user is unable to get
26


requests into the system. By picking the Halt (or typing
Alt-H), Data gathering will temporarily be suspended.
Any user requests can then be selected and processed.
Resume (Alt-R) will restart the Data gathering as if
there was no interruption.
The three icons on the main menu lead into separate
submenus. When Display is picked the following sub menu
appears:
Display Input Output
Sensor
Ephemeris (x,y,z)
Plot
Exit
Alt-X Exit Alt-H Halt Alt-R Resume
The Sensor and Ephemeris windows are the only two
displays available in this first version. Eventually, it
is hoped that a graphical display will be added. When
Sensor is picked the following window appears:
27


Display Input Output
r
I ! !
I 11/25/95
I System Time
I 21: 0:55.98
Sensor Display
11/25/95
Actual Time
21: 0:55.98
1
Sensors
1: 3.10000
2: 3.20000
3: 3.30000
4: 3.40000
Sensors
5: 3.50000
6: 0.00000
7: 0.00000
8: 0.00000
L
J
Alt-X Exit Alt-H Halt Alt-R Resume
This window displays time and the distance recorded
by each of the receivers (in meters). For an
understanding of what the receivers are, please refer to
the following chapters. There are two times- System and
Actual (wall clock) time. If this is a playback, these
times will be different. Otherwise they should be very
close. Due to hardware limitations, only five sensors
are-used but more could be added in the future.
28


Next, when Ephemeris is picked from the Display sub
menu, the following window will appear:
Display Input Output
Ephemeris Display
ill lit
11/25/95
System Time
21: 0:55.98
Live Data
11/25/95
Actual Time
21: 0:55.98
Position Velocity Acceleration
X 0.04454 1.138 -1.103
y 0.00000 0.000 0.000
z 0.49801 -0.102 -2.520
L__________________________________________________________________________J
Alt-X Exit Alt-H Halt Alt-R Resume
The Ephemeris Display is a window that updates twenty
times per second. The information in this window is the
state vector information. As mentioned previously, the
System and Actual times will be close to the same values
except when the Playback mode is chosen as input. If the
window is displaying simulated data, the words "Sim Data"
will flash between the exclamation points on the first
line. If the source of the data is from a file, the
words "Live Data" will be replaced by the words
"Playback".
29


Lastly, the Exit in the Display sub menu will have an
identical effect as the Exit on the bottom menu. As part
of the motif, it was necessary to have the program
termination under the left most sub menu.
Moving.on to the Input option on the main menu, the
following options are available when selected:
Display Input Output
Halt!
Resume
Mach 1
Mach 2
RS232 Comm.
Sim
Playback
Alt-X Exit Alt-H Halt Alt-R Resume
There are many options under Input. Halt and Resume
act exactly the same as from the lower menu bar. Mach 1
is the photodiode-photodetector version of the pendulum
experiment and can now be considered obsolete. The Mach
2 option will start the Data gathering software and
hardware. Please refer to the following chapters for
details on all aspects of how Data gathering is
performed.
30


RS232 selection will prompt the user to choose an
RS232 port as the source of state vectors. When a port
is chosen, the tracking system will update whenever it
receives a state vector via the chosen RS232 port. The
original purpose of the RS232 option was software
checkout. Note: in order for this option to work, the
RS232 computer hardware must be capable of data transfer
rates of 115KB or higher.
Selection of Sim will create state vectors internal
to the computer. Again, this is used primarily for
software checkout.
Lastly, Playback will prompt the user for a file
name. It will then read state vectors one at a time,
process them just as if they were generated from a live
source, and continue to do so until the end of file is
reached. In Playback mode, the time of the data will not
be processed faster than the actual time it took to
create the data. In other words, it will take one minute
to playback one minute of data. However, if the computer
that is being used to process the playback is not fast
enough to process the data at the rate it was recorded,
Playback time may slow down. This becomes readily
apparent if reading a file from a floppy disk drive.
31


The third option on the main menu is Output. When
selected, the following sub menu appears:
Display Input Output
Open File
Close File
RS232 Comm.
Alt-X Exit Alt-H Halt Alt-R Resume
The Open file option will open a file so that all
state vectors will be saved. Close file will terminate
the writing of state vectors to that file and properly
close that file. Please refer to chapter 10 (Output
Methods) for details on how to read a file created with
these two options.
The RS232 option when selected will prompt the user
for a communications port. Upon selection, the tracking
software will send state vectors to that port. In fact,
it will write out the state vectors regardless of whether
there is any one processing the RS232 information!
Please refer to chapter 10 for details on how to develop
software to process the RS232 data.
32


A typical scenario would commence by beginning the
tracking software on both the tracking computer and the
analysis computer. Next, establish RS232 communications
between the computers. Immediately following
communications linkage, bring up the Sensor display on
the tracking computer and the Ephemeris display on the
analysis computer. If data logging is desired, it can be
performed on the analysis computer or the tracking
computer.
Now the systems are ready for data gathering. This
is initiated by selecting the Mach2 Input option on the
tracking computer. The tracking computer's monitor will
display a message asking to cease all motion of the
pulser unit. When ready, click 'OK' and for five seconds
the tracking system will determine the baseline counts
(please refer to chapter 9). After five seconds the
tracking system will display another message that states
that the initialization is complete and data gathering is
ready to be performed. Click 'OK' and the tracking
system will start operating.
The analyst should observe the Sensor display and see
that the values are truly the distances between each
receiver and the pulser. On the analysis computer, the
33


analyst should observe that the ephemeris information is
valid. If it is, then the whole system is operational.
At this point, halt (Alt-H) data gathering on the
tracking computer if the analyst wishes to reconfigure
the analysis computer for a different mode or software
package. Otherwise, sit back and relax, the tracking
system will record all movements.
34


CHAPTER 5
SOFTWARE HARDWARE INTERFACE
The Computer Boards (CB) Universal library and CB
CIO-CTR05 digital I/O card were used to interface the
software and hardware. The library is a collection of
procedures that can be linked into C programs that allow
all hardware functions on all of the CB hardware products
to be accessed.
The original design was to wire the analog receivers
directly to an Analog to Digital (A/D) conversion card
and dump the data into a memory buffer for processing.
The process of directly filling memory by a hardware
device is known as Direct Memory Addressing (DMA).
Essentially, when the A/D card is filling the second half
of the buffer, the first half is processed (and vice-
versa) As the receivers respond to the pulse signal, a
slight rise in the digitized signal would be detected by
software and a response would be registered.
35


One problem with the A/D DMA transfer approach was
the speed at which analog boards process. The CB board
CIO-DAS801 processed A/D conversions at 50 KHz. When
divided over 5 receivers, each receiver was only sampled
at 10 KHz. The distance that sound traveled per sample
would have been 3.4 cm. A 250KHz board would have
improved the resolution to .7 cm but still would not have
been sufficient because the goal was 1 mm.
The other problem with the A/D DMA transfer approach
was the inability to get TV2 to interface with this real-
time buffering. Any attempt at starting the DMA transfer
within the TV2 system caused the whole computer to
freeze. This was unexpected as other venders have
interfaced to TV2 systems without any real problems
(Barret 1995).
The chosen design was implemented by building custom
digital hardware and interfacing this with an CIO-CTR05
card. This CB card has the ability to send out eight bit
digital TTL code and it has an AM9513 chip with five
counters in it. These two features were used for control
and counting.
36


One of the eight bit output lines is defined (and
used) as the Initialization line (D0UT1). This line is
set to high to reset the digital hardware so that data
gathering can occur. A second line is define as the Go!
line (D0UT2). When this line is set to high, the pulse
hardware is activated and the digital hardware is set in
motion.
The counters on the CB card accumulate pulses from a
2.5 MHz Oscillator that resides on the digital board.
Please refer to chapter 8. Each counter is
electronically connected to a different receiver and the
oscillations for a given counter commence a short time
(~.5 ms) after the D0UT2 line goes to five volts and
ceases when the analog receiver attached to the given
circuit receives the ultra-sound signal from the pulsing
transducer. At 2.5 MHz, sound travels .14 mm for each
oscillation and this resolution achieves the goal of one
mm.
The software is in a loop which begins by setting the
Init. line to high. Next, the Init. line is reset and
the values of the counters are extracted and placed into
memory. These values are then processed by the tracking
software and the counters are reset to zero. Next, data
37


gathering commences with the Go! line being activated for
a short period of time- The tracking software sets a
timer for .01 seconds during which all other system
functions (screen updates, mouse and keyboard actions,
etc.) are processed. Upon completion of the .01 second
delay, the cycle repeats (Figure 5.1).
Real-time Flow Diagram
Figure 5.1
38


CHAPTER 6
PULSER HARDWARE
The Pulser Hardware consists of two hemispherical
piezoelectric transducers and the electronics to drive
them. Many months were spent developing a system that
would generate sound waves that spatially separated
electrostatic receiving transducers could respond to.
The method of attack to this problem was to create
ultrasound waves with maximum intensity (loudness) and to
optimize the receiving capability of the electrostatic
transducer analog circuitry. For details on the
receiving analog circuitry, please refer to the following
chapter.
The generation of suitable sound waves became the
most difficult portion of the entire system. Many
different materials were experimented with: spark
generation, ringing bells, high impact metal strikes,
high frequency speakers (tweeters), electrostatic
transducers, and piezoelectric transducers.
39


During creation of the analog circuitry to process
the electrostatic receiving transducers, an electrostatic
transducer of the same design (Polaroid 7000 series) was
implemented to generate sound waves. The electrostatic
transducer was driven by wiring the Go! line (DOUT 2) to
an off-the-shelf board built by Polaroid. The Polaroid
board drove the transducer when the Go! line was set to
five volts. This worked extremely well and distances
exceeding 3 meters were achieved. However, the
electrostatic transducer produced a very focused sound
beam which dropped off quite rapidly outside of a small
cone. As the pendulum could move quite freely; this
design, although good for development and test purposes,
would never work in the final assembly.
Placing a series of the electrostatic transducers on
the outside of a sphere in an air-raid siren fashion
proved too unwieldy and the Polaroid board was unable to
drive more than six of them.
The EDO corporation produces piezoelectric
transducers to fit customer design needs. The shape that
these transducers come in includes cylindrical,
hemispherical, and spherical. Due to the desire to
produce sound waves to fill a volume of air, the ideal
40


shape for this system would have been spherical.
However, although EDO manufactures spherical
piezoelectric transducers, the cost to build one for this
project was prohibitive. However EDO did have surplus
hemispherical transducers at $250.00 each. EDO
classified the type of transducer as EC64. Under the
naval grant two were purchased and these have become the
central piece of hardware to generate ultrasound waves.
The next challenge was designing a circuit that would
drive the hemispherical piezoelectric transducer. The
first successful approach was to drive the transducer
with a series of 16 pulses at 5 volts. A 555 oscillator
was employed with a potentiometer so that the frequency
of the pulses could be varied. The net result was that
the voltage spikes to the transducer could be tuned for
its mechanical resonance. The mechanical resonance
occurred around 53 KHz. This created sound waves that
grew progressively louder as the sixteen pulses were
received. The electrostatic receivers were able to
pickup this signal out to .5 meters. However the
question of which wave was being picked up was a problem.
If different receivers first responded to different
oscillations, the precise distance could not accurately
41


be measured. The second and final design involved
sending a single high voltage spike to the transducer.
This caused the largest mechanical oscillation to be the
first one and then it dampened out quickly. The
oscillations occurred at 52 KHz and thus the ultrasonic
wave is at 52 KHz.
The circuitry to drive the hemispherical
piezoelectric transducers resides on a pulse board and
inside the hemispheres. The following diagram
illustrates the layout of the circuitry to drive the
piezoelectric transducer:
Pulse Hardware
+Vc 180
Inside the Hemisphere Piezo Transducer
Figure 6.1
42


As can be seen, the main components are the Silicon-
Controlled-Rectifier (SCR) and the 125 |j.F capacitor.
Essentially, when the Go! line transitions to five volts,
the gate on the SCR opens allowing the capacitor to
discharge. The current sweeps through to the pulse
transformer inside the transducer which steps up the
voltage.
It is difficult to tell what exact voltage occurs on
the secondary side of the transformer because the
transducer and transformer create an RLC type circuit and
placing a measuring probe into the circuit changes its
characteristics. In addition, the oscilloscope is only
capable of measuring up to 600 volts. However indirect
measurements were achieved by measuring the voltage gain
of the pulse transformer at 39:1. In addition, 22 volts
was measured crossing the primary side. This suggests
that the secondary side is generating around 850 volts.
In any case, it is sufficient to cause a signal that the
receivers can measure at over one meter, clearly heard as
a distinct clicking sound, and can be felt if one holds
the transducer.
It is reassuring to be able to hear the response,
because piezoelectric transducers are intrinsically very
43


inefficient in coupling sound from solid piezoelectric to
neighboring air because of the large difference in
acoustic impedance (Schindel and Hutchins 1995). Very
little of the electrical energy is converted into
mechanical energy and then most of this is reflected
inside the boundary surface (Manthey, Kroemer, and Magori
1992).
The EC64 transducers are built from Lead Zirconante
Titanate (PZT) which is a standard piezoceramic material.
The electromechanical coupling is .15 (from EDO
specifications) which means that only 15% of the
electrical energy is converted to mechanical energy and
vice versa. Next, the equation for the transmission
coefficient is the following:
4ZlZz (Bentley 1988) (6.1)
aT = (Z-l + z2)2
Where Zx is the acoustic impedance of the matching
layer and Z2 is the propagation impedance. For PZT, Zx
is 2.5 x 107 kgirr2s_1 (Manthey et al 1992) and Z2 for air
is 430 kgm~2s_1 (Bentley 1988) so aT is 7 x 10-5. This
means that only a tiny fraction of the mechanical energy
in PZT based devices is transmitted into the air. The
44


solution is to drive PZT piezoelectric transducers via a
burst signal (Manthey et al 1992). The answer for the
tracking system is to hit the EC64 transducers with 850+
volts.
The limiting factor in how much charge the capacitor
receives is due to the resistor. The lower the resistor,
the faster the capacitor charges. This is a typical RC
circuit situation. However, there is a minimum amount of
resistance that can be placed in the circuit. If the
resistance drops to less than a critical level, the SCRs
gate will not close. However the minimum resistance is
relative to the size of the capacitor. The larger the
capacitor, the smaller the minimum resistance allowed.
At 125 jxF, the minimum resistance is 180 ohms. This
allows a 22 volt charge to occur before the next pulse
needs to be delivered. It is not well understood why the
circuit combination of resistor, capacitor, SCR,
transformer, and transducer works the way it does. In
fact, minimum resistance in the circuit was discovered
quite by accident. However the following table of values
should help:
45


Micro-Farad
Min. Ohms
Max. Volts
10 1000 24
100 450 14
125 180 22
At 10 jj.F, the maximum voltage is achieved; however
the current produced is small resulting in less power
being delivered to the transducer. The maximum power is
thus at 125 [iF. At this level, the circuit delivers 22
volts to the primary side.
The inability to buy a spherical transducer due to
lack of funds turned into a blessing because the pulse
transformer fit between the two hemispheres and the high
voltage is shielded from human exposure by the
transducers.
If the SCR gate does not close, 3.2 watts of power
will drain through the circuit indefinitely until the
circuit is broken. During testing, this happened quite
often. The symptoms of this breakdown is the pulser
quits. The solution is to recycle the pulser's power
supply by turning it off and back on. After months of
tuning and tweaking, the right mix of resistors, SCR, and
capacitor has resulted in a circuit that has been tested
for hours of continuous operation without mishap.
46


An installed safety feature is a one megaohm resistor
between the positive and negative posts on the 125
capacitor. This drains the capacitor in 30 seconds after
power shuts down thereby eliminating the chance that the
capacitor stays charged.
47


CHAPTER 7
RECEIVER HARDWARE
The receiver hardware can be broken into three
sections: the transducer, electronic amplification
hardware, and the outer physical housing. The transducer
converts sound waves into electrical signals; the
electronics amplify this signal so that it can influence
5 volt TTL digital logic; and the physical housing
electrically shields the electronics and concentrates the
ultrasound waves.
Transducer
Electrostatic transducers use a metallic backplate
over which a membrane (or diaphragm) is stretched. Sound
waves cause the membrane to fluctuate thereby modifying
the charge to the backplate (Hutchins and Wright 1994).
This mechanism results in larger responses to ultrasound
waves than are possible with the piezoelectric materials
due to the poor transmission coefficient as outlined in
the previous chapter. The Polaroid 7000 series
48


5 (/Division
electrostatic transducers were chosen specifically for
their frequency distribution and low cost.
The strength of the ultrasound waves that are
received by a Polaroid 7000 series transducer are
influenced by frequency and flux. The 7000 series
detectivity varies depending upon the ultrasonic
frequency. Figure 7.1 includes a curve that shows the
detectivity verses frequency. As can be seen, the 52 KHz
that the pulsing piezoelectric transducer produces
matches the maximum detectivity capability of the 7000
series transducer. The surface of the transducer is a
plane so maximum flux occurs when the plane is within a
small angle (10 degrees) of being normal to the line-of-
site vector. Figure 7.1 illustrates this pattern.
Polaroid 7000 Series Specifications

Receive Vottage Response
Figure 7.1
49


Analog Electronics
The circuitry that amplifies the signal from the 7000
series transducer is located on a small (7 x 4.5 cm)
board. Figure 7.2 illustrates the complexity of the
electronics which are involved in the amplification of
the electrostatic transducer's signal.
Analog Amplification Circuitry
Figure 7.2
50


As can be seen, there are four Operational Amplifiers
(Op Amps) in series to boost the transducers signal.
All of the Op Amps are LF 356 JFETs. Buying and
shuffling Op Amps around was made easier by using the
same component. The LF 356s have high slew rates and
good gain-bandwidth product (to about 250:1 at 50 KHz).
Each Op Amp in the series is known a's a stage hence
this circuit is known as a four stage circuit.
The signal that the electrostatic transducer produces
is in the 50 micro-volt range. This means that an
amplification of 10,000:1 is necessary for the system to
produce a signal that can be processed with five volt TTL
digital logic circuits.
The first stage has the electrostatic transducer as
input with a 75:1 gain setting. The transducer is wired
to the positive side of the Op Amp so it is a positive
gain stage. There is an 8 megaohm resister which ties
the transducer to ground. This prevents a build up of
charge that might occur otherwise.
Between the first and second stages is a one |iF
capacitor. This capacitor performs two functions- it
51


eliminates any DC biases and it eliminates any low
frequency AC signals.
There is a bleed between the positive and negative
terminals of the first stage Op Amp due to the charging
on the back electrode of the 7000 transducer. This
causes a continuous DC voltage to exit the first stage Op
Amp. By having the capacitor, this DC offset bias is
eliminated. In addition, any AC signal that is less than
250 Hz, will bias the one side of the capacitor too
slowly to pass a signal through. This results in low
frequency AC signals (such as 60 Hz ambient AC noise)
being filtered out. An actual signal from the
electrostatic transducer will increase (or decrease) much
faster than the capacitor can filter so the signal will
be passed on to the next stage.
The net result is that the capacitor converts the
output voltage of the first stage to the electrical
equivalent of its time derivative. Hence, the second
stage is amplifying the derivative (or slope) of the
output of the first stage. Slow changes in voltage
result in slopes that are too small to be passed along,
and rapid changes in voltage create slopes that are
sufficient to cause the second stage to respond. In
52


addition, the DC bias is a constant that is eliminated.
Figure 7.3 illustrates this phenomena.
First Stage Output
(Filtered and Unfiltered)
1st stage
Signal
before
Cap.
1st stage
Signal
After
Cap.
Figure 7.3
The second stage Op Amp has a gain of 100:1. This is
close to the maximum capability of the LF 356. The
signal is connected to the negative terminal which
results in a negative amplification. Due to the
sinusoidal nature of the electrostatic transducer signal,
there is little difference between the original wave
signal and an inverse of that signal.
53


The result for the second stage Op Amp is a large
gain in voltage. The magnitude of the noise exiting the
second stage hovers around a half of a volt. To
eliminate most of this noise, an IN4934 0.49 volt fast
recovery diode is in the signal path after the second
stage. This diode filters out most of the amplified
electrical noise while leaving the true transducer signal
alone. Any signal that the electrostatic transducer
produces that is amplified to less than .49 volts at the
output of this second stage will be lost. This is the
inherent limitation of this system.
In addition, the .49v diode filters out any negative
signal. This electrostatic transducer creates a
sinusoidal wave that oscillates positively and
negatively. The negative portion of the wave is not
necessary for the digital TTL logic; hence by filtering
this negative signal out, the circuit is simplified
without loss of critical or useful information.
The third stage strictly amplifies the output of the
second stage. This is a 80:1 gain Op Amp stage which
should result in amplifying the smallest signal up to a
value that is close to 12 volt maximum voltage that the
Op Amp can produce.
54


Between the third and fourth stages, there is a 60 pF
capacitor to filter out any DC bias or higher frequency
AC signals. In addition, there is a 15k Ohm tie to
ground so that the posts of the fourth stage Op Amp are
set to the same voltage (ground). The net result should
be a signal that is smoothly tied to ground except when
the analog electronics are responding to the
electrostatic transducer's signal.
The gain on this fourth stage is determined by a
variable trim resistor with a range of 100 to 10,000
ohms. The range of the gain swings between 1:1 and 80:1.
This allows each box to be 'tuned' for maximum gain. As
the basic signal is amplified, so is the noise. The goal
is to keep the noise rates below one volt so that the
digital hardware will not confuse noise for a true
signal. However by increasing the gain up to a maximum
noise level of 1 volt, the response to a true signal will
also be maximized.
The output of the last stage should force the voltage
to 12 volts if there is an intermediate voltage coming
out of the third stage. This creates a signal that is
convertible to a five volt CMOS signal that the digital
hardware can use. The final conversion to a five volt
55


signal occurs on the digital board. Please refer to the
following chapter for details on this procedure.
Physical Housing
The electronics necessary to boost the electrostatic
transducer's signal reside on a small card that is
located inside an electrically shielded box. One face of
the box houses the electrostatic transducer. At the
opposite end are two cables. The first cable has a DB 9
connector and it contains the power (+/- 12 volts) and
ground wires. The second cable is coaxial and uses the
standard coaxial connector (for shielding). The signal
carried on the coaxial cable contains the output of the
analog circuitry for further processing and use by the
system. The following picture is of a receiver with the
lid removed so that the reader can observe the placement
of the internal electronics.
56


Receiver Hardware
Transducer
Figure 7.4
The design of these small analog boxes was dictated
by the small signal being generated by the electrostatic
transducers and hence the need to reduce any source of
electrical crosstalk. The optimum solution was the
placing of the amplification circuitry directly behind
the electrostatic transducer in a single housing.
The receivers were not able to steadily detect the
ultrasound waves from the pulsing unit when the distance
between the two units exceeded one meter. The range of
motion that the simulated load was designed to move is .5
meters in any given direction. To keep the pulsing unit
(simulated load) within the 10 degree optimal response
57


cone required that the receivers be at least 3 meters
away. Hence, there was a strong need to boost the gain
by a factor of 10 or more because tripling the distance
decreases the flux by an order of magnitude.
The increase in gain was achieved by placing each
receiver at the focus of a parabolic 18 inch reflector.
This increased the surface area that the flux passes
through from the area of the 7000 series transducer (1
inch2) to the area of the mirror (254 inch2) There are
many losses due to reflection, absorption, and shadowing.
However even with these losses the signal that the
receivers are generating is very strong.
Due to the reflector being added to the receiver
design after the electronics boxes were built (also time
constraints on the completion of this project), the
receiver boxes are placed as a unit facing into the focal
point. This reduces efficiency considerably but as a
first approach is sufficient. A future design
improvement might be to modify the receivers so that only
the transducer is at the focal point. A second option
might be to have a secondary reflector send the
ultrasound waves to the electronics box which could then
be located behind the primary reflector.
58


CHAPTER 8
DIGITAL HARDWARE INTERFACE BOARD
The digital hardware board interfaces the analog
boards attached to the electrostatic transducers with the
counters that reside on the CB card. It receives the Go
(DOUT 2) signal from the CB card, delays for a user
selected time frame (~.5 ms), and then allows the 2.5 MHz
oscillator pulses to be sent to the counters that reside
on the CB card. The detection of an ultrasound pulse by
the analog hardware causes the digital board to cease
sending oscillations for that receiver. The cessation of
oscillations results in the termination of counts for
that given counter.
At the end of the cycle (.01 seconds), all counters
will have ceased due to receiving the ultrasound pulse
signal or due to reaching their maximum value (65535).
The counters can be programmed to roll over or cease
counting upon hitting their maximum value. For this
application, the tracking software sets up the counters
to cease counting and thus prevent any ambiguity.
59


Sound travels at approximately 343 meters/sec at room
temperature (Serway 1990). With the oscillator pulsing
at 2.5 MHz, each count equates to 0.14 mm. This is the
inherent accuracy of each receiver. The design goal was
1 mm accuracy, so this level of resolution is acceptable.
The 2.5 MHz oscillator was chosen due to the speed at
which the CMOS chips can change state (220 ns). At 2.5
MHz, a cycle equates to 400 ns.
The digital board contains the Delay-Go circuit and
the five parallel digital input circuits. The Delay-Go
circuit is necessary due to the electrical crosstalk that
occurs when the capacitor in the pulse circuit
discharges. The crosstalk results in a spike in all of
the receivers when the Go! signal (DOUT 2) is sent to the
pulse circuit. The Delay-Go signal does not occur until
after the spike in the receivers has passed. The next
spike from the receivers occurs when the ultrasound waves
reach the receivers from the pulse unit on the pendulum.
Hence, by delaying the Go! signal to the interface
circuits, the resetting of the flip-flop on the receiving
circuit is performed due to the ultrasonic waves and not
due to the electrical crosstalk. Figure 8.1 is a diagram
60


of the Initialize, Go, and Delay-Go signals laid out in
time sequence.
&
O
>
5
4.5
4
as
3
2.6
2
1.6
1
0.5
0
Signal Lines
Time
Initialize
Go Delay-Go
Figure 8.1
Figure 8.2 illustrates a typical receiver signal.
Its time scale is the same as the previous signal
diagram.
61


12
1 0
8
6
5
4
2
0
-2
Receiver line
(Example)
Crosstalk
Ultra-Soun
Response
Noise
Iff
Time
Figure 8.2
A longer delay in the Delay-Go circuit decreases the
probability of the digital board incorrectly triggering
on the pulse inducing electrical crosstalk. However a
longer delay also means that the minimum distance between
the pulse unit and receiver unit increases. To ease the
process of finding the minimum sufficient delay, an
oscillator with a variable frequency generator was built.
The fundamental chip was the LM555C timer and Figure 8.3
illustrates the selected design.
62


555 Oscillator Configuration
Figure 8.3
The frequency that the LM555C oscillator produces is
tuned to an optimum level through the use of the variable
resistor. The oscillator is fed into a counter and when
it receives 15 pulses, the Delay-Go signal occurs. The
Delay-Go signal can vary from 2fj.s to 1 ms which
corresponds to a minimum distance between 0 and 34 cm.
Tests have shown that 0.3 ms (10 cm) is close to the
operating value. Figure 8.4 illustrates the Delay-Go
signal electronics.
63


Delay-Go Circuit
Figure 8.4
The original design was to place some of the digital
circuitry in the analog boxes with the output generating
0 volts when there was no signal and 5 volts in response
to a signal. This proved impractical due to the
crosstalk that digital chips produce. Instead, the
analog boxes produce a signal that is fluctuating between
0 and 1 volt and then jumps up to 12 volts when
responding to appropriate input. An inverting Schmitt
trigger was employed and placed on the digital board to
convert the analog signal into a 5 volt signal. The
inverting Schmitt trigger registers anything less than
two volts as five and anything greater as zero volts. An
initial concern that hitting the trigger with 12 volts
might pose some hardware problems was unwarranted. In
64


addition, the Schmitt trigger has a hysteresis feature
which prevents rapid toggling as the input voltage passes
through the switch point. Hence, the input to the
Schmitt device is an analog continuous function and the
output is a discrete (0 or 5 volt) value.
Lastly, Figure 8.5 demonstrates how one of the five
parallel digital circuits appears.
Main Board Digital Electronics
(5 sets)
Figure 8.5
Each of these parallel circuits is attached to a
different input analog to digital receiver circuit and
the parallel circuit's output is wired to a different
counter on the CB I/O card. The common inputs to each
65


parallel circuit are the Init. (DOUT 1), Delay Go lines,
and the 2.5 MHz oscillator.
The OR gate allows the cessation of counting and the
resetting of the flip-flop when the receiver activates or
with the initialization of the next pulsing cycle. Due
to there being a chance that a receiver is not activated,
the flip-flop must be reset by some other means. In this
instance, the other means is the Init. line (DOUT 1).
66


CHAPTER 9
STATE VECTOR DETERMINATION
As outlined in the previous chapter, the counters in
the CB card have values that translate into distance.
Each count is equal to .14 mm. This is the distance that
sound travels (343 m/s) per interval at 2.5 MHz.
At the start of the experimental session, the
distance between each receiver and the origin (in
Cartesian coordinates) is read into the tracking software
from a database file but the tracking software gives the
user a chance to override these values if necessary. The
origin is defined as the pendulum being straight down
with the supporting apparatus at a prescribed "home"
position. The database file is called "sensors.dat" and
can be modified with any text editor.
The distance between the first receiver and the
origin is the following:
Ri = Sqrt(X!2 + Y;l2 + Zx2) (9.1)
67


The tracking software then asks for the user to pause
five seconds so that the count for the given distance is
measured. The number of counts will vary based on
temperature, humidity, atmospheric pressure, etc.
(OConnell 1992). The result of this static measurement
is known as the Baseline Count (BC). Each receiver will
have a unique BC value and it equals "the exact distance
from the receiver to the origin of the coordinate system.
When actual data gathering occurs, the distance
between a given receiver and the piezoelectric transducer
(M) is determined by subtracting the Measured Count (MC)
from BC. The result is then multiplied by .14 mm and
added to R.
So, Ml = (MC! BCi)*.14mm + Rx (9.2)
When a data gathering cycle completes, the positional
determination analysis is performed. Each receiver only
tells the system how far the pendulum's center of mass is
from that receiver. The goal of the tracking system is
to determine the location of the simulated crane load in
three dimensions (X, Y, and Z). Using the Gauss-Jordan
method, four receivers need to have valid responses
inorder to determe X, Y, and Z. However if the problem
68


can be thought of geometrically with each receiver giving
a distance measurement, then that distance measurement is
acutually a radius of a sphere with the receiver at the
point of origin. The intersection of three spheres
occurs in two places. The fourth sphere is only needed
to resolve which of the two intersecting places is the
correct position.
Before discussing the equations, a few definitions
are in order. X, Y, and Z are the unknown coordinates to
the pendulum's center of mass. Xa, Ya, and Za are the
coordinates of a given receiver. is the measured
distance between the center of mass of the pendulum and a
given receiver (see above equations).
M]2 = (X - Xi)2 + (Y - Y]_)2 + (Z - ZX)2 (9.3a)
M22 = (X - X2)2 + (Y - Y2)2 + (Z - Z2)2 (9.3b)
M32 = (X - X3)2 + (Y - Y3)2 + (Z - Z3)2 (9.3c)
M42 = (X - X4)2 + (Y - Y4)2 + (Z - Z4)2 (9.3d)
Doing a little algebra on the first equation and
propagating yields:
69


X2 - 2X*X1 + Y2 - 2y*y3 + z2 - 2Z*Z-^ = M-l2 - xi2 Yi2 " Yi2 (9.4a)
X2 - 2X*X2 + Y2 - 2y*y2 ,+ z2 ~ 2Z*Z2 = m22 - x22 y22 - y22 (9.4b)
X2 - 2X*X3 + Y2 - 2Y*Y3 + z2 - 2Z*Z3 = m32 - x32 y32 - y32 (9.4c)
X2 - 2X*X4 + Y2 - 2Y*Y4 + z2 - 2Z*Z4 = m42 - y 2 y 2 x4 y4 - y42 (9.4d)
Subtracting the first equation from each in turn will
drop out three variables from the remaining equations.
In addition, the symbol ka will be substituted for the
constants on the right side.
- 2X*X1 + Y2 2Y*Y^ + Z2 2Z*Z-l = kx (9.5a)
-2X*(X2-X1) - 2Y*(Y2-Y1) - 2Z*(Z2-Z1) = k2-kx (9.5b)
-2X*(X3-X1) - 2Y*(Y3-Y1) - 2Z* {Z2-Z-i) II OJ 1 X M (9.5c)
-2X* - 2Y*(Y4-Y1) - 2Z*(Z4-Z1) = k4-k]_ (9.5d)
The next step in the Gauss-Jordan method is to
normalize the first coefficient (equation 9.5a is
complete).
X + y*(Y2-Y1)/(X2-X1) + Z* (Z2-Z1)/(X2-X1) = - O^-k-L) /2 (x^x^ (9.6b)
x + Y*(Y3-Y1)/(X3-X1) + z*(z3-z1)/(x3-x1) = -(k3-k1)/2(x3-x1) (9.6c)
x + Y*(Y4-Y1)/(X4-X1) + Z*(Z4-Z1)/(X4-X1) = -(k4-k1)/2(x4-x1) (9.6d)
The cycle repeats with the subtraction of 9.6b from c
and d. But the constants are getting out of hand so the
following substitutions are used.
70


(9.7a)
m3 = (y3-y1)/(x3-x1) (y2-y1)/(x2-x1)
n3 = (z3-z1)/(x3-x1) (z2-z1)/(x2-x1) (9.7b)
I3 = -(k3-k1)/2(x3-x1) + (k2-k1)/2(X2-X1) (9.7c)
The equations now have the following form:
Y*m3 + Z*n3 = 13 (9.8c)
Y*m4 + Z*n4 = 14 (9.8d)
Again, it is time to normalize the equations:
+ Z*n3/m3 = l3/m3 . (9.9c)
+ Z*n4/m4 = l4/m4 (9.9d)
At last, the final result is at hand. Subtract 9.9c
from 9.9d:
z* (n4/m4 n3/m3) = l4/m4 l3/m3 (9.10d)
An equation that yields a value for Z has been found.
Once Z has been found, this value is used in equation
9.9c to solve for Y. The Z & Y values are then plugged
into 9.6b to determine an X value. The following
recapitulates these equations:
x = -(k2-k1)/2(x2-x1) y*(y2-y1)/(x2-x1) z*(z2-z1)/(x2-x1) (9.12b)
Y = l3/m3 + Z*n3/m3 (9.12c)
z = (l4/m4 l3/m3) / (n4/m4 n3/m3) (9.12d)
71


Since there are five transducers, the tracking system
can fall into a state of over-sampling when five
receivers have valid measurements. If five receivers
have valid responses, the number of solutions is four.
The techniques to amalgamate this information and come up
with a better solution have not been explored as of this
time. The initial implementation is to average the
results together.
Determination of velocity (Vx, Vy, and Vz) for this
initial product is the simple velocity algorithm:
Vx - [^previous - ^current] /^time (9.11a)
VY = [^previous ~ ^current ] /^time (9.11b)
vz - [^previous ~ ^current] /^time (9.11c)
^time is the interval between samples. This is
currently 55 milliseconds. The acceleration (Ax, Ay, and
Az) follows in like manner:
Ax = [Vx previous _ Vx current] /^time (9.12a)
II > < previous Vy current J /^time (9.12b)
Az = previous Vz current^ /^time (9.12c)
72


The position, velocity, acceleration, and the time at
which this information is valid is known as the state
vector. The state vector can be displayed, written out
to a file, or transferred via RS232 to another computer.
Please refer to the following chapter for more
information on how this data can be transmitted out of
the tracking system.
73


CHAPTER 10
OUTPUT METHODS
The information that the tracking system is creating
would be useless if the information wasn't passed to
other computer programs for further use and analysis.
This process of passing information is performed through
logging to a file or transmission via RS232 port.
The tracking system develops the position of the
pendulum's center of mass and it is contained in a data
format known as a state vector. As explained in the
previous chapter, the state vector consists of time,
position in Cartesian coordinates (X, Y, and Z),
velocity, and acceleration.
Another piece of information deals' with the
confidence that the tracking system has with its
solution. A scale system has been employed with a value
of 100 for the tracking system being satisfied with the
solution to a value of zero for the tracking solution not
being satisfied with its solution.
74


There are 32 one bit flags available so that special
information can be passed on. Currently only two flags
have been used: sim_data and live. The sim_data flag is
set to one if the data in the state vector is generated
by a simulation. If the data in the state vector is
created by processing the actual pendulum data, then the
sim_flag is set to zero. If the data is being read from
a stored file (playback), the live flag will be set to
zero; otherwise the live flag is set to one. Also note
that if the data is not live, the time associated with
the state vectors will not equal the actual wall clock
time.
It is anticipated that in the future the orientation
of the pendulum's center of mass will be determined and
analyzed. Orientation (or attitude) of a center of mass
can be represented in a three coordinate system: pitch,
roll, and yaw. For this system, it is not so important
what the units are, just that room is made available for
this information so that future code modifications are
minimized.
The above five items: time; confidence; flags; X,Y, &
Z; information; and Pitch, Roll, and Yaw information;
compose the state vector. All information in the state
75


vector is in integer format. Table 10.1 contains details
concerning the format for each piece of data. By placing
all the state vector information into integer values, the
state vector is free from a given computer's floating
point representation.
Type
Time
Size Explanation
8 bytes: The first word (4 bytes) is year*1000 +
day of year. The second word is in
elapsed 10,000ths of a second from the
beginning of the day.
Confidence 2 bytes: Not well defined at this time. 100
good; 0 bad confidence of position
information.
Flags 8 bytes: bit 0 (byte 0) is sim_data flag; bit 1
is live flag. The rest of the bits are
unused as of this time.
state_tensor 72 bytes: This is a 6 by 3 matrix with a word (4
bytes) for each value. The six indices
are X, Y, Z, Pitch, Roll, Yaw. The
three indices are position, velocity,
and acceleration. The basic units are
micrometers and microradians
repectively.
Table 10.1
Appendices A through E contain all of the files that
have the necessary environment variables and source code
76


so that a user can interface an analysis application to
the tracking system.
The structures "banner" and "output_buffer" located
in the file named pendulum.h (appendix A) are the two
building blocks that create the state vector. All of the
tracking system output routines place the state vector
data in the output_buffer format. This means that any
program written to analyze the state vector data will
need to use this format.
The tracking system can write the data to disk simply
by selecting Output from the main menu and the Open
option under the Output sub menu (Please refer to chapter
4). The user must enter a valid file name. At any time
the user can close the file by selecting the Close option
from the Output sub menu. When Close is selected, data
logging is immediately suspended.
(
The inlog.c source file found in appendix B can be
used to open a file with the stored state vector
information. Inlog.c also has the 'C' code which can be
used to read a record from a file containing stored state
vector information.
77


The tracking system can send the data to another
computer via RS232 protocol simply by selecting Output
from the main menu and the RS232 option under the Output
sub menu. The user must select the appropriate
communications port. The RS232.C vl.6 by C. Karcher
contains library routines that interface the tracking
system software to an RS232 port. When selecting the
RS232 output option, data will immediately start being
shipped to. the RS232.port. If the user selects the RS232
output source before selecting an input source, data will
start flowing to the RS232 port as soon as an input
source is selected.
The file rs232stf.c from Appendix E contains the
procedure rsinpint which will initialize a host's RS232
port so that it can receive data from another computer
processing the tracking software. The nature of the
RS232 library routines is that the initialization of the
port from one computer can occur at a different time than
the initialization at the other computer.
Rs232stf.c also contains rsgetdat which can be used
to receive state vector information from the tracking
system. The state vector information from the tracking
computer is in the integer format as described above.
78


The receiving computer will probably have to convert it
to floating point values to make the information useful.
A sample conversion procedure (convert.c) is included to
aid the analyst in this process.
Lastly an orderly shutdown of RS232 communications
must occur. This can be done with the 'C' procedure
rsclose which is also found in rs232stf.c. If the rs232
port is not properly closed on the receiving computer,
there is a chance that the receiving computer will hang
waiting for I/O from its rs232 port.
The code that is listed in Appendices A thrrough E
contain all the routines that are necessary for an
analyst to build software that can interface to the
tracking system's state vectors. There are other
routines listed which would allow an analyst to log data
or send data to another computer. These routines might
be useful or provide insight and are thus included.
79


CHAPTER 11
CONCLUSION
In terms of future improvements, it would not be
technically difficult to increase the resolution of the
system by using a faster oscillator. This could be
accomplished by increasing the digital voltage to 10 or
higher and by replacing the existing chips with faster
(and more expensive) ones.
Another improvement deals with increasing the number
of samples. Currently the system samples 20 times per
second due to the speed that the computer can run the
software program. A faster computer might speed this up.
However, the pulsing capacitor charges to 22 volts in 50
ms. To get the same stored energy into the capacitor in
a shorter time period would require a combination of a
larger power supply and/or less charge limiting
resistance. Currently, the power supply for the pulser
hardware delivers 24 volts DC and is delivering a
sustained rate of 3.2 watts. Another consideration is
that more power usage would probably entail the need for
80


active cooling. All of these problems are easily solved
but will add to the current cost of the system.
The modifications to add pitch, yaw, and roll could
be achieved by using two different pulsing units and
Ping-Pong the units. Changing the electronics to pulse
in this fashion would not be very difficult and the
software modifications would be minimal. The most
difficult aspect would be finding suitable pulsing
transducers.
The ultrasound pulse-receive tracking system was
designed for a three dimensional pendulum experiment.
However a pendulum experiment was not intended to be its
only application. With little or no modification, the
tracking system could be installed into any apparatus
where precise location is a desired goal. The only
requirement is good line-of-sight between the pulsing
unit and receivers. As an example, an air track could be
rigged with receivers and the pulsing unit placed onto
the car.
The cost of the tracking system is very modest at
less than four thousand dollars. Any basic Pentium or
faster processor based computer will serve as a platform
81


and the addition of a single $200.00 card gives the
computer the necessary hardware to perform the tracking
function. The rest of the hardware components can be
purchased for under $1,000.00. As such, it is hoped that
this system will be used with other applications in the
future.
82


APPENDIX A
PENDULUM.H
/* here lies all of the specialty items that are */
/* going into the pendulumn project. */
#define pi 3.141592654
#define surface_gravity 9.80
#define input_direction 1
#define output_direction 2
tdefine buffer_size 1024
#define sync_j?attern OxAA
#define BOARD_NUM 1
#define BUF_SIZE 30000
#define ADRANGE BIP5VOLTS
#define MIN_VOLTS -5.0
#define MAX_VOLTS +5.0
#define MAX_COUNT 4096
#define HChan 7
#define LChan 0
tdefine Clock_Speed 2457600.0
// mach2_sample_rate is the raw hertz rate
// it will look at each channel in order.
tdefine mach2_sample_rate 12
tdefine mach2_buffer_size 36
tdefine one_third 12
tdefine two_third 24
tdefine Process_Mach2_Data 119
tdefine Gather Mach2 Data 120
83


PENDULUM.H (Continued)
/* banners are the flags that anyone can use for */
/* whatever reason they feel like. */
/* 32 bits are reserved in the output buffer */
/* for this endeavor. */
struct banners {
unsigned sim_data : 1;
unsigned live : 1;
unsigned unusedl :14;
unsigned unused2 :16;
} ;
/* here comes the output buffer */
/* the purpose of the this is to give form */
/* time[0] is year and day of year example:95110 */
/* time[l] is fraction of a day. However it is */
/* is in ten thousandths of a day units */
/* so at 1:00 am it equals 3,600,000,000 */
struct output_buffer {
unsigned long int time[2];
unsigned short int confidence;
struct banners flags;
signed long int state_tensor[6][3];
} ;
/* here comes the position tensor */
/* the purpose of this is that this is how the */
/* data is kept internally to the program */
/* it can then be written out if so desired */
struct position_vector {
double elapsed_time[2]; /* 0 is days 1 is fractions of days
*/
unsigned short int confidence;
struct banners flags;
double x[3],y[3],z[3],pitch[3],roll[3],yaw[3];
} ;
84


PENDULUM. H (Continued)
struct matrix_cell {
// double
// double
sensor
double
double
double
double
};
measured_squared[ 4 ] ;
range_squared[4]; // square of the position of each
x l_x2, yl_y2, z l_z 2;
x2_x3,y2_y3,z2_z3;
x3_xl,y3_yl, z3_zl;
kl_k2,k2_k3,k3_kl;
/* here are all of the prototypes unique to this software project */
/* position_vector to output_buffer direction = 1 */
/* output__buffer to position_vector direction =2 */
int convert(struct position_vector *datal,
struct output_buffer *data2,
int direction);
int simulate(struct position_vector *data, double theta_max,
double phi_vel);
int outlog(struct output_buffer *data,int event_flag, char file_name[128]);
int inlog(struct output_buffer *data, int event_flag, char file_name[128]);
85


APPENDIX B
INLOG.C
#include "stdio.h"
#include "dos.h"
#include "pendulumn.h
// the three states of event_flag
// -1) close an old file and open a new one
// 0) read an existing file
// 1) close an old file
// The internal variable open_file is the other key
// 0) no file open
// 1) file is open
int inlog(struct output_buffer *data,int event_flag, char
file_name[128])
{
static int open_file = 0;
int result = 0,count;
static FILE *handle;
if (((event_flag == -1) && (open_file != 0)) ||
(event_flag == 1)) {
open_file =0; // close the file
if (fclose(handle) != 0) { // Blowing chunks couldn't
close
result = 1; // an open file
)
}
if (event_flag == -1) {
handle = fopen(f i1e_name,"rb");
if ((handle) {
result = 1;
open_file =0;
}
else {
open_file = 1;
}
}
86


INLOG.C (Continue)
if ((event_flag == 0) && (open_file != 0)) {
count = sizeof(*data);
count = fread (data, sizeof (Mata) 1,handle) ;
if (count ==0) {
fclose(handle);
open_file = 0;
result = 1;
}
}
return(result);
}
87


APPENDIX C
OUTLOG.C
include "stdio.h"
include "dos.h"
include "pendulumn.h"
int outlog(struct output_buffer *data,int last_time)
{
static int first_time =0; ,
int result = 0,count;
char file_name [80] ;
static FILE *handle;
if (first_time == 0){
first_time = 1;
printf(" Enter a file name ") ;
gets(file_name);
handle = fopen(file_name,"w+b");
if (lhandle) {
printf("Blowing chunks could not open %s \n",file_name)
result =1;
}
}
if ((result == 0) && (last_time == 0)) {
count = sizeof(*data);
count = fwrite(data,sizeof(*data),1,handle);
if (count ==0) {
printf("Blowing chunks did not write out data \n");
result = 1;
}
}
else if ((result == 0) && (last_time ==1)) {
if (fclose(handle) != 0) {
printf("Blowing chunks did not close file properly \n")
result = 1;
}
}
return(result);
}
88


APPENDIX D
CONVERT.C
#include "stdio.h
#include "math.h"
#include "pendulumn.h"
int convert(struct position_vector *datal,
struct output_buffer *data2,
int direction)
/* this procedure copnverts from the postion vector (dir=l) */
/* to the output_buffer format so that it can be logged */
/* it will also convert from the output_buffer format to */
/* the position_vector format so that processin of logged */
/* data can be performed. (direction=2) */
/* Note: direction = 0 is not allowed. This means the the */
/* calling routine must make a conscious decision */
/* about what it wants this routine to do. */
{
struct position_vector stuff1;
struct output_buffer stuff2;
int i,result;
if (direction == 1) {
day*/
stuff1 = *datal;
stuff2.time[1] = (stuff1.elapsed_time[1]*10000.0); /fraction of a
stuff2.time[0] = stuffl.elapsed_time[0];
stuff2.flags = stuff1.flags;
stuff2.confidence = stuff1.confidence;
for (i=0;i<3;i++){
stuff2.state_tensor[0][i] =
stuff2.state_tensor[1][i] =
stuff2.state_tensor[2][i] =
stuff2 stat'e_tensor [3] [i] =
stuff2.state_tensor[4][i] =
stuff2.state_tensor[5][i] =
}
( (stuffl.x[i]*100000.0)+0.5) ;
((stuffl.y[i]*100000.0)+0.5) ;
((stuffl.z[i]*100000.0)+0.5) ;
((stuff1.pitch[i]*100000.0)+0.5) ;
((stuff1.roll[i]*100000.0)+0.5);
((stuffl.yawfi]*100000.0)+0.5);
89


CONVERT.C (Continue)
*data2 = stuff2;
}
else if (direction == 2) {
day*/
stuff2 = *data2;
stuff1.elapsed_time[1] = (stuff2.time[1]/10000.0); /*fraction of a
stuffl.elapsed_time[0] = stuff2.time [0];
stuffl.flags = stuff2.flags;
stuff1.confidence = stuff2.confidence;
for (i=0;i<3;i++){
}
stuffl.x[i]
stuffl.y[i]
stuffl.z [i]
stuffl.pitch[i]
stuffl.roll[i]
stuff1.yaw[i]
= stuff2.state_tensor[0][i]/100000.0;
= stuff2.state_tensor[l][i]/100000.0;
= stuff2.state_tensor[2][i]/100000.0;
= stuff2.state_tensor[3][i]/10G000.0;
= stuff2.state_tensor[4][i]/100000.0;
= stuff2.state tensor[5][i]/100000.0;
*datal = stuffl;
}
else result = 0;
}
return(result);


APPENDIX E
RS232STF.C
#include "stdio.h"
#include "math.h"
tinclude "dos.h"
#include "conio.h"
#include "pendulum.h"
Sinclude "rs232.c"
int rsputdat(int com
*data)
{
int result, in-
struct output_buffer
struct rs232_output_format {
unsigned long int bit_sync;
struct output_buffer out_dat;
union output_format {
struct rs232_output_format stuff;
char name[90];
} /
union output_format out;
if ((which_way == output_direction) &&
(com_active > 0)) {
out.stuff.out_dat = *data;
for (i = 0;i<4;i++) out.name[i] = sync_pattem;
result = rs_sndstr(90,out.name);
}
else result = 0;
return(result);
}
91


Full Text

PAGE 1

ULTRASOUND PULSE-RECEIVE TRACKING SYSTEM FOR A CHAOS AND CONTROL EXPERIMENT By Kenneth H. Ramos BS., California State University, 1985 A thesis submitted to the University of Colorado at Denver in partial fulfillment of the requirements for the degree of Master of Basic Science 1996

PAGE 2

This thesis for the Master of Basic Science degree by Kenneth H. Ramos has been approved by Date

PAGE 3

Ramos, Kenneth Henry (M.B.S., Liberal Arts and Science) Ultrasound Pulse-Receive Tracking System for a Chaos and Control Experiment Thesis directed by Professor Randall P. Tagg ABSTRACT The center of mass of a pendulum able to move in three dimensions can be located via ultrasound waves with an accuracy of less than one millimeter using a pulse-receive ultrasound system. The pulsing is done from the center of mass of the pendulum and reception is performed by receivers strategically placed in different planes. The time it takes for the sound waves to travel from the pulsing unit (on the pendulum) to the receivers can be measured quite accurately, thereby enabling a computer program to calculate the distance the center of mass of the pendulum and each receiver. The pulsing, reception, and distance calculations are performed via specially designed hardware (digital and analog), and are controlled and integrated via a single C++ program. This iii

PAGE 4

system is valid for distances from one half meter to one and a half meters which allows fairly large models of realistic systems to be built. This abstract accurately represents the content of the candidate's thesis. I recommend its publication. Signed J iv

PAGE 5

DEDICATION This thesis is dedicated to the two most important individuals in my life. My God and my wife. Building scientific apparatus that enables mere mortals to learn and understand more about His creation and thus God's very nature is of the highest calling. May He find glory in this work. My wife, Colleen Nanette, is the most precious gift God has ever given me. Without her constant support and encouragement, I would not have had the will to pursue this master's degree or thesis. I love you Hun. I ( I )I I ) I )/ Asyst o J..tap,;uprov -rau1:a, Nat, EPXOJ..tat 't
PAGE 6

CONTENTS Figures .............................. viii Acknowledgements ....................... ix CHAPTER 1. INTRODUCTION ............................ 1 2 COMPONENT OVERVIEW .................. 1 0 Pulser ........................... 11 Analog Receivers ................. 11 Digital Hardware Interface Board .... 13 Computer ........................ 14 Circuitry Case ..................... 16 Summary .......................... 17 3. SOFTWARE OVERVIEW ...................... 19 4. USER INTERFACE, MENUS, AND WINDOWS ..... 26 5. SOFTWAREHARDWARE INTERFACE ....... 35 6. PULSER HARDWARE ........... -1 3 9 7. RECEIVER HARDWARE ................. 48 Transducer ............................ 4 8 Analog Electronics .................... so, Physical Housing .................. 56 vi

PAGE 7

CONTENTS (Cont.) CHAPTER (Cant.) 8. DIGITAL HARDWARE INTERFACE BOARD ... 59 9. STATE VECTOR DETERMINATION .... 67 10. OUTPUT METHODS ......... 7 4 11. CONCLUSION ........ 80 APPENDIX A. PENDULUM.H ...... 83 B. INLOG. C ....... 8 6 C. OUT LOG. C ........... 8 8 D. CONVERT .C ....... 89 E. RS232STF.C ....... 91 BIBLIOGRAPHY ...... 94 vii

PAGE 8

Figure 1.1. 2 .1. 2.2 3 .1. 3.2. 5 .1. 6. 1. 7 .1. 7. 2. 7. 3. 7. 4. 8 .1. 8.2 8.3 8.4 8.5 FIGURES Overview of Naval Crane Experiment ....... 3 Component Interaction ................... 10 Electronic Hardware ..................... 17 Event Creation, Priority, and Location .. 21 getevent and evhandle Interactions ...... 25 Real-Time Flow Diagram .................. 38 Pulse Hardware .......................... 42 Polaroid 7000 Series Specifications ..... 49 Analog Amplification Circuitry .......... 50 First Stage Output ...................... 53 Receiver Hardware ....................... 57 Signal Lines ............................ 61 Receiver Line ........................... 62 555 Oscillator Configuration ............ 63 Delay-Go Circuit ........................ 64 Main Board Digital Electronics .......... 65 viii

PAGE 9

ACKNOWLEDGEMENTS I thank Aerojet Electronic Systems Division a subsidiary of GenCorp for their financial help. My company has unceasingly paid all tuition and half of my books throughout this master's program. Another source of financial aid is the ONR (Navy) Grant N00014-95-l-0185: "Nonlinear dynamic approaches to control of crane load pendulation during transfer between ships at sea"; a portion of this grant has paid for all the electronics and software that was necessary to build the ultrasound tracking system. Secondly, I thank Dr. Randall Tagg for his long hours of help and the use of a portion of his fluids lab at the University of Colorado at Denver. Dr. Leonard Bond, University of Colorado Boulder, for his help and I suggestions as to what path to take with this ultrasound system. My father, Henry Ramos, an electrical engineer by trade whose insights helped shaped the design of the analog circuits. ix

PAGE 10

CHAPTER 1 INTRODUCTION Forced two-dimensional pendulums have proven to be good subjects for nonlinear dynamical research due to the low cost of apparatus for experimentation purposes and the underlying equations of motion being fairly simple and easy to understand (Baker & Gollub 1990) The simplification to two dimensions is achieved by creating a fixed boom that is only allowed to rotate around the origin of the system and only in one plane. Experiments with such planar pendula (Starret & Tagg 1995) have shown them to be good prototypes for testing new techniques for controlling nonlinear and chaotic motions in mechanical systems. Meanwhile, some experiments have also been performed with spherical j pendulums (Tritton 1985; Kana and Fox 1994), but have employed limited methods for tracking position as the pendulum mass moves in three dimensions. 1

PAGE 11

The US Navy has recently undertaken renewed efforts to better control the motion of payloads on cranes aboard ships at sea. The ONR grant N00014-95-l-0185 is concerned with controlling the swinging load of a crane at sea. A naval crane is used to move cargo from the ship of origin to and from other ships moored offshore and subject to significant wave-induced motions. The cargo crane system can be modeled via a three dimensional pendulum system. As an additional complication the ship is subject to sea swells; these can be modeled by having a platform that moves with three degrees of freedom. What concerns the navy is that even in moderately active seas, cranes become inoperable due to excessive and dangerous swinging of the cargo. Our research has been funded in order to determine ways of controlling this nonlinear behavior in order to allow transfers of cargo at higher sea conditions. The research bein? performed under this grant has been broken into three segments: the first concerns the development of a model crane that rides on a platform which simulates wave-induced motions; the second deals with continually determining the location of the pendulum's center of mass (cargo load); and the third 2

PAGE 12

deals with using this position tracking data as input to control algorithms designed to manipulate crane rigging in order to suppress undesired motions. This thesis is concerned with the second portion of the overall experimental system, which is the tracking of the pendulum payload in three dimensional space (Figure 1.1). Overview of Naval Crane Experiment 6 axis controlable Crane Platform Controling System Ultrasound Sensors & Callles Pulser Payload Location Power Detection System Platform Payload Position Information '-----.;-----,--........J X, y, Z Inputs X, Y ,X Disturbance Control Control Display Synthesis and Analysis Position Computing System Information Figure 1.1 3 Control Display Other Displays

PAGE 13

The requirements of the tracking system consisted of having a resolution of less than one millimeter, sampling rates to exceed twenty-per-second, small space, costs not to exceed $5,000 (computer and specialty hardware), and ease of integration with the other components. The spatial resolution requirement is based on the need to measure motions to within 0.1% of the expected dynamic range (.5 meters in any direction). This level of detail is necessary to resolve fractal structure in the dynamics of chaotic systems and forms the basis of control strategies that succeed by making tiny perturbations (Starret and Tagg 1995). Similarly, the tims resolution is necessary to resolve all frequencies of interest in the complex motions and to avoid problems of aliasing that occur when sampling is done at less than twice the highest significant frequency present in the dynamics (the "Nyq,pist Criteria"). There are many methods for tracking objects in three dimensions. However the requirements narrowed the choices to two major categories: optical and acoustical based systems. The first tracking system category considered deals with optical instrumentation. A photodiode-photodetector 4

PAGE 14

pair sensed deflections of a spherical reflector attached near the pivot of the cable supporting the load. Unfortunately, the voltage variation on these devices lead to resolutions that were less than desirable. In addition, due to these devices being installed near the top of the cable, the flexing of the cable could not be accounted for. Charged Coupled Device (CCD) arrays were considered; however the resolution for the desired range of motion is not satisfactory for the allowable costs. The space that the pendulum is scheduled to swing freely in is over .5 meters per side. To have a CCD device with the desired accuracy would require two imaging systems (for stereo sensing) at 1500 x 1500 minimum pixel resolution. The second system explored was ultrasonic acoustical techniques. Ultrasound components have less resolution capability than optical devices but are considerably cheaper (Hickling and Marin 1985) Primarily this is due to the difference in the speed of the two types of waves. Sound travels at 3xl02 m/s verses 3xl08 m/s for photons. This means that by using sound waves, the measuring system is over a million times slower than for an equivalent optical system. The digital sampling hardware 5

PAGE 15

for ultrasound systems can be found in any local electronics store at a reasonable cost whereas an optical system would need devices that have state changes on the order of nano-seconds. There are two main ultrasonic categories; pulse-echo and transmit-receive. Most ultrasound systems are of a pulse-echo design; the main advantage is that the transmitter and receiver are the same component thereby reducing cost and being able to directionally transmit ultrasound waves so that the drop off in signal is reduced. These systems are employed commercially by all major camera companies for the purpose of auto-focusing. Pulse-echo designs primarily determine distance by timing the return signal (Giarcia 1984). Pulse-echo systems are very cost effective. A complete unit capable of being computer integrated was purchased from Polaroid Corporation for $300.00. Sonic rangers used in the lower division laboratories are another example of successful pulse-echo systems. However pulse-echo systems suffer from the requirement of the tight beam angle. The pendulum due to its mobility would have either caused the payload to out of the field of view or to be so small as to be undetectable. 6

PAGE 16

In addition, pulse-echo systems give ambiguous results for targets whose shape and orientation vary (Hickling and Marin 1985). A possible solution would have been to have the sensors mounted on servos and to physically track the pendulum as it moved; the disadvantage is that if the tracking lost 'lock' the whole system would need to be restarted. Transmit-receive phase comparison ultrasound systems have achieved accuracies that are 10.6 (Sabbagh and Gaydecki 1995). These systems are also simple and cost effective. The main drawback is that the reflecting surface must be perfectly flat and normal to the transmitting device. The range of valid measurements is only about a quarter wavelength (about 3.7 mm). Both of these conditions made this system impractical for this application. A hybrid of the two systems might be known as a pulse-receive system. The concept is to have a transmitting transducer that is separate from the receiver (s) The transmitting transducer sends ultrasound pulses at regular intervals and the distance between the pulser and each receiver is timed. 'Pulse receive has the advantage of the pendulum being the 7

PAGE 17

source for the ultrasound waves and the receivers being merely passive devices. This ensures that the receivers could be set farther back enabling them to cover the entire field of view. The disadvantage is that the simulated crane load had to be capable of twisting, swaying, and many other types of motion. As such, an omni-directional source had to be employed. With this additional criteria, the ultrasound waves needed to be broadcast in a spherical wave pattern; this results in the flux decreasing at a rate proportional to l/r2. The flux dissipation rate of l/r2 results in a dual problem: finding a material that will transmit ultrasound waves in a spherical pattern and building a receiver that is sensitive enough to detect the signal from a sufficient distance. Although many articles reference ultrasound systems and their various uses, very little was written concerning such a system. These problems were overcome by buying two surplus hemispherical piezoelectric transducers from EDO Corporation and building receiver circuits centered on Polaroid 7000 series electrostatic transducers. The piezoelectric transducers have a measured center frequency of (about) 50 KHz; this frequency falls in the 8

PAGE 18

optimum range of the 7000 series transducer. Please refer to chapter 6 for a detailed analysis of the pulser (transmitter) hardware and chapter 7 for a detailed analysis of the analog (receiver) hardware. The overall system that was built consists of the pulser and 5 receivers as described above, a custom built digital board, a Computer Boards (CB) digital I/O board that plugs into an 8 MHz ISA bus slot, a Gateway 2000 P590 computer running a C++ program with library routines to interface all of these components into the tracking system and allowing this tracking system to communicate with the analysis machine. \ 9

PAGE 19

CHAPTER 2 COMPONENT OVERVIEW The ultrasound tracking system, as mentioned in the first chapter, divides into four main units: pulser, receivers, digital hardware, and the computer. The following figure illustrates the interaction between these varied components: Pulser:: ) Voltage Console I I I 1 T Component Interaction Analog Receivers )) ) I Spike Pulse:t: I Digital Hardware Interface Board Hatdwat:e -12v T I Delay-Go I Init. Clock Circuit Pulses Go' T Gateway 2000 P5 90 Computer Computer Boards /Log File/ Init CIO-CTR05 Ca:t:d C++ Tracking Software Program Go! ColUlt j I Values Co:rn:m.. Figure 2.1 10

PAGE 20

Pulser The Pulser Hardware consists of two hemispheric piezoelectric transducers and electronic components to drive them. The electronics jolt them with over 800 volts and cause the transducers to resonate. This results in acoustical signals that are broadcast in a spherical pattern. The electronic components primarily consists of a capacitor, Silicon Control Rectifier (SCR), 24 volt power supply, audio transformer and the transducers. The computer sets a TTL (Go!) line to five volts and when this occurs, the capacitor discharges resulting in a pulse. The capacitor is promptly recharged by the power supply until the next pulse. The transducers are the simulated cargo that is attached to the boom (refer to figure 1.1). The essence of the tracking system is to determine the precise location of the center of the transducers. Ana Receivers There are five analog receivers. Each receiver is designed to jump from zero to 12 volts when a signal is 11

PAGE 21

l I I \ l, detected from the pulser. The jump in voltage is passed to the digital hardware interface board for further processing and use. These receivers have turned out to be the most difficult portion of this thesis. Each analog receiver consists primarily of four Op Amps and a Polaroid 7000 series electrostatic transducer. The Op Amps increase the tiny signal that the transducers produce when receiving ultrasound waves to the 5 volts that the CMOS circuits on the digital hardware interface board require. The time it takes for the ultrasound waves to travel from the pulser to the receivers increases linearly with distance. This distance is timed by a combination of custom built digital hardware and a Computer Boards (CB) CIO-CTR05 digital I/O card inside the computer. The time is converted back into a distance by software. The analog receivers are tuned with variable trim resistors to optimize the gain from the transducers. This ensures optimized performance because each transducer has unique characteristics. 12

PAGE 22

Digital Hardware Interface Board The digital hardware interface board is a custom built board that takes the analog receiver information and converts it into a digital signal that can be interpreted by a computer. The digital interface board has a 2.5 MHz oscillator. There are five separate counters on the CIO-CTR05 card and the pulses from the oscillator are accumulated by each counter independently. In addition, the board interfaces a different analog receiver to each counter. The interface board commences transmission of oscillations to each counter at the start of a data gathering cycle. When a receiver detects ultrasound waves from the piezoelectric transducer, the interface board will stop sending oscillations to the given counter. After a data gathering session, the software can determine the distance between the pulser and each receiver by examining the number of oscillations that each counter contains. The distance sound travels in one period (343m/s) at 2.5 MHz is .14 mm. Therfore, the higher a count value the larger the distance between the pulser and a receiver. 13

PAGE 23

Digital computer chips generate tremendous noise which the sensitive analog hardware responds to. The initial design had the analog boards containing much of this digital logic. However, when digital chips were placed on the same circuit board in the same shielded box, the receivers ceased to respond. The solution was to completely isolate the digital circuitry by using independent power and ground lines and by shielding everything. Hence, the physical separation of the analog hardware and digital hardware was done not just for esthetic purposes but for practical reasons. Figure 2.1 has a small box labeled 'Delay-Go Circuit'. This small electronics package was added late in the design to prevent the hardware from responding to the electro-magnetic surge that occurs when the pulser fires. Due to this circuit being purely digital, its description is placed with chapter 8 (digital hardware interface board) Computer The Computer is the most complex portion of the entire tracking system. It is a Gateway 2000 PS-90 and has a CB CIO-CTR05 digital I/O Card to interface with the 14

PAGE 24

digital hardware board. The computer uses an RS232 device for communications and it has a hard disk for data storage. A keyboard and monitor are used for humanmachine communications. Finally, the software which runs the tracking system is coded in C++. The CB card sends out the Init./Go! signals. Between data gathering sessions, the Init. signal toggles to five volts. This resets all of digital electronics and readies it for the next data gathering session. The Go! line toggling to five volts starts the next data gathering session. The CB card also has an AM9513 (Advanced Micro devices) counter chip which contains five counters as explained in the previous section. Between each data gathering session, the C++ program reads the count values from each counter and then resets the counters back to zero. Each clock cycle corresponds to roughly .14 mm so the higher the count value, the farther away a receiver is from the Pulser unit. The C++ program gathers the raw count values and processes them. The result of processing the count information from several receivers 15

PAGE 25

is the location of the Pulser unit. The location is in the form of a vector with X, Y, Z, and time; the units are meters and seconds. The C++ program communicates with the console, RS232 port, and disk files. The location of the pulser can be displayed on the console, logged to disk, and/or transmitted to the analysis computer for further processing. The program also has options of playing back an old session or receiving data via RS232 for logging or display. Circuitry Case The Digital Hardware Interface Board, Pulser Circuit, and Delay-Go Circuit all reside in the same shielded box. It also has the proper (power and signal) connections to the five analog receiver units and there are the posts to the piezoelectric pulsing unit. Lastly, a 37 pin D type connector links all of the electronics encased in the box to the CIO-CTR05 card in the computer (Figure 2.2). 16

PAGE 26

Electronic Hardware Pulser and Digital Pulser Delay-Go Ci:rcuit (Chapter 8) Digital Hardware Board 11'1 l\\1 Receiver Power Cables (Chapter 7) v l?ulser Cabl"s (Chapter 6) f CIO-CTR05 Cable Connect (Chapter 5) Figure 2.2 Summary I {Chapter Bl ""\\// Reeeivar Signal lines (Chapter 7) The development process started with the C++ core system. Next came the merging of the Polaroid developer's kit as a pulsing unit and the building of the first receiver design. The digital hardware board was built next. The Polaroid developer's kit was replaced with the piezoelectric pulsing unit. The final design forced the receivers to be modified to their 17

PAGE 27

current version in a quest for greater sensitivity. Throughout this entire process, the software was in a continuous state of adaptation and improvement. The following chapters attempt to give a detailed accounting of all aspects of the ultrasound tracking system. The order in which these things are presented was driven by an approach starting with what a user interfaces with (computer software), proceeding to the hardware that this software is controlling, getting back to how the software analyzes the raw data the hardware is presenting to it, and lastly how other computers and/or programs can utilize the data this system is producing. 18

PAGE 28

CHAPTER 3 SOFTWARE OVERVIEW The software had a number of requirements. First, it needed to be fast enough so that real-time processing could be achieved. Second, there was a demand for it to interface with third party hardware. Third, the software was required to display diagnostics to the user so that system performance could be monitored. Lastly, it needed to be able to pass data on to other computer programs. The software for this entire system is coded in Borland 4. 5 C++. This package compiles C++ code in a manner that is efficient enough to allow real-time processing. In addition, the Borland TurboVision 2.0 (TV2) package drives the human-machine interaction. The Computer Boards Universal Library routines interface the digital hardware to the software system and the RS232.C vl.6 package allows the tracking system to communicate with other computers. All of these diverse products link together under the Borland 4.5 C++ package. 19

PAGE 29

The TV2 system is a windowing system similar in concept to xwindows. All of the user interface is done via pull down menus. As menus are pulled down, screens will appear. The user requests and actions are thus done via these menus and screens. At the core of TV2 there is a major procedure that creates events called getevent. Essentially, any keyboard or mouse action is processed by TV2's getevent. The advantage is that the tracking software doesn't have to program any low level keyboard or mouse checking software. When the user clicks on any of the menus or fills in data from a window, TV2's getevent determines what has been pushed or entered and creates an event that can be processed by the tracking software. In addition, the tracking software has its own events; these are the real-time events and deal with the ultrasound hardware. They are prioritized over TV2's processing of the user actions. C++ is an object-oriented language which allows a programmer to define the same procedure more than once. In this case, the TV2 package comes with getevent. The tracking system software (known internally as ProjectApp) has its own instance of getevent. When TV2 calls 20

PAGE 30

getevent, ProjectApp's version is invoked. The priorities and what is processed are determined by ProjectApp's version of getevent; if ProjectApp so desires, it will invoke TV2's version of this routine. C++ allows ProjectApp's version of getevent to handle all of TV2's getevent features through inheritance and it allows ProjectApp's version to have additional features. Inheritance is part of a concept known as object-oriented programming (OOP). Refer to Figure 3.1 to see how some of the key processes within the tracking software are prioritized (top to bottom) and which instance of getevent processes them: Event Creation, Priority, and Location ProjectApp: :getevent -Data gathering event -RS232 Input data event .-----------------------------------------------------------------------------------------TV2: :get event -Menu Item selected event -Window Text entered event -Exit from program event -Other event selected .. _____________ --------------------------"" --------------------------------------------------simulate Input data event -Playback Input data event Figure 3.1 21

PAGE 31

ProjectApp is the main construct of the tracking software. It inherits the TV2 constructs and builds with them. As can be seen, ProjectApp's instance of getevent adds four events. The Data gathering event is the core event that interfaces the tracking system custom hardware to the tracking system software. The RS232, Simulate, and Playback are other modes of data input used primarily for software checkout or data analysis. The four events all create the same product. This product is an internal software construction known as the state vector and it is the central commodity of the tracking system. The state vector is the position, velocity, and acceleration of the pendulum's center of mass in Cartesian coordinates at a specified point in time. Please refer to chapter 9 for detailed analysis of state vector determination and chapter 10 for the actual bit representation of this data. The Playback mode reads in old state vectors from a file and the RS232 input mode receives state vectors via the RS232 port. The Simulate mode creates state vectors using a simple algorithm for computing the motion of a swinging pendulum in spherical coordinates. The Data gathering mode creates state vectors based upon the 22

PAGE 32

tracking system's hardware and software. Please refer to the following chapters for details on different hardware and software aspects of the Data gathering mode. Due to the commonality of the state vector, processing of the four different modes is done exactly the same. When getevent successfully determines that an event has occurred, it sets variables that the processing events procedure (evhandle) can interpret. After the getevent routine completes, TV2 will invoke a routine called evhandle. Any keyboard input, menu selection, button selection, or the data mode events are processed by evhandle. Thus, evhandle is the main routine in the tracking software. All actions, except the real-time data gathering, are performed by calls from evhandle. The advantage of the getevent-evhandle TV2 system is the ability to queue up events. Two or more events may be generated simultaneously and the TV2 system will patiently queue them up and send them to evhandle one at a time. The determination of which event is processed first is done in getevent. The name of the routine derives from what it does; it gets events. Essentially, getevent is the portion of the TV2 system where events are prioritized and selected for processing. 23

PAGE 33

The events are actually processed in evhandle. Again, the name evhandle derives from its function; it handles events. Essentially, evhandle is a giant switchcase structure which is an efficient implementation of a series of if-then statements. Based upon what event getevent says needs to be processed, evhandle will invoke a procedure to do it. The reason that TV2 can do real-time processing is that while getevent is processing an event, other events (or other instances of the same event) may be occurring. This is not a problem; getevent, when it is next invoked, will check to see what new events have occurred and reprioritize. In addition, the tracking software was set up so that the Data gathering event has the highest priority and other events will be processed after Data gathering needs are satisfied. TV2 is designed with the interaction between getevent and evhandle as the basic building blocks. The programmer merely adds to the list of generic events that come with TV2 through overloading of getevent and evhandle. The ability to enhance TV2's versions of getevent and evhandle through overloading is a basic C++ capability. To create this structure in a conventional 24

PAGE 34

language would be very difficult. Figure 3.2 should aid in the understanding of the getevent and evhandle interaction: getevent and evhandle interactions get event Any events? Yes No tell evhandle what event has occurred. do nothing. TV2 Magic ==:>Figure 3.2 25 evhandle If it is A then do A If it is 8 then do 8 If it lS Z then do Z

PAGE 35

CHAPTER 4 USER INTERFACE, MENUS, AND WINDOWS To start the tracking software, one types (from a DOS prompt) "preproc". The following window will appear: Display Input output Alt-X Exit Alt-H Halt Alt-R Resume This is the raw canvas that the user will fill in. Starting with the bottom of the display, the Exit performs exactly what it means; it will terminate the program. However it is a graceful orderly exit with files properly closed, etc. The Halt and Resume are necessary due to the real-time nature of the tracking software. When Data gathering is occurring, real-time events occur so fast that the user is unable to get 26

PAGE 36

requests into the system. By picking the Halt (or typing Alt-H), Data gathering will temporarily be suspended. Any user requests can then be selected and processed. Resume (Alt-R) will restart the Data gathering as if there was no interruption. The three icons on the main menu lead into separate submenus. When Display is picked the following sub menu appears: Display Input Output Sensor Ephemeris (x,y,z) Plot Exit Exit Halt Resume The Sensor and Ephemeris windows are the only two displays available in this first version. Eventually, it is hoped that a graphical display will be added. When Sensor is picked the following window appears: 27

PAGE 37

Display Input Output Sensor Display l J! '! I 11/25/95 11/25/95 I system Time Actual Time I n: o:55.9s 21: o:55.9s I I Sensors Sensors I 1: 3.10000 5: 3.5oooo I 2: 3.20000 6: o.ooooo I 3: 3.30000 7: o.ooooo I s: o.ooooo I 4: 3.40000 I I I L _________________________________ J Alt-X Exit Alt-H Halt Alt-R Resume This window displays time and the distance recorded by each of the receivers (in meters). For an understanding of what the receivers are, please refer to the following chapters. There are two timesSystem and Actual (wall clock) time. If this is a playback, these times will be different. Otherwise they should be very close. Due to hardware limitations, only five sensors are used but more could be added in the future. 28

PAGE 38

Next, when Ephemeris is picked from the Display sub menu, the following window will appear: Display Input Output r Ephemeris Display l I ! ! ! I I 11/25/95 Live Data 11/25/95 I I System Time Actual Time I I 21: 0:55.98 21: 0:55.98 I I I I Position Velocity Accelera-tion I I X 0.04454 1.138 -1.103 I I y 0.00000 0.000 0.000 I I z 0.49801 -0.102 -2.520 I I I L J Alt-X Exit Alt-H Halt Alt-R Resume The Ephemeris Display is a window that updates twenty times per second. The information in this window is the state vector information. As mentioned previously, the System and Actual times will be close to the same values except when the Playback mode is chosen as input. If the window is displaying simulated data, the words "Sim Data" will flash between the exclamation points on the first line. If the source of the data is from a file, the words "Live Data" will be replaced by the words "Playback". 29

PAGE 39

Lastly, the Exit in the Display sub menu will have an identical effect as the Exit on the bottom menu. As part of the motif, it was necessary to have the program termination under the left most sub menu. Moving on to the Input option on the main menu, the following options are available when selected: Display Input output Halt! Resume Mach 1 f1ach 2 RS232 Cornm. Sim Playback Exit Alt-H Halt Alt-E Resume There are many options under Input. Halt and Resume act exactly the same as from the lower menu bar. Mach 1 is the photodiode-photodetector version of the pendulum experiment and can now be considered obsolete. The Mach 2 option will start the Data gathering software and hardware. Please refer to the following chapters for details on all aspects of how Data gathering is performed. 30

PAGE 40

RS232 selection will prompt the user to choose an RS232 port as the source of state vectors. When a port is chosen, the tracking system will update whenever it receives a state vector via the chosen RS232 port. The original purpose of the RS232 option was software checkout. Note: in order for this option to work, the RS232 computer hardware must be capable of data transfer rates of 115KB or higher. Selection of Sim will create state vectors internal to the computer. Again, this is used primarily for software checkout. Lastly, Playback will prompt the user for a file name. It will then read state vectors one at a time, process them just as if they were generated from a live source, and continue to do so until the end of file is reached. In Playback mode, the time of the data will not be processed faster than the actual time it took to create the data. In other words, it will take one minute to playback one minute of data. However, if the computer that is being used to process the playback is not fast enough to process the data at the rate it was recorded, Playback time may slow down. This becomes readily apparent if reading a file from a floppy disk drive. 31

PAGE 41

. The third option on the main menu is Output. When selected, the following sub menu appears: Display Input Output Open File Close File RS232 comm. Exit Halt Alt-R Resume The Open file option will open a file so that all state vectors will be saved. Close file will terminate the writing of state vectors to that file and properly close that file. Please refer to chapter 10 (Output Methods) for details on how to read a file created with these two options. The RS232 option when selected will prompt the user for a communications port. Upon selection, the tracking software will send state vectors to that port. In fact, it will write out the state vectors regardless of whether there is any one processing the RS232 information! Please refer to chapter 10 for details on how to develop software to process the RS232 data. 32

PAGE 42

A typical scenario would commence by beginning the tracking software on both the tracking computer and the analysis computer. Next, establish RS232 communications between the computers. Immediately following communications linkage, bring up the Sensor display on the tracking computer and the Ephemeris display on the analysis computer. If data logging is desired, it can be performed on the analysis computer or the tracking computer. Now the systems are ready for data gathering. This is initiated by selecting the Mach2 Input option on the tracking computer. The tracking computer's monitor will display a message asking to cease all motion of the pulser unit. When ready, click 'OK' and for five seconds the tracking system will determine the baseline counts (please refer to chapter 9) After five seconds the tracking system will display another message that states that the initialization is complete and data gathering is ready to be performed. Click 'OK' and the tracking system will start operating. The analyst should observe the Sensor display and see that the values are truly the distances between each receiver and the pulser. On the analysis computer, the 33

PAGE 43

analyst should observe that the ephemeris information is valid. If it is, then the whole system is operational. At this point, halt (Alt-H) data gathering on the tracking computer if the analyst wishes to reconfigure the analysis computer for a different mode or software package. Otherwise, sit back and relax, the tracking system will record all movements. 34

PAGE 44

CHAPTER 5 SOFTWARE -HARDWARE INTERFACE The Computer Boards (CB) Universal library and CB CIO-CTR05 digital I/O card were used to interface the software and hardware. The library is a collection of procedures that can be linked into C programs that allow all hardware functions on all of the CB hardware products to be accessed. The original design was to wire the analog receivers directly to an Analog to Digital (A/D) conversion card and dump the data into a memory buffer for processing. The process of directly filling memory by a hardware device is known as Direct Memory Addressing (DMA) Essentially, when the A/D card is filling the second half of the buffer, the first half is processed (and viceversa) As the receivers respond to the pulse signal, a slight rise in the digitized signal would be detected by software and a response would be registered. 35

PAGE 45

One problem with the A/D transfer approach was the speed at which analog boards process. The CB board CIO-DAS801 processed A/D conversions at 50 KHz. When divided over 5 receivers, each receiver was only sampled at 10 KHz. The distance that sound traveled per sample would have been 3.4 em. A 250KHz board would have improved the resolution to .7 em but still would not have been sufficient because the goal was 1 mm. The other problem with the A/D DMA transfer approach was the inability to get TV2 to interface with this realtime buffering. Any attempt at starting the DMA transfer within the TV2 system caused the whole computer to freeze. This was unexpected as other venders have interfaced to TV2 systems without any real problems (Barret 1995). The chosen design was implemented by building custom digital hardware and interfacing this with an CIO-CTR05 card. This CB card has the ability to send out eight bit digital TTL code and it has an AM9513 chip with five counters in it. and counting. These two features were used for control 36

PAGE 46

One of the eight bit output lines is defined (and used) as the Initialization line (DOUTl). This line is set to high to reset the digital hardware so that data gathering can occur. A second line is define as the Go! line (DOUT2). When this line is set to high, the pulse hardware is activated and the digital hardware is set in motion. The counters on the CB card accumulate pulses from a 2.5 MHZ Oscillator that resides on the digital board. Please refer to chapter 8. Each counter is electronically connected to a different receiver and the oscillations for a given counter commence a short time (-.5 ms) after the DOUT2 line goes to five volts and ceases when the analog receiver attached to the given circuit receives the ultra-sound signal from the pulsing transducer. At 2.5 MHz, sound travels .14 mm for each oscillation and this resolution achieves the goal of one mm. The software is in a loop which begins by setting the Init. line to high. Next, the Init. line is reset and the values of the counters are extracted and placed into memory. These values are then processed by the tracking software and the counters are reset to zero. Next, data 37

PAGE 47

gathering conunences with the Go! line being activated for a short period of time. The tracking software sets a timer for .01 seconds during which all other system functions (screen updates, mouse and keyboard actions, etc.) are processed. Upon completion of the .01 second delay, the cycle repeats (Figure 5.1). Real-time Flow Diagram J I nit. Line Activated l Gather values and reset counters l Calculate the position of the pendulum l Activate Go line and go to sleep fo" 01 seconds I Figure 5.1 38

PAGE 48

CHAPTER 6 PULSER HARDWARE The Pulser Hardware consists of two hemispherical piezoelectric transducers and the electronics to drive them. Many months were spent developing a system that would generate sound waves that spatially separated electrostatic receiving transducers could respond to. The method of attack to this problem was to create ultrasound waves with maximum intensity (loudness) and to optimize the receiving capability of the electrostatic transducer analog circuitry. For details on the receiving analog circuitry, please refer to the following chapter. The generation of suitable sound waves became the most difficult portion of the entire system. Many different materials were experimented with: spark generation, ringing bells, high impact metal strikes, high frequency speakers (tweeters), electrostatic transducers, and piezoelectric transducers. 39

PAGE 49

During creation of the analog circuitry to process the electrostatic receiving transducers, an electrostatic transducer of the same design (Polaroid 7000 series) was implemented to generate sound waves. The electrostatic transducer was driven by wiring the Go! line (DOUT 2) to an off-the-shelf board built by Polaroid. The Polaroid board drove the transducer when the Go! line was set to five volts. This worked extremely well and distances exceeding 3 meters were achieved. However, the electrostatic transducer produced a very focused sound beam which dropped off quite rapidly outside of a small cone. As the pendulum could move quite freely; this design, although good for development and test purposes, would never work in the final assembly. Placing a series of the electrostatic transducers on the outside of a sphere in an air-raid siren fashion proved too unwieldy and the Polaroid board was unable to drive more than six of them. The EDO corporation produces piezoelectric transducers to fit customer design needs. The shape that these transducers come in includes cylindrical, hemispherical, and spherical. Due to the desire to produce sound waves to fill a volume of air, the ideal 40

PAGE 50

shape for this system would have been spherical. However, although EDO manufactures spherical piezoelectric transducers, the cost to build one for this project was prohibitive. However EDO did have surplus hemispherical transducers at $250.00 each. EDO classified the type of transducer as EC64. Under the naval grant two were purchased and these have become the central piece of hardware to generate ultrasound waves. The next challenge was designing a circuit that would drive the hemispherical piezoelectric transducer. The first successful approach was to drive the transducer with a series of 16 pulses at 5 volts. A 555 oscillator was employed with a potentiometer so that the frequency of the pulses could be varied. The net result was that the voltage spikes to the transducer could be tuned for its mechanical resonance. The mechanical resonance occurred around 53 KHz. This created sound waves that grew progressively louder as the sixteen pulses were received. The electrostatic receivers were able to pickup this signal out to .5 meters. However the question of which wave was being picked up was a problem. If different receivers first responded to different oscillations, the precise distance could not accurately 41

PAGE 51

be measured. The second and final design involved sending a single high voltage spike to the transducer. This caused the largest mechanical oscillation to be the first one and then it dampened out quickly. The oscillations occurred at 52 KHz and thus the ultrasonic wave is at 52 KHz. The circuitry to drive the hemispherical piezoelectric transducers resides on a pulse board and inside the hemispheres. The following diagram illustrates the layout of the circuitry to drive the piezoelectric transducer: Pulse Hardware 125_..u.f Go Signal 50k 50k -Vc I Inside the Piezo Transducer Figure 6.1 42

PAGE 52

As can be seen, the main components are the SiliconControlled-Rectifier (SCR) and the 125 capacitor. Essentially, when the Go! line transitions to five volts, the gate on the SCR opens allowing the capacitor to discharge. The current sweeps through to the pulse transformer inside the transducer which steps up the voltage. It is difficult to tell what exact voltage occurs on the secondary side of the transformer because the transducer and transformer create an RLC type circuit and placing a measuring probe into the circuit changes its characteristics. In addition, the oscilloscope is only capable of measuring up to 600 volts. However indirect measurements were achieved by measuring the voltage gain of the pulse transformer at 39:1. In addition, 22 volts was measured crossing the primary side. This suggests that the secondary side is generating around 850 volts. In any case, it is sufficient to cause a signal that the receivers can measure at over one meter, clearly heard as a distinct clicking sound, and can be felt if one holds the transducer. It is reassuring to be able to hear the response, because piezoelectric transducers are intrinsically ve.ry 43

PAGE 53

inefficient in coupling sound from solid piezoelectric to neighboring air because of the large difference in acoustic impedance (Schindel and Hutchins 1995). Very little of the electrical energy is converted into mechanical energy and then most of this is reflected inside the boundary surface (Manthey, Kraemer, and Magori 1992) 0 The EC64 transducers are built from Lead Zirconante Titanate (PZT) which is a standard piezoceramic material. The electromechanical coupling is .15 (from EDO specifications) which means that only 15% of the electrical energy is converted to mechanical energy and vice versa. Next, the equation for the transmission coefficient is the following: (Bentley 1988) ( 6 0 1) Where Z 1 is the acoustic impedance of the matching layer and Z2 is the propagation impedance. For PZT, Z 1 is 2.5 x 107 kg m-2s-1 (Manthey et al 1992) and z2 for air is 430 kgm-2s-1 (Bentley 1988) so aT is 7 x l0-5 This means that only a tiny fraction of the energy in PZT based devices is transmitted into the air. The 44

PAGE 54

solution is to drive PZT piezoelectric transducers via a burst signal (Manthey et al 1992). The answer for the tracking system is to hit the EC64 transducers with 850+ volts. The limiting factor in how much charge the capacitor receives is due to the resistor. The lower the resistor, the faster the capacitor charges. This is a typical RC circuit situation. However, there is a minimum amount of resistance that can be placed in the circuit. If the resistance drops to less than a critical level, the SCR's gate will not close. However the minimum resistance is relative to the size of the capacitor. The larger the capacitor, the smaller the minimum resistance allowed. At 125 J-lF, the minimum resistance is 180 ohms. This allows a 22 volt charge to occur before the next pulse needs to be delivered. It is not well understood why the circuit combination of resistor, capacitor, SCR, transformer, and transducer works the way it does. In fact, minimum resistance in the circuit was discovered quite by accident. However the following table of values should help: 45

PAGE 55

Micro-Farad Min. Ohms Max. Volts 10 100 125 1000 450 180 24 14 22 At 10 the maximum voltage is achieved; however the current produced is small resulting in less power being delivered to the transducer. The maximum power is thus at 125 At this level, the circuit delivers 22 volts to the primary side. The inability to buy a spherical transducer due to lack of funds turned into a blessing because the pulse transformer fit between the two hemispheres and the high voltage is shielded from human exposure by the transducers. If the SCR gate does not close, 3.2 watts of power will drain through the circuit indefinitely until the circuit is broken. During testing, this happened quite often. The symptoms of this breakdown is the pulser quits. The solution is to recycle the pulser's power supply by turning it off and back on. After months of tuning and tweaking, the right mix of resistors, SCR, and capacitor has resulted in a circuit that has been tested for hours of continuous operation without mishap. 46

PAGE 56

An installed safety feature is a one megaohm resistor between the positive and negative posts on the 125 capacitor. This drains the capacitor in 30 seconds after power shuts down thereby eliminating the chance that the capacitor stays charged. 47

PAGE 57

CHAPTER 7 RECEIVER HARDWARE The receiver hardware can be broken into three sections: the transducer, electronic amplification hardware, and the outer physical housing. The transducer converts sound waves into electrical signals; the electronics amplify this signal so that it can influence 5 volt TTL digital logic; and the physical housing electrically shields the electronics and concentrates the ultrasound waves. Transducer Electrostatic transducers use a metallic backplate over which a membrane (or diaphragm) is stretched. Sound waves cause the membrane to fluctuate thereby modifying the charge to the backplate (Hutchins and Wright 1994). This mechanism results in larger responses to ultrasound waves than are possible with the piezoelectric materials due to the poor transmission coefficient as outlined in the previous chapter. The Polaroid 7000 series 48

PAGE 58

electrostatic transducers were chosen specifically for their frequency distribution and low cost. The strength of the ultrasound waves that are received by a Polaroid 7000 series transducer are influenced by frequency and flux. The 7000 series detectivity varies depending upon the ultrasonic frequency. Figure 7.1 includes a curve that shows the detectivity verses frequency. As can be seen, the 52 KHz that the pulsing piezoelectric transducer produces matches the maximum detectivity capability of the 7000 series transducer. The surface of the transducer is a plane so maximum flux occurs when the plane is within a small angle (10 degrees) of being normal to the line-of-site vector. Figure 7.1 illustrates this pattern. ' Polaroid 7000 Series Specifications Nol: dB to on-axl$ NuOO: Curves arn IBf:M'QSGntativa only, !ndMduai msponses frn:!Y diff&.r Figure 7.1 49

PAGE 59

Ana Electronics The circuitry that amplifies the signal from the 7000 series transducer is located on a small (7 x 4.5 em) board. Figure 7.2 illustrates the complexity of the electronics which are involved in the amplification of the electrostatic transducer's signal. Analog Amplification Circuitry 100 }Qk 100 10k 100 20k 33k +l2V +12V +12V 100 +l2V 60pf LfJSE .49v + -l2V -12V -12V 8M D 50k Figure 7.2 so

PAGE 60

As can be seen, there are four Operational Amplifiers (Op Amps) in series to boost the transducer's signal. All of the Op Amps are LF 356 JFETs. Buying and shuffling Op Amps around was made easier by using the same component. The LF 356s have high slew rates and good gain-bandwidth product (to about 250:1 at 50 KHz) Each Op Amp in the series is known as a 'stage' hence this circuit is known as a four stage circuit. The signal that the electrostatic transducer produces is in the 50 micro-volt range. This means that an amplification of 10,000:1 is necessary for the system to produce a signal that can be processed with five volt TTL digital logic circuits. The first stage has the electrostatic transducer as input with a 75:1 gain setting. The transducer is wired to the positive side of the Op Amp so it is a positive gain stage. There is an 8 megaohm resister which ties the transducer to ground. This prevents a build up of charge that might occur otherwise. Between the first and second stages is a one capacitor. This capacitor performs two function&-it 51

PAGE 61

eliminates any DC biases and it eliminates any low frequency AC signals. There is a bleed between the positive and negative terminals of the first stage Op Amp due to the charging on the back electrode of the 7000 transducer. This causes a continuous DC voltage to exit the first stage Op Amp. By having the capacitor, this DC offset bias is eliminated. In addition, any AC signal that is less than 250 Hz, will bias the one side of the capacitor too slowly to pass a signal through. This results in low frequency AC signals (such as 60 Hz ambient AC noise) being filtered out. An actual signal from the electrostatic transducer will increase (or decrease) much faster than the capacitor can filter so the signal will be passed on to the next stage. The net result is that the capacitor converts the output voltage of the first stage to the electrical equivalent of its time derivative. Hence, the second stage is amplifying the derivative (or slope) of the output of the first stage. Slow changes in voltage result in slopes that are too small to be passed along, and rapid changes in voltage create slopes that are sufficient to cause the second stage to respond. In 52

PAGE 62

addition, the DC bias is a constant that is eliminated. Figure 7.3 illustrates this phenomena. -2 I First Stage Output (Filtered and Unfiltered) Time Figure 7.3 The second stage Op Amp has a gain of 100:1. This is close to the maximum capability of the LF 356. The signal is connected to the negative terminal which results in a negative amplification. Due to the sinusoidal nature of the electrostatic transducer signal, there is little difference between the original wave signal and an inverse of that signal. 53

PAGE 63

The result for the second stage Op Amp is a large gain in voltage. The magnitude of the noise exiting the second stage hovers around a half of a volt. To eliminate most of this noise, an IN4934 0.49 volt fast recovery diode is in the signal path after the second stage. This diode filters out most of the amplified electrical noise while leaving the true transducer signal alone. Any signal that the electrostatic transducer produces that is amplified to less than .49 volts at the output of this second stage will be lost. This is the inherent limitation of this system. In addition, the .49v diode filters out any negative signal. This electrostatic transducer creates a sinusoidal wave that oscillates positively and negatively. The negative portion of the wave is not necessary for the digital TTL logic; hence by filtering this negative signal out, the circuit is simplified without loss of critical or useful information. The third stage strictly amplifies the output of the second stage. This is a 80:1 gain Op Amp stage which should result in amplifying the smallest signal up to a value that is close to 12 volt maximum voltage that the Op Amp can produce. 54

PAGE 64

Between the third and fourth stages, there is a 60 pF capacitor to filter out any DC bias or higher frequency AC signals. In addition, there is a 15k Ohm tie to ground so that the posts of the fourth stage Op Amp are set to the same voltage (ground). The net result should be a signal that is smoothly tied to ground except when the analog electronics are responding to the electrostatic transducer's signal. The gain on this fourth stage is determined by a variable trim resistor with a range of 100 to 10,000 ohms. The range of the gain swings between 1:1 and 80:1. This allows each box to be 'tuned' for maximum gain. As the basic signal is amplified, so is the noise. The goal is to keep the noise rates below one volt so that the digital hardware will not confuse noise for a true signal. However by increasing the gain up to a maximum noise level of 1 volt, the response to a true signal will also be maximized. The output of the last stage should force the voltage to 12 volts if there is an intermediate voltage coming out of the third stage. This creates a signal that is convertible to a five volt CMOS signal that the digital hardware can use. The final conversion to a five volt 55

PAGE 65

signal occurs on the digital board. Please refer to the following chapter for details on this procedure. Physical Housing The electronics necessary to boost the electrostatic transducer's signal reside on a small card that is located inside an electrically shielded box. One face of the box houses the electrostatic transducer. At the opposite end are two cables. The first cable has a DB 9 connector and it contains the power (+/-12 volts) and ground wires. The second cable is coaxial and uses the standard coaxial connector (for shielding). The signal carried on the coaxial cable contains the output of the analog circuitry for further processing and use by the system. The following picture is of a receiver with the lid removed so that the reader can observe the placement of the internal electronics. 56

PAGE 66

Receiver Hardware ,Analog Electronic Transducer Figure 7.4 The design of these small analog boxes was dictated by the small signal being generated by the electrostatic transducers and hence the need to reduce any source of electrical crosstalk. The optimum solution was the placing of the amplification circuitry directly behind the electrostatic transducer in a single housing. The receivers were not able to steadily detect the ultrasound waves from the pulsing unit when the distance between the two units exceeded one meter. The range of motion that the simulated load was designed to move is .5 meters in any given direction. To keep the pulsing unit (simulated load) within the 10 degree optimal response 57

PAGE 67

cone required that the receivers be at least 3 meters away. Hence, there was a strong need to boost the gain by a factor of 10 or more because tripling the distance decreases the flux by an order of magnitude. The increase in gain was achieved by placing each receiver at the focus of a parabolic 18 inch reflector. This increased the surface area that the flux passes through from the area of the 7000 series transducer (1 inch2 ) to the area of the mirror (254 inch2). There are many losses due to reflection, absorption, and shadowing. However even with these losses the signal that the receivers are generating is very strong. Due to the reflector being added to the receiver design after the electronics boxes were built (also time constraints on the completion of this project), the receiver boxes are placed as a unit facing into the focal point. This reduces efficiency considerably but as a first approach is sufficient. A future design improvement might be to modify the receivers so that only the transducer is at the focal point. A second option might be to have a secondary reflector send the ultrasound waves to the electronics box which could then be located behind the primary reflector. 58

PAGE 68

CHAPTER 8 DIGITAL HARDWARE INTERFACE BOARD The digital hardware board interfaces the analog boards attached to the electrostatic transducers with the counters that reside on the CB card. It receives the Go (DOUT 2) signal from the CB card, delays for a user selected time frame ms), and then allows the 2.5 MHz oscillator pulses to be sent to the counters that reside on the CB card. The detection of an ultrasound pulse by the analog hardware causes the digital board to cease sending oscillations for that receiver. The cessation of oscillations results in the termination of counts for that given counter. At the end of the cycle (.01 seconds), all counters will have ceased due to receiving the ultrasound pulse signal or due to reaching their maximum value (65535) The counters can be programmed to roll over or cease counting upon hitting their maximum value. For this application, the tracking software sets up the counters to cease counting and thus prevent any ambiguity. 59

PAGE 69

Sound travels at approximately 343 meters/sec at room temperature (Serway 1990). With the oscillator pulsing at 2.5 MHz, each count equates to 0.14 mm. This is the inherent accuracy of each receiver. The design goal was 1 mm accuracy, so this level of resolution is acceptable. The 2.5 MHz oscillator was chosen due to the speed at which the CMOS chips can change state (220 ns). At 2.5 MHz, a cycle equates to 400 ns. The digital board contains the Delay-Go circuit and the five parallel digital input circuits. The Delay-Go circuit is necessary due to the electrical crosstalk that occurs when the capacitor in the pulse circuit discharges. The crosstalk results in a spike in all of the receivers when the Go! signal (DOUT 2) is sent to the pulse circuit. The Delay-Go signal does not occur until after the spike in the receivers has passed. The next spike from the receivers occurs when the ultrasound waves reach the receivers from the pulse unit on the pendulum. Hence, by delaying the Go! signal to the interface circuits, the resetting of the flip-flop on the receiving circuit is performed due to the ultrasonic waves and not due to the electrical crosstalk. Figure 8.1 is a diagram 60

PAGE 70

of the Initialize, Go, and Delay-Go signals laid out in time sequence. Signal Lines 5 lnr 4.6 4 3.6 3 1'l 2.5 0 > 2 1.5 0.5 0 Initialize Go Time D"lay-Go Figure 8.1 Figure 8.2 illustrates a typical receiver signal. Its time scale is the same as the previous signal diagram. 61

PAGE 71

1 2 10 8 6 -2 Receiver Line (Exarnple) ,, ll.l Crosstalk 'I II: Response Time Figure 8.2 II A longer delay in the Delay-Go circuit decreases the probability of the digital board incorrectly triggering on the pulse inducing electrical crosstalk. However a longer delay also means that the minimum distance between the pulse unit and receiver unit increases. To ease the process of finding the minimum sufficient delay, an oscillator with a variable frequency generator was built. The fundamental chip was the LM555C timer and Figure 8.3 illustrates the selected design. 62

PAGE 72

555 oscillator configuration 500 100 to 5k Ohms ,-----j 5 o. Ol).,lf T +Sv :=;;:;;: 8 4 Clock 3 1-------c, Output ]_ Figure 8.3 The frequency that the LM555C oscillator produces is tuned to an optimum level through the use of the variable resistor. The oscillator is fed into a counter and when it receives 15 pulses, the Delay-Go signal occurs. The Delay-Go signal can vary from 211s to 1 ms which corresponds to a minimum distance between 0 and 34 em. Tests have shown that 0.3 ms (10 em) is close to the operating value. Figure 8.4 illustrates the Delay-Go signal electronics. 63

PAGE 73

Delay-Go Delay Go Figure 8.4 The original design was to place some of the digital circuitry in the analog boxes with the output generating 0 volts when there was no signal and 5 volts in response to a signal. This proved impractical due to the crosstalk that digital chips produce. Instead, the analog boxes produce a signal that is fluctuating between 0 and 1 volt and then jumps up to 12 volts when responding to appropriate input. An inverting Schmitt trigger was employed and placed on the digital board to convert the analog signal into a 5 volt signal. The inverting Schmitt trigger registers anything less than two volts as five and anything greater as zero volts. An initial concern that hitting the trigger with 12 volts might pose some hardware problems was unwarranted. In 64

PAGE 74

addition, the Schmitt trigger has a hysteresis feature which prevents rapid toggling as the input voltage passes through the switch point. Hence, the input to the Schmitt device is an analog continuous function and the output is a discrete (0 or 5 volt) value. Lastly, Figure 8.5 demonstrates how one of the five parallel digital circuits appears. Delay-Go DOUT 1 Main Board Digital Electronics (5 sets) Initialize Receiver Signal Figure 8.5 Each of these parallel circuits is attached to a To Counter different input analog to digital receiver circuit and the parallel circuit's output is wired to a different counter on the CB I/O card. The common inputs to each 65

PAGE 75

parallel circuit are the Init. (DOUT 1), Delay Go lines, and the 2.5 MHz oscillator. The OR gate allows the cessation of counting and the resetting of the flip-flop when the receiver activates or with the initialization of the next pulsing cycle. Due to there being a chance that a receiver is not activated, the flip-flop must be reset by some other means. In this instance, the other means is the Init. line (DOUT 1). 66

PAGE 76

CHAPTER 9 STATE VECTOR DETERMINATION As outlined in the previous chapter, the counters in the CB card have values that translate into distance. Each count is equal to .14 mm. This is the distance that sound travels (343 m/s) per interval at 2.5 MHz. At the start of the experimental session, the distance between each receiver and the origin (in Cartesian coordinates) is read into the tracking software from a database file but the tracking software gives the user a chance to override these values if necessary. The origin is defined as the pendulum being straight down with the supporting apparatus at a prescribed "home" position. The database file is called "sensors.dat" and can be modified with any text editor. The distance between the first receiver and the origin is the following: 67 ( 9 0 1)

PAGE 77

The tracking software then asks for the user to pause five seconds so that the count for the given distance is measured. The number of counts will vary based on temperature, humidity, atmospheric pressure, etc. (O'Connell 1992). The result of this static measurement is known as the Baseline Count (BC). Each receiver will have a unique BC value and it equals the exact distance from the receiver to the origin of the coordinate system. When actual data gathering occurs, the distance between a given receiver and the piezoelectric transducer (M) is determined by subtracting the Measured Count (MC) from BC. The result is then multiplied by .14 mm and added to R. ( 9. 2) When a data gathering cycle completes, the positional determination analysis is performed. Each receiver only tells the system how far the pendulum's center of mass is from that receiver. The goal of the tracking system is to determine the location of the simulated crane load in three dimensions (X, Y, and Z) Using the Gauss-Jordan method, four receivers need to have valid respon{Oes inorder to determe X, Y, and Z. However if the problem 68

PAGE 78

can be thought of geometrically with each receiver giving a distance measurement, then that distance measurement is acutually a radius of a sphere with the receiver at the point of origin. The intersection of three spheres occurs in two places. The fourth sphere is only needed to resolve which of the two intersecting places is the correct position. Before discussing the equations, a few definitions are in order. X, Y, and Z are the unknown coordinates to the pendulum's center of mass. Xa, Ya, and Za are the coordinates of a given receiver. Met is the measured distance between the center of mass of the pendulum and a given receiver (see above equations). Ml2 (X -xl) 2 + (Y -Yl)2 + (Z Zl)2 (9.3a) M22 (X -X2)2 + (Y -Y2)2 + ( 2 -22)2 (9.3b) M32 (X -X3)2 + (Y -Y3)2 + ( 2 Z3)2 (9.3c) M42 (X -x4) 2 + (Y -Y4)2 + (2 -24)2 (9.3d) Doing a little algebra on the first equation and propagating yields: 69

PAGE 79

x2 2X*Xl + y2 2Y*Yl + z2 -2Z*Z1 ; M12 x12 y12 y12 (9. 4a) x2 2X*Xz + y2 2Y*Y2 + z2 -2Z*Z2 ; Mzz -x} -Yzz Yzz (9.4b) x2 2X*X3 + y2 2Y*Y3 + z2 -2Z*Z3 M32 -xl y32 y32 ( 9. 4c) x2 2X*X4 + y2 2Y*Y4 + z2 -2Z*Z4 M42 Xq2 y42 y42 (9. 4d) Subtracting the first equation from each in turn will drop out three variables from the remaining equations. In addition, the symbol ka will be substituted for the constants on the right side. x2 2X*Xl + y2 2Y*Yl + z2 -2Z*Zl = k1 (9.5a) -2X* (Xz-Xl) 2Y* (Yz-Yl) -2Z* (Zz-Zl) kz-kl (9.5b) -2X* (XrXl) 2Y* (YrYl) -2Z* (ZrZl) k3-kl (9.5c) -2X* (X4-X1I 2Y* (Y 4-Y1 ) -2Z*(Z4-z1 ) k4-kl ( 9. 5d) The next step in the Gauss-Jordan method is to normalize the first coefficient (equation 9.5a is complete) (9. 6b) (9. 6c) (9.6d) The cycle repeats with the subtraction of 9.6b from c and d. But the constants are getting out of hand so the following substitutions are used. 70

PAGE 80

1YrY1 ) I IXrX1 ) IZrZ1 ) I IXrX1 ) (YrY1 ) I (XrX1 ) IZrZ1 ) I (X 2-x1 ) The equations now have the following form: Y*m3 + Z*n3 13 Again, it is time to normalize the equations: Y + Z*n3/m3 Y + Z*n4/m4 (9. 7a) (9. 7b) (9. 7c) ( 9. 8c) ( 9. 8d) (9. 9c) ( 9. 9d) At last, the final result is at hand. Subtract 9.9c from 9.9d: An equation that yields a value for Z has been found. Once Z has been found, this value is used in equation 9.9c to solve for Y. The Z & Y values are then plugged into 9.6b to determine an X value. The following recapitulates these equations: -(k2-k1)12(XrX1 ) -Y*(YrY1)1(XrX1 ) -Z*(ZrZ1)1(X2-x1 ) (9.12b) Y 13/m3 -+ Z*n3/m3 ( 9 .12c) z = (14/m4 -l3/m3 ) I (n4/m4 -n3/m3 ) (9.12d) 71

PAGE 81

Since there are five transducers, the tracking system can fall into a state of over-sampling when five receivers have valid measurements. If five receivers have valid responses, the number of solutions is four. The techniques to amalgamate this information and come up with a better solution have not been explored as of this time. The initial implementation is to average the results together. Determination of velocity (Vx, Vy, and V2 ) for this initial product is the simple velocity algorithm: vx [Xprevious -Xcurrent J ILlume (9.lla) Vy = [ Yprevious Y current J I Lltime (9.llb) Vz [ Zprevious Zcurrent J ILlume (9.llc) Lltime is the interval between samples. This is currently 55 milliseconds. The acceleration (Ax, Ay, and A2 ) follows in like manner: Ax [ V x previous V x current J I Lltime (9.12a) Ay [ V y previous Vy current J ILlume (9.12b) Az [V z previous V z current J ILlume (9.12c) 72

PAGE 82

The position, velocity, acceleration, and the time at which this information is valid is known as the state vector. The state vector can be displayed, written out to a file, or transferred via RS232 to another computer. Please refer to the following chapter for more information on how this data can be transmitted out of the tracking system. 73

PAGE 83

CHAPTER 10 OUTPUT METHODS The information that the tracking system is creating would be useless if the information wasn't passed to other computer programs for further use and analysis. This process of passing information is performed through logging to a file or transmission via RS232 port. The tracking system develops the position of the pendulum's center of mass and it is contained in a data format known as a state vector. As explained in the previous chapter, the state vector consists of time, position in Cartesian coordinates (X, Y, and Z), velocity, and acceleration. Another piece of information deals with the confidence that the tracking system has with its solution. A scale system has been employed with a value of 100 for the tracking system being satisfied with the solution to a value of zero for the tracking solution not being satisfied with its solution. 74

PAGE 84

There are 32 one bit flags available so that special information can be passed on. Currently only two flags have been used: sim data and live. The sim_data flag is set to one if the data in the state vector is generated by a simulation. If the data in the state vector is created by processing the actual pendulum data, then the sim_flag is set to zero. If the data is being read from a stored file (playback), the live flag will be set to zero; otherwise the live flag is set to one. Also note that if the data is not live, the time associated with the state vectors will not equal the actual wall clock time. It is anticipated that in the future the orientation of the pendulum's center of mass will be determined and analyzed. Orientation (or attitude) of a center of mass can be represented in a three coordinate system: pitch, roll, and yaw. For this system, it is not so important what the units are, just that room is made available for this information so that future code modifications are minimized. The above five items: time; confidence; flags; X,Y, & Z; information; and Pitch, Roll, and Yaw information; compose the state vector. All information in the state 75

PAGE 85

vector is in integer format. Table 10.1 contains details concerning the format for each piece of data. By placing all the state vector information into integer values, the state vector is free from a given computer's floating point representation. Type Time Confidence Flags Size 8 bytes: 2 bytes: 8 bytes: state tensor 72 bytes: Table 10.1 Explanation The first word (4 bytes) is year*lOOO + day of year. The second word is in elapsed lO,OOOths of a second from the beginning of the day. Not well defined at this time. 100 good; 0 bad confidence of position information. bit 0 (byt:e 0) is sim data flag; bit 1 is live flag. The rest of the bits are unused as of this time. This is a 6 by 3 matrix with a word (4 bytes) for each value. The six indices are X, Y, Z, Pitch, Roll, Yaw. The three indices are position, velocity, and acceleration. The basic units are micrometers and microradians repectively. Appendices A through E contain all of the files that have the necessary environment variables and source code 76

PAGE 86

so that a user can interface an analysis application to the tracking system. The structures "banner" and "output_buffer" located in the file named pendulum.h (appendix A) are the two building blocks that create the state vector. All of the tracking system output routines place the state vector data in the output_buffer format. This means that any program written to analyze the state vector data will need to use this format. The tracking system can write the data to disk simply by selecting Output from the main menu and the Open option under the Output sub menu (Please refer to chapter 4). The user must enter a valid file name. At any time the user can close the file by selecting the Close option from the Output sub menu. When Close is selected, data logging is immediately suspended. The inlog.c source file found in appendix B can be used to open a file with the stored state vector information. Inlog.c also has the 'C' code which can be used to read a record from a file containing stored state vector information. 77

PAGE 87

The tracking system can send the data to another computer via RS232 protocol simply by selecting Output from the main menu and the RS232 option under the Output sub menu. The user must select the appropriate communications port. The RS232. C vl. 6 by C. Karcher contains library routines that interface the tracking system software to an RS232 port. When selecting the RS232 output option, data will immediately start being shipped to the RS232 port. If the user selects the RS232 output source before selecting an input source, data will start flowing to the RS232 port as soon as an input source is selected. The file rs232stf.c from Appendix E contains the procedure rsinpint which will initialize a host's RS232 port so that it can receive data from another computer processing the tracking software. The nature of the RS232 library routines is that the initialization of the port from one computer can occur at a different time than the initialization at the other computer. Rs232stf.c also contains rsgetdat which can be used to receive state vector information from the tracking system. The state vector information from the tracking computer is in the integer format as described above. 78

PAGE 88

The receiving computer will probably have to convert it to floating point values to make the information useful. A sample conversion procedure (convert.c) is included to aid the analyst in this process. Lastly an orderly shutdown of RS232 communications must occur. This can be done with the 'C' procedure rsclose which is also found in rs232stf.c. If the rs232 port is not properly closed on the receiving computer, there is a chance that the receiving computer will hang waiting for I/O from its rs232 port. The code that is listed in Appendices A thrrough E contain all the routines that are necessary for an analyst to build software that can interface to the tracking system's state vectors. There are other routines listed which would allow an analyst to log data or send data to another computer. These routines might be useful or provide insight and are thus included. 79

PAGE 89

CHAPTER 11 CONCLUSION In terms of future improvements, it would not be technically difficult to increase the resolution of the system by using a faster oscillator. This could be accomplished by increasing the digital voltage to 10 or higher and by replacing the existing chips with faster (and more expensive) ones. Another improvement deals with increasing the number of samples. Currently the system samples 20 times per second due to the speed that the computer can run the software program. A faster computer might speed this up. However, the pulsing capacitor charges to 22 volts in 50 ms. To get the same stored energy into the capacitor in a shorter time period would require a combination of a larger power supply and/or less charge limiting resistance. Currently, the power supply for the pulser hardware delivers 24 volts DC and is delivering a sustained rate of 3.2 watts. Another consideration is that more power usage would probably entail the need for 80

PAGE 90

active cooling. All of these problems are easily solved but will add to the current cost of the system. The modifications to add pitch, yaw, and roll could be achieved by using two different pulsing units and Ping-Pong the units. Changing the electronics to pulse in this fashion would not be very difficult and the software modifications would be minimal. The most difficult aspect would be finding suitable pulsing transducers. The ultrasound pulse-receive tracking system was designed for a three dimensional pendulum experiment. However a pendulum experiment was not intended to be its only application. With little or no modification, the tracking system could be installed into any apparatus where precise location is a desired goal. The only requirement is good line-of-sight between the pulsing unit and receivers. As an example, an air track could be rigged with receivers and the pulsing unit placed onto the car. The cost of the tracking system is very modest at less than four thousand dollars. Any basic Pentium or faster processor based computer will serve as a platform 81

PAGE 91

and the addition of a single $200.00 card gives the computer the necessary hardware to perform the tracking function. The rest of the hardware components can be purchased for under $1,000.00. As such, it is hoped that this system will be used with other applications in the future. 82

PAGE 92

APPENDIX A PENDULUM.H /* here lies all of the specialty items that are */ /* going into the pendulumn project. */ #define pi 3.141592654 #define surface_gravity 9.80 #define input_direction 1 #define output_direction 2 #define buffer_size 1024 #define sync_pattern #define BOARD NUM #define BUF_SIZE #define ADRANGE #define MIN VOLTS #define MAX VOLTS #define MAX COUNT #define HChan #define Lehan OxAA 1 30000 BIP5VOLTS -5.0 +5.0 4096 7 0 #define C1ock_Speed 2457600.0 II mach2 sample_rate is the raw hertz rate I I it will look at each channel in order. #define mach2 sample_rate 12 #define mach2_buffer_size 36 #define one_third #define two third 12 24 #define Process Mach2 Data 119 #define Gather Mach2 Data 120 83

PAGE 93

l \ ( I r. (Continued) /* banners are the flags that anyone can use for */ /* whatever reason they feel like. */ I* 32 bits are reserved in the output buffer */ I* for this endeavor. */ struct banners { unsigned sim data ; 1; unsigned live : 1; unsigned unusedl : 14; unsigned unused2 : 16; } ; I* here comes the output buffer I* the purpose of the this is to give form I* time [OJ is year and day of year example:95110 I* time [1] is fraction of a day. However I* is in ten thousandths of a day units I* so at 1:00 am it equals 3,600,000,000 struct output_buffer { } ; unsigned long int time[2]; unsigned short struct signed banners long int int confidence; flags; state __ tensor[6] [3]; it is *I *I *I *I *I *I /* here comes the position tensor */ /* the purpose of this is that this is how the */ I* data is kept internally to the program */ /* it can then be written out if so desired */ struct position_vector { *I } ; double elapsed_time[2]; I* 0 is days 1 is fractions of days unsigned short int confidence; struct double banners flags; x [ 3] y [ 3] z [ 3] pitch [ 3] roll [3] yaw [ 3] ; 84

PAGE 94

struct matrix cell II double II double sensor } ; double double double double PENDULUM.H (Continued) range_squared[4]; // square of the position of each xl_x2,yl y2,zl_z2; x2_x3,y2_y3,z2_z3; x3_xl,y3_yl,z3_z1; kl k2,k2 k3,k3_kl; /* here are all of the prototypes unique to this software project */ I* position_vector /* output_buffer int convert(struct to output_buffer direction to position_vector direction position_vector *datal, struct output_buffer int direction); 1 *I 2 *I *data2, int simulate(struct position vector *data, double theta_max, double phi_vel); int outlog(struct output_buffer *data,int event_flag, char file_name[128]); int inlog(struct output_buffer *data, int event_flag, char file_name[l28]); 85

PAGE 95

#include "stdio.h" #include "dos.h" #include "pendulumn.h" APPENDIX B INLOG.C II the three states of event _flag II -1) close an old file and open a new one II 0) read an existing file II 1) close an old file II The internal variable open_file is the other key II 0) no file open II 1) file is open int inlog (struct output_buffer *data, int event_flag, char file_name[l28]) ( close static int int static FILE open_file = 0; result = O,count; *handle; if (((event_flag -1) && (open_file 0)) 11 (event_flag 1)) ( open file 0; II close the file -if (fclose (handle) l= 0) result 1; if (event __ flag == -1) handle = fopen(file_name, "rb"); if (!handle) else } } result = 1; open_file 0; open_file 1; 86 II Blowing chunks II an open file couldn't

PAGE 96

INLOG.C (Continue) if ((event_flag 0) && (open_file 0)) { count= sizeof(*data); count= fread(data,sizeof(*data),l,handle); if (count { fclose(handle); open_file = 0; result = 1, return(result); 87

PAGE 97

APPENDIX C OUTLOG.C #include "stdio.h" #include #include "pendulumn.h" int outlog(struct output_buffer *data,int last_time) { static int first time = 0; int result = O,count; char file_name[BO]; static FILE *handle; if (first_ time == 0) { first_time = 1; print(" Enter a file name>>"}; gets(file_name); handle= fopen(file_name,"w+b"); if {!handle) { I ) printf("Blov1ing chunks could not open %s \n" ,file_name); result = 1; if ((result== 0) && (last_time 0)) count= sizeof(*data); count= fwrite(data,sizeof(*data),l,handle); if (count { ) ) printf("Blowing chunks did not write out data \n"); result = 1; else if ((result == 0) && (last_time ==1)) if (fclose(handle) 0) { printf("Blowing chunks did not close file properly \n"); result = 1; ) I return(result); 88

PAGE 98

day*/ APPENDIX D CONVERT.C #include "stdio.h" #include "math.h" #include "pendulumn.h" int convert(struct *datal, struct output_buffer *data2, int direction) /* this procedure copnverts from the postion vector (dir=l) */ /* to the output_buffer format so that it can be logged */ /* it will also convert from the output_buffer format to */ I* the position_ vector forrnat so that process in of logged 1 I* data can be performed. (direction=2) 1 I* Note: direction = 0 is not allowed. This means the the */ /* calling routine must make a conscious decision */ /* about what it wants this routine to do. */ struct position_vector stuffl; struct output_buffer stuf; int i,result; if (direction == 1) stuffl = *datal; stuf.time[l] (stuffl.elapsed_time[l]*lOOOO.O); /*fraction of a stuff2.time[O] = stuffl.elapsed_time[O]; stuff2.flags = .stuffl.flags; stuff2.confidence = stuffl.confidence; for (i=O;i<3;i++) { .stuff2.state_tensor[O] [i] stuff2.state_tensor[l) [i] stuf. state_tensor [2] [i] stuf. state_tensor [3] [i] stuff2.state_ten.sor[4] [i] stuf. state_tensor [5] [i] 89 ((stuffl.x[i]*l00000.0)+0.5); ((stuffl.y[il*l00000.0)+0.5); ((stuffl.z[il*l00000.0)+0.5); ((stuffl.pitch[il*100000.0)+0.5); ((stuffl.roll[il*l00000.0)+0.5); ((stuffl.yaw[il*l00009.0)+0.5);

PAGE 99

day*/ CONVERT.C (Continue) *data2 = stuff2; else if {direction 2) { stuf = *data2; stuffl.elapsed_time[l] stuffl.elapsed_time[O] (stuff2.time[1]/10000.0); /*fraction of a stuff2.time[O]; stuffl.flags = stuff2.flags; stuffl.confidence = stuff2.confidence; for (i=O;i<3;i++) { stuffl.x[i] stuf. y[i] stuffl.z[i] stuffl. pitch [ i] stuffl. roll [i] stuffl.yaw[i] *datal stuffl; else result = 0; return(result); stuff2. state_tensor [OJ [i] /100000. 0; stuff2. state_tensor[l] [i] /100000. 0; stuff2. state_tensor[2J [i] /100000. 0; stuf. state_ tensor [3 J [ i J /100000. 0; stuf. state_ tensor [ 4] [ i] /100000. 0; stuff2.state_tensor[5J [i] /100000.0; 90

PAGE 100

APPENDIX E RS232STF.C #include "stdio.h" #include "math.h" #include "dos.h" #include "conio.h" #include "pendulum.h" #include ''rs232.c'' int rsputdat{int com_active,int which_way, struct output_buffer *data) } ; int result,i; struct rs232 output_forrnat { unsigned long int bit_sync; struct output_buffer out_dat; union output_format { struct rs232_output __ format stuff; char name(90]; } ; union output_format out; if ((which_way == output_direction) && (com_active > 0)) out.stuff.out_dat = *data; for (i O;i<4;i++) out.name[i] sync_pattern; result rs_sndstr(90,out.name); else result = 0; return(result); 91

PAGE 101

RS232STF.C (Continue) int rsgetdat (struct output_buffer *data) int result; union input_format struct output_buffer stuff; char name(87}; } ; union input_format in; if (rs_inrcvd() >= 180) while ((rs_getbyt() != sync_pattern) && (rs inrcvd (} >= 90)) { j if (rs_getbyt{) == sync_pattern) { if (rs_getbyt{) == sync_pattern} if (rs_getbyt(} sync_pattern) result= rs_getstr(86,in.name); *data = in.stuff; else result = 0; else result 0; else result 0; else result = 0; return(result); void rsclose() rs_close(); 92

PAGE 102

RS232STF.C (Continue) int rsinpint{int com_port, char *in_buf, char *out_buf) { int result; char port; if (com_port if (com_port 1) port 2) port RS_POR'rl; RS_PORT2; result rs_initport(port,RS_B115K,RS_EVPAR,RS_DBIT8,RS_SBIT1, buffer_size,in_buf, buffer_size,out_buf); return(result); 93

PAGE 103

BIBLIOGRAPHY G. L. Baker and J. P. Gollub, "Chaotic dynamics an introduction," Cambridge University Press, New York, 1990. J. P. Bently, "Principles of measurement systems -2nd edition," Wiley and Sons, New York, 1988. K. Barret, "LMTO Independent Link Analyzer (LILA) -Rev 1.1," Lockheed-Martin Technical Operations (LMTO) Company, Colorado Springs, 1995. P. R. Bevington and D. K. Robinson, "Data Reduction and Error Analysis for the Physical Sciences-2nd Edition," McGraw-Hill Inc., New York, 1992. T. F. Bogart Jr, "Electric Circuits," Macmillan Publishing Company, New York, 1988. J. J. Carr, "Digital Electronics Troubleshooting," Tab Books, Blue Ridge Summit PA, 1981. H. E. Edgerton, "Electronic Flash, Strobe," MIT Press, Cambridge MA, 1979. L. C. Eggebrecht, "Interfacing to the IBM Personal Computer-2nd Edition," SAMS (a division of MacMillan), Indianapolis IN., 1994. W. Garver and F. Moss, "Detecting Signals with Noise," Scientific American, pp. 100-103, August 1995. S. Giarcia, "An Ultrasonic Ranging System, Byte, vol. 9 no. 11, pp. 112-123. J. Gleick, "Chaos Making a New Science," New York, 1987. 94

PAGE 104

S. P. Harbison and G. L. Steele Jr., "'C' A Reference Manual-3rd Edition," Prentice Hall, Englewood Cliffs, NJ 1991. R. Hickling, and S. P. Marin, "The use of ultrasonics for gauging and proximity sensing in air," J. Acoust. Soc. Amer., vel. 79, no. 4, pp. 1151-1169, 1985. M. Horowitz, "How to Design and Build Audio Amplifiers," Tab Books, Blue Ridge Summit PA, 1980. D. A. Hutchins, W. M. D. Wright, and G. Hayward, "Air Coupled Piezoelectric Detection of Laser-Generated Ultrasound" IEEE Trans. Ul trason. Ferroelectr_ics, and Freq. control, vel. 41 no. 6, pp. 796-805, 1994. D. A. Hutchins, w. M. D. Wright, and D. W. Schindel, "Ultrasonic measurements in polymeric materials using air-coupled capacitance transducers" J. Acoust. Soc. Amer., val. 96, no. 3, pp. 1634-1642, 1994. D. D. Kana and D. J. Fox, "Distinguishing the transition to chaos in a spherical pendulum," Chaos, vol. 5 no. 1, pp. 298-310, 1995. B. Kohler and G. Stauch, "Electric Properties of an Embedded Piezoelectric Layer," IEEE Trans. Ultrason., Ferroelectrics, and Freq. control, val. 41 no. 5, pp. 740-748, 1994. D. Lancaster and H. M. Berlin, "CMOS Cookbook -2nd Edition," SAMS (a division of MacMillan), Indianapolis IN., 1988. W. M. Leach, Jr., "Controlled-Source Analogous Circuits and SPICE Models for Piezoelectric Transducers," IEEE Trans. Ultrason., Ferroelectrics, and Freq. control, vel. 41 no. 1, pp. 60-66, 1994. V. Magori and H. Walker, "Ultrasonic Presence Sensors with Wide Range and High Local Resolution," IEEE Trans. Ultrason., Ferroelectrics, and Freq. 'control, val. 34 no. 2, pp. 202-211, 1987. 95

PAGE 105

W. Manthey, N. Kroemer, and V. Magori, "Ultrasonic transducers and transducer arrays for applications in air" Meas. Sci. Technol, no. 3, pp. 249-251, 1992. J. C. C. Nelson, "Operation Amplifier Circuits: Analysis and Design," Butterworth-Heinemann, Newton MA, 1995. J. O'Connell, "Build an Ultrasonic Ranger," CompLitercraft, June, pp. 47-83, 1992. W. Pajewski, P. Kielczynski, and M. Szalewski, "Ring Vibrations in an Acoustic Medium as a Source of U1 trasonic Radiation," IEEE Trans. Ul trason., Ferroelectrics, and Freq. control, vol. 41 no. 6, pp. 789-795, 1994. D. W. Schindel and D. A. Hutchins, "The Design and Characterization of Micromachined Air-Coupled Capacitance Transducers" IEEE Trans. Ultrason., Ferroelectrics, and Freq. control, vol. 42 no. 1, pp. 42-50' 1995. D. W. Schindel and D. A. Hutchins, "Applications of Micromachined Capacitance Transducers in Air-Coupled Ultrasonics and Nondestructive Evaluation" IEEE Trans. Ultrason., Ferroelectrics, and Freq. control, vol. 42 no. 1, pp. 51-58, 1995. D. W. Schindel, D. A. Hutchins, L. Zou, and M. Sayer, "Capacitance Devices for the Generation of Air-Borne Ultrasonic Fields" IEEE U1 trasonic Symponsi Lim, pp. 843-846, 1992. R. A. Serway, "Physics For Scientists & Engineers," Saunders College Publishing, Philadelphia PA, 1990 J. Starret and R. Tagg, "Control of a Chaotic Parametrically Driven Pendulum," Physical Review Letters, vol. 74 no. 11, pp. 1974-1977, 1995. 96

PAGE 106

T. Swan, "Mastering Borland C++ 4.5-2nd Edition," SAMS (a division of MacMillan), Indianapolis IN., 1995.D. J. Tritton, "Ordered and chaotic motion of a forced spherical pendulum," European Journal of Physics, no. 7, pp. 162-169, 1986. V. Valkenburgh, Nooger, & Neville, "Basic Electricity." John F. Rider, New York, 1963, R. J. Wyber, "The Design of a Spark Discharge Acoustic Impulse Generator" IEEE Trans. on Acoustics, Speech and normal signal processing, vol. 23 no. 2, pp. 157-162, 1975. Specifications for the Computer Boards Universal Library, Computer Boards Inc., Cambridge Mass. 1994. Specifications for the EDO EC64 Hemisphere, EDO Acoustics Division: Ceramic Operations, Salt Lake UT, 1995. Specifications for the LF356 Op Amp, "General Purpose Linear Devices Data book," National Semiconductor Corporation, Santa Clara CA., 1989. Specifications for the LM555/lM555C Timer, "General Purpose Digital Devices Data book," National Semiconductor Corporation, Santa Clara CA., 1989. Specifications for the Polaroid 7000 series transducer and the Polaroid Ultrasonic developers kit, OEM Components Group, Cambridge MA, 1995. Specifications for the RS232.C v1.6, c. Karcher, 9537 Evanston Ave. N. Seattle WA 98103-3131, 1995. 97