SO-HIS Instrument Data Processing Between FSW and FPGA

SO-HIS Instrument Science Data Processing Between FSW and FPGA Flight Software Conference 2016 Chad Loeffler Benefiting government, industry and the public through innovative science and technology Chad Loeffler FSW Workshop 2016 - This Presentation Does Not Include ITAR Material 1 Topics Introduction Mission and Instrument Description Science Data Flow Outline Sweeping / Scanning Ion Classification Histograms Lossy Compression Lossless Compression

Raw Events Benefiting government, industry and the public through innovative science and technology Chad Loeffler FSW Workshop 2016 - This Presentation Does Not Include ITAR Material 2 Introduction SwRI (2005 - ongoing) Software Engineer Projects/Missions: IMAGE-MENA (Launched 2000 Ended 2005) supported command sequence testing on engineering unit. ROSETTA-IES (Launched 2004 - Ended 9/30/16) - script development, GSE updates, command sequence testing on engineering unit. IBEX (Launched 2008 - ongoing) Boot/PROM Flight Software. JUNO-JADE (Launched 2011 - ongoing) Science Flight Software. SOLAR ORBITER - SWA-HIS (Planned launch 2018 - ) Boot/PROM and Science Flight Software. Benefiting government, industry and the public through innovative science

and technology Chad Loeffler FSW Workshop 2016 - This Presentation Does Not Include ITAR Material 3 Mission and Instrument Description Solar Orbiter Excerpt From http://sci.esa.int/solar-orbiter/51168-summary/ Solar Orbiter is a mission dedicated to solar and heliospheric physics. It was selected as the first medium-class mission of ESA's Cosmic Vision 2015-2025 Programme. Solar Orbiter will be used to examine how the Sun creates and controls the heliosphere, the vast bubble of charged particles blown by the solar wind into the interstellar medium. The spacecraft will combine in situ and remote sensing observations to gain new information about the solar wind, the heliospheric magnetic field, solar energetic particles, transient interplanetary disturbances and the Sun's magnetic field. Benefiting government, industry and the public through innovative science and technology Chad Loeffler FSW Workshop 2016 - This Presentation Does Not Include ITAR Material

4 Mission and Instrument Description SWA Suite Excerpt From: http://sci.esa.int/solar-orbiter/51217-instruments/ The Solar Wind Plasma Analyser, SWA, consists of a suite of sensors that will measure the ion and electron bulk properties (including, density, velocity, and temperature) of the solar wind, thereby characterising the solar wind between 0.28 and 1.4 AU from the Sun. In addition to determining the bulk properties of the wind, SWA will provide measurements of solar wind ion composition for key elements (e.g. the C, N, O group and Fe, Si or Mg). Benefiting government, industry and the public through innovative science and technology Chad Loeffler FSW Workshop 2016 - This Presentation Does Not Include ITAR Material 5 Mission and Instrument Description HIS Instrument

Excerpt From: https:// www.ucl.ac.uk/mssl/space-plasma-physics/missions/solar-orbiter/swa-sensors/sw a-his SWA/HIS will make measurements which will enable the determination of the major charge states of oxygen and iron in the solar wind and provide a coarse mapping of the three-dimensional velocity distribution of some prominent minor species, such as weakly-ionized species (C+, N+, Mg+, Si+, Ne+, He+, etc.) SWA/HIS consists of a Sun-facing entrance aperture system with ion steering (IS) to divert ions from a range of incoming elevation/azimuth angles into the electrostatic analyser (ESA) module, coupled with a time-of-flight (TOF) telescope with solid state detectors (SSD) for total ion energy measurements. HIS will measure five key properties for all ions: mass in the range 2-56 amu/q, charge (q), energy and direction of incidence (, ).). Benefiting government, industry and the public through innovative science and technology Chad Loeffler FSW Workshop 2016 - This Presentation Does Not Include ITAR Material 6 Mission and Instrument Description HIS Instrument

HIS (Heavy Ion Sensor) is a NASA contributed instrument to the SWA suite. HIS has a Detector Section Control Board (DSCB) with an FPGA to handle the direct particle measurements. A Control and Data Handling (CDH) board has an FPGA for science data collection and processing. The CDH board has a microprocessor with Flight Software (FSW) for highlevel science data processing. CDH and DSCB FPGAs communicate via an optical link, with packetized commands uplinked from CDH to DSCB, and encoded data downlinked from DSCB to CDH. Benefiting government, industry and the public through innovative science and technology Chad Loeffler FSW Workshop 2016 - This Presentation Does Not Include ITAR Material 7 HIS Heat Shield Ions Mission and Instrument Description HIS Instrument EA-IS Ion Steering Electrostatic Analyzer

