Miguel Cardoso

Spacecraft Thermal Control System (STCS)

Project Overview

The Spacecraft Thermal Control System (STCS) represents a sophisticated embedded systems project designed to address the critical thermal management challenges faced by spacecraft in the harsh environment of space. The system ensures mission longevity, crew safety, and technological reliability through a distributed architecture that combines real-time simulation, precise control algorithms, and comprehensive visualization capabilities.

Setpoints Configuration Temperature Graph

System Architecture

The STCS implements a multi-device distributed architecture with three specialized processing units, each serving a distinct function:

1. Thermal Simulation Library (STM32F767ZI - NUCLEO Board)

2. Thermal Control Function (STM32F746NG - DISCO Board)

3. Visualization User Interface (ESP32 DevKit V1)

Mathematical Foundation

The system employs PID control algorithms for temperature regulation, represented by:

\[\scriptsize{u(t) = K_p e(t) + K_i \int_0^t e(\tau)d\tau + K_d \frac{de(t)}{dt}}\]

Where:

The thermal simulation incorporates environmental factors through:

\[\scriptsize{T_{actual} = T_{base} + \Delta T_{solar} + \Delta T_{eclipse} + \epsilon_{entropy}}\]

Where entropy-based variations (\(\epsilon_{entropy}\)) simulate real-space environmental uncertainties.

Implementation Details

Communication Protocol

The system uses custom UART-based communication with structured data framing:

Code Implementation

// Thermal control task implementation
void controllerTask(void *pvParameters) {
    HAL_UART_Transmit(&huart6, (uint8_t*)thermistors,
                      sizeof(Thermistor) * NUM_THERMISTORS, HAL_MAX_DELAY);
    char msg[] = "T1=64,T2=64,T3=64,T4=64 H1=64,H2=64,H3=64,H4=64\n";
    HAL_UART_Transmit(&huart7, (uint8_t*)msg, strlen(msg), HAL_MAX_DELAY);
    vTaskDelay(pdMS_TO_TICKS(ctrl_delay));
}

Real-time Data Processing

title

Data acquisition frequencies are configurable with:

Parameter Range
TCF_Data_Aquisition_Frequency 1-5Hz
VUI_Data_Aquisition_Frequency 1-5Hz
VUI_Plot_Time_Range 1-75 sec

The system supports two operational modes:


Implementation Details

The project was developed using:

Configuration parameters are stored in flash memory:

// Setpoint constraints
Setpoint_THERM-01 = -7
Setpoint_THERM-02 = -5
Setpoint_THERM-03 = 10
Setpoint_THERM-04 = -14

Educational Context

This project was developed as part of the C/C++ Embedded Systems Programming curriculum at Politécnico de Coimbra (Oct 2024 – Aug 2025), focusing on: