! VAISALA ! Upper Air Division 1995-02-09 ! ! This is an equation script file for ECC ozone sensor. ! ! If changes to this script are required, please note ! the following: ! 1) All identifiers declared (assigned) in this script ! are reserved and required by data handler. ! 2) New identifiers can be added, but attention must be ! payed, that unique names are used. ! [Const] { ! Constants: ! F=96487; !Faraday constant R=8.31431; ! Universal gas constant C0=1000*R/(F*2*100); ! ! Other corrections Cref=1; C=1; ! ! For Current caused by other oxidants A0=0.0012250380415 A1=0.000124111475632 A2=-0.00000002687066130 ! ! Query: ! U1=?"Reference Voltage U1 (V):",1,10; U2=?"Reference Voltage U2 (V):",1,10; R1=?"Reference Resistance R1 (Ohm):",10000,900000; R2=?"Reference Resistance R2 (Ohm):",10000,900000; R3=?"Reference Resistance R3 (Ohm):",10000,900000; K0=?"Compensation Factor K0 :",-0.1,0.1; K1=?"Compensation Factor K1 :",-0.001,0.001; K2=?"Compensation Factor K2 :",-0.0001,0.0001; } [Calibrate] { ! 'vs' is For reduced ambient pressure at pump. ! Ozone partial pressure correction table reference number is ! given here. For example, if user gives value the 2, ! Data handler searhes for table [Solution-2] from Vaisala.ini ! The user can add new tables to Vaisala.ini. ! ! Predefined tables exist for 2.5ml and 3.0 ml solution ! (tables [Solution-1] and [Solution-2]) ! vs=?"Solution Volume (2.5ml = 1 , 3.0ml = 2): ",1,2; fl=?"Flow Rate (s/100ml) :",1,100; I0=?"Sensor Background Current (uA):",0,1; P0=?"Calibration Pressure:",800,1200; ! ! Precalculate for IBG CP0=(A0+A1*P0+A2*P0*P0); } [Init] { ! Initialize some variables. This is executed only once ! U22 = U2; U11 = U1; Init=1; ! Return value required AddData=0; AddData2=0; } [ThR] { ! Calculate thermistor resistance. ! ! Use previous values for U11, U22 UT=U22*(S0-S7)/(S4-S7); ! U22*(R-REF2)/(REF1-REF2) ThR=R1*R2*(U22-UT)/(R2*(U11+UT)+UT*R1); ! ! Note: ! This procedure is executed twice for every level (iteration) ! After evaluation of ThR the value for Tk is calculated by ! internal support (by Data Handler) using interpolation and ! the table [Thermistor] in Vaisala.ini. } [Tdr] { ! Calculate temperature drift for voltage references ! Values U11 and U22 are stored for later use. ThR- procedure ! will use these to calculate thermistor resistance. ! ! Calculate new U11, U22 for next iteration of ThR. ! Tdr=K0+K1*Tk+K2*Tk*Tk; U22=U2+Tdr; U11=U1+Tdr; } [I] { ! Calculation of ozone sensor current ! Use U22 calculated in [Tdr] ! A=(U22/R3); B=S4-S7; ! REF1 - REF2 ! ! Sensors 1 .. 5 ! Modify this to exclude sensors if required ! I1=A*((S1-S7)/B); I2=A*((S2-S7)/B); I3=A*((S3-S7)/B); I4=A*((S5-S7)/B); I5=A*((S6-S7)/B); I=1000000*(I1+I2+I3+I4+I5)/5; ! In uA } [IBG] { ! Current caused by other oxidants ! IBG=I0*(A0+A1*P+A2*P*P)/CP0; } [Data] { ! Finally, calculate the ozone value ! Tb=273.15+Tk; ! Appr. ozone box temperature in K Data=100*C0*(I-IBG)*Tb*fl*Cef*Cref*C; ! Use unit of 1/100 mPa } [AddData] { ! This group is required even if not used. ! Value < -100000 to AddData and AddData2 means "NOT USED" ! ! Internal identifiers used: ! Edt = current data value, same as "Data", but filtered ! PrevEdt = previous data value ! EdtP = edited pressure (same as P, but filtered) ! PrevEdtP= previous edited pressure ! ! For the integrated ozone (AddData) and residual ozone (AddData2): ! ! e3=1.6571 ratio of molar masses of ozone and air ! M3=48.0 [g/mol] molar mass of ozone ! g =9.80665 [m/s2] acceleration of gravity ! NA=6.02217e+023 [1/mol] Avogadro's constant ! D=2.687e+20 [molecule/m2] ! Integrated ozone between pressures PrevEdtP and EdtP is given as ! ! O3int=((e3 * NA)/g * M3 * D))*0.5*(Edt+PrevEdt)*ln(PrevEdtP/EdtP) ! ! in Dobson units when Edt and PrevEdt are given in mPa. ! Note: ! 0.01 in the formulas is to convert Edt back to mPa ! Symbol $ gives natural logarithm. AddData2=7.8899*Edt*0.01; AddData=AddData+(7.8899*(Edt+PrevEdt)/2)*$(PrevEdtP/EdtP)*0.01; }