Journal of Electroanalytical Chemistry 902 (2021) 115770 Contents lists available at ScienceDirect Journal of Electroanalytical Chemistry journal homepage: www.elsevier.com/locate/jelechem Voltammetric sensing using an array of modified SPCE coupled with machine learning strategies for the improved identification of opioids in presence of cutting agents Dionisia Ortiz-Aguayo a, Karolien De Wael b, Manel del Valle a,⇑ a Sensors and Biosensors Group, Department of Chemistry, Universitat Autònoma de Barcelona, Edifici Cn, 08193 Bellaterra, Spain b AXES Research Group, Department of Bioscience Engineering, University of Antwerp, Groenenborgerlaan 171, 2020 Antwerp, Belgium A R T I C L E I N F O A B S T R A C T Keywords: This work reports the use of modified screen-printed carbon electrodes (SPCEs) for the identification of three Opioids drugs of abuse and two habitual cutting agents, caffeine and paracetamol, combining voltammetric sensing and Electronic tongue chemometrics. In order to achieve this goal, codeine, heroin and morphine were subjected to Square Wave Principal component analysis Voltammetry (SWV) at pH 7, in order to elucidate their electrochemical fingerprints. The optimized SPCEs elec- Voltammetric sensors trode array, which have a differentiated response for the three oxidizable compounds, was derived from Silhouette Carbon, Prussian blue, Cobalt (II) phthalocyanine, Copper (II) oxide, Polypyrrole and Palladium nanoparticles ink-modified carbon electrodes. Finally, Principal Component Analysis (PCA) coupled with Silhouette param- eter assessment was used to select the most suitable combination of sensors for identification of drugs of abuse in presence of cutting agents. 1. Introduction this compound relies, first, in the monitoring of therapeutic levels in patients. Secondly, the analysis of morphine is relevant for epidemio- Heroin (3,6-diacetylmorphine, diamorphine, Fig. 1) is a potent syn- logical purposes of drug abuse control and also in forensic cases; in this thetic opiate drug synthesized by acetylation of morphine, typically field it can be an evidence of heroin usage and can help identifying obtained from poppy seeds. The appearance of this illicit drug changes causes of intoxication or death in situations of clinical and pathological from white (pure form) to dark brown due to impurities formed during interest. Codeine (3-methylmorphine, Fig. 1) is a second main alkaloid the manufacturing process or adulterants and cutting agents. The com- separated from opium. This drug is extensively used to treat mild to mon impurities come from opium alkaloids or by-products from the moderate pain and for cough suppression in clinical practice. Despite fabrication process (morphine, monoacetylmorphine, codeine, acetyl- its medical applications, the abuse of this narcotic can also create codeine, noscapine, papaverine or lead) [1–2]. Apart from impurities, health risks. it is frequent in illegal commerce to adulterate the narcotic with some The widespread use of illicit drugs has led to an increase effort cuttings agents; these can be pharmacologically inactive, just like sug- toward developing and improving methods for their detection per ars or starch or, otherwise, with pharmacological activity such as example in a seizure of a smuggled consignment, or in biological sam- paracetamol, caffeine, phenobarbital, quinine, clenbuterol, procaine ples, which is still a very challenging task from an analytical point of or levamisole, among others [3]. In this work, two mentioned exam- view. Several analytical methods have been developed for individual ples were used as cutting agents, paracetamol and caffeine, as certain determination of these compounds such as capillary electrophoresis side-effects are considered for their choice. In the case of paracetamol, [5–6] chemiluminescence [7–8], diffuse reflectance near-infrared it simulates the analgesic effect of heroin; in the case of caffeine, it spectroscopy [9], high-performance liquid chromatography, gas chro- helps vaporizing heroin at lower temperature, facilitating its smoking. matography [10] and surface plasmon resonance based on Morphine (Fig. 1) is the opiate alkaloid which effectively causes immunosensors [11]. Drawbacks associated are the high costs and disruption in the central nervous system, that is why it is pharmacolog- time-consuming nature of these methods, accompanied by a need of ically used to relieve pain in patients [4]. The interest of analysis of complex procedures such as sample pre-treatment step to obtain satis- ⇑ Corresponding author. E-mail address: manel.delvalle@uab.cat (M.del Valle). https://doi.org/10.1016/j.jelechem.2021.115770 Received 30 March 2021; Received in revised form 10 September 2021; Accepted 6 October 2021 Available online 12 October 2021 1572-6657/© 2021 The Author(s). 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/). D. Ortiz-Aguayo et al. Journal of Electroanalytical Chemistry 902 (2021) 115770 Fig. 1. Chemical structure of the three drugs of abuse considered in this study (heroin, morphine and codeine) and their corresponding cutting agents (paracetamol and caffeine). factory results. For these reasons, the development of cheap, effective, way, the best combination of electrodes to form the sensor array could rapid and simultaneous determination procedures in pharmaceutical be defined from their actual performance in the identification of the and illicit samples is still a big challenge in analytical chemistry. opioids and cutting agents. Eventually, some machine learning strate- One approach to overcome the above shortcomings can be the use of gies were tested and their performance examined, choosing finally a electrochemical sensors, as most of these drugs of abuse are electroac- K-nearest neighbor classifier (kNN) as the preferred algorithm. tive substances. Electrochemical sensors may provide some advan- tages, such as a cheap and simple use, low detection limits, wide linear response ranges, good stability and reproducibility. 2. Experimental Electrochemical methods, in special voltammetry, have been already used for individual determination of opiate alkaloids, because 2.1. Chemical and reagents of their advantages in applicability. However, certain difficulties arise when the simultaneous determination of these three compounds is Codeine and heroin were provided by the National Institute of attempted, due to the overlapping of the different voltammograms Criminalistics and Criminology (NICC, Belgium). Morphine hydrochlo- obtained at traditional electrodes. ride, potassium monophosphate, potassium chloride and potassium In this work, the alternative proposed to tackle the problem is the hydroxide were purchased from Sigma-Aldrich (Overijse, Belgium). use of modified electrodes [12], which have fascinated many research- Cobalt (II) phthalocyanine (CoPc), Copper (II) oxide (CuO) nanopow- ers due to their simplicity, high sensitivity and low cost. This kind of der (<50 nm), Polypyrrole doped (PP) and Palladium, powder submi- devices provides improvement based on electrocatalysis, avoiding cron 99.9+% (Pd), which were used as modifiers, were purchased fouling effect and preventing undesirable reactions which can compete from Sigma-Aldrich (St. Louis, MO, USA). Prussian blue (PB) was kinetically with the desired electrode process [13]. Modified elec- obtained from Acros Organics (Geel, Belgium). The preparation of trodes can be prepared by different techniques based on adsorbing the ink composite was done using mesitylene and polystyrene, or attaching specific molecules (e.g. peptides [14] or complexing obtained from Sigma-Aldrich (St. Louis, MO, USA). Graphite powder agents [15] to the surface; this may be achieved by self-assembled (particle size < 50 µm) was received from BDH (BDH Laboratory Sup- monolayers [16], chemical grafting, coating and entrapment, e.g. in plies, Poole, UK). Potassium chloride was purchased from Merck the form of conductive ink [17]. The last strategy has become interest- (Darmstadt, Germany). ing in recent times, because the deliberate and controlled modification All aqueous solutions were prepared using MilliQ water (R > 18 of the electrode surface can produce new surfaces with interesting MΩ·cm-1). The reagents were of analytical reagent grade and used properties employed for new devices and applications in electrochem- without further purification. Fresh stock solutions were prepared the istry. As a further step in electrochemical sensing, a newly, nature- same day of the measurements, to reduce day to day variability. inspired way to proceed, intended to enrich the usable departure infor- mation has become popularized: in this, different electrodes may be used in array form, work with them in parallel, and produce advanced applications at insignificant increase of effort or cost [18]. This 2.2. Instrumentation and apparatus approach will employ then a set of cross-sensitive, chemical sensors that will provide a complex information-rich response from a sample. SWV measurements were performed using a Multi-channel Poten- This set of complex electrochemical signals generated are next pro- tiostat/Galvanostat/Impedance Analyzer (MultiPalmSens4, The cessed using intelligent chemometric algorithms (e.g., machine learn- Netherlands) controlled by Multitrace software. ItalSens graphite ing strategies) to allow for the qualitative identification or the screen-printed electrodes containing a graphite working electrode quantitative determination of the compounds [19]. As the main char- (3 mm diameter), a carbon counter electrode and a (pseudo)silver ref- acter of this work here is the qualitative identification of the com- erence electrode (PalmSens, The Netherlands) were used for the mea- pounds considered, firstly, the multivariate data generated was surements, as received or after modification. examined using Principal Component Analysis (PCA) [20]; this is nor- mally the first strategy used to visualize similarity between samples. From this PCA analysis, a first grouping of samples could be estab- 2.3. Modification of the electrode surface lished and a measure of clustering could be calculated using the Sil- houette parameter [21]. The material used for the modification of the SPCE is a graphite- The set of SPCE sensors to form the array considered the ensuing based ink-like composite. The corresponding modifier, graphite and six modifiers: Graphite-Ink, Prussian blue-Ink, Cobalt (II) phthalocya- polystyrene were thoroughly dispersed with mesitylene for 2 hours nine-Ink, Copper (II) oxide-Ink, Palladium nanoparticles-Ink and Poly- [17]. After that, 2 minutes of sonication was performed in order to pyrrole-Ink. In the procedure, these were incorporated one at a time in obtain a medium thick solution. The ink-like composite was dropped the array in a step way manner, for which after PCA analysis and cal- (1 μL) onto the surface (Fig. 2) of a graphite SPCE and dried at 40 ° culation of the Silhouette parameter, the improvement of the latter C for at least 1 hour in order to remove the solvent and let the SPCE determined the benefits of including the contemplated sensor. In this operative. 2 D. Ortiz-Aguayo et al. Journal of Electroanalytical Chemistry 902 (2021) 115770 Fig. 2. Scheme of the experimental procedure for the electrode surface modification. Firstly, an ink-like solution was prepared incorporating the corresponding modifier. Then, 1 µL of ink was dropped on the electrode surface and dried a 40 °C. 2.4. Characterization of the electrodes by scanning electron microscopy Which can be also written as: 8 > > 1  abððiiÞÞ ; if aðiÞ < bðiÞ The morphological characterization of the modified SPCE elec- < trodes was performed by Field Emission Gun-Scanning Electron Micro- sðiÞ ¼ 0; if aðiÞ ¼ bðiÞ ð2Þ > > scope (FEG-SEM) of Zeiss, model MERLIN SM0087 and Energy : bðiÞ  1; if aðiÞ > bðiÞ aðiÞ Dispersive X-Ray Analysis (EDX). Imaging was performed based on secondary, back-scattered electrons. The Silhouette value is a measure of how similar an object to its own cluster (cohesion) compared to other clusters (separation). The 2.5. Procedure Silhouette ranges from −1 to +1, where a high value (close to +1) indicates that the object is well matched to its own cluster. If most Samples were prepared in phosphate buffer 20 mM containing samples have a high Silhouette value, then the clustering configuration 100 mM KCl (PBS). This media was used as supporting electrolyte is appropriate. If many points have a low or negative value, then the for electrochemical measurements; its pH was adjusted to desired clustering configuration may have too many or too few clusters. The value using a 100 mM KOH solution using a CyberScan 510 pH-meter average of the Silhouette parameter for the whole set of samples can from Eutech Instruments (Landsmeer, The Netherlands) equipped with then be employed as an index to evaluate the overall clustering ability a HI-1131 glass bodied pH electrode from Hanna Instruments (Bed- of the selected sensor configuration, in a procedure to obtain the best fordshire, United Kingdom). SWV measurements were performed by identification ability. placing a volume of 50 µL of sample solution onto the printed part of the SPCE, which was maintained in horizontal position. The tech- 2.7. Data treatment nique employed for the determination of the considered substances was Square Wave Voltammetry (SWV). The single scan SWV parame- The web page Clustvis [23] was the tool used for online PCA calcu- ters were as follows: potential range 0 V to 1.2 V, step potential lation; Sigmaplot (Systat Software Inc., San Jose, CA, USA) was used to 5 mV, amplitude 25 mV and frequency 10 Hz, as employed in former graphically represent and analyze the results. Microsoft Excel 2016 studies in the laboratory [22]. and Orange open source programming language (University of Ljubl- jana, Slovenia) [24–25] were used to perform some Silhouette calcula- 2.6. Calculation of Silhouette parameter tions and to generate the identification models for which K-nearest neighbor classifier (kNN), Random Forest, Naive Bayes and Support PCA is a suitable linear visualization method of multivariate data, Vector Machine (SVM) algorithms were employed and compared [26]. that allows the reduction of the dimensionality of a multivariate prob- lem and facilitates the visualization of the groupings of the multivari- 3. Results and discussion ate profiles by remarking similarities and differences between them, forming sample clusters. PCA is very useful to identify these clusters, This research depicts an intelligent sensor strategy, in which a but it is normally hard to interpret and to validate the grouping. For given opioid is identified, with the possibility of being confounded this reason, the Silhouette calculation [21] was introduced as a mea- by a cutting agent, and where the involved technique used is voltam- sure of clustering, i.e. how easy is to distinguish between the clusters metry. In short, the strategy combines the use of multiple sensor elec- associated to the different compounds. This strategy refers to a method trochemistry to extract the fingerprint of each compound on each of interpretation and validation of consistency within clusters of data, sensor, followed by advanced data processing for interpreting the providing a numerical figure of how well each object matches its multi-dimensional generated data. cluster. The study started defining a procedure for the ink modification of The Silhouette is based on the calculation of two parameters: a and the SPCE with their initial characterization and operation. Next, the b. For each sample i, a(i) is the average distance between i and all sensor array was optimized by step by step systematic evaluation of other samples within the same cluster. In the case of b(i) is the smallest the incorporation of an additional sensor electrode, till maximum iden- average distance of i to all samples in any other cluster, of which i is tification ability was achieved. To evaluate this, it was used PCA to not a member. Silhouette parameter is calculated then as: visualize clustering of target substances and how easily these could be distinguished, together with calculation of a clustering metrics, bðiÞ  aðiÞ sðiÞ ¼ ð1Þ the Silhouette parameter, to provide a numeric criterion for the maxfaðiÞ; bðiÞg optimization of the best sensor array configuration. Finally, kNN and 3 D. Ortiz-Aguayo et al. Journal of Electroanalytical Chemistry 902 (2021) 115770  1 additional classifiers were used as pattern recognition model to per- pffiffiffi nDF 2 form automatic identification of the substances considered in our Ip ¼ 0:4463  n  F  c  A  ν ð3Þ RT study case. Summarizing, this section verifies the proper modification of the electrodes via ink-deposit, showing a quasi-homogeneous distribution 3.1. Characterization of the electrode surface of the metal nanoparticles between the graphite particles, and yielding the different prepared electrodes comparable active surfaces. Characterization of the ink-modified working electrodes (WE) employed in this work was done using microscopy studies and electro- chemical techniques. 3.2. Electrochemical response A SEM characterization was performed in order to investigate the spatial distribution of the ink-nanoparticles and to verify if the The voltammetric responses for each of the modified screen-printed nanoparticles were all on the external surface or in the inner layers. electrodes were first evaluated towards the five individual compounds As can be observed in Fig. 3, the different modifiers are distributed (three drugs and two cutting agents), to assure that the generated sig- quasi-homogeneously between the graphite layers verifying the pres- nals were different enough for the desired application. ence of the expected metals, on their respective inks through their As a result, and as described under conditions in Section 2.5, indi- EDX spectra (Fig. 4); electrodes modified with Polypyrrole or unmod- vidual stock solutions of 300 µmol·L−1 of heroin, morphine, codeine, ified are not shown in the manuscript because of absence of distinctive paracetamol and caffeine in PBS at pH 7 were determined using metallic signals. However, their spectra can be checked in the supple- SWV. It was decided to perform the electrochemical measurements mentary material. at neutral pH because heroin and morphine undergo some hydrolysis After microscopy studies, the effective surface area of bare and reactions at alkaline pH [3,28]. Measurements were done in random modified electrodes was evaluated according to the Randles–Sevcik sequence to avoid any structure in the signals. equation (eq (3)) [27], where n is the number of transferred electrons Heroin gives rise to an irreversible oxidation split peak at +0.81 V for the redox reaction (in this case 1), F is the Faraday’s constant on SPCE at pH 7 due to the oxidation of the amino group, which is in (96485 C·mol−1), c the concentration of electroactive substance concordance with the literature [4,28–30]. An additional oxidation (mol·cm−3), A is the effective area in cm2, v the scan rate (V·s−1), R peak was observed at a lower potential +0.40 V due to the oxidation the gas constant (8.314 J·mol−1·K−1), T the temperature in K and D of the phenol group of 6-monoacetylmorphine (6-MAM) a trace con- is the diffusion coefficient for ferrocyanide (6.32·10−6 cm2·s−1). For stituent present in the sample (typical content, 3 wt%). In detail, 6- that, CV experiments using 20 mM KH2PO4 and 100 mM KCl contain- MAM is an impurity from heroin synthesis, resulting in the incomplete ing 5 mM [Fe(CN)6]3−/[Fe(CN)6]4− solution in the potential range of acetylation of morphine and also a product of hydrolysis of the alka- −0.4 to 0.8 V were performed. Applying 7 different scan rates (0.01, loid present in most heroin samples [1]. As can be seen in Fig. 5, the 0.025, 0.05, 0.1, 0.2, 0.3 and 0.5 V·s−1) it could be calculated the peak corresponding to the oxidation of the phenol group of 6-MAM active area of each WE from the slope of the regression line of v1/2 and morphine is overlapped with the oxidation peak of paracetamol. (V·s−1) vs. Ip·c−1 (A·cm3·mol−1). The details of the performed voltam- The same situation occurs between the second oxidation peaks of her- mograms can be found in Supplementary Info. Concerning the calcu- oin and morphine with codeine, foreseeing a case with difficult signal lated active areas, these were: 11.7 mm2 for the bare electrode, resolution. 8.2 mm2 for Graphite/SPCE-Ink, 8.5 mm2 for Copper (II) oxide/ As shown in Fig. 5, complex and highly overlapped signals are SPCE-Ink and 8.1 mm2 for Prussian blue/SPCE-Ink. 9.3 mm2 for Cobalt obtained along the whole voltammograms and with the different sen- (II) phthalocyanine/SPCE-Ink, 9.4 mm2 for Pd nanoparticles/SPCE-Ink sors considered. The fingerprint of each compound from a single sen- and 6.1 mm2 for Polypyrrole/SPCE-Ink, whereas the geometric area sor is not enough information, which can represent a limitation for the was 7.1 mm2 (Ø=3 mm). identification of the considered substances alone. For better assess- Fig. 3. SEM characterization of (A) Graphite/SPCE-Ink, (B) Cobalt (II) phthalocyanine/SPCE-Ink, (C) Copper (II) oxide/SPCE- Ink, (D) Prussian blue/SPCE-Ink (E) Pd nanoparticles/SPCE-Ink and (F) Polypyrrole/SPCE-Ink. 4 D. Ortiz-Aguayo et al. Journal of Electroanalytical Chemistry 902 (2021) 115770 Fig. 4. EDX analysis of (A) Cobalt (II) phthalocyanine/SPCE-Ink, (B) Copper oxide (II)/SPCE-Ink, (C) Prussian blue/SPCE-Ink and (D) Pd nanoparticles/SPCE-Ink. ment, a chemometric assay was further done: PCA was carried out to Fig. 6A, it can be seen that the major part of the variability among better evaluate mathematically the similarities and the complementar- the samples, the most relevant information is explained for PC1 ities between the voltammetric responses of the compounds of interest. (81.1%). In this plot, it is clear to observe that Polypyrrole (PP) dom- inated the response in comparison with the other modifiers, also with 3.3. Selection of the working electrodes using Principal ComponentAnalysis a high dispersion for the replicas, distorting all the system. This argu- strategies ment was applied to discard it from the set of modified electrodes. The discrepancies in the voltammograms for this electrode can be also Once the voltammograms of the five compounds of interest under observed in Fig. 5D. In there, the voltammogram from the PP modified study were collected with the six modified screen-printed electrodes, ink did not show very different shapes for the different compounds a PCA was performed. Each sample was measured in four replicates under study, on the contrary, a high non-specific variability, e.g. the to check any drift or memory effect in electrodes. The complete set baseline was observed. For all the mentioned reasons, a refinement of samples were measured in random order, to roll out any structure of the calculation was performed removing the PP modified electrode in the data. The information gathered in this case to perform the math- to evaluate the rest of candidates. The results are shown in Fig. 6B. As ematical calculation was one voltammogram per each sample, and per it can be seen, the relevant information of the samples using the two each electrode, and strategy was to check for similarities and differ- first PCs made 60.7% of the total variability. Regarding to this plot, ences among these. With PCA strategy it is expected that the redun- it is possible to notice that the purple sensor samples, which corre- dant electrodes (electrodes that contribute with the same spond to the Prussian blue (PB) modifier, presented large dispersion information) would appear superimposed in the scores space, while in comparison with the others, mainly a lack of stability in the voltam- electrodes with different responses will manifest in distinction in it. metric responses. Because of this inconsistence, the Prussian blue mod- Moreover, this strategy may allow to detect if electrodes can discrim- ifier was also discarded from the system. These undesired features can inate the studied compounds and how similar are the replicates of one be observed in the different elongated purple clusters (symbol shape sample. replicas) shown in Fig. 6B. The scores of samples corresponding to the two first principal com- At this point, a new PCA was calculated with the remaining four ponents (PC) (the coordinates of each sample/electrode combination modifier inks: Carbon, Cobalt phthalocyanine (II), Copper (II) oxide in the new space defined by the transformation defined for the PCA) and Pd nanoparticles (Fig. 7A). Applying the previous criteria for the five compounds of interest are represented in Fig. 6. In commented for the PP and PB modifiers, it was decided to remove 5 D. Ortiz-Aguayo et al. Journal of Electroanalytical Chemistry 902 (2021) 115770 Fig. 5. Voltammetric response for Heroin (pink), Morphine (purple), Codeine (blue), Paracetamol (black) and Caffeine (red) using the six modified electrodes. (A) Graphite/SPCE-Ink; (B) Cobalt (II) phthalocyanine/SPCE-Ink; (C) Pd nanoparticles/SPCE-Ink; (D) Polypyrrole/SPCE-Ink; (E) Copper (II) oxide/SPCE-Ink; (F) Prussian blue/SPCE-Ink. SWV measurements were performed by placing 50 µL solution onto SPCE. The single scan SWV parameters were as follows: potential range 0 V to 1.2 V, step potential 5 mV, amplitude 25 mV and frequency 10 Hz. The scan rate was 50 mV·s−1. A 300 µmol·L−1 individual solution was employed for the six modified screen-printed electrodes. Fig. 6. Score plot of the two components obtained after PCA analysis. 4 replicates for each sensor were done determining the five compounds of interest: heroin, morphine, codeine, paracetamol and caffeine with a concentration of 300 µmol·L−1. (A) Use of an array with six SPCEs: Graphite/SPCE-Ink; Cobalt (II) phthalocyanine/SPCE-Ink; Copper oxide (II)/SPCE-Ink; Prussian blue/SPCE-Ink; Pd nanoparticles/SPCE-Ink and Polypyrrole/SPCE-Ink. (B) Use of the optimized sensor array: Graphite/SPCE-Ink; Cobalt (II) phthalocyanine/SPCE-Ink; Copper oxide (II)/SPCE-Ink; Prussian blue/SPCE-Ink and Pd nanoparticles/SPCE-Ink. the Copper (II) oxide electrode from the sensor array. This sensor pre- 3.4. Optimization of the sensor array from the Silhouette parameter sented some drift among the four replicates of almost all the studied compounds (like PP and PB), causing a distortion in the clusters of Once a first assessment of sensors was done, the final optimization the pure compounds. But at this point, the PCA strategy was able to was developed, in this case with use of an objective numeric criteria. differentiate clearly the cutting agents and the drugs of abuse (see This second part consisted to determine which combination of the how the symbols group together in Fig. 7A and 7B. Finally, the last selected sensors is more suited to obtain the best performance in the PCA with the three modifiers selected is shown in Fig. 7B. As it can identification of the studied compounds. To reply this question, a be observed, these candidates showed different response towards the new strategy, which was the calculation of the Silhouette parameter studied molecules, and with limited dispersion, facilitating the assign- as a measure of the clustering degree was applied for the first time ment of substances to its class. in our group to deal with the problem. And from this point here, the 6 D. Ortiz-Aguayo et al. Journal of Electroanalytical Chemistry 902 (2021) 115770 Fig. 7. Score plot of the two components obtained after PCA analysis. 4 replicates for each sensor were done determining the five compounds of interest: heroin, morphine, codeine, paracetamol and caffeine with a concentration of 300 µmol·L−1. (A) With the 4 SPCE array: Graphite/SPCE-Ink; Cobalt (II) phthalocyanine/ SPCE-Ink; Pd nanoparticles/SPCE-Ink; Copper (II) oxide/SPCE-Ink. (B) With the 3 SPCE array: Graphite/SPCE-Ink; Cobalt (II) phthalocyanine/SPCE-Ink and Pd nanoparticles/SPCE-Ink. Fig. 8. Score plot of the two first components obtained after PCA analysis of information provided by each single SPCE electrode. A total of 20 samples were analyzed corresponding to quadruplicate determination of 300 µmol·L−1 of heroin, morphine, codeine, paracetamol and caffeine, using: (A)Graphite/SPCE-Ink, (B) Cobalt (II) phthalocyanine/SPCE-Ink, (C) Copper (II) oxide/SPCE-Ink, (D) Prussian blue/SPCE-Ink, (E) Pd nanoparticles/SPCE-Ink and (F) Polypyrrole/SPCE- Ink. complete set of voltammograms from a given sample, as determined With this multiple information approach, a first PCA analysis was by the specific sensors forming the array, was used for the data pro- done, which performed an initial, unsupervised clustering of the data cessing. The first step for this was to do the unfolding of the data, according to their similarity in the multivariate space. Next, the Sil- i.e. the different voltammograms corresponding to a sample were con- houette parameter was calculated to assess the goodness of the accom- catenated in a unique column and used as available information for the plished clustering, whereas a better clustering will embrace an easier processing. This is the usual way to cope with this limitation of PCA, identification of a given sample. In fact, the Silhouette calculation pro- which works vectorially, not matrix-like [31]. Alternatively, there vides a parameter for each sample, based on a(i) and b(i), which shows are N-way alternatives to this treatment, but are much less spread in the intra-cluster compared with the inter-cluster variability. In this the field, and are of more difficult use [32]. way, it is possible to quantify numerically which cluster is better 7 D. Ortiz-Aguayo et al. Journal of Electroanalytical Chemistry 902 (2021) 115770 Table 1 The results of these combinations are collected in Fig. 9 . Appar- Average of Silhouette parameter for the stepwise optimization of the sensor ently, the visualization of the clusters for the different compounds in array. the three cases is quite good, so the crucial argument to decide which Number of SPCE in the array Modified SPCE in the array Silhouette parameter combination is the most suitable for the case of study is the Silhouette 1 C +0.849* parameter. As it can be observed in Fig. 9, the global clustering for the CoPc +0.735 three cases is largely similar, showing the best combination for the CuO +0.640 couple C + Pd with a calculated s of +0.863 (Fig. 9B). To finally take PB +0.328 Pd +0.817 the decision, the last possibility combining the three modified sensors PP +0.041 was evaluated. The PCA obtained for the combination using three 2 C-CoPc +0.841 SPCE sensors, and s=+0.877 is shown in Fig. 10B. C-Pd +0.863* As a result, it can be concluded that the use of the combination of CoPc-Pd +0.848 the modifying inks with these three modifiers allowed the optimal 3 C-CoPc-Pd +0.877* individual determination of the compounds under study. As it can be * observed in Fig. 10B, the different sensors proportionated the particu- Optimal configuration obtained after systematic evaluation on each step. lar response toward the individual compounds, showing five clusters, with close grouping, and clear differentiation. The PCA obtained is discriminated in comparison with all the clusters involved in the sys- appropriate, representing the relevant information between PC1 and tem. It is important to highlight that the data collected to perform this PC2 with a variance of 76.5%. The average Silhouette parameter kind of analysis were the scores of the two first principal components finally obtained, +0.877 is a high value, and close to the highest (PC1 and PC2) obtained previously in the PCA score graphs from the attainable value, +1.00, forecasting an easy identification in the final unfolded voltammograms data. This treatment is useful to reduce the ‘intelligent’ identification of the selected compounds. It is also clear dimensionality in the case of voltammetric data; essentially it just that the information provided by the combination of the three modi- transforms the voltammograms from a multidimensional matrix to a fiers previously commented is very similar to the combination of gra- 2D matrix with condensed and simplified info. phite and Pd nanoparticles with a Silhouette global parameter Therefore, the procedure to afford this case was the calculation of of +0.863, and a simpler setup of only two sensors in the array. For the Silhouette parameter for different situations, in the stepwise strat- future applications, it was decided to maintain Pd in the sensor array egy for the optimization of the sensor array. Firstly, the calculation in order to collect the information it provided. As it can be seen in was done for each sensor individually, that is, from the six sensors pre- Fig. 7B, the electrochemical response proportionated by this modifier pared initially. sensor supplied differentiated response (grey points in a rather sepa- As it can be observed in PCA score plots on Fig. 8, the sensors rate region) in comparison with the remaining working electrodes. which produced worst clustering were CuO, PB and PP. This fact can The performed analysis would be also a base criterion to ascertain if be verified with the calculation of the Silhouette parameter, as summa- the application can be performed with just a single sensor (the one rized in Table 1. In this case, the three electrodes mentioned presented with graphite ink, in this case), or the complexity involved in the the worst Silhouette parameter with values of +0.640 for CuO, use of a sensor array balances the obtained gains. Lastly, the use of +0.328 for PB and +0.041 for PP. This first assessment, showing that CoPc alone was completely discarded exhibiting a value of Silhouette best option with a single sensor is using the SPCE with graphite ink, global parameter of +0.735. yielded an average Silhouette parameter of +0.849. With this infor- mation, it is important to remark that with any of the three sensors alone (C, CoPc and Pd) the identification application could be carried 3.5. K-nearest neighbor classifier out, since the Silhouette parameter can be considered acceptable. However, our primary objective is to complement the information To conclude the final section of this study, a kNN classifier method from different sensors in an electronic tongue approach to improve was used to perform the final automated and intelligent operation. final performance and reach a better degree of clustering. This may KNN [33] is one of the most fundamental and simple unsupervised be of help in scenarios with unfavorable S/N ratio, as would be the classification methods and should be one of the first choices for a clas- case with lower concentration of the species sought, or with additional sification study when there is little or no prior knowledge about the interference effects. Therefore, in the stepwise process, a second elec- distribution of the data. KNN just stores all the available cases and trode is incorporated in the array, and the Silhouette parameter is cal- classifies the new data or case based on a similarity measure. The only culated to provide the best combination of sensors from the set C, CoPc parameter to tune is the number of closest neighbors to consider (the and Pd. variable k) which can be obtained examining which is the best perfor- Fig. 9. Score plot of the two first components obtained after PCA analysis. A total of 20 samples were analyzed corresponding to quadruplicate determination of 300 µmol·L−1 of heroin, morphine, codeine, paracetamol and caffeine, with pair of SPCE electrodes: (A) C-CoPc, (B) C-Pd (C) CoPc-Pd. 8 D. Ortiz-Aguayo et al. Journal of Electroanalytical Chemistry 902 (2021) 115770 Fig. 10. (A) Silhouette plot for the different samples considered using the best combination of three SPCE sensors (C-CoPc-Pd). (B) Score plot of the two components obtained after PCA analysis. A total of 20 samples were analysed corresponding to quadruplicate determination of 300 µmol·L−1 of heroin, morphine, codeine, paracetamol and caffeine using the three SPCE sensors. Table 2 Confusion matrix after applying the kNN algorithm, using leave-one-out cross-validation and k = 4. Predicted Actual Heroin Morphine Codeine Paracetamol Caffeine Σ Heroin 4 0 0 0 0 4 Morphine 0 4 0 0 0 4 Codeine 0 0 4 0 0 4 Paracetamol 0 0 0 4 0 4 Caffeine 0 0 0 0 4 4 Σ 4 4 4 4 4 20 Table 3 Results of the statistical calculation using some machine learning strategies as kNN (k = 4), Forest, Naive Bayes and SVM employing leave-one-out cross-validation. Model Compound Classification accuracy Precision Sensitivity Specificity kNN Heroin 1.0 1.0 1.0 1.0 Morphine 1.0 1.0 1.0 1.0 Codeine 1.0 1.0 1.0 1.0 Paracetamol 1.0 1.0 1.0 1.0 Caffeine 1.0 1.0 1.0 1.0 Random Forest Heroin 1.0 1.0 1.0 1.0 Morphine 1.0 1.0 1.0 1.0 Codeine 1.0 1.0 1.0 1.0 Paracetamol 1.0 1.0 1.0 1.0 Caffeine 1.0 1.0 1.0 1.0 Naive Bayes Heroin 1.0 1.0 1.0 1.0 Morphine 1.0 1.0 1.0 1.0 Codeine 1.0 1.0 1.0 1.0 Paracetamol 1.0 1.0 1.0 1.0 Caffeine 1.0 1.0 1.0 1.0 mance when k is varied. In this particular case, the number of inte- and Naive Bayes produce proper results in all the indicators previously grands in the cluster is known beforehand, as it corresponds to the mentioned. In the case of SVM, certain degree of misclassification of number of replicas of each substance tested, k = 4. particular samples is observed, specifically heroin and horphine. In Table 2 shows the confusion matrix of the identification accom- other words, the vast majority of algorithms employed demonstrated plished. Cross validation of the identification model was done with a correct identification of the samples, thanks to the excellent degree the leave one out variant, as there were not many samples in the data of clustering achieved by the optimized sensor system. set. With these excellent identification performance, statistic indica- tors of goodness of identification were also excellent in all instances, with indicators of classification accuracy, precision, sensitivity and 4. Conclusions specificity, all 100%. Additional machine learning strategies were tested in order to compare the obtained results. The identification The presented work reports for a first time the qualitative analysis algorithms tested were Random Forest, Naive Bayes and Support Vec- for the determination of the following drugs of abuse: heroin, mor- tor Machines (SVM). As it can be observed in Table 3, Random Forest phine and codeine and their corresponding cutting agents (caffeine 9 D. Ortiz-Aguayo et al. Journal of Electroanalytical Chemistry 902 (2021) 115770 and paracetamol) combining the use of modified screen-printed elec- [6] Z. Zhang, B.o. Yan, K. Liu, Y. Liao, H. Liu, CE-MS analysis of heroin and its basic impurities using a charged polymer-protected gold nanoparticle-coated capillary, trodes with chemometrics tools, in what has been named a multisen- Electrophoresis 30 (2) (2009) 379–387. sory analysis system or electronic tongue approach. [7] Y. Zhuang, X. Cai, J. Yu, H. Ju, Flow injection chemiluminescene analysis for The samples were analyzed by SWV technique for extracting the highly sensitive determination of noscapine, J. Photochem. Photobiol. A Chem. fingerprint of the individual substances, coupled with advanced data 162 (2–3) (2004) 457–462. [8] Y. Zhuang, D. Zhang, H. Ju, Sensitive determination of heroin based on treatment such as PCA and Silhouette parameter calculation. The use electrogenerated chemiluminescence of tris(2,20 -bipyridyl)ruthenium(II) of PCA allowed firstly the pre-selection of the best sensors to define immobilized in zeolite Y modified carbon paste electrode, Analyst 130 (4) the candidates for the sensor array and secondly, after calculation (2005) 534–540. [9] J. Moros, N. Galipienso, R. Vilches, S. Garrigues, M.d.l. Guardia, Nondestructive of the Silhouette parameter, permitted its accurate optimization, direct determination of heroin in seized illicit street drugs by diffuse reflectance showing the most suitable combination of working electrodes. Thanks near-infrared spectroscopy, Anal. Chem. 80 (19) (2008) 7257–7265. to the application of both tools, the final combination selected was [10] C. Meadway, S. George, R. Braithwaite, A rapid GC-MS method for the determination of dihydrocodeine, codeine, norcodeine, morphine, normorphine with electrodes modified with Graphite, Cobalt (II) phthalocyanine and 6-MAM in urine, Forensic Sci. Int. 127 (1-2) (2002) 136–141. and Pd nanoparticle inks. With the optimized sensor array, different [11] G.o. Sakai, K. Ogata, T. Uda, N. Miura, N. Yamazoe, A surface plasmon resonance- identification models were tested demonstrating that kNN could be based immunosensor for highly sensitive detection of morphine, Sensors Actuators, B Chem. 49 (1-2) (1998) 5–12. easily developed, and showing performance among the best. [12] J. Wang, Modified electrodes for electrochemical sensors, Electroanalysis 3 (4-5) The reported work demonstrates the advantages of the modifica- (1991) 255–259. tion through an ink-like solution composite of screen-printed electro- [13] W. Ren, H.Q. Luo, N.B. Li, Simultaneous voltammetric measurement of ascorbic acid, epinephrine and uric acid at a glassy carbon electrode modified with caffeic chemical sensors for on-field analysis results in a promising acid, Biosens. Bioelectron. 21 (7) (2006) 1086–1092. methodology that could substitute the classical time-consuming meth- [14] N. Serrano, B. Prieto-Simón, X. Cetó, M. del Valle, Array of peptide-modified ods. Future works are directed to equivalent case studies, but with electrodes for the simultaneous determination of Pb(II), Cd(II) and Zn(II), Talanta quantification purposes of arbitrary mixtures of opioids and cutting 125 (2014) 159–166. [15] N. Serrano, A. González-Calabuig, M. del Valle, Crown ether-modified electrodes agents. for the simultaneous stripping voltammetric determination of Cd(II), Pb(II) and Cu (II), Talanta 138 (2015) 130–137. [16] U.E. Wawrzyniak, P. Ciosek, M. Zaborowski, G. Liu, J.J. Gooding, Gly-Gly-His CRediT authorship contribution statement immobilized on monolayer modified back-side contact miniaturized sensors for complexation of copper ions, Electroanalysis 25 (6) (2013) 1461–1471. Dionisia Ortiz-Aguayo: Conceptualization, Methodology, Investi- [17] A. Cipri, M. del Valle, Pd nanoparticles/multiwalled carbon nanotubes electrode system for voltammetric sensing of tyrosine, J. Nanosci. Nanotechnol. 14 (9) gation, Data curation, Visualization, Writing – original draft, Software. (2014) 6692–6698. Karolien De Wael: Formal analysis, Funding acquisition. Manel del [18] M. del Valle, Bioinspired sensor systems, Sensors 11 (11) (2011) 10180–10186. Valle: Conceptualization, Methodology, Software, Writing – review [19] A. Legin, D. Kirsanov, M. del Valle, Avoiding nonsense in electronic taste sensing, TrAC Trends Anal. Chem. 121 (2019) 115675. & editing. [20] L. Moreno‐Barón, R. Cartas, A. Merkoçi, S. Alegret, J.M. Gutiérrez, L. Leija, P.R. Hernandez, R. Muñoz, M. del Valle, Data compression for a voltammetric Declaration of Competing Interest electronic tongue modelled with artificial neural networks, Anal. Lett. 38 (13) (2005) 2189–2206. [21] Thinsungnoen, T., Kaoungku, N., Durongdumronchai, P., Kerdprasop, K., and The authors declare that they have no known competing financial Kerdprasop, N. The Clustering Validity with Silhouette and Sum of Squared Errors. interests or personal relationships that could have appeared to influ- Proc. 2nd Int. Conf. Ind. Appl. Eng. 2015, 3 (7), 44–51. ence the work reported in this paper. [22] A. Florea, J. Schram, M. de Jong, J. Eliaerts, F. Van Durme, B. Kaur, N. Samyn, K. De Wael, Electrochemical strategies for adulterated heroin samples, Anal. Chem. 91 (12) (2019) 7920–7928. Acknowledgments [23] T. Metsalu, J. Vilo, ClustVis: A web tool for visualizing clustering of multivariate data using Principal Component Analysis and heatmap, Nucleic Acids Res. 43 (W1) (2015) W566–W570. This research was funded by the Spanish Ministry of Science and [24] M. Peker, O. Özkaraca, A. Şaşar, Use of orange data mining toolbox for data Innovation, MCINN (Madrid) through project PID2019-107102RB- analysis in clinical decision making, Expert Sys. Tech. Biomed. Sci. Prac. (2018) C21. This project has received funding from the European Union’s 143–167. [25] A. Naik, L. Samant, Correlation review of classification algorithm using data Horizon 2020 Research and Innovation programme under the grant mining tool: weka, rapidminer, tanagra, orange and knime, Procedia Comput. Sci. agreement No 833787, project BorderSens. Manel del Valle thanks 85 (Cms) (2016) 662–668. the support from the program ICREA Academia. Dionisia Ortiz-Aguayo [26] O. Campesato, Artificial Intelligence, Machine Learning, and Deep Learning, Dulles, VA, USA, 2020. thanks to Universitat Autònoma de Barcelona for PIF fellowship. Kar- [27] J. Wang, Analytical Electrochemistry, John Wiley & Sons Inc, Hoboken, NJ, USA, olien De Wael acknowledges the support from the University of 2006. Antwerp (IOF) and FWO (infrastructure). [28] J.R.B. Rodríguez, V.C. Díaz, A.C. García, P.T. Blanco, Voltammetric assay of heroin in illicit dosage forms, Analyst 115 (2) (1990) 209–212. [29] J.M.P.J. Garrido, C. Delerue-Matos, F. Borges, T.R.A. Macedo, A.M. Oliveira-Brett, References Voltammetric oxidation of drugs of abuse III Heroin and metabolites, Electroanalysis 16 (18) (2004) 1497–1502. [1] E. Kaa, Impurities, adulterants and diluents of illicit heroin. Changes during a 12- [30] J.M.P.J. Garrido, C. Delerue‐Matos, F. Borges, T.R.A. Macedo, A.M. Oliveira‐Brett, year period, Forensic Sci. Int. 64 (2–3) (1994) 171–179. Electrochemical analysis of opiates - an overview, Anal. Lett. 37 (5) (2004) [2] C. Cole, L. Jones, J. McVeigh, A. Kicman, Q. Syed, M. Bellis, Adulterants in illicit 831–844. drugs: A review of empirical evidence, Drug Test. Anal. 3 (2) (2011) 89–96. [31] A. González-Calabuig, M. del Valle, Voltammetric electronic tongue to identify [3] J. Broséus, N. Gentile, P. Esseiva, The cutting of cocaine and heroin: A critical Brett character in wines. On-site quantification of its ethylphenol metabolites, review, Forensic Sci. Int. 262 (2016) 73–83. Talanta 179 (2018) 70–74. [4] A. Navaee, A. Salimi, H. Teymourian, Graphene nanosheets modified glassy carbon [32] R. Bro, Review on multiway analysis in chemistry—2000–2005, Crit. Rev. Anal. electrode for simultaneous detection of heroine, morphine and noscapine, Biosens. Chem. 36 (3-4) (2006) 279–293. Bioelectron. 31 (1) (2012) 205–211. [33] R.G. Brereton, Applied chemometrics for scientists, John Wiley & Sons, Chichester, [5] R.B. Taylor, A.S. Low, R.G. Reid, Determination of opiates in urine by capillary 2007. electrophoresis, J. Chromatogr. B Biomed. Appl. 675 (2) (1996) 213–223. 10