Global Functionality -------------------- It shall be possible to upload and install new software to all computers. The software shall be modular. Modules shall be as independent from each other as possible. The whole functionality shall be distributed in Applications. Applications shall be interconnected in a software Application network. The software shall provide following functionality: Housekeeper: Collects, formats, stores, and sends per downlink status and telemetry. Time Manager: Maintains and distributes synchronized time. Commander: Receives, decodes and distributes telecommands. Timed Commands Manager: Stores, schedules and distributes timed commands. Mode Manager: Controls system operating modes and manages LEOP and Safemode command lists. Surveillance: Health Monitoring Watchdog: Controls timings of critical applications. Anomaly Manager: Collects anomalies and reports them as telemetry. Data Uploader: Receives, checks and assembles big data segments for any application. Downlink Manager: Manages downlink and data routing. Uplink Manager: Manages uplink and data routing. Mass memory manager: Allocates and maintains data storage as a simple file system in flash memory. Boot Manager: Receives, stores, verifies boot images and boot priority list. Thermal Control: Monitors and regulates component temperatures. Charge Control: Controls power generation, storage. Power Distribution Control : Controls and monitors power channels of the power distribution unit. Navigation: Determines satellite position, velocity vectors, Sun, Moon, Magnet vectors. Attitude Determination: Estimates satellite orientation using sensors and filters. Attitude Control: Maintains or changes orientation via actuators. Orbit Control: Performs manoeuvres to correct or maintain orbit. Payload Manager: Operates and schedules the payload instruments. Payload Mass Memory: Manages very big scientific data files. Payload Downlink: Transmits scientific data files. Payload Data Handling: Buffers, compresses and stores payload and system data. It shall be possible to replicate tasks for fault tolerance (Time and Space Redundancy). CPU load shall be less than 75%, Measurements in 30 seconds slices. CPU load due to I/O shall be less than 20%. Memory load shall be less than 80%. For each and all Applications ----------------------------- Each application shall be encapsulated in its own namespace. have a command interface to be controlled via telecommands. send periodically a heart beat (I am alive) with expiry date to the watchdog. send a short summary of its state as standard telemetry on request from Housekeeper. send extended telemetry on telecommand request to the downlink manager. be always ready to accept and execute telecommands. execute telecommands with highest priority. report detected anomalies to the anomaly manager. classify its own anomalies as critical (triggering safe mode) or non-critical (merely report). write important data in the common MRAM to enable the redundant application to recover. operate autonomously, even without commands from operator. attempt automatic recovery from transient faults. not access internal data from other applications. check command parameters plausibility. check sensor data for plausibility. report the corresponding anomalie, in case measurments are not plausible. check that its parameters and measurements are within the nominal range. There shall be a default range for each parameter. It shall be possible to modify all ranges via telecommands. High-priority threads must run shorter than 5 ms per cycle. (TC) Applications may store and retrieve own data from the Mass Memory. Applications may send autonomously extended telemetry. Autonomous Telemetry shall be limited to a maximal volume per time unit The maximal volume shall be configurable per telecommand. Housekeeper (HK) ---------------- The Housekeeper (HK) shall collect HK-Data from all applications. administrate a short-term buffer (30 Seconds) and a long History buffer. collect standard HK-Data from all subsystems two times per second store all collected HK-Data in a short-term Ring Buffer (30 Seconds) store locally HK-Data and keep a history in the History Buffer. The history shall be stored as CCSDS source packages. Store standard telemetry from all applications. Receive and store extended telemetry reports in the HK-History. Provide a timestamp for each Housekeeping record. Send the current HK-Data, anomalies and extended telemetry when downlink is active. Track if the computer is acting as worker or monitor. send a combination, ratio 1:64 (TBC) of current standard and historical telemetry to the downlink. send current telemetry in CCSDS virtual channel 0. send History telemetry in CCSDS virtual channel 1. Transfer short-term buffer data to History when entering in safe mode. At least the last 30 s of short-term buffer data shall be stored. The HK-History buffer shall be a ring buffer. The oldest data shall be overwritten first. The capacity of the long-History shall be enough for 48 hours (TBC) at once per minute. The period to store the HK-Data in the History shall be dynamic. Configurable per Telecommand from 2 Hz to once per minute. In case of safemode, it shall increase the rate up to 2Hz. On entering safe mode, HK shall transfer short-memory data to long History. Data sent to the downlink shall be encapsulated in CCSDS source packages. When ground contact is on, the housekeeper shall: send the newest standard HK-Data every second (TBC) to the Downlink in virtual channel 0. send as much as possible of the History buffer to the Downlink in virutal channel 1. send boot counter and SW-Version to the Downlink. send boot counter and SW-Version of the Monitor Computer (the worker sends). Time Manager (TIM) ------------------ The Time Manager shall have a time granularity and unit of nanoseconds. maintain the time representation in 64-Bit values. maintain a board time (for the OS), UTC, GPS-Time, Satellite Time. be able to synchronise the local time with a satellite global time. synchronise the UTC with the ground station (per telecommands). synchronise the GPS-Time with the GPS Receiver using OPPS hardware. compensate hardware clock drift. All computers shall be synchronized with a precision better than 1 ms. Local time stamps shall have a precision better than 10 µs. Thread activation shall have a precision better than 10 µs. The absolute accuracy of onboard UTC time shall be better than 1 second. The PPS from GPS shall be used to synchronise the GPS time with a precision better than 10 µs. UTC starts counting nanoseconds from 00:00:00 on January 1, 2000. Board time starts counting nanoseconds from the most recent boot time. GPS time starts counting nanoseconds from 00:00:00 on January 6, 1980. Commander (CMD) ---------------- The commands shall be CCSDS compliant. Report of command acknowledgements shall be like ECSS-E-70-41A in the operational control field (OCF) Command acknowledges shall bypass the telemetry: every downlink-frame shall contain one. (OCF) Command ack shall include current sequence counter, ID of last received and executed command. Commands in a sequence shall have a sequence consecutively counter from 1. A command can be accepted if its sequence number is 0 or the num. of the last command + 1. Rationale: In this case, it is easier to understand a program than the text! This is the corresponding algorithm: int expectedSeqCounter = 0; bool shallAcceptCommand(int counter) { if (counter == 0) { expectedSeqCounter = 0; return true; } if (counter != expectedSeqCounter + 1) return false; expected_seq_counter++; return true; } It shall be possible to send a sequence of commands as a transaction. Commands of a transaction shall be executed by all or none. Commands of a transaction shall be a sequence, like defined before. There shall be commands to signal begin, end (= execute) and abort of a transaction list. The commander shall receive commands from the 'Uplink Manager'. always be ready to receive commands. send ECSS-E-70-41a immediately acknowledgements bypassing the telemetry (OCF) ensure command integrity upon receiving and before executing or forwarding: test sat Id, authentication (TBC), checksum, sequence counter, duplication. reject commands which do not pass this integrity check. discard any duplicate commands within a short time period. distribute and execute commands which pass this test. differentiate between immediate and time delayed (timed) commands. manage transactions of commands write commands of transaction first in a list. clear the list in case of abort transaction. execute the list upon accepting the command “end of transaction” = "execute transaction". forward immediate commands to the relevant application without delay. forward timed commands to the 'Timed Command Manager'. report the status of each received command to the housekeeper: discarded, executed, to time manager. log the number of timed, executed and discarded commands as part of the standard telemetry. log the IDs of the last 8 (TBC) executed commands as part of the standard telemetry. log a list of executed commands with time stamp. log a list of received commands with time stamp. log a list of rejected commands with reason and time stamp. send the log of commands to telemetry on request. Timed Command Manager (TCM) ---------------------------- It shall be possible to define the time point when a command shall be executed Immediate commands (handled by the commander) Timed commands relative to (handled by TCM) now UTC on board time activation of the command list Timed commands shall be stored in a list (timed command list) for later execution. Each stored command shall have an status flag: activated, passive. The timed command list shall be sorted by execution time. The Timed Command Manager shall receive timed commands from the commander and store them for execution at a later time point. first, mark each received command as passive and write it to the timed command list. write a new timed command in the list only if its time is later or equal as the last in the list. report an anomaly for each new command which execution time is earlier than the last in the list. be able to receive lists of timed commands from other applications (e.g. Mode Manager). be able to delete its own list and substitute it with lists coming from other applications. distribute activated timed commands as soon as its execution time has been reached. delete passive commands as soon as its execution time has been reached. report an anomaly for each passive command which execution time has been reached. have an standard telemetry which includes: next timed command to be executed: ID and time. Number of executed/distributed timed commands. Number of stored commands and the available space. Number of activated and passiv commands in the timed command list. When commanded, the Timed Command Manager shall remove all passive commands. activate all passive commands. clear the complete timed command list. send following extend telemetry the command IDs, time of execution and activation flag of the stored commands. the entire list of stored commands (distributed in several telemetry frames). selected parts of the list of stored commands. activated commands. commands waiting for activation (passiv). Mode Manager (MDM) ----------------- The Mode Manager shall control the mode of the satellite and transitions from one mode to another. have a timed command list for every satellite mode (mode-list). Execution time shall be relative to list activation. have some alternative command lists. store the lists in flash memory (using the mass memory manager). receive alternative command lists from the data upload manager. send the corresponding command list to the timed command manager when entering in a mode. receive anomaly reports from all other applications. go to LEOP (only) for the first time the computer boots after the separation from the launcher. go to safe mode if an application reports a critical anomaly and it is not already in safe mode. go to safe mode after each following reboot of the computer. go to safe mode after each switch worker-monitor of the on board computers. go out of safe mode only when commanded. go out of LEOP mode only when commanded. have an standard telemetry which includes: current mode, time of entering, previous mode. When commanded with parameters X and Y, the Mode Manager shall change from the current mode to mode X. assign the X alternative command list as the Y mode list. send the content of the X list as extended telemetry. delete the X alternative command list. verify the plausibility of all commands in the X command list. Surveillance (SUR) ------------------ Surveillance shall operate at low priority and not interfere with the timing of other applications when scanning memories. detect anomalies not covered by other applications. send an anomaly report to the Anomaly Manager for each detected anomaly. identify critical anomalies and flag them as critical. scrub RAM memory to detect and correct bit flips. (with low priority) check MRAM integrity. (with low priority) check Flash memory integrity. (with low priority) analyse error counters in I/O drivers. analyse error counters in WiFi transfers. monitor stack usage of all threads. (with low priority) provide standard telemetry including: check counter, number of anomalies found, and last anomalies. When commanded, Surveillance shall set or modify the allowed limits for monitored parameters. enable or disable specific checks. define which anomalies are critical (to trigger or not trigger safe mode). verify checksums of critical objects stored in memory or flash. clear all its error counters to 0 watchdog (WTD) -------------- Watchdog shall receive I'm Alive messages with expiry deadlines from vital threads. periodically check all expiry deadlines and trigger the configured action if exceeded. trigger the computer’s hardware watchdog periodically and on time. send periodic Node-Alive messages to the Power Distribution Unit. send periodic keep-off signals to the redundant computer provide standard telemetry including list of registered threads, configured actions, and timing violations in cold redundancy mode, trigger keep-off signals to the partner computer periodically. wait a random delay before sending the first keep-off signal. Rationale: avoid both computers sending keep-off signals simultaneously after power-on. when commanded, the Watschdog shall reset the computer. let the redundant computer become master (stop sending keep-off signals) configure cold or hot worker-monitor computer redundancy. configure the action to be taken on a timing violation. Alternatives: send a non-critical anomaly for the first timing violation of the corresponding thread. (dangerous) send a critical anomaly (->safe mode) for the first timing violation of the corresponding thread. (danger) stop sending keep-off signals to the partner computer (= Trigger worker-monitor rotation) reset and reboot the computer (default and recommended). Anomaly Manager (ANM) -------------------- The Anomaly Manager shall receive anomaly reports from all applications. log with time stamps the received anomaly reports. have standard telemetry with an anomaly counter and list of the last 10 (TBC) anomalies. When commanded, the Anomaly manager shall send extended telemetry with a histogram of counters for all anomalies. send extended telemtry with a list of the last 100 (TBC) received anomalies with timestamps. reset the global anomaly counter. reset all counters from the histogram. clear the anomaly log. Rationale: It is not the responsibility of the ANM to trigger safe mode in the event of critical anomalies; this is the responsibility of the Mode Manager. data uploader (DUL) ------------------ Rationale: We have implemented a protocol for effectively uploading large data files on top of the CCSDS protocol, which assumes a high rate of package loss. To be uploaded, a data file must be divided into smaller segments that fit into CCSDS source packages within a single transfer frame. These segments have a fixed length and a checksum, and are numbered sequentially from 0 to N. The ground station sends as many segments as possible in burst mode with each pass, without waiting for acknowledgement. The Data Upload Application then receives these segments and assembles them into a large data file according to their index, in memory (RAM or flash), using the Mass Memory Manager. Segments may be missing. The DUL keeps a record of the correctly received segments in a bitmap with N bits. Bit X corresponds to segment with the index X. The ground segment may request that DUL sends this bitmap as extended telemetry. This enables the ground segment to identify missing segments and prepare for the next pass/oportunity CCSDS frames containing the missing segments. This procedure is repeated until the data file is complete on board the satellite. The ground segment procedure can be automated and does not need to be performed manually. Please note that the content of the data file is irrelevant for the data upload. It can contain a boot image, command list, parameters, patches, etc. The Data Uploader shall get CCSDS source packages from the Uplink Manager containing Data Upload segments. check the integrity of each received packet (length and checksum). assemble the correct segments into a single data file according to the index of each segment. place each data segment in the correct position according to its index. keep track of all correctly received segments in a bitmap. store the data files in flash memory using the mass memory manager application. make no distinction about the content of the data files to be uploaded. have no restrictions about the time taken to upload a data file (e.g. days or weeks). be able to assemble a data file with segments coming from several ground segment passes. have no restrictions about which ground segment the data segments come from. When commanded, the DUL shall give stored data files to other applications for access send the current bitmap and file ID being used for the data upload via extended telemetry check the uploaded file and send the result and checksum via extended telemetry The maximum size of a data file shall exceed the size of a boot image. Downlink Manager (DLM) ---------------------- The downlink manager shall manage the S-band transmitters. guarantees that a maximum of one transmitter is on at any given time. use both S-Band transmitter alternatively; but never at the same time. turn the transmitters off 30 minutes after turning on (if not done before by telecommand) report the status of the transceiver in its standard telemetry. notify other applications (e.g. housekeeper) when downlink is running. be compliant with CCSDS downlink frames and packages. send the command-acknowledgements in the operational control field (OCF) of each transfer frame. get telemetry from the housekeeper and forward it to the S-band transmitter. merge virtual channel 0 (real-time telemetry) and virtual channel 1 (history) in the trnasmission. transmit the latest standard telemetry in virtual channel 0. use the Hardware DMA to do not overload the CPU. code the data stream according to CCSDS NRZ-L (TBC). generate counters and checksums for the transfer frames. send downlink data to both transmitters (even if only one is powered) after 3 days without ground contact, transmit an ID beacon once per minute. maintain a continuous, gap-free bit stream in the downlink. send idle frames if no data or delayed data is received. Rationale: Typical receivers at the ground station require a continuous bit stream In order to remain synchronised with the transmitter. When commanded, the Downlink Manager shall Activate or deactivate telemetry transmissions. Turn the transmitter on or off. Reset the transmitter. Select which transmitter to use. Uplink Manager (ULM) -------------------- The Uplink Manager shall manage the S-band receivers. keep both receivers on during nominal operations (TBC). keep at least one receiver on even in the event of critical limited energy. always be ready to receive and process uplink frames. be compliant with CCSDS uplink transfer frames and source packages. decode the data stream according to CCSDS NRZ-L (TBC). identify the beginning of transfer frames. extract source packages from transfer frames. after one day without a ground contact report a non-critical anomaly. after one day without a ground contact turn the receivers off and on again Turn they on again, even if they were turned off by telecommand. after three days without a ground contact report a critical anomaly and trigger safe mode. after 3 days without ground contact, transmit an ID beacon once per minute. read data from both receivers (even if only one is on). verify received frames. Satellite-ID, Checksum, Authentication. eliminate corrupted or illegal frames. eliminate duplicate frames from both receivers report the status of the receivers and frame counter in its standard telemetry the CCSDS downlink operational control field (OCF). forward received source packages to the commander, timed commands manager and data uploader When commanded with parameter X, the Downlink Manager shall Turn the receiver X off and on. Reset the receive X. Define receiver X to be preferred to receive uplink frames. Mass Memory Manager (MMM) ------------------------- Rationale: Please do not confuse the Mass Memory Manager (MMM) and the Payload Mass Memory Manager (PMMM). The former is present in every computer and stores files in its flash memory, while the latter manages huge data volumes. The Mass Memory Manager shall Manage files in a simple file system (directories not required) in the flash memory of the host computer. The content of files shall be irrelevant to the Mass Memory Manager. The only limitation to file size shall be the size of the flash memory. support the Data Upload Manager to upload data files in small segments. keep track of existing files. be able to copy data files to other computers. be able to receive and store data files from other computers. be able to assign determined addresses to a new file (e.g. for boot images). provide an API to allow any application to perform the following operations create files delete files open/close files write to/read from files generate and verify a checksum for a file pass file access to other applications When commanded with parameter X and Y, the Mass Memory Manager shall Create a file with ID X. Delete file X. Delete all files. Copy file X to Y Send per extended telemetry something like the Linux commands 'ls -l', 'df' and 'du'. the checksum of file X and of its pages. the content of or part of file X Boot Manager (BOM). ------------------- Rationale: We have several boot images. Each one has a CRC to verify its integrity. The boot images are listed in order of priority. The first image in the list has the highest priority. The booter selects and activates the fist intact boot image. Boot images shall include extended data: magic number, CRC, software version, length and start address. The correctness of a boot image shall be verified by testing the extended data (booter and boot manager). The Boot Manager shall have a common data basis (in Flash memory) with the booter of its computer. communicate with the booter via this data basis. prepare the data the booter needs to start/boot the computer. be able to instruct the booter to use a specified boot image once, after which normal selection shall resume. have in standard telemetry including boot counter, Software Version, Next image to boot manage at least three independent boot images in flash memory. be able to retrieve files from the mass memory manager and store them as boot images. not overwrite the current boot image. not overwrite any booter. have a unique identifier for each boot image. manage a list of boot images which the booter shall use to select the appropriate one. the list of boot images shall be sorted by priority, with the next image to boot coming first. When commanded, the Boot Manager shall send extended telemetry with the configuration for the booter. take a file from mass memory and copy it as a boot image. activate or deactivate boot images from the boot list. change the priority of boot images. set a boot image to be started next, but only once. (see BOM.06) send extended telemetry with the boot image list. test the correctness of boot images and report it via extended telemetry Thermal Control (TEC) --------------------- Every temperature-sensitive component shall have a temperature sensor. Every temperature-sensitive component shall have a nominal and critical temperature range defined. Every component that could become too cold shall have an electrical heater. The Thermal Control shall monitor the temperatures of all temperature sensors. verify the plausibility of the read values. have a cycle time of 10 seconds (TBC). control (on/off) all electrical heaters. prevent the undercooling of temperature-sensitive components. activate heaters where the temperature is below the low limit deactivate heaters where the temperature is above the low limit + hysteresis. log all heater activation and deactivation events with time stamps. prevent the overheating of temperature-sensitive components turn overheated components off send a critical anomaly (trigger safe mode) in the event of critical overheating When commanded, the Thermal Control shall modify the allowed temperature ranges for each component; send all measured temperatures via extended telemetry. Charge Control (CAC) ------------------- The Charge Control shall monitor the voltage and current from the solar panels. monitor the voltage and current from the batteries. monitor the charge levels of the batteries. prevent batteries from deep discharge. prevent batteries from overloading. try to keep the batteries as full as possible. interrupt the power supply to the batteries when they are full. signal a critical anomaly (trigger safe mode) if the batteries are discharged below 30% (TBC). open all solar cell shunt switches if the batteries are discharged. send as standard telemetry the charge state of the batteries and currents from solar cells and power unit. When commanded with parameters X, Charge Control shall define the charge limit of the batteries to decide discharged, nominal or full. shunt the solar string X on or off according to command. send per extended telemetry the state of batteries and solar cells. Power Distribution Control (POD) ------------------------------- The Power Distribution Control shall control power on/off for each power channel of the power distribution unit. ensure that at least one receiver remains continuously powered. take into account Latch/keep on/keep off switches when controlling on/off of channels. send periodically keep-on pulses for all keep-on-channels, which shall be on. send periodically keep-off pulses for all keep-off-channels, which shall be off. read periodically the status, voltage and current of all power channels. verify if voltage/current of each channel is as expected considering its expected on/off state. signal the corresponding anomaly in case these values are not as expected. verify if the voltage and current of each channel are in the expected range. signal the corresponding anomaly in case these values are out of range. turn the channel off in case its current is higher than the defined critical value. when commanded with parameter X, the Power Distribution Control (PDC) shall turn the power channel X on or off (as commanded). define the expected voltage and current range for channel X. define the critical current to turn channel X autonomously off. send the status of all power channels by extended telemetry. send the voltage and current of all power channels by extended telemetry.