---
# System prepended metadata

title: Extended Abstract

---

# Extended Abstract

## Multi-Domain Simulation Tools for Mission Analysis and Correlation

Todo Gonzalo: Liste alle Hardware samt Störeffekten, die momentan schon enthalten ist, beschreibe wie du COMPOL modelliert hast und zeige ein paar Plots. Du kannst auch noch den Effekt deiner Arbeit auf die COMPOL Mission beschreiben

Todo Johannes: Werkzeuge zum Aufbereiten und Korrelieren der Daten beschreiben. Korrelationserfolge beschreiben und weitere Parameter nennen, die noch korreliert werden können.

## Johannes
### Data Processing:
* Manual data set selection from Database with visualization tool (like Grafana)
* Google Spreadsheet and link to matlab for easy modification of retreived parameters (could also be any other spreadsheet - online or offline)
* Matlab Database Explorer for retrieval of data from SQL database (or other types) with input information in form of: start and end date & filter advice (from spreadsheet) 
* Matlab Functions for conversion of SQL raw data to Matlab timeseries for import into Simulink environment

### Model Correlation:
*  Simulation of several data sets (at different points in time)
*  Inital conditions for the simulation from first entries in data set (temperature and attitude) and TLE from NORAD (orbit)
*  Multiple (parallel) simulation runs
*  Comparison of logged data from the simulation with the telemetry data by the use of Matlab script: calculates RMSE from every telemetry data point by comparing to the simulation output at that time (measured from start of simulation) & output of a plot (for visual analization of the results)
*  Also calculates the trend but since the data points are not equally spaced, the trend can be misleading
*  Assessment of the results by looking at the phyical properties of the model (huge advantage of small model --> easy to understand the whole picture)
*  Adjustment of parameters accordingly
*  Repeat unit RMSE under certain threshhold

#### Disadvantage of RMSE with irregular data (or data itself):
*  Due to gaps in the data, the RMSE can be off and the best correlation by RMSE may not be a 100% fit --> several data sets to minimize this error

### Correlation Success:
*  Able to correlate one node of a simple thermal model to low quality telemetry data (in terms of regularity and integrety): final averaged RMSE for all data sets = about 2.1 K
*  Model Advantage: highly interconnected to other physical domains (digital twin) --> accurate "estimations" of environment

### Future Work:
*  Correlation could be extended to other subsystems/domains (ADCS, electrical,…) 
*  Implementation of other environments for the digital twin --> would enable correlation on ground in TVAC chamber 

### Text:
Prior to the correlation of the model, the appropriate data from the satellite has to be selected and processed. Due to a bad downlink qualtiy or other confounders, the received data from the satellite can have gaps or can be corrupted. To reduce the impact of these imperfections on the correlation outcome, several data packets were created, which do not contain any of these defects. This was achieved by a manual selection of data from the data base with a graphical visualization tool (like Grafana). By looking at the individual data points, the human brain is efficient in the identification of uncorrupted and uniform data. 
To import the marked data packets of interest from the data base into the Matlab environment, the Matlab Database Explorer was used. Besides its graphical interface, it also offers a method of interaction by matlab code, which facilitates the data import in an automated simulation environment. The inormation on which data should be fetched from the database can be stored in any kind of online or offline spreadsheet for a more user-friendly interaction with the simulation. In the case of the MOVE-II satellite, the data was fetched from a SQL database with the help of a google spreadsheet, linked to the matlab script. 
In order to be able to import the data into the simulink environment, it has the be converted into a *timeseries* object. By doing so, the simulation data can be compared to the telemetry data while the simulation is running, by the use of the *Data Inspector*.

The simulation model, covering several domains (dynamics, electrical, thermal), also called digital twin, is meant to be correlated to the telemetry data. To achieve so, an iterative process was developed, which will be described in the following.
The correlation of a simulation to only one source of data can lead to overfitting. To prevent this, serveral data sets at different points in time were chosen from the database for a diverse representation of reality. In the process of fitting the simulation results to the telemetry data, all comparison data sets were weighted equally.
For the initialization of the simulation, initial parameters such as the attitude of the satellite, the temperature of the nodes, and the SOC of the battery are required. These parameters can either be assumed or better be taken form the first measurement in the telemetry. For the correlation of the battery temperature of MOVE-II, the initial temperatures of all three nodes were set equal to the intital battery temperature of the simulated data set. Parameters regarding the position and orbit of the satellite were taken from the TLE (provided by NORAD) closest to the starting time of the simulated data set. 

To analyze the effect of a parameter change in the simultion, a reference data set was chosen. The criteria for this were high temporal resolution and uniform data distribution over the considered time range. By doing so, sensitivity analyses were conducted by altering one or two parameters at a time and analyze the output of these simulatin runs. Here, an outstanding advantage of a small, easy-to-understand model becomes clear. It was easy to determine parameters whose adjustment was likely to improve the correlation.
As the correlation is an iterative process, repeatable simulation runs had to be guaranteed. This was ensured by the use of a scripted simulation setup in MATLAB/Simulink. In addition, simulation runs were parallelized to take advantage of multicore processing to achieve increased speed in the model correlation. 
Afer each (multi)simulation run, its logged data was compared to the telemetry data by the use of a Matlab script. Here, the Root Mean Square Error (RMSE) was used as a reference value for comparing the quality of correlation. Additionally, a plot was generated for every simulation, in order to visually compare the two signals. 
Besides the RMSE, the difference in trend between the simulation and the telemetry data was also calculated. However, due to the telemetry data not being interruption free for the major part, its calculated trend can be very misleading. Therefore, it was largely neglegted in the further analysis.

The next step was to evaluate the changes in RMSE compared to the previous simulations and adjust the corresponding parameters until the RMSE fell below a certain threshold, i.e. the correlation was satisfactory.