All projects
// ANALYSIS · 2026
Thermal System Identification
Second-order dynamic modeling and least squares estimation for an Arduino PWM heater

- MODEL VALIDATION
- 6.9% Error
- HARDWARE
- Arduino PWM
- PLANT DYNAMICS
- 2nd-Order Thermal
Problem
Characterize the thermal dynamics of a 20 Ω power resistor clamped to binder clips and an LM35DT temperature sensor—driven via MOSFET PWM from an Arduino to establish an accurate plant model for closed-loop controller design.
Approach
- 01Built the breadboard circuit with an 8 V supply, gate protection resistors, and Arduino code that accepts a user entered duty cycle and logs temperature every 30 seconds.
- 02Derived a second-order differential equation from a linear graph and normal tree with lumped heater and clip thermal masses, forming the transfer function and proving overdamped behavior.
- 03Recorded a 100% duty cycle step response to find steady-state gain (20.02 °F/W) and the time constant (200.64 s), comparing it against a first-order approximation.
- 04Collected a multi-step doublet response by ramping duty cycle up and down, discretized the model with a zero-order hold, and solved a four-parameter least squares estimate in MATLAB.
Gallery

Data Set 1: step response at 100% duty cycle 
Normal tree for the two-mass thermal model
Results
- Least squares model tracked measured data closely across heating and cooling peaks, capturing the conduction delay that the first-order model missed.
- Discrete steady-state gain of 18.64 °F/W matched the continuous estimate within 6.9%.
- Identified slow pole of 0.005 s⁻¹ matched the step-response value within 0.32%, providing a validated plant model for feedback controller design.