## 4 SMART DShot: ML-Enhanced Architecture
### ML Algorithm Framework  
#### 4.2.1 Core Algorithm Suite  
SMART DShot employs four synergistic ML algorithms, each optimized for specific error characteristics and operational scenarios. To understand the internal structure and mathematical foundations of these algorithms, Figure 5 provides a detailed view of the architecture of the ML algorithm framework, focusing specifically on how each algorithm processes the timing data and contributes to the overall correction strategy. The Kalman Filter Timing Correction (KFTC) provides optimal state estimation for Gaussian-distributed timing errors with known statistical properties [26; 27]. It shows an excellent convergence rate of \(\mathcal{O}(\rho^{k})\) with spectral radius \(\rho=0.92\), and requires only 2 multiplications and 6 additions per iteration. This results in execution latency of 60-80 ns at 50 MHz, making it particularly effective for white Gaussian noise and linear system dynamics. The KFTC update equation is given by  
\[\hat{x}_{k+1}=A\hat{x}_{k}+K_{k}(z_{k}-H\hat{x}_{k}) \tag{1}\]  
The state update follows the standard Kalman filter formulation given in Equation (1), where \(\hat{x}_{k}\) is the estimated state of the system at the time step \(k\), \(A\) is the state transition matrix, \(K_{k}\) is the Kalman gain, \(z_{k}\) is the measurement observation and \(H\) is the observation matrix. The convergence analysis for KFTC requires careful consideration of the spectral radius condition. For our implementation, convergence is ensured through the following:  
* Spectral Radius Control: The system maintains stability by ensuring the spectral radius \(\rho(\mathcal{A}-\mathcal{K}_{k}\mathcal{H})\) remains within stable bounds, where \(\mathcal{A}\) is the state transition matrix, \(\mathcal{K}_{k}\) is the Kalman gain, and \(\mathcal{H}\) is the observation matrix. * Bounded Gain Design: \(\mathcal{K}_{k}\) is designed with appropriate bounds to prevent unstable gain values that could lead to divergence. * Empirical Validation: Our experimental results demonstrate convergence across all test scenarios, with KFTC achieving 24.51% success rate in the comprehensive evaluation spanning 8000 tests per algorithm. The excellent convergence rate of \(\mathcal{O}(\rho^{k})\) with spectral radius \(\rho=0.92\) ensures stable operation within the 60-80 ns execution latency at 50 MHz. The Recursive Least Squares Timing Correction (RLSTC) adapts to time-varying parameters through exponentially weighted error minimization [28; 29]. With a forgetting factor \(\lambda\in(0.95,0.99]\) governing the adaptation speed, RLSTC provides a tracking capability with an adaptation rate of \(\mathcal{O}(\lambda^{k/2})\). Each update requires 5 multiplications and 4 additions, resulting in 80-100 ns execution latency at 50 MHz, making it optimal for linear drift and parameter variations. The RLSTC update equation is as follows:  
\[\theta_{k}=\theta_{k-1}+K_{k}(y_{k}-\phi_{k}^{T}\theta_{k-1}) \tag{2}\]  
where \(\theta_{k}\) is the estimated parameter vector, \(K_{k}\) is the adaptive gain vector, \(y_{k}\) is the measured signal, \(\phi_{k}\) is the regressor or input vector, and \(\lambda\) is the forgetting factor that governs adaptation memory according to Equation (2). Fuzzy Logic Timing Correction (FLTC) handles non-linear error dynamics through a compositional rule-based inference engine [30; 31]. It employs 9 linguistic rules that span the error space. Each rule requires 2 multiplications and 2 additions, achieving execution latency of 40-60 ns at 50 MHz. FLTC is especially effective against non-linear distortions and burst error patterns. The inference computation is defined by  
\[u=\frac{\sum_{i=1}^{R}w_{i}\cdot c_{i}}{\sum_{i=1}^{R}w_{i}} \tag{3}\]  
The fuzzy output is computed as the weighted average of rule consequents, as formalized in Equation (3), where \(u\) is the final correction output, \(w_{i}\) is the activation strength of the \(i\)th rule, \(c_{i}\) is the consequent (output value) of the \(i\)th rule, and \(R\) is the total number of fuzzy rules.