Project 9: Thermal Profile Forecaster (Heat Management)

Build a thermal simulator that models temperature over orbits, includes heater control with hysteresis, and integrates with power constraints.

Quick Reference

Attribute Value
Difficulty Level 2: Intermediate
Time Estimate 1-2 weeks
Main Programming Language Python
Alternative Programming Languages C
Coolness Level Level 2: Thermal Whisperer
Business Potential Level 1: Modeling Tool
Prerequisites Basic heat transfer, numerical integration
Key Topics Thermal balance, eclipse effects, heater hysteresis

1. Learning Objectives

By completing this project, you will:

  1. Model spacecraft thermal balance with radiation and conduction.
  2. Simulate eclipse-driven temperature swings.
  3. Implement heater control with hysteresis.
  4. Quantify heater power impact on EPS.
  5. Produce deterministic temperature forecasts.

2. All Theory Needed (Per-Concept Breakdown)

Thermal Balance and Lumped-Node Models

Fundamentals Spacecraft temperature is governed by energy balance: heat in minus heat out equals thermal energy change. A lumped-node model treats a component as a single node with heat capacity. This simplifies the system to ordinary differential equations (ODEs) that can be integrated over time. For CubeSats, a single-node or small multi-node model is often sufficient for planning. The key is to capture the dominant heat flows: solar input, radiative loss, and internal power dissipation.

Deep Dive into the concept A thermal balance equation for a node is: C * dT/dt = Q_in - Q_out, where C is thermal capacitance (J/K), T is temperature, and Q terms are heat flows. Q_in includes solar radiation, albedo, and internal power dissipation (e.g., electronics). Q_out includes radiative loss (epsilonsigmaA(T^4 - T_space^4)) and conductive loss to other components or radiators. In a lumped model, you approximate each component as a uniform temperature, which is reasonable for small satellites with short thermal conduction paths.

Solar input is modeled as Q_solar = alpha * A * S * cos(theta), where alpha is absorptivity, A is area, S is solar constant (~1361 W/m^2), and theta is incidence angle. In eclipse, solar input is zero. Internal heat is the power dissipated by components; this often equals electrical power consumption. Radiative loss is the dominant cooling mechanism in space and depends on emissivity epsilon, area A, and temperature to the fourth power. This nonlinearity means temperature changes can accelerate at high temperatures.

Numerical integration is required because the equation is nonlinear. You can use explicit Euler for simplicity with small time steps, or RK4 for better stability. Determinism requires a fixed time step and consistent input data. You should validate the model with simple cases: for example, in constant sunlight with constant internal power, the temperature should converge to a steady-state where Q_in = Q_out.

Multi-node models add coupling terms: Q_cond = k * (T1 - T2). This allows you to model components that are thermally linked, such as the battery and main board. For this project, a single-node model is acceptable, but you can add a second node for heaters if desired.

How this fit on projects This concept drives Section 3.2 thermal model requirements and Section 4 architecture, and ties into P03 EPS.

Definitions & key terms

  • Thermal capacitance (C) -> Energy required to change temperature.
  • Emissivity (epsilon) -> Efficiency of radiative heat loss.
  • Absorptivity (alpha) -> Fraction of incident energy absorbed.

Mental model diagram (ASCII)

Solar + Internal -> [Thermal Node] -> Radiative Loss -> Space

How it works (step-by-step, with invariants and failure modes)

  1. Compute solar input (0 in eclipse).
  2. Compute internal heat from power loads.
  3. Compute radiative loss.
  4. Integrate dT/dt to update temperature.

Invariants: temperature updates with consistent dt; radiative loss >= 0.

Failure modes: sign errors in heat balance, unstable integration, unit mismatches.

Minimal concrete example

q_in = solar + internal
q_out = emissivity * sigma * area * (T**4 - T_space**4)
T += (q_in - q_out) * dt / C

Common misconceptions

  • “Temperature changes linearly” -> Radiative loss is nonlinear (T^4).
  • “Conduction dominates in space” -> Radiation is dominant.

