Beruflich Dokumente
Kultur Dokumente
Langechuan Liu
October 2009
subroutine discription
beamform v1.m
scancon v1.m
beamform v2.m
SM gen.m
data gen.m
beam-forming subroutine
scan-conversion subroutine
alternative way of phase correction
subroutine for setting up new reflector positions
subroutine for generating ultrasound raw data
Timeline:
October 12, 2009 image reconstruction code finished
October 14, 2009 raw data generation code finished
October 18-22, 2009 answers sorted and LATEXed
Langechuan Liu
x 10
3
50
2.5
100
2
150
1.5
200
1
250
0.5
300
350
50
100
150
200
250
Figure 1: Problem A
Question B Suppose the width of the element is the same as the centerto-center spacing, then citing the equation from lecture notes (A.23), we
have
Langechuan Liu
/2
2d
1
1
=
=
=
=
(1)
D
2Nd
2Nd
N
65
2/2 ( 2/2)
Number of beams =
= 65 2 91.9
(2)
sin
In order to adequately sample angularly and make number of beams an
odd number for =0 A-mode scan later , number of beams is chosen to be
nbeam=93.
sin =
Question C After using baseband subroutine, the real part and imaginary
part of baseband data is shown in Figure 2 using showimage subroutine.
x 10
x 10
2.5
50
50
2
1.5
100
100
1
0.5
150
150
0
0
200
200
0.5
1
1
250
250
1.5
2
2
300
300
2.5
350
50
100
150
200
350
250
3
50
100
150
200
250
Strictly speaking, this is not needed since finally interpolations will be perfomed. If
beam number is odd, the =0 A-mode scan can be obtained directly even before interpolation. Refer to Question I for detailed discussion.
Langechuan Liu
Then raw data and the absolute value of baseband data are plotted in
comparison in Figure 3:
x 10
3
x 10
3
50
50
2.5
2.5
100
100
2
2
150
150
1.5
1.5
200
200
250
250
0.5
300
350
50
100
150
200
250
0.5
300
350
50
100
150
200
250
R(r, ) =
e
bn
N n=1
c
4
(3)
Langechuan Liu
where demodulation frequencyf0 carrier frequencyf0 , N is the total number of elements in the array noted as nelem in Matlab code. The total
distance the signal traveled is
dtot
n (r, ) , d0 + dn
p
p
, (rsin x0 )2 + (rcos)2 + (rsin xn )2 + (rcos)2
q
p
= r 2 + x20 2rx0 sin + r 2 + x2n 2rxn sin
(4)
(5)
(6)
d0 + dn
c
(7)
(8)
Since we have only discrete samples, we need to find the correct time
delay(table lookup) and interpolate,. The time interval between two consecutive sample points is t = 1/fs , thus ideally number of time clicks
corresponding to tn is tickn = tn /t = tn fs , which is usually not an integer. Linear interpolation using the weighted sum of two nearest neighbors
floor(tickn ) and ceil(tickn ) is used in beamform.m (equivalent to interpolate with a triangular function). Single point interpolation with only the
nearest neighbor round(tickn ) is also explored, with results of no much difference .
Another Perspective Interestingly, there is another way to interpret and
implement phase rotation correction term n (r, ). Every row in the
matrix of databb(140065 here) is collected at the same time point,
e.g. the mth row is collected at the mth tick, i.e. the time point
mt. This is the time between the sending and receiving of the signals
for all channels. Note that for different channels, the information collected at the same time does not come from the same reflecting point.
the only slightly observable difference is the trail artifacts discussed later, so pictures
are not shown here.
Langechuan Liu
More specifically, for a single channel, e.g. the nth channel, the data
collected at time t are the superposed wavefronts reflected back from
a certain collection of points . Thus the distance these signals have
travelled before being collected is mct, the phase rotation at the nth
channel is
n (r, ) = 2f0 tm = 2f0 mt
(9)
which is used in the phase correction term of databb(m,n).
There are two things worth pointing out. First, although one single
data point databb(m,n) has information from a collection of reflecting
points, they share the same phase rotation because they share the same
propagation time. Second, this phase rotation depends only on time,
i.e. on which row the data point is it does not depend on the channel
n nor the reflecting points (r, ).
scan level 20 dB
scan level 50 dB
0
2
5
10
10
4
10
20
20
15
30
z[mm]
z[mm]
30
10
40
20
25
40
12
30
50
50
14
35
60
16
60
40
18
70
45
70
30
20
10
0
x[mm]
10
20
30
20
30
20
10
0
x[mm]
10
20
30
50
the points on the trajectory of an ellipse with major axis ctn and foci located at (x0 , 0)
and (xn , 0). Discussed in greater detail in Question H
Langechuan Liu
scan level 40 dB
scan level 40 dB
0
5
10
10
10
20
10
20
15
30
15
20
z[mm]
z[mm]
30
40
20
40
25
25
50
50
30
30
60
60
35
35
70
70
30
20
10
0
x[mm]
10
20
30
40
30
20
10
0
x[mm]
10
20
30
40
Langechuan Liu
are two reflectors very close to each other, (r, ) and (r + r, ). If signals reflected by these two reflectors can be distinguished by detectors,
2r/c > t, so sampling interval should be
r ct/2 = c/(2fs ) 0.05mm
(10)
5
10
10
20
r [mm]
15
30
20
25
40
30
50
35
60
0.6
0.4
0.2
0
sin(theta)
0.2
0.4
0.6
40
Langechuan Liu
Pixel and real spatial distance should be distinguished. Every data point in a matrix
is only one pixel(although can be displayed in a larger single-valued area), or the value of
one point. It does not have information about real spatial positions itself. In order to know
the coordinates of the pixel, other matrices are needed, as are generated by meshgrid or
ndgrid.
First two parameters of subroutine interp2 cannot be changed in order. Both are
matrices of the same size generated by duplicating particular vector respectively(1-dim
matrices) a row vector in the case of the first matrix parameter and a column vector for
the second.
Langechuan Liu
scan level 20 dB
scan level 40 dB
0
2
10
10
4
20
10
20
6
15
30
8
z[mm]
z[mm]
30
10
40
20
40
12
25
50
50
14
30
60
60
16
35
18
70
30
70
20
10
0
x[mm]
10
20
30
20
30
(a) 20 dB
20
10
0
x[mm]
10
20
30
40
(b) 40 dB
This is not exactly caused by the same mechanism of either sidelobes or grating lobes.
Discussed later in Question H.
I wrote this part down just for the record of my thinking process. For logical continuity,
please skip to the next part, Final Explanation. Unless specified, all the numerical values
of length in this part is in mm
10
Langechuan Liu
(11)
obviously the object we scan is in the near field because the furthest
point is only about 70mm away from the origin. Thus we cannot qualitatively explain why there are two trails per reflector using the far-field
approximation PSF derived in lecture notes Page A17.
Lets take some wild guesses here. Take the point nearest to the origin
and on z-axis for example. One of the trail is nearly horizontal, the
other is more tilted towards right. Parameters known:
size of the array D = 65 0.1925 12.5
Suppose the two trails of one single reflector are two arc of two circles.
The center of the two circle should be around [0, 0] and [7, 0] (estimated
by naked eye). One intuitive guess would be that the two centers of
circles are [(xmax
+x0 )/2, 0]. Then why just the boarders of the array?
n
One intuitive guess would be
All the contributions in the middle are somehow cancelled
out by the contribution from their neighbors, thus leaving the
two ends uncancelled(more exactly only partially cancelled
by its only neighbor on one side).
To prove the guess, two trials are taken:
11
Langechuan Liu
40 dB rsin()
40 dB rsin()
0
10
10
10
10
20
20
30
20
15
r [mm]
r [mm]
15
30
20
25
25
40
40
30
30
50
50
35
35
60
60
0.6
0.4
0.2
0
sin()
0.2
0.4
40
0.6
0.6
0.4
0.2
0
sin()
0.2
0.4
40
0.6
scan level 40 dB
scan level 40 dB
0
10
10
10
10
20
20
15
15
20
40
z[mm]
30
z[mm]
30
20
40
25
50
25
50
30
60
30
60
35
70
30
35
70
20
10
0
x[mm]
10
20
30
40
30
20
10
0
x[mm]
10
20
30
40
Figure 8: Results of the several trials. (a) and (b) are in xsin coordinates,
(a) being the image reconstructed with only the central(33rd) channel, (b)
the image using the full array except the central channel. In (b), a third new
trail appears the same place where the four parallel lines are in (a). Image
converted to (c) and (d) respectively. In (a) and (c), reflectivity values are
normalized to make the maximum value unity in convenience of display.
12
Langechuan Liu
1. Images of r sin buffer and sector scan using only the data
from the elements on both ends of the array are plotted. They
are collections of parallel lines, either image with the uppermost
trail in the same position as the above-mentioned two trails. This
shows that the two trails are indeed from the contributions of the
two elements on either side of the array.
2. One image using all elements except the middle one at the origin(the 33rd one here) and the other using only the middle one
is plotted. The first image now has its characteristic three-trail
feature on the uppermost reflector, and the position of the third
trail is in the middle of the previous two, and agrees with the
position of that trail in the second image obtained only with the
middle element. This shows that the contribution of a certain
array element is indeed cancelled out by other elements, mostly
arguably neighboring ones because of limited span of radial PSF.
These two trials altogether prove in a empirical way that the guess is
right. The cancel-out between neighboring channels is due to destructive interference results from the difference in phase rotations.
Another question arises after the image is reconstructed with the data
from only one channel. Why the image of a single reflector is an arc
in the sector scan? It means that without constructive inter-channel
interference, one single channel cannot distinguish all the points in that
arc tail. Then how about magnitude on that trail? A contour image
generated by command contour shows clearly that all the points in that
trail have the same reflectivity value, showing that it is not diminishing
with angles(now the x-axis). The reason why it is unlike the PSF of
a single-element scanner with a diminishing side-lobe is that the wave
sent out is a isotropic spherical wave instead of being laterally limited
by an aperture function.
All the points on that trail must have a certain same property
that makes the single channel incapable of telling them apart. The
wave reflected by a single reflector and collected by one channel itself
contains gives information on the position of the reflector, but only
about distance, more exactly the sum of the distances back and forth,
dtot
n = d0 + dn , as shown in Equation 3. Therefore the points on the
13
Langechuan Liu
5
5
10
10
10
10
20
20
30
15
r [mm]
r [mm]
15
20
30
20
25
25
40
40
30
30
50
50
35
60
0.6
0.4
0.2
0
sin(theta)
0.2
0.4
35
60
40
0.6
0.6
0.4
0.2
0
sin(theta)
0.2
0.4
40
0.6
contour
contour
1
60
0.9
0.9
42
50
0.2 0.1
0.1 0.2
0.8
0.8
40
0.7
40
0.7
0.1
r [mm]
0.6
r [mm]
0.1
30
0.6
38
0.5
0.5
36
0.4
20
0.4
0.1
0.1
0.1
0.3
0.3
34
10
0.2
0.2
32
0.6
0.4
0.2
0
sin(theta)
0.2
0.4
0.6
0.1
0.15
0.1
0.05
0
0.05
sin(theta)
0.1
0.15
0.2
0.1
Figure 9: (a) and (b) are the plot reconstructed with only the element on
either end. In order to see that the reflectivity on the same trail is the same,
contours are plotted in (c). To get better view, (d) is the enlarged plot of
the boxed area in (c)
14
Langechuan Liu
trail should have the same sum of distance to the transmitter and
receiver channel. This brings everything to light the trail in the
sector scan is not an arc from a cricle, but part of an ellipse. In Figure
10, T is the transmitter [10, 0]mm, R is the receiver of the first channel
[D/2, 0] = [6.16, 0]mm
10
20
30
40
50
60
70
20
15
10
0
x
10
15
20
N
X
P SFn
(12)
n=1
d0 + dn i2f0 (d0 +dn )/c
d0 dn
e
an t
P SFn =
N
c
15
(13)
Langechuan Liu
For one single reflector, there are two arc-like trails. The trail is not
exactly arc from a circle, but part of an ellipse with one focus located
at the transmitter [x0 , 0] and the other located at the element at either
end of the phased array [xmax , 0]. If the wavepacket of the signal an (t)
is an ideal Dirac delta function, then
P SFnideal =
d0 dn
(14)
(xmax
+ x0 )sin
n
2
(15)
where tick is the average of the row number where first none-zero elements appear across
all channels. For example, from Figure 3(b), tick for the uppermost point is approximately
450, leading to a 21. Then Equation(11) is the equation for those two trails in polar
coordinate systems.
16
Langechuan Liu
at both ends of the array standing out of the group which only have
neighbor on one side, marking the PSF pattern with two trails.
Question I There are actually two slightly different ways to do this. The
first is cut the central piece located at z-axis out of the sector scan image,
plotted in Figure 5(a) below. Since = 0 A-scan is pretty special, it can
be directly obtained from sin = 0 column of rsdata even before bilinear
interpolation, as plotted in Figure 5(b). The peak is a slightly a little lower
after interpolation.
After interpolation plot(z,image(:,21))
Before interpolation plot(r,rsdata(:,33))
0.9
0.9
0.8
0.8
0.7
0.7
0.6
0.6
Reflectivity
Reflectivity
0.5
0.5
0.4
0.4
0.3
0.3
0.2
0.2
0.1
0.1
10
20
30
40
r [mm]
50
60
70
80
10
20
30
40
50
60
70
r [mm]
17
Langechuan Liu
the reflectivity goes up to and stays at 1 because of the data padding outside
the POV wedge.
Question J After we know the approximate configuration of the reflectors
in the POV field, a post hoc examination of the wavefield plot in Question A
can reveal more information(shame that we are not smart enough to realize
it sooner :-/ ).
x 10
3
scan level 20 dB
0
2
50
10
2.5
4
20
100
2
30
z[mm]
150
1.5
8
10
40
200
12
50
14
250
60
16
0.5
300
18
70
350
50
100
150
200
250
30
20
10
0
x[mm]
10
20
30
20
(16)
Langechuan Liu
which agrees with the reasoning above. The arc is bent upward in the middle
part because the reflected sound wave need a little more time to reach the element in the ends of the array than the middle element. Similar reasoning can
apply to the second stripe at around 350 + 150 = 500th row, corresponding
to the reflector at about [0, 23]mm.
The third stripe is tilted toward left, i.e. to the first element, indicating
that the 65th element receives the signal earlier than the 1st one. Therefore
it should be nearer to the 65th element, and the reflector around [13, 24]mm
satisfies this. From another perspective, the second and third stripe almost
join together for the 65th channel. If we use what we learnt in Question
H, the relevant two reflectors should sit on one ellipse with center at around
(13 + 0)/2 = 6.5mm on x axis. This largely agrees with (x0 + xm ax)/2(10 +
6.25)/2 8mm. The fourth one can be reasoned in the similar way, mapping
to the [14, 22]mm reflector in the sector scan.
Interestingly, in the sector scan we can see there is a reflector at around
[x, z] = [0, 58]mm, leading us to expect one arc-like stripe in the wavefield
plot at around
tick
2rfs
2 58 16
2r
=
=
1200th row
ct
c
1.54
(17)
Looking closely at the fourth column of the wavefield plot of either raw data
or baseband data, at around 1200 350 3 = 150th row, which is at the end
of the blurring block, there is indeed a barely recognizable arc-like stripe,
like the first and second ones discussed above. This seems a little far-fetched,
but since the stripe is still recognizable, this little discovery is attributed to
the virtue of post hoc analysis.
Then the first blurring block begins at around 2 350 + 50 = 750th row,
corresponding to a distance of around 36mm from the origin, agrees with the
upper boarder of the first trapezoid reflector group. The blurring is becoming
dimmer because further away from the origin, the triangle group has a larger
proportion of contribution, resulting in a weaker reflection of signals. The
end of the blurring ends almost the same position as the very vague stripe
corresponding to the lowermost discrete reflector at [0, 58]mm.
19
Langechuan Liu
2.1
Out of curiosity of how good this whole system of data-generation and reconstruction works for more complex shapes, I decided to use a traditional
Chinese character (yes, my family name Liu in Regular Script :P ) as the
scattering object.
original object
1
0.9
10
0.8
20
0.7
30
0.6
0.9
50
z[mm]
0.5
40
0.8
0.4
0.7
100
50
0.6
150
0.3
0.5
0.4
60
0.2
200
0.3
0.1
0.2
70
250
0.1
30
300
50
100
150
200
250
300
20
10
0
x[mm]
10
20
30
Langechuan Liu
placed at [180, 200], [420, 200], [300, 100] and [350, 300]. As for parameters
used for generation of wavefield raw data, fs = 4f0 = 16Hz is used here,
same as what is used in this project Part I. The signal is sent in Gaussian
wavepacket,
2
a(t) = e(tf0 2)
(18)
signal
0.5
0
0.5
1
1
0.5
0.5
6
t [10 sec]
1.5
Figure 14: Gaussian signal wavepacket (dashed line) and modulated signal
(solid line). Note that center is not located at t = 0.
2.2
In raw data generation, every t, the data across all channels are collected.
Every channel should have the superposition of wave pressure contribution
from each of the 3000 reflectors, the signal received by the nth channel at
time t is
vn (t) =
Nre
X
R
di0 + din
di0 + din
)cos(2f
(t
) + n )
a(t
0
i i
d
d
c
c
0
n
i=1
21
(19)
Langechuan Liu
where
di0 (ri , i )
din (ri , i ) ,
(20)
(21)
are the distance from transmitter to the ith reflector point, and the distance
from the ith reflector point back to the receiver of the nth channel. Nre is
the total number of reflector point, therefore 3000 in this project, n is set
to zero across all channels.
Then raw data is beam-formed and scan converted to the sector scan, as
plotted below:
scan level 30 dB
scan level 60 dB
0
10
10
5
10
20
20
10
20
30
15
40
50
z[mm]
z[mm]
30
20
60
30
40
50
40
60
25
70
30
50
70
20
10
0
x[mm]
10
20
30
30
(a) 30 dB scan
30
20
10
0
x[mm]
10
20
30
60
(b) 60 dB scan
(22)
in the whole calculation process, each FLOP being one evaluation of the expression inside the summation of Equation (16).
22
Langechuan Liu
(23)
2.3
further exploration
23
Langechuan Liu
scan level 30 dB
scan level 30 dB
0
10
10
5
20
20
10
10
30
15
40
50
z[mm]
z[mm]
30
15
40
50
20
60
20
60
25
25
70
30
70
20
10
0
x[mm]
10
20
30
30
30
20
10
0
x[mm]
10
20
30
scan level 30 dB
scan level 30 dB
0
10
10
5
20
20
10
10
30
15
40
50
z[mm]
z[mm]
30
20
60
15
40
50
20
60
25
70
30
30
25
70
20
10
0
x[mm]
10
20
30
30
30
20
10
0
x[mm]
10
20
30
30
(c) alternative phase correction with 2fs (d) with alternative phase correction with 4fs
Figure 16: reconstruction using different ways of phase correction under 30dB
24