## 2 System Design and Analysis
### Gradient Descent for Parameter Identification  
Gradient descent is an iterative optimization algorithm that minimizes (or maximizes) a function, typically a cost or loss function. The fundamental concept underlying the gradient descent algorithm is to iteratively modify the model parameters or function variables in a manner that aligns with the steepest descent of the objective function's gradient (or slope) concerning these variables. The gradient signifies the direction in which the function exhibits the most rapid ascent. Hence, by proceeding in the opposite direction, the objective is to effectively approach the function's minimum value, thereby facilitating the optimization process.  
\[\theta=\left[X_{m1},R_{L},X_{L1},X_{c1}\right] \tag{9}\]  
\[\left\{\begin{array}{c}X_{m1}=\omega_{p1}M_{ps}\\ X_{L1}=\omega_{p1}L_{s}\\ X_{c1}=1/\left(\omega_{p1}C_{s}\right)\end{array}\right. \tag{10}\]  
\[\omega_{pi}^{2}L_{p}C_{pi}=1\left(i=1,2,3\right) \tag{11}\]  
Firstly, a parameter vector \(\theta\) is defined in (9), where \(X_{m1}\), \(X_{L1}\), and \(X_{C1}\) are the reactance of \(M_{ps}\), \(L_{s}\), and Cs, respectively, when the operating angular frequency of the system is \(\omega_{p1}\), which is derived by (10) and (11). Different values of \(\omega_{p}\) are achieved by alternating the capacitance value, which will be discussed in the next section. The three primary resonant frequencies were chosen because this is the minimum amount of data required to identify mutual inductance, secondary resonant frequencies, and load resistance simultaneously. It is important to note that using the reactance value of these passive elements instead of their inductance or capacitance can improve the convergence of computation. This is particularly crucial if the algorithm is to be deployed in DSPs or other embedded devices.  
\[\mathbf{J}(\theta)=\sum_{i=1}^{3}\left[\left(\mathrm{Re}[Z_{\theta}]-\frac{U_{ p}}{I_{pi}}\cdot cos\varphi_{i}\right)^{2}+\left(\mathrm{Im}[Z_{\theta}]- \frac{U_{p}}{I_{pi}}\cdot sin\varphi_{i}\right)^{2}\right] \tag{12}\]  
(The next step is to formulate the loss function, which is given in (12). The loss function describes the magnitude of the distance norm, which is the difference between the measured input impedance \(Z_{in}\) and the calculated input impedance \(Z_{\theta}\) in the solution space. Since the secondary side is not necessarily in a resonant state, the reflected impedance will have an imaginary part on the primary side. \(I_{pi}\) is the RMS values of \(\dot{I}_{p}\) and \(\varphi_{i}\) is the phase difference between \(\dot{U}_{p}\) and \(\dot{I}_{p}\) when the operating angular frequency of the system is at \(\omega_{pi}\):  
\[\left\{\begin{array}{c}\theta_{L}<\theta<\theta_{H}\\ \theta_{L}=\left[\omega_{p1}M_{psmin},R_{Lmin},\omega_{p1}L_{smin},1/\left( \omega_{p1}C_{smax}\right)\right.\\ \left.\omega_{p1}M_{psmax},R_{Lmax},\omega_{p1}L_{smax},1/\left(\omega_{p1}C_{ smin}\right)\right.\end{array}\right. \tag{13}\]  
\[\theta_{k}=\theta_{k-1}-\alpha\cdot\frac{\Delta\mathbf{J}(\theta_{k-1}+ \mathbf{h})-\Delta\mathbf{J}(\theta_{k-1}-\mathbf{h})}{2\mathbf{h}} \tag{14}\]  
Accordingly, the solution space that is the value space of \(\theta\) can be given. And the size of the space determines the range of parameter identification of the system, which is described by (13). After initializing \(\theta\), the learning rate \(\alpha\), the iteration step \(h\), and the precision parameter \(\varepsilon\), the gradient descent algorithm will output the identified values of \(M_{ps}\), \(R_{L}\), and parameters of the secondary resonator by updating the space vector with (14), in which k represents the kth iteration until the termination condition is satisfied. Termination occurs when the iteration process exceeds its set maximum value or the computation converges. The complete gradient descent algorithm for parameter identification is shown in Figure 2.