# Machine Learning for Sensorless Temperature Estimation of a BLDC Motor

^{1}

^{2}

^{3}

^{*}

## Abstract

**:**

^{2}was above 0.909. In addition, the extension of the model with the temperature measurement on the casing (model 2) allowed reducing the error value to about 1% and increasing R

^{2}to 0.990. The results obtained for the first proposed model show that the overheating protection of the motor can be ensured without direct temperature measurement. In addition, the introduction of a simple casing temperature measurement system allows for an estimation with accuracy suitable for compensating the motor output torque changes related to temperature.

## 1. Introduction

## 2. Measurements and Data Preprocessing

## 3. Machine Learning Algorithms

- Linear regression with the objective function given by Formula (4),
- Elastic-Net regressor, in which the regularization components are introduced to the objective function (Table 2),
- Regressor using the stochastic gradient descent optimization algorithm (denoted as SGD),
- Support vector machine (SVM) with linear kernel,
- CART (Classification and regression trees) decision trees,
- AdaBoost—presented in [41], an algorithm that uses boosting to determine the final prediction fitting the sequence of decision trees.

## 4. Hyperparameters Optimization with Cross-Validation

## 5. Results of the Sensorless Estimation Model

- RMSE (root mean squared error) defined as:

- MAPE (mean absolute percentage error) calculated with the formula:

- Coefficient of determination R
^{2}(quality of fit) calculated as:

^{2}coefficient of linear models ranges from 0.84 to 0.91, while the MAPE error ranges from 4.3% to 8.5%. On the other hand, the root mean squared errors seem very interesting because they are smaller than in the case of temperature estimation without cooling. This means that the algorithm makes less error on average but has a much bigger problem with fitting, which also causes increased relative errors. The presented difference may result from the fact that the winding temperature of the motor cooled by a fan placed on the shaft depends to a greater extent on the rotational speed. Therefore, the relationship between the features and the target variable, sought by the algorithms, may be of a more complex nature, reducing the effectiveness of the estimation.

^{2}= 0.975. Analyzing Figure 7b, it can be concluded that the accuracy of the motor temperature prediction with a cooling fan is the highest for the SGD algorithm. It achieved a coefficient of determination equal to 0.909, an RMSE error of 2.07ׄ °C, and a MAPE of 4.3%.

## 6. Results of the Estimation Model with Auxiliary Temperature Sensor

^{2}for each linear algorithm is greater than or equal to 0.97. The best algorithm for estimating the motor temperature without cooling is undoubtedly the linear SVM. Its regression metrics are RMSE = 0.68 °C, MAPE = 0.77%, and R

^{2}= 0.998, respectively. The curves of the actual and estimated winding temperatures by this algorithm are shown in Figure 10a. Thus, an almost perfect representation of the actual temperature is visible. On the other hand, a slight deterioration in efficiency is visible in all models estimating the motor temperature with an additional cooling fan. The best results during this test were obtained with the linear model optimized with the stochastic gradient descent algorithm, for which RMSE = 0.59 °C, MAPE = 1.02% and R

^{2}= 0.993. The actual temperature and predicted temperature with the use of SGD are presented in Figure 10b. The decrease in the estimation accuracy for the cooled test is particularly interesting. As noted in the previous section, mounting a cooling fan on the shaft increases the effect of rotational speed on motor temperature and therefore increases the importance of this feature in prediction. Moreover, taking into account the temperature on the motor casing results in a significant improvement in the prediction accuracy. However, it should be remembered that the motor is cooled from the outside, so the rotational speed will have a greater effect on the temperature on the casing than on the inside of the motor. Therefore, it can be inferred that due to changes in rotational speed, the dependence of the winding temperature on the casing temperature will be more non-linear than in the case of a system without cooling. The above phenomenon may cause a significant estimation accuracy decrease.

## 7. Conclusions

## Author Contributions

## Funding

## Institutional Review Board Statement

## Informed Consent Statement

## Data Availability Statement

## Conflicts of Interest

## References