Ions Stop Anode & Interface Stop MCP Detector Section TOF Telescope C Foil Electrons Electrons Start MCP SSD SSD Preamps TDC Start Anode & Interface DS Energy Board

EDC Logic Sync Logic Each color represents a different institution supplying hardware. DS Command and Telemetry Survival Heater Redundant DS Control Board Temp Sensor 1 Temp Sensor 2 Telescope HVPS MCP/SSD/ES Power Supply DS LVPS (HV Side) HV Feed Through

DS Data Interface Optical Link DS Interface Board Temp Sensor 3 Survival Htr Power Temp Monitor Solar Orbiter Op Heater Redundant NOT Temp Sensor 1 POPULATED Temp Sensor 2 Main Electronics Box HV Safing

EA-IS HVPS ME Interface Board Post-Acceleration/ DS Power Board SpW Cmd C&DH SpW Tlm DS LVPS (Ground side) PA HVPS LVPS 28 V SWA (IAPS DPU) Benefiting government, industry and the public through innovative science and technology Chad Loeffler FSW Workshop 2016 - This Presentation Does Not Include ITAR Material 8 Mission and

Instrument Description HIS Instrument Benefiting government, industry and the public through innovative science and technology Chad Loeffler FSW Workshop 2016 - This Presentation Does Not Include ITAR Material 9 Mission and Instrument Description HIS Instrument Benefiting government, industry and the public through innovative science and technology Chad Loeffler FSW Workshop 2016 - This Presentation Does Not Include ITAR Material 10 Mission and Instrument Description HIS Instrument Benefiting government, industry and

the public through innovative science and technology Chad Loeffler FSW Workshop 2016 - This Presentation Does Not Include ITAR Material 11 Science Data Flow Outline CDH FPGA is science collection and coordination master. CDH FPGA uses reconfigurable lookup tables to set high voltage supplies to scan a range of Energy Per Charge (E/Q) and elevations, sweeping the high voltages from minimum to maximum values. CDH FPGA sends Start and Stop commands to DSCB FPGA, which counts all incoming particles and makes measurements for Time of Flight (TOF), position, and energy (not to be confused with E/Q). DSCB FPGA transmits accumulated counters to CDH FPGA for histogramming based on E/Q and elevation, and storage for FSW. DSCB FPGA transmits Pulse Height Analysis (PHA) words for each detected particle, which the CDH FPGA stores in a buffer for FSW. Benefiting government, industry and the public through innovative science and technology

Chad Loeffler FSW Workshop 2016 - This Presentation Does Not Include ITAR Material 12 DSCB OPTO WORD Science Data Flow Outline Science Arrives When Sweeping Type Non-Science Multi-SSD Toggle Switch ID ID <= 0xB Parallel Path ID == 0xC/D/E FSW FIFO

Sensor Histogram Species Lookup Priority Lookup Two Histograms If Species Identified Check PHA Max Limit If Limit Not Reached Check Priority Max Limit Priority Histogram VDF Histogram Matrix Histogram

If Limit Not Reached Check Elevation Max Limit If Limit Not Reached Benefiting government, industry and the public through innovative science 64-Bits and technology PHA Buffer Chad Loeffler FSW Workshop 2016 - This Presentation Does Not Include ITAR Material 13 Sweeping / Scanning

A High Voltage Step Levels table acts as a database, storing a set of 16 Elevation settings for each of the 4 HV supplies, for each of the 64 E/Q measurements. A Scan Control table acts as a sweep builder, with a max of 128 rows. Each used row contains a Settling Time for HV to move, a Dwell Time for science data collection, and an E/Q Index pointing to the Step Levels table. Tables are uploadable and reconfigurable, stored in MRAM, and copied to FPGA. Through a flexible table based approach, different modes of operation can be created with neither the FSW nor FPGA (master sweep controller) knowing the difference, allowing for arbitrary selection of E/Q order, number of E/Q, number of Elevations, and overall sweep/scan time. Normal Mode is 30 seconds of 64 E/Q x 16 Elevations, 29.3 ms per step. Burst Mode is 4 seconds of 32 E/Q x 16 Elevations, 7.8 ms per step. Low Cadence Mode is 5 minutes of 64 E/Q x 16 Elevations, 293 ms. Benefiting government, industry and the public through innovative science and technology Chad Loeffler FSW Workshop 2016 - This Presentation Does Not Include ITAR Material 14 Sweeping Scanning Benefiting government, industry and the public through innovative science and technology Chad Loeffler FSW Workshop 2016 - This Presentation Does Not Include ITAR Material

