## 2 System Design and Analysis
### Verification via Simulation
Also, the solution given by the current algorithm is at the edge of the loss surface, which means that it is not the solution that we predicted. To solve this issue, we modified the loss function by using Equation (15), where \(k\) represents the weight assigned to the deviation of the real and imaginary parts. By counting the errors between the real part and the imaginary part during the convergence process, we found that the real part error is more significant. Increasing the k value can make the optimization process pay more attention to this part of the error and improve the identification accuracy. Thus, in future experiments, the imaginary part will only have 1/10 th of the weight in the loss function. \[\mathbf{J}(\theta)=\sum_{i=1}^{3}\left[k\cdot\left(\mathrm{Re}[Z_{\theta}]- \frac{U_{p}}{I_{pi}}\cdot cos\varphi_{i}\right)^{2}+(1-k)\cdot\left(\mathrm{ Im}[Z_{\theta}]-\frac{U_{p}}{I_{pi}}\cdot sin\varphi_{i}\right)^{2}\right] \tag{15}\] \begin{table}
\begin{tabular}{c c c} \hline \hline
**Item** & **Symbol** & **Value** \\ \hline Input voltage RMS & \(U_{p}\) & 7.07 V \\ Primary-side capacitor 1 & \(C_{1}\) & 44 nF \\ Primary-side capacitor 2 & \(C_{2}\) & 22 nF \\ Secondary-side capacitor & \(C_{s}\) & 26.7, 33.2, 37.8 nF \\ ESR of transmitter & \(R_{p}\) & 0.4 \(\Omega\) \\ Self-inductance of transmitter & \(L_{p}\) & 103 uH \\ ESR of receiver & \(R_{s}\) & 0.4 \(\Omega\) \\ Self-inductance of receiver & \(L_{s}\) & 101 uH \\ Mutual inductance & \(M_{\mathrm{ps}}\) & 26.7 uH \\ Load resistance & \(R_{L}\) & 5, 10, 20, and 30 \(\Omega\) \\ Primary-side resonant frequency 1,2,3 & \(f_{p1,2,3}\) & 105.73, 74.76, and 129.49 kHz \\ Secondary-side resonant frequency & \(f_{s}\) & 81.45, 86.9, and 96.9 kHz \\ Lower bound of space vector & \(\theta_{L}\) & [5, 2, 50, and 33.3] Ohm \\ Upper bound of space vector & \(\theta_{H}\) & [30, 50, 80, and 66.6] Ohm \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Parameters of the proposed WPT system. In Figure 4, the blue curves in all sub-graphs present the results of the simulation after implementing the new loss function from (15). The accuracy has greatly improved, with the maximum identified errors for mutual inductance, load resistance, and secondary resonant frequency being 1.25 \(\upmu\)H, 3.8 \(\Omega\), and 1.41 kHz, respectively. The optimized loss function, as shown in Figure 4(b), has a more defined loss surface, which aids in distinguishing the desired solution from the surrounding points during gradient descent. As a result, the solution obtained will lie within the contour of the surface, rather than on the edge of the surface as before. To further illustrate the difference between the two loss functions, a box-plot is presented in Figure 6 that shows the deviation between the identified value and the set value. Utilizing the original loss Function (12) results in a smaller estimated mean and more dispersed data. On the other hand, the new loss Function (15) allows for smaller errors and more concentrated data in the identified parameters. The process of convergence is shown in Figure 7, which gives the process of updating the parameters of space vector as well as minimizing the loss function. Although these plots are derived by calculation on PC, the ultimate results on different platforms are the same. It can be seen that after about 2000 and 800 iterations, the space vector with four variables gradually becomes constant in calculations shown in Figure 6(a),b, which are simulated with the same load resistance of 20 \(\Omega\) while their secondary-side resonant frequencies are not the same. On the contrary, the calculations shown in Figure 6(b),c share the same \(f_{s}\) with different load conditions. Convergence in Figure 6(c) takes almost the same number of iteration steps as in Figure 6(a). The algorithm is then deployed on TMS32028335 to test its real-time performance.