## 5 Results
### Simulation 2: Input Signal with 5 Spectral Components That Increases to 11 Components at = 0.8 s  
The following simulation can be divided into two parts: the initial phase, during which a signal with five spectral components (values in Table 5) is introduced into the system, and various figures obtained from the simulation are shown to demonstrate the efficacy of the method in detecting these components. The second phase starts at 800 ms of the simulation when the input signal varies and is formed by 11 components. Among these components are two interharmonics that share the same interharmonic subgroup (in the frequency range between 205 and 245 Hz). These components are introduced to assess the validity of the method in identifying spectral components. Figure 23: The evolution of the estimation of the subharmonic spectral component at 22 Hz (red) versus the real component (blue). Figure 24: Temporal evolution of the estimation of the frequency value (rad/s) of all spectral components within the input signal. The value of the spectral components contained in the input signal is shown in Table 5. Its waveform is presented in Figure 25.  
The method begins at t = 0.1 s when the DFT is initiated. Upon completion of the DFT at t = 0.3 s, the harmonic filtering process presented in Figure 6a,b and the selection of spectral components described in Section 4.3 is applied. The obtained result is shown in Table 6.  
With the results obtained from Table 6, the matrices and equations of the LKF (Equations (5)-(17)) are implemented, initiating the prediction of the different spectral components contained in the input signal. Figure 26 illustrates the evolution of the input signal (blue) and the estimation performed with the LKF (red). Figure 27 displays the temporal evolution of the error between the input signal and the estimation made. The error evolution reveals the time taken by the LKF to reach a steady state, thus providing estimated spectral component values close to the actual ones. In this case, the algorithm requires 300 ms to reach a steady state at t = 0.6 s. Figure 28 is an enlargement of Figure 27, providing a more detailed view of the time period during which steady state is achieved (t = 0.55 s to t = 0.7 s) and the error becomes minimal. \begin{table}
\begin{tabular}{c c c} \hline \hline
**No. Spectral** & **Voltage rms (V)** & **Frequency (Hz)** \\
**Component** & **Voltage rms (V)** & **Frequency (Hz)** \\ \hline
1 & 11.24 & 30 \\
2 & 199 & 50 \\
3 & 15.79 & 70 \\
4 & 22.9 & 120 \\
5 & 59.75 & 150 \\ \hline \hline \end{tabular}
\end{table} 
Table 6: Spectral components obtained after applying the proposed method. Figure 25: Waveform of the input signal for the second simulation. \begin{table}
\begin{tabular}{c c c c} \hline \hline
**No. Spectral** & **Voltage rms (V)** & **Frequency (Hz)** & **Frequency (Rad/s)** \\
**Component** & **Voltage rms (V)** & **Frequency (Hz)** & **Frequency (Rad/s)** \\ \hline
1 & 23 & 33.9 & 213.032 \\
2 & 230 & 51.1 & 321.070 \\
3 & 46 & 75.15 & 472.181 \\
4 & 34.5 & 121.75 & 764.977 \\
5 & 69 & 150.45 & 945.305 \\ \hline \hline \end{tabular}
\end{table} 
Table 5: Spectral components comprising the input signal. Figure 28 shows the evolution of the subharmonic (red waveform) present in the input signal. The estimation begins at t = 200 ms, reaching a steady state at t = 500 ms. This result is similar across all estimations of the spectral components that form the input signal. Thus, they have been omitted to avoid redundancy. The evolution of the subharmonic is analogous to the overall estimation of the input signal in Figure 26.  
Figure 26: Input signal (blue) versus LKF estimation (red). Figure 27: Error signal between the input signal and the LKF estimation. Figure 28: Detail of the temporal evolution of the error signal. As in the first simulation, the Kalman filter provides the temporal evolution of the frequency estimation of the input signal, as shown in Figure 30. These values can be useful in multiple applications for measuring power quality.