PMSM Rotor Temperature Forecasting

Introduction

Permanent Magnet Synchronous Motors (PMSMs) can suffer irreversible demagnetization if rotor temperatures exceed safe limits (typically above 150 C). This project demonstrates a forecasting solution using on-device machine learning without needing external temperature sensors. A lightweight LSTM model estimates rotor temperature from signals that are already available, thus enabling preemptive thermal protection.

Dataset and Model Details

Dataset

This example uses a dataset derived from real sensor measurements collected from a PMSM running on a controlled test bench. The original data was recorded by the LEA department at Paderborn University at 2 Hz sampling rate.

Parameter

Description

i_a

Phase current magnitude

u_d

Voltage d-component (active)

u_q

Voltage q-component (reactive)

ambient

Ambient temperature

coolant

Coolant temperature

pm

Permanent magnet surface temperature (target)

The model predicts the permanent magnet surface temperature at the next timestep given the past 3 readings of all six signals.

Model Architecture

  • FCST_LSTM8 mode - Single-layer LSTM network with a hidden size of 8 and approximately 393 trainable parameters. The LSTM gating mechanisms learn how current loading, voltage conditions, and cooling state interact over time to determine rotor temperature.

  • Inference run on Cortex M33 CPU

Input Features

The model takes 4D input (N,C,H,W):

  • N (1): batch size, restricted to 1

  • C (6): channels - i_a, u_d, u_q, ambient, coolant, pm

  • H (3): number of historical timesteps (frame size) used for prediction

  • W (1): width, restricted to 1 for timeseries applications

Output

The model produces an output tensor of shape (1, 1), representing the predicted permanent magnet surface temperature at the next timestep. This continuous forecasting output can be fed directly into thermal protection or derating logic.

Feature Extraction Configuration

A SimpleWindow transform segments the continuous stream into fixed-length windows of 3 consecutive timesteps across all 6 input channels. No FFT, binning, or log scaling is applied.