Professional Documents
Culture Documents
1 Cross-Compensation of FET Sensor Drift and Matrix Effects in The Industrial Continuous Monitoring of Ion Concentrations
1 Cross-Compensation of FET Sensor Drift and Matrix Effects in The Industrial Continuous Monitoring of Ion Concentrations
A R T I C L E I N F O A B S T R A C T
Keywords: Field-effect transistor (FET) sensors are attractive potentiometric (bio)chemical measurement devices because of
FET sensors their fast response, low output impedance, and potential for miniaturization in standard integrated circuit
Microsensor array manufacturing technologies. Yet the wide adoption of these sensors for real-world applications is still limited,
Machine learning
mainly due to temporal drift and cross-sensitivities that introduce considerable error in the measurements. In this
Deep neural networks
paper, we demonstrate that such non-idealities can be corrected by joint use of an array of FET sensors – selective
Continuous ion monitoring
Water quality to target and major interfering ions – with machine learning (ML) methods in order to accurately predict ion
concentrations continuously and in the field. We studied the predictive performance of linear regression (LR),
support vector regression (SVR), and state-of-art deep neural networks (DNNs) when monitoring pH from
combinatorial H+, Na+, and K+ ion-sensitive FET (ISFET) sequences of readings collected over a period of 90
consecutive days in real water quality assessment conditions. The proposed ML algorithms were trained against
reference online measurements obtained from a commercial pH sensor. Results show a greater capability of
DNNs to provide precise pH monitoring for longer than a week, achieving a relative root-mean-square error
reduction of 73% over standard two-point sensor calibration methods.
* Corresponding author at: Instituto de Microelectrónica de Barcelona (IMB-CNM), CSIC, Barcelona, Spain.
E-mail address: josepmaria.margarit@imb-cnm.csic.es (J.M. Margarit-Taulé).
https://doi.org/10.1016/j.snb.2021.131123
Received 4 August 2021; Received in revised form 29 October 2021; Accepted 17 November 2021
Available online 23 November 2021
0925-4005/© 2021 The Authors. Published by Elsevier B.V. This is an open access article under the CC BY-NC-ND license
(http://creativecommons.org/licenses/by-nc-nd/4.0/).
J.M. Margarit-Taulé et al. Sensors and Actuators: B. Chemical 353 (2022) 131123
temporal drift and temperature dependencies of FETs have also been 2. Material and methods
tackled in the literature through ML techniques using a controlled
experimental setup with ISFETs. Amir et al. [24] employed non-linear The following subsections describe the experimental setup (Sec. 2.1),
autoregressive neural networks (NARX) to correct temporal drift, and dataset creation and preparation (Secs. 2.2), the compensation methods:
Sinha et al. [25] compared the performance of a set of ML methods – two-point calibration, LR, SVR, MLP, CNN (Secs. 2.3–2.7), and how we
decision trees, random forests, support vector machines, and multi-layer assessed the performance of ML models in the study (Sec. 2.8).
perceptron – to attenuate the two effects.
None of the former approaches address all FET temporal drift, 2.1. Experimental setup
thermal effects, and cross-sensitivity to other chemical interferents.
Whereas on-chip methods are bounded by circuit design to a limited Fig. 1 depicts the setup deployed to acquire the data used in the
range of changes to environmental sensing conditions, other algorithmic experiments. A custom IP65 probe was installed in a monitoring station
techniques make use of an additional temperature sensor to compensate at the drinking water treatment plant (DWTP) of Sant Joan Despí , Spain,
for thermal effects. The latter complicates instrumentation miniaturi collecting water from the Llobregat’s river at a nominal flow rate 40 L/s.
zation and manufacturability. The probe contained both a sensor array with ISFETs selective to H+,
In this paper we first evaluate how ISFET non-idealities impact on the Na+ and K+ ions, and a Dri-Ref reference electrode (World Precision
reliability of continuous pH monitoring done in crude filtered river Instruments, Sarasota, Florida, USA). The three sensors were fabricated
water for a drinking water treatment plant. In this scenario – and beyond using standard microelectronic technology being the gate of the ISFETs
previous studies conducted on the compensation of temperature sensi based on silicon nitride, a material highly sensitive to pH [3,27]. The
tivity and/or temporal drift using single-FET data generated in ISFET sensors selective to Na+ and K+ were fabricated by modifying the
controlled laboratory settings [24] or simulated in SPICE [25,26] – we pH ISFET gate with polymeric membranes [28]. The membranes were
propose to compensate non-specific responses by incorporating the prepared with Ebecryl® photocurable polymers (Miwon, South Korea)
ISFET selective to the measurement of interest (i.e. pH in the study) and ionophores from Sigma-Aldrich (St. Louis, MO, USA). The iono
together with other ISFETs selective to the main interferents (i.e., Na+ phores used in each case were 4-tert-Butylcalix[4]arene-tetraacetic acid
and K+) into a microsensor array. To model the underlying relationships tetraethylester (Ionophore X) for Na+, and valinomycin (Ionophore I) for
between sensor inputs, we trained machine learning (ML) algorithms K+. All of these ionophores are also selective – but not specific – to their
with temporal sequences of ISFET data collected in the field. In partic principal ion, and they present some degree of cross-response to other
ular, we study the performance of linear regression (LR), support vector ions in solution [29,30]. Membrane composition, preparation and
regression (SVR), multi-layer perceptron (MLP), and causal convolu characterization have been presented elsewhere [7]. An Orion
tional neural networks (CNNs) to overcome the cross-sensitivities, as 90–02–00 double junction Ag/AgCl reference electrode (Thermo Elec
well as temporal drift caused by fouling and leaching, with aims of both tron, Waltham, MA, USA) with 3 M KNO3 solution in its outer chamber
minimizing the measurement errors and of extending sensor lifetime. To was employed to test the sensors previously to their deployment in the
the best of our knowledge, this is the first study to quantify calibration probe.
performance for FET measurements subject to all sensor aging, tem We included the ISFETs selective to both Na+ and K+ ions as they are
perature sensitivity, and ionic matrix effects in continuous measure reported to be the main interferents for pH measurements in solution,
ments conducted with FET-based sensors. Previous research applied with selectivity coefficients in the order of ~ 10− 6 − 10− 5 [27,31]. A
transducer arrays of different sensing nature to recognize taste patterns significant cross-response was, thus, expected given the 8.07 ± 0.28 mM
with good robustness to interferents in discrete beverage samples and the 1.03 ± 0.08 mM average and standard deviation values of the
[9–11]. Here we introduce the joint compensation of drift and respective Na+ and K+ concentrations measured in Llobregat’s waters
cross-sensitivities in FET sensors by using FET-only readings from an during the test dates of this study. These concentrations were measured
array of microsensors fabricated on the same silicon wafer. It is the daily in the laboratories of the water treatment plant using a Perki
earliest work to compare the performance of linear and non-linear nElmer Optima 8300 ICP-OES spectrometer. The dynamic responses of
models when processing dynamic multisensor FET readings in a flow all ISFET sensors were read out by means of a source and drain follower
ing solution and under industrial settings. circuit [2]. To this end, a 100 μA current and a constant potential of
0.5 V were applied between drain and source. The resulting output
voltages are related to the analyte concentrations in solution following
Fig. 1. Experimental setup for continuously acquiring water quality data. The ISFET array was deployed into a custom probe connected to readout electronics
fabricated in house at the Instituto de Microelectrónica de Barcelona. A laptop received raw ISFET measurements via USB, for storage and wireless transmission.
2
J.M. Margarit-Taulé et al. Sensors and Actuators: B. Chemical 353 (2022) 131123
the Nernst equation. These analog signals were digitized and trans lower model performance on the test set than a random 90%− 10%
mitted to a laptop externally accessible via 3G internet connection. We assignment over the entire dataset.
evaluated the precision of our proposed multivariate compensation ap
proaches against reference measurements taken in real time with the 2.3. Baseline: two-point pH calibration
commercial glass electrode Orbisint CPS11D (Endress+Hauser AG,
Reinach, Switzerland) employed in the plant. This probe was verified To compare the monitoring precision achieved with and without
weekly with a pH 9 standard solution. Any deviation exceeding cross-compensation in the field, we first calibrated the sensitivity of the
± 0.21 pH units was corrected via two-point calibration at pH 4 and pH pH ISFET using a simple linear regression to model its static response at
7 against standard solutions. This same calibration method was per two different pH points (i.e., two-point calibration): pH 6 and 9 set with
formed regularly on a quarterly basis to prevent anomalous readings standard buffer in solutions with no noticeable matrix effects. We also
independently of any observed deviation. subtracted the latest pH ISFET measurement of the training set to correct
for the intercept. This universal method was used as a baseline for the
2.2. Dataset creation and preparation study.
A database was created from the raw ISFET measurements sampled 2.4. Compensation by linear regression (LR)
at 1 Hz, starting from December 10, 2018 to March 10, 2019. The data
was downsampled by averaging sensor readings over a period of 5 min We first modeled the temporal relationship between ISFET outputs
to match the sampling rate of the Orbisint commercial pH sensor. We and in-field pH measurements via LR as available in the Python library
filtered out all outliers exceeding 4 standard deviations of the readings. scikit-learn [32]. The LR model can be interpreted as a shallow artificial
We then standardized the filtered data of each sensor independently neural network with linear unit-gain activation of Fig. 3(a). A given
given the statistics of the training set, by subtracting its mean from each training set of N sample sequences is represented by {(x(1), y(1)), ...,
value of the whole dataset and dividing it by its standard deviation. The (x(N), y(N))}. x(n) is a standardized input vector of 128 samples for each
processed data was then presented to the ML models described in Secs. ISFET. The LR estimate of y(n), the corresponding standardized true
2.4–2.7. Fig. 2 shows the multi-sensor ISFET data used in this study. The output pH value in the sample sequence is described by
original multisensor recordings were reformatted to ML models’ input
3 ∑
∑ 128
sequences with overlapping time windows extending 128 readings, y (n) = b + w⋅x(n) = b +
̂ wi (j)xi (n, j) (1)
where each sample sequence included measurements performed along i=1 j=1
the latest ≈ 11 h for all three ISFETs. The temporal information con
tained by these sequences was used to model dynamic phenomena such where n is the index of the sample sequence, i is the index of the ISFET
as sensor drift. Inputting the response of FETs selective to the main ionic sensor, j indicates the multiple integer delay of each ISFET measurement
interferents allowed the algorithms to additionally represent how the in 5-minute periods, b is the intercept or bias term, w(j) is the j-th
response of the H+-selective FET was influenced by changes in the regression coefficient or weight of the w weight vector, and ‘ ⋅ ’ is the dot
interferents. To learn the parameters of the ML models, this data was product operator. The best fit was found using the ordinary least squares
split in percentages customary to the number of sample sequences method assessed with the sum of squared residuals (SSR), equivalent to
available in the dataset: with 90% of the sample sequences (≈ 23,400 minimizing the mean squared error (MSE).
sequences taken along ≈ 81 days) forming the training set, and the
remaining 10% (≈ 2600 sequences taken along ≈ 9 days) forming the 2.5. Compensation by support vector regression (SVR)
test set. We chose this division so that we could evaluate the models
close to real operating conditions, where future deviations of sensor The nonlinear SVR algorithm is the regression estimator of support
responses remain unseen. This sequential split approach usually leads to vector machines (SVMs) and can be expressed as
Fig. 2. Sensor recordings and windowing-splitting methods for pH prediction. H+, Na+, and K+ ISFET measurements were segmented using a 128-wide sliding
window, with a step of 5 min. The predicted pH value corresponded to the last time step of the window. The final 10% of the samples were used as the test set.
3
J.M. Margarit-Taulé et al. Sensors and Actuators: B. Chemical 353 (2022) 131123
Fig. 3. Graphical representation of all the ML models employed in this study, for the case of using all three ISFET readouts available: (a) LR, (b) SVR, (c) MLP, and (d)
causal CNN.
y (n) = b + w⋅ϕ(x(n))
̂ (2) offered by Python ThunderSVM libraries [35]. We performed a grid
search over the error tolerance ϵ, the regularization parameter C, and the
where ϕ(⋅) is a non-linear mapping function. To find the estimator ̂
y (n), spread γ of the RBF kernel to maximize the R2 score.
the ϵ-SVR solves a convex optimization problem in which ϵ defines a
maximum tolerable deviation from target sample sequences y(m) [33].
2.6. Compensation by multi-layer perceptron (MLP)
The optimization is commonly solved in dual form using Lagrangian
multipliers α(m), α * (m). In this form, w can be described as
We evaluated deep neural networks (DNNs) consisting of multiple
∑
N hidden layers located between the inputs and the output. These layers
w= (α(m) − α* (m))ϕ(x(m))T , (3) can be customized in terms of their width (i.e. number of processing
nodes or neurons) and depth (i.e. number of layers). As such, they offer
m=1
4
J.M. Margarit-Taulé et al. Sensors and Actuators: B. Chemical 353 (2022) 131123
We used an MLP model with seven hidden layers and ~ 351 kpara field of the network (i.e. the number of inputs that can modify the output
meters. All DNNs were developed using the Keras interface [36], and in the final layer) extended to all 128 window samples. We made the
trained to maximize the R2 loss using gradient descent via the Adabound network causal by padding the inputs to all layers with zero values in the
optimizer [37]. front. The output layer was a linear fully-connected layer like in the MLP
receiving, in this case, all the feature maps from the neuron encoding the
2.7. Compensation by causal convolutional neural network (CNN) most recent sample in the latest hidden layer.
Lastly, we investigated the performance of a causal CNN akin to 2.8. Performance criteria
WaveNet [38] to learn the time-invariant local relationships between
time steps in the dynamic measurements. We employed seven hidden The performance of all calibration algorithms was evaluated using
convolutional layers and ~ 351 kparameters, as with the MLP. The input root-mean-squared error (RMSE)
to each one of the hidden layers was convolved with 2(2+k) fixed weight √̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅
matrices (i.e., 2(2+k) filters) of size 2 along the time dimension, where k RMSE(y, ̂
y ) = MSE(y, ̂ y) (8)
indicates the layer number. We used dilated convolutions as introduced
in [39] to create the output feature maps and the coefficient of determination (R2)
Fig. 4. Time series (top) and scatter (bottom-left) plots of both the reference pH measurement and its direct estimate from H+-selective FET readouts in the test set.
ISFET sensor data is adjusted with the ISFET sensitivity characterized at the Instituto de Microelectrónica de Barcelona and the latest pH measurement of the training
data. Readouts from FETs selective to the main known ionic interferents are superimposed on the top graph for easier visualization of cross-dependencies to Na+ and
K+ . The residuals are shown in the bottom-right subplot.
5
J.M. Margarit-Taulé et al. Sensors and Actuators: B. Chemical 353 (2022) 131123
Fig. 5. (Left) Violin boxplots showing the daily distribution of the squared residuals; the median value is indicated by the white dot line inside the boxplots. (Right)
Daily RMSE (solid) and R2 (dashed) test values of pH estimated directly from H+-selective FET readouts.
method described in Sec. 2.3. The residuals evince that there is a strong increasing the number of parameters a 50%. Switching to SVR allowed
seasonality at daily intervals, in agreement with the thermal fluctuations of for the highest relative performance enhancement, with a remarkable
this period. The significant changes in the response of the H+ ISFET are RMSE reduction of an average of 59.82% compared to LR.
aligned with both the temporal variations of the reference pH values, and By adding cross-sensitive ISFETs, the prediction accuracies of the
the varying readouts from the Na+ and K+ ISFETs. The behavior depicted in non-linear SVR and DNN models reached R2 scores beyond 0.9 and
Fig. 4 and Fig. 5 indicate strong dependencies on environmental variables RMSE values lower than 0.05. These metrics plateaued at including just
such as interferent ions, together with a temporally decreasing accuracy one additional ISFET, whereas inferring from both Na+ and K+ sensors
and precision alike to aging phenomena. seemed to be mainly beneficial for raising the stability of DNN pre
Table 1 summarizes the average and standard deviation of both dictions beyond the gains reached with just one extra sensor. Predicting
RMSE and R2 scores observed by model and sensor selectivities. In the from all sensors translated into an average DNN reduction of 29.17% in
case of DNNs, these statistics were calculated for five different random the standard deviation of the RMSE metric with respect to only adding
seeds used in the initialization of their parameters. Using a simple LR an Na+ or a K+ sensor, respectively, which is of similar order to the
already improved the R2 score for all sensor combinations, but the linear 23.33% improvements in variability achieved by switching from mon
model is prone to large prediction biases and may exhibit higher RMSEs ovariate to bivariate regression. This tendency may be attributable to
like those achieved when employing H+ or combined H+ and K+ ISFET the high correlation observed between both sensor readouts.
inputs. As expected, incorporating all sensors reduced underfitting by The DNNs of this study outperformed both SVR and linear models for
all sensor combinations, keeping all the standard deviations of metrics
Table 1 below 3%. The causal CNN achieved a better average fit than the MLP as
Average prediction accuracy in terms of overall R2 and RMSE, by ML algorithm seen in R2 and RMSE values. Results came very close to those of the MLP,
and sensor combination. MLP and CNN statistics were obtained by training each reducing its RMSE by a 3.42%. In these same RMSE terms, the CNN
configuration five times, each one with a different initialization seed value. Error achieved 15.90% higher accuracy than the SVR. The CNN model also
intervals are represented as the standard deviation. All other methods were showed a remarkable good fit when using the H+ sensor alone –
trained deterministically. improving the MLP RMSE results by 18.92% and the SVR by 35.48%.
ML Model FET Selectivities R2 RMSE However, the CNN accuracy was lower than the MLP accuracy when
Used using inputs from the K+ ISFET readouts. Our hypothesis is that we
Two-point cal. H+ 0.090 0.167 might need kernel sizes larger than 2 in the K+ input channel to follow
(baseline) the slower dynamics of this sensor. Surprisingly, the MLP predicted with
LR H+ 0.131 0.170 22.50% higher average RMSE stability that the CNN – especially when
H++Na+ 0.203 0.143
inferring from one or two sensors – as computed from the standard de
H++K+ 0.119 0.169
H++Na++K+ 0.435 0.120
viations, and marginally reached the best overall R2 score when pro
SVR H+ 0.658 0.093 cessing data from all H+, Na+, and K+ sensors.
H++Na+ 0.909 0.048 Fig. S.1 in the Supplementary Material shows how calibration
H++K+ 0.895 0.052 through LR attenuated signal distortion and helped bounding the re
H++Na++K+ 0.903 0.050
siduals. This is especially noticeable in the case of adding the readouts of
MLP H+ 0.786 ± 0.016 0.074 ± 0.003
H++Na+ 0.914 ± 0.009 0.047 ± 0.002 other ISFETs, which were also sensitive to temperature changes, and
H++K+ 0.925 ± 0.008 0.044 ± 0.003 that were selective to other known confounding ions. The model was,
H++Na++K+ 0.928 ± 0.006 0.043 ± 0.002 however, unable to effectively correct sensor drift. Even though it
CNN H+ 0.858 ± 0.022 0.060 ± 0.005
brought the points of the scatter plot closer to the diagonal, it exhibited a
H++Na+ 0.927 ± 0.012 0.043 ± 0.004
H++K+ 0.910 ± 0.010 0.048 ± 0.003
consistent prediction bias that, in some days, lowered precision and
H++Na++K+ 0.921 ± 0.007 0.045 ± 0.002 accuracy below the original baseline as noticeable in Figs. S.4 and S.5 of
the Supplementary Material.
The SVR model increased the fitting accuracy through its non-linear
6
J.M. Margarit-Taulé et al. Sensors and Actuators: B. Chemical 353 (2022) 131123
Fig. 6. Time series (top) and scatter (bottom-left) plots of both the reference pH measurement and its prediction from the test set using the CNN models under
different combinations ISFET readouts. The residuals are shown in the bottom-right subplot.
kernel and its higher number of parameters. In line with the results of attribute these expected improvements, while not as substantial as
Table 1, Figs. S.2, S.6 and S.7 show high and consistent gains in perfor switching from LR to SVR, to the additional nonlinear representative
mance for every day of the test set. The top scores corresponded to pre power offered by the neural networks. When combining data from
dictions made from H+ and Na+ sensors, which brought the adjacent values multiple input ISFET sensors, the interquartile ranges of the squared
of the squared residuals below 0.01 and all daily R2s to positive values. residuals were reduced by a factor > 10.
The results from the best performing DNNs, as plotted in Figs. 6, 7, 8 All models and sensor combinations worsened the behavior for the
(CNN) and in Figs. S.3, S.8 and S.9 (MLP), showed further flattening and predictions made in March 7 due to the differing temporal progression of
deseasonality of prediction residuals. The almost linear tendency of the pH with respect to other days in the training set, which made it harder to
scatter plot depicted in Fig. 6 also evinces the lowest predictive generalize. This effect was also noticeable for March 8 in predictions from
dispersion of all models, with a unitary slope according to a pH sensi the H+ ISFET alone, owing to the distinctive perturbations observable from
tivity alike to that of the commercial sensor used as a reference. We the evolution of Na+ and K+ ISFET responses throughout this day.
Fig. 7. Daily RMSE and R2 test scores of the CNN models when predicting pH from different combinations of ISFET readouts.
7
J.M. Margarit-Taulé et al. Sensors and Actuators: B. Chemical 353 (2022) 131123
Fig. 8. Violin boxplots showing the daily distribution of the squared residuals when predicting pH on the test set using the CNN models for different combinations of
ISFET readouts. The white dot line inside them denotes the median value.
8
J.M. Margarit-Taulé et al. Sensors and Actuators: B. Chemical 353 (2022) 131123
9
J.M. Margarit-Taulé et al. Sensors and Actuators: B. Chemical 353 (2022) 131123
Miquel Martín-Ezquerra received his B.E. degree in Computer Science at the Universitat of the IMB-CNM from July 2019 to July 2021. She is specialist in the development of in
Autónoma de Barcelona in 2021. His research interests include data science, sensorics, tegrated analytical systems and Point of care devices based on (bio)chemical sensors –
robotics, and the internet of things. electrochemical semiconductor-based sensors based on ISFETs (Ion selective Field Effect
Transistors), metal thin film microelectrodes, microelectrode arrays (UMEAs) and inter
digitated electrodes – and their application to environmental control, food industrial
Roger Escudé -Pujol received his M.Sc. degree in electronics and automation engineering
processes monitoring, clinical and biomedical analysis.
from the Universitat Politécnica de Catalunya, Spain, in 2004. From 2004, he has been
working at the Instituto de Microelectrónica de Barcelona, IMB-CNM, CSIC, and since 2016
he has been in charge of the printed electronics laboratory. His main research interests are Shih-Chii Liu received her Ph.D. degree in Computation and Neural Systems from the
on the field of sensor instrumentation and the hybridization of printed electronics with California Institute of Technology, Pasadena, in 1997. She worked at various companies in
other technologies. Silicon Valley before returning for her doctorate studies. Currently, she is an Adjunct
Professor in the Faculty of Science at the University of Zurich and co-directs the Sensors
Group at the Institute of Neuroinformatics, University of Zurich, Switzerland. Her interests
Cecilia Jimenez-Jorquera is Research Scientist at the Instituto de Microelectrónica de
include low-power neuromorphic event-driven sensor design; bio-inspired and deep
Barcelona, IMB-CNM, CSIC, Spain (PhD in Chemistry). She joined the Chemical Trans
learning algorithms and hardware for energy-efficient, real-time, adaptive intelligent
ducer Group (GTQ) at the IMB-CNM in January 2000 and she was the Leader of this group
systems.
from January 2003 to June 2013. She was member of the Science and Physics Technology
Area Committee of the CSIC from July 2008 to July 2011. She has been the deputy director
10