- Dambrauskas, K.; Vanagas, J.; Zimnickas, T.; Kalvaitis, A.; Bizimavicius, T. Induction Motor’s Bearing Condition Motoring and Diagnosis Applying Cloud Services and Artificial Neural Networks. Advances in Information, Electronic and Electrical Engineering. In Proceedings of the AIEEE 2019-Proceedings of the 7th IEEE Workshop, Liepaja, Latvia, 15–16 November 2019; Volume 2019. [Google Scholar]
- Medeiros, R.L.V.; Filho, A.C.L.; Ramos, J.G.G.S.; Nascimento, T.P.; Brito, A.V. A Novel Approach for Speed and Failure Detection in Brushless DC Motors Based on Chaos. IEEE Trans. Ind. Electron.
**2019**, 66, 8751–8759. [Google Scholar] [CrossRef] - Park, B.-G.; Lee, K.-J.; Kim, R.-Y.; Hyun, D.S. Low-Cost Fault Diagnosis Algorithm for Switch Open-Damage in BLDC Motor Drives. J. Power Electron.
**2010**, 10, 702–708. [Google Scholar] [CrossRef] [Green Version] - Jin, X.; Chow, T.W.S.; Tsui, K.-L. Online Anomaly Detection of Brushless Dc Motor Using Current Monitoring Technique. Int. J. Perform. Eng.
**2014**, 10, 263–271. [Google Scholar] - Zandi, O.; Poshtan, J. Fault Diagnosis of Brushless DC Motors Using Built-In Hall Sensors. IEEE Sens. J.
**2019**, 19, 8183–8190. [Google Scholar] [CrossRef] - Shifat, T.A.; Hur, J.W. An Effective Stator Fault Diagnosis Framework of BLDC Motor Based on Vibration and Current Signals. IEEE Access
**2020**, 8, 106968–106981. [Google Scholar] [CrossRef] - Kudelina, K.; Asad, B.; Vaimann, T.; Rassolkin, A.; Kallaste, A.; Lukichev, D.V. Main Faults and Diagnostic Possibilities of BLDC Motors. In Proceedings of the 2020 27th International Workshop on Electric Drives: MPEI Department of Electric Drives 90th Anniversary, IWED 2020-Proceedings, Moscow, Russia, 27–30 January 2020. [Google Scholar]
- Zhang, P.; Lu, B.; Habetler, T.G. An Active Stator Temperature Estimation Technique for Thermal Protection of Inverter-Fed Induction Motors with Considerations of Impaired Cooling Detection. IEEE Trans. Ind. Appl.
**2010**, 46, 1873–1881. [Google Scholar] [CrossRef] - Guo, H.; Ding, Q.; Song, Y.; Tang, H.; Wang, L.; Zhao, J. Predicting Temperature of Permanent Magnet Synchronous Motor Based on Deep Neural Network. Energies
**2020**, 13, 4782. [Google Scholar] [CrossRef] - Ganchev, M.; Kral, C.; Wolbank, T.M. Compensation of Speed Dependence in Sensorless Rotor Temperature Estimation for Permanent-Magnet Synchronous Motor. IEEE Trans. Ind. Appl.
**2013**, 49, 2487–2495. [Google Scholar] [CrossRef] - Sciascera, C.; Giangrande, P.; Papini, L.; Gerada, C.; Galea, M. Analytical Thermal Model for Fast Stator Winding Temperature Prediction. IEEE Trans. Ind. Electron.
**2017**, 64, 6116–6126. [Google Scholar] [CrossRef] - Ganchev, M.; Kral, C.; Oberguggenberger, H.; Wolbank, T. Sensorless Rotor Temperature Estimation of Permanent Magnet Synchronous Motor. In Proceedings of the IECON 2011-37th Annual Conference of the IEEE Industrial Electronics Society, Melbourne, Australia, 7–10 November 2011; pp. 2018–2023. [Google Scholar]
- Chen, Y.; Zhang, C.; Zhang, N.; Chen, Y.; Wang, H. Multi-Task Learning and Attention Mechanism Based Long Short-Term Memory for Temperature Prediction of EMU Bearing. In Proceedings of the 2019 Prognostics and System Health Management Conference PHM-Qingdao, Qingdao, China, 25–27 October 2019. [Google Scholar]
- Wang, Y.; Li, H.; Ren, D. Characteristics of BLDC Motor Drive System at High Temperature. In Proceedings of the 2016 IEEE 8th International Power Electronics and Motion Control Conference, IPEMC-ECCE Asia 2016, Hefei, China, 22–26 May 2016; pp. 856–862. [Google Scholar]
- Jayanth, N.; Varunteja, P.V.N.R.; Sreenu, T.T. Direct Torque Control of Sensorless BLDC Motor Using Artificial Neural Networks. Int. J. Eng. Adv. Technol.
**2019**, 8, 1228–1231. [Google Scholar] - Ma, Z.; Qi, X. Permanent Magnet Motor Temperature Compensated Constant Torque Control. IFAC-PapersOnLine
**2018**, 51, 68–70. [Google Scholar] [CrossRef] - Ma, Z.; Zhang, Q.; Wang, Q.; Liu, T. Temperature Compensation Strategy of Output Torque for Permanent Magnet Synchronous Motor Based on BP Neural Network. In Proceedings of the 2017 12th IEEE Conference on Industrial Electronics and Applications, ICIEA 2017, Siem Reap, Cambodia, 18–20 June 2017; pp. 774–779. [Google Scholar]
- Tan, W.X.; Brandão, M.; Hashimoto, K.; Takanishi, A. Trajectory Optimization for High-Power Robots with Motor Temperature Constraints. In Lecture Notes in Computer Science (Including Subseries Lecture Notes in Artificial Intelligence and Lecture Notes in Bioinformatics); Springer: Cham, Switzerland, 2018; pp. 3–14. [Google Scholar] [CrossRef]
- Mroczek, B.; Kolodynska, A. The V2G Process with the Predictive Model. IEEE Access
**2020**, 8, 86947–86956. [Google Scholar] [CrossRef] - Zhu, Y.; Xiao, M.; Lu, K.; Wu, Z.; Tao, B. A Simplified Thermal Model and Online Temperature Estimation Method of Permanent Magnet Synchronous Motors. Appl. Sci.
**2019**, 9, 3158. [Google Scholar] [CrossRef] [Green Version] - Wallscheid, O.; Böcker, J. Global Identification of a Low-Order Lumped-Parameter Thermal Network for Permanent Magnet Synchronous Motors. IEEE Trans. Energy Convers.
**2016**, 31, 354–365. [Google Scholar] [CrossRef] - Demetriades, G.D.; De La Parra, H.Z.; Andersson, E.; Olsson, H. A Real-Time Thermal Model of a Permanent-Magnet Synchronous Motor. IEEE Trans. Power Electron.
**2010**, 25, 463–474. [Google Scholar] [CrossRef] - Wu, Y.; Gao, H. Induction-Motor Stator and Rotor Winding Temperature Estimation Using Signal Injection Method. IEEE Trans. Ind. Appl.
**2006**, 42, 1038–1044. [Google Scholar] [CrossRef] - Jun, B.-S.; Park, J.S.; Choi, J.-H.; Lee, K.-D.; Won, C.-Y. Temperature Estimation of Stator Winding in Permanent Magnet Synchronous Motors Using D-Axis Current Injection. Energies
**2018**, 11, 2033. [Google Scholar] [CrossRef] [Green Version] - Sonnaillon, M.O.; Bisheimer, G.; De Angelo, C.; García, G.O. Online Sensorless Induction Motor Temperature Monitoring. IEEE Trans. Energy Convers.
**2010**, 25, 273–280. [Google Scholar] [CrossRef] - Breitenbach, E.; Wunsch, E.; Schramm, A. Thermal Monitoring of Electrical Machines by Linear Differential Equations and Numerical Calibration Procedure. In Proceedings of the 2020 International Symposium on Power Electronics, Electrical Drives, Automation and Motion, SPEEDAM 2020, Sorrento, Italy, 24–26 June 2020; pp. 168–172. [Google Scholar]
- Erazo, D.E.G.; Wallscheid, O.; Böcker, J. Improved Fusion of Permanent Magnet Temperature Estimation Techniques for Synchronous Motors Using a Kalman Filter. IEEE Trans. Ind. Electron.
**2020**, 67, 1708–1717. [Google Scholar] [CrossRef] - Nogay, H.S. Prediction of Internal Temperature in Stator Winding of Three-Phase Induction Motors with Ann. Eur. Trans. Electr. Power
**2011**, 21, 120–128. [Google Scholar] [CrossRef] - Kirchgassner, W.; Wallscheid, O.; Bocker, J. Deep Residual Convolutional and Recurrent Neural Networks for Temperature Estimation in Permanent Magnet Synchronous Motors. In Proceedings of the 2019 IEEE International Electric Machines and Drives Conference, IEMDC 2019, San Diego, CA, USA, 12–15 May 2019; pp. 1439–1446. [Google Scholar]
- Lee, J.; Ha, J.-I. Temperature Estimation of PMSM Using a Difference-Estimating Feedforward Neural Network. IEEE Access
**2020**, 8, 130855–130865. [Google Scholar] [CrossRef] - Wallscheid, O.; Kirchgassner, W.; Bocker, J. Investigation of Long Short-Term Memory Networks to Temperature Prediction for Permanent Magnet Synchronous Motors. In Proceedings of the International Joint Conference on Neural Networks, Anchorage, AK, USA, 4–19 May 2017; pp. 1940–1947. [Google Scholar]
- Mellah, H.; Hemsas, K.E.; Taleb, R. CECATI, carlo Estimation of Speed, Armature Temperature and Resistance in Brushed DC Machines Using a CFNN Based on BFGS BP. Turk. J. Electr. Eng. Comput. Sci.
**2018**, 26, 3182–3192. [Google Scholar] [CrossRef] - Mellah, H.; Hemsas, K.E.; Taleb, R. Intelligent Sensor Based Bayesian Neural Network for Combined Parameters and States Estimation of a Brushed DC Motor. Int. J. Adv. Comput. Sci. Appl.
**2016**, 7. [Google Scholar] [CrossRef] [Green Version] - Kirchgassner, W.; Wallscheid, O.; Bocker, J. Empirical Evaluation of Exponentially Weighted Moving Averages for Simple Linear Thermal Modeling of Permanent Magnet Synchronous Machines. In Proceedings of the IEEE International Symposium on Industrial Electronics, Vancouver, BC, Canada, 12–14 June 2019; pp. 318–323. [Google Scholar]
- Kolano, K. Improved Sensor Control Method for BLDC Motors. IEEE Access
**2019**, 7, 186158–186166. [Google Scholar] [CrossRef] - Kolano, K. Determining the Position of the Brushless DC Motor Rotor. Energies
**2020**, 13, 1607. [Google Scholar] [CrossRef] [Green Version] - Hastie, T.; Tibshirani, R.; Friedman, J. The Elements of Statistical Learning: Data Mining, Inference, and Prediction, 2nd ed.; Springer Series in Statistics; Springer: New York, NY, USA, 2009; ISBN 978-0-387-84857-0. [Google Scholar]
- Kingma, D.P.; Ba, J. Adam: A Method for Stochastic Optimization. arXiv
**2017**, arXiv:1412.6980. [Google Scholar] - Friedman, J.; Hastie, T.; Tibshirani, R. Regularization Paths for Generalized Linear Models via Coordinate Descent. J. Stat. Softw.
**2010**, 33, 1–22. [Google Scholar] [CrossRef] [Green Version] - Goodfellow, I.; Bengio, Y.; Courville, A. Deep Learning; MIT Press: Cambridge, MA, USA, 2016; ISBN 978-0-262-03561-3. [Google Scholar]
- Freund, Y.; Schapire, R.E. A Decision-Theoretic Generalization of On-Line Learning and an Application to Boosting. J. Comput. Syst. Sci.
**1997**, 55, 119–139. [Google Scholar] [CrossRef] [Green Version] - Czerwinski, D.; Gęca, J.; Kolano, K. BLDC motor temperaturę. IEEE Dataport
**2021**. [Google Scholar] [CrossRef]

