원시데이터 수집 시스템
선정목록으로

An Energy-Autonomous Chemical Oxygen Demand Sensor Using a Microbial Fuel Cell and Embedded Machine Learning

간접 관련 수소연료전지 · (6) PEM(고분자전해질막) (5) 연료전지용 수분제어장치(가습기)(7) MEA(막전극접합체)

기본 정보

저자
  1. Farhad Shabani — Department of Mechanical Engineering and Science, Kyoto University, Kyoto, Japan
  2. Hemma Philamore — Department of Engineering Mathematics, University of Bristol, Bristol, U.K
  3. Fumitoshi Matsuno — Department of Mechanical Engineering and Science, Kyoto University, Kyoto, Japan
DOI
10.1109/access.2021.3101496
저널
IEEE Access
발행년도
2021
발행기관
Institute of Electrical and Electronics Engineers
피인용수
25
라이선스
cc-by-nc-nd
논문 유형
–
언어
–
원문 페이지
https://doi.org/10.1109/access.2021.3101496
토픽
Analytical Chemistry and Sensors
OpenAlex ID
W3189213779

평가 내용

관련도
간접 관련
사업분야
수소연료전지 · (6) PEM(고분자전해질막)
부 분야
(5) 연료전지용 수분제어장치(가습기), (7) MEA(막전극접합체)
R&D 측면
부품·응용 설계
확신도
0.70
근거 용어
Microbial fuel cell (MFC), Proton Exchange Membrane (PEM), water quality sensing, energy-autonomous
판단 근거
논문은 미생물 연료전지(MFC)를 활용한 수질 센서 연구로, 핵심 소재인 양성자 교환막(PEM)의 활용과 에너지 자립형 시스템 설계를 다루고 있습니다.
R&D 활용 포인트
코오롱인더스트리의 수소연료전지(PEMFC)용 고분자전해질막(PEM) 및 중공사막 기술을 에너지 하베스팅이나 바이오 센서용 분리막 응용 분야로 확장 검토 가능합니다.
평가 입력
본문 60,017자 중 30,032자 발췌

초록

