400 likes | 537 Views
Instrument Critical Design Review EFW Flight Software Peter R. Harvey 2009 Sep 30. RBSP Radiation Belt Storm Probes. Outline. Flight Software Overview Flight Software Context Changes Since Preliminary Design Review Detailed Software Design Functional description
E N D
Instrument Critical Design Review • EFW Flight Software • Peter R. Harvey • 2009 Sep 30 RBSP Radiation Belt Storm Probes
Outline • Flight Software Overview • Flight Software Context • Changes Since Preliminary Design Review • Detailed Software Design • Functional description • Structural decomposition • Timing • Commands and Telemetry • Resource Margins • Software Verification and Testing • Status of Engineering Model Software • Development Environment and Support of Flight Operations • Backup Materials
Overview • Development Plan : RBSP_EFW_SW_001 • Heritage : CRRES, Polar, Cluster, THEMIS • Language: Z80 • Requirements: 192 Level 3 • Effort : ~14100 SLOC in 22 modules • Test Platform: ETU • Quality : Integrated with Flight Development • Major Functional Requirements: • Command Reception & Distribution • Real-Time Data Collection and Playback • On-Board Evaluation for Burst Triggering • Burst Data Collection and Playback • Sine-Wave Fits of E-Field & Mag Signals • Spacecraft Potential Calculation • Data Compression • Boom Deployment Control • Space Weather Packet • Backup EMFISIS Magnetometer
Context PROCESSOR CPU: IP Z80 Clock: 16 MHz PROM: 32K RAM: 56 K EEPROM: 128K SRAM: 64 K SDRAM: 256M FLASH: 32G A/D : 16-Bit
Changes Since PDR • Status of Action Items • Results of trade studies : None required • Major changes in software requirements : None • Major changes in ICDs : None • Major changes in top-level design : None • Peer reviews since PDR : FSW Peer Review Sept 3, 2009 • 7 Action Items in Backup Material • Major open technical, programmatic issues, or risks : None
Design • FSW Major Modules
FSW Components Source: RBSP_EFW_FSW_002
Boot/Initialization • Hardware Reset • Power-On • Watchdog Reset (3-seconds) • Reset Sequence • Copies PROM into RAM • Initializes Local Data RAM to zero • Issues Initialization Calls to Each Module • Starts in Safe Mode (low power) • Begins Engineering Telemetry (1-sec) • Checksums EEPROM programs (4 of them) • Selects first program with Good Checksum • Waits Until 10 seconds elapsed time • Runs Selected Program
Modes & Enables • FSW Modes • Safe – Minimal Power Configuration, Resets to Safe • Normal - FLASH Memory Allowed, Deployment Disabled • Engineering - Deployments Allowed
Timing • Timing • Dual Time Bases Required (Spacecraft & Instrument) • S/C & Instrument Both Provide 1Hz Ticks • DCB Actel Latches Time Difference Between Ticks • S/C Sends MET in APID 100 before the 1pps pulse • FSW Adds Time Offset into Packet Time • Accuracy of 0.001 sec required Src: RBSP_EFW_FSW_004_Analyses.xls TIME. See also RBSP_EFW_TN_015B.doc
Timing • Interrupts • 256 Hz Interrupt Process • Distributes CPU Time per Table • Basic ¼ second table repeats 4Hz • CMD gets 32 Hz • DFB Packet gets 128 & 16 Hz, etc. • Background measures 3.5%
Sectoring • Spin Sectoring (ACS) • Maintain 8-bit accurate spin phase on-board • Detect Sun Pulse and Determine Spin Period • Scientific Operation required for Spin Rates of 4-6 RPM • Capable of Handling Spin Rates of 3-15 RPM • Provide phase to FIT to take E&B data every 1/32 of a spin • Provide phase to BEB module to trigger sweeps • Provide phase to SCI to calculate spacecraft potential.
Deployments • Motor Deployment • DEP Module Controls SPB and AXB Deployment Motors • Deployment Enable Must be Commanded On • Same module as CRRES (2), Polar(4), Cluster(16), THEMIS(5) • Will Deploy One Axis at a Time (in Pairs) or One at a Time • Plan to Deploy AXBs One at a Time • Monitors Turns Clicks (SPB, AXB click rates = 0.4-6.4 clicks/sec) • Fail-Equal Strategy : Always Keeps Boom Lengths within 2 Clicks • Pauses a Motor on a Faster Boom and Waits for Slower Boom • Operates at 32 Hz (16Hz/boom = 25% margin on AXB) • Deployment Actuators • Deployment Enable Must be Commanded On • SPB Doors are Released by .25 to .50 second pulse at 28V • AXB Doors are Released by 5-71 seconds (hot-highV, cold-lowV) • AXB Booms are Released by 5-71 seconds (hot-highV, cold-lowV) • Doors are Independently Controlled • Operates at 16 Hz • Actuators Have Automatic Shutoff when Action is Complete
Data Collection • Data Collection • DMA Channels are Assigned to Each DFB Data Source • Based upon DFB settings, FSW determines packet rate and length • FSW Writes SDRAM Destination Addresses into Each Controller • DMA Addresses are Double-Buffered to Eliminate Gaps • FSW calculates the end of the Interval and raises SwapEnable • FSW writes Headers for Each Packet as it is produced • Operates at 128Hz (6 Fast Channels), 16 Hz (7 Slow channels) • Data Collection Rates • Peak Input Rate of 8 MHz (net) • Min Length 2 KB for raw data packets • Peak Packet Rate of 512 Packets/sec (pps) • Software designed to handle 128x6= 768 pps • Performance Measurement (nom 260 pps) : 2.1% CPU
Data Analysis • On Board Data Analysis – E & B Spin Fits • Spin Fit Calculations are Performed on DFB data • 32 16-bit data points are taken at Equal Angles and Stored in Array • Spin Fit Reduces 32 samples to Offset, Sine & Cosine terms
Data Analysis • On Board Data Analysis – E & B Spin Fits • Spin Fit Matrix • Results are A, B, C, Sigma (floating point), N (1 byte) • Fast Flt Point = 1 sign bit, 7 exponent bits, 16 mantissa bits • Each fit time tagged in MET (4 seconds, 2 subseconds) • Each Spin Generates 3+3+13+13= 32 bytes • Spin Packet is 8 Spins or 208 bytes • Performance: Fit Requires ~720,000 cycles (~43 msec est., 35 measured) • Angular Error at 6 RPM (worst case) is +/- 0.5 degrees (sampling)
Data Storage • Solid State Recording • SDRAM Hardware • 256 MB Capacity • EDAC Scrubbing • EDAC Uses upper 50MB • DMA-Channel Operable • Quadword Addressable • 49152 4KB Packets • FSW Functions Buffers Science Survey Packets to Telemetry Buffers Burst1 Science Packets out to FLASH (0.1 Mbps) Buffers Burst1 Science Packets back from FLASH (0.003) Mbps Collects Burst2 Science Packets (3.1 Mbps)
Data Storage • Solid State Recording • FLASH Hardware • 32 GB Capacity • EDAC Enabled Write/Read • DMA-Channel to/from SDRAM • Block Addressable • 2^18 128KB Blocks • Each Block has 2K extra bytes • EDAC • Bad-Block-Indicator • Erase Count Each 4GB module Powered Separately • FSW Functions • Stores/Retrieves Burst1 Science Blocks (32 4K packets) Circular Memory with Separate Read & Write Ptrs Memory mapping at the Chip Level (64 elements = 64 chips) Playback Commanded by Block# and Length Storage for 128 Playback requests at a time (3-7 days worth) Both Read/Write Block pointers Telemetered at 1Hz Ground S/W keeps MET to Block# relationship FSW_004_ANALYSES.XLS FMAP : FLASH Virtual-to-Physical Memory Map
Data Evaluation • Burst Trigger Calculation • FSW calculates how “good” the data is being collected in Burst1 and Burst2 • Uses same formula, different factors for Instrument-Shared-Data • FSW collects data from several sources into Table 5 • DFB Filter Data (Internal data set “x42”) (13x4 bytes) • APID 100 Shared Data (EMF, ECT, RBS) • Ground command for Conjunction value (“CCC”) • FSW Uses Uplink Table 1 for weights & thresholds • FSW Calculates B1, B2 and ExtFn at 4Hz • FSW Determines calculates requests in ISDM: • If value exceeds EXT_REQ_THR and EXT_REQ_ENA is 1, then a request is raised. • ISDM is calculated and sent at 1Hz
Data Compression • Compression • Selected packet is compressed using 16-bit Delta-Modulator v2 • DFB packets contain header info on how many waveforms are inside • DFB packets have 1-10 waveforms • Each waveform cut into 32-sample blocks • Result is 1 raw 16-bit sample, 31 deltas • The Width of the deltas is determined and the deltas are packed up • Packet compression time shown below for varying widths: • Required : 12 kbps output • Measured: • [w=15]: 620 kbps • [w= 1] : 97 kbps
Commands and Telemetry RT: 6235 bps TM: 12000 bps - -------------------- PB: 5765 bps
CPU Utilization • CPU Performance • Based upon 16.8 MHz processor • Measurements made on RBSP ETU DCB • Calculations in RBSP_EFW_FSW_004_Analyses.xls • Using Worst Case Compressable Data (10:1 compression) • Nominal Spin Rate (12 seconds) for Spin Fits
Memory Resources • PROM/EEPROM • PROM Functions • EEPROM Load • Uplink Support • L&EO Functions • EEPROM/Uplink • One-Time Events • Test Programs • Initialization Params • Science Upgrades • RESOURCE NEEDS • 45% PROM • 47% RAM • 3% EEPROM
Integration & Test • FSW Development • DCB BB, ETU & GSE used for development • FSW Developed in 4 phases • Verification Matrix Provides Status of Requirements • Comprehensive Performance Test on ETU • Load into Flight Systems • Joins IDPU Test Flow and Quality reporting • FSW Maintenance • IDPU ETU & GSE Maintained in Flight Configuration • Verify command uploads prior to uplink • Anomaly resolution
Verification • FSW Verification • RBSP_EFW_FSW_002_Tables.xls tracks requirement flows • Development status, test overview and procedure name
Verification • FSW Verification Status • Summary Table tracks requirement test status • All inspections and analyses completed
To Be Done Items • FSW Development • New Required Software from Peer Review • Flash MET-to-Block Readout • Full S/C EFW SSR Indication Stops Burst Playbacks • ICD related items • FSW generates proposed ISDM format but this format is not in any ICD • Format of ECT, RBS, EMF burst trigger data to EFW • Uplinkable Scripts to be defined • Space allocated for up to 16 in PROM and more in EEPROM • Verification at the Box & Instrument levels • GSE/SOC Flash Memory “MET-to-Block” data management • LVPS Control • BEB Sweeps • DFB Sol1, Spec and Xspec Data • Boom Door Opening & Wire Deployment
Development & Flight • Development Environment • WORD/EXCEL/Subversion for Document Development • NOTEPAD/ASM85/LINK85/MAKE for Code Generation • ETU Data Controller Board (DCB) • PROM Simulator • GSE Laptop with GSEOS, Spacecraft mini-emulator • GSE Screens and Python Scripts • Flight Support • WORD/EXCEL/Subversion for Document Development • NOTEPAD/ASM85/LINK85/MAKE for Uplink software • Engineering Model IDPU & 2 Booms • GSE Laptop with GSEOS, Spacecraft emulator • Updated Screens and Python Scripts
Backup • Backup Materials
Commands • Command Blocks • DMA Input in Blocks containing multiple Command Packets • FSW Checks/Decodes each Packet in the Block • FSW Handles APIDs 100, 260 and 261 • APID 100: Time and Status (1Hz) • Provide S/C MET, Status • EFW Recorder Status (255 = 100% full) • Shared Data from ETC, EMFISIS (inc. Mag Gain), RBSPICE • APID 260: Command Strings • Contain Strings of 16-bit Command Codes • Command Codes are Entered into 256-command FIFO • Command Codes are Executed Under Interrupt at 32 Hz • APID 261:Memory Loads • Memory Load Packets Include Address and Length • Variable Size Loads up to 250 bytes per packet • If EEPROM is ON & enabled, can directly load EEPROM
Engineering Telemetry • Housekeeping Telemetry • APIDs 262-26A Contain Software Generated Data • Commandable Rate Controls per packet type • Not Compressed (S/C & GSE do not need decompressors) • APID 262: IDPU Critical Housekeeping (1Hz) • Provide EFW_Shared Status • Provide EFW Critical Housekeeping Currents • Not Normally Saved in S/C SSR or telemetered • APID 263: FAST Digital Status (1/2 Hz, 160 bps) • Provide EFW Fast Digital Status • Packet length: 40 bytes • APID 264: IDPU Analog Status (1/16Hz, 18 bps) • Provide EFW Analog Status • Packet est. 36 bytes
Engineering Telemetry • ADID 265: BEB Analog (post-sweep) • Provides Boom Electronics Board readback • Fixed Length: 40 bytes • APID 266: Memory Dump (on demand) • Provides Ability to Verify Memory Loads, Parameters • Commandable Length up to 128 bytes of data • APID 267: Engineering HSK (1/8 secs, 96 bps) • Provide Slower Engineering Data, Command Feedback • Length : 96 bytes • APID 268: Event Log (after N events) • Provide Event telemetry (and Errors) • Commandable Number of Events to store (N = 1 to 16)
Engineering Telemetry • APID 269: Spin-Fit (1/96 secs, 18 bps) • Provide E&B Analyzed Data • Spin-Based Data = 8 Spins/Packet • Length = 208 bytes • APID 26A: Space Weather (1/spin) • Provide EFW Spin Fit Result • Provide Spacecraft Potential • Not Normally Saved in S/C SSR or telemetered • Length = 28 bytes
Science Telemetry • Telemetry • Packet Selection • Select Real-Time Survey, Burst1 or Burst2 if enabled • Selected packet is compressed by CMP module • Buffer pointers are moved enabling telemetry when TM module is able • Serial Telemetry DMA Management • Provides Mixing of SOH Housekeeping and Science Data • Implements “telemetry interface window” before 1 PPS • FSW Will Not Start a Transmission Beyond 5/8 sec • FSW maintains a bit rate monitor to regulate packet output • FSW transmits APID 262 (Health & Status) every second • FSW transmits other HSK packets (APID 26x) when ready. • FSW transmits 1 RT Science packet if ready • FSW transmits 1-2 Burst packets when bit rate < Allocation (12k def.) • Status • Successful TM stress-testing at up to 60 kbps
Memory Resources EEPROM Map
Memory Resources • SRAM Requirements • Functions Holds ~15K Code Image in RAM Variables ~12K Total Required of appx 27K • SRAM Provided 56K Directly Addressable 128K Page Addressable