**Figure 3.**Placement of the cooling fan (

**blue arrow**) and the casing temperature sensor (

**green arrow**).

**Figure 4.**Measurement results of winding temperature (blue), casing temperature (red), speed (green), and current (orange) of motor: (

**a**) without cooling; (

**b**) with cooling fan.

**Figure 7.**Regression metrics values for the sensorless temperature estimation of the motor: (

**a**) without cooling; (

**b**) with a cooling fan.

**Figure 8.**Results of sensorless temperature estimation for the motor: (

**a**) without cooling, obtained with ElaticNet regressor; (

**b**) with a cooling fan, obtained with SGD regressor.

**Figure 9.**Regression metrics values for the temperature estimation supported with casing sensor data of the motor: (

**a**) without cooling; (

**b**) with a cooling fan.

**Figure 10.**Results of temperature estimation supported with casing sensor data for the motor: (

**a**) without cooling, obtained with SVM regressor; (

**b**) with a cooling fan, obtained with SGD regressor.

Name | Unit | Value |
---|---|---|

No. of pole | - | 8 |

No. of phase | - | 3 |

Rated voltage | V | 48 |

Rated speed | rpm | 3000 |

Rated torque | Nm | 1.4 |

Max peak torque | Nm | 4.2 |

Torque constant | Nm/A | 0.127 |

