Quantized Pressure Data Modeling Simulation and Modeling Professor: Ernesto Guitierrez-Miravete Chuck Clothier 197-66-2240 December 14th, 1999 Introduction: The purpose of this project is to study the effects due to variance on a real world controller interface. In its simplest form serves as the link between the actual transducer which is measuring a particular environmental parameter of interest and the solid state controller which is using the measured data for control system functions. For the sake of discussion, a pressure transducer is being studied, therefore, a certain environmental pressure is being measured, and represented by the transducer as a voltage. This voltage is then wired to the controller interface. The simulation of interest begins at the pressure signal’s voltage input into the controller. The interface itself is broken down into major components which perform specific tasks: an input multi-plexer (low level mux) which reads and queues the voltage until the controller is ready to convert the signal, a amplifier which magnifies the voltage in order to retain the highest resolution of the signal as it is being converted, a high level mux which queues all of the outputs of all of the low level mux, and finally the analog to digital converter (A/D). Every element of this interface will delay the voltage being processed for a variable amount of time, and subject the voltage to a variable amount of error. Since most commercial controllers are built from off-the-shelf interface components it is possible that the combination of components may introduce too much error into voltage being measured. Modeling the interface may also provide foresight in methods to counter-act the interface error in software. Report Summary: Modeling this system was more difficult than expected due to each component having its own element of variance. It was found that the timing of the simulation was more time consuming than finding the individual error distributions. However, once the simulation was running reasonably, it was possible to iterate the various interface gain and offset distributions to find a solution. It was found that pressure voltage supported by the interface modeled in this study can only support a pressure voltage from 0 to1.5 volts (1500 millivolts). Design Requirements: The controller interface must be sized so that the input transducer voltage does not exceed 10 volts in any of the multi-plexers: Low Mux Max Voltage: 0 to 10 Volts High Mux Max Voltage: 0 to 10 Volts Therefore the input voltage can not be too large (> 10 Volts ) after adding all of the premux error component voltages. These design requirements were used to validate the simulation model. Because there were many points of variance in the simulation, it was vital to gain as much data from the real world system as possible. I referred to two technical company's private (Hamilton Standard) manuals in order to find the nominal values of any source of error. Problem Formulation: Having found the hardware constraints after the initial interface study, it was possible to form the problem statement as follows: Determine the standard pressure transducer sizing that can be accommodated by the pre-selected electronic controller interface. All data shall be transmitted with full resolution. No interface limits shall be exceeded. Objectives: Model the general interface and all elements of error variance. Verify proper operation of simulation, and validate using the hardware requirements. Proper error input modeling requires holding all variances to a constant nominal value while varying the desired error distribution. It will be necessary to achieve to find adequate error distribution (interface gains and offsets), via iteration. Error Variance studies: Because there were many points of variance in the simulation, it was vital to gain as much data from the real world system as possible. I referred to two technical company's private (Hamilton Standard) manuals in order to find the nominal values of any source of all interface errors. In order to meet stringent Federal Aviation Administration (FAA) guidelines for Electrical Aircraft controllers, Hamilton Standard ensures that all interface components manufactured are within 6 sigma of the nominal design tolerances. Because the exact design nominal values are company private, I used values that would approximate a real world interface. Pre-mux input model: The Pre-mux region consists of the pressure cable wiring from the transducer to the electronic interface pins, the pins themselves, and the copper tracing on the motherboard from the pins to the input of the low level mux. All of the above pieces of hardware are subject to small degrees variable error. The cable wiring and the controller interface are subject to a small degree of error due to thermal fluxes. The copper trace is not as susceptible to changes in temperature due the environmental controls inside the controller box (i.e. heaters and fans are used to control the temperature and moisture). To model these errors, first it assumed that all of the various errors in this portion of the interface could be linearly stacked. Next, referring the Inset #1 of Figure #1 of the Appendix, it can be seen that the linear relationship between pressure and voltage will shift along the voltage axis by an offset value, and will change slope according to a gain value. In essence adding a linear error to a linear parameter can be represented by the shift in the line defined by P1 - P2 to P3 – P4. The nominal values are approximated from the Interface design documentation, and the error offset and error gain are modeled as “Normal” distributions whose means are the nominal value and the standard deviation is small relative to the mean. This error is mostly temperature dependent, and any errors would be small and slow acting. Actual values of the standard deviations were found after the entire interface was defined. Holding all post mux variance fixed, the standard deviations were iterated until the final pressure voltage was less than the target of 8.5 volts at all times. Final values of the mean and standard deviations for the input offset and gain are seen in the configuration file, Table 4 in the appendix. Low Mux input voltage =[ (Input Pressure Voltage)*(pre-mux error gain) ]+ (pre-mux error offset) Low Mux Interface Model: The low level mux was treated in a similar manner as the pre-mux interface. The low mux interface consists of the AC/DC converter and a voltage amplifier, which both are highly accurate and slow varying. It was assumed The mux itself was modeled as a time delay only, because the linear error components were modeled individually as low mux offset and low mux gain. The main area of concern here was that the low mux gain is very large compared to the other gains in the system. This gain is an actual interface AC/DC amplifier that has a high degree of accuracy. Therefore, the low mux gain was modeled as a normal distribution with a dominant mean (dominant compared to the relative error of the interface), and a rather small standard deviation of 0.1 volt/volt. At the beginning of the project distribution was assumed to be exponential with mean equal to the nominal amplifier gain. The voltage amplification was sporadic as a result, and the distribution was replaced by a normal distribution. High Mux input voltage =[ (Low Mux Pressure Voltage)*(Low-mux error gain) ]+ (Low mux error offset) High mux Interface model: The High mux is followed by the Analog/Digital (A/D) converter, which will add a varying error each and every pass through the converter. All interfaces up to this point have relatively constant error applied to each voltage passing through the interface. The High Mux error gain was initially modeled as an exponential distribution. During the Validation phase it was found that the gain error varied by too much each pass, and as a result it was replaced with a normal distribution with a relatively large standard deviation. Therefore during each pass through this High mux A/D converter the error would be different, but within the guarantee limits of the hardware manufacturer. The offset error was treated in a similar fashion. Pressure Output voltage =[ (High Mux Pressure Voltage)*(High mux error gain) ]+ (High mux error offset) Validation Iteration to match design requirements: As mentioned in each of the above interface models, it was critical to study the effects of all of the variances. To facilitate the iteration process, two models were constructed, one was the production version with all variances in tact, the other a similar model but with all standard deviations kept at very tight tolerances (Single variance model). As the total interface was studied, one error element at a time was allowed to have an error variance. Then by running 10-hour trial runs, a realistic value of the error standard deviation was determined. Eventually it was found that with the A/D errors in the High Mux interface modeled as exponential distributions, no solution could be found. Starting over with Normal distributions proved to be an acceptable substitute. After speaking with some of the hardware interface designers at Hamilton Standard, it was found that the A/D error is indeed best suited as a normal distribution. After correcting the A/D errors, the AC/DC voltage amplifier in the Low level mux interface was changed to a normal distribution for similar reasons. Finally, after being satisfied with all of the error model distributions, it was time to vary the actual input pressure voltage in search of the maximum allowable pressure input voltage into the controller interface. It was found that the maximum pressure voltage allowed into the interface was 1.5 Volts DC. Lessons Learned from Project: The major mistake that was made during the course of this project was in picking an acceptable arrival rate for the pressure voltage. Originally the arrival rate was once every 2 seconds (the real controller uses a millisecond time scale, but Promodel was run using seconds instead) But it would take six times as long for the entity to travel through the entire interface. Because variables were used to represent the voltages in the model, if two or more entities were travelling through the interface, then the output pressure (which was a function of the variable “pressure_voltage” would climb as high as 54 volts! This was because at any particular time slice in the model there might be one or more entities that are inside separate error gain locations. Each time this happened the pressure_voltage variable would be subject to multiple gains at the same time ( i.e. pressure_voltage = ( (pressure_voltage*low mux Gain)*(high mux Gain))*(input mux gain) ). In the real interface only one voltage is allowed to travel through at a time. The controller software itself dictates the passage of the voltage through the interface. After decreasing the voltage arrival rate to one every 10 seconds (milliseconds on the real interface), it was possible to validate the model using iteration techniques. Trying to troubleshoot this problem took several days with many iterations of the procedure logic within Promodel. Figure 1 Hardware Interface Layout: Pressure (Voltage) Inset #1: Pre-mux Region P4 Low Mux Interface Low Mux Gain P3 y x Low Mux Gain Low Mux Offset Pressure Input (Volts) P2 P1 Input 2 Pressure (PSIA) Input 3 Input 4 Input 5 Low Level Input Mux High Mux Interface Input 1 Input 2 Input 3 Input 4 Input 5 Low Level Input Mux #2 High Level Interface Mux Input 1 Inset #2: Input 2 P6 Pressure (Voltage) Input 3 High Mux Gain Input 4 P5 y x Input 5 High Mux Offset Low Level Input Mux #3 After Low P4 Level Mux P3 Pressure (PSIA) Figure 2: Steps in a Simulation Study Problem formulation Setting of objectives and overall project plan Model Conceptualization Data Collection Model translation No Verified? Yes No No Validated? Yes Experimental design Production runs And Analysis No Yes More runs? Yes Documentaion And Reporting Implementation Table 1: ------------------------------------------------------------------------------------------------------------------- Model 10-hour Run Results -------------------------------------------------------------------------------General Report Output from C:\ProMod4\models\Final\Final\Interface2.MOD [Digital Control Interface Simulation] Date: Dec/17/1999 Time: 04:39:52 PM -------------------------------------------------------------------------------Scenario : Normal Run Replication : Average Period : Final Report (0 sec to 10 hr Elapsed: 10 hr) Simulation Time : 10 hr -------------------------------------------------------------------------------LOCATIONS Location Scheduled Current Name Hours Contents % Util ---------------- --------- -----Hi Level Mux 10 0 14.86 (Average) Hi Level Mux 0 0 0.00 (Std. Dev.) Lo Level Mux 10 0 14.95 (Average) Lo Level Mux 0 0 0.14 (Std. Dev.) Input Gain error 10 0 10.08 (Average) Input Gain error 0 0 0.07 (Std. Dev.) Input Oset error 10 0 9.85 (Average) Input Oset error 0 0 0.00 (Std. Dev.) Lomux gain 10 0 1.00 (Average) Lomux gain 0 0 0.00 (Std. Dev.) Lomux offset 10 0 1.00 (Average) Lomux offset 0 0 0.00 (Std. Dev.) Himux gain 10 0 1.00 (Average) Himux gain 0 0 0.01 (Std. Dev.) Himux offset 10 0 1.00 (Average) Himux offset 0 0 0.00 (Std. Dev.) RAM 10 0 0.99 (Average) RAM 0 0 0.00 (Std. Dev.) Input que 10 1 0.00 (Average) Input que 0 0 0.00 (Std. Dev.) Total Average Seconds Average Maximum Capacity Entries Per Entry Contents Contents -------- ------- --------- ----------- -------- 1 3600 1.485601 0.14856 1 0 0 0.000045 4.51763e-06 0 1 3600 1.495067 0.149507 1 0 0 0.013934 0.00139339 0 1 3600 1.007903 0.10079 1 0 0 0.006627 0.000662716 0 1 3600 0.984744 0.0984744 1 0 0 0.000118 1.17851e-05 0 1 3600 0.099982 0.00999819 1 0 0 0.000183 1.82669e-05 0 1 3600 0.099922 0.00999222 1 0 0 0.000346 3.45697e-05 0 1 3600 0.100340 0.010034 1 0 0 0.000568 5.6765e-05 0 1 3600 0.099843 0.00998431 1 0 0 0.000257 2.57308e-05 0 1 3600 0.099407 0.00994069 1 0 0 0.000438 4.38013e-05 0 999999 3601 0.010017 0.00100194 1 0 0 0.000236 2.35702e-05 0 LOCATION STATES BY PERCENTAGE (Multiple Capacity) ------- Location Name --------Input que Input que Scheduled Hours --------10 0 % Empty ----99.90 0.00 % Partially Occupied --------0.10 0.00 % Full ---0.00 0.00 | | | | | | % Down ---0.00 0.00 (Average) (Std. Dev.) LOCATION STATES BY PERCENTAGE (Single Capacity/Tanks) Location Name ---------------Hi Level Mux Hi Level Mux Lo Level Mux Lo Level Mux Input Gain error Input Gain error Input Oset error Input Oset error Lomux gain Lomux gain Lomux offset Lomux offset Himux gain Himux gain Himux offset Himux offset RAM RAM Scheduled Hours --------10 0 10 0 10 0 10 0 10 0 10 0 10 0 10 0 10 0 % Operation --------14.86 0.00 14.95 0.14 10.08 0.07 9.85 0.00 1.00 0.00 1.00 0.00 1.00 0.01 1.00 0.00 1.00 0.01 % Setup ----0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 NODE ENTRIES FOR Net1 Node Name ---N2 N2 N3 N3 N4 N4 N5 N5 N6 N6 N7 N7 N8 N8 N9 N9 N10 N10 N1 N1 Total Entries ------0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Blocked Entries ------0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 (Average) (Std. Dev.) (Average) (Std. Dev.) (Average) (Std. Dev.) (Average) (Std. Dev.) (Average) (Std. Dev.) (Average) (Std. Dev.) (Average) (Std. Dev.) (Average) (Std. Dev.) (Average) (Std. Dev.) (Average) (Std. Dev.) FAILED ARRIVALS Entity Name -------------Pressure Input Pressure Input ENTITY ACTIVITY Location Name --------Input que Input que Total Failed -----0 0 (Average) (Std. Dev.) % Idle ----85.14 0.00 85.05 0.14 89.92 0.07 90.15 0.00 99.00 0.00 99.00 0.00 99.00 0.01 99.00 0.00 99.00 0.01 % Waiting ------0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 % Blocked ------0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 % Down ---0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 (Average) (Std. Dev.) (Average) (Std. Dev.) (Average) (Std. Dev.) (Average) (Std. Dev.) (Average) (Std. Dev.) (Average) (Std. Dev.) (Average) (Std. Dev.) (Average) (Std. Dev.) (Average) (Std. Dev.) Entity Name -------------Pressure Input (Average) Pressure Input (Std. Dev.) Total Exits ----3600 Current Quantity In System --------1 Average Seconds In System -------5.482829 Average Seconds In Move Logic -------0.000000 Average Seconds Wait For Res, etc. --------0.000000 Average Seconds In Operation --------5.482829 Average Seconds Blocked -------0.000000 0 0 0.006943 0.000000 0.000000 0.006943 0.000000 ENTITY STATES BY PERCENTAGE Entity Name -------------Pressure Input Pressure Input % In Move Logic ------0.00 0.00 % Wait For Res, etc. --------0.00 0.00 % In Operation -----------100.00 0.00 % Blocked ------0.00 0.00 (Average) (Std. Dev.) VARIABLES Variable Name ---------------himuxoffsetvolts (Average) himuxoffsetvolts (Std. Dev.) himuxgainvolts (Average) himuxgainvolts (Std. Dev.) himuxvolts (Average) himuxvolts (Std. Dev.) lomuxoffsetvolts (Average) lomuxoffsetvolts (Std. Dev.) lomuxgainvolts (Average) lomuxgainvolts (Std. Dev.) lomuxvolts (Average) lomuxvolts (Std. Dev.) in offsetvolts (Average) in offsetvolts (Std. Dev.) in gainvolts (Average) in gainvolts (Std. Dev.) Pressure voltage (Average) Pressure voltage (Std. Dev.) Input pressure (Average) Input pressure (Std. Dev.) Ouput pressure (Average) Total Changes ------3600 Average Seconds Per Change ---------9.998454 Minimum Value ---------0 Maximum Value ----------0.0465208 Current Value ----------0.0297316 Average Value ----------0.0279197 0 0.000611 0 0.000836189 0.00196059 2.71285e-05 3600 9.998419 0 1.3943 1.03551 1.0206 0 0.000593 0 0.0204291 0.0609246 0.000181345 3600 9.998394 -0.666288 10.8117 5.33593 4.79395 0 0.000581 0.443979 0.536734 5.9527 0.000707733 3600 9.998246 0 0.0461816 0.0269444 0.0280268 0 0.000426 0 0.00155605 0.0028268 7.29339e-05 3600 9.998203 0 2.5233 2.52051 2.51972 0 0.000428 0 0.000196439 0.000290147 7.18552e-05 3600 9.998190 -0.255645 4.17164 2.05843 1.85032 0 0.000438 0.168487 0.209624 2.29431 0.000697936 3600 9.997836 -0.0831365 0.333311 0.169246 0.120406 0 0.000157 0.00742956 0.00974088 0.116824 0.00250873 3600 9.997378 0 1.13996 1.09124 1.09997 0 0.000192 0 0.00964944 0.0152744 8.82023e-05 28800 1.249811 -0.765322 12.1236 1 1.91608 0 0.000077 0.533521 0.507584 0 0.000776544 3601 9.997223 -0.200874 3.34011 2.01077 1.50088 0 0.000000 0.121698 0.061381 0.0198809 0.00366749 3600 9.998489 -0.765322 5.87004 5.03054 12.1236** Ouput pressure (Std. Dev.)in mux 0.446491 (Average) in mux (Std. Dev.) ** This 0 0.000613 14400 0.533521 2.499622 0.507584 0 6.6709 1 0.00414398 0 0 0.000153 0 0 0 0.00138063 max output pressure value was encountered during simulation transient period. ******************************************************************************** * * * Formatted Listing of Model: * * C:\ProMod4\models\Final\Final\Interface2.MOD * * * ******************************************************************************** Time Units: Distance Units: Seconds Feet ******************************************************************************** * Locations * ******************************************************************************** Name ---------------Hi_Level_Mux Lo_Level_Mux Input_Gain_error Input_Oset_error Lomux_gain Lomux_offset Himux_gain Himux_offset RAM Input_que Cap -------1 1 1 1 1 1 1 1 1 INFINITE Units ----1 1 1 1 1 1 1 1 1 1 Stats ----------Time Series Time Series Time Series Time Series Time Series Time Series Time Series Time Series Time Series Time Series Rules Cost -------------- -----------Oldest, , Oldest, , Oldest, , Oldest, , Oldest, , Oldest, , Oldest, , Oldest, , Oldest, , Oldest, FIFO, ******************************************************************************** * Entities * ******************************************************************************** Name Speed (fpm) Stats Cost -------------- ------------ ----------- -----------Pressure_Input 0.01 Time Series ******************************************************************************** * Path Networks * ******************************************************************************** Name Type T/S From -------- ----------- ---------------- -------Net1 Non-Passing Speed & Distance N1 N2 N3 N4 N5 N6 N7 N8 N9 To -------N2 N3 N4 N5 N6 N7 N8 N9 N10 BI ---Bi Bi Bi Bi Bi Bi Bi Bi Bi Dist/Time ---------15.63 13.37 14.86 11.35 9.75 12.57 11.17 9.73 7.28 Speed Factor -----------1 1 1 1 1 1 1 1 1 ******************************************************************************** * Interfaces * ******************************************************************************** Net Node ---------- ---------Net1 N2 N3 N4 N5 N6 N7 N8 N9 N1 Location ---------------Input_Oset_error Lo_Level_Mux Lomux_gain Lomux_offset Hi_Level_Mux Himux_gain Himux_offset RAM Input_Gain_error ******************************************************************************** * Processing * ******************************************************************************** Process Routing Entity Location Operation Rule Move Logic -------------- ---------------- ------------------ ---------------- -----------Pressure_Input Input_que wait u(0.01,0.01) Blk in_mux=0 Input_Gain_error IF in_mux = 0, 1 Pressure_Input Input_Gain_error Wait u(1,1) 1 Output Destination ---- -------------- --------------- Pressure_Input pressure_voltage = input_pressure in_gainvolts = n(1.1,0.01) Pressure_voltage=Pressure_voltage*in_gainvolts in_mux=1 1 Pressure_Input Input_Oset_error FIRST 1 Pressure_Input Input_Oset_error Wait U(1,1) in_offsetvolts = n(0.12,0.06) Pressure_voltage = Pressure_voltage + pressure_voltage*in_offsetvolts in_mux=1 FIRST 1 Pressure_Input Lo_Level_Mux 1 Pressure_Input Lo_Level_Mux Wait U(1.5,1.5) lomuxvolts = pressure_voltage 1 FIRST 1 Pressure_Input Lomux_gain Pressure_Input Lomux_gain Wait U(.1,.1) lomuxgainvolts = n(2.52,0.001) Pressure_voltage = Pressure_voltage*lomuxgainvolts 1 FIRST 1 Pressure_Input Lomux_offset Pressure_Input Lomux_offset Wait U(0.1,0.1) lomuxoffsetvolts = n(0.028,0.005) pressure_voltage = pressure_voltage + pressure_voltage*lomuxoffsetvolts 1 FIRST 1 Pressure_Input Hi_Level_Mux Pressure_Input Hi_Level_Mux Wait U(1.5,1.5) himuxvolts = Pressure_voltage 1 Pressure_Input Himux_gain FIRST 1 Pressure_Input Himux_gain Wait U(0.1, 0.1) himuxgainvolts = n(1.02,0.1) pressure_voltage = pressure_voltage*himuxgainvolts 1 FIRST 1 Pressure_Input Himux_offset Himux_offset Wait U(0.1,0.1) himuxoffsetvolts = n(0.028,0.005) pressure_voltage = pressure_voltage + pressure_voltage*himuxoffsetvolts 1 FIRST 1 Pressure_Input RAM Pressure_Input RAM Wait U(0.1,0.1) Ouput_pressure = pressure_voltage Pressure_voltage = 1.0 in_mux = 0 1 Pressure_Input EXIT FIRST 1 ******************************************************************************** * Arrivals * ******************************************************************************** Entity Location Qty each First Time Occurrences Frequency Logic -------------- --------- ---------- ---------- ----------- ---------- -----------Pressure_Input Input_que 1 0 INF 10 Input_pressure = n(1.5,0.5) ******************************************************************************** * Attributes * ******************************************************************************** ID Type Classification ---------- ------------ -------------# #This is the Voltage Level of the Pressure Input Volts Real Entity ******************************************************************************** * Variables (global) * ******************************************************************************** ID ---------------himuxoffsetvolts himuxgainvolts himuxvolts lomuxoffsetvolts lomuxgainvolts lomuxvolts in_offsetvolts in_gainvolts Pressure_voltage Input_pressure Ouput_pressure in_mux Type -----------Real Real Real Real Real Real Real Real Real Real Real Integer Initial value ------------0 0 0 0 0 0 0 0 0 0 0 0 Stats ----------Time Series Time Series Time Series Time Series Time Series Time Series Time Series Time Series Time Series Time Series Time Series Time Series