SIC - Spacecraft Interactive Control Language

 

I. Overview

SIC is a programming language designed specifically for remote, interactive communication with a launched spacecraft, allowing manipulation of the direction and speed of the craft based upon satellite reports of its location and objects in its path. The software provides a generic approach to spacecraft control development by allowing scalable performance. SIC allows the user to develop modules for use as directional control, and to verify control logic, path obstruction avoidance, and other mission-critical elements.

In addition to the software, a flight simulator is available to test the code thoroughly at varying levels before actual implementation. Hardware models provide for testing of the code while the control mechanism is still in the design phase. Consequently, the model allows more time for realistic testing, which reduces the risk of design failures.

Guidance, navigation and control (GN&C) systems include the onboard spacecraft and ground elements that are used to guide, orient and change the spacecraft position according to the mission requirements. Orbital maintenance, orbit transfer, orbit precession, station keeping, pointing, midcourse corrections, tracking, and many other spacecraft operations require navigation and control systems. Those requirements may also include various errors in the trajectory or orbit during the mission. Since those errors or corrections could be made autonomously, or by ground controllers, most spacecraft have the capability of onboard control calculations and ground-based control.

Rarely are the control and knowledge requirements clearly stated numbers, such as 0.1-degree pitch and 0.3 in roll and yaw. They are from such requirements as the maneuverability (needs to turn 180 degrees in yaw in 2 minutes) and the timing on the deployment sequences (needs to orient the solar array to the sun within 30 minutes after deploy) and thermal control requirements (keep the sun off the battery panel). Reliability and robustness, or the ability to continue controlling the spacecraft after a certain number of sensors and actuators failed, must also be considered.

Since most spacecraft have the capacity to upload flight software, the flight simulator allows for testing before being uploaded assuring the accuracy of performance. Simulation of unforeseen sensor failures supports anomaly identification.

SIC uses an input file with flight destination parameters and initial and current spacecraft location and creates multiple output files plus a graphical file of the flight path and surrounding objects. The craft parameters, such as mass, area, moments of inertia, are part of the program source code. The SIC simulator has the following 5 controllers:

Zero momentum, reaction wheel and torque
Zero momentum with thruster
Momentum biased, with earth, sun, or star sensor and gyrocompass
Inertial scanner, momentum based
Gravity gradient with torque

II. Requirements 

Guidance, navigation and control (GN&C) systems include the onboard spacecraft and ground elements that are used to guide, orient and change the spacecraft position according to the mission requirements. Orbital maintenance, orbit transfer, orbit precession, station keeping, pointing, midcourse corrections, tracking, and many other spacecraft operations require navigation and control systems. Those requirements may also include various errors in the trajectory or orbit during the mission. Since those errors or corrections could be made autonomously, or by ground controllers, most spacecraft have the capability of onboard control calculations and ground-based control.        

Most programming languages are based upon a discrete model of execution. The program begins execution, and then, in some order:

  1. Reads relevant data from the local file system
  2. Produces some answers
  3. Writes data to a local file system

This description clearly shows the presence of two classes of data: temporary (transient) data, which has a lifetime being the execution of the program, and persistent data, which has a lifetime transcending the execution of the program.

For most applications, the separation of data into transient and persistent objects is a satisfactory situation. However, in the case of spacecraft flight, this is inefficient. We could have the entire database be an array, and simply have the program loop, waiting for new information, which would avoid the necessity of rereading the data (like location, environmental information, etc.). However, if the system failed, by programming error or power loss, all transient data are lost.

We have solved this by designing SIC as a persistent programming language. In this case, there is no distinction between transient and persistent data. All changes to “transient” program variables are immediately reflected in changes to the persistent database, and there is no need to first read data into transient storage. The two concepts are the same, resulting in reliability in the storage system if the system should fail during execution.