Check-your-understanding questions

  1. Why does radiative loss scale with T^4?
  2. What happens to temperature in eclipse?
  3. Why use lumped-node models?

Check-your-understanding answers

  1. Stefan-Boltzmann law.
  2. Temperature drops because solar input is zero.
  3. They reduce complexity while capturing dominant dynamics.

Real-world applications

  • Thermal planning for CubeSat missions.
  • Heater scheduling and battery safety.

Where you’ll apply it

References

  • Fundamentals of Space Systems (Thermal control)
  • Spacecraft Systems Engineering (Thermal modeling)

Key insights Thermal balance is energy bookkeeping with strong nonlinear cooling.

Summary A lumped thermal model yields actionable temperature forecasts.

Homework/Exercises to practice the concept

  • Compute steady-state temperature for fixed Q_in and Q_out.

Solutions to the homework/exercises

  • Solve Q_in = epsilonsigmaA(T^4) for T.

Heater Control and Hysteresis

Fundamentals Heaters keep components above minimum temperature. If they switch on and off too frequently, they waste power and wear out. Hysteresis solves this: heaters turn on at a lower threshold and turn off at a higher threshold. This prevents rapid toggling. Heater control must also consider power limits: if the battery is low, heaters may need to be disabled even if temperature is low.

Deep Dive into the concept Heater control is a classic on/off control problem. The simplest approach uses two thresholds: T_on and T_off, where T_on < T_off. When temperature drops below T_on, the heater turns on; it stays on until temperature rises above T_off. This creates a band that prevents oscillation. The width of the band must be tuned: too narrow and you get rapid cycling; too wide and you allow large temperature swings.

Heater power consumption directly affects EPS. A heater may draw 1-2 W continuously during eclipse, which can significantly reduce battery SoC. Therefore heater control should be integrated with power state: if SoC is below a minimum threshold, you might disable heaters and accept a lower temperature. This is a mission decision and must be encoded in the control policy.

You should also model heater placement and efficiency. In a lumped model, you can treat heater power as additional internal heat. For multi-node models, you can apply heater power to a specific node. This helps in understanding how quickly the heater warms critical components. The heater response time is governed by thermal capacitance: large mass warms slowly.

Finally, heater control should be tested with eclipse cycles. Run simulations across multiple orbits and verify that heaters maintain temperature within allowable ranges and that SoC remains safe. You should log heater on/off events with timestamps. This provides operational insight into heater duty cycle and power cost.

How this fit on projects This concept drives Section 3.2 heater control requirements and Section 6.2 tests, and connects to P03 power budgeting.

Definitions & key terms

  • Hysteresis band -> Temperature range between on/off thresholds.
  • Duty cycle -> Fraction of time heater is on.
  • Thermal limit -> Minimum/maximum allowable temperature.

Mental model diagram (ASCII)

Temp -> [Hysteresis Controller] -> Heater On/Off -> Heat Input

How it works (step-by-step, with invariants and failure modes)

  1. Measure temperature.
  2. If T < T_on and SoC OK -> heater on.
  3. If T > T_off -> heater off.
  4. Log heater events.

Invariants: heater state changes only at thresholds; power draw accounted.

Failure modes: heater thrashing, ignoring SoC, overheating.

Minimal concrete example

if T < T_on and soc > soc_min: heater = True
elif T > T_off: heater = False

Common misconceptions

  • “Heaters should always keep temperature at a fixed point” -> Hysteresis is safer.
  • “Heaters are cheap power-wise” -> They can dominate the budget in eclipse.

Check-your-understanding questions

  1. Why use two thresholds instead of one?
  2. How does heater duty cycle affect EPS?
  3. What happens if SoC is too low?

Check-your-understanding answers

  1. To prevent rapid on/off cycling.
  2. Higher duty cycle drains battery faster.
  3. Heaters may be disabled to preserve power.

Real-world applications

  • Thermal protection for batteries and payloads.
  • Eclipse survival planning.

