HVAC Indoor Temperature Forecasting

Introduction

This project demonstrates on-device machine learning for HVAC control. A compact LSTM model predicts upcoming temperature trends from recent sensor readings, enabling smoother and energy-efficient control decisions.

Dataset and Model Details

Dataset

This example uses a synthetic HVAC dataset designed to emulate realistic indoor thermal dynamics. The dataset captures the interplay between compressor operation, outdoor conditions, and the resulting indoor temperature.

Parameter

Value

Signals

compressorFrequency, outdoorTemperature, indoorTemperature

Input Variables

3

Prediction Target

indoorTemperature (Next timestep)

The model learns to predict the indoor temperature at the next timestep given the past 5 readings of all three signals.

Model Architecture

  • The model is FCST_LSTM10, a single-layer LSTM network with a hidden size of 10 and approximately 611 trainable parameters. LSTM gating mechanisms capture the temporal dependencies between compressor activity, outdoor conditions, and the resulting indoor temperature trajectory.

  • 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 (3): channels - compressorFrequency, outdoorTemperature, indoorTemperature

  • H (5): 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, 1, 1), representing the predicted indoor temperature at the next timestep (i.e. Forecast Horizon = 1).

Feature Extraction Configuration

A SimpleWindow transform segments the continuous stream into fixed-length windows of 5 consecutive timesteps across all 3 input channels.