Because spacecraft manipulation involves interaction with input-output devices within a fixed time period, SIC is a real-time programming system. In real-time computer systems, failure of part of the hardware of an external input-output device often leads to a task’s being abruptly terminated. If other tasks wait on such a failed task, the entire system of tasks may deadlock and cause the crash of the entire system. This is why SIC includes the explicit notion of time in its design. The system works without the presence of human surveillance, responds to interrupts in a time frame dictated by the external environment, and has multi-tasking ability.

Command & Data Handling

The command and data handling (C&DH) system provides the processing, data distribution and executive control functions within the spacecraft data and communications elements. These functions are allocated to several computer systems with redundant components for necessary reliability.

Components:

1. CPU - the central processor unit handles internal data manipulation in the individual computer units

2. Command Processor - used for interpretation, validation, and relay of data from the receiver to the proper  interface circuit or subsystem

3. Memory - the various types of memory required for data operations include random access (RAM), bulk (disk, tape, etc.), and circuit (hard) memory used for CPU functions
 

Functions:

1. Process commands from receiver and onboard executive controller
2. Retrieve data for transmission to ground
3. Store data from sensors and command processor for later transmission
4. Process telemetry and instrument (sensor) data for relay or storage
5. Control spacecraft system/subsystem functions
6. Format data for onboard operations, relay and/or transmission
7. Check redundant operations for errors and possible error recovery procedures
8. Maintain basic communications and operations functions in case of errors/failures


Organization:

1. Overall system organization includes communications, commands and computing
2. Design guidelines provide for maximum flexibility with a minimum or hardware & software resources
3. Data distribution topology used to maximize speed and accessibility
4. Network topology must be readily accessible by all components
5. Communications link must support computing, data transmission and storage needs
6. Operating systems must be capable of handling all functions as rewired
7. Redundancy necessary to provide for eventual errors and partial failures
8. Reconfiguration must be built into system for changes in mission


Design requirements:

1. Must provide sufficient processing speed for sensor data - this is an   absolute necessity

2. Must have sufficient data storage to allow expected communications interruptions while sensors (or receivers for communications or relay satellites) are generating data

3. Must be adaptable to changing mission requirements - reconfigurable

4. Must be autonomous in case of errors or partial failures

5. Must be redundant to test and recover from errors or partial failures

6. Must be hardened and/or shielded against expected radiation levels

7. Must have uninterrupted electrical power

8. Mass minimized

9. Power requirement minimized

Guidance, Navigation and Control

Spacecraft flight is programmed, measured, and controlled through the guidance, navigation and control system (GN&C). Various subsystems on the spacecraft determine the flight path or orbit, measure the actual path, or rely on ground-based measurements and computations, and correct or control the flight path accordingly. Some of the basic functions of the GN&C are described below.

Guidance - Spacecraft trajectory control during the thrust phase
Navigation - Determination of spacecraft position and velocity relative to a specified reference frame
Control - Spacecraft attitude (orientation) and trajectory control
Attitude determination - Determination of spacecraft orientation with respect to specified reference frame or
to objects of interest for the flight (Mars, for example, if traveling to that planet)
Attitude sensors
Accelerometer
Gyroscopic rate detector
Laser gyro rate and motion detectors
Star tracker (scanner)
Horizon (limb) sensor
Sun sensor
GPS
Magnetometer

The computing systems required for onboard processing and data handling on the typical spacecraft are multiple specialized processors with multiple redundancy. The amount of data acquired, transferred and stored on today's spacecraft is so great that dedicated subsystems to manage the data flow are used. The current computing systems on spacecraft are divided into main functional blocks or subsystems. Those subsystems are the primary components of the command and data handling system. A part of the spacecraft communications and telemetry system is dedicated to the C&DH system.

III. Features and Characteristics

Software Structure

