## 4 Numerical Examples: MATLAB Implementation  
In this section, we illustrate the source identification algorithm by considering the forward and inverse problems for different sources. We developed MATLAB programs to validate the algorithm for its computational implementation. The following section will describe the FPGA implementation of the source identification algorithm, and we will compare the hardware implementation with the MATLAB implementation using the same examples. The region \(\Omega\) is described in Section 3.1, and it is shown in Figure 1.  
To illustrate the algorithm, we built synthetic examples as follows:  
1. We took some values for parameters \(\sigma_{1}\), \(\sigma_{2}\), \(R_{1}\), and \(R_{2}\) and defined a source \(g\) on \(S_{1}\). 2. We solved the boundary value problem (1)-(5). 3. We computed the exact measurement \(V=u|_{S_{2}}\) using Equation (8) for \(N=16\), which was chosen by numerical tests. 4. To emulate the measurement with error, we added an appropriate random error to the coefficients \(V_{k}^{1}\) and \(V_{k}^{2}\) (where \(k=1,2\dots\)) using the _rand_ function of MATLAB. Hence, we obtained the coefficients \(V_{k,\delta}^{1}\) and \(V_{k,\delta}^{2}\), \(k=1,2\dots\) of the measurement with error \(V_{\delta}\), which satisfies \(\|V_{\delta}-V\|_{L_{2}(S_{2})}\leq\delta\). 5. We obtained the regularized solution to the inverse problem by taking \(N=16\) in Equation (15), i.e., we used \[g_{\alpha(\delta),N}(\theta)=\sum_{k=1}^{16}A_{k}(\alpha)\Big{[}V_{k,\delta}^{1 }\cos k\theta+V_{k,\delta}^{2}\sin k\theta\Big{]},\] (17) as an approximate (regularized) solution, where \(A_{k}(\alpha)\) is given in (16). In the examples below, we considered \(\delta=0.1\) and \(\alpha=10^{-3}\) (which were chosen numerically). In the plots presented in the following examples, the magnitudes are either dimensionless or have a dimension of one. In other words, they are quantities that do not have an associated physical dimension. Consequently, they are pure numbers that can describe a physical characteristic without a dimension or an explicit unit of expression. In this example, we set \(R_{1}=1\), \(R_{2}=1.2\), \(\sigma_{1}=3\), and \(\sigma_{2}=1\) and considered the exact source \(g\) given by  
\[g(x,y)=f(x,y)-\frac{1}{m(S_{1})}\int_{S_{1}}f(x,y)ds, \tag{18}\]  
for all \((x,y)\in S_{1}\), where \(f(x,y)=e^{-\frac{\|(x,y)-(\mu_{2},\mu)\|^{2}}{2\beta^{2}}}\) for \((x,y)\in S_{1}\), \((a_{1},a_{2})=(0,1)\in S_{1}\), \(\beta^{2}=0.1\), and \(m(S_{1})=2\pi R_{1}\). In polar coordinates \((r,\theta)\), \(g\) is given by  
\[g(\theta)=f(R_{1},\theta)-\frac{1}{2\pi}\int_{0}^{2\pi}f(R_{1},\theta)d\theta,\text{ for all }\theta\in[0,2\pi], \tag{19}\]  
where \(f(R_{1},\theta)=e^{\frac{R_{1}^{2}\cos(\theta-\theta_{0})}{\beta^{2}}}\) for all \(\theta\in[0,2\pi]\), \(\theta_{0}=\frac{\pi}{2}\), and \(\beta^{2}=0.1\). We approximated the exact source \(g\) by its truncated Fourier series \(g_{N}\) using the first \(N=16\) terms. The Fourier coefficients \(g_{k^{\prime}}^{1}\), \(g_{k^{\prime}}^{2}\), \(k=1,2,\dots,N\) were obtained numerically using the _quadl_ function of MATLAB. In this case, the exact measurement \(V\) was generated using Equation (17). The relative error between the exact source \(g\) and the recovered source \(g_{\alpha(\delta),N}\), denoted by \(RE_{S_{1}}(g_{\alpha(\delta),N},g)\), is given by  
\[RE_{S_{1}}(g_{\alpha(\delta),N},g) =\|g_{\alpha(\delta),N}-g\|_{L_{2}(S_{1})}/\|g\|_{L_{2}(S_{1})}\] \[=0.12.\]  
Figure 2 displays both the exact measurement \(V\) and the measurement with error \(V_{\delta}\), where \(\delta=0.1\). Figure 3 displays the plot of both the exact source and the recovered source without regularization. We observe the necessity of applying regularization methods. Figure 4 displays the plot of both the exact and the recovered source with regularization. **Example 2**. : We considered the same values for \(R_{1}\), \(R_{2}\), \(\sigma_{1}\), and \(\sigma_{2}\) as in the previous example.