GSFC/NGIMS-FSW-015 CONTOUR/NGIMS CONTROL TABLES FOR DUMMIES M. Paulkovich - October 10, 2001 v2.1 This User Document provides an overview of the methods and formats for: - DAC computation - Config Tables and their relation thereof; - Subscan Tables and their relation. The methods consist of polynomial computations and various table lookups. The formats of tables are also described. This document is concerned with the Round-Robin (not Flat) mode of operation. Whereas this is a User's Guide document, the controlling technical document is GSFC/NGIMS-FSW-021, "NGIMS Control Table Design Document." We start the explanation with the well-known "Setup" word (which has been sometimes called a "select word") which defines every IP when combined with the Config Table concept. 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 Transforms Summarizing the general DAC equations, there are three steps: 1. Mass/Energy Transform (also includes Angle Compensation and a Mass Delta): X1 = ( A*(m+H)2 + (B+G[?])*(m+H) ) + K1 2. Frequency Transform: for VAC: A1 = 32k-X1 : A2 = A1(1+E*deltaF/F) : X2 = 32K-A2 for VDC: X2 = X1 * ( 1 + E*deltaF/F) 3. The Temperature Transform and final bias: X3 = X2 * ( 1 + C*(deltaT/T)2 + D*(deltaT/T) + K2 ) ... 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 ? 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 -- 4000+ (corresponding to "nonsense" masses 400.0+) indicate "Band Numbers" -- so there are 75 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 explained later, the X1 computation for RF DACs is a lookup as a function of mass. The general flow of the DAC computation is shown below. 1.1 Fixed DACs A number of DACs have fixed (constant) values set in FC memory. These have been identified as the following 7 DAC numbers: 6 7 8 9 11 12 13. There are 29 records in EEPROM that determine whether each DAC is fixed, and (if so) the value the FSW must output for that DAC. Note that fixed DACs are immune to DAC Override commands. FIGURE 1 - DAC Computation Flow 2. Implementation Notes: 1. Because there are 2 Ion Mode config tables (one for lower masses, one for higher masses), we assign 5 (not 4) different Config tables. 2. Because some parameters are "Config Independent," these are factored out into some "common tables" (applied in the DAC computation irrespective of Config). 3. There is also a handful of other control parameters - cutoff values, limits, override flags, etc. Next we'll discuss the contents of the Config tables as it relates to the three computation steps, X1, X2 and X3. 3. X1 COMPUTATION Polynomial Mass Transform (non-RF DACs), Delta Mass, Angle Transform, +Bias There are 5 tables for the 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 FIGURE 2 - CONFIG TABLE ELEMENTS FOR X1 COMPUTATION - 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: X1 = L*(m) where: L = Mass Table Lookup for 0..301 points, one for each frequency. FIGURE 3 - Voltage Lookup "L" for Vac & Vdc - AMU 0 1 2 3 4 5 ... 300 301 LLF vdc, vac vdc, vac vdc, vac vdc, vac vdc, vac vdc, vac ... vdc, vac vdc, vac LMF vdc, vac vdc, vac vdc, vac vdc, vac vdc, vac vdc, vac ... vdc, vac vdc, vac LHF vdc, vac vdc, vac vdc, vac vdc, vac vdc, vac vdc, vac ... vdc, vac vdc, vac NOTE: Since there are three AMU ranges (corresponding to three frequencies), this table configuration, while being the most "logical" and straightforward allocation, results in unused memory blocks. This is illustrated below -- the shaded areas show table space that is not used by the FSW (and hence does not need to be loaded by the GSE). Clearly, the use of this 2x3x302 array (of 1812 words) could have been optimized. This would have meant additional complexity to the flight software and absolute knowledge of the mass/frequency switchover points (and thus, lost flexibility). The table could have been designed to consume 1/3 the size, at 604 words -- thus saving 1208 words of memory. High Frequency "L" Data: 1 2 3 4 5 6 7 8 9 10 11 LLF vac, vdc vac, vdc vac, vdc vac, vdc vac, vdc vac, vdc vac, vdc vac, vdc vac, vdc vac, vdc vac, vdc LMF vac, vdc vac, vdc vac, vdc vac, vdc vac, vdc vac, vdc vac, vdc vac, vdc vac, vdc vac, vdc vac, vdc LHF vac, vdc vac, vdc vac, vdc vac, vdc vac, vdc vac, vdc vac, vdc vac, vdc vac, vdc vac, vdc vac, vdc Mid Frequency "L" Data: 12 13 14 ... 47 48 49 LLF vac, vdc vac, vdc vac, vdc ... vac, vdc vac, vdc vac, vdc LMF vac, vdc vac, vdc vac, vdc ... vac, vdc vac, vdc vac, vdc LHF vac, vdc vac, vdc vac, vdc ... vac, vdc vac, vdc vac, vdc Low Frequency "L" Data: 50 51 52 ... 299 300 301 LLF vac, vdc vac, vdc vac, vdc ... vac, vdc vac, vdc vac, vdc LMF vac, vdc vac, vdc vac, vdc ... vac, vdc vac, vdc vac, vdc LHF vac, vdc vac, vdc vac, vdc ... vac, vdc vac, vdc vac, vdc 5. Config-independent tables DAC freq term Dac Oride D OrideYN 1 EHF, EMF, ELF X 0 2 EHF, EMF, ELF X 0 3 EHF, EMF, ELF X 0 4 EHF, EMF, ELF X 0 5 EHF, EMF, ELF X 0 6 EHF, EMF, ELF X 0 7 EHF, EMF, ELF X 0 8 EHF, EMF, ELF X 0 9 EHF, EMF, ELF X 0 10 EHF, EMF, ELF X 0 11 EHF, EMF, ELF X 0 12 EHF, EMF, ELF X 0 13 EHF, EMF, ELF X 0 14 EHF, EMF, ELF X 0 15 EHF, EMF, ELF X 0 16 EHF, EMF, ELF X 0 17 EHF, EMF, ELF X 0 18 EHF, EMF, ELF X 0 19 EHF, EMF, ELF X 0 20 EHF, EMF, ELF X 0 21 EHF, EMF, ELF X 0 22 EHF, EMF, ELF X 0 23 EHF, EMF, ELF X 0 24 EHF, EMF, ELF X 0 25 EHF, EMF, ELF X 0 26 EHF, EMF, ELF X 0 27 EHF, EMF, ELF X 0 28 EHF, EMF, ELF X 0 29 EHF, EMF, ELF X 0 6. CONSTANTS Other simple "constant" parameters used with Config Tables are shown below; final values are TBD: Constant Value Description RFMon_Correction_Limit 5% Max. amount to correct for RF drift Temperature_Corr_Limit_RF TBD Max. amount to correct for temperature (RF) Temperature_Corr_Limit_Non_RF TBD Max. amount to correct for temperature (Non-RF) RFMon_Avg_Sample_Number 10 Number of samples to take for averaging Temperature_Avg_Sample_Number 3 Number of samples to take for averaging RFMon_Nominal(LF) TBD Nominal value for RFMON, LF RFMon_Nominal(MF) TBD Nominal value for RFMON, MF RFMon_Nominal(HF) TBD Nominal value for RFMON, HF (NOT USED) 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 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: 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: For C1 - LSB = 1/10,000 and maximum = 1.999 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. 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: 1 K2 2 K2 3 K2 4 K2 5 K2 6 K2 7 K2 8 K2 9 K2 10 K2 11 K2 12 K2 13 K2 14 K2 15 K2 16 K2 17 K2 18 K2 19 K2 20 K2 21 K2 22 K2 23 K2 24 K2 25 K2 26 K2 27 K2 28 K2 29 K2 9. BANDS AMU Codes 4000..4074 (corresponding to "nonsense" masses 400.0..407.4) indicate wide QP resolution for 75 "Band Numbers." So there are 75 special tables that will lookup all 29 DAC values (with no frequency or temperature compensation) for Band/Total (wide) resolution over various mass ranges as defined by the DAC values in those tables. The Ion Mode bit in the raw (QB) output word is still set depending upon the Config bits of the Select word for each IP, just as in unity resolution. 10. Subscan Tables Subscan Tables are defined in computer memory and are "pointed to" by Round Robin and other tables. - Tables in the big Subscan Pool are comprised of subscan data that is "definitive" -- for each subscan, it describes each IP by way of Setup Words (each of which holds Mass, Freq and Config Table number). - Round Robin Tables (and also the internal references to tables in memory that are within the Adaptive algorithm) consist merely of numbers that point to "actual" Subscan Tables. 10.1 Subscan Pool There is a pool of 256 Subscan Tables (numbered 0..255), each of which consists of 15 IPs -- each IP defined by a Setup Word ("sw" in the table below). Each table is preceded by a two ID words: 1. Adaptive_Band_Table (flag) - NZ means that table is a special subscan of all bands for the Adaptive algorithm. 2. Spare word. The subscan pool is considered to consist of two types of subscan tables: Unit Mass, and Programmed Mass. The unit mass tables are those used by the first three scans (OS, CS, IM) of the round robin scheme. In keeping with the overall sampling scheme, these tables should not change sources (i.e. Config Table #) within a subscan. They essentially are composed of sequential unit mass steps, e.g. 1, 1, 2, 3, 4... (mass code 10, 10, 20, 30, 40...) for each of the appropriate modes (config table #). They are implemented as tables for various reasons; e.g. to allow frequency overlaps, and to allow the user to code repeat measurements when the settling time is insufficient for the mass step. When designing the unit mass tables, the user should assume the worst case and repeat the first IP of any subscan table to accommodate the extra settling time. ID Word 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 0 sw sw sw sw sw sw sw sw sw sw sw sw sw sw sw 1 sw sw sw sw sw sw sw sw sw sw sw sw sw sw sw 2 sw sw sw sw sw sw sw sw sw sw sw sw sw sw sw 3 sw sw sw sw sw sw sw sw sw sw sw sw sw sw sw 4 sw sw sw sw sw sw sw sw sw sw sw sw sw sw sw . . 255 sw sw sw sw sw sw sw sw sw sw sw sw sw sw sw When Fractional scans are ordered for a Scan Mode (using the {Scan} command), for each Select Word indicated in any Subscan Table, rather than performing just one IP, the software scans for 10 IPs at ±0.5 Amu around the Amu indicated in the Select word. For the case where a IP where the Select Word dictates Band (rather than amu), the 10 "fractional IPs" will all be for the same Band. The remainder of the subscan pool contains the Programmed Mass tables. These tables are designed for measuring specific species and are likely to contain a mixture of modes (Config Table #) within each subscan. It is the table designer's responsibility to code any necessary repeat measurements to accommodate large voltage swings within the subscan and, as with the Unit Mass tables, assume the worst case for the first IP of the subscan. 10.2 Round Robin Tables For the Round Robin scan, one special set of tables 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). The Round Robin subscan tables are pre-set for Open Source (OS), Closed Source (CS), Ion Mode (IM), and Programmed Mass (PM) mode. There is no need to define tables for mode 5 (Adaptive) since it calculates Subscan Table numbers on the fly. The pointers for Programmed Masses (PM) mode are initialized as shown below, but can be set to point to any subscan tables. These Round Robin Tables are initialized by FSW and are not maintained in EEPROM. subscan table# 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 OS 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 CS 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 IM 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 PM 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 AM X X X Subscan Table Pool (consists of 15 IPs per table, each with Mass, Freq, & Config: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255