15 Ion Classification - Species For each raw event (PHA) the CDH FPGA receives from the DSCB FPGA, two classifications must be performed. A species identification is attempted to detect whether the ion is one of up to 32 different types that HIS distinguishes for histogram data. To perform the lookup, the CDH FPGA has a table that is 64 E/Q x 32 Species x 4 Boundaries, as the method is a function of E/Q, TOF, Energy. The 4 boundaries are corners of a box/rectangle, created from Lower Left TOF, Lower Left Energy, Upper Right TOF, and Upper Right Energy. The CDH FPGA uses the E/Q as defined by the Scan Control Table to know where to index the Species Lookup table, then goes through each of the 32 possible species, stopping when it finds the first that has TOF and Energy within the preselected bounds. Benefiting government, industry and the public through innovative science and technology Chad Loeffler FSW Workshop 2016 - This Presentation Does Not Include ITAR Material 16 Ion Classification Priority Range

The CDH FPGA cannot store all PHA, but must instead store a subset for FSW to process. To maintain a scientifically meaningful distribution, the CDH FPGA must classify the PHA into one of 8 priority ranges, which are groups of related ions. Each priority range is allocated a certain amount of storage space. The determination is still based on E/Q, Energy, TOF, like the species, except a range of ions cannot always fall into a box/rectangle. The graph of priority ranges contains sloped segments as well as nested items (smaller range falling within a subset of a larger range). Benefiting government, industry and the public through innovative science and technology Chad Loeffler FSW Workshop 2016 - This Presentation Does Not Include ITAR Material 17 Ion Classification Priority Range

Original specification was for an iterative lookup of ranges using calculation of slopes. Fixed-point math would have been doable in the FPGA, but would have also been complicated to implement and test, so avoided. Lookup must be done in microseconds, so not feasible for FSW to be interrupted for every PHA. Final implementation is a lookup table of 64 E/Q x 256 Energy x 512 TOF, which is 8M values. The returned value is a priority range between 0-7. Size of table is 4MB, where priority ranges are packed into nibbles, so two values per byte. Benefiting government, industry and the public through innovative science and technology Chad Loeffler FSW Workshop 2016 - This Presentation Does Not Include ITAR Material 18 Ion Classification Priority Range The problem with a 4MB lookup table used by the CDH FPGA in volatile

SRAM, is that it must be stored in non-volatile memory initially before being copied over, and HIS MRAM is only 1.5MB. FSW could have stored a series of equations and performed the calculations, building the table before providing it to the FPGA. But that could have been difficult to specify and implement in a way that could be changed later. Lossless compression was already used for science data products, so the lossless decompressor was retained for the priority range lookup table. Due to the repetitive nature of the lookup, the 4MB table compresses to 1.5KB with a ratio of 2800, storable in non-volatile memory. Decompression is performed on initialization, needing about 5 seconds. Benefiting government, industry and the public through innovative science and technology Chad Loeffler FSW Workshop 2016 - This Presentation Does Not Include ITAR Material 19 Histograms The CDH FPGA stores histograms and PHA in a double-buffer ping-pong manner, such that the FPGA writes to one set of buffers while FSW reads from the other set of buffers. At the end of every sweep, the FSW and FPGA swap buffers, such that the

FSW has a complete sweep time to process all data. The CDH FPGA builds a Sensor Histogram using the counters provided by the DSCB, arranging by measurement step, for a histogram that is 39 Sensor Counters x 64 EQ x 16 Elevation x 32 bits. The CDH FPGA builds a Priority Range Histogram by counting the number of PHA classified into each category, arranging by measurement step, for a histogram that is 8 Priority x 64 EQ x 16 Elevation x 32 bits. Benefiting government, industry and the public through innovative science and technology Chad Loeffler FSW Workshop 2016 - This Presentation Does Not Include ITAR Material 20 Histograms The CDH FPGA builds a Matrix Histogram by counting the number of PHA classified into each species, arranging by measurement step, for a histogram that is 32 Species x 64 EQ x 32 bits. The CDH FPGA builds a Velocity Distribution Function (VDF) Histogram by counting the number of PHA classified into each species, arranging by measurement step and Azimuth (reported by DSCB in PHA), for a histogram that is 32 Species x 64 EQ x 16 Elevation x 32 Azimuths x 16 bits.