The current methods of water quality monitoring tend to be costly, labor-intensive, and off-site. Also, they are not energetically sustainable and often require environmentally damaging power sources such as batteries. Microbial fuel cell (MFC) technology is a promising sustainable alternative to combat these issues due to its low cost, eco-friendly energy generation, and bio-sensing features. Extensive work has been done on using MFCs as bio-sensors or sources of power separately. However, little work has been done toward using MFCs for both applications at the same time. Additionally, previous studies using MFCs for water quality measurement have been mostly limited to laboratory conditions due to the biochemical complexity of the real-world. Another limitation of MFCs is how little power they can generate, requiring the MFC-based systems to have minimal power consumption. This work addresses these challenges and presents an energy-autonomous water quality sensing unit that uses a single MFC both as its sensory input and the sole source of power for computing the chemical oxygen demand (COD). In the proposed unit, geometric features of the voltage profile of the MFC (e.g., peak heights) are used as the inputs to a machine learning algorithm (support vector regression (SVR)). The electrical power generated by the MFC is used to drive a low-power microcontroller which logs the MFC voltage and runs the machine learning algorithm. Experimental evaluation showed that the device is capable of detecting the COD of natural pond water samples accurately (coefficient of determination (R <sup xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink">2</sup> )=0.94). This work is the first demonstration of energy autonomy in an MFC-based sensing unit for measuring water quality and represents a step forward in the development of energy-autonomous sensors for environmental monitoring applications.

본문 60,017자

본문 펼치기
Received July 9, 2021, accepted July 26, 2021, date of publication July 30, 2021, date of current version August 10, 2021. _Digital Object Identifier 10.1109/ACCESS.2021.3101496_ # An Energy-Autonomous Chemical Oxygen Demand Sensor Using a Microbial Fuel Cell and Embedded Machine Learning FARHAD SHABANI 1, HEMMA PHILAMORE2, AND FUMITOSHI MATSUNO <sup>1</sup>, (Senior Member, IEEE) 1Department of Mechanical Engineering and Science, Kyoto University, Kyoto 606-8501, Japan 2Department of Engineering Mathematics, University of Bristol, Bristol BS8 1TH, U.K. Corresponding author: Farhad Shabani (shabani.farhad.33c@st.kyoto-u.ac.jp) ABSTRACT The current methods of water quality monitoring tend to be costly, labor-intensive, and off-site. Also, they are not energetically sustainable and often require environmentally damaging power sources such as batteries. Microbial fuel cell (MFC) technology is a promising sustainable alternative to combat these issues due to its low cost, eco-friendly energy generation, and bio-sensing features. Extensive work has been done on using MFCs as bio-sensors or sources of power separately. However, little work has been done toward using MFCs for both applications at the same time. Additionally, previous studies using MFCs for water quality measurement have been mostly limited to laboratory conditions due to the biochemical complexity of the real-world. Another limitation of MFCs is how little power they can generate, requiring the MFC-based systems to have minimal power consumption. This work addresses these challenges and presents an energy-autonomous water quality sensing unit that uses a single MFC both as its sensory input and the sole source of power for computing the chemical oxygen demand (COD). In the proposed unit, geometric features of the voltage profile of the MFC ( _e.g.,_ peak heights) are used as the inputs to a machine learning algorithm (support vector regression (SVR)). The electrical power generated by the MFC is used to drive a low-power microcontroller which logs the MFC voltage and runs the machine learning algorithm. Experimental evaluation showed that the device is capable of detecting the COD of natural pond water samples accurately (coefficient of determination ( _R_ <sup>2</sup> ) = 0 _._ 94). This work is the first demonstration of energy autonomy in an MFC-based sensing unit for measuring water quality and represents a step forward in the development of energy-autonomous sensors for environmental monitoring applications. INDEX TERMS Microbial fuel cells, bio-sensing, energy autonomy, machine learning. I. INTRODUCTION Providing clean and safe water in a sustainable way is an ongoing global challenge. A recent report by UNICEF and the World Health Organization (WHO) reported that one in three people globally do not have access to safe drinking water [1]. Water safety is also an issue in food production. For example, water quality monitoring in aquaculture can be difficult due to labor intensity, high cost (of equipment and maintenance), and on-site application limitations [2]. Failure to detect deterioration of water quality can result in severe environmental changes, such as algal bloom, which can result in the death of cultivated fish and consequential financial loss [3]. The associate editor coordinating the review of this manuscript and approving it for publication was Venkata Rajesh Pamula . In addition, there is a critical need to decrease the use of the existing environmentally damaging and non-sustainable energy generating devices ( _e.g.,_ batteries) by replacing them with new, cost-effective, and easy to deploy renewable energy systems. To address the issue of water quality monitoring in an environmentally friendly and sustainable manner, this research aims to develop a self-powered, field-deployable, and biocompatible water quality sensing unit (Fig. 1). A key feature of the system is that it uses a microbial fuel cell (MFC) both as a sensor and a source of electrical power and, therefore, can monitor water quality over a longer period of time through self-generation of energy from water. An MFC is a two-electrode bio-electrical system (Fig. 2) that operates by oxidizing organic matter (present in a medium such as wastewater) at the anode via bacterial FIGURE 1. Block diagram of the sensing unit; A) MFC: used as a bio-sensor and source of electrical power. B) Low power microcontroller unit (MCU): used to sample the MFC voltage ( _VMFC_ ) and estimate the COD value using a machine learning algorithm. C) Energy harvesting circuit: used to collect and store the energy generated by the MFC. FIGURE 2. An exploded-view illustration of the MFC design [23] fabricated and used in this work. respiration, which, coupled to reduction of oxygen at the cathode, generates electrical power. This makes MFCs a promising technology for self-powered amperometric sensing in in-field, autonomous monitoring applications. The electrical potential of an MFC is dependent, for one, on the quantity of oxidizable bio-matter within the fuel cell anode chamber. MFC voltage can therefore be related to the chemical oxygen demand (COD), a widely used metric for analyzing water quality which describes the amount of oxygen necessary to completely oxidize all of the organic carbon in a water sample [4]. Several researchers have proposed MFC based solutions for measuring water quality [5]. However, most of these solutions are not suitable for applications outside of controlled laboratory conditions ( _e.g.,_ [6], [7]). Most existing MFC-based bio-sensors consider a linear relationship between a target parameter (such as COD) and the current (voltage) generated by the MFC [5]. These simple linear correlations are insufficient for in-field use because they do not account for the effect of factors other than the target variable (such as pH) on the output of the MFC. Even under lab conditions, the output often shows low repeatability in response to a given input due to variations that are very difficult to control, for example changes to the bacterial biofilm within the MFC [8]. To account for factors other than the target variable, Feng _et al._ [9] propose to use machine learning (ML) for analyzing the COD of the contents of an MFC using the MFC voltage. The use of ML as a tool for analyzing complex data is rapidly growing due to the capability of ML algorithms for identifying patterns and relationships in noisy data. As such, many examples exist of ML algorithms capable of operating robustly under highly stochastic environmental conditions. In [9], features ( _e.g.,_ maximum voltage value) extracted from the output voltage of an MFC (fed with water samples collected from a natural in-field source) are used as inputs for a supervised, feed-forward Artificial Neural Network (ANN) with one-way connections to estimate the COD values of the samples with high accuracy (coefficient of determination ( _R_ <sup>2</sup> ) = 0 _._ 99). Complex ML algorithms such as neural networks can be more accurate, but the computational power needed to run them requires more energy. Thus, using these computationally expensive algorithms is not practical when a low-power energy source such as an MFC is used. Therefore, one major objective of this research is to use a less complex ML algorithm with comparable accuracy to more complex algorithms used in previous works [9]–[11]. Existing studies on MFCs for COD measurement investigate a limited range of values (COD of up to 500 mg/L [12]), which does not reflect the higher range of values needed for wastewater treatment applications [13], [14]. To address this, in this study, COD concentrations of 70-900 mg/L are investigated. In addition to bio-sensing, the capability of MFCs to extract energy from organic matter and convert it into electrical power has been widely investigated as a promising renewable energy technology [15]. However, the technology suffers from key limitations of low power density and energy conversion efficiency [16], [17]. A single MFC has a theoretical electro-chemical open-circuit voltage limitation of 1.1 V [18], whereas most MFCs produce voltages significantly lower than this under electrical loads required to generate power. As a result, multiple MFCs are often coupled together in series configuration to increase the total output voltage. However, this results in increased size and complexity of the device and the need to isolate the anodes of different MFCs to avoid unwanted parallel coupling via the contacting liquid sample [19]. By devising innovative ways to harvest and use energy generated by MFCs, such as alternating periods of storage and use [20], a few existing works have demonstrated MFC installations, in some cases comprising only one fuel cell, used to power small electronic devices such as environmental monitoring buoys [7], wearable sensors [21], and mobile robots [22]. Despite their potential as bio-sensors and power sources for low-power electronic devices, little has been done to explore this combined functionality. Most previous examples of MFC bio-sensors employ externally-powered peripheral instrumentation such as data-loggers and power sources [4], [12]. Pasternak _et al._ [7] reported the only previous example of an energy-autonomous MFC bio-sensor for online monitoring of biological oxygen demand (BOD). However, in contrast to the work presented here, their sensor is only able to detect whether the water sample is above or below a single threshold value and is not able to measure, process, and record data. MFC systems integrating power generation and biosensing will provide simplified and potentially miniaturizable designs, suitable for applications in low-cost remote monitoring and Internet of Things (IoT) applications. FIGURE 3. The resistance was measured for all MFCs in the experiment by placing the probes of an ohmmeter at the top and bottom ends (on the long axis) of the cathode (red circles). This works uses an MFC both as the bio-sensor and the sole source of power for a microcontroller which records the MFC voltage and applies a computationally efficient ML algorithm to the measured values to estimate the COD of a water sample. The rest of this article is organized as follows. Section II describes fabrication, integration, and operation of the different parts of the unit (both hardware and software). Section III describes and discusses the results of the steps taken in Section II. It also provides a general discussion and suggests future steps. Finally, Section IV concludes this article. II. MATERIALS AND METHODS _A._ _MFC FABRICATION_ Four, two-chamber analytical style MFCs, as used in [23], were fabricated and used in this research (Fig. 2). The anode chamber of these cuboid MFCs holds a 25 mL water sample; it is open on one side, where a CMI-7000 Proton Exchange Membrane (PEM; Membranes International Inc., Ringwood, USA), with an area of 20 _cm_ <sup>2</sup> is attached. An open-to-air cathode, with an area of 20 _cm_ <sup>2</sup>, made from conductive latex, was used to maintain a continuous redox reaction without the need to hydrate the cathode. A polyurethane-based rubber coating (Plasti-Dip, UK) was mixed with white spirit and micronized graphite powder at a mass ratio of 2:3:1 and painted onto the air side of the membrane. The MFCs were fabricated identical to achieve similarity in the output of individual MFCs. This was done with the aim of using a data set collected from all MFCs to train the ML algorithm that would then perform with high accuracy when used with test data from any single MFC in the study population. This is important since training the algorithm on each MFC would become infeasible as the number of MFC sensors increases, for example in a large-scale application. To achieve a uniform electrode thickness of approximately 100 µ m, a K Hand coater (RK PrintCoat Instruments Ltd, UK) was used to paint the conductive latex onto the membrane. The uniformity of the quantity of conductive latex used for each cathode across all MFCs in the study population was tested by measuring the resistance of the painted conductive latex cathode layer between two points at either end of the long axis of the rectangular cathode (Fig. 3). _B._ _MFC INOCULATION AND OPERATION_ First, external loads of 1 k _�_ were connected to the MFCs (Fig. 2). The load remained connected throughout the whole TABLE 1. The average concentration of each chemical used to reach the desired COD values. _σ_ shows the standard deviation. Mass percent (mass %) is used to show tryptone and yeast concentrations. Millimolar (mM) is used to show the concentration of sodium acetate. experiment. Next, the MFCs were filled with water sampled from a natural pond (Niibayashiike Park, Kyoto, Japan) to inoculate them with a bacterial community. The entire content of the MFCs was manually replaced with fresh pond water using a syringe (batch feeding) once per week, for three weeks. This feeding method was chosen due its simplicity and suitability for the application (compared with continuous feeding). After that, the MFCs were batch-fed weekly with water sampled from the pond (the water samples were taken from different parts of the pond and at different dates ( _i.e.,_ weeks) to introduce real world natural/biological uncertainties to the experiment) and synthetically modified by varying concentrations of tryptone, yeast, and sodium acetate (SigmaAldrich, Missouri, USA) to control the COD value of the water sample. Table 1 shows the average concentrations of the mentioned chemicals added to the pond water samples to reach the desired COD values of 70, 300, 500, and 900 mg/L. The COD values were measured using a spectrophotometer (photoLab 7600, Xylem, Germany). The MFCs were fed with 3 batches of water for each of the 4 COD values, 12 batches (weeks) in total. The weekly time interval for feeding was selected as this is a common time interval in aquaculture for monitoring water quality [24]. A temperature of between 24 <sup>◦</sup> C and 25 <sup>◦</sup> C was maintained throughout the entire experiment. The output voltage of the MFCs was recorded using a 34972A LXI data acquisition unit (Keysight, USA) with a sampling interval of 2 minutes. _C._ _MACHINE LEARNING_ An ML algorithm (support vector regression (SVR)) was used to find the relationship between the output voltage of the MFCs with a targeted water quality value (in our case, COD). The following steps were followed in order to select, train, test, and implement the algorithm. First, a data set containing 48 data points was collected (4 MFCs, 4 COD values, 3 repetitions for each COD value). Each repetition represented a batch of water fed to an MFC and resulted in a peak in the output voltage (Fig. 4). As proposed by Feng _et_ _al._ [9], five features were extracted from each peak: maximum peak height (PH), peak area (PA), peak duration time (PD), acceleration rate (AR), and subsidence rate (SR). In [9], for each COD concentration, batch feeding FIGURE 4. Definition of features used for COD estimation. Hatched area shows PA. AR is the slope of the line passing through the start of the peak (■) and PH (□). Similarly, SR is the slope of the line passing through the end of the peak ( ◦ ) and PH. PD is the time between the start and end of the peak. The features are extracted from the filtered voltage reading (red) instead of the raw one (blue). continued until three consecutive current (voltage) response profiles with the same peak height (within 5% error) were observed, which were then used to train the ML algorithm. This resulted in a high correlation between the inputs (features) and output (COD value), however this method may be less practical in real world applications since they disregard the possibility for a single COD concentration to produce voltage profiles with different peak heights. In contrast, in the work presented here, three peaks were obtained per COD value, and these were included in the data set regardless of whether the peak heights were the same or not. PD was found as the time period between the start and end point of the peak. The start of a voltage peak was detected where the voltage increased to, and remained consistently above, 0.005 V for at least one day. Similarly, the end of a peak was detected as soon as the voltage subsequently fell below 0.005 V. These voltages and time thresholds were selected based on preliminary observations of the MFC outputs. PH was determined as the maximum value of the output voltage. PA was calculated by numerically integrating the voltage value between the start and end points of the peak with respect to time. AR and SR were determined by calculating the slope of the line between the maximum voltage point and the start or end point, respectively (Fig. 4). Prior to feature extraction, a median filter with a window size of N=10 was applied for smoothing and negative values were capped to zero. Secondly, the dimensionality of the dataset was minimized by removing less correlated features, based on the Pearson correlation coefficient (PCC) between the features and the COD values (Table 3), reducing the number of features considered from five to three (PH, PA, PD). Removing less correlated features can reduce the computational load (and consequently the energy consumed) without reducing the accuracy of the prediction algorithm. Thirdly, an ML algorithm was selected. While increased accuracy is often achieved through increased complexity, the increased energy consumption associated with increased complexity has particular significance when designing a lowpower energy-autonomous system. To determine a suitable algorithm for this application, five different off-the-shelf algorithms from the Python 3, SciKit package [25] were considered: simple linear regression, ridge regression, SVR, random forest regression, and artificial neural network (ANN). The hyper-parameters of the algorithms were tuned using the exhaustive grid search method with _R_ <sup>2</sup> as the evaluation metric. Tuning, training, and the evaluation of the algorithms were done on a desktop computer running Python 3. SVR with radial basis function (RBF) kernel was selected for a good balance between high accuracy and low execution time, which will be discussed further in Section III-A. SVR is widely used in the field of remote sensing for continuous estimation of different parameters [26], [27] due to its robustness to dimensionality, nonlinearity, and generalization performance [28]. The algorithm was trained and verified on the desktop computer by dividing the dataset randomly into test (25%) and train (75%) datasets. Finally, the pre-trained algorithm was implemented in C using the MikroE compiler on a lowpower PIC18LF46K22 microcontroller (Microchip, Arizona, USA). As shown in Fig. 5, the complete embedded algorithm comprises three different modes: sampling, estimation, and sleep. In the sampling mode, the voltage from the MFC is recorded and calculations are performed including filtering, detecting the start and end point of the peak, finding PD and PH, and integrating the voltage in order to find PA. Between each sampling event (every 32 minutes), the microcontroller enters sleep mode, minimizing the energy consumption of the microcontroller during this time. To further minimize energy consumption, once the end of the peak has been detected, the microcontroller enters and remains in sleep mode until one week has passed since sampling began. At this point, the features are extracted and the COD of the water sample is estimated by the ML algorithm (estimation mode). The sampling interval used to build the training data set was 2 minutes. However, the deployed algorithm was tested with two different sampling intervals: 2 minutes and 32 minutes as when the SVR algorithm was trained and tested on the desktop computer. Different data sampling intervals from 2 to 64 minutes (step size of 2 minutes between each value) were achieved by down-sampling. 32 minutes was determined to be the optimal sampling interval for minimizing energy consumption without significant loss in accuracy. Further details on this are provided in Section III-A. _D._ _ENERGY HARVESTING_ In order to power the microcontroller using a single MFC, an energy harvesting and power management circuit was used FIGURE 5. Flowchart of the embedded algorithm. Blue, yellow, and red blocks represent sampling, sleep, and estimation modes, respectively. to amplify and store the low output voltage of the MFC (Fig. 6). The low voltage output of the MFC was amplified using an inductor-based voltage booster (EH4295, Advanced Linear Devices, California, USA). The voltage booster amplifies the MFC voltage with a gain of 7 to 10 and has a lower input voltage threshold of 60 mV and a nominal impedance of 950 _�_ . The boosted AC voltage was then rectified to a DC voltage using an energy harvester (EH300, Advanced Linear Devices) and used to charge a storage super-capacitor (0.66 F). The voltage booster and energy harvester combined have a rated energy conversion efficiency of 48%, so the total harvested energy can be estimated as: _Eh_ = 0 _._ 48 _ET_, where the total energy generated by the MFC _ET_ = _R_ <u>1</u> - _V_ <sup>2</sup> _dt_ is calculated using the MFC voltage, _V_, and the external load, _R_, which is assumed to be constant. _E._ _ENERGY CONSUMPTION_ The energy required for one COD analysis cycle was calculated as the sum of the energy consumed by each of the main components and processes: voltage regulator (to supply the microcontroller with a constant voltage of 1.8 V ( _Er_ )) and the microcontroller in sleep ( _Esl_ ), estimation ( _Ee_ ), and sampling ( _Esa_ ) modes: _Eout_ = _Er_ + _Esl_ + _Ee_ + _nEsa_ (1) FIGURE 6. An overview of the energy harvesting hardware. The arrows show the related input (to the components on arrowheads) and output (from the components on the tails of the arrows) voltages of the components. _VMFC_, _VAC_, _VDC_, _Vcapacitor_, _Vregulator_, and _Venable_ are the output voltages of the MFC, voltage booster, energy harvester, capacitor, voltage regulator, and comparator, respectively. The system that was implemented in hardware is shown in black. The simulated system additionally included the grey component. where _n_ is the number of samples taken over the course of the analysis cycle, which was set as 315 (giving a sampling interval of 32 mins). It was assumed that the regulator and sleep mode operated continuously for the whole one-week cycle. The time period of single sampling and estimation events, and the current consumed by all microcontroller operations were measured empirically. As sampling and estimation processes happened within a fraction of a second, this was achieved by measuring the current and time taken for the microcontroller to run each of these operations 100 times. The total time was then divided by 100 to obtain the time for a single instance of the process. The power consumption of the voltage regulator varies with the voltage of the storage capacitor. However, for simplicity, the current and voltage were assumed to be constant values which were estimated from the rated value on the component data sheet. The energy required for each process was then calculated using _E_ = _V_ _.I_ _.t_ where _V_, _I_, and _t_ are the voltage, current, and time for each process, respectively. _F._ _POWER MANAGEMENT_ To operate with energy autonomy, the sensing unit must operate within the energy budget defined by the output of the MFC. 1) SYSTEM IMPLEMENTED IN HARDWARE The voltage regulator (TPS7A02, Texas Instruments, Texas, USA) used to supply the microcontroller from the output of the storage capacitor (see Section II-D) at a constant voltage, 1.8 V (the minimum rated voltage of the microcontroller) required a minimum rated input voltage of _Vmin_ = 2 _._ 3 _V_ . When the input voltage was less than 2.3 V, the output of the voltage regulator was approximately 0 V. This had the advantage of allowing the system to ’cold-start’ by allowing the 0.6 F storage capacitor to charge up to 2.3 V before being discharged to the microcontroller, which prevented the supply voltage to the microcontroller from falling below its minimum rated value. This cold start functionality also allows the system to restart itself during operation if it loses power, which is important, for example, while operating in the field where harvested energy levels may fluctuate. The size of the capacitor, _C_, was selected to satisfy equation 2. This inequality specifies that the capacitor must be able to store at least enough energy for one COD analysis cycle _Eout_, in addition to the energy stored at _Vmin_ without exceeding the maximum rated voltage of the circuit components _Vmax_ . In the implemented system, _Vmax_ = 6 V <u>2</u> _<u>Eout</u>_ _C_ _>_ (2) ( _Vmax_ <sup>2</sup> - _Vmin_ <sup>2</sup> <sup>)</sup> the value used, 0.66 F, satisfies equation 2 where _n_ = 315 is used to find _Eout_ (equation 1). 2) SIMULATED SYSTEM WITH HYSTERESIS The system can cold start providing that the start-up power drawn by the electrical load, the microcontroller in this case, does not exceed the rate of energy harvesting. If a large startup current is drawn, for example, this can cause the storage capacitor voltage to immediately fall below the rated input voltage, preventing cold start by cutting the supply voltage to the microcontroller. To mitigate this, we propose an additional part of the power management circuit to introduce a hysteresis between the input voltage threshold above which the voltage regulator outputs 1.8 V, and a lower input voltage threshold, below which the voltage regulator outputs 0 V (Fig. 7). In the proposed system, a comparator connects/disconnects the storage capacitor from the voltage regulator and microcontroller by switching an N-channel MOSFET, depending on the voltage of the storage capacitor, _Vcap_ . _Vcap_ simultaneously powers the capacitor so that _Vcc_ ≡ _Vcap_ . _Eout_ (equation 1) must be modified to include an extra term, the energy consumed by the compactor ( _Eco_ ) during each cycle (one week): _Eout_ <sup>′</sup> <sup>=</sup> <sup>_Eco_</sup> <sup>+</sup> <sup>_Er_</sup> <sup>+</sup> <sup>_Esl_</sup> <sup>+</sup> <sup>_Ee_</sup> <sup>+</sup> <sup>_nEsa_</sup> (3) FIGURE 7. Circuit diagram of the simulated power management and energy harvesting systems. EH4295: voltage booster EH300: energy harvester; TPS7A02: voltage regulator; LTC1540: comparator; PIC18LF46K22: microcontroller. For the regulator (TPS7A02) to supply an output of 1.8 V, the minimum rated input voltage is 2.3 V. Therefore the lower threshold of the comparator (the ‘switch off’ voltage of the microcontroller) was set as _Vtl_ =2.3 V. The higher threshold, _Vth_ (the ’switch on’ voltage of the microcontroller), was selected to prevent the power supply from being connected to the microcontroller until sufficient energy to run at least one COD analysis cycle, _Eout_ <sup>′</sup> <sup>, was stored, in addition to the</sup> energy remaining in the capacitor at the switch-off voltage _Vtl_ . The ’switch-on’ voltage, _Vth_, then be determined as the voltage at which _Eout_ <sup>′</sup> <sup>was stored in the capacitor in addition</sup> to the energy stored in the capacitor at _Vcap_ = _Vtl_ : eliminating _R_ 2: _R_ 3 <u>(</u> _<u>Vth</u>_ - _<u>Vr</u>_ <u>)</u> _R_ 1 <u>(</u> _<u>Vtl</u>_ - _<u>Vr</u>_ <u>)</u> _R_ 1 - <sup>_<u>Vr</u>_</sup> _<u>Vr</u>_ _R_ 2 _,_ _Vout_ = 0 (6a) =    + <sup><u>(</u></sup> <sup>_<u>Vcc</u>_</sup> <sup>−</sup> <sup>_<u>Vr</u>_</sup> <sup><u>)</u></sup> _R_ 3 _,_ _Vout_ = _Vcc_ (6b) (7) _R_ 1 = <sup>_<u>R</u>_</sup> <sup><u>3(</u></sup> <sup>_<u>Vth</u>_</sup> <sup>−</sup> <sup>_<u>Vtl</u>_</sup> <sup><u>)</u></sup> _Vcc_ _Vth_ = ~~�~~ <u>2</u> _<u>Eout</u>_ <sup>′</sup> _C_ + _Vtl_ <sup>2</sup> (4) The comparator hysteresis was set using three resistors ( _R_ 1−3, Fig. 7). Once the threshold voltages, _Vth_ and _Vtl_, have been determined, the value of these resistors can be calculated by using the built-in reference voltage of the comparator and considering the two possible states of the comparator, _Vout_ = 0 and _Vout_ = _Vcc_ . The current through resistor _R_ 3 is _i_ 3 = <sup>|</sup> <sup>_<u>Vref</u>_</sup> _R_ <sup>−</sup> 3 <sup>_<u>Vout</u>_</sup> <sup>|</sup> at the points when _Vout_ switches between _Vcc_ and 0 V, which gives two possible values for _R_ 3 (equation 5): <u>(</u> _<u>Vcc</u>_ - _<u>Vr</u>_ <u>)</u> _i_ 3 _,_ _Vout_ = 0 (5a) _R_ 3 =    _<u>Vr</u>_ _i_ 3 _,_ _Vout_ = _Vcc_ (5b) where _Vcc_ ≡ _Vcap_ = _Vtl_ in equation 6b (where _Vcap_ is falling) and therefore also in equation 7. Lastly, _R_ 2 was calculated using either 6a or 6b. The cold start circuit described was simulated using Proteus circuit simulation software (Labcenter Electronics, UK). A comparator (LTC1540, Analog devices, Massachusetts, USA) with a reference voltage _Vr_ = 1.18 V was considered. _i_ 3 was set as 0.2 _µ_ A. _Vtl_ was set as 2.3 V, and the higher threshold used for the hysteresis, _Vth_, was set as 3.0 V. _R_ 1, _R_ 2, and _R_ 3 were then calculated as 1.76 M _�_, 1.41 M _�_, and 5.60 M _�_, respectively, using equations 5 to 7. In the simulation, we replaced the capacitor with a sinusoidal power source (0 6 V, 1 Hz) to simulate the rising and falling voltage of the capacitor. The simulation was done with time steps of 0.01 s. _G._ _INTEGRATED SYSTEM EVALUATION_ The accuracy of COD prediction by the trained and tested ML algorithm and the ability of the sensing unit to operate energyautonomously was tested. As depicted in Fig. 1, a single MFC was randomly selected and connected to the energy harvesting hardware and the MCU. The MFC was batch-fed with water which was sampled weekly from the natural pond and modified synthetically by addition of tryptone and yeast to achieve the target COD value (Table 1). The experiment was conducted for five different COD values (70, 300, 500, 700, and 900 mg/L), in a random order, over five weeks. The voltages of the MFC, the storage capacitor, and the supply voltage of the microcontroller were recorded throughout the where _Vcc_ ≡ _Vcap_ = _Vtl_ in equation 5b (where _Vcap_ is falling). A constant value for _i_ 3 was set, based on the approximate current limitations of the comparator, and used to calculate the value of _R_ 3 using equations 5a and 5b. The lower of these two resistances was used in this case. Kirchhoff’s current law was used to give equations for two states where _Vcap_ rises to _Vth_ (equation 6a) and where _Vcap_ falls to _Vtl_ (equation 6b). _R_ 1 was then calculated by equating 6a and 6b, FIGURE 8. The raw and filtered output (with negative values capped to zero) of one MFC in the experiment. ■: Beginning of the peaks □: End of the peaks. experiment using the data acquisition unit. The estimated COD values were saved in EEROM of the microcontroller (non-volatile memory). It should be noted that the current setup requires an external system to display the COD estimation, such as an externally-powered transceiver connected to a serial port terminal application running on a PC. Finally, to calculate the efficiency, _η_, of the system, the total energy generated by the MFC ( _ET_ ), consumed energy ( _Ec_ ) during the experiment ( _Ec_ = 5 _Eout_ ), and the energy stored in the capacitor ( _Es_ ) at the end of the experiment period (5 weeks) were used. _ET_ was calculated as _ET_ = <u>1</u> _R_ _R_ <u>1</u> - _V_ <sup>2</sup> _dt_ (as described in Section II-D). The energy stored in the capacitor at the end of the experiment was calculated as: _Es_ = <sup><u>1</u></sup> _f_ (8) 2 <sup>_CV_</sup> <sup>2</sup> where _Vf_ is the capacitor voltage at the end of the experiment. It should be noted that the capacitor is assumed to be fully discharged initially, ( _Vi_ = 0). The efficiency of the system was determined as: _η_ = <sup><u>(</u></sup> <sup>_<u>Es</u>_</sup> <sup>+</sup> <sup>_<u>Ec</u>_</sup> <sup><u>)</u></sup> _ET_ (9) TABLE 2. Accuracy ( _R_ <sup>2</sup> ), mean square error (MSE), and execution time of trained regression algorithms. TABLE 3. The Pearson correlation coefficient (PCC) of features of the MFC output voltage with the COD value. SR) were determined to be less-correlated features since their PCC is smaller compared to the other features and were therefore removed from the deployed ML algorithm. SVR was selected as the ML algorithm for implementation as an embedded system for a compromise between accuracy ( _R_ <sup>2</sup> value) and execution time (the longer the time, the higher the required energy), based on the results in Table 2. An important point in this study is the relatively small size of the generated dataset (48 data points). While the RBF kernel based SVR has a relatively high accuracy of _R_ <sup>2</sup> = 0 _._ 94, the estimation accuracy may be improved by training it using a larger dataset [29]. This can be achieved by running the experiments for a longer period of time and with more MFCs. While the required accuracy of a sensor depends on the application, the achieved accuracy ( _R_ <sup>2</sup> = 0 _._ 94) is considered acceptable for a wide range of applications such as water testing in aquaponics and fish farms which require less precise measurements (as compared to applications such as drinking water quality monitoring). The accuracy ( _R_ <sup>2</sup> = 0 _._ 94) is also comparable with the previous work which used more complex algorithms such as ANN [9] ( _R_ <sup>2</sup> = 0 _._ 99). Furthermore, in the experiments, a wide range of COD has been considered (70-900 mg/L). Training the algorithms for a smaller range can be used to achieve a higher accuracy in that range. III. RESULTS AND DISCUSSION _A._ _MFC DATASET GENERATION, ALGORITHM SELECTION,_ _AND TRAINING_ Fig. 8 shows a peak in the output voltage of the MFC with each batch feeding. While peak heights and peak durations generally increase with COD value, this trend is inconsistent. For example, peak height varies significantly for a single COD value. As a result, relatively lower accuracy was obtained when determining COD values using simple linear regression methods than more complex machine learning algorithms (Table 2). Table 3 shows the Pearson correlation coefficient (PCC) between the peak features and the COD values. Based on the values, the acceleration and subsidence rates (AR and FIGURE 9. The relationships between measured COD concentrations and COD concentrations estimated using the SVR algorithm for: (a) 36 train data points ( _R_ <sup>2</sup> = 0 _._ 98) and (b) 12 test data points ( _R_ <sup>2</sup> = 0 _._ 94), implemented using Python 3 on the desktop computer. Fig. 9 shows a similar performance of the SVR algorithm during the training ( _R_ <sup>2</sup> = 0 _._ 98) and testing ( _R_ <sup>2</sup> = 0 _._ 94) phases, which were run on the desktop computer. The minimal decrease in accuracy shown during the testing phase, compared to the training phase, validates the success of the algorithm training process. The average electrical resistance of the MFC cathode, measured as described in Section II-A, was 250 _�_ with a standard deviation (SD) of 5.62. The small value of SD in comparison to the average indicates uniformity of the cathode thickness among the MFCs. The high accuracy of the algorithm, despite being trained on data from multiple MFCs, may be accounted for by this consistency in MFC fabrication. Fig. 10 shows the effect of the sampling interval on the accuracy of the algorithm. 32 minutes was the largest sampling interval (lowest sampling frequency) that could be used with no significant loss of accuracy in COD prediction. Recording the continuous voltage signal with larger sampling intervals resulted in the features being captured by the discretized signal with lower accuracy and the profile of the signal being lost. Using smaller intervals did not cause a noticeable improvement in the accuracy. So, a sampling interval of 32 minutes was determined as the optimum value in this study. _B._ _INTEGRATED SYSTEM DEPLOYMENT_ Fig. 11 shows the voltage readings from different components of the system over the 5 week period during which the MFC was fed with water with different COD values in a random order. The system was able to cold start from the capacitor being fully discharged (approximately 0 V). When the capacitor voltage reached the minimum rated input voltage of the regulator (2.3 V), the microcontroller switched on, as shown by the step increase of the supply voltage to the microcontroller from 0 V to 1.8 V. The microcontroller then remained on throughout the experiment as the voltage of the capacitor never dropped below the minimum rated input voltage of the regulator (2.3 V). FIGURE 10. The relationship between accuracy of the trained algorithm and the sampling interval. A sudden dip can be observed in the capacitor voltage as the microcontroller switches on (Fig. 11). If this dip were larger ( _i.e.,_ if greater start-up power was drawn) or the capacitor charging gradient was smaller, a situation may be encountered in which the system never goes fully into operation ( _i.e.,_ performs one cycle of COD measurement) because the start-up power drain causes the microcontroller to switch off as soon as it switches on. This demonstrates the potential need for a more sophisticated power management system in future work, such as the cold start system using comparator hysteresis, proposed in Section II-F2. Fig. 11 shows a net increase in the energy stored in the capacitor as the amount of energy harvested from the MFC exceeds the energy consumed by the system. This may eventually result in the capacitor voltage exceeding the maximum rated volume of the system, which is 6 V in this study (Section II-F1). Using a capacitor with a greater capacitance would reduce the rate of voltage increase, but a consequence FIGURE 11. Voltage measurement of different energy harvesting components. The peaks in the MFC voltage are generated by feeding it with COD = 500, 70, 300, 900, and 700 mg/L for the weeks 1 to 5. 5 weeks ( _Ec_ ) is measured as 5.8945 J. From Fig. 11, the final voltage of the capacitor ( _Vf_ ) is 5.422 V so the final stored energy in the capacitor is _Es_ = 9 _._ 701 J. Also, the total energy generated by the MFC ( _ET_ ) is measured as 150 _._ 342 J. As a result, using equation 9, _ηactual_ = 0 _._ 104. This value is less than the previously mentioned rated energy conversion efficiency of the energy harvester and voltage booster (0.48) which may be explained by the non-ideal behavior of the other circuit components, including the capacitor leakage current, for example. FIGURE 12. The sensing result of the integrated system. The relationships between measured and estimated COD concentrations is shown ( _R_ <sup>2</sup> = 0 _._ 94). of this is that the system would need to harvest more energy than is currently needed to reach the switch-on voltage _Vth_ . The surplus energy could instead be used within the system for example to power a self-feeding mechanism or data display or transfer system, thereby demonstrating more complete energy autonomy. The experimental results of the implemented system (running C language on the microcontroller; Fig. 12) had similar accuracy ( _R_ <sup>2</sup> = 0 _._ 94) to the desktop algorithm implementation (running Python; Fig. 9 (b)), validating the sensing performance of the unit and implementation of the algorithm. The algorithm was further validated by its ability to correctly predict a new value (COD = 700 mg/L) which was not included in the training data, without negatively affecting the accuracy of the system. Also, the comparable accuracy between the algorithm run at 2 minutes on the desktop computer versus 32 minutes on the MCU validates the choice of the sampling interval. Considering the required energy for each cycle (week) shown in Table 4 (1.1789 J), the total consumed energy in A disadvantage of the current ’cold-start’ behavior is that the microcontroller is likely to switch on while the MFC output voltage is part way into a peak, as shown in the case in the first peak in Fig. 11. This is likely to reduce the accuracy of the estimated COD value as smaller PD and PA will be calculated. As the delay duration ( _i.e.,_ the time required for the storage capacitor to be charged to the voltage at which the voltage regulator will supply power to the microcontroller) increases, the accuracy is likely to decrease. The delay duration depends on the power output of the MFC, which in turn depends on factors such as MFC size and structure, and the energy density of the water samples (the higher the COD value, the higher the density). 1) SIMULATED SYSTEM RESULTS The power management system proposed in Section II-F2, was simulated. The hysteresis can be observed in Fig. 13. When the capacitor voltage is rising, the microcontroller supply voltage rises from 0 and reaches 1.8 V when the capacitor voltage hits _Vth_ = 3.022 V. However, when the capacitor voltage is falling, the supply voltage of the microcontroller decreases from 1.8 and reaches 0 V at the lower threshold voltage _Vtl_ = 2.3 V. This demonstrates a more robust cold-start compared to the system implemented in hardware and will be used in future work. TABLE 4. Energy consumed by the microcontroller in different modes. FIGURE 13. Voltage readings of the circuit simulated in Proteus. The storage capacitor is replaced with a sinusoidal power source with a frequency of 1 Hz and magnitude of 6 V (with a vertical shift of + 3). _C._ _GENERAL DISCUSSION AND FUTURE WORK_ Future work on the power management circuit is needed to address the delay resulting from the cold-start. For example, when extracting features from a voltage peak in the software, checks can be considered to make sure that the entire peak has been recorded (and not only a part of it). For instance, one simple check can be to ignore the peaks being recorded after their maximum values by checking if the measured voltage values are only decreasing, which means recording has started after the maximum value of the peak. Similar to other studies, such as [9], not all MFCs in the experiment functioned properly. The experiment was started with 6 MFCs but 2 of them stopped generating power after a few days despite efforts to maintain the same principles for fabricating all MFCs. This shows the need for more sophisticated and standardized methods and materials for fabricating the MFCs which may also increase the performance (both power production and bio-sensing). Currently, COD tests are mostly being done off-site. For example, a common way to determine COD concentration of water samples is using photometric methods (as we did to create our data set). These laboratory tests are time consuming and involve using expensive chemical reagents. The sensing unit presented in this work shows the potential to overcome these and provides a reliable way to measure COD in the field. In this paper, only one water quality parameter (COD) is discussed. However, the idea can be applied to multiple water quality metrics such as pH, biological oxygen demand (BOD), and dissolved oxygen (DO). We showed the robustness of the sensor against the natural/biological uncertainties which resulted from natural pond samples acquired at different times. As discussed in Section II-B, we synthetically modified the water samples to generate our data set. However, since the water samples were taken at different dates and from different parts of the pond, we could keep the biological uncertainties in our experiments. It should be noted that Table 1 shows the average values for the chemicals. In other words, to generate three samples with a certain concentration, we had to use different concentrations of the chemicals. This indicates that the water samples were chemically different each time. For example, three samples with COD = 300 mg/L had pH values of 7.2, 7.5, and 8.7 after the addition of the chemicals. So, it can be concluded that using ML algorithms, we can measure a targeted parameter independent of others. A potential next step is to use natural water samples without synthetic modification to evaluate the accuracy of the system for predicting COD due to mixed sources of biological carbon in the sample. Future work may also include testing the resilience of the system to environmental factors such as temperature variation, which can significantly affect the voltage profile [31], and was not considered in this study. In this work the state-of-the-art commercially available energy harvesting device was used. The energy harvester we used has an impedance of 950 _�_ while the average internal resistance (the internal load between the anode and the cathode of each MFC measured after its fabrication) of our MFCs is 2 _._ 7 k _�_ ±11%. However, for increased energy harvesting efficiency, considering the maximum power transfer theorem, it would be preferable to use an energy harvesting device with an internal resistance closer to our power source (2 _._ 7 k _�_ ) in future work. An important point that needs to be considered in future studies is the size of the MFC, as this impacts the energy that can be harvested from a single batch as well as the duration of the voltage peak. For example, larger MFCs can be preferable for power production as a greater amount of energy from bio-matter is fed to the MFC in a single batch, which is especially important for energy-autonomous systems. However, the longer duration of the peak associated with larger MFC volumes can be less desirable for the sensing applications such as the one presented in this study as the system takes longer to produce a measurement value. These needs should be balanced when designing future systems. A possible solution could be to use multiple smaller MFCs connected in series, parallel, or some combination to provide comparable power output to the single large MFC used in this study, but with a shorter peak duration. Additionally, in Fig. 8, it can be observed that after feeding the MFC with COD of 900 mg/L, the end points of the peaks are very close to the start of the next peaks. This limited the maximum measurements to 900 mg/L using the current system since for higher COD concentrations, the next peak will start before the current peak is finished. Therefore, for the current system to predict higher COD values accurately, either the measurement period for one peak should be increased, or the ML algorithm should be retrained, potentially considering different features of the voltage profile. An alternative solution could be to expand on the ML algorithm used to predict the duration of the peak based on earlier sampled voltages, as proposed in [32]. This study is the first to use an MFC for both power production and robust bio-sensing with the ability to interpret the data using an ML algorithm and recording the measurements. This will open a new avenue in the use of MFCs for energyautonomous applications such as remote sensing and environmental monitoring. However, for complete energy autonomy, a self-powered mechanism should be included to automate the process of feeding (taking in/sending out the water samples). This is a natural next step as the system already generates more energy than is required for COD analysis and the number of MFCs and/or MFC size could be adjusted if more power is needed. A soft-robotic mouth, as used in our previous study ( [23]) on energy-autonomous robots using MFCs is a potential solution. Such designs, with modifications, can be used to achieve a fully energy-autonomous sensor. Additionally, smart materials that respond to natural environmental gradients such as light [33] and temperature [34] could be used to build a self-powered mechanism with regular actuation cycles. IV. CONCLUSION This paper proposed the design and development of the first energy-autonomous MFC-based water quality sensing unit which can estimate COD concentration of water samples from a natural pond using an embedded ML algorithm. Using this sensing unit, we investigated the practicality of using a single MFC both as a sensor and a source of energy (to power the electronic components of the unit) at the same time. The unit was capable of continuous operation. COD values of the water samples were estimated weekly, a common time interval for applications such as aquaculture, with an accuracy of _R_ <sup>2</sup> = 0 _._ 94. This promising result indicates the potential of using MFCs in fully energy-autonomous and environment friendly monitoring applications. In the future, we are planning to demonstrate a more complete energy-autonomous sensing unit by including a self-feeding mechanism and a data display/transfer system. ACKNOWLEDGMENT The authors would like to thank Scott Erickson, Dr. Sajid Nisar, Hardik Parwana, Naser Faryad, and Mohsen Ghanbarnejad for their valuable discussion about the experiment results and the manuscript. REFERENCES [1] UNICEF and World Health Organization. (2019). _1 in 3 People Globally_ _Do Not Have Access to Safe Drinking Water—UNICEF, WHO_ . Accessed: Jul. 2, 2021. [Online]. Available: https://www.who.int/news/item/18-062019-1-in-3-people-globally-do-not-have-access-to-safe-drinking-waterunicef-who [2] F. O’Donncha and J. Grant, ‘‘Precision aquaculture,’’ _IEEE Internet Things_ _Mag._, vol. 2, no. 4, pp. 26–30, Dec. 2019. [3] R. Bhateria and D. Jain, ‘‘Water quality assessment of lake water: A review,’’ _Sustain._ _Water_ _Resour._ _Manage._, vol. 2, no. 2, pp. 161–173, Jun. 2016. [4] M. Di Lorenzo, A. R. Thomson, K. Schneider, P. J. Cameron, and I. Ieropoulos, ‘‘A small-scale air-cathode microbial fuel cell for on-line monitoring of water quality,’’ _Biosensors_ _Bioelectron._, vol. 62, pp. 182–188, Dec. 2014. [5] Y. Cui, B. Lai, and X. Tang, ‘‘Microbial fuel cell-based biosensors,’’ _Biosensors_, vol. 9, no. 3, p. 92, Jul. 2019. [6] M. Di Lorenzo, T. P. Curtis, I. M. Head, and K. Scott, ‘‘A single-chamber microbial fuel cell as a biosensor for wastewaters,’’ _Water_ _Res._, vol. 43, no. 13, pp. 3145–3154, Jul. 2009. [7] G. Pasternak, J. Greenman, and I. Ieropoulos, ‘‘Self-powered, autonomous biological oxygen demand biosensor for online water quality monitoring,’’ _Sens. Actuators B, Chem._, vol. 244, pp. 815–822, Jun. 2017. [8] H. Yang, M. Zhou, M. Liu, W. Yang, and T. Gu, ‘‘Microbial fuel cells for biosensor applications,’’ _Biotechnol. Lett._, vol. 37, no. 12, pp. 2357–2364, Dec. 2015. [9] Y. Feng, O. Kayode, and W. F. Harper, Jr., ‘‘Using microbial fuel cell output metrics and nonlinear modeling techniques for smart biosensing,’’ _Sci. Total Environ._, vol. 449, pp. 223–228, Apr. 2013. [10] W. F. Harper and T. Yi, ‘‘Using electronic signals and neural networks to monitor the performance of an anaerobic bioreactor,’’ _Int. J. Water Resour._ _Environ. Eng._, vol. 5, no. 9, pp. 521–532, 2013. [11] A. Garg, V. Vijayaraghavan, S. S. Mahapatra, K. Tai, and C. H. Wong, ‘‘Performance evaluation of microbial fuel cell by artificial intelligence methods,’’ _Expert Syst. Appl._, vol. 41, no. 4, pp. 1389–1399, Mar. 2014. [12] L. Xu, Y. Zhao, C. Fan, Z. Fan, and F. Zhao, ‘‘First study to explore the feasibility of applying microbial fuel cells into constructed wetlands for COD monitoring,’’ _Bioresour. Technol._, vol. 243, pp. 846–854, Nov. 2017. [13] Y. Feng, X. Wang, B. E. Logan, and H. Lee, ‘‘Brewery wastewater treat ment using air-cathode microbial fuel cells,’’ _Appl. Microbiol. Biotechnol._, vol. 78, no. 5, pp. 873–880, Apr. 2008. [14] B. Min, J. Kim, S. Oh, J. M. Regan, and B. E. Logan, ‘‘Electricity generation from swine wastewater using microbial fuel cells,’’ _Water Res._, vol. 39, no. 20, pp. 4961–4968, Dec. 2005. [15] P. Chatterjee, P. Dessì, M. Kokko, A.-M. Lakaniemi, and P. Lens, ‘‘Selec tive enrichment of biocatalysts for bioelectrochemical systems: A critical review,’’ _Renew. Sustain. Energy Rev._, vol. 109, pp. 10–23, Jul. 2019. [16] T. Cai, L. Meng, G. Chen, Y. Xi, N. Jiang, J. Song, S. Zheng, Y. Liu, G. Zhen, and M. Huang, ‘‘Application of advanced anodes in microbial fuel cells for power generation: A review,’’ _Chemosphere_, vol. 248, Jun. 2020, Art. no. 125985. [17] A. J. Slate, K. A. Whitehead, D. A. C. Brownson, and C. E. Banks, ‘‘Microbial fuel cells: An overview of current technology,’’ _Renew. Sustain._ _Energy Rev._, vol. 101, pp. 60–81, Mar. 2019. [18] B. E. Logan, B. Hamelers, R. Rozendal, U. Schröder, J. Keller, S. Freguia, P. Aelterman, W. Verstraete, and K. Rabaey, ‘‘Microbial fuel cells: Methodology and technology,’’ _Environ._ _Sci._ _Technol._, vol. 40, no. 17, pp. 5181–5192, 2006. [19] I. Ieropoulos, J. Greenman, and C. Melhuish, ‘‘Microbial fuel cells based on carbon veil electrodes: Stack configuration and scalability,’’ _Int._ _J._ _Energy Res._, vol. 32, no. 13, pp. 1228–1240, Oct. 2008. [20] I. A. Ieropoulos, J. Greenman, C. Melhuish, and I. Horsfield, ‘‘Microbial fuel cells for robotics: Energy autonomy through artificial symbiosis,’’ _ChemSusChem_, vol. 5, no. 6, pp. 1020–1026, Jun. 2012. [21] M. Taghavi, A. Stinchcombe, J. Greenman, V. Mattoli, L. Beccai, B. Mazzolai, C. Melhuish, and I. A. Ieropoulos, ‘‘Wearable self sufficient MFC communication system powered by urine,’’ in _Advances_ _in_ _Autonomous_ _Robotics_ _Systems_, M. Mistry, A. Leonardis, M. Witkowski, and C. Melhuish, Eds. Cham, Switzerland: Springer, 2014, pp. 131–138, [doi: 10.1007/978-3-319-10401-0_12.](http://dx.doi.org/10.1007/978-3-319-10401-0_12) [22] H. Philamore, J. Rossiter, A. Stinchcombe, and I. Ieropoulos, ‘‘Row-bot: An energetically autonomous artificial water boatman,’’ in _Proc. IEEE/RSJ_ _Int. Conf. Intell. Robots Syst. (IROS)_, Sep. 2015, pp. 3888–3893. [23] H. Philamore, I. Ieropoulos, A. Stinchcombe, and J. Rossiter, ‘‘Toward energetically autonomous foraging soft robots,’’ _Soft Robot._, vol. 3, no. 4, pp. 186–197, Dec. 2016. [24] J. M. Cohen, T. M. Samocha, J. M. Fox, R. L. Gandy, and A. L. Lawrence, ‘‘Characterization of water quality factors during intensive raceway production of juvenile _Litopenaeus_ _vannamei_ using limited discharge and biosecure management tools,’’ _Aquacultural_ _Eng._, vol. 32, nos. 3–4, pp. 425–442, Apr. 2005. [25] F. Pedregosa, G. Varoquaux, A. Gramfort, V. Michel, B. Thirion, O. Grisel, M. Blondel, P. Prettenhofer, R. Weiss, V. Dubourg, J. Vanderplas, A. Passos, D. Cournapeau, M. Brucher, M. Perrot, and E. Duchesnay, ‘‘Scikit-learn: Machine learning in Python,’’ _J. Mach. Learn. Res._, vol. 12, pp. 2825–2830, Nov. 2011. [26] G. Moser and S. B. Serpico, ‘‘Modeling the error statistics in support vector regression of surface temperature from infrared data,’’ _IEEE Geosci._ _Remote Sens. Lett._, vol. 6, no. 3, pp. 448–452, Jul. 2009. [27] J.-M. Monnet, J. Chanussot, and F. Berger, ‘‘Support vector regression for the estimation of forest stand parameters using airborne laser scanning,’’ _IEEE Geosci. Remote Sens. Lett._, vol. 8, no. 3, pp. 580–584, May 2011. [28] T. Hastie, R. Tibshirani, and J. Friedman, _The_ _Elements_ _of_ _Statistical_ _Learning_ [. New York, NY, USA: Springer, 2009, doi: 10.1007/978-0-387-](http://dx.doi.org/10.1007/978-0-387-84858-7) [84858-7.](http://dx.doi.org/10.1007/978-0-387-84858-7) [29] M. Awad and R. Khanna, ‘‘Support vector regression,’’ in _Efficient Learn-_ _ing_ _Machines:_ _Theories,_ _Concepts,_ _and_ _Applications_ _for_ _Engineers_ _and_ _System_ _Designers_ . Berkeley, CA, USA: Apress, 2015, pp. 67–80, doi: [10.1007/978-1-4302-5990-9_4.](http://dx.doi.org/10.1007/978-1-4302-5990-9_4) [30] _PIC18F46K22 Datasheet_, Microchip, Chandler, AZ, USA, 2016. [31] A. Larrosa-Guerrero, K. Scott, I. M. Head, F. Mateo, A. Ginesta, and C. Godinez, ‘‘Effect of temperature on the performance of microbial fuel cells,’’ _Fuel_, vol. 89, no. 12, pp. 3985–3994, 2010. [32] M.-A. Tsompanas, J. You, H. Philamore, J. Rossiter, and I. Ieropoulos, ‘‘Neural networks predicting microbial fuel cells output for soft robotics applications,’’ _Frontiers Robot. AI_, vol. 8, p. 31, Mar. 2021. [33] M. P. M. Dicker, J. M. Rossiter, I. P. Bond, and P. M. Weaver, ‘‘Biomimetic photo-actuation: Sensing, control and actuation in sun-tracking plants,’’ _Bioinspiration Biomimetics_, vol. 9, no. 3, Jun. 2014, Art. no. 036015. [34] N. P. Walling, H. Philamore, K. B. Landenberger, and F. Matsuno, ‘‘Towards a temperature-responsive pinecone-inspired actuator using silicone encapsulated hydrogels,’’ in _Biomimetic_ _and_ _Biohybrid_ _Systems_, U. Martinez-Hernandez, V. Vouloutsi, A. Mura, M. Mangan, M. Asada, T. J. Prescott, and P. F. M. J. Verschure, Eds. Cham, Switzerland: Springer, [2019, pp. 369–373, doi: 10.1007/978-3-030-24741-6_40.](http://dx.doi.org/10.1007/978-3-030-24741-6_40) FARHAD SHABANI received the B.Sc. degree in electrical engineering with a focus on control systems from the K. N. Toosi University of Technology, Tehran, Iran, in 2016, and the M.Eng. degree in mechanical engineering and science with a focus on robotics, in 2020. He is currently pursuing the Ph.D. degree with the Mechatronics Laboratory, Department of Mechanical Engineering and Science, Graduate School of Engineering, Kyoto University, Japan. His research interests include bio-inspired and energy-autonomous robots, mechatronics system designs, haptics, and human-centered robotics. In 2017, he was awarded the Japanese Government Scholarship for postgraduate studies. He was a recipient of awards including the Engineering Dean’s Award from Kyoto University (2018, 2019, and 2020), the Best Student Innovation Challenge Award from the IEEE World Haptics (2019), and the Second Place Award in Student Innovation Challenge of the AsiaHaptics (2018 and 2020). HEMMA PHILAMORE received the Ph.D. degree from the University of Bristol, in 2016. From 2017 to 2020, she was a Junior Associate Professor at Kyoto University, Japan. She is currently a Lecturer in robotics and autonomous systems with the University of Bristol, U.K. She specializes in soft, energy-autonomous and biohybrid robots–including microbial and proteinbased systems for electrical power generation and sensing. FUMITOSHI MATSUNO (Senior Member, IEEE) received the Dr.Eng. degree from Osaka University, Toyonaka, Japan, in 1986. In 1986, he joined the Department of Control Engineering, Osaka University. Since 2009, he has been a Professor with the Department of Mechanical Engineering and Science, Kyoto University, Kyoto, Japan. He is also the Vice President of the NPO International Rescue System Institute, Kobe, Japan, and served as the President for the Institute of Systems, Control and Information Engineers and the Vice President for the Robotics Society of Japan (RSJ). His current research interests include robotics, swarm intelligence, the control of distributed parameter systems and nonlinear systems, and rescue support systems in disaster. He is a fellow of the SICE, the JSME, and the RSJ. He received many awards, including the Outstanding Paper Award, in 2001, 2006, and 2017, the Takeda Memorial Prize, in 2001, and the Tomoda Memorial Prize, in 2017, from the Society of Instrument and Control Engineers (SICE), the Prize for Academic Achievement from Japan Society of Mechanical Engineers (JSME), in 2009, the Best Paper Award from the Information Processing Society of Japan, in 2013, and the Best Paper Award from the RSJ, in 2018. He is the General Chair of DARS-SWARM2021 and the Co-General Chair of ASCC2022. He served as the General Chair for the IEEE SSRR2011 and the IEEE/SICE SII2011, SWARM2015, and SWARM2017.

섹션 본문 62문단 · 42,825자

(제목 없음)

1The current methods of water quality monitoring tend to be costly, labor-intensive, and off-site. Also, they are not energetically sustainable and often require environmentally damaging power sources such as batteries. Microbial fuel cell (MFC) technology is a promising sustainable alternative to combat these issues due to its low cost, eco-friendly energy generation, and bio-sensing features. Extensive work has been done on using MFCs as bio-sensors or sources of power separately. However, little work has been done toward using MFCs for both applications at the same time. Additionally, previous studies using MFCs for water quality measurement have been mostly limited to laboratory conditions due to the biochemical complexity of the real-world. Another limitation of MFCs is how little power they can generate, requiring the MFC-based systems to have minimal power consumption. This work addresses these challenges and presents an energy-autonomous water quality sensing unit that uses a single MFC both as its sensory input and the sole source of power for computing the chemical oxygen demand (COD). In the proposed unit, geometric features of the voltage profile of the MFC (e.g., peak heights) are used as the inputs to a machine learning algorithm (support vector regression (SVR)). The electrical power generated by the MFC is used to drive a low-power microcontroller which logs the MFC voltage and runs the machine learning algorithm. Experimental evaluation showed that the device is capable of detecting the COD of natural pond water samples accurately (coefficient of determination (R 2 ) = 0.94). This work is the first demonstration of energy autonomy in an MFC-based sensing unit for measuring water quality and represents a step forward in the development of energy-autonomous sensors for environmental monitoring applications.INDEX TERMSMicrobial fuel cells, bio-sensing, energy autonomy, machine learning.VOLUME 9, 2021This work is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 License.For more information, see https://creativecommons.org/licenses/by-nc-nd/4.0/

I. INTRODUCTION

2Providing clean and safe water in a sustainable way is an ongoing global challenge. A recent report by UNICEF and the World Health Organization (WHO) reported that one in three people globally do not have access to safe drinking water [1]. Water safety is also an issue in food production. For example, water quality monitoring in aquaculture can be difficult due to labor intensity, high cost (of equipment and maintenance), and on-site application limitations [2]. Failure to detect deterioration of water quality can result in severe environmental changes, such as algal bloom, which can result in the death of cultivated fish and consequential financial loss [3].

3The associate editor coordinating the review of this manuscript and approving it for publication was Venkata Rajesh Pamula .

4In addition, there is a critical need to decrease the use of the existing environmentally damaging and non-sustainable energy generating devices (e.g., batteries) by replacing them with new, cost-effective, and easy to deploy renewable energy systems.

5To address the issue of water quality monitoring in an environmentally friendly and sustainable manner, this research aims to develop a self-powered, field-deployable, and biocompatible water quality sensing unit (Fig. 1). A key feature of the system is that it uses a microbial fuel cell (MFC) both as a sensor and a source of electrical power and, therefore, can monitor water quality over a longer period of time through self-generation of energy from water.

6An MFC is a two-electrode bio-electrical system (Fig. 2) that operates by oxidizing organic matter (present in a medium such as wastewater) at the anode via bacterial respiration, which, coupled to reduction of oxygen at the cathode, generates electrical power. This makes MFCs a promising technology for self-powered amperometric sensing in in-field, autonomous monitoring applications.

7The electrical potential of an MFC is dependent, for one, on the quantity of oxidizable bio-matter within the fuel cell anode chamber. MFC voltage can therefore be related to the chemical oxygen demand (COD), a widely used metric for analyzing water quality which describes the amount of oxygen necessary to completely oxidize all of the organic carbon in a water sample [4].

8Several researchers have proposed MFC based solutions for measuring water quality [5]. However, most of these solutions are not suitable for applications outside of controlled laboratory conditions (e.g., [6], [7]). Most existing MFC-based bio-sensors consider a linear relationship between a target parameter (such as COD) and the current (voltage) generated by the MFC [5]. These simple linear correlations are insufficient for in-field use because they do not account for the effect of factors other than the target variable (such as pH) on the output of the MFC. Even under lab conditions, the output often shows low repeatability in response to a given input due to variations that are very difficult to control, for example changes to the bacterial biofilm within the MFC [8].

9To account for factors other than the target variable, Feng et al. [9] propose to use machine learning (ML) for analyzing the COD of the contents of an MFC using the MFC voltage. The use of ML as a tool for analyzing complex data is rapidly growing due to the capability of ML algorithms for identifying patterns and relationships in noisy data. As such, many examples exist of ML algorithms capable of operating robustly under highly stochastic environmental conditions. In [9], features (e.g., maximum voltage value) extracted from the output voltage of an MFC (fed with water samples collected from a natural in-field source) are used as inputs for a supervised, feed-forward Artificial Neural Network (ANN) with one-way connections to estimate the COD values of the samples with high accuracy (coefficient of determination (R 2 ) = 0.99).

10Complex ML algorithms such as neural networks can be more accurate, but the computational power needed to run them requires more energy. Thus, using these computationally expensive algorithms is not practical when a low-power energy source such as an MFC is used. Therefore, one major objective of this research is to use a less complex ML algorithm with comparable accuracy to more complex algorithms used in previous works [9]- [11].

11Existing studies on MFCs for COD measurement investigate a limited range of values (COD of up to 500 mg/L [12]), which does not reflect the higher range of values needed for wastewater treatment applications [13], [14]. To address this, in this study, COD concentrations of 70-900 mg/L are investigated.

12In addition to bio-sensing, the capability of MFCs to extract energy from organic matter and convert it into electrical power has been widely investigated as a promising renewable energy technology [15]. However, the technology suffers from key limitations of low power density and energy conversion efficiency [16], [17]. A single MFC has a theoretical electro-chemical open-circuit voltage limitation of 1.1 V [18], whereas most MFCs produce voltages significantly lower than this under electrical loads required to generate power. As a result, multiple MFCs are often coupled together in series configuration to increase the total output voltage. However, this results in increased size and complexity of the device and the need to isolate the anodes of different MFCs to avoid unwanted parallel coupling via the contacting liquid sample [19].

13By devising innovative ways to harvest and use energy generated by MFCs, such as alternating periods of storage and use [20], a few existing works have demonstrated MFC installations, in some cases comprising only one fuel cell, used to power small electronic devices such as environmental monitoring buoys [7], wearable sensors [21], and mobile robots [22].

14Despite their potential as bio-sensors and power sources for low-power electronic devices, little has been done to explore this combined functionality. Most previous examples of MFC bio-sensors employ externally-powered peripheral instrumentation such as data-loggers and power sources [4], [12]. Pasternak et al. [7] reported the only previous example of an energy-autonomous MFC bio-sensor for online monitoring of biological oxygen demand (BOD). However, in contrast to the work presented here, their sensor is only able to detect whether the water sample is above or below a single threshold value and is not able to measure, process, and record data.

15MFC systems integrating power generation and biosensing will provide simplified and potentially miniaturizable designs, suitable for applications in low-cost remote monitoring and Internet of Things (IoT) applications. This works uses an MFC both as the bio-sensor and the sole source of power for a microcontroller which records the MFC voltage and applies a computationally efficient ML algorithm to the measured values to estimate the COD of a water sample.

16The rest of this article is organized as follows. Section II describes fabrication, integration, and operation of the different parts of the unit (both hardware and software). Section III describes and discusses the results of the steps taken in Section II. It also provides a general discussion and suggests future steps. Finally, Section IV concludes this article.

A. MFC FABRICATION

17Four, two-chamber analytical style MFCs, as used in [23], were fabricated and used in this research (Fig. 2). The anode chamber of these cuboid MFCs holds a 25 mL water sample; it is open on one side, where a CMI-7000 Proton Exchange Membrane (PEM; Membranes International Inc., Ringwood, USA), with an area of 20 cm 2 is attached. An open-to-air cathode, with an area of 20 cm 2 , made from conductive latex, was used to maintain a continuous redox reaction without the need to hydrate the cathode. A polyurethane-based rubber coating (Plasti-Dip, UK) was mixed with white spirit and micronized graphite powder at a mass ratio of 2:3:1 and painted onto the air side of the membrane.

18The MFCs were fabricated identical to achieve similarity in the output of individual MFCs. This was done with the aim of using a data set collected from all MFCs to train the ML algorithm that would then perform with high accuracy when used with test data from any single MFC in the study population. This is important since training the algorithm on each MFC would become infeasible as the number of MFC sensors increases, for example in a large-scale application.

19To achieve a uniform electrode thickness of approximately 100 µm, a K Hand coater (RK PrintCoat Instruments Ltd, UK) was used to paint the conductive latex onto the membrane. The uniformity of the quantity of conductive latex used for each cathode across all MFCs in the study population was tested by measuring the resistance of the painted conductive latex cathode layer between two points at either end of the long axis of the rectangular cathode (Fig. 3).

B. MFC INOCULATION AND OPERATION

20First, external loads of 1 k were connected to the MFCs (Fig. 2). The load remained connected throughout the whole VOLUME 9, 2021 experiment. Next, the MFCs were filled with water sampled from a natural pond (Niibayashiike Park, Kyoto, Japan) to inoculate them with a bacterial community. The entire content of the MFCs was manually replaced with fresh pond water using a syringe (batch feeding) once per week, for three weeks. This feeding method was chosen due its simplicity and suitability for the application (compared with continuous feeding). After that, the MFCs were batch-fed weekly with water sampled from the pond (the water samples were taken from different parts of the pond and at different dates (i.e., weeks) to introduce real world natural/biological uncertainties to the experiment) and synthetically modified by varying concentrations of tryptone, yeast, and sodium acetate (Sigma-Aldrich, Missouri, USA) to control the COD value of the water sample. Table 1 shows the average concentrations of the mentioned chemicals added to the pond water samples to reach the desired COD values of 70, 300, 500, and 900 mg/L. The COD values were measured using a spectrophotometer (photoLab 7600, Xylem, Germany). The MFCs were fed with 3 batches of water for each of the 4 COD values, 12 batches (weeks) in total. The weekly time interval for feeding was selected as this is a common time interval in aquaculture for monitoring water quality [24]. A temperature of between 24 • C and 25 • C was maintained throughout the entire experiment. The output voltage of the MFCs was recorded using a 34972A LXI data acquisition unit (Keysight, USA) with a sampling interval of 2 minutes.

C. MACHINE LEARNING

21An ML algorithm (support vector regression (SVR)) was used to find the relationship between the output voltage of the MFCs with a targeted water quality value (in our case, COD). The following steps were followed in order to select, train, test, and implement the algorithm. First, a data set containing 48 data points was collected (4 MFCs, 4 COD values, 3 repetitions for each COD value). Each repetition represented a batch of water fed to an MFC and resulted in a peak in the output voltage (Fig. 4). As proposed by Feng et al. [9], five features were extracted from each peak: maximum peak height (PH), peak area (PA), peak duration time (PD), acceleration rate (AR), and subsidence rate (SR). In [9], for each COD concentration, batch feeding continued until three consecutive current (voltage) response profiles with the same peak height (within 5% error) were observed, which were then used to train the ML algorithm. This resulted in a high correlation between the inputs (features) and output (COD value), however this method may be less practical in real world applications since they disregard the possibility for a single COD concentration to produce voltage profiles with different peak heights. In contrast, in the work presented here, three peaks were obtained per COD value, and these were included in the data set regardless of whether the peak heights were the same or not.

22PD was found as the time period between the start and end point of the peak. The start of a voltage peak was detected where the voltage increased to, and remained consistently above, 0.005 V for at least one day. Similarly, the end of a peak was detected as soon as the voltage subsequently fell below 0.005 V. These voltages and time thresholds were selected based on preliminary observations of the MFC outputs. PH was determined as the maximum value of the output voltage. PA was calculated by numerically integrating the voltage value between the start and end points of the peak with respect to time. AR and SR were determined by calculating the slope of the line between the maximum voltage point and the start or end point, respectively (Fig. 4).

23Prior to feature extraction, a median filter with a window size of N=10 was applied for smoothing and negative values were capped to zero.

24Secondly, the dimensionality of the dataset was minimized by removing less correlated features, based on the Pearson correlation coefficient (PCC) between the features and the COD values (Table 3), reducing the number of features considered from five to three (PH, PA, PD). Removing less correlated features can reduce the computational load (and consequently the energy consumed) without reducing the accuracy of the prediction algorithm.

25Thirdly, an ML algorithm was selected. While increased accuracy is often achieved through increased complexity, the increased energy consumption associated with increased complexity has particular significance when designing a lowpower energy-autonomous system. To determine a suitable algorithm for this application, five different off-the-shelf algorithms from the Python 3, SciKit package [25] were considered: simple linear regression, ridge regression, SVR, random forest regression, and artificial neural network (ANN). The hyper-parameters of the algorithms were tuned using the exhaustive grid search method with R 2 as the evaluation metric. Tuning, training, and the evaluation of the algorithms were done on a desktop computer running Python 3. SVR with radial basis function (RBF) kernel was selected for a good balance between high accuracy and low execution time, which will be discussed further in Section III-A. SVR is widely used in the field of remote sensing for continuous estimation of different parameters [26], [27] due to its robustness to dimensionality, nonlinearity, and generalization performance [28].

26The algorithm was trained and verified on the desktop computer by dividing the dataset randomly into test (25%) and train (75%) datasets. Finally, the pre-trained algorithm was implemented in C using the MikroE compiler on a lowpower PIC18LF46K22 microcontroller (Microchip, Arizona, USA).

27As shown in Fig. 5, the complete embedded algorithm comprises three different modes: sampling, estimation, and sleep. In the sampling mode, the voltage from the MFC is recorded and calculations are performed including filtering, detecting the start and end point of the peak, finding PD and PH, and integrating the voltage in order to find PA. Between each sampling event (every 32 minutes), the microcontroller enters sleep mode, minimizing the energy consumption of the microcontroller during this time. To further minimize energy consumption, once the end of the peak has been detected, the microcontroller enters and remains in sleep mode until one week has passed since sampling began. At this point, the features are extracted and the COD of the water sample is estimated by the ML algorithm (estimation mode).

28The sampling interval used to build the training data set was 2 minutes. However, the deployed algorithm was tested with two different sampling intervals: 2 minutes and 32 minutes as when the SVR algorithm was trained and tested on the desktop computer. Different data sampling intervals from 2 to 64 minutes (step size of 2 minutes between each value) were achieved by down-sampling. 32 minutes was determined to be the optimal sampling interval for minimizing energy consumption without significant loss in accuracy. Further details on this are provided in Section III-A.

D. ENERGY HARVESTING

29In order to power the microcontroller using a single MFC, an energy harvesting and power management circuit was used to amplify and store the low output voltage of the MFC (Fig. 6). The low voltage output of the MFC was amplified using an inductor-based voltage booster (EH4295, Advanced Linear Devices, California, USA). The voltage booster amplifies the MFC voltage with a gain of 7 to 10 and has a lower input voltage threshold of 60 mV and a nominal impedance of 950 . The boosted AC voltage was then rectified to a DC voltage using an energy harvester (EH300, Advanced Linear Devices) and used to charge a storage super-capacitor (0.66 F). The voltage booster and energy harvester combined have a rated energy conversion efficiency of 48%, so the total harvested energy can be estimated as: E h = 0.48E T , where the total energy generated by the MFC E T = 1 R V 2 dt is calculated using the MFC voltage, V , and the external load, R, which is assumed to be constant.

E. ENERGY CONSUMPTION

30The energy required for one COD analysis cycle was calculated as the sum of the energy consumed by each of the main components and processes: voltage regulator (to supply the microcontroller with a constant voltage of 1.8 V (E r )) and the microcontroller in sleep (E sl ), estimation (E e ), and sampling (E sa ) modes:

31(1) VOLUME 9, 2021 where n is the number of samples taken over the course of the analysis cycle, which was set as 315 (giving a sampling interval of 32 mins). It was assumed that the regulator and sleep mode operated continuously for the whole one-week cycle.

32The time period of single sampling and estimation events, and the current consumed by all microcontroller operations were measured empirically. As sampling and estimation processes happened within a fraction of a second, this was achieved by measuring the current and time taken for the microcontroller to run each of these operations 100 times. The total time was then divided by 100 to obtain the time for a single instance of the process. The power consumption of the voltage regulator varies with the voltage of the storage capacitor. However, for simplicity, the current and voltage were assumed to be constant values which were estimated from the rated value on the component data sheet. The energy required for each process was then calculated using E = V .I .t where V , I , and t are the voltage, current, and time for each process, respectively.

F. POWER MANAGEMENT

33To operate with energy autonomy, the sensing unit must operate within the energy budget defined by the output of the MFC.

1) SYSTEM IMPLEMENTED IN HARDWARE

34The voltage regulator (TPS7A02, Texas Instruments, Texas, USA) used to supply the microcontroller from the output of the storage capacitor (see Section II-D) at a constant voltage, 1.8 V (the minimum rated voltage of the microcontroller) required a minimum rated input voltage of V min = 2.3 V . When the input voltage was less than 2.3 V, the output of the voltage regulator was approximately 0 V. This had the advantage of allowing the system to 'cold-start' by allowing the 0.6 F storage capacitor to charge up to 2.3 V before being discharged to the microcontroller, which prevented the supply voltage to the microcontroller from falling below its minimum rated value. This cold start functionality also allows the system to restart itself during operation if it loses power, which is important, for example, while operating in the field where harvested energy levels may fluctuate. The size of the capacitor, C, was selected to satisfy equation 2. This inequality specifies that the capacitor must be able to store at least enough energy for one COD analysis cycle E out , in addition to the energy stored at V min without exceeding the maximum rated voltage of the circuit components V max . In the implemented system,

35the value used, 0.66 F, satisfies equation 2 where n = 315 is used to find E out (equation 1).

2) SIMULATED SYSTEM WITH HYSTERESIS

