# EE449 Computer Architecture

AI and Robotics

Nov 24, 2013 (4 years and 5 months ago)

101 views

EE449 Computer Architecture

Matt Aldrich

5/04/04

Fast Ultrasound Signal

Processing Techniques

Analog & DSP Detection Techniques

EE449 Final Project

Detection of Ultrasound Pulses

Explanation of problem; Analog vs. Digital

Analog implementation and schematic

DSP Techniques; brief intro into transform theory

Results: Analog, Digital

Further work

Lessons Learned

How Do We Detect a Pulse?

Two Methods for Measuring the Signal

Analog Solution

Transmitted signal is amplified and compared to a reference (threshold) voltage.

Triggers board interrupts and declares a found signal

Digital Processing Solution

Transmitted signal is amplified and sampled (via on board ADC)

Sampled signal is processed and correlated with a similar signal in memory

Analog Processing: Discrete components = easy (\$)

Digital Processing: Algorithms = difficult (\$\$\$)

Why Not Always Use Analog?!

Analog Signal Processing
-

Problems

Error In Measurement

Noise

“Delay” in measurement due to threshold voltage level (small in this example)

rx_signal

threshold

error

Why Not Always Use Analog?! (2)

Delay is small

who cares?

Time of Flight Measurement

Accurate prediction of distance from 1 node to the next depends upon
reliable estimate of pulse travel time

To minimize error threshold must be set low enough to accurately
predict initial signal, but not low enough to trigger from noise

TOF

measurement!

Small delays = inaccurate results

Analog Processing Techniques

How is this done?

Initialize board at transmitter to trigger transducer

At receiver end, signal processing is done with discrete components

Operation Amplifiers (Op
-
Amps) amplify signal

Resistor networks generate reference voltage

Capacitors filter out AC components of signal to allow for amplifiers “work”

1
2
3
U1
R1
R2
RZ
V_SIGNAL

1
2
1
R
R
v
v
gain
i
o
Circuit Schematic

R7
100k
R8
1.1k
C1
10u
C4
47p
C6
47p
-
+
U1A
LM358
2
3
1
8
4
RX_SIG_IN
Vcc
Vcc
+
-
U1B
LM358
5
6
7
RL
5.1k
R10
27k
R5
4.7k
R6
150
C2
10u
C7
485p
R9
100k
Vcc
C3
2.2n
Vss
R1
33k
R4
100k
C5
6.8n
Vss
R2
33k
+
-
U2A
TLV2352I
3
2
1
8
4
R3
1.2k
RX_OUT
Greater Accuracy

DSP Techniques

What is our alternative?

Use the on board processor!

Digital Signal Processing

Detect a Signal Quickly

Sample the waveform

Convert sample signal to the frequency domain

Perform the correlation of the received signal with one in memory

The resulting waveform gives an estimate of how well the received signal
represents the signal in memory

Greater Accuracy

DSP Techniques (2)

The Frequency Domain

Assume some signal processing
background

any signals and
systems book for information

A Fourier transform allows us to look
at the frequency components of any
signal

Implementation: DFT, FFT:
DFT simpler

easier to code
for initial tests

1
,....
1
,
0
,
1
]
[
2
sin
]
[
2
cos
]
[
)
0
(
]
[
1
0
/
2
1
1
1
1
1
0
/
2

N
n
e
X
N
n
x
N
kn
n
x
I
N
kn
n
x
x
R
e
n
x
X
N
k
N
kn
i
k
N
n
k
N
n
k
N
n
N
kn
i
k

Greater Accuracy

DSP Techniques (3)

The DFT makes our lives simpler

Convolution in time domain:

Convolution in frequency domain:

Correlation in frequency domain:



i
i
n
v
i
x
n
v
n
x
]
[
]
[
]
[
]
[
)
(
)
(
]
[
]
[

V
X
n
v
n
x

)
(
)
(
]
[
]
[
V
X
n
v
n
x
Correlation: What Actually Happens?

Different, but similar data sets

Correlation: comparing the superposition of the signals, with the reference
(memory) sliding to the left or right

Example: If the reference is a close copy of the received signal and
lags

for
some
t
, the correlation will be a positive value; if it

the correlation will
produce large negative values

Correlation, like convolution is cyclic: wrap around problem

Correlation: What Actually Happens? (2)

Zero pad the end of sampled signal for accurate results

From: Numerical Recipes in C: The Art of Scientific Programming

Results: Analog

Analog Solution

Circuit used closed loop gains for ~90 and ~600

Approximately 1:6 gain ratio

Test case: supply voltage of 3.3V, and driving the transmitter with 3.3Vpp 40KHz square
wave

Good response: 8m (worst case) 100mV Vpp output

still usable

Results: Algorithm

DSP Solution

Coded DFT, IDFT (simplicity) in C

Test Case: echo waveform generated in MATLAB was processed and compared to the
same algorithm using MATLABS FFT, IFFT functions

Little error between test cases, due to rounding in C program, MATLAB FFT computation

Algorithm is successful!

Results: Algorithm (2)

0
0.5
1
1.5
2
2.5
3
3.5
4
4.5
5
x 10
-3
-0.025
-0.02
-0.015
-0.01
-0.005
0
0.005
0.01
0.015
0.02
0.025
Memory Signal
Time
Amplitude
0
0.5
1
1.5
2
2.5
3
3.5
4
4.5
5
x 10
-3
-0.025
-0.02
-0.015
-0.01
-0.005
0
0.005
0.01
0.015
0.02
0.025
Time
Amplitude
Transmitted Signal with Noise
Experimental Signals: Memory, Transmitted

Results: Algorithm (3)

0
50
100
150
200
250
300
350
400
-0.04
-0.03
-0.02
-0.01
0
0.01
0.02
0.03
0.04
0.05
Algorithm Verification: Matlab vs Program and Error
Data Points
DFT Results // Error
MATLAB
Program
Error
Future Work (Dimitrios…)

Analog further work

Currently, gain ratio between two stages may be high

Solution: add two more stages, reduce step up ratio

Next step: create board

Algorithm further work

Correlation routine needs to be compared with a threshold to declare if
waveforms are similar

Requires ADC to sample real data

What's left?

Algorithm testing on actual platform

Lessons Learned

Good overall project

Well suited for my background: circuit design, some programming

Utilized wide range of knowledge, analog design, signal processing
methods, C programming, MATLAB

Good understanding of Ultrasound detection, processing

Obstacles

Algorithm development