Due to telemetry storage limitations on the Spacecraft, and the processing time required by HIS FSW, not all 32 species are included in regular operations. The CDH FPGA always produces them, but FSW allows each species to be individually enabled/disabled for FSW processing. Benefiting government, industry and the public through innovative science and technology Chad Loeffler FSW Workshop 2016 - This Presentation Does Not Include ITAR Material 21 Histograms Due to limitations on data storage by the Spacecraft, HIS FSW provides a means of arbitrarily collapsing / condensing large histograms into smaller histograms. FSW stores dimension maps that specify how the N indices of each dimension map into a telemetry index. For example, 32 raw Azimuths of a VDF could map into 10 telemetry Azimuths, mixing a summation of every 2 adjacent, a summation of every 3 adjacent, and a few singles in a row. This arbitrary mapping allows non-power-of-two reduction, and sections

of higher resolution or lower resolution than the other sections. FSW sums data when reducing histograms, such that only resolution is lost, not total counts. Benefiting government, industry and the public through innovative science and technology Chad Loeffler FSW Workshop 2016 - This Presentation Does Not Include ITAR Material 22 Lossy Compression HIS provides two lossy compression functions for histogram data: A which has resolution to ~500K, and C which has resolution to ~7 million. These could have been done in FSW, either through a function or binary search (both taking roughly equal time in trade study testing). Final implementation is in the CDH FPGA, which stores the 256 step values that indicate which uncompressed number is at the transition of the 8-bit compressed boundaries for each of A and C. The CDH FPGA performs the comparison operations with no additional wait states compared to regular register accesses. FSW writes the uncompressed value, then can immediately read the compressed value.

FSW allows arbitrary selection of which histograms use A vs C. Benefiting government, industry and the public through innovative science and technology Chad Loeffler FSW Workshop 2016 - This Presentation Does Not Include ITAR Material 23 Lossless Compression Multiple lossless compression algorithms were compared in a trade study to determine the best for HIS. Nominally, histograms and PHA will always be lossless compressed. Simulated input was created based on similar data collected by ACE/SWICS. RICE, LZSS, BZIP2, and LZMA were tested on a PC for the best ratios. For the selected data sets, LZMA performed the best. The average ratios from testing were 1.5 for histograms, and 2.5 for PHA. HIS has not launched yet, so no in-flight data has been obtained to provide actual ratios. Benefiting government, industry and the public through innovative science

and technology Chad Loeffler FSW Workshop 2016 - This Presentation Does Not Include ITAR Material 24 Lossless Compression LZMA is public domain / open source and used by the 7-Zip application. For use on HIS, the base implementation was modified to remove all dynamic memory access (no use of *alloc() calls, and thus no free() calls). Static fixed-size buffers were created for use by the algorithm, and the range of possible input configuration values was bounded to fit within those size constraints. Compression speed is highly dependent on data contents, but the worstcase average obtained from running simulated data through HIS was 20 bytes per millisecond at 50MHz. With multiple seconds to process data, and non-Burst data having a minimum of 30s, this speed is not a problem. Burst data size is scaled down so the transmission amount stays constant Benefiting government, industry and the public through innovative science and technology

Chad Loeffler FSW Workshop 2016 - This Presentation Does Not Include ITAR Material 25 Raw Events The CDH FPGA has a fixed-size buffer capable of holding ~450000 PHA. To maintain scientific sampling, that buffer must hold a distribution of the 8 Priority Ranges. To allow scientific flexibility, the CDH FPGA has configuration registers which allow soft partitioning of that buffer into 8 arbitrarily sized Priority Range buffers. Within each of the 8 Priority Range buffers, the CDH FPGA must maintain scientific sampling of the entire sweep while retaining flexibility, so provides an additional set of configuration registers to cap the maximum number of PHA for an Elevation scan step. FSW configures these options in the CDH FPGA before starting a sweep/scan, using values from stored lookup tables (or by command). Benefiting government, industry and the public through innovative science and technology Chad Loeffler FSW Workshop 2016 - This Presentation Does Not Include ITAR Material

26 Raw Events There are many more PHA stored than can be transmitted in telemetry. To maintain scientific sampling, FSW uses a randomization algorithm to select a subset of PHA from each of the 8 Priority Range buffers, being sure to never select the same PHA twice. To maintain scientific flexibility, FSW contains updateable table parameters that specify the percentage of telemetry that each of the 8 Priority Range buffers is allocated. Furthermore, FSW allows the total number of PHA in telemetry to be arbitrarily set, using the percentages above to scale the total from each of the 8 buffers. Benefiting government, industry and the public through innovative science and technology Chad Loeffler FSW Workshop 2016 - This Presentation Does Not Include ITAR Material 27 Raw Events