36The system can cold start providing that the start-up power drawn by the electrical load, the microcontroller in this case, does not exceed the rate of energy harvesting. If a large startup current is drawn, for example, this can cause the storage capacitor voltage to immediately fall below the rated input voltage, preventing cold start by cutting the supply voltage to the microcontroller.

37To mitigate this, we propose an additional part of the power management circuit to introduce a hysteresis between the input voltage threshold above which the voltage regulator outputs 1.8 V, and a lower input voltage threshold, below which the voltage regulator outputs 0 V (Fig. 7). In the proposed system, a comparator connects/disconnects the storage capacitor from the voltage regulator and microcontroller by switching an N-channel MOSFET, depending on the voltage of the storage capacitor, V cap . V cap simultaneously powers the capacitor so that V cc ≡ V cap . E out (equation 1) must be modified to include an extra term, the energy consumed by the compactor (E co ) during each cycle (one week): For the regulator (TPS7A02) to supply an output of 1.8 V, the minimum rated input voltage is 2.3 V. Therefore the lower threshold of the comparator (the 'switch off' voltage of the microcontroller) was set as V tl =2.3 V. The higher threshold, V th (the 'switch on' voltage of the microcontroller), was selected to prevent the power supply from being connected to the microcontroller until sufficient energy to run at least one COD analysis cycle, E out , was stored, in addition to the energy remaining in the capacitor at the switch-off voltage V tl . The 'switch-on' voltage, V th , then be determined as the voltage at which E out was stored in the capacitor in addition to the energy stored in the capacitor at V cap = V tl :