Where you’ll apply it

References

  • Fundamentals of Space Systems (Thermal control)
  • Spacecraft Systems Engineering (Thermal design)

Key insights Heater control is a tradeoff between thermal safety and power survival.

Summary Hysteresis-based heater control stabilizes temperature and protects the battery.

Homework/Exercises to practice the concept

  • Choose T_on/T_off to keep a component between -5C and +25C.

Solutions to the homework/exercises

  • Example: T_on = -2C, T_off = +5C.

3. Project Specification

3.1 What You Will Build

A thermal simulator that predicts temperature over multiple orbits, with eclipse modeling and heater control integrated with EPS constraints.

3.2 Functional Requirements

  1. Thermal model: lumped-node heat balance equation.
  2. Eclipse modeling: solar input on/off.
  3. Heater control: hysteresis-based on/off logic.
  4. Output logs: temperature and heater events.

3.3 Non-Functional Requirements

  • Determinism: fixed time step and deterministic inputs.
  • Usability: CLI for orbit and thermal parameters.
  • Accuracy: stable integration without drift.

3.4 Example Usage / Output

$ python thermal_sim.py --orbits 5 --dt 10
[INFO] Min temp: -12C
[INFO] Max temp: 38C
[HEATER] Activated 18 minutes total

3.5 Data Formats / Schemas / Protocols

Config JSON:

{"C":1000,"area":0.02,"eps":0.8,"T_on":-5,"T_off":5}

3.6 Edge Cases

  • Heaters on but SoC too low.
  • Eclipse longer than expected.
  • Extreme thermal parameters (low emissivity).

3.7 Real World Outcome

A plot of temperature over orbits with heater activation markers.

3.7.1 How to Run (Copy/Paste)

python thermal_sim.py --orbits 5 --dt 10 --seed 42

3.7.2 Golden Path Demo (Deterministic)

  • Use fixed parameters in configs/nominal.json.
  • Compare output to golden_thermal.csv.

3.7.3 Failure Demo (Deterministic)

python thermal_sim.py --orbits 2 --config configs/no_heater.json

Expected: temperature below minimum and exit code 3.

3.7.4 If CLI: Exact Terminal Transcript

$ python thermal_sim.py --orbits 2
[INFO] Min temp: -12C
[INFO] Max temp: 38C
ExitCode=0

4. Solution Architecture

4.1 High-Level Design

Orbit Time -> Eclipse Model -> Thermal Balance -> Heater Control -> Logs/Plots

4.2 Key Components

Component Responsibility Key Decisions
Thermal Model Compute dT/dt Euler vs RK4
Eclipse Model Sunlight on/off Fixed fraction
Heater Control Hysteresis Thresholds
Logger Output data CSV + plots

4.3 Data Structures (No Full Code)

class ThermalState:
    T: float
    heater_on: bool

4.4 Algorithm Overview

Key Algorithm: Thermal step

  1. Compute Q_in from solar and internal power.
  2. Add heater power if on.
  3. Compute Q_out via radiation.
  4. Update temperature with dt.

Complexity Analysis:

  • Time: O(steps).
  • Space: O(steps) for logs.

5. Implementation Guide

5.1 Development Environment Setup

python -m venv .venv
source .venv/bin/activate
pip install numpy matplotlib

5.2 Project Structure

project-root/
+-- thermal_sim.py
+-- configs/
+-- README.md

5.3 The Core Question You’re Answering

“How do you keep components alive through repeated thermal cycles?”

5.4 Concepts You Must Understand First

  1. Thermal balance equations.
  2. Eclipse cycles.
  3. Hysteresis heater control.

5.5 Questions to Guide Your Design

  1. What are the min/max allowable temperatures?
  2. What heater power is available from EPS?
  3. How long is the worst-case eclipse?

5.6 Thinking Exercise

Estimate heater duty cycle needed to maintain temperature above -5C.