Line to line resistance | Ω | 0.16 |

Line to line inductance | mH | 0.50 |

Max peak current | A | 33 |

No-load current | mA | 1450 |

Length | Mm | 98 |

Rotor inertia | g cm^{2} | 1600 |

Weight | Kg | 3.15 |

Regularization | Linear Regressor | Objective Function |
---|---|---|

L2 | Ridge | $\mathrm{min}{\Vert \widehat{y}-y\Vert}_{2}^{2}+\alpha {\Vert w\Vert}_{2}^{2}$ |

L1 | Lasso | $\mathrm{min}\frac{1}{2N}{\Vert \widehat{y}-y\Vert}_{2}^{2}+\alpha {\Vert w\Vert}_{1}$ |

L1 + L2 | ElasticNet | $\mathrm{min}\frac{1}{2N}{\Vert \widehat{y}-y\Vert}_{2}^{2}+\alpha \rho {\Vert w\Vert}_{1}+\frac{\alpha (1-\rho )}{2}{\Vert w\Vert}_{2}^{2}$ |

Method | Metric | |||||||
---|---|---|---|---|---|---|---|---|

MSE ^{a} | RMSE | MAPE | R^{2} | $\underset{\mathit{i}}{\mathbf{max}}{\left|\widehat{\mathit{y}}-\mathit{y}\right|}_{\mathit{i}}$ | MAE ^{b} | MRE ^{c} | ||