38The comparator hysteresis was set using three resistors (R 1−3 , Fig. 7). Once the threshold voltages, V th and V tl , have been determined, the value of these resistors can be calculated by using the built-in reference voltage of the comparator and considering the two possible states of the comparator, V out = 0 and V out = V cc . The current through resistor R 3 is

39at the points when V out switches between V cc and 0 V, which gives two possible values for R 3 (equation 5):

40where V cc ≡ V cap = V tl in equation 5b (where V cap is falling). A constant value for i 3 was set, based on the approximate current limitations of the comparator, and used to calculate the value of R 3 using equations 5a and 5b. The lower of these two resistances was used in this case. Kirchhoff's current law was used to give equations for two states where V cap rises to V th (equation 6a) and where V cap falls to V tl (equation 6b). R 1 was then calculated by equating 6a and 6b, eliminating R 2 :

41where V cc ≡ V cap = V tl in equation 6b (where V cap is falling) and therefore also in equation 7. Lastly, R 2 was calculated using either 6a or 6b. The cold start circuit described was simulated using Proteus circuit simulation software (Labcenter Electronics, UK). A comparator (LTC1540, Analog devices, Massachusetts, USA) with a reference voltage V r = 1.18 V was considered. i 3 was set as 0.2µA. V tl was set as 2.3 V, and the higher threshold used for the hysteresis, V th , was set as 3.0 V. R 1 , R 2 , and R 3 were then calculated as 1.76 M , 1.41 M , and 5.60 M , respectively, using equations 5 to 7. In the simulation, we replaced the capacitor with a sinusoidal power source (0 6 V, 1 Hz) to simulate the rising and falling voltage of the capacitor. The simulation was done with time steps of 0.01 s.