5.7 The Interview Questions They’ll Ask

  1. “Why use hysteresis for heaters?”
  2. “How does eclipse affect thermal balance?”
  3. “What are the main heat flows in space?”

5.8 Hints in Layers

Hint 1: Start with a single-node model.

Hint 2: Add eclipse gating for solar input.

Hint 3: Add heater control with thresholds.

Hint 4: Plot temperature and heater state.


5.9 Books That Will Help

Topic Book Chapter
Thermal control Fundamentals of Space Systems Thermal chapter
Spacecraft thermal Spacecraft Systems Engineering Thermal design
Numerical methods Numerical Recipes ODE integration

5.10 Implementation Phases

Phase 1: Thermal Model (3-4 days)

Goals: implement heat balance integration. Tasks: implement radiation term and internal heat. Checkpoint: steady-state temperature matches analytic solution.

Phase 2: Eclipse + Heater (3-4 days)

Goals: model eclipse and control heater. Tasks: add eclipse schedule and hysteresis control. Checkpoint: heater turns on/off at thresholds.

Phase 3: EPS Coupling (2-3 days)

Goals: integrate heater power with SoC. Tasks: add SoC input or coupling to EPS model. Checkpoint: heater disables when SoC too low.

5.11 Key Implementation Decisions

Decision Options Recommendation Rationale
Integrator Euler / RK4 Euler Simpler and sufficient
Heater policy fixed / SoC-aware SoC-aware Protects battery
Model complexity single node / multi-node single node Good baseline

6. Testing Strategy

6.1 Test Categories

Category Purpose Examples
Unit Tests Thermal step known Q_in/Q_out
Integration Tests Multi-orbit sim golden_thermal.csv
Edge Case Tests No heater overcooling

6.2 Critical Test Cases

  1. No eclipse: temperature converges to steady-state.
  2. Eclipse: temperature decreases during shadow.
  3. Heater hysteresis: on/off transitions stable.

6.3 Test Data

configs/nominal.json
configs/no_heater.json

7. Common Pitfalls & Debugging

7.1 Frequent Mistakes

Pitfall Symptom Solution
Sign error Temperature increases in eclipse Verify heat balance signs
Wrong units Unrealistic temps Use SI units consistently
No hysteresis Heater thrashing Use two thresholds

7.2 Debugging Strategies

  • Plot Q_in and Q_out to verify balance.
  • Run with simplified parameters to validate steady-state.

7.3 Performance Traps

Large dt can destabilize integration; reduce dt if needed.


8. Extensions & Challenges

8.1 Beginner Extensions

  • Add a second thermal node (battery vs electronics).

8.2 Intermediate Extensions

  • Add temperature-dependent emissivity.

8.3 Advanced Extensions

  • Integrate with orbit propagator for dynamic eclipse fraction.

9. Real-World Connections

9.1 Industry Applications

  • Thermal planning for CubeSat missions.
  • Heater duty-cycle analysis.
  • OpenSatKit thermal monitoring examples.
  • cFS thermal telemetry apps.

9.3 Interview Relevance

  • Demonstrates multi-physics modeling and control.

10. Resources

10.1 Essential Reading

  • Fundamentals of Space Systems (Thermal control).
  • Spacecraft Systems Engineering (Thermal design).

10.2 Video Resources

  • Spacecraft thermal design lectures.

10.3 Tools & Documentation

  • numpy/matplotlib.

11. Self-Assessment Checklist

11.1 Understanding

  • I can write the thermal balance equation.
  • I can explain eclipse-driven thermal swings.
  • I can tune heater hysteresis.

11.2 Implementation

  • Temperature traces are deterministic.
  • Heater events logged correctly.
  • Overcooling triggers warnings.

11.3 Growth

  • I can propose a multi-node thermal model.

12. Submission / Completion Criteria

Minimum Viable Completion:

  • Thermal model with eclipse and temperature output.

Full Completion:

  • Heater control with hysteresis and EPS coupling.

Excellence (Going Above & Beyond):

  • Multi-node model with dynamic incidence angles.