## 3 Justification and Formulation of Extremum-Seeking Control for Series Resonant Converters
The general formulation of ESC relies on the assumptions that the system output is smooth, has a unique extremum, and that the dynamics of the system are slow relative to the perturbation frequency, allowing separation of fast and slow dynamics, and ensuring convergence. While ESC has been extensively applied in areas such as chemical process optimization, motor control, and photovoltaic (PV) maximum power point tracking (MPPT), to the best of the authors' knowledge, there has been little or no application of ESC specifically designed for the control of resonant converters. This is a noteworthy gap because resonant converters present complex and highly nonlinear input-output relationships that conventional control techniques struggle to manage without detailed modeling. Furthermore, the operating point of resonant converters is primarily determined by the switching frequency, which makes them inherently suitable for ESC application, where the switching frequency can serve as the control input. To formulate the ESC specifically for resonant converters in PV charging applications, the switching frequency \(f_{sw}(t)\) is chosen as the perturbable control variable. The system output is the PV power \(P(t)\), which depends on \(f_{sw}(t)\) through the resonant converter's transfer function and the PV array's voltage-current characteristics. The control law is constructed by superimposing a small sinusoidal dither onto the switching frequency,measuring the PV power output, demodulating the power signal with the same sinusoidal reference, and integrating the resulting gradient estimate to update the nominal switching frequency. First, the switching frequency is perturbed by adding a small sinusoidal dither around the nominal value to probe the system's response. \[f_{sw}(t)=\hat{f}_{sw}(t)+a\times\sin\left(\omega_{p}t\right) \tag{9}\]  
The PV power is then locally approximated near the maximum power point as a quadratic function of the switching frequency, assuming a unique extremum. \[P(f_{sw})=P_{MPP}^{*}+\frac{P^{\prime\prime}}{2}(f_{sw}-f_{MPP}^{*})^{2} \tag{10}\]  
The estimate of the error of the switching frequency can be denoted as  
\[f_{sw}(t)=\hat{f}_{sw}(t)+a\times sin\big{(}\omega_{p}t\big{)}=f_{MPP}^{*}- \overset{\sim}{f}+a\times sin\big{(}\omega_{p}t\big{)} \tag{11}\]  
Substituting it into the power expression yields  
\[P(f_{sw})=P_{MPP}^{*}+\frac{P^{\prime\prime}}{2}(\overset{\sim}{f}-a\times sin \big{(}\omega_{p}t\big{)})^{2} \tag{12}\]  
This can be expanded to  
\[P(f_{sw})=P_{MPP}^{*}+\frac{P^{\prime\prime}}{2}(\overset{\sim}{f}-2a\overset{ \sim}{f}sin\big{(}\omega_{p}t\big{)}+sin^{2}\big{(}\omega_{p}t\big{)} \tag{13}\]  
And this can be re-written as  
\[P(f_{sw})=\left(P_{MPP}^{*}+\frac{P^{\prime\prime}\,a^{2}}{4}+\frac{P^{\prime \prime}}{2}\overset{\sim}{f}\right)-P^{\prime\prime}a\overset{\sim}{f}sin \big{(}\omega_{p}t\big{)}-\frac{P^{\prime\prime}\,a^{2}}{4}cos(2\omega_{p}t) \tag{14}\]  
This shows that the power to frequency response has three main components: the DC component, the fundamental component, and the double-frequency component. A high-pass filter then removes the DC component and slow variations in the power signal and isolates the response that resulted from the perturbation. After removing the DC component, the remaining part is demodulated by multiplying it by \(\sin\left(\omega_{p}t\right)\). \[P_{Filtered}(t)=-P^{\prime\prime}a\overset{\sim}{f}sin\big{(}\omega_{p}t \big{)}-\frac{P^{\prime\prime}\,a^{2}}{4}cos(2\omega_{p}t) \tag{15}\]  
\[\xi(t)=P_{Filtered}(t)\times\sin(\omega_{p}t) \tag{16}\]  
And after derivation and arrangement of terms, the error becomes  
\[u(t)=\hat{u}(t)+a\times\sin(\omega t) \tag{8}\]0  
It can be seen that the non-oscillatory term in the error is the first term, and it correlates directly to the gradient estimation. It can then be easily extracted by a low-pass filter, providing an estimate of the gradient.