G. INTEGRATED SYSTEM EVALUATION

42The accuracy of COD prediction by the trained and tested ML algorithm and the ability of the sensing unit to operate energyautonomously was tested. As depicted in Fig. 1, a single MFC was randomly selected and connected to the energy harvesting hardware and the MCU. The MFC was batch-fed with water which was sampled weekly from the natural pond and modified synthetically by addition of tryptone and yeast to achieve the target COD value ( Table 1). The experiment was conducted for five different COD values (70, 300, 500, 700, and 900 mg/L), in a random order, over five weeks. The voltages of the MFC, the storage capacitor, and the supply voltage of the microcontroller were recorded throughout the VOLUME 9, 2021 experiment using the data acquisition unit. The estimated COD values were saved in EEROM of the microcontroller (non-volatile memory). It should be noted that the current setup requires an external system to display the COD estimation, such as an externally-powered transceiver connected to a serial port terminal application running on a PC.

43Finally, to calculate the efficiency, η, of the system, the total energy generated by the MFC (E T ), consumed energy (E c ) during the experiment (E c = 5E out ), and the energy stored in the capacitor (E s ) at the end of the experiment period (5 weeks) were used. E T was calculated as E T = 1 R V 2 dt (as described in Section II-D). The energy stored in the capacitor at the end of the experiment was calculated as:

44where V f is the capacitor voltage at the end of the experiment. It should be noted that the capacitor is assumed to be fully discharged initially, (V i = 0). The efficiency of the system was determined as:

III. RESULTS AND DISCUSSION

45A. MFC DATASET GENERATION, ALGORITHM SELECTION, AND TRAINING Fig. 8 shows a peak in the output voltage of the MFC with each batch feeding. While peak heights and peak durations generally increase with COD value, this trend is inconsistent. For example, peak height varies significantly for a single COD value. As a result, relatively lower accuracy was obtained when determining COD values using simple linear regression methods than more complex machine learning algorithms ( Table 2). Table 3 shows the Pearson correlation coefficient (PCC) between the peak features and the COD values. Based on the values, the acceleration and subsidence rates (AR and SR) were determined to be less-correlated features since their PCC is smaller compared to the other features and were therefore removed from the deployed ML algorithm.

46SVR was selected as the ML algorithm for implementation as an embedded system for a compromise between accuracy (R 2 value) and execution time (the longer the time, the higher the required energy), based on the results in Table 2. An important point in this study is the relatively small size of the generated dataset (48 data points). While the RBF kernel based SVR has a relatively high accuracy of R 2 = 0.94, the estimation accuracy may be improved by training it using a larger dataset [29]. This can be achieved by running the experiments for a longer period of time and with more MFCs. While the required accuracy of a sensor depends on the application, the achieved accuracy (R 2 = 0.94) is considered acceptable for a wide range of applications such as water testing in aquaponics and fish farms which require less precise measurements (as compared to applications such as drinking water quality monitoring). The accuracy (R 2 = 0.94) is also comparable with the previous work which used more complex algorithms such as ANN [9] (R 2 = 0.99). Furthermore, in the experiments, a wide range of COD has been considered (70-900 mg/L). Training the algorithms for a smaller range can be used to achieve a higher accuracy in that range. 9 shows a similar performance of the SVR algorithm during the training (R 2 = 0.98) and testing (R 2 = 0.94) phases, which were run on the desktop computer. The minimal decrease in accuracy shown during the testing phase, compared to the training phase, validates the success of the algorithm training process.