Literature method | [9] | - | 0.24 °C | - | 0.944 | - | 0.15 °C | - |

[11] | - | - | - | - | 5.2 °C | - | 1.50% | |

[20] | - | - | - | - | ≈8.0 °C | - | - | |

[21] | - | - | - | - | 8.0 °C | - | - | |

[23] | - | - | - | - | - | - | 6.14% | |

[29] | 2.04 K^{2} | 1.43 K | - | - | 37.6 K | - | - | |

[30] | - | - | - | - | 4.5 °C | 0.90 °C | - | |

[31] | - | - | - | - | 10.8 K | - | - | |

[34] | 6.06 K^{2} | 2.46 K | - | - | 11.1 K | - | - | |

Model 1 | Uncooled (ElasticNet) | 6.40 °C^{2} | 2.53 °C | 3.82% | 0.975 | 20.4 °C | 1.64 °C | 3.82% |

Cooled (SGD) | 4.28 °C^{2} | 2.07 °C | 4.30% | 0.909 | 8.3 °C | 1.49 °C | 4.30% | |

Model 2 | Uncooled (SVM) | 0.46 °C^{2} | 0.68 °C | 0.77% | 0.998 | 14.0 °C | 0.34 °C | 0.77% |

Cooled (SGD) | 0.35 °C^{2} | 0.59 °C | 1.02% | 0.993 | 7.3 °C | 0.35 °C | 1.02% |

^{a}mean squared error,

^{b}mean absolute error,

^{c}mean relative error.

Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations. |

© 2021 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).

## Share and Cite

**MDPI and ACS Style**

Czerwinski, D.; Gęca, J.; Kolano, K.
Machine Learning for Sensorless Temperature Estimation of a BLDC Motor. *Sensors* **2021**, *21*, 4655.
https://doi.org/10.3390/s21144655

**AMA Style**

Czerwinski D, Gęca J, Kolano K.
Machine Learning for Sensorless Temperature Estimation of a BLDC Motor. *Sensors*. 2021; 21(14):4655.
https://doi.org/10.3390/s21144655

**Chicago/Turabian Style**

Czerwinski, Dariusz, Jakub Gęca, and Krzysztof Kolano.
2021. "Machine Learning for Sensorless Temperature Estimation of a BLDC Motor" *Sensors* 21, no. 14: 4655.
https://doi.org/10.3390/s21144655