## 4 Data Quality Control in TasMAN Using Fuzzy Rules
### Sensor Q4 QC Inputs
#### 4.1.5 Cumulative Rate of Change of Output Values  
For the case of the \"rate of change\" parameter in Equation (1), a further membership function was needed. A sudden spike in a parameter (e.g., temperature) may be followed by a gradual decline back to its previous level. In this instance, the automated QA/QC system would detect the spike and associate a large error with it, but would not associate a large error with the subsequent readings (as the rate of change was small on each occasion). To address this issue, a _cumulative rate of change_ function was introduced to retain some memory of previous rates of change. For the first measurement, the cumulative rate of change (cRoC) membership function was equal to the RoC function. For a following data point, at timestep \(t\), it was calculated via:  
\[\begin{array}{l}\text{if}\left(\text{RoC}_{\text{small}}\left(t\right)+0.5 \times\text{RoC}_{\text{medium}}\left(t\right)\right)<\left(\text{cRoC}_{\text {small}}\left(t-1\right)+0.5\times\text{cRoC}_{\text{medium}}\left(t-1\right) \right)\text{ then}\\ \text{cRoC}_{i}\left(t\right)=\text{RoC}_{i}\left(t\right)\end{array} \tag{1}\]  
else  
\[\begin{array}{l}\text{cRoC}_{i}\left(t\right)=\left(1-k\right)\times\text{ RoC}_{i}(t)+k\times\text{cRoC}_{i}(t-1)\end{array} \tag{2}\]  
\(i=\text{small}\), medium, large  
\begin{table}
\begin{tabular}{l l l l l l} \hline \hline
**Parameter** & **Small** & **Small \(\rightarrow\) Medium** & **Medium** & **Medium \(\rightarrow\) Large** & **Large** \\ \hline Rate of change of temperature (\({}^{\circ}\)C/min) & \textless{}0.03 & 0.03 to 0.05 & 0.05 to 0.07 & 0.07 to 0.11 & \textgreater{}0.11 \\ Rate of change of conductivity (\(\mu\)S/min) & \textless{}50 & 50 to 100 & 100 to 150 & 150 to 250 & \textgreater{}250 \\ Time since last calibration (days) & \textless{}360 & 360 to 540 & n/a & 540 to 720 & \textgreater{}720 \\ Time since last maintenance (days): all & & & & & \\ temperature sensors, SBE37 & \textless{}60 & 60 to 120 & 120 to 150 & 150 to 210 & \textgreater{}210 \\ conductivity and pressure sensors & & & & & \\ Time since last maintenance (days): & \textless{}28 & 28 to 45 & 45 to 65 & 65 to 80 & \textgreater{}80 \\ EC-250 conductivity sensor & & & & & \\ Percentage difference between sensor & \textless{}1.5\% & 1.5\% to 3.5\% & 3.5\% to 6.5\% & 6.5\% to 10.5\% & \textgreater{}10.5\% \\ readings & & & & & \\ \hline \hline \end{tabular}
\end{table}
Table 1: Membership functions for the parameters contributing to data quality.  
where \(i\) is the index of the fuzzy set parameters and \(k\) is the smoothing time constant. A large value of the constant \(k\) results in a longer time for the return of confidence in sensor data following a spike. The first case in Equation (1) ensures that the cumulative rate of change function is able to quickly respond to degradations in sensor quality, while the second case ensures that it takes a longer time for confidence to return in the measurements from that sensor once the rate of change of the parameter decreases. Table 1 shows the characteristics of the membership functions for sources of uncertainty in the TasMAN network.