# An Accurate Direction Finding Scheme Using Virtual Antenna Array via Smartphones
## 4 Design  
### Uniform Circular Array Simulation  
Now, we solve the problems above by leveraging the VUCAs. We use the similar method of imitating the VULA system. The user holds his/her smartphone still and rotates around his/her body for \(360^{\circ}\) at an approximate velocity. During the sampling period, we capture a single measurement in a particular sampling interval \(T\) as if we have a receive antenna array at each of these sampling points. These points are uniformly distributed on the moving circular trajectory.  
According to the VUCA geometry in Figure 3, we regard the first sample point during rotation as antenna element 0. Assuming the user rotates at the constant angular velocity \(\omega\), the antenna elements are uniformly distributed over the circumference of a circle of radius \(r\). In our case, the radius stands for the distance between users' hand and body (our default is \(r=0.3\) m for human beings of an average height). The \(x\)-axis lies on the line which connects the antenna element 0 with the circle center \(O\). \(\theta\in[0,\frac{\pi}{2}]\) is the source elevation angle that is measured down from the \(z\)-axis. The azimuth angle \(\phi\in[0,2\pi]\) is measured from the \(x\)-axis. Since we choose the first sample point as the element 0 and the user starts rotating right in front of his/her body in most cases, the ground truth of our system is easy to detect.  
We treat a single measurement as antenna element \(n\), and there are \(N\) elements in total during sampling. If the \(N\) is large enough, the trajectory of the smartphone during the whole sampling period can be seen as a closed circle. Hence, the array element can be displaced by angle \(\gamma_{n}\) from the \(x\)-axis:  
\[\gamma_{n}=n\omega T\approx\frac{2\pi n}{N};\qquad n=0,1,\cdots,(N-1). \tag{1}\]  
Figure 3: Virtual uniform circular arrays geometry analysis.  
Figure 2: (**a**) Uniform linear array simulation; (**b**) virtual uniform linear arrays geometry analysis.  
However, assuming the user rotates \(360^{\circ}\) at a constant angular velocity \(\omega\), we can represent \(\gamma_{n}\) using only \(N\) and \(n\) approximatively and refrain from the fact that we do not know the exact velocity of the smartphone. Then, the position vector of element \(n\) is:  
\[\vec{p_{n}}=(r\cos\gamma_{n},r\sin\gamma_{n},0). \tag{2}\]  
The unit vector of the incoming acoustic signal, which is defined by elevation angle \(\theta\) and azimuth angle \(\phi\), has this form:  
\[\hat{\gamma}=(\sin\theta\cos\phi,\sin\theta\sin\phi,\cos\theta). \tag{3}\]  
For the purpose of calculating the phase differences between the signals received at the origin and at element \(n\), we need to represent the time required for the signals to travel from these two points \(\tau_{n}\):  
\[\tau_{n}=\frac{\hat{\gamma}\vec{p_{n}}}{c}=\frac{r}{c}\sin\theta\cos(\phi- \gamma). \tag{4}\]  
The calculation of direction vector is similar with the Uniform Linear Arrays processing above. Let vector \(\vec{\theta}=(\beta,\phi)\) represent signal arrival direction. It can be expressed in the following equation:  
\[A(\vec{\theta})=\begin{bmatrix}e^{j\beta\cos(\phi-\gamma_{0})}\\ e^{j\beta\cos(\phi-\gamma_{1})}\\ \ldots\\ e^{j\beta\cos(\phi-\gamma_{N-1})}\end{bmatrix}, \tag{5}\]  
where \(\beta\) is a parameter to define the value of elevation angle \(\theta\), and \(c\) is the velocity of acoustic signals:  
\[\beta=\frac{2\pi f_{a}}{c}r\sin\theta. \tag{6}\]  
Here, \(f_{a}\) is the center frequency of the target acoustic signal.