Room Shape Reconstruction With a Single Mobile Acoustic Sensor Fangrong Peng, Tiexing Wang, Biao Chen Electrical Engineering and Computer Science Syracuse University GLOBALSIP 2015 GLOBALSIP 2015 Room Shape Reconstruction 1 / 20 Room Shape Reconstruction with Acoustic Sensors Related Works I “Can one hear the shape of a room: The 2-d polygonal case” [I. Dokmanic, Y. Lu, etc., ICASSP 2010] I “Acoustic echoes reveal room shape” [I. Dokmanic, R. Parhizkar, etc., PNAS 2013] I “L1 regularized room modeling with compact microphone array” [D. Ba, F. Ribeiro, etc., ICASSP 2010] I “3d room geometry estimation from measured impulse responses” [S. Tervo and T. Tossavainen, ICASSP 2012] I etc. GLOBALSIP 2015 Room Shape Reconstruction 2 / 20 Room Shape Reconstruction with Acoustic Sensors Previous Works I multiple acoustic stimuli / multiple microphones are used I I I complicated deployment topology of the device array required higher-order echoes are required I often significantly weaker and of poor resolution Question Can we use a single co-located loudspeaker/microphone and solely first-order echoes to reconstruct the room shape? GLOBALSIP 2015 Room Shape Reconstruction 3 / 20 Image Source Model (ISM) Convex Polygonal Room with N = 4 Walls y S3 W3 R3 I co-located source and receiver at O I first-order images S1 - S4 reflecting points Ri I second-order images S12 , S21 , etc. reflecting path O - R12 - R21 - O S2 W2 W4 O x R21 S4 S12 R12 W1 S1 S21 GLOBALSIP 2015 Room Shape Reconstruction 4 / 20 Mapping between ISM and Room Shape Room Impulse Response ideal room impulse response (RIR) h(t) = Ñ X an · δ(t − tn ) (1) n=0 I the number of received echoes Ñ, typically Ñ ≥ N I interesting parameter: time of arrival (TOA) tn I the distance between source and the n-th ‘wall’ rn = c · tn , 2 (2) where c is the speed of sound GLOBALSIP 2015 Room Shape Reconstruction 5 / 20 Mapping between ISM and Room Shape Retrieve TOA I probing signal s(t) used to excite echoes I received signal r (t) = s(t) ∗ h(t) I s(t) usually chosen to be broadband signals, e.g., chirp signals, s.t. s(t) ∗ s(t) ≈ δ(t), then s(t) ∗ r (t) ≈ h(t) I TOA tn ’s can be obtained by picking the peeks GLOBALSIP 2015 Room Shape Reconstruction 6 / 20 Mapping between ISM and Room Shape Co-located loudspeaker and microphone with one measurement y I ri as the distance between the source and the i-th wall I W1 W2 W3 and W1 W20 W3 have the same set of ri I one set of first-order TOA measurements is not sufficient W2′ W3 r2 r3 x O r1 W2 W1 Question How many sets of TOA measurements are sufficient to retrieve a triangle? GLOBALSIP 2015 Room Shape Reconstruction 7 / 20 Identifiability by First-order Echoes Lemma 1 For any given triangle T , suppose there are three interior points that are not on a straight line, and they are able to receive the first-order echoes from all walls. Let R be the distance matrix with Rij being the distance between the i-th point and the j-th wall. Then R uniquely defines the triangle with probability 1. Note 1. We assume that the measurement points are within a substantially small range, such that the echoes arrive in the same order for all points. 2. Denote rj as the j-th column of R. GLOBALSIP 2015 Room Shape Reconstruction 8 / 20 Retrieve a Triangle Co-located loudspeaker and microphone with three measurements I measurement taken at Oi : I walls: (xi , Ri1 ), i = 1, 2, 3 y W1 : y = 0 W2 : y = a2 · x + b2 W3 : y = a3 · x y = a2 x + b 2 y = a3 x R22 R12 I O2 W3 R13 O1 R11 O3 W2 x O W1 GLOBALSIP 2015 R32 constraints: |a2 xi − Ri1 + b2 | p = Ri2 , i = 1, 2, 3 a22 + 1 |a3 xi − Ri1 | p = Ri3 , i = 1, 2, 3 a32 + 1 Room Shape Reconstruction 9 / 20 Retrieve a Triangle Solution s a3 = ± 2BC 2 D − B2 − C 2 Ba3 p , B + kC a32 + 1 p kA a32 + 1 p b2 = , B + kC a32 + 1 p Ri1 + k a32 + 1 · Ri3 xi = a3 a2 = I − 1, (3) two candidates for a3 reconstructed distances between Oi to W2 using two candidates: (4) + Di2 = q (A + BRi3 − CRi1 ) a32 + 1 s 2 q (Ba3 )2 + B + C a32 + 1 = q (A + BRi3 − CRi1 ) a32 + 1 −s 2 q (Ba3 )2 + B − C a32 + 1 (5) − Di2 (6) k = sign(a3 ), A, B, C, D are parameters depending on R GLOBALSIP 2015 I I + − one of Di2 and Di2 matches Ri2 Room Shape Reconstruction 10 / 20 Triangle Recovery Algorithm 1 2 3 4 set k = 1 calculate a3 , a2 , b2 and xi ’s using Eqs. (3)-(6) calculate the reconstructed distances d2 = [D12 , D22 , D32 ]T if d2 6= r2 set k = −1 and reconstruct the triangle again GLOBALSIP 2015 Room Shape Reconstruction 11 / 20 Retrieve a Convex Polygon Extended Triangle Recovery Algorithm Sequentially apply triangle recovery algorithm on R: 1. apply the triangle recovery algorithm on {r1 , r2 , r3 } 2. apply the triangle recovery algorithm on {r1 , rj , r3 }, j = 4 · · · N using the a3 and xi ’s from last step Problem I parallel edges exist in {r1 , r2 , r3 }? two parallel and one perpendicular edges are recovered I all convex polygons can be recovered? think about rectangles: every three edges have a pair of parallel ones GLOBALSIP 2015 Room Shape Reconstruction 12 / 20 Ambiguity between Rectangles and Parallelograms Rectangle and Parallelogram In a parallelogram (including rectangle), y I for any source Oi , H L L O x Ri1 + Ri3 = H Ri2 + Ri4 = L I exist other parallelograms also satisfying the condition I extended triangle recovery algorithm recovers all parallelograms as their corresponding rectangles Lemma 2 For any given rectangle R, there is an infinite number of parallelograms having the same distance matrix R with R, regardless of the number of measurement points. GLOBALSIP 2015 Room Shape Reconstruction 13 / 20 Retrieve a Convex Polygon R contains only first-order echoes I define V(R) = {rj , j = 1 · · · N} I define V 0 (R) as the largest subset of V(R) s.t. no parallel edges recovered from V 0 (R) Algorithm 1. find V 0 (R) 2. apply the extended triangle recovery algorithm on V 0 (R) 3. add the parallel edges from V(R) − V 0 (R) Question How does it work if higher-order information is present in R? GLOBALSIP 2015 Room Shape Reconstruction 14 / 20 Retrieve a Convex Polygon R̃ contains first-order and some higher-order echoes Two cases of the starting set {r̃1 , r̃2 , r̃3 } of V 0 (R̃): 1. contains higher-order information, then two cases 1.1 no valid triangle is formed, i.e., the recovered a3 is not a real number 1.2 a valid yet wrong triangle is formed, then no edges recovered later from V 0 (R̃) can pass the distance match check rearrange V 0 (R̃) until {r̃1 , r̃2 , r̃3 } only contains first-order TOAs 2. contains only first-order information, then 2.1 edges recovered later from the rj ’s corresponding to higherorder information can pass the distance match check Question Can all convex polygons be reconstructed if first-order mixed with high-order echoes are used? GLOBALSIP 2015 Room Shape Reconstruction 15 / 20 Recoverability of Polygons Lemma 3 Suppose a polygon has N edges, including M pairs of parallel ones. The polygon can be correctly and uniquely recovered either when N − M ≥ 4, or M ≥ 3. GLOBALSIP 2015 Room Shape Reconstruction 16 / 20 Polygon Recovery Algorithm 1 find V 0 (R̃) 2 if M == 0 or M ≥ 3 3 apply the extended triangle recovery algorithm on V 0 (R̃) 4 if dk 6= r̃ for all k = 4 · · · Ñ 5 rearrange V 0 (R̃) and go to step 3 6 else the algorithm is done 7 if M == 1 or M == 2 8 apply step 3-6 on V 0 (R̃) 9 if step 6 is done 10 add the edges corresponding to V(R̃) − V 0 (R̃), done 11 else if step 3 is executed exceeding a maximum no. of times 12 if M == 1 13 more information is required to recover the shape, done 14 else if M == 2 15 recover a rectangle, done GLOBALSIP 2015 Room Shape Reconstruction 17 / 20 Polygon Reconstruction 10 10 5 5 0 0 -5 -5 0 5 10 -5 -5 0 (a) 10 5 5 0 0 0 5 (c) 10 5 10 (b) 10 -5 -5 5 10 -5 -5 0 (d) Figure: original (blue) and recovered (dash purple/black) polygons: (a) an irregular quadrilateral, (b) a rotation, (c) a reflection, (d) a hexagon GLOBALSIP 2015 Room Shape Reconstruction 18 / 20 Conclusion I a co-located loudspeaker and microphone is used to reconstruct a room shape I only first-order RIR are required I three sets of measurements taken at three non-collinear points inside the room are sufficient to recover a wide class of polygonal shapes I additional information is needed to distinguish the ambiguity between rectangle and parallelogram GLOBALSIP 2015 Room Shape Reconstruction 19 / 20 Thank you! GLOBALSIP 2015 Room Shape Reconstruction 20 / 20