47The average electrical resistance of the MFC cathode, measured as described in Section II-A, was 250 with a standard deviation (SD) of 5.62. The small value of SD in comparison to the average indicates uniformity of the cathode thickness among the MFCs. The high accuracy of the algorithm, despite being trained on data from multiple MFCs, may be accounted for by this consistency in MFC fabrication. Fig. 10 shows the effect of the sampling interval on the accuracy of the algorithm. 32 minutes was the largest sampling interval (lowest sampling frequency) that could be used with no significant loss of accuracy in COD prediction. Recording the continuous voltage signal with larger sampling intervals resulted in the features being captured by the discretized signal with lower accuracy and the profile of the signal being lost. Using smaller intervals did not cause a noticeable improvement in the accuracy. So, a sampling interval of 32 minutes was determined as the optimum value in this study. Fig. 11 shows the voltage readings from different components of the system over the 5 week period during which the MFC was fed with water with different COD values in a random order. The system was able to cold start from the capacitor being fully discharged (approximately 0 V). When the capacitor voltage reached the minimum rated input voltage of the regulator (2.3 V), the microcontroller switched on, as shown by the step increase of the supply voltage to the microcontroller from 0 V to 1.8 V. The microcontroller then remained on throughout the experiment as the voltage of the capacitor never dropped below the minimum rated input voltage of the regulator (2.3 V). A sudden dip can be observed in the capacitor voltage as the microcontroller switches on (Fig. 11). If this dip were larger (i.e., if greater start-up power was drawn) or the capacitor charging gradient was smaller, a situation may be encountered in which the system never goes fully into operation (i.e., performs one cycle of COD measurement) because the start-up power drain causes the microcontroller to switch off as soon as it switches on. This demonstrates the potential need for a more sophisticated power management system in future work, such as the cold start system using comparator hysteresis, proposed in Section II-F2. Fig. 11 shows a net increase in the energy stored in the capacitor as the amount of energy harvested from the MFC exceeds the energy consumed by the system. This may eventually result in the capacitor voltage exceeding the maximum rated volume of the system, which is 6 V in this study (Section II-F1). Using a capacitor with a greater capacitance would reduce the rate of voltage increase, but a consequence VOLUME 9, 2021 FIGURE 11. Voltage measurement of different energy harvesting components. The peaks in the MFC voltage are generated by feeding it with COD = 500, 70, 300, 900, and 700 mg/L for the weeks 1 to 5. of this is that the system would need to harvest more energy than is currently needed to reach the switch-on voltage V th . The surplus energy could instead be used within the system for example to power a self-feeding mechanism or data display or transfer system, thereby demonstrating more complete energy autonomy.

B. INTEGRATED SYSTEM DEPLOYMENT

48The experimental results of the implemented system (running C language on the microcontroller; Fig. 12) had similar accuracy (R 2 = 0.94) to the desktop algorithm implementation (running Python; Fig. 9 (b)), validating the sensing performance of the unit and implementation of the algorithm. The algorithm was further validated by its ability to correctly predict a new value (COD = 700 mg/L) which was not included in the training data, without negatively affecting the accuracy of the system. Also, the comparable accuracy between the algorithm run at 2 minutes on the desktop computer versus 32 minutes on the MCU validates the choice of the sampling interval.

49Considering the required energy for each cycle (week) shown in Table 4 (1.1789 J), the total consumed energy in 5 weeks (E c ) is measured as 5.8945 J. From Fig. 11, the final voltage of the capacitor (V f ) is 5.422 V so the final stored energy in the capacitor is E s = 9.701 J. Also, the total energy generated by the MFC (E T ) is measured as 150.342 J. As a result, using equation 9, η actual = 0.104. This value is less than the previously mentioned rated energy conversion efficiency of the energy harvester and voltage booster (0.48) which may be explained by the non-ideal behavior of the other circuit components, including the capacitor leakage current, for example.

