## 6 Conclusions  
The article presents a method that extracts the frequency and instantaneous voltage values of the spectral components in an unknown alternating voltage signal in real time. The most immediate application is for systems measuring and managing the quality of electrical energy. This method addresses inaccuracies encountered by the linear Kalman filter when the observed signal model does not match reality, using an algorithm developed by the authors and inspired by the clustering of results of the Discrete Fourier Transform, as shown in the IEC 61000-4-7 standard. The proposed algorithm enables the determination of which values provided by the discrete Fourier transform should be considered real and which are the result of picket fence and spectral leakage effects. This information is used for constructing \begin{table}
\begin{tabular}{c c c c} \hline \hline
**No. Spectral** & **Abs Max Error (\%)** & **RMSE (V)** & **RMSE (\%)** \\
**Component** & & & \\ \hline
1 & 6.48 & 0.66 & 2.84 \\
2 & 0.22 & 0.20 & 0.09 \\
3 & 4.27 & 1.01 & 2.19 \\
4 & 7.63 & 0.88 & 2.56 \\
5 & 4.02 & 1.20 & 1.74 \\ \hline \hline \end{tabular}
\end{table} 
Table 10: Measurement of error from estimation with noise. Figure 50: Estimated rms value of the five spectral components, 1 (blue), 2 (red), 3 (green), 4 (dark blue), and 5 (cyan). the appropriate state matrix of the linear Kalman filter. Therefore, it is synchronized with all the harmonic components present in the signal under analysis. The linear Kalman filter provides synchronized output for each harmonic component in real time, supplying the instantaneous voltage and frequency values of each spectral component forming the input signal. The results obtained by applying the proposed method to various electrical network signals show how it corrects errors in the estimations made with the linear Kalman filter when the number of states used in the construction of the state matrix does not coincide with the number of components that make up the real signal to be estimated. Additionally, the method provides information on the number of spectral components in the interharmonic groups, enabling a better identification of the signals from the discrete Fourier transform performed on the input signal and providing more information than the IEC 61000-4-7 standard. Using the linear Kalman filter enables the individual extraction of each spectral component present in the signal in real time, so it continuously provides the voltage and frequency values of the instantaneous value of that component. The results confirm the validity of the method in systems with harmonic, interharmonic, and subharmonic signals in power distribution networks. The limitations in applicable systems arise from the need for Fourier transform decomposition and the time required for the linear Kalman filter to converge to the real value of the observed states. It has been verified that noisy signals affect the LKF estimations but not the identification algorithm. The results obtained validate the developed method. The individual contribution of each author in this article is: Conceptualization, G.M.-N. and S.O.-G.; methodology, [PERSON]-N., [PERSON]-G., [PERSON]-H. and [PERSON]-G.; software, [PERSON]-N. and [PERSON]-G.; validation, [PERSON]-N., S.O.-G., [PERSON]-H. and J.C.A.-G.; formal analysis, [PERSON]-N., S.O.-G. and [PERSON]-H.; investigation, [PERSON]-N., S.O.-G., [PERSON]-H. and J.C.A.-G.; resources, [PERSON]-N. and S.O.-G.; writing--original draft preparation, [PERSON]-N. and S.O.-G.; writing--review and editing, [PERSON]-N., S.O.-G., [PERSON]-H. and J.C.A.-G.; visualization, [PERSON]-N., [PERSON]-G., [PERSON] and [PERSON]-[PERSON]; supervision, [PERSON]-N., [PERSON]-G., [PERSON]-H. and [PERSON]-G.; project administration, [PERSON]-G., [PERSON] and [PERSON]-G. All authors have read and agreed to the published version of the manuscript. This research received no external funding. Not applicable.