Nebula Public Library

The knowledge bank of ESA’s R&D programmes

Pre-qualification of a Mathematical Library for Flight Software

Programme
GSTP
Programme Reference
G617-193SW
Prime Contractor
GTD GMBH
Start Date
End Date
Status
Closed
Country
Germany
Objectives
Mathematical libraries are used in any Flight Software and in particular in the AOCS/GNC and scientific algorithms. The most common mathematic functions used are:
 
  • Trigonometric functions.
 
  • Other floating point operations (e.g. square root).
 
Each project happens to re-qualify the mathematical library which is used in the on-board software for basic mathematical computations. The library exists at two levels:
 
  • A basic level used by the compiler for simple operations (libm).
 
  • A more functional level performing operations useful for e.g. control loops and that can be also used in Matlab/Simulaink.
 
The objective of the activity is to pre-qualify these libraries at the criticality level B of the ECSS-E40 and Q80 software standards.
 
 
Description
The common practice to manage the above functions in a Flight Software project is to isolate well known and established functions like libm, and to characterise these functions with respect to input ranges, errors and performance. The mathematical library from newlib is widely used as a basis for flight software in the European space industry, but it is developed in the open source community, where, however, most of the mathematical functions are based on implementations from Sun from the 1990s. Note also that the mathematical library used in Matworks products Matlab and Simulink is the ?Intel Kernel Math library? which is proprietary and can not directly be used in flight software.
 
This approach doesn?t cover corner cases where some of these functions might reveal an unexpected behaviour, and it is normally not consistently applied across different environments (e.g. Matlab/Simulink, Software Validation Facility, target Flight Software).
 
The mathematic functions included in the libm for SPARC rely on an old implementation and doesn?t take full advantage of the FPU present in all the flight processors currently in use.
 
The usage of different mathematical libraries in different environments (i.e. Functional Electrical Simulator, Software Verification Facility, target Flight Software) leads to inefficiencies when validating the AOCS/GNC and scientific algorithms, because different precision and errors in the results need to be taken into consideration, and generally require to re-run the validation and characterisation tests in every environment.
 
To overcome the above mentioned potential problems the activity includes:
 
  • To analyse existing state-of-the-art mathematical libraries and to identify the best practises in the use of a mathematical library in FSW in order to take full advantage of the FPU, minimise impacts caused by variability in the input arguments, and enforce control on the deployed FSW.
 
  • To identify and characterise the optimal mathematical functions with respect to predictability, numeric precision and performance.
 
 
  • To identify the best practices in the use of mathematical libraries on Funcional Engineering Simulator (FES) (e.g. Mathlab/Simulink), SVF (e.g. processor emulator) and target environment, in order to maximise consistency in the AOCS/GNC and scientific algorithms results and to minimise the validation effort.
 
  • For each of the selected library/functions:
 
  • Apply the reuse process of ECSS-Q80 to understand what level of reengineering is needed for a Cat B level.
 
  • Perform this re-engineering (spec, design, all tests, etc).
 
  • Develop a reusable test suite that will be used in projects to delta qualify the library in the scope of the project.
 
  • Prepare a pre-qualification data package with all the documents requested by the software standards.
 
The test suite must also cover the numerical aspect of the work to be performed, by including some characterisation tests which are more related to the numerical behaviour of the library depending of the nature of the operation, the nature of the input (small numbers versus large numbers), etc.
 
 
 
Application Domain
Generic Technologies
Technology Domain
2 - Space System Software
Competence Domain
3-Avionic Systems
Initial TRL
TRL 4
Target TRL
TRL 6
Public Document
Final Presentation