50A disadvantage of the current 'cold-start' behavior is that the microcontroller is likely to switch on while the MFC output voltage is part way into a peak, as shown in the case in the first peak in Fig. 11. This is likely to reduce the accuracy of the estimated COD value as smaller PD and PA will be calculated. As the delay duration (i.e., the time required for the storage capacitor to be charged to the voltage at which the voltage regulator will supply power to the microcontroller) increases, the accuracy is likely to decrease. The delay duration depends on the power output of the MFC, which in turn depends on factors such as MFC size and structure, and the energy density of the water samples (the higher the COD value, the higher the density).

1) SIMULATED SYSTEM RESULTS

51The power management system proposed in Section II-F2, was simulated. The hysteresis can be observed in Fig. 13. When the capacitor voltage is rising, the microcontroller supply voltage rises from 0 and reaches 1.8 V when the capacitor voltage hits V th = 3.022 V. However, when the capacitor voltage is falling, the supply voltage of the microcontroller decreases from 1.8 and reaches 0 V at the lower threshold voltage V tl = 2.3 V.

52This demonstrates a more robust cold-start compared to the system implemented in hardware and will be used in future work.

C. GENERAL DISCUSSION AND FUTURE WORK

53Future work on the power management circuit is needed to address the delay resulting from the cold-start. For example, when extracting features from a voltage peak in the software, checks can be considered to make sure that the entire peak has been recorded (and not only a part of it). For instance, one simple check can be to ignore the peaks being recorded after their maximum values by checking if the measured voltage values are only decreasing, which means recording has started after the maximum value of the peak.

54Similar to other studies, such as [9], not all MFCs in the experiment functioned properly. The experiment was started with 6 MFCs but 2 of them stopped generating power after a few days despite efforts to maintain the same principles for fabricating all MFCs. This shows the need for more sophisticated and standardized methods and materials for fabricating the MFCs which may also increase the performance (both power production and bio-sensing).

55Currently, COD tests are mostly being done off-site. For example, a common way to determine COD concentration of water samples is using photometric methods (as we did to create our data set). These laboratory tests are time consuming and involve using expensive chemical reagents. The sensing unit presented in this work shows the potential to overcome these and provides a reliable way to measure COD in the field.

56In this paper, only one water quality parameter (COD) is discussed. However, the idea can be applied to multiple water quality metrics such as pH, biological oxygen demand (BOD), and dissolved oxygen (DO).

57We showed the robustness of the sensor against the natural/biological uncertainties which resulted from natural pond samples acquired at different times. As discussed in Section II-B, we synthetically modified the water samples to generate our data set. However, since the water samples were taken at different dates and from different parts of the pond, we could keep the biological uncertainties in our experiments. It should be noted that Table 1 shows the average values for the chemicals. In other words, to generate three samples with a certain concentration, we had to use different concentrations of the chemicals. This indicates that the water samples were chemically different each time. For example, three samples with COD = 300 mg/L had pH values of 7.2, 7.5, and 8.7 after the addition of the chemicals. So, it can be concluded that using ML algorithms, we can measure a targeted parameter independent of others. A potential next step is to use natural water samples without synthetic modification to VOLUME 9, 2021 evaluate the accuracy of the system for predicting COD due to mixed sources of biological carbon in the sample. Future work may also include testing the resilience of the system to environmental factors such as temperature variation, which can significantly affect the voltage profile [31], and was not considered in this study.

58In this work the state-of-the-art commercially available energy harvesting device was used. The energy harvester we used has an impedance of 950 while the average internal resistance (the internal load between the anode and the cathode of each MFC measured after its fabrication) of our MFCs is 2.7 k ±11%. However, for increased energy harvesting efficiency, considering the maximum power transfer theorem, it would be preferable to use an energy harvesting device with an internal resistance closer to our power source (2.7 k ) in future work.

59An important point that needs to be considered in future studies is the size of the MFC, as this impacts the energy that can be harvested from a single batch as well as the duration of the voltage peak. For example, larger MFCs can be preferable for power production as a greater amount of energy from bio-matter is fed to the MFC in a single batch, which is especially important for energy-autonomous systems. However, the longer duration of the peak associated with larger MFC volumes can be less desirable for the sensing applications such as the one presented in this study as the system takes longer to produce a measurement value. These needs should be balanced when designing future systems. A possible solution could be to use multiple smaller MFCs connected in series, parallel, or some combination to provide comparable power output to the single large MFC used in this study, but with a shorter peak duration.

60Additionally, in Fig. 8, it can be observed that after feeding the MFC with COD of 900 mg/L, the end points of the peaks are very close to the start of the next peaks. This limited the maximum measurements to 900 mg/L using the current system since for higher COD concentrations, the next peak will start before the current peak is finished. Therefore, for the current system to predict higher COD values accurately, either the measurement period for one peak should be increased, or the ML algorithm should be retrained, potentially considering different features of the voltage profile. An alternative solution could be to expand on the ML algorithm used to predict the duration of the peak based on earlier sampled voltages, as proposed in [32].

61This study is the first to use an MFC for both power production and robust bio-sensing with the ability to interpret the data using an ML algorithm and recording the measurements. This will open a new avenue in the use of MFCs for energyautonomous applications such as remote sensing and environmental monitoring. However, for complete energy autonomy, a self-powered mechanism should be included to automate the process of feeding (taking in/sending out the water samples). This is a natural next step as the system already generates more energy than is required for COD analysis and the number of MFCs and/or MFC size could be adjusted if more power is needed. A soft-robotic mouth, as used in our previous study ( [23]) on energy-autonomous robots using MFCs is a potential solution. Such designs, with modifications, can be used to achieve a fully energy-autonomous sensor. Additionally, smart materials that respond to natural environmental gradients such as light [33] and temperature [34] could be used to build a self-powered mechanism with regular actuation cycles.

IV. CONCLUSION

62This paper proposed the design and development of the first energy-autonomous MFC-based water quality sensing unit which can estimate COD concentration of water samples from a natural pond using an embedded ML algorithm. Using this sensing unit, we investigated the practicality of using a single MFC both as a sensor and a source of energy (to power the electronic components of the unit) at the same time. The unit was capable of continuous operation. COD values of the water samples were estimated weekly, a common time interval for applications such as aquaculture, with an accuracy of R 2 = 0.94. This promising result indicates the potential of using MFCs in fully energy-autonomous and environment friendly monitoring applications. In the future, we are planning to demonstrate a more complete energy-autonomous sensing unit by including a self-feeding mechanism and a data display/transfer system.

참고문헌 33건

  1. Microbial fuel cells for biosensor applications Biotechnology Letters · Springer Science+Business Media · 2015 10.1007/s10529-015-1929-7
  2. The Elements of Statistical Learning Springer series in statistics · Springer Science+Business Media · 2001 10.1007/978-0-387-21606-5
  3. Microbial Fuel Cells:  Methodology and Technology Environmental Science & Technology · American Chemical Society · 2006 10.1021/es0605016
  4. A small-scale air-cathode microbial fuel cell for on-line monitoring of water quality Biosensors and Bioelectronics · Elsevier BV · 2014 10.1016/j.bios.2014.06.050
  5. Performance evaluation of microbial fuel cell by artificial intelligence methods Expert Systems with Applications · Elsevier BV · 2013 10.1016/j.eswa.2013.08.038
  6. Biomimetic photo-actuation: sensing, control and actuation in sun-tracking plants Bioinspiration & Biomimetics · IOP Publishing · 2014 10.1088/1748-3182/9/3/036015
  7. Brewery wastewater treatment using air-cathode microbial fuel cells Applied Microbiology and Biotechnology · Springer Science+Business Media · 2008 10.1007/s00253-008-1360-2
  8. Effect of temperature on the performance of microbial fuel cells Fuel · Elsevier BV · 2010 10.1016/j.fuel.2010.06.025
  9. Using microbial fuel cell output metrics and nonlinear modeling techniques for smart biosensing The Science of The Total Environment · Elsevier BV · 2013 10.1016/j.scitotenv.2013.01.004
  10. Microbial fuel cells based on carbon veil electrodes: Stack configuration and scalability International Journal of Energy Research · Wiley · 2008 10.1002/er.1419
  11. Characterization of water quality factors during intensive raceway production of juvenile Litopenaeus vannamei using limited discharge and biosecure management tools Aquacultural Engineering · Elsevier BV · 2004 10.1016/j.aquaeng.2004.09.005
  12. Scikit-learn: Machine Learning in Python arXiv (Cornell University) · Cornell University · 2012 10.48550/arxiv.1201.0490
  13. Support Vector Regression for the Estimation of Forest Stand Parameters Using Airborne Laser Scanning IEEE Geoscience and Remote Sensing Letters · Institute of Electrical and Electronics Engineers · 2011 10.1109/lgrs.2010.2094179
  14. A single-chamber microbial fuel cell as a biosensor for wastewaters Water Research · Elsevier BV · 2009 10.1016/j.watres.2009.01.005
  15. Modeling the Error Statistics in Support Vector Regression of Surface Temperature From Infrared Data IEEE Geoscience and Remote Sensing Letters · Institute of Electrical and Electronics Engineers · 2009 10.1109/lgrs.2009.2015777
  16. Wearable Self Sufficient MFC Communication System Powered by Urine Lecture notes in computer science · Springer Science+Business Media · 2014 10.1007/978-3-319-10401-0_12
  17. Using electronic signals and neural networks to monitor the performance of an anaerobic bioreactor International Journal of Water Resources and Environmental Engineering · Academic Journals · 2013 10.5897/ijwree12.121
  18. Microbial Fuel Cells for Robotics: Energy Autonomy through Artificial Symbiosis ChemSusChem · Wiley · 2012 10.1002/cssc.201200283
  19. Electricity generation from swine wastewater using microbial fuel cells Water Research · Elsevier BV · 2005 10.1016/j.watres.2005.09.039
  20. Row-bot: An energetically autonomous artificial water boatman 2021 IEEE/RSJ International Conference on Intelligent Robots and Systems (IROS) · 2015 10.1109/iros.2015.7353924
  21. Support Vector Regression Apress eBooks · 2015 10.1007/978-1-4302-5990-9_4
  22. Water quality assessment of lake water: a review Sustainable Water Resources Management · Springer Science+Business Media · 2016 10.1007/s40899-015-0014-7
  23. Toward Energetically Autonomous Foraging Soft Robots Soft Robotics · Mary Ann Liebert, Inc. · 2016 10.1089/soro.2016.0020
  24. Self-powered, autonomous Biological Oxygen Demand biosensor for online water quality monitoring Sensors and Actuators B Chemical · Elsevier BV · 2017 10.1016/j.snb.2017.01.019
  25. First study to explore the feasibility of applying microbial fuel cells into constructed wetlands for COD monitoring Bioresource Technology · Elsevier BV · 2017 10.1016/j.biortech.2017.06.179
  26. The Elements of Statistical Learning Springer series in statistics · Springer Science+Business Media · 2009 10.1007/978-0-387-84858-7
  27. Microbial fuel cells: An overview of current technology Renewable and Sustainable Energy Reviews · Elsevier BV · 2018 10.1016/j.rser.2018.09.044
  28. Selective enrichment of biocatalysts for bioelectrochemical systems: A critical review Renewable and Sustainable Energy Reviews · Elsevier BV · 2019 10.1016/j.rser.2019.04.012
  29. Towards a Temperature-Responsive Pinecone-Inspired Actuator Using Silicone Encapsulated Hydrogels Lecture notes in computer science · Springer Science+Business Media · 2019 10.1007/978-3-030-24741-6_40
  30. Microbial Fuel Cell-Based Biosensors Biosensors · Multidisciplinary Digital Publishing Institute · 2019 10.3390/bios9030092
  31. Application of advanced anodes in microbial fuel cells for power generation: A review Chemosphere · Elsevier BV · 2020 10.1016/j.chemosphere.2020.125985
  32. Precision Aquaculture IEEE Internet of Things Magazine · Institute of Electrical and Electronics Engineers · 2019 10.1109/iotm.0001.1900033
  33. Neural Networks Predicting Microbial Fuel Cells Output for Soft Robotics Applications Frontiers in Robotics and AI · Frontiers Media · 2021 10.3389/frobt.2021.633414