7.9.25. MOSFET Junction Temperature Prediction
Predict the case temperature of a high-voltage switch (MOSFET, IGBT) from its power loss and the reading of a nearby NTC temperature sensor, using a linear model plus a small AI model for the residual error.
Example folder: examples/mosfet_temp_prediction
(GitHub)
7.9.25.1. Overview
Task: timeseries regression (
generic_timeseries_regression)Application: power conversion and motor drives, protection of switching devices without a direct temperature sensor
Device: F29H85 (
config.yaml)Model:
REGR_3k(an MLP-style regression model)Target:
T_case - T_linear, the residual between the measured case temperature and the linear model output
7.9.25.2. Thermal Model
The power loss of the switch (conduction plus switching loss, summed over all devices in a module) raises the junction temperature, which propagates to the case and then through the heat sink to the ambient. An NTC sensor next to the device observes the temperature, but its reading can differ significantly from the case temperature.
Simplified thermal model of a high-voltage switch
The thermal model from T_junction to T_case is normally provided by the device manufacturer. The example
focuses on predicting T_case from P_loss and T_NTC. The coupling between T_case and T_NTC
depends on the mechanical and cooling design and varies with coolant temperature, coolant flow rate and ambient
temperature.
7.9.25.3. Linear + AI Model
Linear plus AI model
The prediction has two components:
Linear model: a linear autoregressive-moving-average (ARMA) model of the linear thermal behavior from
P_lossto the difference betweenT_caseandT_NTC.AI model: an MLP that models the residual between the linear prediction and the true measurement. This residual can be highly nonlinear in
P_lossandT_NTC.
Both models can take extra inputs such as coolant flow rate, coolant temperature and ambient temperature. The combination is more accurate because the AI model captures nonlinear behavior, more constrained because the linear model captures most of the behavior, and more robust overall.
7.9.25.4. The Dataset
The edge AI model does not predict the case temperature directly; it predicts the difference between the expected temperature and the linear model output.
Input buffer for one prediction
For every predicted value the data holds 20 past NTC temperature points, 20 past power points and 3 fixed
meta-information values (ambient temperature, coolant temperature and coolant flow rate, constant within a
file). That is 43 input columns, which is why the config lists variables 1 to 43 with frame_size: 1. The
data covers several ambient temperatures, coolant temperatures and coolant flow rates. The config downloads
https://software-dl.ti.com/C2000/esd/mcu_ai/datasets/mosfet_temp_prediction.zip.
7.9.25.5. Running the Example
Install Tiny ML ModelZoo first (Installation, Quickstart), then run from
the tinyml-modelzoo folder:
./run_tinyml_modelzoo.sh examples/mosfet_temp_prediction/config.yaml
See Running Examples for all launchers, for example:
run_tinyml_modelzoo.bat examples\mosfet_temp_prediction\config.yaml
7.9.25.6. Configuration
common:
task_type: generic_timeseries_regression
target_device: F29H85
dataset:
dataset_name: mosfet_temp_prediction
input_data_path: https://software-dl.ti.com/C2000/esd/mcu_ai/datasets/mosfet_temp_prediction.zip
data_processing_feature_extraction:
data_proc_transforms: ['SimpleWindow']
variables: [1,2,3, ... ,43] # the config lists every column index from 1 to 43
stride_size: 1
frame_size: 1
training:
model_name: REGR_3k
batch_size: 128
training_epochs: 100
early_stopping: true
early_stopping_patience: 5
num_gpus: 0
learning_rate: 0.01
quantization: 0
output_int: false
testing: {}
compilation: {}
quantization: 0 trains a float model. Other regression models (REGR_*) can be selected; see
Model Zoo Reference.
7.9.25.7. Results
The example readme does not publish accuracy numbers. In the automated 1.5.0 config test run (early stopped) the float model reached a best-epoch MSE of 0.084 and R2 of 0.962 on validation data, and a test-set RMSE of 0.37 with R2 of 0.95.
7.9.25.8. Output Location
Results are written to ./data/projects/mosfet_temp_prediction/run/<date-time>/REGR_3k/. The device files are
compilation/artifacts/mod.a, compilation/artifacts/tvmgen_default.h and the golden vectors in
training/quantization/golden_vectors/.
7.9.25.9. Running on Device
Use the generic_timeseries_regression example of the F29H85x SDK and follow
Deploying Regression Models from ModelMaker to Device and Deploying a ModelZoo Run to an SDK Example (Golden-Vector Check).