SIC consists of four loops running at different frequencies. The fastest loop determines the resolution with respect to time. The position is updated every 10 seconds, as are the environmental forces and torques that change with it. All time parameters are modifiable for adaptation to smaller or larger spacecraft. Since spacecraft manipulation systems are embedded computer systems, in that one computer system is used to control part of a larger system, the failure of the computer system means failure of the larger system as well. Reliability and correctness are, therefore, primary attributes of the SIC language.

One of the key components of SIC is the use of structured data, to combine easy access with comprehensive data. The spacecraft data structure contains all data that are required to propagate the state of a vehicle. Programs are written without an underlying operating system and without the usual environment of files and I/O devices. Instead, the program interacts directly with nonstandard I/O devices through special procedures that take account of the peculiarities inherent in spacecraft manipulation. Much less emphasis is placed on files and file-oriented input-output operations. Access to special devices is provided through language features that give access to particular hardware registers, memory locations, interrupt handlers, and subprograms written in low-level, assembly language.

Error handling is of particular importance. Ordinarily, each program must be prepared to handle all errors internally, taking appropriate actions to recover and continue. Termination is not an acceptable alternative, and there may be no user in the environment that is able provide interactive error correction in a timely manner. The error handling must be able to account for failure of system components, in addition to the usual sorts of errors caused by bad data values. In SIC, this concern for internal error handling is evidenced in the extensive features for exception handling.

Two basic areas of spacecraft guidance and control are: attitude & trajectory determination, and attitude & trajectory control. The subsystems and components that make up an autonomous spacecraft guidance and control system can be described as the attitude/trajectory determination and the attitude/trajectory control components. However, nearly all spacecraft missions must be commanded or corrected by Earth-based control functions for changes in the mission, or to overcome errors that may occur during the launch or flight phases. These ground-based spacecraft control elements provide the versatility and modifications necessary for the many variables that occur during a spacecraft's operational lifetime.

Attitude, Articulation, Guidance and Navigation Control Sub-functions

Attitude Control: Uses sensors to determine attitude, and effectors to control attitude (Attitude is spacecraft
rotational orientation around its center of mass)
Attitude Sensor: Determines spacecraft attitude
Attitude Effector: Used to control attitude of spacecraft
Articulation Control (with Mechanical function): Control and movement of movable elements of spacecraft
Guidance Control: Uses propulsion devices to control spacecraft along path (control of spacecraft center of mass along certain trajectory)
Propulsion: Devices used to control spacecraft along its path, use rocket technology
Navigation Control: Uses sensors to monitor and extrapolate spacecraft position along a trajectory
Navigation Sensor: Sensor used to determine the spacecraft position along its trajectory

System Organization

The SIC C&DH system (or sometimes referred to as the command and data system, the computer command system, or the flight data system) is organized into functional blocks or subsystems. 

Executive control - software and hardware command and control, resource control, and scheduling

Command processing - this processor is responsible for interpretation/decoding, validation, verification, and distribution of uplink and onboard commands for the spacecraft

Computations - the unit responsible for data manipulation, scaling, calibration, formatting, compression, processing, and analysis

Data acquisition - The data from sensors and instruments normally is processed through an A/D (analog-to-digital) converter and transferred for processing and/or storage; the data rates for some instruments can be extremely high and several processors must be dedicated to data acquisition

Data storage - the bulk storage for payloads, instruments, communications (uplink and downlink data stored temporarily for backup & verification), telemetry, onboard operations, and systems status

Communications interface - the uplink and downlink communications requires data manipulation and formatting, sequencing, encryption and decryption, coding and decoding, and protocol operations

Mission specific operations - the payload and instruments have individual requirements that must be met specifically by the hardware and software design. The C&DH system must also have unique fault and error handling functions, as well as reconfiguration capability. These are provided within the overall design of hardware, SIC software, and human input.

Data Structures

 32 bits to 128 bits

32 bits

8 bits

32 bits to xxxx bits

32 bits 

Synchronization bits/code

Protocol Info

Spacecraft Address 

Commands & Routing 
or 
Payload, Status Data 

Error Handling 

