## 6 Validation of the AVL Model Relying on Sprague and Geers Validation Metric  
To verify that the AVL model accurately reproduces the behavior of the detailed model, a validation process using metrics has been followed. The selected metric is the Sprague and Geers metric, which is widely used for dynamic phenomena such as the one being modeled in this work. This metric has been thoroughly evaluated by [PERSON] [40] against Subject Matter Expert opinion, showing an excellent correlation. The only limitation mentioned is its asymmetry, with slightly different values depending on which data is chosen as the reference (b(t)) and which is the function to compare (c(t)). In Figure 10, some powertrain variables of the selected FCEV following a WHTC cycle, using both AVL and MATLAB simulation models, are presented as an example to show the similarities between the results obtained with them, along with the weight of the fully loaded vehicle. From top to bottom, the time diagrams of the following variables are compared in the figure: Electric Motor Speed, Electric Motor Torque, Fuel Cell Voltage, Fuel Cell Current, HV Battery Voltage, and HV Battery Current. In this comparison, the fuel cell is used in both models based on the SA-PFCS described in Section 3. Figure 10: _Cont._  
To assess the degree of approximation of the results obtained from the AVL simulation model and the MATLAB validation tests, the Sprague and Geers validation metric [40] has been used. This metric proposes a quantitative method for assessing the similarity of two signals, c(t) and b(t), by obtaining two coefficients, M and P, which quantify, respectively, the discrepancies between the signals in magnitude M (17) and in phase (18). Based on the results of the abovementioned errors, the metric proposes a combined error, C, calculated as the root mean square of M and P. The closer the results of the parameters P, M, and C are to 0, the higher the similarity between the compared historical data. \[M=\sqrt{\vartheta_{cc}/\vartheta_{bb}}-1 \tag{17}\]  
\[P=\frac{1}{\pi}cos^{-1}\Big{(}\vartheta_{bc}/\sqrt{\vartheta_{bb}\vartheta_{ cc}}\Big{)} \tag{18}\]  
\[C=\sqrt{M^{2}+P^{2}} \tag{19}\]  
where:  
\[\vartheta_{bb}=(t_{2}-t_{1})^{-1}\int_{t_{1}}^{t_{2}}b^{2}(t)dt \tag{20}\]  
\[\vartheta_{cc}=(t_{2}-t_{1})^{-1}\int_{t_{1}}^{t_{2}}c^{2}(t)dt \tag{21}\]  
\[\vartheta_{cc}=(t_{2}-t_{1})^{-1}\int_{t_{1}}^{t_{2}}b(t)c(t)dt \tag{22}\]  
For the comparison of the signals, the metric analysis has been performed by estimating all values from t\({}_{1}\) = 0 to t\({}_{2}\) = t, where t is any value less than or equal to the final  
Figure 10: FCEV motor speed and torque **(top)**, FC voltage and current **(middle)**, battery voltage and current **(bottom)**, obtained during a WHTC cycle with both AVL and MATLAB models. time of the simulations. This systematic approach allowed us to obtain an evolution of the metric throughout the simulation, rather than a single final value considering the whole time interval. The application of the metric has been conducted using a MATLAB routine that generates graphs to assess the quality of the fitness between the two models. The code automatically generates graphs, such as those presented in Figure 11, which are an example of the application relying on the fuel cell power profile throughout the cycle and are outlined as follows:  
1. Comparison of model signals over the entire simulated time range. 2. Metric results displayed on a normalized scale (0 to 1) with error types (M in blue, P in red, C in green). 3. Metric results for the time interval 0-200 s, with the error axis scaled to 10%. 4. Metric results for the last 200 s, with the error axis scaled to 10%. The parameters used to contrast the results between the two models, as well as the aggregate value of the metric over the entire simulated period (1800 s), are presented in Table 4.  
The differences between the models are under 15% for all parameters.