## 2 Methodology
### Inverse Magnetic Localization Based on Adaptive LM Algorithm  
#### 2.2.1 Inverse Model  
In the proposed TCI system, a \(T\)-type PM is taken as a tongue motion marker and establishes a magnetic field around it, whose intensity and direction are related to the magnet. As illustrated in Figure 2, this \(T\)-type PM is combined by two similar needle-like cylindrical magnets, PM\({}_{v}\) and PM\({}_{h}\) (shape defined by \(\Phi\times 2l\)), whose axes are orthogonal to each other. The location and orientation of the magnet placed on the vertical and horizontal line of the letter \(T\) are defined by (\(\mathbf{r}_{pv}\), \(\mathbf{m}_{v}\)) and (\(\mathbf{r}_{ph}\), \(\mathbf{m}_{h}\)) respectively; and \(\mathbf{r}_{pv}\) and \(\mathbf{m}_{v}\) represent the tracked target point on the tongue surface. The introduction of the combined \(T\)-type PM promotes the anisotropy of the magnetic field distribution, which is important in magnetic field detection with a long distance. It is reasonable to assume that a needle-like magnet can be modeled as a magnetic dipole at \(\mathbf{r}_{p}\), and its size is negligible compared with the distance to the known measured point at \(\mathbf{r}_{s}\) where the field of the dipole is observed. The instantaneous magnetic field \(\mathbf{B}\) due to a magnetic dipole at the measured position can be modeled by a five-dimensional (5D) nonlinear function, as presented below:  
\[\mathbf{B}\big{(}\mathbf{r}_{p},\mathbf{m}\big{)}=\frac{\mu_{0}m}{4\pi\big{|} \mathbf{r}_{s}-\mathbf{r}_{p}\big{|}^{3}}\Bigg{[}\frac{3\mathbf{m}\bullet \big{(}\mathbf{r}_{s}-\mathbf{r}_{p}\big{)}}{\big{|}\mathbf{r}_{s}-\mathbf{r} _{p}\big{|}^{2}}\big{(}\mathbf{r}_{s}-\mathbf{r}_{p}\big{)}-\mathbf{m}\Bigg{]}, \tag{1}\]  
where \(\mu_{0}\) (= \(4\pi\times 10^{-7}\) N/A\({}^{2}\)) is the permeability of air; \(\mathbf{m}\) and \(m\) (A\(\cdot\)m\({}^{2}\)) are the unit vector and magnitude of the magnetic moment, respectively, and \(m\) can be determined by calibration. Figure 1: The tongue–computer interface (TCI) system. (**a**) The system architecture of the TCI using \(T\)-type permanent magnet (PM) marker; (**b**) Block diagram illustrating the signal procedure. Figure 2: Scheme illustrates the localization x–y–z coordinate system with \(T\)-type PM modeled as magnetic dipoles; \(x_{s}\)–\(y_{s}\)–\(z_{s}\) coordinate is parallel with the global Cartesian coordinate x–y–z, with an \(\mathbf{r}_{p}\) translation to present the orientation vector \(\mathbf{m}\) (\(\theta\), \(\varphi\)) of the tracked point; the \(x_{m}\)–\(y_{m}\)–\(z_{m}\) coordinate in the zoom circle is local system of the vertical magnet PM\({}_{v}\) to illustrate the deviation \(\mathbf{m}_{v}\) (\(\theta_{mv}\), \(\varphi_{mv}\)) of the dipole moment from its geometric axis. Equation (1) implies that the magnetic fields **B** observed at \(\textbf{r}_{s}\) attenuate rapidly with the distance (\(\textbf{r}_{s}-\textbf{r}_{p}\)) between the observation point \(\textbf{r}_{s}\) and the magnetic dipole \(\textbf{r}_{p}\). Besides, the directionality of the magnetic moment **m** obviously affects the measurements with fixed sensor array. Both of them will make this inverse magnetic localization problem more difficult to be solved. Here, a combined \(T\)-type PM is adopted in this paper, in order to weaken the influence brought by the magnetic moment directionality.