# Inductance Estimation Based on Wavelet-GMDH for Sensorless Control of PMSM
## 4 Implementation of Wavelet-GMDH Based Compensation Control  
Using wavelet transformation, feature vectors of PMSM three-phase current sensor signals were extracted and high-frequency noise removed, and machine learning was performed based on the refined data. In addition, using the estimated inductance data using the wavelet-GMDH technique, the magnetic flux saturation state of the actual system was accurately calculated, and control was performed by generating a compensation signal in real time. As shown in Table 1, the wavelet scaling function, decomposition level, denoising method, and threshold rule were designed, considering the frequency and noise level of the input sensor signals. Since the input signal comprises the three-phase current signal of the PMSM, including noise such as the measurement noise and power noise, utilizing it directly as the input signal for GMDH can adversely affect the quality and accuracy of the machine learning output data. Therefore, appropriate signal processing is necessary. Especially in severe load conditions with a noisy environment, the signal-to-noise ratio of the sensor increases. This becomes a major factor in deteriorating speed ripples and control stability of the system caused by magnetic saturation. Figure 4 represents the simulation results of the raw signal of the three-phase current sensor and the denoised signal after applying the wavelet filter, respectively, under the condition of periodic load torque. As shown in Figure 4, the measured signal from the current sensors contains noise, including measurement noise and power switching noise, in the original signal. However, by applying wavelet transformation, small wavelet coefficients are classified as noise and selectively removed, resulting in minimal distortion or delay in the signal, thus not affecting the quality of the original signal. Finally, after applying a threshold to the wavelet coefficients and using wavelet inverse transformation, the restored original data are shown in Figure 4.  
Machine learning regression was performed utilizing the GMDH algorithm, incorporating multi-input polynomials comprising refined sensor signals, overvoltage, and input current control reference signals. The design parameters for the GMDH based machine learning were determined as the input variables, maximum number of neurons in a layer, maximum number of layers, and training ratio. The number of layers was set to five or more, with a training ratio of 80%, accounting for the computational speed of the processor and the magnitude of the RMS error. To enhance the compensation control performance for periodic loads, training was conducted under various periodic input conditions characterized by different frequencies and loads. \begin{table}
\begin{tabular}{c c} \hline
**Parameter** & **Value** \\ \hline Wavelet scaling function & sym4 \\ Decomposition level & 8 \\ Denoising method & universal threshold \\ Threshold rule & soft \\ \hline \end{tabular}
\end{table} 
Table 1: Wavelet transform parameters. Table 2 presents a comparison of the RMSE, mean squared error (MSE), mean absolute error (MAE), and the linear regression index (R and R\({}^{2}\)) of the \(q\)-axis inductance, estimated by wavelet-GMDH based learning for each case of input variables and regression layers using MATLAB R2023a. Furthermore, the comparisons of the evaluation metrics (RMSE, MSE, MAE) for all cases are shown in Figure 5. As a result of the comparison, it is observed that the evaluation metrics results are improved as the number of input variables and regression layers increase. Based on the analysis results, the optimal regression combination chosen consisted of eight input variables with five layers (Case 5), satisfying the training performance criteria (RMS error \(<\) 1, linear regression index (R) \(>\) 0.99), from Equations (20) and (21). Additionally, both the MSE and MAE were observed to be less than 0.6%, and the coefficient of determination was close to 1, indicating the good performance of the regression model.