Operating system

The computer operating system controls high level and low level computer operations 

A. Executive (overall) control

A high level software operating system for comprehensive operational control of subsystems, a large code with resulting
slow functional operation. Unix, VMS are examples of larger Earth-based operating systems.
Resource allocation - CPU, data, command, system/component functions, and communications
Scheduling - data operations, communications, computations, payload operations, engineering and flight events, fault
& error recovery tests, etc.

B. Subsystem control

SIC, a unique control language application that is available for the subsystem control in modular form
SIC is a versatile language that is capable of high data rate operations, which is why high-level languages such as
Unix cannot be used for subsystem control

C. Sensor/instrument control

Since most sensors and instruments have large data rates when operating, these control instructions must be simple,
efficient, dedicated, and fast.
SIC provides a machine level language, to save time consuming programming by the user

 

IV.   Grammar

<program> ::=

begin_program <variable_declaration> <statement> <functions> end_program

<variable_declaration> ::=

<variable_name> : <text>

| <text> : <variable_name>
| <number>
<number> ::= <integer>
| <long>
| <float>  
| <long float>

 

| <vector>  

<text> ::= | {<char>}

<vector> ::=  

vector[ <range>]

| vector[ <number>]
| vector[ <char> ][ <number>]

< position> ::=

vector[ <range> ]

 

| current_position_vector[ <range> ]

 

| correct_position_vector [ <range> ]

 

| find_position_vector [ <range> ]

<range> ::=

[ <number>, <number>, <number> ]

<rotate> ::=

<vector>[ <variable> ][ <range> ]

| <vector>[ <axis> ] [ <number> ]

<axis> ::=

<x> | <y> | <z>

<set_velocity> ::=

<number>

<statement> ::=

<expression>

<expression> ::=

<expression>

 

| <math_expression>

 

| <logical_expression>

 

| <control_expression>

 

| <operator_expression>

 

| <sychronize>

 

| <sensing_expression>

| <function>  

| while <expression> <statement>

 

| do <statement> while <expression><statement>

| switch ( <expression> ) <statement>

<operator_expression> ::=

<math_expression> ( "=" | " /=" | ">" | "<" | ">=" | "<=" ) <math_expression>

<math_expression> ::=

(<integer> | <float> ) = (<integer> | <float> ) +(<integer> | <float> )

 

| (<integer> | <float> ) - (<integer>| <float> )

 

| (<integer> | <float> ) * (<integer> | <float> )

 

| (<integer> | <float> ) / (<integer> | <float> )

 

| (<integer> | <float> ) ^ <integer>

<logical_expression> ::=

true[statement]

 

| false[statement]

<control_expression> ::=

<if_statement>

<if_statement> ::=

start_if [<pretest>] then <statement> end_if

 

| start_if then <statement> end_if [<posttest>]

<pretest> ::=

<sensing_expression>

<sychronize> <statement> ::=

<statement>

 

| <expression> <statement>

 

| <sensing_expression><position>

 

| <positon>

<function> ::=

begin_function [function_name] end_function

<function_name> ::=

<statement>

References:


http://spider.msfc.nasa.gov/ed13/guidance.html

Pratt, Terrence W. & Marvin V. Zelkowitz, Programming Languages, Design and Implementation, Third Edition, 1999,  Prentice-Hall, New Jersey

Pressman, Roger S., Software Engineering – A Practitioner’s Approach, 4th Edition, 1997, McGraw-Hill

Sebesta, Robert W., Concepts of Programming Languages, Fourth Edition, 1999, Addison-Wesley

Grutman, Mike, Astronautics, Spacecraft Design, and Spacecraft Systems Web Page,  http://ae-www.usc.edu/bio/mikeg/spacecra/spaccrft.html

Koenigsmann, Hans J. & Gurevich, Gwynne, SSC99-IIA-5, 13th AIAA/USU Conference on Small Satellites,  http://www.smad.com