GSFC/NGIMS-FSW-021 NGIMS Control Table Design Document April 10, 2001 Rev 1.12 I PURPOSE This document describes the design of the data and algorithms used for Control Tables for the CONTOUR/NGIMS flight software. Control Tables are used for: - DAC computation - Config Tables and their relation thereof; - Subscan Tables and their relation. This document is concerned with the Round Robin method of scanning and its related use of polynomials and lookup tables. The "Flat Table" method is not herein described. References: (1) GSFC/NGIMS-FSW-020, "NGIMS EEPROM Interface Control Document" (2) GSFC/NGIMS-FSW-015, "CONTOUR/NGIMS Control Tables for Dummies" (3) GSFC/NGIMS-FSW-011, "CONTOUR/NGIMS Software Requirements Document" II DESIGN REFERENCES Design items are numbered in blocks on hundreds based on the section; e.g., items for Section 1 begin with number CT-101. Exceptions are made after numbers have been "frozen" (when those already assigned are deemed to retain their number value henceforth) and new items are inserted; for example, a new Design item inserted between "frozen" items CT-505 and CT-506 would be "CT-505.1". III INTRODUCTION Each Integration Period (IP) in Round Robin mode is defined by a "Setup" word. The Setup Word determines: - Mass Code (and Band/Total) - 12 bits - "Config Table" (and thus Source and Ion/Neutral mode) - 2 bits - Frequency (High, Medium, Low) - 2 bits SETUP WORD: MASS CODE FREQ CONFIG The 2-bit Config field points to one of 4 Config Tables - OS (Open Source), CS (Closed Source), IM (Ion Mode), and "spare" to which we've assigned NT (Neutral Thermal) mode. The Config Table thus determines polynomial coefficients and constants, lookup parameters, and other DAC computation parameters. 1. DAC COMPUTATION STEPS There are three steps in the general DAC equations: CT-101 1. Mass/Energy Transform (also includes Angle Compensation and a Mass Delta): X1 = ( A*(m+H)2 + (B+G[?])*(m+H) ) + K1 CT-102 2. Frequency Transform: X2 = X1 * ( 1 + E deltaF/F) CT-103 3. The Temperature Transform and final bias: X3 = X2 * ( 1 + C*(deltaT/T)2 + D*(deltaT/T) + K2 ) CT-103A ... which is actually implemented as a table lookup: X3 = X2 * ( 1.0 + C1[T] ) + C2[T] + K2 where: m = mass A, B = mass transform coefficients C, D = temperature transform coefficients E = frequency transform coefficient F = frequency (RFmon averaged) G[?] = table lookup for angle omega (?) compensation H = AMU offset for SEDS compensation T = Temperature (averaged) deltaF = Nominal Frequency - Frequency averaged C1[T] = Lookup for temperature slope factor C2[T] = Lookup for temperature offset K1 = mass transform bias K2 = final DAC bias Note that the Mass Code value also indicates special tuning requirements (Bands/Totals). See §9. As explained in §3, the X1 computation for RF DACs is a lookup as a function of mass. 2. IMPLEMENTATION NOTES CT-201 Because there are 2 Ion Mode config tables (one for lower masses, one for higher masses), we assign 5 (not 4) different Config tables. CT-202 Because some parameters are "Config Independent," these are factored out into some "common tables" (applied in the DAC computation irrespective of Config). CT-203 There is also a handful of other control parameters - cutoff values, limits, override flags, etc. 3. X1 COMPUTATION, NON-RF DACS The X1 computation for non-RF DACs involves the Polynomial Mass Transform of CT-101 and hence: Delta Mass (H term), Angle Transform (G term), Bias (K1) There are 5 Config Tables for the non-RF X1 computation - Config# Table 0 Open Source 1 Closed Source 2 Ion Mode, Lo Energy (lower masses) 3 Ion Mode, Hi Energy (higher masses) 4 Neutral Thermal CT-301 For each Config Table and each of the 29 DACs, there is a mass-squared coefficient "A". CT-302 For each Config Table and each of the 29 DACs, there is a mass coefficient "B". CT-303 For each Config Table and each of the 29 DACs, there are angle (omega) terms G[omega] for each of the 4 possible angles. CT-304 For each Config Table and each of the 29 DACs, there is a delta-mass coefficient "H". CT-305 For each Config Table and each of the 29 DACs, there is a bias "K1" for the X1 computation. CT-306 For each Config Table and each of the 29 DACs, a "Fixed Flag" (16 bits, any NZ value means "fixed") exists in EEPROM, indicating whether that DAC is fixed (constant), plus the 16-bit value (ignored if the "Fixed Flag" = 0). A number of DACs have fixed (constant) values set in FC memory. See Ref (3), 4.3.1.1.6. 4. X1 COMPUTATION, RF DACS The Vac and Vdc computations will be performed by ~300-point lookup table with interpolation instead of polynomial, followed by Frequency and Temperature compensation. The Mass Transform (X1) equation, X1 = ( A*(m+H)2 + (B+G[?])*(m+H) ) + K1 ...becomes, for Vac and Vdc, simply: CT-401 X1 = L*(m) where: L = Mass Table Lookup for 0..301 points, one for each frequency. m = mass CT-402 Mass Lookup Table "L" - for each of the 3 frequencies, LF, MF and HF, there is an array (0 .. 301) containing pairs of DAC values, Vac & Vdc. This allows the user to assign AMU codes from 0 to 300.5 (the endpoint value 301 provides the last interpolation point). CT-403 Application of the frequency transform is not necessary for HF. 5. CONFIG-INDEPENDENT TABLES CT-501 For each DAC and each Freq there is a frequency transform coefficient "E". CT-502 For each DAC there is a 16-bit DAC Override Value assignable via TC (not maintained in EEPROM). CT-503 For each DAC there is a 16-bit DAC Override Flag (values 0000 for FALSE and 0001 for TRUE) assignable via TC (not maintained in EEPROM). 6. CONSTANTS Other simple "constant" parameters used with Config Tables are shown below; final values are TBD: CT-601 RFMon_Correction_Limit 5% Max. amount to correct for RF drift CT-602 Temperature_Corr_Limit_RF TBD Max. amount to correct for temperature (RF) CT-603 Temperature_Corr_Limit_Non_RF TBD Max. amount to correct for temperature (Non-RF) CT-604 RFMon_Avg_Sample_Number 10 Number of samples to take for averaging CT-605 Temperature_Avg_Sample_Number 3 Number of samples to take for averaging. Not a requirement to keep this in EEPROM. CT-606 RFMon_Nominal(LF) TBD Nominal value for RFMON, LF CT-607 RFMon_Nominal(MF) TBD Nominal value for RFMON, MF CT-608 RFMon_Nominal(HF) n/aw Nominal value for RFMON, HF CT-609 Ion_Mode_Mass_Switchover TBD Determines mass value for setting the Ion Mode bit (and using the second IM Config Table) Note that "Nominal Temperature" values aren't needed (the values are taken into account in the lookup tables). 7. TEMPERATURE TRANSFORM CT-701 The C1[T] and C2[T] lookups consist of two separate tables, accessed by two different Mux values for temperature "T" - Mux ID 15 used for "T" for Vac Mux ID 48 used for "T" for all other DACs. The temperature lookup will be performed as follows: CT-702 A single table will be used, wherein the Mux temperature value T is compared to range values (lower & upper) within the table, which is used to lookup the values C1 and C2, without interpolation. The quantization requirements: CT-703 For C1 - LSB = 1/10,000 and maximum = 1.999 CT-704 For C2 - LSB = 1, and maximum = 16,383 The value used for temperature, T, is a running average based on the most recent 3 temperature samples. CT-705 The temperature lookup tables have the following basic structure. The lower column is actually not necessary since lower(n) = upper(n-1). There are 2 tables - one for Vac, another for all other DACs. range Lookup# lower upper C1 C2 0 0 TBD TBD TBD 1 TBD TBD TBD TBD 2 TBD TBD TBD TBD 3 TBD TBD TBD TBD 4 TBD TBD TBD TBD 5 TBD TBD TBD TBD 6 TBD TBD TBD TBD 7 TBD TBD TBD TBD 8 TBD TBD TBD TBD 9 TBD TBD TBD TBD 10 TBD TBD TBD TBD 11 TBD (max) TBD TBD 8. FINAL BIAS TABLE CT-801 For each of the 29 DACs, there is a final bias "K2" applied to the X3 computation. 9. BANDS CT-901 AMU Codes 4000..4020 (corresponding to "nonsense" masses 400.0..402.0) indicate "Band Numbers" -- so there are 21 special tables that will lookup all 29 DAC values (as constants without subsequent frequency or temperature compensation) for Band/Total (wide) resolution over various mass ranges as defined by the DAC values in those tables. 10. SUBSCAN TABLES Subscan Tables are defined in computer memory and are "pointed to" by Round Robin and other tables. 10.1 Subscan Pool CT-1001 There is a pool of 256 Subscan Tables, each of which consists of 15 IPs -- each IP defined by a Setup Word ("sw" in the table below). The subscan pool is considered to consist of two types of subscan tables: Unit Mass, and Programmed Mass. See Ref (2). 10.2 Round Robin Tables CT-1002 For the Round Robin scan, one special set of tables in RAM contains "pointers" -- subscan table numbers -- thus defining: - the (constant) Subscan Tables for OS, CS and IM (mass, freq & config) - a default set of constant Subscan Tables for PM (which can be changed via command). CT-1003 The Round Robin subscan tables are pre-set for Open Source (OS), Closed Source (CS), Ion Mode (IM), and Programmed Mass (PM) mode. GSFC/NGIMS-FSW-021 - NGIMS Control Tables 1