HIS is part of a suite, so only receives a portion of the data volume storage that other instruments have, due to the SWA allocation being divided amongst the suite sensors. Therefore, small improvements to the compression ratio translate to more PHA that can be transmitted. Each PHA is composed of 6 bytes, where each byte has some allocated purpose, like TOF, Energy, or Azimuth. Adjacent bytes have little resemblance to each other, whereas bytes of a like type are more similar (such as all the EQ bytes). To aid the compression algorithm, FSW reorders the PHA such that all like bytes (same type) are grouped together, providing more pattern similarity. This can be thought of as transposing rows and columns of a spreadsheet. Benefiting government, industry and the public through innovative science and technology Chad Loeffler FSW Workshop 2016 - This Presentation Does Not Include ITAR Material 28 Raw Events

To aid the compression algorithm even further, the PHA are first sorted before being reordered by same-type bytes. Using a spreadsheet example, it is like sorting by row and then compressing by column. The PHA are sorted numerically as 64-bit values, such that bytes of a certain type (when split out and reordered) will be in increasing order, such that same-number values are adjacent (within the confines of the higher order byte type they are under). For efficient and predictable timing, a Bottom-Up Merge-Sort algorithm is used, which is NON-RECURSIVE and O(NLogN) worst-case. Timing on HIS at 50MHz showed 32767 64-bit PHA sorted in 900 ms. Simulations showed an improvement of ~0.3 (~10%) in the compression ratio when both sorting and byte reordering. Benefiting government, industry and the public through innovative science and technology Chad Loeffler FSW Workshop 2016 - This Presentation Does Not Include ITAR Material 29 Questions? Any comments? Benefiting government, industry and the public through innovative science

and technology Chad Loeffler FSW Workshop 2016 - This Presentation Does Not Include ITAR Material 30

Recently Viewed Presentations

  • FOR OFFICIAL USE ONLY Air National Guard AGR

    FOR OFFICIAL USE ONLY Air National Guard AGR

    AGRs are required to participate in UTAs. If excused these members must be in leave status. UTA does not count toward the 40 hour work week. AGRs are accessible 24 hours a day, 7 days a week and do not...
  • Chapter 8: Plant and Animal Life Cycles Lesson

    Chapter 8: Plant and Animal Life Cycles Lesson

    Marigolds, petunias, wheat, cucumbers. Biennials complete their life cycle in two years. 1st year- roots, short stems, leaves. 2nd- lengthen stems, grow new leaves, produce flowers and seeds. Parsley, celery, foxglove. Perennials live for more than two years and mostly...
  • Chinese Baptist Church of San Jose

    Chinese Baptist Church of San Jose

    Cleanse Me (3) O Holy Ghost, revival comes from Thee; Send a revival, start the work in me. Thy Word declares Thou wilt supply our need; For blessing now, O Lord, I humbly plead. Cleanse Me (4) Edwin Orr, Maori...
  • 5.2.18 - Mr. Brown&#x27;S Ac Language Arts Class

    5.2.18 - Mr. Brown'S Ac Language Arts Class

    Summarize the discussion between Simon and Lord of the Flies? Is Lord of the Flies talking to Simon or is it a figment of Simon's imagination or is it something more sinister? ... Question Five . In chapter nine, the...
  • School of EPS - Support Services

    School of EPS - Support Services

    1 HW Central Computing Services = UICS (over in the HW Library) 2 EPS school IT services (Earl Mountbatten building, EM 1.77) Who does what? UICS deals with things like:- Email PC Caledonia (undergrad IT Labs) Central Web pages (e.g....
  • Charles&#x27; Law - Wappingers Central School District

    Charles' Law - Wappingers Central School District

    Charles' Law: Mathematically V = k T V1 = V2 T1 T2 NOTE: Temperature must be converted to Kelvin!!! Flash Backā€¦.what is the equation for Boyle? P 1V1 = P2V2 Is this a direct relationship? Problem 1 150 mL of...
  • Fort Hood Combatives III Corps and Fort Hood

    Fort Hood Combatives III Corps and Fort Hood

    The defining characteristic of a warrior is the willingness to close with the enemy. Fort Hood Combatives . The defining characteristic of a warrior is the willingness to close with the enemy.
  • PowerPoint Presentation

    PowerPoint Presentation

    Teach: Microelectronics (analog & digital integrated Circ., VLSI) Biomedical Engineering (instrumentation) ... measure pulse width or pulse frequency Connecting Smart Sensors to PC/Network "Smart sensor" = sensor with built-in signal processing & communication e.g., combining a "dumb ...